%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : www.kowitt.ac.th  /  Your IP : 216.73.216.118
Web Server : Microsoft-IIS/7.5
System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.6.31
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Program Files/Microsoft VS Code/resources/app/out/vs/workbench/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js
/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["exports","require","vs/nls!vs/workbench/workbench.main","vs/nls","vs/base/common/winjs.base","vs/base/common/lifecycle","vs/platform/instantiation/common/instantiation","vs/base/common/event","vs/base/browser/dom","vs/base/common/errors","vs/base/common/uri","vs/base/common/platform","vs/platform/theme/common/themeService","vs/css!vs/workbench/workbench.main","vs/base/common/strings","vs/platform/contextkey/common/contextkey","vs/platform/registry/common/platform","vs/platform/configuration/common/configuration","vs/base/common/async","vs/editor/common/core/range","vs/base/common/arrays","vs/workbench/services/editor/common/editorService","vs/platform/notification/common/notification","vs/base/common/actions","vs/base/common/objects","vs/base/common/paths","vs/platform/theme/common/colorRegistry","vs/platform/workspace/common/workspace","vs/platform/telemetry/common/telemetry","vs/platform/commands/common/commands","vs/base/common/types","vs/platform/actions/common/actions","vs/editor/browser/editorExtensions","vs/platform/files/common/files","vs/platform/storage/common/storage","vs/platform/contextview/browser/contextView","vs/platform/environment/common/environment","vs/platform/keybinding/common/keybinding","vs/platform/lifecycle/common/lifecycle","vs/editor/common/core/position","vs/workbench/common/editor","vs/base/browser/ui/actionbar/actionbar","vs/platform/windows/common/windows","vs/base/common/network","vs/editor/common/modes","vs/editor/browser/editorBrowser","vs/workbench/services/part/common/partService","vs/editor/common/services/modelService","vs/workbench/services/textfile/common/textfiles","vs/workbench/services/extensions/common/extensions","vs/base/common/map","vs/base/common/color","vs/platform/keybinding/common/keybindingsRegistry","vs/workbench/services/group/common/editorGroupsService","vs/editor/common/services/modeService","vs/editor/common/editorContextKeys","vs/workbench/common/actions","vs/editor/common/model","vs/platform/list/browser/listService","path","vs/editor/common/core/selection","vs/workbench/api/node/extHost.protocol","vs/base/common/labels","vs/platform/configuration/common/configurationRegistry","vs/platform/quickOpen/common/quickOpen","vs/workbench/services/viewlet/browser/viewlet","vs/editor/common/model/textModel","vs/workbench/api/electron-browser/extHostCustomers","vs/platform/theme/common/styler","vs/workbench/common/theme","vs/base/common/resources","vs/editor/browser/services/codeEditorService","vs/editor/common/services/resolverService","vs/base/common/keyCodes","vs/base/browser/builder","vs/workbench/common/contributions","vs/platform/node/product","vs/platform/log/common/log","vs/base/browser/browser","vs/workbench/parts/debug/common/debug","vs/platform/extensionManagement/common/extensionManagement","vs/workbench/services/panel/common/panelService","vs/base/browser/mouseEvent","vs/base/common/severity","vs/base/browser/keyboardEvent","vs/base/browser/fastDomNode","vs/workbench/browser/quickopen","vs/base/node/pfs","vs/platform/opener/common/opener","vs/base/common/json","vs/platform/markers/common/markers","vs/workbench/services/untitled/common/untitledEditorService","vs/base/browser/ui/widget","os","vs/workbench/parts/terminal/common/terminal","vs/workbench/services/configuration/common/configuration","vs/workbench/parts/files/common/files","vs/editor/common/view/editorColorRegistry","vs/workbench/common/views","vs/workbench/browser/viewlet","vs/platform/dialogs/common/dialogs","vs/base/common/scrollable","vs/workbench/services/extensions/common/extensionsRegistry","electron","vs/workbench/parts/extensions/common/extensions","vs/editor/common/core/editOperation","vs/base/browser/event","vs/platform/instantiation/common/extensions","vs/workbench/browser/panel","vs/base/parts/quickopen/browser/quickOpenModel","vs/base/common/filters","vs/base/common/decorators","vs/platform/instantiation/common/descriptors","vs/base/common/collections","vs/editor/common/modes/languageConfigurationRegistry","vs/workbench/services/preferences/common/preferences","vs/editor/browser/view/viewPart","vs/base/parts/tree/browser/treeDefaults","vs/base/browser/ui/inputbox/inputBox","vs/platform/progress/common/progress","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/workbench/parts/debug/browser/debugActions","vs/base/parts/quickopen/common/quickOpen","vs/platform/extensionManagement/common/extensionManagementUtil","vs/workbench/browser/parts/editor/baseEditor","vs/workbench/parts/output/common/output","vs/base/common/errorMessage","vs/editor/common/services/resourceConfiguration","vs/base/browser/ui/aria/aria","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/common/controller/cursorCommon","vs/base/parts/ipc/common/ipc","vs/base/browser/touch","vs/editor/common/config/editorOptions","vs/base/common/htmlContent","vs/platform/clipboard/common/clipboardService","vs/base/common/uuid","vs/platform/instantiation/common/serviceCollection","vs/workbench/browser/labels","vs/platform/node/package","vs/platform/search/common/search","vs/workbench/services/themes/common/workbenchThemeService","vs/workbench/parts/debug/common/debugModel","vs/platform/actions/browser/menuItemActionItem","fs","vs/base/common/cancellation","vs/workbench/browser/actions","vs/workbench/browser/editor","vs/base/common/glob","vs/base/common/idGenerator","vs/platform/workspaces/common/workspaces","vs/base/common/mime","vs/base/browser/ui/sash/sash","vs/workbench/services/backup/common/backup","vs/workbench/parts/tasks/common/tasks","vs/base/browser/ui/button/button","child_process","vs/editor/browser/widget/codeEditorWidget","vs/workbench/browser/parts/views/viewsViewlet","vs/workbench/services/hash/common/hashService","vs/editor/contrib/snippet/snippetController2","vs/workbench/common/editor/resourceEditorInput","vs/workbench/services/history/common/history","crypto","vs/workbench/browser/parts/quickopen/quickopen","vs/workbench/common/resources","vs/base/node/extfs","vs/editor/browser/config/configuration","vs/editor/contrib/suggest/suggest","vs/base/browser/ui/list/listWidget","vs/base/common/assert","vs/editor/common/controller/cursorEvents","vs/workbench/browser/parts/statusbar/statusbar","vs/workbench/browser/parts/views/panelViewlet","vs/workbench/services/progress/common/progress","vs/workbench/services/activity/common/activity","vs/workbench/browser/dnd","vs/workbench/parts/tasks/common/problemMatcher","vs/platform/telemetry/common/telemetryUtils","vs/platform/quickinput/common/quickInput","vs/workbench/common/notifications","vs/editor/common/modes/modesRegistry","vs/base/browser/dnd","vs/base/browser/ui/splitview/splitview","vs/editor/browser/services/bulkEditService","vs/platform/widget/browser/contextScopedHistoryWidget","vs/editor/common/editorCommon","vs/workbench/browser/parts/editor/editorCommands","vs/editor/browser/view/dynamicViewOverlay","vs/platform/statusbar/common/statusbar","vs/workbench/services/workspace/common/workspaceEditing","vs/base/node/encoding","vs/base/common/performance","vs/workbench/parts/extensions/electron-browser/extensionsActions","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/editor/common/services/editorWorkerService","vs/workbench/parts/preferences/browser/preferencesWidgets","vs/editor/common/view/viewEvents","vs/editor/contrib/referenceSearch/referencesWidget","vs/base/node/request","vs/workbench/browser/part","vs/workbench/parts/markers/electron-browser/constants","vs/workbench/parts/files/common/explorerModel","vs/editor/browser/core/editorState","vs/base/browser/ui/countBadge/countBadge","vs/base/browser/ui/progressbar/progressbar","vs/workbench/browser/parts/notifications/notificationsCommands","vs/platform/request/node/request","vs/editor/common/modes/languageConfiguration","vs/editor/common/viewModel/viewModel","vs/base/common/keybindingLabels","vs/workbench/common/editor/diffEditorInput","vs/workbench/services/configuration/common/jsonEditing","vs/workbench/common/editor/textEditorModel","vs/editor/common/commands/replaceCommand","vs/base/browser/globalMouseMoveMonitor","vs/workbench/parts/tasks/common/taskService","vs/workbench/parts/files/electron-browser/fileActions","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/contrib/find/findModel","vs/platform/url/common/url","vs/editor/contrib/zoneWidget/zoneWidget","vs/editor/common/modes/nullMode","vs/workbench/browser/parts/editor/editor","vs/base/node/processes","vs/workbench/common/memento","vs/editor/contrib/snippet/snippetParser","vs/editor/common/viewModel/viewEventHandler","vs/workbench/parts/markers/electron-browser/messages","vs/workbench/parts/markers/electron-browser/markersModel","vs/editor/common/view/renderingContext","vs/workbench/parts/search/common/constants","vs/workbench/parts/search/common/replace","vs/workbench/parts/search/common/search","vs/workbench/parts/search/common/searchModel","vs/workbench/parts/snippets/electron-browser/snippets.contribution","semver","vs/editor/common/model/wordHelper","vs/workbench/browser/parts/compositebar/compositeBarActions","vs/editor/common/controller/wordCharacterClassifier","vs/workbench/services/decorations/browser/decorations","vs/editor/common/core/characterClassifier","vs/workbench/parts/debug/browser/baseDebugView","vs/base/browser/ui/octiconLabel/octiconLabel","vs/workbench/services/keybinding/common/scanCode","vs/workbench/services/keybinding/electron-browser/keybindingService","vs/base/browser/ui/checkbox/checkbox","vs/workbench/parts/webview/electron-browser/webviewEditorInput","vs/workbench/parts/webview/electron-browser/webviewEditorService","vs/workbench/services/scm/common/scm","vs/base/common/marked/marked","vs/base/browser/htmlContentRenderer","vs/base/common/comparers","vs/workbench/electron-browser/actions","vs/base/common/iterator","vs/workbench/browser/actions/workspaceCommands","vs/editor/browser/controller/coreCommands","vs/base/parts/tree/browser/treeImpl","vs/base/parts/ipc/node/ipc.cp","vs/editor/common/modes/supports/richEditBrackets","vs/editor/common/config/commonEditorConfig","vs/editor/common/modes/supports","vs/platform/configuration/common/configurationModels","vs/platform/broadcast/electron-browser/broadcastService","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/editor/contrib/message/messageController","vs/workbench/services/configurationResolver/common/configurationResolver","vs/base/browser/contextmenu","vs/workbench/common/editor/binaryEditorModel","vs/editor/common/core/uint","vs/workbench/common/component","vs/workbench/parts/debug/electron-browser/electronDebugActions","vs/workbench/parts/quickopen/browser/commandsHandler","vs/editor/common/config/editorZoom","vs/workbench/parts/tasks/common/taskDefinitionRegistry","vs/workbench/services/files/node/watcher/common","vs/workbench/api/shared/editor","vs/base/browser/ui/iconLabel/iconLabel","vs/workbench/parts/welcome/walkThrough/node/walkThroughInput","vs/base/browser/ui/selectBox/selectBox","vs/editor/contrib/referenceSearch/peekViewWidget","vs/workbench/services/keybinding/common/keybindingIO","vs/editor/contrib/codeAction/codeActionTrigger","vs/workbench/parts/comments/electron-browser/commentService","vs/editor/contrib/suggest/suggestController","vs/workbench/parts/extensions/common/extensionsInput","vs/base/parts/quickopen/common/quickOpenScorer","vs/platform/update/common/update","vs/workbench/services/textMate/electron-browser/textMateService","net","vs/workbench/browser/parts/editor/textEditor","vs/workbench/browser/parts/editor/editorActions","vs/workbench/common/editor/untitledEditorInput","vs/workbench/parts/files/common/editors/fileEditorInput","vs/workbench/services/textfile/common/textFileEditorModel","vs/platform/issue/common/issue","vs/editor/contrib/find/findController","vs/workbench/parts/preferences/common/preferences","vs/base/common/numbers","vs/workbench/parts/scm/common/scm","vs/platform/integrity/common/integrity","vs/workbench/parts/debug/browser/breakpointsView","vs/workbench/parts/search/browser/searchActions","vs/base/common/functional","vs/platform/workbench/common/contextkeys","vs/workbench/browser/actions/workspaceActions","vs/workbench/parts/files/electron-browser/fileCommands","vs/workbench/parts/experiments/node/experimentService","vs/workbench/parts/preferences/browser/preferencesActions","vs/workbench/parts/codeEditor/electron-browser/menuPreventer","vs/workbench/parts/debug/common/debugSource","vs/editor/common/core/token","vs/workbench/parts/codeEditor/electron-browser/selectionClipboard","vs/platform/keybinding/common/keybindingResolver","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/workbench/parts/terminal/browser/terminalQuickOpen","vs/editor/browser/view/viewLayer","vs/editor/common/core/stringBuilder","vs/workbench/parts/debug/common/debugUtils","vs/workbench/parts/debug/node/debugAdapter","vs/workbench/parts/tasks/node/tasks","vs/editor/browser/editorDom","vs/editor/common/core/lineTokens","vs/css!vs/workbench/browser/parts/quickinput/quickInput","vs/editor/contrib/referenceSearch/referencesModel","vs/base/browser/ui/grid/gridview","vs/editor/common/viewModel/prefixSumComputer","vs/workbench/parts/files/browser/files","vs/editor/common/viewLayout/viewLineRenderer","vs/workbench/services/issue/common/issue","vs/editor/common/config/fontInfo","vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/editor/common/viewLayout/lineDecorations","vs/workbench/services/mode/common/workbenchModeService","vs/workbench/parts/snippets/electron-browser/tabCompletion","vs/workbench/parts/comments/electron-browser/commentsEditorContribution","vs/platform/extensionManagement/node/extensionManagementUtil","vs/base/parts/tree/browser/tree","vs/editor/contrib/markdown/markdownRenderer","vs/editor/contrib/contextmenu/contextmenu","vs/workbench/parts/webview/electron-browser/webviewElement","vs/editor/browser/widget/diffEditorWidget","vs/workbench/services/preferences/common/preferencesModels","vs/base/node/config","vs/editor/common/view/minimapCharRenderer","vs/base/common/jsonErrorMessages","vs/base/browser/ui/toolbar/toolbar","vs/workbench/browser/parts/notifications/notificationsActions","vs/base/node/console","vs/workbench/parts/stats/node/workspaceStats","vs/workbench/parts/tasks/common/taskSystem","vs/workbench/browser/parts/editor/textResourceEditor","vs/base/common/paging","vs/editor/common/modes/textToHtmlTokenizer","vs/workbench/parts/preferences/browser/preferencesEditor","vs/editor/common/controller/cursorWordOperations","vs/base/browser/ui/menu/menu","vs/workbench/services/timer/common/timerService","vs/workbench/parts/terminal/common/terminalColorRegistry","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/editor/common/controller/cursorTypeOperations","vs/base/common/processes","vs/workbench/parts/webview/electron-browser/baseWebviewEditor","vs/base/common/linkedList","vs/workbench/browser/parts/views/views","vs/base/common/jsonEdit","vs/base/browser/ui/dropdown/dropdown","vs/editor/contrib/referenceSearch/referencesController","vs/workbench/parts/markers/electron-browser/markers","vs/editor/common/model/textModelSearch","vs/editor/common/model/intervalTree","vs/editor/common/commands/shiftCommand","vs/editor/contrib/folding/foldingRanges","vs/base/common/diff/diff","vs/workbench/browser/parts/editor/sideBySideEditor","vs/workbench/api/node/extHostTypes","vs/workbench/browser/parts/editor/binaryEditor","vs/workbench/parts/terminal/electron-browser/terminalActions","vs/workbench/parts/terminal/node/terminal","vs/editor/contrib/format/format","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/workbench/parts/outline/electron-browser/outline","vs/editor/contrib/hover/getHover","vs/workbench/parts/preferences/browser/keybindingWidgets","vs/editor/contrib/linesOperations/linesOperations","vs/workbench/parts/preferences/browser/settingsTree","vs/editor/contrib/parameterHints/provideSignatureHelp","vs/editor/common/viewModel/splitLinesCollection","vs/workbench/parts/scm/electron-browser/scmUtil","vs/editor/contrib/documentSymbols/outlineModel","vs/workbench/parts/search/common/queryBuilder","vs/base/common/parsers","vs/editor/contrib/wordOperations/wordOperations","vs/platform/telemetry/common/telemetryIpc","vs/platform/telemetry/common/telemetryService","vs/workbench/parts/snippets/electron-browser/snippetsFile","vs/base/browser/ui/contextview/contextview","vs/base/common/date","vs/base/browser/ui/findinput/findInputCheckboxes","vs/css!vs/base/browser/ui/grid/gridview","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/controller/mouseTarget","vs/css!vs/base/browser/ui/list/list","vs/workbench/parts/terminal/node/terminalEnvironment","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils","vs/base/node/stream","vs/base/browser/ui/scrollbar/scrollbarState","vs/workbench/browser/parts/compositebar/compositeBar","vs/base/browser/ui/findinput/findInput","vs/base/common/history","vs/workbench/services/backup/node/backupFileService","stream","vs/workbench/parts/terminal/electron-browser/terminalConfigHelper","vs/workbench/services/configuration/common/configurationModels","vs/editor/contrib/codeAction/codeActionCommands","vs/base/common/diagnostics","vs/workbench/services/crashReporter/electron-browser/crashReporterService","vs/base/common/marshalling","vs/editor/contrib/wordHighlighter/wordHighlighter","vs/workbench/browser/parts/editor/rangeDecorations","vs/editor/browser/controller/textAreaState","vs/workbench/browser/parts/editor/binaryDiffEditor","vs/editor/browser/controller/textAreaInput","vs/workbench/parts/debug/browser/linkDetector","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/editor/contrib/find/findWidget","vs/base/browser/ui/list/listPaging","vs/editor/contrib/find/simpleFindWidget","vs/editor/contrib/multicursor/multicursor","vs/workbench/parts/search/browser/openSymbolHandler","vs/workbench/parts/tasks/browser/quickOpen","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/base/common/worker/simpleWorker","vs/platform/url/electron-browser/inactiveExtensionUrlHandler","vs/platform/keybinding/common/resolvedKeybindingItem","vs/base/common/octicon","vs/workbench/parts/tasks/common/problemCollectors","vs/platform/localizations/common/localizations","vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon","vs/base/browser/ui/splitview/panelview","vs/workbench/parts/tasks/node/taskConfiguration","vs/workbench/services/extensions/node/extensionManagementServerService","vs/css!vs/editor/contrib/goToDefinition/goToDefinitionMouse","vs/workbench/api/electron-browser/mainThreadEditor","vs/workbench/api/electron-browser/mainThreadHeapService","vs/workbench/services/extensions/electron-browser/extensionService","vs/workbench/services/files/electron-browser/streams","vs/editor/contrib/goToDefinition/goToDefinitionCommands","vs/css!vs/workbench/browser/parts/notifications/media/notificationsActions","vs/platform/menubar/common/menubar","vs/workbench/api/electron-browser/mainThreadEditors","vs/workbench/browser/actions/toggleEditorLayout","vs/editor/common/modes/supports/tokenization","vs/platform/extensions/node/extensionValidator","vs/workbench/parts/html/common/htmlInput","vs/editor/common/view/overviewZoneManager","vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart","vs/editor/contrib/snippet/snippetVariables","vs/workbench/common/activity","vs/css!vs/workbench/browser/parts/panel/media/panelpart","vs/platform/extensions/common/extensionHost","vs/workbench/services/keybinding/common/windowsKeyboardMapper","vs/base/parts/ipc/node/ipc.net","vs/workbench/common/editor/diffEditorModel","vs/workbench/parts/snippets/electron-browser/snippetsService","vs/workbench/common/editor/editorGroup","vs/workbench/common/editor/textDiffEditorModel","vs/workbench/parts/debug/electron-browser/simpleDebugEditor","vs/css!vs/workbench/browser/parts/views/media/views","vs/css!vs/workbench/parts/scm/electron-browser/media/scmViewlet","vs/workbench/browser/actions/toggleActivityBarVisibility","vs/workbench/browser/actions/toggleSidebarVisibility","vs/workbench/browser/parts/panel/panelActions","vs/workbench/browser/parts/quickinput/quickInput","vs/workbench/parts/debug/browser/statusbarColorProvider","vs/workbench/parts/markers/electron-browser/markersPanelActions","vs/workbench/parts/output/browser/outputActions","vs/workbench/common/editor/resourceEditorModel","vs/base/node/decoder","vs/base/node/flow","vs/workbench/parts/webview/electron-browser/webviewEditor","vs/workbench/services/preferences/common/keybindingsEditorModel","vs/base/common/hash","vs/workbench/services/preferences/common/preferencesEditorInput","vs/base/parts/tree/browser/treeDnd","vs/base/node/ports","vs/workbench/parts/extensions/node/extensionsWorkbenchService","vs/editor/browser/viewParts/margin/margin","vs/workbench/services/textMate/electron-browser/TMGrammars","vs/workbench/services/textMate/electron-browser/TMHelper","vs/workbench/common/editor/dataUriEditorInput","vs/base/browser/iframe","vs/workbench/api/node/extHostTypeConverters","vs/workbench/browser/parts/notifications/notificationsList","vs/workbench/browser/parts/editor/textDiffEditor","vs/editor/browser/widget/diffNavigator","vs/workbench/browser/composite","vs/editor/contrib/comment/blockCommentCommand","vs/base/node/stdFork","vs/editor/contrib/folding/syntaxRangeProvider","vs/editor/common/controller/cursorMoveOperations","vs/workbench/parts/output/browser/outputPanel","vs/editor/common/controller/cursorDeleteOperations","vs/workbench/services/configuration/node/jsonEditingService","vs/workbench/services/configuration/node/configurationService","vs/workbench/services/keybinding/common/keybindingEditing","vs/editor/contrib/format/formattingEdit","vs/workbench/services/themes/common/colorThemeSchema","vs/workbench/electron-browser/resources","vs/workbench/services/themes/electron-browser/fileIconThemeData","vs/workbench/services/themes/electron-browser/colorThemeData","vs/editor/contrib/goToDefinition/clickLinkGesture","vs/workbench/services/title/common/titleService","vs/platform/storage/common/storageService","vs/workbench/api/electron-browser/mainThreadDocuments","vs/workbench/parts/comments/common/commentModel","vs/workbench/parts/comments/electron-browser/commentGlyphWidget","vs/workbench/browser/parts/editor/editorPicker","vs/workbench/browser/parts/editor/titleControl","vs/workbench/browser/parts/quickopen/quickOpenController","vs/workbench/parts/comments/electron-browser/commentsPanel","vs/workbench/parts/search/browser/openAnythingHandler","vs/workbench/services/editor/browser/editorService","vs/editor/common/controller/cursorMoveCommands","vs/editor/contrib/hover/hoverOperation","vs/workbench/parts/debug/browser/debugActionItems","vs/editor/contrib/hover/hoverWidgets","vs/workbench/parts/debug/common/debugViewModel","vs/workbench/api/browser/viewsContainersExtensionPoint","vs/editor/contrib/indentation/indentUtils","vs/workbench/parts/execution/common/execution","vs/workbench/parts/execution/electron-browser/terminal","vs/workbench/parts/debug/browser/debugActionsWidget","vs/workbench/parts/debug/browser/debugQuickOpen","vs/workbench/parts/debug/browser/debugViewlet","vs/workbench/parts/debug/electron-browser/repl","vs/workbench/parts/debug/electron-browser/variablesView","vs/workbench/parts/extensions/browser/extensionsQuickOpen","vs/workbench/parts/scm/electron-browser/scmViewlet","vs/workbench/parts/extensions/common/extensionQuery","vs/workbench/parts/search/browser/searchWidget","vs/workbench/services/progress/browser/progressService","vs/workbench/browser/parts/compositePart","vs/editor/contrib/codeAction/codeAction","vs/workbench/parts/extensions/browser/extensionsWidgets","vs/workbench/parts/extensions/common/extensionsFileTemplate","vs/editor/contrib/colorPicker/color","vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor","vs/workbench/parts/extensions/electron-browser/extensionsUtils","vs/editor/contrib/colorPicker/colorDetector","vs/workbench/parts/files/electron-browser/saveErrorHandler","vs/workbench/parts/files/electron-browser/views/explorerViewer","vs/workbench/parts/files/electron-browser/explorerViewlet","vs/editor/common/services/editorWorkerServiceImpl","vs/workbench/parts/search/browser/searchView","vs/workbench/parts/logs/common/logConstants","vs/workbench/parts/terminal/electron-browser/terminalPanel","vs/workbench/electron-browser/workbench","vs/editor/contrib/folding/folding","vs/workbench/parts/extensions/electron-browser/extensionsViewlet","vs/editor/contrib/goToDefinition/goToDefinition","vs/nls!vs/workbench/browser/viewlet","vs/nls!vs/workbench/common/theme","vs/nls!vs/workbench/common/views","vs/nls!vs/workbench/electron-browser/actions","vs/nls!vs/workbench/electron-browser/main","vs/nls!vs/workbench/electron-browser/main.contribution","vs/nls!vs/workbench/electron-browser/removedKeybindingsContribution","vs/nls!vs/workbench/electron-browser/window","vs/nls!vs/workbench/electron-browser/workbench","vs/nls!vs/workbench/parts/cli/electron-browser/cli.contribution","vs/nls!vs/workbench/parts/codeEditor/electron-browser/accessibility","vs/nls!vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings","vs/nls!vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint","vs/nls!vs/workbench/parts/codeEditor/electron-browser/largeFileOptimizations","vs/nls!vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes","vs/nls!vs/workbench/parts/codeEditor/electron-browser/toggleMinimap","vs/nls!vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier","vs/nls!vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter","vs/nls!vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace","vs/nls!vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap","vs/nls!vs/workbench/parts/comments/common/commentModel","vs/nls!vs/workbench/parts/comments/electron-browser/commentThreadWidget","vs/nls!vs/workbench/parts/debug/browser/breakpointsView","vs/nls!vs/workbench/parts/debug/browser/debugActionItems","vs/nls!vs/workbench/parts/debug/browser/debugActions","vs/nls!vs/workbench/parts/debug/browser/debugActionsWidget","vs/nls!vs/workbench/parts/debug/browser/debugCommands","vs/nls!vs/workbench/parts/debug/browser/debugContentProvider","vs/nls!vs/workbench/parts/debug/browser/debugEditorActions","vs/nls!vs/workbench/parts/debug/browser/debugQuickOpen","vs/nls!vs/workbench/parts/debug/browser/debugStatus","vs/nls!vs/workbench/parts/debug/browser/debugViewlet","vs/nls!vs/workbench/parts/debug/browser/exceptionWidget","vs/nls!vs/workbench/parts/debug/browser/linkDetector","vs/nls!vs/workbench/parts/debug/browser/statusbarColorProvider","vs/nls!vs/workbench/parts/debug/common/debug","vs/nls!vs/workbench/parts/debug/common/debugModel","vs/nls!vs/workbench/parts/debug/common/debugSchemas","vs/nls!vs/workbench/parts/debug/common/debugSource","vs/css!vs/editor/contrib/find/simpleFindWidget","vs/nls!vs/workbench/parts/debug/electron-browser/callStackView","vs/nls!vs/workbench/parts/debug/electron-browser/debug.contribution","vs/nls!vs/workbench/parts/debug/electron-browser/debugConfigurationManager","vs/nls!vs/workbench/parts/debug/electron-browser/debugEditorContribution","vs/nls!vs/workbench/parts/debug/electron-browser/debugHover","vs/nls!vs/workbench/parts/debug/electron-browser/debugService","vs/nls!vs/workbench/parts/debug/electron-browser/electronDebugActions","vs/nls!vs/workbench/parts/debug/electron-browser/rawDebugSession","vs/nls!vs/workbench/parts/debug/electron-browser/repl","vs/nls!vs/workbench/parts/debug/electron-browser/replViewer","vs/nls!vs/workbench/parts/debug/electron-browser/terminalSupport","vs/nls!vs/workbench/parts/debug/electron-browser/variablesView","vs/nls!vs/workbench/parts/debug/electron-browser/watchExpressionsView","vs/nls!vs/workbench/parts/debug/node/debugAdapter","vs/nls!vs/workbench/parts/debug/node/debugger","vs/nls!vs/workbench/parts/debug/node/terminals","vs/nls!vs/workbench/parts/emmet/browser/actions/showEmmetCommands","vs/nls!vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation","vs/nls!vs/workbench/parts/execution/electron-browser/execution.contribution","vs/nls!vs/workbench/parts/execution/electron-browser/terminalService","vs/nls!vs/workbench/parts/extensions/browser/dependenciesViewer","vs/nls!vs/workbench/parts/extensions/browser/extensionsQuickOpen","vs/nls!vs/workbench/parts/extensions/browser/extensionsWidgets","vs/nls!vs/workbench/parts/extensions/common/extensionsFileTemplate","vs/nls!vs/workbench/parts/extensions/common/extensionsInput","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionEditor","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionProfileService","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionTipsService","vs/nls!vs/workbench/parts/extensions/electron-browser/extensions.contribution","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionsActions","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionsList","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionsUtils","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionsViewlet","vs/nls!vs/workbench/parts/extensions/electron-browser/extensionsViews","vs/nls!vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor","vs/nls!vs/workbench/parts/extensions/node/extensionsWorkbenchService","vs/nls!vs/workbench/parts/feedback/electron-browser/feedback","vs/nls!vs/workbench/parts/feedback/electron-browser/feedback.contribution","vs/nls!vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem","vs/nls!vs/workbench/parts/files/browser/editors/binaryFileEditor","vs/nls!vs/workbench/parts/files/browser/editors/textFileEditor","vs/nls!vs/workbench/parts/files/common/dirtyFilesTracker","vs/nls!vs/workbench/parts/files/common/editors/fileEditorInput","vs/nls!vs/workbench/parts/files/electron-browser/explorerViewlet","vs/nls!vs/workbench/parts/files/electron-browser/fileActions","vs/nls!vs/workbench/parts/files/electron-browser/fileActions.contribution","vs/nls!vs/workbench/parts/files/electron-browser/fileCommands","vs/nls!vs/workbench/parts/files/electron-browser/files.contribution","vs/nls!vs/workbench/parts/files/electron-browser/saveErrorHandler","vs/nls!vs/workbench/parts/files/electron-browser/views/emptyView","vs/nls!vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider","vs/nls!vs/workbench/parts/files/electron-browser/views/explorerView","vs/nls!vs/workbench/parts/files/electron-browser/views/explorerViewer","vs/nls!vs/workbench/parts/files/electron-browser/views/openEditorsView","vs/nls!vs/workbench/parts/html/electron-browser/html.contribution","vs/nls!vs/workbench/parts/html/electron-browser/htmlPreviewPart","vs/nls!vs/workbench/parts/localizations/electron-browser/localizations.contribution","vs/nls!vs/workbench/parts/localizations/electron-browser/localizationsActions","vs/nls!vs/workbench/parts/logs/electron-browser/logs.contribution","vs/nls!vs/workbench/parts/logs/electron-browser/logsActions","vs/nls!vs/workbench/parts/markers/electron-browser/markers","vs/nls!vs/workbench/parts/markers/electron-browser/markers.contribution","vs/nls!vs/workbench/parts/markers/electron-browser/markersFileDecorations","vs/nls!vs/workbench/parts/markers/electron-browser/markersPanel","vs/nls!vs/workbench/parts/markers/electron-browser/markersPanelActions","vs/nls!vs/workbench/parts/markers/electron-browser/messages","vs/nls!vs/workbench/parts/outline/electron-browser/outline.contribution","vs/nls!vs/workbench/parts/outline/electron-browser/outlinePanel","vs/nls!vs/workbench/parts/output/browser/outputActions","vs/nls!vs/workbench/parts/output/browser/outputPanel","vs/nls!vs/workbench/parts/output/electron-browser/output.contribution","vs/nls!vs/workbench/parts/output/electron-browser/outputServices","vs/nls!vs/workbench/parts/performance/electron-browser/startupProfiler","vs/nls!vs/workbench/parts/preferences/browser/keybindingWidgets","vs/nls!vs/workbench/parts/preferences/browser/keybindingsEditor","vs/nls!vs/workbench/parts/preferences/browser/keybindingsEditorContribution","vs/nls!vs/workbench/parts/preferences/browser/preferencesActions","vs/nls!vs/workbench/parts/preferences/browser/preferencesEditor","vs/nls!vs/workbench/parts/preferences/browser/preferencesRenderers","vs/nls!vs/workbench/parts/preferences/browser/preferencesWidgets","vs/nls!vs/workbench/parts/preferences/browser/settingsEditor2","vs/nls!vs/workbench/parts/preferences/browser/settingsLayout","vs/nls!vs/workbench/parts/preferences/browser/settingsTree","vs/nls!vs/workbench/parts/preferences/electron-browser/preferences.contribution","vs/nls!vs/workbench/parts/quickopen/browser/commandsHandler","vs/nls!vs/workbench/parts/quickopen/browser/gotoLineHandler","vs/nls!vs/workbench/parts/quickopen/browser/gotoSymbolHandler","vs/nls!vs/workbench/parts/quickopen/browser/helpHandler","vs/nls!vs/workbench/parts/quickopen/browser/quickopen.contribution","vs/nls!vs/workbench/parts/quickopen/browser/viewPickerHandler","vs/nls!vs/workbench/parts/relauncher/electron-browser/relauncher.contribution","vs/nls!vs/workbench/parts/scm/electron-browser/dirtydiffDecorator","vs/nls!vs/workbench/parts/scm/electron-browser/scm.contribution","vs/nls!vs/workbench/parts/scm/electron-browser/scmActivity","vs/nls!vs/workbench/parts/scm/electron-browser/scmViewlet","vs/nls!vs/workbench/parts/search/browser/openAnythingHandler","vs/nls!vs/workbench/parts/search/browser/openFileHandler","vs/nls!vs/workbench/parts/search/browser/openSymbolHandler","vs/nls!vs/workbench/parts/search/browser/patternInputWidget","vs/nls!vs/workbench/parts/search/browser/replaceService","vs/nls!vs/workbench/parts/search/browser/searchActions","vs/nls!vs/workbench/parts/search/browser/searchResultsView","vs/nls!vs/workbench/parts/search/browser/searchView","vs/nls!vs/workbench/parts/search/browser/searchWidget","vs/nls!vs/workbench/parts/search/common/queryBuilder","vs/nls!vs/workbench/parts/search/electron-browser/search.contribution","vs/nls!vs/workbench/parts/snippets/electron-browser/configureSnippets","vs/nls!vs/workbench/parts/snippets/electron-browser/insertSnippet","vs/nls!vs/workbench/parts/snippets/electron-browser/snippets.contribution","vs/nls!vs/workbench/parts/snippets/electron-browser/snippetsFile","vs/nls!vs/workbench/parts/snippets/electron-browser/snippetsService","vs/nls!vs/workbench/parts/snippets/electron-browser/tabCompletion","vs/nls!vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution","vs/nls!vs/workbench/parts/surveys/electron-browser/nps.contribution","vs/nls!vs/workbench/parts/tasks/browser/quickOpen","vs/nls!vs/workbench/parts/tasks/browser/taskQuickOpen","vs/nls!vs/workbench/parts/tasks/common/problemMatcher","vs/nls!vs/workbench/parts/tasks/common/taskDefinitionRegistry","vs/nls!vs/workbench/parts/tasks/common/taskTemplates","vs/nls!vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon","vs/nls!vs/workbench/parts/tasks/electron-browser/jsonSchema_v1","vs/nls!vs/workbench/parts/tasks/electron-browser/jsonSchema_v2","vs/nls!vs/workbench/parts/tasks/electron-browser/task.contribution","vs/nls!vs/workbench/parts/tasks/electron-browser/terminalTaskSystem","vs/nls!vs/workbench/parts/tasks/node/processRunnerDetector","vs/nls!vs/workbench/parts/tasks/node/processTaskSystem","vs/nls!vs/workbench/parts/tasks/node/taskConfiguration","vs/nls!vs/workbench/parts/tasks/node/tasks","vs/nls!vs/workbench/parts/terminal/browser/terminalQuickOpen","vs/nls!vs/workbench/parts/terminal/common/terminalColorRegistry","vs/nls!vs/workbench/parts/terminal/electron-browser/terminal.contribution","vs/nls!vs/workbench/parts/terminal/electron-browser/terminalActions","vs/nls!vs/workbench/parts/terminal/electron-browser/terminalConfigHelper","vs/nls!vs/workbench/parts/terminal/electron-browser/terminalInstance","vs/nls!vs/workbench/parts/terminal/electron-browser/terminalLinkHandler","vs/nls!vs/workbench/parts/terminal/electron-browser/terminalPanel","vs/nls!vs/workbench/parts/terminal/electron-browser/terminalService","vs/nls!vs/workbench/parts/themes/electron-browser/themes.contribution","vs/nls!vs/workbench/parts/update/electron-browser/releaseNotesEditor","vs/nls!vs/workbench/parts/update/electron-browser/update","vs/nls!vs/workbench/parts/url/electron-browser/url.contribution","vs/nls!vs/workbench/parts/watermark/electron-browser/watermark","vs/nls!vs/workbench/parts/webview/electron-browser/webview.contribution","vs/nls!vs/workbench/parts/webview/electron-browser/webviewCommands","vs/nls!vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut","vs/nls!vs/workbench/parts/welcome/overlay/browser/welcomeOverlay","vs/nls!vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page","vs/nls!vs/workbench/parts/welcome/page/electron-browser/welcomePage","vs/nls!vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution","vs/nls!vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough","vs/nls!vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution","vs/nls!vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart","vs/nls!vs/workbench/services/actions/electron-browser/menusExtensionPoint","vs/nls!vs/workbench/services/bulkEdit/electron-browser/bulkEditService","vs/nls!vs/workbench/services/configuration/common/configurationExtensionPoint","vs/nls!vs/workbench/services/configuration/node/configurationEditingService","vs/nls!vs/workbench/services/configuration/node/configurationService","vs/nls!vs/workbench/services/configuration/node/jsonEditingService","vs/nls!vs/workbench/services/configurationResolver/electron-browser/configurationResolverService","vs/nls!vs/workbench/services/configurationResolver/node/variableResolver","vs/nls!vs/workbench/services/crashReporter/electron-browser/crashReporterService","vs/nls!vs/workbench/services/decorations/browser/decorationsService","vs/nls!vs/workbench/services/dialogs/electron-browser/dialogService","vs/nls!vs/workbench/services/editor/browser/editorService","vs/nls!vs/workbench/services/extensions/common/extensionsRegistry","vs/nls!vs/workbench/services/extensions/electron-browser/extensionHost","vs/nls!vs/workbench/services/extensions/electron-browser/extensionService","vs/nls!vs/workbench/services/extensions/node/extensionPoints","vs/nls!vs/workbench/services/files/electron-browser/fileService","vs/nls!vs/workbench/services/files/electron-browser/remoteFileService","vs/nls!vs/workbench/services/jsonschemas/common/jsonValidationExtensionPoint","vs/nls!vs/workbench/services/keybinding/common/keybindingEditing","vs/nls!vs/workbench/services/keybinding/electron-browser/keybindingService","vs/nls!vs/workbench/services/mode/common/workbenchModeService","vs/nls!vs/workbench/services/preferences/browser/preferencesService","vs/nls!vs/workbench/services/preferences/common/keybindingsEditorModel","vs/nls!vs/workbench/services/preferences/common/preferences","vs/nls!vs/workbench/services/preferences/common/preferencesEditorInput","vs/nls!vs/workbench/services/preferences/common/preferencesModels","vs/nls!vs/workbench/services/progress/browser/progressService2","vs/nls!vs/workbench/services/textMate/electron-browser/TMGrammars","vs/nls!vs/workbench/services/textMate/electron-browser/TMSyntax","vs/nls!vs/workbench/services/textfile/common/textFileEditorModel","vs/nls!vs/workbench/services/textfile/common/textFileService","vs/nls!vs/workbench/services/textfile/electron-browser/textFileService","vs/nls!vs/workbench/services/themes/common/colorExtensionPoint","vs/nls!vs/workbench/services/themes/common/colorThemeSchema","vs/nls!vs/workbench/services/themes/common/fileIconThemeSchema","vs/nls!vs/workbench/services/themes/electron-browser/colorThemeData","vs/nls!vs/workbench/services/themes/electron-browser/colorThemeStore","vs/nls!vs/workbench/services/themes/electron-browser/fileIconThemeData","vs/nls!vs/workbench/services/themes/electron-browser/fileIconThemeStore","vs/nls!vs/workbench/services/themes/electron-browser/workbenchThemeService","vs/nls!vs/workbench/services/workspace/node/workspaceEditingService","vs/platform/clipboard/electron-browser/clipboardService","vs/platform/contextview/browser/contextMenuHandler","vs/platform/contextview/browser/contextMenuService","vs/platform/extensionManagement/common/extensionManagementIpc","vs/css!vs/editor/contrib/folding/folding","vs/platform/extensions/common/extensions","vs/platform/files/node/files","vs/base/common/diff/diffChange","vs/css!vs/editor/contrib/gotoError/gotoErrorWidget","vs/css!vs/editor/contrib/hover/hover","vs/css!vs/editor/contrib/links/links","vs/css!vs/editor/contrib/message/messageController","vs/css!vs/editor/contrib/parameterHints/parameterHints","vs/css!vs/editor/contrib/referenceSearch/media/peekViewWidget","vs/css!vs/editor/contrib/referenceSearch/media/referencesWidget","vs/editor/common/modes/languageFeatureRegistry","vs/css!vs/editor/contrib/rename/renameInputField","vs/css!vs/editor/contrib/snippet/snippetSession","vs/css!vs/editor/contrib/suggest/media/suggest","vs/editor/common/model/textModelTokens","vs/css!vs/editor/contrib/zoneWidget/zoneWidget","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/css!vs/workbench/browser/actions/media/actions","vs/editor/common/controller/cursorColumnSelection","vs/css!vs/workbench/browser/media/part","vs/css!vs/workbench/browser/parts/activitybar/media/activityaction","vs/css!vs/workbench/browser/parts/activitybar/media/activitybarpart","vs/css!vs/workbench/browser/parts/editor/media/editordroptarget","vs/css!vs/workbench/browser/parts/editor/media/editorgroupview","vs/editor/common/controller/oneCursor","vs/editor/common/controller/cursorCollection","vs/editor/common/controller/cursor","vs/css!vs/workbench/browser/parts/editor/media/editorpicker","vs/css!vs/workbench/browser/parts/editor/media/editorstatus","vs/css!vs/workbench/browser/parts/editor/media/notabstitlecontrol","vs/css!vs/workbench/browser/parts/editor/media/resourceviewer","vs/editor/common/services/webWorker","vs/css!vs/workbench/browser/parts/editor/media/tabstitlecontrol","vs/editor/common/view/runtimeMinimapCharRenderer","vs/css!vs/workbench/browser/parts/editor/media/textdiffeditor","vs/editor/common/viewModel/characterHardWrappingLineMapper","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/codeAction/lightBulbWidget","vs/css!vs/workbench/browser/parts/editor/media/titlecontrol","vs/editor/contrib/folding/foldingDecorations","vs/editor/contrib/folding/indentRangeProvider","vs/editor/contrib/linesOperations/moveLinesCommand","vs/editor/contrib/smartSelect/tokenSelectionSupport","vs/css!vs/workbench/browser/parts/media/compositepart","vs/css!vs/workbench/browser/parts/menubar/media/menubarpart","vs/editor/contrib/snippet/snippetSession","vs/base/parts/quickopen/browser/quickOpenViewer","vs/editor/contrib/links/getLinks","vs/css!vs/workbench/browser/parts/notifications/media/notificationsCenter","vs/css!vs/workbench/browser/parts/notifications/media/notificationsList","vs/css!vs/workbench/browser/parts/notifications/media/notificationsToasts","vs/platform/actions/common/menu","assert","vs/base/node/id","vs/platform/dialogs/common/dialogIpc","vs/platform/driver/common/driver","vs/css!vs/workbench/browser/parts/quickopen/media/quickopen","vs/css!vs/workbench/browser/parts/sidebar/media/sidebarpart","vs/css!vs/workbench/browser/parts/statusbar/media/statusbarpart","vs/platform/extensionManagement/common/multiExtensionManagement","vs/css!vs/workbench/browser/parts/titlebar/media/titlebarpart","vs/css!vs/workbench/browser/parts/views/media/panelviewlet","vs/base/common/cache","vs/css!vs/workbench/electron-browser/media/actions","vs/platform/instantiation/common/instantiationService","vs/css!vs/workbench/electron-browser/media/shell","vs/css!vs/workbench/electron-browser/media/workbench","vs/platform/issue/common/issueIpc","vs/platform/keybinding/common/abstractKeybindingService","vs/css!vs/workbench/parts/codeEditor/electron-browser/accessibility","vs/css!vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes","vs/css!vs/workbench/parts/comments/electron-browser/media/panel","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/css!vs/workbench/parts/comments/electron-browser/media/review","vs/css!vs/workbench/parts/debug/browser/media/breakpointWidget","vs/platform/localizations/common/localizationsIpc","vs/css!vs/workbench/parts/debug/browser/media/debug.contribution","vs/css!vs/workbench/parts/debug/browser/media/debugActionsWidget","vs/platform/log/common/logIpc","vs/platform/log/node/spdlogService","vs/css!vs/workbench/parts/debug/browser/media/debugHover","vs/platform/markers/common/markerService","vs/css!vs/workbench/parts/debug/browser/media/debugViewlet","vs/platform/menubar/common/menubarIpc","vs/platform/node/minimalTranslations","vs/css!vs/workbench/parts/debug/browser/media/exceptionWidget","vs/css!vs/workbench/parts/debug/browser/media/repl","vs/css!vs/workbench/parts/extensions/browser/media/extensionsWidgets","vs/platform/environment/node/environmentService","vs/css!vs/workbench/parts/extensions/electron-browser/media/extensionActions","vs/css!vs/workbench/parts/extensions/electron-browser/media/extensionEditor","vs/css!vs/workbench/parts/extensions/electron-browser/media/extensions","vs/css!vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet","vs/css!vs/workbench/parts/extensions/electron-browser/media/runtimeExtensionsEditor","vs/css!vs/workbench/parts/feedback/electron-browser/media/feedback","vs/css!vs/workbench/parts/files/electron-browser/media/explorerviewlet","vs/css!vs/workbench/parts/files/electron-browser/media/fileactions","vs/css!vs/workbench/parts/markers/electron-browser/media/markers","vs/css!vs/workbench/parts/outline/electron-browser/outlinePanel","vs/css!vs/workbench/parts/output/browser/media/output","vs/css!vs/workbench/parts/preferences/browser/media/keybindings","vs/css!vs/workbench/parts/preferences/browser/media/keybindingsEditor","vs/editor/common/services/languagesRegistry","vs/editor/common/services/modeServiceImpl","vs/css!vs/workbench/parts/preferences/browser/media/preferences","vs/editor/common/services/resourceConfigurationImpl","vs/css!vs/workbench/parts/preferences/browser/media/settingsEditor2","vs/platform/configuration/node/configuration","vs/platform/contextkey/browser/contextKeyService","vs/css!vs/workbench/parts/quickopen/browser/media/gotoSymbolHandler","vs/css!vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator","vs/platform/search/common/replace","vs/base/node/paths","vs/css!vs/workbench/parts/search/browser/media/searchview","vs/css!vs/workbench/parts/search/electron-browser/media/search.contribution","vs/css!vs/workbench/parts/tasks/electron-browser/media/task.contribution","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/contrib/suggest/suggestMemory","vs/platform/integrity/node/integrityServiceImpl","vs/css!vs/workbench/parts/terminal/electron-browser/media/scrollbar","vs/css!vs/workbench/parts/terminal/electron-browser/media/terminal","vs/platform/storage/common/migration","vs/platform/telemetry/browser/errorTelemetry","vs/css!vs/workbench/parts/terminal/electron-browser/media/widgets","vs/css!vs/workbench/parts/terminal/electron-browser/media/xterm","vs/css!vs/workbench/parts/update/electron-browser/media/update.contribution","vs/editor/browser/view/viewController","vs/editor/contrib/caretOperations/caretOperations","vs/editor/contrib/caretOperations/transpose","vs/editor/contrib/clipboard/clipboard","vs/css!vs/workbench/parts/watermark/electron-browser/watermark","vs/editor/contrib/codeAction/codeActionModel","vs/editor/contrib/codelens/codelens","vs/css!vs/workbench/parts/welcome/overlay/browser/welcomeOverlay","vs/css!vs/workbench/parts/welcome/page/electron-browser/welcomePage","vs/editor/contrib/comment/comment","vs/css!vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart","vs/editor/contrib/cursorUndo/cursorUndo","vs/editor/contrib/dnd/dnd","vs/css!vs/workbench/services/progress/browser/media/progressService2","vs/editor/contrib/fontZoom/fontZoom","vs/editor/browser/config/charWidthReader","vs/editor/contrib/format/formatActions","vs/editor/browser/config/elementSizeObserver","vs/base/parts/tree/browser/treeModel","vs/editor/contrib/indentation/indentation","vs/base/parts/tree/browser/treeViewModel","vs/editor/browser/services/abstractCodeEditorService","vs/editor/contrib/quickOpen/quickOpen","vs/editor/contrib/smartSelect/smartSelect","vs/base/worker/defaultWorkerFactory","vs/css!vs/base/browser/builder","vs/editor/contrib/suggest/suggestModel","vs/base/common/graph","vs/base/browser/ui/list/rangeMap","vs/editor/contrib/wordPartOperations/wordPartOperations","vs/platform/contextview/browser/contextViewService","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/button/button","vs/editor/browser/services/openerService","vs/platform/telemetry/node/commonProperties","vs/platform/telemetry/node/telemetryNodeUtils","vs/platform/telemetry/node/workbenchCommonProperties","vs/editor/common/core/rgba","vs/base/node/proxy","vs/css!vs/base/browser/ui/checkbox/checkbox","vs/editor/browser/services/codeEditorServiceImpl","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/common/commands/surroundSelectionCommand","url","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/view/viewOutgoingEvents","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/css!vs/base/browser/ui/contextview/contextview","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/base/common/normalization","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/browser/view/viewImpl","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/editor/browser/widget/diffReview","vs/base/common/jsonFormatter","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/editor/common/services/modelServiceImpl","vs/editor/contrib/bracketMatching/bracketMatching","vs/editor/contrib/codelens/codelensWidget","vs/editor/contrib/codelens/codelensController","vs/editor/contrib/colorPicker/colorPickerWidget","vs/editor/contrib/find/findDecorations","vs/editor/common/diff/diffComputer","vs/editor/contrib/find/findOptionsWidget","vs/editor/contrib/gotoError/gotoErrorWidget","vs/editor/contrib/gotoError/gotoError","vs/editor/contrib/hover/modesContentHover","vs/editor/contrib/hover/hover","vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/editor/contrib/links/links","vs/editor/common/editorAction","vs/css!vs/base/browser/ui/findinput/findInput","vs/editor/contrib/codeAction/codeActionContributions","vs/editor/contrib/parameterHints/parameterHintsWidget","vs/editor/contrib/parameterHints/parameterHints","vs/css!vs/base/browser/ui/findinput/findInputCheckboxes","vs/editor/contrib/rename/renameInputField","vs/editor/contrib/rename/rename","vs/editor/contrib/suggest/suggestWidget","vs/base/common/uriIpc","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/platform/update/common/updateIpc","vs/platform/update/node/update.config.contribution","vs/editor/common/model/editStack","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/platform/widget/common/contextScopedWidget","vs/editor/common/model/indentationGuesser","vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/textModelEvents","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/css!vs/base/browser/ui/menu/menu","vs/platform/driver/electron-browser/driver","vs/platform/lifecycle/electron-browser/lifecycleService","vs/platform/windows/common/windowsIpc","vs/platform/windows/electron-browser/windowService","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/contrib/documentSymbols/outlineTree","vs/css!vs/base/browser/ui/octiconLabel/octicons/octicons","vs/editor/common/modes/abstractMode","vs/css!vs/base/browser/ui/octiconLabel/octicons/octicons-animations","vs/editor/common/modes/languageSelector","vs/editor/common/modes/linkComputer","vs/editor/contrib/goToDefinition/goToDefinitionMouse","vs/editor/contrib/referenceSearch/referenceSearch","vs/editor/editor.all","vs/platform/extensionManagement/common/extensionEnablementService","vs/platform/workspaces/common/workspacesIpc","vs/platform/workspaces/node/workspaces","vs/base/browser/ui/list/rowCache","vs/editor/common/modes/supports/characterPair","vs/editor/common/modes/supports/indentRules","vs/workbench/browser/parts/menubar/menubar.contribution","vs/workbench/browser/parts/quickinput/quickInputBox","vs/workbench/browser/parts/quickinput/quickInputList","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/modes/supports/onEnter","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/workbench/browser/actions/toggleTabsVisibility","vs/editor/common/modes/supports/electricCharacter","vs/workbench/parts/update/electron-browser/update","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/editor/common/modes/tokenizationRegistry","vs/editor/common/standalone/standaloneBase","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/css!vs/base/browser/ui/sash/sash","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/common/view/viewContext","vs/editor/common/view/viewEventDispatcher","vs/base/common/sequence","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/workbench/browser/parts/notifications/notificationsAlerts","vs/base/browser/ui/selectBox/selectBoxNative","vs/editor/common/viewLayout/viewLinesViewportData","vs/workbench/browser/parts/notifications/notificationsStatus","vs/workbench/browser/parts/notifications/notificationsViewer","vs/editor/common/viewLayout/whitespaceComputer","vs/editor/common/viewLayout/linesLayout","vs/base/browser/ui/list/listView","vs/editor/common/model/mirrorTextModel","vs/editor/common/services/editorSimpleWorker","vs/nls!vs/workbench/parts/debug/electron-browser/breakpointWidget","vs/base/common/stopwatch","vs/css!vs/base/browser/ui/selectBox/selectBox","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/base/browser/ui/selectBox/selectBoxCustom","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/workbench/browser/parts/menubar/menubarPart","vs/css!vs/base/browser/ui/splitview/panelview","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/workbench/parts/cli/electron-browser/cli.contribution","vs/workbench/parts/codeEditor/electron-browser/accessibility","vs/workbench/parts/codeEditor/electron-browser/largeFileOptimizations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/workbench/parts/codeEditor/electron-browser/toggleMinimap","vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier","vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter","vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace","vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap","vs/workbench/parts/codeEditor/electron-browser/workbenchReferenceSearch","vs/editor/browser/viewParts/viewZones/viewZones","vs/workbench/parts/comments/common/reviewModel","vs/css!vs/base/browser/ui/splitview/splitview","vs/editor/common/viewLayout/viewLayout","vs/workbench/parts/debug/browser/debugANSIHandling","vs/editor/common/viewModel/viewModelDecorations","vs/editor/contrib/caretOperations/moveCaretCommand","vs/base/parts/ipc/common/ipc.electron","vs/editor/contrib/codeAction/codeActionWidget","vs/editor/contrib/colorPicker/colorPickerModel","vs/workbench/parts/debug/node/terminals","vs/workbench/parts/emmet/browser/actions/showEmmetCommands","vs/workbench/parts/emmet/browser/emmet.browser.contribution","vs/base/browser/ui/centered/centeredViewLayout","vs/editor/contrib/comment/lineCommentCommand","vs/workbench/parts/execution/electron-browser/terminalService","vs/editor/contrib/dnd/dragAndDropCommand","vs/editor/contrib/find/findState","vs/workbench/parts/extensions/browser/dependenciesViewer","vs/editor/contrib/find/replaceAllCommand","vs/editor/contrib/find/replacePattern","vs/base/parts/ipc/electron-browser/ipc.electron-browser","vs/editor/contrib/folding/foldingModel","vs/editor/contrib/folding/hiddenRangeModel","vs/base/browser/ui/grid/grid","vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider","vs/editor/contrib/folding/intializingRangeProvider","vs/workbench/parts/update/electron-browser/update.contribution","vs/css!vs/base/browser/ui/toolbar/toolbar","vs/css!vs/base/parts/quickopen/browser/quickopen","vs/workbench/parts/markers/electron-browser/markersTreeController","vs/css!vs/base/parts/tree/browser/tree","vs/editor/contrib/hover/modesGlyphHover","vs/workbench/parts/debug/electron-browser/rawDebugSession","vs/workbench/parts/logs/electron-browser/logsActions","vs/workbench/parts/logs/electron-browser/logs.contribution","vs/workbench/parts/output/common/outputLinkProvider","vs/workbench/parts/performance/electron-browser/stats","vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand","vs/css!vs/editor/browser/controller/textAreaHandler","vs/workbench/parts/preferences/browser/settingsLayout","vs/editor/contrib/linesOperations/copyLinesCommand","vs/workbench/parts/preferences/browser/tocTree","vs/editor/contrib/linesOperations/deleteLinesCommand","vs/workbench/parts/preferences/common/smartSnippetInserter","vs/editor/contrib/linesOperations/sortLinesCommand","vs/editor/contrib/smartSelect/tokenTree","vs/workbench/parts/scm/electron-browser/scmMenus","vs/workbench/parts/search/browser/patternInputWidget","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/contrib/suggest/completionModel","vs/nls!vs/base/browser/ui/actionbar/actionbar","vs/css!vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/nls!vs/base/browser/ui/aria/aria","vs/workbench/parts/snippets/electron-browser/configureSnippets","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/workbench/parts/snippets/electron-browser/insertSnippet","vs/nls!vs/base/browser/ui/findinput/findInput","vs/workbench/parts/stats/node/stats.contribution","vs/workbench/parts/surveys/electron-browser/nps.contribution","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/workbench/parts/tasks/common/taskTemplates","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/workbench/parts/terminal/browser/terminalWidgetManager","vs/nls!vs/base/browser/ui/selectBox/selectBoxCustom","vs/workbench/parts/debug/electron-browser/terminalSupport","vs/workbench/parts/terminal/browser/terminalFindWidget","vs/base/browser/ui/selectBox/selectBoxCustom","vs/workbench/parts/terminal/common/terminalCommands","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/workbench/parts/terminal/node/terminalCommandTracker","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/workbench/parts/terminal/node/terminalProcessExtHostProxy","vs/workbench/parts/update/electron-browser/releaseNotesEditor","vs/workbench/parts/terminal/node/windowsShellHelper","vs/workbench/parts/url/electron-browser/url.contribution","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/workbench/parts/webview/electron-browser/webviewFindWidget","vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted","vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut","vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.contribution","vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page","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/nls!vs/base/browser/ui/toolbar/toolbar","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/workbench/common/editor/untitledEditorModel","vs/nls!vs/base/common/errorMessage","vs/css!vs/editor/browser/viewParts/selections/selections","vs/workbench/parts/feedback/electron-browser/feedback","vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem","vs/workbench/parts/feedback/electron-browser/feedback.contribution","vs/nls!vs/base/common/jsonErrorMessages","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/nls!vs/base/common/keybindingLabels","vs/workbench/services/configuration/node/configuration","vs/css!vs/editor/browser/widget/media/diffEditor","vs/workbench/services/configurationResolver/node/variableResolver","vs/workbench/services/contextview/electron-browser/contextmenuService","vs/css!vs/editor/browser/widget/media/diffReview","vs/nls!vs/base/common/severity","vs/workbench/parts/markers/electron-browser/markersFileDecorations","vs/workbench/services/decorations/browser/decorationsService","vs/workbench/services/dialogs/electron-browser/dialogService","vs/css!vs/editor/browser/widget/media/editor","vs/nls!vs/base/node/processes","vs/workbench/browser/parts/editor/resourceViewer","vs/css!vs/editor/browser/widget/media/tokens","vs/css!vs/editor/contrib/bracketMatching/bracketMatching","vs/workbench/browser/parts/statusbar/statusbarPart","vs/nls!vs/base/parts/quickopen/browser/quickOpenModel","vs/css!vs/editor/contrib/clipboard/clipboard","vs/workbench/parts/debug/browser/exceptionWidget","vs/nls!vs/base/parts/quickopen/browser/quickOpenWidget","vs/workbench/parts/debug/browser/debugContentProvider","vs/nls!vs/base/parts/tree/browser/treeDefaults","vs/css!vs/editor/contrib/codeAction/lightBulbWidget","vs/base/parts/tree/browser/treeView","vs/workbench/parts/localizations/electron-browser/localizationsActions","vs/css!vs/editor/contrib/codelens/codelensWidget","vs/workbench/parts/quickopen/browser/gotoLineHandler","vs/workbench/parts/quickopen/browser/gotoSymbolHandler","vs/workbench/parts/quickopen/browser/helpHandler","vs/base/parts/quickopen/browser/quickOpenWidget","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/workbench/parts/terminal/electron-browser/terminalLinkHandler","vs/workbench/parts/webview/electron-browser/webviewCommands","vs/workbench/services/codeEditor/browser/codeEditorService","vs/workbench/services/configurationResolver/electron-browser/configurationResolverService","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/common/config/commonEditorConfig","vs/workbench/parts/relauncher/electron-browser/relauncher.contribution","vs/workbench/parts/tasks/browser/taskQuickOpen","vs/workbench/services/actions/common/menuService","vs/workbench/services/commands/common/commandService","vs/nls!vs/editor/common/config/editorOptions","vs/workbench/parts/debug/common/debugSchemas","vs/css!vs/editor/contrib/colorPicker/colorPicker","vs/css!vs/editor/contrib/dnd/dnd","vs/nls!vs/editor/common/controller/cursor","vs/workbench/parts/debug/node/debugger","vs/nls!vs/editor/common/modes/modesRegistry","vs/workbench/parts/tasks/electron-browser/jsonSchema_v1","vs/workbench/parts/tasks/electron-browser/jsonSchema_v2","vs/workbench/parts/tasks/electron-browser/terminalTaskSystem","vs/workbench/parts/tasks/node/processTaskSystem","vs/nls!vs/editor/common/services/modelServiceImpl","vs/nls!vs/editor/common/view/editorColorRegistry","vs/workbench/parts/tasks/node/processRunnerDetector","vs/workbench/services/actions/electron-browser/menusExtensionPoint","vs/workbench/services/configuration/common/configurationExtensionPoint","vs/workbench/services/extensions/electron-browser/extensionHost","vs/workbench/services/extensions/electron-browser/extensionHostProfiler","vs/workbench/services/extensions/node/extensionDescriptionRegistry","vs/nls!vs/editor/contrib/bracketMatching/bracketMatching","vs/workbench/services/extensions/node/extensionPoints","vs/workbench/services/extensions/node/lazyPromise","vs/workbench/services/extensions/node/proxyIdentifier","vs/nls!vs/editor/contrib/caretOperations/caretOperations","vs/workbench/api/electron-browser/mainThreadCommands","vs/workbench/api/electron-browser/mainThreadConfiguration","vs/workbench/api/electron-browser/mainThreadDebugService","vs/workbench/api/electron-browser/mainThreadDecorations","vs/workbench/api/electron-browser/mainThreadDiagnostics","vs/workbench/api/electron-browser/mainThreadDialogs","vs/workbench/api/electron-browser/mainThreadDocumentContentProviders","vs/nls!vs/editor/contrib/caretOperations/transpose","vs/workbench/api/electron-browser/mainThreadErrors","vs/workbench/api/electron-browser/mainThreadFileSystem","vs/nls!vs/editor/contrib/clipboard/clipboard","vs/workbench/parts/preferences/electron-browser/preferences.contribution","vs/workbench/api/electron-browser/mainThreadLanguages","vs/workbench/api/electron-browser/mainThreadLogService","vs/workbench/api/electron-browser/mainThreadMessageService","vs/workbench/api/electron-browser/mainThreadQuickOpen","vs/workbench/api/electron-browser/mainThreadSearch","vs/workbench/api/electron-browser/mainThreadStatusBar","vs/workbench/api/electron-browser/mainThreadStorage","vs/workbench/api/electron-browser/mainThreadTask","vs/workbench/api/electron-browser/mainThreadTelemetry","vs/workbench/api/electron-browser/mainThreadTerminalService","vs/workbench/api/electron-browser/mainThreadTreeViews","vs/workbench/api/electron-browser/mainThreadUrls","vs/workbench/api/electron-browser/mainThreadWindow","vs/workbench/services/extensions/node/rpcProtocol","vs/nls!vs/editor/contrib/codeAction/codeActionCommands","vs/workbench/api/electron-browser/mainThreadExtensionService","vs/workbench/services/files/electron-browser/encoding","vs/nls!vs/editor/contrib/comment/comment","vs/nls!vs/editor/contrib/contextmenu/contextmenu","vs/workbench/services/files/node/watcher/nsfw/watcherIpc","vs/workbench/services/files/node/watcher/nsfw/watcherService","vs/workbench/services/files/node/watcher/unix/watcherIpc","vs/workbench/services/files/node/watcher/unix/watcherService","vs/workbench/services/files/node/watcher/win32/csharpWatcherService","vs/workbench/services/files/node/watcher/win32/watcherService","vs/workbench/services/files/electron-browser/fileService","vs/workbench/services/files/electron-browser/remoteFileService","vs/nls!vs/editor/contrib/cursorUndo/cursorUndo","vs/nls!vs/editor/contrib/documentSymbols/outlineTree","vs/nls!vs/editor/contrib/find/findController","vs/nls!vs/editor/contrib/find/findWidget","vs/nls!vs/editor/contrib/find/simpleFindWidget","vs/nls!vs/editor/contrib/folding/folding","vs/nls!vs/editor/contrib/fontZoom/fontZoom","vs/nls!vs/editor/contrib/format/formatActions","vs/workbench/parts/welcome/page/electron-browser/welcomePage","vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution","vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough","vs/nls!vs/editor/contrib/goToDefinition/goToDefinitionCommands","vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions","vs/workbench/services/hash/node/hashService","vs/nls!vs/editor/contrib/goToDefinition/goToDefinitionMouse","vs/workbench/parts/execution/electron-browser/execution.contribution","vs/workbench/parts/terminal/electron-browser/terminalProcessManager","vs/workbench/services/history/electron-browser/history","vs/nls!vs/editor/contrib/gotoError/gotoError","vs/workbench/services/issue/electron-browser/workbenchIssueService","vs/workbench/services/jsonschemas/common/jsonValidationExtensionPoint","vs/workbench/services/keybinding/common/keyboardMapper","vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget","vs/nls!vs/editor/contrib/hover/hover","vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper","vs/workbench/services/keybinding/common/macLinuxKeyboardMapper","vs/nls!vs/editor/contrib/hover/modesContentHover","vs/workbench/parts/preferences/browser/keybindingsEditorContribution","vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/workbench/parts/preferences/electron-browser/preferencesSearch","vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings","vs/nls!vs/editor/contrib/indentation/indentation","vs/nls!vs/editor/contrib/linesOperations/linesOperations","vs/nls!vs/editor/contrib/links/links","vs/workbench/parts/comments/electron-browser/simpleCommentEditor","vs/workbench/parts/comments/electron-browser/commentThreadWidget","vs/nls!vs/editor/contrib/message/messageController","vs/nls!vs/editor/contrib/multicursor/multicursor","vs/workbench/parts/debug/electron-browser/breakpointWidget","vs/workbench/services/notification/common/notificationService","vs/nls!vs/editor/contrib/parameterHints/parameterHints","vs/workbench/parts/output/electron-browser/outputServices","vs/workbench/parts/extensions/electron-browser/extensions.contribution","vs/workbench/parts/terminal/electron-browser/terminalInstance","vs/workbench/services/activity/browser/activityService","vs/nls!vs/editor/contrib/parameterHints/parameterHintsWidget","vs/workbench/api/electron-browser/mainThreadOutputService","vs/nls!vs/editor/contrib/referenceSearch/peekViewWidget","vs/workbench/browser/actions/toggleCenteredLayout","vs/workbench/browser/actions/toggleSidebarPosition","vs/nls!vs/editor/contrib/referenceSearch/referenceSearch","vs/workbench/browser/actions/toggleStatusbarVisibility","vs/workbench/browser/actions/toggleZenMode","vs/workbench/browser/parts/editor/editorControl","vs/workbench/browser/parts/notifications/notificationsCenter","vs/workbench/browser/parts/notifications/notificationsToasts","vs/nls!vs/editor/contrib/referenceSearch/referencesController","vs/nls!vs/editor/contrib/referenceSearch/referencesModel","vs/workbench/browser/parts/quickinput/quickInput.contribution","vs/workbench/browser/parts/titlebar/titlebarPart","vs/workbench/electron-browser/commands","vs/css!vs/editor/contrib/documentSymbols/media/symbol-icons","vs/workbench/parts/debug/browser/debugStatus","vs/nls!vs/editor/contrib/referenceSearch/referencesWidget","vs/nls!vs/editor/contrib/rename/rename","vs/workbench/parts/terminal/browser/terminalTab","vs/workbench/parts/terminal/common/terminalService","vs/workbench/parts/terminal/electron-browser/terminalService","vs/nls!vs/editor/contrib/rename/renameInputField","vs/nls!vs/editor/contrib/smartSelect/smartSelect","vs/workbench/parts/webview/electron-browser/webviewEditorInputFactory","vs/nls!vs/editor/contrib/snippet/snippetVariables","vs/workbench/parts/html/electron-browser/htmlPreviewPart","vs/workbench/parts/html/electron-browser/html.contribution","vs/css!vs/editor/contrib/find/findWidget","vs/workbench/api/electron-browser/mainThreadWebview","vs/workbench/parts/webview/electron-browser/webview.contribution","vs/workbench/parts/welcome/overlay/browser/welcomeOverlay","vs/nls!vs/editor/contrib/suggest/suggestController","vs/nls!vs/editor/contrib/suggest/suggestWidget","vs/workbench/electron-browser/removedKeybindingsContribution","vs/workbench/parts/debug/electron-browser/debugConfigurationManager","vs/workbench/parts/preferences/browser/settingsEditor2","vs/workbench/parts/preferences/common/preferencesContribution","vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter","vs/workbench/parts/preferences/browser/preferencesRenderers","vs/workbench/services/preferences/browser/preferencesService","vs/nls!vs/platform/actions/browser/menuItemActionItem","vs/workbench/api/electron-browser/mainThreadProgress","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/dialogs/common/dialogs","vs/workbench/api/electron-browser/mainThreadSCM","vs/workbench/parts/scm/electron-browser/dirtydiffDecorator","vs/workbench/parts/scm/electron-browser/scmActivity","vs/workbench/services/scm/common/scmService","vs/workbench/services/search/node/searchHistoryService","vs/workbench/services/search/node/searchIpc","vs/nls!vs/platform/extensionManagement/common/extensionEnablementService","vs/workbench/parts/emmet/electron-browser/emmetActions","vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation","vs/workbench/parts/emmet/electron-browser/emmet.contribution","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/node/extensionGalleryService","vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint","vs/nls!vs/platform/extensions/node/extensionValidator","vs/workbench/api/electron-browser/mainThreadFileSystemEventService","vs/nls!vs/platform/integrity/node/integrityServiceImpl","vs/workbench/api/electron-browser/mainThreadLanguageFeatures","vs/workbench/api/node/apiCommands","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/node/minimalTranslations","vs/nls!vs/platform/request/node/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/update/node/update.config.contribution","vs/workbench/parts/files/browser/editors/binaryFileEditor","vs/workbench/parts/files/browser/editors/fileEditorTracker","vs/workbench/parts/output/browser/logViewer","vs/nls!vs/platform/url/electron-browser/inactiveExtensionUrlHandler","vs/workbench/parts/output/electron-browser/output.contribution","vs/nls!vs/platform/workspaces/common/workspaces","vs/workbench/parts/search/browser/replaceService","vs/workbench/parts/search/browser/replaceContributions","vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution","vs/workbench/parts/tasks/electron-browser/task.contribution","vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider","vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution","vs/workbench/services/bulkEdit/electron-browser/bulkEditService","vs/workbench/services/configuration/node/configurationEditingService","vs/nls!vs/workbench/api/browser/viewsContainersExtensionPoint","vs/nls!vs/workbench/api/browser/viewsExtensionPoint","vs/nls!vs/workbench/api/electron-browser/mainThreadEditors","vs/workbench/parts/preferences/browser/keybindingsEditor","vs/nls!vs/workbench/api/electron-browser/mainThreadMessageService","vs/workbench/api/electron-browser/mainThreadSaveParticipant","vs/workbench/services/textfile/common/textFileEditorModelManager","vs/workbench/services/textfile/common/textFileService","vs/workbench/services/themes/common/colorExtensionPoint","vs/nls!vs/workbench/api/electron-browser/mainThreadSaveParticipant","vs/workbench/services/themes/common/fileIconThemeSchema","vs/nls!vs/workbench/api/electron-browser/mainThreadTask","vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes","vs/workbench/parts/codeEditor/codeEditor.contribution","vs/workbench/parts/themes/test/electron-browser/themes.test.contribution","vs/workbench/services/textMate/electron-browser/TMSyntax","vs/nls!vs/workbench/api/electron-browser/mainThreadWebview","vs/workbench/services/themes/electron-browser/fileIconThemeStore","vs/workbench/services/themes/electron-browser/themeCompatibility","vs/nls!vs/workbench/api/electron-browser/mainThreadWorkspace","vs/workbench/services/themes/electron-browser/colorThemeStore","vs/workbench/services/themes/electron-browser/workbenchThemeService","vs/nls!vs/workbench/browser/actions/toggleActivityBarVisibility","vs/workbench/services/timer/node/timerService","vs/nls!vs/workbench/browser/actions/toggleCenteredLayout","vs/nls!vs/workbench/browser/actions/toggleEditorLayout","vs/nls!vs/workbench/browser/actions/toggleSidebarPosition","vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors","vs/nls!vs/workbench/browser/actions/toggleSidebarVisibility","vs/nls!vs/workbench/browser/actions/toggleStatusbarVisibility","vs/workbench/browser/parts/editor/editorDropTarget","vs/nls!vs/workbench/browser/actions/toggleTabsVisibility","vs/workbench/browser/parts/editor/editorStatus","vs/workbench/browser/parts/editor/editor.contribution","vs/nls!vs/workbench/browser/actions/toggleZenMode","vs/workbench/browser/parts/editor/noTabsTitleControl","vs/workbench/browser/parts/editor/tabsTitleControl","vs/nls!vs/workbench/browser/actions/workspaceActions","vs/workbench/browser/parts/quickopen/quickopen.contribution","vs/workbench/parts/backup/common/backupModelTracker","vs/workbench/parts/backup/common/backupRestorer","vs/workbench/parts/backup/common/backup.contribution","vs/workbench/parts/comments/electron-browser/commentsTreeViewer","vs/nls!vs/workbench/browser/actions/workspaceCommands","vs/workbench/api/electron-browser/mainThreadComments","vs/workbench/parts/comments/electron-browser/comments.contribution","vs/workbench/parts/files/common/dirtyFilesTracker","vs/workbench/parts/markers/electron-browser/markersTreeViewer","vs/workbench/parts/markers/electron-browser/markersPanel","vs/workbench/parts/markers/electron-browser/markers.contribution","vs/workbench/parts/search/browser/openFileHandler","vs/nls!vs/workbench/browser/parts/activitybar/activitybarPart","vs/nls!vs/workbench/browser/parts/compositePart","vs/workbench/services/search/node/searchService","vs/workbench/services/textfile/electron-browser/textFileService","vs/workbench/services/textmodelResolver/common/textModelResolverService","vs/nls!vs/workbench/browser/parts/compositebar/compositeBar","vs/workbench/browser/layout","vs/workbench/browser/parts/activitybar/activitybarActions","vs/workbench/browser/parts/activitybar/activitybarPart","vs/nls!vs/workbench/browser/parts/compositebar/compositeBarActions","vs/nls!vs/workbench/browser/parts/editor/binaryDiffEditor","vs/nls!vs/workbench/browser/parts/editor/binaryEditor","vs/nls!vs/workbench/browser/parts/editor/editor.contribution","vs/nls!vs/workbench/browser/parts/editor/editorActions","vs/workbench/browser/parts/views/customView","vs/workbench/api/browser/viewsExtensionPoint","vs/nls!vs/workbench/browser/parts/editor/editorCommands","vs/nls!vs/workbench/browser/parts/editor/editorGroupView","vs/nls!vs/workbench/browser/parts/editor/editorPart","vs/nls!vs/workbench/browser/parts/editor/editorPicker","vs/workbench/parts/debug/browser/debugCommands","vs/workbench/parts/debug/browser/debugEditorActions","vs/workbench/parts/debug/browser/debugEditorModelManager","vs/nls!vs/workbench/browser/parts/editor/editorStatus","vs/nls!vs/workbench/browser/parts/editor/resourceViewer","vs/workbench/parts/debug/electron-browser/callStackView","vs/workbench/parts/debug/electron-browser/debugService","vs/workbench/parts/debug/electron-browser/replViewer","vs/nls!vs/workbench/browser/parts/editor/tabsTitleControl","vs/nls!vs/workbench/browser/parts/editor/textDiffEditor","vs/workbench/parts/debug/electron-browser/debugHover","vs/workbench/parts/debug/electron-browser/debugEditorContribution","vs/workbench/parts/debug/electron-browser/watchExpressionsView","vs/workbench/parts/debug/electron-browser/debug.contribution","vs/nls!vs/workbench/browser/parts/editor/textEditor","vs/workbench/parts/files/browser/editors/textFileEditor","vs/workbench/parts/localizations/electron-browser/localizations.contribution","vs/workbench/parts/outline/electron-browser/outlinePanel","vs/workbench/parts/outline/electron-browser/outline.contribution","vs/workbench/parts/performance/electron-browser/startupProfiler","vs/workbench/parts/performance/electron-browser/startupTimings","vs/workbench/parts/performance/electron-browser/performance.contribution","vs/workbench/parts/quickopen/browser/viewPickerHandler","vs/workbench/parts/quickopen/browser/quickopen.contribution","vs/nls!vs/workbench/browser/parts/editor/textResourceEditor","vs/workbench/parts/scm/electron-browser/scm.contribution","vs/nls!vs/workbench/browser/parts/editor/titleControl","vs/workbench/parts/search/browser/searchResultsView","vs/workbench/parts/search/browser/searchViewLocationUpdater","vs/nls!vs/workbench/browser/parts/menubar/menubar.contribution","vs/workbench/parts/themes/electron-browser/themes.contribution","vs/nls!vs/workbench/browser/parts/menubar/menubarPart","vs/nls!vs/workbench/browser/parts/notifications/notificationsActions","vs/workbench/browser/parts/editor/editorGroupView","vs/workbench/browser/parts/editor/editorPart","vs/workbench/browser/parts/panel/panelPart","vs/workbench/browser/parts/sidebar/sidebarPart","vs/workbench/services/progress/browser/progressService2","vs/workbench/services/viewlet/browser/viewletService","vs/nls!vs/workbench/browser/parts/notifications/notificationsAlerts","vs/workbench/api/electron-browser/mainThreadWorkspace","vs/workbench/api/electron-browser/extensionHost.contribution","vs/nls!vs/workbench/browser/parts/notifications/notificationsCenter","vs/nls!vs/workbench/browser/parts/notifications/notificationsCommands","vs/workbench/electron-browser/main.contribution","vs/workbench/electron-browser/window","vs/nls!vs/workbench/browser/parts/notifications/notificationsStatus","vs/workbench/parts/extensions/electron-browser/extensionEditor","vs/workbench/parts/extensions/electron-browser/extensionsList","vs/nls!vs/workbench/browser/parts/notifications/notificationsToasts","vs/workbench/parts/extensions/electron-browser/extensionProfileService","vs/nls!vs/workbench/browser/parts/notifications/notificationsViewer","vs/nls!vs/workbench/browser/parts/panel/panelActions","vs/nls!vs/workbench/browser/parts/panel/panelPart","vs/workbench/parts/files/electron-browser/views/emptyView","vs/nls!vs/workbench/browser/parts/quickinput/quickInput","vs/workbench/parts/files/electron-browser/views/explorerView","vs/workbench/parts/files/electron-browser/views/openEditorsView","vs/nls!vs/workbench/browser/parts/quickinput/quickInputBox","vs/workbench/parts/files/electron-browser/files.contribution","vs/nls!vs/workbench/browser/parts/quickopen/quickOpenController","vs/workbench/parts/files/electron-browser/fileActions.contribution","vs/nls!vs/workbench/browser/parts/quickopen/quickopen","vs/workbench/parts/search/electron-browser/search.contribution","vs/nls!vs/workbench/browser/parts/sidebar/sidebarPart","vs/nls!vs/workbench/browser/parts/statusbar/statusbarPart","vs/workbench/parts/terminal/electron-browser/terminal.contribution","vs/workbench/parts/watermark/electron-browser/watermark","vs/workbench/services/workspace/node/workspaceEditingService","vs/nls!vs/workbench/browser/parts/titlebar/titlebarPart","vs/nls!vs/workbench/browser/parts/views/panelViewlet","vs/nls!vs/workbench/browser/parts/views/viewsViewlet","vs/platform/extensionManagement/node/extensionGalleryService","vs/platform/request/node/requestService","vs/platform/request/electron-browser/requestService","vs/workbench/electron-browser/shell","vs/workbench/electron-browser/main","vs/workbench/parts/extensions/electron-browser/extensionsViews","vs/nls!vs/workbench/browser/quickopen","vs/workbench/parts/experiments/electron-browser/experimentalPrompt","vs/workbench/parts/experiments/electron-browser/experiments.contribution","vs/workbench/parts/extensions/electron-browser/extensionTipsService","graceful-fs","zlib","spdlog","native-keymap","util","events","iconv-lite","string_decoder","vs/workbench/workbench.main"],t=function(t){
for(var n=[],i=0,r=t.length;i<r;i++)n[i]=e[t[i]];return n};define(e[492],t([1,0]),function(e,t){"use strict";function n(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return r=!0,null}catch(e){return r=!0,null}return e.parent}function i(e,t){for(var n,i=e.document.getElementsByTagName("iframe"),r=0,o=i.length;r<o;r++)if((n=i[r]).contentWindow===t)return n;return null}Object.defineProperty(t,"__esModule",{value:!0});var r=!1,o=null,s=function(){function e(){}return e.getSameOriginWindowChain=function(){if(!o){o=[];var e,t=window;do{(e=n(t))?o.push({window:t,iframeElement:i(e,t)}):o.push({window:t,iframeElement:null}),t=e}while(t)}return o.slice(0)},e.hasDifferentOriginAncestor=function(){return o||this.getSameOriginWindowChain(),r},e.getPositionOfChildWindowRelativeToAncestorWindow=function(e,t){if(!t||e===t)return{top:0,left:0};for(var n=0,i=0,r=this.getSameOriginWindowChain(),o=0;o<r.length;o++){
var s=r[o];if(s.window===t)break;if(!s.iframeElement)break;var a=s.iframeElement.getBoundingClientRect();n+=a.top,i+=a.left}return{top:n,left:i}},e}();t.IframeUtils=s}),define(e[956],t([1,0]),function(e,t){"use strict";function n(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function i(e){return e.end-e.start<=0}function r(e,t){for(var r=[],o=0,s=t;o<s.length;o++){var a=s[o];if(!(e.start>=a.range.end)){if(e.end<a.range.start)break;var c=n(e,a.range);i(c)||r.push({range:c,size:a.size})}}return r}function o(e,t){return{start:e.start+t,end:e.end+t}}function s(e){for(var t=[],n=null,i=0,r=e;i<r.length;i++){var o=r[i],s=o.range.start,a=o.range.end,c=o.size;n&&c===n.size?n.range.end=a:(n={range:{start:s,end:a},size:c},t.push(n))}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.intersect=n,t.isEmpty=i,t.relativeComplement=function(e,t){var n=[],r={start:e.start,end:Math.min(t.start,e.end)
},o={start:Math.max(t.end,e.start),end:e.end};return i(r)||n.push(r),i(o)||n.push(o),n},t.groupIntersect=r,t.shift=o,t.consolidate=s;var a=function(){function e(){this.groups=[],this._size=0}return e.prototype.splice=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=n.length-t,c=r({start:0,end:e},this.groups),l=r({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(function(e){return{range:o(e.range,a),size:e.size}}),u=n.map(function(t,n){return{range:{start:e+n,end:e+n+1},size:t.size}});this.groups=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s(e.reduce(function(e,t){return e.concat(t)},[]))}(c,u,l),this._size=this.groups.reduce(function(e,t){return e+t.size*(t.range.end-t.range.start)},0)},Object.defineProperty(e.prototype,"count",{get:function(){var e=this.groups.length;return e?this.groups[e-1].range.end:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,
configurable:!0}),e.prototype.indexAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,r=this.groups;i<r.length;i++){var o=r[i],s=o.range.end-o.range.start,a=n+s*o.size;if(e<a)return t+Math.floor((e-n)/o.size);t+=s,n=a}return t},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.count)},e.prototype.positionAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,r=this.groups;i<r.length;i++){var o=r[i],s=o.range.end-o.range.start,a=n+s;if(e<a)return t+(e-n)*o.size;t+=s*o.size,n=a}return-1},e.prototype.dispose=function(){this.groups=null},e}();t.RangeMap=a}),define(e[407],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=0,this._scrollSize=0,this._scrollPosition=0,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,
this._refreshComputedValues()}return e.prototype.clone=function(){var t=new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize);return t.setVisibleSize(this._visibleSize),t.setScrollSize(this._scrollSize),t.setScrollPosition(this._scrollPosition),t},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,r){var o=Math.max(0,n-e),s=Math.max(0,o-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var c=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-c)/(i-n),u=r*l;return{
computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(c),computedSliderRatio:l,computedSliderPosition:Math.round(u)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){
return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}();t.ScrollbarState=n}),define(e[170],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(e[113],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.hasOwnProperty;t.values=function(e){var t=[];for(var i in e)n.call(e,i)&&t.push(e[i]);return t},t.size=function(e){var t=0;for(var i in e)n.call(e,i)&&(t+=1);return t},t.first=function(e){for(var t in e)if(n.call(e,t))return e[t]},t.forEach=function(e,t){
var i=function(i){if(n.call(e,i)&&!1===t({key:i,value:e[i]},function(){delete e[i]}))return{value:void 0}};for(var r in e){var o=i(r);if("object"==typeof o)return o.value}},t.remove=function(e,t){return!!n.call(e,t)&&(delete e[t],!0)},t.groupBy=function(e,t){for(var n=Object.create(null),i=0,r=e;i<r.length;i++){var o=r[i],s=t(o),a=n[s];a||(a=n[s]=[]),a.push(o)}return n}}),define(e[51],t([1,0]),function(e,t){"use strict";function n(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,r){void 0===r&&(r=1),this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,r),0),3)}return e.equals=function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a},e}();t.RGBA=i;var r=function(){function e(e,t,i,r){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,r),0),3)}
return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a},e.fromRGBA=function(t){var n=t.r/255,i=t.g/255,r=t.b/255,o=t.a,s=Math.max(n,i,r),a=Math.min(n,i,r),c=0,l=0,u=(a+s)/2,d=s-a;if(d>0){switch(l=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),s){case n:c=(i-r)/d+(i<r?6:0);break;case i:c=(r-n)/d+2;break;case r:c=(n-i)/d+4}c*=60,c=Math.round(c)}return new e(c,l,u,o)},e._hue2rgb=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},e.toRGBA=function(t){var n,r,o,s=t.h/360,a=t.s,c=t.l,l=t.a;if(0===a)n=r=o=c;else{var u=c<.5?c*(1+a):c+a-c*a,d=2*c-u;n=e._hue2rgb(d,u,s+1/3),r=e._hue2rgb(d,u,s),o=e._hue2rgb(d,u,s-1/3)}return new i(Math.round(255*n),Math.round(255*r),Math.round(255*o),l)},e}();t.HSLA=r;var o=function(){function e(e,t,i,r){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,r),0),3)}return e.equals=function(e,t){
return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a},e.fromRGBA=function(t){var n,i=t.r/255,r=t.g/255,o=t.b/255,s=Math.max(i,r,o),a=s-Math.min(i,r,o),c=0===s?0:a/s;return n=0===a?0:s===i?((r-o)/a%6+6)%6:s===r?(o-i)/a+2:(i-r)/a+4,new e(Math.round(60*n),c,s,t.a)},e.toRGBA=function(e){var t=e.h,n=e.s,r=e.v,o=e.a,s=r*n,a=s*(1-Math.abs(t/60%2-1)),c=r-s,l=[0,0,0],u=l[0],d=l[1],h=l[2];return t<60?(u=s,d=a):t<120?(u=a,d=s):t<180?(d=s,h=a):t<240?(d=a,h=s):t<300?(u=a,h=s):t<360&&(u=s,h=a),u=Math.round(255*(u+c)),d=Math.round(255*(d+c)),h=Math.round(255*(h+c)),new i(u,d,h,o)},e}();t.HSVA=o;var s=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof i)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red},Object.defineProperty(e.prototype,"hsla",{get:function(){
return this._hsla?this._hsla:r.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&i.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return n(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)},e._relativeLuminanceForComponent=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},e.prototype.getContrastRatio=function(e){var t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},e.prototype.isDarker=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3<128},e.prototype.isLighter=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128},
e.prototype.isLighterThan=function(e){return this.getRelativeLuminance()>e.getRelativeLuminance()},e.prototype.isDarkerThan=function(e){return this.getRelativeLuminance()<e.getRelativeLuminance()},e.prototype.lighten=function(t){return new e(new r(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*t,this.hsla.a))},e.prototype.darken=function(t){return new e(new r(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*t,this.hsla.a))},e.prototype.transparent=function(t){var n=this.rgba,r=n.r,o=n.g,s=n.b,a=n.a;return new e(new i(r,o,s,a*t))},e.prototype.isTransparent=function(){return 0===this.rgba.a},e.prototype.isOpaque=function(){return 1===this.rgba.a},e.prototype.opposite=function(){return new e(new i(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))},e.prototype.blend=function(t){var n=t.rgba,r=this.rgba.a,o=n.a,s=r+o*(1-r);if(s<1e-6)return e.transparent;var a=this.rgba.r*r/s+n.r*o*(1-r)/s,c=this.rgba.g*r/s+n.g*o*(1-r)/s,l=this.rgba.b*r/s+n.b*o*(1-r)/s;return new e(new i(a,c,l,s))},
e.prototype.flatten=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t.reduceRight(function(t,n){return e._flatten(n,t)});return e._flatten(this,i)},e._flatten=function(t,n){var r=1-t.rgba.a;return new e(new i(r*n.rgba.r+t.rgba.a*t.rgba.r,r*n.rgba.g+t.rgba.a*t.rgba.g,r*n.rgba.b+t.rgba.a*t.rgba.b))},e.prototype.toString=function(){return e.Format.CSS.format(this)},e.getLighterColor=function(e,t,n){if(e.isLighterThan(t))return e;n=n||.5;var i=e.getRelativeLuminance(),r=t.getRelativeLuminance();return n=n*(r-i)/r,e.lighten(n)},e.getDarkerColor=function(e,t,n){if(e.isDarkerThan(t))return e;n=n||.5;var i=e.getRelativeLuminance();return n=n*(i-t.getRelativeLuminance())/i,e.darken(n)},e.white=new e(new i(255,255,255,1)),e.black=new e(new i(0,0,0,1)),e.red=new e(new i(255,0,0,1)),e.blue=new e(new i(0,0,255,1)),e.green=new e(new i(0,255,0,1)),e.cyan=new e(new i(0,255,255,1)),e.lightgrey=new e(new i(211,211,211,1)),e.transparent=new e(new i(0,0,0,0)),e}();t.Color=s,function(e){!function(t){
!function(t){function n(e){var t=e.toString(16);return 2!==t.length?"0"+t:t}function r(e){switch(e){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:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?"rgb("+t.rgba.r+", "+t.rgba.g+", "+t.rgba.b+")":e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return"rgba("+e.rgba.r+", "+e.rgba.g+", "+e.rgba.b+", "+ +e.rgba.a.toFixed(2)+")"},t.formatHSL=function(t){return 1===t.hsla.a?"hsl("+t.hsla.h+", "+(100*t.hsla.s).toFixed(2)+"%, "+(100*t.hsla.l).toFixed(2)+"%)":e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return"hsla("+e.hsla.h+", "+(100*e.hsla.s).toFixed(2)+"%, "+(100*e.hsla.l).toFixed(2)+"%, "+e.hsla.a.toFixed(2)+")"},t.formatHex=function(e){
return"#"+n(e.rgba.r)+n(e.rgba.g)+n(e.rgba.b)},t.formatHexA=function(t,i){return void 0===i&&(i=!1),i&&1===t.rgba.a?e.Format.CSS.formatHex(t):"#"+n(t.rgba.r)+n(t.rgba.g)+n(t.rgba.b)+n(Math.round(255*t.rgba.a))},t.format=function(t){return t?t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t):null},t.parseHex=function(t){if(!t)return null;var n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){var o=16*r(t.charCodeAt(1))+r(t.charCodeAt(2)),s=16*r(t.charCodeAt(3))+r(t.charCodeAt(4)),a=16*r(t.charCodeAt(5))+r(t.charCodeAt(6));return new e(new i(o,s,a,1))}if(9===n){var o=16*r(t.charCodeAt(1))+r(t.charCodeAt(2)),s=16*r(t.charCodeAt(3))+r(t.charCodeAt(4)),a=16*r(t.charCodeAt(5))+r(t.charCodeAt(6)),c=16*r(t.charCodeAt(7))+r(t.charCodeAt(8));return new e(new i(o,s,a,c/255))}if(4===n){var o=r(t.charCodeAt(1)),s=r(t.charCodeAt(2)),a=r(t.charCodeAt(3));return new e(new i(16*o+o,16*s+s,16*a+a))}if(5===n){
var o=r(t.charCodeAt(1)),s=r(t.charCodeAt(2)),a=r(t.charCodeAt(3)),c=r(t.charCodeAt(4));return new e(new i(16*o+o,16*s+s,16*a+a,(16*c+c)/255))}return null}}(t.CSS||(t.CSS={}))}(e.Format||(e.Format={}))}(s=t.Color||(t.Color={})),t.Color=s}),define(e[111],t([1,0]),function(e,t){"use strict";function n(e){return function(t,n,i){var r=null,o=null;if("function"==typeof i.value?(r="value",o=i.value):"function"==typeof i.get&&(r="get",o=i.get),!o)throw new Error("not supported");i[r]=e(o,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=n,t.memoize=function(e,t,n){var i=null,r=null;if("function"==typeof n.value?(i="value",0!==(r=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(i="get",r=n.get),!r)throw new Error("not supported");var o="$memoize$"+t;n[i]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,
value:r.apply(this,e)}),this[o]}},t.debounce=function(e,t,i){return n(function(n,r){var o="$debounce$"+r,s=i?i():void 0;return function(){for(var r=this,a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];clearTimeout(this[o]),t&&(s=t.apply(void 0,[s].concat(a)),a=[s]),this[o]=setTimeout(function(){n.apply(r,a),s=i?i():void 0},e)}})}}),define(e[803],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();t.DiffChange=n}),define(e[373],t([1,0,803]),function(e,t,n){"use strict";function i(e){return{getLength:function(){return e.length},getElementAtIndex:function(t){return e.charCodeAt(t)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.stringDiff=function(e,t,n){
return new a(i(e),i(t)).ComputeDiff(n)};var r=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}();t.Debug=r;var o=function(){function e(){}return e.Copy=function(e,t,n,i,r){for(var o=0;o<r;o++)n[i+o]=e[t+o]},e}();t.MyArray=o;var s=function(){function e(){this.m_changes=[],this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE,this.m_originalCount=0,this.m_modifiedCount=0}return e.prototype.MarkNextChange=function(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){
this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),a=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){
return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,i,r){var o=this.ComputeDiffRecursive(e,t,n,i,[!1]);return r?this.ShiftChanges(o):o},e.prototype.ComputeDiffRecursive=function(e,t,i,o,s){for(s[0]=!1;e<=t&&i<=o&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){var a=void 0;return i<=o?(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n.DiffChange(e,0,i,o-i+1)]):e<=t?(r.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n.DiffChange(e,t-e+1,i,0)]):(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var c=[0],l=[0],u=this.ComputeRecursionPoint(e,t,i,o,c,l,s),d=c[0],h=l[0]
;if(null!==u)return u;if(!s[0]){var p=this.ComputeDiffRecursive(e,d,i,h,s),f=[];return f=s[0]?[new n.DiffChange(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,s),this.ConcatenateChanges(p,f)}return[new n.DiffChange(e,t-e+1,i,o-i+1)]},e.prototype.WALKTRACE=function(e,t,i,r,o,a,c,l,u,d,h,p,f,g,v,m,y,b){var S,_=null,C=null,E=new s,w=t,I=i,T=f[0]-m[0]-r,x=Number.MIN_VALUE,k=this.m_forwardHistory.length-1;do{(S=T+e)===w||S<I&&u[S-1]<u[S+1]?(g=(h=u[S+1])-T-r,h<x&&E.MarkNextChange(),x=h,E.AddModifiedElement(h+1,g),T=S+1-e):(g=(h=u[S-1]+1)-T-r,h<x&&E.MarkNextChange(),x=h-1,E.AddOriginalElement(h,g+1),T=S-1-e),k>=0&&(e=(u=this.m_forwardHistory[k])[0],w=1,I=u.length-1)}while(--k>=-1);if(_=E.getReverseChanges(),b[0]){var D=f[0]+1,A=m[0]+1;if(null!==_&&_.length>0){var L=_[_.length-1];D=Math.max(D,L.getOriginalEnd()),A=Math.max(A,L.getModifiedEnd())}C=[new n.DiffChange(D,p-D+1,A,v-A+1)]}else{E=new s,w=a,I=c,T=f[0]-m[0]-l,x=Number.MAX_VALUE,
k=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(S=T+o)===w||S<I&&d[S-1]>=d[S+1]?(g=(h=d[S+1]-1)-T-l,h>x&&E.MarkNextChange(),x=h+1,E.AddOriginalElement(h+1,g+1),T=S+1-o):(g=(h=d[S-1])-T-l,h>x&&E.MarkNextChange(),x=h,E.AddModifiedElement(h+1,g+1),T=S-1-o),k>=0&&(o=(d=this.m_reverseHistory[k])[0],w=1,I=d.length-1)}while(--k>=-1);C=E.getChanges()}return this.ConcatenateChanges(_,C)},e.prototype.ComputeRecursionPoint=function(e,t,i,r,s,a,c){var l,u,d,h=0,p=0,f=0,g=0;e--,i--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var v=t-e+(r-i),m=v+1,y=new Array(m),b=new Array(m),S=r-i,_=t-e,C=e-i,E=t-r,w=(_-S)%2==0;y[S]=e,b[_]=t,c[0]=!1;var I,T;for(d=1;d<=v/2+1;d++){var x=0,k=0;for(h=this.ClipDiagonalBound(S-d,d,S,m),p=this.ClipDiagonalBound(S+d,d,S,m),I=h;I<=p;I+=2){for(u=(l=I===h||I<p&&y[I-1]<y[I+1]?y[I+1]:y[I-1]+1)-(I-S)-C,T=l;l<t&&u<r&&this.ElementsAreEqual(l+1,u+1);)l++,u++;if(y[I]=l,l+u>x+k&&(x=l,k=u),!w&&Math.abs(I-_)<=d-1&&l>=b[I])return s[0]=l,a[0]=u,
T<=b[I]&&d<=1448?this.WALKTRACE(S,h,p,C,_,f,g,E,y,b,l,t,s,u,r,a,w,c):null}var D=(x-e+(k-i)-d)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(x,this.OriginalSequence,D))return c[0]=!0,s[0]=x,a[0]=k,D>0&&d<=1448?this.WALKTRACE(S,h,p,C,_,f,g,E,y,b,l,t,s,u,r,a,w,c):(e++,i++,[new n.DiffChange(e,t-e+1,i,r-i+1)]);for(f=this.ClipDiagonalBound(_-d,d,_,m),g=this.ClipDiagonalBound(_+d,d,_,m),I=f;I<=g;I+=2){for(u=(l=I===f||I<g&&b[I-1]>=b[I+1]?b[I+1]-1:b[I-1])-(I-_)-E,T=l;l>e&&u>i&&this.ElementsAreEqual(l,u);)l--,u--;if(b[I]=l,w&&Math.abs(I-S)<=d&&l<=y[I])return s[0]=l,a[0]=u,T>=y[I]&&d<=1448?this.WALKTRACE(S,h,p,C,_,f,g,E,y,b,l,t,s,u,r,a,w,c):null}if(d<=1447){var A=new Array(p-h+2);A[0]=S-h+1,o.Copy(y,h,A,1,p-h+1),this.m_forwardHistory.push(A),(A=new Array(g-f+2))[0]=_-f+1,o.Copy(b,f,A,1,g-f+1),this.m_reverseHistory.push(A)}}return this.WALKTRACE(S,h,p,C,_,f,g,E,y,b,l,t,s,u,r,a,w,c)},e.prototype.ShiftChanges=function(e){var t;do{t=!1
;for(l=0;l<e.length;l++)for(var n=e[l],i=l<e.length-1?e[l+1].originalStart:this.OriginalSequence.getLength(),r=l<e.length-1?e[l+1].modifiedStart:this.ModifiedSequence.getLength(),o=n.originalLength>0,s=n.modifiedLength>0;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<r&&(!o||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));)n.originalStart++,n.modifiedStart++;for(var a=new Array,c=[null],l=0;l<e.length;l++)l<e.length-1&&this.ChangesOverlap(e[l],e[l+1],c)?(t=!0,a.push(c[0]),l++):a.push(e[l]);e=a}while(t);for(l=e.length-1;l>=0;l--){var n=e[l],i=0,r=0;if(l>0){var u=e[l-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(r=u.modifiedStart+u.modifiedLength)}for(var o=n.originalLength>0,s=n.modifiedLength>0,d=0,h=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),p=1;;p++){
var f=n.originalStart-p,g=n.modifiedStart-p;if(f<i||g<r)break;if(o&&!this.OriginalElementsAreEqual(f,f+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(g,g+n.modifiedLength))break;var v=this._boundaryScore(f,n.originalLength,g,n.modifiedLength);v>h&&(h=v,d=p)}n.originalStart-=d,n.modifiedStart-=d}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){
if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[],i=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(i=new Array(e.length+t.length-1),o.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],o.Copy(t,1,i,e.length,t.length-1),i):(i=new Array(e.length+t.length),o.Copy(e,0,i,0,e.length),o.Copy(t,0,i,e.length,t.length),i)},e.prototype.ChangesOverlap=function(e,t,i){if(r.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),r.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){
var o=e.originalStart,s=e.originalLength,a=e.modifiedStart,c=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(c=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n.DiffChange(o,s,a,c),!0}return i[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e<i)return e;var r=i-n-1,o=t%2==0;if(e<0){return o===(n%2==0)?0:1}return o===(r%2==0)?i-1:i-2},e}();t.LcsDiff=a}),define(e[303],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments))}}}),define(e[483],t([1,0]),function(e,t){"use strict";function n(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?i(349,t):Array.isArray(e)?function(e,t){return t=i(104579,t),e.reduce(function(e,t){return n(t,e)},t)}(e,t):function(e,t){return t=i(181387,t),
Object.keys(e).sort().reduce(function(t,i){return t=r(i,t),n(e[i],t)},t)}(e,t);case"string":return r(e,t);case"boolean":return function(e,t){return i(e?433:863,t)}(e,t);case"number":return i(e,t);case"undefined":return i(e,937);default:return i(e,617)}}function i(e,t){return(t<<5)-t+e|0}function r(e,t){t=i(149417,t);for(var n=0,r=e.length;n<r;n++)t=i(e.charCodeAt(n),t);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.hash=n}),define(e[149],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}();t.IdGenerator=n,t.defaultGenerator=new n("id#")});var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),
t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();define(e[254],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1),this.items=e,this.start=t,this.end=n,this.index=i}return e.prototype.first=function(){return this.index=this.start,this.current()},e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}();t.ArrayIterator=i;var r=function(e){function t(t,n,i,r){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===r&&(r=n-1),e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,
this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null},t}(i);t.ArrayNavigator=r;var o=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}();t.MappedIterator=o;var s=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.navigator=t,i}return n(t,e),t.prototype.current=function(){return this.fn(this.navigator.current())},t.prototype.previous=function(){return this.fn(this.navigator.previous())},t.prototype.parent=function(){return this.fn(this.navigator.parent())},t.prototype.first=function(){return this.fn(this.navigator.first())},t.prototype.last=function(){return this.fn(this.navigator.last())},t.prototype.next=function(){return this.fn(this.navigator.next())},t}(o);t.MappedNavigator=s}),define(e[410],t([1,0,254]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){void 0===e&&(e=[]),
void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.getHistory=function(){return this._elements},e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype.has=function(e){return this._history.has(e)},e.prototype.clear=function(){this._initialize([]),this._onChange()},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new n.ArrayNavigator(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))},
e.prototype._initialize=function(e){this._history=new Set;for(var t=0,n=e;t<n.length;t++){var i=n[t];this._history.add(i)}},Object.defineProperty(e.prototype,"_elements",{get:function(){var e=[];return this._history.forEach(function(t){return e.push(t)}),e},enumerable:!0,configurable:!0}),e}();t.HistoryNavigator=i}),define(e[89],t([1,0]),function(e,t){"use strict";function n(e,t){function n(t,n){for(var i=0,r=0;i<t||!n;){var o=e.charCodeAt(a);if(o>=48&&o<=57)r=16*r+o-48;else if(o>=65&&o<=70)r=16*r+o-65+10;else{if(!(o>=97&&o<=102))break;r=16*r+o-97+10}a++,i++}return i<t&&(r=-1),r}function s(){if(d="",f=c.None,h=a,a>=u)return h=u,p=l.EOF;var t=e.charCodeAt(a);if(i(t)){do{a++,d+=String.fromCharCode(t),t=e.charCodeAt(a)}while(i(t));return p=l.Trivia}if(r(t))return a++,d+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,d+="\n"),p=l.LineBreakTrivia;switch(t){case 123:return a++,p=l.OpenBraceToken;case 125:return a++,p=l.CloseBraceToken;case 91:return a++,p=l.OpenBracketToken;case 93:return a++,
p=l.CloseBracketToken;case 58:return a++,p=l.ColonToken;case 44:return a++,p=l.CommaToken;case 34:return a++,d=function(){for(var t="",i=a;;){if(a>=u){t+=e.substring(i,a),f=c.UnexpectedEndOfString;break}var o=e.charCodeAt(a);if(34===o){t+=e.substring(i,a),a++;break}if(92!==o){if(o>=0&&o<=31){if(r(o)){t+=e.substring(i,a),f=c.UnexpectedEndOfString;break}f=c.InvalidCharacter}a++}else{if(t+=e.substring(i,a),++a>=u){f=c.UnexpectedEndOfString;break}switch(o=e.charCodeAt(a++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=n(4,!0);s>=0?t+=String.fromCharCode(s):f=c.InvalidUnicode;break;default:f=c.InvalidEscapeCharacter}i=a}}return t}(),p=l.StringLiteral;case 47:var s=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a<u&&!r(e.charCodeAt(a));)a++;return d=e.substring(s,a),p=l.LineCommentTrivia}if(42===e.charCodeAt(a+1)){a+=2;for(var g=u-1,v=!1;a<g;){
if(42===e.charCodeAt(a)&&47===e.charCodeAt(a+1)){a+=2,v=!0;break}a++}return v||(a++,f=c.UnexpectedEndOfComment),d=e.substring(s,a),p=l.BlockCommentTrivia}return d+=String.fromCharCode(t),a++,p=l.Unknown;case 45:if(d+=String.fromCharCode(t),++a===u||!o(e.charCodeAt(a)))return p=l.Unknown;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return d+=function(){var t=a;if(48===e.charCodeAt(a))a++;else for(a++;a<e.length&&o(e.charCodeAt(a));)a++;if(a<e.length&&46===e.charCodeAt(a)){if(!(++a<e.length&&o(e.charCodeAt(a))))return f=c.UnexpectedEndOfNumber,e.substring(t,a);for(a++;a<e.length&&o(e.charCodeAt(a));)a++}var n=a;if(a<e.length&&(69===e.charCodeAt(a)||101===e.charCodeAt(a)))if((++a<e.length&&43===e.charCodeAt(a)||45===e.charCodeAt(a))&&a++,a<e.length&&o(e.charCodeAt(a))){for(a++;a<e.length&&o(e.charCodeAt(a));)a++;n=a}else f=c.UnexpectedEndOfNumber;return e.substring(t,n)}(),p=l.NumericLiteral;default:for(;a<u&&function(e){if(i(e)||r(e))return!1;switch(e){case 125:case 93:
case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}(t);)a++,t=e.charCodeAt(a);if(h!==a){switch(d=e.substring(h,a)){case"true":return p=l.TrueKeyword;case"false":return p=l.FalseKeyword;case"null":return p=l.NullKeyword}return p=l.Unknown}return d+=String.fromCharCode(t),a++,p=l.Unknown}}void 0===t&&(t=!1);var a=0,u=e.length,d="",h=0,p=l.Unknown,f=c.None;return{setPosition:function(e){a=e,d="",h=0,p=l.Unknown,f=c.None},getPosition:function(){return a},scan:t?function(){var e;do{e=s()}while(e>=l.LineCommentTrivia&&e<=l.Trivia);return e}:s,getToken:function(){return p},getTokenValue:function(){return d},getTokenOffset:function(){return h},getTokenLength:function(){return a-h},getTokenError:function(){return f}}}function i(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function o(e){return e>=48&&e<=57}function s(e){if("array"===e.type)return e.children.map(s)
;if("object"===e.type){for(var t={},n=0,i=e.children;n<i.length;n++){var r=i[n];t[r.children[0].value]=s(r.children[1])}return t}return e.value}function a(e,t,i){function r(e){return e?function(){return e(p.getTokenOffset(),p.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,p.getTokenOffset(),p.getTokenLength())}:function(){return!0}}function s(){for(;;){var e=p.scan();switch(e){case l.LineCommentTrivia:case l.BlockCommentTrivia:C&&a(d.InvalidSymbol);break;case l.Unknown:a(d.InvalidSymbol);break;case l.Trivia:case l.LineBreakTrivia:break;default:return e}}}function a(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),_(e),t.length+n.length>0)for(var i=p.getToken();i!==l.EOF;){if(-1!==t.indexOf(i)){s();break}if(-1!==n.indexOf(i))break;i=s()}}function c(e){var t=p.getTokenValue();return e?b(t):g(t),s(),!0}function u(){return p.getToken()!==l.StringLiteral?(a(d.PropertyNameExpected,[],[l.CloseBraceToken,l.CommaToken]),!1):(c(!1),p.getToken()===l.ColonToken?(S(":"),s(),
h()||a(d.ValueExpected,[],[l.CloseBraceToken,l.CommaToken])):a(d.ColonExpected,[],[l.CloseBraceToken,l.CommaToken]),!0)}function h(){switch(p.getToken()){case l.OpenBracketToken:return function(){m(),s();for(var e=!1;p.getToken()!==l.CloseBracketToken&&p.getToken()!==l.EOF;){if(p.getToken()===l.CommaToken){if(e||a(d.ValueExpected,[],[]),S(","),s(),p.getToken()===l.CloseBracketToken&&!E)break}else e&&a(d.CommaExpected,[],[]);h()||a(d.ValueExpected,[],[l.CloseBracketToken,l.CommaToken]),e=!0}return y(),p.getToken()!==l.CloseBracketToken?a(d.CloseBracketExpected,[l.CloseBracketToken],[]):s(),!0}();case l.OpenBraceToken:return function(){f(),s();for(var e=!1;p.getToken()!==l.CloseBraceToken&&p.getToken()!==l.EOF;){if(p.getToken()===l.CommaToken){if(e||a(d.ValueExpected,[],[]),S(","),s(),p.getToken()===l.CloseBraceToken&&!E)break}else e&&a(d.CommaExpected,[],[]);u()||a(d.ValueExpected,[],[l.CloseBraceToken,l.CommaToken]),e=!0}return v(),
p.getToken()!==l.CloseBraceToken?a(d.CloseBraceExpected,[l.CloseBraceToken],[]):s(),!0}();case l.StringLiteral:return c(!0);default:return function(){switch(p.getToken()){case l.NumericLiteral:var e=0;try{"number"!=typeof(e=JSON.parse(p.getTokenValue()))&&(a(d.InvalidNumberFormat),e=0)}catch(e){a(d.InvalidNumberFormat)}b(e);break;case l.NullKeyword:b(null);break;case l.TrueKeyword:b(!0);break;case l.FalseKeyword:b(!1);break;default:return!1}return s(),!0}()}}var p=n(e,!1),f=r(t.onObjectBegin),g=o(t.onObjectProperty),v=r(t.onObjectEnd),m=r(t.onArrayBegin),y=r(t.onArrayEnd),b=o(t.onLiteralValue),S=o(t.onSeparator),_=o(t.onError),C=i&&i.disallowComments,E=i&&i.disallowTrailingComma;return s(),p.getToken()===l.EOF||(h()?(p.getToken()!==l.EOF&&a(d.EndOfFileExpected,[],[]),!0):(a(d.ValueExpected,[],[]),!1))}Object.defineProperty(t,"__esModule",{value:!0});var c;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",
e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(c=t.ScanError||(t.ScanError={}));var l;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.EOF=16]="EOF"}(l=t.SyntaxKind||(t.SyntaxKind={})),t.createScanner=n;var u;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",
e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",
e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",
e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(u||(u={}));var d;!function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",
e[e.CloseBracketExpected=7]="CloseBracketExpected",e[e.EndOfFileExpected=8]="EndOfFileExpected"}(d=t.ParseErrorCode||(t.ParseErrorCode={})),t.parse=function(e,t,n){function i(e){Array.isArray(o)?o.push(e):r&&(o[r]=e)}void 0===t&&(t=[]);var r=null,o=[],s=[];return a(e,{onObjectBegin:function(){var e={};i(e),s.push(o),o=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];i(e),s.push(o),o=e,r=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:i,onError:function(e){t.push({error:e})}},n),o[0]},t.parseTree=function(e,t,n){function i(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function r(e){return o.children.push(e),e}void 0===t&&(t=[]);var o={type:"array",offset:-1,length:-1,children:[]};a(e,{onObjectBegin:function(e){o=r({type:"object",offset:e,length:-1,parent:o,children:[]})},onObjectProperty:function(e,t,n){(o=r({type:"property",offset:t,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:t,length:n,parent:o})
},onObjectEnd:function(e,t){o.length=e+t-o.offset,o=o.parent,i(e+t)},onArrayBegin:function(e,t){o=r({type:"array",offset:e,length:-1,parent:o,children:[]})},onArrayEnd:function(e,t){o.length=e+t-o.offset,o=o.parent,i(e+t)},onLiteralValue:function(e,t,n){r({type:function(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}(e),offset:t,length:n,parent:o,value:e}),i(t+n)},onSeparator:function(e,t,n){"property"===o.type&&(":"===e?o.columnOffset=t:","===e&&i(t))},onError:function(e){t.push({error:e})}},n);var s=o.children[0];return s&&delete s.parent,s},t.findNodeAtLocation=function(e,t){if(e){for(var n=e,i=0,r=t;i<r.length;i++){var o=r[i];if("string"==typeof o){if("object"!==n.type)return;for(var s=!1,a=0,c=n.children;a<c.length;a++){var l=c[a];if(l.children[0].value===o){n=l.children[1],s=!0;break}}if(!s)return}else{var u=o;if("array"!==n.type||u<0||u>=n.children.length)return;n=n.children[u]}}return n}},t.getNodeValue=s,t.visit=a}),
define(e[992],t([1,0,89]),function(e,t,n){"use strict";function i(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function r(e,t,i){function r(){return f+o(p,c+v)}function s(){var e=m.scan();for(g=!1;e===n.SyntaxKind.Trivia||e===n.SyntaxKind.LineBreakTrivia;)g=g||e===n.SyntaxKind.LineBreakTrivia,e=m.scan();return e}function a(t,n,i){e.substring(n,i)!==t&&y.push({offset:n,length:i-n,content:t})}var c,l,u,d;if(t){for(d=(u=t.offset)+t.length;u>0&&!function(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}(e,u-1);)u--;var h=n.createScanner(e,!0);h.setPosition(d),h.scan(),d=h.getPosition(),l=e.substring(u,d),c=function(e,t,n){var i=0,r=0,o=n.tabSize||4;for(;i<e.length;){var s=e.charAt(i);if(" "===s)r++;else{if("\t"!==s)break;r+=o}i++}return Math.floor(r/o)}(l,0,i)}else l=e,u=0,d=e.length,c=0;var p,f=function(e,t){for(var n=0;n<t.length;n++){var i=t.charAt(n);if("\r"===i)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===i)return"\n"}return e&&e.eol||"\n"}(i,e),g=!1,v=0
;p=i.insertSpaces?o(" ",i.tabSize):"\t";var m=n.createScanner(l,!1),y=[],b=s();if(b!==n.SyntaxKind.EOF){var S=m.getTokenOffset()+u;a(o(p,c),u,S)}for(;b!==n.SyntaxKind.EOF;){for(var _=m.getTokenOffset()+m.getTokenLength()+u,C=s(),E="";!g&&(C===n.SyntaxKind.LineCommentTrivia||C===n.SyntaxKind.BlockCommentTrivia);){a(" ",_,m.getTokenOffset()+u),_=m.getTokenOffset()+m.getTokenLength()+u,E=C===n.SyntaxKind.LineCommentTrivia?r():"",C=s()}if(C===n.SyntaxKind.CloseBraceToken)b!==n.SyntaxKind.OpenBraceToken&&(v--,E=r());else if(C===n.SyntaxKind.CloseBracketToken)b!==n.SyntaxKind.OpenBracketToken&&(v--,E=r());else if(C!==n.SyntaxKind.EOF){switch(b){case n.SyntaxKind.OpenBracketToken:case n.SyntaxKind.OpenBraceToken:v++,E=r();break;case n.SyntaxKind.CommaToken:case n.SyntaxKind.LineCommentTrivia:E=r();break;case n.SyntaxKind.BlockCommentTrivia:E=g?r():" ";break;case n.SyntaxKind.ColonToken:E=" ";break;case n.SyntaxKind.NullKeyword:case n.SyntaxKind.TrueKeyword:case n.SyntaxKind.FalseKeyword:
case n.SyntaxKind.NumericLiteral:C!==n.SyntaxKind.NullKeyword&&C!==n.SyntaxKind.FalseKeyword&&C!==n.SyntaxKind.NumericLiteral||(E=" ")}!g||C!==n.SyntaxKind.LineCommentTrivia&&C!==n.SyntaxKind.BlockCommentTrivia||(E=r())}a(E,_,m.getTokenOffset()+u),b=C}return y}function o(e,t){for(var n="",i=0;i<t;i++)n+=e;return n}Object.defineProperty(t,"__esModule",{value:!0}),t.applyEdit=i,t.applyEdits=function(e,t){for(var n=t.length-1;n>=0;n--)e=i(e,t[n]);return e},t.format=r}),define(e[365],t([1,0,89,992]),function(e,t,n,i){"use strict";function r(e,t,i,r,s){for(var a,c=n.parseTree(e,[]),l=void 0,u=void 0;t.length>0&&(u=t.pop(),void 0===(l=n.findNodeAtLocation(c,t))&&void 0!==i);)"string"==typeof u?((a={})[u]=i,i=a):i=[i];if(l){if("object"===l.type&&"string"==typeof u){var d=n.findNodeAtLocation(l,[u]);if(void 0!==d){if(void 0===i){var h=l.children.indexOf(d.parent),p=void 0,f=d.parent.offset+d.parent.length;if(h>0){p=(S=l.children[h-1]).offset+S.length}else if(p=l.offset+1,l.children.length>1){f=l.children[1].offset}
return o(e,{offset:p,length:f-p,content:""},r)}return o(e,{offset:d.offset,length:d.length,content:JSON.stringify(i)},r)}if(void 0===i)return[];var g=JSON.stringify(u)+": "+JSON.stringify(i),v=s?s(l.children.map(function(e){return e.children[0].value})):l.children.length,m=void 0;if(v>0){m={offset:(S=l.children[v-1]).offset+S.length,length:0,content:","+g}}else m=0===l.children.length?{offset:l.offset+1,length:0,content:g}:{offset:l.offset+1,length:0,content:g+","};return o(e,m,r)}if("array"===l.type&&"number"==typeof u){if(-1===u){var g=""+JSON.stringify(i),m=void 0;if(0===l.children.length)m={offset:l.offset+1,length:0,content:g};else{m={offset:(S=l.children[l.children.length-1]).offset+S.length,length:0,content:","+g}}return o(e,m,r)}if(void 0===i&&l.children.length>=0){var y=u,b=l.children[y],m=void 0;if(1===l.children.length)m={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===y){var S=l.children[y-1],_=S.offset+S.length;m={offset:_,length:l.offset+l.length-2-_,content:""}
}else m={offset:b.offset,length:l.children[y+1].offset-b.offset,content:""};return o(e,m,r)}throw new Error("Array modification not supported yet")}throw new Error("Can not add "+("number"!=typeof u?"index":"property")+" to parent of type "+l.type)}if(void 0===i)throw new Error("Can not delete in empty document");return o(e,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(i)},r)}function o(e,t,n){for(var r=i.applyEdit(e,t),o=t.offset,s=t.offset+t.content.length,a=i.format(r,{offset:o,length:s-o},n),c=a.length-1;c>=0;c--){var l=a[c];r=i.applyEdit(r,l),o=Math.min(o,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}return[{offset:o,length:e.length-(r.length-s)-o,content:r.substring(o,s)}]}Object.defineProperty(t,"__esModule",{value:!0}),t.removeProperty=function(e,t,n){return r(e,t,void 0,n)},t.setProperty=r}),define(e[73],t([1,0]),function(e,t){"use strict";function n(e,t){var n=!!(2048&e),i=!!(256&e);return new c(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e)}
Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",
e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",
e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(t.KeyCode||(t.KeyCode={}));var i=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}
return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),r=new i,o=new i,s=new i;!function(){function e(e,t,n,i){void 0===n&&(n=t),void 0===i&&(i=n),r.define(e,t),o.define(e,n),s.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),
e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}();!function(e){
e.toString=function(e){return r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return s.keyCodeToStr(e)},e.fromUserSettings=function(e){return o.strToKeyCode(e)||s.strToKeyCode(e)}}(t.KeyCodeUtils||(t.KeyCodeUtils={}));var a;!function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl",e[e.KeyCode=255]="KeyCode"}(a||(a={}));!function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl"}(t.KeyMod||(t.KeyMod={})),t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;var i=(65535&e)>>>0,r=(4294901760&e)>>>16;return 0!==r?new l(n(i,t),n(r,t)):n(i,t)},t.createSimpleKeybinding=n;!function(e){e[e.Simple=1]="Simple",e[e.Chord=2]="Chord"}(t.KeybindingType||(t.KeybindingType={}));var c=function(){function e(e,t,n,i,r){this.type=1,this.ctrlKey=e,
this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=r}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.getHashCode=function(){return""+(this.ctrlKey?"1":"0")+(this.shiftKey?"1":"0")+(this.altKey?"1":"0")+(this.metaKey?"1":"0")+this.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}();t.SimpleKeybinding=c;var l=function(){function e(e,t){this.type=2,this.firstPart=e,this.chordPart=t}return e.prototype.getHashCode=function(){return this.firstPart.getHashCode()+";"+this.chordPart.getHashCode()},e}();t.ChordKeybinding=l;var u=function(){return function(e,t,n,i,r,o){this.ctrlKey=e,
this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=r,this.keyAriaLabel=o}}();t.ResolvedKeybindingPart=u;var d=function(){return function(){}}();t.ResolvedKeybinding=d}),define(e[5],t([1,0,303]),function(e,t,n){"use strict";function i(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Array.isArray(e)?(e.forEach(function(e){return e&&e.dispose()}),[]):0!==t.length?(i(e),i(t),[]):e?(e.dispose(),e):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.empty=Object.freeze({dispose:function(){}}),t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=i,t.combinedDisposable=function(e){return{dispose:function(){return i(e)}}},t.toDisposable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{dispose:function(){for(var t=0,n=e;t<n.length;t++)(0,n[t])()}}};var r=function(){function e(){this._toDispose=[]}return e.prototype.dispose=function(){this._toDispose=i(this._toDispose)},e.prototype._register=function(e){
return this._toDispose.push(e),e},e}();t.Disposable=r;var o=function(){function e(){this.references=Object.create(null)}return e.prototype.acquire=function(e){var t=this,i=this.references[e];i||(i=this.references[e]={counter:0,object:this.createReferencedObject(e)});var r=i.object,o=n.once(function(){0==--i.counter&&(t.destroyReferencedObject(i.object),delete t.references[e])});return i.counter++,{object:r,dispose:o}},e}();t.ReferenceCollection=o;var s=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=s}),define(e[363],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){this.element=e}}(),i=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.clear=function(){this._first=void 0,this._last=void 0},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){
var i=this,r=new n(e);if(this._first)if(t){var o=this._last;this._last=r,r.prev=o,o.next=r}else{var s=this._first;this._first=r,r.next=s,s.prev=r}else this._first=r,this._last=r;return function(){for(var e=i._first;e instanceof n;e=e.next)if(e===r){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(i._first=i._first.next,i._first.prev=void 0):(i._last=i._last.prev,i._last.next=void 0):(i._first=void 0,i._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e.prototype.toArray=function(){for(var e=[],t=this._first;t instanceof n;t=t.next)e.push(t.element);return e},e}();t.LinkedList=i});/**
 * marked - a markdown parser
 * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
 * https://github.com/markedjs/marked
 */
var i;(function(e){"use strict";function t(e){this.tokens=[],this.tokens.links={},this.options=e||g.defaults,this.rules=v.normal,this.options.pedantic?this.rules=v.pedantic:this.options.gfm&&(this.options.tables?this.rules=v.tables:this.rules=v.gfm)}function n(e,t){if(this.options=t||g.defaults,this.links=e,this.rules=m.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=m.pedantic:this.options.gfm&&(this.options.breaks?this.rules=m.breaks:this.rules=m.gfm)}function r(e){this.options=e||g.defaults}function o(){}function s(e){this.tokens=[],this.token=null,this.options=e||g.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function a(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function c(e){
return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=n.source||n,n=n.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function u(e,t){return y[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?y[" "+e]=e+"/":y[" "+e]=f(e,"/",!0)),e=y[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}function d(){}function h(e){for(var t,n,i=1;i<arguments.length;i++){t=arguments[i];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function p(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var i=!1,r=t;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"}).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("")
;for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function f(e,t,n){if(0===e.length)return"";for(var i=0;i<e.length;){var r=e.charAt(e.length-i-1);if(r!==t||n){if(r===t||!n)break;i++}else i++}return e.substr(0,e.length-i)}function g(e,n,i){if(void 0===e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(i||"function"==typeof n){i||(i=n,n=null);var r,o,c=(n=h({},g.defaults,n||{})).highlight,l=0;try{r=t.lex(e,n)}catch(e){return i(e)}o=r.length;var u=function(e){if(e)return n.highlight=c,i(e);var t;try{t=s.parse(r,n)}catch(t){e=t}return n.highlight=c,e?i(e):i(null,t)};if(!c||c.length<3)return u();if(delete n.highlight,!o)return u();for(;l<r.length;l++)!function(e){"code"!==e.type?--o||u():c(e.text,e.lang,function(t,n){return t?u(t):null==n||n===e.text?--o||u():(e.text=n,e.escaped=!0,void(--o||u()))})}(r[l])}else try{
return n&&(n=h({},g.defaults,n)),s.parse(t.lex(e,n),n)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(n||g.defaults).silent)return"<p>An error occurred:</p><pre>"+a(e.message+"",!0)+"</pre>";throw e}}var v={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\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{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};v._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,v._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,v.def=l(v.def).replace("label",v._label).replace("title",v._title).getRegex(),v.bullet=/(?:[*+-]|\d+\.)/,v.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,v.item=l(v.item,"gm").replace(/bull/g,v.bullet).getRegex(),v.list=l(v.list).replace(/bull/g,v.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+v.def.source+")").getRegex(),
v._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",v._comment=/<!--(?!-?>)[\s\S]*?-->/,v.html=l(v.html,"i").replace("comment",v._comment).replace("tag",v._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v.paragraph=l(v.paragraph).replace("hr",v.hr).replace("heading",v.heading).replace("lheading",v.lheading).replace("tag",v._tag).getRegex(),v.blockquote=l(v.blockquote).replace("paragraph",v.paragraph).getRegex(),v.normal=h({},v),v.gfm=h({},v.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),
v.gfm.paragraph=l(v.paragraph).replace("(?!","(?!"+v.gfm.fences.source.replace("\\1","\\2")+"|"+v.list.source.replace("\\1","\\3")+"|").getRegex(),v.tables=h({},v.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),v.pedantic=h({},v.normal,{html:l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",v._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+|$)/}),t.rules=v,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},
t.prototype.token=function(e,t){e=e.replace(/^ +$/gm,"");for(var n,i,r,o,s,a,c,l,u,d,h,g,m;e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:f(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(t&&(r=this.rules.nptable.exec(e))&&(a={type:"table",header:p(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(r[0].length),
l=0;l<a.align.length;l++)/^ *-+: *$/.test(a.align[l])?a.align[l]="right":/^ *:-+: *$/.test(a.align[l])?a.align[l]="center":/^ *:-+ *$/.test(a.align[l])?a.align[l]="left":a.align[l]=null;for(l=0;l<a.cells.length;l++)a.cells[l]=p(a.cells[l],a.header.length);this.tokens.push(a)}else if(r=this.rules.hr.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"hr"});else if(r=this.rules.blockquote.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"blockquote_start"}),r=r[0].replace(/^ *> ?/gm,""),this.token(r,t),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),h=(o=r[2]).length>1,this.tokens.push({type:"list_start",ordered:h,start:h?+o:""}),n=!1,d=(r=r[0].match(this.rules.item)).length,l=0;l<d;l++)c=(a=r[l]).length,~(a=a.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(c-=a.length,a=this.options.pedantic?a.replace(/^ {1,4}/gm,""):a.replace(new RegExp("^ {1,"+c+"}","gm"),"")),
this.options.smartLists&&l!==d-1&&(o===(s=v.bullet.exec(r[l+1])[0])||o.length>1&&s.length>1||(e=r.slice(l+1).join("\n")+e,l=d-1)),i=n||/\n\n(?!\s*$)/.test(a),l!==d-1&&(n="\n"===a.charAt(a.length-1),i||(i=n)),m=void 0,(g=/^\[[ xX]\] /.test(a))&&(m=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:i?"loose_item_start":"list_item_start",task:g,checked:m}),this.token(a,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(t&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),r[3]&&(r[3]=r[3].substring(1,r[3].length-1)),u=r[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[u]||(this.tokens.links[u]={href:r[2],title:r[3]});else if(t&&(r=this.rules.table.exec(e))&&(a={type:"table",header:p(r[1].replace(/^ *| *\| *$/g,"")),
align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(r[0].length),l=0;l<a.align.length;l++)/^ *-+: *$/.test(a.align[l])?a.align[l]="right":/^ *:-+: *$/.test(a.align[l])?a.align[l]="center":/^ *:-+ *$/.test(a.align[l])?a.align[l]="left":a.align[l]=null;for(l=0;l<a.cells.length;l++)a.cells[l]=p(a.cells[l].replace(/^ *\| *| *\| *$/g,""),a.header.length);this.tokens.push(a)}else if(r=this.rules.lheading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:"="===r[2]?1:2,text:r[1]});else if(t&&(r=this.rules.paragraph.exec(e)))e=e.substring(r[0].length),this.tokens.push({type:"paragraph",text:"\n"===r[1].charAt(r[1].length-1)?r[1].slice(0,-1):r[1]});else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"text",text:r[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var m={
escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,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)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:d,text:/^[\s\S]+?(?=[\\<!\[`*]|\b_| {2,}\n|$)/};m._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,m._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,
m._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])?)+(?![-_])/,m.autolink=l(m.autolink).replace("scheme",m._scheme).replace("email",m._email).getRegex(),m._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,m.tag=l(m.tag).replace("comment",v._comment).replace("attribute",m._attribute).getRegex(),m._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,m._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,m._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,m.link=l(m.link).replace("label",m._label).replace("href",m._href).replace("title",m._title).getRegex(),m.reflink=l(m.reflink).replace("label",m._label).getRegex(),m.normal=h({},m),m.pedantic=h({},m.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,
link:l(/^!?\[(label)\]\((.*?)\)/).replace("label",m._label).getRegex(),reflink:l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",m._label).getRegex()}),m.gfm=h({},m.normal,{escape:l(m.escape).replace("])","~|])").getRegex(),url:l(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",m._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(m.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),m.breaks=h({},m.gfm,{br:l(m.br).replace("{2,}","*").getRegex(),text:l(m.gfm.text).replace("{2,}","*").getRegex()}),n.rules=m,n.output=function(e,t,i){return new n(t,i).output(e)},n.prototype.output=function(e){for(var t,i,r,o,s,c="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),c+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),r="@"===s[2]?"mailto:"+(i=a(this.mangle(s[1]))):i=a(s[1]),
c+=this.renderer.link(r,null,i);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),c+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):a(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,r=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],o=t[3]):o="":o=s[3]?s[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),c+=this.outputLink(s,{href:n.escapes(r),title:n.escapes(o)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){c+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,c+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),
c+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),c+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),c+=this.renderer.codespan(a(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),c+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),c+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),c+=this.renderer.text(a(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?r="mailto:"+(i=a(s[0])):(i=a(s[0]),r="www."===s[1]?"http://"+i:i),c+=this.renderer.link(r,null,i);return c},n.escapes=function(e){return e?e.replace(n.rules._escapes,"$1"):e},n.prototype.outputLink=function(e,t){var n=t.href,i=t.title?a(t.title):null
;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,a(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;r<i;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'<pre><code class="'+this.options.langPrefix+a(t,!0)+'">'+(n?e:a(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:a(e,!0))+"</code></pre>"},r.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){
return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},r.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+i+">\n"},r.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},r.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},r.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},r.prototype.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},r.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},r.prototype.strong=function(e){return"<strong>"+e+"</strong>"},r.prototype.em=function(e){
return"<em>"+e+"</em>"},r.prototype.codespan=function(e){return"<code>"+e+"</code>"},r.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.prototype.del=function(e){return"<del>"+e+"</del>"},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(c(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return n}this.options.baseUrl&&!b.test(e)&&(e=u(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var r='<a href="'+a(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},r.prototype.image=function(e,t,n){this.options.baseUrl&&!b.test(e)&&(e=u(this.options.baseUrl,e));var i='<img src="'+e+'" alt="'+n+'"';return t&&(i+=' title="'+t+'"'),i+=this.options.xhtml?"/>":">"},r.prototype.text=function(e){return e},o.prototype.strong=o.prototype.em=o.prototype.codespan=o.prototype.del=o.prototype.text=function(e){return e},
o.prototype.link=o.prototype.image=function(e,t,n){return""+n},o.prototype.br=function(){return""},s.parse=function(e,t){return new s(t).parse(e)},s.prototype.parse=function(e){this.inline=new n(e.links,this.options),this.inlineText=new n(e.links,h({},this.options,{renderer:new o})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r="",o="";for(n="",
e=0;e<this.token.header.length;e++)n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(r+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",i=0;i<t.length;i++)n+=this.renderer.tablecell(this.inline.output(t[i]),{header:!1,align:this.token.align[i]});o+=this.renderer.tablerow(n)}return this.renderer.table(r,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var s=this.token.ordered,a=this.token.start;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,s,a);case"list_item_start":for(o="",this.token.task&&(o+=this.renderer.checkbox(this.token.checked));"list_item_end"!==this.next().type;)o+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(o);case"loose_item_start":for(o="";"list_item_end"!==this.next().type;)o+=this.tok();return this.renderer.listitem(o)
;case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}};var y={},b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;d.exec=d,g.options=g.setOptions=function(e){return h(g.defaults,e),g},g.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},g.defaults=g.getDefaults(),g.Parser=s,g.parser=s.parse,g.Renderer=r,g.TextRenderer=o,g.Lexer=t,g.lexer=t.lex,g.InlineLexer=n,g.inlineLexer=n.output,g.parse=g,i=g}).call(this),define("vs/base/common/marked/marked",[],function(){return{marked:i}}),define(e[43],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",
e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data"}(t.Schemas||(t.Schemas={}))}),define(e[298],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clamp=function(e,t,n){return Math.min(Math.max(e,t),n)},t.rot=function(e,t){return(t+e%t)%t}}),"function"!=typeof define&&"object"==typeof module&&"object"==typeof module.exports&&(global.define=function(e,t){module.exports=t(),global.define=void 0}),define("vs/base/common/performance",[],function(){function e(e){const t=global._performanceEntries;for(let n=t.length-1;n>=0;n-=4)if(t[n-2]===e)return t[n-1];throw new Error(e+" not found")}var t=this;"undefined"!=typeof global&&(t=global),t._performanceEntries=t._performanceEntries||[];const n=Date.now;return{mark:function(e){global._performanceEntries.push("mark",e,n(),0),"function"==typeof console.timeStamp&&console.timeStamp(e)},measure:function(t,i,r){let o,s,a=n();o=i?e(i):a,s=r?e(r)-o:a-o,
global._performanceEntries.push("measure",t,o,s)},getEntries:function(e,t){const n=[],i=global._performanceEntries;for(let r=0;r<i.length;r+=4)i[r]!==e||void 0!==t&&i[r+1]!==t||n.push({type:i[r],name:i[r+1],startTime:i[r+2],duration:i[r+3]});return n.sort((e,t)=>e.startTime-t.startTime)},getEntry:function(e,t){const n=global._performanceEntries;for(let i=0;i<n.length;i+=4)if(n[i]===e&&n[i+1]===t)return{type:n[i],name:n[i+1],startTime:n[i+2],duration:n[i+3]}},getDuration:function(e,t){const n=global._performanceEntries;let i=e,r=0;for(let o=0;o<n.length;o+=4)if(n[o+1]===i){if(i!==e)return n[o+2]-r;i=t,r=n[o+2]}return 0},importEntries:function(e){global._performanceEntries.splice(0,0,...e)},exportEntries:function(){return global._performanceEntries.slice(0)}}}),define(e[11],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,i=!1,r=!1,o=!1,s=!1,a=void 0,c=void 0,l=void 0;if(t.LANGUAGE_DEFAULT="en",
"object"==typeof process&&"function"==typeof process.nextTick&&"string"==typeof process.platform){n="win32"===process.platform,i="darwin"===process.platform,r="linux"===process.platform,a=t.LANGUAGE_DEFAULT,c=t.LANGUAGE_DEFAULT;var u=process.env.VSCODE_NLS_CONFIG;if(u)try{var d=JSON.parse(u),h=d.availableLanguages["*"];a=d.locale,c=h||t.LANGUAGE_DEFAULT,l=d._translationsConfigFile}catch(e){}o=!0}else if("object"==typeof navigator){var p=navigator.userAgent;n=p.indexOf("Windows")>=0,i=p.indexOf("Macintosh")>=0,r=p.indexOf("Linux")>=0,s=!0,c=a=navigator.language}var f;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(f=t.Platform||(t.Platform={}));var g=f.Web;o&&(i?g=f.Mac:n?g=f.Windows:r&&(g=f.Linux)),t.isWindows=n,t.isMacintosh=i,t.isLinux=r,t.isNative=o,t.isWeb=s,t.platform=g,t.isRootUser=function(){return o&&!n&&0===process.getuid()},t.language=c,t.locale=a,t.translationsConfigFile=l;var v="object"==typeof self?self:"object"==typeof global?global:{};t.globals=v
;var m=null;t.setImmediate=function(e){return null===m&&(m=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),m(e)};!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=i?2:n?1:3;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={}))}),define(e[416],t([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.globals;i.Monaco||(i.Monaco={}),i.Monaco.Diagnostics={};i.Monaco.Diagnostics,new Map;t.register=function(e,t){return function(){}}}),define(e[361],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.stdout=0]="stdout",e[e.stderr=1]="stderr"}(t.Source||(t.Source={}));!function(e){e[e.Success=0]="Success",
e[e.Unknown=1]="Unknown",e[e.AccessDenied=2]="AccessDenied",e[e.ProcessNotFound=3]="ProcessNotFound"}(t.TerminateResponseCode||(t.TerminateResponseCode={}))}),define(e[1083],t([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.globals.performance&&"function"==typeof n.globals.performance.now,r=function(){function e(e){this._highResolution=i&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.stop=function(){this._stopTime=this._now()},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?n.globals.performance.now():(new Date).getTime()},e}();t.StopWatch=r}),define(e[14],t([1,0]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function i(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e
;for(var i=0;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function r(e,t){if(!e||!t)return e;var n=t.length,i=e.length;if(0===n||0===i)return e;for(var r=i,o=-1;;){if(-1===(o=e.lastIndexOf(t,r-1))||o+n!==r)break;if(0===o)return"";r=o}return e.substring(0,r)}function o(e,t){return e<t?-1:e>t?1:0}function s(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function c(e){return s(e)||a(e)}function l(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;i<n;i++){var r=e.charCodeAt(i),o=t.charCodeAt(i);if(r!==o)if(c(r)&&c(o)){var s=Math.abs(r-o);if(0!==s&&32!==s)return!1}else if(String.fromCharCode(r).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function u(e,t,n,i,r,o){for(;t<n&&r<o;){if(e[t]!==i[r])return!1;t+=1,r+=1}return!0}function d(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function h(e){return e&&e.length>0&&65279===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",
t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var i=""+e,r=[i],o=i.length;o<t;o++)r.push(n);return r.reverse().join("")};var p=/{(\d+)}/g;t.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(p,function(e,n){var i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),r(i(e,t),t)},t.ltrim=i,t.rtrim=r,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=function(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0},
t.endsWith=function(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,i){if(void 0===i&&(i={}),!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var r="";return i.global&&(r+="g"),i.matchCase||(r+="i"),i.multiline&&(r+="m"),new RegExp(e,r)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex},t.regExpContainsBackreference=function(e){return!!e.match(/([^\\]|^)(\\\\)*\\\d+/)},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1},t.getLeadingWhitespace=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var i=t;i<n;i++){var r=e.charCodeAt(i);if(32!==r&&9!==r)return e.substring(t,i)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t){void 0===t&&(t=e.length-1)
;for(var n=t;n>=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1},t.compare=o,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++){var r=e.charCodeAt(i),c=t.charCodeAt(i);if(r!==c){a(r)&&(r+=32),a(c)&&(c+=32);var l=r-c;if(0!==l)return s(r)&&s(c)?l:o(e.toLowerCase(),t.toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=s,t.isUpperAsciiLetter=a,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&l(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&l(e,t,n)},t.commonPrefixLength=function(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i},t.commonSuffixLength=function(e,t){var n,i=Math.min(e.length,t.length),r=e.length-1,o=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(r-n)!==t.charCodeAt(o-n))return n;return i},t.overlap=function(e,t){var n=e.length,i=t.length,r=n-i;if(0===r)return e===t?n:0;for(r<0&&(i+=r,
r=0);r<n&&i>0;){if(u(e,r,n,t,0,i))return i;i-=1,r+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343};var f=/(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return f.test(e)};var g=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return g.test(e)};var v=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return v.test(e)},
t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t<n;t++)if(d(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=d,t.lcut=function(e,n){if(e.length<n)return e;for(var i=/\b/g,r=0;i.test(e)&&!(e.length-i.lastIndex<n);)r=i.lastIndex,i.lastIndex+=1;return e.substring(r).replace(/^\s/,t.empty)};var m=/\x1B\x5B[12]?K/g,y=/\x1b\[\d+m/g,b=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(m,"")).replace(y,"")).replace(b,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=h,t.stripUTF8BOM=function(e){return h(e)?e.substr(1):e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",i=0;i<t;i++)n+=e;return n},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length<t.length)return!1;for(var n=t.length,i=e.toLowerCase(),r=0,o=-1;r<n;){var s=i.indexOf(t[r],o+1);if(s<0)return!1;o=s,r++}return!0},t.containsUppercaseCharacter=function(e,t){return void 0===t&&(t=!1),!!e&&(t&&(e=e.replace(/\\./g,"")),
e.toLowerCase()!==e)}}),define(e[397],t([1,0,14]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLocalISOString=function(e){return e.getFullYear()+"-"+n.pad(e.getMonth()+1,2)+"-"+n.pad(e.getDate(),2)+"T"+n.pad(e.getHours(),2)+":"+n.pad(e.getMinutes(),2)+":"+n.pad(e.getSeconds(),2)+"."+(e.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}),define(e[25],t([1,0,11,14]),function(e,t,n,i){"use strict";function r(e){var i=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===i)return".";if(0==~i)return e[0];if(~i==e.length-1)return r(e.substring(0,e.length-1));var o=e.substring(0,~i);return n.isWindows&&":"===o[o.length-1]&&(o+=t.nativeSep),o}function o(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?o(e.substring(0,e.length-1)):e.substr(1+~t)}function s(e,t){if(null===e||void 0===e)return e;var i=e.length;if(0===i)return".";var r=n.isWindows&&t;if(function(e,t){return t?!h.test(e):!d.test(e)}(e,r))return e
;for(var o=r?"\\":"/",s=c(e,o),l=s.length,u=!1,p="",f=s.length;f<=i;f++)if(f===i||47===e.charCodeAt(f)||92===e.charCodeAt(f)){if(a(e,l,f,"..")){var g=p.lastIndexOf(o),v=p.slice(g+1);(s||v.length>0)&&".."!==v&&(p=-1===g?"":p.slice(0,g),u=!0)}else a(e,l,f,".")&&(s||p||f<i-1)&&(u=!0);if(!u){var m=e.slice(l,f);""!==p&&p[p.length-1]!==o&&(p+=o),p+=m}l=f+1,u=!1}return s+p}function a(e,t,n,i){return t+i.length===n&&e.indexOf(i,t)===t}function c(e,t){if(void 0===t&&(t="/"),!e)return"";var n=e.length,i=e.charCodeAt(0);if(47===i||92===i){if((47===(i=e.charCodeAt(1))||92===i)&&47!==(i=e.charCodeAt(2))&&92!==i){for(var r=3,o=r;r<n&&(47!==(i=e.charCodeAt(r))&&92!==i);r++);if(i=e.charCodeAt(r+1),o!==r&&47!==i&&92!==i)for(r+=1;r<n;r++)if(47===(i=e.charCodeAt(r))||92===i)return e.slice(0,r+1).replace(/[\\/]/g,t)}return t}if((i>=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return 47===(i=e.charCodeAt(2))||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://")
;if(-1!==s)for(s+=3;s<n;s++)if(47===(i=e.charCodeAt(s))||92===i)return e.slice(0,s+1);return""}function l(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}function u(e){return e&&47===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.dirname=r,t.basename=o,t.extname=function(e){var t=~(e=o(e)).lastIndexOf(".");return t?e.substring(~t):""};var d=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,h=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;t.normalize=s,t.getRoot=c,t.join=function(){for(var e="",n=0;n<arguments.length;n++){var i=arguments[n];if(n>0){var r=e.charCodeAt(e.length-1);if(47!==r&&92!==r){var o=i.charCodeAt(0);47!==o&&92!==o&&(e+=t.sep)}}e+=i}return s(e)},t.isUNC=function(e){if(!n.isWindows)return!1;if(!e||e.length<5)return!1;var t=e.charCodeAt(0);if(92!==t)return!1
;if(92!==(t=e.charCodeAt(1)))return!1;for(var i=2,r=i;i<e.length&&92!==(t=e.charCodeAt(i));i++);return r!==i&&(t=e.charCodeAt(i+1),!isNaN(t)&&92!==t)};var p=n.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,f=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(p.lastIndex=0,p.test(e)||n.isWindows&&f.test(e)||"."===e||".."===e||n.isWindows&&"."===e[e.length-1]||n.isWindows&&e.length!==e.trim().length))},t.isEqual=function(e,t,n){var r=e===t;return!n||r?r:!(!e||!t)&&i.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,n,r){if(e===n)return!0;if(!e||!n)return!1;if(n.length>e.length)return!1;if(r){if(!i.startsWithIgnoreCase(e,n))return!1;if(n.length===e.length)return!0;var o=n.length;return n.charAt(n.length-1)===t.nativeSep&&o--,e.charAt(o)===t.nativeSep}return n.charAt(n.length-1)!==t.nativeSep&&(n+=t.nativeSep),0===e.indexOf(n)},t.isAbsolute=function(e){return n.isWindows?l(e):u(e)},t.isAbsolute_win32=l,t.isAbsolute_posix=u}),
define(e[252],t([1,0,14,25]),function(e,t,n,i){"use strict";function r(e,t,n){if(void 0===n&&(n=!1),u){var i=e||"",r=t||"",s=u.compare(i,r);return d&&0===s&&i!==r?i<r?-1:1:s}return o(e,t,n)}function o(e,t,n){void 0===n&&(n=!1),n||(e=e&&e.toLowerCase(),t=t&&t.toLowerCase());var i=a(e),r=i[0],o=i[1],s=a(t),c=s[0],l=s[1];return r!==c?r<c?-1:1:o===l?0:o<l?-1:1}function s(e,t){if(u){var n=a(e),i=n[0],r=n[1],o=a(t),s=o[0],c=o[1],l=u.compare(r,c);if(0===l){if(d&&r!==c)return r<c?-1:1;if(l=u.compare(i,s),d&&0===l&&i!==s)return i<s?-1:1}return l}return function(e,t){var n=a(e&&e.toLowerCase()),i=n[0],r=n[1],o=a(t&&t.toLowerCase()),s=o[0],c=o[1];if(r!==c)return r<c?-1:1;if(i===s)return 0;return i<s?-1:1}(e,t)}function a(e){var t=e?h.exec(e):[];return[t&&t[1]||"",t&&t[3]||""]}function c(e,t,n){return void 0===n&&(n=!1),n||(e=e&&e.toLowerCase(),t=t&&t.toLowerCase()),e===t?0:e<t?-1:1}function l(e,t,i){var r=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(r,i),a=n.startsWith(o,i);if(s!==a)return s?-1:1;if(s&&a){
if(r.length<o.length)return-1;if(r.length>o.length)return 1}return 0}Object.defineProperty(t,"__esModule",{value:!0});var u,d;t.setFileNameComparer=function(e){u=e,d=e.resolvedOptions().numeric},t.compareFileNames=r;var h=/^(.*?)(\.([^.]*))?$/;t.noIntlCompareFileNames=o,t.compareFileExtensions=s,t.comparePaths=function(e,t,n){void 0===n&&(n=!1);for(var o,s,a=e.split(i.nativeSep),l=t.split(i.nativeSep),u=a.length-1,d=l.length-1,h=0;;h++){if(o=u===h,s=d===h,o&&s)return r(a[h],l[h],n);if(o)return-1;if(s)return 1;var p=c(a[h],l[h],n);if(0!==p)return p}},t.compareAnything=function(e,t,i){var o=e.toLowerCase(),s=t.toLowerCase(),a=l(e,t,i);if(a)return a;var c=n.endsWith(o,i);if(c!==n.endsWith(s,i))return c?-1:1;var u=r(o,s);return 0!==u?u:o.localeCompare(s)},t.compareByPrefix=l}),define(e[70],t([1,0,25,14]),function(e,t,n,i){"use strict";function r(e,t,i){return e.scheme===t.scheme&&e.authority===t.authority&&("file"===e.scheme?n.isEqualOrParent(e.fsPath,t.fsPath,i):n.isEqualOrParent(e.path,t.path,i))}
Object.defineProperty(t,"__esModule",{value:!0}),t.basenameOrAuthority=function(e){return n.basename(e.path)||e.authority},t.isEqualOrParent=r,t.isEqual=function(e,t,n){return!(e!==t)||!(!e||!t)&&(n?i.equalsIgnoreCase(e.toString(),t.toString()):e.toString()===t.toString())},t.dirname=function(e){var t=n.dirname(e.path);return e.authority&&t&&!n.isAbsolute(t)?null:e.with({path:t})},t.joinPath=function(e,t){var i=n.join(e.path||"/",t);return e.with({path:i})},t.distinctParents=function(e,t){for(var n=[],i=function(i){var o=t(e[i]);if(e.some(function(e,n){return n!==i&&r(o,t(e))}))return"continue";n.push(e[i])},o=0;o<e.length;o++)i(o);return n}}),define(e[30],t([1,0]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==l.number||e.constructor!==Array)}function i(e){return typeof e===l.string||e instanceof String}function r(e){return!(typeof e!==l.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){
return typeof e===l.undefined}function s(e){return o(e)||null===e}function a(e){return typeof e===l.function}function c(e,t){if(i(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(a(t)){if(e instanceof t)return;if(!s(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var l={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=i,t.isStringArray=function(e){return n(e)&&e.every(function(e){return i(e)})},t.isObject=r,t.isNumber=function(e){return(typeof e===l.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=s;var u=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!r(e))return!1
;for(var t in e)if(u.call(e,t))return!1;return!0},t.isFunction=a,t.areFunctions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&e.length>0&&e.every(a)},t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++)c(e[i],t[i])},t.validateConstraint=c,t.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Object.create(e.prototype);return e.apply(i,t),i}}),define(e[955],t([1,0,30,113]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return i.forEach(this._nodes,function(t){n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e},e.prototype.traverse=function(e,t,n){var i=this.lookup(e);i&&this._traverse(i,t,Object.create(null),n)},e.prototype._traverse=function(e,t,n,r){var o=this,s=this._hashFn(e.data);if(!n[s]){n[s]=!0,r(e.data);var a=t?e.outgoing:e.incoming
;i.forEach(a,function(e){return o._traverse(e.value,t,n,r)})}},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,i.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],i.forEach(this._nodes,function(e){delete e.value.outgoing[t],delete e.value.incoming[t]})},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t];return n||(n=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=n),n},e.prototype.lookup=function(e){return this._nodes[this._hashFn(e)]},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){var e=[];return i.forEach(this._nodes,function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")}),
e.join("\n")},e}();t.Graph=r}),define(e[24],t([1,0,30]),function(e,t,n){"use strict";function i(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=i(e[n]):t[n]=e[n]}),t}function r(e,t,i){if(n.isUndefinedOrNull(e))return e;var o=t(e);if(void 0!==o)return o;if(n.isArray(e)){for(var s=[],a=0;a<e.length;a++)s.push(r(e[a],t,i));return s}if(n.isObject(e)){if(i.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");i.push(e);var l={};for(var u in e)c.call(e,u)&&(l[u]=r(e[u],t,i));return i.pop(),l}return e}function o(e,t,i){return void 0===i&&(i=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(r){r in e?i&&(n.isObject(e[r])&&n.isObject(t[r])?o(e[r],t[r],i):e[r]=t[r]):e[r]=t[r]}),e):t}function s(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1
;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!s(e[n],t[n]))return!1}else{var r=[];for(i in e)r.push(i);r.sort();var o=[];for(i in t)o.push(i);if(o.sort(),!s(r,o))return!1;for(n=0;n<r.length;n++)if(!s(e[r[n]],t[r[n]]))return!1}return!0}function a(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=i,t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var n=t.shift();Object.freeze(n);for(var i in n)if(c.call(n,i)){var r=n[i];"object"!=typeof r||Object.isFrozen(r)||t.push(r)}}return e};var c=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return r(e,t,[])},t.mixin=o,t.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e},t.equals=s,t.arrayToHash=a,t.createKeywordMatcher=function(e,t){
void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=a(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}},t.safeStringify=function(e){var t=[];return JSON.stringify(e,function(e,i){if(n.isObject(i)||Array.isArray(i)){if(-1!==t.indexOf(i))return"[Circular]";t.push(i)}return i})},t.getOrDefault=function(e,t,n){void 0===n&&(n=null);var i=t(e);return void 0===i?n:i},t.distinct=function(e,t){var n=Object.create(null);return e&&t?(Object.keys(t).forEach(function(i){var r=e[i],o=t[i];s(r,o)||(n[i]=o)}),n):n}}),define(e[391],t([1,0,30]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.OK=0]="OK",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Fatal=4]="Fatal"}(i=t.ValidationState||(t.ValidationState={}));var r=function(){function e(){this._state=i.OK}return Object.defineProperty(e.prototype,"state",{get:function(){
return this._state},set:function(e){e>this._state&&(this._state=e)},enumerable:!0,configurable:!0}),e.prototype.isOK=function(){return this._state===i.OK},e.prototype.isFatal=function(){return this._state===i.Fatal},e}();t.ValidationStatus=r;var o=function(){function e(e){this._problemReporter=e}return e.prototype.reset=function(){this._problemReporter.status.state=i.OK},Object.defineProperty(e.prototype,"problemReporter",{get:function(){return this._problemReporter},enumerable:!0,configurable:!0}),e.prototype.info=function(e){this._problemReporter.info(e)},e.prototype.warn=function(e){this._problemReporter.warn(e)},e.prototype.error=function(e){this._problemReporter.error(e)},e.prototype.fatal=function(e){this._problemReporter.fatal(e)},e.merge=function(e,t,i){var r=this;Object.keys(t).forEach(function(o){var s=e[o],a=t[o];n.isUndefined(a)||(n.isUndefined(s)?e[o]=a:i&&(n.isObject(s)&&n.isObject(a)?r.merge(s,a,i):e[o]=a))})},e}();t.Parser=o}),define(e[10],t([1,0,11]),function(e,t,i){"use strict"
;function r(e,t){for(var n=void 0,i=-1,r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var s=v[o];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=s):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function o(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,i.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){var n=t?function(e){for(var t=void 0,n=0;n<e.length;n++){var i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=v[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e
}:r,i="",o=e.scheme,s=e.authority,a=e.path,c=e.query,l=e.fragment;if(o&&(i+=o,i+=":"),(s||"file"===o)&&(i+=h,i+=h),s){var u=s.indexOf("@");if(-1!==u){var d=s.substr(0,u);s=s.substr(u+1),-1===(u=d.indexOf(":"))?i+=n(d,!1):(i+=n(d.substr(0,u),!1),i+=":",i+=n(d.substr(u+1),!1)),i+="@"}-1===(u=(s=s.toLowerCase()).indexOf(":"))?i+=n(s,!1):(i+=n(s.substr(0,u),!1),i+=s.substr(u))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){(p=a.charCodeAt(1))>=65&&p<=90&&(a="/"+String.fromCharCode(p+32)+":"+a.substr(3))}else if(a.length>=2&&58===a.charCodeAt(1)){var p=a.charCodeAt(0);p>=65&&p<=90&&(a=String.fromCharCode(p+32)+":"+a.substr(2))}i+=n(a,!0)}return c&&(i+="?",i+=n(c,!1)),l&&(i+="#",i+=t?l:r(l,!1)),i}Object.defineProperty(t,"__esModule",{value:!0});var a,c=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//,d="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,n,i,r){"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,
this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=e||d,this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||d),this.query=i||d,this.fragment=r||d,function(e){if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.test(e.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(u.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return o(this)},enumerable:!0,
configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,r=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===i?i=this.path:null===i&&(i=d),void 0===r?r=this.query:null===r&&(r=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new g(t,n,i,r,o)},e.parse=function(e){var t=p.exec(e);return t?new g(t[2]||d,decodeURIComponent(t[4]||d),decodeURIComponent(t[5]||d),decodeURIComponent(t[7]||d),decodeURIComponent(t[9]||d)):new g(d,d,d,d,d)},e.file=function(e){var t=d;if(i.isWindows&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new g("file",t,e,d,d)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),s(this,e)},
e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t.default=f;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return n(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=o(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(f),v=(a={},a[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",
a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a)}),define(e[62],t([1,0,10,25,14,43,11,70]),function(e,t,n,i,r,o,s,a){"use strict";function c(e){return s.isWindows&&e&&":"===e[1]}function l(e){return c(e)?e.charAt(0).toUpperCase()+e.slice(1):e}function u(e,t){if(s.isWindows||!e||!t)return e;var n=d.original===t?d.normalized:void 0;return n||(n=""+r.rtrim(t,i.sep)+i.sep,d={original:t,normalized:n}),(s.isLinux?r.startsWith(e,n):r.startsWithIgnoreCase(e,n))&&(e="~/"+e.substr(n.length)),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,d){if(!e)return null;"string"==typeof e&&(e=n.default.file(e));var h=d?d.getWorkspaceFolder(e):null;if(h){var p=d.getWorkspace().folders.length>1,f=void 0;if(f=a.isEqual(h.uri,e,!s.isLinux)?"":i.normalize(r.ltrim(e.path.substr(h.uri.path.length),i.sep),!0),p){var g=h&&h.name?h.name:i.basename(h.uri.fsPath);f=f?g+" • "+f:g}return f}
if(e.scheme!==o.Schemas.file&&e.scheme!==o.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(c(e.fsPath))return i.normalize(l(e.fsPath),!0);var v=i.normalize(e.fsPath,!0);return!s.isWindows&&t&&(v=u(v,t.userHome)),v},t.getBaseLabel=function(e){if(!e)return null;"string"==typeof e&&(e=n.default.file(e));var t=i.basename(e.fsPath)||e.fsPath;return c(t)?l(t):t},t.normalizeDriveLetter=l;var d=Object.create(null);t.tildify=u,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,t+"$1")};var h="…",p="\\\\",f="~";t.shorten=function(e){for(var t=new Array(e.length),n=!1,o=0;o<e.length;o++){var s=e[o];if(""!==s)if(s){n=!0;var a="";0===s.indexOf(p)?(a=s.substr(0,s.indexOf(p)+p.length),s=s.substr(s.indexOf(p)+p.length)):0===s.indexOf(i.nativeSep)?(a=s.substr(0,s.indexOf(i.nativeSep)+i.nativeSep.length),s=s.substr(s.indexOf(i.nativeSep)+i.nativeSep.length)):0===s.indexOf(f)&&(a=s.substr(0,s.indexOf(f)+f.length),s=s.substr(s.indexOf(f)+f.length))
;for(var c=s.split(i.nativeSep),l=1;n&&l<=c.length;l++)for(var u=c.length-l;n&&u>=0;u--){n=!1;for(var d=c.slice(u,u+l).join(i.nativeSep),g=0;!n&&g<e.length;g++)if(g!==o&&e[g]&&e[g].indexOf(d)>-1){var v=u+l===c.length,m=u>0&&e[g].indexOf(i.nativeSep)>-1?i.nativeSep+d:d,y=r.endsWith(e[g],m);n=!v||y}if(!n){var b="";(r.endsWith(c[0],":")||""!==a)&&(1===u&&(u=0,l++,d=c[0]+i.nativeSep+d),u>0&&(b=c[0]+i.nativeSep),b=a+b),u>0&&(b=b+h+i.nativeSep),b+=d,u+l<c.length&&(b=b+i.nativeSep+h),t[o]=b}}n&&(t[o]=s)}else t[o]=s;else t[o]="."+i.nativeSep}return t};var g;!function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(g||(g={})),t.template=function(e,t){void 0===t&&(t=Object.create(null));for(var n,i=[],r=!1,o="",s=0;s<e.length;s++)if("$"===(n=e[s])||r&&"{"===n)o&&i.push({value:o,type:g.TEXT}),o="",r=!0;else if("}"===n&&r){var a=t[o];if("string"==typeof a)a.length&&i.push({value:a,type:g.VARIABLE});else if(a){var c=i[i.length-1];c&&c.type===g.SEPARATOR||i.push({value:a.label,
type:g.SEPARATOR})}o="",r=!1}else o+=n;return o&&!r&&i.push({value:o,type:g.TEXT}),i.filter(function(e,t){return e.type!==g.SEPARATOR||[i[t-1],i[t+1]].every(function(e){return e&&(e.type===g.VARIABLE||e.type===g.TEXT)&&e.value.length>0})}).map(function(e){return e.value}).join("")},t.mnemonicMenuLabel=function(e,t){return s.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,""):e.replace(/&&/g,"&")},t.mnemonicButtonLabel=function(e){return s.isMacintosh?e.replace(/\(&&\w\)|&&/g,""):e.replace(/&&/g,s.isWindows?"&":"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")}}),define(e[50],t([1,0,10]),function(e,t,i){"use strict";function r(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}function o(e){var t=[];return e.forEach(function(e,n){return t.push(n)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=r,t.keys=o,t.getOrSet=function(e,t,n){var i=e.get(t);return void 0===i&&(i=n,e.set(t,i)),i};var s=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){
return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos<this._value.length-1},e.prototype.cmp=function(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)},e.prototype.value=function(){return this._value[this._pos]},e}();t.StringIterator=s;var a=function(){function e(){}return e.prototype.reset=function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},e.prototype.hasNext=function(){return this._to<this._value.length},e.prototype.next=function(){this._from=this._to;for(var e=!0;this._to<this._value.length;this._to++){var t=this._value.charCodeAt(this._to);if(47===t||92===t){if(!e)break;this._from++}else e=!1}return this},e.prototype.cmp=function(e){for(var t=0,n=e.length,i=this._from;t<n&&i<this._to;){var r=e.charCodeAt(t)-this._value.charCodeAt(i);if(0!==r)return r;t+=1,i+=1}return n===this._to-this._from?0:t<n?-1:1},e.prototype.value=function(){
return this._value.substring(this._from,this._to)},e}();t.PathIterator=a;var c=function(){function e(){}return e.prototype.isEmpty=function(){return!(this.left||this.mid||this.right||this.value)},e}(),l=function(){function e(e){this._iter=e}return e.forPaths=function(){return new e(new a)},e.forStrings=function(){return new e(new s)},e.prototype.clear=function(){this._root=void 0},e.prototype.set=function(e,t){var n,i=this._iter.reset(e);for(this._root||(this._root=new c,this._root.segment=i.value()),n=this._root;;){var r=i.cmp(n.segment);if(r>0)n.left||(n.left=new c,n.left.segment=i.value()),n=n.left;else if(r<0)n.right||(n.right=new c,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new c,n.mid.segment=i.value()),n=n.mid}}var o=n.value;return n.value=t,n.key=e,o},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},
e.prototype.delete=function(e){for(var t=this._iter.reset(e),n=[],i=this._root;i;){var r=t.cmp(i.segment);if(r>0)n.push([1,i]),i=i.left;else if(r<0)n.push([-1,i]),i=i.right;else{if(!t.hasNext()){for(i.value=void 0;n.length>0&&i.isEmpty();){var o=n.pop(),s=o[0],a=o[1];switch(s){case 1:a.left=void 0;break;case 0:a.mid=void 0;break;case-1:a.right=void 0}i=a}break}t.next(),n.push([0,i]),i=i.mid}}},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),i=this._root;i;){var r=n.cmp(i.segment);if(r>0)i=i.left;else if(r<0)i=i.right;else{if(!n.hasNext())break;n.next(),t=i.value||t,i=i.mid}}return i&&i.value||t},e.prototype.findSuperstr=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())return n.mid?this._nodeIterator(n.mid):void 0;t.next(),n=n.mid}}},e.prototype._nodeIterator=function(e){var t,n,i=this,r={done:!1,value:void 0};return{next:function(){return n||(n=[],t=0,i._forEach(e,function(e){return n.push(e)})),
t>=n.length?(r.done=!0,r.value=void 0):(r.done=!1,r.value=n[t++]),r}}},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}();t.TernarySearchTree=l;var u=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.has=function(e){return this.map.has(this.toKey(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.delete=function(e){return this.map.delete(this.toKey(e))},e.prototype.forEach=function(e){this.map.forEach(e)},e.prototype.values=function(){return r(this.map)},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e.prototype.keys=function(){
return o(this.map).map(i.default.parse)},e.prototype.clone=function(){var t=new e;return this.map.forEach(function(e,n){return t.map.set(n,e)}),t},e}();t.ResourceMap=u;var d;!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(d=t.Touch||(t.Touch={}));var h=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e,t){void 0===t&&(t=d.None);var n=this._map.get(e);if(n)return t!==d.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=d.None);var i=this._map.get(e);if(i)i.value=t,n!==d.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case d.None:
this.addItemLast(i);break;case d.AsOld:this.addItemFirst(i);break;case d.AsNew:default:this.addItemLast(i)}this._map.set(e,i),this._size++}},e.prototype.delete=function(e){return!!this.remove(e)},e.prototype.remove=function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0
}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===d.AsOld||t===d.AsNew)if(t===d.AsOld){if(e===this._head)return;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===d.AsNew){
if(e===this._tail)return;var n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),e},e.prototype.fromJSON=function(e){this.clear();for(var t=0,n=e;t<n.length;t++){var i=n[t],r=i[0],o=i[1];this.set(r,o)}},e}();t.LinkedMap=h;var p=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i}return n(t,e),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(e){this._limit=e,this.checkTrim()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ratio",{get:function(){return this._ratio},set:function(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return e.prototype.get.call(this,t,d.AsNew)},t.prototype.peek=function(t){
return e.prototype.get.call(this,t,d.None)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,d.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(h);t.LRUCache=p}),define(e[110],t([1,0,14,50]),function(e,t,n,i){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n){for(var i=0,r=e.length;i<r;i++){var o=e[i](t,n);if(o)return o}return null}}function o(e,t,i){if(!i||i.length<t.length)return null;return(e?n.startsWithIgnoreCase(i,t):0===i.indexOf(t))?t.length>0?[{start:0,end:t.length}]:[]:null}function s(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function a(e,t){return c(e.toLowerCase(),t.toLowerCase(),0,0)}function c(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){var r=null;return(r=c(e,t,n+1,i+1))?f({start:i,end:i+1},r):null}return c(e,t,n,i+1)}function l(e){return 97<=e&&e<=122}
function u(e){return 65<=e&&e<=90}function d(e){return 48<=e&&e<=57}function h(e){return 32===e||9===e||10===e||13===e}function p(e){return l(e)||u(e)||d(e)}function f(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(var n=t;n<e.length;n++){var i=e.charCodeAt(n);if(u(i)||d(i)||n>0&&!p(e.charCodeAt(n-1)))return n}return e.length}function v(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var r=null,o=i+1;for(r=v(e,t,n+1,i+1);!r&&(o=g(t,o))<t.length;)r=v(e,t,n+1,o),o++;return null===r?null:f({start:i,end:i+1},r)}function m(e,t){if(!t)return null;if(0===(t=t.trim()).length)return null;if(!function(e){for(var t=0,n=0,i=0,r=0,o=0;o<e.length;o++)u(i=e.charCodeAt(o))&&t++,l(i)&&n++,h(i)&&r++;return 0!==t&&0!==n||0!==r?t<=5:e.length<=30}(e))return null;if(t.length>60)return null;var n=function(e){for(var t=0,n=0,i=0,r=0,o=0,s=0;s<e.length;s++)u(o=e.charCodeAt(s))&&t++,l(o)&&n++,p(o)&&i++,d(o)&&r++;return{
upperPercent:t/e.length,lowerPercent:n/e.length,alphaPercent:i/e.length,numericPercent:r/e.length}}(t);if(!function(e){var t=e.upperPercent,n=e.lowerPercent,i=e.alphaPercent,r=e.numericPercent;return n>.2&&t<.8&&i>.6&&r<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var i=null,r=0;for(e=e.toLowerCase();r<t.length&&null===(i=v(e,t,0,r));)r=g(t,r+1);return i}function y(e,t,n,i,r){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i])return null;var o=null,s=i+1;if(o=y(e,t,n+1,i+1,r),!r)for(;!o&&(s=b(t,s))<t.length;)o=y(e,t,n+1,s,r),s++;return null===o?null:f({start:i,end:i+1},o)}function b(e,t){for(var n=t;n<e.length;n++){if(h(e.charCodeAt(n))||n>0&&h(e.charCodeAt(n-1)))return n}return e.length}function S(){for(var e=[],t=[0],n=1;n<=100;n++)t.push(-n);for(n=0;n<=100;n++){var i=t.slice(0);i[0]=-n,e.push(i)}return e}function _(e,t,n,i,r){function o(e,t,n){for(void 0===n&&(n=" ");e.length<t;)e=n+e;return e}
for(var s=" |   |"+i.split("").map(function(e){return o(e,3)}).join("|")+"\n",a=0;a<=n;a++)s+=0===a?" |":t[a-1]+"|",s+=e[a].slice(0,r+1).map(function(e){return o(e.toString(),3)}).join("|")+"\n";return s}function C(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:return!0;default:return!1}}function E(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function w(e,t,n,i){var r=e.length>100?100:e.length,o=t.length>100?100:t.length,s=0;for(void 0===n&&(n=r);s<n&&E(e,s);)s+=1;if(s===r)return[-100,[]];if(!(r>o)){for(var a=e.toLowerCase(),c=t.toLowerCase(),l=s,u=0;l<r&&u<o;)a[l]===c[u]&&(l+=1),u+=1;if(l===r){for(l=s+1;l<=r;l++)for(u=1;u<=o;u++){var d=-1,h=c[u-1];a[l-1]===h&&(d=u===l-s?e[l-1]===t[u-1]?7:5:h===t[u-1]||1!==u&&c[u-2]!==t[u-2]?C(c,u-2)||E(c,u-2)?5:1:e[l-1]===t[u-1]?7:5),L[l][u]=d;var p=A[l-1][u-1]+(d>1?1:d),f=A[l-1][u]+-1,g=A[l][u-1]+-1;g>=f?g>p?(A[l][u]=g,
R[l][u]=4):g===p?(A[l][u]=g,R[l][u]=6):(A[l][u]=p,R[l][u]=2):f>p?(A[l][u]=f,R[l][u]=1):f===p?(A[l][u]=f,R[l][u]=3):(A[l][u]=p,R[l][u]=2)}if(O&&(console.log(_(A,e,r,t,o)),console.log(_(R,e,r,t,o)),console.log(_(L,e,r,t,o))),P=0,N=-100,F=s,W=i,I(r,o,r===o?1:0,new B,!1),0!==P)return[N,M.toArray()]}}}function I(e,t,n,i,r){if(!(P>=10||n<-25)){for(var o=0;e>F&&t>0;){var s=L[e][t],a=R[e][t];if(4===a)t-=1,r?n-=5:i.isEmpty()||(n-=1),r=!1,o=0;else{if(!(2&a))return;if(4&a&&I(e,t-1,i.isEmpty()?n:n-1,i.slice(),r),n+=s,e-=1,t-=1,i.unshift(t),r=!0,1===s){if(o+=1,e===F&&!W)return}else n+=1+o*(s-1),o=0}}P+=1,(n-=t>=3?9:3*t)>N&&(N=n,M=i)}}function T(e,t,n,i){var r=w(e,t,i);if(r&&!n)return r;if(e.length>=3)for(var o=Math.min(7,e.length-1),s=1;s<o;s++){var a=function(e,t){if(t+1>=e.length)return;var n=e[t],i=e[t+1];if(n===i)return;return e.slice(0,t)+i+n+e.slice(t+2)}(e,s);if(a){var c=w(a,t,i);c&&(c[0]-=3,(!r||c[0]>r[0])&&(r=c))}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.or=r,
t.matchesStrictPrefix=o.bind(void 0,!1),t.matchesPrefix=o.bind(void 0,!0),t.matchesContiguousSubString=s,t.matchesSubString=a,t.isUpper=u,t.matchesCamelCase=m,t.matchesWords=function(e,t,n){if(void 0===n&&(n=!1),!t||0===t.length)return null;var i=null,r=0;for(e=e.toLowerCase(),t=t.toLowerCase();r<t.length&&null===(i=y(e,t,0,r,n));)r=b(t,r+1);return i},t.fuzzyContiguousFilter=r(t.matchesPrefix,m,s);var x=r(t.matchesPrefix,m,a),k=new i.LRUCache(1e4);t.matchesFuzzy=function(e,i,r){if(void 0===r&&(r=!1),"string"!=typeof e||"string"!=typeof i)return null;var o=k.get(e);o||(o=new RegExp(n.convertSimple2RegExpPattern(e),"i"),k.set(e,o));var s=o.exec(i);return s?[{start:s.index,end:s.index+s[0].length}]:r?x(e,i):t.fuzzyContiguousFilter(e,i)},t.anyScore=function(e,t,n){e=e.toLowerCase(),t=t.toLowerCase();for(var i=[],r=0,o=0;o<e.length;++o){var s=t.indexOf(e.charAt(o),r);s>=0&&(i.push(s),r=s+1)}return[i.length,i]},t.createMatches=function(e){var t=[];if(!e)return t;for(var n,i=0,r=e;i<r.length;i++){var o=r[i]
;n&&n.end===o?n.end+=1:(n={start:o,end:o+1},t.push(n))}return t};var D,A=S(),L=S(),R=S(),O=!1;!function(e){e[e.Top=1]="Top",e[e.Diag=2]="Diag",e[e.Left=4]="Left"}(D||(D={})),t.fuzzyScore=w;var M,P=0,N=0,F=0,W=!1,B=function(){function e(){}return e.prototype.isEmpty=function(){return!this._data&&(!this._parent||this._parent.isEmpty())},e.prototype.unshift=function(e){this._data?this._data.unshift(e):this._data=[e]},e.prototype.slice=function(){var t=new e;return t._parent=this,t._parentLen=this._data?this._data.length:0,t},e.prototype.toArray=function(){if(!this._data)return this._parent.toArray();for(var e=[],t=this;t;)t._parent&&t._parent._data&&e.push(t._parent._data.slice(t._parent._data.length-t._parentLen)),t=t._parent;return Array.prototype.concat.apply(this._data,e)},e}();t.fuzzyScoreGracefulAggressive=function(e,t,n){return T(e,t,!0,n)},t.fuzzyScoreGraceful=function(e,t,n){return T(e,t,!1,n)}}),define(e[418],t([1,0,10]),function(e,t,n){"use strict";function i(e,t){return t instanceof RegExp?{$mid:2,
source:t.source,flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")}:t}function r(e,t){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return n.default.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=r(e[i],t+1))}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=function(e){return JSON.stringify(e,i)},t.parse=function(e){var t=JSON.parse(e);return t=r(t,0)},t.revive=r}),define(e[984],t([1,0,50]),function(e,t,n){"use strict";function i(e,n,i){if(!t.canNormalize||!e)return e;var r=i.get(e);if(r)return r;var o;return o=s.test(e)?e.normalize(n):e,i.set(e,o),o}Object.defineProperty(t,"__esModule",{value:!0}),t.canNormalize="function"==typeof"".normalize;var r=new n.LRUCache(1e4);t.normalizeNFC=function(e){return i(e,"NFC",r)};var o=new n.LRUCache(1e4);t.normalizeNFD=function(e){return i(e,"NFD",o)};var s=/[^\u0000-\u0080]/}),define(e[436],t([1,0,110,14]),function(e,t,n,i){"use strict";function r(e){
var t=e.indexOf(o);return-1===t?{text:e}:function(e,t){function n(e){if(e){r+=e;for(var t=0;t<e.length;t++)i.push(u)}}var i=[],r="";var s,a,c=-1,l="",u=0,d=t,h=e.length;n(e.substr(0,t));for(;d<h;){if(s=e[d],a=e[d+1],s===o[0]&&a===o[1])c=d,n(l),l=o,d++;else if(")"===s&&-1!==c){u+=d-c+1,c=-1,l=""}else-1!==c?l+=s:n(s);d++}return n(l),{text:r,octiconOffsets:i}}(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var o="$(";t.parseOcticons=r,t.matchesFuzzyOcticonAware=function(e,t,r){void 0===r&&(r=!1);var o=t.text,s=t.octiconOffsets;if(!s||0===s.length)return n.matchesFuzzy(e,o,r);var a=i.ltrim(o," "),c=o.length-a.length,l=n.matchesFuzzy(e,a,r);if(l)for(var u=0;u<l.length;u++){var d=s[l[u].start]+c;l[u].start+=d,l[u].end+=d}return l}}),define(e[1017],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultURITransformer={transformIncoming:function(e){return e},transformOutgoing:function(e){return e}}}),define(e[136],t([1,0]),function(e,t){"use strict";function i(){
return new s}function r(e){return a.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e}(),s=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return n(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(o);t.v4=i
;var a=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;t.isUUID=r,t.parse=function(e){if(!r(e))throw new Error("invalid uuid");return new o(e)},t.generateUuid=function(){return i().asHex()}});var r;!function(){var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,i){var r={},o=!1,s=n.map(function(t){return"exports"===t?(o=!0,r):e[t]}),a=i.apply({},s);e[t]=o?r:a};t("WinJS/Core/_Global",[],function(){"use strict";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";var t=null;return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(n){null===t&&(t=e.setImmediate?e.setImmediate.bind(e):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):e.setTimeout.bind(e)),t(n)}}}),
t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,i){"use strict";function r(e,t,n){var i,r,o,s=Object.keys(t),a=Array.isArray(e);for(r=0,o=s.length;r<o;r++){var c=s[r],l=95!==c.charCodeAt(0),u=t[c];!u||"object"!=typeof u||void 0===u.value&&"function"!=typeof u.get&&"function"!=typeof u.set?l?a?e.forEach(function(e){e[c]=u}):e[c]=u:(i=i||{})[c]={value:u,enumerable:l,configurable:!0,writable:!0}:(void 0===u.enumerable&&(u.enumerable=l),n&&u.setName&&"function"==typeof u.setName&&u.setName(n+"."+c),(i=i||{})[c]=u)}i&&(a?e.forEach(function(e){Object.defineProperties(e,i)}):Object.defineProperties(e,i))}return function(){function n(n,i){var r=n||{};if(i){var o=i.split(".");r===t&&"WinJS"===o[0]&&(r=e,o.splice(0,1));for(var s=0,a=o.length;s<a;s++){var c=o[s];r[c]||Object.defineProperty(r,c,{value:{},
writable:!1,enumerable:!0,configurable:!0}),r=r[c]}}return r}function o(e,t,i){var o=n(e,t);return i&&r(o,i,t||"<ANONYMOUS>"),o}var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return o(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,r=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(r){case a.initialized:return n;case a.uninitialized:r=a.working;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{i("WinJS.Namespace._lazy:"+t+",StopTM"),r=a.uninitialized}return e=null,r=a.initialized,n;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(r){case a.working:throw"Illegal: reentrancy on initialization";default:r=a.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,
configurable:!0},_moduleDefine:{value:function(e,i,o){var s=[e],a=null;return i&&(a=n(t,i),s.push(a)),r(s,o,i||"<ANONYMOUS>"),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&r(e.prototype,t),i&&r(e,i),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,i,o,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),o&&r(i.prototype,o),s&&r(i,s),i}return t(i,o,s)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)r(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),
t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var i=this[t];n?(i||(i={wrapper:function(e){return i.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:i,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,i.wrapper,!1)),i.userHandler=n):i&&(this.removeEventListener(e,i.wrapper,!1),this[t]=null)},enumerable:!0}}var i=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},
stopPropagation:function(){}},{supportedForProcessing:!1}),r={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var i=this._listeners[e]=this._listeners[e]||[],r=0,o=i.length;r<o;r++){var s=i[r];if(s.useCapture===n&&s.listener===t)return}i.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){for(var r=new i(e,t,this),o=0,s=(n=n.slice(0,n.length)).length;o<s&&!r._stopImmediatePropagationCalled;o++)n[o].listener(r);return r.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var i=this._listeners&&this._listeners[e];if(i)for(var r=0,o=i.length;r<o;r++){var s=i[r];if(s.listener===t&&s.useCapture===n){i.splice(r,1),0===i.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:function(){for(var e={},t=0,i=arguments.length;t<i;t++){var r=arguments[t];e["on"+r]=n(r)}return e},eventMixin:r})}),
t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),t("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,i,r,o){"use strict";function s(){}function a(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?L:P,e._value=t,e._setState(n)}function c(e,t,n,i,r,o){return{exception:e,error:t,promise:n,
handler:o,id:i,parent:r}}function l(e,t,n,i){var r=n._isException,o=n._errorId;return c(r?t:null,r?null:t,e,o,n,i)}function u(e,t,n){var i=n._isException,r=n._errorId;return S(e,r,i),c(i?t:null,i?null:t,e,r,n)}function d(e,t){var n=++B;return S(e,n),c(null,t,e,n)}function h(e,t){var n=++B;return S(e,n,!0),c(t,null,e,n)}function p(e,t,n,i){b(e,{c:t,e:n,p:i,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function f(e,t,n,i){e._value=t,m(e,t,n,i),e._setState(F)}function g(t,n){var i=t._value,r=t._listeners;if(r){t._listeners=null;var s,a;for(s=0,a=Array.isArray(r)?r.length:1;s<a;s++){var c=1===a?r:r[s],l=c.c,u=c.promise;if(o._traceAsyncOperationCompleted(c.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),u){o._traceAsyncCallbackStarting(c.asyncOpID);try{u._setCompleteValue(l?l(i):i)}catch(e){u._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}u._state!==L&&u._listeners&&n.push(u)}else G.prototype.done.call(t,l)}}}function v(t,n){var i=t._value,r=t._listeners;if(r){
t._listeners=null;var s,a;for(s=0,a=Array.isArray(r)?r.length:1;s<a;s++){var c=1===a?r:r[s],u=c.e,d=c.promise,h=e.Debug&&(i&&i.name===T?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(o._traceAsyncOperationCompleted(c.asyncOpID,h),d){var p=!1;try{u?(o._traceAsyncCallbackStarting(c.asyncOpID),p=!0,u.handlesOnError||m(d,i,l,t,u),d._setCompleteValue(u(i))):d._setChainedErrorValue(i,t)}catch(e){d._setExceptionValue(e)}finally{p&&o._traceAsyncCallbackCompleted()}d._state!==L&&d._listeners&&n.push(d)}else K.prototype.done.call(t,null,u)}}}function m(e,t,n,i,r){if(w._listeners[I]){if(t instanceof Error&&t.message===T)return;w.dispatchEvent(I,n(e,t,i,r))}}function y(e,t){var n=e._listeners;if(n){var i,r;for(i=0,r=Array.isArray(n)?n.length:1;i<r;i++){var o=1===r?n:n[i],s=o.p;if(s)try{s(t)}catch(e){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function b(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n]).push(t):n=t,e._listeners=n}function S(e,t,n){e._isException=n||!1,e._errorId=t}
function _(e,t,n,i){e._value=t,m(e,t,n,i),e._setState(W)}function C(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?L:N,e._value=t,e._setState(n)}function E(e,t,n,i){var r=new H(e);return b(e,{promise:r,c:t,e:n,p:i,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),r}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var w=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),r.eventMixin));w._listeners={};var I="error",T="Canceled",x=!1,k={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};k.all=k.promise|k.thenPromise|k.errorPromise|k.exceptionPromise|k.completePromise;var D,A,L,R,O,M,P,N,F,W,B=1;D={name:"created",enter:function(e){e._setState(A)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},A={name:"working",enter:s,cancel:function(e){e._setState(O)},done:p,then:E,_completed:a,_error:f,_notify:s,_progress:y,_setCompleteValue:C,_setErrorValue:_},L={name:"waiting",enter:function(e){
var t=e._value;if(t instanceof H&&t._state!==W&&t._state!==N)b(t,{promise:e});else{var n=function(i){t._errorId?e._chainedError(i,t):(m(e,i,l,t,n),e._error(i))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(R)},done:p,then:E,_completed:a,_error:f,_notify:s,_progress:y,_setCompleteValue:C,_setErrorValue:_},R={name:"waiting_canceled",enter:function(e){e._setState(M);var t=e._value;t.cancel&&t.cancel()},cancel:s,done:p,then:E,_completed:a,_error:f,_notify:s,_progress:y,_setCompleteValue:C,_setErrorValue:_},O={name:"canceled",enter:function(e){e._setState(M),e._cancelAction()},cancel:s,done:p,then:E,_completed:a,_error:f,_notify:s,_progress:y,_setCompleteValue:C,_setErrorValue:_},M={name:"canceling",enter:function(e){var t=new Error(T);t.name=t.message,e._value=t,e._setState(F)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},P={name:"complete_notify",enter:function(e){if(e.done=G.prototype.done,
e.then=G.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(N)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s},N={name:"success",enter:function(e){e.done=G.prototype.done,e.then=G.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s},F={name:"error_notify",enter:function(e){if(e.done=K.prototype.done,e.then=K.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(W)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:v,_progress:s,_setCompleteValue:s,_setErrorValue:s},W={name:"error",enter:function(e){e.done=K.prototype.done,e.then=K.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:v,_progress:s,_setCompleteValue:s,_setErrorValue:s};var V,z=n.Class.define(null,{_listeners:null,_nextState:null,_state:null,
_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function(e,t,n){return this._state.then(this,e,t,n)},_chainedError:function(e,t){var n=this._state._error(this,e,u,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,d);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,u,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,h);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),H=n.Class.derive(z,function(e){
x&&(!0===x||x&k.thenPromise)&&(this._stack=j._getStack()),this._creator=e,this._setState(D),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),K=n.Class.define(function(e){x&&(!0===x||x&k.errorPromise)&&(this._stack=j._getStack()),this._value=e,m(this,e,d)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||m(null,n,l,this,t);var i=t(n);return void(i&&"object"==typeof i&&"function"==typeof i.done&&i.done())}catch(e){n=e}n instanceof Error&&n.message===T||j._doneHandler(n)},then:function(e,t){if(!t)return this;var n,i=this._value;try{t.handlesOnError||m(null,i,l,this,t),n=new G(t(i))}catch(e){n=e===i?this:new U(e)}return n}},{supportedForProcessing:!1}),U=n.Class.derive(K,function(e){x&&(!0===x||x&k.exceptionPromise)&&(this._stack=j._getStack()),this._value=e,m(this,e,h)},{},{supportedForProcessing:!1}),G=n.Class.define(function(e){
if(x&&(!0===x||x&k.completePromise)&&(this._stack=j._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new H(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){j._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new G(t)}catch(e){return new U(e)}}},{supportedForProcessing:!1}),j=n.Class.derive(z,function(e,t){x&&(!0===x||x&k.promise)&&(this._stack=j._getStack()),this._oncancel=t,this._setState(D),this._run();try{e(this._completed.bind(this),this._error.bind(this),this._progress.bind(this))}catch(e){this._setExceptionValue(e)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;w.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){
w.addEventListener(e,t,n)},any:function(e){return new j(function(t,n){var i=Object.keys(e);0===i.length&&t();var r=0;i.forEach(function(o){j.as(e[o]).then(function(){t({key:o,value:e[o]})},function(s){s instanceof Error&&s.name===T?++r===i.length&&t(j.cancel):n({key:o,value:e[o]})})})},function(){Object.keys(e).forEach(function(t){var n=j.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new G(e)},cancel:{get:function(){return V=V||new K(new i(T))}},dispatchEvent:function(e,t){return w.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new j(function(t,n,i){var r=Object.keys(e),o=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},a=0,c=r.length,l=function(e){if(0==--c){var a=Object.keys(o).length;if(0===a)t(s);else{var l=0;r.forEach(function(e){var t=o[e];t instanceof Error&&t.name===T&&l++}),l===a?t(j.cancel):n(o)}}else i({Key:e,Done:!0})};r.forEach(function(t){var n=e[t]
;void 0===n?a++:j.then(n,function(e){s[t]=e,l(t)},function(e){o[t]=e,l(t)})}),0!==(c-=a)||t(s)},function(){Object.keys(e).forEach(function(t){var n=j.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){w.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,i){return j.as(e).then(t,n,i)},thenEach:function(e,t,n,i){var r=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){r[o]=j.as(e[o]).then(t,n,i)}),j.join(r)},timeout:function(n,i){var r=function(n){var i;return new j(function(r){n?i=e.setTimeout(r,n):t._setImmediate(r)},function(){i&&e.clearTimeout(i)})}(n);return i?function(e,t){var n=function(){e.cancel()};return e.then(function(){t.cancel()}),t.then(n,n),t}(r,i):r},wrap:function(e){return new G(e)},wrapError:function(e){return new K(e)},_veryExpensiveTagWithStack:{get:function(){return x},set:function(e){x=e}},_veryExpensiveTagWithStack_tag:k,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){
return e.stack}},_cancelBlocker:function(e,t){if(!j.is(e))return j.wrap(e);var n,i,r=new j(function(e,t){n=e,i=t},function(){n=null,i=null,t&&t()});return e.then(function(e){n&&n(e)},function(e){i&&i(e)}),r}});return Object.defineProperties(j,r.createEventProperties(I)),j._doneHandler=function(e){t._setImmediate(function(){throw e})},{PromiseStateMachine:z,Promise:j,state_created:D}}),t("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],function(e,t){"use strict";return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise}),(r=e["WinJS/Core/_WinJS"]).TPromise=r.Promise,r.PPromise=r.Promise,"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/common/winjs.base",[],r):module.exports=r}();var o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(s,a)}
c((i=i.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,r&&(o=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[0,o.value]),n[0]){case 0:case 1:o=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(6===n[0]&&a.label<o[1]){a.label=o[1],o=n;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(n);break}o[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],r=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var i,r,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},
"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(e[20],t([1,0,4]),function(e,t,n){"use strict";function i(e,t){var n=0,i=e.length;if(0===i)return 0;for(;n<i;){var r=Math.floor((n+i)/2);t(e[r])?i=r:n=r+1}return n}function r(e,t){return a(e,t),e}function a(e,t){if(!(e.length<=1)){var n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);a(i,t),a(r,t);for(var o=0,s=0,c=0;o<i.length&&s<r.length;){var l=t(i[o],r[s]);e[c++]=l<=0?i[o++]:r[s++]}for(;o<i.length;)e[c++]=i[o++];for(;s<r.length;)e[c++]=r[s++]}}function c(e,t,n){function i(e,t,n){var i;if(0!==t||0!==n.length){var o=r[r.length-1];o&&o.start+o.deleteCount===e?(o.deleteCount+=t,(i=o.toInsert).push.apply(i,n)):r.push({start:e,deleteCount:t,toInsert:n})}}for(var r=[],o=0,s=0;;){if(o===e.length){i(o,0,t.slice(s));break}if(s===t.length){i(o,e.length-o,[]);break}var a=e[o],c=t[s],l=n(a,c);0===l?(o+=1,s+=1):l<0?(i(o,1,[]),o+=1):l>0&&(i(o,0,[c]),s+=1)}return r}function l(e,t,n,r,o){for(var s=function(o){var s=e[r];if(t(s,n[o-1])<0){n.pop()
;var a=i(n,function(e){return t(s,e)<0});n.splice(a,0,s)}},a=n.length;r<o;r++)s(a)}function u(e,t){for(var n=0;n<e.length;n++){if(t(e[n]))return n}return-1}Object.defineProperty(t,"__esModule",{value:!0}),t.tail=function(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]},t.tail2=function(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]},t.equals=function(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var i=0,r=e.length;i<r;i++)if(!n(e[i],t[i]))return!1;return!0},t.binarySearch=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=(i+r)/2|0,s=n(e[o],t);if(s<0)i=o+1;else{if(!(s>0))return o;r=o-1}}return-(i+1)},t.findFirstInSorted=i,t.mergeSort=r,t.groupBy=function(e,t){for(var n,i=[],o=0,s=r(e.slice(0),t);o<s.length;o++){var a=s[o];n&&0===t(n[0],a)?n.push(a):(n=[a],i.push(n))}return i},t.sortedDiff=c,t.delta=function(e,t,n){for(var i=[],r=[],o=0,s=c(e,t,n);o<s.length;o++){var a=s[o]
;i.push.apply(i,e.slice(a.start,a.start+a.deleteCount)),r.push.apply(r,a.toInsert)}return{removed:i,added:r}},t.top=function(e,t,n){if(0===n)return[];var i=e.slice(0,n).sort(t);return l(e,t,i,n,e.length),i},t.topAsync=function(e,t,i,r){var a=this;if(0===i)return n.TPromise.as([]);var c=!1;return new n.TPromise(function(n,u){o(a,void 0,void 0,function(){var n,o,a,u;return s(this,function(s){switch(s.label){case 0:n=e.length,o=e.slice(0,i).sort(t),a=i,u=Math.min(i+r,n),s.label=1;case 1:return a<n?a>i?[4,new Promise(function(e){return setTimeout(e)})]:[3,3]:[3,5];case 2:s.sent(),s.label=3;case 3:if(c)throw new Error("canceled");l(e,t,o,a,u),s.label=4;case 4:return a=u,u=Math.min(u+r,n),[3,1];case 5:return[2,o]}})}).then(n,u)},function(){c=!0})},t.coalesce=function(e,t){if(!e&&!t)return e;if(!t)return e.filter(function(e){return!!e});for(var n=0,i=0;i<e.length;i++)e[i]&&(e[n]=e[i],n+=1);e.length=n},t.move=function(e,t,n){e.splice(n,0,e.splice(t,1)[0])},t.isFalsyOrEmpty=function(e){
return!Array.isArray(e)||0===e.length},t.distinct=function(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var i=t(e);return!n[i]&&(n[i]=!0,!0)})},t.uniqueFilter=function(e){var t=Object.create(null);return function(n){var i=e(n);return!t[i]&&(t[i]=!0,!0)}},t.firstIndex=u,t.first=function(e,t,n){void 0===n&&(n=null);var i=u(e,t);return i<0?n:e[i]},t.commonPrefixLength=function(e,t,n){void 0===n&&(n=function(e,t){return e===t});for(var i=0,r=0,o=Math.min(e.length,t.length);r<o&&n(e[r],t[r]);r++)i++;return i},t.flatten=function(e){return[].concat.apply([],e)},t.range=function(e,t){var n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);var i=[];if(n<=t)for(r=n;r<t;r++)i.push(r);else for(var r=n;r>t;r--)i.push(r);return i},t.fill=function(e,t,n){void 0===n&&(n=[]);for(var i=0;i<e;i++)n[i]=t();return n},t.index=function(e,t,n){return void 0===n&&(n=function(e){return e}),e.reduce(function(e,i){var r=t(i);return e[r]=n(i,e[r]),e
},Object.create(null))},t.insert=function(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){var i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)},t.shuffle=function(e){var t=0,n=0,i=null;for(t=e.length-1;t>0;t-=1)n=Math.floor(Math.random()*(t+1)),i=e[t],e[t]=e[n],e[n]=i},t.pushToStart=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},t.pushToEnd=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}}),define(e[863],t([1,0,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.task=e,this.promise=null}return e.prototype.get=function(){var e=this;if(this.promise)return this.promise;var t=this.task();return this.promise=new n.TPromise(function(e,n){return t.done(e,n)},function(){e.promise=null,t.cancel()}),this.promise},e}();t.default=i}),define(e[9],t([1,0,4]),function(e,t,n){"use strict";function i(e){r(e)||t.errorHandler.onUnexpectedError(e)}function r(e){
return e instanceof Error&&e.name===a&&e.message===a}Object.defineProperty(t,"__esModule",{value:!0});var o={};n.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout(function(){var e=o;o={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?i(n.exception):n.error&&i(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var s=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){
this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}();t.ErrorHandler=s,t.errorHandler=new s,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=i,t.onUnexpectedExternalError=function(e){r(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error)return{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack};return e};var a="Canceled";t.isPromiseCanceledError=r,t.canceled=function(){var e=new Error(a);return e.name=e.message,e},t.illegalArgument=function(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")},t.illegalState=function(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")},t.readonly=function(e){
return e?new Error("readonly property '"+e+" cannot be changed'"):new Error("readonly property cannot be changed")},t.disposed=function(e){var t=new Error(e+" has been disposed");return t.name="DISPOSED",t},t.isErrorWithActions=function(e){return e instanceof Error&&Array.isArray(e.actions)},t.create=function(e,t){void 0===t&&(t=Object.create(null));var n=new Error(e);return t.actions&&(n.actions=t.actions),n},t.getErrorMessage=function(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"}}),define(e[7],t([1,0,9,303,5,363,4]),function(e,t,i,r,a,c,l){"use strict";function u(e){return function(t,n,i){void 0===n&&(n=null);var r=e(function(e){return r.dispose(),t.call(n,e)},null,i);return r}}function d(e,t){return function(n,i,r){return void 0===i&&(i=null),e(function(e){return n.call(i,t(e))},null,r)}}function h(e,t){return function(n,i,r){return void 0===i&&(i=null),e(function(e){t(e),n.call(i,e)},null,r)}}function p(e,t){return function(n,i,r){return void 0===i&&(i=null),
e(function(e){return t(e)&&n.call(i,e)},null,r)}}function f(e){var t,n=!0;return p(e,function(e){var i=n||e!==t;return n=!1,t=e,i})}Object.defineProperty(t,"__esModule",{value:!0});!function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var g=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,i,r){t._listeners||(t._listeners=new c.LinkedList);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s=t._listeners.push(i?[n,i]:n);o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,i);var a;return a={dispose:function(){a.dispose=e._noop,t._disposed||(s(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(r)&&r.push(a),a}),this._event},
enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var r=this._deliveryQueue.shift(),o=r[0],s=r[1];try{"function"==typeof o?o.call(void 0,s):o[0].call(o[1],s)}catch(n){i.onUnexpectedError(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();t.Emitter=g;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.fireAsync=function(e){return o(this,void 0,l.TPromise,function(){var t,n,r,o,a,c;return s(this,function(s){switch(s.label){case 0:if(!this._listeners)return[2];for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]),t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())c=[],
this._asyncDeliveryQueue.push([n.value,e(c,"function"==typeof n.value?n.value:n.value[0]),c]);s.label=1;case 1:if(!(this._asyncDeliveryQueue.length>0))return[3,3];r=this._asyncDeliveryQueue.shift(),o=r[0],a=r[1],c=r[2];try{"function"==typeof o?o.call(void 0,a):o[0].call(o[1],a)}catch(e){return i.onUnexpectedError(e),[3,1]}return Object.freeze(c),[4,l.TPromise.join(c)];case 2:return s.sent(),[3,1];case 3:return[2]}})})},t}(g);t.AsyncEmitter=v;var m=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new g({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return a.toDisposable(r.once(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n)
;t.events.splice(e,1)}))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();t.EventMultiplexer=m,t.fromCallback=function(e){var t,n=new g({onFirstListenerAdd:function(){return t=e(function(e){return n.fire(e)})},onLastListenerRemove:function(){return t.dispose()}});return n.event},t.fromPromise=function(e){var t=new g,n=!1;return e.then(null,function(){return null}).then(function(){n?t.fire():setTimeout(function(){return t.fire()},0)}),n=!0,t.event},t.toPromise=function(e){return new l.TPromise(function(t){var n=e(function(e){n.dispose(),t(e)})})},t.once=u,t.anyEvent=function(){
for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,i){return void 0===n&&(n=null),a.combinedDisposable(e.map(function(e){return e(function(e){return t.call(n,e)},null,i)}))}},t.debounceEvent=function(e,t,n,i){void 0===n&&(n=100),void 0===i&&(i=!1);var r,o=void 0,s=void 0,a=0,c=new g({onFirstListenerAdd:function(){r=e(function(e){a++,o=t(o,e),i&&!s&&c.fire(o),clearTimeout(s),s=setTimeout(function(){var e=o;o=void 0,s=void 0,(!i||a>1)&&c.fire(e),a=0},n)})},onLastListenerRemove:function(){r.dispose()}});return c.event};var y=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,r){return e(function(e){var r=t.buffers[t.buffers.length-1];r?r.push(function(){return n.call(i,e)}):n.call(i,e)},void 0,r)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=y,t.mapEvent=d,t.forEach=h,t.filterEvent=p;var b=function(){function e(e){
this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(d(this._event,t))},e.prototype.forEach=function(t){return new e(h(this._event,t))},e.prototype.filter=function(t){return new e(p(this._event,t))},e.prototype.latch=function(){return new e(f(this._event))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=function(e){return new b(e)},t.stopwatch=function(e){var t=(new Date).getTime();return d(u(e),function(e){return(new Date).getTime()-t})},t.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice();var i=e(function(e){n?n.push(e):o.fire(e)}),r=function(){n.forEach(function(e){return o.fire(e)}),n=null},o=new g({onFirstListenerAdd:function(){i||(i=e(function(e){return o.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(r):r())},onLastListenerRemove:function(){i.dispose(),i=null}});return o.event},t.echo=function(e,t,n){void 0===t&&(t=!1),
void 0===n&&(n=[]),n=n.slice(),e(function(e){n.push(e),r.fire(e)});var i=function(e,t){return n.forEach(function(n){return e.call(t,n)})},r=new g({onListenerDidAdd:function(e,n,r){t?setTimeout(function(){return i(n,r)}):i(n,r)}});return r.event};var S=function(){function e(){this.emitter=new g,this.event=this.emitter.event,this.disposable=a.empty}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}();t.Relay=S,t.fromNodeEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.fire(n.apply(void 0,e))},r=new g({onFirstListenerAdd:function(){return e.on(t,i)},onLastListenerRemove:function(){return e.removeListener(t,i)}});return r.event},t.latch=f}),define(e[78],t([1,0,7]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=0,this._onDidChangeFullscreen=new n.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new n.Emitter,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.setZoomLevel=function(e,t){this._zoomLevel!==e&&(this._zoomLevel=e,this._lastZoomLevelChangeTime=t?0:Date.now(),this._onDidChangeZoomLevel.fire(this._zoomLevel))},e.prototype.getZoomFactor=function(){return this._zoomFactor},e.prototype.setZoomFactor=function(e){this._zoomFactor=e},e.prototype.getPixelRatio=function(){
var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.setFullscreen=function(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())},e.prototype.isFullscreen=function(){return this._fullscreen},e.prototype.setAccessibilitySupport=function(e){this._accessibilitySupport!==e&&(this._accessibilitySupport=e,this._onDidChangeAccessibilitySupport.fire())},e.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},e.INSTANCE=new e,e}();t.setZoomLevel=function(e,t){i.INSTANCE.setZoomLevel(e,t)},t.getZoomLevel=function(){return i.INSTANCE.getZoomLevel()},t.getTimeSinceLastZoomLevelChanged=function(){return i.INSTANCE.getTimeSinceLastZoomLevelChanged()},t.onDidChangeZoomLevel=function(e){return i.INSTANCE.onDidChangeZoomLevel(e)},t.getZoomFactor=function(){
return i.INSTANCE.getZoomFactor()},t.setZoomFactor=function(e){i.INSTANCE.setZoomFactor(e)},t.getPixelRatio=function(){return i.INSTANCE.getPixelRatio()},t.setFullscreen=function(e){i.INSTANCE.setFullscreen(e)},t.isFullscreen=function(){return i.INSTANCE.isFullscreen()},t.onDidChangeFullscreen=function(e){return i.INSTANCE.onDidChangeFullscreen(e)},t.setAccessibilitySupport=function(e){i.INSTANCE.setAccessibilitySupport(e)},t.getAccessibilitySupport=function(){return i.INSTANCE.getAccessibilitySupport()},t.onDidChangeAccessibilitySupport=function(e){return i.INSTANCE.onDidChangeAccessibilitySupport(e)};var r=navigator.userAgent;t.isIE=r.indexOf("Trident")>=0,t.isEdge=r.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isOpera=r.indexOf("Opera")>=0,t.isFirefox=r.indexOf("Firefox")>=0,t.isWebKit=r.indexOf("AppleWebKit")>=0,t.isChrome=r.indexOf("Chrome")>=0,t.isSafari=-1===r.indexOf("Chrome")&&r.indexOf("Safari")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isEdgeWebView=t.isEdge&&r.indexOf("WebView/")>=0,
t.hasClipboardSupport=function(){if(t.isIE)return!1;if(t.isEdge){var e=r.indexOf("Edge/"),n=parseInt(r.substring(e+5,r.indexOf(".",e)),10);if(!n||n>=12&&n<=16)return!1}return!0}}),define(e[106],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.domEvent=function(e,t,i){var r=function(e){return o.fire(e)},o=new n.Emitter({onFirstListenerAdd:function(){e.addEventListener(t,r,i)},onLastListenerRemove:function(){e.removeEventListener(t,r,i)}});return o.event},t.stop=function(e){return n.mapEvent(e,function(e){return e.preventDefault(),e.stopPropagation(),e})}}),define(e[84],t([1,0,73,11,78]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=new Array(230),s=new Array(112);!function(){function e(e,t){o[e]=t,s[t]=e}for(var t=0;t<s.length;t++)s[t]=-1;e(3,7),e(8,1),e(9,2),e(13,3),e(16,4),e(17,5),e(18,6),e(19,7),e(20,8),e(27,9),e(32,10),e(33,11),e(34,12),e(35,13),e(36,14),e(37,15),e(38,16),e(39,17),e(40,18),e(45,19),e(46,20),e(48,21),
e(49,22),e(50,23),e(51,24),e(52,25),e(53,26),e(54,27),e(55,28),e(56,29),e(57,30),e(65,31),e(66,32),e(67,33),e(68,34),e(69,35),e(70,36),e(71,37),e(72,38),e(73,39),e(74,40),e(75,41),e(76,42),e(77,43),e(78,44),e(79,45),e(80,46),e(81,47),e(82,48),e(83,49),e(84,50),e(85,51),e(86,52),e(87,53),e(88,54),e(89,55),e(90,56),e(93,58),e(96,93),e(97,94),e(98,95),e(99,96),e(100,97),e(101,98),e(102,99),e(103,100),e(104,101),e(105,102),e(106,103),e(107,104),e(108,105),e(109,106),e(110,107),e(111,108),e(112,59),e(113,60),e(114,61),e(115,62),e(116,63),e(117,64),e(118,65),e(119,66),e(120,67),e(121,68),e(122,69),e(123,70),e(124,71),e(125,72),e(126,73),e(127,74),e(128,75),e(129,76),e(130,77),e(144,78),e(145,79),e(186,80),e(187,81),e(188,82),e(189,83),e(190,84),e(191,85),e(192,86),e(193,110),e(194,111),e(219,87),e(220,88),e(221,89),e(222,90),e(223,91),e(226,92),e(229,109),r.isIE?e(91,57):r.isFirefox?(e(59,80),e(107,81),e(109,83),i.isMacintosh&&e(224,57)):r.isWebKit&&(e(91,57),i.isMacintosh?e(93,57):e(92,57))}(),
t.getCodeForKeyCode=function(e){return s[e]};var a=i.isMacintosh?256:2048,c=i.isMacintosh?2048:256,l=function(){function e(e){var t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=function(e){if(e.charCode){var t=String.fromCharCode(e.charCode).toUpperCase();return n.KeyCodeUtils.fromString(t)}return o[e.keyCode]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e.prototype.toKeybinding=function(){
return this._asRuntimeKeybinding},e.prototype.equals=function(e){return this._asKeybinding===e},e.prototype._computeKeybinding=function(){var e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);var t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=c),t|=e},e.prototype._computeRuntimeKeybinding=function(){var e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new n.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)},e}();t.StandardKeyboardEvent=l}),define(e[82],t([1,0,11,78,492]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,
this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var t=o.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}();t.StandardMouseEvent=s;var a=function(e){function t(t){var n=e.call(this,t)||this;return n.dataTransfer=t.dataTransfer,n}return n(t,e),t}(s);t.DragMouseEvent=a;var c=function(){function e(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){var o=e,s=e
;void 0!==o.wheelDeltaY?this.deltaY=o.wheelDeltaY/120:void 0!==s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),void 0!==o.wheelDeltaX?r.isSafari&&i.isWindows?this.deltaX=-o.wheelDeltaX/120:this.deltaX=o.wheelDeltaX/120:void 0!==s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}();t.StandardMouseWheelEvent=c}),define(e[23],t([1,0,4,5,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=""),void 0===i&&(i=!0),this._onDidChange=new r.Emitter,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}
return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){
this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){
return void 0!==this._actionCallback?this._actionCallback(e):n.TPromise.as(!0)},e}();t.Action=o;var s=function(){function e(){this._onDidBeforeRun=new r.Emitter,this._onDidRun=new r.Emitter}return Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){var i=this;return e.enabled?(this._onDidBeforeRun.fire({action:e}),this.runAction(e,t).then(function(t){i._onDidRun.fire({action:e,result:t})},function(t){i._onDidRun.fire({action:e,error:t})})):n.TPromise.as(null)},e.prototype.runAction=function(e,t){var i=t?e.run(t):e.run();return n.TPromise.is(i)?i:n.TPromise.wrap(i)},e.prototype.dispose=function(){this._onDidBeforeRun.dispose(),this._onDidRun.dispose()},e}();t.ActionRunner=s;var a=function(){function e(e){this.actions=e,this._disposable=i.combinedDisposable(e.map(function(t){
return t.onDidChange(function(n){if(n.checked&&t.checked)for(var i=0,r=e;i<r.length;i++){var o=r[i];o!==t&&(o.checked=!1)}})}))}return e.prototype.dispose=function(){this._disposable.dispose()},e}();t.RadioGroup=a}),define(e[145],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})}(i=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?r:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof o&&this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof o&&this._token.dispose():this._token=i.None},e}();t.CancellationTokenSource=s}),define(e[18],t([1,0,9,4,145,5,7]),function(e,t,i,r,o,s,a){"use strict";function c(e){return e&&"function"==typeof e.then}function l(e){return e instanceof r.TPromise?e:new r.TPromise(function(t,n){return e.then(t,n)})}function u(e){return r.TPromise.is(e)&&"function"==typeof e.done}
function d(e,t){return u(e)?new r.TPromise(function(n,r,o){e.done(function(e){try{t(e)}catch(e){i.onUnexpectedError(e)}n(e)},function(e){try{t(e)}catch(e){i.onUnexpectedError(e)}r(e)},function(e){o(e)})},function(){e.cancel()}):(e.then(function(e){return t()},function(e){return t()}),e)}function h(e){function t(s){void 0!==s&&null!==s&&n.push(s);var a=i<o?e[i++]():null;return a?a.then(t):r.TPromise.as(n)}var n=[],i=0,o=e.length;return r.TPromise.as(null).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=c,t.toThenable=function(e){return c(e)?e:r.TPromise.as(e)},t.toWinJsPromise=l,t.asWinJsPromise=function(e){var t=new o.CancellationTokenSource;return new r.TPromise(function(n,i,o){var s=e(t.token);s instanceof r.TPromise?s.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),i(e)},o):c(s)?s.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),i(e)}):(t.dispose(),n(s))},function(){t.cancel()})},t.asWinJSImport=function(e){return l(e)},t.wireCancellationToken=function(e,t,n){
var o=e.onCancellationRequested(function(){return t.cancel()});return n&&(t=t.then(void 0,function(e){if(!i.isPromiseCanceledError(e))return r.TPromise.wrapError(e)})),d(t,function(){return o.dispose()})},t.asDisposablePromise=function(e,t,n){var o,s={promise:new r.TPromise(function(n,r){o=function(){n(t),u(e)&&e.cancel()},e.then(n,function(e){i.isPromiseCanceledError(e)?n(t):r(e)})}),dispose:o};return Array.isArray(n)&&n.push(s),s};var p=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new r.TPromise(function(e,i,r){t.activePromise.then(n,n,r).done(e)},function(){t.activePromise.cancel()})}return new r.TPromise(function(e,n,i){t.queuedPromise.then(e,n,i)},function(){})}return this.activePromise=e(),
new r.TPromise(function(e,n,i){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},i)},function(){t.activePromise.cancel()})},e}();t.Throttler=p;var f=function(){function e(){this.current=r.TPromise.wrap(null)}return e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})},e}();t.SimpleThrottler=f;var g=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new r.TPromise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},
e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=g;var v=function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new p,n}return n(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.throttler.queue(t)},n)},t}(g);t.ThrottledDelayer=v;var m=function(){function e(){var e=this;this._isOpen=!1,this._promise=new r.TPromise(function(t,n,i){e._completePromise=t},function(){console.warn("You should really not try to cancel this ready promise!")})}return e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen=!0,this._completePromise(!0)},e.prototype.wait=function(){return this._promise},e}();t.Barrier=m;var y=function(e){function t(t){var n,r,o,s=this;return s=e.call(this,function(e,t,i){n=e,r=t,o=i
},function(){r(i.canceled())})||this,t.then(n,r,o),s}return n(t,e),t}(r.TPromise);t.ShallowCancelThenPromise=y,t.timeout=function(e){return new r.TPromise(function(t){return setTimeout(t,e)})},t.always=d,t.sequence=h,t.first=function(e,t){void 0===t&&(t=function(e){return!!e});var n=0,i=e.length,o=function(){return n>=i?r.TPromise.as(null):(0,e[n++])().then(function(e){return t(e)?r.TPromise.as(e):o()})};return o()};var b=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new a.Emitter}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.runningPromises+this.outstandingPromises.length},enumerable:!0,configurable:!0}),e.prototype.queue=function(e){var t=this;return new r.TPromise(function(n,i,r){t.outstandingPromises.push({factory:e,c:n,e:i,p:r}),t.consume()})},e.prototype.consume=function(){
for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e,t.p),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=b;var S=function(e){function t(){return e.call(this,1)||this}return n(t,e),t}(b);t.Queue=S;var _=function(){function e(){this.queues=Object.create(null)}return e.prototype.queueFor=function(e){var t=this,n=e.toString();if(!this.queues[n]){var i=new S;i.onFinished(function(){i.dispose(),delete t.queues[n]}),this.queues[n]=i}return this.queues[n]},e}();t.ResourceQueue=_,t.setDisposableTimeout=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=setTimeout.apply(void 0,[e,t].concat(n));return{dispose:function(){
clearTimeout(r)}}};var C=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return n(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout(function(){n._token=-1,e()},t))},t}(s.Disposable);t.TimeoutTimer=C;var E=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return n(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval(function(){e()},t)},t}(s.Disposable);t.IntervalTimer=E;var w=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,
this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner()},e}();t.RunOnceScheduler=w;var I=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.units=[],i}return n(t,e),t.prototype.work=function(e){this.units.push(e),this.isScheduled()||this.schedule()},t.prototype.doRun=function(){var e=this.units;this.units=[],this.runner(e)},t.prototype.dispose=function(){this.units=[],e.prototype.dispose.call(this)},t}(w);t.RunOnceWorker=I,t.nfcall=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;return new r.TPromise(function(n,i){return e.apply(void 0,t.concat([function(e,t){return e?i(e):n(t)}]))},function(){return null})},t.ninvoke=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return new r.TPromise(function(i,r){return t.call.apply(t,[e].concat(n,[function(e,t){return e?r(e):i(t)}]))},function(){return null})}}),define(e[8],t([1,0,11,4,18,9,5,78,84,82,7,106]),function(e,t,i,r,o,s,a,c,l,u,d,h){"use strict";function p(e,t,n,i){return new x(e,t,n,i)}function f(e){if(!k){k=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout(function(){return e((new Date).getTime())},0)}}return k.call(self,e)}function g(e){return document.defaultView.getComputedStyle(e,null)}function v(e,t,n){var i=g(e),r="0";return i&&(r=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),O(e,r)}function m(e){
for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var r=g(e);r&&(i-="rtl"!==r.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=M.getBorderLeftWidth(e),n+=M.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function y(e){var t=M.getMarginLeft(e)+M.getMarginRight(e);return e.offsetWidth+t}function b(e){var t=M.getMarginLeft(e)+M.getMarginRight(e);return e.scrollWidth+t}function S(e,t){var n=t.map(function(t){return Math.max(b(t),y(t))+function(e,t){if(null===e)return 0;var n=m(e),i=m(t);return n.left-i.left}(t,e)||0});return Math.max.apply(Math,n)}function _(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}function C(){return N||(N=_()),N}function E(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){var t=function(e,t){for(;e;){
if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}}Object.defineProperty(t,"__esModule",{value:!0}),t.clearNode=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.isInDOM=function(e){for(;e;){if(e===document.body)return!0;e=e.parentNode}return!1};var w=new(function(){function e(){}return e.prototype._findClassName=function(e,t){var n=e.className;if(n){t=t.trim();var i=n.length,r=t.length;if(0!==r)if(i<r)this._lastStart=-1;else{if(n===t)return this._lastStart=0,void(this._lastEnd=i);for(var o,s=-1;(s=n.indexOf(t,s+1))>=0;){if(o=s+r,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(o))return this._lastStart=s,void(this._lastEnd=o+1);if(s>0&&32===n.charCodeAt(s-1)&&o===i)return this._lastStart=s-1,void(this._lastEnd=o);if(0===s&&o===i)return this._lastStart=0,void(this._lastEnd=o)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){
return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach(function(n){return n.split(" ").forEach(function(n){return t.addClass(e,n)})})},e.prototype.addClass=function(e,t){e.className?(this._findClassName(e,t),-1===this._lastStart&&(e.className=e.className+" "+t)):e.className=t},e.prototype.removeClass=function(e,t){this._findClassName(e,t),-1!==this._lastStart&&(e.className=e.className.substring(0,this._lastStart)+e.className.substring(this._lastEnd))},e.prototype.removeClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach(function(n){return n.split(" ").forEach(function(n){return t.removeClass(e,n)})})},e.prototype.toggleClass=function(e,t,n){this._findClassName(e,t),-1===this._lastStart||void 0!==n&&n||this.removeClass(e,t),-1!==this._lastStart||void 0!==n&&!n||this.addClass(e,t)},e}()),I=new(function(){function e(){}
return e.prototype.hasClass=function(e,t){return t&&e.classList&&e.classList.contains(t)},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach(function(n){return n.split(" ").forEach(function(n){return t.addClass(e,n)})})},e.prototype.addClass=function(e,t){t&&e.classList&&e.classList.add(t)},e.prototype.removeClass=function(e,t){t&&e.classList&&e.classList.remove(t)},e.prototype.removeClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach(function(n){return n.split(" ").forEach(function(n){return t.removeClass(e,n)})})},e.prototype.toggleClass=function(e,t,n){e.classList&&e.classList.toggle(t,n)},e}()),T=c.isIE?w:I;t.hasClass=T.hasClass.bind(T),t.addClass=T.addClass.bind(T),t.addClasses=T.addClasses.bind(T),t.removeClass=T.removeClass.bind(T),t.removeClasses=T.removeClasses.bind(T),t.toggleClass=T.toggleClass.bind(T);var x=function(){function e(e,t,n,i){this._node=e,this._type=t,this._handler=n,
this._useCapture=i||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}return e.prototype.dispose=function(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)},e}();t.addDisposableListener=p,t.addStandardDisposableListener=function(e,t,n,i){var r=n;return"click"===t||"mousedown"===t?r=function(e){return function(t){return e(new u.StandardMouseEvent(t))}}(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(r=function(e){return function(t){return e(new l.StandardKeyboardEvent(t))}}(n)),p(e,t,r,i)},t.addDisposableNonBubblingMouseOutListener=function(e,t){return p(e,"mouseout",function(n){for(var i=n.relatedTarget||n.toElement;i&&i!==e;)i=i.parentNode;i!==e&&t(n)})};var k=null,D=function(){function e(e,t){this._runner=e,this.priority=t,this._canceled=!1}return e.prototype.dispose=function(){this._canceled=!0},e.prototype.execute=function(){if(!this._canceled)try{this._runner()}catch(e){s.onUnexpectedError(e)}},
e.sort=function(e,t){return t.priority-e.priority},e}();!function(){var e=[],n=null,i=!1,r=!1,o=function(){for(i=!1,n=e,e=[],r=!0;n.length>0;){n.sort(D.sort);n.shift().execute()}r=!1};t.scheduleAtNextAnimationFrame=function(t,n){void 0===n&&(n=0);var r=new D(t,n);return e.push(r),i||(i=!0,f(o)),r},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,i){if(r){var o=new D(e,i);return n.push(o),o}return t.scheduleAtNextAnimationFrame(e,i)}}();var A=16,L=function(e,t){return t},R=function(e){function t(t,n,i,r,s){void 0===r&&(r=L),void 0===s&&(s=A);var a=e.call(this)||this,c=null,l=0,u=a._register(new o.TimeoutTimer),d=function(){l=(new Date).getTime(),i(c),c=null};return a._register(p(t,n,function(e){c=r(c,e);var t=(new Date).getTime()-l;t>=s?(u.cancel(),d()):u.setIfNotSet(d,s-t)})),a}return n(t,e),t}(a.Disposable);t.addDisposableThrottledListener=function(e,t,n,i,r){return new R(e,t,n,i,r)},t.getComputedStyle=g;var O=function(e,t){return parseFloat(t)||0};t.getClientArea=function(e){
if(e!==document.body)return new P(e.clientWidth,e.clientHeight);if(window.innerWidth&&window.innerHeight)return new P(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientWidth)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")};var M={getBorderLeftWidth:function(e){return v(e,"border-left-width","borderLeftWidth")},getBorderRightWidth:function(e){return v(e,"border-right-width","borderRightWidth")},getBorderTopWidth:function(e){return v(e,"border-top-width","borderTopWidth")},getBorderBottomWidth:function(e){return v(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return v(e,"padding-left","paddingLeft")},getPaddingRight:function(e){
return v(e,"padding-right","paddingRight")},getPaddingTop:function(e){return v(e,"padding-top","paddingTop")},getPaddingBottom:function(e){return v(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return v(e,"margin-left","marginLeft")},getMarginTop:function(e){return v(e,"margin-top","marginTop")},getMarginRight:function(e){return v(e,"margin-right","marginRight")},getMarginBottom:function(e){return v(e,"margin-bottom","marginBottom")},__commaSentinel:!1},P=function(){return function(e,t){this.width=e,this.height=t}}();t.Dimension=P,t.getTopLeftOffset=m,t.size=function(e,t,n){"number"==typeof t&&(e.style.width=t+"px"),"number"==typeof n&&(e.style.height=n+"px")},t.position=function(e,t,n,i,r,o){void 0===o&&(o="absolute"),"number"==typeof t&&(e.style.top=t+"px"),"number"==typeof n&&(e.style.right=n+"px"),"number"==typeof i&&(e.style.bottom=i+"px"),"number"==typeof r&&(e.style.left=r+"px"),e.style.position=o},t.getDomNodePagePosition=function(e){var n=e.getBoundingClientRect();return{
left:n.left+t.StandardWindow.scrollX,top:n.top+t.StandardWindow.scrollY,width:n.width,height:n.height}},t.StandardWindow=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),t.getTotalWidth=y,t.getContentWidth=function(e){var t=M.getBorderLeftWidth(e)+M.getBorderRightWidth(e),n=M.getPaddingLeft(e)+M.getPaddingRight(e);return e.offsetWidth-t-n},t.getTotalScrollWidth=b,t.getContentHeight=function(e){var t=M.getBorderTopWidth(e)+M.getBorderBottomWidth(e),n=M.getPaddingTop(e)+M.getPaddingBottom(e);return e.offsetHeight-t-n},t.getTotalHeight=function(e){var t=M.getMarginTop(e)+M.getMarginBottom(e);return e.offsetHeight+t
},t.getLargestChildWidth=S,t.isAncestor=function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1},t.findParentWithClass=function(e,n,i){for(;e;){if(t.hasClass(e,n))return e;if(i)if("string"==typeof i){if(t.hasClass(e,i))return null}else if(e===i)return null;e=e.parentNode}return null},t.createStyleSheet=_;var N=null;t.createCSSRule=function(e,t,n){void 0===n&&(n=C()),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)},t.removeCSSRulesContainingSelector=function(e,t){if(void 0===t&&(t=C()),t){for(var n=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),i=[],r=0;r<n.length;r++)-1!==n[r].selectorText.indexOf(e)&&i.push(r);for(r=i.length-1;r>=0;r--)t.sheet.deleteRule(i[r])}},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",
MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",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:c.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:c.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:c.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t},
t.restoreParentsScrollTop=function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode};var F=function(){function e(e){var n=this;this._onDidFocus=new d.Emitter,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new d.Emitter,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var i=!1,r=!1;h.domEvent(e,t.EventType.FOCUS,!0)(function(){r=!1,i||(i=!0,n._onDidFocus.fire())},null,this.disposables),h.domEvent(e,t.EventType.BLUR,!0)(function(){i&&(r=!0,window.setTimeout(function(){r&&(r=!1,i=!1,n._onDidBlur.fire())},0))},null,this.disposables)}return e.prototype.dispose=function(){this.disposables=a.dispose(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();t.trackFocus=function(e){return new F(e)},t.append=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return e.appendChild(t)}),t[t.length-1]},t.prepend=function(e,t){return e.insertBefore(t,e.firstChild),t}
;var W=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;t.$=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=W.exec(e);if(!r)throw new Error("Bad use of emmet");var o=document.createElement(r[1]||"div");return r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),Object.keys(t||{}).forEach(function(e){/^on\w+$/.test(e)?o[e]=t[e]:"selected"===e?t[e]&&o.setAttribute(e,"true"):o.setAttribute(e,t[e])}),n.filter(function(e){return!!e}).forEach(function(e){e instanceof Node?o.appendChild(e):o.appendChild(document.createTextNode(e))}),o},t.join=function(e,t){var n=[];return e.forEach(function(e,i){i>0&&(t instanceof Node?n.push(t.cloneNode()):n.push(document.createTextNode(t))),n.push(e)}),n},t.show=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var r=i[n];r.style.display="",r.removeAttribute("aria-hidden")}},t.hide=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var r=i[n]
;r.style.display="none",r.setAttribute("aria-hidden","true")}},t.removeTabIndexAndUpdateFocus=E,t.getElementsByTagName=function(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)},t.finalHandler=function(e){return function(t){t.preventDefault(),t.stopPropagation(),e(t)}},t.domContentLoaded=function(){return new r.TPromise(function(e,t){"complete"===document.readyState||document&&null!==document.body?i.setImmediate(e):window.addEventListener("DOMContentLoaded",e,!1)})},t.computeScreenAwareSize=function(e){var t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio},t.windowOpenNoOpener=function(e){if(i.isNative||c.isEdgeWebView)window.open(e);else{var t=window.open();t&&(t.opener=null,t.location.href=e)}}}),define(e[182],t([1,0,5,8]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=this;this.toDispose=[],this.toDispose.push(i.addDisposableListener(e,"dragover",function(){
n.timeout||(n.timeout=setTimeout(function(){t(),n.timeout=null},800))})),["dragleave","drop","dragend"].forEach(function(t){n.toDispose.push(i.addDisposableListener(e,t,function(){n.clearDragTimeout()}))})}return e.prototype.clearDragTimeout=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose),this.clearDragTimeout()},e}();t.DelayedDragHandler=r,t.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"},t.applyDragImage=function(e,t,n){var i=document.createElement("div");i.className=n,i.textContent=t,document.body.appendChild(i),e.dataTransfer.setDragImage(i,-10,-10),setTimeout(function(){return document.body.removeChild(i)},0)}}),define(e[85],t([1,0,8]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.domNode=e,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._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._layerHint=!1}return e.prototype.setMaxWidth=function(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")},e.prototype.setWidth=function(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")},e.prototype.setHeight=function(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")},e.prototype.setTop=function(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")},e.prototype.unsetTop=function(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")},e.prototype.setLeft=function(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")},e.prototype.setBottom=function(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")},e.prototype.setRight=function(e){
this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")},e.prototype.setFontFamily=function(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)},e.prototype.setFontWeight=function(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)},e.prototype.setFontSize=function(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")},e.prototype.setLineHeight=function(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")},e.prototype.setLetterSpacing=function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")},e.prototype.setClassName=function(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)},e.prototype.toggleClassName=function(e,t){n.toggleClass(this.domNode,e,t),this._className=this.domNode.className},e.prototype.setDisplay=function(e){
this._display!==e&&(this._display=e,this.domNode.style.display=this._display)},e.prototype.setPosition=function(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)},e.prototype.setVisibility=function(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)},e.prototype.setLayerHinting=function(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.willChange=this._layerHint?"transform":"auto")},e.prototype.setAttribute=function(e,t){this.domNode.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.domNode.removeAttribute(e)},e.prototype.appendChild=function(e){this.domNode.appendChild(e.domNode)},e.prototype.removeChild=function(e){this.domNode.removeChild(e.domNode)},e}();t.FastDomNode=i,t.createFastDomNode=function(e){return new i(e)}}),define(e[215],t([1,0,5,8,492,82]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardMouseMoveMerger=function(e,t){
var n=new s.StandardMouseEvent(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}};var a=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return n(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=i.dispose(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,n){var i=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var a=o.IframeUtils.getSameOriginWindowChain(),c=0;c<a.length;c++)this.hooks.push(r.addDisposableThrottledListener(a[c].window.document,"mousemove",function(e){return i.mouseMoveCallback(e)},function(e,t){
return i.mouseMoveEventMerger(e,t)})),this.hooks.push(r.addDisposableListener(a[c].window.document,"mouseup",function(e){return i.stopMonitoring(!0)}));if(o.IframeUtils.hasDifferentOriginAncestor()){var l=a[a.length-1];this.hooks.push(r.addDisposableListener(l.window.document,"mouseout",function(e){"html"===new s.StandardMouseEvent(e).target.tagName.toLowerCase()&&i.stopMonitoring(!0)})),this.hooks.push(r.addDisposableListener(l.window.document,"mouseover",function(e){"html"===new s.StandardMouseEvent(e).target.tagName.toLowerCase()&&i.stopMonitoring(!0)})),this.hooks.push(r.addDisposableListener(l.window.document.body,"mouseleave",function(e){i.stopMonitoring(!0)}))}}},t}(i.Disposable);t.GlobalMouseMoveMonitor=a});var a=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i
;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};define(e[132],t([1,0,20,5,8,111]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(s=t.EventType||(t.EventType={}));var c=function(){function e(){var e=this;this.toDispose=[],this.activeTouches={},this.handle=null,this.targets=[],this.toDispose.push(r.addDisposableListener(document,"touchstart",function(t){return e.onTouchStart(t)})),this.toDispose.push(r.addDisposableListener(document,"touchend",function(t){return e.onTouchEnd(t)})),this.toDispose.push(r.addDisposableListener(document,"touchmove",function(t){return e.onTouchMove(t)}))}return e.addTarget=function(t){
e.isTouchDevice()&&(e.INSTANCE||(e.INSTANCE=new e),e.INSTANCE.targets.push(t))},e.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},e.prototype.dispose=function(){this.handle&&(this.handle.dispose(),i.dispose(this.toDispose),this.handle=null)},e.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n<i;n++){var r=e.targetTouches.item(n);this.activeTouches[r.identifier]={id:r.identifier,initialTarget:r.target,initialTimeStamp:t,initialPageX:r.pageX,initialPageY:r.pageY,rollingTimestamps:[t],rollingPageX:[r.pageX],rollingPageY:[r.pageY]};var o=this.newGestureEvent(s.Start,r.target);o.pageX=r.pageX,o.pageY=r.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},e.prototype.onTouchEnd=function(t){for(var i=Date.now(),r=Object.keys(this.activeTouches).length,o=function(o,c){var l=t.changedTouches.item(o)
;if(!a.activeTouches.hasOwnProperty(String(l.identifier)))return console.warn("move of an UNKNOWN touch",l),"continue";var u=a.activeTouches[l.identifier],d=Date.now()-u.initialTimeStamp;if(d<e.HOLD_DELAY&&Math.abs(u.initialPageX-n.tail(u.rollingPageX))<30&&Math.abs(u.initialPageY-n.tail(u.rollingPageY))<30){(h=a.newGestureEvent(s.Tap,u.initialTarget)).pageX=n.tail(u.rollingPageX),h.pageY=n.tail(u.rollingPageY),a.dispatchEvent(h)}else if(d>=e.HOLD_DELAY&&Math.abs(u.initialPageX-n.tail(u.rollingPageX))<30&&Math.abs(u.initialPageY-n.tail(u.rollingPageY))<30){var h=a.newGestureEvent(s.Contextmenu,u.initialTarget);h.pageX=n.tail(u.rollingPageX),h.pageY=n.tail(u.rollingPageY),a.dispatchEvent(h)}else if(1===r){var p=n.tail(u.rollingPageX),f=n.tail(u.rollingPageY),g=n.tail(u.rollingTimestamps)-u.rollingTimestamps[0],v=p-u.rollingPageX[0],m=f-u.rollingPageY[0],y=a.targets.filter(function(e){return u.initialTarget instanceof Node&&e.contains(u.initialTarget)})
;a.inertia(y,i,Math.abs(v)/g,v>0?1:-1,p,Math.abs(m)/g,m>0?1:-1,f)}a.dispatchEvent(a.newGestureEvent(s.End,u.initialTarget)),delete a.activeTouches[l.identifier]},a=this,c=0,l=t.changedTouches.length;c<l;c++)o(c);this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)},e.prototype.newGestureEvent=function(e,t){var n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n},e.prototype.dispatchEvent=function(e){var t=this;this.targets.forEach(function(n){e.initialTarget instanceof Node&&n.contains(e.initialTarget)&&(n.dispatchEvent(e),t.dispatched=!0)})},e.prototype.inertia=function(t,n,i,o,a,c,l,u){var d=this;this.handle=r.scheduleAtNextAnimationFrame(function(){var r=Date.now(),h=r-n,p=0,f=0,g=!0;c+=e.SCROLL_FRICTION*h,(i+=e.SCROLL_FRICTION*h)>0&&(g=!1,p=o*i*h),c>0&&(g=!1,f=l*c*h);var v=d.newGestureEvent(s.Change);v.translationX=p,v.translationY=f,t.forEach(function(e){return e.dispatchEvent(v)}),g||d.inertia(t,r,i,o,a+p,c,l,u+f)})},
e.prototype.onTouchMove=function(e){for(var t=Date.now(),i=0,r=e.changedTouches.length;i<r;i++){var o=e.changedTouches.item(i);if(this.activeTouches.hasOwnProperty(String(o.identifier))){var a=this.activeTouches[o.identifier],c=this.newGestureEvent(s.Change,a.initialTarget);c.translationX=o.pageX-n.tail(a.rollingPageX),c.translationY=o.pageY-n.tail(a.rollingPageY),c.pageX=o.pageX,c.pageY=o.pageY,this.dispatchEvent(c),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(o.pageX),a.rollingPageY.push(o.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},e.SCROLL_FRICTION=-.005,e.HOLD_DELAY=700,a([o.memoize],e,"isTouchDevice",null),e}();t.Gesture=c}),define(e[1050],t([1,0,8]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.renderers=e,this.cache=new Map}
return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var i=n.$(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.renderers.get(e).renderTemplate(i)}}return t},e.prototype.release=function(e){e&&this.releaseRow(e)},e.prototype.releaseRow=function(e){var t=e.domNode,i=e.templateId;n.removeClass(t,"scrolling"),function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t);this.getTemplateCache(i).push(e)},e.prototype.getTemplateCache=function(e){var t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t},e.prototype.garbageCollect=function(){var e=this;this.renderers&&(this.cache.forEach(function(t,n){for(var i=0,r=t;i<r.length;i++){var o=r[i];e.renderers.get(n).disposeTemplate(o.templateData),o.domNode=null,o.templateData=null}}),this.cache.clear())},e.prototype.dispose=function(){this.garbageCollect(),this.cache.clear(),this.renderers=null},e}();t.RowCache=i}),define(e[1073],t([1,0,5,7,8,20,11]),function(e,t,n,i,r,o,s){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t,n){this.toDispose=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",this._onDidSelect=new i.Emitter,this.styles=n,this.registerListeners(),this.setOptions(e,t)}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(r.addStandardDisposableListener(this.selectElement,"change",function(t){e.selectElement.title=t.target.value,e._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value})})),this.toDispose.push(r.addStandardDisposableListener(this.selectElement,"keydown",function(e){var t=!1;s.isMacintosh?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()}))},Object.defineProperty(e.prototype,"onDidSelect",{get:function(){return this._onDidSelect.event},enumerable:!0,configurable:!0}),e.prototype.setOptions=function(e,t,n){var i=this
;if(!this.options||!o.equals(this.options,e)){this.options=e,this.selectElement.options.length=0;var r=0;this.options.forEach(function(e){i.selectElement.add(i.createOption(e,r,n===r++))})}void 0!==t&&this.select(t)},e.prototype.select=function(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selectElement.title=this.options[this.selected]},e.prototype.focus=function(){this.selectElement&&this.selectElement.focus()},e.prototype.blur=function(){this.selectElement&&this.selectElement.blur()},e.prototype.render=function(e){r.addClass(e,"select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()},e.prototype.style=function(e){this.styles=e,this.applyStyles()},e.prototype.applyStyles=function(){if(this.selectElement){
var e=this.styles.selectBackground?this.styles.selectBackground.toString():null,t=this.styles.selectForeground?this.styles.selectForeground.toString():null,n=this.styles.selectBorder?this.styles.selectBorder.toString():null;this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=n}},e.prototype.createOption=function(e,t,n){var i=document.createElement("option");return i.value=e,i.text=e,i.disabled=n,i},e.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose)},e}();t.SelectBoxNative=a}),define(e[92],t([1,0,5,82,84,8]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.onclick=function(e,t){this._register(s.addDisposableListener(e,s.EventType.CLICK,function(e){return t(new r.StandardMouseEvent(e))}))},t.prototype.onmousedown=function(e,t){
this._register(s.addDisposableListener(e,s.EventType.MOUSE_DOWN,function(e){return t(new r.StandardMouseEvent(e))}))},t.prototype.onmouseover=function(e,t){this._register(s.addDisposableListener(e,s.EventType.MOUSE_OVER,function(e){return t(new r.StandardMouseEvent(e))}))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(s.addDisposableNonBubblingMouseOutListener(e,function(e){return t(new r.StandardMouseEvent(e))}))},t.prototype.onkeydown=function(e,t){this._register(s.addDisposableListener(e,s.EventType.KEY_DOWN,function(e){return t(new o.StandardKeyboardEvent(e))}))},t.prototype.onkeyup=function(e,t){this._register(s.addDisposableListener(e,s.EventType.KEY_UP,function(e){return t(new o.StandardKeyboardEvent(e))}))},t.prototype.oninput=function(e,t){this._register(s.addDisposableListener(e,s.EventType.INPUT,t))},t.prototype.onblur=function(e,t){this._register(s.addDisposableListener(e,s.EventType.BLUR,t))},t.prototype.onfocus=function(e,t){
this._register(s.addDisposableListener(e,s.EventType.FOCUS,t))},t.prototype.onchange=function(e,t){this._register(s.addDisposableListener(e,s.EventType.CHANGE,t))},t}(i.Disposable);t.Widget=a}),define(e[359],t([1,0,215,92,18]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ARROW_IMG_SIZE=11;var s=function(e){function r(n){var r=e.call(this)||this;return r._onActivate=n.onActivate,r.bgDomNode=document.createElement("div"),r.bgDomNode.className="arrow-background",r.bgDomNode.style.position="absolute",r.bgDomNode.style.width=n.bgWidth+"px",r.bgDomNode.style.height=n.bgHeight+"px",void 0!==n.top&&(r.bgDomNode.style.top="0px"),void 0!==n.left&&(r.bgDomNode.style.left="0px"),void 0!==n.bottom&&(r.bgDomNode.style.bottom="0px"),void 0!==n.right&&(r.bgDomNode.style.right="0px"),r.domNode=document.createElement("div"),r.domNode.className=n.className,r.domNode.style.position="absolute",r.domNode.style.width=t.ARROW_IMG_SIZE+"px",r.domNode.style.height=t.ARROW_IMG_SIZE+"px",
void 0!==n.top&&(r.domNode.style.top=n.top+"px"),void 0!==n.left&&(r.domNode.style.left=n.left+"px"),void 0!==n.bottom&&(r.domNode.style.bottom=n.bottom+"px"),void 0!==n.right&&(r.domNode.style.right=n.right+"px"),r._mouseMoveMonitor=r._register(new i.GlobalMouseMoveMonitor),r.onmousedown(r.bgDomNode,function(e){return r._arrowMouseDown(e)}),r.onmousedown(r.domNode,function(e){return r._arrowMouseDown(e)}),r._mousedownRepeatTimer=r._register(new o.IntervalTimer),r._mousedownScheduleRepeatTimer=r._register(new o.TimeoutTimer),r}return n(r,e),r.prototype._arrowMouseDown=function(e){var t=this;this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(function(){t._mousedownRepeatTimer.cancelAndSet(function(){return t._onActivate()},1e3/24)},200),this._mouseMoveMonitor.startMonitoring(i.standardMouseMoveMerger,function(e){},function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()},r}(r.Widget);t.ScrollbarArrow=s}),
define(e[148],t([1,0,20,14,25,50,4]),function(e,t,n,i,r,o,s){"use strict";function a(e){switch(e){case 0:return"";case 1:return S+"*?";default:return"(?:"+b+"|"+S+"+"+b+"|"+b+S+"+)*?"}}function c(e,t){if(!e)return[];for(var n,i=[],r=!1,o=!1,s="",a=0;a<e.length;a++){switch(n=e[a]){case t:if(!r&&!o){i.push(s),s="";continue}break;case"{":r=!0;break;case"}":r=!1;break;case"[":o=!0;break;case"]":o=!1}s+=n}return s&&i.push(s),i}function l(e){if(!e)return"";var t="",n=c(e,y);if(n.every(function(e){return e===m}))t=".*";else{var r=!1;n.forEach(function(e,o){if(e!==m){for(var s,u=!1,d="",h=!1,p="",f=0;f<e.length;f++)if("}"!==(s=e[f])&&u)d+=s;else if(!h||"]"===s&&p)switch(s){case"{":u=!0;continue;case"[":h=!0;continue;case"}":var g="(?:"+c(d,",").map(function(e){return l(e)}).join("|")+")";t+=g,u=!1,d="";break;case"]":t+="["+p+"]",h=!1,p="";break;case"?":t+=S;continue;case"*":t+=a(1);continue;default:t+=i.escapeRegExpCharacters(s)}else{p+="-"===s?s:"^"!==s&&"!"!==s||p?s===y?"":i.escapeRegExpCharacters(s):"^"}
o<n.length-1&&(n[o+1]!==m||o+2<n.length)&&(t+=b),r=!1}else r||(t+=a(2),r=!0)})}return t}function u(e,t){if(!e)return A;var r;r="string"!=typeof e?e.pattern:e;var o=(r=r.trim())+"_"+!!t.trimForExclusions,s=k.get(o);if(s)return d(s,e);var a;if(C.test(r)){var c=r.substr(4);s=function(e,t){return e&&i.endsWith(e,c)?r:null}}else s=(a=E.exec(h(r,t)))?function(e,t){var n="/"+e,r="\\"+e,o=function(o,s){return o?s?s===e?t:null:o===e||i.endsWith(o,n)||i.endsWith(o,r)?t:null:null},s=[e];return o.basenames=s,o.patterns=[t],o.allBasenames=s,o}(a[1],r):(t.trimForExclusions?I:w).test(r)?function(e,t){var i=v(e.slice(1,-1).split(",").map(function(e){return u(e,t)}).filter(function(e){return e!==A}),e),r=i.length;if(!r)return A;if(1===r)return i[0];var o=function(t,n){for(var r=0,o=i.length;r<o;r++)if(i[r](t,n))return e;return null},s=n.first(i,function(e){return!!e.allBasenames});s&&(o.allBasenames=s.allBasenames);var a=i.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);a.length&&(o.allPaths=a);return o
}(r,t):(a=T.exec(h(r,t)))?p(a[1].substr(1),r,!0):(a=x.exec(h(r,t)))?p(a[1],r,!1):function(e){try{var t=new RegExp("^"+l(e)+"$");return function(n,i){return t.lastIndex=0,n&&t.test(n)?e:null}}catch(e){return A}}(r);return k.set(o,s),d(s,e)}function d(e,t){return"string"==typeof t?e:function(n,i){return r.isEqualOrParent(n,t.base)?e(r.normalize(t.pathToRelative(t.base,n)),i):null}}function h(e,t){return t.trimForExclusions&&i.endsWith(e,"/**")?e.substr(0,e.length-2):e}function p(e,t,n){var o=r.nativeSep!==r.sep?e.replace(_,r.nativeSep):e,s=r.nativeSep+o,a=n?function(e,n){return e&&(e===o||i.endsWith(e,s))?t:null}:function(e,n){return e&&e===o?t:null};return a.allPaths=[(n?"*/":"./")+e],a}function f(e,t){if(void 0===t&&(t={}),!e)return D;if("string"==typeof e||g(e)){var i=u(e,t);if(i===A)return D;var o=function(e,t){return!!i(e,t)};return i.allBasenames&&(o.allBasenames=i.allBasenames),i.allPaths&&(o.allPaths=i.allPaths),o}return function(e,t){var i=v(Object.getOwnPropertyNames(e).map(function(n){
return function(e,t,n){if(!1===t)return A;var i=u(e,n);if(i===A)return A;if("boolean"==typeof t)return i;if(t){var r=t.when;if("string"==typeof r){var o=function(t){var n=r.replace("$(basename)",t.name);return-1!==t.siblings.indexOf(n)?e:null},a=function(e,t,n){if(!i(e,t))return null;var r=n();return r?s.TPromise.is(r)?r.then(o):o(r):null};return a.requiresSiblings=!0,a}}return i}(n,e[n],t)}).filter(function(e){return e!==A})),o=i.length;if(!o)return A;if(!i.some(function(e){return e.requiresSiblings})){if(1===o)return i[0];var a=function(e,t,n){for(var r=0,o=i.length;r<o;r++){var s=i[r](e,t);if(s)return s}return null},c=n.first(i,function(e){return!!e.allBasenames});c&&(a.allBasenames=c.allBasenames);var l=i.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return l.length&&(a.allPaths=l),a}var d=function(e,t,n){function o(n){if(n&&n.length){t||(t=r.basename(e));var i=t.substr(0,t.length-r.extname(e).length);return{siblings:n,name:i}}}function a(){if(!l){l=!0;var e=n()
;c=s.TPromise.is(e)?e.then(o):o(e)}return c}for(var c,l=!n,u=0,d=i.length;u<d;u++){var h=i[u](e,t,a);if(h)return h}return null},h=n.first(i,function(e){return!!e.allBasenames});h&&(d.allBasenames=h.allBasenames);var p=i.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);p.length&&(d.allPaths=p);return d}(e,t)}function g(e){var t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern&&"function"==typeof t.pathToRelative}function v(e,t){var n=e.filter(function(e){return!!e.basenames});if(n.length<2)return e;var i,r=n.reduce(function(e,t){return e.concat(t.basenames)},[]);if(t){i=[];for(var o=0,s=r.length;o<s;o++)i.push(t)}else i=n.reduce(function(e,t){return e.concat(t.patterns)},[]);var a=function(e,t){if(!e)return null;if(!t){var n=void 0;for(n=e.length;n>0;n--){var o=e.charCodeAt(n-1);if(47===o||92===o)break}t=e.substr(n)}var s=r.indexOf(t);return-1!==s?i[s]:null};a.basenames=r,a.patterns=i,a.allBasenames=r;var c=e.filter(function(e){return!e.basenames});return c.push(a),c}
Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)};var m="**",y="/",b="[/\\\\]",S="[^/\\\\]",_=/\//g;t.splitGlobAware=c;var C=/^\*\*\/\*\.[\w\.-]+$/,E=/^\*\*\/([\w\.-]+)\/?$/,w=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,I=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,T=/^\*\*((\/[\w\.-]+)+)\/?$/,x=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,k=new o.LRUCache(1e4),D=function(){return!1},A=function(){return null};t.match=function(e,t,n){return!(!e||!t)&&f(e)(t,void 0,n)},t.parse=f,t.isRelativePattern=g,t.parseToAsync=function(e,t){var n=f(e,t);return function(e,t,i){var r=n(e,t,i);return r instanceof s.TPromise?r:s.TPromise.as(r)}},t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}}),define(e[134],t([1,0,20]),function(e,t,n){"use strict";function i(e){return r(e)?!e.value:!Array.isArray(e)||e.every(i)}function r(e){
return e instanceof s||!(!e||"object"!=typeof e)&&("string"==typeof e.value&&("boolean"==typeof e.isTrusted||void 0===e.isTrusted))}function o(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){void 0===e&&(e=""),this.value=e}return e.prototype.appendText=function(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this},e.prototype.appendMarkdown=function(e){return this.value+=e,this},e.prototype.appendCodeblock=function(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this},e}();t.MarkdownString=s,t.isEmptyMarkdownString=i,t.isMarkdownString=r,t.markedStringsEquals=function(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?n.equals(e,t,o):!(!r(e)||!r(t))&&o(e,t))},t.removeMarkdownEscapes=function(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}}),define(e[251],t([1,0,8,149,14,134,250]),function(e,t,n,i,r,o,s){
"use strict";function a(e){var t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}function c(e,t){void 0===t&&(t={});var n=a(t);return l(n,function(e){var t={type:1,children:[]},n=0,i=t,r=[],o=new h(e);for(;!o.eos();){var s=o.next(),a="\\"===s&&0!==u(o.peek());if(a&&(s=o.next()),!a&&function(e){return 0!==u(e)}(s)&&s===o.peek()){o.advance(),2===i.type&&(i=r.pop());var c=u(s);if(i.type===c||5===i.type&&6===c)i=r.pop();else{var l={type:c,children:[]};5===c&&(l.index=n,n++),i.children.push(l),r.push(i),i=l}}else if("\n"===s)2===i.type&&(i=r.pop()),i.children.push({type:7});else if(2!==i.type){var d={type:2,content:s};i.children.push(d),r.push(i),i=d}else i.content+=s}2===i.type&&(i=r.pop());r.length;return t}(e),t.actionHandler),n}function l(e,t,i){var r;if(2===t.type)r=document.createTextNode(t.content);else if(3===t.type)r=document.createElement("b");else if(4===t.type)r=document.createElement("i");else if(5===t.type&&i){var o=document.createElement("a")
;o.href="#",i.disposeables.push(n.addStandardDisposableListener(o,"click",function(e){i.callback(String(t.index),e)})),r=o}else 7===t.type?r=document.createElement("br"):1===t.type&&(r=e);e!==r&&e.appendChild(r),Array.isArray(t.children)&&t.children.forEach(function(e){l(r,e,i)})}function u(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.renderText=function(e,t){void 0===t&&(t={});var n=a(t);return n.textContent=e,n},t.renderFormattedText=c,t.renderMarkdown=function(e,t){void 0===t&&(t={});var c,l=a(t),u=new Promise(function(e){return c=e}),d=new s.marked.Renderer;d.image=function(e,t,n){var i=[];if(e){var r=e.split("|").map(function(e){return e.trim()});e=r[0];var o=r[1];if(o){var s=/height=(\d+)/.exec(o),a=/width=(\d+)/.exec(o),c=s&&s[1],l=a&&a[1],u=isFinite(parseInt(l)),d=isFinite(parseInt(c));u&&i.push('width="'+l+'"'),d&&i.push('height="'+c+'"')}}var h=[];return e&&h.push('src="'+e+'"'),
n&&h.push('alt="'+n+'"'),t&&h.push('title="'+t+'"'),i.length&&(h=h.concat(i)),"<img "+h.join(" ")+">"},d.link=function(t,n,i){return t===i&&(i=o.removeMarkdownEscapes(i)),n=o.removeMarkdownEscapes(n),!(t=o.removeMarkdownEscapes(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?i:'<a href="#" data-href="'+t+'" title="'+(n||t)+'">'+i+"</a>"},d.paragraph=function(e){return"<p>"+e+"</p>"},t.codeBlockRenderer&&(d.code=function(e,n){var o=t.codeBlockRenderer(n,e),s=i.defaultGenerator.nextId(),a=Promise.all([o,u]).then(function(e){var t=e[0],n=l.querySelector('div[data-code="'+s+'"]');n&&(n.innerHTML=t)}).catch(function(e){});return t.codeBlockRenderCallback&&a.then(t.codeBlockRenderCallback),'<div class="code" data-code="'+s+'">'+r.escape(e)+"</div>"}),t.actionHandler&&t.actionHandler.disposeables.push(n.addStandardDisposableListener(l,"click",function(e){var n=e.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName){var i=n.dataset.href;i&&t.actionHandler.callback(i,e)}}));var h={
sanitize:!0,renderer:d};return l.innerHTML=s.marked(e.value,h),c(),l};var d,h=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();!function(e){e[e.Invalid=0]="Invalid",e[e.Root=1]="Root",e[e.Text=2]="Text",e[e.Bold=3]="Bold",e[e.Italics=4]="Italics",e[e.Action=5]="Action",e[e.ActionClose=6]="ActionClose",e[e.NewLine=7]="NewLine"}(d||(d={}))}),define(e[151],t([1,0,25,14,148]),function(e,t,n,i,r){"use strict";function o(e,t){void 0===t&&(t=!1);var i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,
filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(n.sep)>=0}}(e);l.push(i),i.userConfigured?d.push(i):u.push(i),t&&!i.userConfigured&&l.forEach(function(e){e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn("Overwriting extension <<"+i.extension+">> to now point to mime <<"+i.mime+">>"),i.filename&&e.filename===i.filename&&console.warn("Overwriting filename <<"+i.filename+">> to now point to mime <<"+i.mime+">>"),i.filepattern&&e.filepattern===i.filepattern&&console.warn("Overwriting filepattern <<"+i.filepattern+">> to now point to mime <<"+i.mime+">>"),i.firstline&&e.firstline===i.firstline&&console.warn("Overwriting firstline <<"+i.firstline+">> to now point to mime <<"+i.mime+">>"))})}function s(e,r){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),s=a(e,o,d);if(s)return[s,t.MIME_TEXT];var c=a(e,o,u);if(c)return[c,t.MIME_TEXT];if(r){var h=function(e){
i.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=0;t<l.length;++t){var n=l[t];if(n.firstline){var r=e.match(n.firstline);if(r&&r.length>0)return n.mime}}return null}(r);if(h)return[h,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function a(e,t,n){for(var o,s,a,c=n.length-1;c>=0;c--){var l=n[c];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){var u=l.filepatternOnPath?e:t;r.match(l.filepatternLowercase,u)&&(s=l)}l.extension&&(!a||l.extension.length>a.extension.length)&&i.endsWith(t,l.extensionLowercase)&&(a=l)}return o?o.mime:s?s.mime:a?a.mime:null}function c(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&c(e[0]))}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var l=[],u=[],d=[];t.registerTextMime=o,t.clearTextMimes=function(e){e?(l=l.filter(function(e){return!e.userConfigured}),d=[]):(l=[],
u=[],d=[])},t.guessMimeTypes=s,t.isUnspecific=c,t.suggestFilename=function(e,t){for(var n=0;n<l.length;n++){var i=l[n];if(!i.userConfigured&&i.id===e&&i.extension)return t+i.extension}return t};var h={".bmp":"image/bmp",".gif":"image/gif",".jpg":"image/jpg",".jpeg":"image/jpg",".jpe":"image/jpg",".png":"image/png",".tiff":"image/tiff",".tif":"image/tiff",".ico":"image/x-icon",".tga":"image/x-tga",".psd":"image/vnd.adobe.photoshop",".webp":"image/webp",".mid":"audio/midi",".midi":"audio/midi",".mp4a":"audio/mp4",".mpga":"audio/mpeg",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".m2a":"audio/mpeg",".m3a":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".spx":"audio/ogg",".aac":"audio/x-aac",".wav":"audio/x-wav",".wma":"audio/x-ms-wma",".mp4":"video/mp4",".mp4v":"video/mp4",".mpg4":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpe":"video/mpeg",".m1v":"video/mpeg",".m2v":"video/mpeg",".ogv":"video/ogg",".qt":"video/quicktime",".mov":"video/quicktime",".webm":"video/webm",
".mkv":"video/x-matroska",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".avi":"video/x-msvideo",".movie":"video/x-sgi-movie"};t.getMediaMime=function(e){var t=n.extname(e);return h[t.toLowerCase()]}}),define(e[352],t([1,0,4,30]),function(e,t,n,i){"use strict";function r(e){return{firstPage:e,total:e.length,pageSize:e.length,getPage:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.singlePagePager=r;var o=function(){function e(e,t){void 0===t&&(t=500),this.pageTimeout=t,this.pages=[],this.pager=i.isArray(e)?r(e):e,this.pages=[{isResolved:!0,promise:null,promiseIndexes:new Set,elements:this.pager.firstPage.slice()}];for(var n=0,o=Math.ceil(this.pager.total/this.pager.pageSize)-1;n<o;n++)this.pages.push({isResolved:!1,promise:null,promiseIndexes:new Set,elements:[]})}return Object.defineProperty(e.prototype,"length",{get:function(){return this.pager.total},enumerable:!0,configurable:!0}),e.prototype.isResolved=function(e){
var t=Math.floor(e/this.pager.pageSize);return!!this.pages[t].isResolved},e.prototype.get=function(e){var t=Math.floor(e/this.pager.pageSize),n=e%this.pager.pageSize;return this.pages[t].elements[n]},e.prototype.resolve=function(e){var t=this,i=Math.floor(e/this.pager.pageSize),r=e%this.pager.pageSize,o=this.pages[i];return o.isResolved?n.TPromise.as(o.elements[r]):(o.promise||(o.promise=n.TPromise.timeout(this.pageTimeout).then(function(){return t.pager.getPage(i)}).then(function(e){o.elements=e,o.isResolved=!0,o.promise=null},function(e){return o.isResolved=!1,o.promise=null,n.TPromise.wrapError(e)})),new n.TPromise(function(t,n){o.promiseIndexes.add(e),o.promise.done(function(){return t(o.elements[r])})},function(){o.promise&&(o.promiseIndexes.delete(e),0===o.promiseIndexes.size&&o.promise.cancel())}))},e}();t.PagedModel=o,t.mapPager=function(e,t){return{firstPage:e.firstPage.map(t),total:e.total,pageSize:e.pageSize,getPage:function(n){return e.getPage(n).then(function(e){return e.map(t)})}}},
t.mergePagers=function(e,t){return{firstPage:e.firstPage.concat(t.firstPage),total:e.total+t.total,pageSize:e.pageSize+t.pageSize,getPage:function(i){return n.TPromise.join([e.getPage(i),t.getPage(i)]).then(function(e){var t=e[0],n=e[1];return t.concat(n)})}}}}),define(e[101],t([1,0,5,7]),function(e,t,i,r){"use strict";function o(e,t){var n=t-e;return function(t){return e+n*function(e){return 1-function(e){return Math.pow(e,3)}(1-e)}(t)}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(t.ScrollbarVisibility||(t.ScrollbarVisibility={}));var s=function(){function e(e,t,n,i,r,o){t|=0,n|=0,i|=0,r|=0,o|=0,(e|=0)<0&&(e=0),n+e>t&&(n=t-e),n<0&&(n=0),i<0&&(i=0),o+i>r&&(o=r-i),o<0&&(o=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=r,this.scrollTop=o}return e.prototype.equals=function(e){
return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,
scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:r,scrollHeightChanged:o,scrollTopChanged:s}},e}();t.ScrollState=s;var a=function(e){function t(t,n){var i=e.call(this)||this;return i._onScroll=i._register(new r.Emitter),i.onScroll=i._onScroll.event,i._smoothScrollDuration=t,i._scheduleAtNextAnimationFrame=n,i._state=new s(0,0,0,0,0,0),i._smoothScrolling=null,i}return n(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},
t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;var n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=n}else{var i=this._state.withScrollPosition(e)
;this._smoothScrolling=l.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())})},t.prototype._performSmoothScrolling=function(){var e=this,t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())})},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(i.Disposable);t.Scrollable=a;var c=function(){return function(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}();t.SmoothScrollingUpdate=c;var l=function(){function e(e,t,n,i){
this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){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)},e.prototype._initAnimation=function(e,t,n){if(Math.abs(e-t)>2.5*n){var i=void 0,r=void 0;return e<t?(i=e+.75*n,r=t-.75*n):(i=e-.75*n,r=t+.75*n),function(e,t,n){return function(i){return i<n?e(i/n):t((i-n)/(1-n))}}(o(e,i),o(r,t),.33)}return o(e,t)},e.prototype.dispose=function(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)},e.prototype.acceptScrollDimensions=function(e){this.to=e.withScrollPosition(this.to),this._initAnimations()},e.prototype.tick=function(){return this._tick(Date.now())},e.prototype._tick=function(e){var t=(e-this._startTime)/this.duration;if(t<1){
var n=this.scrollLeft(t),i=this.scrollTop(t);return new c(n,i,!1)}return new c(this.to.scrollLeft,this.to.scrollTop,!0)},e.prototype.combine=function(t,n,i){return e.start(t,n,i)},e.start=function(t,n,i){i+=10;return new e(t,n,Date.now()-10,i)},e}();t.SmoothScrollingOperation=l}),define(e[1030],t([1,0,5,18,101]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,i){var o=e.call(this)||this;return o._visibility=t,o._visibleClassName=n,o._invisibleClassName=i,o._domNode=null,o._isVisible=!1,o._isNeeded=!1,o._shouldBeVisible=!1,o._revealTimer=o._register(new r.TimeoutTimer),o}return n(t,e),t.prototype.applyVisibilitySetting=function(e){return this._visibility!==o.ScrollbarVisibility.Hidden&&(this._visibility===o.ScrollbarVisibility.Visible||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){
this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(function(){e._domNode.setClassName(e._visibleClassName)},0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(i.Disposable);t.ScrollbarVisibilityController=s}),define(e[425],t([1,0,11,8,215,92,85,359,1030]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t){var n=e.call(this)||this;return n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,
n._visibilityController=n._register(new l.ScrollbarVisibilityController(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._mouseMoveMonitor=n._register(new o.GlobalMouseMoveMonitor),n._shouldRender=!0,n.domNode=a.createFastDomNode(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,function(e){return n._domNodeMouseDown(e)}),n}return n(t,e),t.prototype._createArrow=function(e){var t=this._register(new c.ScrollbarArrow(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,n,i){var r=this;this.slider=a.createFastDomNode(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),this.slider.setWidth(n),
this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,function(e){e.leftButton&&(e.preventDefault(),r._sliderMouseDown(e,function(){}))})},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype.beginReveal=function(){
this._visibilityController.setShouldBeVisible(!0)},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1)},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderMousePosition(e);n<=r&&r<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,function(){})):this._onMouseDown(e)},t.prototype._onMouseDown=function(e){var t,n
;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{var i=r.getDomNodePagePosition(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,function(){}))},t.prototype._sliderMouseDown=function(e,t){var n=this,r=this._sliderMousePosition(e),s=this._sliderOrthogonalMousePosition(e),a=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(o.standardMouseMoveMerger,function(e){var t=n._sliderOrthogonalMousePosition(e),o=Math.abs(t-s);if(i.isWindows&&o>140)n._setDesiredScrollPositionNow(a.getScrollPosition());else{var c=n._sliderMousePosition(e)-r;n._setDesiredScrollPositionNow(a.getDesiredScrollPositionFromDelta(c))}},function(){
n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()}),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(s.Widget);t.AbstractScrollbar=u}),define(e[1058],t([1,0,425,82,101,407,359]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i){var c=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new s.ScrollbarState(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===o.ScrollbarVisibility.Hidden?0:n.horizontalScrollbarSize,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var l=(n.arrowSize-a.ARROW_IMG_SIZE)/2,u=(n.horizontalScrollbarSize-a.ARROW_IMG_SIZE)/2;c._createArrow({className:"left-arrow",top:u,left:l,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,
onActivate:function(){return c._host.onMouseWheel(new r.StandardMouseWheelEvent(null,1,0))}}),c._createArrow({className:"right-arrow",top:u,left:void 0,bottom:void 0,right:l,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return c._host.onMouseWheel(new r.StandardMouseWheelEvent(null,-1,0))}})}return c._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),c}return n(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},
t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(i.AbstractScrollbar);t.HorizontalScrollbar=c}),define(e[1065],t([1,0,425,82,101,407,359]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i){var c=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new s.ScrollbarState(n.verticalHasArrows?n.arrowSize:0,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var l=(n.arrowSize-a.ARROW_IMG_SIZE)/2,u=(n.verticalScrollbarSize-a.ARROW_IMG_SIZE)/2;c._createArrow({className:"up-arrow",top:l,left:u,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){
return c._host.onMouseWheel(new r.StandardMouseWheelEvent(null,0,1))}}),c._createArrow({className:"down-arrow",top:void 0,left:u,bottom:l,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return c._host.onMouseWheel(new r.StandardMouseWheelEvent(null,0,-1))}})}return c._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,null),c}return n(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},
t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(i.AbstractScrollbar);t.VerticalScrollbar=c}),define(e[1070],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.elements=[],this._onDidSplice=new n.Emitter,this.onDidSplice=this._onDidSplice.event}return e.prototype.splice=function(e,t,n){var i;void 0===n&&(n=[]),(i=this.elements).splice.apply(i,[e,t].concat(n)),this._onDidSplice.fire({start:e,deleteCount:t,toInsert:n})},e}();t.Sequence=i}),define(e[433],t([1,0,9,5,4,18,11]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="$initialize",l=!1;t.logOnceWebWorkerWarning=function(e){a.isWeb&&(l||(l=!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(e.message))};var u=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=String(++this._lastSentReq),i={c:null,e:null},r=new o.TPromise(function(e,t,n){i.c=e,i.e=t},function(){});return this._pendingReplies[n]=i,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),r},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var r=this._pendingReplies[n.seq]
;if(delete this._pendingReplies[n.seq],n.err){var o=n.err;return n.err.$isError&&((o=new Error).name=n.err.name,o.message=n.err.message,o.stack=n.err.stack),void r.e(o)}r.c(n.res)}else{var s=e,a=s.req;this._handler.handleMessage(s.method,s.args).then(function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})},function(e){e.detail instanceof Error&&(e.detail=i.transformErrorForSerialization(e.detail)),t._send({vsWorker:t._workerId,seq:a,res:void 0,err:i.transformErrorForSerialization(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),d=function(e){function t(t,n){var i=e.call(this)||this,r=null,s=null;i._worker=i._register(t.create("vs/base/common/worker/simpleWorker",function(e){i._protocol.handleMessage(e)},function(e){s(e)})),i._protocol=new u({sendMessage:function(e){i._worker.postMessage(e)},handleMessage:function(e,t){return o.TPromise.as(null)}}),i._protocol.setWorkerId(i._worker.getId());var a=null
;void 0!==self.require&&"function"==typeof self.require.getConfig?a=self.require.getConfig():void 0!==self.requirejs&&(a=self.requirejs.s.contexts._.config),i._lazyProxy=new o.TPromise(function(e,t,n){r=e,s=t},function(){}),i._onModuleLoaded=i._protocol.sendMessage(c,[i._worker.getId(),n,a]),i._onModuleLoaded.then(function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=d(e[n],l);r(t)},function(e){s(e),i._onError("Worker failed to load "+n,e)});var l=function(e,t){return i._request(e,t)},d=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return i}return n(t,e),t.prototype.getProxyObject=function(){return new s.ShallowCancelThenPromise(this._lazyProxy)},t.prototype._request=function(e,t){var n=this;return new o.TPromise(function(i,r,o){n._onModuleLoaded.then(function(){n._protocol.sendMessage(e,t).then(i,r)},r)},function(){})},t.prototype._onError=function(e,t){console.error(e),console.info(t)},t}(r.Disposable);t.SimpleWorkerClient=d;var h=function(){function e(e,t){
var n=this;this._requestHandler=t,this._protocol=new u({sendMessage:function(t){e(t)},handleMessage:function(e,t){return n._handleMessage(e,t)}})}return e.prototype.onmessage=function(e){this._protocol.handleMessage(e)},e.prototype._handleMessage=function(e,t){if(e===c)return this.initialize(t[0],t[1],t[2]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return o.TPromise.wrapError(new Error("Missing requestHandler or method: "+e));try{return o.TPromise.as(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return o.TPromise.wrapError(e)}},e.prototype.initialize=function(e,t,n){var i=this;if(this._protocol.setWorkerId(e),this._requestHandler){var r=[];for(var s in this._requestHandler)"function"==typeof this._requestHandler[s]&&r.push(s);return o.TPromise.as(r)}n&&(void 0!==n.baseUrl&&delete n.baseUrl,void 0!==n.paths&&void 0!==n.paths.vs&&delete n.paths.vs,n.catchError=!0,self.require.config(n));var a,c,l=new o.TPromise(function(e,t,n){a=e,c=t})
;return self.require([t],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];i._requestHandler=n.create();var r=[];for(var o in i._requestHandler)"function"==typeof i._requestHandler[o]&&r.push(o);a(r)},c),l},e}();t.SimpleWorkerServer=h,t.create=function(e){return new h(e,null)}}),define(e[348],t([1,0,10]),function(e,t,n){"use strict";function i(e){var t,n=[];try{var i=JSON.parse(e.arguments),r=i[i.length-1];r&&r.__$stack&&(i.pop(),t=r.__$stack),n.push.apply(n,i)}catch(t){n.push("Unable to log remote console arguments",e.arguments)}return{args:n,stack:t}}function r(e){if("string"!=typeof e)return r(i(e).stack);var t=e;if(t){var s=o(t),a=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(s);if(a&&4===a.length)return{uri:n.default.file(a[1]),line:Number(a[2]),column:Number(a[3])}}}function o(e){if(!e)return e;var t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function s(e){return"color: "+e}Object.defineProperty(t,"__esModule",{value:!0}),
t.isRemoteConsoleLog=function(e){var t=e;return t&&"string"==typeof t.type&&"string"==typeof t.severity},t.parse=i,t.getFirstFrame=r,t.log=function(e,t){var n=i(e),r=n.args,a=n.stack,c="string"==typeof r[0]&&1===r.length,l=o(a);l&&(l="("+l.trim()+")");var u=[];u="string"==typeof r[0]?l&&c?["%c["+t+"] %c"+r[0]+" %c"+l,s("blue"),s("black"),s("grey")]:["%c["+t+"] %c"+r[0],s("blue"),s("black")].concat(r.slice(1)):["%c["+t+"]%",s("blue")].concat(r),l&&!c&&u.push(l),console[e.severity].apply(console,u)}}),define(e[479],t([1,0,1598]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){void 0===e&&(e="utf8"),this.stringDecoder=new n.StringDecoder(e),this.remaining=null}return e.prototype.write=function(e){var t=[],n=this.remaining?this.remaining+this.stringDecoder.write(e):this.stringDecoder.write(e);if(n.length<1)return t;for(var i,r=0,o=r;o<n.length;)if(13===(i=n.charCodeAt(o))||10===i){if(t.push(n.substring(r,o)),++o<n.length){var s=i;i=n.charCodeAt(o),
(13===s&&10===i||10===s&&13===i)&&o++}r=o}else o++;return this.remaining=r<n.length?n.substr(r):null,t},e.prototype.end=function(){return this.remaining},e}();t.LineDecoder=i}),define(e[480],t([1,0,853]),function(e,t,n){"use strict";function i(e,t,r){if(n.ok(e,"Missing first parameter"),n.ok("function"==typeof t,"Second parameter must be a function that is called for each element"),n.ok("function"==typeof r,"Third parameter must be a function that is called on error and success"),"function"==typeof e)try{e(function(e,n){e?r(e,null):i(n,t,r)})}catch(e){r(e,null)}else{var o=[],s=function(n){if(n<e.length)try{t(e[n],function(e,t){!0!==e&&!1!==e||(t=e,e=null),e?r(e,null):(t&&o.push(t),process.nextTick(function(){s(n+1)}))},n,e.length)}catch(e){r(e,null)}else r(null,o)};s(0)}}function r(e){!function(e){n.ok(e.length>1,"Need at least one error handler and one function to process sequence"),e.forEach(function(e){n.ok("function"==typeof e)});var t=e.splice(0,1)[0],r=null;i(e,function(e,t){var n=function(e,n){
!0!==e&&!1!==e||(n=e,e=null),e?t(e,null):(r=n,t(null,null))};try{e.call(n,r)}catch(e){t(e,null)}},function(e,n){e&&t(e)})}(Array.isArray(e)?e:Array.prototype.slice.call(arguments))}Object.defineProperty(t,"__esModule",{value:!0}),t.parallel=function(e,t,n){var i=new Array(e.length),r=new Array(e.length),o=!1,s=0;if(0===e.length)return n(null,[]);e.forEach(function(a,c){t(a,function(t,a){if(t?(o=!0,i[c]=null,r[c]=t):(i[c]=a,r[c]=null),++s===e.length)return n(o?r:null,i)})})},t.loop=i,t.sequence=r}),define(e[854],t([1,0,4,9,136,93,50]),function(e,t,n,i,r,o,s){"use strict";function a(){return c||(c=new n.TPromise(function(t){n.TPromise.join([new Promise(function(t,n){e(["crypto"],t,n)}),new Promise(function(t,n){e(["getmac"],t,n)})]).then(function(e){var n=e[0],r=e[1];try{r.getMac(function(e,i){t(e?void 0:n.createHash("sha256").update(i,"utf8").digest("hex"))})}catch(e){i.onUnexpectedError(e),t(void 0)}},function(e){i.onUnexpectedError(e),t(void 0)})}).then(function(e){return e||r.generateUuid()}))}
Object.defineProperty(t,"__esModule",{value:!0}),t.virtualMachineHint=new(function(){function e(){}return e.prototype._isVirtualMachineMacAdress=function(e){return this._virtualMachineOUIs||(this._virtualMachineOUIs=s.TernarySearchTree.forStrings(),this._virtualMachineOUIs.set("00-50-56",!0),this._virtualMachineOUIs.set("00-0C-29",!0),this._virtualMachineOUIs.set("00-05-69",!0),this._virtualMachineOUIs.set("00-03-FF",!0),this._virtualMachineOUIs.set("00-1C-42",!0),this._virtualMachineOUIs.set("00-16-3E",!0),this._virtualMachineOUIs.set("08-00-27",!0),this._virtualMachineOUIs.set("00:50:56",!0),this._virtualMachineOUIs.set("00:0C:29",!0),this._virtualMachineOUIs.set("00:05:69",!0),this._virtualMachineOUIs.set("00:03:FF",!0),this._virtualMachineOUIs.set("00:1C:42",!0),this._virtualMachineOUIs.set("00:16:3E",!0),this._virtualMachineOUIs.set("08:00:27",!0)),this._virtualMachineOUIs.findSubstr(e)},e.prototype.value=function(){if(void 0===this._value){var e=0,t=0,n=o.networkInterfaces()
;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i))for(var r=0,s=n[i];r<s.length;r++){var a=s[r],c=a.mac;a.internal||(t+=1,this._isVirtualMachineMacAdress(c.toUpperCase())&&(e+=1))}this._value=t>0?e/t:0}return this._value},e}());var c;t.getMachineId=a}),define(e[913],t([1,0,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.default.parse(e.toUrl("paths")).fsPath,r=e.__$__nodeRequire(i);t.getAppDataPath=r.getAppDataPath,t.getDefaultUserDataPath=r.getDefaultUserDataPath}),define(e[486],t([1,0,289]),function(e,t,n){"use strict";function i(e,t,o){if(0===t)return o(0);var s=new n.Socket;s.once("connect",function(){return r(s),i(e+1,t-1,o)}),s.once("data",function(){}),s.once("error",function(n){return r(s),"ECONNREFUSED"!==n.code?i(e+1,t-1,o):o(e)}),s.connect(e,"127.0.0.1")}function r(e){try{e.removeAllListeners("connect"),e.removeAllListeners("error"),e.end(),e.destroy(),e.unref()}catch(e){console.error(e)}}Object.defineProperty(t,"__esModule",{value:!0}),
t.randomPort=function(){return 1025+Math.floor(64510*Math.random())},t.findFreePort=function(e,t,n){var r=!1;return new Promise(function(o){var s=setTimeout(function(){if(!r)return r=!0,o(0)},n);i(e,t,function(e){if(!r)return r=!0,clearTimeout(s),o(e)})})}}),define(e[967],t([1,0,972,30,4]),function(e,t,n,i,r){"use strict";function a(t,a){return void 0===a&&(a={}),o(this,void 0,r.TPromise,function(){var r,o,c,l,u,d;return s(this,function(s){switch(s.label){case 0:return r=n.parse(t),(o=a.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null:null}(r))?(c=n.parse(o),/^https?:$/.test(c.protocol)?(l={host:c.hostname,port:Number(c.port),auth:c.auth,rejectUnauthorized:!i.isBoolean(a.strictSSL)||a.strictSSL},"http:"!==r.protocol?[3,2]:[4,new Promise(function(t,n){e(["http-proxy-agent"],t,n)})]):[2,null]):[2,null];case 1:return d=s.sent(),[3,4]
;case 2:return[4,new Promise(function(t,n){e(["https-proxy-agent"],t,n)})];case 3:d=s.sent(),s.label=4;case 4:return u=d,[2,new u(l)]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=a}),define(e[499],t([1,0,59,93,289,156,10]),function(e,t,n,i,r,o,s){"use strict";function a(){var e="vscode-std-"+function(e){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<e;i++)n+=t[Math.floor(t.length*Math.random())];return n}(40);return"win32"===process.platform?"\\\\.\\pipe\\"+e+"-sock":n.join(i.tmpdir(),e+".sock")}function c(t,n,i,c){var l,u=!1,d=function(e){u||(u=!0,c(e,null))},h=a(),p=a(),f=a(),g=function(e,t,n,i){var r={};for(var o in e)r[o]=e[o];return r.STDIN_PIPE_NAME=t,r.STDOUT_PIPE_NAME=n,r.STDERR_PIPE_NAME=i,r.ELECTRON_RUN_AS_NODE="1",r}(i.env||process.env,h,p,f),v=r.createServer(function(e){l.stderr=e});v.listen(f);var m=r.createServer(function(e){e.once("data",function(t){l.stdin=r.connect(h),l.stdout=e,function(e){u||(u=!0,c(null,e))}(l)})})
;m.listen(p);var y=!1,b=function(){y||(y=!0,process.removeListener("exit",b),m.close(),v.close())},S=s.default.parse(e.toUrl("./stdForkStart.js")).fsPath;(l=o.fork(S,[t].concat(n),{silent:!0,cwd:i.cwd,env:g,execArgv:i.execArgv})).once("error",function(e){b(),d(e)}),l.once("exit",function(e){b(),d(e)}),process.once("exit",b)}Object.defineProperty(t,"__esModule",{value:!0}),t.fork=c}),define(e[406],t([1,0,144,4]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readExactlyByFile=function(e,t){return new i.TPromise(function(i,r){n.open(e,"r",null,function(e,o){function s(e,t,s){n.close(o,function(n){return n?r(n):e&&"EISDIR"===e.code?r(e):i({buffer:t,bytesRead:s})})}function a(){n.read(o,c,l,t-l,null,function(e,n){return e?s(e,null,0):0===n?s(null,c,l):(l+=n)===t?s(null,c,l):a()})}if(e)return r(e);var c=Buffer.allocUnsafe(t),l=0;a()})})},t.readToMatchingString=function(e,t,r,o){return new i.TPromise(function(i,s){return n.open(e,"r",null,function(a,c){function l(e,t){
n.close(c,function(n){return n?s(n):e&&"EISDIR"===e.code?s(e):i(t)})}function u(){n.read(c,d,h,r,null,function(n,i){if(n)return l(n,null);if(0===i)return l(null,null);h+=i;var r=d.indexOf(t);return r>=0?l(null,d.toString("utf8").substr(0,r)):h>=o?l(new Error("Could not find "+t+" in first "+o+" bytes of "+e),null):u()})}if(a)return s(a);var d=Buffer.allocUnsafe(o),h=0;u()})})}}),define(e[191],t([1,0,406,1597,4,11,156,412,18]),function(e,t,i,r,o,s,a,c,l){"use strict";function u(e){return r.decodeStream(d(e))}function d(e){return e===t.UTF8_with_bom?t.UTF8:e}function h(e,n){if(!e||n<2)return null;var i=e.readUInt8(0),r=e.readUInt8(1);if(254===i&&255===r)return t.UTF16be;if(255===i&&254===r)return t.UTF16le;if(n<3)return null;var o=e.readUInt8(2);return 239===i&&187===r&&191===o?t.UTF8:null}function p(t){return l.asWinJSImport(new Promise(function(t,n){e(["jschardet"],t,n)})).then(function(e){e.Constants.MINIMUM_THRESHOLD=v;var n=e.detect(t);if(!n||!n.encoding)return null;var i=n.encoding.toLowerCase()
;return 0<=m.indexOf(i)?null:f(n.encoding)})}function f(e){var t=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return y[t]||t}function g(e,n){var i=e.buffer,r=e.bytesRead,o=h(i,r),s=!1;if(o!==t.UTF16be&&o!==t.UTF16le){for(var a=!0,c=!0,l=!1,u=0;u<r&&u<b;u++){var d=u%2==1,f=0===i.readInt8(u);if(f&&(l=!0),a&&(d&&!f||!d&&f)&&(a=!1),c&&(d&&f||!d&&!f)&&(c=!1),f&&!a&&!c)break}l&&(a?o=t.UTF16le:c?o=t.UTF16be:s=!0)}return!n||s||o?{seemsBinary:s,encoding:o}:p(i.slice(0,r)).then(function(e){return{seemsBinary:!1,encoding:e}})}Object.defineProperty(t,"__esModule",{value:!0}),t.UTF8="utf8",t.UTF8_with_bom="utf8bom",t.UTF16be="utf16be",t.UTF16le="utf16le",t.toDecodeStream=function(e,i){return i.minBytesRequiredForDetection||(i.minBytesRequiredForDetection=i.guessEncoding?_:S),i.overwriteEncoding||(i.overwriteEncoding=function(e){return e||t.UTF8}),new o.TPromise(function(t,r){e.pipe(new(function(e){function r(t){var n=e.call(this,t)||this;return n._buffer=[],n._bytesBuffered=0,n.once("finish",function(){return n._finish()
}),n}return n(r,e),r.prototype._write=function(e,t,n){Buffer.isBuffer(e)||n(new Error("data must be a buffer")),this._decodeStream?this._decodeStream.write(e,n):(this._buffer.push(e),this._bytesBuffered+=e.length,this._decodeStreamConstruction?this._decodeStreamConstruction.then(function(e){return n()},function(e){return n(e)}):this._bytesBuffered>=i.minBytesRequiredForDetection?this._startDecodeStream(n):n())},r.prototype._startDecodeStream=function(e){var n=this;this._decodeStreamConstruction=o.TPromise.as(g({buffer:Buffer.concat(this._buffer),bytesRead:this._bytesBuffered},i.guessEncoding)).then(function(r){r.encoding=i.overwriteEncoding(r.encoding),n._decodeStream=u(r.encoding);for(var o=0,s=n._buffer;o<s.length;o++){var a=s[o];n._decodeStream.write(a)}e(),t({detected:r,stream:n._decodeStream})},function(t){n.emit("error",t),e(t)})},r.prototype._finish=function(){var e=this;this._decodeStream?this._decodeStream.end():this._startDecodeStream(function(){return e._decodeStream.end()})},r}(c.Writable)))})},
t.bomLength=function(e){switch(e){case t.UTF8:return 3;case t.UTF16be:case t.UTF16le:return 2}return 0},t.decode=function(e,t){return r.decode(e,d(t))},t.encode=function(e,t,n){return r.encode(e,d(t),n)},t.encodingExists=function(e){return r.encodingExists(d(e))},t.decodeStream=u,t.encodeStream=function(e,t){return r.encodeStream(d(e),t)},t.detectEncodingByBOMFromBuffer=h,t.detectEncodingByBOM=function(e){return i.readExactlyByFile(e,3).then(function(e){return h(e.buffer,e.bytesRead)})};var v=.2,m=["ascii","utf-8","utf-16","utf-32"];t.guessEncodingByBuffer=p;var y={ibm866:"cp866",big5:"cp950"};t.toCanonicalName=function(e){switch(e){case"shiftjis":return"shift-jis";case"utf16le":return"utf-16le";case"utf16be":return"utf-16be";case"big5hkscs":return"big5-hkscs";case"eucjp":return"euc-jp";case"euckr":return"euc-kr";case"koi8r":return"koi8-r";case"koi8u":return"koi8-u";case"macroman":return"x-mac-roman";case"utf8bom":return"utf8";default:var t=e.match(/windows(\d+)/);return t?"windows-"+t[1]:e}}
;var b=512,S=512,_=4096;t.detectEncodingFromBuffer=g;var C={437:"cp437",850:"cp850",852:"cp852",855:"cp855",857:"cp857",860:"cp860",861:"cp861",863:"cp863",865:"cp865",866:"cp866",869:"cp869",936:"cp936",1252:"cp1252"};t.resolveTerminalEncoding=function(e){var n,i=process.env.VSCODE_CLI_ENCODING;return i?(e&&console.log("Found VSCODE_CLI_ENCODING variable: "+i),n=o.TPromise.as(i)):n=s.isLinux||s.isMacintosh?new o.TPromise(function(t){e&&console.log('Running "locale charmap" to detect terminal encoding...'),a.exec("locale charmap",function(e,n,i){return t(n)})}):new o.TPromise(function(t){e&&console.log('Running "chcp" to detect terminal encoding...'),a.exec("chcp",function(e,n,i){if(n)for(var r=Object.keys(C),o=0;o<r.length;o++){var s=r[o];if(n.indexOf(s)>=0)return t(C[s])}return t(void 0)})}),n.then(function(n){if(e&&console.log("Detected raw terminal encoding: "+n),!n||"utf-8"===n.toLowerCase()||n.toLowerCase()===t.UTF8)return t.UTF8;var i=f(n)
;return r.encodingExists(i)?i:(e&&console.log("Unsupported terminal encoding, falling back to UTF-8."),t.UTF8)})}}),define(e[166],t([1,0,144,59,18,984,11,14,136,4,191,480]),function(e,t,n,i,r,o,s,a,c,l,u,d){"use strict";function h(e){return s.isMacintosh?n.readdirSync(e).map(function(e){return o.normalizeNFC(e)}):n.readdirSync(e)}function p(e,t){return s.isMacintosh?n.readdir(e,function(e,n){return e?t(e,null):t(null,n.map(function(e){return o.normalizeNFC(e)}))}):n.readdir(e,t)}function f(e,t,r,o){o||(o=Object.create(null)),n.stat(e,function(s,a){if(s)return r(s);if(!a.isDirectory())return function(e,t,i,r){var o=n.createReadStream(e),s=n.createWriteStream(t,{mode:i}),a=!1,c=function(e){a||(a=!0,e?r(e):n.chmod(t,i,r))};o.once("error",function(e){return c(e)}),s.once("error",function(e){return c(e)}),s.once("close",function(){return c()}),o.pipe(s)}(e,t,511&a.mode,r);if(o[e])return r(null);o[e]=!0;var c=function(){p(e,function(n,s){C(s,function(n,r){f(i.join(e,n),i.join(t,n),function(e){return r(e,void 0)},o)
},r)})};g(t,511&a.mode).done(c,c)})}function g(e,t){var o=function(){return r.nfcall(n.mkdir,e,t).then(null,function(t){return"ENOENT"===t.code?l.TPromise.wrapError(t):r.nfcall(n.stat,e).then(function(t){return t.isDirectory()?null:l.TPromise.wrapError(new Error("'"+e+"' exists and is not a directory."))},function(e){return l.TPromise.wrapError(t)})})};return e===i.dirname(e)?l.TPromise.as(!0):o().then(null,function(n){return"ENOENT"===n.code?g(i.dirname(e),t).then(o):l.TPromise.wrapError(n)})}function v(e,t){if("\\"===e||"/"===e)return t(new Error("Will not delete root!"));n.exists(e,function(r){r?n.lstat(e,function(r,o){if(r||!o)t(r);else if(!o.isDirectory()||o.isSymbolicLink()){var s=o.mode;128&s?n.unlink(e,t):n.chmod(e,128|s,function(i){i?t(i):n.unlink(e,t)})}else p(e,function(r,o){if(r||!o)t(r);else if(0===o.length)n.rmdir(e,t);else{var s=null,a=o.length;o.forEach(function(r){v(i.join(e,r),function(i){a--,i&&(s=s||i),0===a&&(s?t(s):n.rmdir(e,t))})})}})}):t(null)})}function m(e){try{var t=n.lstatSync(e)
;t.isDirectory()&&!t.isSymbolicLink()?(h(e).forEach(function(t){return m(i.join(e,t))}),n.rmdirSync(e)):n.unlinkSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}}function y(e,t,i,r){i=b(i),"string"==typeof t||Buffer.isBuffer(t)?function(e,t,i,r){i.encoding&&(t=u.encode(t,i.encoding.charset,{addBOM:i.encoding.addBOM}));if(!E)return n.writeFile(e,t,{mode:i.mode,flag:i.flag},r);n.open(e,i.flag,i.mode,function(e,i){if(e)return r(e);n.writeFile(i,t,function(e){if(e)return n.close(i,function(){return r(e)});n.fdatasync(i,function(e){return e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),E=!1),n.close(i,function(e){return r(e)})})})})}(e,t,i,r):function(e,t,i,r){var o,s,a=!1,c=function(e){a||(a=!0,e?s?(l.once("close",function(){return r(e)}),l.close()):r(e):r())},l=n.createWriteStream(e,{mode:i.mode,flags:i.flag,autoClose:!1});l.once("open",function(e){o=e,s=!0,i.encoding&&(t=t.pipe(u.encodeStream(i.encoding.charset,{addBOM:i.encoding.addBOM}))),t.pipe(l)}),
t.once("error",function(e){return c(e)}),l.once("error",function(e){return c(e)}),l.once("finish",function(){E&&s?n.fdatasync(o,function(e){e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),E=!1),l.close()}):l.close()}),l.once("close",function(){return c()})}(e,t,i,r)}function b(e){if(!e)return{mode:438,flag:"w"};var t={mode:e.mode,flag:e.flag,encoding:e.encoding};return"number"!=typeof t.mode&&(t.mode=438),"string"!=typeof t.flag&&(t.flag="w"),t}function S(e){var t=i.dirname(e);if(e===t)return e;var n=(i.basename(e)||e).toLowerCase();try{var r=h(t).filter(function(e){return e.toLowerCase()===n});if(1===r.length){if(s=S(t))return i.join(s,r[0])}else if(r.length>1){var o=r.indexOf(n);if(o>=0){var s=S(t);if(s)return i.join(s,r[o])}}}catch(e){}return null}function _(e){return a.rtrim(i.normalize(e),i.sep)}Object.defineProperty(t,"__esModule",{value:!0});var C=d.loop;t.readdirSync=h,t.readdir=p,t.statLink=function(e,t){n.lstat(e,function(i,r){
i||r.isSymbolicLink()?n.stat(e,function(e,n){if(e)return t(e,null);t(null,{stat:n,isSymbolicLink:r&&r.isSymbolicLink()})}):t(null,{stat:r,isSymbolicLink:!1})})},t.copy=f,t.mkdirp=g,t.del=function(e,t,r,o){n.exists(e,function(s){if(!s)return r(null);n.stat(e,function(s,l){if(s||!l)return r(s);if("."===e[e.length-1]||a.endsWith(e,"./")||a.endsWith(e,".\\"))return v(e,r);var u=i.join(t,c.generateUuid());n.rename(e,u,function(t){if(t)return v(e,r);r(null),v(u,function(e){e&&console.error(e),o&&o(e)})})})})},t.delSync=m,t.mv=function(e,t,i){function r(e){if(e)return i(e);n.stat(t,function(e,r){return e?i(e):r.isDirectory()?i(null):void n.open(t,"a",null,function(e,t){if(e)return i(e);n.futimes(t,r.atime,new Date,function(e){if(e)return i(e);n.close(t,i)})})})}if(e===t)return i(null);n.rename(e,t,function(n){return n?n&&e.toLowerCase()!==t.toLowerCase()&&"EXDEV"===n.code||a.endsWith(e,".")?f(e,t,function(t){if(t)return i(t);v(e,r)}):i(n):r(null)})};var E=!0;t.writeFileAndFlush=y,
t.writeFileAndFlushSync=function(e,t,i){if((i=b(i)).encoding&&(t=u.encode(t,i.encoding.charset,{addBOM:i.encoding.addBOM})),!E)return n.writeFileSync(e,t,{mode:i.mode,flag:i.flag});var r=n.openSync(e,i.flag,i.mode);try{n.writeFileSync(r,t);try{n.fdatasyncSync(r)}catch(e){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",e),E=!1}}finally{n.closeSync(r)}},t.realcaseSync=S,t.realpathSync=function(e){try{return n.realpathSync(e)}catch(i){var t=_(e);return n.accessSync(t,n.constants.R_OK),t}},t.realpath=function(e,t){return n.realpath(e,function(i,r){if(!i)return t(null,r);var o=_(e);return n.access(o,n.constants.R_OK,function(e){return t(e,o)})})},t.watch=function(e,t,i){try{var r=n.watch(e);return r.on("change",function(e,n){var i=null;n&&(i=n.toString(),s.isMacintosh&&(i=o.normalizeNFC(i))),t(e,i)}),r.on("error",function(t,n){return i("Failed to watch "+e+" for changes ("+t+", "+n+")")}),r}catch(t){n.exists(e,function(n){
n&&i("Failed to watch "+e+" for changes ("+t.toString()+")")})}}}),define(e[343],t([1,0,144,59,24,5,7,89,166,11]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){void 0===t&&(t={changeBufferDelay:0,defaultConfig:Object.create(null),onError:function(e){return console.error(e)}}),this._path=e,this.options=t,this.disposables=[],this.configName=i.basename(this._path),this._onDidUpdateConfiguration=new s.Emitter,this.disposables.push(this._onDidUpdateConfiguration),this.registerWatcher(),this.initAsync()}return Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasParseErrors",{get:function(){return this.parseErrors&&this.parseErrors.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidUpdateConfiguration",{get:function(){return this._onDidUpdateConfiguration.event},enumerable:!0,configurable:!0}),
e.prototype.initAsync=function(){var e=this;this.loadAsync(function(t){e.loaded||e.updateCache(t),e.options.initCallback&&e.options.initCallback(e.getConfig())})},e.prototype.updateCache=function(e){this.cache=e,this.loaded=!0},e.prototype.loadSync=function(){try{return this.parse(n.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}},e.prototype.loadAsync=function(e){var t=this;n.readFile(this._path,function(n,i){return e(n?t.options.defaultConfig:t.parse(i.toString()))})},e.prototype.parse=function(e){var t;try{this.parseErrors=[],t=this.options.parse?this.options.parse(e,this.parseErrors):a.parse(e,this.parseErrors)}catch(e){}return t||this.options.defaultConfig},e.prototype.registerWatcher=function(){var e=this,t=i.dirname(this._path);this.watch(t,!0),n.lstat(this._path,function(t,i){t||i.isDirectory()||i.isSymbolicLink()&&n.readlink(e._path,function(t,n){t||e.watch(n,!1)})})},e.prototype.watch=function(e,t){var n=this;if(!this.disposed){var i=c.watch(e,function(e,i){
return n.onConfigFileChange(e,i,t)},function(e){return n.options.onError(e)});i&&this.disposables.push(o.toDisposable(function(){i.removeAllListeners(),i.close()}))}},e.prototype.onConfigFileChange=function(e,t,n){var r=this;n&&(l.isWindows&&t&&t!==this.configName&&(t=i.basename(t)),t!==this.configName)||(this.timeoutHandle&&(global.clearTimeout(this.timeoutHandle),this.timeoutHandle=null),this.timeoutHandle=global.setTimeout(function(){return r.reload()},this.options.changeBufferDelay))},e.prototype.reload=function(e){var t=this;this.loadAsync(function(n){if(r.equals(n,t.cache)||(t.updateCache(n),t._onDidUpdateConfiguration.fire({config:t.cache})),e)return e(n)})},e.prototype.getConfig=function(){return this.ensureLoaded(),this.cache},e.prototype.getValue=function(e,t){if(this.ensureLoaded(),!e)return t;var n=this.cache?this.cache[e]:void 0;return void 0!==n?n:t},e.prototype.ensureLoaded=function(){this.loaded||this.updateCache(this.loadSync())},e.prototype.dispose=function(){this.disposed=!0,
this.disposables=o.dispose(this.disposables)},e}();t.ConfigWatcher=u}),define(e[87],t([1,0,4,166,59,18,144,93,11,7]),function(e,t,n,i,r,o,s,a,c,l){"use strict";function u(e){return o.nfcall(i.readdir,e)}function d(e){return p(e).then(function(t){return t.isDirectory()&&!t.isSymbolicLink()?u(e).then(function(t){return n.TPromise.join(t.map(function(t){return d(r.join(e,t))}))}).then(function(){return f(e)}):g(e)},function(e){if("ENOENT"!==e.code)return n.TPromise.wrapError(e)})}function h(e){return o.nfcall(s.stat,e)}function p(e){return o.nfcall(s.lstat,e)}function f(e){return o.nfcall(s.rmdir,e)}function g(e){return o.nfcall(s.unlink,e)}function v(e,t,n){return function(e){var t=b[e];if(!t){t=new o.Queue,b[e]=t;l.once(t.onFinished)(function(){delete b[e],t.dispose()})}return t}(function(e){var t=e;(c.isWindows||c.isMacintosh)&&(t=t.toLowerCase());return t}(e)).queue(function(){return o.nfcall(i.writeFileAndFlush,e,t,n)})}function m(e){return h(e).then(function(e){return e.isDirectory()},function(){return!1})
}function y(e,t){return void 0===t&&(S||(S=a.tmpdir()),t=S),o.nfcall(i.del,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=u,t.exists=function(e){return new n.TPromise(function(t){return s.exists(e,t)},function(){})},t.chmod=function(e,t){return o.nfcall(s.chmod,e,t)},t.mkdirp=i.mkdirp,t.rimraf=d,t.realpath=function(e){return o.nfcall(i.realpath,e)},t.stat=h,t.statLink=function(e){return o.nfcall(i.statLink,e)},t.lstat=p,t.rename=function(e,t){return o.nfcall(s.rename,e,t)},t.rmdir=f,t.unlink=g,t.symlink=function(e,t,n){return o.nfcall(s.symlink,e,t,n)},t.readlink=function(e){return o.nfcall(s.readlink,e)},t.truncate=function(e,t){return o.nfcall(s.truncate,e,t)},t.readFile=function(e,t){return o.nfcall(s.readFile,e,t)};var b=Object.create(null);t.writeFile=v,t.readDirsInDir=function(e){return u(e).then(function(t){return n.TPromise.join(t.map(function(t){return m(r.join(e,t))})).then(function(e){return t.filter(function(t,n){return e[n]})})})},t.dirExists=m,t.fileExists=function(e){
return h(e).then(function(e){return e.isFile()},function(){return!1})};var S=null;t.del=y,t.whenDeleted=function(e){return new n.TPromise(function(t){var n=!1,i=setInterval(function(){n||(n=!0,s.exists(e,function(e){n=!1,e||(clearInterval(i),t(null))}))},1e3)})},t.copy=function(e,t){return o.nfcall(i.copy,e,t)}}),define(e[131],t([1,0,4,5,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){e[e.RequestCommon=0]="RequestCommon",e[e.RequestCancel=1]="RequestCancel",e[e.ResponseInitialize=2]="ResponseInitialize",e[e.ResponseSuccess=3]="ResponseSuccess",e[e.ResponseProgress=4]="ResponseProgress",e[e.ResponseError=5]="ResponseError",e[e.ResponseErrorObj=6]="ResponseErrorObj"}(o||(o={}));var s;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(s||(s={}));var a=function(){function e(e){var t=this;this.protocol=e,this.channels=Object.create(null),this.activeRequests=Object.create(null),this.protocolListener=this.protocol.onMessage(function(e){
return t.onMessage(e)}),this.protocol.send({type:o.ResponseInitialize})}return e.prototype.registerChannel=function(e,t){this.channels[e]=t},e.prototype.onMessage=function(e){switch(e.type){case o.RequestCommon:this.onCommonRequest(e);break;case o.RequestCancel:this.onCancelRequest(e)}},e.prototype.onCommonRequest=function(e){var t,r=this,s=this.channels[e.channelName];try{t=s.call(e.name,e.arg)}catch(e){t=n.TPromise.wrapError(e)}var a=e.id,c=t.then(function(t){r.protocol.send({id:a,data:t,type:o.ResponseSuccess}),delete r.activeRequests[e.id]},function(t){t instanceof Error?r.protocol.send({id:a,data:{message:t.message,name:t.name,stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:o.ResponseError}):r.protocol.send({id:a,data:t,type:o.ResponseErrorObj}),delete r.activeRequests[e.id]},function(e){r.protocol.send({id:a,data:e,type:o.ResponseProgress})});this.activeRequests[e.id]=i.toDisposable(function(){return c.cancel()})},e.prototype.onCancelRequest=function(e){
var t=this.activeRequests[e.id];t&&(t.dispose(),delete this.activeRequests[e.id])},e.prototype.dispose=function(){var e=this;this.protocolListener.dispose(),this.protocolListener=null,Object.keys(this.activeRequests).forEach(function(t){e.activeRequests[t].dispose()}),this.activeRequests=null},e}();t.ChannelServer=a;var c=function(){function e(e){var t=this;this.protocol=e,this.state=s.Uninitialized,this.activeRequests=[],this.bufferedRequests=[],this.handlers=Object.create(null),this.lastRequestId=0,this.protocolListener=this.protocol.onMessage(function(e){return t.onMessage(e)})}return e.prototype.getChannel=function(e){var t=this;return{call:function(n,i){return t.request(e,n,i)}}},e.prototype.request=function(e,t,n){var i=this,r={raw:{id:this.lastRequestId++,type:o.RequestCommon,channelName:e,name:t,arg:n}},a=this.state===s.Uninitialized?this.bufferRequest(r):this.doRequest(r);return this.activeRequests.push(a),a.then(null,function(e){return null}).done(function(){
return i.activeRequests=i.activeRequests.filter(function(e){return e!==a})}),a},e.prototype.doRequest=function(e){var t=this,i=e.raw.id;return new n.TPromise(function(n,r,s){t.handlers[i]=function(e){switch(e.type){case o.ResponseSuccess:delete t.handlers[i],n(e.data);break;case o.ResponseError:delete t.handlers[i];var a=new Error(e.data.message);a.stack=e.data.stack,a.name=e.data.name,r(a);break;case o.ResponseErrorObj:delete t.handlers[i],r(e.data);break;case o.ResponseProgress:s(e.data)}},t.send(e.raw)},function(){return t.send({id:i,type:o.RequestCancel})})},e.prototype.bufferRequest=function(e){var t=this,i=null;return new n.TPromise(function(n,r,o){t.bufferedRequests.push(e),e.flush=function(){e.flush=null,i=t.doRequest(e).then(n,r,o)}},function(){if(e.flush=null,t.state===s.Uninitialized){var n=t.bufferedRequests.indexOf(e);-1!==n&&t.bufferedRequests.splice(n,1)}else i&&(i.cancel(),i=null)})},e.prototype.onMessage=function(e){if(function(e){return e>=o.ResponseInitialize}(e.type)){
if(this.state===s.Uninitialized&&e.type===o.ResponseInitialize)return this.state=s.Idle,this.bufferedRequests.forEach(function(e){return e.flush&&e.flush()}),void(this.bufferedRequests=null);var t=this.handlers[e.id];t&&t(e)}},e.prototype.send=function(e){try{this.protocol.send(e)}catch(e){}},e.prototype.dispose=function(){this.protocolListener.dispose(),this.protocolListener=null,this.activeRequests.forEach(function(e){return e.cancel()}),this.activeRequests=[]},e}();t.ChannelClient=c;var l=function(){function e(e){var t=this;this.channels=Object.create(null),this.channelClients=Object.create(null),this.onClientAdded=new r.Emitter,e(function(e){var n=e.protocol,i=e.onDidClientDisconnect;r.once(n.onMessage)(function(e){var r=new a(n),o=new c(n);Object.keys(t.channels).forEach(function(e){return r.registerChannel(e,t.channels[e])}),t.channelClients[e]=o,t.onClientAdded.fire(e),i(function(){r.dispose(),o.dispose(),delete t.channelClients[e]})})})}return e.prototype.getChannel=function(e,t){var i=this;return{
call:function(r,o){var s=t.route(r,o);return s?i.getClient(s).then(function(t){return t.getChannel(e).call(r,o)}):n.TPromise.wrapError(new Error("Client id should be provided"))}}},e.prototype.registerChannel=function(e,t){this.channels[e]=t},e.prototype.getClient=function(e){var t=this,i=this.channelClients[e];return i?n.TPromise.as(i):new n.TPromise(function(n){r.once(r.filterEvent(t.onClientAdded.event,function(t){return t===e}))(function(){return n(t.channelClients[e])})})},e.prototype.dispose=function(){this.channels=Object.create(null),this.channelClients=Object.create(null),this.onClientAdded.dispose()},e}();t.IPCServer=l;var u=function(){function e(e,t){e.send(t),this.channelClient=new c(e),this.channelServer=new a(e)}return e.prototype.getChannel=function(e){return this.channelClient.getChannel(e)},e.prototype.registerChannel=function(e,t){this.channelServer.registerChannel(e,t)},e.prototype.dispose=function(){this.channelClient.dispose(),this.channelClient=null,this.channelServer.dispose(),
this.channelServer=null},e}();t.IPCClient=u,t.getDelayedChannel=function(e){return{call:function(t,n){return e.then(function(e){return e.call(t,n)})}}},t.getNextTickChannel=function(e){var t=!1;return{call:function(i,r){return t?e.call(i,r):n.TPromise.timeout(0).then(function(){return t=!0}).then(function(){return e.call(i,r)})}}},t.eventToCall=function(e,t){void 0===t&&(t=function(e){return e});var i;return new n.TPromise(function(n,r,o){return i=e(function(e){return o(t(e))})},function(){return i.dispose()})},t.eventFromCall=function(e,t,n,i){void 0===n&&(n=null),void 0===i&&(i=function(e){return e});var o,s=new r.Emitter({onFirstListenerAdd:function(){o=e.call(t,n).then(null,function(e){return null},function(e){return s.fire(i(e))})},onLastListenerRemove:function(){o.cancel(),o=null}});return s.event}}),define(e[1110],t([1,0,5,7]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.sender=e;var n=new i.Emitter;t(function(e){return n.fire(e)
}),this._onMessage=n.event}return Object.defineProperty(e.prototype,"onMessage",{get:function(){return this._onMessage},enumerable:!0,configurable:!0}),e.prototype.send=function(e){try{this.sender.send("ipc:message",e)}catch(e){}},e.prototype.dispose=function(){this.listener=n.dispose(this.listener)},e}();t.Protocol=r}),define(e[1124],t([1,0,7,131,1110,103]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(n){return e.call(this,t.createProtocol(),n)||this}return n(t,e),t.createProtocol=function(){var e=i.fromNodeEventEmitter(s.ipcRenderer,"ipc:message",function(e,t){return t});return s.ipcRenderer.send("ipc:hello"),new o.Protocol(s.ipcRenderer,e)},t}(r.IPCClient);t.Client=a}),define(e[463],t([1,0,289,4,7,131,59,93,136]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomPipeName=function(){var e=l.generateUuid()
;return"win32"===process.platform?"\\\\.\\pipe\\vscode-ipc-"+e+"-sock":a.join(c.tmpdir(),"vscode-ipc-"+e+".sock")};var u=function(){function e(t,n){var i=this;this._socket=t,this._onMessage=new o.Emitter,this.onMessage=this._onMessage.event,this._writeBuffer=new(function(){function e(){this._data=[],this._totalLength=0}return e.prototype.add=function(e,t){var n=0===this._totalLength;return this._data.push(e,t),this._totalLength+=e.length+t.length,n},e.prototype.take=function(){var e=Buffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,e},e}());var r=[],s=0,a={readHead:!0,bodyIsJson:!1,bodyLen:-1},c=function(t){for(r.push(t),s+=t.length;s>0;){if(a.readHead){if(!(s>=e._headerLen))break;n=Buffer.concat(r);a.bodyIsJson=1===n.readInt8(0),a.bodyLen=n.readInt32BE(1),a.readHead=!1;c=n.slice(e._headerLen);s=c.length,r=[c]}if(!a.readHead){if(!(s>=a.bodyLen))break;var n,o=(n=Buffer.concat(r)).toString("utf8",0,a.bodyLen);a.bodyIsJson&&(o=JSON.parse(o)),i._onMessage.fire(o)
;var c=n.slice(a.bodyLen);s=c.length,r=[c],a.bodyIsJson=!1,a.bodyLen=-1,a.readHead=!0}}},l=function(){if(n&&n.length>0){var e=n;n=null,c(e)}};t.on("data",function(e){l(),c(e)}),t.on("end",function(){l()})}return e.prototype.send=function(t){var n=Buffer.alloc(e._headerLen);"string"!=typeof t&&(t=JSON.stringify(t),n.writeInt8(1,0));var i=Buffer.from(t);n.writeInt32BE(i.length,1),this._writeSoon(n,i)},e.prototype._writeSoon=function(e,t){var n=this;this._writeBuffer.add(e,t)&&setImmediate(function(){n._socket.destroyed||n._socket.write(n._writeBuffer.take())})},e._headerLen=17,e}();t.Protocol=u;var d=function(e){function t(n){var i=e.call(this,t.toClientConnectionEvent(n))||this;return i.server=n,i}return n(t,e),t.toClientConnectionEvent=function(e){var t=o.fromNodeEventEmitter(e,"connection");return o.mapEvent(t,function(e){return{protocol:new u(e),onDidClientDisconnect:o.once(o.fromNodeEventEmitter(e,"close"))}})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.server.close(),
this.server=null},t}(s.IPCServer);t.Server=d;var h=function(e){function t(t,n){var i=e.call(this,new u(t),n)||this;return i.socket=t,i._onClose=new o.Emitter,t.once("close",function(){return i._onClose.fire()}),i}return n(t,e),Object.defineProperty(t.prototype,"onClose",{get:function(){return this._onClose.event},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.socket.end(),this.socket=null},t}(s.IPCClient);t.Client=h,t.serve=function(e){return new r.TPromise(function(t,n){var r=i.createServer();r.on("error",n),r.listen(e,function(){r.removeListener("error",n),t(new d(r))})})},t.connect=function(e,t){return new r.TPromise(function(n,r){var o=i.createConnection(e,function(){o.removeListener("error",r),n(new h(o,t))});o.once("error",r)})}}),define(e[847],t([1,0,4,30]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.modelProvider=i.isFunction(e.getModel)?e:{getModel:function(){return e}}}
return e.prototype.getId=function(e,t){if(!t)return null;var n=this.modelProvider.getModel();return n===t?"__root__":n.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var n=this.modelProvider.getModel();return n&&n===t&&n.entries.length>0},e.prototype.getChildren=function(e,t){var i=this.modelProvider.getModel();return n.TPromise.as(i===t?i.entries:[])},e.prototype.getParent=function(e,t){return n.TPromise.as(null)},e}();t.DataSource=r;var o=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var n=this.modelProvider.getModel();return n.accessibilityProvider&&n.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var n=this.modelProvider.getModel();return String(n.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}();t.AccessibilityProvider=o;var s=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){
var n=this.modelProvider.getModel();return!n.filter||n.filter.isVisible(t)},e}();t.Filter=s;var a=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,n){return this.modelProvider.getModel().renderer.renderTemplate(t,n,this.styles)},e.prototype.renderElement=function(e,t,n,i){this.modelProvider.getModel().renderer.renderElement(t,n,i,this.styles)},e.prototype.disposeTemplate=function(e,t,n){this.modelProvider.getModel().renderer.disposeTemplate(t,n)},e}();t.Renderer=a}),define(e[122],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(t.Mode||(t.Mode={}))}),
define(e[286],t([1,0,252,110,25,11,14]),function(e,t,n,i,r,o,s){"use strict";function a(e,t,n,r){if(!e||!t)return h;var o=e.length,s=t.length;if(o<s)return h;var a=e.toLowerCase();if(!r){if(-1===a.indexOf(n))return h}return function(e,t,n,r,o,s){for(var a=[],c=[],l=0;l<n;l++)for(var u=0;u<s;u++){var h=l*s+u,p=(l-1)*s+u-1,f=u>0?a[h-1]:0,g=l>0&&u>0?a[p]:0,v=l>0&&u>0?c[p]:0,m=void 0;(m=!g&&l>0?0:function(e,t,n,r,o,s,a){var c=0;if(t[n]!==o[s])return c;c+=1,a>0&&(c+=5*a);e[n]===r[s]&&(c+=1);if(0===s)c+=8;else{var l=function(e){switch(e){case 47:case 92:return 5;case 95:case 45:case 46:case 32:case 39:case 34:case 58:return 4;default:return 0}}(r.charCodeAt(s-1));l?c+=l:i.isUpper(r.charCodeAt(s))&&(c+=1)}return c}(e,t,l,r,o,u,v))&&g+m>=f?(c[h]=v+1,a[h]=g+m):(c[h]=d,a[h]=f)}var y=[],b=n-1,S=s-1;for(;b>=0&&S>=0;){c[h=b*s+S]===d?S--:(y.push(S),b--,S--)}return[a[n*s-1],y.reverse()]}(t,n,s,e,a,o)}function c(e,t,n,c,l){if(!e||!t.value)return p;var u=c.getItemLabel(e);if(!u)return p
;var d,h=c.getItemDescription(e),y=l[d=h?""+u+h+t.value+n:""+u+t.value+n];if(y)return y;var b=function(e,t,n,c,l){if(n&&o.isLinux?c.original===n:s.equalsIgnoreCase(c.original,n))return{score:f,labelMatch:[{start:0,end:e.length}],descriptionMatch:t?[{start:0,end:t.length}]:void 0};if(!n||!c.containsPathSeparator){var u=i.matchesPrefix(c.value,e);if(u)return{score:g,labelMatch:u};var d=i.matchesCamelCase(c.value,e);if(d)return{score:v,labelMatch:d};var h=a(e,c.value,c.lowercase,l),y=h[0],b=h[1];if(y)return{score:y+m,labelMatch:i.createMatches(b)}}if(t){var S=t;n&&(S=""+t+r.nativeSep);var _=S.length,C=a(""+S+e,c.value,c.lowercase,l),E=C[0],w=C[1];if(E){var I=[],T=[];return i.createMatches(w).forEach(function(e){e.start<_&&e.end>_?(I.push({start:0,end:e.end-_}),T.push({start:e.start,end:_})):e.start>=_?I.push({start:e.start-_,end:e.end-_}):T.push(e)}),{score:E,labelMatch:I,descriptionMatch:T}}}return p}(u,h,c.getItemPath(e),t,n);return l[d]=b,b}function l(e,t,n){
var i=t.labelMatch&&t.labelMatch.length,r=t.descriptionMatch&&t.descriptionMatch.length,o=-1,s=-1;if(r?o=t.descriptionMatch[0].start:i&&(o=t.labelMatch[0].start),i){if(s=t.labelMatch[t.labelMatch.length-1].end,r){var a=n.getItemDescription(e);a&&(s+=a.length)}}else r&&(s=t.descriptionMatch[t.descriptionMatch.length-1].end);return s-o}function u(e,t,i,r){var o=r.getItemLabel(e),s=r.getItemLabel(t),a=r.getItemDescription(e),c=r.getItemDescription(t),l=o.length+(a?a.length:0),u=s.length+(c?c.length:0);if(l!==u)return l-u;var d=r.getItemPath(e),h=r.getItemPath(t);return d&&h&&d.length!==h.length?d.length-h.length:o!==s?n.compareAnything(o,s,i.value):a&&c&&a!==c?n.compareAnything(a,c,i.value):d&&h&&d!==h?n.compareAnything(d,h,i.value):0}Object.defineProperty(t,"__esModule",{value:!0});var d=0,h=[d,[]];t.score=a;var p=Object.freeze({score:0}),f=1<<18,g=1<<17,v=65536,m=32768;t.prepareQuery=function(e){var t,n,i;return e&&(i=s.stripWildcards(e).replace(/\s/g,""),o.isWindows&&(i=i.replace(/\//g,r.nativeSep)),
t=i.toLowerCase(),n=i.indexOf(r.nativeSep)>=0),{original:e,value:i,lowercase:t,containsPathSeparator:n}},t.scoreItem=c,t.compareItemsByScore=function(e,t,n,i,r,o,s){void 0===s&&(s=u);var a=c(e,n,i,r,o),d=c(t,n,i,r,o),h=a.score,p=d.score;if((h===f||p===f)&&h!==p)return h===f?-1:1;if(h===g||p===g){if(h!==p)return h===g?-1:1;var y=r.getItemLabel(e),b=r.getItemLabel(t);if(y.length!==b.length)return y.length-b.length}if(h===v||p===v){if(h!==p)return h===v?-1:1;var y=r.getItemLabel(e),b=r.getItemLabel(t),S=function(e,t){if(!e&&!t||!e.length&&!t.length)return 0;if(!t||!t.length)return-1;if(!e||!e.length)return 1;var n=e[0].start,i=e[e.length-1].end-n,r=t[0].start,o=t[t.length-1].end-r;return i===o?0:o<i?1:-1}(a.labelMatch,d.labelMatch);if(0!==S)return S;if(y.length!==b.length)return y.length-b.length}if(h>m||p>m){if(p<m)return-1;if(h<m)return 1}if(h!==p)return h>p?-1:1;var _=l(e,a,r),C=l(t,d,r);return _&&C&&_!==C?C>_?-1:1:s(e,t,n,r)},t.fallbackCompare=u}),define(e[337],t([1,0]),function(e,t){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this._posx=e,this._posy=t,this._target=n}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"posx",{get:function(){return this._posx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"posy",{get:function(){return this._posy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}();t.ContextMenuEvent=i;var r=function(e){function t(t){var n=e.call(this,t.posx,t.posy,t.target)||this;return n.originalEvent=t,n}return n(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(i);t.MouseContextMenuEvent=r;var o=function(e){function t(t,n,i){var r=e.call(this,t,n,i.target)||this;return r.originalEvent=i,r}return n(t,e),
t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(i);t.KeyboardContextMenuEvent=o;var s;!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(s=t.DragOverEffect||(t.DragOverEffect={}));var a;!function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(a=t.DragOverBubble||(t.DragOverBubble={})),t.DRAG_OVER_REJECT={accept:!1},t.DRAG_OVER_ACCEPT={accept:!0},t.DRAG_OVER_ACCEPT_BUBBLE_UP={accept:!0,bubble:a.BUBBLE_UP},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN=function(e){return void 0===e&&(e=!1),{accept:!0,bubble:a.BUBBLE_DOWN,autoExpand:e}},t.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY={accept:!0,bubble:a.BUBBLE_UP,effect:s.COPY},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY=function(e){return void 0===e&&(e=!1),{accept:!0,bubble:a.BUBBLE_DOWN,effect:s.COPY,autoExpand:e}}}),define(e[485],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.elements=e}
return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=n;var i=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ExternalElementsDragAndDropData=i;var r=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){e.dataTransfer.types&&(this.types=[],Array.prototype.push.apply(this.types,e.dataTransfer.types)),e.dataTransfer.files&&(this.files=[],Array.prototype.push.apply(this.files,e.dataTransfer.files),this.files=this.files.filter(function(e){return e.size||e.type}))},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();t.DesktopDragAndDropData=r}),define(e[946],t([1,0,170,9,5,20,4,7]),function(e,t,i,r,o,s,a,c){"use strict";function l(e,t){for(var n=e.getHierarchy(),i=t.getHierarchy(),r=n[s.commonPrefixLength(n,i)-1],o=r.getNavigator(),a=null,c=null,l=0,u=[];r&&(null===a||null===c);)u.push(r),
r===e&&(a=l),r===t&&(c=l),l++,r=o.next();if(null===a||null===c)return[];var d=Math.min(a,c),h=Math.max(a,c);return u.slice(d,h+1)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e){this._onDispose=new c.Emitter,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}();t.LockData=u;var d=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n=this,i=this.getLock(e);if(i){var r;return new a.TPromise(function(o,s){r=c.once(i.onDispose)(function(){return n.run(e,t).then(o,s)})},function(){r.dispose()})}var o;return new a.TPromise(function(i,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=n.locks[e.id]=new u(e)
;return o=t().then(function(t){return delete n.locks[e.id],s.dispose(),t}).then(i,r)},function(){return o.cancel()})},e.prototype.getLock=function(e){var t;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}();t.Lock=d;var h=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new c.EventMultiplexer,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new c.EventMultiplexer,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new c.EventMultiplexer,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new c.EventMultiplexer,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new c.EventMultiplexer,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new c.EventMultiplexer,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new c.EventMultiplexer,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,
this._onDidRefreshItem=new c.EventMultiplexer,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new c.EventMultiplexer,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new c.EventMultiplexer,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new c.EventMultiplexer,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){i.ok(!this.isRegistered(e.id),"item already registered: "+e.id)
;var t=o.combinedDisposable([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){i.ok(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),
this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}();t.ItemRegistry=h;var p=function(){function e(e,t,n,i,r){this._onDidCreate=new c.Emitter,this.onDidCreate=this._onDidCreate.event,this._onDidReveal=new c.Emitter,this.onDidReveal=this._onDidReveal.event,this._onExpand=new c.Emitter,this.onExpand=this._onExpand.event,this._onDidExpand=new c.Emitter,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new c.Emitter,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new c.Emitter,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new c.Emitter,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new c.Emitter,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new c.Emitter,
this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new c.Emitter,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new c.Emitter,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new c.Emitter,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=n,this.lock=i,this.element=r,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,r),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},
e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;if(this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this))return a.TPromise.as(!1);return this.lock.run(this,function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):a.TPromise.as(null)).then(function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0})}).then(function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then(function(){return!0}):t)})},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){
var n=a.TPromise.as(null);return this.forEachChild(function(e){n=n.then(function(){return e.collapse(!0)})}),n.then(function(){return t.collapse(!1)})}return!this.isExpanded()||this.lock.isLocked(this)?a.TPromise.as(!1):this.lock.run(this,function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),a.TPromise.as(!0)})},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,n,i){var o=this;if(void 0===n&&(n=!1),void 0===i&&(i=!1),!i&&!this.isExpanded())return this.needsChildrenRefresh=!0,a.TPromise.as(this)
;this.needsChildrenRefresh=!1;var s=function(){var i={item:o,isNested:n};o._onRefreshChildren.fire(i);return(o.doesHaveChildren?o.context.dataSource.getChildren(o.context.tree,o.element):a.TPromise.as([])).then(function(n){if(o.isDisposed()||o.registry.isDisposed())return a.TPromise.as(null);if(!Array.isArray(n))return a.TPromise.wrapError(new Error("Please return an array of children."));n=n?n.slice(0):[],n=o.sort(n);for(var i={};null!==o.firstChild;)i[o.firstChild.id]=o.firstChild,o.removeChild(o.firstChild);for(var r=0,s=n.length;r<s;r++){var c=n[r],l=o.context.dataSource.getId(o.context.tree,c),u=i[l]||new e(l,o.registry,o.context,o.lock,c);u.element=c,t&&(u.needsChildrenRefresh=t),delete i[l],o.addChild(u)}for(var d in i)i.hasOwnProperty(d)&&i[d].dispose();return t?a.Promise.join(o.mapEachChild(function(e){return e.doRefresh(t,!0)})):(o.mapEachChild(function(e){return e.updateVisibility()}),a.TPromise.as(null))}).then(null,r.onUnexpectedError).then(function(){return o._onDidRefreshChildren.fire(i)})}
;return n?s():this.lock.run(this,s)},e.prototype.doRefresh=function(e,t){return void 0===t&&(t=!1),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.height=this._getHeight(),this.updateVisibility(),this._onDidRefresh.fire(this),this.refreshChildren(e,t)},e.prototype.updateVisibility=function(){this.setVisible(this._isVisible())},e.prototype.refresh=function(e){return this.doRefresh(e)},e.prototype.getNavigator=function(){return new g(this)},e.prototype.intersects=function(e){return this.isAncestorOf(e)||e.isAncestorOf(this)},e.prototype.getHierarchy=function(){var e=[],t=this;do{e.push(t),t=t.parent}while(t);return e.reverse(),e},e.prototype.getChildren=function(){for(var e=this.firstChild,t=[];e;)t.push(e),e=e.next;return t},e.prototype.isAncestorOf=function(e){for(;e;){if(e.id===this.id)return!0;e=e.parent}return!1},e.prototype.addChild=function(e,t){void 0===t&&(t=this.lastChild);var n=null===this.firstChild,i=null===t,r=t===this.lastChild
;n?(this.firstChild=this.lastChild=e,e.next=e.previous=null):i?(this.firstChild.previous=e,e.next=this.firstChild,e.previous=null,this.firstChild=e):r?(this.lastChild.next=e,e.next=null,e.previous=this.lastChild,this.lastChild=e):(e.previous=t,e.next=t.next,t.next.previous=e,t.next=e),e.parent=this,e.depth=this.depth+1},e.prototype.removeChild=function(e){var t=this.firstChild===e,n=this.lastChild===e;t&&n?this.firstChild=this.lastChild=null:t?(e.next.previous=null,this.firstChild=e.next):n?(e.previous.next=null,this.lastChild=e.previous):(e.next.previous=e.previous,e.previous.next=e.next),e.parent=null,e.depth=null},e.prototype.forEachChild=function(e){for(var t,n=this.firstChild;n;)t=n.next,e(n),n=t},e.prototype.mapEachChild=function(e){var t=[];return this.forEachChild(function(n){t.push(e(n))}),t},e.prototype.sort=function(e){var t=this;return this.context.sorter?e.sort(function(e,n){return t.context.sorter.compare(t.context.tree,e,n)}):e},e.prototype._getHeight=function(){
return this.context.renderer.getHeight(this.context.tree,this.element)},e.prototype._isVisible=function(){return this.context.filter.isVisible(this.context.tree,this.element)},e.prototype.isDisposed=function(){return this._isDisposed},e.prototype.dispose=function(){this.forEachChild(function(e){return e.dispose()}),this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this._onDidDispose.fire(this),this.registry.deregister(this),this._onDidCreate.dispose(),this._onDidReveal.dispose(),this._onExpand.dispose(),this._onDidExpand.dispose(),this._onCollapse.dispose(),this._onDidCollapse.dispose(),this._onDidAddTrait.dispose(),this._onDidRemoveTrait.dispose(),this._onDidRefresh.dispose(),this._onRefreshChildren.dispose(),this._onDidRefreshChildren.dispose(),this._onDidDispose.dispose(),this._isDisposed=!0},e}();t.Item=p;var f=function(e){function t(t,n,i,r,o){return e.call(this,t,n,i,r,o)||this}return n(t,e),t.prototype.isVisible=function(){return!1},
t.prototype.setVisible=function(e){},t.prototype.isExpanded=function(){return!0},t.prototype._setExpanded=function(e){},t.prototype.render=function(){},t.prototype._getHeight=function(){return 0},t.prototype._isVisible=function(){return!1},t}(p),g=function(){function e(e,t){void 0===t&&(t=!0),this.item=e,this.start=t?e:null}return e.lastDescendantOf=function(t){return t?t instanceof f?e.lastDescendantOf(t.lastChild):t.isVisible()?t.isExpanded()&&null!==t.lastChild?e.lastDescendantOf(t.lastChild):t:e.lastDescendantOf(t.previous):null},e.prototype.current=function(){return this.item||null},e.prototype.next=function(){if(this.item)do{if((this.item instanceof f||this.item.isVisible()&&this.item.isExpanded())&&this.item.firstChild)this.item=this.item.firstChild;else if(this.item===this.start)this.item=null;else{for(;this.item&&this.item!==this.start&&!this.item.next;)this.item=this.item.parent;this.item===this.start&&(this.item=null),this.item=this.item?this.item.next:null}}while(this.item&&!this.item.isVisible())
;return this.item||null},e.prototype.previous=function(){if(this.item)do{var t=e.lastDescendantOf(this.item.previous);t?this.item=t:this.item.parent&&this.item.parent!==this.start&&this.item.parent.isVisible()?this.item=this.item.parent:this.item=null}while(this.item&&!this.item.isVisible());return this.item||null},e.prototype.parent=function(){if(this.item){var e=this.item.parent;e&&e!==this.start&&e.isVisible()?this.item=e:this.item=null}return this.item||null},e.prototype.first=function(){return this.item=this.start,this.next(),this.item||null},e.prototype.last=function(){return e.lastDescendantOf(this.start)},e}();t.TreeNavigator=g;var v=function(){function e(e){this._onSetInput=new c.Emitter,this.onSetInput=this._onSetInput.event,this._onDidSetInput=new c.Emitter,this.onDidSetInput=this._onDidSetInput.event,this._onRefresh=new c.Emitter,this.onRefresh=this._onRefresh.event,this._onDidRefresh=new c.Emitter,this.onDidRefresh=this._onDidRefresh.event,this._onDidHighlight=new c.Emitter,
this.onDidHighlight=this._onDidHighlight.event,this._onDidSelect=new c.Emitter,this.onDidSelect=this._onDidSelect.event,this._onDidFocus=new c.Emitter,this.onDidFocus=this._onDidFocus.event,this._onDidRevealItem=new c.Relay,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new c.Relay,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new c.Relay,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new c.Relay,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new c.Relay,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new c.Relay,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new c.Relay,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new c.Relay,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new c.Relay,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new c.Relay,
this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new c.Relay,this.onDidDisposeItem=this._onDidDisposeItem.event,this.context=e,this.input=null,this.traitsToItems={}}return e.prototype.setInput=function(e){var t=this,n={item:this.input};this._onSetInput.fire(n),this.setSelection([]),this.setFocus(),this.setHighlight(),this.lock=new d,this.input&&this.input.dispose(),this.registry&&(this.registry.dispose(),this.registryDisposable.dispose()),this.registry=new h,this._onDidRevealItem.input=this.registry.onDidRevealItem,this._onExpandItem.input=this.registry.onExpandItem,this._onDidExpandItem.input=this.registry.onDidExpandItem,this._onCollapseItem.input=this.registry.onCollapseItem,this._onDidCollapseItem.input=this.registry.onDidCollapseItem,this._onDidAddTraitItem.input=this.registry.onDidAddTraitItem,this._onDidRemoveTraitItem.input=this.registry.onDidRemoveTraitItem,this._onDidRefreshItem.input=this.registry.onDidRefreshItem,
this._onRefreshItemChildren.input=this.registry.onRefreshItemChildren,this._onDidRefreshItemChildren.input=this.registry.onDidRefreshItemChildren,this._onDidDisposeItem.input=this.registry.onDidDisposeItem,this.registryDisposable=this.registry.onDidDisposeItem(function(e){return e.getAllTraits().forEach(function(n){return delete t.traitsToItems[n][e.id]})});var i=this.context.dataSource.getId(this.context.tree,e);return this.input=new f(i,this.registry,this.context,this.lock,e),n={item:this.input},this._onDidSetInput.fire(n),this.refresh(this.input)},e.prototype.getInput=function(){return this.input?this.input.getElement():null},e.prototype.refresh=function(e,t){var n=this;void 0===e&&(e=null),void 0===t&&(t=!0);var i=this.getItem(e);if(!i)return a.TPromise.as(null);var r={item:i,recursive:t};return this._onRefresh.fire(r),i.refresh(t).then(function(){n._onDidRefresh.fire(r)})},e.prototype.expand=function(e){var t=this.getItem(e);return t?t.expand():a.TPromise.as(!1)},e.prototype.expandAll=function(e){if(!e){
e=[];for(var t,n=this.getNavigator();t=n.next();)e.push(t)}for(var i=[],r=0,o=e.length;r<o;r++)i.push(this.expand(e[r]));return a.Promise.join(i)},e.prototype.collapse=function(e,t){void 0===t&&(t=!1);var n=this.getItem(e);return n?n.collapse(t):a.TPromise.as(!1)},e.prototype.collapseAll=function(e,t){void 0===e&&(e=null),void 0===t&&(t=!1),e||(e=[this.input],t=!0);for(var n=[],i=0,r=e.length;i<r;i++)n.push(this.collapse(e[i],t));return a.Promise.join(n)},e.prototype.collapseDeepestExpandedLevel=function(){for(var e=this,t=this.findDeepestExpandedLevel(this.input,0),n=[this.input],i=0;i<t;i++)n=s.flatten(n.map(function(e){return e.getChildren()}));var r=n.map(function(t){return e.collapse(t,!1)});return a.Promise.join(r)},e.prototype.findDeepestExpandedLevel=function(e,t){var n=this,i=e.getChildren().filter(function(e){return e.isExpanded()});return i.length?Math.max.apply(Math,i.map(function(e){return n.findDeepestExpandedLevel(e,t+1)})):t},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),
this.isExpanded(e)?this.collapse(e,t):this.expand(e)},e.prototype.toggleExpansionAll=function(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(this.toggleExpansion(e[n]));return a.Promise.join(t)},e.prototype.isExpanded=function(e){var t=this.getItem(e);return!!t&&t.isExpanded()},e.prototype.getExpandedElements=function(){for(var e,t=[],n=this.getNavigator();e=n.next();)e.isExpanded()&&t.push(e.getElement());return t},e.prototype.reveal=function(e,t){var n=this;return void 0===t&&(t=null),this.resolveUnknownParentChain(e).then(function(e){var t=a.TPromise.as(null);return e.forEach(function(e){t=t.then(function(){return n.expand(e)})}),t}).then(function(){var i=n.getItem(e);if(i)return i.reveal(t)})},e.prototype.resolveUnknownParentChain=function(e){var t=this;return this.context.dataSource.getParent(this.context.tree,e).then(function(e){return e?t.resolveUnknownParentChain(e).then(function(t){return t.push(e),t}):a.TPromise.as([])})},e.prototype.setHighlight=function(e,t){this.setTraits("highlighted",e?[e]:[])
;var n={highlight:this.getHighlight(),payload:t};this._onDidHighlight.fire(n)},e.prototype.getHighlight=function(e){var t=this.getElementsWithTrait("highlighted",e);return 0===t.length?null:t[0]},e.prototype.isHighlighted=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("highlighted")},e.prototype.select=function(e,t){this.selectAll([e],t)},e.prototype.selectRange=function(e,t,n){var i=this.getItem(e),r=this.getItem(t);i&&r&&this.selectAll(l(i,r),n)},e.prototype.deselectRange=function(e,t,n){var i=this.getItem(e),r=this.getItem(t);i&&r&&this.deselectAll(l(i,r),n)},e.prototype.selectAll=function(e,t){this.addTraits("selected",e);var n={selection:this.getSelection(),payload:t};this._onDidSelect.fire(n)},e.prototype.deselect=function(e,t){this.deselectAll([e],t)},e.prototype.deselectAll=function(e,t){this.removeTraits("selected",e);var n={selection:this.getSelection(),payload:t};this._onDidSelect.fire(n)},e.prototype.setSelection=function(e,t){this.setTraits("selected",e);var n={
selection:this.getSelection(),payload:t};this._onDidSelect.fire(n)},e.prototype.toggleSelection=function(e,t){this.toggleTrait("selected",e);var n={selection:this.getSelection(),payload:t};this._onDidSelect.fire(n)},e.prototype.isSelected=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("selected")},e.prototype.getSelection=function(e){return this.getElementsWithTrait("selected",e)},e.prototype.selectNext=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=!0);for(var i,r=this.getSelection(),o=r.length>0?r[0]:this.input,s=this.getNavigator(o,!1),a=0;a<e&&(i=s.next());a++)o=i;t?this.setSelection([o],n):this.select(o,n)},e.prototype.selectPrevious=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=!0);var i=this.getSelection(),r=null,o=null;if(0===i.length){for(s=this.getNavigator(this.input);r=s.next();)o=r;r=o}else{r=i[0];for(var s=this.getNavigator(r,!1),a=0;a<e&&(o=s.previous());a++)r=o}t?this.setSelection([r],n):this.select(r,n)},e.prototype.selectParent=function(e,t){void 0===t&&(t=!0)
;var n=this.getSelection(),i=n.length>0?n[0]:this.input,r=this.getNavigator(i,!1).parent();r&&(t?this.setSelection([r],e):this.select(r,e))},e.prototype.setFocus=function(e,t){this.setTraits("focused",e?[e]:[]);var n={focus:this.getFocus(),payload:t};this._onDidFocus.fire(n)},e.prototype.isFocused=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("focused")},e.prototype.getFocus=function(e){var t=this.getElementsWithTrait("focused",e);return 0===t.length?null:t[0]},e.prototype.focusNext=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,r=this.getNavigator(i,!1),o=0;o<e&&(n=r.next());o++)i=n;this.setFocus(i,t)},e.prototype.focusPrevious=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,r=this.getNavigator(i,!1),o=0;o<e&&(n=r.previous());o++)i=n;this.setFocus(i,t)},e.prototype.focusParent=function(e){var t=this.getFocus()||this.input,n=this.getNavigator(t,!1).parent();n&&this.setFocus(n,e)},e.prototype.focusFirstChild=function(e){
var t=this.getItem(this.getFocus()||this.input),n=this.getNavigator(t,!1),i=n.next();n.parent()===t&&this.setFocus(i,e)},e.prototype.focusFirst=function(e,t){this.focusNth(0,e,t)},e.prototype.focusNth=function(e,t,n){for(var i=this.getParent(n),r=this.getNavigator(i),o=r.first(),s=0;s<e;s++)o=r.next();o&&this.setFocus(o,t)},e.prototype.focusLast=function(e,t){var n,i=this.getParent(t);if(t)n=i.lastChild;else{n=this.getNavigator(i).last()}n&&this.setFocus(n,e)},e.prototype.getParent=function(e){if(e){var t=this.getItem(e);if(t&&t.parent)return t.parent}return this.getItem(this.input)},e.prototype.getNavigator=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),new g(this.getItem(e),t)},e.prototype.getItem=function(e){return void 0===e&&(e=null),null===e?this.input:e instanceof p?e:"string"==typeof e?this.registry.getItem(e):this.registry.getItem(this.context.dataSource.getId(this.context.tree,e))},e.prototype.addTraits=function(e,t){
for(var n,i=this.traitsToItems[e]||{},r=0,o=t.length;r<o;r++)(n=this.getItem(t[r]))&&(n.addTrait(e),i[n.id]=n);this.traitsToItems[e]=i},e.prototype.removeTraits=function(e,t){var n,i,r=this.traitsToItems[e]||{};if(0===t.length){for(i in r)r.hasOwnProperty(i)&&(n=r[i]).removeTrait(e);delete this.traitsToItems[e]}else for(var o=0,s=t.length;o<s;o++)(n=this.getItem(t[o]))&&(n.removeTrait(e),delete r[n.id])},e.prototype.hasTrait=function(e,t){var n=this.getItem(t);return n&&n.hasTrait(e)},e.prototype.toggleTrait=function(e,t){var n=this.getItem(t);n&&(n.hasTrait(e)?this.removeTraits(e,[t]):this.addTraits(e,[t]))},e.prototype.setTraits=function(e,t){if(0===t.length)this.removeTraits(e,t);else{for(var n,i={},r=0,o=t.length;r<o;r++)(n=this.getItem(t[r]))&&(i[n.id]=n);var s,a=this.traitsToItems[e]||{},c=[];for(s in a)a.hasOwnProperty(s)&&(i.hasOwnProperty(s)?delete i[s]:c.push(a[s]));for(var r=0,o=c.length;r<o;r++)(n=c[r]).removeTrait(e),delete a[n.id];for(s in i)i.hasOwnProperty(s)&&((n=i[s]).addTrait(e),a[s]=n)
;this.traitsToItems[e]=a}},e.prototype.getElementsWithTrait=function(e,t){var n,i=[],r=this.traitsToItems[e]||{};for(n in r)r.hasOwnProperty(n)&&(r[n].isVisible()||t)&&i.push(r[n].getElement());return i},e.prototype.dispose=function(){this.registry&&(this.registry.dispose(),this.registry=null),this._onSetInput.dispose(),this._onDidSetInput.dispose(),this._onRefresh.dispose(),this._onDidRefresh.dispose(),this._onDidHighlight.dispose(),this._onDidSelect.dispose(),this._onDidFocus.dispose(),this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._onDidDisposeItem.dispose()},e}();t.TreeModel=v}),define(e[948],t([1,0,254]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){
this.heightMap=[],this.indexes={}}return e.prototype.getContentHeight=function(){var e=this.heightMap[this.heightMap.length-1];return e?e.top+e.height:0},e.prototype.onInsertItems=function(e,t){void 0===t&&(t=null);var n,i,r,o,s,a=0;if(null===t)r=0,s=0;else{if(r=this.indexes[t]+1,!(i=this.heightMap[r-1]))return void console.error("view item doesnt exist");s=i.top+i.height}for(var c=this.heightMap.splice.bind(this.heightMap,r,0),l=[];n=e.next();)(i=this.createViewItem(n)).top=s+a,this.indexes[n.id]=r++,l.push(i),a+=i.height;for(c.apply(this.heightMap,l),o=r;o<this.heightMap.length;o++)(i=this.heightMap[o]).top+=a,this.indexes[i.model.id]=o;for(o=l.length-1;o>=0;o--)this.onInsertItem(l[o]);for(o=this.heightMap.length-1;o>=r;o--)this.onRefreshItem(this.heightMap[o]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,n,i,r=null,o=0;t=e.next();){if(i=this.indexes[t],!(n=this.heightMap[i]))return void console.error("view item doesnt exist");o-=n.height,
delete this.indexes[t],this.onRemoveItem(n),null===r&&(r=i)}if(0!==o)for(this.heightMap.splice(r,i-r+1),i=r;i<this.heightMap.length;i++)(n=this.heightMap[i]).top+=o,this.indexes[n.model.id]=i,this.onRefreshItem(n)},e.prototype.onRemoveItem=function(e){},e.prototype.onRefreshItemSet=function(e){var t=this,i=e.sort(function(e,n){return t.indexes[e.id]-t.indexes[n.id]});this.onRefreshItems(new n.ArrayIterator(i))},e.prototype.onRefreshItems=function(e){for(var t,n,i,r,o=null,s=0;t=e.next();){for(r=this.indexes[t.id];0!==s&&null!==o&&o<r;o++)(n=this.heightMap[o]).top+=s,this.onRefreshItem(n);n=this.heightMap[r],i=t.getHeight(),n.top+=s,s+=i-n.height,n.height=i,this.onRefreshItem(n,!0),o=r+1}if(0!==s&&null!==o)for(;o<this.heightMap.length;o++)(n=this.heightMap[o]).top+=s,this.onRefreshItem(n)},e.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1)},e.prototype.itemsCount=function(){return this.heightMap.length},e.prototype.itemAt=function(e){return this.heightMap[this.indexAt(e)].model.id},
e.prototype.withItemsInRange=function(e,t,n){e=this.indexAt(e),t=this.indexAt(t);for(var i=e;i<=t;i++)n(this.heightMap[i].model.id)},e.prototype.indexAt=function(e){for(var t,n,i=0,r=this.heightMap.length;i<r;)if(t=Math.floor((i+r)/2),n=this.heightMap[t],e<n.top)r=t;else{if(!(e>=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}();t.HeightMap=i}),define(e[952],t([1,0,11,433]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function t(t,i,r,o,s){this.id=i,this.worker=function(t,i){if(n.globals.MonacoEnvironment){
if("function"==typeof n.globals.MonacoEnvironment.getWorker)return n.globals.MonacoEnvironment.getWorker(t,i);if("function"==typeof n.globals.MonacoEnvironment.getWorkerUrl)return new Worker(n.globals.MonacoEnvironment.getWorkerUrl(t,i))}if("function"==typeof e)return new Worker(e.toUrl("./"+t)+"#"+i);throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",r),this.postMessage(t),this.worker.onmessage=function(e){o(e.data)},"function"==typeof this.worker.addEventListener&&this.worker.addEventListener("error",s)}return t.prototype.getId=function(){return this.id},t.prototype.postMessage=function(e){this.worker&&this.worker.postMessage(e)},t.prototype.dispose=function(){this.worker.terminate(),this.worker=null},t}(),o=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,n,o){var s=this,a=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError
;return new r(t,a,this._label||"anonymous"+a,n,function(e){i.logOnceWebWorkerWarning(e),s._webWorkerFailedBeforeError=e,o(e)})},e.LAST_WORKER_ID=0,e}();t.DefaultWorkerFactory=o}),define(e[953],t([13]),{}),define(e[74],t([1,0,4,30,5,14,170,8,953]),function(e,t,i,r,o,s,a,c){"use strict";function l(e){return e[v]||(e[v]={}),e[v]}function u(e){return!!e[v]}function d(e,t){return e instanceof b?new b(e):new y(e.getHTMLElement(),t)}function h(e,t){return new y(e,t)}function p(){return new y(null,!0)}function f(e,t,n){l(e)[t]=n}function g(e,t,n){if(u(e)){var i=l(e)[t];if(!r.isUndefined(i))return i}return n}Object.defineProperty(t,"__esModule",{value:!0});var v="_msDataKey",m="__$binding",y=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toUnbind={},this.captureToUnbind={}}return e.prototype.asContainer=function(){return d(this,this.offdom)},e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,
t.createdElements=this.createdElements,t.captureToUnbind=this.captureToUnbind,t.toUnbind=this.toUnbind,t},e.prototype.build=function(t,n){a.ok(this.offdom,"This builder was not created off-dom, so build() can not be called."),t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,a.ok(t,"Builder can only be build() with a container provided."),a.ok(c.isHTMLElement(t),"The container must either be a HTMLElement or a Builder.");var i,o,s=t,l=s.childNodes;if(r.isNumber(n)&&n<l.length)for(i=0,o=this.createdElements.length;i<o;i++)s.insertBefore(this.createdElements[i],l[n++]);else for(i=0,o=this.createdElements.length;i<o;i++)s.appendChild(this.createdElements[i]);return this},e.prototype.appendTo=function(t,n){t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,a.ok(t,"Builder can only be build() with a container provided."),a.ok(c.isHTMLElement(t),"The container must either be a HTMLElement or a Builder.");var i=t
;this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement);var o=i.childNodes;return r.isNumber(n)&&n<o.length?i.insertBefore(this.currentElement,o[n]):i.appendChild(this.currentElement),this},e.prototype.append=function(t,n){return a.ok(t,"Need a child to append"),c.isHTMLElement(t)&&(t=h(t)),a.ok(t instanceof e||t instanceof b,"Need a child to append"),t.appendTo(this,n),this},e.prototype.offDOM=function(){return this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement),this},e.prototype.getHTMLElement=function(){return this.currentElement},e.prototype.getContainer=function(){return this.container},e.prototype.div=function(e,t){return this.doElement("div",e,t)},e.prototype.p=function(e,t){return this.doElement("p",e,t)},e.prototype.ul=function(e,t){return this.doElement("ul",e,t)},e.prototype.li=function(e,t){return this.doElement("li",e,t)},e.prototype.span=function(e,t){return this.doElement("span",e,t)},
e.prototype.img=function(e,t){return this.doElement("img",e,t)},e.prototype.a=function(e,t){return this.doElement("a",e,t)},e.prototype.element=function(e,t,n){return this.doElement(e,t,n)},e.prototype.doElement=function(t,n,i){var o=document.createElement(t);if(this.currentElement=o,this.offdom&&this.createdElements.push(o),r.isObject(n)&&this.attr(n),r.isFunction(n)&&(i=n),r.isFunction(i)){var s=new e(o);i.call(s,s)}return this.offdom||this.container.appendChild(o),this},e.prototype.domFocus=function(){return this.currentElement.focus(),this},e.prototype.domBlur=function(){return this.currentElement.blur(),this},e.prototype.on=function(e,t,n,i){var o=this;if(r.isArray(e))e.forEach(function(e){o.on(e,t,n,i)});else{var s=e,a=c.addDisposableListener(this.currentElement,s,function(e){t(e,o,a)},i||!1);i?(this.captureToUnbind[s]||(this.captureToUnbind[s]=[]),this.captureToUnbind[s].push(a)):(this.toUnbind[s]||(this.toUnbind[s]=[]),this.toUnbind[s].push(a));var l=this.getProperty("__$listeners",[]);l.push(a),
this.setProperty("__$listeners",l),n&&r.isArray(n)&&n.push(a)}return this},e.prototype.off=function(e,t){var n=this;if(r.isArray(e))e.forEach(function(e){n.off(e)});else{var i=e;t?this.captureToUnbind[i]&&(this.captureToUnbind[i]=o.dispose(this.captureToUnbind[i])):this.toUnbind[i]&&(this.toUnbind[i]=o.dispose(this.toUnbind[i]))}return this},e.prototype.once=function(e,t,n,i){var o=this;if(r.isArray(e))e.forEach(function(e){o.once(e,t)});else{var s=e,a=c.addDisposableListener(this.currentElement,s,function(e){t(e,o,a),a.dispose()},i||!1);n&&r.isArray(n)&&n.push(a)}return this},e.prototype.attr=function(e,t){if(r.isObject(e)){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];this.doSetAttr(n,i)}return this}return r.isString(e)&&!r.isString(t)?this.currentElement.getAttribute(e):(r.isString(e)&&(r.isString(t)||(t=String(t)),this.doSetAttr(e,t)),this)},e.prototype.doSetAttr=function(e,t){"class"===e&&(e="addClass"),
this[e]?r.isArray(t)?this[e].apply(this,t):this[e].call(this,t):this.currentElement.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.currentElement.removeAttribute(e)},e.prototype.id=function(e){return this.currentElement.setAttribute("id",e),this},e.prototype.title=function(e){return this.currentElement.setAttribute("title",e),this},e.prototype.type=function(e){return this.currentElement.setAttribute("type",e),this},e.prototype.value=function(e){return this.currentElement.setAttribute("value",e),this},e.prototype.tabindex=function(e){return this.currentElement.setAttribute("tabindex",e.toString()),this},e.prototype.style=function(e,t){if(r.isObject(e)){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];this.doSetStyle(n,i)}return this}var o=r.isString(e);return o&&r.isUndefined(t)?this.currentElement.style[this.cssKeyToJavaScriptProperty(e)]:(o&&this.doSetStyle(e,t),this)},e.prototype.doSetStyle=function(e,t){if(e.indexOf("-")>=0){var n=e.split("-");e=n[0];for(var i=1;i<n.length;i++){var r=n[i]
;e=e+r.charAt(0).toUpperCase()+r.substr(1)}}this.currentElement.style[this.cssKeyToJavaScriptProperty(e)]=t},e.prototype.cssKeyToJavaScriptProperty=function(e){if(e.indexOf("-")>=0){var t=e.split("-");e=t[0];for(var n=1;n<t.length;n++){var i=t[n];e=e+i.charAt(0).toUpperCase()+i.substr(1)}}else"float"===e&&(e="cssFloat");return e},e.prototype.getComputedStyle=function(){return c.getComputedStyle(this.currentElement)},e.prototype.addClass=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach(function(t){t.split(" ").forEach(function(t){c.addClass(e.currentElement,t)})}),this},e.prototype.setClass=function(e,t){return void 0===t&&(t=null),null===t?this.currentElement.className=e:t?this.addClass(e):this.removeClass(e),this},e.prototype.hasClass=function(e){return c.hasClass(this.currentElement,e)},e.prototype.removeClass=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach(function(t){t.split(" ").forEach(function(t){
c.removeClass(e.currentElement,t)})}),this},e.prototype.toggleClass=function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e),this},e.prototype.color=function(e){return this.currentElement.style.color=e,this},e.prototype.padding=function(e,t,n,i){return r.isString(e)&&e.indexOf(" ")>=0?this.padding.apply(this,e.split(" ")):(r.isUndefinedOrNull(e)||(this.currentElement.style.paddingTop=this.toPixel(e)),r.isUndefinedOrNull(t)||(this.currentElement.style.paddingRight=this.toPixel(t)),r.isUndefinedOrNull(n)||(this.currentElement.style.paddingBottom=this.toPixel(n)),r.isUndefinedOrNull(i)||(this.currentElement.style.paddingLeft=this.toPixel(i)),this)},e.prototype.margin=function(e,t,n,i){return r.isString(e)&&e.indexOf(" ")>=0?this.margin.apply(this,e.split(" ")):(r.isUndefinedOrNull(e)||(this.currentElement.style.marginTop=this.toPixel(e)),r.isUndefinedOrNull(t)||(this.currentElement.style.marginRight=this.toPixel(t)),r.isUndefinedOrNull(n)||(this.currentElement.style.marginBottom=this.toPixel(n)),
r.isUndefinedOrNull(i)||(this.currentElement.style.marginLeft=this.toPixel(i)),this)},e.prototype.position=function(e,t,n,i,o){return r.isString(e)&&e.indexOf(" ")>=0?this.position.apply(this,e.split(" ")):(r.isUndefinedOrNull(e)||(this.currentElement.style.top=this.toPixel(e)),r.isUndefinedOrNull(t)||(this.currentElement.style.right=this.toPixel(t)),r.isUndefinedOrNull(n)||(this.currentElement.style.bottom=this.toPixel(n)),r.isUndefinedOrNull(i)||(this.currentElement.style.left=this.toPixel(i)),o||(o="absolute"),this.currentElement.style.position=o,this)},e.prototype.size=function(e,t){return r.isString(e)&&e.indexOf(" ")>=0?this.size.apply(this,e.split(" ")):(r.isUndefinedOrNull(e)||(this.currentElement.style.width=this.toPixel(e)),r.isUndefinedOrNull(t)||(this.currentElement.style.height=this.toPixel(t)),this)},e.prototype.display=function(e){return this.currentElement.style.display=e,this},e.prototype.show=function(){return this.hasClass("monaco-builder-hidden")&&this.removeClass("monaco-builder-hidden"),
this.attr("aria-hidden","false"),this.cancelVisibilityPromise(),this},e.prototype.showDelayed=function(e){var t=this;this.cancelVisibilityPromise();var n=i.TPromise.timeout(e);return this.setProperty("__$visibility",n),n.done(function(){t.removeProperty("__$visibility"),t.show()}),this},e.prototype.hide=function(){return this.hasClass("monaco-builder-hidden")||this.addClass("monaco-builder-hidden"),this.attr("aria-hidden","true"),this.cancelVisibilityPromise(),this},e.prototype.isHidden=function(){return this.hasClass("monaco-builder-hidden")||"none"===this.currentElement.style.display},e.prototype.cancelVisibilityPromise=function(){var e=this.getProperty("__$visibility");e&&(e.cancel(),this.removeProperty("__$visibility"))},e.prototype.toPixel=function(e){return-1===e.toString().indexOf("px")?e.toString()+"px":e},e.prototype.innerHtml=function(e,t){return t?this.currentElement.innerHTML+=e:this.currentElement.innerHTML=e,this},e.prototype.text=function(e,t){
return t?0===this.currentElement.children.length?this.currentElement.textContent+=e:this.currentElement.appendChild(document.createTextNode(e)):this.currentElement.textContent=e,this},e.prototype.safeInnerHtml=function(e,t){return this.innerHtml(s.escape(e),t)},e.prototype.setProperty=function(e,t){return f(this.currentElement,e,t),this},e.prototype.getProperty=function(e,t){return g(this.currentElement,e,t)},e.prototype.removeProperty=function(e){return u(this.currentElement)&&delete l(this.currentElement)[e],this},e.prototype.child=function(e){void 0===e&&(e=0);return h(this.currentElement.children.item(e))},e.prototype.unbindDescendants=function(e){if(e&&e.children)for(var t=0,n=e.children.length;t<n;t++){var i=e.children.item(t);if(u(i)){var o=l(i).__$listeners;if(r.isArray(o))for(;o.length;)o.pop().dispose();delete i[v]}this.unbindDescendants(i)}},e.prototype.empty=function(){return this.unbindDescendants(this.currentElement),this.clearChildren(),this.offdom&&(this.createdElements=[]),this},
e.prototype.clearChildren=function(){return this.currentElement&&c.clearNode(this.currentElement),this},e.prototype.destroy=function(){if(this.currentElement&&(this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement),this.empty(),u(this.currentElement))){var e=l(this.currentElement).__$listeners;if(r.isArray(e))for(;e.length;)e.pop().dispose();delete this.currentElement[v]}var t;for(t in this.toUnbind)this.toUnbind.hasOwnProperty(t)&&r.isArray(this.toUnbind[t])&&(this.toUnbind[t]=o.dispose(this.toUnbind[t]));for(t in this.captureToUnbind)this.captureToUnbind.hasOwnProperty(t)&&r.isArray(this.captureToUnbind[t])&&(this.captureToUnbind[t]=o.dispose(this.captureToUnbind[t]));this.currentElement=null,this.container=null,this.offdom=null,this.createdElements=null,this.captureToUnbind=null,this.toUnbind=null},e.prototype.dispose=function(){this.destroy()},e.prototype.getTotalSize=function(){var e=c.getTotalWidth(this.currentElement),t=c.getTotalHeight(this.currentElement)
;return new c.Dimension(e,t)},e.prototype.getClientArea=function(){return c.getClientArea(this.currentElement)},e}();t.Builder=y;var b=function(e){function t(n){var i=this;if(a.ok(r.isArray(n)||n instanceof t,"Expected Array or MultiBuilder as parameter"),i=e.call(this)||this,i.length=0,i.builders=[],r.isArray(n))for(o=0;o<n.length;o++)n[o]instanceof HTMLElement?i.push(h(n[o])):i.push(n[o]);else for(var o=0;o<n.length;o++)i.push(n.item(o));var s=i,c=function(e){s[e]=function(){for(var n,i=Array.prototype.slice.call(arguments),o=!1,a=0;a<s.length;a++){var c=s.item(a)[e].apply(s.item(a),i);if(c instanceof t){n||(n=[]),o=!0;for(var l=0;l<c.length;l++)n.push(c.item(l))}else r.isUndefined(c)||c instanceof y||(n||(n=[]),n.push(c))}return n&&o?new t(n):n||s}};for(var l in y.prototype)"clone"!==l&&"and"!==l&&y.prototype.hasOwnProperty(l)&&r.isFunction(y.prototype[l])&&c(l);return i}return n(t,e),t.prototype.item=function(e){return this.builders[e]},t.prototype.push=function(){
for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++)this.builders.push(e[n]);this.length=this.builders.length},t.prototype.clone=function(){return new t(this)},t}(y);t.MultiBuilder=b,t.withElement=h,t.setPropertyOnElement=f,t.getPropertyFromElement=g,t.bindElement=function(e,t){f(e,m,t)};var S=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;t.$=function(e){if(r.isUndefined(e))return p();if(!e)throw new Error("Bad use of $");if(c.isHTMLElement(e)||e===window)return h(e);if(r.isArray(e))return new b(e);if(e instanceof y)return d(e);if(r.isString(e)){if("<"===e[0]){var t=void 0,n=document.createElement("div");if(n.innerHTML=s.format.apply(s,arguments),0===n.children.length)throw new Error("Bad use of $");if(1===n.children.length)return t=n.firstChild,n.removeChild(t),h(t);for(var i=[];n.firstChild;)t=n.firstChild,n.removeChild(t),i.push(h(t));return new b(i)}if(1===arguments.length){var o=S.exec(e);if(!o)throw new Error("Bad use of $")
;var a=o[1]||"div",l=o[3]||void 0,u=(o[4]||"").replace(/\./g," "),f={};return l&&(f.id=l),u&&(f.class=u),p().element(a,f)}var g=p();return g.element.apply(g,arguments),g}throw new Error("Bad use of $")}}),define(e[959],t([13]),{}),define(e[960],t([13]),{}),define(e[961],t([13]),{}),define(e[155],t([1,0,8,74,84,51,24,7,5,132,961]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u={buttonBackground:o.Color.fromHex("#0E639C"),buttonHoverBackground:o.Color.fromHex("#006BB3"),buttonForeground:o.Color.white},d=function(){function e(e,t){var o=this;this._onDidClick=new a.Emitter,this.onDidClick=this._onDidClick.event,this.options=t||Object.create(null),s.mixin(this.options,u,!1),this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonForeground=this.options.buttonForeground,this.buttonBorder=this.options.buttonBorder,this.$el=i.$("a.monaco-button").attr({tabIndex:"0",role:"button"}).appendTo(e),
l.Gesture.addTarget(this.$el.getHTMLElement()),this.$el.on([n.EventType.CLICK,l.EventType.Tap],function(e){o.enabled?o._onDidClick.fire(e):n.EventHelper.stop(e)}),this.$el.on(n.EventType.KEY_DOWN,function(e){var t=new r.StandardKeyboardEvent(e),i=!1;o.enabled&&t.equals(3)||t.equals(10)?(o._onDidClick.fire(e),i=!0):t.equals(9)&&(o.$el.domBlur(),i=!0),i&&n.EventHelper.stop(t,!0)}),this.$el.on(n.EventType.MOUSE_OVER,function(e){o.$el.hasClass("disabled")||o.setHoverBackground()}),this.$el.on(n.EventType.MOUSE_OUT,function(e){o.applyStyles()}),this.focusTracker=n.trackFocus(this.$el.getHTMLElement()),this.focusTracker.onDidFocus(function(){return o.setHoverBackground()}),this.focusTracker.onDidBlur(function(){return o.applyStyles()}),this.applyStyles()}return e.prototype.setHoverBackground=function(){var e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null;e&&this.$el.style("background-color",e)},e.prototype.style=function(e){this.buttonForeground=e.buttonForeground,
this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.$el){var e=this.buttonBackground?this.buttonBackground.toString():null,t=this.buttonForeground?this.buttonForeground.toString():null,n=this.buttonBorder?this.buttonBorder.toString():null;this.$el.style("color",t),this.$el.style("background-color",e),this.$el.style("border-width",n?"1px":null),this.$el.style("border-style",n?"solid":null),this.$el.style("border-color",n)}},Object.defineProperty(e.prototype,"element",{get:function(){return this.$el.getHTMLElement()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{set:function(e){this.$el.hasClass("monaco-text-button")||this.$el.addClass("monaco-text-button"),this.$el.text(e),this.options.title&&this.$el.title(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{set:function(e){this.$el.addClass(e)},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return!this.$el.hasClass("disabled")},set:function(e){e?(this.$el.removeClass("disabled"),this.$el.attr({"aria-disabled":"false",tabIndex:"0"})):(this.$el.addClass("disabled"),this.$el.attr("aria-disabled",String(!0)),n.removeTabIndexAndUpdateFocus(this.$el.getHTMLElement()))},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this.$el.domFocus()},e.prototype.dispose=function(){this.$el&&(this.$el.dispose(),this.$el=null,this.focusTracker.dispose(),this.focusTracker=null),this._onDidClick.dispose()},e}();t.Button=d;var h=function(){function e(e,t,n){this._buttons=[],this.toDispose=[],this.create(e,t,n)}return Object.defineProperty(e.prototype,"buttons",{get:function(){return this._buttons},enumerable:!0,configurable:!0}),e.prototype.create=function(e,t,o){for(var s=this,a=function(a){var l=new d(e,o);c._buttons.push(l),c.toDispose.push(l),t>1&&i.$(l.element).on(n.EventType.KEY_DOWN,function(e){
var t,i=new r.StandardKeyboardEvent(e),o=!0;i.equals(15)?t=a>0?a-1:s._buttons.length-1:i.equals(17)?t=a===s._buttons.length-1?0:a+1:o=!1,o&&(s._buttons[t].focus(),n.EventHelper.stop(e,!0))},c.toDispose)},c=this,l=0;l<t;l++)a(l)},e.prototype.dispose=function(){this.toDispose=c.dispose(this.toDispose)},e}();t.ButtonGroup=h}),define(e[968],t([13]),{}),define(e[246],t([1,0,8,92,51,7,24,968]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c={inputActiveOptionBorder:o.Color.fromHex("#007ACC")},l=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new s.Emitter),n.onChange=n._onChange.event,n._onKeyDown=n._register(new s.Emitter),n.onKeyDown=n._onKeyDown.event,n._opts=a.deepClone(t),a.mixin(n._opts,c,!1),n._checked=n._opts.isChecked,n.domNode=document.createElement("div"),n.domNode.title=n._opts.title,n.domNode.className="monaco-custom-checkbox "+n._opts.actionClassName+" "+(n._checked?"checked":"unchecked"),n.domNode.tabIndex=0,
n.domNode.setAttribute("role","checkbox"),n.domNode.setAttribute("aria-checked",String(n._checked)),n.domNode.setAttribute("aria-label",n._opts.title),n.applyStyles(),n.onclick(n.domNode,function(e){n.checked=!n._checked,n._onChange.fire(!1),e.preventDefault()}),n.onkeydown(n.domNode,function(e){if(10===e.keyCode||3===e.keyCode)return n.checked=!n._checked,n._onChange.fire(!0),void e.preventDefault();n._onKeyDown.fire(e)}),n}return n(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return"true"!==this.domNode.getAttribute("aria-disabled")},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()},enumerable:!0,configurable:!0}),t.prototype.width=function(){return 22},
t.prototype.style=function(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),this.applyStyles()},t.prototype.applyStyles=function(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent")},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){i.removeTabIndexAndUpdateFocus(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(r.Widget);t.Checkbox=l}),define(e[980],t([13]),{}),define(e[396],t([1,0,74,8,5,980]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(o=t.AnchorAlignment||(t.AnchorAlignment={}));var s;!function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(s=t.AnchorPosition||(t.AnchorPosition={}));var a=function(){function e(e){var t=this
;this.$view=n.$(".context-view").hide(),this.setContainer(e),this.toDispose=[{dispose:function(){t.setContainer(null)}}],this.toDisposeOnClean=null}return e.prototype.setContainer=function(t){var i=this;this.$container&&(this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement()),this.$container.off(e.BUBBLE_UP_EVENTS),this.$container.off(e.BUBBLE_DOWN_EVENTS,!0),this.$container=null),t&&(this.$container=n.$(t),this.$view.appendTo(this.$container),this.$container.on(e.BUBBLE_UP_EVENTS,function(e){i.onDOMEvent(e,document.activeElement,!1)}),this.$container.on(e.BUBBLE_DOWN_EVENTS,function(e){i.onDOMEvent(e,document.activeElement,!0)},null,!0))},e.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},e.prototype.layout=function(){
this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},e.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){var n=i.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var r=t;e={top:r.y,left:r.x,width:r.width||0,height:r.height||0}}var a={top:i.StandardWindow.scrollY,left:i.StandardWindow.scrollX,height:window.innerHeight,width:window.innerWidth},c=this.$view.getTotalSize(),l={width:c.width,height:c.height},u=this.delegate.anchorPosition||s.BELOW,d=this.delegate.anchorAlignment||o.LEFT,h=function(e,t,n,i,r){var a=function(e,t,n,i){return t?e:i?n:e},c=function(e,t,n,i,r){return r?a(e,t,n,i):a(n,i,e,t)};return{top:function(){var r=t.top-e.height,o=t.top+t.height,a=r>=n.top&&r+e.height<=n.top+n.height,l=o>=n.top&&o+e.height<=n.top+n.height;return c(r,a,o,l,i===s.ABOVE)}(),left:function(){
var i=t.left,s=t.left+t.width-e.width,a=i>=n.left&&i+e.width<=n.left+n.width,l=s>=n.left&&s+e.width<=n.left+n.width;return c(i,a,s,l,r===o.LEFT)}()}}(l,e,a,u,d),p=i.getDomNodePagePosition(this.$container.getHTMLElement());h.top-=p.top,h.left-=p.left,this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(u===s.BELOW?"bottom":"top"),this.$view.addClass(d===o.LEFT?"left":"right"),this.$view.style({top:h.top+"px",left:h.left+"px",width:"initial"})},e.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},e.prototype.isVisible=function(){return!!this.delegate},e.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!i.isAncestor(e.target,this.$container.getHTMLElement())&&this.hide())},e.prototype.dispose=function(){this.hide(),
this.toDispose=r.dispose(this.toDispose)},e.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],e.BUBBLE_DOWN_EVENTS=["click"],e}();t.ContextView=a}),define(e[990],t([13]),{}),define(e[204],t([1,0,8,14,51,24,990]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={badgeBackground:r.Color.fromHex("#4D4D4D"),badgeForeground:r.Color.fromHex("#FFFFFF")},a=function(){function e(e,t){this.options=t||Object.create(null),o.mixin(this.options,s,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=n.append(e,n.$(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setCountFormat=function(e){this.countFormat=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},
e.prototype.render=function(){this.element.textContent=i.format(this.countFormat,this.count),this.element.title=i.format(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,n=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":null,this.element.style.borderStyle=n?"solid":null,this.element.style.borderColor=n}},e}();t.CountBadge=a}),define(e[993],t([13]),{}),define(e[1009],t([13]),{}),define(e[1013],t([13]),{}),define(e[399],t([13]),{}),define(e[1018],t([13]),{}),define(e[1019],t([13]),{}),define(e[1027],t([13]),{}),define(e[402],t([13]),{}),define(e[1031],t([13]),{}),
define(e[1039],t([13]),{}),define(e[1041],t([13]),{}),define(e[243],t([1,0,14,1039,1041]),function(e,t,n){"use strict";function i(e){return function(e){return e.replace(/\$\(((.+?)(~(.*?))?)\)/g,function(e,t,n,i,r){return'<span class="octicon octicon-'+n+" "+(r?"octicon-animation-"+r:"")+'"></span>'})}(n.escape(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.renderOcticons=i;var r=function(){function e(e){this._container=e}return Object.defineProperty(e.prototype,"text",{set:function(e){this._container.innerHTML=i(e||"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this._container.title=e},enumerable:!0,configurable:!0}),e}();t.OcticonLabel=r}),define(e[194],t([1,0,8,24,243]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}
return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,n,r,o){void 0===n&&(n=[]),void 0===r&&(r=""),t||(t=""),o&&(t=e.escapeNewLines(t,n)),this.didEverRender&&this.text===t&&this.title===r&&i.equals(this.highlights,n)||(Array.isArray(n)||(n=[]),this.text=t,this.title=r,this.highlights=n,this.render())},e.prototype.render=function(){n.clearNode(this.domNode);for(var e,t=[],i=0,o=0;o<this.highlights.length;o++)(e=this.highlights[o]).end!==e.start&&(i<e.start&&(t.push("<span>"),t.push(r.renderOcticons(this.text.substring(i,e.start))),t.push("</span>"),i=e.end),t.push('<span class="highlight">'),t.push(r.renderOcticons(this.text.substring(e.start,e.end))),t.push("</span>"),i=e.end);i<this.text.length&&(t.push("<span>"),t.push(r.renderOcticons(this.text.substring(i))),t.push("</span>")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,
this.highlights=null},e.escapeNewLines=function(e,t){var n=0,i=0;return e.replace(/\r\n|\r|\n/,function(e,r){i="\r\n"===e?-1:0,r+=n;for(var o=0,s=t;o<s.length;o++){var a=s[o];a.end<=r||(a.start>=r&&(a.start+=i),a.end>=r&&(a.end+=i))}return n+=i,"⏎"})},e}();t.HighlightedLabel=o}),define(e[277],t([1,0,8,194,25,62,5,1018]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){
this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),l=function(){function e(e,t){var n=this;this.domNode=new c(i.append(e,i.$(".monaco-icon-label"))),this.labelDescriptionContainer=new c(i.append(this.domNode.element,i.$(".monaco-icon-label-description-container"))),t&&t.supportHighlights?this.labelNode=new r.HighlightedLabel(i.append(this.labelDescriptionContainer.element,i.$("a.label-name"))):this.labelNode=new c(i.append(this.labelDescriptionContainer.element,i.$("a.label-name"))),t&&t.supportDescriptionHighlights?this.descriptionNodeFactory=function(){return new r.HighlightedLabel(i.append(n.labelDescriptionContainer.element,i.$("span.label-description")))
}:this.descriptionNodeFactory=function(){return new c(i.append(n.labelDescriptionContainer.element,i.$("span.label-description")))}}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode.element},enumerable:!0,configurable:!0}),e.prototype.onClick=function(e){return a.combinedDisposable([i.addDisposableListener(this.labelDescriptionContainer.element,i.EventType.CLICK,function(t){return e(t)})])},e.prototype.setValue=function(e,t,n){var i=["monaco-icon-label"];n&&(n.extraClasses&&i.push.apply(i,n.extraClasses),n.italic&&i.push("italic")),this.domNode.className=i.join(" "),this.domNode.title=n&&n.title?n.title:"",this.labelNode instanceof r.HighlightedLabel?this.labelNode.set(e||"",n?n.matches:void 0):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof r.HighlightedLabel?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),
n&&n.descriptionTitle?this.descriptionNode.element.title=n.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=n&&n.descriptionTitle?n.descriptionTitle:"",this.descriptionNode.empty=!t))},e.prototype.dispose=function(){this.domNode.dispose(),this.labelNode.dispose(),this.descriptionNode&&this.descriptionNode.dispose()},e}();t.IconLabel=l;var u=function(e){function t(t,n,i,r){var o=e.call(this,t)||this;return o.setFile(n,i,r),o}return n(t,e),t.prototype.setFile=function(e,t,n){var i=o.dirname(e.fsPath);this.setValue(s.getBaseLabel(e),i&&"."!==i?s.getPathLabel(i,n,t):"",{title:e.fsPath})},t}(l);t.FileLabel=u}),define(e[1062],t([13]),{}),define(e[205],t([1,0,4,170,74,8,5,51,24,1062]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={progressBarBackground:a.Color.fromHex("#0E70C0")},u=function(){function e(e,t){this.options=t||Object.create(null),c.mixin(this.options,l,!1),
this.toUnbind=[],this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.create(e)}return e.prototype.create=function(e){var t=this;r.$(e).div({class:"monaco-progress-container"},function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([o.EventType.ANIMATION_START,o.EventType.ANIMATION_END,o.EventType.ANIMATION_ITERATION],function(e){switch(e.type){case o.EventType.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}},t.toUnbind),t.bit=e.getHTMLElement()}),this.applyStyles()},e.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass("infinite"),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},e.prototype.done=function(){return this.doDone(!0)},e.prototype.stop=function(){return this.doDone(!1)},e.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass("infinite")?(this.bit.style.opacity="0",
e?n.TPromise.timeout(200).then(function(){return t.off()}):this.off()):(this.bit.style.width="inherit",e?n.TPromise.timeout(200).then(function(){return t.off()}):this.off()),this},e.prototype.infinite=function(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.removeClass("discrete"),this.element.removeClass("done"),this.element.addClass("active"),this.element.addClass("infinite"),this},e.prototype.total=function(e){return this.workedVal=0,this.totalWork=e,this},e.prototype.hasTotal=function(){return!isNaN(this.totalWork)},e.prototype.worked=function(e){return e=Number(e),i.ok(!isNaN(e),"Value is not a number"),e=Math.max(1,e),this.doSetWorked(this.workedVal+e)},e.prototype.setWorked=function(e){return e=Number(e),i.ok(!isNaN(e),"Value is not a number"),e=Math.max(1,e),this.doSetWorked(e)},e.prototype.doSetWorked=function(e){return i.ok(!isNaN(this.totalWork),"Total work not set"),this.workedVal=e,this.workedVal=Math.min(this.totalWork,this.workedVal),
this.element.hasClass("infinite")&&this.element.removeClass("infinite"),this.element.hasClass("done")&&this.element.removeClass("done"),this.element.hasClass("active")||this.element.addClass("active"),this.element.hasClass("discrete")||this.element.addClass("discrete"),this.bit.style.width=this.workedVal/this.totalWork*100+"%",this},e.prototype.getContainer=function(){return this.element.getHTMLElement()},e.prototype.show=function(e){"number"==typeof e?this.element.showDelayed(e):this.element.show()},e.prototype.hide=function(){this.element.hide()},e.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},e.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},e.prototype.dispose=function(){this.toUnbind=s.dispose(this.toUnbind)},e}();t.ProgressBar=u}),define(e[1066],t([13]),{}),define(e[152],t([1,0,5,78,11,30,132,82,7,8,106,1066]),function(e,t,n,i,r,o,s,a,c,l,u){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d,h=!1;!function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(d=t.Orientation||(t.Orientation={}));var p;!function(e){e[e.Disabled=0]="Disabled",e[e.Minimum=1]="Minimum",e[e.Maximum=2]="Maximum",e[e.Enabled=3]="Enabled"}(p=t.SashState||(t.SashState={}));var f=function(){function e(e,t,n){void 0===n&&(n={}),this.disposables=[],this._state=p.Enabled,this._onDidEnablementChange=new c.Emitter,this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=new c.Emitter,this.onDidStart=this._onDidStart.event,this._onDidChange=new c.Emitter,this.onDidChange=this._onDidChange.event,this._onDidReset=new c.Emitter,this.onDidReset=this._onDidReset.event,this._onDidEnd=new c.Emitter,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=[],this.orthogonalEndSashDisposables=[],this.el=l.append(e,l.$(".monaco-sash")),r.isMacintosh&&l.addClass(this.el,"mac"),
u.domEvent(this.el,"mousedown")(this.onMouseDown,this,this.disposables),u.domEvent(this.el,"dblclick")(this.onMouseDoubleClick,this,this.disposables),s.Gesture.addTarget(this.el),u.domEvent(this.el,s.EventType.Start)(this.onTouchStart,this,this.disposables),i.isIPad&&l.addClass(this.el,"touch"),this.setOrientation(n.orientation||d.VERTICAL),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,l.toggleClass(this.el,"debug",h)}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(l.toggleClass(this.el,"disabled",e===p.Disabled),l.toggleClass(this.el,"minimum",e===p.Minimum),l.toggleClass(this.el,"maximum",e===p.Maximum),this._state=e,this._onDidEnablementChange.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){
this.orthogonalStartSashDisposables=n.dispose(this.orthogonalStartSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this,this.orthogonalStartSashDisposables),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(p.Disabled),this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables=n.dispose(this.orthogonalEndSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this,this.orthogonalEndSashDisposables),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(p.Disabled),this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),e.prototype.setOrientation=function(e){this.orientation=e,this.orientation===d.HORIZONTAL?(l.addClass(this.el,"horizontal"),
l.removeClass(this.el,"vertical")):(l.removeClass(this.el,"horizontal"),l.addClass(this.el,"vertical")),this.layoutProvider&&this.layout()},e.prototype.onMouseDown=function(e){var t=this;l.EventHelper.stop(e,!1);var i=!1;if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!e.__orthogonalSashEvent){var o=void 0;this.orientation===d.VERTICAL?e.offsetY<=4?o=this.orthogonalStartSash:e.offsetY>=this.el.clientHeight-4&&(o=this.orthogonalEndSash):e.offsetX<=4?o=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(o=this.orthogonalEndSash),o&&(i=!0,e.__orthogonalSashEvent=!0,o.onMouseDown(e))}if(this.state){for(var s=0,c=l.getElementsByTagName("iframe");s<c.length;s++){c[s].style.pointerEvents="none"}var h=new a.StandardMouseEvent(e),f=h.posx,g=h.posy,v=h.altKey,m={startX:f,currentX:f,startY:g,currentY:g,altKey:v};l.addClass(this.el,"active"),this._onDidStart.fire(m);var y=l.createStyleSheet(this.el),b=function(){var e=""
;e=i?"all-scroll":t.orientation===d.HORIZONTAL?t.state===p.Minimum?"s-resize":t.state===p.Maximum?"n-resize":r.isMacintosh?"row-resize":"ns-resize":t.state===p.Minimum?"e-resize":t.state===p.Maximum?"w-resize":r.isMacintosh?"col-resize":"ew-resize",y.innerHTML="* { cursor: "+e+" !important; }"},S=[];b(),i||this.onDidEnablementChange(b,null,S);u.domEvent(window,"mousemove")(function(e){l.EventHelper.stop(e,!1);var n=new a.StandardMouseEvent(e),i={startX:f,currentX:n.posx,startY:g,currentY:n.posy,altKey:v};t._onDidChange.fire(i)},null,S),u.domEvent(window,"mouseup")(function(e){l.EventHelper.stop(e,!1),t.el.removeChild(y),l.removeClass(t.el,"active"),t._onDidEnd.fire(),n.dispose(S);for(var i=0,r=l.getElementsByTagName("iframe");i<r.length;i++)r[i].style.pointerEvents="auto"},null,S)}},e.prototype.onMouseDoubleClick=function(e){this._onDidReset.fire()},e.prototype.onTouchStart=function(e){var t=this;l.EventHelper.stop(e);var i=[],r=e.pageX,a=e.pageY,c=e.altKey;this._onDidStart.fire({startX:r,currentX:r,startY:a,
currentY:a,altKey:c}),i.push(l.addDisposableListener(this.el,s.EventType.Change,function(e){o.isNumber(e.pageX)&&o.isNumber(e.pageY)&&t._onDidChange.fire({startX:r,currentX:e.pageX,startY:a,currentY:e.pageY,altKey:c})})),i.push(l.addDisposableListener(this.el,s.EventType.End,function(e){t._onDidEnd.fire(),n.dispose(i)}))},e.prototype.layout=function(){var e=i.isIPad?20:4;if(this.orientation===d.VERTICAL){var t=this.layoutProvider;this.el.style.left=t.getVerticalSashLeft(this)-e/2+"px",t.getVerticalSashTop&&(this.el.style.top=t.getVerticalSashTop(this)+"px"),t.getVerticalSashHeight&&(this.el.style.height=t.getVerticalSashHeight(this)+"px")}else{var n=this.layoutProvider;this.el.style.top=n.getHorizontalSashTop(this)-e/2+"px",n.getHorizontalSashLeft&&(this.el.style.left=n.getHorizontalSashLeft(this)+"px"),n.getHorizontalSashWidth&&(this.el.style.width=n.getHorizontalSashWidth(this)+"px")}},e.prototype.show=function(){this.hidden=!1,this.el.style.removeProperty("display"),
this.el.setAttribute("aria-hidden","false")},e.prototype.hide=function(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")},e.prototype.isHidden=function(){return this.hidden},e.prototype.onOrthogonalStartSashEnablementChange=function(e){l.toggleClass(this.el,"orthogonal-start",e!==p.Disabled)},e.prototype.onOrthogonalEndSashEnablementChange=function(e){l.toggleClass(this.el,"orthogonal-end",e!==p.Disabled)},e.prototype.dispose=function(){this.orthogonalStartSashDisposables=n.dispose(this.orthogonalStartSashDisposables),this.orthogonalEndSashDisposables=n.dispose(this.orthogonalEndSashDisposables),this.el&&this.el.parentElement&&this.el.parentElement.removeChild(this.el),this.el=null,this.disposables=n.dispose(this.disposables)},e}();t.Sash=f}),define(e[1071],t([13]),{}),define(e[129],t([1,0,8,11,82,1058,1065,5,101,92,18,85,7,1071]),function(e,t,i,r,o,s,a,c,l,u,d,h,p){"use strict";function f(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,
className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:l.ScrollbarVisibility.Auto,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:l.ScrollbarVisibility.Auto,
verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,r.isMacintosh&&(t.className+=" mac"),t}Object.defineProperty(t,"__esModule",{value:!0});var g=function(){return function(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}}(),v=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,i=this._rear;;){var r=i===this._front?e:Math.pow(2,-n);if(e-=r,t+=this._memory[i].score*r,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5},
e.prototype.accept=function(e,t,n){var i=new g(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,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]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}();t.MouseWheelClassifier=v;var m=function(e){function t(t,n,i){var r=e.call(this)||this;r._onScroll=r._register(new p.Emitter),r.onScroll=r._onScroll.event,t.style.overflow="hidden",r._options=f(n),r._scrollable=i,r._register(r._scrollable.onScroll(function(e){r._onDidScroll(e),r._onScroll.fire(e)}));var o={onMouseWheel:function(e){return r._onMouseWheel(e)},onDragStart:function(){
return r._onDragStart()},onDragEnd:function(){return r._onDragEnd()}};return r._verticalScrollbar=r._register(new a.VerticalScrollbar(r._scrollable,r._options,o)),r._horizontalScrollbar=r._register(new s.HorizontalScrollbar(r._scrollable,r._options,o)),r._domNode=document.createElement("div"),r._domNode.className="monaco-scrollable-element "+r._options.className,r._domNode.setAttribute("role","presentation"),r._domNode.style.position="relative",r._domNode.style.overflow="hidden",r._domNode.appendChild(t),r._domNode.appendChild(r._horizontalScrollbar.domNode.domNode),r._domNode.appendChild(r._verticalScrollbar.domNode.domNode),r._options.useShadows&&(r._leftShadowDomNode=h.createFastDomNode(document.createElement("div")),r._leftShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._leftShadowDomNode.domNode),r._topShadowDomNode=h.createFastDomNode(document.createElement("div")),r._topShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._topShadowDomNode.domNode),
r._topLeftShadowDomNode=h.createFastDomNode(document.createElement("div")),r._topLeftShadowDomNode.setClassName("shadow top-left-corner"),r._domNode.appendChild(r._topLeftShadowDomNode.domNode)),r._listenOnDomNode=r._options.listenOnDomNode||r._domNode,r._mouseWheelToDispose=[],r._setListeningToMouseWheel(r._options.handleMouseWheel),r.onmouseover(r._listenOnDomNode,function(e){return r._onMouseOver(e)}),r.onnonbubblingmouseout(r._listenOnDomNode,function(e){return r._onMouseOut(e)}),r._hideTimeout=r._register(new d.TimeoutTimer),r._isDragging=!1,r._mouseIsOver=!1,r._shouldRender=!0,r}return n(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=c.dispose(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)
},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,r.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=f(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=c.dispose(this._mouseWheelToDispose),e)){var n=function(e){var n=new o.StandardMouseWheelEvent(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,"mousewheel",n)),
this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,"DOMMouseScroll",n))}},t.prototype._onMouseWheel=function(e){var t,n=v.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[o,i])[0],o=t[1]);var s=!r.isMacintosh&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=i,i=0);var a=this._scrollable.getFutureScrollPosition(),c={};if(i){var l=a.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(c,l)}if(o){var u=a.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(c,u)}if(c=this._scrollable.validateScrollPosition(c),a.scrollLeft!==c.scrollLeft||a.scrollTop!==c.scrollTop){this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),this._shouldRender=!0}}
(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))
}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(function(){return e._hide()},500)},t}(u.Widget);t.AbstractScrollableElement=m;var y=function(e){function t(t,n){var r=this;(n=n||{}).mouseWheelSmoothScroll=!1;var o=new l.Scrollable(0,function(e){return i.scheduleAtNextAnimationFrame(e)});return(r=e.call(this,t,n,o)||this)._register(o),r}return n(t,e),t.prototype.setScrollPosition=function(e){
this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(m);t.ScrollableElement=y;var b=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t}(m);t.SmoothScrollableElement=b;var S=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll(function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)}),i.scanDomNode(),i}return n(t,e),t.prototype.scanDomNode=function(){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})},t}(y);t.DomScrollableElement=S}),define(e[1079],t([1,0,24,5,132,8,7,106,129,101,956,1050,11,78,111,82]),function(e,t,n,i,r,o,s,c,l,u,d,h,p,f,g,v){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var m={useShadows:!0,verticalScrollMode:u.ScrollbarVisibility.Auto},y=function(){function e(e,t,i,o){void 0===o&&(o=m),this.delegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new d.RangeMap;for(var a=0,p=i;a<p.length;a++){var f=p[a];this.renderers.set(f.templateId,f)}this.cache=new h.RowCache(this.renderers),this.lastRenderTop=0,this.lastRenderHeight=0,this._domNode=document.createElement("div"),this._domNode.className="monaco-list",this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",r.Gesture.addTarget(this.rowsContainer),this.scrollableElement=new l.ScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:u.ScrollbarVisibility.Hidden,vertical:n.getOrDefault(o,function(e){return e.verticalScrollMode},m.verticalScrollMode),useShadows:n.getOrDefault(o,function(e){return e.useShadows},m.useShadows)}),
this._domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this._domNode),this.disposables=[this.rangeMap,this.gesture,this.scrollableElement,this.cache],this.scrollableElement.onScroll(this.onScroll,this,this.disposables),c.domEvent(this.rowsContainer,r.EventType.Change)(this.onTouchChange,this,this.disposables),c.domEvent(this.scrollableElement.getDomNode(),"scroll")(function(e){return e.target.scrollTop=0},null,this.disposables);s.mapEvent(c.domEvent(this.rowsContainer,"dragover"),function(e){return new v.DragMouseEvent(e)})(this.onDragOver,this,this.disposables),this.layout()}return Object.defineProperty(e.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){if(void 0===n&&(n=[]),this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1}},e.prototype._splice=function(e,t,n){var i,r,o=this;void 0===n&&(n=[])
;for(var s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),a={start:e,end:e+t},c=d.intersect(s,a),l=c.start;l<c.end;l++)this.removeItemFromDOM(l);var u={start:e+t,end:this.items.length},h=d.intersect(u,s),p=d.relativeComplement(u,s),f=n.map(function(e){return{id:String(o.itemId++),element:e,size:o.delegate.getHeight(e),templateId:o.delegate.getTemplateId(e),row:null}});(i=this.rangeMap).splice.apply(i,[e,t].concat(f));for(var g=(r=this.items).splice.apply(r,[e,t].concat(f)),v=n.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),y=d.shift(h,v),b=d.intersect(m,y),l=b.start;l<b.end;l++)this.updateItemInDOM(this.items[l],l);for(var S=d.relativeComplement(y,m),_=0;_<S.length;_++)for(var C=S[_],l=C.start;l<C.end;l++)this.removeItemFromDOM(l);for(var E=p.map(function(e){return d.shift(e,v)}),w=[{start:e,end:e+n.length}].concat(E).map(function(e){return d.intersect(m,e)
}),I=this.getNextToLastElement(w),_=0;_<w.length;_++)for(var T=w[_],l=T.start;l<T.end;l++)this.insertItemInDOM(l,I);var x=this.getContentHeight();return this.rowsContainer.style.height=x+"px",this.scrollableElement.setScrollDimensions({scrollHeight:x}),g.map(function(e){return e.element})},Object.defineProperty(e.prototype,"length",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderHeight",{get:function(){return this.scrollableElement.getScrollDimensions().height},enumerable:!0,configurable:!0}),e.prototype.element=function(e){return this.items[e].element},e.prototype.domElement=function(e){var t=this.items[e].row;return t&&t.domNode},e.prototype.elementHeight=function(e){return this.items[e].size},e.prototype.elementTop=function(e){return this.rangeMap.positionAt(e)},e.prototype.indexAt=function(e){return this.rangeMap.indexAt(e)},e.prototype.indexAfter=function(e){return this.rangeMap.indexAfter(e)},e.prototype.layout=function(e){
this.scrollableElement.setScrollDimensions({height:e||o.getContentHeight(this._domNode)})},e.prototype.render=function(e,t){for(var n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=this.getRenderRange(e,t),r=d.relativeComplement(i,n),o=d.relativeComplement(n,i),s=this.getNextToLastElement(r),a=0,c=r;a<c.length;a++)for(g=(h=c[a]).start;g<h.end;g++)this.insertItemInDOM(g,s);for(var l=0,u=o;l<u.length;l++)for(var h=u[l],g=h.start;g<h.end;g++)this.removeItemFromDOM(g);if(f.isFirefox||0!==f.getZoomLevel()||p.isWindows)this.rowsContainer.style.top="-"+e+"px";else{var v="translate3d(0px, -"+e+"px, 0px)";this.rowsContainer.style.transform=v,this.rowsContainer.style.webkitTransform=v}this.lastRenderTop=e,this.lastRenderHeight=t},e.prototype.insertItemInDOM=function(e,t){var n=this.items[e];n.row||(n.row=this.cache.alloc(n.templateId)),n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),n.row.domNode.style.height=n.size+"px",
this.updateItemInDOM(n,e);this.renderers.get(n.templateId).renderElement(n.element,e,n.row.templateData)},e.prototype.updateItemInDOM=function(e,t){e.row.domNode.style.top=this.elementTop(t)+"px",e.row.domNode.setAttribute("data-index",""+t),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",""+this.length),e.row.domNode.setAttribute("aria-posinset",""+(t+1))},e.prototype.removeItemFromDOM=function(e){var t=this.items[e];this.cache.release(t.row),t.row=null},e.prototype.getContentHeight=function(){return this.rangeMap.size},e.prototype.getScrollTop=function(){return this.scrollableElement.getScrollPosition().scrollTop},e.prototype.setScrollTop=function(e){this.scrollableElement.setScrollPosition({scrollTop:e})},Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.getScrollTop()},set:function(e){this.setScrollTop(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseClick",{get:function(){
var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"click"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"dblclick"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseUp",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"mouseup"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"mousedown"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseOver",{get:function(){var e=this
;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"mouseover"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseMove",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"mousemove"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseOut",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"mouseout"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"contextmenu"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this
;return s.filterEvent(s.mapEvent(c.domEvent(this.domNode,"touchstart"),function(t){return e.toTouchEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return s.filterEvent(s.mapEvent(c.domEvent(this.rowsContainer,r.EventType.Tap),function(t){return e.toGestureEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.onScroll=function(e){this.render(e.scrollTop,e.height)},
e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=o.getTopLeftOffset(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,r=e.renderHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>r&&(i=Math.min(14,.2*(n-r))),e.scrollTop+=i}},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null},1e3))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},e.prototype.cancelDragAndDropScrollTimeout=function(){
this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var n=this.items[t.end];return n&&n.row?n.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e<t.length;e++){var n=t[e];if(n.row){this.renderers.get(n.row.templateId).disposeTemplate(n.row.templateData),n.row=null}}this.items=null}this._domNode&&this._domNode.parentElement&&(this._domNode.parentNode.removeChild(this._domNode),this._domNode=null),this.disposables=i.dispose(this.disposables)},a([g.memoize],e.prototype,"onMouseClick",null),
a([g.memoize],e.prototype,"onMouseDblClick",null),a([g.memoize],e.prototype,"onMouseUp",null),a([g.memoize],e.prototype,"onMouseDown",null),a([g.memoize],e.prototype,"onMouseOver",null),a([g.memoize],e.prototype,"onMouseMove",null),a([g.memoize],e.prototype,"onMouseOut",null),a([g.memoize],e.prototype,"onContextMenu",null),a([g.memoize],e.prototype,"onTouchStart",null),a([g.memoize],e.prototype,"onTap",null),e}();t.ListView=y}),define(e[169],t([1,0,5,30,20,111,8,11,132,84,7,106,1079,51,24,298,402]),function(e,t,i,r,o,s,c,l,u,d,h,p,f,g,v,m){"use strict";function y(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function b(e){return l.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function S(e){return e.browserEvent.shiftKey}function _(e){return e instanceof MouseEvent&&2===e.button}function C(e,t){for(var n=[],i=0,r=0;i<e.length||r<t.length;)if(i>=e.length)n.push(t[r++]);else if(r>=t.length)n.push(e[i++]);else{if(e[i]===t[r]){n.push(e[i]),i++,r++;continue}e[i]<t[r]?n.push(e[i++]):n.push(t[r++])
}return n}Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e){this.spliceables=e}return e.prototype.splice=function(e,t,n){for(var i=0,r=this.spliceables;i<r.length;i++){r[i].splice(e,t,n)}},e}(),w=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,n){var i=o.firstIndex(this.renderedElements,function(e){return e.templateData===n});if(i>=0){r=this.renderedElements[i];this.trait.unrender(n),r.index=t}else{var r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)},e.prototype.splice=function(e,t,n){for(var i=[],r=0;r<this.renderedElements.length;r++){var o=this.renderedElements[r];o.index<e?i.push(o):o.index>=e+t&&i.push({index:o.index+n-t,templateData:o.templateData})}this.renderedElements=i},
e.prototype.renderIndexes=function(e){for(var t=0,n=this.renderedElements;t<n.length;t++){var i=n[t],r=i.index,o=i.templateData;e.indexOf(r)>-1&&this.trait.renderIndex(r,o)}},e.prototype.disposeTemplate=function(e){var t=o.firstIndex(this.renderedElements,function(t){return t.templateData===e});t<0||this.renderedElements.splice(t,1)},e}(),I=function(){function e(e){this._trait=e,this._onChange=new h.Emitter,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new w(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=n.length-t,r=e+t,o=this.indexes.filter(function(t){return t<e}).concat(n.map(function(t,n){return t?n+e:-1}).filter(function(e){return-1!==e}),this.indexes.filter(function(e){return e>=r
}).map(function(e){return e+i}));this.renderer.splice(e,t,n.length),this.set(o)},e.prototype.renderIndex=function(e,t){c.toggleClass(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){c.removeClass(e,this._trait)},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var n=C(t,e);return this.renderer.renderIndexes(n),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some(function(t){return t===e})},e.prototype.dispose=function(){this.indexes=null,this._onChange=i.dispose(this._onChange)},a([s.memoize],e.prototype,"renderer",null),e}(),T=function(e){function t(t){var n=e.call(this,"focused")||this;return n.getDomId=t,n}return n(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),n.setAttribute("role","treeitem"),n.setAttribute("id",this.getDomId(t))},t}(I),x=function(){function e(e,t,n){this.trait=e,this.view=t,this.getId=n}return e.prototype.splice=function(e,t,n){
var i=this;if(!this.getId)return this.trait.splice(e,t,n.map(function(e){return!1}));var r=this.trait.get().map(function(e){return i.getId(i.view.element(e))}),o=n.map(function(e){return r.indexOf(i.getId(e))>-1});this.trait.splice(e,t,o)},e}(),k=function(){function e(e,t,n){this.list=e,this.view=t;var i=!(!1===n.multipleSelectionSupport);this.disposables=[],this.openController=n.openController||L;var r=h.chain(p.domEvent(t.domNode,"keydown")).filter(function(e){return!y(e.target)}).map(function(e){return new d.StandardKeyboardEvent(e)});r.filter(function(e){return 3===e.keyCode}).on(this.onEnter,this,this.disposables),r.filter(function(e){return 16===e.keyCode}).on(this.onUpArrow,this,this.disposables),r.filter(function(e){return 18===e.keyCode}).on(this.onDownArrow,this,this.disposables),r.filter(function(e){return 11===e.keyCode}).on(this.onPageUpArrow,this,this.disposables),r.filter(function(e){return 12===e.keyCode}).on(this.onPageDownArrow,this,this.disposables),r.filter(function(e){return 9===e.keyCode
}).on(this.onEscape,this,this.disposables),i&&r.filter(function(e){return(l.isMacintosh?e.metaKey:e.ctrlKey)&&31===e.keyCode}).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),
this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(o.range(this.list.length)),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},e}(),D=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[];h.chain(p.domEvent(t.domNode,"keydown")).filter(function(e){return!y(e.target)}).map(function(e){return new d.StandardKeyboardEvent(e)}).filter(function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)}).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var n=this.view.domElement(t[0]).querySelector("[tabIndex]");n&&n instanceof HTMLElement&&(e.preventDefault(),e.stopPropagation(),
n.focus())}}},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},e}();t.isSelectionSingleChangeEvent=b,t.isSelectionRangeChangeEvent=S;var A={isSelectionSingleChangeEvent:b,isSelectionRangeChangeEvent:S},L={shouldOpen:function(e){return!(e instanceof MouseEvent)||!_(e)}},R=function(){function e(e,t,n){void 0===n&&(n={}),this.list=e,this.view=t,this.options=n,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===n.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=n.multipleSelectionController||A),this.openController=n.openController||L,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),u.Gesture.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){
var e=this,t=h.chain(p.domEvent(this.view.domNode,"keydown")).map(function(e){return new d.StandardKeyboardEvent(e)}).filter(function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode}).filter(function(e){return e.preventDefault(),e.stopPropagation(),!1}).event,n=h.chain(p.domEvent(this.view.domNode,"keyup")).filter(function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t}).filter(function(){return e.list.getFocus().length>0}).map(function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}}).filter(function(e){return!!e.anchor}).event,i=h.chain(this.view.onContextMenu).filter(function(){return!e.didJustPressContextMenuKey}).map(function(e){var t=e.element,n=e.index,i=e.browserEvent;return{element:t,index:n,anchor:{x:i.clientX+1,y:i.clientY}}}).event;return h.anyEvent(t,n,i)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){
return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):l.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],n=this.list.getSelection();if(t=void 0===t?n[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var i=e.index;if(n.every(function(e){return e!==i})&&this.list.setFocus([i]),
this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!_(e.browserEvent)&&(this.list.setSelection([i]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([i],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var n=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var i=Math.min(t,n),r=Math.max(t,n),s=o.range(i,r+1),a=function(e,t){var n=e.indexOf(t);if(-1===n)return[];for(var i=[],r=n-1;r>=0&&e[r]===t-(n-r);)i.push(e[r--]);for(i.reverse(),
r=n;r<e.length&&e[r]===t+(r-n);)i.push(e[r++]);return i}(C(c=this.list.getSelection(),[t]),t);if(0===a.length)return;l=C(s,function(e,t){for(var n=[],i=0,r=0;i<e.length||r<t.length;)if(i>=e.length)n.push(t[r++]);else if(r>=t.length)n.push(e[i++]);else{if(e[i]===t[r]){i++,r++;continue}e[i]<t[r]?n.push(e[i++]):r++}return n}(c,a));this.list.setSelection(l)}else if(this.isSelectionSingleChangeEvent(e)){var c=this.list.getSelection(),l=c.filter(function(e){return e!==n});c.length===l.length?this.list.setSelection(l.concat([n])):this.list.setSelection(l)}},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},a([s.memoize],e.prototype,"onContextMenu",null),e}(),O=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[];e.listFocusBackground&&(n.push(".monaco-list"+t+":focus .monaco-list-row.focused { background-color: "+e.listFocusBackground+"; }"),
n.push(".monaco-list"+t+":focus .monaco-list-row.focused:hover { background-color: "+e.listFocusBackground+"; }")),e.listFocusForeground&&n.push(".monaco-list"+t+":focus .monaco-list-row.focused { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&(n.push(".monaco-list"+t+":focus .monaco-list-row.selected { background-color: "+e.listActiveSelectionBackground+"; }"),n.push(".monaco-list"+t+":focus .monaco-list-row.selected:hover { background-color: "+e.listActiveSelectionBackground+"; }")),e.listActiveSelectionForeground&&n.push(".monaco-list"+t+":focus .monaco-list-row.selected { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.push(".monaco-list"+t+":focus .monaco-list-row.selected.focused { background-color: "+e.listFocusAndSelectionBackground+"; }"),e.listFocusAndSelectionForeground&&n.push(".monaco-list"+t+":focus .monaco-list-row.selected.focused { color: "+e.listFocusAndSelectionForeground+"; }"),
e.listInactiveFocusBackground&&(n.push(".monaco-list"+t+" .monaco-list-row.focused { background-color:  "+e.listInactiveFocusBackground+"; }"),n.push(".monaco-list"+t+" .monaco-list-row.focused:hover { background-color:  "+e.listInactiveFocusBackground+"; }")),e.listInactiveSelectionBackground&&(n.push(".monaco-list"+t+" .monaco-list-row.selected { background-color:  "+e.listInactiveSelectionBackground+"; }"),n.push(".monaco-list"+t+" .monaco-list-row.selected:hover { background-color:  "+e.listInactiveSelectionBackground+"; }")),e.listInactiveSelectionForeground&&n.push(".monaco-list"+t+" .monaco-list-row.selected { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-list"+t+" .monaco-list-row:hover { background-color:  "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-list"+t+" .monaco-list-row:hover { color:  "+e.listHoverForeground+"; }"),
e.listSelectionOutline&&n.push(".monaco-list"+t+" .monaco-list-row.selected { outline: 1px dotted "+e.listSelectionOutline+"; outline-offset: -1px; }"),e.listFocusOutline&&n.push(".monaco-list"+t+":focus .monaco-list-row.focused { outline: 1px solid "+e.listFocusOutline+"; outline-offset: -1px; }"),e.listInactiveFocusOutline&&n.push(".monaco-list"+t+" .monaco-list-row.focused { outline: 1px dotted "+e.listInactiveFocusOutline+"; outline-offset: -1px; }"),e.listHoverOutline&&n.push(".monaco-list"+t+" .monaco-list-row:hover { outline: 1px dashed "+e.listHoverOutline+"; outline-offset: -1px; }");var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}();t.DefaultStyleController=O;var M={listFocusBackground:g.Color.fromHex("#073655"),listActiveSelectionBackground:g.Color.fromHex("#0E639C"),listActiveSelectionForeground:g.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:g.Color.fromHex("#094771"),listFocusAndSelectionForeground:g.Color.fromHex("#FFFFFF"),
listInactiveSelectionBackground:g.Color.fromHex("#3F3F46"),listHoverBackground:g.Color.fromHex("#2A2D2E"),listDropBackground:g.Color.fromHex("#383B3D")},P={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0},N=function(e,t){return e-t},F=function(){function e(e,t){this._templateId=e,this.renderers=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return this.renderers.map(function(t){return t.renderTemplate(e)})},e.prototype.renderElement=function(e,t,n){for(var i=0,r=0,o=this.renderers;r<o.length;r++){o[r].renderElement(e,t,n[i++])}},e.prototype.disposeTemplate=function(e){for(var t=0,n=0,i=this.renderers;n<i.length;n++){i[n].disposeTemplate(e[t++])}},e}(),W=function(){function e(t,n,i,r){void 0===r&&(r=P);var o=this;if(this.idPrefix="list_id_"+ ++e.InstanceCount,this.eventBufferer=new h.EventBufferer,this.onContextMenu=h.Event.None,this._onOpen=new h.Emitter,
this.onOpen=this._onOpen.event,this._onPin=new h.Emitter,this._onDidDispose=new h.Emitter,this.focus=new T(function(e){return o.getElementDomId(e)}),this.selection=new I("selected"),v.mixin(r,M,!1),i=i.map(function(e){return new F(e.templateId,[o.focus.renderer,o.selection.renderer,e])}),this.view=new f.ListView(t,n,i,r),this.view.domNode.setAttribute("role","tree"),c.addClass(this.view.domNode,this.idPrefix),this.view.domNode.tabIndex=0,this.styleElement=c.createStyleSheet(this.view.domNode),this.styleController=r.styleController,this.styleController||(this.styleController=new O(this.styleElement,this.idPrefix)),this.spliceable=new E([new x(this.focus,this.view,r.identityProvider),new x(this.selection,this.view,r.identityProvider),this.view]),this.disposables=[this.focus,this.selection,this.view,this._onDidDispose],this.onDidFocus=h.mapEvent(p.domEvent(this.view.domNode,"focus",!0),function(){return null}),this.onDidBlur=h.mapEvent(p.domEvent(this.view.domNode,"blur",!0),function(){return null}),
this.disposables.push(new D(this,this.view)),"boolean"!=typeof r.keyboardSupport||r.keyboardSupport){var s=new k(this,this.view,r);this.disposables.push(s)}("boolean"!=typeof r.mouseSupport||r.mouseSupport)&&(this.mouseController=new R(this,this.view,r),this.disposables.push(this.mouseController),this.onContextMenu=this.mouseController.onContextMenu),this.onFocusChange(this._onFocusChange,this,this.disposables),this.onSelectionChange(this._onSelectionChange,this,this.disposables),r.ariaLabel&&this.view.domNode.setAttribute("aria-label",r.ariaLabel),this.style(r)}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return h.mapEvent(this.eventBufferer.wrapEvent(this.focus.onChange),function(t){return e.toListEvent(t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return h.mapEvent(this.eventBufferer.wrapEvent(this.selection.onChange),function(t){return e.toListEvent(t)})},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onPin",{get:function(){var e=this;return h.mapEvent(this._onPin.event,function(t){return e.toListEvent({indexes:t})})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseClick",{get:function(){return this.view.onMouseClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){return this.view.onMouseDblClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseUp",{get:function(){return this.view.onMouseUp},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){return this.view.onMouseDown},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseOver",{get:function(){return this.view.onMouseOver},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseMove",{get:function(){return this.view.onMouseMove},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseOut",{get:function(){
return this.view.onMouseOut},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){return this.view.onTouchStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){return this.view.onTap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onKeyDown",{get:function(){return p.domEvent(this.view.domNode,"keydown")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onKeyUp",{get:function(){return p.domEvent(this.view.domNode,"keyup")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onKeyPress",{get:function(){return p.domEvent(this.view.domNode,"keypress")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidDispose",{get:function(){return this._onDidDispose.event},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;void 0===n&&(n=[]),0===t&&0===n.length||this.eventBufferer.bufferEvents(function(){return i.spliceable.splice(e,t,n)})},
Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.domFocus=function(){this.view.domNode.focus()},e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];if(i<0||i>=this.length)throw new Error("Invalid index "+i)}e=e.sort(N),this.selection.set(e)},e.prototype.selectNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]+e:0;this.setSelection(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.selectPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){
var n=this.selection.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=this.length+i%this.length),this.setSelection([Math.max(i,0)])}},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.getSelectedElements=function(){var e=this;return this.getSelection().map(function(t){return e.view.element(t)})},e.prototype.setFocus=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];if(i<0||i>=this.length)throw new Error("Invalid index "+i)}e=e.sort(N),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]+e:0;this.setFocus(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=(this.length+i%this.length)%this.length),this.setFocus([Math.max(i,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight)
;t=0===t?0:t-1;var n=this.view.element(t);if(this.getFocusedElements()[0]!==n)this.setFocus([t]);else{var i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==i&&setTimeout(function(){return e.focusNextPage()},0)}},e.prototype.focusPreviousPage=function(){var e,t=this,n=this.view.getScrollTop();e=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);var i=this.view.element(e);if(this.getFocusedElements()[0]!==i)this.setFocus([e]);else{var r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&setTimeout(function(){return t.focusPreviousPage()},0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map(function(t){return e.view.element(t)})},e.prototype.reveal=function(e,t){
if(e<0||e>=this.length)throw new Error("Invalid index "+e);var n=this.view.getScrollTop(),i=this.view.elementTop(e),o=this.view.elementHeight(e);if(r.isNumber(t)){var s=o-this.view.renderHeight;this.view.setScrollTop(s*m.clamp(t,0,1)+i)}else{var a=i+o,c=n+this.view.renderHeight;i<n?this.view.setScrollTop(i):a>=c&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getRelativeTop=function(e){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var t=this.view.getScrollTop(),n=this.view.elementTop(e),i=this.view.elementHeight(e);if(n<t||n+i>t+this.view.renderHeight)return null;var r=i-this.view.renderHeight;return Math.abs((t-n)/r)},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var n=this,i=0,r=e;i<r.length;i++){var o=r[i];if(o<0||o>=this.length)throw new Error("Invalid index "+o)}
this._onOpen.fire({indexes:e,elements:e.map(function(e){return n.view.element(e)}),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];if(i<0||i>=this.length)throw new Error("Invalid index "+i)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,n=e.indexes;return{indexes:n,elements:n.map(function(e){return t.view.element(e)})}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),c.toggleClass(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();c.toggleClass(this.view.domNode,"selection-none",0===e.length),c.toggleClass(this.view.domNode,"selection-single",1===e.length),
c.toggleClass(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=i.dispose(this.disposables)},e.InstanceCount=0,a([s.memoize],e.prototype,"onFocusChange",null),a([s.memoize],e.prototype,"onSelectionChange",null),a([s.memoize],e.prototype,"onPin",null),e}();t.List=W}),define(e[427],t([1,0,20,169,7,402]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.renderer=e,this.modelProvider=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this.renderer.templateId},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return{data:this.renderer.renderTemplate(e),disposable:{dispose:function(){}}}},e.prototype.renderElement=function(e,t,n){var i=this;n.disposable.dispose();var r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,n.data);var o=r.resolve(e);n.disposable={dispose:function(){
return o.cancel()}},this.renderer.renderPlaceholder(e,n.data),o.done(function(t){return i.renderer.renderElement(t,e,n.data)})},e.prototype.disposeTemplate=function(e){e.disposable.dispose(),e.disposable=null,this.renderer.disposeTemplate(e.data),e.data=null},e}(),s=function(){function e(e,t,n,r){void 0===r&&(r={});var s=this,a=n.map(function(e){return new o(e,function(){return s.model})});this.list=new i.List(e,t,a,r)}return e.prototype.getHTMLElement=function(){return this.list.getHTMLElement()},e.prototype.isDOMFocused=function(){return this.list.getHTMLElement()===document.activeElement},e.prototype.domFocus=function(){this.list.domFocus()},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.list.onDidFocus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this.list.onDidBlur},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widget",{get:function(){return this.list},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onDidDispose",{get:function(){return this.list.onDidDispose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return r.mapEvent(this.list.onFocusChange,function(t){var n=t.elements,i=t.indexes;return{elements:n.map(function(t){return e._model.get(t)}),indexes:i}})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onOpen",{get:function(){var e=this;return r.mapEvent(this.list.onOpen,function(t){var n=t.elements,i=t.indexes,r=t.browserEvent;return{elements:n.map(function(t){return e._model.get(t)}),indexes:i,browserEvent:r}})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return r.mapEvent(this.list.onSelectionChange,function(t){var n=t.elements,i=t.indexes;return{elements:n.map(function(t){return e._model.get(t)}),indexes:i}})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onPin",{get:function(){var e=this
;return r.mapEvent(this.list.onPin,function(t){var n=t.elements,i=t.indexes;return{elements:n.map(function(t){return e._model.get(t)}),indexes:i}})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.list.splice(0,this.list.length,n.range(e.length))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.list.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.list.scrollTop},set:function(e){this.list.scrollTop=e},enumerable:!0,configurable:!0}),e.prototype.open=function(e,t){this.list.open(e,t)},e.prototype.setFocus=function(e){this.list.setFocus(e)},e.prototype.focusNext=function(e,t){this.list.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.list.focusPrevious(e,t)},e.prototype.selectNext=function(e,t){this.list.selectNext(e,t)},e.prototype.selectPrevious=function(e,t){
this.list.selectPrevious(e,t)},e.prototype.focusNextPage=function(){this.list.focusNextPage()},e.prototype.focusPreviousPage=function(){this.list.focusPreviousPage()},e.prototype.getFocus=function(){return this.list.getFocus()},e.prototype.setSelection=function(e){this.list.setSelection(e)},e.prototype.getSelection=function(){return this.list.getSelection()},e.prototype.layout=function(e){this.list.layout(e)},e.prototype.reveal=function(e,t){this.list.reveal(e,t)},e.prototype.style=function(e){this.list.style(e)},e.prototype.dispose=function(){this.list.dispose()},e}();t.PagedList=s}),define(e[1084],t([13]),{}),define(e[1087],t([13]),{}),define(e[1090],t([13]),{}),define(e[1105],t([13]),{}),define(e[183],t([1,0,5,7,30,8,298,20,152,51,106,152,1105]),function(e,t,n,i,r,o,s,a,c,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Orientation=d.Orientation;var h,p={separatorBorder:l.Color.transparent};!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(h||(h={}));!function(e){e.Distribute={
type:"distribute"},e.Split=function(e){return{type:"split",index:e}}}(t.Sizing||(t.Sizing={}));var f=function(){function e(e,t){void 0===t&&(t={}),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=h.Idle,this._onDidSashChange=new i.Emitter,this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=new i.Emitter,this.onDidSashReset=this._onDidSashReset.event,this.orientation=r.isUndefined(t.orientation)?c.Orientation.VERTICAL:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.el=document.createElement("div"),o.addClass(this.el,"monaco-split-view2"),o.addClass(this.el,this.orientation===c.Orientation.VERTICAL?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=o.append(this.el,o.$(".sash-container")),this.viewContainer=o.append(this.el,o.$(".split-view-container")),this.style(t.styles||p)}return Object.defineProperty(e.prototype,"length",{get:function(){return this.viewItems.length},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"minimumSize",{get:function(){return this.viewItems.reduce(function(e,t){return e+t.view.minimumSize},0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumSize",{get:function(){return 0===this.length?Number.POSITIVE_INFINITY:this.viewItems.reduce(function(e,t){return e+t.view.maximumSize},0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){for(var t=0,n=this.sashItems;t<n.length;t++){n[t].sash.orthogonalStartSash=e}this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){for(var t=0,n=this.sashItems;t<n.length;t++){n[t].sash.orthogonalEndSash=e}this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sashes",{get:function(){return this.sashItems.map(function(e){return e.sash})},
enumerable:!0,configurable:!0}),e.prototype.style=function(e){e.separatorBorder.isTransparent()?(o.removeClass(this.el,"separator-border"),this.el.style.removeProperty("--separator-border")):(o.addClass(this.el,"separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))},e.prototype.addView=function(e,t,r){var s=this;if(void 0===r&&(r=this.viewItems.length),this.state!==h.Idle)throw new Error("Cant modify splitview");this.state=h.Busy;var l=o.$(".split-view-view");r===this.viewItems.length?this.viewContainer.appendChild(l):this.viewContainer.insertBefore(l,this.viewContainer.children.item(r));var u,d=e.onDidChange(function(e){return s.onViewChange(v,e)}),p=n.toDisposable(function(){return s.viewContainer.removeChild(l)}),f=n.combinedDisposable([d,p]),g=this.orientation===c.Orientation.VERTICAL?function(){return v.container.style.height=v.size+"px"}:function(){return v.container.style.width=v.size+"px"}
;u="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:e.minimumSize;var v={view:e,container:l,size:u,layout:function(){g(),v.view.layout(v.size,s.orientation)},disposable:f};if(this.viewItems.splice(r,0,v),this.viewItems.length>1){var m=this.orientation===c.Orientation.VERTICAL?c.Orientation.HORIZONTAL:c.Orientation.VERTICAL,y=this.orientation===c.Orientation.VERTICAL?{getHorizontalSashTop:function(e){return s.getSashPosition(e)}}:{getVerticalSashLeft:function(e){return s.getSashPosition(e)}},b=new c.Sash(this.sashContainer,y,{orientation:m,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),S=this.orientation===c.Orientation.VERTICAL?function(e){return{sash:b,start:e.startY,current:e.currentY,alt:e.altKey}}:function(e){return{sash:b,start:e.startX,current:e.currentX,alt:e.altKey}},_=i.mapEvent(b.onDidStart,S)(this.onSashStart,this),C=i.mapEvent(b.onDidChange,S)(this.onSashChange,this),E=i.mapEvent(b.onDidEnd,function(){
return a.firstIndex(s.sashItems,function(e){return e.sash===b})})(this.onSashEnd,this),w=b.onDidReset(function(){return s._onDidSashReset.fire(a.firstIndex(s.sashItems,function(e){return e.sash===b}))}),I=n.combinedDisposable([_,C,E,w,b]),T={sash:b,disposable:I};this.sashItems.splice(r-1,0,T)}l.appendChild(e.element);var x;"number"!=typeof t&&"split"===t.type&&(x=t.index),this.relayout(r,x),this.state=h.Idle,"number"!=typeof t&&"distribute"===t.type&&this.distributeViewSizes()},e.prototype.removeView=function(e,t){if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(this.state=h.Busy,e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");var n=this.viewItems.splice(e,1)[0];if(n.disposable.dispose(),this.viewItems.length>=1){var i=Math.max(e-1,0);this.sashItems.splice(i,1)[0].disposable.dispose()}return this.relayout(),this.state=h.Idle,t&&"distribute"===t.type&&this.distributeViewSizes(),n.view},e.prototype.moveView=function(e,t){
if(this.state!==h.Idle)throw new Error("Cant modify splitview");var n=this.getViewSize(e),i=this.removeView(e);this.addView(i,n,t)},e.prototype.swapViews=function(e,t){if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(e>t)return this.swapViews(t,e);var n=this.getViewSize(e),i=this.getViewSize(t),r=this.removeView(t),o=this.removeView(e);this.addView(r,n,e),this.addView(o,i,t)},e.prototype.relayout=function(e,t){var n=this.viewItems.reduce(function(e,t){return e+t.size},0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()},e.prototype.layout=function(e){var t=Math.max(this.size,this.contentSize);if(this.size=e,this.proportions)for(var n=0;n<this.viewItems.length;n++){var i=this.viewItems[n];i.size=s.clamp(Math.round(this.proportions[n]*e),i.view.minimumSize,i.view.maximumSize)}else this.resize(this.viewItems.length-1,e-t);this.distributeEmptySpace(),this.layoutViews()},e.prototype.saveProportions=function(){
var e=this;this.contentSize>0&&(this.proportions=this.viewItems.map(function(t){return t.size/e.contentSize}))},e.prototype.onSashStart=function(e){var t=this,i=e.sash,r=e.start,o=e.alt,s=a.firstIndex(this.sashItems,function(e){return e.sash===i}),c=n.combinedDisposable([u.domEvent(document.body,"keydown")(function(e){return l(t.sashDragState.current,e.altKey)}),u.domEvent(document.body,"keyup")(function(){return l(t.sashDragState.current,!1)})]),l=function(e,n){var i=t.viewItems.map(function(e){return e.size}),r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;if(t.inverseAltBehavior&&(n=!n),n){if(s===t.sashItems.length-1){r=((a=t.viewItems[s]).view.minimumSize-a.size)/2,o=(a.view.maximumSize-a.size)/2}else{var a=t.viewItems[s+1];r=(a.size-a.view.maximumSize)/2,o=(a.size-a.view.minimumSize)/2}}t.sashDragState={start:e,current:e,index:s,sizes:i,minDelta:r,maxDelta:o,alt:n,disposable:c}};l(r,o)},e.prototype.onSashChange=function(e){
var t=e.current,n=this.sashDragState,i=n.index,r=n.start,o=n.sizes,s=n.alt,a=n.minDelta,c=n.maxDelta;this.sashDragState.current=t;var l=t-r,u=this.resize(i,l,o,void 0,void 0,a,c);if(s){var d=i===this.sashItems.length-1,h=this.viewItems.map(function(e){return e.size}),p=d?i:i+1,f=this.viewItems[p],g=f.size-f.view.maximumSize,v=f.size-f.view.minimumSize,m=d?i-1:i+1;this.resize(m,-u,h,void 0,void 0,g,v)}this.distributeEmptySpace(),this.layoutViews()},e.prototype.onSashEnd=function(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions()},e.prototype.onViewChange=function(e,t){var n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=s.clamp(t,e.view.minimumSize,e.view.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout(n,void 0)))},e.prototype.resizeView=function(e,t){var n=this
;if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(this.state=h.Busy,!(e<0||e>=this.viewItems.length)){var i=this.viewItems[e];t=Math.round(t);var r=(t=s.clamp(t,i.view.minimumSize,i.view.maximumSize))-i.size;if(0!==r&&e<this.viewItems.length-1){var o=a.range(e+1,this.viewItems.length),c=o.reduce(function(e,t){return e+(n.viewItems[t].size-n.viewItems[t].view.minimumSize)},0),l=o.reduce(function(e,t){return e+(n.viewItems[t].view.maximumSize-n.viewItems[t].size)},0),u=s.clamp(r,-l,c);this.resize(e,u),r-=u}if(0!==r&&e>0){var d=a.range(e-1,-1),p=d.reduce(function(e,t){return e+(n.viewItems[t].size-n.viewItems[t].view.minimumSize)},0),f=d.reduce(function(e,t){return e+(n.viewItems[t].view.maximumSize-n.viewItems[t].size)},0),g=s.clamp(-r,-p,f);this.resize(e-1,g)}this.distributeEmptySpace(),this.layoutViews(),this.saveProportions(),this.state=h.Idle}},e.prototype.distributeViewSizes=function(){
for(var e=Math.floor(this.size/this.viewItems.length),t=0;t<this.viewItems.length-1;t++)this.resizeView(t,e)},e.prototype.getViewSize=function(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size},e.prototype.resize=function(e,t,n,i,r,o,c){var l=this;if(void 0===n&&(n=this.viewItems.map(function(e){return e.size})),void 0===o&&(o=Number.NEGATIVE_INFINITY),void 0===c&&(c=Number.POSITIVE_INFINITY),e<0||e>=this.viewItems.length)return 0;var u=a.range(e,-1),d=a.range(e+1,this.viewItems.length);"number"==typeof r&&(a.pushToStart(u,r),a.pushToStart(d,r)),"number"==typeof i&&(a.pushToEnd(u,i),a.pushToEnd(d,i));for(var h=u.map(function(e){return l.viewItems[e]}),p=u.map(function(e){return n[e]}),f=d.map(function(e){return l.viewItems[e]}),g=d.map(function(e){return n[e]}),v=u.reduce(function(e,t){return e+(l.viewItems[t].view.minimumSize-n[t])},0),m=u.reduce(function(e,t){return e+(l.viewItems[t].view.maximumSize-n[t])},0),y=0===d.length?Number.POSITIVE_INFINITY:d.reduce(function(e,t){
return e+(n[t]-l.viewItems[t].view.minimumSize)},0),b=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(function(e,t){return e+(n[t]-l.viewItems[t].view.maximumSize)},0),S=Math.max(v,b,o),_=Math.min(y,m,c),C=0,E=t=s.clamp(t,S,_);C<h.length;C++){I=h[C];E-=x=(T=s.clamp(p[C]+E,I.view.minimumSize,I.view.maximumSize))-p[C],I.size=T}for(var C=0,w=t;C<f.length;C++){var I=f[C],T=s.clamp(g[C]-w,I.view.minimumSize,I.view.maximumSize),x=T-g[C];w+=x,I.size=T}return t},e.prototype.distributeEmptySpace=function(){for(var e=this.viewItems.reduce(function(e,t){return e+t.size},0),t=this.size-e,n=this.viewItems.length-1;0!==t&&n>=0;n--){var i=this.viewItems[n],r=s.clamp(i.size+t,i.view.minimumSize,i.view.maximumSize);t-=r-i.size,i.size=r}},e.prototype.layoutViews=function(){this.contentSize=this.viewItems.reduce(function(e,t){return e+t.size},0),this.viewItems.forEach(function(e){return e.layout()}),this.sashItems.forEach(function(e){return e.sash.layout()});var e=!1,t=this.viewItems.map(function(t){
return e=t.size-t.view.minimumSize>0||e});e=!1;var n=this.viewItems.map(function(t){return e=t.view.maximumSize-t.size>0||e}),i=this.viewItems.slice().reverse();e=!1;var r=i.map(function(t){return e=t.size-t.view.minimumSize>0||e}).reverse();e=!1;var o=i.map(function(t){return e=t.view.maximumSize-t.size>0||e}).reverse();this.sashItems.forEach(function(e,i){var s=!(t[i]&&o[i+1]),a=!(n[i]&&r[i+1]);e.sash.state=s&&a?c.SashState.Disabled:s&&!a?c.SashState.Minimum:!s&&a?c.SashState.Maximum:c.SashState.Enabled})},e.prototype.getSashPosition=function(e){for(var t=0,n=0;n<this.sashItems.length;n++)if(t+=this.viewItems[n].size,this.sashItems[n].sash===e)return t;return 0},e.prototype.dispose=function(){this.viewItems.forEach(function(e){return e.disposable.dispose()}),this.viewItems=[],this.sashItems.forEach(function(e){return e.disposable.dispose()}),this.sashItems=[]},e}();t.SplitView=f}),define(e[1116],t([1,0,183,8,7,5]),function(e,t,n,i,r,o){"use strict";function s(e){var t=i.$(".centered-layout-margin")
;return t.style.height="100%",t.style.backgroundColor=e.toString(),{element:t,layout:function(){},minimumSize:60,maximumSize:Number.POSITIVE_INFINITY,onDidChange:r.Event.None}}Object.defineProperty(t,"__esModule",{value:!0});var a={leftMarginRatio:.1909,rightMarginRatio:.1909},c=function(){function e(e,t,n){void 0===n&&(n=a),this.container=e,this.view=t,this.state=n,this.width=0,this.height=0,this.didLayout=!1,this.splitViewDisposables=[],this.container.appendChild(this.view.element),this.container.style.overflow="hidden"}return Object.defineProperty(e.prototype,"minimumWidth",{get:function(){return this.splitView?this.splitView.minimumSize:this.view.minimumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumWidth",{get:function(){return this.splitView?this.splitView.maximumSize:this.view.maximumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumHeight",{get:function(){return this.view.minimumHeight},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"maximumHeight",{get:function(){return this.view.maximumHeight},enumerable:!0,configurable:!0}),e.prototype.layout=function(e,t){this.width=e,this.height=t,this.splitView?(this.splitView.layout(e),this.didLayout||this.resizeMargins()):this.view.layout(e,t),this.didLayout=!0},e.prototype.resizeMargins=function(){this.splitView.resizeView(0,this.state.leftMarginRatio*this.width),this.splitView.resizeView(2,this.state.rightMarginRatio*this.width)},e.prototype.isActive=function(){return!!this.splitView},e.prototype.styles=function(e){this.style=e,this.splitView&&(this.splitView.style(this.style),this.emptyViews[0].element.style.backgroundColor=this.style.background.toString(),this.emptyViews[1].element.style.backgroundColor=this.style.background.toString())},e.prototype.activate=function(e){var t=this;e!==this.isActive()&&(e?(this.container.removeChild(this.view.element),this.splitView=new n.SplitView(this.container,{inverseAltBehavior:!0,orientation:n.Orientation.HORIZONTAL,
styles:this.style}),this.splitViewDisposables.push(this.splitView.onDidSashChange(function(){t.state.leftMarginRatio=t.splitView.getViewSize(0)/t.width,t.state.rightMarginRatio=t.splitView.getViewSize(2)/t.width})),this.splitViewDisposables.push(this.splitView.onDidSashReset(function(){t.state.leftMarginRatio=a.leftMarginRatio,t.state.rightMarginRatio=a.rightMarginRatio,t.resizeMargins()})),this.splitView.layout(this.width),this.splitView.addView(function(e,t){return{element:e.element,get maximumSize(){return e.maximumWidth},get minimumSize(){return e.minimumWidth},onDidChange:r.mapEvent(e.onDidChange,function(e){return e&&e.width}),layout:function(n){return e.layout(n,t())}}}(this.view,function(){return t.height}),0),this.emptyViews=[s(this.style.background),s(this.style.background)],this.splitView.addView(this.emptyViews[0],this.state.leftMarginRatio*this.width,0),this.splitView.addView(this.emptyViews[1],this.state.rightMarginRatio*this.width,2)):(this.container.removeChild(this.splitView.el),
this.splitViewDisposables=o.dispose(this.splitViewDisposables),this.splitView.dispose(),this.splitView=void 0,this.emptyViews=void 0,this.container.appendChild(this.view.element)))},e.prototype.dispose=function(){this.splitViewDisposables=o.dispose(this.splitViewDisposables),this.splitView&&(this.splitView.dispose(),this.splitView=void 0)},e}();t.CenteredViewLayout=c}),define(e[325],t([1,0,7,152,183,5,8,20,51,183,152,399]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";function d(e){return e===i.Orientation.VERTICAL?i.Orientation.HORIZONTAL:i.Orientation.VERTICAL}function h(e,t,n){if(e instanceof f){for(var i=new f(d(e.orientation),e.styles,t,n),r=0,o=e.children.length-1;o>=0;o--){var s=e.children[o],a=s instanceof f?s.orthogonalSize:s.size,c=0===e.size?0:Math.round(t*a/e.size);r+=c,0===o&&(c+=t-r),i.addChild(h(s,n,c),c,0)}return i}return new g(e.view,d(e.orientation),n)}Object.defineProperty(t,"__esModule",{value:!0}),t.Sizing=l.Sizing,t.Orientation=u.Orientation,t.orthogonal=d,t.isGridBranchNode=function(e){
return!!e.children};var p={separatorBorder:c.Color.transparent},f=function(){function e(e,t,i,a){void 0===i&&(i=0),void 0===a&&(a=0),this.orientation=e,this.children=[],this._onDidChange=new n.Emitter,this.onDidChange=this._onDidChange.event,this.childrenChangeDisposable=o.empty,this._onDidSashReset=new n.Emitter,this.onDidSashReset=this._onDidSashReset.event,this.splitviewSashResetDisposable=o.empty,this.childrenSashResetDisposable=o.empty,this._styles=t,this._size=i,this._orthogonalSize=a,this.element=s.$(".monaco-grid-branch-node"),this.splitview=new r.SplitView(this.element,{orientation:e,styles:t}),this.splitview.layout(i);var c=n.mapEvent(this.splitview.onDidSashReset,function(e){return[e]});this.splitviewSashResetDisposable=c(this._onDidSashReset.fire,this._onDidSashReset)}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalSize",{get:function(){return this._orthogonalSize},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return this._styles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.size:this.orthogonalSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.orthogonalSize:this.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumSize",{get:function(){return 0===this.children.length?0:Math.max.apply(Math,this.children.map(function(e){return e.minimumOrthogonalSize}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumSize",{get:function(){return Math.min.apply(Math,this.children.map(function(e){return e.maximumOrthogonalSize}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumOrthogonalSize",{get:function(){return this.splitview.minimumSize},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"maximumOrthogonalSize",{get:function(){return this.splitview.maximumSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumWidth",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.minimumOrthogonalSize:this.minimumSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumHeight",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.minimumSize:this.minimumOrthogonalSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumWidth",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.maximumOrthogonalSize:this.maximumSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumHeight",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.maximumSize:this.maximumOrthogonalSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalStartSash",{get:function(){
return this.splitview.orthogonalStartSash},set:function(e){this.splitview.orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalEndSash",{get:function(){return this.splitview.orthogonalEndSash},set:function(e){this.splitview.orthogonalEndSash=e},enumerable:!0,configurable:!0}),e.prototype.style=function(t){this._styles=t,this.splitview.style(t);for(var n=0,i=this.children;n<i.length;n++){var r=i[n];r instanceof e&&r.style(t)}},e.prototype.layout=function(e){this._orthogonalSize=e;for(var t=0,n=this.children;t<n.length;t++){n[t].orthogonalLayout(e)}},e.prototype.orthogonalLayout=function(e){this._size=e,this.splitview.layout(e)},e.prototype.addChild=function(e,t,n){if(n<0||n>this.children.length)throw new Error("Invalid index");var i=0===n,r=n===this.splitview.length;this.splitview.addView(e,t,n),this.children.splice(n,0,e),e.orthogonalStartSash=this.splitview.sashes[n-1],e.orthogonalEndSash=this.splitview.sashes[n],
i||(this.children[n-1].orthogonalEndSash=this.splitview.sashes[n-1]),r||(this.children[n+1].orthogonalStartSash=this.splitview.sashes[n]),this.onDidChildrenChange()},e.prototype.removeChild=function(e,t){if(e<0||e>=this.children.length)throw new Error("Invalid index");var n=0===e,i=e===this.splitview.length-1;this.splitview.removeView(e,t),this.children.splice(e,1),n||(this.children[e-1].orthogonalEndSash=this.splitview.sashes[e-1]),i||(this.children[e].orthogonalStartSash=this.splitview.sashes[Math.max(e-1,0)]),this.onDidChildrenChange()},e.prototype.swapChildren=function(e,t){var n,i;if(e!==t){if(e<0||e>=this.children.length)throw new Error("Invalid from index");if(t<0||t>=this.children.length)throw new Error("Invalid to index");this.splitview.swapViews(e,t),n=[this.children[t].orthogonalStartSash,this.children[t].orthogonalEndSash,this.children[e].orthogonalStartSash,this.children[e].orthogonalEndSash],this.children[e].orthogonalStartSash=n[0],this.children[e].orthogonalEndSash=n[1],
this.children[t].orthogonalStartSash=n[2],this.children[t].orthogonalEndSash=n[3],i=[this.children[t],this.children[e]],this.children[e]=i[0],this.children[t]=i[1]}},e.prototype.resizeChild=function(e,t){if(e<0||e>=this.children.length)throw new Error("Invalid index");this.splitview.resizeView(e,t)},e.prototype.distributeViewSizes=function(t){if(void 0===t&&(t=!1),this.splitview.distributeViewSizes(),t)for(var n=0,i=this.children;n<i.length;n++){var r=i[n];r instanceof e&&r.distributeViewSizes(!0)}},e.prototype.getChildSize=function(e){if(e<0||e>=this.children.length)throw new Error("Invalid index");return this.splitview.getViewSize(e)},e.prototype.onDidChildrenChange=function(){var e=n.anyEvent.apply(void 0,this.children.map(function(e){return e.onDidChange}));this.childrenChangeDisposable.dispose(),this.childrenChangeDisposable=e(this._onDidChange.fire,this._onDidChange);var t=n.anyEvent.apply(void 0,this.children.map(function(e,t){return n.mapEvent(e.onDidSashReset,function(e){return[t].concat(e)})}))
;this.childrenSashResetDisposable.dispose(),this.childrenSashResetDisposable=t(this._onDidSashReset.fire,this._onDidSashReset),this._onDidChange.fire()},e.prototype.trySet2x2=function(e){if(2!==this.children.length||2!==e.children.length)return o.empty;if(this.getChildSize(0)!==e.getChildSize(0))return o.empty;var t=this.children,n=t[0],r=t[1],s=e.children,a=s[0],c=s[1];if(!(n instanceof g&&r instanceof g))return o.empty;if(!(a instanceof g&&c instanceof g))return o.empty;this.orientation===i.Orientation.VERTICAL?(r.linkedWidthNode=a.linkedHeightNode=n,n.linkedWidthNode=c.linkedHeightNode=r,c.linkedWidthNode=n.linkedHeightNode=a,a.linkedWidthNode=r.linkedHeightNode=c):(a.linkedWidthNode=r.linkedHeightNode=n,c.linkedWidthNode=n.linkedHeightNode=r,n.linkedWidthNode=c.linkedHeightNode=a,r.linkedWidthNode=a.linkedHeightNode=c);var l=this.splitview.sashes[0],u=e.splitview.sashes[0];return l.linkedSash=u,u.linkedSash=l,this._onDidChange.fire(),e._onDidChange.fire(),o.toDisposable(function(){
l.linkedSash=u.linkedSash=void 0,n.linkedHeightNode=n.linkedWidthNode=void 0,r.linkedHeightNode=r.linkedWidthNode=void 0,a.linkedHeightNode=a.linkedWidthNode=void 0,c.linkedHeightNode=c.linkedWidthNode=void 0})},e.prototype.dispose=function(){for(var e=0,t=this.children;e<t.length;e++){t[e].dispose()}this.splitviewSashResetDisposable.dispose(),this.childrenSashResetDisposable.dispose(),this.childrenChangeDisposable.dispose(),this.splitview.dispose()},e}(),g=function(){function e(e,t,r){void 0===r&&(r=0),this.view=e,this.orientation=t,this._size=0,this.onDidSashReset=n.Event.None,this._onDidLinkedWidthNodeChange=new n.Relay,this._linkedWidthNode=void 0,this._onDidLinkedHeightNodeChange=new n.Relay,this._linkedHeightNode=void 0,this._onDidSetLinkedNode=new n.Emitter,this._orthogonalSize=r,this._onDidViewChange=n.mapEvent(this.view.onDidChange,this.orientation===i.Orientation.HORIZONTAL?function(e){return e&&e.width}:function(e){return e&&e.height}),
this.onDidChange=n.anyEvent(this._onDidViewChange,this._onDidSetLinkedNode.event,this._onDidLinkedWidthNodeChange.event,this._onDidLinkedHeightNodeChange.event)}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalSize",{get:function(){return this._orthogonalSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linkedWidthNode",{get:function(){return this._linkedWidthNode},set:function(e){this._onDidLinkedWidthNodeChange.input=e?e._onDidViewChange:n.Event.None,this._linkedWidthNode=e,this._onDidSetLinkedNode.fire()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linkedHeightNode",{get:function(){return this._linkedHeightNode},set:function(e){this._onDidLinkedHeightNodeChange.input=e?e._onDidViewChange:n.Event.None,this._linkedHeightNode=e,this._onDidSetLinkedNode.fire()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){
return this.orientation===i.Orientation.HORIZONTAL?this.orthogonalSize:this.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.size:this.orthogonalSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.view.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumWidth",{get:function(){return this.linkedWidthNode?Math.max(this.linkedWidthNode.view.minimumWidth,this.view.minimumWidth):this.view.minimumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumWidth",{get:function(){return this.linkedWidthNode?Math.min(this.linkedWidthNode.view.maximumWidth,this.view.maximumWidth):this.view.maximumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumHeight",{get:function(){
return this.linkedHeightNode?Math.max(this.linkedHeightNode.view.minimumHeight,this.view.minimumHeight):this.view.minimumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumHeight",{get:function(){return this.linkedHeightNode?Math.min(this.linkedHeightNode.view.maximumHeight,this.view.maximumHeight):this.view.maximumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumSize",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.minimumHeight:this.minimumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumSize",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.maximumHeight:this.maximumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumOrthogonalSize",{get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.minimumWidth:this.minimumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumOrthogonalSize",{
get:function(){return this.orientation===i.Orientation.HORIZONTAL?this.maximumWidth:this.maximumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalStartSash",{set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalEndSash",{set:function(e){},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){return this._size=e,this.view.layout(this.width,this.height)},e.prototype.orthogonalLayout=function(e){return this._orthogonalSize=e,this.view.layout(this.width,this.height)},e.prototype.dispose=function(){},e}(),v=function(){function e(e){void 0===e&&(e={}),this.onDidSashResetRelay=new n.Relay,this.onDidSashReset=this.onDidSashResetRelay.event,this.disposable2x2=o.empty,this._onDidChange=new n.Relay,this.onDidChange=this._onDidChange.event,this.element=s.$(".monaco-grid-view"),this.styles=e.styles||p,this.root=new f(i.Orientation.VERTICAL,this.styles)}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root},
set:function(e){var t=this._root;t&&(this.element.removeChild(t.element),t.dispose()),this._root=e,this.element.appendChild(e.element),this.onDidSashResetRelay.input=e.onDidSashReset,this._onDidChange.input=n.mapEvent(e.onDidChange,function(){})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this._root.orientation},set:function(e){if(this._root.orientation!==e){var t=this._root,n=t.size,i=t.orthogonalSize;this.root=h(this._root,i,n),this.root.layout(n),this.root.orthogonalLayout(i)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.root.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.root.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumWidth",{get:function(){return this.root.minimumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumHeight",{get:function(){
return this.root.minimumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumWidth",{get:function(){return this.root.maximumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumHeight",{get:function(){return this.root.maximumHeight},enumerable:!0,configurable:!0}),e.prototype.style=function(e){this.styles=e,this.root.style(e)},e.prototype.layout=function(e,t){var n=this.root.orientation===i.Orientation.HORIZONTAL?[t,e]:[e,t],r=n[0],o=n[1];this.root.layout(r),this.root.orthogonalLayout(o)},e.prototype.addView=function(e,t,n){this.disposable2x2.dispose(),this.disposable2x2=o.empty;var i=a.tail2(n),s=i[0],c=i[1],l=this.getNode(s),u=l[0],h=l[1];if(h instanceof f){b=new g(e,d(h.orientation),h.orthogonalSize);h.addChild(b,t,c)}else{var p=a.tail2(u)[1],v=a.tail2(s)[1];p.removeChild(v);var m=new f(h.orientation,this.styles,h.size,h.orthogonalSize);p.addChild(m,h.size,v),m.orthogonalLayout(h.orthogonalSize);var y=new g(h.view,p.orientation,h.size)
;m.addChild(y,0,0),"number"!=typeof t&&"split"===t.type&&(t=r.Sizing.Split(0));var b=new g(e,p.orientation,h.size);m.addChild(b,t,c)}},e.prototype.removeView=function(e,t){this.disposable2x2.dispose(),this.disposable2x2=o.empty;var n=a.tail2(e),i=n[0],r=n[1],s=this.getNode(i),c=s[0],l=s[1];if(!(l instanceof f))throw new Error("Invalid location");var u=l.children[r];if(!(u instanceof g))throw new Error("Invalid location");if(l.removeChild(r,t),0===l.children.length)throw new Error("Invalid grid state");if(l.children.length>1)return u.view;if(0===c.length){var h=l.children[0];return h instanceof g?u.view:(l.removeChild(0),this.root=h,u.view)}var p=a.tail2(c)[1],v=a.tail2(i)[1],m=l.children[0];l.removeChild(0);var y=p.children.map(function(e,t){return p.getChildSize(t)});if(p.removeChild(v,t),m instanceof f){y.splice.apply(y,[v,1].concat(m.children.map(function(e){return e.size})));for(_=0;_<m.children.length;_++){var b=m.children[_];p.addChild(b,b.size,v+_)}}else{var S=new g(m.view,d(m.orientation),m.size)
;p.addChild(S,m.orthogonalSize,v)}for(var _=0;_<y.length;_++)p.resizeChild(_,y[_]);return u.view},e.prototype.swapViews=function(e,t){var n=a.tail2(e),i=n[0],r=n[1],o=this.getNode(i)[1];if(!(o instanceof f))throw new Error("Invalid from location");var s=o.getChildSize(r),c=o.children[r];if(!(c instanceof g))throw new Error("Invalid from location");var l=a.tail2(t),u=l[0],d=l[1],h=this.getNode(u)[1];if(!(h instanceof f))throw new Error("Invalid to location");var p=h.getChildSize(d),v=h.children[d];if(!(v instanceof g))throw new Error("Invalid to location");o===h?o.swapChildren(r,d):(o.removeChild(r),h.removeChild(d),o.addChild(v,s,r),h.addChild(c,p,d),o.layout(o.orthogonalSize),h.layout(h.orthogonalSize))},e.prototype.resizeView=function(e,t){var n=a.tail2(e),i=n[0],r=n[1],o=this.getNode(i)[1];if(!(o instanceof f))throw new Error("Invalid location");o.resizeChild(r,t)},e.prototype.getViewSize=function(e){var t=this.getNode(e)[1];return{width:t.width,height:t.height}},e.prototype.maximizeViewSize=function(e){
var t=this.getNode(e),n=t[0];if(!(t[1]instanceof g))throw new Error("Invalid location");for(var i=0;i<n.length;i++)n[i].resizeChild(e[i],Number.POSITIVE_INFINITY)},e.prototype.distributeViewSizes=function(e){if(e){var t=this.getNode(e)[1];if(!(t instanceof f))throw new Error("Invalid location");t.distributeViewSizes()}else this.root.distributeViewSizes(!0)},e.prototype.getViews=function(){return this._getViews(this.root,this.orientation,{top:0,left:0,width:this.width,height:this.height})},e.prototype._getViews=function(e,t,n){if(e instanceof g)return{view:e.view,box:n};for(var r=[],o=0,s=0;s<e.children.length;s++){var a=e.children[s],c=d(t),l=t===i.Orientation.HORIZONTAL?{top:n.top,left:n.left+o,width:a.width,height:n.height}:{top:n.top+o,left:n.left,width:n.width,height:a.height};r.push(this._getViews(a,c,l)),o+=t===i.Orientation.HORIZONTAL?a.width:a.height}return{children:r,box:n}},e.prototype.getNode=function(e,t,n){if(void 0===t&&(t=this.root),void 0===n&&(n=[]),0===e.length)return[n,t]
;if(!(t instanceof f))throw new Error("Invalid location");var i=e[0],r=e.slice(1);if(i<0||i>=t.children.length)throw new Error("Invalid location");var o=t.children[i];return n.push(t),this.getNode(r,o,n)},e.prototype.trySet2x2=function(){if(this.disposable2x2.dispose(),this.disposable2x2=o.empty,2===this.root.children.length){var e=this.root.children,t=e[0],n=e[1];t instanceof f&&n instanceof f&&(this.disposable2x2=t.trySet2x2(n))}},e.prototype.dispose=function(){this.onDidSashResetRelay.dispose(),this.root.dispose(),this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element)},e}();t.GridView=v}),define(e[1127],t([1,0,152,5,20,325,325,399]),function(e,t,i,r,o,s,a){"use strict";function c(e){return!!e.children}function l(e,t){if(0===t.length)return e;if(!c(e))throw new Error("Invalid location");var n=t[0],i=t.slice(1);return l(e.children[n],i)}function u(e,t){var n=h(t);return{offset:t===b.Up?e.top:t===b.Right?e.left+e.width:t===b.Down?e.top+e.height:e.left,range:{
start:n===i.Orientation.HORIZONTAL?e.top:e.left,end:n===i.Orientation.HORIZONTAL?e.top+e.height:e.left+e.width}}}function d(e,t){return t.length%2==0?s.orthogonal(e):e}function h(e){return e===b.Up||e===b.Down?i.Orientation.VERTICAL:i.Orientation.HORIZONTAL}function p(e,t){return t===i.Orientation.HORIZONTAL?e.width:e.height}function f(e,t,n){if(d(e,t)===h(n)){var i=o.tail2(t),r=i[0],s=i[1];return n!==b.Right&&n!==b.Down||(s+=1),r.concat([s])}s=n===b.Right||n===b.Down?1:0;return t.concat([s])}function g(e){if(/\bmonaco-grid-view\b/.test(e.parentElement.className))return[];var t=function(e){for(var t=e.parentElement,n=t.firstElementChild,i=0;n!==e&&n!==t.lastElementChild;)n=n.nextElementSibling,i++;return i}(e.parentElement);return g(e.parentElement.parentElement.parentElement.parentElement).concat([t])}function v(e){if(e.groups&&0===e.groups.length&&(e.groups=void 0),e.groups){for(var t=0,n=0,i=0,r=e.groups;i<r.length;i++){v(c=r[i]),c.size&&(t+=c.size,n++)}
for(var o=(n>0?t:1)/(e.groups.length-n),s=0,a=e.groups;s<a.length;s++){var c=a[s];c.size||(c.size=o)}}}function m(e){return e.groups?{type:"branch",data:e.groups.map(function(e){return m(e)}),size:e.size}:{type:"leaf",data:null,size:e.size}}function y(e,t){if("branch"===e.type){var n=e.data.map(function(e){return y(e,s.orthogonal(t))});if(t===i.Orientation.VERTICAL){return{width:r=e.size||(0===n.length?void 0:Math.max.apply(Math,n.map(function(e){return e.width||0}))),height:o=0===n.length?void 0:n.reduce(function(e,t){return e+t.height},0)}}return{width:r=0===n.length?void 0:n.reduce(function(e,t){return e+t.width},0),height:o=e.size||(0===n.length?void 0:Math.max.apply(Math,n.map(function(e){return e.height||0})))}}var r=t===i.Orientation.VERTICAL?e.size:void 0,o=t===i.Orientation.VERTICAL?void 0:e.size;return{width:r,height:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.Orientation=a.Orientation;var b;!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"
}(b=t.Direction||(t.Direction={})),t.isGridBranchNode=c,t.getRelativeLocation=f;var S;!function(e){e.Distribute="distribute",e.Split="split"}(S=t.Sizing||(t.Sizing={}));var _=function(){function e(e,t){void 0===t&&(t={}),this.views=new Map,this.disposables=[],this.sashResetSizing=S.Distribute,this.gridview=new s.GridView(t),this.disposables.push(this.gridview),this.gridview.onDidSashReset(this.doResetViewSize,this,this.disposables),this._addView(e,0,[0])}return Object.defineProperty(e.prototype,"orientation",{get:function(){return this.gridview.orientation},set:function(e){this.gridview.orientation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.gridview.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.gridview.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumWidth",{get:function(){return this.gridview.minimumWidth},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"minimumHeight",{get:function(){return this.gridview.minimumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumWidth",{get:function(){return this.gridview.maximumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumHeight",{get:function(){return this.gridview.maximumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this.gridview.onDidChange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.gridview.element},enumerable:!0,configurable:!0}),e.prototype.style=function(e){this.gridview.style(e)},e.prototype.layout=function(e,t){this.gridview.layout(e,t)},e.prototype.addView=function(e,t,n,i){if(this.views.has(e))throw new Error("Can't add same view twice");var r=h(i);1===this.views.size&&this.orientation!==r&&(this.orientation=r);var a,c=this.getViewLocation(n),l=f(this.gridview.orientation,c,i)
;if(t===S.Split){var u=o.tail2(c)[1];a=s.Sizing.Split(u)}else a=t===S.Distribute?s.Sizing.Distribute:t;this._addView(e,a,l)},e.prototype._addView=function(e,t,n){this.views.set(e,e.element),this.gridview.addView(e,t,n)},e.prototype.removeView=function(e,t){if(1===this.views.size)throw new Error("Can't remove last view");if(!this.views.has(e))throw new Error("View not found");var n=this.getViewLocation(e);this.gridview.removeView(n,t===S.Distribute?s.Sizing.Distribute:void 0),this.views.delete(e)},e.prototype.swapViews=function(e,t){var n=this.getViewLocation(e),i=this.getViewLocation(t);return this.gridview.swapViews(n,i)},e.prototype.resizeView=function(e,t){var n=this.getViewLocation(e);return this.gridview.resizeView(n,t)},e.prototype.getViewSize=function(e){var t=this.getViewLocation(e),n=this.gridview.getViewSize(t);return d(this.orientation,t)===i.Orientation.HORIZONTAL?n.width:n.height},e.prototype.maximizeViewSize=function(e){var t=this.getViewLocation(e);this.gridview.maximizeViewSize(t)},
e.prototype.distributeViewSizes=function(){this.gridview.distributeViewSizes()},e.prototype.getViews=function(){return this.gridview.getViews()},e.prototype.getNeighborViews=function(e,t,n){void 0===n&&(n=!1);var i=this.getViewLocation(e),r=this.getViews(),o=l(r,i),s=u(o.box,t);return n&&(t===b.Up&&0===o.box.top?s={offset:r.box.top+r.box.height,range:s.range}:t===b.Right&&o.box.left+o.box.width===r.box.width?s={offset:0,range:s.range}:t===b.Down&&o.box.top+o.box.height===r.box.height?s={offset:0,range:s.range}:t===b.Left&&0===o.box.left&&(s={offset:r.box.left+r.box.width,range:s.range})),function(e,t,n){function i(e,t,n){if(c(e))for(var o=0,s=e.children;o<s.length;o++)i(s[o],t,n);else{var a=u(e.box,t),l=a.offset,d=a.range;l===n.offset&&function(e,t){return!(e.start>=t.end||t.start>=e.end)}(d,n.range)&&r.push(e)}}var r=[];return i(e,t,n),r}(r,function(e){switch(e){case b.Up:return b.Down;case b.Down:return b.Up;case b.Left:return b.Right;case b.Right:return b.Left}}(t),s).map(function(e){return e.view})},
e.prototype.getViewLocation=function(e){var t=this.views.get(e);if(!t)throw new Error("View not found");return g(t)},e.prototype.doResetViewSize=function(e){if(this.sashResetSizing===S.Split){var t=d(this.orientation,e),n=p(this.gridview.getViewSize(e),t),i=o.tail2(e),r=i[0],s=i[1],a=n+p(this.gridview.getViewSize(r.concat([s+1])),t);this.gridview.resizeView(e,Math.floor(a/2))}else{r=o.tail2(e)[0];this.gridview.distributeViewSizes(r)}},e.prototype.dispose=function(){this.disposables=r.dispose(this.disposables)},e}();t.Grid=_;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.serializeNode=function(e,n){var r=n===i.Orientation.VERTICAL?e.box.width:e.box.height;return c(e)?{type:"branch",data:e.children.map(function(e){return t.serializeNode(e,s.orthogonal(n))}),size:r}:{type:"leaf",data:e.view.toJSON(),size:r}},t.deserializeNode=function(e,n,r,o){if(!e||"object"!=typeof e)throw new Error("Invalid JSON");var a=e.type,c=e.data;if("branch"===a){
if(!Array.isArray(c))throw new Error("Invalid JSON: 'data' property of branch must be an array.");for(var l=[],u=0,d=0,h=c;d<h.length;d++){var p=h[d];if("number"!=typeof p.size)throw new Error("Invalid JSON: 'size' property of node must be a number.");var f=n===i.Orientation.HORIZONTAL?{top:r.top,left:r.left+u,width:p.size,height:r.height}:{top:r.top+u,left:r.left,width:r.width,height:p.size};l.push(t.deserializeNode(p,s.orthogonal(n),f,o)),u+=p.size}return{children:l,box:r}}if("leaf"===a){return{view:o.fromJSON(c),box:r}}throw new Error("Invalid JSON: 'type' property must be either 'branch' or 'leaf'.")},t.getFirstLeaf=function(e){return c(e)?t.getFirstLeaf(e.children[0]):e},t.deserialize=function(e,n,i){if(void 0===i&&(i={}),"number"!=typeof e.orientation)throw new Error("Invalid JSON: 'orientation' property must be a number.");if("number"!=typeof e.width)throw new Error("Invalid JSON: 'width' property must be a number.")
;if("number"!=typeof e.height)throw new Error("Invalid JSON: 'height' property must be a number.");var r=e.orientation,o=e.width,s=e.height,a={top:0,left:0,width:o,height:s},c=t.deserializeNode(e.root,r,a,n),l=t.getFirstLeaf(c);if(!l)throw new Error("Invalid serialized state, first leaf not found");var u=new t(l.view,i);return u.orientation=r,u.restoreViews(l.view,r,c),u.initialLayoutContext={width:o,height:s,root:c},u},t.prototype.serialize=function(){return{root:t.serializeNode(this.getViews(),this.orientation),orientation:this.orientation,width:this.width,height:this.height}},t.prototype.layout=function(t,n){if(e.prototype.layout.call(this,t,n),this.initialLayoutContext){var i=t/this.initialLayoutContext.width,r=n/this.initialLayoutContext.height;this.restoreViewsSize([],this.initialLayoutContext.root,this.orientation,i,r),this.initialLayoutContext=void 0,this.gridview.trySet2x2()}},t.prototype.restoreViews=function(e,n,r){if(c(r)){
for(var o=n===i.Orientation.VERTICAL?b.Down:b.Right,a=r.children.map(function(e){return t.getFirstLeaf(e)}),l=1;l<a.length;l++){var u=n===i.Orientation.VERTICAL?a[l].box.height:a[l].box.width;this.addView(a[l].view,u,e,o),e=a[l].view}for(l=0;l<r.children.length;l++)this.restoreViews(a[l].view,s.orthogonal(n),r.children[l])}},t.prototype.restoreViewsSize=function(e,t,n,r,o){if(c(t))for(var a=n===i.Orientation.VERTICAL?o:r,l=0;l<t.children.length;l++){var u=t.children[l],d=e.concat([l]);if(l<t.children.length-1){var h=n===i.Orientation.VERTICAL?u.box.height:u.box.width;this.gridview.resizeView(d,Math.floor(h*a))}this.restoreViewsSize(d,u,s.orthogonal(n),r,o)}},t}(_);t.SerializableGrid=C,t.sanitizeGridNodeDescriptor=v,t.createSerializedGrid=function(e){v(e);var t=m(e),n=y(t,e.orientation),i=n.width,r=n.height;return{root:t,orientation:e.orientation,width:i||1,height:r||1}}}),define(e[440],t([1,0,5,7,106,84,8,20,51,183,1090]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var u=function(){function e(e){void 0===e&&(e={}),this.expandedSize=void 0,this._headerVisible=!0,this.styles={},this.disposables=[],this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event,this._expanded=void 0===e.expanded||!!e.expanded,this.ariaHeaderLabel=e.ariaHeaderLabel||"",this._minimumBodySize="number"==typeof e.minimumBodySize?e.minimumBodySize:120,this._maximumBodySize="number"==typeof e.maximumBodySize?e.maximumBodySize:Number.POSITIVE_INFINITY,this.element=s.$(".panel")}return Object.defineProperty(e.prototype,"draggableElement",{get:function(){return this.header},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTargetElement",{get:function(){return this.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropBackground",{get:function(){return this._dropBackground},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumBodySize",{get:function(){return this._minimumBodySize},set:function(e){
this._minimumBodySize=e,this._onDidChange.fire()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumBodySize",{get:function(){return this._maximumBodySize},set:function(e){this._maximumBodySize=e,this._onDidChange.fire()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerSize",{get:function(){return this.headerVisible?e.HEADER_SIZE:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumSize",{get:function(){return this.headerSize+(!this.headerVisible||this.isExpanded()?this._minimumBodySize:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumSize",{get:function(){return this.headerSize+(!this.headerVisible||this.isExpanded()?this._maximumBodySize:0)},enumerable:!0,configurable:!0}),e.prototype.isExpanded=function(){return this._expanded},e.prototype.setExpanded=function(e){this._expanded!==!!e&&(this._expanded=!!e,this.updateHeader(),this._onDidChange.fire(e?this.expandedSize:void 0))},
Object.defineProperty(e.prototype,"headerVisible",{get:function(){return this._headerVisible},set:function(e){this._headerVisible!==!!e&&(this._headerVisible=!!e,this.updateHeader(),this._onDidChange.fire())},enumerable:!0,configurable:!0}),e.prototype.render=function(){var e=this;this.header=s.$(".panel-header"),s.append(this.element,this.header),this.header.setAttribute("tabindex","0"),this.header.setAttribute("role","toolbar"),this.header.setAttribute("aria-label",this.ariaHeaderLabel),this.renderHeader(this.header);var t=s.trackFocus(this.header);t.onDidFocus(function(){return s.addClass(e.header,"focused")}),t.onDidBlur(function(){return s.removeClass(e.header,"focused")}),this.updateHeader();var n=i.chain(r.domEvent(this.header,"keydown")).map(function(e){return new o.StandardKeyboardEvent(e)});n.filter(function(e){return 3===e.keyCode||10===e.keyCode}).event(function(){return e.setExpanded(!e.isExpanded())},null,this.disposables),n.filter(function(e){return 15===e.keyCode}).event(function(){
return e.setExpanded(!1)},null,this.disposables),n.filter(function(e){return 17===e.keyCode}).event(function(){return e.setExpanded(!0)},null,this.disposables),r.domEvent(this.header,"click")(function(){return e.setExpanded(!e.isExpanded())},null,this.disposables);var a=s.append(this.element,s.$(".panel-body"));this.renderBody(a)},e.prototype.layout=function(t){var n=this.headerVisible?e.HEADER_SIZE:0;this.layoutBody(t-n),this.isExpanded()&&(this.expandedSize=t)},e.prototype.style=function(e){this.styles=e,this.header&&this.updateHeader()},e.prototype.updateHeader=function(){var e=!this.headerVisible||this.isExpanded();this.header.style.height=this.headerSize+"px",this.header.style.lineHeight=this.headerSize+"px",s.toggleClass(this.header,"hidden",!this.headerVisible),s.toggleClass(this.header,"expanded",e),this.header.setAttribute("aria-expanded",String(e)),this.header.style.color=this.styles.headerForeground?this.styles.headerForeground.toString():null,
this.header.style.backgroundColor=this.styles.headerBackground?this.styles.headerBackground.toString():null,this.header.style.borderTop=this.styles.headerHighContrastBorder?"1px solid "+this.styles.headerHighContrastBorder:null,this._dropBackground=this.styles.dropBackground},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e.HEADER_SIZE=22,e}();t.Panel=u;var d=function(){function e(e,t,n){this.panel=e,this.dnd=t,this.context=n,this.dragOverCounter=0,this.disposables=[],this._onDidDrop=new i.Emitter,this.onDidDrop=this._onDidDrop.event,e.draggableElement.draggable=!0,r.domEvent(e.draggableElement,"dragstart")(this.onDragStart,this,this.disposables),r.domEvent(e.dropTargetElement,"dragenter")(this.onDragEnter,this,this.disposables),r.domEvent(e.dropTargetElement,"dragleave")(this.onDragLeave,this,this.disposables),r.domEvent(e.dropTargetElement,"dragend")(this.onDragEnd,this,this.disposables),r.domEvent(e.dropTargetElement,"drop")(this.onDrop,this,this.disposables)}
return e.prototype.onDragStart=function(e){if(!this.dnd.canDrag(this.panel))return e.preventDefault(),void e.stopPropagation();e.dataTransfer.effectAllowed="move";var t=s.append(document.body,s.$(".monaco-panel-drag-image",{},this.panel.draggableElement.textContent));e.dataTransfer.setDragImage(t,-10,-10),setTimeout(function(){return document.body.removeChild(t)},0),this.context.draggable=this},e.prototype.onDragEnter=function(e){this.context.draggable&&this.context.draggable!==this&&this.dnd.canDrop(this.context.draggable.panel,this.panel)&&(this.dragOverCounter++,this.render())},e.prototype.onDragLeave=function(e){this.context.draggable&&this.context.draggable!==this&&this.dnd.canDrop(this.context.draggable.panel,this.panel)&&(this.dragOverCounter--,0===this.dragOverCounter&&this.render())},e.prototype.onDragEnd=function(e){this.context.draggable&&(this.dragOverCounter=0,this.render(),this.context.draggable=null)},e.prototype.onDrop=function(e){this.context.draggable&&(this.dragOverCounter=0,this.render(),
this.dnd.canDrop(this.context.draggable.panel,this.panel)&&this.context.draggable!==this&&this._onDidDrop.fire({from:this.context.draggable.panel,to:this.panel}),this.context.draggable=null)},e.prototype.render=function(){var t=null;this.dragOverCounter>0&&(t=(this.panel.dropBackground||e.DefaultDragOverBackgroundColor).toString()),this.panel.dropTargetElement.style.backgroundColor=t},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e.DefaultDragOverBackgroundColor=new c.Color(new c.RGBA(128,128,128,.5)),e}(),h=function(){function e(){}return e.prototype.canDrag=function(e){return!0},e.prototype.canDrop=function(e,t){return!0},e}();t.DefaultPanelDndController=h;var p=function(){function e(e,t){void 0===t&&(t={}),this.dndContext={draggable:null},this.panelItems=[],this.animationTimer=null,this._onDidDrop=new i.Emitter,this.onDidDrop=this._onDidDrop.event,this.dnd=t.dnd,this.el=s.append(e,s.$(".monaco-panel-view")),this.splitview=new l.SplitView(this.el),
this.onDidSashChange=this.splitview.onDidSashChange}return e.prototype.addPanel=function(e,t,i){void 0===i&&(i=this.splitview.length);var r=[];e.onDidChange(this.setupAnimation,this,r);var o={panel:e,disposable:n.combinedDisposable(r)};if(this.panelItems.splice(i,0,o),this.splitview.addView(e,t,i),this.dnd){var s=new d(e,this.dnd,this.dndContext);r.push(s),s.onDidDrop(this._onDidDrop.fire,this._onDidDrop,r)}},e.prototype.removePanel=function(e){var t=a.firstIndex(this.panelItems,function(t){return t.panel===e});if(-1!==t){this.splitview.removeView(t);this.panelItems.splice(t,1)[0].disposable.dispose()}},e.prototype.movePanel=function(e,t){var n=a.firstIndex(this.panelItems,function(t){return t.panel===e}),i=a.firstIndex(this.panelItems,function(e){return e.panel===t});if(-1!==n&&-1!==i){var r=this.panelItems.splice(n,1)[0];this.panelItems.splice(i,0,r),this.splitview.moveView(n,i)}},e.prototype.resizePanel=function(e,t){var n=a.firstIndex(this.panelItems,function(t){return t.panel===e})
;-1!==n&&this.splitview.resizeView(n,t)},e.prototype.getPanelSize=function(e){var t=a.firstIndex(this.panelItems,function(t){return t.panel===e});return-1===t?-1:this.splitview.getViewSize(t)},e.prototype.layout=function(e){this.splitview.layout(e)},e.prototype.setupAnimation=function(){var e=this;"number"==typeof this.animationTimer&&window.clearTimeout(this.animationTimer),s.addClass(this.el,"animated"),this.animationTimer=window.setTimeout(function(){e.animationTimer=null,s.removeClass(e.el,"animated")},200)},e.prototype.dispose=function(){this.panelItems.forEach(function(e){return e.disposable.dispose()}),this.splitview.dispose()},e}();t.PanelView=p}),define(e[1131],t([13]),{}),define(e[1132],t([13]),{}),define(e[1134],t([13]),{}),define(e[1142],t([13]),{}),define(e[1152],t([13]),{}),define(e[1155],t([13]),{}),define(e[1156],t([13]),{}),define(e[1159],t([13]),{}),define(e[1166],t([13]),{}),define(e[1174],t([13]),{}),define(e[1176],t([13]),{}),define(e[1181],t([13]),{}),define(e[1187],t([13]),{}),
define(e[1188],t([13]),{}),define(e[1189],t([13]),{}),define(e[1190],t([13]),{}),define(e[1192],t([13]),{}),define(e[1195],t([13]),{}),define(e[1200],t([13]),{}),define(e[1203],t([13]),{}),define(e[1206],t([13]),{}),define(e[1211],t([13]),{}),define(e[1214],t([13]),{}),define(e[1215],t([13]),{}),define(e[1218],t([13]),{}),define(e[1223],t([13]),{}),define(e[1226],t([13]),{}),define(e[1245],t([13]),{}),define(e[1246],t([13]),{}),define(e[1367],t([13]),{}),define(e[1380],t([13]),{}),define(e[601],t([13]),{}),define(e[800],t([13]),{}),define(e[443],t([13]),{}),define(e[804],t([13]),{}),define(e[805],t([13]),{}),define(e[806],t([13]),{}),define(e[807],t([13]),{}),define(e[808],t([13]),{}),define(e[809],t([13]),{}),define(e[810],t([13]),{}),define(e[812],t([13]),{}),define(e[813],t([13]),{}),define(e[814],t([13]),{}),define(e[816],t([13]),{}),define(e[817],t([13]),{}),define(e[818],t([13]),{}),define(e[820],t([13]),{}),define(e[821],t([13]),{}),define(e[822],t([13]),{}),define(e[823],t([13]),{}),
define(e[824],t([13]),{}),define(e[828],t([13]),{}),define(e[829],t([13]),{}),define(e[830],t([13]),{}),define(e[831],t([13]),{}),define(e[833],t([13]),{}),define(e[835],t([13]),{}),define(e[839],t([13]),{}),define(e[844],t([13]),{}),define(e[845],t([13]),{}),define(e[449],t([13]),{}),define(e[849],t([13]),{}),define(e[850],t([13]),{}),define(e[851],t([13]),{}),define(e[460],t([13]),{}),define(e[323],t([13]),{}),define(e[857],t([13]),{}),define(e[858],t([13]),{}),define(e[859],t([13]),{}),define(e[861],t([13]),{}),define(e[862],t([13]),{}),define(e[469],t([13]),{}),define(e[864],t([13]),{}),define(e[866],t([13]),{}),define(e[867],t([13]),{}),define(e[870],t([13]),{}),define(e[871],t([13]),{}),define(e[872],t([13]),{}),define(e[874],t([13]),{}),define(e[875],t([13]),{}),define(e[877],t([13]),{}),define(e[878],t([13]),{}),define(e[881],t([13]),{}),define(e[883],t([13]),{}),define(e[886],t([13]),{}),define(e[887],t([13]),{}),define(e[888],t([13]),{}),define(e[890],t([13]),{}),define(e[891],t([13]),{}),
define(e[892],t([13]),{}),define(e[893],t([13]),{}),define(e[894],t([13]),{}),define(e[895],t([13]),{}),define(e[896],t([13]),{}),define(e[897],t([13]),{}),define(e[898],t([13]),{}),define(e[899],t([13]),{}),define(e[900],t([13]),{}),define(e[901],t([13]),{}),define(e[902],t([13]),{}),define(e[905],t([13]),{}),define(e[907],t([13]),{}),define(e[910],t([13]),{}),define(e[911],t([13]),{}),define(e[470],t([13]),{}),define(e[914],t([13]),{}),define(e[915],t([13]),{}),define(e[916],t([13]),{}),define(e[921],t([13]),{}),define(e[922],t([13]),{}),define(e[925],t([13]),{}),define(e[926],t([13]),{}),define(e[927],t([13]),{}),define(e[932],t([13]),{}),define(e[935],t([13]),{}),define(e[936],t([13]),{}),define(e[938],t([13]),{}),define(e[941],t([13]),{}),define(e[943],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Regular=0]="Regular",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold"}(t.CharWidthRequestType||(t.CharWidthRequestType={}));var n=function(){function e(e,t){
this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}();t.CharWidthRequest=n;var i=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.fontFamily,
i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);var r=document.createElement("div");r.style.fontFamily=this._bareFontInfo.fontFamily,r.style.fontWeight=this._bareFontInfo.fontWeight,r.style.fontSize=this._bareFontInfo.fontSize+"px",r.style.lineHeight=this._bareFontInfo.lineHeight+"px",r.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",r.style.fontStyle="italic",t.appendChild(r);for(var o=[],s=0,a=this._requests.length;s<a;s++){var c=this._requests[s],l=void 0;0===c.type&&(l=n),2===c.type&&(l=i),1===c.type&&(l=r),l.appendChild(document.createElement("br"));var u=document.createElement("span");e._render(u,c),l.appendChild(u),o[s]=u}this._container=t,this._testElements=o},e._render=function(e,t){if(" "===t.chr){for(var n="&nbsp;",i=0;i<8;i++)n+=n;e.innerHTML=n}else{for(var r=t.chr,i=0;i<8;i++)r+=r;e.textContent=r}},
e.prototype._readFromDomElements=function(){for(var e=0,t=this._requests.length;e<t;e++){var n=this._requests[e],i=this._testElements[e];n.fulfill(i.offsetWidth/256)}},e}();t.readCharWidths=function(e,t){new i(e,t).read()}}),define(e[945],t([1,0,5]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){var i=e.call(this)||this;return i.referenceDomElement=t,i.changeCallback=n,i.measureReferenceDomElementToken=-1,i.width=-1,i.height=-1,i.measureReferenceDomElement(!1),i}return n(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval(function(){return e.measureReferenceDomElement(!0)},100))},t.prototype.stopObserving=function(){
-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype.measureReferenceDomElement=function(e,t){var n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())},t}(i.Disposable);t.ElementSizeObserver=r}),define(e[203],t([1,0,14]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Value=1]="Value",e[e.Selection=2]="Selection",e[e.Position=4]="Position",e[e.Scroll=8]="Scroll"}(t.CodeEditorStateFlag||(t.CodeEditorStateFlag={}));var i=function(){function e(e,t){if(this.flags=t,0!=(1&this.flags)){var i=e.getModel();this.modelVersionId=i?n.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}
0!=(4&this.flags)&&(this.position=e.getPosition()),0!=(2&this.flags)&&(this.selection=e.getSelection()),0!=(8&this.flags)&&(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop())}return e.prototype._equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.modelVersionId===n.modelVersionId&&(this.scrollLeft===n.scrollLeft&&this.scrollTop===n.scrollTop&&(!(!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position))&&!(!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))},e}();t.EditorState=i;var r=function(){function e(e,t){this._visiblePosition=e,this._visiblePositionScrollDelta=t}return e.capture=function(t){var n=null,i=0;if(0!==t.getScrollTop()){var r=t.getVisibleRanges();if(r.length>0){n=r[0].getStartPosition();var o=t.getTopForPosition(n.lineNumber,n.column)
;i=t.getScrollTop()-o}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}();t.StableEditorScrollState=r}),define(e[321],t([1,0,5,82,8,215]),function(e,t,i,r,o,s){"use strict";function a(e){var t=o.getDomNodePagePosition(e);return new u(t.left,t.top,t.width,t.height)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new l(this.x-o.StandardWindow.scrollX,this.y-o.StandardWindow.scrollY)},e}();t.PageCoordinates=c;var l=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new c(this.clientX+o.StandardWindow.scrollX,this.clientY+o.StandardWindow.scrollY)},e}();t.ClientCoordinates=l;var u=function(){return function(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}}()
;t.EditorPagePosition=u,t.createEditorPagePosition=a;var d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.pos=new c(i.posx,i.posy),i.editorPos=a(n),i}return n(t,e),t}(r.StandardMouseEvent);t.EditorMouseEvent=d;var h=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new d(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var n=this;return o.addDisposableListener(e,"contextmenu",function(e){t(n._create(e))})},e.prototype.onMouseUp=function(e,t){var n=this;return o.addDisposableListener(e,"mouseup",function(e){t(n._create(e))})},e.prototype.onMouseDown=function(e,t){var n=this;return o.addDisposableListener(e,"mousedown",function(e){t(n._create(e))})},e.prototype.onMouseLeave=function(e,t){var n=this;return o.addDisposableNonBubblingMouseOutListener(e,function(e){t(n._create(e))})},e.prototype.onMouseMoveThrottled=function(e,t,n,i){var r=this;return o.addDisposableThrottledListener(e,"mousemove",t,function(e,t){
return n(e,r._create(t))},i)},e}();t.EditorMouseEventFactory=h;var p=function(e){function t(t){var n=e.call(this)||this;return n._editorViewDomNode=t,n._globalMouseMoveMonitor=n._register(new s.GlobalMouseMoveMonitor),n._keydownListener=null,n}return n(t,e),t.prototype.startMonitoring=function(e,t,n){var i=this;this._keydownListener=o.addStandardDisposableListener(document,"keydown",function(e){e.toKeybinding().isModifierKey()||i._globalMouseMoveMonitor.stopMonitoring(!0)},!0);this._globalMouseMoveMonitor.startMonitoring(function(t,n){return e(t,new d(n,i._editorViewDomNode))},t,function(){i._keydownListener.dispose(),n()})},t}(i.Disposable);t.GlobalEditorMouseMoveMonitor=p}),define(e[949],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._transientWatchers={},this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._onCodeEditorAdd=new n.Emitter,this._onCodeEditorRemove=new n.Emitter,
this._onDiffEditorAdd=new n.Emitter,this._onDiffEditorRemove=new n.Emitter}return e.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorAdd",{get:function(){return this._onCodeEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeCodeEditor=function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorRemove",{get:function(){return this._onCodeEditorRemove.event},enumerable:!0,configurable:!0}),e.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map(function(t){return e._codeEditors[t]})},e.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onDiffEditorAdd",{get:function(){return this._onDiffEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeDiffEditor=function(e){
delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},Object.defineProperty(e.prototype,"onDiffEditorRemove",{get:function(){return this._onDiffEditorRemove.event},enumerable:!0,configurable:!0}),e.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map(function(t){return e._diffEditors[t]})},e.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0;n<t.length;n++){var i=t[n];if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e},e.prototype.setTransientModelProperty=function(e,t,n){var i,o=e.uri.toString();this._transientWatchers.hasOwnProperty(o)?i=this._transientWatchers[o]:(i=new r(o,e,this),this._transientWatchers[o]=i),i.set(t,n)},e.prototype.getTransientModelProperty=function(e,t){var n=e.uri.toString();if(this._transientWatchers.hasOwnProperty(n))return this._transientWatchers[n].get(t)},e.prototype._removeWatcher=function(e){delete this._transientWatchers[e.uri]},e}();t.AbstractCodeEditorService=i
;var r=function(){function e(e,t,n){var i=this;this.uri=e,this._values={},t.onWillDispose(function(){return n._removeWatcher(i)})}return e.prototype.set=function(e,t){this._values[e]=t},e.prototype.get=function(e){return this._values[e]},e}();t.ModelTransientSettingWatcher=r}),define(e[273],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorZoom=new(function(){function e(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.setZoomLevel=function(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))},e}())}),define(e[171],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",
e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(t.CursorChangeReason||(t.CursorChangeReason={}))}),define(e[39],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column},e.prototype.isBeforeOrEqual=function(t){return e.isBeforeOrEqual(this,t)},e.isBeforeOrEqual=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column},e.compare=function(e,t){var n=0|e.lineNumber,i=0|t.lineNumber;if(n===i){return(0|e.column)-(0|t.column)}return n-i},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){
return"("+this.lineNumber+","+this.column+")"},e.lift=function(t){return new e(t.lineNumber,t.column)},e.isIPosition=function(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column},e}();t.Position=n}),define(e[19],t([1,0,39]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))},
e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,r,o,s;return n.startLineNumber<t.startLineNumber?(i=n.startLineNumber,r=n.startColumn):n.startLineNumber===t.startLineNumber?(i=n.startLineNumber,r=Math.min(n.startColumn,t.startColumn)):(i=t.startLineNumber,r=t.startColumn),n.endLineNumber>t.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(i,r,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){
var i=t.startLineNumber,r=t.startColumn,o=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,c=n.startColumn,l=n.endLineNumber,u=n.endColumn;return i<a?(i=a,r=c):i===a&&(r=Math.max(r,c)),o>l?(o=l,s=u):o===l&&(s=Math.min(s,u)),i>o?null:i===o&&r>s?null:new e(i,r,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){
return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)},e.areIntersecting=function(e,t){
return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)},e.compareRangesUsingStarts=function(e,t){var n=0|e.startLineNumber,i=0|t.startLineNumber;if(n===i){var r=0|e.startColumn,o=0|t.startColumn;if(r===o){var s=0|e.endLineNumber,a=0|t.endLineNumber;if(s===a){return(0|e.endColumn)-(0|t.endColumn)}return s-a}return r-o}return n-i},e.compareRangesUsingEnds=function(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber},e.spansMultipleLines=function(e){return e.endLineNumber>e.startLineNumber},e}();t.Range=i}),define(e[496],t([1,0,170,24,19,5,7]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={followsCaret:!0,ignoreCharChanges:!0,
alwaysRevealFirst:!0},c=function(){function e(e,t){void 0===t&&(t={});var n=this;this._onDidUpdate=new s.Emitter,this.onDidUpdate=this._onDidUpdate.event,this._editor=e,this._options=i.mixin(t,a,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this._options.alwaysRevealFirst,this._disposables.push(this._editor.onDidDispose(function(){return n.dispose()})),this._disposables.push(this._editor.onDidUpdateDiff(function(){return n._onDiffUpdated()})),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition(function(e){n.ignoreSelectionChange||(n.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel(function(e){n.revealFirst=!0})),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),
this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach(function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){t.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):t.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}),this._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0,r=this.ranges.length;i<r&&!t;i++){var o=this.ranges[i].range;n.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=i+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),
this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)},e.prototype._move=function(e,t){if(n.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),this.canNavigate()){-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var r=i.range.getStartPosition();this._editor.setPosition(r),this._editor.revealPositionInCenter(r,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){o.dispose(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}();t.DiffNavigator=c}),define(e[105],t([1,0,19]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.insert=function(e,t){return{range:new n.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}();t.EditOperation=i}),define(e[380],t([1,0,14,105,19]),function(e,t,n,i,r){"use strict";function o(e,t){t.sort(function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber});for(var o=t.length-2;o>=0;o--)t[o].lineNumber===t[o+1].lineNumber&&t.splice(o,1);for(var s=[],a=0,c=0,l=t.length,u=1,d=e.getLineCount();u<=d;u++){var h=e.getLineContent(u),p=h.length+1,f=0;if(!(c<l&&t[c].lineNumber===u&&(f=t[c].column,c++,f===p))&&0!==h.length){var g=n.lastNonWhitespaceIndex(h),v=0;if(-1===g)v=1;else{if(g===h.length-1)continue;v=g+2}v=Math.max(f,v),s[a++]=i.EditOperation.delete(new r.Range(u,v,u,p))}}return s}
Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){this.selection=e,this.cursors=t}return e.prototype.getEditOperations=function(e,t){for(var n=o(e,this.cursors),i=0,r=n.length;i<r;i++){var s=n[i];t.addEditOperation(s.range,s.text)}this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e}();t.TrimTrailingWhitespaceCommand=s,t.trimTrailingWhitespace=o}),define(e[966],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,i,r){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(r)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e}();t.RGBA8=n}),define(e[60],t([1,0,19,39]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(o=t.SelectionDirection||(t.SelectionDirection={}));var s=function(e){function t(t,n,i,r){
var o=e.call(this,t,n,i,r)||this;return o.selectionStartLineNumber=t,o.selectionStartColumn=n,o.positionLineNumber=i,o.positionColumn=r,o}return n(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?o.LTR:o.RTL},t.prototype.setEndPosition=function(e,n){
return this.getDirection()===o.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new r.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===o.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0},t.isISelection=function(e){
return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn},t.createWithDirection=function(e,n,i,r,s){return s===o.LTR?new t(e,n,i,r):new t(i,r,e,n)},t}(i.Range);t.Selection=s}),define(e[214],t([1,0,60]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations()[0].range;return new n.Selection(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)},e}();t.ReplaceCommand=i;var r=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},
e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations()[0].range;return new n.Selection(i.startLineNumber,i.startColumn,i.startLineNumber,i.startColumn)},e}();t.ReplaceCommandWithoutChangingPosition=r;var o=function(){function e(e,t,n,i,r){void 0===r&&(r=!1),this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=r}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations()[0].range;return new n.Selection(i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset,i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset)},e}();t.ReplaceCommandWithOffsetCursorState=o;var s=function(){function e(e,t,n){this._range=e,this._text=t,this._initialSelection=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text),
this._selectionId=t.trackSelection(this._initialSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e}();t.ReplaceCommandThatPreservesSelection=s}),define(e[971],t([1,0,19,60]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(new n.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),r=n[0].range,o=n[1].range;return new i.Selection(r.endLineNumber,r.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}()
;t.SurroundSelectionCommand=r}),define(e[317],t([1,0,14]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),"undefined"!=typeof TextDecoder?t.createStringBuilder=function(e){return new i(e)}:t.createStringBuilder=function(e){return new r};var i=function(){function e(e){this._decoder=new TextDecoder("UTF-16LE"),this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}return e.prototype.reset=function(){this._completedStrings=null,this._bufferLength=0},e.prototype.build=function(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()},e.prototype._buildBuffer=function(){if(0===this._bufferLength)return"";var e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return this._decoder.decode(e)},e.prototype._flushBuffer=function(){var e=this._buildBuffer();this._bufferLength=0,
null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e},e.prototype.write1=function(e){var t=this._capacity-this._bufferLength;t<=1&&(0===t||n.isHighSurrogate(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCII=function(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCIIString=function(e){var t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n<t;n++)this._buffer[this._bufferLength++]=e.charCodeAt(n)},e}(),r=function(){function e(){this._pieces=[],this._piecesLen=0}return e.prototype.reset=function(){this._pieces=[],this._piecesLen=0},e.prototype.build=function(){return this._pieces.join("")},e.prototype.write1=function(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)},e.prototype.appendASCII=function(e){
this._pieces[this._piecesLen++]=String.fromCharCode(e)},e.prototype.appendASCIIString=function(e){this._pieces[this._piecesLen++]=e},e}()}),define(e[316],t([1,0,85,317]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._createLine=e,this._set(1,[])}return e.prototype.flush=function(){this._set(1,[])},e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1},e.prototype.getCount=function(){return this._lines.length},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null
;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(t<n){var r=t-e+1;return this._rendLineNumberStart-=r,null}if(e>i)return null;for(var o=0,s=0,a=n;a<=i;a++){var c=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(o=c,s=1):s++)}if(e<n){var l=0;l=t<n?t-e+1:n-e,this._rendLineNumberStart-=l}return this._lines.splice(o,s)},e.prototype.onLinesChanged=function(e,t){if(0===this.getCount())return!1;for(var n=this.getStartLineNumber(),i=this.getEndLineNumber(),r=!1,o=e;o<=t;o++)o>=n&&o<=i&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),r=!0);return r},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r){return this._lines.splice(e-this._rendLineNumberStart,r-e+1)}for(var o=[],s=0;s<n;s++)o[s]=this._createLine()
;var a=e-this._rendLineNumberStart,c=this._lines.slice(0,a),l=this._lines.slice(a,this._lines.length-n),u=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=c.concat(o).concat(l),u},e.prototype.onTokensChanged=function(e){if(0===this.getCount())return!1;for(var t=this.getStartLineNumber(),n=this.getEndLineNumber(),i=!1,r=0,o=e.length;r<o;r++){var s=e[r];if(!(s.toLineNumber<t||s.fromLineNumber>n))for(var a=Math.max(t,s.fromLineNumber),c=Math.min(n,s.toLineNumber),l=a;l<=c;l++){var u=l-this._rendLineNumberStart;this._lines[u].onTokensChanged(),i=!0}}return i},e}();t.RenderedLinesCollection=r;var o=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new r(function(){return t._host.createVisibleLine()})}return e.prototype._createDomNode=function(){var e=n.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),
e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var r=t[n].getDomNode();r&&this.domNode.domNode.removeChild(r)}return!0},e.prototype.onLinesInserted=function(e){var t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var r=t[n].getDomNode();r&&this.domNode.domNode.removeChild(r)}return!0},e.prototype.onScrollChanged=function(e){return e.scrollTopChanged},e.prototype.onTokensChanged=function(e){return this._linesCollection.onTokensChanged(e.ranges)},e.prototype.onZonesChanged=function(e){return!0},e.prototype.getStartLineNumber=function(){
return this._linesCollection.getStartLineNumber()},e.prototype.getEndLineNumber=function(){return this._linesCollection.getEndLineNumber()},e.prototype.getVisibleLine=function(e){return this._linesCollection.getLine(e)},e.prototype.renderLines=function(e){var t=this._linesCollection._get(),n=new s(this.domNode.domNode,this._host,e),i={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},r=n.render(i,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(r.rendLineNumberStart,r.lines)},e}();t.VisibleLinesCollection=o;var s=function(){function e(e,t,n){this.domNode=e,this.host=t,this.viewportData=n}return e.prototype.render=function(e,t,n,i){var r={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(r.rendLineNumberStart+r.linesLength-1<t||n<r.rendLineNumberStart){r.rendLineNumberStart=t,r.linesLength=n-t+1,r.lines=[];for(var o=t;o<=n;o++)r.lines[o-t]=this.host.createVisibleLine()
;return this._finishRendering(r,!0,i),r}if(this._renderUntouchedLines(r,Math.max(t-r.rendLineNumberStart,0),Math.min(n-r.rendLineNumberStart,r.linesLength-1),i,t),r.rendLineNumberStart>t){(s=t)<=(a=Math.min(n,r.rendLineNumberStart-1))&&(this._insertLinesBefore(r,s,a,i,t),r.linesLength+=a-s+1)}else if(r.rendLineNumberStart<t){(c=Math.min(r.linesLength,t-r.rendLineNumberStart))>0&&(this._removeLinesBefore(r,c),r.linesLength-=c)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1<n){(s=r.rendLineNumberStart+r.linesLength)<=(a=n)&&(this._insertLinesAfter(r,s,a,i,t),r.linesLength+=a-s+1)}else if(r.rendLineNumberStart+r.linesLength-1>n){var s=Math.max(0,n-r.rendLineNumberStart+1),a=r.linesLength-1,c=a-s+1;c>0&&(this._removeLinesAfter(r,c),r.linesLength-=c)}return this._finishRendering(r,!1,i),r},e.prototype._renderUntouchedLines=function(e,t,n,i,r){for(var o=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var c=o+a;s[a].layoutLine(c,i[c-r])}},e.prototype._insertLinesBefore=function(e,t,n,i,r){
for(var o=[],s=0,a=t;a<=n;a++)o[s++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n<t;n++){var i=e.lines[n].getDomNode();i&&this.domNode.removeChild(i)}e.lines.splice(0,t)},e.prototype._insertLinesAfter=function(e,t,n,i,r){for(var o=[],s=0,a=t;a<=n;a++)o[s++]=this.host.createVisibleLine();e.lines=e.lines.concat(o)},e.prototype._removeLinesAfter=function(e,t){for(var n=e.linesLength-t,i=0;i<t;i++){var r=e.lines[n+i].getDomNode();r&&this.domNode.removeChild(r)}e.lines.splice(n,t)},e.prototype._finishRenderingNewLines=function(e,t,n,i){var r=this.domNode.lastChild;t||!r?this.domNode.innerHTML=n:r.insertAdjacentHTML("afterend",n);for(var o=this.domNode.lastChild,s=e.linesLength-1;s>=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(o),o=o.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var r=0;r<e.linesLength;r++){var o=e.lines[r];if(n[r]){
var s=i.firstChild,a=o.getDomNode();a.parentNode.replaceChild(s,a),o.setDomNode(s)}}},e.prototype._finishRendering=function(t,n,i){var r=e._sb,o=t.linesLength,s=t.lines,a=t.rendLineNumberStart,c=[];r.reset();for(var l=!1,u=0;u<o;u++){p=s[u];c[u]=!1;if(!p.getDomNode()){(f=p.renderLine(u+a,i[u],this.viewportData,r))&&(c[u]=!0,l=!0)}}l&&this._finishRenderingNewLines(t,n,r.build(),c),r.reset();for(var d=!1,h=[],u=0;u<o;u++){var p=s[u];if(h[u]=!1,!c[u]){var f=p.renderLine(u+a,i[u],this.viewportData,r);f&&(h[u]=!0,d=!0)}}d&&this._finishRenderingInvalidLines(t,r.build(),h)},e._sb=i.createStringBuilder(1e5),e}()}),define(e[311],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}();t.Token=n;var i=function(){return function(e,t){this.tokens=e,this.endState=t}}();t.TokenizationResult=i;var r=function(){return function(e,t){
this.tokens=e,this.endState=t}}();t.TokenizationResult2=r}),define(e[269],t([1,0]),function(e,t){"use strict";function n(e){return e<0?0:e>4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),r=0,o=e*t;r<o;r++)i[r]=n;this._data=i,this.rows=e,this.cols=t}return e.prototype.get=function(e,t){return this._data[e*this.cols+t]},e.prototype.set=function(e,t,n){this._data[e*this.cols+t]=n},e}();t.Uint8Matrix=i;!function(e){e[e.MAX_SAFE_SMALL_INTEGER=1073741824]="MAX_SAFE_SMALL_INTEGER",e[e.MIN_SAFE_SMALL_INTEGER=-1073741824]="MIN_SAFE_SMALL_INTEGER",e[e.MAX_UINT_8=255]="MAX_UINT_8",e[e.MAX_UINT_16=65535]="MAX_UINT_16",e[e.MAX_UINT_32=4294967295]="MAX_UINT_32"}(t.Constants||(t.Constants={})),t.toUint8=function(e){return e<0?0:e>255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,i=new Uint32Array(t),r=0;r<t;r++)i[r]=n(e[r]);return i}}),define(e[241],t([1,0,269]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){var i=n.toUint8(t);this._defaultValue=i,this._asciiMap=e._createAsciiMap(i),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},e.prototype.set=function(e,t){var i=n.toUint8(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=i;var r;!function(e){e[e.False=0]="False",e[e.True=1]="True"}(r||(r={}));var o=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=o}),define(e[239],t([1,0,241]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Regular=0]="Regular",e[e.Whitespace=1]="Whitespace",e[e.WordSeparator=2]="WordSeparator"
}(t.WordCharacterClass||(t.WordCharacterClass={}));var r=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,r=t.length;i<r;i++)n.set(t.charCodeAt(i),2);return n.set(32,1),n.set(9,1),n}return n(t,e),t}(i.CharacterClassifier);t.WordCharacterClassifier=r,t.getMapForWordSeparators=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e(n)),t[n]}}(function(e){return new r(e)})}),define(e[1e3],t([1,0,373,14]),function(e,t,n,i){"use strict";function r(e,t,i,r){return new n.LcsDiff(e,t,i).ComputeDiff(r)}Object.defineProperty(t,"__esModule",{value:!0});var o=5e3,s=3,a=function(){function e(t){for(var n=[],i=[],r=0,o=t.length;r<o;r++)n[r]=e._getFirstNonBlankColumn(t[r],1),i[r]=e._getLastNonBlankColumn(t[r],1);this._lines=t,this._startColumns=n,this._endColumns=i}return e.prototype.getLength=function(){return this._lines.length},e.prototype.getElementAtIndex=function(e){return this._lines[e].substring(this._startColumns[e]-1,this._endColumns[e]-1)},
e.prototype.getStartLineNumber=function(e){return e+1},e.prototype.getStartColumn=function(e){return this._startColumns[e]},e.prototype.getEndLineNumber=function(e){return e+1},e.prototype.getEndColumn=function(e){return this._endColumns[e]},e._getFirstNonBlankColumn=function(e,t){var n=i.firstNonWhitespaceIndex(e);return-1===n?t:n+1},e._getLastNonBlankColumn=function(e,t){var n=i.lastNonWhitespaceIndex(e);return-1===n?t:n+2},e.prototype.getCharSequence=function(e,t,n){for(var i=[],r=[],o=[],s=0,a=t;a<=n;a++)for(var l=this._lines[a],u=e?this._startColumns[a]:1,d=e?this._endColumns[a]:l.length+1,h=u;h<d;h++)i[s]=l.charCodeAt(h-1),r[s]=a+1,o[s]=h,s++;return new c(i,r,o)},e}(),c=function(){function e(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}return e.prototype.getLength=function(){return this._charCodes.length},e.prototype.getElementAtIndex=function(e){return this._charCodes[e]},e.prototype.getStartLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getStartColumn=function(e){
return this._columns[e]},e.prototype.getEndLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getEndColumn=function(e){return this._columns[e]+1},e}(),l=function(){function e(e,t,n,i,r,o,s,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=o,this.modifiedEndLineNumber=s,this.modifiedEndColumn=a}return e.createFromDiffChange=function(t,n,i){var r,o,s,a,c,l,u,d;return 0===t.originalLength?(r=0,o=0,s=0,a=0):(r=n.getStartLineNumber(t.originalStart),o=n.getStartColumn(t.originalStart),s=n.getEndLineNumber(t.originalStart+t.originalLength-1),a=n.getEndColumn(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=0,l=0,u=0,d=0):(c=i.getStartLineNumber(t.modifiedStart),l=i.getStartColumn(t.modifiedStart),u=i.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),d=i.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new e(r,o,s,a,c,l,u,d)},e}(),u=function(){function e(e,t,n,i,r){
this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=r}return e.createFromDiffResult=function(t,n,i,o,a,c,u){var d,h,p,f,g;if(0===n.originalLength?(d=i.getStartLineNumber(n.originalStart)-1,h=0):(d=i.getStartLineNumber(n.originalStart),h=i.getEndLineNumber(n.originalStart+n.originalLength-1)),0===n.modifiedLength?(p=o.getStartLineNumber(n.modifiedStart)-1,f=0):(p=o.getStartLineNumber(n.modifiedStart),f=o.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),c&&0!==n.originalLength&&0!==n.modifiedLength&&a()){var v=i.getCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),m=o.getCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),y=r(v,m,a,!0);u&&(y=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],i=1,r=e.length;i<r;i++){var o=e[i],a=o.originalStart-(n.originalStart+n.originalLength),c=o.modifiedStart-(n.modifiedStart+n.modifiedLength)
;Math.min(a,c)<s?(n.originalLength=o.originalStart+o.originalLength-n.originalStart,n.modifiedLength=o.modifiedStart+o.modifiedLength-n.modifiedStart):(t.push(o),n=o)}return t}(y)),g=[];for(var b=0,S=y.length;b<S;b++)g.push(l.createFromDiffChange(y[b],v,m))}return new e(d,h,p,f,g)},e}(),d=function(){function e(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.maximumRunTimeMs=o,this.originalLines=e,this.modifiedLines=t,this.original=new a(e),this.modified=new a(t)}return e.prototype.computeDiff=function(){if(1===this.original.getLength()&&0===this.original.getElementAtIndex(0).length)return[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.getLength(),charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,
originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}];if(1===this.modified.getLength()&&0===this.modified.getElementAtIndex(0).length)return[{originalStartLineNumber:1,originalEndLineNumber:this.original.getLength(),modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}];this.computationStartTime=(new Date).getTime();var e=r(this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldMakePrettyDiff);if(this.shouldIgnoreTrimWhitespace){for(var t=[],n=0,i=e.length;n<i;n++)t.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e[n],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return t}for(var o=[],s=0,c=0,n=-1,l=e.length;n<l;n++){
for(var d=n+1<l?e[n+1]:null,h=d?d.originalStart:this.originalLines.length,p=d?d.modifiedStart:this.modifiedLines.length;s<h&&c<p;){var f=this.originalLines[s],g=this.modifiedLines[c];if(f!==g){for(var v=a._getFirstNonBlankColumn(f,1),m=a._getFirstNonBlankColumn(g,1);v>1&&m>1;){if((C=f.charCodeAt(v-2))!==(E=g.charCodeAt(m-2)))break;v--,m--}(v>1||m>1)&&this._pushTrimWhitespaceCharChange(o,s+1,1,v,c+1,1,m);for(var y=a._getLastNonBlankColumn(f,1),b=a._getLastNonBlankColumn(g,1),S=f.length+1,_=g.length+1;y<S&&b<_;){var C=f.charCodeAt(y-1),E=f.charCodeAt(b-1);if(C!==E)break;y++,b++}(y<S||b<_)&&this._pushTrimWhitespaceCharChange(o,s+1,y,S,c+1,b,_)}s++,c++}d&&(o.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace,d,this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=d.originalLength,c+=d.modifiedLength)}return o},e.prototype._pushTrimWhitespaceCharChange=function(e,t,n,i,r,o,s){
if(!this._mergeTrimWhitespaceCharChange(e,t,n,i,r,o,s)){var a;this.shouldComputeCharChanges&&(a=[new l(t,n,t,i,r,o,r,s)]),e.push(new u(t,t,r,r,a))}},e.prototype._mergeTrimWhitespaceCharChange=function(e,t,n,i,r,o,s){var a=e.length;if(0===a)return!1;var c=e[a-1];return 0!==c.originalEndLineNumber&&0!==c.modifiedEndLineNumber&&(c.originalEndLineNumber+1===t&&c.modifiedEndLineNumber+1===r&&(c.originalEndLineNumber=t,c.modifiedEndLineNumber=r,this.shouldComputeCharChanges&&c.charChanges.push(new l(t,n,t,i,r,o,r,s)),!0))},e.prototype._continueProcessingPredicate=function(){if(0===this.maximumRunTimeMs)return!0;return(new Date).getTime()-this.computationStartTime<this.maximumRunTimeMs},e}();t.DiffComputer=d}),define(e[1008],t([1,0,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,i,r,o){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=r,this._contextKeyService=o}return e.prototype.isSupported=function(){
return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){if(!this.isSupported())return n.TPromise.as(void 0);var e=this._run();return e||n.TPromise.as(void 0)},e}();t.InternalEditorAction=i}),define(e[186],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(t.ScrollType||(t.ScrollType={})),t.isThemeColor=function(e){return e&&"string"==typeof e.id},t.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},t.Handler={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Cut:"cut",Undo:"undo",Redo:"redo"}}),define(e[45],t([1,0,186]),function(e,t,n){"use strict";function i(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.EditorType.ICodeEditor}function r(e){
return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.EditorType.IDiffEditor}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(t.ContentWidgetPositionPreference||(t.ContentWidgetPositionPreference={}));!function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(t.OverlayWidgetPositionPreference||(t.OverlayWidgetPositionPreference={}));!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",
e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(t.MouseTargetType||(t.MouseTargetType={})),t.isCodeEditor=i,t.isDiffEditor=r,t.getCodeEditor=function(e){return i(e)?e:r(e)?e.getModifiedEditor():null}}),define(e[57],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(t.OverviewRulerLane||(t.OverviewRulerLane={}));!function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.EndOfLinePreference||(t.EndOfLinePreference={}));!function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.DefaultEndOfLine||(t.DefaultEndOfLine={}));!function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(t.EndOfLineSequence||(t.EndOfLineSequence={}));var n=function(){function e(e){this.tabSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}return e.prototype.equals=function(e){
return this.tabSize===e.tabSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}},e}();t.TextModelResolvedOptions=n;var i=function(){return function(e,t){this.range=e,this.matches=t}}();t.FindMatch=i;!function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(t.TrackedRangeStickiness||(t.TrackedRangeStickiness={}));var r=function(){return function(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}();t.ApplyEditsResult=r}),define(e[421],t([1,0,19,39,57,14]),function(e,t,n,i,r,o){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n,i,r){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=r}return e.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){var t=this.value.substring(this.selectionEnd,e)
;return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,r=-1;-1!==(r=t.indexOf("\n",r+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n,i){if(!e)return{text:"",replaceCharCnt:0};var r=e.value,s=e.selectionStart,a=e.selectionEnd,c=t.value,l=t.selectionStart,u=t.selectionEnd;i&&r.length>0&&s===a&&l===u&&o.endsWith(c,r)&&(s=0,a=0);var d=r.substring(a),h=c.substring(u),p=o.commonSuffixLength(d,h);c=c.substring(0,c.length-p);var f=(r=r.substring(0,r.length-p)).substring(0,s),g=c.substring(0,l),v=o.commonPrefixLength(f,g);if(c=c.substring(v),r=r.substring(v),l-=v,s-=v,u-=v,
a-=v,n&&l===u&&r.length>0){var m=null;if(l===c.length?o.startsWith(c,r)&&(m=c.substring(r.length)):o.endsWith(c,r)&&(m=c.substring(0,c.length-r.length)),null!==m&&m.length>0&&(/\uFE0F/.test(m)||o.containsEmoji(m)))return{text:m,replaceCharCnt:0}}if(l===u){if(r===c&&0===s&&a===r.length&&l===c.length&&-1===c.indexOf("\n")&&o.containsFullWidthCharacter(c))return{text:"",replaceCharCnt:0};return{text:c,replaceCharCnt:f.length-v}}return{text:c,replaceCharCnt:a-s}},e.EMPTY=new e("",0,0,null,null),e}();t.TextAreaState=s;var a=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var i=t*e._LINES_PER_PAGE,r=i+1,o=i+e._LINES_PER_PAGE;return new n.Range(r,1,o+1,1)},e.fromEditorSelection=function(t,o,a,c){
var l=e._getPageOfLine(a.startLineNumber),u=e._getRangeForPage(l),d=e._getPageOfLine(a.endLineNumber),h=e._getRangeForPage(d),p=u.intersectRanges(new n.Range(1,1,a.startLineNumber,a.startColumn)),f=o.getValueInRange(p,r.EndOfLinePreference.LF),g=o.getLineCount(),v=o.getLineMaxColumn(g),m=h.intersectRanges(new n.Range(a.endLineNumber,a.endColumn,g,v)),y=o.getValueInRange(m,r.EndOfLinePreference.LF),b=null;if(l===d||l+1===d)b=o.getValueInRange(a,r.EndOfLinePreference.LF);else{var S=u.intersectRanges(a),_=h.intersectRanges(a);b=o.getValueInRange(S,r.EndOfLinePreference.LF)+String.fromCharCode(8230)+o.getValueInRange(_,r.EndOfLinePreference.LF)}if(c){f.length>500&&(f=f.substring(f.length-500,f.length)),y.length>500&&(y=y.substring(0,500)),b.length>1e3&&(b=b.substring(0,500)+String.fromCharCode(8230)+b.substring(b.length-500,b.length))}return new s(f+b+y,f.length,f.length+b.length,new i.Position(a.startLineNumber,a.startColumn),new i.Position(a.endLineNumber,a.endColumn))},e._LINES_PER_PAGE=10,e}()
;t.PagedScreenReaderStrategy=a}),define(e[423],t([1,0,18,60,14,7,5,421,78,11,8]),function(e,t,i,r,o,s,a,c,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyOptions={forceCopyWithSyntaxHighlighting:!1};var h;!function(e){e[e.Type=0]="Type",e[e.Paste=1]="Paste"}(h||(h={}));var p;!function(e){e[e.none=0]="none",e[e.compositionstart=1]="compositionstart",e[e.compositionupdate=2]="compositionupdate",e[e.compositionend=3]="compositionend",e[e.input=4]="input",e[e.cut=5]="cut",e[e.copy=6]="copy",e[e.paste=7]="paste",e[e.focus=8]="focus",e[e.blur=9]="blur"}(p||(p={}));var f=function(e){function a(t,n){var a=e.call(this)||this;a._onFocus=a._register(new s.Emitter),a.onFocus=a._onFocus.event,a._onBlur=a._register(new s.Emitter),a.onBlur=a._onBlur.event,a._onKeyDown=a._register(new s.Emitter),a.onKeyDown=a._onKeyDown.event,a._onKeyUp=a._register(new s.Emitter),a.onKeyUp=a._onKeyUp.event,a._onCut=a._register(new s.Emitter),a.onCut=a._onCut.event,a._onPaste=a._register(new s.Emitter),
a.onPaste=a._onPaste.event,a._onType=a._register(new s.Emitter),a.onType=a._onType.event,a._onCompositionStart=a._register(new s.Emitter),a.onCompositionStart=a._onCompositionStart.event,a._onCompositionUpdate=a._register(new s.Emitter),a.onCompositionUpdate=a._onCompositionUpdate.event,a._onCompositionEnd=a._register(new s.Emitter),a.onCompositionEnd=a._onCompositionEnd.event,a._onSelectionChangeRequest=a._register(new s.Emitter),a.onSelectionChangeRequest=a._onSelectionChangeRequest.event,a._host=t,a._textArea=a._register(new v(n)),a._lastTextAreaEvent=0,a._asyncTriggerCut=a._register(new i.RunOnceScheduler(function(){return a._onCut.fire()},0)),a._textAreaState=c.TextAreaState.EMPTY,a.writeScreenReaderContent("ctor"),a._hasFocus=!1,a._isDoingComposition=!1,a._nextCommand=0,a._register(d.addStandardDisposableListener(n.domNode,"keydown",function(e){!a._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),a._onKeyDown.fire(e)})),
a._register(d.addStandardDisposableListener(n.domNode,"keyup",function(e){a._onKeyUp.fire(e)})),a._register(d.addDisposableListener(n.domNode,"compositionstart",function(e){a._lastTextAreaEvent=1,a._isDoingComposition||(a._isDoingComposition=!0,l.isEdgeOrIE||a._setAndWriteTextAreaState("compositionstart",c.TextAreaState.EMPTY),a._onCompositionStart.fire())}));var h=function(e,t){var n=a._textAreaState,i=c.TextAreaState.readFromTextArea(a._textArea);return[i,c.TextAreaState.deduceInput(n,i,e,t)]},p=function(e){var t=a._textAreaState,n=c.TextAreaState.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},f=function(e){return!(!l.isEdgeOrIE||"ja"!==e)||!(!l.isIE||0!==e.indexOf("zh-Han"))};a._register(d.addDisposableListener(n.domNode,"compositionupdate",function(e){if(a._lastTextAreaEvent=2,f(e.locale)){var t=h(!1,!1),n=t[0],i=t[1];return a._textAreaState=n,a._onType.fire(i),void a._onCompositionUpdate.fire(e)}var r=p(e.data),o=r[0],s=r[1];a._textAreaState=o,a._onType.fire(s),
a._onCompositionUpdate.fire(e)})),a._register(d.addDisposableListener(n.domNode,"compositionend",function(e){if(a._lastTextAreaEvent=3,f(e.locale)){var t=h(!1,!1),n=t[0],i=t[1];a._textAreaState=n,a._onType.fire(i)}else{var r=p(e.data),n=r[0],i=r[1];a._textAreaState=n,a._onType.fire(i)}(l.isEdgeOrIE||l.isChrome)&&(a._textAreaState=c.TextAreaState.readFromTextArea(a._textArea)),a._isDoingComposition&&(a._isDoingComposition=!1,a._onCompositionEnd.fire())})),a._register(d.addDisposableListener(n.domNode,"input",function(){var e=8===a._lastTextAreaEvent;if(a._lastTextAreaEvent=4,a._textArea.setIgnoreSelectionChangeTime("received input event"),!a._isDoingComposition){var t=h(u.isMacintosh,e&&u.isMacintosh),n=t[0],i=t[1];0===i.replaceCharCnt&&1===i.text.length&&o.isHighSurrogate(i.text.charCodeAt(0))||(a._textAreaState=n,0===a._nextCommand?""!==i.text&&a._onType.fire(i):(""!==i.text&&a._onPaste.fire({text:i.text}),a._nextCommand=0))}})),a._register(d.addDisposableListener(n.domNode,"cut",function(e){
a._lastTextAreaEvent=5,a._textArea.setIgnoreSelectionChangeTime("received cut event"),a._ensureClipboardGetsEditorSelection(e),a._asyncTriggerCut.schedule()})),a._register(d.addDisposableListener(n.domNode,"copy",function(e){a._lastTextAreaEvent=6,a._ensureClipboardGetsEditorSelection(e)})),a._register(d.addDisposableListener(n.domNode,"paste",function(e){if(a._lastTextAreaEvent=7,a._textArea.setIgnoreSelectionChangeTime("received paste event"),g.canUseTextData(e)){var t=g.getTextData(e);""!==t&&a._onPaste.fire({text:t})}else a._textArea.getSelectionStart()!==a._textArea.getSelectionEnd()&&a._setAndWriteTextAreaState("paste",c.TextAreaState.EMPTY),a._nextCommand=1})),a._register(d.addDisposableListener(n.domNode,"focus",function(){a._lastTextAreaEvent=8,a._setHasFocus(!0)})),a._register(d.addDisposableListener(n.domNode,"blur",function(){a._lastTextAreaEvent=9,a._setHasFocus(!1)}));var m=0;return a._register(d.addDisposableListener(document,"selectionchange",function(e){
if(a._hasFocus&&!a._isDoingComposition&&l.isChrome&&u.isWindows){var t=Date.now(),n=t-m;if(m=t,!(n<5)){var i=t-a._textArea.getIgnoreSelectionChangeTime();if(a._textArea.resetSelectionChangeTime(),!(i<100)&&a._textAreaState.selectionStartPosition&&a._textAreaState.selectionEndPosition){var o=a._textArea.getValue();if(a._textAreaState.value===o){var s=a._textArea.getSelectionStart(),c=a._textArea.getSelectionEnd();if(a._textAreaState.selectionStart!==s||a._textAreaState.selectionEnd!==c){var d=a._textAreaState.deduceEditorPosition(s),h=a._host.deduceModelPosition(d[0],d[1],d[2]),p=a._textAreaState.deduceEditorPosition(c),f=a._host.deduceModelPosition(p[0],p[1],p[2]),g=new r.Selection(h.lineNumber,h.column,f.lineNumber,f.column);a._onSelectionChangeRequest.fire(g)}}}}}})),a}return n(a,e),a.prototype.dispose=function(){e.prototype.dispose.call(this)},a.prototype.focusTextArea=function(){this._setHasFocus(!0)},a.prototype.isFocused=function(){return this._hasFocus},a.prototype._setHasFocus=function(e){
this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(l.isEdge?this._setAndWriteTextAreaState("focusgain",c.TextAreaState.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},a.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},a.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},a.prototype._ensureClipboardGetsEditorSelection=function(e){var n=this._host.getPlainTextToCopy();if(g.canUseTextData(e)){var i=null;l.hasClipboardSupport()&&(n.length<65536||t.CopyOptions.forceCopyWithSyntaxHighlighting)&&(i=this._host.getHTMLToCopy()),g.setTextData(e,n,i)}else this._setAndWriteTextAreaState("copy or cut",c.TextAreaState.selectedText(n))},a}(a.Disposable);t.TextAreaInput=f;var g=function(){function e(){}
return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),v=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return n(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},
t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,r=document.activeElement===i,o=i.selectionStart,s=i.selectionEnd;if(r&&o===t&&s===n)l.isFirefox&&window.parent!==window&&i.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(l.isFirefox&&window.parent!==window&&i.focus());try{var a=d.saveParentsScrollTop(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),d.restoreParentsScrollTop(i,a)}catch(e){}}},t}(a.Disposable)}),
define(e[1022],t([1,0,9,57]),function(e,t,n,i){"use strict";function r(e){return"\n"===e.getEOL()?i.EndOfLineSequence.LF:i.EndOfLineSequence.CRLF}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t<this.editOperations.length;t++)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e}(),s=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=null,this.afterCursorState=null,this.afterVersionId=-1,this.eol=t}return e.prototype.undo=function(e){var t=r(e);e.setEOL(this.eol),this.eol=t},e.prototype.redo=function(e){var t=r(e);e.setEOL(this.eol),this.eol=t},e}(),a=function(){function e(e){this.model=e,
this.currentOpenStackElement=null,this.past=[],this.future=[]}return e.prototype.pushStackElement=function(){null!==this.currentOpenStackElement&&(this.past.push(this.currentOpenStackElement),this.currentOpenStackElement=null)},e.prototype.clear=function(){this.currentOpenStackElement=null,this.past=[],this.future=[]},e.prototype.pushEOL=function(e){this.future=[],this.currentOpenStackElement&&this.pushStackElement();var t=r(this.model),n=new s(this.model.getAlternativeVersionId(),t);this.model.setEOL(e),n.afterVersionId=this.model.getVersionId(),this.currentOpenStackElement=n,this.pushStackElement()},e.prototype.pushEditOperation=function(t,n,i){this.future=[];var r=null;this.currentOpenStackElement&&(this.currentOpenStackElement instanceof o?r=this.currentOpenStackElement:this.pushStackElement()),this.currentOpenStackElement||(r=new o(this.model.getAlternativeVersionId(),t),this.currentOpenStackElement=r);var s={operations:this.model.applyEdits(n)};return r.editOperations.push(s),
r.afterCursorState=e._computeCursorState(i,s.operations),r.afterVersionId=this.model.getVersionId(),r.afterCursorState},e._computeCursorState=function(e,t){try{return e?e(t):null}catch(e){return n.onUnexpectedError(e),null}},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return n.onUnexpectedError(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return n.onUnexpectedError(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e}();t.EditStack=a}),define(e[1026],t([1,0]),function(e,t){"use strict";function n(e,t,n,i){var r;for(r=0;r<t&&r<i;r++){if((c=e.charCodeAt(r))!==(d=n.charCodeAt(r)))break}for(var o=0,s=0,a=r;a<t;a++){var c=e.charCodeAt(a);32===c?o++:s++}
for(var l=0,u=0,a=r;a<i;a++){var d=n.charCodeAt(a);32===d?l++:u++}if(o>0&&s>0)return 0;if(l>0&&u>0)return 0;var h=Math.abs(s-u),p=Math.abs(o-l);return 0===h?p:p%h==0?p/h:0}Object.defineProperty(t,"__esModule",{value:!0}),t.guessIndentation=function(e,t,i){for(var r=Math.min(e.getLineCount(),1e4),o=0,s=0,a="",c=0,l=[0,0,0,0,0,0,0,0,0],u=1;u<=r;u++){for(var d=e.getLineLength(u),h=e.getLineContent(u),p=d<=65536,f=!1,g=0,v=0,m=0,y=0,b=d;y<b;y++){var S=p?h.charCodeAt(y):e.getLineCharCode(u,y);if(9===S)m++;else{if(32!==S){f=!0,g=y;break}v++}}if(f){m>0?o++:v>1&&s++;var _=n(a,c,h,g);_<=8&&l[_]++,a=h,c=g}}var C=i;o!==s&&(C=o<s);var E=t,w=C?0:.1*r;return[2,4,6,8].forEach(function(e){var t=l[e];t>w&&(w=t,E=e)}),{insertSpaces:C,tabSize:E}}}),define(e[370],t([1,0]),function(e,t){"use strict";function n(e){return(1&e.metadata)>>>0}function i(e,t){e.metadata=254&e.metadata|t<<0}function r(e){return(2&e.metadata)>>>1==1}function o(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function s(e){return(4&e.metadata)>>>2==1}
function a(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function c(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function l(e,t){e.metadata=207&e.metadata|t<<4}function u(e,t,n,i){return e<n||!(e>n)&&(1!==i&&(2===i||t))}function d(e,t,n,i,r){var o=function(e){return(48&e.metadata)>>>4}(e),s=0===o||2===o,a=1===o||2===o,c=n-t,l=i,d=Math.min(c,l),h=e.start,p=!1,f=e.end,g=!1,v=r?1:c>0?2:0;if(!p&&u(h,s,t,v)&&(p=!0),!g&&u(f,a,t,v)&&(g=!0),d>0&&!r){v=c>l?2:0;!p&&u(h,s,t+d,v)&&(p=!0),!g&&u(f,a,t+d,v)&&(g=!0)}v=r?1:0;!p&&u(h,s,n,v)&&(e.start=t+l,p=!0),!g&&u(f,a,n,v)&&(e.end=t+l,g=!0);var m=l-c;p||(e.start=Math.max(0,h+m),p=!0),g||(e.end=Math.max(0,f+m),g=!0),e.start>e.end&&(e.end=e.start)}function h(e,n,i,a){for(var c=e.root,l=0,u=0,d=0,h=[],p=0;c!==t.SENTINEL;)if(r(c))o(c.left,!1),o(c.right,!1),c===c.parent.right&&(l-=c.parent.delta),c=c.parent;else if(c.left===t.SENTINEL||r(c.left)){u=l+c.start,d=l+c.end,c.setCachedOffsets(u,d,a);var f=!0;n&&c.ownerId&&c.ownerId!==n&&(f=!1),i&&s(c)&&(f=!1),f&&(h[p++]=c),o(c,!0),
c.right===t.SENTINEL||r(c.right)||(l+=c.delta,c=c.right)}else c=c.left;return o(e.root,!1),h}function p(e,r){if(e.root===t.SENTINEL)return r.parent=t.SENTINEL,r.left=t.SENTINEL,r.right=t.SENTINEL,i(r,0),e.root=r,e.root;!function(e,n){var r=0,o=e.root,s=n.start,a=n.end;for(;;){if(_(s,a,o.start+r,o.end+r)<0){if(o.left===t.SENTINEL){n.start-=r,n.end-=r,n.maxEnd-=r,o.left=n;break}o=o.left}else{if(o.right===t.SENTINEL){n.start-=r+o.delta,n.end-=r+o.delta,n.maxEnd-=r+o.delta,o.right=n;break}r+=o.delta,o=o.right}}n.parent=o,n.left=t.SENTINEL,n.right=t.SENTINEL,i(n,1)}(e,r),S(r.parent);for(var o=r;o!==e.root&&1===n(o.parent);)if(o.parent===o.parent.parent.left){1===n(s=o.parent.parent.right)?(i(o.parent,0),i(s,0),i(o.parent.parent,1),o=o.parent.parent):(o===o.parent.right&&v(e,o=o.parent),i(o.parent,0),i(o.parent.parent,1),m(e,o.parent.parent))}else{var s=o.parent.parent.left;1===n(s)?(i(o.parent,0),i(s,0),i(o.parent.parent,1),o=o.parent.parent):(o===o.parent.left&&m(e,o=o.parent),i(o.parent,0),i(o.parent.parent,1),
v(e,o.parent.parent))}return i(e.root,0),r}function f(e,r){var o,s;if(r.left===t.SENTINEL?(s=r,(o=r.right).delta+=r.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),o.start+=r.delta,o.end+=r.delta):r.right===t.SENTINEL?(o=r.left,s=r):((o=(s=function(e){for(;e.left!==t.SENTINEL;)e=e.left;return e}(r.right)).right).start+=s.delta,o.end+=s.delta,o.delta+=s.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),s.start+=r.delta,s.end+=r.delta,s.delta=r.delta,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0)),s===e.root)return e.root=o,i(o,0),r.detach(),g(),b(o),void(e.root.parent=t.SENTINEL);var a=1===n(s);if(s===s.parent.left?s.parent.left=o:s.parent.right=o,s===r?o.parent=s.parent:(s.parent===r?o.parent=s:o.parent=s.parent,s.left=r.left,s.right=r.right,s.parent=r.parent,i(s,n(r)),r===e.root?e.root=s:r===r.parent.left?r.parent.left=s:r.parent.right=s,s.left!==t.SENTINEL&&(s.left.parent=s),s.right!==t.SENTINEL&&(s.right.parent=s)),
r.detach(),a)return S(o.parent),s!==r&&(S(s),S(s.parent)),void g();S(o),S(o.parent),s!==r&&(S(s),S(s.parent));for(var c;o!==e.root&&0===n(o);)o===o.parent.left?(1===n(c=o.parent.right)&&(i(c,0),i(o.parent,1),v(e,o.parent),c=o.parent.right),0===n(c.left)&&0===n(c.right)?(i(c,1),o=o.parent):(0===n(c.right)&&(i(c.left,0),i(c,1),m(e,c),c=o.parent.right),i(c,n(o.parent)),i(o.parent,0),i(c.right,0),v(e,o.parent),o=e.root)):(1===n(c=o.parent.left)&&(i(c,0),i(o.parent,1),m(e,o.parent),c=o.parent.left),0===n(c.left)&&0===n(c.right)?(i(c,1),o=o.parent):(0===n(c.left)&&(i(c.right,0),i(c,1),v(e,c),c=o.parent.left),i(c,n(o.parent)),i(o.parent,0),i(c.left,0),m(e,o.parent),o=e.root));i(o,0),g()}function g(){t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.delta=0,t.SENTINEL.start=0,t.SENTINEL.end=0}function v(e,n){var i=n.right;i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=n.delta,i.end+=n.delta,n.right=i.left,i.left!==t.SENTINEL&&(i.left.parent=n),i.parent=n.parent,
n.parent===t.SENTINEL?e.root=i:n===n.parent.left?n.parent.left=i:n.parent.right=i,i.left=n,n.parent=i,b(n),b(i)}function m(e,n){var i=n.left;n.delta-=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start-=i.delta,n.end-=i.delta,n.left=i.right,i.right!==t.SENTINEL&&(i.right.parent=n),i.parent=n.parent,n.parent===t.SENTINEL?e.root=i:n===n.parent.right?n.parent.right=i:n.parent.left=i,i.right=n,n.parent=i,b(n),b(i)}function y(e){var n=e.end;if(e.left!==t.SENTINEL){var i=e.left.maxEnd;i>n&&(n=i)}if(e.right!==t.SENTINEL){var r=e.right.maxEnd+e.delta;r>n&&(n=r)}return n}function b(e){e.maxEnd=y(e)}function S(e){for(;e!==t.SENTINEL;){var n=y(e);if(e.maxEnd===n)return;e.maxEnd=n,e=e.parent}}function _(e,t,n,i){return e===n?t-i:e-n}Object.defineProperty(t,"__esModule",{value:!0}),t.ClassName={EditorHintDecoration:"squiggly-hint",EditorInfoDecoration:"squiggly-info",EditorWarningDecoration:"squiggly-warning",EditorErrorDecoration:"squiggly-error",
EditorUnnecessaryDecoration:"squiggly-unnecessary",EditorUnnecessaryInlineDecoration:"squiggly-inline-unnecessary"};var C;!function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(C||(C={}));!function(e){e[e.Black=0]="Black",e[e.Red=1]="Red"}(t.NodeColor||(t.NodeColor={}));var E;!function(e){e[e.ColorMask=1]="ColorMask",e[e.ColorMaskInverse=254]="ColorMaskInverse",e[e.ColorOffset=0]="ColorOffset",e[e.IsVisitedMask=2]="IsVisitedMask",e[e.IsVisitedMaskInverse=253]="IsVisitedMaskInverse",e[e.IsVisitedOffset=1]="IsVisitedOffset",e[e.IsForValidationMask=4]="IsForValidationMask",e[e.IsForValidationMaskInverse=251]="IsForValidationMaskInverse",e[e.IsForValidationOffset=2]="IsForValidationOffset",e[e.IsInOverviewRulerMask=8]="IsInOverviewRulerMask",
e[e.IsInOverviewRulerMaskInverse=247]="IsInOverviewRulerMaskInverse",e[e.IsInOverviewRulerOffset=3]="IsInOverviewRulerOffset",e[e.StickinessMask=48]="StickinessMask",e[e.StickinessMaskInverse=207]="StickinessMaskInverse",e[e.StickinessOffset=4]="StickinessOffset",e[e.MIN_SAFE_DELTA=-1073741824]="MIN_SAFE_DELTA",e[e.MAX_SAFE_DELTA=1073741824]="MAX_SAFE_DELTA"}(E||(E={})),t.getNodeColor=n,t.getNodeIsInOverviewRuler=function(e){return(8&e.metadata)>>>3==1},t.setNodeStickiness=function(e,t){l(e,t)};var w=function(){function e(e,t,n){this.metadata=0,this.parent=null,this.left=null,this.right=null,i(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,a(this,!1),l(this,1),c(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,o(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},
e.prototype.setOptions=function(e){this.options=e;var n=this.options.className;a(this,n===t.ClassName.EditorErrorDecoration||n===t.ClassName.EditorWarningDecoration||n===t.ClassName.EditorInfoDecoration),l(this,this.options.stickiness),c(this,!!this.options.overviewRuler.color)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}();t.IntervalNode=w,t.SENTINEL=new w(null,0,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,i(t.SENTINEL,0);var I=function(){function e(){this.root=t.SENTINEL,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,n,i,a,c){return this.root===t.SENTINEL?[]:function(e,n,i,a,c,l){for(var u=e.root,d=0,h=0,p=0,f=[],g=0;u!==t.SENTINEL;)if(r(u))o(u.left,!1),o(u.right,!1),u===u.parent.right&&(d-=u.parent.delta),u=u.parent;else{if(!r(u.left)){
if(d+u.maxEnd<n){o(u,!0);continue}if(u.left!==t.SENTINEL){u=u.left;continue}}if((h=d+u.start)>i)o(u,!0);else{if((p=d+u.end)>=n){u.setCachedOffsets(h,p,l);var v=!0;a&&u.ownerId&&u.ownerId!==a&&(v=!1),c&&s(u)&&(v=!1),v&&(f[g++]=u)}o(u,!0),u.right===t.SENTINEL||r(u.right)||(d+=u.delta,u=u.right)}}return o(e.root,!1),f}(this,e,n,i,a,c)},e.prototype.search=function(e,n,i){return this.root===t.SENTINEL?[]:h(this,e,n,i)},e.prototype.collectNodesFromOwner=function(e){return function(e,n){for(var i=e.root,s=[],a=0;i!==t.SENTINEL;)r(i)?(o(i.left,!1),o(i.right,!1),i=i.parent):i.left===t.SENTINEL||r(i.left)?(i.ownerId===n&&(s[a++]=i),o(i,!0),i.right===t.SENTINEL||r(i.right)||(i=i.right)):i=i.left;return o(e.root,!1),s}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){for(var n=e.root,i=[],s=0;n!==t.SENTINEL;)r(n)?(o(n.left,!1),o(n.right,!1),n=n.parent):n.left===t.SENTINEL||r(n.left)?n.right===t.SENTINEL||r(n.right)?(i[s++]=n,o(n,!0)):n=n.right:n=n.left;return o(e.root,!1),i}(this)},
e.prototype.insert=function(e){p(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){f(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var r=n.start+i,o=n.end+i;n.setCachedOffsets(r,o,t)},e.prototype.acceptReplace=function(e,n,i,s){for(var a=function(e,n,i){for(var s=e.root,a=0,c=0,l=0,u=[],d=0;s!==t.SENTINEL;)if(r(s))o(s.left,!1),o(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!r(s.left)){if(a+s.maxEnd<n){o(s,!0);continue}if(s.left!==t.SENTINEL){s=s.left;continue}}(c=a+s.start)>i?o(s,!0):((l=a+s.end)>=n&&(s.setCachedOffsets(c,l,0),u[d++]=s),o(s,!0),s.right===t.SENTINEL||r(s.right)||(a+=s.delta,s=s.right))}return o(e.root,!1),u}(this,e,e+n),c=0,l=a.length;c<l;c++){f(this,u=a[c])}this._normalizeDeltaIfNecessary(),function(e,n,i,s){for(var a=e.root,c=0,l=s-(i-n);a!==t.SENTINEL;)if(r(a))o(a.left,!1),o(a.right,!1),a===a.parent.right&&(c-=a.parent.delta),
b(a),a=a.parent;else{if(!r(a.left)){if(c+a.maxEnd<n){o(a,!0);continue}if(a.left!==t.SENTINEL){a=a.left;continue}}c+a.start>i?(a.start+=l,a.end+=l,a.delta+=l,(a.delta<-1073741824||a.delta>1073741824)&&(e.requestNormalizeDelta=!0),o(a,!0)):(o(a,!0),a.right===t.SENTINEL||r(a.right)||(c+=a.delta,a=a.right))}o(e.root,!1)}(this,e,e+n,i),this._normalizeDeltaIfNecessary();for(var c=0,l=a.length;c<l;c++){var u=a[c];u.start=u.cachedAbsoluteStart,u.end=u.cachedAbsoluteEnd,d(u,e,e+n,i,s),u.maxEnd=u.end,p(this,u)}this._normalizeDeltaIfNecessary()},e.prototype.getAllInOrder=function(){return h(this,0,!1,0)},e.prototype._normalizeDeltaIfNecessary=function(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){for(var n=e.root,i=0;n!==t.SENTINEL;)n.left===t.SENTINEL||r(n.left)?n.right===t.SENTINEL||r(n.right)?(n.start=i+n.start,n.end=i+n.end,n.delta=0,b(n),o(n,!0),o(n.left,!1),o(n.right,!1),n===n.parent.right&&(i-=n.parent.delta),n=n.parent):(i+=n.delta,n=n.right):n=n.left;o(e.root,!1)}(this))},e}()
;t.IntervalTree=I;var T;!function(e){e[e.MarkerDefined=0]="MarkerDefined",e[e.ForceMove=1]="ForceMove",e[e.ForceStay=2]="ForceStay"}(T||(T={})),t.nodeAcceptEdit=d,t.recomputeMaxEnd=b,t.intervalCompare=_}),define(e[1028],t([1,0]),function(e,t){"use strict";function n(e){for(;e.left!==t.SENTINEL;)e=e.left;return e}function i(e){for(;e.right!==t.SENTINEL;)e=e.right;return e}function r(e){return e===t.SENTINEL?0:e.size_left+e.piece.length+r(e.right)}function o(e){return e===t.SENTINEL?0:e.lf_left+e.piece.lineFeedCnt+o(e.right)}function s(){t.SENTINEL.parent=t.SENTINEL}function a(e,n){var i=n.right;i.size_left+=n.size_left+(n.piece?n.piece.length:0),i.lf_left+=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),n.right=i.left,i.left!==t.SENTINEL&&(i.left.parent=n),i.parent=n.parent,n.parent===t.SENTINEL?e.root=i:n.parent.left===n?n.parent.left=i:n.parent.right=i,i.left=n,n.parent=i}function c(e,n){var i=n.left;n.left=i.right,i.right!==t.SENTINEL&&(i.right.parent=n),i.parent=n.parent,
n.size_left-=i.size_left+(i.piece?i.piece.length:0),n.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),n.parent===t.SENTINEL?e.root=i:n===n.parent.right?n.parent.right=i:n.parent.left=i,i.right=n,n.parent=i}function l(e,n,i,r){for(;n!==e.root&&n!==t.SENTINEL;)n.parent.left===n&&(n.parent.size_left+=i,n.parent.lf_left+=r),n=n.parent}function u(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=r((t=t.parent).left)-t.size_left,i=o(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=null,this.left=null,this.right=null}return e.prototype.next=function(){if(this.right!==t.SENTINEL)return n(this.right);for(var e=this;e.parent!==t.SENTINEL&&e.parent.left!==e;)e=e.parent
;return e.parent===t.SENTINEL?t.SENTINEL:e.parent},e.prototype.prev=function(){if(this.left!==t.SENTINEL)return i(this.left);for(var e=this;e.parent!==t.SENTINEL&&e.parent.right!==e;)e=e.parent;return e.parent===t.SENTINEL?t.SENTINEL:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}();t.TreeNode=d;!function(e){e[e.Black=0]="Black",e[e.Red=1]="Red"}(t.NodeColor||(t.NodeColor={})),t.SENTINEL=new d(null,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,t.SENTINEL.color=0,t.leftest=n,t.righttest=i,t.calculateSize=r,t.calculateLF=o,t.resetSentinel=s,t.leftRotate=a,t.rightRotate=c,t.rbDelete=function(e,i){var d,h;if(d=i.left===t.SENTINEL?(h=i).right:i.right===t.SENTINEL?(h=i).left:(h=n(i.right)).right,h===e.root)return e.root=d,d.color=0,i.detach(),s(),void(e.root.parent=t.SENTINEL);var p=1===h.color;if(h===h.parent.left?h.parent.left=d:h.parent.right=d,h===i?(d.parent=h.parent,u(e,d)):(h.parent===i?d.parent=h:d.parent=h.parent,u(e,d),
h.left=i.left,h.right=i.right,h.parent=i.parent,h.color=i.color,i===e.root?e.root=h:i===i.parent.left?i.parent.left=h:i.parent.right=h,h.left!==t.SENTINEL&&(h.left.parent=h),h.right!==t.SENTINEL&&(h.right.parent=h),h.size_left=i.size_left,h.lf_left=i.lf_left,u(e,h)),i.detach(),d.parent.left===d){var f=r(d),g=o(d);if(f!==d.parent.size_left||g!==d.parent.lf_left){var v=f-d.parent.size_left,m=g-d.parent.lf_left;d.parent.size_left=f,d.parent.lf_left=g,l(e,d.parent,v,m)}}if(u(e,d.parent),p)s();else{for(var y;d!==e.root&&0===d.color;)d===d.parent.left?(1===(y=d.parent.right).color&&(y.color=0,d.parent.color=1,a(e,d.parent),y=d.parent.right),0===y.left.color&&0===y.right.color?(y.color=1,d=d.parent):(0===y.right.color&&(y.left.color=0,y.color=1,c(e,y),y=d.parent.right),y.color=d.parent.color,d.parent.color=0,y.right.color=0,a(e,d.parent),d=e.root)):(1===(y=d.parent.left).color&&(y.color=0,d.parent.color=1,c(e,d.parent),y=d.parent.left),0===y.left.color&&0===y.right.color?(y.color=1,
d=d.parent):(0===y.left.color&&(y.right.color=0,y.color=1,a(e,y),y=d.parent.left),y.color=d.parent.color,d.parent.color=0,y.left.color=0,c(e,d.parent),d=e.root));d.color=0,s()}},t.fixInsert=function(e,t){for(u(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&a(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,c(e,t.parent.parent));else{var n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&c(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,a(e,t.parent.parent))}e.root.color=0},t.updateTreeMetadata=l,t.recomputeTreeMetadata=u}),define(e[1029],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Flush=1]="Flush",e[e.LineChanged=2]="LineChanged",e[e.LinesDeleted=3]="LinesDeleted",e[e.LinesInserted=4]="LinesInserted",
e[e.EOLChanged=5]="EOLChanged"}(t.RawContentChangedType||(t.RawContentChangedType={}));var n=function(){return function(){this.changeType=1}}();t.ModelRawFlush=n;var i=function(){return function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}();t.ModelRawLineChanged=i;var r=function(){return function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}();t.ModelRawLinesDeleted=r;var o=function(){return function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}();t.ModelRawLinesInserted=o;var s=function(){return function(){this.changeType=5}}();t.ModelRawEOLChanged=s;var a=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t<n;t++){if(this.changes[t].changeType===e)return!0}return!1},e.merge=function(t,n){return new e([].concat(t.changes).concat(n.changes),n.versionId,t.isUndoing||n.isUndoing,t.isRedoing||n.isRedoing)},e}()
;t.ModelRawContentChangedEvent=a;var c=function(){function e(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}return e.prototype.merge=function(t){return new e(a.merge(this.rawContentChangedEvent,t.rawContentChangedEvent),e._mergeChangeEvents(this.contentChangedEvent,t.contentChangedEvent))},e._mergeChangeEvents=function(e,t){return{changes:[].concat(e.changes).concat(t.changes),eol:t.eol,versionId:t.versionId,isUndoing:e.isUndoing||t.isUndoing,isRedoing:e.isRedoing||t.isRedoing,isFlush:e.isFlush||t.isFlush}},e}();t.InternalModelContentChangeEvent=c}),define(e[369],t([1,0,14,39,19,57,239]),function(e,t,n,i,r,o,s){"use strict";function a(e,t,n){if(!n)return new o.FindMatch(e,null);for(var i=[],r=0,s=t.length;r<s;r++)i[r]=t[r];return new o.FindMatch(e,i)}function c(e,t,n,i,r){return function(e,t,n,i,r){if(0===i)return!0;var o=t.charCodeAt(i-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(r>0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}(e,t,0,i,r)&&function(e,t,n,i,r){
if(i+r===n)return!0;var o=t.charCodeAt(i+r);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(r>0){var s=t.charCodeAt(i+r-1);if(0!==e.get(s))return!0}return!1}(e,t,n,i,r)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t<n;t++){if(92===e.charCodeAt(t)){if(++t>=n)break;var i=e.charCodeAt(t);if(110===i||114===i)return!0}}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var i=null;try{i=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0})}catch(e){return null}if(!i)return null;var r=!this.isRegex&&!t;return r&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(r=this.matchCase),
new u(i,this.wordSeparators?s.getMapForWordSeparators(this.wordSeparators):null,r?this.searchString:null)},e}();t.SearchParams=l;var u=function(){return function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}();t.SearchData=u,t.createFindMatch=a;var d=function(){function e(e){for(var t=[],n=0,i=0,r=e.length;i<r;i++)10===e.charCodeAt(i)&&(t[n++]=i);this._lineFeedsOffsets=t}return e.prototype.findLineFeedCountBeforeOffset=function(e){var t=this._lineFeedsOffsets,n=0,i=t.length-1;if(-1===i)return 0;if(e<=t[0])return 0;for(;n<i;){var r=n+((i-n)/2>>0);t[r]>=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1},e}(),h=function(){function e(){}return e.findMatches=function(e,t,n,i,r){var o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,n,new p(o.wordSeparators,o.regex),i,r):this._doFindMatchesLineByLine(e,n,o,i,r):[]},e._getMultilineMatchRange=function(e,t,n,i,o,s){var a,c=0;a="\r\n"===e.getEOL()?t+o+(c=i.findLineFeedCountBeforeOffset(o)):t+o;var l;if("\r\n"===e.getEOL()){
var u=i.findLineFeedCountBeforeOffset(o+s.length)-c;l=a+s.length+u}else l=a+s.length;var d=e.getPositionAt(a),h=e.getPositionAt(l);return new r.Range(d.lineNumber,d.column,h.lineNumber,h.column)},e._doFindMatchesMultiline=function(e,t,n,i,r){var s,c=e.getOffsetAt(t.getStartPosition()),l=e.getValueInRange(t,o.EndOfLinePreference.LF),u="\r\n"===e.getEOL()?new d(l):null,h=[],p=0;for(n.reset(0);s=n.next(l);)if(h[p++]=a(this._getMultilineMatchRange(e,c,l,u,s.index,s[0]),s,i),p>=r)return h;return h},e._doFindMatchesLineByLine=function(e,t,n,i,r){var o=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,o,i,r),o}var c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,s,o,i,r);for(var l=t.startLineNumber+1;l<t.endLineNumber&&s<r;l++)s=this._findMatchesInLine(n,e.getLineContent(l),l,0,s,o,i,r)
;if(s<r){var u=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(n,u,t.endLineNumber,0,s,o,i,r)}return o},e._findMatchesInLine=function(e,t,n,i,s,l,u,d){var h=e.wordSeparators;if(!u&&e.simpleSearch){for(var f=e.simpleSearch,g=f.length,v=t.length,m=-g;-1!==(m=t.indexOf(f,m+g));)if((!h||c(h,t,v,m,g))&&(l[s++]=new o.FindMatch(new r.Range(n,m+1+i,n,m+1+g+i),null),s>=d))return s;return s}var y,b=new p(e.wordSeparators,e.regex);b.reset(0);do{if((y=b.next(t))&&(l[s++]=a(new r.Range(n,y.index+1+i,n,y.index+1+y[0].length+i),y,u),s>=d))return s}while(y);return s},e.findNextMatch=function(e,t,n,i){var r=t.parseSearchRequest();if(!r)return null;var o=new p(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,o,i):this._doFindNextMatchLineByLine(e,n,o,i)},e._doFindNextMatchMultiline=function(e,t,n,s){
var c=new i.Position(t.lineNumber,1),l=e.getOffsetAt(c),u=e.getLineCount(),h=e.getValueInRange(new r.Range(c.lineNumber,c.column,u,e.getLineMaxColumn(u)),o.EndOfLinePreference.LF),p="\r\n"===e.getEOL()?new d(h):null;n.reset(t.column-1);var f=n.next(h);return f?a(this._getMultilineMatchRange(e,l,h,p,f.index,f[0]),f,s):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.Position(1,1),n,s):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var r=e.getLineCount(),o=t.lineNumber,s=e.getLineContent(o),a=this._findFirstMatchInLine(n,s,o,t.column,i);if(a)return a;for(var c=1;c<=r;c++){var l=(o+c-1)%r,u=e.getLineContent(l+1),d=this._findFirstMatchInLine(n,u,l+1,1,i);if(d)return d}return null},e._findFirstMatchInLine=function(e,t,n,i,o){e.reset(i-1);var s=e.next(t);return s?a(new r.Range(n,s.index+1,n,s.index+1+s[0].length),s,o):null},e.findPreviousMatch=function(e,t,n,i){var r=t.parseSearchRequest();if(!r)return null;var o=new p(r.wordSeparators,r.regex)
;return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,o,i):this._doFindPreviousMatchLineByLine(e,n,o,i)},e._doFindPreviousMatchMultiline=function(e,t,n,o){var s=this._doFindMatchesMultiline(e,new r.Range(1,1,t.lineNumber,t.column),n,o,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new i.Position(a,e.getLineMaxColumn(a)),n,o):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var r=e.getLineCount(),o=t.lineNumber,s=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,o,i);if(a)return a;for(var c=1;c<=r;c++){var l=(r+o-c-1)%r,u=e.getLineContent(l+1),d=this._findLastMatchInLine(n,u,l+1,i);if(d)return d}return null},e._findLastMatchInLine=function(e,t,n,i){var o,s=null;for(e.reset(0);o=e.next(t);)s=a(new r.Range(n,o.index+1,n,o.index+1+o[0].length),o,i);return s},e}();t.TextModelSearch=h,t.isValidMatch=c;var p=function(){function e(e,t){this._wordSeparators=e,
this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,r=t[0].length;if(i===this._prevMatchStartIndex&&r===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=r,!this._wordSeparators||c(this._wordSeparators,e,n,i,r))return t}while(t);return null},e}();t.Searcher=p}),define(e[432],t([1,0,39,19,1028,369,57]),function(e,t,n,i,r,o,s){"use strict";function a(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}function c(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,r=0,o=e.length;r<o;r++){var s=e.charCodeAt(r);13===s?r+1<o&&10===e.charCodeAt(r+1)?(n[i++]=r+2,r++):n[i++]=r+1:10===s&&(n[i++]=r+1)}return t?a(n):n}
Object.defineProperty(t,"__esModule",{value:!0}),t.AverageBufferSize=65535,t.createUintArray=a;var l=function(){return function(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}();t.LineStarts=l,t.createLineStartsFast=c,t.createLineStarts=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,r=0,o=0,s=!0,c=0,u=t.length;c<u;c++){var d=t.charCodeAt(c);13===d?c+1<u&&10===t.charCodeAt(c+1)?(o++,e[n++]=c+2,c++):(i++,e[n++]=c+1):10===d?(r++,e[n++]=c+1):s&&9!==d&&(d<32||d>126)&&(s=!1)}var h=new l(a(e),i,r,o,s);return e.length=0,h};var u=function(){return function(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}();t.Piece=u;var d=function(){return function(e,t){this.buffer=e,this.lineStarts=t}}();t.StringBuffer=d;var h=function(){function e(e,t){var n=this;this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==r.SENTINEL&&e.iterate(e.root,function(e){return e!==r.SENTINEL&&n._pieces.push(e.piece),!0})}return e.prototype.read=function(){
return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])},e}(),p=function(){function e(e){this._limit=e,this._cache=[]}return e.prototype.get=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<e&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=0;n<this._cache.length;n++){var i=this._cache[n];(null===i.node.parent||i.nodeStartOffset>=e)&&(this._cache[n]=null,t=!0)}if(t){
for(var r=[],n=0;n<this._cache.length;n++)null!==this._cache[n]&&r.push(this._cache[n]);this._cache=r}},e}(),f=function(){function e(e,t,n){this.create(e,t,n)}return e.prototype.create=function(e,t,n){this._buffers=[new d("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=r.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;for(var i=null,o=0,s=e.length;o<s;o++)if(e[o].buffer.length>0){e[o].lineStarts||(e[o].lineStarts=c(e[o].buffer));var a=new u(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,a)}this._searchCache=new p(1),this._lastVisitedLine={lineNumber:0,value:null},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var n=this,i=t.AverageBufferSize,r=i-Math.floor(i/3),o=2*r,s="",a=0,l=[];if(this.iterate(this.root,function(t){var i=n.getNodeContent(t),u=i.length
;if(a<=r||a+u<o)return s+=i,a+=u,!0;var h=s.replace(/\r\n|\r|\n/g,e);return l.push(new d(h,c(h))),s=i,a=u,!0}),a>0){var u=s.replace(/\r\n|\r|\n/g,e);l.push(new d(u,c(u)))}this.create(l,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.createSnapshot=function(e){return new h(this,e)},e.prototype.equal=function(e){var t=this;if(this.getLength()!==e.getLength())return!1;if(this.getLineCount()!==e.getLineCount())return!1;return this.iterate(this.root,function(n){if(n===r.SENTINEL)return!0;var i=t.getNodeContent(n),o=i.length,s=e.nodeAt(0),a=e.nodeAt(0+o);return i===e.getValueInRange2(s,a)})},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==r.SENTINEL;)if(i.left!==r.SENTINEL&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;return n+=this.getAccumulatedValue(i,e-i.lf_left-2)+t-1}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}
return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,i=0,o=e;t!==r.SENTINEL;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){c=o-(a=this.getOffsetAt(i+1,1));return new n.Position(i+1,c+1)}return new n.Position(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===r.SENTINEL){var a=this.getOffsetAt(i+1,1),c=o-e-a;return new n.Position(i+1,c+1)}t=t.right}return new n.Position(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){
var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var s=e.node,a=this._buffers[s.piece.bufferIndex].buffer,c=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start),l=a.substring(c+e.remainder,c+s.piece.length);for(s=s.next();s!==r.SENTINEL;){var u=this._buffers[s.piece.bufferIndex].buffer,d=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);if(s===t.node){l+=u.substring(d,d+t.remainder);break}l+=u.substr(d,s.piece.length),s=s.next()}return l},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,
e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var r=this._buffers[i.piece.bufferIndex],o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r.buffer.charCodeAt(o)}var r=this._buffers[n.node.piece.bufferIndex],s=(o=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start))+n.remainder;return r.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,r,s,a,c,l,u,d,h){
var p,f=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),v=this.offsetInBuffer(e.piece.bufferIndex,s),m=this.offsetInBuffer(e.piece.bufferIndex,a);t.reset(v);var y={line:0,column:0};do{if(p=t.next(f.buffer)){if(p.index>=m)return d;this.positionInBuffer(e,p.index-g,y);var b=this.getLineFeedCnt(e.piece.bufferIndex,s,y),S=y.line===s.line?y.column-s.column+r:y.column+1,_=S+p[0].length;if(h[d++]=o.createFindMatch(new i.Range(n+b,S,n+b,_),p,l),p.index+p[0].length>=m)return d;if(d>=u)return d}}while(p);return d},e.prototype.findMatchesLineByLine=function(e,t,n,i){var r=[],s=0,a=new o.Searcher(t.wordSeparators,t.regex),c=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===c)return[];var l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];var u=this.positionInBuffer(c.node,c.remainder),d=this.positionInBuffer(l.node,l.remainder);if(c.node===l.node)return this.findMatchesInNode(c.node,a,e.startLineNumber,e.startColumn,u,d,t,n,i,s,r),r
;for(var h=e.startLineNumber,p=c.node;p!==l.node;){var f=this.getLineFeedCnt(p.piece.bufferIndex,u,p.piece.end);if(f>=1){var g=this._buffers[p.piece.bufferIndex].lineStarts,v=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start),m=g[u.line+f],y=h===e.startLineNumber?e.startColumn:1;if((s=this.findMatchesInNode(p,a,h,y,u,this.positionInBuffer(p,m-v),t,n,i,s,r))>=i)return r;h+=f}var b=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){_=this.getLineContent(h).substring(b,e.endColumn-1);return s=this._findMatchesInLine(t,a,_,e.endLineNumber,b,s,r,n,i),r}if((s=this._findMatchesInLine(t,a,this.getLineContent(h).substr(b),h,b,s,r,n,i))>=i)return r;h++,p=(c=this.nodeAt2(h,1)).node,u=this.positionInBuffer(c.node,c.remainder)}if(h===e.endLineNumber){var S=h===e.startLineNumber?e.startColumn-1:0,_=this.getLineContent(h).substring(S,e.endColumn-1);return s=this._findMatchesInLine(t,a,_,e.endLineNumber,S,s,r,n,i),r}var C=h===e.startLineNumber?e.startColumn:1
;return s=this.findMatchesInNode(l.node,a,h,C,u,d,t,n,i,s,r),r},e.prototype._findMatchesInLine=function(e,t,n,r,a,c,l,u,d){var h=e.wordSeparators;if(!u&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=n.length,v=-f;-1!==(v=n.indexOf(p,v+f));)if((!h||o.isValidMatch(h,n,g,v,f))&&(l[c++]=new s.FindMatch(new i.Range(r,v+1+a,r,v+1+f+a),null),c>=d))return c;return c}var m;t.reset(0);do{if((m=t.next(n))&&(l[c++]=o.createFindMatch(new i.Range(r,m.index+1+a,r,m.index+1+m[0].length+a),m,u),c>=d))return c}while(m);return c},e.prototype.insert=function(e,n,i){if(void 0===i&&(i=!1),this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,this.root!==r.SENTINEL){var o=this.nodeAt(e),s=o.node,a=o.remainder,c=o.nodeStartOffset,l=s.piece,d=l.bufferIndex,h=this.positionInBuffer(s,a)
;if(0===s.piece.bufferIndex&&l.end.line===this._lastChangeBufferPos.line&&l.end.column===this._lastChangeBufferPos.column&&c+l.length===e&&n.length<t.AverageBufferSize)return this.appendToNode(s,n),void this.computeBufferMetadata();if(c===e)this.insertContentToNodeLeft(n,s),this._searchCache.valdiate(e);else if(c+s.piece.length>e){var p=[],f=new u(l.bufferIndex,h,l.end,this.getLineFeedCnt(l.bufferIndex,h,l.end),this.offsetInBuffer(d,l.end)-this.offsetInBuffer(d,h));if(this.shouldCheckCRLF()&&this.endWithCR(n)){if(10===this.nodeCharCodeAt(s,a)){var g={line:f.start.line+1,column:0};f=new u(f.bufferIndex,g,f.end,this.getLineFeedCnt(f.bufferIndex,g,f.end),f.length-1),n+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(n)){if(13===this.nodeCharCodeAt(s,a-1)){var v=this.positionInBuffer(s,a-1);this.deleteNodeTail(s,v),n="\r"+n,0===s.piece.length&&p.push(s)}else this.deleteNodeTail(s,h)}else this.deleteNodeTail(s,h);var m=this.createNewPieces(n);f.length>0&&this.rbInsertRight(s,f)
;for(var y=s,b=0;b<m.length;b++)y=this.rbInsertRight(y,m[b]);this.deleteNodes(p)}else this.insertContentToNodeRight(n,s)}else for(var S=this.createNewPieces(n),s=this.rbInsertLeft(null,S[0]),b=1;b<S.length;b++)s=this.rbInsertRight(s,S[b]);this.computeBufferMetadata()},e.prototype.delete=function(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,!(t<=0||this.root===r.SENTINEL)){var n=this.nodeAt(e),i=this.nodeAt(e+t),o=n.node,s=i.node;if(o===s){var a=this.positionInBuffer(o,n.remainder),c=this.positionInBuffer(o,i.remainder);if(n.nodeStartOffset===e){if(t===o.piece.length){var l=o.next();return r.rbDelete(this,o),this.validateCRLFWithPrevNode(l),void this.computeBufferMetadata()}return this.deleteNodeHead(o,c),this._searchCache.valdiate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return n.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,a),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,a,c),
void this.computeBufferMetadata())}var u=[],d=this.positionInBuffer(o,n.remainder);this.deleteNodeTail(o,d),this._searchCache.valdiate(e),0===o.piece.length&&u.push(o);var h=this.positionInBuffer(s,i.remainder);this.deleteNodeHead(s,h),0===s.piece.length&&u.push(s);for(var p=o.next();p!==r.SENTINEL&&p!==s;p=p.next())u.push(p);var f=0===o.piece.length?o.prev():o;this.deleteNodes(u),this.validateCRLFWithNextNode(f),this.computeBufferMetadata()}},e.prototype.insertContentToNodeLeft=function(e,t){var n=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){var i=t.piece,o={line:i.start.line+1,column:0},s=new u(i.bufferIndex,o,i.end,this.getLineFeedCnt(i.bufferIndex,o,i.end),i.length-1);t.piece=s,e+="\n",r.updateTreeMetadata(this,t,-1,-1),0===t.piece.length&&n.push(t)}for(var a=this.createNewPieces(e),c=this.rbInsertLeft(t,a[a.length-1]),l=a.length-2;l>=0;l--)c=this.rbInsertLeft(c,a[l]);this.validateCRLFWithPrevNode(c),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){
this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),r=i,o=1;o<n.length;o++)r=this.rbInsertRight(r,n[o]);this.validateCRLFWithPrevNode(i)},e.prototype.positionInBuffer=function(e,t,n){for(var i,r,o,s=e.piece,a=e.piece.bufferIndex,c=this._buffers[a].lineStarts,l=c[s.start.line]+s.start.column+t,u=s.start.line,d=s.end.line;u<=d&&(i=u+(d-u)/2|0,o=c[i],i!==d);)if(r=c[i+1],l<o)d=i-1;else{if(!(l>=r))break;u=i+1}return n?(n.line=i,n.column=l-o,null):{line:i,column:l-o}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var r=i[n.line+1],o=i[n.line]+n.column;if(r>o+1)return n.line-t.line;var s=o-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t<e.length;t++)r.rbDelete(this,e[t])
},e.prototype.createNewPieces=function(e){if(e.length>t.AverageBufferSize){for(var n=[];e.length>t.AverageBufferSize;){var i=e.charCodeAt(t.AverageBufferSize-1),r=void 0;13===i||i>=55296&&i<=56319?(r=e.substring(0,t.AverageBufferSize-1),e=e.substring(t.AverageBufferSize-1)):(r=e.substring(0,t.AverageBufferSize),e=e.substring(t.AverageBufferSize));var o=c(r);n.push(new u(this._buffers.length,{line:0,column:0},{line:o.length-1,column:r.length-o[o.length-1]},o.length-1,r.length)),this._buffers.push(new d(r,o))}var s=c(e);return n.push(new u(this._buffers.length,{line:0,column:0},{line:s.length-1,column:e.length-s[s.length-1]},s.length-1,e.length)),this._buffers.push(new d(e,s)),n}var a=this._buffers[0].buffer.length,l=c(e,!1),h=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===a&&0!==a&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},
h=this._lastChangeBufferPos;for(p=0;p<l.length;p++)l[p]+=a+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(l.slice(1)),this._buffers[0].buffer+="_"+e,a+=1}else{if(0!==a)for(var p=0;p<l.length;p++)l[p]+=a;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(l.slice(1)),this._buffers[0].buffer+=e}var f=this._buffers[0].buffer.length,g=this._buffers[0].lineStarts.length-1,v={line:g,column:f-this._buffers[0].lineStarts[g]},m=new u(0,h,v,this.getLineFeedCnt(0,h,v),f-a);return this._lastChangeBufferPos=v,[m]},e.prototype.getLinesRawContent=function(){return this.getContentOfSubTree(this.root)},e.prototype.getLineRawContent=function(e,t){void 0===t&&(t=0);var n=this.root,i="",o=this._searchCache.get2(e);if(o){n=o.node;var s=this.getAccumulatedValue(n,e-o.nodeStartLineNumber-1),a=this._buffers[n.piece.bufferIndex].buffer,c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(o.nodeStartLineNumber+n.piece.lineFeedCnt!==e){d=this.getAccumulatedValue(n,e-o.nodeStartLineNumber)
;return a.substring(c+s,c+d-t)}i=a.substring(c+s,c+n.piece.length)}else for(var l=0,u=e;n!==r.SENTINEL;)if(n.left!==r.SENTINEL&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var s=this.getAccumulatedValue(n,e-n.lf_left-2),d=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:u-(e-1-n.lf_left)}),a.substring(c+s,c+d-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){var s=this.getAccumulatedValue(n,e-n.lf_left-2),a=this._buffers[n.piece.bufferIndex].buffer,c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=a.substring(c+s,c+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==r.SENTINEL;){a=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){var d=this.getAccumulatedValue(n,0),c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start)
;return i+=a.substring(c,c+d-t)}c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=a.substr(c,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==r.SENTINEL;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var o=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(o!==r)return{index:o,remainder:0}}return{index:r,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){
var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),c=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=c-i,d=a-o,h=n.length+d;e.piece=new u(n.bufferIndex,n.start,s,c,h),r.updateTreeMetadata(this,e,d,l)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),c=a-i,l=o-this.offsetInBuffer(n.bufferIndex,s),d=n.length+l;e.piece=new u(n.bufferIndex,s,n.end,a,d),r.updateTreeMetadata(this,e,l,c)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,s=i.end,a=i.length,c=i.lineFeedCnt,l=t,d=this.getLineFeedCnt(i.bufferIndex,i.start,l),h=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new u(i.bufferIndex,i.start,l,d,h),r.updateTreeMetadata(this,e,h-a,d-c)
;var p=new u(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),f=this.rbInsertRight(e,p);this.validateCRLFWithPrevNode(f)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=c(t,!1),s=0;s<o.length;s++)o[s]+=i;if(n){var a=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:i-a}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));var l=this._buffers[0].lineStarts.length-1,d={line:l,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[l]},h=e.piece.length+t.length,p=e.piece.lineFeedCnt,f=this.getLineFeedCnt(0,e.piece.start,d),g=f-p;e.piece=new u(e.piece.bufferIndex,e.piece.start,d,f,h),
this._lastChangeBufferPos=d,r.updateTreeMetadata(this,e,t.length,g)},e.prototype.nodeAt=function(e){var t=this.root,n=this._searchCache.get(e);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:e-n.nodeStartOffset};for(var i=0;t!==r.SENTINEL;)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==r.SENTINEL;)if(n.left!==r.SENTINEL&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i}
;t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==r.SENTINEL;){if(n.piece.lineFeedCnt>0){var s=this.getAccumulatedValue(n,0),a=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,s),nodeStartOffset:a}}if(n.piece.length>=t-1){return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)}}t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===r.SENTINEL||0===e.piece.lineFeedCnt)return!1
;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;if(i===n.length-1)return!1;return!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==r.SENTINEL&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var s=e.piece.length-1,a=e.piece.lineFeedCnt-1
;e.piece=new u(e.piece.bufferIndex,e.piece.start,n,a,s),r.updateTreeMetadata(this,e,-1,-1),0===e.piece.length&&i.push(e);var c={line:t.piece.start.line+1,column:0},l=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,c,t.piece.end);t.piece=new u(t.piece.bufferIndex,c,t.piece.end,d,l),r.updateTreeMetadata(this,t,-1,-1),0===t.piece.length&&i.push(t);var h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(var p=0;p<i.length;p++)r.rbDelete(this,i[p])},e.prototype.adjustCarriageReturnFromNext=function(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var n=t.next();if(this.startWithLF(n)){if(e+="\n",1===n.piece.length)r.rbDelete(this,n);else{var i=n.piece,o={line:i.start.line+1,column:0},s=i.length-1,a=this.getLineFeedCnt(i.bufferIndex,o,i.end);n.piece=new u(i.bufferIndex,o,i.end,a,s),r.updateTreeMetadata(this,n,-1,-1)}return!0}}return!1},e.prototype.iterate=function(e,t){if(e===r.SENTINEL)return t(r.SENTINEL);var n=this.iterate(e.left,t);return n?t(e)&&this.iterate(e.right,t):n},
e.prototype.getNodeContent=function(e){if(e===r.SENTINEL)return"";var t=this._buffers[e.piece.bufferIndex],n=e.piece,i=this.offsetInBuffer(n.bufferIndex,n.start),o=this.offsetInBuffer(n.bufferIndex,n.end);return t.buffer.substring(i,o)},e.prototype.getPieceContent=function(e){var t=this._buffers[e.bufferIndex],n=this.offsetInBuffer(e.bufferIndex,e.start),i=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(n,i)},e.prototype.rbInsertRight=function(e,t){var n=new r.TreeNode(t,1);n.left=r.SENTINEL,n.right=r.SENTINEL,n.parent=r.SENTINEL,n.size_left=0,n.lf_left=0;if(this.root===r.SENTINEL)this.root=n,n.color=0;else if(e.right===r.SENTINEL)e.right=n,n.parent=e;else{var i=r.leftest(e.right);i.left=n,n.parent=i}return r.fixInsert(this,n),n},e.prototype.rbInsertLeft=function(e,t){var n=new r.TreeNode(t,1);n.left=r.SENTINEL,n.right=r.SENTINEL,n.parent=r.SENTINEL,n.size_left=0,n.lf_left=0;if(this.root===r.SENTINEL)this.root=n,n.color=0;else if(e.left===r.SENTINEL)e.left=n,n.parent=e;else{
var i=r.righttest(e.left);i.right=n,n.parent=i}return r.fixInsert(this,n),n},e.prototype.getContentOfSubTree=function(e){var t=this,n="";return this.iterate(e,function(e){return n+=t.getNodeContent(e),!0}),n},e}();t.PieceTreeBase=f}),define(e[1036],t([1,0,19,14,432,57]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n,i,o,s){this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=i,this._pieceTree=new r.PieceTreeBase(e,n,s)}return e.prototype.equals=function(t){return t instanceof e&&(this._BOM===t._BOM&&(this.getEOL()===t.getEOL()&&this._pieceTree.equal(t._pieceTree)))},e.prototype.mightContainRTL=function(){return this._mightContainRTL},e.prototype.mightContainNonBasicASCII=function(){return this._mightContainNonBasicASCII},e.prototype.getBOM=function(){return this._BOM},e.prototype.getEOL=function(){return this._pieceTree.getEOL()},e.prototype.createSnapshot=function(e){return this._pieceTree.createSnapshot(e?this._BOM:"")},
e.prototype.getOffsetAt=function(e,t){return this._pieceTree.getOffsetAt(e,t)},e.prototype.getPositionAt=function(e){return this._pieceTree.getPositionAt(e)},e.prototype.getRangeAt=function(e,t){var i=e+t,r=this.getPositionAt(e),o=this.getPositionAt(i);return new n.Range(r.lineNumber,r.column,o.lineNumber,o.column)},e.prototype.getValueInRange=function(e,t){if(void 0===t&&(t=o.EndOfLinePreference.TextDefined),e.isEmpty())return"";var n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)},e.prototype.getValueLengthInRange=function(e,t){if(void 0===t&&(t=o.EndOfLinePreference.TextDefined),e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;var n=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-n},e.prototype.getLength=function(){return this._pieceTree.getLength()},e.prototype.getLineCount=function(){return this._pieceTree.getLineCount()},e.prototype.getLinesContent=function(){
return this._pieceTree.getLinesContent()},e.prototype.getLineContent=function(e){return this._pieceTree.getLineContent(e)},e.prototype.getLineCharCode=function(e,t){return this._pieceTree.getLineCharCode(e,t)},e.prototype.getLineLength=function(e){return this._pieceTree.getLineLength(e)},e.prototype.getLineMinColumn=function(e){return 1},e.prototype.getLineMaxColumn=function(e){return this.getLineLength(e)+1},e.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=i.firstNonWhitespaceIndex(this.getLineContent(e));return-1===t?0:t+1},e.prototype.getLineLastNonWhitespaceColumn=function(e){var t=i.lastNonWhitespaceIndex(this.getLineContent(e));return-1===t?0:t+2},e.prototype._getEndOfLine=function(e){switch(e){case o.EndOfLinePreference.LF:return"\n";case o.EndOfLinePreference.CRLF:return"\r\n";case o.EndOfLinePreference.TextDefined:return this.getEOL()}throw new Error("Unknown EOL preference")},e.prototype.setEOL=function(e){this._pieceTree.setEOL(e)},e.prototype.applyEdits=function(t,n){
for(var r=this._mightContainRTL,s=this._mightContainNonBasicASCII,a=!0,c=[],l=0;l<t.length;l++){m=t[l];a&&m._isTracked&&(a=!1);var u=m.range;!r&&m.text&&(r=i.containsRTL(m.text)),!s&&m.text&&(s=!i.isBasicASCII(m.text)),c[l]={sortIndex:l,identifier:m.identifier,range:u,rangeOffset:this.getOffsetAt(u.startLineNumber,u.startColumn),rangeLength:this.getValueLengthInRange(u),lines:m.text?m.text.split(/\r\n|\r|\n/):null,forceMoveMarkers:m.forceMoveMarkers,isAutoWhitespaceEdit:m.isAutoWhitespaceEdit||!1}}c.sort(e._sortOpsAscending);for(var d=!1,l=0,h=c.length-1;l<h;l++){var p=c[l].range.getEndPosition(),f=c[l+1].range.getStartPosition();if(f.isBeforeOrEqual(p)){if(f.isBefore(p))throw new Error("Overlapping ranges are not allowed!");d=!0}}a&&(c=this._reduceOperations(c));for(var g=e._getInverseEditRanges(c),v=[],l=0;l<c.length;l++){var m=c[l],y=g[l];if(n&&m.isAutoWhitespaceEdit&&m.range.isEmpty())for(w=y.startLineNumber;w<=y.endLineNumber;w++){var b=""
;w===y.startLineNumber&&(b=this.getLineContent(m.range.startLineNumber),-1!==i.firstNonWhitespaceIndex(b))||v.push({lineNumber:w,oldContent:b})}}for(var S=[],l=0;l<c.length;l++){var m=c[l],y=g[l];S[l]={sortIndex:m.sortIndex,identifier:m.identifier,range:y,text:this.getValueInRange(m.range),forceMoveMarkers:m.forceMoveMarkers}}d||S.sort(function(e,t){return e.sortIndex-t.sortIndex}),this._mightContainRTL=r,this._mightContainNonBasicASCII=s;var _=this._doApplyEdits(c),C=null;if(n&&v.length>0){v.sort(function(e,t){return t.lineNumber-e.lineNumber}),C=[];for(var l=0,E=v.length;l<E;l++){var w=v[l].lineNumber;if(!(l>0&&v[l-1].lineNumber===w)){var I=v[l].oldContent,T=this.getLineContent(w);0!==T.length&&T!==I&&-1===i.firstNonWhitespaceIndex(T)&&C.push(w)}}}return new o.ApplyEditsResult(S,_,C)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){
for(var t=!1,i=e[0].range,r=e[e.length-1].range,s=new n.Range(i.startLineNumber,i.startColumn,r.endLineNumber,r.endColumn),a=i.startLineNumber,c=i.startColumn,l=[],u=0,d=e.length;u<d;u++){var h=e[u],p=h.range;t=t||h.forceMoveMarkers;for(var f=a;f<p.startLineNumber;f++)f===a?l.push(this.getLineContent(f).substring(c-1)):(l.push("\n"),l.push(this.getLineContent(f)));if(p.startLineNumber===a?l.push(this.getLineContent(p.startLineNumber).substring(c-1,p.startColumn-1)):(l.push("\n"),l.push(this.getLineContent(p.startLineNumber).substring(0,p.startColumn-1))),h.lines)for(var g=0,v=h.lines.length;g<v;g++)0!==g&&l.push("\n"),l.push(h.lines[g]);a=h.range.endLineNumber,c=h.range.endColumn}return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,o.EndOfLinePreference.TextDefined),lines:l.join("").split("\n"),forceMoveMarkers:t,isAutoWhitespaceEdit:!1}},e.prototype._doApplyEdits=function(t){t.sort(e._sortOpsDescending)
;for(var i=[],r=0;r<t.length;r++){var o=t[r],s=o.range.startLineNumber,a=o.range.startColumn,c=o.range.endLineNumber,l=o.range.endColumn;if(s!==c||a!==l||o.lines&&0!==o.lines.length){var u=c-s,d=o.lines?o.lines.length-1:0,h=Math.min(u,d),p=o.lines?o.lines.join(this.getEOL()):"";if(p?(this._pieceTree.delete(o.rangeOffset,o.rangeLength),this._pieceTree.insert(o.rangeOffset,p,!0)):this._pieceTree.delete(o.rangeOffset,o.rangeLength),h<d){for(var f=[],g=h+1;g<=d;g++)f.push(o.lines[g]);f[f.length-1]=this.getLineContent(s+d-1)}var v=new n.Range(s,a,c,l);i.push({range:v,rangeLength:o.rangeLength,text:p,rangeOffset:o.rangeOffset,forceMoveMarkers:o.forceMoveMarkers})}}return i},e.prototype.findMatchesLineByLine=function(e,t,n,i){return this._pieceTree.findMatchesLineByLine(e,t,n,i)},e.prototype.getPieceTree=function(){return this._pieceTree},e._getInverseEditRanges=function(e){for(var t,i,r=[],o=null,s=0,a=e.length;s<a;s++){var c=e[s],l=void 0,u=void 0;o?o.range.endLineNumber===c.range.startLineNumber?(l=t,
u=i+(c.range.startColumn-o.range.endColumn)):(l=t+(c.range.startLineNumber-o.range.endLineNumber),u=c.range.startColumn):(l=c.range.startLineNumber,u=c.range.startColumn);var d=void 0;if(c.lines&&c.lines.length>0){var h=c.lines.length,p=c.lines[0],f=c.lines[h-1];d=1===h?new n.Range(l,u,l,u+p.length):new n.Range(l,u,l+h-1,f.length+1)}else d=new n.Range(l,u,l,u);t=d.endLineNumber,i=d.endColumn,r.push(d),o=c}return r},e._sortOpsAscending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i},e._sortOpsDescending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i},e}();t.PieceTreeTextBuffer=s}),define(e[1037],t([1,0,14,57,1036,432]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n,i,r,o,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=o,this._isBasicASCII=s,this._normalizeEOL=a}
return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?e===i.DefaultEndOfLine.LF?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,s=n.length;i<s;i++){var a=n[i].buffer.replace(/\r\n|\r|\n/g,t),c=o.createLineStartsFast(a);n[i]=new o.StringBuffer(a,c)}return new r.PieceTreeTextBuffer(n,this._bom,t,this._containsRTL,this._isBasicASCII,this._normalizeEOL)},e.prototype.getFirstLineText=function(e){return this._chunks[0].buffer.substr(0,100).split(/\r\n|\r|\n/)[0]},e}();t.PieceTreeTextBufferFactory=s;var a=function(){function e(){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.isBasicASCII=!0}return e.prototype.acceptChunk=function(e){if(0!==e.length){
0===this.chunks.length&&n.startsWithUTF8BOM(e)&&(this.BOM=n.UTF8_BOM_CHARACTER,e=e.substr(1));var t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=o.createLineStarts(this._tmpLineStarts,e);this.chunks.push(new o.StringBuffer(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=n.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new s(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){
if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=o.createLineStartsFast(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}();t.PieceTreeTextBufferBuilder=a}),define(e[237],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n="(-?\\d*\\.\\d\\w*)|([^",i=0;i<t.USUAL_WORD_SEPARATORS.length;i++)e.indexOf(t.USUAL_WORD_SEPARATORS[i])>=0||(n+="\\"+t.USUAL_WORD_SEPARATORS[i]);return n+="\\s]+)",new RegExp(n,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),n=new RegExp(e.source,i)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,n,i){t.lastIndex=0;var r=t.exec(n)
;if(!r)return null;var o=r[0].indexOf(" ")>=0?function(e,t,n,i){var r=e-1-i;t.lastIndex=0;for(var o;o=t.exec(n);){if(o.index>r)return null;if(t.lastIndex>=r)return{word:o[0],startColumn:i+1+o.index,endColumn:i+1+t.lastIndex}}return null}(e,t,n,i):function(e,t,n,i){var r=e-1-i,o=n.lastIndexOf(" ",r-1)+1,s=n.indexOf(" ",r);-1===s&&(s=n.length),t.lastIndex=o;for(var a;a=t.exec(n);)if(a.index<=r&&t.lastIndex>=r)return{word:a[0],startColumn:i+1+a.index,endColumn:i+1+t.lastIndex};return null}(e,t,n,i);return t.lastIndex=0,o}}),define(e[1040],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},e}();t.FrankensteinMode=n}),define(e[208],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",
e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(t.IndentAction||(t.IndentAction={}));var n=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;t<n;t++){switch(e.notIn[t]){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4}}}return e.prototype.isOK=function(e){return 0==(this._standardTokenMask&e)},e}();t.StandardAutoClosingPairConditional=n}),define(e[1042],t([1,0,148]),function(e,t,n){"use strict";function i(e,t,r,o){if(Array.isArray(e)){for(var s=0,a=0,c=e;a<c.length;a++){var l=i(c[a],t,r,o);if(10===l)return l;l>s&&(s=l)}return s}if("string"==typeof e)return o?"*"===e?5:e===r?10:0:0;if(e){var u=e.language,d=e.pattern,h=e.scheme,p=e.hasAccessToAllModels;if(!o&&!p)return 0;s=0;if(h)if(h===t.scheme)s=10;else{if("*"!==h)return 0;s=5}if(u)if(u===r)s=10;else{if("*"!==u)return 0;s=Math.max(s,5)}if(d){
if(d!==t.fsPath&&!n.match(d,t.fsPath))return 0;s=10}return s}return 0}Object.defineProperty(t,"__esModule",{value:!0}),t.score=i}),define(e[1043],t([1,0,241,269]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e[e.Invalid=0]="Invalid",e[e.Start=1]="Start",e[e.H=2]="H",e[e.HT=3]="HT",e[e.HTT=4]="HTT",e[e.HTTP=5]="HTTP",e[e.F=6]="F",e[e.FI=7]="FI",e[e.FIL=8]="FIL",e[e.BeforeColon=9]="BeforeColon",e[e.AfterColon=10]="AfterColon",e[e.AlmostThere=11]="AlmostThere",e[e.End=12]="End",e[e.Accept=13]="Accept"}(r||(r={}));var o,s=function(){function e(e){for(var t=0,n=0,r=0,o=e.length;r<o;r++){var s=e[r],a=s[0],c=s[1],l=s[2];c>t&&(t=c),a>n&&(n=a),l>n&&(n=l)}t++,n++;for(var u=new i.Uint8Matrix(n,t,0),r=0,o=e.length;r<o;r++){var d=e[r],a=d[0],c=d[1],l=d[2];u.set(a,c,l)}this._states=u,this._maxCharCode=t}return e.prototype.nextState=function(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)},e}(),a=null;!function(e){e[e.None=0]="None",
e[e.ForceTermination=1]="ForceTermination",e[e.CannotEndIn=2]="CannotEndIn"}(o||(o={}));var c=null,l=function(){function e(){}return e._createLink=function(e,t,n,i,r){var o=r-1;do{var s=t.charCodeAt(o);if(2!==e.get(s))break;o--}while(o>i);if(i>0){var a=t.charCodeAt(i-1),c=t.charCodeAt(o);(40===a&&41===c||91===a&&93===c||123===a&&125===c)&&o--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:o+2},url:t.substring(i,o+1)}},e.computeLinks=function(t){for(var i=(null===a&&(a=new s([[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]])),a),r=function(){if(null===c){for(c=new n.CharacterClassifier(0),e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)c.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)c.set(".,;".charCodeAt(e),2)}return c
}(),o=[],l=1,u=t.getLineCount();l<=u;l++){for(var d=t.getLineContent(l),h=d.length,p=0,f=0,g=0,v=1,m=!1,y=!1,b=!1;p<h;){var S=!1,_=d.charCodeAt(p);if(13===v){C=void 0;switch(_){case 40:m=!0,C=0;break;case 41:C=m?0:1;break;case 91:y=!0,C=0;break;case 93:C=y?0:1;break;case 123:b=!0,C=0;break;case 125:C=b?0:1;break;case 39:C=34===g||96===g?0:1;break;case 34:C=39===g||96===g?0:1;break;case 96:C=39===g||34===g?0:1;break;default:C=r.get(_)}1===C&&(o.push(e._createLink(r,d,l,f,p)),S=!0)}else if(12===v){var C;1===(C=r.get(_))?S=!0:v=13}else 0===(v=i.nextState(v,_))&&(S=!0);S&&(v=1,m=!1,y=!1,b=!1,f=p+1,g=_),p++}13===v&&o.push(e._createLink(r,d,l,f,h))}return o},e}();t.computeLinks=function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?l.computeLinks(e):[]}}),define(e[261],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScopedLineTokens=function(e,t){
for(var i=e.getCount(),r=e.findTokenIndexAtOffset(t),o=e.getLanguageId(r),s=r;s+1<i&&e.getLanguageId(s+1)===o;)s++;for(var a=r;a>0&&e.getLanguageId(a-1)===o;)a--;return new n(e,o,a,s+1,e.getStartOffset(a),e.getEndOffset(s))};var n=function(){function e(e,t,n,i,r,o){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=r,this._lastCharOffset=o}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();t.ScopedLineTokens=n;var i;!function(e){e[e.value=7]="value"}(i||(i={})),t.ignoreBracketsInToken=function(e){return 0!=(7&e)}}),
define(e[1051],t([1,0,208]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(function(e){return new n.StandardAutoClosingPairConditional(e)}):e.brackets?this._autoClosingPairs=e.brackets.map(function(e){return new n.StandardAutoClosingPairConditional({open:e[0],close:e[1]})}):this._autoClosingPairs=[],this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;for(var i=t.findTokenIndexAtOffset(n-2),r=t.getStandardTokenType(i),o=0;o<this._autoClosingPairs.length;++o){var s=this._autoClosingPairs[o];if(s.open===e)return s.isOK(r)}return!1},e.prototype.getSurroundingPairs=function(){return this._surroundingPairs},e}();t.CharacterPairSupport=i}),define(e[1052],t([1,0]),function(e,t){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.INCREASE_MASK=1]="INCREASE_MASK",e[e.DECREASE_MASK=2]="DECREASE_MASK",e[e.INDENT_NEXTLINE_MASK=4]="INDENT_NEXTLINE_MASK",e[e.UNINDENT_MASK=8]="UNINDENT_MASK"}(t.IndentConsts||(t.IndentConsts={}));var n=function(){function e(e){this._indentationRules=e}return e.prototype.shouldIncrease=function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))},e.prototype.shouldDecrease=function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))},e.prototype.shouldIndentNextLine=function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))},
e.prototype.getIndentMetadata=function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t},e}();t.IndentRulesSupport=n}),define(e[1056],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,i,r){if(e&&t){if(o=this.doNavigateValueSet(t,r))return{range:e,value:o}}if(n&&i){var o=this.doNavigateValueSet(i,r);if(o)return{range:n,value:o}}return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),r=parseFloat(e);return isNaN(i)||isNaN(r)||i!==r?null:0!==i||t?(i=Math.floor(i*n),
i+=t?n:-n,String(i/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){for(var i=null,r=0,o=e.length;null===i&&r<o;r++)i=this.valueSetReplace(e[r],t,n);return i},e.prototype.valueSetReplace=function(e,t,n){var i=e.indexOf(t);return i>=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n}),define(e[1057],t([1,0,9,14,208]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t){(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map(function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}}),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,n){for(var i=0,o=this._regExpRules.length;i<o;i++){var s=this._regExpRules[i];if(s.beforeText.test(t)){if(!s.afterText)return s.action
;if(s.afterText.test(n))return s.action}}if(t.length>0&&n.length>0)for(var i=0,o=this._brackets.length;i<o;i++){if((a=this._brackets[i]).openRegExp.test(t)&&a.closeRegExp.test(n))return{indentAction:r.IndentAction.IndentOutdent}}if(t.length>0)for(var i=0,o=this._brackets.length;i<o;i++){var a=this._brackets[i];if(a.openRegExp.test(t))return{indentAction:r.IndentAction.Indent}}return null},e._createOpenBracketRegExp=function(t){var n=i.escapeRegExpCharacters(t);return/\B/.test(n.charAt(0))||(n="\\b"+n),n+="\\s*$",e._safeRegExp(n)},e._createCloseBracketRegExp=function(t){var n=i.escapeRegExpCharacters(t);return/\B/.test(n.charAt(n.length-1))||(n+="\\b"),n="^\\s*"+n,e._safeRegExp(n)},e._safeRegExp=function(e){try{return new RegExp(e)}catch(e){return n.onUnexpectedError(e),null}},e}();t.OnEnterSupport=o}),define(e[259],t([1,0,14,19]),function(e,t,n,i){"use strict";function r(e,t){var n={};return function(i){var r=e(i);return n.hasOwnProperty(r)||(n[r]=t(i)),n[r]}}function o(e){var t=/^[\w]+$/.test(e)
;return e=n.escapeRegExpCharacters(e),t?"\\b"+e+"\\b":e}function s(e){var t="("+e.map(o).join(")|(")+")";return n.createRegExp(t,!0)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t,n,i,r){this.languageIdentifier=e,this.open=t,this.close=n,this.forwardRegex=i,this.reversedRegex=r}}();t.RichEditBracket=a;var c=function(){return function(e,t){var n=this;this.brackets=t.map(function(t){return new a(e,t[0],t[1],l({open:t[0],close:t[1]}),u({open:t[0],close:t[1]}))}),this.forwardRegex=d(this.brackets),this.reversedRegex=h(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var i=0;this.brackets.forEach(function(e){n.textIsBracket[e.open.toLowerCase()]=e,n.textIsBracket[e.close.toLowerCase()]=e,n.textIsOpenBracket[e.open.toLowerCase()]=!0,n.textIsOpenBracket[e.close.toLowerCase()]=!1,i=Math.max(i,e.open.length),i=Math.max(i,e.close.length)}),this.maxBracketLength=i}}();t.RichEditBrackets=c;var l=r(function(e){return e.open+";"+e.close},function(e){
return s([e.open,e.close])}),u=r(function(e){return e.open+";"+e.close},function(e){return s([p(e.open),p(e.close)])}),d=r(function(e){return e.map(function(e){return e.open+";"+e.close}).join(";")},function(e){var t=[];return e.forEach(function(e){t.push(e.open),t.push(e.close)}),s(t)}),h=r(function(e){return e.map(function(e){return e.open+";"+e.close}).join(";")},function(e){var t=[];return e.forEach(function(e){t.push(p(e.open)),t.push(p(e.close))}),s(t)}),p=function(){var e=null,t=null;return function(n){return e!==n&&(t=function(e){for(var t="",n=e.length-1;n>=0;n--)t+=e.charAt(n);return t}(e=n)),t}}(),f=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,r){var o=n.match(e);if(!o)return null;var s=n.length-o.index,a=o[0].length,c=r+s;return new i.Range(t,c-a+1,t,c+1)},e.findPrevBracketInToken=function(e,t,n,i,r){var o=p(n).substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)},e.findNextBracketInText=function(e,t,n,r){var o=n.match(e);if(!o)return null
;var s=o.index,a=o[0].length;if(0===a)return null;var c=r+s;return new i.Range(t,c+1,t,c+1+a)},e.findNextBracketInToken=function(e,t,n,i,r){var o=n.substring(i,r);return this.findNextBracketInText(e,t,o,i)},e}();t.BracketsUtils=f}),define(e[1060],t([1,0,261,259,208]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){n=n||{},this._richEditBrackets=e,this._complexAutoClosePairs=t.filter(function(e){return e.open.length>1&&!!e.close}).map(function(e){return new r.StandardAutoClosingPairConditional(e)}),n.docComment&&this._complexAutoClosePairs.push(new r.StandardAutoClosingPairConditional({open:n.docComment.open,close:n.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t<n;t++){var i=this._richEditBrackets.brackets[t],r=i.close.charAt(i.close.length-1);e.push(r)}for(var o=0,s=this._complexAutoClosePairs;o<s.length;o++){var a=s[o]
;e.push(a.open.charAt(a.open.length-1))}return e=e.filter(function(e,t,n){return n.indexOf(e)===t})},e.prototype.onElectricCharacter=function(e,t,n){return this._onElectricAutoClose(e,t,n)||this._onElectricAutoIndent(e,t,n)},e.prototype._onElectricAutoIndent=function(e,t,r){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;var o=t.findTokenIndexAtOffset(r-1);if(n.ignoreBracketsInToken(t.getStandardTokenType(o)))return null;var s=this._richEditBrackets.reversedRegex,a=t.getLineContent().substring(0,r-1)+e,c=i.BracketsUtils.findPrevBracketInToken(s,1,a,0,a.length);if(!c)return null;var l=a.substring(c.startColumn-1,c.endColumn-1);l=l.toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;var u=a.substring(0,c.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:l}:null},e.prototype._onElectricAutoClose=function(e,t,n){if(!this._complexAutoClosePairs.length)return null;for(var i=t.getLineContent(),r=0,o=this._complexAutoClosePairs.length;r<o;r++){
var s=this._complexAutoClosePairs[r];if(e===s.open.charAt(s.open.length-1)){if(i.substring(i.length-s.open.length+1)+e===s.open){var a=t.findTokenIndexAtOffset(n-1),c=t.getStandardTokenType(a);if(s.isOK(c)&&!(i.indexOf(s.close,n-1)>=0))return{appendText:s.close}}}}return null},e}();t.BracketElectricCharacterSupport=o}),define(e[114],t([1,0,1051,1060,1057,1052,259,7,9,14,237,261,19,208]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(t,i,r){this._languageIdentifier=t,this._brackets=null,this._electricCharacter=null;var s=null;i&&(s=i._conf),this._conf=e._mergeConf(s,r),this.onEnter=e._handleOnEnter(this._conf),this.comments=e._handleComments(this._conf),this.characterPair=new n.CharacterPairSupport(this._conf),this.wordDefinition=this._conf.wordPattern||u.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules,
this._conf.indentationRules&&(this.indentRulesSupport=new o.IndentRulesSupport(this._conf.indentationRules)),this.foldingRules=this._conf.folding||{}}return Object.defineProperty(e.prototype,"brackets",{get:function(){return!this._brackets&&this._conf.brackets&&(this._brackets=new s.RichEditBrackets(this._languageIdentifier,this._conf.brackets)),this._brackets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"electricCharacter",{get:function(){if(!this._electricCharacter){var e=[];this._conf.autoClosingPairs?e=this._conf.autoClosingPairs:this._conf.brackets&&(e=this._conf.brackets.map(function(e){return{open:e[0],close:e[1]}})),this._electricCharacter=new i.BracketElectricCharacterSupport(this.brackets,e,this._conf.__electricCharacterSupport)}return this._electricCharacter},enumerable:!0,configurable:!0}),e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,
indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,folding:e?t.folding||e.folding:t.folding,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleOnEnter=function(e){var t={},n=!0;return e.brackets&&(n=!1,t.brackets=e.brackets),e.indentationRules&&(n=!1),e.onEnterRules&&(n=!1,t.regExpRules=e.onEnterRules),n?null:new r.OnEnterSupport(t)},e._handleComments=function(e){var t=e.comments;if(!t)return null;var n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){var i=t.blockComment,r=i[0],o=i[1];n.blockCommentStartToken=r,n.blockCommentEndToken=o}return n},e}();t.RichEditSupport=f;var g=function(){return function(){}}();t.LanguageConfigurationChangeEvent=g;var v=function(){
function e(){this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._entries=[]}return e.prototype.register=function(e,t){var n=this,i=this._getRichEditSupport(e.id),r=new f(e,i,t);return this._entries[e.id]=r,this._onDidChange.fire({languageIdentifier:e}),{dispose:function(){n._entries[e.id]===r&&(n._entries[e.id]=i,n._onDidChange.fire({languageIdentifier:e}))}}},e.prototype._getRichEditSupport=function(e){return this._entries[e]||null},e.prototype.getIndentationRules=function(e){var t=this._entries[e];return t?t.indentationRules||null:null},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.electricCharacter||null:null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,n){var i=d.createScopedLineTokens(t,n-1),r=this._getElectricCharacterSupport(i.languageId);return r?r.onElectricCharacter(e,i,n-i.firstCharOffset):null
},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t?t.comments||null:null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t?t.characterPair||null:null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,n){var i=d.createScopedLineTokens(t,n-1),r=this._getCharacterPairSupport(i.languageId);return!!r&&r.shouldAutoClosePair(e,i,n-i.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return t?u.ensureValidWordDefinition(t.wordDefinition||null):u.ensureValidWordDefinition(null)},e.prototype.getFoldingRules=function(e){var t=this._getRichEditSupport(e);return t?t.foldingRules:{}},e.prototype.getIndentRulesSupport=function(e){var t=this._getRichEditSupport(e)
;return t?t.indentRulesSupport||null:null},e.prototype.getPrecedingValidLine=function(e,t,n){var i=e.getLanguageIdAtPosition(t,0);if(t>1){var r=t-1,o=-1;for(r=t-1;r>=1;r--){if(e.getLanguageIdAtPosition(r,0)!==i)return o;var s=e.getLineContent(r);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return r;o=r}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var r=this.getPrecedingValidLine(e,t,i);if(r<0)return null;if(r<1)return{indentation:"",action:null};var o=e.getLineContent(r);if(i.shouldIncrease(o)||i.shouldIndentNextLine(o))return{indentation:l.getLeadingWhitespace(o),action:p.IndentAction.Indent,line:r};if(i.shouldDecrease(o))return{indentation:l.getLeadingWhitespace(o),action:null,line:r};if(1===r)return{indentation:l.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};var s=r-1,a=i.getIndentMetadata(e.getLineContent(s));if(!(3&a)&&4&a){
for(var c=0,u=s-1;u>0;u--)if(!i.shouldIndentNextLine(e.getLineContent(u))){c=u;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(n)return{indentation:l.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};for(u=r;u>0;u--){var d=e.getLineContent(u);if(i.shouldIncrease(d))return{indentation:l.getLeadingWhitespace(d),action:p.IndentAction.Indent,line:u};if(i.shouldIndentNextLine(d)){for(var c=0,h=u-1;h>0;h--)if(!i.shouldIndentNextLine(e.getLineContent(u))){c=h;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(i.shouldDecrease(d))return{indentation:l.getLeadingWhitespace(d),action:null,line:u}}return{indentation:l.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i){var r=this.getIndentRulesSupport(t);if(!r)return null;var o=this.getInheritIndentForLine(e,n),s=e.getLineContent(n);if(o){var a=o.line;if(void 0!==a){var u=this._getOnEnterSupport(t),d=null
;try{d=u.onEnter("",e.getLineContent(a),"")}catch(e){c.onUnexpectedError(e)}if(d){var h=l.getLeadingWhitespace(e.getLineContent(a));return d.removeText&&(h=h.substring(0,h.length-d.removeText)),d.indentAction===p.IndentAction.Indent||d.indentAction===p.IndentAction.IndentOutdent?h=i.shiftIndent(h):d.indentAction===p.IndentAction.Outdent&&(h=i.unshiftIndent(h)),r.shouldDecrease(s)&&(h=i.unshiftIndent(h)),d.appendText&&(h+=d.appendText),l.getLeadingWhitespace(h)}}return r.shouldDecrease(s)?o.action===p.IndentAction.Indent?o.indentation:i.unshiftIndent(o.indentation):o.action===p.IndentAction.Indent?i.shiftIndent(o.indentation):o.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){e.forceTokenization(t.startLineNumber);var r,o,s=e.getLineTokens(t.startLineNumber),a=d.createScopedLineTokens(s,t.startColumn-1),c=a.getLineContent(),u=!1;if(a.firstCharOffset>0&&s.getLanguageId(0)!==a.languageId?(u=!0,
r=c.substr(0,t.startColumn-1-a.firstCharOffset)):r=s.getLineContent().substring(0,t.startColumn-1),t.isEmpty())o=c.substr(t.startColumn-1-a.firstCharOffset);else{o=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset)}var h=this.getIndentRulesSupport(a.languageId);if(!h)return null;var f=r,g=l.getLeadingWhitespace(r);if(!i&&!u){var v=this.getInheritIndentForLine(e,t.startLineNumber);h.shouldDecrease(r)&&v&&(g=v.indentation,v.action!==p.IndentAction.Indent&&(g=n.unshiftIndent(g))),f=g+l.ltrim(l.ltrim(r," "),"\t")}var m={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:function(n){return n===t.startLineNumber?f:e.getLineContent(n)}},y=l.getLeadingWhitespace(s.getLineContent()),b=this.getInheritIndentForLine(m,t.startLineNumber+1);if(!b){var S=u?y:g;return{beforeEnter:S,afterEnter:S}}
var _=u?y:b.indentation;return b.action===p.IndentAction.Indent&&(_=n.shiftIndent(_)),h.shouldDecrease(o)&&(_=n.unshiftIndent(_)),{beforeEnter:u?y:g,afterEnter:_}},e.prototype.getIndentActionForType=function(e,t,n,i){var r=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),o=this.getIndentRulesSupport(r.languageId);if(!o)return null;var s,a=r.getLineContent(),c=a.substr(0,t.startColumn-1-r.firstCharOffset);if(t.isEmpty())s=a.substr(t.startColumn-1-r.firstCharOffset);else{s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset)}if(!o.shouldDecrease(c+s)&&o.shouldDecrease(c+n+s)){var l=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!l)return null;var u=l.indentation;return l.action!==p.IndentAction.Indent&&(u=i.unshiftIndent(u)),u}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},
e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.onEnter||null:null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new h.Range(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(i.languageId);if(!r)return null;var o,s=i.getLineContent(),a=s.substr(0,t.startColumn-1-i.firstCharOffset);if(t.isEmpty())o=s.substr(t.startColumn-1-i.firstCharOffset);else{o=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset)}var l=t.startLineNumber,u="";if(l>1&&0===i.firstCharOffset){var d=this.getScopedLineTokens(e,l-1);d.languageId===i.languageId&&(u=d.getLineContent())}var h=null;try{h=r.onEnter(u,a,o)}catch(e){c.onUnexpectedError(e)}
return h?(h.appendText||(h.indentAction===p.IndentAction.Indent||h.indentAction===p.IndentAction.IndentOutdent?h.appendText="\t":h.appendText=""),h.removeText&&(n=n.substring(0,n.length-h.removeText)),{enterAction:h,indentation:n}):null},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),r=l.getLeadingWhitespace(i);return r.length>n-1&&(r=r.substring(0,n-1)),r},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),r=isNaN(n)?e.getLineMaxColumn(t)-1:n-1;return d.createScopedLineTokens(i,r)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t?t.brackets||null:null},e}();t.LanguageConfigurationRegistryImpl=v,t.LanguageConfigurationRegistry=new v}),define(e[453],t([1,0,51]),function(e,t,n){"use strict";function i(e){if(!e||!Array.isArray(e))return[];for(var t=[],n=0,i=0,r=e.length;i<r;i++){var o=e[i],s=-1;if("string"==typeof o.fontStyle){s=0;for(var c=o.fontStyle.split(" "),l=0,u=c.length;l<u;l++){switch(c[l]){
case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4}}}var d=null;"string"==typeof o.foreground&&(d=o.foreground);var h=null;"string"==typeof o.background&&(h=o.background),t[n++]=new a(o.token||"",i,s,d,h)}return t}function r(e,t){e.sort(function(e,t){var n=s(e.token,t.token);return 0!==n?n:e.index-t.index});for(var n=0,i="000000",r="ffffff";e.length>=1&&""===e[0].token;){var o=e.shift();-1!==o.fontStyle&&(n=o.fontStyle),null!==o.foreground&&(i=o.foreground),null!==o.background&&(r=o.background)}for(var a=new l,c=0,d=t;c<d.length;c++){var p=d[c];a.getId(p)}for(var g=a.getId(i),v=a.getId(r),m=new h(n,g,v),y=new f(m),b=0,S=e.length;b<S;b++){var _=e[b];y.insert(_.token,_.fontStyle,a.getId(_.foreground),a.getId(_.background))}return new u(a,y)}function o(e){var t=e.match(d);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 4}throw new Error("Unexpected match for standard token type!")}function s(e,t){return e<t?-1:e>t?1:0}
Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t,n,i,r){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=r}}();t.ParsedTokenThemeRule=a,t.parseTokenTheme=i;var c=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,l=function(){function e(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}return e.prototype.getId=function(e){if(null===e)return 0;var t=e.match(c);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();var i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=n.Color.fromHex("#"+e),i)},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=l;var u=function(){function e(e,t){this._colorMap=e,this._root=t,this._cache=new Map}return e.createFromRawTokenTheme=function(e,t){return this.createFromParsedTokenTheme(i(e),t)},e.createFromParsedTokenTheme=function(e,t){return r(e,t)},e.prototype.getColorMap=function(){
return this._colorMap.getColorMap()},e.prototype.getThemeTrieElement=function(){return this._root.toExternalThemeTrieElement()},e.prototype._match=function(e){return this._root.match(e)},e.prototype.match=function(e,t){var n=this._cache.get(t);if(void 0===n){var i=this._match(t),r=o(t);n=(i.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0},e}();t.TokenTheme=u;var d=/\b(comment|string|regex)\b/;t.toStandardTokenType=o,t.strcmp=s;var h=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}();t.ThemeTrieElementRule=h;var p=function(){return function(e,t){this.mainRule=e,
this.children=t||Object.create(null)}}();t.ExternalThemeTrieElement=p;var f=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.toExternalThemeTrieElement=function(){var e=Object.create(null);return this._children.forEach(function(t,n){e[n]=t.toExternalThemeTrieElement()}),new p(this._mainRule,e)},e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var r=this._children.get(t);return void 0!==r?r.match(n):this._mainRule},e.prototype.insert=function(t,n,i,r){if(""!==t){var o,s,a=t.indexOf(".");-1===a?(o=t,s=""):(o=t.substring(0,a),s=t.substring(a+1));var c=this._children.get(o);void 0===c&&(c=new e(this._mainRule.clone()),this._children.set(o,c)),c.insert(s,n,i,r)}else this._mainRule.acceptOverwrite(n,i,r)},e}();t.ThemeTrieElement=f,t.generateTokensCSSForColorMap=function(e){for(var t=[],n=1,i=e.length;n<i;n++){var r=e[n];t[n]=".mtk"+n+" { color: "+r+"; }"}
return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.join("\n")}}),define(e[1063],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._onDidChange=new n.Emitter,this.onDidChange=this._onDidChange.event,this._map=Object.create(null),this._colorMap=null}return e.prototype.fire=function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})},e.prototype.register=function(e,t){var n=this;return this._map[e]=t,this.fire([e]),{dispose:function(){n._map[e]===t&&(delete n._map[e],n.fire([e]))}}},e.prototype.get=function(e){return this._map[e]||null},e.prototype.setColorMap=function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Object.keys(this._map),changedColorMap:!0})},e.prototype.getColorMap=function(){return this._colorMap},e.prototype.getDefaultBackground=function(){return this._colorMap[2]},e}()
;t.TokenizationRegistryImpl=i}),define(e[1064],t([1,0,7,73,39,19,60,4,145,311,10]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(d=t.Severity||(t.Severity={}));var h;!function(e){e[e.Unnecessary=1]="Unnecessary"}(h=t.MarkerTag||(t.MarkerTag={}));var p;!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(p=t.MarkerSeverity||(t.MarkerSeverity={}));var f=function(){function e(){}return e.chord=function(e,t){return i.KeyChord(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();t.KeyMod=f;var g;!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",
e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",
e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",
e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(g=t.KeyCode||(t.KeyCode={})),t.createMonacoBaseAPI=function(){return{editor:void 0,languages:void 0,CancellationTokenSource:c.CancellationTokenSource,Emitter:n.Emitter,KeyCode:g,KeyMod:f,Position:r.Position,Range:o.Range,Selection:s.Selection,SelectionDirection:s.SelectionDirection,Severity:d,MarkerSeverity:p,MarkerTag:h,Promise:a.TPromise,Uri:u.default,Token:l.Token}}}),define(e[456],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.MINIMUM_HEIGHT=4]="MINIMUM_HEIGHT"
}(n||(n={}));var i=function(){function e(e,t,n){this.from=0|e,this.to=0|t,this.colorId=0|n}return e.compare=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId},e}();t.ColorZone=i;var r=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}return e.compare=function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1},e.prototype.setColorZone=function(e){this._colorZone=e},e.prototype.getColorZones=function(){return this._colorZone},e}();t.OverviewRulerZone=r;var o=function(){function e(e){this._getVerticalOffsetForLine=e,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=[]}return e.prototype.getId2Color=function(){return this._id2Color},
e.prototype.setZones=function(e){this._zones=e,this._zones.sort(r.compare)},e.prototype.setLineHeight=function(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setPixelRatio=function(e){this._pixelRatio=e,this._colorZonesInvalid=!0},e.prototype.getDOMWidth=function(){return this._domWidth},e.prototype.getCanvasWidth=function(){return this._domWidth*this._pixelRatio},e.prototype.setDOMWidth=function(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)},e.prototype.getDOMHeight=function(){return this._domHeight},e.prototype.getCanvasHeight=function(){return this._domHeight*this._pixelRatio},e.prototype.setDOMHeight=function(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.getOuterHeight=function(){return this._outerHeight},e.prototype.setOuterHeight=function(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.resolveColorZones=function(){
for(var e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),n=Math.floor(this.getCanvasHeight()),r=n/Math.floor(this._outerHeight),o=Math.floor(4*this._pixelRatio/2),s=[],a=0,c=this._zones.length;a<c;a++){var l=this._zones[a];if(!e){var u=l.getColorZones();if(u){s.push(u);continue}}var d=Math.floor(r*this._getVerticalOffsetForLine(l.startLineNumber)),h=Math.floor(r*(this._getVerticalOffsetForLine(l.endLineNumber)+t)),p=Math.floor((d+h)/2),f=h-p;f<o&&(f=o),p-f<0&&(p=f),p+f>n&&(p=n-f);var g=l.color,v=this._color2Id[g];v||(v=++this._lastAssignedId,this._color2Id[g]=v,this._id2Color[v]=g);var m=new i(p-f,p+f,v);l.setColorZone(m),s.push(m)}return this._colorZonesInvalid=!1,s.sort(i.compare),s},e}();t.OverviewZoneManager=o}),define(e[230],t([1,0,19]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),
this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}();t.RestrictedRenderingContext=r;var o=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._viewLines=i,r}return n(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){var t=this._viewLines.visibleRangesForRange2(new i.Range(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t}(r);t.RenderingContext=o;var s=function(){
return function(e,t){this.lineNumber=e,this.ranges=t}}();t.LineVisibleRanges=s;var a=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}();t.HorizontalRange=a}),define(e[1067],t([1,0,230]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),r=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,n,i,r){var o=this._createRange();try{return o.setStart(e,t),o.setEnd(n,i),o.getClientRects()}catch(e){return null}finally{this._detachRange(o,r)}},e._mergeAdjacentRanges=function(e){
if(1===e.length)return[new n.HorizontalRange(e[0].left,e[0].width)];e.sort(i.compare);for(var t=[],r=0,o=e[0].left,s=e[0].width,a=1,c=e.length;a<c;a++){var l=e[a],u=l.left,d=l.width;o+s+.9>=u?s=Math.max(s,u+d-o):(t[r++]=new n.HorizontalRange(o,s),o=u,s=d)}return t[r++]=new n.HorizontalRange(o,s),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];n[r]=new i(Math.max(0,s.left-t),s.width)}return this._mergeAdjacentRanges(n)},e.readHorizontalRanges=function(e,t,n,i,r,o,s){var a=e.children.length-1;if(0>a)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===r&&(i--,r=Number.MAX_VALUE);var c=e.children[t].firstChild,l=e.children[i].firstChild;if(c&&l||(!c&&0===n&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!l&&0===r&&i>0&&(l=e.children[i-1].firstChild,r=1073741824)),!c||!l)return null;n=Math.min(c.textContent.length,Math.max(0,n)),r=Math.min(l.textContent.length,Math.max(0,r))
;var u=this._readClientRects(c,n,l,r,s);return this._createHorizontalRangesFromClientRects(u,o)},e}();t.RangeUtil=r}),define(e[1068],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,i){this.configuration=e,this.theme=t,this.model=n,this.viewLayout=n.viewLayout,this.privateViewEventBus=i}return e.prototype.addEventHandler=function(e){this.privateViewEventBus.addEventHandler(e)},e.prototype.removeEventHandler=function(e){this.privateViewEventBus.removeEventHandler(e)},e}();t.ViewContext=n}),define(e[1069],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,n=this._eventHandlers.length;t<n;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)},
e.prototype.removeEventHandler=function(e){for(var t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}},e.prototype.emit=function(e){this._eventQueue?this._eventQueue.push(e):this._eventQueue=[e],this._isConsumingQueue||this.consumeQueue()},e.prototype.emitMany=function(e){this._eventQueue?this._eventQueue=this._eventQueue.concat(e):this._eventQueue=e,this._isConsumingQueue||this.consumeQueue()},e.prototype.consumeQueue=function(){var e=this;this._eventHandlerGateKeeper(function(){try{e._isConsumingQueue=!0,e._doConsumeQueue()}finally{e._isConsumingQueue=!1}})},e.prototype._doConsumeQueue=function(){for(;this._eventQueue;){var e=this._eventQueue;this._eventQueue=null;for(var t=this._eventHandlers.slice(0),n=0,i=t.length;n<i;n++)t[n].handleEvents(e)}},e}();t.ViewEventDispatcher=n}),define(e[197],t([1,0,9,5]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){
e[e.ViewConfigurationChanged=1]="ViewConfigurationChanged",e[e.ViewCursorStateChanged=2]="ViewCursorStateChanged",e[e.ViewDecorationsChanged=3]="ViewDecorationsChanged",e[e.ViewFlushed=4]="ViewFlushed",e[e.ViewFocusChanged=5]="ViewFocusChanged",e[e.ViewLineMappingChanged=6]="ViewLineMappingChanged",e[e.ViewLinesChanged=7]="ViewLinesChanged",e[e.ViewLinesDeleted=8]="ViewLinesDeleted",e[e.ViewLinesInserted=9]="ViewLinesInserted",e[e.ViewRevealRangeRequest=10]="ViewRevealRangeRequest",e[e.ViewScrollChanged=11]="ViewScrollChanged",e[e.ViewTokensChanged=12]="ViewTokensChanged",e[e.ViewTokensColorsChanged=13]="ViewTokensColorsChanged",e[e.ViewZonesChanged=14]="ViewZonesChanged",e[e.ViewThemeChanged=15]="ViewThemeChanged",e[e.ViewLanguageConfigurationChanged=16]="ViewLanguageConfigurationChanged"}(t.ViewEventType||(t.ViewEventType={}));var o=function(){return function(e){this.type=1,this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,
this.lineHeight=e.lineHeight,this.readOnly=e.readOnly,this.accessibilitySupport=e.accessibilitySupport,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo}}();t.ViewConfigurationChangedEvent=o;var s=function(){return function(e){this.type=2,this.selections=e}}();t.ViewCursorStateChangedEvent=s;var a=function(){return function(){this.type=3}}();t.ViewDecorationsChangedEvent=a;var c=function(){return function(){this.type=4}}();t.ViewFlushedEvent=c;var l=function(){return function(e){this.type=5,this.isFocused=e}}();t.ViewFocusChangedEvent=l;var u=function(){return function(){this.type=6}}();t.ViewLineMappingChangedEvent=u;var d=function(){return function(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t}}();t.ViewLinesChangedEvent=d;var h=function(){return function(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t}}();t.ViewLinesDeletedEvent=h;var p=function(){
return function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}();t.ViewLinesInsertedEvent=p;!function(e){e[e.Simple=0]="Simple",e[e.Center=1]="Center",e[e.CenterIfOutsideViewport=2]="CenterIfOutsideViewport",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom"}(t.VerticalRevealType||(t.VerticalRevealType={}));var f=function(){return function(e,t,n,i){this.type=10,this.range=e,this.verticalType=t,this.revealHorizontal=n,this.scrollType=i}}();t.ViewRevealRangeRequestEvent=f;var g=function(){return function(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}();t.ViewScrollChangedEvent=g;var v=function(){return function(e){this.type=12,this.ranges=e}}();t.ViewTokensChangedEvent=v;var m=function(){return function(){this.type=15}}()
;t.ViewThemeChangedEvent=m;var y=function(){return function(){this.type=13}}();t.ViewTokensColorsChangedEvent=y;var b=function(){return function(){this.type=14}}();t.ViewZonesChangedEvent=b;var S=function(){return function(){this.type=16}}();t.ViewLanguageConfigurationEvent=S;var _=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return n(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new C),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,r=t.length;n<r;n++)!function(e,t){try{e(t)}catch(e){i.onUnexpectedError(e)}}(t[n],e)},t.prototype.addEventListener=function(e){var t=this;return this._listeners.push(e),{
dispose:function(){for(var n=t._listeners,i=0,r=n.length;i<r;i++)if(n[i]===e){n.splice(i,1);break}}}},t}(r.Disposable);t.ViewEventEmitter=_;var C=function(){function e(){this._eventsLen=0,this._events=[],this._eventsLen=0}return e.prototype.emit=function(e){this._events[this._eventsLen++]=e},e.prototype.finalize=function(){var e=this._events;return this._events=null,e},e}();t.ViewEventsCollector=C}),define(e[332],t([1,0,14]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i}return e._equals=function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type},e.equalsArr=function(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++)if(!e._equals(t[r],n[r]))return!1;return!0},e.filter=function(t,n,i,r){if(0===t.length)return[];for(var o=[],s=0,a=0,c=t.length;a<c;a++){var l=t[a],u=l.range
;if(!(u.endLineNumber<n||u.startLineNumber>n)&&(!u.isEmpty()||0!==l.type&&3!==l.type)){var d=u.startLineNumber===n?u.startColumn:i,h=u.endLineNumber===n?u.endColumn:r;o[s++]=new e(d,h,l.inlineClassName,l.type)}}return o},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.className<t.className?-1:e.className>t.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}();t.LineDecoration=i;var r=function(){return function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}}();t.DecorationSegment=r;var o=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]<e;){for(var i=0;i+1<this.count&&this.stopOffsets[i]===this.stopOffsets[i+1];)i++;n.push(new r(t,this.stopOffsets[i],this.classNames.join(" "))),t=this.stopOffsets[i]+1,this.stopOffsets.splice(0,i+1),this.classNames.splice(0,i+1),this.count-=i+1}
return this.count>0&&t<e&&(n.push(new r(t,e-1,this.classNames.join(" "))),t=e),t},e.prototype.insert=function(e,t){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t);else for(var n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),s=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var i=[],r=new o,s=0,a=0,c=t.length;a<c;a++){var l=t[a],u=l.startColumn,d=l.endColumn,h=l.className;if(u>1){p=e.charCodeAt(u-2);n.isHighSurrogate(p)&&u--}if(d>1){var p=e.charCodeAt(d-2);n.isHighSurrogate(p)&&d--}var f=u-1,g=d-2;s=r.consumeLowerThan(f,s,i),0===r.count&&(s=f),r.insert(g,h)}return r.consumeLowerThan(1073741824,s,i),i},e}();t.LineDecorationsNormalizer=s}),define(e[328],t([1,0,332,14,317]),function(e,t,n,i,r){"use strict";function o(e,t){if(0===e.lineContent.length){var r=0,o="<span><span> </span></span>";if(e.lineDecorations.length>0){
for(var a=[],u=0,d=e.lineDecorations.length;u<d;u++){var p=e.lineDecorations[u];1===p.type&&(a.push(e.lineDecorations[u].className),r|=1),2===p.type&&(a.push(e.lineDecorations[u].className),r|=2)}0!==r&&(o='<span><span class="'+a.join(" ")+'"></span></span>')}return t.appendASCIIString(o),new l(new c(0,0),!1,r)}return function(e,t){var n=e.fontIsMonospace,r=e.containsForeignElements,o=e.lineContent,s=e.len,a=e.isOverflowing,u=e.parts,d=e.tabSize,h=e.containsRTL,p=e.spaceWidth,f=e.renderWhitespace,g=e.renderControlCharacters,v=new c(s+1,u.length),m=0,y=0,b=0,S=0,_=0;t.appendASCIIString("<span>");for(var C=0,E=u.length;C<E;C++){_+=S;var w=u[C],I=w.endIndex,T=w.type,x=0!==f&&T.indexOf("vs-whitespace")>=0;if(b=0,t.appendASCIIString('<span class="'),t.appendASCIIString(T),t.appendASCII(34),x){for(var k=0,D=m,A=y;D<I;D++){if(9===(L=o.charCodeAt(D))){A+=(R=d-(D+A)%d)-1,k+=R}else k++}if(!n){!("vs-whitespace"===T)&&r||(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(p*k)),t.appendASCIIString('px"'))}
for(t.appendASCII(62);m<I;m++){v.setPartData(m,C,b,_);if(9===(L=o.charCodeAt(m))){for(y+=(R=d-(m+y)%d)-1,b+=R-1,R>0&&(R>1?t.write1(8594):t.write1(65515),R--);R>0;)t.write1(160),R--}else t.write1(183);b++}S=k}else{k=0;for(h&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);m<I;m++){v.setPartData(m,C,b,_);var L=o.charCodeAt(m);switch(L){case 9:var R=d-(m+y)%d;for(y+=R-1,b+=R-1;R>0;)t.write1(160),k++,R--;break;case 32:t.write1(160),k++;break;case 60:t.appendASCIIString("&lt;"),k++;break;case 62:t.appendASCIIString("&gt;"),k++;break;case 38:t.appendASCIIString("&amp;"),k++;break;case 0:t.appendASCIIString("&#00;"),k++;break;case 65279:case 8232:t.write1(65533),k++;break;default:i.isFullWidthCharacter(L)&&y++,g&&L<32?(t.write1(9216+L),k++):(t.write1(L),k++)}b++}S=k}t.appendASCIIString("</span>")}v.setPartData(s,u.length-1,b,_),a&&t.appendASCIIString("<span>&hellip;</span>");return t.appendASCIIString("</span>"),new l(v,h,r)}(function(e){var t,r,o=e.useMonospaceOptimizations,a=e.lineContent
;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<a.length?(t=!0,r=e.stopRenderingLineAfter):(t=!1,r=a.length);var c=function(e,t,n){var i=[],r=0;t>0&&(i[r++]=new s(t,""));for(var o=0,a=e.getCount();o<a;o++){var c=e.getEndOffset(o);if(!(c<=t)){var l=e.getClassName(o);if(c>=n){i[r++]=new s(n,l);break}i[r++]=new s(c,l)}}return i}(e.lineTokens,e.fauxIndentLength,r);2!==e.renderWhitespace&&1!==e.renderWhitespace||(c=function(e,t,n,r,o,a,c,l){var u,d=[],h=0,p=0,f=r[p].type,g=r[p].endIndex,v=i.firstNonWhitespaceIndex(e);-1===v?(v=t,u=t):u=i.lastNonWhitespaceIndex(e);for(var m=0,y=0;y<o;y++){9===(S=e.charCodeAt(y))?m=a:i.isFullWidthCharacter(S)?m+=2:m++}m%=a;for(var b=!1,y=o;y<t;y++){var S=e.charCodeAt(y),_=void 0;if(y<v||y>u)_=!0;else if(9===S)_=!0;else if(32===S)if(l)if(b)_=!0;else{var C=y+1<t?e.charCodeAt(y+1):0;_=32===C||9===C}else _=!0;else _=!1;b?(!_||!c&&m>=a)&&(d[h++]=new s(y,"vs-whitespace"),m%=a):(y===g||_&&y>o)&&(d[h++]=new s(y,f),m%=a),9===S?m=a:i.isFullWidthCharacter(S)?m+=2:m++,b=_,
y===g&&(f=r[++p].type,g=r[p].endIndex)}var E=!1;if(b)if(n&&l){var w=t>0?e.charCodeAt(t-1):0,I=t>1?e.charCodeAt(t-2):0;32===w&&32!==I&&9!==I||(E=!0)}else E=!0;return d[h++]=new s(t,E?"vs-whitespace":f),d}(a,r,e.continuesWithWrappedLine,c,e.fauxIndentLength,e.tabSize,o,1===e.renderWhitespace));var l=0;if(e.lineDecorations.length>0){for(var u=0,d=e.lineDecorations.length;u<d;u++){var p=e.lineDecorations[u];3===p.type?l|=1:1===p.type?l|=1:2===p.type&&(l|=2)}c=function(e,t,i,r){r.sort(n.LineDecoration.compare);for(var o=n.LineDecorationsNormalizer.normalize(e,r),a=o.length,c=0,l=[],u=0,d=0,h=0,p=i.length;h<p;h++){for(var f=i[h],g=f.endIndex,v=f.type;c<a&&o[c].startOffset<g;){var m=o[c];if(m.startOffset>d&&(d=m.startOffset,l[u++]=new s(d,v)),!(m.endOffset+1<=g)){d=g,l[u++]=new s(d,v+" "+m.className);break}d=m.endOffset+1,l[u++]=new s(d,v+" "+m.className),c++}g>d&&(d=g,l[u++]=new s(d,v))}var y=i[i.length-1].endIndex;if(c<a&&o[c].startOffset===y){for(var b=[];c<a&&o[c].startOffset===y;)b.push(o[c].className),c++
;l[u++]=new s(d,b.join(" "))}return l}(a,0,c,e.lineDecorations)}e.isBasicASCII&&!e.fontLigatures&&(c=function(e,t){for(var n=0,i=[],r=0,o=0,a=t.length;o<a;o++){var c=t[o],l=c.endIndex,u=l-n;if(u>50){for(var d=c.type,h=Math.ceil(u/50),p=1;p<h;p++){var f=n+50*p;i[r++]=new s(f,d)}i[r++]=new s(l,d)}else i[r++]=c;n=l}return i}(0,c));return new h(o,a,r,t,c,l,e.tabSize,e.containsRTL,e.spaceWidth,e.renderWhitespace,e.renderControlCharacters)}(e),t)}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Boundary=1]="Boundary",e[e.All=2]="All"}(t.RenderWhitespace||(t.RenderWhitespace={}));var s=function(){return function(e,t){this.endIndex=e,this.type=t}}(),a=function(){function e(e,t,n,i,r,o,s,a,c,l,u,d,h,p){this.useMonospaceOptimizations=e,this.lineContent=t,this.continuesWithWrappedLine=n,this.isBasicASCII=i,this.containsRTL=r,this.fauxIndentLength=o,this.lineTokens=s,this.lineDecorations=a,this.tabSize=c,this.spaceWidth=l,this.stopRenderingLineAfter=u,
this.renderWhitespace="all"===d?2:"boundary"===d?1:0,this.renderControlCharacters=h,this.fontLigatures=p}return e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&n.LineDecoration.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)},e}();t.RenderLineInput=a;!function(e){e[e.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",e[e.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",e[e.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",e[e.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"
}(t.CharacterMappingConstants||(t.CharacterMappingConstants={}));var c=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}return e.getPartIndex=function(e){return(4294901760&e)>>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n,i){var r=(t<<16|n<<0)>>>0;this._data[e]=r,this._absoluteOffsets[e]=i+n},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var r=(t<<16|i<<0)>>>0,o=0,s=this.length-1;o+1<s;){var a=o+s>>>1,c=this._data[a];if(c===r)return a;c>r?s=a:o=a}if(o===s)return o;var l=this._data[o],u=this._data[s];if(l===r)return o;if(u===r)return s;var d=e.getPartIndex(l);return i-e.getCharIndex(l)<=(d!==e.getPartIndex(u)?n:e.getCharIndex(u))-i?o:s},
e}();t.CharacterMapping=c;!function(e){e[e.None=0]="None",e[e.Before=1]="Before",e[e.After=2]="After"}(t.ForeignElementType||(t.ForeignElementType={}));var l=function(){return function(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}();t.RenderLineOutput=l,t.renderViewLine=o;var u=function(){return function(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}}();t.RenderLineOutput2=u,t.renderViewLine2=function(e){var t=r.createStringBuilder(1e4),n=o(e,t);return new u(n.characterMapping,t.build(),n.containsRTL,n.containsForeignElements)};var d,h=function(){return function(e,t,n,i,r,o,s,a,c,l,u){this.fontIsMonospace=e,this.lineContent=t,this.len=n,this.isOverflowing=i,this.parts=r,this.containsForeignElements=o,this.tabSize=s,this.containsRTL=a,this.spaceWidth=c,this.renderWhitespace=l,this.renderControlCharacters=u}}();!function(e){e[e.LongToken=50]="LongToken"}(d||(d={}))}),define(e[1074],t([1,0,19]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,r){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=r,this.visibleRange=new n.Range(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}return e.prototype.getViewLineRenderingData=function(e){return this._model.getViewLineRenderingData(this.visibleRange,e)},e.prototype.getDecorationsInViewport=function(){return this._model.getDecorationsInViewport(this.visibleRange)},e}();t.ViewportData=i}),define(e[1077],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._heights=[],this._minWidths=[],this._ids=[],this._afterLineNumbers=[],this._ordinals=[],this._prefixSum=[],this._prefixSumValidIndex=-1,
this._whitespaceId2Index={},this._lastWhitespaceId=0,this._minWidth=-1}return e.findInsertionIndex=function(e,t,n,i){for(var r=0,o=e.length;r<o;){var s=r+o>>>1;t===e[s]?i<n[s]?o=s:r=s+1:t<e[s]?o=s:r=s+1}return r},e.prototype.insertWhitespace=function(t,n,i,r){t|=0,n|=0,i|=0,r|=0;var o=++this._lastWhitespaceId,s=e.findInsertionIndex(this._afterLineNumbers,t,this._ordinals,n);return this._insertWhitespaceAtIndex(o,s,t,n,i,r),this._minWidth=-1,o},e.prototype._insertWhitespaceAtIndex=function(e,t,n,i,r,o){e|=0,t|=0,n|=0,i|=0,r|=0,o|=0,this._heights.splice(t,0,r),this._minWidths.splice(t,0,o),this._ids.splice(t,0,e),this._afterLineNumbers.splice(t,0,n),this._ordinals.splice(t,0,i),this._prefixSum.splice(t,0,0);for(var s=Object.keys(this._whitespaceId2Index),a=0,c=s.length;a<c;a++){var l=s[a],u=this._whitespaceId2Index[l];u>=t&&(this._whitespaceId2Index[l]=u+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){
e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,i=this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var n=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._heights[i]!==t)return this._heights[i]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){n|=0;var i=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var r=this._whitespaceId2Index[i];if(this._afterLineNumbers[r]!==n){var o=this._ordinals[r],s=this._heights[r],a=this._minWidths[r];this.removeWhitespace(t);var c=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,o);return this._insertWhitespaceAtIndex(t,c,n,o,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],
this._removeWhitespaceAtIndex(n),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),n=0,i=t.length;n<i;n++){var r=t[n],o=this._whitespaceId2Index[r];o>=e&&(this._whitespaceId2Index[r]=o-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n<i;n++){var r=this._afterLineNumbers[n];e<=r&&r<=t?this._afterLineNumbers[n]=e-1:r>t&&(this._afterLineNumbers[n]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n<i;n++){e<=this._afterLineNumbers[n]&&(this._afterLineNumbers[n]+=t-e+1)}},e.prototype.getTotalHeight=function(){return 0===this._heights.length?0:this.getAccumulatedHeight(this._heights.length-1)},
e.prototype.getAccumulatedHeight=function(e){e|=0;var t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._prefixSum[0]=this._heights[0],t++);for(var n=t;n<=e;n++)this._prefixSum[n]=this._prefixSum[n-1]+this._heights[n];return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._prefixSum[e]},e.prototype.getAccumulatedHeightBeforeLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getAccumulatedHeight(t)},e.prototype._findLastWhitespaceBeforeLineNumber=function(e){e|=0;for(var t=this._afterLineNumbers,n=0,i=t.length-1;n<=i;){var r=n+((i-n|0)/2|0)|0;if(t[r]<e){if(r+1>=t.length||t[r+1]>=e)return r;n=r+1|0}else i=r-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t<this._heights.length?t:-1},e.prototype.getFirstWhitespaceIndexAfterLineNumber=function(e){return e|=0,this._findFirstWhitespaceAfterLineNumber(e)},e.prototype.getCount=function(){
return this._heights.length},e.prototype.getMinWidth=function(){if(-1===this._minWidth){for(var e=0,t=0,n=this._minWidths.length;t<n;t++)e=Math.max(e,this._minWidths[t]);this._minWidth=e}return this._minWidth},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return e|=0,this._afterLineNumbers[e]},e.prototype.getIdForWhitespaceIndex=function(e){return e|=0,this._ids[e]},e.prototype.getHeightForWhitespaceIndex=function(e){return e|=0,this._heights[e]},e.prototype.getWhitespaces=function(e){e|=0;for(var t=[],n=0;n<this._heights.length;n++)t.push({id:this._ids[n],afterLineNumber:this._afterLineNumbers[n],heightInLines:this._heights[n]/e});return t},e}();t.WhitespaceComputer=n}),define(e[1078],t([1,0,1077]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._lineCount=e,this._lineHeight=t,this._whitespaces=new n.WhitespaceComputer}return e.prototype.setLineHeight=function(e){this._lineHeight=e},e.prototype.onFlushed=function(e){
this._lineCount=e},e.prototype.insertWhitespace=function(e,t,n,i){return this._whitespaces.insertWhitespace(e,t,n,i)},e.prototype.changeWhitespace=function(e,t,n){return this._whitespaces.changeWhitespace(e,t,n)},e.prototype.removeWhitespace=function(e){return this._whitespaces.removeWhitespace(e)},e.prototype.onLinesDeleted=function(e,t){this._lineCount-=t-e+1,this._whitespaces.onLinesDeleted(e,t)},e.prototype.onLinesInserted=function(e,t){this._lineCount+=t-e+1,this._whitespaces.onLinesInserted(e,t)},e.prototype.getLinesTotalHeight=function(){return this._lineHeight*this._lineCount+this._whitespaces.getTotalHeight()},e.prototype.getVerticalOffsetForLineNumber=function(e){return((e|=0)>1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this._whitespaces.getCount()>0},
e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,r=t;i<r;){var o=(i+r)/2|0,s=0|this.getVerticalOffsetForLineNumber(o);if(e>=s+n)i=o+1;else{if(e>=s)return o;r=o}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var n,i,r=this._lineHeight,o=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(o),a=0|this._lineCount,c=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(o),l=0|this._whitespaces.getCount();-1===c?(c=l,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(c),n=0|this._whitespaces.getHeightForWhitespaceIndex(c));var u=s,d=u,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),d-=h=Math.floor(h/r)*r);for(var p=[],f=e+(t-e)/2,g=-1,v=o;v<=a;v++){if(-1===g){var m=u;(m<=f&&f<u+r||m>f)&&(g=v)}for(u+=r,
p[v-o]=d,d+=r;i===v;)d+=n,u+=n,++c>=l?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(c),n=0|this._whitespaces.getHeightForWhitespaceIndex(c));if(u>=t){a=v;break}}-1===g&&(g=a);var y=0|this.getVerticalOffsetForLineNumber(a),b=o,S=a;return b<S&&s<e&&b++,b<S&&y+r>t&&S--,{bigNumbersDelta:h,startLineNumber:o,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:S}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t,n=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);t=n>=1?this._lineHeight*n:0;var i;return i=e>0?this._whitespaces.getAccumulatedHeight(e-1):0,t+i},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i,r=0,o=this._whitespaces.getCount()-1;if(o<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(o)+this._whitespaces.getHeightForWhitespaceIndex(o))return-1;for(;r<o;)if(t=Math.floor((r+o)/2),n=this.getVerticalOffsetForWhitespaceIndex(t),
i=this._whitespaces.getHeightForWhitespaceIndex(t),e>=n+i)r=t+1;else{if(e>=n)return t;o=t}return r},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var r=[],o=n;o<=i;o++){var s=this.getVerticalOffsetForWhitespaceIndex(o),a=this._whitespaces.getHeightForWhitespaceIndex(o);if(s>=t)break;r.push({id:this._whitespaces.getIdForWhitespaceIndex(o),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:s,
height:a})}return r},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}();t.LinesLayout=i}),define(e[326],t([1,0,269]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t){this.index=e,this.remainder=t}}();t.PrefixSumIndexOfResult=i;var r=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=n.toUint32(e);var i=this.values,r=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),
this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)},e.prototype.removeValues=function(e,t){e=n.toUint32(e),t=n.toUint32(t);var i=this.values,r=this.prefixSum;if(e>=i.length)return!1;var o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},
e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,n,r,o=0,s=this.values.length-1;o<=s;)if(t=o+(s-o)/2|0,n=this.prefixSum[t],r=n-this.values[t],e<r)s=t-1;else{if(!(e>=n))break;o=t+1}return new i(t,e-r)},e}();t.PrefixSumComputer=r;var o=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new r(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){
this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t<this._cache.length)return this._cache[t]}return this._actual.getIndexOf(e)},e.prototype.warmUpCache=function(e,t){for(var n=[],i=e;i<=t;i++)n[i-e]=this.getIndexOf(i);this._cache=n,this._cacheAccumulatedValueStart=e},e}();t.PrefixSumComputerWithCache=o}),define(e[1080],t([1,0,326,39]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i}return e.prototype.dispose=function(){this._lines.length=0},Object.defineProperty(e.prototype,"version",{get:function(){
return this._versionId},enumerable:!0,configurable:!0}),e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);for(var t=e.changes,n=0,r=t.length;n<r;n++){var o=t[n];this._acceptDeleteRange(o.range),this._acceptInsertText(new i.Position(o.range.startLineNumber,o.range.startColumn),o.text)}this._versionId=e.versionId},e.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,i=new Uint32Array(t),r=0;r<t;r++)i[r]=this._lines[r].length+e;this._lineStarts=new n.PrefixSumComputer(i)}},e.prototype._setLineText=function(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)},e.prototype._acceptDeleteRange=function(e){
if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}},e.prototype._acceptInsertText=function(e,t){if(0!==t.length){var n=t.split(/\r\n|\r|\n/);if(1!==n.length){n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);for(var i=new Uint32Array(n.length-1),r=1;r<n.length;r++)this._lines.splice(e.lineNumber+r-1,0,n[r]),i[r-1]=n[r].length+this._eol.length
;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,i)}else this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1))}},e}();t.MirrorTextModel=r}),define(e[1081],t([1,0,10,4,19,1e3,373,39,1080,1043,1056,237,1064,11]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},
t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=h.getWordAtText(e.column,h.ensureValidWordDefinition(t),this._lines[e.lineNumber-1],0);return n?new o.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.createWordIterator=function(e){var t,n=this,i={done:!1,value:""},r=0,o=0,s=[],a=function(){if(o<s.length)i.done=!1,i.value=t.substring(s[o].start,s[o].end),o+=1;else{if(!(r>=n._lines.length))return t=n._lines[r],s=n._wordenize(t,e),o=0,r+=1,a();i.done=!0,i.value=void 0}return i};return{next:a}},t.prototype._wordenize=function(e,t){var n,i=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i},
t.prototype.getValueInRange=function(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,r=[];r.push(this._lines[n].substring(e.startColumn-1));for(var o=n+1;o<i;o++)r.push(this._lines[o]);return r.push(this._lines[i].substring(0,e.endColumn-1)),r.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn})
;return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e},t.prototype._validatePosition=function(e){if(!c.Position.isIPosition(e))throw new Error("bad position");var t=e.lineNumber,n=e.column,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var r=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>r&&(n=r,i=!0)}return i?{lineNumber:t,column:n}:e},t}(l.MirrorTextModel),v=function(){function t(e){this._foreignModuleFactory=e,this._foreignModule=null}return t.prototype.computeDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var a=i.getLinesContent(),c=o.getLinesContent(),l=new s.DiffComputer(a,c,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return r.TPromise.as(l.computeDiff())},
t.prototype.computeDirtyDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var a=i.getLinesContent(),c=o.getLinesContent(),l=new s.DiffComputer(a,c,{shouldComputeCharChanges:!1,shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return r.TPromise.as(l.computeDiff())},t.prototype.computeMoreMinimalEdits=function(e,n){var i=this._getModel(e);if(!i)return r.TPromise.as(n);for(var s,c=[],l=0,u=n;l<u.length;l++){var d=u[l],h=d.range,p=d.text,f=d.eol;if("number"==typeof f&&(s=f),h){var g=i.getValueInRange(h);if(p=p.replace(/\r\n|\n|\r/g,i.eol),g!==p)if(Math.max(p.length,g.length)>t._diffLimit)c.push({range:h,text:p});else for(var v=a.stringDiff(g,p,!1),m=i.offsetAt(o.Range.lift(h).getStartPosition()),y=0,b=v;y<b.length;y++){var S=b[y],_=i.positionAt(m+S.originalStart),C=i.positionAt(m+S.originalStart+S.originalLength),E={text:p.substr(S.modifiedStart,S.modifiedLength),range:{startLineNumber:_.lineNumber,startColumn:_.column,
endLineNumber:C.lineNumber,endColumn:C.column}};i.getValueInRange(E.range)!==E.text&&c.push(E)}}}return"number"==typeof s&&c.push({eol:s,text:void 0,range:void 0}),r.TPromise.as(c)},t.prototype.computeLinks=function(e){var t=this._getModel(e);return t?r.TPromise.as(u.computeLinks(t)):null},t.prototype.textualSuggest=function(e,n,i,o){var s=this._getModel(e);if(s){var a=[],c=new RegExp(i,o),l=s.getWordUntilPosition(n,c).word,u=Object.create(null);u[l]=!0;for(var d=s.createWordIterator(c),h=d.next();!h.done&&a.length<=t._suggestionsLimit;h=d.next()){var p=h.value;u[p]||(u[p]=!0,isNaN(Number(p))&&a.push({type:"text",label:p,insertText:p,noAutoAccept:!0,overwriteBefore:l.length}))}return r.TPromise.as({suggestions:a})}},t.prototype.navigateValueSet=function(e,t,n,i,o){var s=this._getModel(e);if(!s)return null;var a=new RegExp(i,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1})
;var c=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},a),u=null;null!==l&&(u=s.getValueInRange(l));var h=d.BasicInplaceReplace.INSTANCE.navigateValueSet(t,c,l,u,n);return r.TPromise.as(h)},t.prototype.loadForeignModule=function(t,n){var i=this,o={getMirrorModels:function(){return i._getModels()}};if(this._foreignModuleFactory){this._foreignModule=this._foreignModuleFactory(o,n);var s=[];for(var a in this._foreignModule)"function"==typeof this._foreignModule[a]&&s.push(a);return r.TPromise.as(s)}return new r.TPromise(function(r,s){e([t],function(e){i._foreignModule=e.create(o,n);var t=[];for(var s in i._foreignModule)"function"==typeof i._foreignModule[s]&&t.push(s);r(t)},s)})},t.prototype.fmr=function(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return r.TPromise.wrapError(new Error("Missing requestHandler or method: "+e));try{return r.TPromise.as(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){
return r.TPromise.wrapError(e)}},t._diffLimit=1e4,t._suggestionsLimit=1e4,t}();t.BaseEditorSimpleWorker=v;var m=function(e){function t(t){var n=e.call(this,t)||this;return n._models=Object.create(null),n}return n(t,e),t.prototype.dispose=function(){this._models=Object.create(null)},t.prototype._getModel=function(e){return this._models[e]},t.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach(function(n){return t.push(e._models[n])}),t},t.prototype.acceptNewModel=function(e){this._models[e.url]=new g(i.default.parse(e.url),e.lines,e.EOL,e.versionId)},t.prototype.acceptModelChanged=function(e,t){if(this._models[e]){this._models[e].onEvents(t)}},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t}(v);t.EditorSimpleWorkerImpl=m,t.create=function(){return new m(null)},"function"==typeof importScripts&&(f.globals.monaco=p.createMonacoBaseAPI())}),define(e[227],t([1,0,5]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0
});var r=function(e){function t(){var t=e.call(this)||this;return t._shouldRender=!0,t}return n(t,e),t.prototype.shouldRender=function(){return this._shouldRender},t.prototype.forceShouldRender=function(){this._shouldRender=!0},t.prototype.setShouldRender=function(){this._shouldRender=!0},t.prototype.onDidRender=function(){this._shouldRender=!1},t.prototype.onConfigurationChanged=function(e){return!1},t.prototype.onCursorStateChanged=function(e){return!1},t.prototype.onDecorationsChanged=function(e){return!1},t.prototype.onFlushed=function(e){return!1},t.prototype.onFocusChanged=function(e){return!1},t.prototype.onLanguageConfigurationChanged=function(e){return!1},t.prototype.onLineMappingChanged=function(e){return!1},t.prototype.onLinesChanged=function(e){return!1},t.prototype.onLinesDeleted=function(e){return!1},t.prototype.onLinesInserted=function(e){return!1},t.prototype.onRevealRangeRequest=function(e){return!1},t.prototype.onScrollChanged=function(e){return!1},t.prototype.onTokensChanged=function(e){
return!1},t.prototype.onTokensColorsChanged=function(e){return!1},t.prototype.onZonesChanged=function(e){return!1},t.prototype.onThemeChanged=function(e){return!1},t.prototype.handleEvents=function(e){for(var t=!1,n=0,i=e.length;n<i;n++){var r=e[n];switch(r.type){case 1:this.onConfigurationChanged(r)&&(t=!0);break;case 2:this.onCursorStateChanged(r)&&(t=!0);break;case 3:this.onDecorationsChanged(r)&&(t=!0);break;case 4:this.onFlushed(r)&&(t=!0);break;case 5:this.onFocusChanged(r)&&(t=!0);break;case 16:this.onLanguageConfigurationChanged(r)&&(t=!0);break;case 6:this.onLineMappingChanged(r)&&(t=!0);break;case 7:this.onLinesChanged(r)&&(t=!0);break;case 8:this.onLinesDeleted(r)&&(t=!0);break;case 9:this.onLinesInserted(r)&&(t=!0);break;case 10:this.onRevealRangeRequest(r)&&(t=!0);break;case 11:this.onScrollChanged(r)&&(t=!0);break;case 12:this.onTokensChanged(r)&&(t=!0);break;case 13:this.onTokensColorsChanged(r)&&(t=!0);break;case 14:this.onZonesChanged(r)&&(t=!0);break;case 15:this.onThemeChanged(r)&&(t=!0)
;break;default:console.info("View received unknown event: "),console.info(r)}}t&&(this._shouldRender=!0)},t}(i.Disposable);t.ViewEventHandler=r}),define(e[188],t([1,0,227]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ViewEventHandler);t.DynamicViewOverlay=r}),define(e[116],t([1,0,227,85]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t}(i.ViewEventHandler);t.ViewPart=o;!function(e){e[e.None=0]="None",e[e.ContentWidgets=1]="ContentWidgets",e[e.OverflowingContentWidgets=2]="OverflowingContentWidgets",e[e.OverflowGuard=3]="OverflowGuard",e[e.OverlayWidgets=4]="OverlayWidgets",
e[e.ScrollableElement=5]="ScrollableElement",e[e.TextArea=6]="TextArea",e[e.ViewLines=7]="ViewLines",e[e.Minimap=8]="Minimap"}(t.PartFingerprint||(t.PartFingerprint={}));var s=function(){function e(){}return e.write=function(e,t){r.FastDomNode,e.setAttribute("data-mprt",String(t))},e.read=function(e){var t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)},e.collect=function(e,t){for(var n=[],i=0;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),e=e.parentElement;for(var r=new Uint8Array(i),o=0;o<i;o++)r[o]=n[i-o-1];return r},e}();t.PartFingerprints=s}),define(e[1085],t([1,0,8,85,45,116]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t){this.top=e,this.left=t}}(),c=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=r.createFastDomNode(document.createElement("div")),s.PartFingerprints.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),
i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=r.createFastDomNode(document.createElement("div")),s.PartFingerprints.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var r=t[n];this._widgets[r].onConfigurationChanged(e)}return!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLineMappingChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var r=t[n];this._widgets[r].onLineMappingChanged(e)}return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){
return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.addWidget=function(e){var t=new l(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t,n){this._widgets[e.getId()].setPosition(t,n),this.setShouldRender()},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t];delete this._widgets[t];var i=n.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}},t.prototype.shouldSuppressMouseDownOnWidget=function(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown},t.prototype.onBeforeRender=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var r=t[n];this._widgets[r].onBeforeRender(e)}},t.prototype.prepareRender=function(e){
for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var r=t[n];this._widgets[r].prepareRender(e)}},t.prototype.render=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var r=t[n];this._widgets[r].render(e)}},t}(s.ViewPart);t.ViewContentWidgets=c;var l=function(){function e(e,t,n){this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=r.createFastDomNode(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this._fixedOverflowWidgets=this._context.configuration.editor.viewInfo.fixedOverflowWidgets,this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth,this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,this._lineHeight=this._context.configuration.editor.lineHeight,this._setPosition(null),this._preference=null,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,
this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}return e.prototype.onConfigurationChanged=function(e){e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth,this._maxWidth=this._getMaxWidth())},e.prototype.onLineMappingChanged=function(e){this._setPosition(this._position)},e.prototype._setPosition=function(e){if(this._position=e,this._viewPosition=null,this._position){var t=this._context.model.validateModelPosition(this._position)
;this._context.model.coordinatesConverter.modelPositionIsVisible(t)&&(this._viewPosition=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t))}},e.prototype._getMaxWidth=function(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth},e.prototype.setPosition=function(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1},e.prototype._layoutBoxInViewport=function(e,t,n,i){var r=e.top,o=r,s=e.top+this._lineHeight,a=r-n,c=o>=n,l=s,u=i.viewportHeight-s>=n,d=e.left;return d+t>i.scrollLeft+i.viewportWidth&&(d=i.scrollLeft+i.viewportWidth-t),d<i.scrollLeft&&(d=i.scrollLeft),{aboveTop:a,fitsAbove:c,belowTop:l,fitsBelow:u,left:d}},e.prototype._layoutBoxInPage=function(e,t,n,r){var o=e.left-r.scrollLeft;if(o<0||o>this._contentWidth)return null
;var s=e.top-n,a=e.top+this._lineHeight,c=o+this._contentLeft,l=i.getDomNodePagePosition(this._viewDomNode.domNode),u=l.top+s-i.StandardWindow.scrollY,d=l.top+a-i.StandardWindow.scrollY,h=l.left+c-i.StandardWindow.scrollX,p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=u>=22,g=d+n<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;if(h+t+20>p){h-=v=h-(p-t-20),c-=v}if(h<0){var v=h;h-=v,c-=v}return this._fixedOverflowWidgets&&(s=u,a=d,c=h),{aboveTop:s,fitsAbove:f,belowTop:a,fitsBelow:g,left:c}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new a(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null;var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new a(n,t.left)},e.prototype._prepareRenderWidget=function(e,t){var n=this;if(!e)return null
;for(var i=null,r=function(){if(!i){if(-1===n._cachedDomNodeClientWidth||-1===n._cachedDomNodeClientHeight){var r=n.domNode.domNode;n._cachedDomNodeClientWidth=r.clientWidth,n._cachedDomNodeClientHeight=r.clientHeight}i=n.allowEditorOverflow?n._layoutBoxInPage(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t):n._layoutBoxInViewport(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t)}},s=1;s<=2;s++)for(var c=0;c<this._preference.length;c++){var l=this._preference[c];if(l===o.ContentWidgetPositionPreference.ABOVE){if(r(),!i)return null;if(2===s||i.fitsAbove)return new a(i.aboveTop,i.left)}else{if(l!==o.ContentWidgetPositionPreference.BELOW)return this.allowEditorOverflow?this._prepareRenderWidgetAtExactPositionOverflowing(e):e;if(r(),!i)return null;if(2===s||i.fitsBelow)return new a(i.belowTop,i.left)}}return null},e.prototype.onBeforeRender=function(e){
this._viewPosition&&this._preference&&(this._viewPosition.lineNumber<e.startLineNumber||this._viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}()}),define(e[1086],t([1,0,188,19,230,1156]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){
var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},
t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,s=t.length;o<s;o++){var a=t[o];a.options.className&&(n[i++]=a)}n=n.sort(function(e,t){if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return n<i?-1:n>i?1:r.Range.compareRangesUsingStarts(e.range,t.range)});for(var c=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,u=[],d=c;d<=l;d++){u[d-c]=""}this._renderWholeLineDecorations(e,n,u),this._renderNormalDecorations(e,n,u),this._renderResult=u},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,s=0,a=t.length;s<a;s++){var c=t[s]
;if(c.options.isWholeLine)for(var l='<div class="cdr '+c.options.className+'" style="left:0;width:100%;height:'+i+'px;"></div>',u=Math.max(c.range.startLineNumber,r),d=Math.min(c.range.endLineNumber,o),h=u;h<=d;h++){n[h-r]+=l}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=null,a=!1,c=null,l=0,u=t.length;l<u;l++){var d=t[l];if(!d.options.isWholeLine){var h=d.options.className,p=d.options.showIfCollapsed,f=d.range;p&&1===f.endColumn&&f.endLineNumber!==f.startLineNumber&&(f=new r.Range(f.startLineNumber,f.startColumn,f.endLineNumber-1,this._context.model.getLineMaxColumn(f.endLineNumber-1))),s===h&&a===p&&r.Range.areIntersectingOrTouching(c,f)?c=r.Range.plusRange(c,f):(null!==s&&this._renderNormalDecoration(e,c,s,a,i,o,n),s=h,a=p,c=f)}}null!==s&&this._renderNormalDecoration(e,c,s,a,i,o,n)},t.prototype._renderNormalDecoration=function(e,t,n,i,r,s,a){var c=e.linesVisibleRangesForRange(t,"findMatch"===n)
;if(c)for(var l=0,u=c.length;l<u;l++){var d=c[l],h=d.lineNumber-s;if(i&&1===d.ranges.length){var p=d.ranges[0];0===p.width&&(d.ranges[0]=new o.HorizontalRange(p.left,this._typicalHalfwidthCharacterWidth))}for(var f=0,g=d.ranges.length;f<g;f++){var v=d.ranges[f],m='<div class="cdr '+n+'" style="left:'+String(v.left)+"px;width:"+String(v.width)+"px;height:"+r+'px;"></div>';a[h]+=m}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(i.DynamicViewOverlay);t.DecorationsOverlay=s}),define(e[314],t([1,0,188,1159]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}();t.DecorationToRender=r;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._render=function(e,t,n){for(var i=[],r=e;r<=t;r++){i[r-e]=[]}if(0===n.length)return i
;n.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1});for(var o=null,s=0,a=0,c=n.length;a<c;a++){var l=n[a],u=l.className,d=Math.max(l.startLineNumber,e)-e,h=Math.min(l.endLineNumber,t)-e;o===u?(d=Math.max(s+1,d),s=Math.max(s,h)):(o=u,s=h);for(var p=d;p<=s;p++)i[p].push(o)}return i},t}(i.DynamicViewOverlay);t.DedupOverlay=o;var s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._glyphMargin=n._context.configuration.editor.viewInfo.glyphMargin,n._glyphMarginLeft=n._context.configuration.editor.layoutInfo.glyphMarginLeft,n._glyphMarginWidth=n._context.configuration.editor.layoutInfo.glyphMarginWidth,n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,
e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._glyphMargin=this._context.configuration.editor.viewInfo.glyphMargin),e.layoutInfo&&(this._glyphMarginLeft=this._context.configuration.editor.layoutInfo.glyphMarginLeft,this._glyphMarginWidth=this._context.configuration.editor.layoutInfo.glyphMarginWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,s=t.length;o<s;o++){var a=t[o],c=a.options.glyphMarginClassName
;c&&(n[i++]=new r(a.range.startLineNumber,a.range.endLineNumber,c))}return n},t.prototype.prepareRender=function(e){if(this._glyphMargin){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),r=this._lineHeight.toString(),o='" style="left:'+this._glyphMarginLeft.toString()+"px;width:"+this._glyphMarginWidth.toString()+"px;height:"+r+'px;"></div>',s=[],a=t;a<=n;a++){var c=a-t,l=i[c];0===l.length?s[c]="":s[c]='<div class="cgmr '+l.join(" ")+o}this._renderResult=s}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(o);t.GlyphMarginOverlay=s}),define(e[1088],t([1,0,314,1181]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft,
n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],r=0,o=0,s=t.length;o<s;o++){
var a=t[o],c=a.options.linesDecorationsClassName;c&&(n[r++]=new i.DecorationToRender(a.range.startLineNumber,a.range.endLineNumber,c))}return n},t.prototype.prepareRender=function(e){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),r='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',o=[],s=t;s<=n;s++){for(var a=s-t,c=i[a],l="",u=0,d=c.length;u<d;u++)l+='<div class="cldr '+c[u]+r;o[a]=l}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(i.DedupOverlay);t.LinesDecorationsOverlay=r}),define(e[488],t([1,0,85,116]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n._canUseLayerHinting=n._context.configuration.editor.canUseLayerHinting,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,
n._glyphMarginLeft=n._context.configuration.editor.layoutInfo.glyphMarginLeft,n._glyphMarginWidth=n._context.configuration.editor.layoutInfo.glyphMarginWidth,n._domNode=n._createDomNode(),n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._createDomNode=function(){var e=i.createFastDomNode(document.createElement("div"));return e.setClassName(t.OUTER_CLASS_NAME),e.setPosition("absolute"),e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=i.createFastDomNode(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),e.appendChild(this._glyphMarginBackgroundDomNode),e},t.prototype.onConfigurationChanged=function(e){return e.canUseLayerHinting&&(this._canUseLayerHinting=this._context.configuration.editor.canUseLayerHinting),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,
this._glyphMarginLeft=this._context.configuration.editor.layoutInfo.glyphMarginLeft,this._glyphMarginWidth=this._context.configuration.editor.layoutInfo.glyphMarginWidth),!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting);var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t}(r.ViewPart);t.Margin=o}),define(e[1091],t([1,0,314,1187]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this
;return n._context=t,n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],r=0,o=0,s=t.length;o<s;o++){var a=t[o],c=a.options.marginClassName;c&&(n[r++]=new i.DecorationToRender(a.range.startLineNumber,a.range.endLineNumber,c))}return n},t.prototype.prepareRender=function(e){
for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),r=[],o=t;o<=n;o++){for(var s=o-t,a=i[s],c="",l=0,u=a.length;l<u;l++)c+='<div class="cmdr '+a[l]+'" style=""></div>';r[s]=c}this._renderResult=r},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(i.DedupOverlay);t.MarginViewLineDecorationsOverlay=r}),define(e[1095],t([1,0,85,45,116,1189]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this,t)||this;return n._widgets={},n._verticalScrollbarWidth=n._context.configuration.editor.layoutInfo.verticalScrollbarWidth,n._minimapWidth=n._context.configuration.editor.layoutInfo.minimapWidth,n._horizontalScrollbarHeight=n._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,n._editorHeight=n._context.configuration.editor.layoutInfo.height,n._editorWidth=n._context.configuration.editor.layoutInfo.width,
n._domNode=i.createFastDomNode(document.createElement("div")),o.PartFingerprints.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=i.createFastDomNode(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),
this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===r.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===r.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===r.OverlayWidgetPositionPreference.TOP_CENTER&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},
t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var r=t[n];this._renderWidget(this._widgets[r])}},t}(o.ViewPart);t.ViewOverlayWidgets=s}),define(e[1096],t([1,0,227,456,85]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n){var i=e.call(this)||this;return i._context=t,i._domNode=o.createFastDomNode(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._zoneManager=new r.OverviewZoneManager(function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)}),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(i._context.configuration.editor.lineHeight),i._zoneManager.setPixelRatio(i._context.configuration.editor.pixelRatio),i._context.addEventHandler(i),i}return n(t,e),
t.prototype.dispose=function(){this._context.removeEventHandler(this),this._zoneManager=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight),this._render()),e.pixelRatio&&(this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio),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},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){
this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(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())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var r=0,o=0,s=0,a=0,c=t.length;a<c;a++){var l=t[a],u=l.colorId,d=l.from,h=l.to;u!==r?(e.fillRect(0,o,i,s-o),r=u,
e.fillStyle=n[r],o=d,s=h):s>=d?s=Math.max(s,h):(e.fillRect(0,o,i,s-o),o=d,s=h)}e.fillRect(0,o,i,s-o)},t}(i.ViewEventHandler);t.OverviewRuler=s}),define(e[1103],t([1,0,9,85,116,39]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n._lineHeight=n._context.configuration.editor.lineHeight,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode=r.createFastDomNode(document.createElement("div")),n.domNode.setClassName("view-zones"),n.domNode.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.marginDomNode=r.createFastDomNode(document.createElement("div")),n.marginDomNode.setClassName("margin-view-zones"),n.marginDomNode.setPosition("absolute"),n.marginDomNode.setAttribute("role","presentation"),n.marginDomNode.setAttribute("aria-hidden","true"),
n._zones={},n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=!1,t=Object.keys(this._zones),n=0,i=t.length;n<i;n++){var r=t[n],o=this._zones[r],s=this._computeWhitespaceProps(o.delegate);this._context.viewLayout.changeWhitespace(parseInt(r,10),s.afterViewLineNumber,s.heightInPx)&&(this._safeCallOnComputedHeight(o.delegate,s.heightInPx),e=!0)}return e},t.prototype.onConfigurationChanged=function(e){return e.lineHeight?(this._lineHeight=this._context.configuration.editor.lineHeight,this._recomputeWhitespacesProps()):(e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth,this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0)},t.prototype.onLineMappingChanged=function(e){var t=this._recomputeWhitespacesProps();return t&&this._context.viewLayout.onHeightMaybeChanged(),t},t.prototype.onLinesDeleted=function(e){return!0},
t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype._getZoneOrdinal=function(e){return void 0!==e.afterColumn?e.afterColumn:1e4},t.prototype._computeWhitespaceProps=function(e){if(0===e.afterLineNumber)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};var t;if(void 0!==e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{var n=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new s.Position(n,this._context.model.getModelLineMaxColumn(n))}var i;i=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1})
;var r=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),o=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{afterViewLineNumber:r.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}},t.prototype.addZone=function(e){var t=this._computeWhitespaceProps(e),n={whitespaceId:this._context.viewLayout.addWhitespace(t.afterViewLineNumber,this._getZoneOrdinal(e),t.heightInPx,t.minWidthInPx),delegate:e,isVisible:!1,domNode:r.createFastDomNode(e.domNode),marginDomNode:e.marginDomNode?r.createFastDomNode(e.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,t.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId.toString()),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),
n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId.toString()),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId.toString()]=n,this.setShouldRender(),n.whitespaceId},t.prototype.removeZone=function(e){if(this._zones.hasOwnProperty(e.toString())){var t=this._zones[e.toString()];return delete this._zones[e.toString()],this._context.viewLayout.removeWhitespace(t.whitespaceId),t.domNode.removeAttribute("monaco-visible-view-zone"),t.domNode.removeAttribute("monaco-view-zone"),t.domNode.domNode.parentNode.removeChild(t.domNode.domNode),t.marginDomNode&&(t.marginDomNode.removeAttribute("monaco-visible-view-zone"),t.marginDomNode.removeAttribute("monaco-view-zone"),t.marginDomNode.domNode.parentNode.removeChild(t.marginDomNode.domNode)),this.setShouldRender(),!0}return!1},t.prototype.layoutZone=function(e){var t=!1;if(this._zones.hasOwnProperty(e.toString())){var n=this._zones[e.toString()],i=this._computeWhitespaceProps(n.delegate)
;(t=this._context.viewLayout.changeWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx)||t)&&(this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender())}return t},t.prototype.shouldSuppressMouseDownOnViewZone=function(e){if(this._zones.hasOwnProperty(e.toString())){return this._zones[e.toString()].delegate.suppressMouseDown}return!1},t.prototype._heightInPixels=function(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight},t.prototype._minWidthInPixels=function(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0},t.prototype._safeCallOnComputedHeight=function(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){i.onUnexpectedError(e)}},t.prototype._safeCallOnDomNodeTop=function(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){i.onUnexpectedError(e)}},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){
for(var t=e.viewportData.whitespaceViewportData,n={},i=!1,r=0,o=t.length;r<o;r++)n[t[r].id.toString()]=t[r],i=!0;for(var s=Object.keys(this._zones),r=0,o=s.length;r<o;r++){var a=s[r],c=this._zones[a],l=0,u=0,d="none";n.hasOwnProperty(a)?(l=n[a].verticalOffset-e.bigNumbersDelta,u=n[a].height,d="block",c.isVisible||(c.domNode.setAttribute("monaco-visible-view-zone","true"),c.isVisible=!0),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(n[a].verticalOffset))):(c.isVisible&&(c.domNode.removeAttribute("monaco-visible-view-zone"),c.isVisible=!1),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),c.domNode.setTop(l),c.domNode.setHeight(u),c.domNode.setDisplay(d),c.marginDomNode&&(c.marginDomNode.setTop(l),c.marginDomNode.setHeight(u),c.marginDomNode.setDisplay(d))}i&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))},t}(o.ViewPart);t.ViewZones=a}),define(e[209],t([1,0,14]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}}();t.Viewport=i;var r=function(){return function(e,t){this.tabSize=e,this.data=t}}();t.MinimapLinesRenderingData=r;var o=function(){return function(e,t,n,i,r){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.tokens=r}}();t.ViewLineData=o;var s=function(){function e(t,n,i,r,o,s,a,c,l){this.minColumn=t,this.maxColumn=n,this.content=i,this.continuesWithWrappedLine=r,this.isBasicASCII=e.isBasicASCII(i,s),this.containsRTL=e.containsRTL(i,this.isBasicASCII,o),this.tokens=a,this.inlineDecorations=c,this.tabSize=l}return e.isBasicASCII=function(e,t){return!t||n.isBasicASCII(e)},e.containsRTL=function(e,t,i){return!(t||!i)&&n.containsRTL(e)},e}();t.ViewLineRenderingData=s;!function(e){e[e.Regular=0]="Regular",e[e.Before=1]="Before",e[e.After=2]="After",e[e.RegularAffectingLetterSpacing=3]="RegularAffectingLetterSpacing"
}(t.InlineDecorationType||(t.InlineDecorationType={}));var a=function(){return function(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}();t.InlineDecoration=a;var c=function(){return function(e,t){this.range=e,this.options=t}}();t.ViewModelDecoration=c}),define(e[1106],t([1,0,5,101,1078,209]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n,i){var s=e.call(this)||this;return s._configuration=t,s._linesLayout=new o.LinesLayout(n,s._configuration.editor.lineHeight),s.scrollable=s._register(new r.Scrollable(0,i)),s._configureSmoothScrollDuration(),s.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),s.onDidScroll=s.scrollable.onScroll,s._updateHeight(),s}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){
this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling?125:0)},t.prototype.onConfigurationChanged=function(e){e.lineHeight&&this._linesLayout.setLineHeight(this._configuration.editor.lineHeight),e.layoutInfo&&this.scrollable.setScrollDimensions({width:this._configuration.editor.layoutInfo.contentWidth,height:this._configuration.editor.layoutInfo.contentHeight}),e.viewInfo&&this._configureSmoothScrollDuration(),this._updateHeight()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e){return this._configuration.editor.viewInfo.scrollbar.horizontal===r.ScrollbarVisibility.Hidden?0:e.width>=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){
var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){
var n=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,t,i)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,n,i){return this._linesLayout.insertWhitespace(e,t,n,i)},t.prototype.changeWhitespace=function(e,t,n){return this._linesLayout.changeWhitespace(e,t,n)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)},
t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){
return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(i.Disposable);t.ViewLayout=a}),define(e[1108],t([1,0,19,39,209]),function(e,t,n,i,r){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n,i,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,o=this._decorationsCache[t]
;if(!o){var s=e.range,a=e.options,c=void 0;if(a.isWholeLine){var l=this._coordinatesConverter.convertModelPositionToViewPosition(new i.Position(s.startLineNumber,1)),u=this._coordinatesConverter.convertModelPositionToViewPosition(new i.Position(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)));c=new n.Range(l.lineNumber,l.column,u.lineNumber,u.column)}else c=this._coordinatesConverter.convertModelRangeToViewRange(s);o=new r.ViewModelDecoration(c,a),this._decorationsCache[t]=o}return o},e.prototype.getDecorationsViewportData=function(e){var t=!0;return t=t&&null!==this._cachedModelDecorationsResolver,(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){
for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),i=e.startLineNumber,o=e.endLineNumber,s=[],a=0,c=[],l=i;l<=o;l++)c[l-i]=[];for(var u=0,d=t.length;u<d;u++){var h=t[u],p=h.options,f=this._getOrCreateViewModelDecoration(h),g=f.range;if(s[a++]=f,p.inlineClassName)for(var v=new r.InlineDecoration(g,p.inlineClassName,p.inlineClassNameAffectsLetterSpacing?3:0),m=Math.max(i,g.startLineNumber),y=Math.min(o,g.endLineNumber),l=m;l<=y;l++)c[l-i].push(v);if(p.beforeContentClassName&&i<=g.startLineNumber&&g.startLineNumber<=o){v=new r.InlineDecoration(new n.Range(g.startLineNumber,g.startColumn,g.startLineNumber,g.startColumn),p.beforeContentClassName,1);c[g.startLineNumber-i].push(v)}if(p.afterContentClassName&&i<=g.endLineNumber&&g.endLineNumber<=o){v=new r.InlineDecoration(new n.Range(g.endLineNumber,g.endColumn,g.endLineNumber,g.endColumn),p.afterContentClassName,2);c[g.endLineNumber-i].push(v)}}return{decorations:s,inlineDecorations:c}},e}()
;t.ViewModelDecorations=o}),define(e[1109],t([1,0,19]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._selection=e,this._isMovingLeft=t}return e.prototype.getEditOperations=function(e,t){var i=this._selection;if(this._selectionId=t.trackSelection(i),i.startLineNumber===i.endLineNumber&&(!this._isMovingLeft||0!==i.startColumn)&&(this._isMovingLeft||i.endColumn!==e.getLineMaxColumn(i.startLineNumber))){var r,o,s,a=i.selectionStartLineNumber,c=e.getLineContent(a);this._isMovingLeft?(r=c.substring(0,i.startColumn-2),o=c.substring(i.startColumn-1,i.endColumn-1),s=c.substring(i.startColumn-2,i.startColumn-1)+c.substring(i.endColumn-1)):(r=c.substring(0,i.startColumn-1)+c.substring(i.endColumn-1,i.endColumn),o=c.substring(i.startColumn-1,i.endColumn-1),s=c.substring(i.endColumn));var l=r+o+s;t.addEditOperation(new n.Range(a,1,a,e.getLineMaxColumn(a)),null),t.addEditOperation(new n.Range(a,1,a,1),l),
this._cutStartIndex=i.startColumn+(this._isMovingLeft?-1:1),this._cutEndIndex=this._cutStartIndex+i.endColumn-i.startColumn,this._moved=!0}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moved&&(n=(n=n.setStartPosition(n.startLineNumber,this._cutStartIndex)).setEndPosition(n.startLineNumber,this._cutEndIndex)),n},e}();t.MoveCaretCommand=i}),define(e[282],t([1,0,14]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.value=e}return e.prototype.contains=function(t){return this.value===t||n.startsWith(t,this.value+e.sep)},e.sep=".",e.Empty=new e(""),e.Refactor=new e("refactor"),e.Source=new e("source"),e.SourceOrganizeImports=new e("source.organizeImports"),e}();t.CodeActionKind=i;!function(e){e[e.IfSingle=1]="IfSingle",e[e.First=2]="First",e[e.Never=3]="Never"}(t.CodeActionAutoApply||(t.CodeActionAutoApply={}))}),define(e[1111],t([1,0,8,23,18,9,7,4,39]),function(e,t,n,i,r,o,s,a,c){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n){this._editor=e,this._contextMenuService=t,this._onApplyCodeAction=n,this._onDidExecuteCodeAction=new s.Emitter,this.onDidExecuteCodeAction=this._onDidExecuteCodeAction.event}return e.prototype.show=function(e,t){var n=this,s=e.then(function(e){return e.map(function(e){return new i.Action(e.command?e.command.id:e.title,e.title,void 0,!0,function(){return r.always(n._onApplyCodeAction(e),function(){return n._onDidExecuteCodeAction.fire(void 0)})})})}).then(function(e){return n._editor.getDomNode()?e:a.TPromise.wrapError(o.canceled())});this._contextMenuService.showContextMenu({getAnchor:function(){return c.Position.isIPosition(t)&&(t=n._toCoords(t)),t},getActions:function(){return s},onHide:function(){n._visible=!1,n._editor.focus()},autoSelectFirstItem:!0})},Object.defineProperty(e.prototype,"isVisible",{get:function(){return this._visible},enumerable:!0,configurable:!0}),e.prototype._toCoords=function(e){
this._editor.revealPosition(e,1),this._editor.render();var t=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=n.getDomNodePagePosition(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}},e}();t.CodeActionContextMenu=l}),define(e[1112],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i){this.presentationIndex=i,this._onColorFlushed=new n.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new n.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new n.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{
get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;n<this.colorPresentations.length;n++)if(t===this.colorPresentations[n].label){this.presentationIndex=n,this._onDidChangePresentation.fire(this.presentation);break}},e.prototype.flushColor=function(){this._onColorFlushed.fire(this._color)},e}();t.ColorPickerModel=i}),define(e[498],t([1,0,105,39,19,60,114]),function(e,t,n,i,r,o,s){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,n){if(n<0)return!1;var i=t.length;if(n+i>e.length)return!1;for(var r=0;r<i;r++){var o=e.charCodeAt(n+r),s=t.charCodeAt(r);if(o!==s&&!(o>=65&&o<=90&&o+32===s||s>=65&&s<=90&&s+32===o))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,o){var s=t.startLineNumber,a=t.startColumn,c=t.endLineNumber,l=t.endColumn,u=i.getLineContent(s),d=i.getLineContent(c),h=n.blockCommentStartToken,p=n.blockCommentEndToken,f=u.lastIndexOf(h,a-1+h.length),g=d.indexOf(p,l-1-p.length);if(-1!==f&&-1!==g)if(s===c){u.substring(f+h.length,g).indexOf(p)>=0&&(f=-1,g=-1)}else{var v=u.substring(f+h.length),m=d.substring(0,g);(v.indexOf(p)>=0||m.indexOf(p)>=0)&&(f=-1,g=-1)}var y;-1!==f&&-1!==g?(f+h.length<u.length&&32===u.charCodeAt(f+h.length)&&(h+=" "),g>0&&32===d.charCodeAt(g-1)&&(p=" "+p,g-=1),
y=e._createRemoveBlockCommentOperations(new r.Range(s,f+h.length+1,c,g+1),h,p)):(y=e._createAddBlockCommentOperations(t,h,p),this._usedEndToken=1===y.length?p:null);for(var b=0;b<y.length;b++)o.addTrackedEditOperation(y[b].range,y[b].text)},e._createRemoveBlockCommentOperations=function(e,t,i){var o=[];return r.Range.isEmpty(e)?o.push(n.EditOperation.delete(new r.Range(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(o.push(n.EditOperation.delete(new r.Range(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),o.push(n.EditOperation.delete(new r.Range(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),o},e._createAddBlockCommentOperations=function(e,t,o){var s=[];return r.Range.isEmpty(e)?s.push(n.EditOperation.replace(new r.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+"  "+o)):(s.push(n.EditOperation.insert(new i.Position(e.startLineNumber,e.startColumn),t+" ")),
s.push(n.EditOperation.insert(new i.Position(e.endLineNumber,e.endColumn)," "+o))),s},e.prototype.getEditOperations=function(e,t){var n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenizeIfCheap(n);var r=e.getLanguageIdAtPosition(n,i),o=s.LanguageConfigurationRegistry.getComments(r);o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o,e,t)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations();if(2===n.length){var i=n[0],r=n[1];return new o.Selection(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}var s=n[0].range,a=this._usedEndToken?-this._usedEndToken.length-1:0;return new o.Selection(s.endLineNumber,s.endColumn+a,s.endLineNumber,s.endColumn+a)},e}();t.BlockCommentCommand=a}),define(e[1117],t([1,0,14,105,39,19,60,498,114]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Toggle=0]="Toggle",
e[e.ForceAdd=1]="ForceAdd",e[e.ForceRemove=2]="ForceRemove"}(t.Type||(t.Type={}));var l=function(){function e(e,t,n){this._selection=e,this._tabSize=t,this._type=n,this._deltaColumn=0}return e._gatherPreflightCommentStrings=function(e,t,n){e.tokenizeIfCheap(t);var i=e.getLanguageIdAtPosition(t,1),r=c.LanguageConfigurationRegistry.getComments(i),o=r?r.lineCommentToken:null;if(!o)return null;for(var s=[],a=0,l=n-t+1;a<l;a++)s[a]={ignore:!1,commentStr:o,commentStrOffset:0,commentStrLength:o.length};return s},e._analyzeLines=function(e,t,i,r){var o,s=!0;o=0===e||1!==e;for(var c=0,l=i.length;c<l;c++){var u=i[c],d=r+c,h=t.getLineContent(d),p=n.firstNonWhitespaceIndex(h);if(-1!==p){if(s=!1,u.ignore=!1,u.commentStrOffset=p,o&&!a.BlockCommentCommand._haystackHasNeedleAtOffset(h,u.commentStr,p)&&(0===e?o=!1:1===e||(u.ignore=!0)),o){var f=p+u.commentStrLength;f<h.length&&32===h.charCodeAt(f)&&(u.commentStrLength+=1)}}else u.ignore=!0,u.commentStrOffset=h.length}if(0===e&&s){o=!1
;for(var c=0,l=i.length;c<l;c++)i[c].ignore=!1}return{supported:!0,shouldRemoveComments:o,lines:i}},e._gatherPreflightData=function(t,n,i,r){var o=e._gatherPreflightCommentStrings(n,i,r);return null===o?{supported:!1,shouldRemoveComments:!1,lines:null}:e._analyzeLines(t,n,o,i)},e.prototype._executeLineComments=function(t,n,i,o){var s;i.shouldRemoveComments?s=e._createRemoveLineCommentsOperations(i.lines,o.startLineNumber):(e._normalizeInsertionPoint(t,i.lines,o.startLineNumber,this._tabSize),s=e._createAddLineCommentsOperations(i.lines,o.startLineNumber));for(var a=new r.Position(o.positionLineNumber,o.positionColumn),c=0,l=s.length;c<l;c++)if(n.addEditOperation(s[c].range,s[c].text),s[c].range.isEmpty()&&s[c].range.getStartPosition().equals(a)){t.getLineContent(a.lineNumber).length+1===a.column&&(this._deltaColumn=s[c].text.length)}this._selectionId=n.trackSelection(o)},e.prototype._attemptRemoveBlockComment=function(e,t,n,i){
var r=t.startLineNumber,s=t.endLineNumber,c=i.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(r).lastIndexOf(n,c-1),u=e.getLineContent(s).indexOf(i,t.endColumn-1-n.length);return-1!==l&&-1===u&&(u=e.getLineContent(r).indexOf(i,l+n.length),s=r),-1===l&&-1!==u&&(l=e.getLineContent(s).lastIndexOf(n,u),r=s),!t.isEmpty()||-1!==l&&-1!==u||-1!==(l=e.getLineContent(r).indexOf(n))&&(u=e.getLineContent(r).indexOf(i,l+n.length)),-1!==l&&32===e.getLineContent(r).charCodeAt(l+n.length)&&(n+=" "),-1!==u&&32===e.getLineContent(s).charCodeAt(u-1)&&(i=" "+i,u-=1),-1!==l&&-1!==u?a.BlockCommentCommand._createRemoveBlockCommentOperations(new o.Range(r,l+n.length+1,s,u+1),n,i):null},e.prototype._executeBlockComment=function(e,t,i){e.tokenizeIfCheap(i.startLineNumber);var r=e.getLanguageIdAtPosition(i.startLineNumber,1),s=c.LanguageConfigurationRegistry.getComments(r);if(s&&s.blockCommentStartToken&&s.blockCommentEndToken){
var l=s.blockCommentStartToken,u=s.blockCommentEndToken,d=this._attemptRemoveBlockComment(e,i,l,u);if(!d){if(i.isEmpty()){var h=e.getLineContent(i.startLineNumber),p=n.firstNonWhitespaceIndex(h);-1===p&&(p=h.length),d=a.BlockCommentCommand._createAddBlockCommentOperations(new o.Range(i.startLineNumber,p+1,i.startLineNumber,h.length+1),l,u)}else d=a.BlockCommentCommand._createAddBlockCommentOperations(new o.Range(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),l,u);1===d.length&&(this._deltaColumn=l.length+1)}this._selectionId=t.trackSelection(i);for(var f=0;f<d.length;f++)t.addEditOperation(d[f].range,d[f].text)}},e.prototype.getEditOperations=function(t,n){var i=this._selection;this._moveEndPositionDown=!1,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,t.getLineMaxColumn(i.endLineNumber-1)))
;var r=e._gatherPreflightData(this._type,t,i.startLineNumber,i.endLineNumber);return r.supported?this._executeLineComments(t,n,r,i):this._executeBlockComment(t,n,i)},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new s.Selection(n.selectionStartLineNumber,n.selectionStartColumn+this._deltaColumn,n.positionLineNumber,n.positionColumn+this._deltaColumn)},e._createRemoveLineCommentsOperations=function(e,t){for(var n=[],r=0,s=e.length;r<s;r++){var a=e[r];a.ignore||n.push(i.EditOperation.delete(new o.Range(t+r,a.commentStrOffset+1,t+r,a.commentStrOffset+a.commentStrLength+1)))}return n},e._createAddLineCommentsOperations=function(e,t){for(var n=[],o=0,s=e.length;o<s;o++){var a=e[o];a.ignore||n.push(i.EditOperation.insert(new r.Position(t+o,a.commentStrOffset+1),a.commentStr+" "))}return n},e.nextVisibleColumn=function(e,t,n,i){return n?e+(t-e%t):e+i},e._normalizeInsertionPoint=function(t,n,i,r){
for(var o,s,a=Number.MAX_VALUE,c=0,l=n.length;c<l;c++)if(!n[c].ignore){for(var u=t.getLineContent(i+c),d=0,h=0,p=n[c].commentStrOffset;d<a&&h<p;h++)d=e.nextVisibleColumn(d,r,9===u.charCodeAt(h),1);d<a&&(a=d)}a=Math.floor(a/r)*r;for(var c=0,l=n.length;c<l;c++)if(!n[c].ignore){var u=t.getLineContent(i+c),d=0;for(o=0,s=n[c].commentStrOffset;d<a&&o<s;o++)d=e.nextVisibleColumn(d,r,9===u.charCodeAt(o),1);n[c].commentStrOffset=d>a?o-1:o}},e}();t.LineCommentCommand=l}),define(e[1119],t([1,0,60,19]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n}return e.prototype.getEditOperations=function(e,t){var r=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new i.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),r),
!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new n.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):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new n.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):this.targetPosition.lineNumber<this.selection.endLineNumber?this.targetSelection=new n.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):this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new n.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.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new n.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):this.targetSelection=this.selection},e.prototype.computeCursorState=function(e,t){return this.targetSelection},e}();t.DragAndDropCommand=r}),define(e[1120],t([1,0,7,19]),function(e,t,n,i){"use strict";function r(e,t){return 1===e||2!==e&&t}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.NotSet=0]="NotSet",e[e.True=1]="True",e[e.False=2]="False"}(t.FindOptionOverride||(t.FindOptionOverride={}));var o=function(){function e(){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._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._onFindReplaceStateChange=new n.Emitter}return Object.defineProperty(e.prototype,"searchString",{get:function(){return this._searchString},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"replaceString",{get:function(){return this._replaceString},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRevealed",{get:function(){return this._isRevealed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReplaceRevealed",{get:function(){return this._isReplaceRevealed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRegex",{get:function(){return r(this._isRegexOverride,this._isRegex)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wholeWord",{
get:function(){return r(this._wholeWordOverride,this._wholeWord)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchCase",{get:function(){return r(this._matchCaseOverride,this._matchCase)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actualIsRegex",{get:function(){return this._isRegex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actualWholeWord",{get:function(){return this._wholeWord},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actualMatchCase",{get:function(){return this._matchCase},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchScope",{get:function(){return this._searchScope},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchesPosition",{get:function(){return this._matchesPosition},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchesCount",{get:function(){return this._matchesCount},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"currentMatch",{get:function(){return this._currentMatch},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onFindReplaceStateChange",{get:function(){return this._onFindReplaceStateChange.event},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){},e.prototype.changeMatchInfo=function(e,t,n){var r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),void 0!==n&&(i.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)},e.prototype.change=function(e,t,n){void 0===n&&(n=!0);var r={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,
isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},o=!1,s=this.isRegex,a=this.wholeWord,c=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,r.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,r.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,r.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,r.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(i.Range.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,r.searchScope=!0,o=!0)),
this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,s!==this.isRegex&&(o=!0,r.isRegex=!0),a!==this.wholeWord&&(o=!0,r.wholeWord=!0),c!==this.matchCase&&(o=!0,r.matchCase=!0),o&&this._onFindReplaceStateChange.fire(r)},e}();t.FindReplaceState=o}),define(e[1122],t([1,0,19]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n}return e.prototype.getEditOperations=function(e,t){if(this._ranges.length>0){for(var i=[],r=0;r<this._ranges.length;r++)i.push({range:this._ranges[r],text:this._replaceStrings[r]});i.sort(function(e,t){return n.Range.compareRangesUsingStarts(e.range,t.range)})
;for(var o=[],s=i[0],r=1;r<i.length;r++)s.range.endLineNumber===i[r].range.startLineNumber&&s.range.endColumn===i[r].range.startColumn?(s.range=s.range.plusRange(i[r].range),s.text=s.text+i[r].text):(o.push(s),s=i[r]);o.push(s);for(r=0;r<o.length;r++)t.addEditOperation(o[r].range,o[r].text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)},e}();t.ReplaceAllCommand=i}),define(e[1123],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?(this._staticValue=e[0].staticValue,this._pieces=null):(this._staticValue=null,this._pieces=e):(this._staticValue="",this._pieces=null)}return e.fromStaticValue=function(t){return new e([i.staticValue(t)])},Object.defineProperty(e.prototype,"hasReplacementPatterns",{get:function(){return null===this._staticValue},enumerable:!0,
configurable:!0}),e.prototype.buildReplaceString=function(t){if(null!==this._staticValue)return this._staticValue;for(var n="",i=0,r=this._pieces.length;i<r;i++){var o=this._pieces[i];null===o.staticValue?n+=e._substitute(o.matchIndex,t):n+=o.staticValue}return n},e._substitute=function(e,t){if(0===e)return t[0];for(var n="";e>0;){if(e<t.length){return(t[e]||"")+n}n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n},e}();t.ReplacePattern=n;var i=function(){function e(e,t){this.staticValue=e,this.matchIndex=t}return e.staticValue=function(t){return new e(t,-1)},e.matchIndex=function(t){return new e(null,t)},e}();t.ReplacePiece=i;var r=function(){function e(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}return e.prototype.emitUnchanged=function(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e},e.prototype.emitStatic=function(e,t){this._emitStatic(e),this._lastCharIndex=t},e.prototype._emitStatic=function(e){
0!==e.length&&(this._currentStaticPiece+=e)},e.prototype.emitMatchIndex=function(e,t){0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=i.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=i.matchIndex(e),this._lastCharIndex=t},e.prototype.finalize=function(){return this.emitUnchanged(this._source.length),0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=i.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new n(this._result)},e}();t.parseReplaceString=function(e){if(!e||0===e.length)return new n(null);for(var t=new r(e),i=0,o=e.length;i<o;i++){var s=e.charCodeAt(i);if(92!==s){if(36===s){if(++i>=o)break;if(36===(l=e.charCodeAt(i))){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(48===l||38===l){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1);continue}if(49<=l&&l<=57){var a=l-48;if(i+1<o){var c=e.charCodeAt(i+1);if(48<=c&&c<=57){i++,a=10*a+(c-48),t.emitUnchanged(i-2),t.emitMatchIndex(a,i+1);continue}}
t.emitUnchanged(i-1),t.emitMatchIndex(a,i+1);continue}}}else{if(++i>=o)break;var l;switch(l=e.charCodeAt(i)){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic("\n",i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic("\t",i+1)}}}return t.finalize()}}),define(e[372],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_FOLDING_REGIONS=65535,t.MAX_LINE_NUMBER=16777215;var n=function(){function e(e,n,i){if(e.length!==n.length||e.length>t.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=n,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var n=[],i=function(t,i){var r=n[n.length-1];return e.getStartLineNumber(r)<=t&&e.getEndLineNumber(r)>=i},r=0,o=this._startIndexes.length;r<o;r++){
var s=this._startIndexes[r],a=this._endIndexes[r];if(s>t.MAX_LINE_NUMBER||a>t.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+t.MAX_LINE_NUMBER);for(;n.length>0&&!i(s,a);)n.pop();var c=n.length>0?n[n.length-1]:-1;n.push(r),this._startIndexes[r]=s+((255&c)<<24),this._endIndexes[r]=a+((65280&c)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return this._startIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getEndLineNumber=function(e){return this._endIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,n=e%32;return 0!=(this._collapseStates[t]&1<<n)},e.prototype.setCollapsed=function(e,t){var n=e/32|0,i=e%32,r=this._collapseStates[n];this._collapseStates[n]=t?r|1<<i:r&~(1<<i)},
e.prototype.toRegion=function(e){return new i(this,e)},e.prototype.getParentIndex=function(e){this.ensureParentIndices();var n=((4278190080&this._startIndexes[e])>>>24)+((4278190080&this._endIndexes[e])>>>16);return n===t.MAX_FOLDING_REGIONS?-1:n},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t<n;){var i=Math.floor((t+n)/2);e<this.getStartLineNumber(i)?n=i:t=i+1}return t-1},e.prototype.findRange=function(e){var t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t<this.length;t++)e[t]="["+(this.isCollapsed(t)?"+":"-")+"] "+this.getStartLineNumber(t)+"/"+this.getEndLineNumber(t);return e.join(", ")},e}();t.FoldingRegions=n;var i=function(){function e(e,t){this.ranges=e,this.index=t}
return Object.defineProperty(e.prototype,"startLineNumber",{get:function(){return this.ranges.getStartLineNumber(this.index)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLineNumber",{get:function(){return this.ranges.getEndLineNumber(this.index)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"regionIndex",{get:function(){return this.index},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentIndex",{get:function(){return this.ranges.getParentIndex(this.index)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this.ranges.isCollapsed(this.index)},enumerable:!0,configurable:!0}),e.prototype.containedBy=function(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e.prototype.hidesLine=function(e){return this.startLineNumber<e&&e<=this.endLineNumber},e}()
;t.FoldingRegion=i}),define(e[1125],t([1,0,7,372]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this._updateEventEmitter=new n.Emitter,this._textModel=e,this._decorationProvider=t,this._regions=new i.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var n={};this._decorationProvider.changeDecorations(function(i){
for(var r=0,o=e;r<o.length;r++){var s=o[r].regionIndex,a=t._editorDecorationIds[s];if(a&&!n[a]){n[a]=!0;var c=!t._regions.isCollapsed(s);t._regions.setCollapsed(s,c),i.changeDecorationOptions(a,t._decorationProvider.getDecorationOption(c))}}}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}},e.prototype.update=function(e,t){var n=this;void 0===t&&(t=[]);for(var i=[],r=function(r,o){var s=e.getStartLineNumber(r);o&&function(e,n){for(var i=0,r=t;i<r.length;i++){var o=r[i];if(e<o&&o<=n)return!0}return!1}(s,e.getEndLineNumber(r))&&(o=!1),e.setCollapsed(r,o);var a=n._textModel.getLineMaxColumn(s),c={startLineNumber:s,startColumn:a,endLineNumber:s,endColumn:a};i.push({range:c,options:n._decorationProvider.getDecorationOption(o)})},o=0,s=function(){for(;o<n._regions.length;){var e=n._regions.isCollapsed(o);if(o++,e)return o-1}return-1},a=0,c=s();-1!==c&&a<e.length;){var l=this._textModel.getDecorationRange(this._editorDecorationIds[c]);if(l){var u=l.startLineNumber
;if(this._textModel.getLineMaxColumn(u)===l.startColumn)for(;a<e.length;){var d=e.getStartLineNumber(a);if(!(u>=d))break;r(a,u===d),a++}}c=s()}for(;a<e.length;)r(a,!1),a++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,i),this._regions=e,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})},e.prototype.getMemento=function(){for(var e=[],t=0;t<this._regions.length;t++)if(this._regions.isCollapsed(t)){var n=this._textModel.getDecorationRange(this._editorDecorationIds[t]);if(n){var i=n.startLineNumber,r=n.endLineNumber+this._regions.getEndLineNumber(t)-this._regions.getStartLineNumber(t);e.push({startLineNumber:i,endLineNumber:r})}}return e.length>0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],n=0,i=e;n<i.length;n++){var r=i[n],o=this.getRegionAtLine(r.startLineNumber);o&&!o.isCollapsed&&t.push(o)}this.toggleCollapseState(t)}},e.prototype.dispose=function(){
this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])},e.prototype.getAllRegionsAtLine=function(e,t){var n=[];if(this._regions)for(var i=this._regions.findRange(e),r=1;i>=0;){var o=this._regions.toRegion(i);t&&!t(o,r)||n.push(o),r++,i=o.parentIndex}return n},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){for(var n=[],i=t&&2===t.length,r=i?[]:null,o=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=o,c=this._regions.length;a<c;a++){var l=this._regions.toRegion(a);if(!(this._regions.getStartLineNumber(a)<s))break;if(i){for(;r.length>0&&!l.containedBy(r[r.length-1]);)r.pop();r.push(l),t(l,r.length)&&n.push(l)}else t&&!t(l)||n.push(l)}return n},e}();t.FoldingModel=r,t.setCollapseStateLevelsDown=function(e,t,n,i){void 0===n&&(n=Number.MAX_VALUE);var r=[];if(i&&i.length>0)for(var o=0,s=i;o<s.length;o++){var a=s[o],c=e.getRegionAtLine(a)
;c&&(c.isCollapsed!==t&&r.push(c),n>1)&&(l=e.getRegionsInside(c,function(e,i){return e.isCollapsed!==t&&i<n}),r.push.apply(r,l))}else{var l=e.getRegionsInside(null,function(e,i){return e.isCollapsed!==t&&i<n});r.push.apply(r,l)}e.toggleCollapseState(r)},t.setCollapseStateLevelsUp=function(e,t,n,i){for(var r=[],o=0,s=i;o<s.length;o++){var a=s[o],c=e.getAllRegionsAtLine(a,function(e,i){return e.isCollapsed!==t&&i<=n});r.push.apply(r,c)}e.toggleCollapseState(r)},t.setCollapseStateAtLevel=function(e,t,n,i){var r=e.getRegionsInside(null,function(e,r){return r===t&&e.isCollapsed!==n&&!i.some(function(t){return e.containsLine(t)})});e.toggleCollapseState(r)},t.setCollapseStateForMatchingLines=function(e,t,n){for(var i=e.textModel,r=e.regions,o=[],s=r.length-1;s>=0;s--)if(n!==r.isCollapsed(s)){var a=r.getStartLineNumber(s);t.test(i.getLineContent(a))&&o.push(r.toRegion(s))}e.toggleCollapseState(o)},t.setCollapseStateForType=function(e,t,n){
for(var i=e.regions,r=[],o=i.length-1;o>=0;o--)n!==i.isCollapsed(o)&&t===i.getType(o)&&r.push(i.toRegion(o));e.toggleCollapseState(r)}}),define(e[1126],t([1,0,7,19,20]),function(e,t,n,i,r){"use strict";function o(e,t){var n=r.findFirstInSorted(e,function(e){return t<e.startLineNumber})-1;return n>=0&&e[n].endLineNumber>=t?e[n]:null}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){var t=this;this._updateEventEmitter=new n.Emitter,this._foldingModel=e,this._foldingModelListener=e.onDidChange(function(e){return t.updateHiddenRanges()}),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){
for(var e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;n<a.length;n++)if(a.isCollapsed(n)){var c=a.getStartLineNumber(n)+1,l=a.getEndLineNumber(n);o<=c&&l<=s||(!e&&r<this._hiddenRanges.length&&this._hiddenRanges[r].startLineNumber===c&&this._hiddenRanges[r].endLineNumber===l?(t.push(this._hiddenRanges[r]),r++):(e=!0,t.push(new i.Range(c,1,l,1))),o=c,s=l)}(e||r<this._hiddenRanges.length)&&this.applyHiddenRanges(t)},e.prototype.applyMemento=function(e){if(!Array.isArray(e)||0===e.length)return!1;for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];if(!o.startLineNumber||!o.endLineNumber)return!1;t.push(new i.Range(o.startLineNumber+1,1,o.endLineNumber,1))}return this.applyHiddenRanges(t),!0},e.prototype.getMemento=function(){return this._hiddenRanges.map(function(e){return{startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber}})},e.prototype.applyHiddenRanges=function(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)},e.prototype.hasRanges=function(){
return this._hiddenRanges.length>0},e.prototype.isHidden=function(e){return null!==o(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,n=!1,i=this._foldingModel.textModel,r=null,s=function(e){return r&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,r)||(r=o(t._hiddenRanges,e)),r?r.startLineNumber-1:null},a=0,c=e.length;a<c;a++){var l=e[a],u=s(l.startLineNumber);u&&(l=l.setStartPosition(u,i.getLineMaxColumn(u)),n=!0);var d=s(l.endLineNumber);d&&(l=l.setEndPosition(d,i.getLineMaxColumn(d)),n=!0),e[a]=l}return n},e.prototype.dispose=function(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();t.HiddenRangeModel=s}),define(e[500],t([1,0,9,18,4,372]),function(e,t,n,i,r,o){"use strict";function s(e,t){for(var n=e.sort(function(e,t){var n=e.start-t.start;return 0===n&&(n=e.rank-t.rank),n
}),i=new u(t),r=null,o=[],s=0,a=n;s<a.length;s++){var c=a[s];if(r){if(c.start>r.start)if(c.end<=r.end)o.push(r),r=c,i.add(c.start,c.end,c.kind&&c.kind.value,o.length);else{if(c.start>r.end){do{r=o.pop()}while(r&&c.start>r.end);r&&o.push(r),r=c}i.add(c.start,c.end,c.kind&&c.kind.value,o.length)}}else r=c,i.add(c.start,c.end,c.kind&&c.kind.value,o.length)}return i.toIndentRanges()}Object.defineProperty(t,"__esModule",{value:!0});var a=5e3,c={};t.ID_SYNTAX_PROVIDER="syntax";var l=function(){function e(e,n,i){void 0===i&&(i=a),this.editorModel=e,this.providers=n,this.limit=i,this.id=t.ID_SYNTAX_PROVIDER}return e.prototype.compute=function(e){var t=this;return function(e,t,o){var s=null,a=e.map(function(e,r){return i.toThenable(e.provideFoldingRanges(t,c,o)).then(function(e){if(!o.isCancellationRequested&&Array.isArray(e)){Array.isArray(s)||(s=[]);for(var n=t.getLineCount(),i=0,a=e;i<a.length;i++){var c=a[i];c.start>0&&c.end>c.start&&c.end<=n&&s.push({start:c.start,end:c.end,rank:r,kind:c.kind})}}
},n.onUnexpectedExternalError)});return r.TPromise.join(a).then(function(e){return s})}(this.providers,this.editorModel,e).then(function(e){if(e){return s(e,t.limit)}return null})},e.prototype.dispose=function(){},e}();t.SyntaxRangeProvider=l;var u=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,n,i){if(!(e>o.MAX_LINE_NUMBER||t>o.MAX_LINE_NUMBER)){var r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=i,this._types[r]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;n<this._length;n++)e[n]=this._startIndexes[n],t[n]=this._endIndexes[n];return new o.FoldingRegions(e,t,this._types)}
for(var i=0,r=this._nestingLevelCounts.length,n=0;n<this._nestingLevelCounts.length;n++){var s=this._nestingLevelCounts[n];if(s){if(s+i>this._foldingRangesLimit){r=n;break}i+=s}}for(var e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit),a=[],n=0,c=0;n<this._length;n++){var l=this._nestingLevels[n];(l<r||l===r&&i++<this._foldingRangesLimit)&&(e[c]=this._startIndexes[n],t[c]=this._endIndexes[n],a[c]=this._types[n],c++)}return new o.FoldingRegions(e,t,a)},e}();t.RangesCollector=u,t.sanitizeRanges=s}),define(e[1129],t([1,0,57,4,500]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID_INIT_PROVIDER="init";var o=function(){function e(e,i,r,o){if(this.editorModel=e,this.id=t.ID_INIT_PROVIDER,i.length){var s=function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}}
;this.decorationIds=e.deltaDecorations([],i.map(s)),this.timeout=setTimeout(r,o)}}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var n=0,o=this.decorationIds;n<o.length;n++){var s=o[n],a=this.editorModel.getDecorationRange(s);a&&t.push({start:a.startLineNumber,end:a.endLineNumber,rank:1})}return i.TPromise.as(r.sanitizeRanges(t,Number.MAX_VALUE))},e}();t.InitializingRangeProvider=o}),define(e[507],t([1,0,105,19]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e._handleEolEdits=function(e,t){for(var n=void 0,i=[],r=0,o=t;r<o.length;r++){var s=o[r];"number"==typeof s.eol&&(n=s.eol),s.range&&"string"==typeof s.text&&i.push(s)}return"number"==typeof n&&e.getModel().pushEOL(n),i},
e._isFullModelReplaceEdit=function(e,t){var n=e.getModel(),i=n.validateRange(t.range);return n.getFullModelRange().equalsRange(i)},e.execute=function(t,r){t.pushUndoStop();var o=e._handleEolEdits(t,r);1===o.length&&e._isFullModelReplaceEdit(t,o[0])?t.executeEdits("formatEditsCommand",o.map(function(e){return n.EditOperation.replace(i.Range.lift(e.range),e.text)})):t.executeEdits("formatEditsCommand",o.map(function(e){return n.EditOperation.replaceMove(i.Range.lift(e.range),e.text)})),t.pushUndoStop()},e}();t.FormattingEdit=r}),define(e[512],t([1,0,78,5,7,11,443]),function(e,t,i,r,o,s){"use strict";function a(e,t){return!!e[t]}function c(e){return"altKey"===e?s.isMacintosh?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):s.isMacintosh?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){return function(e,t){this.target=e.target,this.hasTriggerModifier=a(e.event,t.triggerModifier),
this.hasSideBySideModifier=a(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=i.isIE||e.event.detail<=1}}();t.ClickLinkMouseEvent=l;var u=function(){return function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=a(e,t.triggerModifier)}}();t.ClickLinkKeyboardEvent=u;var d=function(){function e(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();t.ClickLinkOptions=d;var h=function(e){function t(t){var n=e.call(this)||this;return n._onMouseMoveOrRelevantKeyDown=n._register(new o.Emitter),n.onMouseMoveOrRelevantKeyDown=n._onMouseMoveOrRelevantKeyDown.event,n._onExecute=n._register(new o.Emitter),
n.onExecute=n._onExecute.event,n._onCancel=n._register(new o.Emitter),n.onCancel=n._onCancel.event,n._editor=t,n._opts=c(n._editor.getConfiguration().multiCursorModifier),n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._register(n._editor.onDidChangeConfiguration(function(e){if(e.multiCursorModifier){var t=c(n._editor.getConfiguration().multiCursorModifier);if(n._opts.equals(t))return;n._opts=t,n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._onCancel.fire()}})),n._register(n._editor.onMouseMove(function(e){return n.onEditorMouseMove(new l(e,n._opts))})),n._register(n._editor.onMouseDown(function(e){return n.onEditorMouseDown(new l(e,n._opts))})),n._register(n._editor.onMouseUp(function(e){return n.onEditorMouseUp(new l(e,n._opts))})),n._register(n._editor.onKeyDown(function(e){return n.onEditorKeyDown(new u(e,n._opts))})),n._register(n._editor.onKeyUp(function(e){return n.onEditorKeyUp(new u(e,n._opts))})),n._register(n._editor.onMouseDrag(function(){return n.resetHandler()})),
n._register(n._editor.onDidChangeCursorSelection(function(e){return n.onDidChangeCursorSelection(e)})),n._register(n._editor.onDidChangeModel(function(e){return n.resetHandler()})),n._register(n._editor.onDidChangeModelContent(function(){return n.resetHandler()})),n._register(n._editor.onDidScrollChange(function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&n.resetHandler()})),n}return n(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){
this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(r.Disposable);t.ClickLinkGesture=h}),define(e[525],t([1,0,18,9]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e[e.IDLE=0]="IDLE",e[e.FIRST_WAIT=1]="FIRST_WAIT",e[e.SECOND_WAIT=2]="SECOND_WAIT",e[e.WAITING_FOR_ASYNC_COMPUTATION=3]="WAITING_FOR_ASYNC_COMPUTATION"}(r||(r={}));!function(e){e[e.Delayed=0]="Delayed",e[e.Immediate=1]="Immediate"}(t.HoverStartMode||(t.HoverStartMode={}));var o=function(){function e(t,i,r,o){var s=this;this._computer=t,this._state=0,this._hoverTime=e.HOVER_TIME,this._firstWaitScheduler=new n.RunOnceScheduler(function(){
return s._triggerAsyncComputation()},0),this._secondWaitScheduler=new n.RunOnceScheduler(function(){return s._triggerSyncComputation()},0),this._loadingMessageScheduler=new n.RunOnceScheduler(function(){return s._showLoadingMessage()},0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=i,this._errorCallback=r,this._progressCallback=o}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=this._computer.computeAsync().then(function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)},function(t){return e._onError(t)
})):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):i.onUnexpectedError(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=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()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}();t.HoverOperation=o}),define(e[527],t([1,0,8,39,45,92,129,5]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,n){var i=e.call(this)||this;return i.disposables=[],i.allowEditorOverflow=!0,i._id=t,i._editor=n,i._isVisible=!1,
i._containerDomNode=document.createElement("div"),i._containerDomNode.className="monaco-editor-hover hidden",i._containerDomNode.tabIndex=0,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover-content",i.scrollbar=new a.DomScrollableElement(i._domNode,{}),i.disposables.push(i.scrollbar),i._containerDomNode.appendChild(i.scrollbar.getDomNode()),i.onkeydown(i._containerDomNode,function(e){e.equals(9)&&i.hide()}),i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.onDidLayoutChange(function(e){return i.updateMaxHeight()}),i.updateMaxHeight(),i._editor.addContentWidget(i),i._showAtPosition=null,i}return n(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,i.toggleClass(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},
t.prototype.showAt=function(e,t){this._showAtPosition=new r.Position(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[o.ContentWidgetPositionPreference.ABOVE,o.ContentWidgetPositionPreference.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=c.dispose(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this;Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),
this._editor.layoutContentWidget(this),this.onContentsChange()},t.prototype.onContentsChange=function(){this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,n=t.fontSize,i=t.lineHeight;this._domNode.style.fontSize=n+"px",this._domNode.style.lineHeight=i+"px",this._domNode.style.maxHeight=e+"px"},t}(s.Widget);t.ContentHoverWidget=l;var u=function(e){function t(t,n){var i=e.call(this)||this;return i._id=t,i._editor=n,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","presentation"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.addOverlayWidget(i),i}return n(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,
i.toggleClass(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),r=this._editor.getConfiguration().lineHeight,o=n-i-(this._domNode.clientHeight-r)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(o),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"))
;t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(s.Widget);t.GlyphHoverWidget=u}),define(e[1135],t([1,0,525,527,8,134,5]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),n=[],i=0,r=t.length;i<r;i++){var o=t[i];if(o.options.glyphMarginClassName){var a=o.options.glyphMarginHoverMessage;s.isEmptyMarkdownString(a)||(Array.isArray(a)?n=n.concat(a.map(e)):n.push(e(a)))}}return n},e.prototype.onResult=function(e,t){this._result=this._result.concat(e)},e.prototype.getResult=function(){return this._result},
e.prototype.getResultWithLoadingMessage=function(){return this.getResult()},e}(),l=function(e){function t(n,r){var o=e.call(this,t.ID,n)||this;return o._lastLineNumber=-1,o._markdownRenderer=r,o._computer=new c(o._editor),o._hoverOperation=new i.HoverOperation(o._computer,function(e){return o._withResult(e)},null,function(e){return o._withResult(e)}),o}return n(t,e),t.prototype.dispose=function(){this._renderDisposeables=a.dispose(this._renderDisposeables),this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))},t.prototype.hide=function(){this._lastLineNumber=-1,this._hoverOperation.cancel(),e.prototype.hide.call(this)},t.prototype._withResult=function(e){
this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var n=this;a.dispose(this._renderDisposeables),this._renderDisposeables=[];var i=document.createDocumentFragment();t.forEach(function(e){var t=n._markdownRenderer.render(e.value);n._renderDisposeables.push(t),i.appendChild(o.$("div.hover-row",null,t.element))}),this.updateContents(i),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(r.GlyphHoverWidget);t.ModesGlyphHoverWidget=l}),define(e[1141],t([1,0,60]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._editRange,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations()[0].range
;return this._originalSelection.isEmpty()?new n.Selection(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new n.Selection(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)},e}();t.InPlaceReplaceCommand=i}),define(e[530],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSpaceCnt=function(e,t){for(var n=0,i=0;i<e.length;i++)"\t"===e.charAt(i)?n+=t:n++;return n},t.generateIndent=function(e,t,n){e=e<0?0:e;var i="";if(!n){var r=Math.floor(e/t);for(e%=t,o=0;o<r;o++)i+="\t"}for(var o=0;o<e;o++)i+=" ";return i}}),define(e[1144],t([1,0,19,60]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this._selection=e,this._isCopyingDown=t}return e.prototype.getEditOperations=function(e,t){var i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,
i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));for(var r=[],o=i.startLineNumber;o<=i.endLineNumber;o++)r.push(e.getLineContent(o));var s=r.join("\n");""===s&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._isCopyingDown?t.addEditOperation(new n.Range(i.startLineNumber,1,i.startLineNumber,1),s+"\n"):t.addEditOperation(new n.Range(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){var r=n.startLineNumber,o=n.startColumn,s=n.endLineNumber,a=n.endColumn;0!==this._startLineNumberDelta&&(r+=this._startLineNumberDelta,o=1),
0!==this._endLineNumberDelta&&(s+=this._endLineNumberDelta,a=1),n=i.Selection.createWithDirection(r,o,s,a,this._selectionDirection)}return n},e}();t.CopyLinesCommand=r}),define(e[1146],t([1,0,19,60]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.restoreCursorToColumn=n}return e.prototype.getEditOperations=function(e,t){if(1!==e.getLineCount()||1!==e.getLineMaxColumn(1)){var i=this.startLineNumber,r=this.endLineNumber,o=1,s=e.getLineMaxColumn(r);r<e.getLineCount()?(r+=1,s=1):i>1&&(i-=1,o=e.getLineMaxColumn(i)),t.addTrackedEditOperation(new n.Range(i,o,r,s),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new i.Selection(n.endLineNumber,this.restoreCursorToColumn,n.endLineNumber,this.restoreCursorToColumn)},e}();t.DeleteLinesCommand=r}),define(e[1148],t([1,0,105,19]),function(e,t,n,i){"use strict";function r(e,t,n){
var i=t.startLineNumber,r=t.endLineNumber;if(1===t.endColumn&&r--,i>=r)return null;for(var o=[],s=i;s<=r;s++)o.push(e.getLineContent(s));var a=o.slice(0);return a.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:r,before:o,after:a}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var o=function(e,t,o){var s=r(e,t,o);return s?n.EditOperation.replace(new i.Range(s.startLineNumber,1,s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),s.after.join("\n")):null}(e,this.selection,this.descending);o&&t.addEditOperation(o.range,o.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,n){var i=r(e,t,n);if(!i)return!1;for(var o=0,s=i.before.length;o<s;o++)if(i.before[o]!==i.after[o])return!0;return!1},e}()
;t.SortLinesCommand=o}),define(e[1149],t([1,0,19,261,259,114]),function(e,t,i,r,o,s){"use strict";function a(e){var t=new l;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}function c(e,t){if(e instanceof u&&e.isEmpty)return null;if(!i.Range.containsPosition(e.range,t))return null;var n;if(e instanceof u){if(e.hasChildren)for(var r=0,o=e.children.length;r<o&&!n;r++)n=c(e.children[r],t)}else e instanceof d&&(n=c(e.open,t)||c(e.elements,t)||c(e.close,t));return n||e}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(t.TokenTreeBracket||(t.TokenTreeBracket={}));var l=function(){function e(){}return Object.defineProperty(e.prototype,"range",{get:function(){return new i.Range(this.start.lineNumber,this.start.column,this.end.lineNumber,this.end.column)},enumerable:!0,configurable:!0}),e}();t.Node=l;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),
Object.defineProperty(t.prototype,"start",{get:function(){return this.hasChildren?this.children[0].start:this.parent.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.hasChildren?this.children[this.children.length-1].end:this.parent.end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this.children&&this.children.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(l);t.NodeList=u;var d=function(e){function t(){var t=e.call(this)||this;return t.elements=new u,t.elements.parent=t,t}return n(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return this.open.start},
enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.close.end},enumerable:!0,configurable:!0}),t}(l);t.Block=d;var h=function(){return function(e,t,n){this.range=e,this.bracket=t,this.bracketType=n}}(),p=function(){return function(e,t,n){this.lineNumber=n,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)}}(),f=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber<this._lineCount&&!this._lineTokens;)this._lineNumber++,this._model.forceTokenization(this._lineNumber),this._lineTokens=this._model.getLineTokens(this._lineNumber),
this._tokenIndex=0,0===this._lineTokens.getCount()&&(this._lineTokens=null)},e.prototype.next=function(){if(!this._lineTokens)return null;if(this._model.getVersionId()!==this._versionId)return null;var e=new p(this._lineTokens,this._tokenIndex,this._lineNumber);return this._advance(),e},e}(),g=function(){function e(e){this._rawTokenScanner=new f(e),this._nextBuff=[],this._cachedLanguageBrackets=null,this._cachedLanguageId=-1}return e.prototype.next=function(){if(this._nextBuff.length>0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,n=e.lineText,a=e.type,c=e.startOffset,l=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=s.LanguageConfigurationRegistry.getBracketsSupport(this._cachedLanguageId));var u=this._cachedLanguageBrackets;if(!u||r.ignoreBracketsInToken(a))return new h(new i.Range(t,c+1,t,l+1),0,null);var d;do{if(d=o.BracketsUtils.findNextBracketInToken(u.forwardRegex,t,n,c,l)){
var p=d.startColumn-1,f=d.endColumn-1;c<p&&this._nextBuff.push(new h(new i.Range(t,c+1,t,p+1),0,null));var g=n.substring(p,f);g=g.toLowerCase();var v=u.textIsBracket[g],m=u.textIsOpenBracket[g];this._nextBuff.push(new h(new i.Range(t,p+1,t,f+1),m?1:-1,v.languageIdentifier.language+";"+v.open+";"+v.close)),c=f}}while(d);return c<l&&this._nextBuff.push(new h(new i.Range(t,c+1,t,l+1),0,null)),this._nextBuff.shift()},e}(),v=function(){function e(e){this._stack=[],this._scanner=new g(e)}return e.prototype.build=function(){for(var e=new u;e.append(this._line()||this._any()););return e},e.prototype._accept=function(e){var t=this._stack.pop()||this._scanner.next();if(!t)return!1;var n=e(t);return n?this._currentToken=t:(this._stack.push(t),this._currentToken=null),n},e.prototype._peek=function(e){var t=!1;return this._accept(function(n){return t=e(n),!1}),t},e.prototype._line=function(){var e,t=new u;for(this._peek(function(t){return e=t.range.startLineNumber,!1});this._peek(function(t){
return t.range.startLineNumber===e})&&t.append(this._token()||this._block()););return t.children&&0!==t.children.length?1===t.children.length?t.children[0]:t:null},e.prototype._token=function(){return this._accept(function(e){return 0===e.bracket})?a(this._currentToken):null},e.prototype._block=function(){var e;if(!this._accept(function(t){return e=t.bracketType,1===t.bracket}))return null;var t=new d;for(t.open=a(this._currentToken);t.elements.append(this._line()););if(!this._accept(function(t){return-1===t.bracket&&t.bracketType===e})){var n=new u;return n.append(t.open),n.append(t.elements),n}return t.close=a(this._currentToken),t},e.prototype._any=function(){return this._accept(function(e){return!0})?a(this._currentToken):null},e}();t.build=function(e){return new v(e).build()},t.find=c}),define(e[226],t([1,0]),function(e,t){"use strict";function i(e,t){for(var n=e.slice();n.length>0;){var i=n.shift();if(!t(i))break;n.unshift.apply(n,i.children)}}Object.defineProperty(t,"__esModule",{value:!0});var r,o
;!function(e){e[e.Dollar=0]="Dollar",e[e.Colon=1]="Colon",e[e.Comma=2]="Comma",e[e.CurlyOpen=3]="CurlyOpen",e[e.CurlyClose=4]="CurlyClose",e[e.Backslash=5]="Backslash",e[e.Forwardslash=6]="Forwardslash",e[e.Pipe=7]="Pipe",e[e.Int=8]="Int",e[e.VariableName=9]="VariableName",e[e.Format=10]="Format",e[e.Plus=11]="Plus",e[e.Dash=12]="Dash",e[e.QuestionMark=13]="QuestionMark",e[e.EOF=14]="EOF"}(o=t.TokenType||(t.TokenType={}));var s=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:o.EOF,pos:this.pos,len:0};var t,n=this.pos,i=0,r=this.value.charCodeAt(n);if("number"==typeof(t=e._table[r]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(r)){t=o.Int;do{i+=1,r=this.value.charCodeAt(n+i)
}while(e.isDigitCharacter(r));return this.pos+=i,{type:t,pos:n,len:i}}if(e.isVariableCharacter(r)){t=o.VariableName;do{r=this.value.charCodeAt(n+ ++i)}while(e.isVariableCharacter(r)||e.isDigitCharacter(r));return this.pos+=i,{type:t,pos:n,len:i}}t=o.Format;do{i+=1,r=this.value.charCodeAt(n+i)}while(!isNaN(r)&&void 0===e._table[r]&&!e.isDigitCharacter(r)&&!e.isVariableCharacter(r));return this.pos+=i,{type:t,pos:n,len:i}},e._table=(r={},r[36]=o.Dollar,r[58]=o.Colon,r[44]=o.Comma,r[123]=o.CurlyOpen,r[125]=o.CurlyClose,r[92]=o.Backslash,r[47]=o.Forwardslash,r[124]=o.Pipe,r[43]=o.Plus,r[45]=o.Dash,r[63]=o.QuestionMark,r),e}();t.Scanner=s;var a=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof c&&this._children[this._children.length-1]instanceof c?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var n=e.parent,i=n.children.indexOf(e),r=n.children.slice(0)
;r.splice.apply(r,[i,1].concat(t)),n._children=r,t.forEach(function(e){return e.parent=n})},Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof g)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce(function(e,t){return e+t.toString()},"")},e.prototype.len=function(){return 0},e}();t.Marker=a;var c=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return n(t,e),t.escape=function(e){return e.replace(/\$|}|\\/g,"\\$&")},t.prototype.toString=function(){return this.value},t.prototype.toTextmateString=function(){return t.escape(this.value)},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(a);t.Text=c;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(a)
;t.TransformableMarker=l;var u=function(e){function t(t){var n=e.call(this)||this;return n.index=t,n}return n(t,e),t.compareByIndex=function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.index<t.index?-1:e.index>t.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof d?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.toTextmateString=function(){var e="";return this.transform&&(e=this.transform.toTextmateString()),0!==this.children.length||this.transform?0===this.children.length?"${"+this.index+e+"}":this.choice?"${"+this.index+"|"+this.choice.toTextmateString()+"|"+e+"}":"${"+this.index+":"+this.children.map(function(e){return e.toTextmateString()}).join("")+e+"}":"$"+this.index},t.prototype.clone=function(){var e=new t(this.index)
;return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(function(e){return e.clone()}),e},t}(l);t.Placeholder=u;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return n(t,e),t.prototype.appendChild=function(e){return e instanceof c&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.toTextmateString=function(){return this.options.map(function(e){return e.value.replace(/\||,/g,"\\$&")}).join(",")},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(a);t.Choice=d;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.resolve=function(e){var t=this;return e.replace(this.regexp,function(){for(var e="",n=0,i=t._children;n<i.length;n++){var r=i[n];if(r instanceof p){var o=arguments.length-2>r.index?arguments[r.index]:""
;e+=o=r.resolve(o)}else e+=r.toString()}return e})},t.prototype.toString=function(){return""},t.prototype.toTextmateString=function(){return"/"+c.escape(this.regexp.source)+"/"+this.children.map(function(e){return e.toTextmateString()})+"/"+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")},t.prototype.clone=function(){var e=new t;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(function(e){return e.clone()}),e},t}(a);t.Transform=h;var p=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.index=t,o.shorthandName=n,o.ifValue=i,o.elseValue=r,o}return n(t,e),t.prototype.resolve=function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue
},t.prototype.toTextmateString=function(){var e="${";return e+=this.index,this.shorthandName?e+=":/"+this.shorthandName:this.ifValue&&this.elseValue?e+=":?"+this.ifValue+":"+this.elseValue:this.ifValue?e+=":+"+this.ifValue:this.elseValue&&(e+=":-"+this.elseValue),e+="}"},t.prototype.clone=function(){return new t(this.index,this.shorthandName,this.ifValue,this.elseValue)},t}(a);t.FormatString=p;var f=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return n(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new c(t)],!0)},t.prototype.toTextmateString=function(){var e="";return this.transform&&(e=this.transform.toTextmateString()),0===this.children.length?"${"+this.name+e+"}":"${"+this.name+":"+this.children.map(function(e){return e.toTextmateString()}).join("")+e+"}"},t.prototype.clone=function(){var e=new t(this.name);return this.transform&&(e.transform=this.transform.clone()),
e._children=this.children.map(function(e){return e.clone()}),e},t}(l);t.Variable=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk(function(n){return n instanceof u&&(t.push(n),e=!e||e.index<n.index?n:e),!0}),this._placeholders={all:t,last:e}}return this._placeholders},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"placeholders",{get:function(){return this.placeholderInfo.all},enumerable:!0,configurable:!0}),t.prototype.offset=function(e){var t=0,n=!1;return this.walk(function(i){return i===e?(n=!0,!1):(t+=i.len(),!0)}),n?t:-1},t.prototype.fullLen=function(e){var t=0;return i([e],function(e){return t+=e.len(),!0}),t},t.prototype.enclosingPlaceholders=function(e){for(var t=[],n=e.parent;n;)n instanceof u&&t.push(n),n=n.parent;return t},t.prototype.resolveVariables=function(e){var t=this;return this.walk(function(n){
return n instanceof f&&n.resolve(e)&&(t._placeholders=void 0),!0}),this},t.prototype.appendChild=function(t){return this._placeholders=void 0,e.prototype.appendChild.call(this,t)},t.prototype.replace=function(t,n){return this._placeholders=void 0,e.prototype.replace.call(this,t,n)},t.prototype.toTextmateString=function(){return this.children.reduce(function(e,t){return e+t.toTextmateString()},"")},t.prototype.clone=function(){var e=new t;return this._children=this.children.map(function(e){return e.clone()}),e},t.prototype.walk=function(e){i(this.children,e)},t}(a);t.TextmateSnippet=g;var v=function(){function e(){this._scanner=new s}return e.escape=function(e){return e.replace(/\$|}|\\/g,"\\$&")},e.prototype.text=function(e){return this.parse(e).toString()},e.prototype.parse=function(e,t,n){this._scanner.text(e),this._token=this._scanner.next();for(var i=new g;this._parse(i););var r=new Map,o=[],s=0;i.walk(function(e){return e instanceof u&&(s+=1,
e.isFinalTabstop?r.set(0,void 0):!r.has(e.index)&&e.children.length>0?r.set(e.index,e.children):o.push(e)),!0});for(var a=0,c=o;a<c.length;a++){var l=c[a];if(r.has(l.index)){var d=new u(l.index);d.transform=l.transform;for(var h=0,p=r.get(l.index);h<p.length;h++){var f=p[h];d.appendChild(f.clone())}i.replace(l,[d])}}return n||(n=s>0&&t),!r.has(0)&&n&&i.appendChild(new u(0)),i},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(this._token.type===o.EOF)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),this._token.type===o.EOF)return!1;var n=this._scanner.value.substring(t.pos,this._token.pos);return this._token=this._scanner.next(),n},e.prototype._parse=function(e){
return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(o.Backslash,!0))&&(t=this._accept(o.Dollar,!0)||this._accept(o.CurlyClose,!0)||this._accept(o.Backslash,!0)||t,e.appendChild(new c(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,n=this._token;return this._accept(o.Dollar)&&(t=this._accept(o.VariableName,!0)||this._accept(o.Int,!0))?(e.appendChild(/^\d+$/.test(t)?new u(Number(t)):new f(t)),!0):this._backTo(n)},e.prototype._parseComplexPlaceholder=function(e){var t,n=this._token;if(!(this._accept(o.Dollar)&&this._accept(o.CurlyOpen)&&(t=this._accept(o.Int,!0))))return this._backTo(n);var i=new u(Number(t));if(this._accept(o.Colon))for(;;){if(this._accept(o.CurlyClose))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new c("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{
if(!(i.index>0&&this._accept(o.Pipe)))return this._accept(o.Forwardslash)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(o.CurlyClose)?(e.appendChild(i),!0):this._backTo(n);for(var r=new d;;){if(this._parseChoiceElement(r)){if(this._accept(o.Comma))continue;if(this._accept(o.Pipe)&&(i.appendChild(r),this._accept(o.CurlyClose)))return e.appendChild(i),!0}return this._backTo(n),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,n=[];;){if(this._token.type===o.Comma||this._token.type===o.Pipe)break;var i=void 0;if(!(i=(i=this._accept(o.Backslash,!0))?this._accept(o.Comma,!0)||this._accept(o.Pipe,!0)||i:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(i)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new c(n.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,n=this._token;if(!(this._accept(o.Dollar)&&this._accept(o.CurlyOpen)&&(t=this._accept(o.VariableName,!0))))return this._backTo(n);var i=new f(t)
;if(!this._accept(o.Colon))return this._accept(o.Forwardslash)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(o.CurlyClose)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(o.CurlyClose))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new c("${"+t+":")),i.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new h,n="",i="";;){if(this._accept(o.Forwardslash))break;r=void 0;if(r=this._accept(o.Backslash,!0))n+=r=this._accept(o.Forwardslash,!0)||r;else{if(this._token.type===o.EOF)return!1;n+=this._accept(void 0,!0)}}for(;;){if(this._accept(o.Forwardslash))break;var r=void 0;if(r=this._accept(o.Backslash,!0))r=this._accept(o.Forwardslash,!0)||r,t.appendChild(new c(r));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;;){if(this._accept(o.CurlyClose))break;if(this._token.type===o.EOF)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){return!1}return e.transform=t,!0},
e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(o.Dollar))return!1;var n=!1;this._accept(o.CurlyOpen)&&(n=!0);var i=this._accept(o.Int,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new p(Number(i))),!0;if(this._accept(o.CurlyClose))return e.appendChild(new p(Number(i))),!0;if(!this._accept(o.Colon))return this._backTo(t),!1;if(this._accept(o.Forwardslash)){var r=this._accept(o.VariableName,!0);return r&&this._accept(o.CurlyClose)?(e.appendChild(new p(Number(i),r)),!0):(this._backTo(t),!1)}if(this._accept(o.Plus)){if(s=this._until(o.CurlyClose))return e.appendChild(new p(Number(i),void 0,s,void 0)),!0}else if(this._accept(o.Dash)){if(a=this._until(o.CurlyClose))return e.appendChild(new p(Number(i),void 0,void 0,a)),!0}else if(this._accept(o.QuestionMark)){var s=this._until(o.Colon);if(s){if(a=this._until(o.CurlyClose))return e.appendChild(new p(Number(i),void 0,s,a)),!0}}else{var a=this._until(o.CurlyClose)
;if(a)return e.appendChild(new p(Number(i),void 0,void 0,a)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return this._token.type!==o.EOF&&(e.appendChild(new c(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}();t.SnippetParser=v}),define(e[1153],t([1,0,110,5]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){}}();t.LineContext=r;var o;!function(e){e[e.Nothing=0]="Nothing",e[e.All=1]="All",e[e.Incr=2]="Incr"}(o||(o={}));var s=function(){function e(t,n,i,r){this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._refilterKind=1,this._lineContext=i,"top"===r?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,n=this._items;t<n.length;t++){var r=n[t].container;e.has(r)||(e.add(r),i.isDisposable(r)&&r.dispose())}},
Object.defineProperty(e.prototype,"lineContext",{get:function(){return this._lineContext},set:function(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._ensureCachedState(),this._filteredItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incomplete",{get:function(){return this._ensureCachedState(),this._isIncomplete},enumerable:!0,configurable:!0}),e.prototype.adopt=function(e){for(var t=new Array,n=0;n<this._items.length;)e.has(this._items[n].support)?n++:(t.push(this._items[n]),this._items[n]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,t},Object.defineProperty(e.prototype,"stats",{get:function(){return this._ensureCachedState(),this._stats},
enumerable:!0,configurable:!0}),e.prototype._ensureCachedState=function(){0!==this._refilterKind&&this._createCachedState()},e.prototype._createCachedState=function(){this._isIncomplete=new Set,this._stats={suggestionCount:0,snippetCount:0,textCount:0};for(var e=this._lineContext,t=e.leadingLineContent,i=e.characterCountDelta,r="",o=1===this._refilterKind?this._items:this._filteredItems,s=[],a=o.length>2e3?n.fuzzyScore:n.fuzzyScoreGracefulAggressive,c=0;c<o.length;c++){var l=o[c],u=l.suggestion;l.container.incomplete&&this._isIncomplete.add(l.support);var d=u.overwriteBefore+i-(l.position.column-this._column);if(r.length!==d&&(r=0===d?"":t.slice(-d)),l.word=r,0===d)l.score=-100,l.matches=void 0;else if("string"==typeof u.filterText){if(!(h=a(r,u.filterText,u.overwriteBefore)))continue;l.score=h[0],l.matches=(n.fuzzyScore(r,u.label)||n.anyScore(r,u.label))[1]}else{var h=a(r,u.label,u.overwriteBefore);if(!h)continue;l.score=h[0],l.matches=h[1]}switch(l.idx=c,s.push(l),this._stats.suggestionCount++,u.type){
case"snippet":this._stats.snippetCount++;break;case"text":this._stats.textCount++}}this._filteredItems=s.sort(this._snippetCompareFn),this._refilterKind=0},e._compareCompletionItems=function(e,t){return e.score>t.score?-1:e.score<t.score?1:e.idx<t.idx?-1:e.idx>t.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===n.suggestion.type)return-1}return e._compareCompletionItems(t,n)},e._compareCompletionItemsSnippetsUp=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===n.suggestion.type)return 1}return e._compareCompletionItems(t,n)},e}();t.CompletionModel=s}),define(e[1154],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/actionbar/actionbar",t)}),define(e[1157],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/aria/aria",t)}),define(e[128],t([1,0,1157,11,8,960]),function(e,t,n,i,r){"use strict";function o(e){s(c,e)}
function s(e,t){a&&(e.textContent===t&&(t=n.localize(0,null,t)),r.clearNode(e),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible")}Object.defineProperty(t,"__esModule",{value:!0});var a,c,l;t.setARIAContainer=function(e){(a=document.createElement("div")).className="monaco-aria-container",(c=document.createElement("div")).className="monaco-alert",c.setAttribute("role","alert"),c.setAttribute("aria-atomic","true"),a.appendChild(c),(l=document.createElement("div")).className="monaco-status",l.setAttribute("role","status"),l.setAttribute("aria-atomic","true"),a.appendChild(l),e.appendChild(a)},t.alert=o,t.status=function(e){i.isMacintosh?o(e):s(l,e)}}),define(e[1161],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/findinput/findInput",t)}),define(e[1164],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/findinput/findInputCheckboxes",t)}),define(e[398],t([1,0,246,1164,1013]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var o=r.localize(0,null),s=r.localize(1,null),a=r.localize(2,null),c=function(e){function t(t){return e.call(this,{actionClassName:"monaco-case-sensitive",title:o+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return n(t,e),t}(i.Checkbox);t.CaseSensitiveCheckbox=c;var l=function(e){function t(t){return e.call(this,{actionClassName:"monaco-whole-word",title:s+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return n(t,e),t}(i.Checkbox);t.WholeWordsCheckbox=l;var u=function(e){function t(t){return e.call(this,{actionClassName:"monaco-regex",title:a+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return n(t,e),t}(i.Checkbox);t.RegexCheckbox=u}),define(e[1167],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/inputbox/inputBox",t)}),define(e[1169],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/selectBox/selectBoxCustom",t)}),
define(e[1172],t([1,0,1169,5,7,73,84,8,20,169,106,101,11,1087]),function(e,t,n,i,r,o,s,a,c,l,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=a.$,f=function(){function e(){}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"selectOption.entry.template"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=Object.create(null);return t.disposables=[],t.root=e,t.optionText=a.append(e,p(".option-text")),t},e.prototype.renderElement=function(e,t,i){var r=i,o=e.optionText,s=e.optionDisabled;r.optionText.textContent=o,r.root.setAttribute("aria-label",n.localize(0,null,o)),s?a.addClass(r.root,"option-disabled"):a.removeClass(r.root,"option-disabled")},e.prototype.disposeTemplate=function(e){e.disposables=i.dispose(e.disposables)},e}(),g=function(){function e(t,n,i,o,s){this.toDispose=[],this._isVisible=!1,this.selectBoxOptions=s||Object.create(null),
"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=e.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",this._onDidSelect=new r.Emitter,this.styles=o,this.registerListeners(),this.constructSelectDropDown(i),this.setOptions(t,n)}return e.prototype.getHeight=function(){return 18},e.prototype.getTemplateId=function(){return"selectOption.entry.template"},e.prototype.constructSelectDropDown=function(e){this.contextViewProvider=e,this.selectDropDownContainer=a.$(".monaco-select-box-dropdown-container"),this.createSelectList(this.selectDropDownContainer);var t=a.append(this.selectDropDownContainer,p(".select-box-dropdown-container-width-control")),n=a.append(t,p(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",
a.append(n,this.widthControlElement),this.styleElement=a.createStyleSheet(this.selectDropDownContainer)},e.prototype.registerListeners=function(){var e=this;this.toDispose.push(a.addStandardDisposableListener(this.selectElement,"change",function(t){e.selectElement.title=t.target.value,e._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value})})),this.toDispose.push(a.addDisposableListener(this.selectElement,a.EventType.CLICK,function(t){a.EventHelper.stop(t),e._isVisible?e.hideSelectDropDown(!0):e.showSelectDropDown()})),this.toDispose.push(a.addDisposableListener(this.selectElement,a.EventType.MOUSE_DOWN,function(e){a.EventHelper.stop(e)})),this.toDispose.push(a.addDisposableListener(this.selectElement,a.EventType.KEY_DOWN,function(t){var n=new s.StandardKeyboardEvent(t),i=!1;h.isMacintosh?18!==n.keyCode&&16!==n.keyCode&&10!==n.keyCode&&3!==n.keyCode||(i=!0):(18===n.keyCode&&n.altKey||16===n.keyCode&&n.altKey||10===n.keyCode||3===n.keyCode)&&(i=!0),i&&(e.showSelectDropDown(),
a.EventHelper.stop(t))}))},Object.defineProperty(e.prototype,"onDidSelect",{get:function(){return this._onDidSelect.event},enumerable:!0,configurable:!0}),e.prototype.setOptions=function(e,t,n){var i=this;if(!this.options||!c.equals(this.options,e)){this.options=e,this.selectElement.options.length=0;var r=0;if(this.options.forEach(function(e){i.selectElement.add(i.createOption(e,r,n===r++))}),this.selectList&&this.options){var o=void 0;o=[],void 0!==n&&(this.disabledOptionIndex=n);for(var s=0;s<this.options.length;s++){var a=this.options[s],l=void 0;l=s===this.disabledOptionIndex,o.push({optionText:a,optionDisabled:l})}this.selectList.splice(0,this.selectList.length,o)}}void 0!==t&&this.select(t)},e.prototype.select=function(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selectElement.title=this.options[this.selected]},e.prototype.focus=function(){
this.selectElement&&this.selectElement.focus()},e.prototype.blur=function(){this.selectElement&&this.selectElement.blur()},e.prototype.render=function(e){a.addClass(e,"select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()},e.prototype.style=function(e){var t=[];this.styles=e,this.styles.listFocusBackground&&t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: "+this.styles.listFocusBackground+" !important; }"),this.styles.listFocusForeground&&t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused:not(:hover) { color: "+this.styles.listFocusForeground+" !important; }"),this.styles.listHoverForeground&&(t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:hover { color: "+this.styles.listHoverForeground+" !important; }"),
t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: "+this.styles.listActiveSelectionForeground+" !important; }")),this.styles.listHoverBackground&&(t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: "+this.styles.listHoverBackground+" !important; }"),t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: "+this.styles.selectBackground+" !important; }")),this.styles.listFocusOutline&&t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted "+this.styles.listFocusOutline+" !important; outline-offset: -1.6px !important; }"),
this.styles.listHoverOutline&&(t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:hover:not(.focused) { outline: 1.6px dashed "+this.styles.listHoverOutline+" !important; outline-offset: -1.6px !important; }"),t.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { outline: none !important; }")),this.styleElement.innerHTML=t.join("\n"),this.applyStyles()},e.prototype.applyStyles=function(){var e=null;if(this.selectElement){e=this.styles.selectBackground?this.styles.selectBackground.toString():null;var t=this.styles.selectForeground?this.styles.selectForeground.toString():null,n=this.styles.selectBorder?this.styles.selectBorder.toString():null;this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=n}if(this.selectList){this.selectList.style({})
;var i=this.styles.selectListBackground?this.styles.selectListBackground.toString():e;this.selectDropDownListContainer.style.backgroundColor=i;var r=this.styles.focusBorder?this.styles.focusBorder.toString():null;this.selectDropDownContainer.style.outlineColor=r,this.selectDropDownContainer.style.outlineOffset="-1px"}},e.prototype.createOption=function(e,t,n){var i=document.createElement("option");return i.value=e,i.text=e,i.disabled=n,i},e.prototype.showSelectDropDown=function(){var e=this;this.contextViewProvider&&!this._isVisible&&(this._isVisible=!0,this.cloneElementFont(this.selectElement,this.selectDropDownContainer),this.contextViewProvider.showContextView({getAnchor:function(){return e.selectElement},render:function(t){return e.renderSelectDropDown(t)},layout:function(){return e.layoutSelectDropDown()},onHide:function(){a.toggleClass(e.selectDropDownContainer,"visible",!1),a.toggleClass(e.selectElement,"synthetic-focus",!1)}}),this._currentSelection=this.selected)},
e.prototype.hideSelectDropDown=function(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())},e.prototype.renderSelectDropDown=function(e){var t=this;return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(),{dispose:function(){return e.removeChild(t.selectDropDownContainer)}}},e.prototype.layoutSelectDropDown=function(){a.toggleClass(this.selectDropDownContainer,"visible",!0);var e=a.getTotalWidth(this.selectElement),t=a.getDomNodePagePosition(this.selectElement),n=window.innerHeight-t.top-t.height-this.selectBoxOptions.minBottomMargin;if(n<0&&(n=0),this.selectList){this.selectList.layout();var i=this.selectList.contentHeight,r=a.getTotalHeight(this.selectDropDownListContainer),o=r-i;r>n&&(i=Math.floor((n-o)/this.getHeight())*this.getHeight()),this.selectList.layout(i),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),
this.selectList.reveal(this.selectList.getFocus()[0]||0)),this.selectDropDownContainer.style.height=i+o+"px";var s=this.setWidthControlElement(this.widthControlElement),c=Math.max(s,Math.round(e)).toString()+"px";this.selectDropDownContainer.style.minWidth=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),a.toggleClass(this.selectElement,"synthetic-focus",!0),a.toggleClass(this.selectDropDownContainer,"synthetic-focus",!0)}},e.prototype.setWidthControlElement=function(e){var t=0;if(e&&this.options){for(var n=0,i=0;i<this.options.length;i++)this.options[i].length>this.options[n].length&&(n=i);e.innerHTML=this.options[n],t=a.getTotalWidth(e)}return t},e.prototype.cloneElementFont=function(e,t){var n=window.getComputedStyle(e,null).getPropertyValue("font-size"),i=window.getComputedStyle(e,null).getPropertyValue("font-family");t.style.fontFamily=i,t.style.fontSize=n},e.prototype.createSelectList=function(e){var t=this
;this.selectDropDownListContainer=a.append(e,p(".select-box-dropdown-list-container")),this.listRenderer=new f,this.selectList=new l.List(this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,selectOnMouseDown:!1,verticalScrollMode:d.ScrollbarVisibility.Visible,keyboardSupport:!1,mouseSupport:!1});var n=r.chain(u.domEvent(this.selectDropDownListContainer,"keydown")).filter(function(){return t.selectList.length>0}).map(function(e){return new s.StandardKeyboardEvent(e)});n.filter(function(e){return 3===e.keyCode}).on(function(e){return t.onEnter(e)},this,this.toDispose),n.filter(function(e){return 9===e.keyCode}).on(function(e){return t.onEscape(e)},this,this.toDispose),n.filter(function(e){return 16===e.keyCode}).on(this.onUpArrow,this,this.toDispose),n.filter(function(e){return 18===e.keyCode}).on(this.onDownArrow,this,this.toDispose),n.filter(function(e){return 12===e.keyCode}).on(this.onPageDown,this,this.toDispose),n.filter(function(e){return 11===e.keyCode
}).on(this.onPageUp,this,this.toDispose),n.filter(function(e){return 14===e.keyCode}).on(this.onHome,this,this.toDispose),n.filter(function(e){return 13===e.keyCode}).on(this.onEnd,this,this.toDispose),n.filter(function(e){return e.keyCode>=21&&e.keyCode<=56||e.keyCode>=80&&e.keyCode<=108}).on(this.onCharacter,this,this.toDispose),r.chain(u.domEvent(this.selectList.getHTMLElement(),"mouseup")).filter(function(){return t.selectList.length>0}).on(function(e){return t.onMouseUp(e)},this,this.toDispose),this.toDispose.push(this.selectList.onDidBlur(function(e){return t.onListBlur()}))},e.prototype.onMouseUp=function(e){if(e.toElement.classList.contains("option-text")){var t=e.toElement.parentElement,n=Number(t.getAttribute("data-index")),i=t.classList.contains("option-disabled");n>=0&&n<this.options.length&&!i&&(this.selected=n,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this._onDidSelect.fire({index:this.selectElement.selectedIndex,
selected:this.selectElement.title}),this._currentSelection=-1,this.hideSelectDropDown(!0)),a.EventHelper.stop(e)}},e.prototype.onListBlur=function(){this._currentSelection>=0&&this.select(this._currentSelection),this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.selectElement.title}),this.hideSelectDropDown(!1)},e.prototype.onEscape=function(e){a.EventHelper.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0),this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.selectElement.title})},e.prototype.onEnter=function(e){a.EventHelper.stop(e),this._currentSelection=-1,this.hideSelectDropDown(!0),this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.selectElement.title})},e.prototype.onDownArrow=function(){this.selected<this.options.length-1&&(this.selected+1===this.disabledOptionIndex&&this.options.length>this.selected+2?this.selected+=2:this.selected++,this.select(this.selected),this.selectList.setFocus([this.selected]),
this.selectList.reveal(this.selectList.getFocus()[0]))},e.prototype.onUpArrow=function(){this.selected>0&&(this.selected-1===this.disabledOptionIndex&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))},e.prototype.onPageUp=function(e){var t=this;a.EventHelper.stop(e),this.selectList.focusPreviousPage(),setTimeout(function(){t.selected=t.selectList.getFocus()[0],t.selected===t.disabledOptionIndex&&t.selected<t.options.length-1&&(t.selected++,t.selectList.setFocus([t.selected])),t.selectList.reveal(t.selected),t.select(t.selected)},1)},e.prototype.onPageDown=function(e){var t=this;a.EventHelper.stop(e),this.selectList.focusNextPage(),setTimeout(function(){t.selected=t.selectList.getFocus()[0],t.selected===t.disabledOptionIndex&&t.selected>0&&(t.selected--,t.selectList.setFocus([t.selected])),t.selectList.reveal(t.selected),t.select(t.selected)},1)},e.prototype.onHome=function(e){
a.EventHelper.stop(e),this.options.length<2||(this.selected=0,this.selected===this.disabledOptionIndex&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))},e.prototype.onEnd=function(e){a.EventHelper.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.selected===this.disabledOptionIndex&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))},e.prototype.onCharacter=function(e){for(var t=o.KeyCodeUtils.toString(e.keyCode),n=-1,i=0;i<this.options.length-1;i++)if(n=(i+this.selected+1)%this.options.length,this.options[n].charAt(0).toUpperCase()===t){this.select(n),this.selectList.setFocus([n]),this.selectList.reveal(this.selectList.getFocus()[0]),a.EventHelper.stop(e);break}},e.prototype.dispose=function(){this.hideSelectDropDown(!1),this.toDispose=i.dispose(this.toDispose)},e.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,
e}();t.SelectBoxList=g}),define(e[279],t([1,0,5,92,51,24,1073,1172,11,1084]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStyles={selectBackground:o.Color.fromHex("#3C3C3C"),selectForeground:o.Color.fromHex("#F0F0F0"),selectBorder:o.Color.fromHex("#3C3C3C")};var u=function(e){function r(n,i,r,o,u){void 0===o&&(o=s.deepClone(t.defaultStyles));var d=e.call(this)||this;return d.toDispose=[],s.mixin(d.styles,t.defaultStyles,!1),l.isMacintosh?d.selectBoxDelegate=new a.SelectBoxNative(n,i,o):d.selectBoxDelegate=new c.SelectBoxList(n,i,r,o,u),d.toDispose.push(d.selectBoxDelegate),d}return n(r,e),Object.defineProperty(r.prototype,"onDidSelect",{get:function(){return this.selectBoxDelegate.onDidSelect},enumerable:!0,configurable:!0}),r.prototype.setOptions=function(e,t,n){this.selectBoxDelegate.setOptions(e,t,n)},r.prototype.select=function(e){this.selectBoxDelegate.select(e)},r.prototype.focus=function(){this.selectBoxDelegate.focus()},r.prototype.blur=function(){
this.selectBoxDelegate.blur()},r.prototype.render=function(e){this.selectBoxDelegate.render(e)},r.prototype.style=function(e){this.selectBoxDelegate.style(e)},r.prototype.applyStyles=function(){this.selectBoxDelegate.applyStyles()},r.prototype.dispose=function(){this.toDispose=i.dispose(this.toDispose),e.prototype.dispose.call(this)},r}(r.Widget);t.SelectBox=u}),define(e[41],t([1,0,11,1154,5,74,279,23,8,30,132,84,7,959]),function(e,t,i,r,o,s,a,c,l,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){var i=this;this.options=n,this._callOnDispose=[],this._context=e||this,this._action=t,t instanceof c.Action&&this._callOnDispose.push(t.onDidChange(function(e){i.builder&&i._handleActionChangeEvent(e)}))}return e.prototype._handleActionChangeEvent=function(e){void 0!==e.enabled&&this._updateEnabled(),void 0!==e.checked&&this._updateChecked(),void 0!==e.class&&this._updateClass(),void 0!==e.label&&(this._updateLabel(),this._updateTooltip()),
void 0!==e.tooltip&&this._updateTooltip()},Object.defineProperty(e.prototype,"callOnDispose",{get:function(){return this._callOnDispose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),e.prototype.getAction=function(){return this._action},e.prototype.isEnabled=function(){return this._action.enabled},e.prototype.setActionContext=function(e){this._context=e},e.prototype.render=function(e){var t=this;this.builder=s.$(e),d.Gesture.addTarget(e);var n=this.options&&this.options.draggable;n&&(e.draggable=!0),this.builder.on(d.EventType.Tap,function(e){return t.onClick(e)}),this.builder.on(l.EventType.MOUSE_DOWN,function(e){n||l.EventHelper.stop(e,!0);var i=e;t._action.enabled&&0===i.button&&t.builder.addClass("active")}),this.builder.on(l.EventType.CLICK,function(e){l.EventHelper.stop(e,!0),t.options&&t.options.isMenu?t.onClick(e):i.setImmediate(function(){
return t.onClick(e)})}),this.builder.on([l.EventType.MOUSE_UP,l.EventType.MOUSE_OUT],function(e){l.EventHelper.stop(e),t.builder.removeClass("active")})},e.prototype.onClick=function(e){l.EventHelper.stop(e,!0);var t;u.isUndefinedOrNull(this._context)||!u.isObject(this._context)?t=e:(t=this._context).event=e,this._actionRunner.run(this._action,t)},e.prototype.focus=function(){this.builder&&(this.builder.domFocus(),this.builder.addClass("focused"))},e.prototype.blur=function(){this.builder&&(this.builder.domBlur(),this.builder.removeClass("focused"))},e.prototype._updateEnabled=function(){},e.prototype._updateLabel=function(){},e.prototype._updateTooltip=function(){},e.prototype._updateClass=function(){},e.prototype._updateChecked=function(){},e.prototype.dispose=function(){this.builder&&(this.builder.destroy(),this.builder=null),this._callOnDispose=o.dispose(this._callOnDispose)},e}();t.BaseActionItem=f;var g=function(e){function t(n,i){var r=e.call(this,t.ID,n,n?"separator text":"separator")||this
;return r.checked=!1,r.radio=!1,r.enabled=!1,r.order=i,r}return n(t,e),t.ID="vs.actions.separator",t}(c.Action);t.Separator=g;var v=function(e){function t(t,n,i){void 0===i&&(i={});var r=e.call(this,t,n,i)||this;return r.options=i,r.options.icon=void 0!==i.icon&&i.icon,r.options.label=void 0===i.label||i.label,r.cssClass="",r}return n(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=s.$("a.action-label").appendTo(this.builder),this._action.id===g.ID?this.$e.attr({role:"presentation"}):this.options.isMenu?this.$e.attr({role:"menuitem"}):this.$e.attr({role:"button"}),this.options.label&&this.options.keybinding&&s.$("span.keybinding").text(this.options.keybinding).appendTo(this.builder),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.$e.domFocus()},t.prototype._updateLabel=function(){this.options.label&&this.$e.text(this.getAction().label)},
t.prototype._updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=r.localize(0,null,e,this.options.keybinding))),e&&this.$e.attr({title:e})},t.prototype._updateClass=function(){this.cssClass&&this.$e.removeClass(this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.$e.addClass("icon"),this.cssClass&&this.$e.addClass(this.cssClass),this._updateEnabled()):this.$e.removeClass("icon")},t.prototype._updateEnabled=function(){this.getAction().enabled?(this.builder.removeClass("disabled"),this.$e.removeClass("disabled"),this.$e.attr({tabindex:0})):(this.builder.addClass("disabled"),this.$e.addClass("disabled"),l.removeTabIndexAndUpdateFocus(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$e.addClass("checked"):this.$e.removeClass("checked")},t}(f);t.ActionItem=v;var m;!function(e){
e[e.HORIZONTAL=0]="HORIZONTAL",e[e.HORIZONTAL_REVERSE=1]="HORIZONTAL_REVERSE",e[e.VERTICAL=2]="VERTICAL",e[e.VERTICAL_REVERSE=3]="VERTICAL_REVERSE"}(m=t.ActionsOrientation||(t.ActionsOrientation={}));var y={orientation:m.HORIZONTAL,context:null},b=function(){function e(e,t){void 0===t&&(t=y);var n=this;this._onDidBlur=new p.Emitter,this._onDidCancel=new p.Emitter,this._onDidRun=new p.Emitter,this._onDidBeforeRun=new p.Emitter,this.options=t,this._context=t.context,this.toDispose=[],this._actionRunner=this.options.actionRunner,this._actionRunner||(this._actionRunner=new c.ActionRunner,this.toDispose.push(this._actionRunner)),this.toDispose.push(this._actionRunner.onDidRun(function(e){return n._onDidRun.fire(e)})),this.toDispose.push(this._actionRunner.onDidBeforeRun(function(e){return n._onDidBeforeRun.fire(e)})),this.items=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&l.addClass(this.domNode,"animated");var i,r
;switch(this.options.orientation){case m.HORIZONTAL:i=15,r=17;break;case m.HORIZONTAL_REVERSE:i=17,r=15,this.domNode.className+=" reverse";break;case m.VERTICAL:i=16,r=18,this.domNode.className+=" vertical";break;case m.VERTICAL_REVERSE:i=18,r=16,this.domNode.className+=" vertical reverse"}s.$(this.domNode).on(l.EventType.KEY_DOWN,function(e){var t=new h.StandardKeyboardEvent(e),o=!0;t.equals(i)?n.focusPrevious():t.equals(r)?n.focusNext():t.equals(9)?n.cancel():t.equals(3)||t.equals(10)||(o=!1),o&&(t.preventDefault(),t.stopPropagation())}),s.$(this.domNode).on(l.EventType.KEY_UP,function(e){var t=new h.StandardKeyboardEvent(e);t.equals(3)||t.equals(10)?(n.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&n.updateFocusedItem()}),this.focusTracker=l.trackFocus(this.domNode),this.toDispose.push(this.focusTracker.onDidBlur(function(){document.activeElement!==n.domNode&&l.isAncestor(document.activeElement,n.domNode)||(n._onDidBlur.fire(),n.focusedItem=void 0)})),
this.toDispose.push(this.focusTracker.onDidFocus(function(){return n.updateFocusedItem()})),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.isMenu?this.actionsList.setAttribute("role","menu"):this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this._onDidBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this._onDidCancel.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.setAriaLabel=function(e){
e?this.actionsList.setAttribute("aria-label",e):this.actionsList.removeAttribute("aria-label")},e.prototype.updateFocusedItem=function(){for(var e=0;e<this.actionsList.children.length;e++){var t=this.actionsList.children[e];if(l.isAncestor(document.activeElement,t)){this.focusedItem=e;break}}},Object.defineProperty(e.prototype,"context",{get:function(){return this._context},set:function(e){this._context=e,this.items.forEach(function(t){return t.setActionContext(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){e&&(this._actionRunner=e,this.items.forEach(function(t){return t.actionRunner=e}))},enumerable:!0,configurable:!0}),e.prototype.getContainer=function(){return this.domNode},e.prototype.push=function(e,t){var n=this;void 0===t&&(t={});var i=Array.isArray(e)?e:[e],r=u.isNumber(t.index)?t.index:null;i.forEach(function(e){var i=document.createElement("li");i.className="action-item",
i.setAttribute("role","presentation"),s.$(i).on(l.EventType.CONTEXT_MENU,function(e){e.preventDefault(),e.stopPropagation()});var o=null;n.options.actionItemProvider&&(o=n.options.actionItemProvider(e)),o||(o=new v(n.context,e,t)),o.actionRunner=n._actionRunner,o.setActionContext(n.context),o.render(i),null===r||r<0||r>=n.actionsList.children.length?(n.actionsList.appendChild(i),n.items.push(o)):(n.actionsList.insertBefore(i,n.actionsList.children[r]),n.items.splice(r,0,o),r++)})},e.prototype.getWidth=function(e){return e>=0&&e<this.actionsList.children.length?this.actionsList.children.item(e).clientWidth:0},e.prototype.getHeight=function(e){return e>=0&&e<this.actionsList.children.length?this.actionsList.children.item(e).clientHeight:0},e.prototype.pull=function(e){e>=0&&e<this.items.length&&(this.items.splice(e,1),this.actionsList.removeChild(this.actionsList.childNodes[e]))},e.prototype.clear=function(){this.items=o.dispose(this.items),s.$(this.actionsList).empty()},e.prototype.length=function(){
return this.items.length},e.prototype.isEmpty=function(){return 0===this.items.length},e.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},e.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},e.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},e.prototype.updateFocus=function(e){
if(void 0!==this.focusedItem)for(var t=0;t<this.items.length;t++){var n=this.items[t];t===this.focusedItem?u.isFunction(n.focus)&&n.focus(e):u.isFunction(n.blur)&&n.blur()}else this.domNode.focus()},e.prototype.doTrigger=function(e){if(void 0!==this.focusedItem){var t=this.items[this.focusedItem];if(t instanceof f){var n=null===t._context||void 0===t._context?e:t._context;this.run(t._action,n).done()}}},e.prototype.cancel=function(){document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this._onDidCancel.fire()},e.prototype.run=function(e,t){return this._actionRunner.run(e,t)},e.prototype.dispose=function(){null!==this.items&&o.dispose(this.items),this.items=null,this.focusTracker&&(this.focusTracker.dispose(),this.focusTracker=null),this.toDispose=o.dispose(this.toDispose),s.$(this.getContainer()).destroy()},e}();t.ActionBar=b;var S=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.selectBox=new a.SelectBox(i,r,o),s.toDispose=[],s.toDispose.push(s.selectBox),
s.registerListeners(),s}return n(t,e),t.prototype.setOptions=function(e,t,n){this.selectBox.setOptions(e,t,n)},t.prototype.select=function(e){this.selectBox.select(e)},t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.selectBox.onDidSelect(function(t){e.actionRunner.run(e._action,e.getActionContext(t.selected)).done()}))},t.prototype.getActionContext=function(e){return e},t.prototype.focus=function(){this.selectBox&&this.selectBox.focus()},t.prototype.blur=function(){this.selectBox&&this.selectBox.blur()},t.prototype.render=function(e){this.selectBox.render(e)},t.prototype.dispose=function(){this.toDispose=o.dispose(this.toDispose),e.prototype.dispose.call(this)},t}(f);t.SelectActionItem=S}),define(e[366],t([1,0,74,4,132,23,41,5,8,993]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n){var r=e.call(this)||this;r._toDispose=[],r.$el=i.$(".monaco-dropdown").appendTo(t),r.$label=i.$(".dropdown-label")
;var s=n.labelRenderer;s||(s=function(e){return i.$(e).text(n.label||""),null}),r.$label.on([l.EventType.CLICK,l.EventType.MOUSE_DOWN,o.EventType.Tap],function(e){l.EventHelper.stop(e,!0)}).on([l.EventType.MOUSE_DOWN,o.EventType.Tap],function(e){e instanceof MouseEvent&&e.detail>1||(r.visible?r.hide():r.show())}).appendTo(r.$el);var a=s(r.$label.getHTMLElement());return a&&r._toDispose.push(a),o.Gesture.addTarget(r.$label.getHTMLElement()),r}return n(t,e),Object.defineProperty(t.prototype,"toDispose",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.$el.getHTMLElement()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this.$label.getHTMLElement()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{set:function(e){this.$label.title(e)},enumerable:!0,configurable:!0}),t.prototype.show=function(){this.visible=!0},t.prototype.hide=function(){
this.visible=!1},t.prototype.onEvent=function(e,t){this.hide()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hide(),this._toDispose=c.dispose(this.toDispose),this.$boxContainer&&(this.$boxContainer.destroy(),this.$boxContainer=null),this.$contents&&(this.$contents.destroy(),this.$contents=null),this.$label&&(this.$label.destroy(),this.$label=null)},t}(s.ActionRunner);t.BaseDropdown=u;var d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.contextViewProvider=n.contextViewProvider,i}return n(t,e),t.prototype.show=function(){var t=this;e.prototype.show.call(this),l.addClass(this.element,"active"),this.contextViewProvider.showContextView({getAnchor:function(){return t.getAnchor()},render:function(e){return t.renderContents(e)},onDOMEvent:function(e,n){t.onEvent(e,n)},onHide:function(){return t.onHide()}})},t.prototype.getAnchor=function(){return this.element},t.prototype.onHide=function(){l.removeClass(this.element,"active")},t.prototype.hide=function(){
e.prototype.hide.call(this),this.contextViewProvider&&this.contextViewProvider.hideContextView()},t.prototype.renderContents=function(e){return null},t}(u);t.Dropdown=d;var h=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._contextMenuProvider=n.contextMenuProvider,i.actions=n.actions||[],i.actionProvider=n.actionProvider,i.menuClassName=n.menuClassName||"",i}return n(t,e),Object.defineProperty(t.prototype,"menuOptions",{get:function(){return this._menuOptions},set:function(e){this._menuOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actions",{get:function(){return this.actionProvider?this.actionProvider.getActions():this._actions},set:function(e){this._actions=e},enumerable:!0,configurable:!0}),t.prototype.show=function(){var t=this;e.prototype.show.call(this),l.addClass(this.element,"active"),this._contextMenuProvider.showContextMenu({getAnchor:function(){return t.element},getActions:function(){return r.TPromise.as(t.actions)},getActionsContext:function(){
return t.menuOptions?t.menuOptions.context:null},getActionItem:function(e){return t.menuOptions&&t.menuOptions.actionItemProvider?t.menuOptions.actionItemProvider(e):null},getKeyBinding:function(e){return t.menuOptions&&t.menuOptions.getKeyBinding?t.menuOptions.getKeyBinding(e):null},getMenuClassName:function(){return t.menuClassName},onHide:function(){return t.onHide()},actionRunner:this.menuOptions?this.menuOptions.actionRunner:null})},t.prototype.hide=function(){e.prototype.hide.call(this)},t.prototype.onHide=function(){this.hide(),l.removeClass(this.element,"active")},t}(u);t.DropdownMenu=h;var p=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,null,t)||this;return c.menuActionsOrProvider=n,c.contextMenuProvider=i,c.actionItemProvider=r,c.actionRunner=o,c.keybindings=s,c.clazz=a,c}return n(t,e),t.prototype.render=function(e){var t=this,n={contextMenuProvider:this.contextMenuProvider,labelRenderer:function(e){return t.builder=i.$("a.action-label").attr({tabIndex:"0",role:"button",
"aria-haspopup":"true",title:t._action.label||"",class:t.clazz}),t.builder.appendTo(e),null}};Array.isArray(this.menuActionsOrProvider)?n.actions=this.menuActionsOrProvider:n.actionProvider=this.menuActionsOrProvider,this.dropdownMenu=new h(e,n),this.dropdownMenu.menuOptions={actionItemProvider:this.actionItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.keybindings,context:this._context}},t.prototype.setActionContext=function(t){e.prototype.setActionContext.call(this,t),this.dropdownMenu&&(this.dropdownMenu.menuOptions.context=t)},t.prototype.show=function(){this.dropdownMenu&&this.dropdownMenu.show()},t.prototype.dispose=function(){this.dropdownMenu.dispose(),e.prototype.dispose.call(this)},t}(a.BaseActionItem);t.DropdownMenuActionItem=p}),define(e[118],t([1,0,1167,78,8,251,128,41,396,7,92,51,24,410,1019]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g,v=o.$;!function(e){e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR"
}(g=t.MessageType||(t.MessageType={}));var m={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")},y=function(e){function t(t,n,i){var s=e.call(this)||this;s.state="idle",s._onDidChange=s._register(new u.Emitter),s.onDidChange=s._onDidChange.event,s._onDidHeightChange=s._register(new u.Emitter),s.onDidHeightChange=s._onDidHeightChange.event,s.contextViewProvider=n,s.options=i||Object.create(null),p.mixin(s.options,m,!1),s.message=null,s.cachedHeight=null,s.placeholder=s.options.placeholder||"",s.ariaLabel=s.options.ariaLabel||"",s.inputBackground=s.options.inputBackground,s.inputForeground=s.options.inputForeground,
s.inputBorder=s.options.inputBorder,s.inputValidationInfoBorder=s.options.inputValidationInfoBorder,s.inputValidationInfoBackground=s.options.inputValidationInfoBackground,s.inputValidationWarningBorder=s.options.inputValidationWarningBorder,s.inputValidationWarningBackground=s.options.inputValidationWarningBackground,s.inputValidationErrorBorder=s.options.inputValidationErrorBorder,s.inputValidationErrorBackground=s.options.inputValidationErrorBackground,s.options.validationOptions&&(s.validation=s.options.validationOptions.validation),s.element=o.append(t,v(".monaco-inputbox.idle"));var a=s.options.flexibleHeight?"textarea":"input",l=o.append(s.element,v(".wrapper"));return s.input=o.append(l,v(a+".input")),s.input.setAttribute("autocorrect","off"),s.input.setAttribute("autocapitalize","off"),s.input.setAttribute("spellcheck","false"),s.onfocus(s.input,function(){return o.addClass(s.element,"synthetic-focus")}),s.onblur(s.input,function(){return o.removeClass(s.element,"synthetic-focus")}),
s.options.flexibleHeight?s.mirror=o.append(l,v("div.mirror")):(s.input.type=s.options.type||"text",s.input.setAttribute("wrap","off")),s.ariaLabel&&s.input.setAttribute("aria-label",s.ariaLabel),s.placeholder&&s.setPlaceHolder(s.placeholder),s.oninput(s.input,function(){return s.onValueChange()}),s.onblur(s.input,function(){return s.onBlur()}),s.onfocus(s.input,function(){return s.onFocus()}),s.placeholder&&r.isIE&&s.onclick(s.input,function(e){o.EventHelper.stop(e,!0),s.input.focus()}),setTimeout(function(){s.input&&s.updateMirror()},0),s.options.actions&&(s.actionbar=s._register(new c.ActionBar(s.element)),s.actionbar.push(s.options.actions,{icon:!0,label:!1})),s.applyStyles(),s}return n(t,e),t.prototype.onBlur=function(){this._hideMessage()},t.prototype.onFocus=function(){this._showMessage()},t.prototype.setPlaceHolder=function(e){this.input&&(this.input.setAttribute("placeholder",e),this.input.title=e)},t.prototype.setAriaLabel=function(e){this.ariaLabel=e,
this.input&&(e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label"))},Object.defineProperty(t.prototype,"inputElement",{get:function(){return this.input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.input.value},set:function(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return null===this.cachedHeight?o.getTotalHeight(this.element):this.cachedHeight},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.input.focus()},t.prototype.blur=function(){this.input.blur()},t.prototype.hasFocus=function(){return document.activeElement===this.input},t.prototype.select=function(e){void 0===e&&(e=null),this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)},t.prototype.enable=function(){this.input.removeAttribute("disabled")},t.prototype.disable=function(){this.input.disabled=!0,
this._hideMessage()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},Object.defineProperty(t.prototype,"width",{get:function(){return o.getTotalWidth(this.input)},set:function(e){this.input.style.width=e+"px"},enumerable:!0,configurable:!0}),t.prototype.showMessage=function(e,t){this.message=e,o.removeClass(this.element,"idle"),o.removeClass(this.element,"info"),o.removeClass(this.element,"warning"),o.removeClass(this.element,"error"),o.addClass(this.element,this.classForType(e.type));var n=this.stylesForType(this.message.type);this.element.style.border=n.border?"1px solid "+n.border:null;var r;r=e.type===g.ERROR?i.localize(0,null,e.content):e.type===g.WARNING?i.localize(1,null,e.content):i.localize(2,null,e.content),a.alert(r),(this.hasFocus()||t)&&this._showMessage()},t.prototype.hideMessage=function(){this.message=null,o.removeClass(this.element,"info"),o.removeClass(this.element,"warning"),o.removeClass(this.element,"error"),o.addClass(this.element,"idle"),this._hideMessage(),
this.applyStyles()},t.prototype.isInputValid=function(){return!!this.validation&&!this.validation(this.value)},t.prototype.validate=function(){var e=null;return this.validation&&((e=this.validation(this.value))?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),!e},t.prototype.stylesForType=function(e){switch(e){case g.INFO:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground};case g.WARNING:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground}}},t.prototype.classForType=function(e){switch(e){case g.INFO:return"info";case g.WARNING:return"warning";default:return"error"}},t.prototype._showMessage=function(){var e=this;if(this.contextViewProvider&&this.message){var t,n=function(){
return t.style.width=o.getTotalWidth(e.element)+"px"};this.state="open",this.contextViewProvider.showContextView({getAnchor:function(){return e.element},anchorAlignment:l.AnchorAlignment.RIGHT,render:function(i){t=o.append(i,v(".monaco-inputbox-container")),n();var r={inline:!0,className:"monaco-inputbox-message"},a=e.message.formatContent?s.renderFormattedText(e.message.content,r):s.renderText(e.message.content,r);o.addClass(a,e.classForType(e.message.type));var c=e.stylesForType(e.message.type);return a.style.backgroundColor=c.background?c.background.toString():null,a.style.border=c.border?"1px solid "+c.border:null,o.append(t,a),null},layout:n})}},t.prototype._hideMessage=function(){this.contextViewProvider&&"open"===this.state&&(this.state="idle",this.contextViewProvider.hideContextView())},t.prototype.onValueChange=function(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),"open"===this.state&&this.contextViewProvider.layout()},t.prototype.updateMirror=function(){if(this.mirror){
var e=this.value||this.placeholder,t=10===e.charCodeAt(e.length-1)?" ":"";this.mirror.textContent=e+t,this.layout()}},t.prototype.style=function(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.element){var e=this.inputBackground?this.inputBackground.toString():null,t=this.inputForeground?this.inputForeground.toString():null,n=this.inputBorder?this.inputBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor=e,this.input.style.color=t,
this.element.style.borderWidth=n?"1px":null,this.element.style.borderStyle=n?"solid":null,this.element.style.borderColor=n}},t.prototype.layout=function(){if(this.mirror){var e=this.cachedHeight;this.cachedHeight=o.getTotalHeight(this.mirror),e!==this.cachedHeight&&(this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedHeight))}},t.prototype.dispose=function(){this._hideMessage(),this.element=null,this.input=null,this.contextViewProvider=null,this.message=null,this.placeholder=null,this.ariaLabel=null,this.validation=null,this.state=null,this.actionbar=null,e.prototype.dispose.call(this)},t}(d.Widget);t.InputBox=y;var b=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.history=new f.HistoryNavigator(i.history,100),r}return n(t,e),t.prototype.addToHistory=function(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)},t.prototype.getHistory=function(){return this.history.getHistory()},t.prototype.showNextValue=function(){
var e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e)},t.prototype.showPreviousValue=function(){this.history.has(this.value)||this.addToHistory();var e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e)},t.prototype.clearHistory=function(){this.history.clear()},t.prototype.getCurrentValue=function(){var e=this.history.current();return e||(e=this.history.last(),this.history.next()),e},t.prototype.getPreviousValue=function(){return this.history.previous()||this.history.first()},t.prototype.getNextValue=function(){return this.history.next()||this.history.last()},t}(y);t.HistoryInputBox=b}),define(e[409],t([1,0,1161,8,118,92,7,398,1009]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i.localize(0,null),u=function(e){function t(t,n,i){var r=e.call(this)||this;return r._onDidOptionChange=r._register(new a.Emitter),r.onDidOptionChange=r._onDidOptionChange.event,
r._onKeyDown=r._register(new a.Emitter),r.onKeyDown=r._onKeyDown.event,r._onMouseDown=r._register(new a.Emitter),r.onMouseDown=r._onMouseDown.event,r._onInput=r._register(new a.Emitter),r.onInput=r._onInput.event,r._onKeyUp=r._register(new a.Emitter),r.onKeyUp=r._onKeyUp.event,r._onCaseSensitiveKeyDown=r._register(new a.Emitter),r.onCaseSensitiveKeyDown=r._onCaseSensitiveKeyDown.event,r._onRegexKeyDown=r._register(new a.Emitter),r.onRegexKeyDown=r._onRegexKeyDown.event,r._lastHighlightFindOptions=0,r.contextViewProvider=n,r.width=i.width||100,r.placeholder=i.placeholder||"",r.validation=i.validation,r.label=i.label||l,r.inputActiveOptionBorder=i.inputActiveOptionBorder,r.inputBackground=i.inputBackground,r.inputForeground=i.inputForeground,r.inputBorder=i.inputBorder,r.inputValidationInfoBorder=i.inputValidationInfoBorder,r.inputValidationInfoBackground=i.inputValidationInfoBackground,r.inputValidationWarningBorder=i.inputValidationWarningBorder,
r.inputValidationWarningBackground=i.inputValidationWarningBackground,r.inputValidationErrorBorder=i.inputValidationErrorBorder,r.inputValidationErrorBackground=i.inputValidationErrorBackground,r.regex=null,r.wholeWords=null,r.caseSensitive=null,r.domNode=null,r.inputBox=null,r.buildDomNode(i.appendCaseSensitiveLabel||"",i.appendWholeWordsLabel||"",i.appendRegexLabel||"",i.history),Boolean(t)&&t.appendChild(r.domNode),r.onkeydown(r.inputBox.inputElement,function(e){return r._onKeyDown.fire(e)}),r.onkeyup(r.inputBox.inputElement,function(e){return r._onKeyUp.fire(e)}),r.oninput(r.inputBox.inputElement,function(e){return r._onInput.fire()}),r.onmousedown(r.inputBox.inputElement,function(e){return r._onMouseDown.fire(e)}),r}return n(t,e),t.prototype.enable=function(){r.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){r.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),
this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.clear=function(){this.clearValidation(),this.setValue(""),this.focus()},t.prototype.setWidth=function(e){this.width=e,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,
this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){
this.caseSensitive.checked=e,this.setInputWidth()},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e,this.setInputWidth()},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.setInputWidth(),this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.focusOnRegex=function(){this.regex.focus()},t.prototype.highlightFindOptions=function(){r.removeClass(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,r.addClass(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.setInputWidth=function(){var e=this.width-this.caseSensitive.width()-this.wholeWords.width()-this.regex.width();this.inputBox.width=e},t.prototype.buildDomNode=function(e,t,n,i){var s=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",
r.addClass(this.domNode,"monaco-findInput"),this.inputBox=this._register(new o.HistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation||null},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:i})),this.regex=this._register(new c.RegexCheckbox({appendTitle:n,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.regex.onChange(function(e){s._onDidOptionChange.fire(e),e||s.inputBox.focus(),s.setInputWidth(),s.validate()})),
this._register(this.regex.onKeyDown(function(e){s._onRegexKeyDown.fire(e)})),this.wholeWords=this._register(new c.WholeWordsCheckbox({appendTitle:t,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.wholeWords.onChange(function(e){s._onDidOptionChange.fire(e),e||s.inputBox.focus(),s.setInputWidth(),s.validate()})),this.caseSensitive=this._register(new c.CaseSensitiveCheckbox({appendTitle:e,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.caseSensitive.onChange(function(e){s._onDidOptionChange.fire(e),e||s.inputBox.focus(),s.setInputWidth(),s.validate()})),this._register(this.caseSensitive.onKeyDown(function(e){s._onCaseSensitiveKeyDown.fire(e)}));var a=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=a.indexOf(document.activeElement);if(t>=0){var n=void 0
;e.equals(17)?n=(t+1)%a.length:e.equals(15)&&(n=0===t?a.length-1:t-1),e.equals(9)?a[t].blur():n>=0&&a[n].focus(),r.EventHelper.stop(e,!0)}}}),this.setInputWidth();var l=document.createElement("div");l.className="controls",l.appendChild(this.caseSensitive.domNode),l.appendChild(this.wholeWords.domNode),l.appendChild(this.regex.domNode),this.domNode.appendChild(l)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.showMessage=function(e){this.inputBox.showMessage(e)},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t.prototype.clearValidation=function(){this.inputBox.hideMessage()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.OPTION_CHANGE="optionChange",t}(s.Widget);t.FindInput=u}),define(e[356],t([1,0,23,41,8,84,74,1031]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i){var r=e.call(this,i||"submenu",t,"",!0)||this;return r.entries=n,r}return n(t,e),t}(i.Action);t.SubmenuAction=c
;var l=function(){function e(e,t,n){void 0===n&&(n={});var i=this;o.addClass(e,"monaco-menu-container"),e.setAttribute("role","presentation");var s=document.createElement("div");o.addClass(s,"monaco-menu"),s.setAttribute("role","presentation"),e.appendChild(s);var a={parent:this};this.actionBar=new r.ActionBar(s,{orientation:r.ActionsOrientation.VERTICAL,actionItemProvider:function(e){return i.doGetActionItem(e,n,a)},context:n.context,actionRunner:n.actionRunner,isMenu:!0,ariaLabel:n.ariaLabel}),this.actionBar.push(t,{icon:!0,label:!0,isMenu:!0})}return e.prototype.doGetActionItem=function(e,t,n){if(e instanceof r.Separator)return new r.ActionItem(t.context,e,{icon:!0});if(e instanceof c)return new d(e,e.entries,n,t);var i={};if(t.getKeyBinding){var o=t.getKeyBinding(e);o&&(i.keybinding=o.getLabel())}return new u(t.context,e,i)},Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this.actionBar.onDidCancel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBlur",{
get:function(){return this.actionBar.onDidBlur},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this.actionBar&&this.actionBar.focus(!0)},e.prototype.dispose=function(){this.actionBar&&(this.actionBar.dispose(),this.actionBar=null),this.listener&&(this.listener.dispose(),this.listener=null)},e}();t.Menu=l;var u=function(e){function t(t,n,i){void 0===i&&(i={});return i.isMenu=!0,e.call(this,n,n,i)||this}return n(t,e),t.prototype._addMnemonic=function(e,n){var i=t.MNEMONIC_REGEX.exec(e.label);if(i&&2===i.length){var r=i[1],o=e.label.replace(t.MNEMONIC_REGEX,r);n.accessKey=r.toLocaleLowerCase(),this.$e.attr("aria-label",o)}else this.$e.attr("aria-label",e.label)},t.prototype.render=function(t){e.prototype.render.call(this,t),this._addMnemonic(this.getAction(),t),this.$e.attr("role","menuitem")},t.prototype._updateLabel=function(){if(this.options.label){var e=this.getAction().label;e&&this.options.isMenu&&(e=e.replace(t.MNEMONIC_REGEX,"$1̲")),this.$e.text(e)}},t.MNEMONIC_REGEX=/&&(.)/g,t
}(r.ActionItem),d=function(e){function t(t,n,i,r){var o=e.call(this,t,t,{label:!0,isMenu:!0})||this;return o.submenuActions=n,o.parentData=i,o.submenuOptions=r,o}return n(t,e),t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.builder=a.$(t),a.$(this.builder).addClass("monaco-submenu-item"),a.$("span.submenu-indicator").text("▶").appendTo(this.builder),this.$e.attr("role","menu"),a.$(this.builder).on(o.EventType.KEY_UP,function(e){new s.StandardKeyboardEvent(e).equals(17)&&(o.EventHelper.stop(e,!0),n.createSubmenu())}),a.$(this.builder).on(o.EventType.KEY_DOWN,function(e){new s.StandardKeyboardEvent(e).equals(17)&&o.EventHelper.stop(e,!0)}),a.$(this.builder).on(o.EventType.MOUSE_OVER,function(e){n.mouseOver||(n.mouseOver=!0,setTimeout(function(){n.mouseOver&&(n.cleanupExistingSubmenu(!1),n.createSubmenu())},250))}),a.$(this.builder).on(o.EventType.MOUSE_LEAVE,function(e){n.mouseOver=!1,setTimeout(function(){
n.mouseOver||n.parentData.submenu!==n.mysubmenu||(n.parentData.parent.focus(),n.cleanupExistingSubmenu(!0))},750)})},t.prototype.onClick=function(e){o.EventHelper.stop(e,!0)},t.prototype.cleanupExistingSubmenu=function(e){this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)&&(this.parentData.submenu.dispose(),this.parentData.submenu=null)},t.prototype.createSubmenu=function(){var e=this;if(!this.parentData.submenu){var t=a.$(this.builder).div({class:"monaco-submenu menubar-menu-items-holder context-view"});a.$(t).style({left:a.$(this.builder).getClientArea().width+"px"}),a.$(t).on(o.EventType.KEY_UP,function(t){new s.StandardKeyboardEvent(t).equals(15)&&(o.EventHelper.stop(t,!0),e.parentData.parent.focus(),e.parentData.submenu.dispose(),e.parentData.submenu=null)}),a.$(t).on(o.EventType.KEY_DOWN,function(e){new s.StandardKeyboardEvent(e).equals(15)&&o.EventHelper.stop(e,!0)}),this.parentData.submenu=new l(t.getHTMLElement(),this.submenuActions,this.submenuOptions),
this.parentData.submenu.focus(),this.mysubmenu=this.parentData.submenu}},t}(u)}),define(e[267],t([1,0,356]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){var i=e.call(this,t,n,"contextsubmenu")||this;return i.entries=n,i}return n(t,e),t}(i.SubmenuAction);t.ContextSubMenu=r}),define(e[1191],t([3,2]),function(e,t){return e.create("vs/base/browser/ui/toolbar/toolbar",t)}),define(e[346],t([1,0,1191,4,23,41,366,1131]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT="context.toolbar";var c=function(){function e(e,t,n){void 0===n&&(n={orientation:s.ActionsOrientation.HORIZONTAL});var i=this;this.options=n,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=new l(function(){return i.toggleMenuActionItem&&i.toggleMenuActionItem.show()});var r=document.createElement("div");r.className="monaco-toolbar",e.appendChild(r),this.actionBar=new s.ActionBar(r,{
orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,actionItemProvider:function(e){return e.id===l.ID?(i.toggleMenuActionItem&&i.toggleMenuActionItem.dispose(),i.toggleMenuActionItem=new a.DropdownMenuActionItem(e,e.menuActions,t,i.options.actionItemProvider,i.actionRunner,i.options.getKeyBinding,"toolbar-toggle-more"),i.toggleMenuActionItem.setActionContext(i.actionBar.context),i.toggleMenuActionItem):n.actionItemProvider?n.actionItemProvider(e):null}})}return Object.defineProperty(e.prototype,"actionRunner",{get:function(){return this.actionBar.actionRunner},set:function(e){this.actionBar.actionRunner=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{set:function(e){this.actionBar.context=e,this.toggleMenuActionItem&&this.toggleMenuActionItem.setActionContext(e)},enumerable:!0,configurable:!0}),e.prototype.getContainer=function(){return this.actionBar.getContainer()},e.prototype.getItemsWidth=function(){
for(var e=0,t=0;t<this.actionBar.length();t++)e+=this.actionBar.getWidth(t);return e},e.prototype.setAriaLabel=function(e){this.actionBar.setAriaLabel(e)},e.prototype.setActions=function(e,t){var n=this;return function(){var i=e?e.slice(0):[];n.hasSecondaryActions=t&&t.length>0,n.hasSecondaryActions&&(n.toggleMenuAction.menuActions=t.slice(0),i.push(n.toggleMenuAction)),n.actionBar.clear(),i.forEach(function(e){n.actionBar.push(e,{icon:!0,label:!1,keybinding:n.getKeybindingLabel(e)})})}},e.prototype.getKeybindingLabel=function(e){var t=this.lookupKeybindings?this.options.getKeyBinding(e):void 0;return t?t.getLabel():void 0},e.prototype.addPrimaryAction=function(e){var t=this;return function(){if(t.hasSecondaryActions){var n=t.actionBar.length();t.actionBar.push(e,{icon:!0,label:!1,index:n,keybinding:t.getKeybindingLabel(e)})}else t.actionBar.push(e,{icon:!0,label:!1,keybinding:t.getKeybindingLabel(e)})}},e.prototype.dispose=function(){this.actionBar.dispose(),this.toggleMenuAction.dispose(),
this.toggleMenuActionItem&&this.toggleMenuActionItem.dispose()},e}();t.ToolBar=c;var l=function(e){function t(n){var r=e.call(this,t.ID,i.localize(0,null),null,!0)||this;return r.toggleDropdownMenu=n,r}return n(t,e),t.prototype.run=function(){return this.toggleDropdownMenu(),r.TPromise.as(!0)},Object.defineProperty(t.prototype,"menuActions",{get:function(){return this._menuActions},set:function(e){this._menuActions=e},enumerable:!0,configurable:!0}),t.ID="toolbar.toggle.more",t}(o.Action)}),define(e[1194],t([3,2]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[126],t([1,0,1194,30,20]),function(e,t,n,i,r){"use strict";function o(e,t){return e.message?t&&(e.stack||e.stacktrace)?n.localize(0,null,s(e),e.stack||e.stacktrace):s(e):n.localize(1,null)}function s(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?n.localize(2,null,e.message):e.message}function a(e,t){if(void 0===e&&(e=null),void 0===t&&(t=!1),!e)return n.localize(3,null)
;if(Array.isArray(e)){var s=r.coalesce(e),c=a(s[0],t);return s.length>1?n.localize(4,null,c,s.length):c}if(i.isString(e))return e;if(e.detail){var l=e.detail;if(l.error)return o(l.error,t);if(l.exception)return o(l.exception,t)}return e.stack?o(e,t):e.message?e.message:n.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=a}),define(e[1199],t([3,2]),function(e,t){return e.create("vs/base/common/jsonErrorMessages",t)}),define(e[345],t([1,0,1199,89]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParseErrorMessage=function(e){switch(e){case i.ParseErrorCode.InvalidSymbol:return n.localize(0,null);case i.ParseErrorCode.InvalidNumberFormat:return n.localize(1,null);case i.ParseErrorCode.PropertyNameExpected:return n.localize(2,null);case i.ParseErrorCode.ValueExpected:return n.localize(3,null);case i.ParseErrorCode.ColonExpected:return n.localize(4,null);case i.ParseErrorCode.CommaExpected:return n.localize(5,null)
;case i.ParseErrorCode.CloseBraceExpected:return n.localize(6,null);case i.ParseErrorCode.CloseBracketExpected:return n.localize(7,null);case i.ParseErrorCode.EndOfFileExpected:return n.localize(8,null);default:return""}}}),define(e[1201],t([3,2]),function(e,t){return e.create("vs/base/common/keybindingLabels",t)}),define(e[210],t([1,0,1201]),function(e,t,n){"use strict";function i(e,t,n){if(null===t)return"";var i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),i.push(t),i.join(n.separator)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){void 0===n&&(n=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}return e.prototype.toLabel=function(e,t,n,r,o){return null===t&&null===r?null:function(e,t,n,r,o){var s=i(e,t,o);return null!==r&&(s+=" ",s+=i(n,r,o)),s}(e,t,n,r,this.modifierLabels[o])},e}();t.ModifierLabelProvider=r,t.UILabelProvider=new r({
ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.localize(0,null),shiftKey:n.localize(1,null),altKey:n.localize(2,null),metaKey:n.localize(3,null),separator:"+"}),t.AriaLabelProvider=new r({ctrlKey:n.localize(4,null),shiftKey:n.localize(5,null),altKey:n.localize(6,null),metaKey:n.localize(7,null),separator:"+"},{ctrlKey:n.localize(8,null),shiftKey:n.localize(9,null),altKey:n.localize(10,null),metaKey:n.localize(11,null),separator:"+"}),t.ElectronAcceleratorLabelProvider=new r({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),t.UserSettingsLabelProvider=new r({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:"+"})}),define(e[264],t([1,0,24,210,8,1027]),function(e,t,n,i,r){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var o=r.$,s=function(){function e(e,t){this.os=t,this.domNode=r.append(e,o(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,n){this.didEverRender&&this.keybinding===t&&e.areSame(this.matches,n)||(this.keybinding=t,this.matches=n,this.render())},e.prototype.render=function(){if(r.clearNode(this.domNode),this.keybinding){var e=this.keybinding.getParts(),t=e[0],n=e[1];t&&this.renderPart(this.domNode,t,this.matches?this.matches.firstPart:null),n&&(r.append(this.domNode,o("span.monaco-keybinding-key-chord-separator",null," ")),this.renderPart(this.domNode,n,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()}this.didEverRender=!0},e.prototype.renderPart=function(e,t,n){var r=i.UILabelProvider.modifierLabels[this.os]
;t.ctrlKey&&this.renderKey(e,r.ctrlKey,n&&n.ctrlKey,r.separator),t.shiftKey&&this.renderKey(e,r.shiftKey,n&&n.shiftKey,r.separator),t.altKey&&this.renderKey(e,r.altKey,n&&n.altKey,r.separator),t.metaKey&&this.renderKey(e,r.metaKey,n&&n.metaKey,r.separator);var o=t.keyLabel;o&&this.renderKey(e,o,n&&n.keyCode,"")},e.prototype.renderKey=function(e,t,n,i){r.append(e,o("span.monaco-keybinding-key"+(n?".highlight":""),null,t)),i&&r.append(e,o("span.monaco-keybinding-key-separator",null,i))},e.prototype.dispose=function(){this.keybinding=null},e.areSame=function(e,t){return e===t||!e&&!t||!!e&&!!t&&n.equals(e.firstPart,t.firstPart)&&n.equals(e.chordPart,t.chordPart)},e}();t.KeybindingLabel=s}),define(e[1207],t([3,2]),function(e,t){return e.create("vs/base/common/severity",t)}),define(e[83],t([1,0,1207,14]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(r||(r={})),function(e){
var t="error",r="warning",o="warn",s="info",a=Object.create(null);a[e.Error]=n.localize(0,null),a[e.Warning]=n.localize(1,null),a[e.Info]=n.localize(2,null),e.fromValue=function(n){return n?i.equalsIgnoreCase(t,n)?e.Error:i.equalsIgnoreCase(r,n)||i.equalsIgnoreCase(o,n)?e.Warning:i.equalsIgnoreCase(s,n)?e.Info:e.Ignore:e.Ignore}}(r||(r={})),t.default=r}),define(e[1212],t([3,2]),function(e,t){return e.create("vs/base/node/processes",t)}),define(e[224],t([1,0,59,156,499,1212,4,30,10,24,25,11,479,361]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";function g(t,n){if(h.isWindows)try{var i={stdio:["pipe","pipe","ignore"]};n&&(i.cwd=n),r.execFileSync("taskkill",["/T","/F","/PID",t.pid.toString()],i)}catch(e){return{success:!1,error:e,code:e.status?function(e){switch(e){case 0:return f.TerminateResponseCode.Success;case 1:return f.TerminateResponseCode.AccessDenied;case 128:return f.TerminateResponseCode.ProcessNotFound;default:return f.TerminateResponseCode.Unknown}}(e.status):f.TerminateResponseCode.Unknown}
}else if(h.isLinux||h.isMacintosh)try{var o=l.default.parse(e.toUrl("vs/base/node/terminateProcess.sh")).fsPath,s=r.spawnSync(o,[t.pid.toString()]);if(s.error)return{success:!1,error:s.error}}catch(e){return{success:!1,error:e}}else t.kill("SIGKILL");return{success:!0}}function v(){return process.env.comspec||"cmd.exe"}Object.defineProperty(t,"__esModule",{value:!0}),t.Source=f.Source,t.TerminateResponseCode=f.TerminateResponseCode,t.terminateProcess=g,t.getWindowsShell=v;var m=function(){function e(e,t,n,i){var r=this;if(i)this.cmd=e,this.args=t,this.shell=n,this.options=i;else if(n&&t)this.module=e,this.args=t,this.shell=!1,this.options=n;else{var o=e;this.cmd=o.command,this.shell=o.isShellCommand,this.args=o.args.slice(0),this.options=o.options||{}}if(this.childProcess=null,this.terminateRequested=!1,this.options.env){var s=Object.create(null);Object.keys(process.env).forEach(function(e){s[e]=process.env[e]}),Object.keys(this.options.env).forEach(function(e){s[e]=r.options.env[e]}),this.options.env=s}}
return e.prototype.getSanitizedCommand=function(){var t=this.cmd.toLowerCase(),n=t.lastIndexOf(i.sep);return-1!==n&&(t=t.substring(n+1)),e.WellKnowCommands[t]?t:"other"},e.prototype.start=function(){var e=this;return h.isWindows&&(this.options&&this.options.cwd&&d.isUNC(this.options.cwd)||!this.options&&!this.options.cwd&&d.isUNC(process.cwd()))?a.TPromise.wrapError(new Error(s.localize(0,null))):this.useExec().then(function(t){var n,i,s,l=new a.PPromise(function(e,t,r){n=e,i=t,s=r});if(t){var d=e.cmd;e.args&&(d=d+" "+e.args.join(" ")),e.childProcess=r.exec(d,e.options,function(t,r,o){e.childProcess=null;var a=t;a&&a.killed?i({killed:e.terminateRequested,stdout:r.toString(),stderr:o.toString()}):e.handleExec(n,s,t,r,o)})}else{var p=null,f=function(t){e.childProcess=null,e.childProcessPromise=null,e.handleClose(t,n,s,i);var r={terminated:e.terminateRequested};c.isNumber(t)&&(r.cmdCode=t),n(r)};if(e.shell&&h.isWindows){var g=u.deepClone(e.options);g.windowsVerbatimArguments=!0,g.detached=!1
;var m=!1,y=!1,b=[],S=e.ensureQuotes(e.cmd);b.push(S.value),m=S.quoted,e.args&&e.args.forEach(function(t){S=e.ensureQuotes(t),b.push(S.value),y=y&&S.quoted});var _=["/s","/c"];m?y?_.push('"'+b.join(" ")+'"'):b.length>1?_.push('"'+b[0]+'" '+b.slice(1).join(" ")):_.push('"'+b[0]+'"'):_.push(b.join(" ")),p=r.spawn(v(),_,g)}else e.cmd?p=r.spawn(e.cmd,e.args,e.options):e.module&&(e.childProcessPromise=new a.TPromise(function(t,r,a){o.fork(e.module,e.args,e.options,function(o,a){if(o)return r(o),void i({terminated:e.terminateRequested,error:o});e.childProcess=a,e.pidResolve&&(e.pidResolve(c.isNumber(a.pid)?a.pid:-1),e.pidResolve=void 0),e.childProcess.on("close",f),e.handleSpawn(a,n,s,i,!1),t(a)})}));p&&(e.childProcess=p,e.childProcessPromise=a.TPromise.as(p),e.pidResolve&&(e.pidResolve(c.isNumber(p.pid)?p.pid:-1),e.pidResolve=void 0),p.on("error",function(t){e.childProcess=null,i({terminated:e.terminateRequested,error:t})}),p.pid&&(e.childProcess.on("close",f),e.handleSpawn(p,n,s,i,!0)))}return l})},
e.prototype.handleClose=function(e,t,n,i){},e.prototype.ensureQuotes=function(t){return e.regexp.test(t)?{value:'"'+t+'"',quoted:!0}:{value:t,quoted:t.length>0&&'"'===t[0]&&'"'===t[t.length-1]}},Object.defineProperty(e.prototype,"pid",{get:function(){var e=this;return this.childProcessPromise?this.childProcessPromise.then(function(e){return e.pid},function(e){return-1}):new a.TPromise(function(t){e.pidResolve=t})},enumerable:!0,configurable:!0}),e.prototype.terminate=function(){var e=this;return this.childProcessPromise?this.childProcessPromise.then(function(t){e.terminateRequested=!0;var n=g(t,e.options.cwd);return n.success&&(e.childProcess=null),n},function(e){return{success:!0}}):a.TPromise.as({success:!0})},e.prototype.useExec=function(){var e=this;return new a.TPromise(function(t,n,i){e.shell&&h.isWindows||t(!1);var o=r.spawn(v(),["/s","/c"]);o.on("error",function(e){t(!0)}),o.on("exit",function(e){t(!1)})})},e.WellKnowCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,grunt:!0,gulp:!0,jake:!0,jenkins:!0,
jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,tsc:!0,xbuild:!0},e.regexp=/^[^"].* .*[^"]/,e}();t.AbstractProcess=m;var y=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.handleExec=function(e,t,n,i,r){[i,r].forEach(function(e,n){var i=new p.LineDecoder;i.write(e).forEach(function(e){t({line:e,source:0===n?f.Source.stdout:f.Source.stderr})});var r=i.end();r&&t({line:r,source:0===n?f.Source.stdout:f.Source.stderr})}),e({terminated:this.terminateRequested,error:n})},t.prototype.handleSpawn=function(e,t,n,i,r){var o=this;this.stdoutLineDecoder=new p.LineDecoder,this.stderrLineDecoder=new p.LineDecoder,e.stdout.on("data",function(e){o.stdoutLineDecoder.write(e).forEach(function(e){return n({line:e,source:f.Source.stdout})})}),e.stderr.on("data",function(e){o.stderrLineDecoder.write(e).forEach(function(e){return n({line:e,source:f.Source.stderr})})})},t.prototype.handleClose=function(e,t,n,i){
[this.stdoutLineDecoder.end(),this.stderrLineDecoder.end()].forEach(function(e,t){e&&n({line:e,source:0===t?f.Source.stdout:f.Source.stderr})})},t}(m);t.LineProcess=y,t.createQueuedSender=function(e){var t=[],n=!1,i=function(r){n?t.push(r):e.send(r,function(e){if(e&&console.error(e),n=!1,t.length>0){var r=t.slice(0);t=[],r.forEach(function(e){return i(e)})}})&&!h.isWindows||(n=!0)};return{send:i}}}),define(e[258],t([1,0,156,4,18,24,7,224,131,348]),function(e,t,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(){var t=e.call(this,{send:function(e){try{process.send(e)}catch(e){}},onMessage:a.fromNodeEventEmitter(process,"message",function(e){return e})})||this;return process.once("disconnect",function(){return t.dispose()}),t}return n(t,e),t}(l.ChannelServer);t.Server=d;var h=function(){function e(e,t){this.modulePath=e,this.options=t;var n=t&&t.timeout?t.timeout:6e4;this.disposeDelayer=new o.Delayer(n),this.activeRequests=[],this.child=null,
this._client=null,this.channels=Object.create(null)}return e.prototype.getChannel=function(e){var t=this;return{call:function(n,i){return t.request(e,n,i)}}},e.prototype.request=function(e,t,n){var i=this;if(!this.disposeDelayer)return r.TPromise.wrapError(new Error("disposed"));this.disposeDelayer.cancel();var o=(this.channels[e]||(this.channels[e]=this.client.getChannel(e))).call(t,n),s=new r.TPromise(function(e,t,n){o.then(e,t,n).done(function(){i.activeRequests&&(i.activeRequests.splice(i.activeRequests.indexOf(s),1),0===i.activeRequests.length&&i.disposeDelayer.trigger(function(){return i.disposeClient()}))})},function(){return o.cancel()});return this.activeRequests.push(s),s},Object.defineProperty(e.prototype,"client",{get:function(){var e=this;if(!this._client){var t=this.options&&this.options.args?this.options.args:[],n=Object.create(null);n.env=s.assign(s.deepClone(process.env),{VSCODE_PARENT_PID:String(process.pid)}),this.options&&this.options.env&&(n.env=s.assign(n.env,this.options.env)),
this.options&&this.options.freshExecArgv&&(n.execArgv=[]),this.options&&"number"==typeof this.options.debug&&(n.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&"number"==typeof this.options.debugBrk&&(n.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),this.child=i.fork(this.modulePath,t,n);var r=new a.Emitter;a.fromNodeEventEmitter(this.child,"message",function(e){return e})(function(t){if(u.isRemoteConsoleLog(t))return u.log(t,"IPC Library: "+e.options.serverName),null;r.fire(t)});var o=this.options.useQueue?c.createQueuedSender(this.child):this.child,d={send:function(t){return e.child&&e.child.connected&&o.send(t)},onMessage:r.event};this._client=new l.ChannelClient(d);var h=function(){return e.disposeClient()};process.once("exit",h),this.child.on("error",function(t){return console.warn('IPC "'+e.options.serverName+'" errored with '+t)}),this.child.on("exit",function(t,n){process.removeListener("exit",h),e.activeRequests&&(e.activeRequests.forEach(function(e){
return e.cancel()}),e.activeRequests=[]),0!==t&&"SIGTERM"!==n&&(console.warn('IPC "'+e.options.serverName+'" crashed with exit code '+t+" and signal "+n),e.disposeDelayer.cancel(),e.disposeClient())})}return this._client},enumerable:!0,configurable:!0}),e.prototype.disposeClient=function(){this._client&&(this.child.kill(),this.child=null,this._client=null,this.channels=Object.create(null))},e.prototype.dispose=function(){this.disposeDelayer.cancel(),this.disposeDelayer=null,this.disposeClient(),this.activeRequests=null},e}();t.Client=h}),define(e[1217],t([3,2]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenModel",t)}),define(e[109],t([1,0,1217,4,30,277,252,41,194,8,264,11]),function(e,t,i,r,o,s,a,c,l,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=0,f=function(){function e(){}return e.prototype.getItemLabel=function(e){return e.getLabel()},e.prototype.getItemDescription=function(e){return e.getDescription()},e.prototype.getItemPath=function(e){
var t=e.getResource();return t?t.fsPath:void 0},e}();t.QuickOpenItemAccessorClass=f,t.QuickOpenItemAccessor=new f;var g=function(){function e(e){void 0===e&&(e=[]),this.id=(p++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return this.getLabel()},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getTooltip=function(){return null},e.prototype.getDescriptionTooltip=function(){return null},e.prototype.getKeybinding=function(){return null},e.prototype.getResource=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHidden=function(e){this.hidden=e},e.prototype.setHighlights=function(e,t,n){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=n},
e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e.prototype.mergeWithEditorHistory=function(){return!1},e}();t.QuickOpenEntry=g;var v=function(e){function t(t,n,i){var r=e.call(this)||this;return r.entry=t,r.groupLabel=n,r.withBorder=i,r}return n(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){
return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getResource=function(){return this.entry?this.entry.getResource():e.prototype.getResource.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getEntry=function(){return this.entry},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,n,i){this.entry?this.entry.setHighlights(t,n,i):e.prototype.setHighlights.call(this,t,n,i)},t.prototype.setHidden=function(t){this.entry?this.entry.setHidden(t):e.prototype.setHidden.call(this,t)},t.prototype.run=function(t,n){return this.entry?this.entry.run(t,n):e.prototype.run.call(this,t,n)},
t}(g);t.QuickOpenEntryGroup=v;var m=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return r.TPromise.as(null)},e.prototype.hasSecondaryActions=function(e,t){return!1},e.prototype.getSecondaryActions=function(e,t){return r.TPromise.as(null)},e.prototype.getActionItem=function(e,t,n){return null},e}(),y=function(){function e(e,t){void 0===e&&(e=new m),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t}return e.prototype.getHeight=function(e){return e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof v?"quickOpenEntryGroup":"quickOpenEntry"},e.prototype.renderTemplate=function(e,t,n){var i=document.createElement("div");u.addClass(i,"sub-content"),t.appendChild(i);var r=u.$(".quick-open-row"),o=u.$(".quick-open-row"),a=u.$(".quick-open-entry",null,r,o);i.appendChild(a);var p=document.createElement("span");r.appendChild(p);var f=new s.IconLabel(r,{supportHighlights:!0,supportDescriptionHighlights:!0
}),g=document.createElement("span");r.appendChild(g),u.addClass(g,"quick-open-entry-keybinding");var v=new d.KeybindingLabel(g,h.OS),m=document.createElement("div");o.appendChild(m),u.addClass(m,"quick-open-entry-meta");var y,b=new l.HighlightedLabel(m);"quickOpenEntryGroup"===e&&(y=document.createElement("div"),u.addClass(y,"results-group"),t.appendChild(y)),u.addClass(t,"actions");var S=document.createElement("div");u.addClass(S,"primary-action-bar"),t.appendChild(S);return{container:t,entry:a,icon:p,label:f,detail:b,keybinding:v,group:y,actionBar:new c.ActionBar(S,{actionRunner:this.actionRunner})}},e.prototype.renderElement=function(e,t,n,i){if(this.actionProvider.hasActions(null,e)?u.addClass(n.container,"has-actions"):u.removeClass(n.container,"has-actions"),n.actionBar.context=e,this.actionProvider.getActions(null,e).then(function(e){n.actionBar.isEmpty()&&e&&e.length>0?n.actionBar.push(e,{icon:!0,label:!1}):n.actionBar.isEmpty()||e&&0!==e.length||n.actionBar.clear()}),
e instanceof v&&e.getGroupLabel()?u.addClass(n.container,"has-group-label"):u.removeClass(n.container,"has-group-label"),e instanceof v){var r=e,o=n;r.showBorder()?(u.addClass(o.container,"results-group-separator"),o.container.style.borderTopColor=i.pickerGroupBorder.toString()):(u.removeClass(o.container,"results-group-separator"),o.container.style.borderTopColor=null);var s=r.getGroupLabel()||"";o.group.textContent=s,o.group.style.color=i.pickerGroupForeground.toString()}if(e instanceof g){var a=e.getHighlights(),c=a[0],l=a[1],d=a[2],h=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";n.icon.className=h;var p=e.getLabelOptions()||Object.create(null);p.matches=c||[],p.title=e.getTooltip(),p.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),p.descriptionMatches=l||[],n.label.setValue(e.getLabel(),e.getDescription(),p),n.detail.set(e.getDetail(),d),n.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null,
n.entry=null,n.keybinding.dispose(),n.keybinding=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null},e}(),b=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new m),this._entries=e,this._dataSource=this,this._renderer=new y(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{
get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.addEntries=function(e){o.isArray(e)&&(this._entries=this._entries.concat(e))},e.prototype.setEntries=function(e){o.isArray(e)&&(this._entries=e)},e.prototype.getEntries=function(e){return e?this._entries.filter(function(e){return!e.isHidden()}):this._entries},e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?i.localize(0,null,e.getAriaLabel()):i.localize(1,null)},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,n){return e.run(t,n)},e}();t.QuickOpenModel=b,t.compareEntries=function(e,t,n){var i=e.getHighlights()[0]||[],r=t.getHighlights()[0]||[];if(i.length&&!r.length)return-1;if(!i.length&&r.length)return 1;var o=e.getLabel(),s=t.getLabel();if(o===s){var c=e.getResource(),l=t.getResource();c&&l&&(o=c.fsPath,s=l.fsPath)}return a.compareAnything(o,s,n)}}),
define(e[1220],t([3,2]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenWidget",t)}),define(e[1222],t([3,2]),function(e,t){return e.create("vs/base/parts/tree/browser/treeDefaults",t)}),define(e[117],t([1,0,1222,4,23,11,9,8,73]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP"}(u=t.ClickBehavior||(t.ClickBehavior={}));var d;!function(e){e[e.SINGLE_CLICK=0]="SINGLE_CLICK",e[e.DOUBLE_CLICK=1]="DOUBLE_CLICK"}(d=t.OpenMode||(t.OpenMode={}));var h=function(){function e(){this._arr=[]}return e.prototype.has=function(e){for(var t=l.createSimpleKeybinding(e,s.OS),n=0,i=this._arr;n<i.length;n++){var r=i[n];if(t.equals(r.keybinding))return!0}return!1},e.prototype.set=function(e,t){this._arr.push({keybinding:l.createKeybinding(e,s.OS),callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t]
;if(e.equals(n.keybinding))return n.callback}return null},e}();t.KeybindingDispatcher=h;var p=function(){function e(e){void 0===e&&(e={clickBehavior:u.ON_MOUSE_DOWN,keyboardSupport:!0,openMode:d.SINGLE_CLICK});var t=this;this.options=e,this.downKeyBindingDispatcher=new h,this.upKeyBindingDispatcher=new h,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,function(e,n){return t.onUp(e,n)}),this.downKeyBindingDispatcher.set(18,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(15,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(17,function(e,n){return t.onRight(e,n)}),s.isMacintosh&&(this.downKeyBindingDispatcher.set(2064,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(300,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(302,function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(11,function(e,n){return t.onPageUp(e,n)}),
this.downKeyBindingDispatcher.set(12,function(e,n){return t.onPageDown(e,n)}),this.downKeyBindingDispatcher.set(14,function(e,n){return t.onHome(e,n)}),this.downKeyBindingDispatcher.set(13,function(e,n){return t.onEnd(e,n)}),this.downKeyBindingDispatcher.set(10,function(e,n){return t.onSpace(e,n)}),this.downKeyBindingDispatcher.set(9,function(e,n){return t.onEscape(e,n)}),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===u.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(c.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){return s.isMacintosh&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),
!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&((this.options.clickBehavior!==u.ON_MOUSE_DOWN||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n))},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var r=n,o={origin:i,originalEvent:n,didClickOnTwistie:this.isClickOnTwistie(r)};if(e.getInput()===t)e.clearFocus(o),e.clearSelection(o);else{n&&r.browserEvent&&"mousedown"===r.browserEvent.type||n.preventDefault(),n.stopPropagation(),e.domFocus(),e.setSelection([t],o),e.setFocus(t,o),this.shouldToggleExpansion(t,r,i)&&(e.isExpanded(t)?e.collapse(t).done(null,a.onUnexpectedError):e.expand(t).done(null,a.onUnexpectedError))}return!0},e.prototype.shouldToggleExpansion=function(e,t,n){var i="mouse"===n&&2===t.detail;return this.openOnSingleClick||i||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return this.options.openMode===d.SINGLE_CLICK},enumerable:!0,
configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!c.hasClass(t,"content"))return!1;var n=window.getComputedStyle(t,":before");if("none"===n.backgroundImage||"none"===n.display)return!1;var i=parseInt(n.width)+parseInt(n.paddingRight);return e.browserEvent.offsetX<=i},e.prototype.onContextMenu=function(e,t,n){return(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n))&&(n.preventDefault(),n.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t}
;return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).done(null,a.onUnexpectedError)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).done(null,a.onUnexpectedError)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).done(null,a.onUnexpectedError)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).done(null,a.onUnexpectedError)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).done(null,a.onUnexpectedError)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t}
;return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).done(null,a.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then(function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())}).done(null,a.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then(function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())}).done(null,a.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t}
;return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}();t.DefaultController=p;var f=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}();t.DefaultDragAndDrop=f;var g=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=g;var v=function(){function e(){}return e.prototype.compare=function(e,t,n){return 0},e}();t.DefaultSorter=v;var m=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=m;var y=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[]
;e.listFocusBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),
e.listFocusAndSelectionForeground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),
e.listDropBackground&&n.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),
e.listFocusOutline&&n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted)  \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused)  \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t")
;var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}();t.DefaultTreestyler=y;var b=function(e){function t(t,n){var r=e.call(this,"vs.tree.collapse",i.localize(0,null),"monaco-tree-action collapse-all",n)||this;return r.viewer=t,r}return n(t,e),t.prototype.run=function(e){return this.viewer.getHighlight()?r.TPromise.as(null):(this.viewer.collapseAll(),this.viewer.clearSelection(),this.viewer.clearFocus(),this.viewer.domFocus(),this.viewer.focusFirst(),r.TPromise.as(null))},t}(o.Action);t.CollapseAllAction=b}),define(e[1224],t([1,0,11,78,4,5,8,373,132,14,82,84,485,254,129,101,948,337,7,182,117,18]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var n=document.createElement("div");n.className="content";var i=document.createElement("div");i.appendChild(n),t={element:i,
templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,n)}}return t},e.prototype.release=function(e,t){!function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach(function(t){e._cache[t].forEach(function(n){e.context.renderer.disposeTemplate(e.context.tree,t,n.templateData),n.element=null,n.templateData=null}),delete e._cache[t]})},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}();t.RowCache=E;var w=function(){function e(e,t){var n=this;this.width=0,this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach(function(e){return n._styles[e]=!0}),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){
e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},
e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var n=["monaco-tree-row"];n.push.apply(n,Object.keys(this._styles)),this.model.hasChildren()&&n.push("has-children"),this.element.className=n.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var i=this.context.accessibilityProvider,r=i.getAriaLabel(this.context.tree,this.model.getElement());if(r&&this.element.setAttribute("aria-label",r),i.getPosInSet&&i.getSetSize&&(this.element.setAttribute("aria-setsize",i.getSetSize()),this.element.setAttribute("aria-posinset",i.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var o=u.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",o)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id")
;this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this.model.isExpanded())):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var s=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(s!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),s?(this.uri=s,this.draggable=!0,this.unbindDragStart=a.addDisposableListener(this.element,"dragstart",function(e){t.onDragStart(e)})):this.uri=null),!e&&this.element){var c=window.getComputedStyle(this.element),l=parseFloat(c.paddingLeft)
;this.context.horizontalScrolling&&(this.element.style.width="fit-content"),this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData),this.context.horizontalScrolling&&(this.width=a.getContentWidth(this.element)+l,this.element.style.width="")}}},e.prototype.updateWidth=function(){if(this.context.horizontalScrolling&&this.element){var e=window.getComputedStyle(this.element),t=parseFloat(e.paddingLeft);this.element.style.width="fit-content",this.width=a.getContentWidth(this.element)+t,this.element.style.width=""}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[T.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){
this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[T.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}();t.ViewItem=w;var I=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.row={element:i,templateData:null,templateId:null},r}return n(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(w),T=function(e){function t(n,i){var o=e.call(this)||this;o.lastClickTimeStamp=0,o.contentWidthUpdateDelayer=new C.Delayer(50),o.isRefreshing=!1,o.refreshingPreviousChildrenIds={},o._onDOMFocus=new b.Emitter,o._onDOMBlur=new b.Emitter,o._onDidScroll=new b.Emitter,t.counter++,o.instance=t.counter
;var s=void 0===n.options.horizontalScrollMode?v.ScrollbarVisibility.Hidden:n.options.horizontalScrollMode;o.horizontalScrolling=s!==v.ScrollbarVisibility.Hidden,o.context={dataSource:n.dataSource,renderer:n.renderer,controller:n.controller,dnd:n.dnd,filter:n.filter,sorter:n.sorter,tree:n.tree,accessibilityProvider:n.accessibilityProvider,options:n.options,cache:new E(n),horizontalScrolling:o.horizontalScrolling},o.modelListeners=[],o.viewListeners=[],o.model=null,o.items={},o.domNode=document.createElement("div"),o.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+o.instance,o.domNode.tabIndex=n.options.preventRootFocus?-1:0,o.styleElement=a.createStyleSheet(o.domNode),o.treeStyler=n.styler,o.treeStyler||(o.treeStyler=new _.DefaultTreestyler(o.styleElement,"monaco-tree-instance-"+o.instance)),o.domNode.setAttribute("role","tree"),o.context.options.ariaLabel&&o.domNode.setAttribute("aria-label",o.context.options.ariaLabel),o.context.options.alwaysFocused&&a.addClass(o.domNode,"focused"),
o.context.options.paddingOnRow||a.addClass(o.domNode,"no-row-padding"),o.wrapper=document.createElement("div"),o.wrapper.className="monaco-tree-wrapper",o.scrollableElement=new g.ScrollableElement(o.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:s,vertical:void 0!==n.options.verticalScrollMode?n.options.verticalScrollMode:v.ScrollbarVisibility.Auto,useShadows:n.options.useShadows}),o.scrollableElement.onScroll(function(e){o.render(e.scrollTop,e.height,e.scrollLeft,e.width,e.scrollWidth),o._onDidScroll.fire()}),r.isIE?(o.wrapper.style.msTouchAction="none",o.wrapper.style.msContentZooming="none"):l.Gesture.addTarget(o.wrapper),o.rowsContainer=document.createElement("div"),o.rowsContainer.className="monaco-tree-rows",n.options.showTwistie&&(o.rowsContainer.className+=" show-twisties");var c=a.trackFocus(o.domNode);return o.viewListeners.push(c.onDidFocus(function(){return o.onFocus()})),o.viewListeners.push(c.onDidBlur(function(){return o.onBlur()})),o.viewListeners.push(c),
o.viewListeners.push(a.addDisposableListener(o.domNode,"keydown",function(e){return o.onKeyDown(e)})),o.viewListeners.push(a.addDisposableListener(o.domNode,"keyup",function(e){return o.onKeyUp(e)})),o.viewListeners.push(a.addDisposableListener(o.domNode,"mousedown",function(e){return o.onMouseDown(e)})),o.viewListeners.push(a.addDisposableListener(o.domNode,"mouseup",function(e){return o.onMouseUp(e)})),o.viewListeners.push(a.addDisposableListener(o.wrapper,"click",function(e){return o.onClick(e)})),o.viewListeners.push(a.addDisposableListener(o.wrapper,"auxclick",function(e){return o.onClick(e)})),o.viewListeners.push(a.addDisposableListener(o.domNode,"contextmenu",function(e){return o.onContextMenu(e)})),o.viewListeners.push(a.addDisposableListener(o.wrapper,l.EventType.Tap,function(e){return o.onTap(e)})),o.viewListeners.push(a.addDisposableListener(o.wrapper,l.EventType.Change,function(e){return o.onTouchChange(e)})),
r.isIE&&(o.viewListeners.push(a.addDisposableListener(o.wrapper,"MSPointerDown",function(e){return o.onMsPointerDown(e)})),o.viewListeners.push(a.addDisposableListener(o.wrapper,"MSGestureTap",function(e){return o.onMsGestureTap(e)})),o.viewListeners.push(a.addDisposableThrottledListener(o.wrapper,"MSGestureChange",function(e){return o.onThrottledMsGestureChange(e)},function(e,t){t.stopPropagation(),t.preventDefault();var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}))),o.viewListeners.push(a.addDisposableListener(window,"dragover",function(e){return o.onDragOver(e)})),o.viewListeners.push(a.addDisposableListener(o.wrapper,"drop",function(e){return o.onDrop(e)})),o.viewListeners.push(a.addDisposableListener(window,"dragend",function(e){return o.onDragEnd(e)})),o.viewListeners.push(a.addDisposableListener(window,"dragleave",function(e){return o.onDragOver(e)})),o.wrapper.appendChild(o.rowsContainer),
o.domNode.appendChild(o.scrollableElement.getDomNode()),i.appendChild(o.domNode),o.lastRenderTop=0,o.lastRenderHeight=0,o.didJustPressContextMenuKey=!1,o.currentDropTarget=null,o.currentDropTargets=[],o.shouldInvalidateDropReaction=!1,o.dragAndDropScrollInterval=null,o.dragAndDropScrollTimeout=null,o.onHiddenScrollTop=null,o.onRowsChanged(),o.layout(),o.setupMSGesture(),o.applyStyles(n.options),o}return n(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDOMBlur",{get:function(){return this._onDOMBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidScroll",{get:function(){return this._onDidScroll.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){this.treeStyler.style(e)},t.prototype.createViewItem=function(e){return new w(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){
this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.onVisible=function(){this.scrollTop=this.onHiddenScrollTop,this.onHiddenScrollTop=null,this.setupMSGesture()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout(function(){return e.msGesture.target=e.wrapper},100))},t.prototype.onHidden=function(){this.onHiddenScrollTop=this.scrollTop},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e,t){this.isTreeVisible()&&(this.viewHeight=e||a.getContentHeight(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=t||a.getContentWidth(this.wrapper)))},t.prototype.getFirstVisibleElement=function(){var e=this.itemAtIndex(this.indexAt(this.lastRenderTop));return e&&e.model.getElement()},t.prototype.render=function(e,t,n,i,r){
var o,s,a=e,c=e+t,l=this.lastRenderTop+this.lastRenderHeight;for(o=this.indexAfter(c)-1,s=this.indexAt(Math.max(l,a));o>=s;o--)this.insertItemInDOM(this.itemAtIndex(o));for(o=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(c))-1,s=this.indexAt(a);o>=s;o--)this.insertItemInDOM(this.itemAtIndex(o));for(o=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(l));o<s;o++)this.removeItemFromDOM(this.itemAtIndex(o));for(o=Math.max(this.indexAfter(c),this.indexAt(this.lastRenderTop)),s=this.indexAfter(l);o<s;o++)this.removeItemFromDOM(this.itemAtIndex(o));var u=this.itemAtIndex(this.indexAt(a));u&&(this.rowsContainer.style.top=u.top-a+"px"),this.horizontalScrolling&&(this.rowsContainer.style.left=-n+"px",this.rowsContainer.style.width=Math.max(r,i)+"px"),this.lastRenderTop=a,this.lastRenderHeight=c-a},t.prototype.setModel=function(e){this.releaseModel(),this.model=e,this.model.onRefresh(this.onRefreshing,this,this.modelListeners),
this.model.onDidRefresh(this.onRefreshed,this,this.modelListeners),this.model.onSetInput(this.onClearingInput,this,this.modelListeners),this.model.onDidSetInput(this.onSetInput,this,this.modelListeners),this.model.onDidFocus(this.onModelFocusChange,this,this.modelListeners),this.model.onRefreshItemChildren(this.onItemChildrenRefreshing,this,this.modelListeners),this.model.onDidRefreshItemChildren(this.onItemChildrenRefreshed,this,this.modelListeners),this.model.onDidRefreshItem(this.onItemRefresh,this,this.modelListeners),this.model.onExpandItem(this.onItemExpanding,this,this.modelListeners),this.model.onDidExpandItem(this.onItemExpanded,this,this.modelListeners),this.model.onCollapseItem(this.onItemCollapsing,this,this.modelListeners),this.model.onDidRevealItem(this.onItemReveal,this,this.modelListeners),this.model.onDidAddTraitItem(this.onItemAddTrait,this,this.modelListeners),this.model.onDidRemoveTraitItem(this.onItemRemoveTrait,this,this.modelListeners)},t.prototype.onRefreshing=function(){
this.isRefreshing=!0},t.prototype.onRefreshed=function(){this.isRefreshing=!1,this.onRowsChanged()},t.prototype.onRowsChanged=function(e){void 0===e&&(e=this.scrollTop),this.isRefreshing||(this.scrollTop=e,this.updateScrollWidth())},t.prototype.updateScrollWidth=function(){var e=this;this.horizontalScrolling&&this.contentWidthUpdateDelayer.trigger(function(){for(var t=0,n=0,i=Object.keys(e.items);n<i.length;n++){var r=i[n];t=Math.max(t,e.items[r].width)}e.scrollWidth=t+10})},t.prototype.focusNextPage=function(e){var t=this,n=this.indexAt(this.scrollTop+this.viewHeight);n=0===n?0:n-1;var i=this.itemAtIndex(n).model.getElement();if(this.model.getFocus()!==i)this.model.setFocus(i,e);else{var r=this.scrollTop;this.scrollTop+=this.viewHeight,this.scrollTop!==r&&setTimeout(function(){t.focusNextPage(e)},0)}},t.prototype.focusPreviousPage=function(e){var t,n=this;t=0===this.scrollTop?this.indexAt(this.scrollTop):this.indexAfter(this.scrollTop-1);var i=this.itemAtIndex(t).model.getElement()
;if(this.model.getFocus()!==i)this.model.setFocus(i,e);else{var r=this.scrollTop;this.scrollTop-=this.viewHeight,this.scrollTop!==r&&setTimeout(function(){n.focusPreviousPage(e)},0)}},Object.defineProperty(t.prototype,"viewHeight",{get:function(){return this.scrollableElement.getScrollDimensions().height},set:function(e){this.scrollableElement.setScrollDimensions({height:e})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollHeight",{set:function(e){this.scrollableElement.setScrollDimensions({scrollHeight:e})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewWidth",{get:function(){return this.scrollableElement.getScrollDimensions().width},set:function(e){this.scrollableElement.setScrollDimensions({width:e})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollWidth",{set:function(e){this.scrollableElement.setScrollDimensions({scrollWidth:e})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollTop",{get:function(){
return this.scrollableElement.getScrollPosition().scrollTop},set:function(e){this.scrollableElement.setScrollDimensions({scrollHeight:this.getContentHeight()}),this.scrollableElement.setScrollPosition({scrollTop:e})},enumerable:!0,configurable:!0}),t.prototype.getScrollPosition=function(){var e=this.getContentHeight()-this.viewHeight;return e<=0?1:this.scrollTop/e},t.prototype.setScrollPosition=function(e){var t=this.getContentHeight()-this.viewHeight;this.scrollTop=t*e},t.prototype.onClearingInput=function(e){var t=e.item;t&&(this.onRemoveItems(new f.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.onSetInput=function(e){this.context.cache.garbageCollect(),this.inputItem=new I(this.context,e.item,this.wrapper)},t.prototype.onItemChildrenRefreshing=function(e){var n=e.item,i=this.items[n.id];if(i&&this.context.options.showLoading&&(i.loadingTimer=setTimeout(function(){i.loadingTimer=0,i.loading=!0},t.LOADING_DECORATION_DELAY)),!e.isNested){
for(var r,o=[],s=n.getNavigator();r=s.next();)o.push(r.id);this.refreshingPreviousChildrenIds[n.id]=o}},t.prototype.onItemChildrenRefreshed=function(e){var t=this,n=e.item,i=this.items[n.id];if(i&&(i.loadingTimer&&(clearTimeout(i.loadingTimer),i.loadingTimer=0),i.loading=!1),!e.isNested){for(var r,o=this.refreshingPreviousChildrenIds[n.id],s=[],a=n.getNavigator();r=a.next();)s.push(r);var l=Math.abs(o.length-s.length)>1e3,u=void 0,d=void 0;if(!l){d=(u=new c.LcsDiff({getLength:function(){return o.length},getElementAtIndex:function(e){return o[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null).ComputeDiff(!1)).some(function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n<i;n++)if(t.items.hasOwnProperty(s[n].id))return!0;return!1})}if(!l&&!d&&u.length<50)for(var h=0,p=u.length;h<p;h++){var g=u[h];if(g.originalLength>0&&this.onRemoveItems(new f.ArrayIterator(o,g.originalStart,g.originalStart+g.originalLength)),
g.modifiedLength>0){var v=s[g.modifiedStart-1]||n;v=v.getDepth()>0?v:null,this.onInsertItems(new f.ArrayIterator(s,g.modifiedStart,g.modifiedStart+g.modifiedLength),v?v.id:null)}}else(l||u.length)&&(this.onRemoveItems(new f.ArrayIterator(o)),this.onInsertItems(new f.ArrayIterator(s),n.getDepth()>0?n.id:null));(l||u.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter(function(e){return t.items.hasOwnProperty(e.id)})),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id),r=this.scrollTop;n.top+n.height<=this.scrollTop&&(r+=i),this.onRowsChanged(r)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,
this.onRemoveItems(new f.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.updateWidth=function(e){if(e&&e.isVisible()){var t=this.items[e.id];t&&(t.updateWidth(),this.updateScrollWidth())}},t.prototype.getRelativeTop=function(e){if(e&&e.isVisible()){var t=this.items[e.id];if(t)return(t.top-this.scrollTop)/(this.viewHeight-t.height)}return-1},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=(n=n<0?0:n)>1?1:n;var r=i.height-this.viewHeight;this.scrollTop=r*n+i.top}else{var o=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top<this.scrollTop?this.scrollTop=i.top:o>=s&&(this.scrollTop=o-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(a.addClass(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){
var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(a.removeClass(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();a.toggleClass(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",u.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},
t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new d.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&(r.isIE&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,n.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e);if(!(t.ctrlKey&&i.isNative&&i.isMacintosh)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseDown(this.context.tree,n.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e);if(!(t.ctrlKey&&i.isNative&&i.isMacintosh)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseUp(this.context.tree,n.model.getElement(),t)}}},
t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,n;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var i,r=new h.StandardKeyboardEvent(e);if(n=this.model.getFocus()){var o=this.context.dataSource.getId(this.context.tree,n),s=this.items[o];i=a.getDomNodePagePosition(s.element)}else n=this.model.getInput(),i=a.getDomNodePagePosition(this.inputItem.element);t=new y.KeyboardContextMenuEvent(i.left+i.width,i.top,r)}else{var c=new d.StandardMouseEvent(e),l=this.getItemAround(c.target);if(!l)return;n=l.model.getElement(),t=new y.MouseContextMenuEvent(c)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new h.StandardKeyboardEvent(e)
;this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new h.StandardKeyboardEvent(e))},t.prototype.onDragStart=function(e,n){if(!this.model.getHighlight()){var i,r=e.model.getElement(),o=this.model.getSelection();if(i=o.indexOf(r)>-1?o:[r],n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(S.DataTransfers.RESOURCES,JSON.stringify([e.uri])),n.dataTransfer.setDragImage){var s=void 0;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,i):String(i.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),
n.dataTransfer.setDragImage(a,-10,-10),setTimeout(function(){return document.body.removeChild(a)},0)}this.currentDragAndDropData=new p.ElementsDragAndDropData(i),t.currentExternalDragAndDropData=new p.ExternalElementsDragAndDropData(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new d.DragMouseEvent(n))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=a.getTopLeftOffset(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,r=e.viewHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>r&&(i=Math.min(14,.2*(n-r))),e.scrollTop+=i}},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null},1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),
this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var n=this,i=new d.DragMouseEvent(e),r=this.getItemAround(i.target);if(!r||0===i.posx&&0===i.posy&&i.browserEvent.type===a.EventType.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=i.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!i.dataTransfer.types)return!1
;this.currentDragAndDropData=new p.DesktopDragAndDropData}this.currentDragAndDropData.update(i);var s,c,l=r.model;do{if(s=l?l.getElement():this.model.getInput(),!(c=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,s,i))||c.bubble!==y.DragOverBubble.BUBBLE_UP)break;l=l&&l.parent}while(l);if(!l)return this.currentDropElement=null,!1;var u=c&&c.accept;u?(this.currentDropElement=l.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=c.effect===y.DragOverEffect.COPY?"copy":"move"):this.currentDropElement=null;var h=l.id===this.inputItem.id?this.inputItem:this.items[l.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==h||!function(e,t){return!e&&!t||!(!e||!t)&&e.accept===t.accept&&e.bubble===t.bubble&&e.effect===t.effect}(this.currentDropElementReaction,c))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],
this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=h,this.currentDropElementReaction=c,u)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),c.bubble===y.DragOverBubble.BUBBLE_DOWN)for(var f,g=l.getNavigator();f=g.next();)(r=this.items[f.id])&&(r.dropTarget=!0,this.currentDropTargets.push(r));c.autoExpand&&(this.currentDropPromise=o.TPromise.timeout(500).then(function(){return n.context.tree.expand(n.currentDropElement)}).then(function(){return n.shouldInvalidateDropReaction=!0}))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new d.DragMouseEvent(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){
this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||a.addClass(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||a.removeClass(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},
t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.top<this.lastRenderTop+this.lastRenderHeight&&e.top+e.height>this.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=s.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=s.dispose(this.viewListeners),
this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach(function(e){return t.items[e].removeFromDOM()}),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(m.HeightMap);t.TreeView=T}),define(e[257],t([1,0,117,946,1224,254,7,51,24,1134]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){return function(e,t,i){if(void 0===i&&(i={}),this.tree=e,this.configuration=t,this.options=i,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new n.DefaultController({clickBehavior:n.ClickBehavior.ON_MOUSE_UP,
keyboardSupport:"boolean"!=typeof i.keyboardSupport||i.keyboardSupport}),this.dnd=t.dnd||new n.DefaultDragAndDrop,this.filter=t.filter||new n.DefaultFilter,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new n.DefaultAccessibilityProvider,this.styler=t.styler||null}}();t.TreeContext=l;var u={listFocusBackground:a.Color.fromHex("#073655"),listActiveSelectionBackground:a.Color.fromHex("#0E639C"),listActiveSelectionForeground:a.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:a.Color.fromHex("#094771"),listFocusAndSelectionForeground:a.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:a.Color.fromHex("#3F3F46"),listHoverBackground:a.Color.fromHex("#2A2D2E"),listDropBackground:a.Color.fromHex("#383B3D")},d=function(){function e(e,t,n){void 0===n&&(n={}),this._onDidChangeFocus=new s.Relay,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new s.Relay,this.onDidChangeSelection=this._onDidChangeSelection.event,
this._onHighlightChange=new s.Relay,this.onDidChangeHighlight=this._onHighlightChange.event,this._onDidExpandItem=new s.Relay,this.onDidExpandItem=this._onDidExpandItem.event,this._onDidCollapseItem=new s.Relay,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDispose=new s.Emitter,this.onDidDispose=this._onDispose.event,this.container=e,c.mixin(n,u,!1),n.twistiePixels="number"==typeof n.twistiePixels?n.twistiePixels:32,n.showTwistie=!1!==n.showTwistie,n.indentPixels="number"==typeof n.indentPixels?n.indentPixels:12,n.alwaysFocused=!0===n.alwaysFocused,n.useShadows=!1!==n.useShadows,n.paddingOnRow=!1!==n.paddingOnRow,n.showLoading=!1!==n.showLoading,this.context=new l(this,t,n),this.model=new i.TreeModel(this.context),this.view=new r.TreeView(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,
this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this.view&&this.view.onDOMBlur},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidScroll",{get:function(){return this.view&&this.view.onDidScroll},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.onVisible=function(){this.view.onVisible()},e.prototype.onHidden=function(){this.view.onHidden()},e.prototype.setInput=function(e){
return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.updateWidth=function(e){var t=this.model.getItem(e);return this.view.updateWidth(t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.expandAll=function(e){return this.model.expandAll(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.collapseAll=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.model.collapseAll(e,t)},e.prototype.collapseDeepestExpandedLevel=function(){return this.model.collapseDeepestExpandedLevel()},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.toggleExpansionAll=function(e){return this.model.toggleExpansionAll(e)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.getExpandedElements=function(){
return this.model.getExpandedElements()},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getRelativeTop=function(e){var t=this.model.getItem(e);return this.view.getRelativeTop(t)},e.prototype.getFirstVisibleElement=function(){return this.view.getFirstVisibleElement()},e.prototype.getScrollPosition=function(){return this.view.getScrollPosition()},e.prototype.setScrollPosition=function(e){this.view.setScrollPosition(e)},e.prototype.getContentHeight=function(){return this.view.getContentHeight()},e.prototype.setHighlight=function(e,t){this.model.setHighlight(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.isHighlighted=function(e){return this.model.isFocused(e)},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.select=function(e,t){this.model.select(e,t)},e.prototype.selectRange=function(e,t,n){this.model.selectRange(e,t,n)},e.prototype.deselectRange=function(e,t,n){
this.model.deselectRange(e,t,n)},e.prototype.selectAll=function(e,t){this.model.selectAll(e,t)},e.prototype.deselect=function(e,t){this.model.deselect(e,t)},e.prototype.deselectAll=function(e,t){this.model.deselectAll(e,t)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.toggleSelection=function(e,t){this.model.toggleSelection(e,t)},e.prototype.isSelected=function(e){return this.model.isSelected(e)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.selectNext=function(e,t,n){this.model.selectNext(e,t,n)},e.prototype.selectPrevious=function(e,t,n){this.model.selectPrevious(e,t,n)},e.prototype.selectParent=function(e,t){this.model.selectParent(e,t)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.isFocused=function(e){return this.model.isFocused(e)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){
this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.addTraits=function(e,t){this.model.addTraits(e,t)},e.prototype.removeTraits=function(e,t){this.model.removeTraits(e,t)},e.prototype.toggleTrait=function(e,t){this.model.hasTrait(e,t)?this.model.removeTraits(e,[t]):this.model.addTraits(e,[t])},e.prototype.hasTrait=function(e,t){return this.model.hasTrait(e,t)},e.prototype.getNavigator=function(e,t){
return new o.MappedNavigator(this.model.getNavigator(e,t),function(e){return e&&e.getElement()})},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}();t.Tree=d}),define(e[1230],t([1,0,1220,4,11,30,9,122,847,74,118,83,257,205,84,117,8,5,101,51,24,82,1132]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.onContextMenu=function(t,n,i){return o.isMacintosh?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(v.DefaultController);t.QuickOpenController=E;var w;!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",
e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(w=t.HideReason||(t.HideReason={}));var I={background:S.Color.fromHex("#1E1E1E"),foreground:S.Color.fromHex("#CCCCCC"),pickerGroupForeground:S.Color.fromHex("#0097FB"),pickerGroupBorder:S.Color.fromHex("#3F3F46"),widgetShadow:S.Color.fromHex("#000000"),progressBarBackground:S.Color.fromHex("#0E70C0")},T=i.localize(0,null),x=function(){function e(e,t,n){this.isDisposed=!1,this.toUnbind=[],this.container=e,this.callbacks=t,this.options=n,this.styles=n||Object.create(null),_.mixin(this.styles,I,!1),this.model=null}return e.prototype.getElement=function(){return u.$(this.builder).getHTMLElement()},e.prototype.getModel=function(){return this.model},e.prototype.setCallbacks=function(e){this.callbacks=e},e.prototype.create=function(){var e=this;return this.builder=u.$().div(function(t){t.on(m.EventType.KEY_DOWN,function(t){9===new g.StandardKeyboardEvent(t).keyCode&&(m.EventHelper.stop(t,!0),e.hide(w.CANCELED))}).on(m.EventType.CONTEXT_MENU,function(e){
return m.EventHelper.stop(e,!0)}).on(m.EventType.FOCUS,function(t){return e.gainingFocus()},null,!0).on(m.EventType.BLUR,function(t){return e.loosingFocus(t)},null,!0),e.progressBar=new f.ProgressBar(t.clone(),{progressBarBackground:e.styles.progressBarBackground}),e.progressBar.hide(),t.div({class:"quick-open-input"},function(t){e.inputContainer=t,e.inputBox=new d.InputBox(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:T,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder}),e.inputElement=e.inputBox.inputElement,
e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),m.addDisposableListener(e.inputBox.inputElement,m.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)m.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===n.keyCode||i){m.EventHelper.stop(t,!0);var r=e.tree.getFocus();r&&e.elementSelected(r,t,i?c.Mode.OPEN_IN_BACKGROUND:c.Mode.OPEN)}}),m.addDisposableListener(e.inputBox.inputElement,m.EventType.INPUT,function(t){e.onType()})}),e.treeContainer=t.div({class:"quick-open-tree"},function(t){var n=e.options.treeCreator||function(e,t,n){return new p.Tree(e,t,n)};e.tree=n(t.getHTMLElement(),{dataSource:new l.DataSource(e),
controller:new E({clickBehavior:v.ClickBehavior.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new l.Renderer(e,e.styles),filter:new l.Filter(e),accessibilityProvider:new l.AccessibilityProvider(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:b.ScrollbarVisibility.Visible,horizontalScrollMode:b.ScrollbarVisibility.Hidden,ariaLabel:i.localize(1,null),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!0}),e.treeElement=e.tree.getHTMLElement(),e.toUnbind.push(e.tree.onDidChangeFocus(function(t){e.elementFocused(t.focus,t)})),e.toUnbind.push(e.tree.onDidChangeSelection(function(t){if(t.selection&&t.selection.length>0){var n=t.payload&&t.payload.originalEvent instanceof C.StandardMouseEvent?t.payload.originalEvent:void 0,i=!!n&&e.shouldOpenInBackground(n);e.elementSelected(t.selection[0],t,i?c.Mode.OPEN_IN_BACKGROUND:c.Mode.OPEN)}}))}).on(m.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t)
;e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(m.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode)))}).on(m.EventType.KEY_UP,function(t){var n=new g.StandardKeyboardEvent(t),i=n.keyCode;if(e.quickNavigateConfiguration){var r=e.quickNavigateConfiguration.keybindings;if(3===i||r.some(function(e){var t=e.getParts(),r=t[0];return!t[1]&&(r.shiftKey&&4===i?!(n.ctrlKey||n.altKey||n.metaKey):!(!r.altKey||6!==i)||(!(!r.ctrlKey||5!==i)||!(!r.metaKey||57!==i)))})){var o=e.tree.getFocus();o&&e.elementSelected(o,t)}}}).clone()}).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),m.addDisposableListener(this.treeContainer.getHTMLElement(),m.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t);e.quickNavigateConfiguration||18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(m.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),
e.inputBox.inputElement.focus())}),this.builder.getHTMLElement()},e.prototype.style=function(e){this.styles=e,this.applyStyles()},e.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,n=this.styles.borderColor?this.styles.borderColor.toString():null,i=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",n),this.builder.style("border-width",n?"1px":null),this.builder.style("border-style",n?"solid":null),this.builder.style("box-shadow",i?"0 5px 8px "+i:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,
inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},e.prototype.shouldOpenInBackground=function(e){if(e instanceof g.StandardKeyboardEvent){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},e.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},
e.prototype.navigate=function(e,t){this.isVisible()&&(!this.quickNavigateConfiguration&&t&&(this.quickNavigateConfiguration=t,this.tree.domFocus()),this.navigateInTree(e?18:16))},e.prototype.navigateInTree=function(e,t){var n=this.tree.getInput(),i=n?n.entries:[],r=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var o=this.tree.getFocus();i.length>1&&r===o&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(o=this.tree.getFocus())&&this.tree.reveal(o).done(null,a.onUnexpectedError)},e.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var n={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration}
;this.model.runner.run(e,c.Mode.PREVIEW,n)}},e.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var r=n||c.Mode.OPEN,o={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,r,o)}i&&this.hide(w.ELEMENT_SELECTED)},e.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},e.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.domFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||s.isString(e)?this.helpText.hide():this.helpText.show()),
s.isString(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},e.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},e.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},e.prototype.setInputAndLayout=function(e,t){var n=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then(function(){return n.model=e,n.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),n.tree.setInput(e)}).done(function(){n.tree.layout(),e&&e.entries.some(function(t){return n.isElementVisible(e,t)})&&n.autoFocus(e,t)},a.onUnexpectedError)},e.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},e.prototype.autoFocus=function(e,t){var n=this;void 0===t&&(t={});var i=e.entries.filter(function(t){return n.isElementVisible(e,t)})
;if(t.autoFocusPrefixMatch){for(var r=void 0,o=void 0,s=t.autoFocusPrefixMatch,c=s.toLowerCase(),l=0;l<i.length;l++){var u=i[l],d=e.dataSource.getLabel(u);if(r||0!==d.indexOf(s)?o||0!==d.toLowerCase().indexOf(c)||(o=u):r=u,r&&o)break}var h=r||o;if(h)return this.tree.setFocus(h),void this.tree.reveal(h,.5).done(null,a.onUnexpectedError)}t.autoFocusFirstEntry?(this.tree.focusFirst(),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):"number"==typeof t.autoFocusIndex?i.length>t.autoFocusIndex&&(this.tree.focusNth(t.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):t.autoFocusSecondEntry?i.length>1&&this.tree.focusNth(1):t.autoFocusLastEntry&&i.length>1&&this.tree.focusLast()},e.prototype.refresh=function(e,t){var n=this;this.isVisible()&&(e||(e=this.tree.getInput()),e&&(this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.refresh().done(function(){if(n.tree.layout(),t){t&&e&&e.entries.some(function(t){return n.isElementVisible(e,t)
})&&n.autoFocus(e,t)}},a.onUnexpectedError)))},e.prototype.getHeight=function(t){var n=this,i=t.renderer;if(!t){var r=i.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*r:0}var o,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(o=.4*(this.layoutDimensions.height-50)),(!o||o>e.MAX_ITEMS_HEIGHT)&&(o=e.MAX_ITEMS_HEIGHT);for(var a=t.entries.filter(function(e){return n.isElementVisible(t,e)}),c=this.options.maxItemsToShow||a.length,l=0;l<c&&l<a.length;l++){var u=i.getHeight(a[l]);if(!(s+u<=o))break;s+=u}return s},e.prototype.hide=function(e){this.isVisible()&&(this.visible=!1,this.builder.hide(),this.builder.domBlur(),this.inputBox.value="",this.tree.setInput(null),this.inputElement.setAttribute("aria-haspopup","false"),this.treeContainer.style({height:(this.options.minItemsToShow?22*this.options.minItemsToShow:0)+"px"}),this.progressBar.stop().hide(),this.tree.isDOMFocused()?this.tree.domBlur():this.inputBox.hasFocus()&&this.inputBox.blur(),
e===w.ELEMENT_SELECTED?this.callbacks.onOk():this.callbacks.onCancel(),this.callbacks.onHide&&this.callbacks.onHide(e))},e.prototype.getQuickNavigateConfiguration=function(){return this.quickNavigateConfiguration},e.prototype.setPlaceHolder=function(e){this.inputBox&&this.inputBox.setPlaceHolder(e)},e.prototype.setValue=function(e,t){if(this.inputBox)if(this.inputBox.value=e,null===t);else if(Array.isArray(t)){var n=t[0],i=t[1];this.inputBox.select({start:n,end:i})}else this.inputBox.select()},e.prototype.setPassword=function(e){this.inputBox&&(this.inputBox.inputElement.type=e?"password":"text")},e.prototype.setInput=function(e,t,n){this.isVisible()&&(this.getInput()&&this.onInputChanging(),this.setInputAndLayout(e,t),this.inputBox&&this.inputBox.setAriaLabel(n||T))},e.prototype.onInputChanging=function(){var e=this;this.inputChangingTimeoutHandle&&(clearTimeout(this.inputChangingTimeoutHandle),this.inputChangingTimeoutHandle=null),this.builder.addClass("content-changing"),
this.inputChangingTimeoutHandle=setTimeout(function(){e.builder.removeClass("content-changing")},500)},e.prototype.getInput=function(){return this.tree.getInput()},e.prototype.showInputDecoration=function(e){this.inputBox&&this.inputBox.showMessage({type:e===h.default.Info?d.MessageType.INFO:e===h.default.Warning?d.MessageType.WARNING:d.MessageType.ERROR,content:""})},e.prototype.clearInputDecoration=function(){this.inputBox&&this.inputBox.hideMessage()},e.prototype.focus=function(){this.isVisible()&&this.inputBox&&this.inputBox.focus()},e.prototype.accept=function(){if(this.isVisible()){var e=this.tree.getFocus();e&&this.elementSelected(e)}},e.prototype.getProgressBar=function(){return this.progressBar},e.prototype.getInputBox=function(){return this.inputBox},e.prototype.setExtraClass=function(e){var t=this.builder.getProperty("extra-class");t&&this.builder.removeClass(t),e?(this.builder.addClass(e),this.builder.setProperty("extra-class",e)):t&&this.builder.removeProperty("extra-class")},
e.prototype.isVisible=function(){return this.visible},e.prototype.layout=function(t){this.layoutDimensions=t;var n=Math.min(.62*this.layoutDimensions.width,e.MAX_WIDTH);this.builder&&(this.builder.style({width:n+"px",marginLeft:"-"+n/2+"px"}),this.inputContainer.style({width:n-12+"px"}))},e.prototype.gainingFocus=function(){this.isLoosingFocus=!1},e.prototype.loosingFocus=function(e){var t=this;if(this.isVisible()){var n=e.relatedTarget;!this.quickNavigateConfiguration&&m.isAncestor(n,this.builder.getHTMLElement())||(this.isLoosingFocus=!0,r.TPromise.timeout(0).then(function(){if(t.isLoosingFocus&&!t.isDisposed){t.callbacks.onFocusLost&&t.callbacks.onFocusLost()||t.hide(w.FOCUS_LOST)}}))}},e.prototype.dispose=function(){this.isDisposed=!0,this.toUnbind=y.dispose(this.toUnbind),this.progressBar.dispose(),this.inputBox.dispose(),this.tree.dispose()},e.MAX_WIDTH=600,e.MAX_ITEMS_HEIGHT=440,e}();t.QuickOpenWidget=x}),define(e[1231],t([3,2]),function(e,t){
return e.create("vs/editor/browser/widget/codeEditorWidget",t)}),define(e[1232],t([3,2]),function(e,t){return e.create("vs/editor/browser/widget/diffEditorWidget",t)}),define(e[1237],t([3,2]),function(e,t){return e.create("vs/editor/browser/widget/diffReview",t)}),define(e[1238],t([3,2]),function(e,t){return e.create("vs/editor/common/config/commonEditorConfig",t)}),define(e[1243],t([3,2]),function(e,t){return e.create("vs/editor/common/config/editorOptions",t)});var c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};define(e[133],t([1,0,1243,11,101,237,20,24]),function(e,t,n,i,r,o,s,a){"use strict";function l(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}function u(e,t){return"string"!=typeof e?t:e}function d(e,t,n){return"string"!=typeof e?t:-1===n.indexOf(e)?t:e}function h(e,t,n,i){var r;return void 0===e?r=t:(r=parseInt(e,10),isNaN(r)&&(r=t)),r=Math.max(n,r),
0|(r=Math.min(i,r))}function p(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return r.ScrollbarVisibility.Hidden;case"visible":return r.ScrollbarVisibility.Visible;default:return r.ScrollbarVisibility.Auto}}Object.defineProperty(t,"__esModule",{value:!0});var f;!function(e){e[e.None=0]="None",e[e.Small=1]="Small",e[e.Large=2]="Large",e[e.SmallBlocks=3]="SmallBlocks",e[e.LargeBlocks=4]="LargeBlocks"}(f=t.RenderMinimap||(t.RenderMinimap={}));var g;!function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(g=t.WrappingIndent||(t.WrappingIndent={}));var v;!function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(v=t.TextEditorCursorBlinkingStyle||(t.TextEditorCursorBlinkingStyle={})),t.blinkingStyleToString=function(e){if(e===v.Blink)return"blink";if(e===v.Expand)return"expand";if(e===v.Phase)return"phase";if(e===v.Smooth)return"smooth";if(e===v.Solid)return"solid"
;throw new Error("blinkingStyleToString: Unknown blinkingStyle")};var m;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(m=t.TextEditorCursorStyle||(t.TextEditorCursorStyle={})),t.cursorStyleToString=function(e){if(e===m.Line)return"line";if(e===m.Block)return"block";if(e===m.Underline)return"underline";if(e===m.LineThin)return"line-thin";if(e===m.BlockOutline)return"block-outline";if(e===m.UnderlineThin)return"underline-thin";throw new Error("cursorStyleToString: Unknown cursorStyle")};!function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(t.RenderLineNumbersType||(t.RenderLineNumbersType={}));var y=function(){function e(e){this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,this.lineHeight=0|e.lineHeight,this.readOnly=e.readOnly,
this.accessibilitySupport=e.accessibilitySupport,this.multiCursorModifier=e.multiCursorModifier,this.multiCursorMergeOverlapping=e.multiCursorMergeOverlapping,this.wordSeparators=e.wordSeparators,this.autoClosingBrackets=e.autoClosingBrackets,this.autoIndent=e.autoIndent,this.useTabStops=e.useTabStops,this.tabFocusMode=e.tabFocusMode,this.dragAndDrop=e.dragAndDrop,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo,this.contribInfo=e.contribInfo,this.showUnused=e.showUnused}return e.prototype.equals=function(t){
return this.canUseLayerHinting===t.canUseLayerHinting&&this.pixelRatio===t.pixelRatio&&this.editorClassName===t.editorClassName&&this.lineHeight===t.lineHeight&&this.readOnly===t.readOnly&&this.accessibilitySupport===t.accessibilitySupport&&this.multiCursorModifier===t.multiCursorModifier&&this.multiCursorMergeOverlapping===t.multiCursorMergeOverlapping&&this.wordSeparators===t.wordSeparators&&this.autoClosingBrackets===t.autoClosingBrackets&&this.autoIndent===t.autoIndent&&this.useTabStops===t.useTabStops&&this.tabFocusMode===t.tabFocusMode&&this.dragAndDrop===t.dragAndDrop&&this.showUnused===t.showUnused&&this.emptySelectionClipboard===t.emptySelectionClipboard&&e._equalsLayoutInfo(this.layoutInfo,t.layoutInfo)&&this.fontInfo.equals(t.fontInfo)&&e._equalsViewOptions(this.viewInfo,t.viewInfo)&&e._equalsWrappingInfo(this.wrappingInfo,t.wrappingInfo)&&e._equalsContribOptions(this.contribInfo,t.contribInfo)},e.prototype.createChangeEvent=function(t){return{
canUseLayerHinting:this.canUseLayerHinting!==t.canUseLayerHinting,pixelRatio:this.pixelRatio!==t.pixelRatio,editorClassName:this.editorClassName!==t.editorClassName,lineHeight:this.lineHeight!==t.lineHeight,readOnly:this.readOnly!==t.readOnly,accessibilitySupport:this.accessibilitySupport!==t.accessibilitySupport,multiCursorModifier:this.multiCursorModifier!==t.multiCursorModifier,multiCursorMergeOverlapping:this.multiCursorMergeOverlapping!==t.multiCursorMergeOverlapping,wordSeparators:this.wordSeparators!==t.wordSeparators,autoClosingBrackets:this.autoClosingBrackets!==t.autoClosingBrackets,autoIndent:this.autoIndent!==t.autoIndent,useTabStops:this.useTabStops!==t.useTabStops,tabFocusMode:this.tabFocusMode!==t.tabFocusMode,dragAndDrop:this.dragAndDrop!==t.dragAndDrop,emptySelectionClipboard:this.emptySelectionClipboard!==t.emptySelectionClipboard,layoutInfo:!e._equalsLayoutInfo(this.layoutInfo,t.layoutInfo),fontInfo:!this.fontInfo.equals(t.fontInfo),viewInfo:!e._equalsViewOptions(this.viewInfo,t.viewInfo),
wrappingInfo:!e._equalsWrappingInfo(this.wrappingInfo,t.wrappingInfo),contribInfo:!e._equalsContribOptions(this.contribInfo,t.contribInfo)}},e._equalsLayoutInfo=function(e,t){return e.width===t.width&&e.height===t.height&&e.glyphMarginLeft===t.glyphMarginLeft&&e.glyphMarginWidth===t.glyphMarginWidth&&e.glyphMarginHeight===t.glyphMarginHeight&&e.lineNumbersLeft===t.lineNumbersLeft&&e.lineNumbersWidth===t.lineNumbersWidth&&e.lineNumbersHeight===t.lineNumbersHeight&&e.decorationsLeft===t.decorationsLeft&&e.decorationsWidth===t.decorationsWidth&&e.decorationsHeight===t.decorationsHeight&&e.contentLeft===t.contentLeft&&e.contentWidth===t.contentWidth&&e.contentHeight===t.contentHeight&&e.renderMinimap===t.renderMinimap&&e.minimapLeft===t.minimapLeft&&e.minimapWidth===t.minimapWidth&&e.viewportColumn===t.viewportColumn&&e.verticalScrollbarWidth===t.verticalScrollbarWidth&&e.horizontalScrollbarHeight===t.horizontalScrollbarHeight&&this._equalsOverviewRuler(e.overviewRuler,t.overviewRuler)},
e._equalsOverviewRuler=function(e,t){return e.width===t.width&&e.height===t.height&&e.top===t.top&&e.right===t.right},e._equalsViewOptions=function(e,t){
return e.extraEditorClassName===t.extraEditorClassName&&e.disableMonospaceOptimizations===t.disableMonospaceOptimizations&&s.equals(e.rulers,t.rulers)&&e.ariaLabel===t.ariaLabel&&e.renderLineNumbers===t.renderLineNumbers&&e.renderCustomLineNumbers===t.renderCustomLineNumbers&&e.selectOnLineNumbers===t.selectOnLineNumbers&&e.glyphMargin===t.glyphMargin&&e.revealHorizontalRightPadding===t.revealHorizontalRightPadding&&e.roundedSelection===t.roundedSelection&&e.overviewRulerLanes===t.overviewRulerLanes&&e.overviewRulerBorder===t.overviewRulerBorder&&e.cursorBlinking===t.cursorBlinking&&e.mouseWheelZoom===t.mouseWheelZoom&&e.cursorStyle===t.cursorStyle&&e.cursorWidth===t.cursorWidth&&e.hideCursorInOverviewRuler===t.hideCursorInOverviewRuler&&e.scrollBeyondLastLine===t.scrollBeyondLastLine&&e.scrollBeyondLastColumn===t.scrollBeyondLastColumn&&e.smoothScrolling===t.smoothScrolling&&e.stopRenderingLineAfter===t.stopRenderingLineAfter&&e.renderWhitespace===t.renderWhitespace&&e.renderControlCharacters===t.renderControlCharacters&&e.fontLigatures===t.fontLigatures&&e.renderIndentGuides===t.renderIndentGuides&&e.highlightActiveIndentGuide===t.highlightActiveIndentGuide&&e.renderLineHighlight===t.renderLineHighlight&&this._equalsScrollbarOptions(e.scrollbar,t.scrollbar)&&this._equalsMinimapOptions(e.minimap,t.minimap)&&e.fixedOverflowWidgets===t.fixedOverflowWidgets
},e._equalsScrollbarOptions=function(e,t){return e.arrowSize===t.arrowSize&&e.vertical===t.vertical&&e.horizontal===t.horizontal&&e.useShadows===t.useShadows&&e.verticalHasArrows===t.verticalHasArrows&&e.horizontalHasArrows===t.horizontalHasArrows&&e.handleMouseWheel===t.handleMouseWheel&&e.horizontalScrollbarSize===t.horizontalScrollbarSize&&e.horizontalSliderSize===t.horizontalSliderSize&&e.verticalScrollbarSize===t.verticalScrollbarSize&&e.verticalSliderSize===t.verticalSliderSize&&e.mouseWheelScrollSensitivity===t.mouseWheelScrollSensitivity},e._equalsMinimapOptions=function(e,t){return e.enabled===t.enabled&&e.side===t.side&&e.showSlider===t.showSlider&&e.renderCharacters===t.renderCharacters&&e.maxColumn===t.maxColumn},e._equalFindOptions=function(e,t){return e.seedSearchStringFromSelection===t.seedSearchStringFromSelection&&e.autoFindInSelection===t.autoFindInSelection&&e.globalFindClipboard===t.globalFindClipboard},e._equalsHoverOptions=function(e,t){
return e.enabled===t.enabled&&e.delay===t.delay&&e.sticky===t.sticky},e._equalsWrappingInfo=function(e,t){return e.inDiffEditor===t.inDiffEditor&&e.isDominatedByLongLines===t.isDominatedByLongLines&&e.isWordWrapMinified===t.isWordWrapMinified&&e.isViewportWrapping===t.isViewportWrapping&&e.wrappingColumn===t.wrappingColumn&&e.wrappingIndent===t.wrappingIndent&&e.wordWrapBreakBeforeCharacters===t.wordWrapBreakBeforeCharacters&&e.wordWrapBreakAfterCharacters===t.wordWrapBreakAfterCharacters&&e.wordWrapBreakObtrusiveCharacters===t.wordWrapBreakObtrusiveCharacters},e._equalsContribOptions=function(t,n){
return t.selectionClipboard===n.selectionClipboard&&this._equalsHoverOptions(t.hover,n.hover)&&t.links===n.links&&t.contextmenu===n.contextmenu&&e._equalsQuickSuggestions(t.quickSuggestions,n.quickSuggestions)&&t.quickSuggestionsDelay===n.quickSuggestionsDelay&&t.parameterHints===n.parameterHints&&t.iconsInSuggestions===n.iconsInSuggestions&&t.formatOnType===n.formatOnType&&t.formatOnPaste===n.formatOnPaste&&t.suggestOnTriggerCharacters===n.suggestOnTriggerCharacters&&t.acceptSuggestionOnEnter===n.acceptSuggestionOnEnter&&t.acceptSuggestionOnCommitCharacter===n.acceptSuggestionOnCommitCharacter&&t.snippetSuggestions===n.snippetSuggestions&&t.wordBasedSuggestions===n.wordBasedSuggestions&&t.suggestSelection===n.suggestSelection&&t.suggestFontSize===n.suggestFontSize&&t.suggestLineHeight===n.suggestLineHeight&&t.selectionHighlight===n.selectionHighlight&&t.occurrencesHighlight===n.occurrencesHighlight&&t.codeLens===n.codeLens&&t.folding===n.folding&&t.foldingStrategy===n.foldingStrategy&&t.showFoldingControls===n.showFoldingControls&&t.matchBrackets===n.matchBrackets&&this._equalFindOptions(t.find,n.find)&&t.colorDecorators===n.colorDecorators&&a.equals(t.codeActionsOnSave,n.codeActionsOnSave)&&t.codeActionsOnSaveTimeout===n.codeActionsOnSaveTimeout&&t.lightbulbEnabled===n.lightbulbEnabled
},e._equalsQuickSuggestions=function(e,t){return"boolean"==typeof e?"boolean"==typeof t&&e===t:"boolean"!=typeof t&&(e.comments===t.comments&&e.other===t.other&&e.strings===t.strings)},e}();t.InternalEditorOptions=y;var b=function(){function e(){}return e.validate=function(e,t){var n=e.wordWrap;!0===n?n="on":!1===n&&(n="off"),n=d(n,t.wordWrap,["off","on","wordWrapColumn","bounded"]);var r,o=this._sanitizeViewInfo(e,t.viewInfo),s=this._sanitizeContribInfo(e,t.contribInfo);"string"==typeof e.multiCursorModifier&&(r="ctrlCmd"===e.multiCursorModifier?i.isMacintosh?"metaKey":"ctrlKey":"altKey");var a=d(r,t.multiCursorModifier,["altKey","metaKey","ctrlKey"]);return{inDiffEditor:l(e.inDiffEditor,t.inDiffEditor),wordSeparators:u(e.wordSeparators,t.wordSeparators),lineNumbersMinChars:h(e.lineNumbersMinChars,t.lineNumbersMinChars,1,10),lineDecorationsWidth:void 0===e.lineDecorationsWidth?t.lineDecorationsWidth:e.lineDecorationsWidth,readOnly:l(e.readOnly,t.readOnly),
mouseStyle:d(e.mouseStyle,t.mouseStyle,["text","default","copy"]),disableLayerHinting:l(e.disableLayerHinting,t.disableLayerHinting),automaticLayout:l(e.automaticLayout,t.automaticLayout),wordWrap:n,wordWrapColumn:h(e.wordWrapColumn,t.wordWrapColumn,1,1073741824),wordWrapMinified:l(e.wordWrapMinified,t.wordWrapMinified),wrappingIndent:function(e,t){return"string"!=typeof e?t:"same"===e?g.Same:"indent"===e?g.Indent:"deepIndent"===e?g.DeepIndent:g.None}(e.wrappingIndent,t.wrappingIndent),wordWrapBreakBeforeCharacters:u(e.wordWrapBreakBeforeCharacters,t.wordWrapBreakBeforeCharacters),wordWrapBreakAfterCharacters:u(e.wordWrapBreakAfterCharacters,t.wordWrapBreakAfterCharacters),wordWrapBreakObtrusiveCharacters:u(e.wordWrapBreakObtrusiveCharacters,t.wordWrapBreakObtrusiveCharacters),autoClosingBrackets:l(e.autoClosingBrackets,t.autoClosingBrackets),autoIndent:l(e.autoIndent,t.autoIndent),dragAndDrop:l(e.dragAndDrop,t.dragAndDrop),emptySelectionClipboard:l(e.emptySelectionClipboard,t.emptySelectionClipboard),
useTabStops:l(e.useTabStops,t.useTabStops),multiCursorModifier:a,multiCursorMergeOverlapping:l(e.multiCursorMergeOverlapping,t.multiCursorMergeOverlapping),accessibilitySupport:d(e.accessibilitySupport,t.accessibilitySupport,["auto","on","off"]),showUnused:l(e.showUnused,t.showUnused),viewInfo:o,contribInfo:s}},e._sanitizeScrollbarOpts=function(e,t,n){if("object"!=typeof e)return t;var i=h(e.horizontalScrollbarSize,t.horizontalScrollbarSize,0,1e3),r=h(e.verticalScrollbarSize,t.verticalScrollbarSize,0,1e3);return{vertical:p(e.vertical,t.vertical),horizontal:p(e.horizontal,t.horizontal),arrowSize:h(e.arrowSize,t.arrowSize,0,1e3),useShadows:l(e.useShadows,t.useShadows),verticalHasArrows:l(e.verticalHasArrows,t.verticalHasArrows),horizontalHasArrows:l(e.horizontalHasArrows,t.horizontalHasArrows),horizontalScrollbarSize:i,horizontalSliderSize:h(e.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:r,verticalSliderSize:h(e.verticalSliderSize,r,0,1e3),handleMouseWheel:l(e.handleMouseWheel,t.handleMouseWheel),
mouseWheelScrollSensitivity:n}},e._sanitizeMinimapOpts=function(e,t){return"object"!=typeof e?t:{enabled:l(e.enabled,t.enabled),side:d(e.side,t.side,["right","left"]),showSlider:d(e.showSlider,t.showSlider,["always","mouseover"]),renderCharacters:l(e.renderCharacters,t.renderCharacters),maxColumn:h(e.maxColumn,t.maxColumn,1,1e4)}},e._santizeFindOpts=function(e,t){return"object"!=typeof e?t:{seedSearchStringFromSelection:l(e.seedSearchStringFromSelection,t.seedSearchStringFromSelection),autoFindInSelection:l(e.autoFindInSelection,t.autoFindInSelection),globalFindClipboard:l(e.globalFindClipboard,t.globalFindClipboard)}},e._santizeHoverOpts=function(e,t){var n;if("boolean"==typeof e)n={enabled:e};else{if("object"!=typeof e)return t;n=e}return{enabled:l(n.enabled,t.enabled),delay:h(n.delay,t.delay,0,1e4),sticky:l(n.sticky,t.sticky)}},e._sanitizeViewInfo=function(e,t){var n=[];if(Array.isArray(e.rulers)){for(var i=0,r=e.rulers.length;i<r;i++)n.push(h(e.rulers[i],0,0,1e4));n.sort()}
var o=t.renderLineNumbers,s=t.renderCustomLineNumbers;if(void 0!==e.lineNumbers){var a=e.lineNumbers;!0===a?a="on":!1===a&&(a="off"),"function"==typeof a?(o=4,s=a):o="interval"===a?3:"relative"===a?2:"on"===a?1:0}var c=l(e.fontLigatures,t.fontLigatures),p=l(e.disableMonospaceOptimizations,t.disableMonospaceOptimizations)||c,f=e.renderWhitespace;!0===f?f="boundary":!1===f&&(f="none"),f=d(e.renderWhitespace,t.renderWhitespace,["none","boundary","all"]);var g=e.renderLineHighlight;!0===g?g="line":!1===g&&(g="none"),g=d(e.renderLineHighlight,t.renderLineHighlight,["none","gutter","line","all"]);var y=function(e,t){var n=parseFloat(e);return isNaN(n)&&(n=t),n}(e.mouseWheelScrollSensitivity,t.scrollbar.mouseWheelScrollSensitivity);0===y&&(y=1);var b=this._sanitizeScrollbarOpts(e.scrollbar,t.scrollbar,y),S=this._sanitizeMinimapOpts(e.minimap,t.minimap);return{extraEditorClassName:u(e.extraEditorClassName,t.extraEditorClassName),disableMonospaceOptimizations:p,rulers:n,ariaLabel:u(e.ariaLabel,t.ariaLabel),
renderLineNumbers:o,renderCustomLineNumbers:s,selectOnLineNumbers:l(e.selectOnLineNumbers,t.selectOnLineNumbers),glyphMargin:l(e.glyphMargin,t.glyphMargin),revealHorizontalRightPadding:h(e.revealHorizontalRightPadding,t.revealHorizontalRightPadding,0,1e3),roundedSelection:l(e.roundedSelection,t.roundedSelection),overviewRulerLanes:h(e.overviewRulerLanes,t.overviewRulerLanes,0,3),overviewRulerBorder:l(e.overviewRulerBorder,t.overviewRulerBorder),cursorBlinking:function(e,t){if("string"!=typeof e)return t;switch(e){case"blink":return v.Blink;case"smooth":return v.Smooth;case"phase":return v.Phase;case"expand":return v.Expand;case"visible":case"solid":return v.Solid}return v.Blink}(e.cursorBlinking,t.cursorBlinking),mouseWheelZoom:l(e.mouseWheelZoom,t.mouseWheelZoom),cursorStyle:function(e,t){return"string"!=typeof e?t:"line"===e?m.Line:"block"===e?m.Block:"underline"===e?m.Underline:"line-thin"===e?m.LineThin:"block-outline"===e?m.BlockOutline:"underline-thin"===e?m.UnderlineThin:m.Line
}(e.cursorStyle,t.cursorStyle),cursorWidth:h(e.cursorWidth,t.cursorWidth,0,Number.MAX_VALUE),hideCursorInOverviewRuler:l(e.hideCursorInOverviewRuler,t.hideCursorInOverviewRuler),scrollBeyondLastLine:l(e.scrollBeyondLastLine,t.scrollBeyondLastLine),scrollBeyondLastColumn:h(e.scrollBeyondLastColumn,t.scrollBeyondLastColumn,0,1073741824),smoothScrolling:l(e.smoothScrolling,t.smoothScrolling),stopRenderingLineAfter:h(e.stopRenderingLineAfter,t.stopRenderingLineAfter,-1,1073741824),renderWhitespace:f,renderControlCharacters:l(e.renderControlCharacters,t.renderControlCharacters),fontLigatures:c,renderIndentGuides:l(e.renderIndentGuides,t.renderIndentGuides),highlightActiveIndentGuide:l(e.highlightActiveIndentGuide,t.highlightActiveIndentGuide),renderLineHighlight:g,scrollbar:b,minimap:S,fixedOverflowWidgets:l(e.fixedOverflowWidgets,t.fixedOverflowWidgets)}},e._sanitizeContribInfo=function(e,t){var n;n="object"==typeof e.quickSuggestions?c({other:!0},e.quickSuggestions):l(e.quickSuggestions,t.quickSuggestions),
"boolean"==typeof e.acceptSuggestionOnEnter&&(e.acceptSuggestionOnEnter=e.acceptSuggestionOnEnter?"on":"off");var i=this._santizeFindOpts(e.find,t.find);return{selectionClipboard:l(e.selectionClipboard,t.selectionClipboard),hover:this._santizeHoverOpts(e.hover,t.hover),links:l(e.links,t.links),contextmenu:l(e.contextmenu,t.contextmenu),quickSuggestions:n,quickSuggestionsDelay:h(e.quickSuggestionsDelay,t.quickSuggestionsDelay,-1073741824,1073741824),parameterHints:l(e.parameterHints,t.parameterHints),iconsInSuggestions:l(e.iconsInSuggestions,t.iconsInSuggestions),formatOnType:l(e.formatOnType,t.formatOnType),formatOnPaste:l(e.formatOnPaste,t.formatOnPaste),suggestOnTriggerCharacters:l(e.suggestOnTriggerCharacters,t.suggestOnTriggerCharacters),acceptSuggestionOnEnter:d(e.acceptSuggestionOnEnter,t.acceptSuggestionOnEnter,["on","smart","off"]),acceptSuggestionOnCommitCharacter:l(e.acceptSuggestionOnCommitCharacter,t.acceptSuggestionOnCommitCharacter),
snippetSuggestions:d(e.snippetSuggestions,t.snippetSuggestions,["top","bottom","inline","none"]),wordBasedSuggestions:l(e.wordBasedSuggestions,t.wordBasedSuggestions),suggestSelection:d(e.suggestSelection,t.suggestSelection,["first","recentlyUsed","recentlyUsedByPrefix"]),suggestFontSize:h(e.suggestFontSize,t.suggestFontSize,0,1e3),suggestLineHeight:h(e.suggestLineHeight,t.suggestLineHeight,0,1e3),selectionHighlight:l(e.selectionHighlight,t.selectionHighlight),occurrencesHighlight:l(e.occurrencesHighlight,t.occurrencesHighlight),codeLens:l(e.codeLens,t.codeLens),folding:l(e.folding,t.folding),foldingStrategy:d(e.foldingStrategy,t.foldingStrategy,["auto","indentation"]),showFoldingControls:d(e.showFoldingControls,t.showFoldingControls,["always","mouseover"]),matchBrackets:l(e.matchBrackets,t.matchBrackets),find:i,colorDecorators:l(e.colorDecorators,t.colorDecorators),lightbulbEnabled:l(!!e.lightbulb&&e.lightbulb.enabled,t.lightbulbEnabled),codeActionsOnSave:function(e,t){if(!e)return t
;for(var n=Object.create(null),i=0,r=Object.keys(e);i<r.length;i++){var o=r[i],s=e[o];"boolean"==typeof s&&(n[o]=s)}return n}(e.codeActionsOnSave,{}),codeActionsOnSaveTimeout:h(e.codeActionsOnSaveTimeout,t.codeActionsOnSaveTimeout,1,1e4)}},e}();t.EditorOptionsValidator=b;var S=function(){function e(){}return e._tweakValidatedOptions=function(e,t){var i=2===t,r=1===t;return{inDiffEditor:e.inDiffEditor,wordSeparators:e.wordSeparators,lineNumbersMinChars:e.lineNumbersMinChars,lineDecorationsWidth:e.lineDecorationsWidth,readOnly:e.readOnly,mouseStyle:e.mouseStyle,disableLayerHinting:e.disableLayerHinting,automaticLayout:e.automaticLayout,wordWrap:e.wordWrap,wordWrapColumn:e.wordWrapColumn,wordWrapMinified:e.wordWrapMinified,wrappingIndent:e.wrappingIndent,wordWrapBreakBeforeCharacters:e.wordWrapBreakBeforeCharacters,wordWrapBreakAfterCharacters:e.wordWrapBreakAfterCharacters,wordWrapBreakObtrusiveCharacters:e.wordWrapBreakObtrusiveCharacters,autoClosingBrackets:e.autoClosingBrackets,autoIndent:e.autoIndent,
dragAndDrop:e.dragAndDrop,emptySelectionClipboard:e.emptySelectionClipboard,useTabStops:e.useTabStops,multiCursorModifier:e.multiCursorModifier,multiCursorMergeOverlapping:e.multiCursorMergeOverlapping,accessibilitySupport:e.accessibilitySupport,showUnused:e.showUnused,viewInfo:{extraEditorClassName:e.viewInfo.extraEditorClassName,disableMonospaceOptimizations:e.viewInfo.disableMonospaceOptimizations,rulers:e.viewInfo.rulers,ariaLabel:r?n.localize(0,null):e.viewInfo.ariaLabel,renderLineNumbers:e.viewInfo.renderLineNumbers,renderCustomLineNumbers:e.viewInfo.renderCustomLineNumbers,selectOnLineNumbers:e.viewInfo.selectOnLineNumbers,glyphMargin:e.viewInfo.glyphMargin,revealHorizontalRightPadding:e.viewInfo.revealHorizontalRightPadding,roundedSelection:!i&&e.viewInfo.roundedSelection,overviewRulerLanes:e.viewInfo.overviewRulerLanes,overviewRulerBorder:e.viewInfo.overviewRulerBorder,cursorBlinking:e.viewInfo.cursorBlinking,mouseWheelZoom:e.viewInfo.mouseWheelZoom,cursorStyle:e.viewInfo.cursorStyle,
cursorWidth:e.viewInfo.cursorWidth,hideCursorInOverviewRuler:e.viewInfo.hideCursorInOverviewRuler,scrollBeyondLastLine:e.viewInfo.scrollBeyondLastLine,scrollBeyondLastColumn:e.viewInfo.scrollBeyondLastColumn,smoothScrolling:e.viewInfo.smoothScrolling,stopRenderingLineAfter:e.viewInfo.stopRenderingLineAfter,renderWhitespace:i?"none":e.viewInfo.renderWhitespace,renderControlCharacters:!i&&e.viewInfo.renderControlCharacters,fontLigatures:!i&&e.viewInfo.fontLigatures,renderIndentGuides:!i&&e.viewInfo.renderIndentGuides,highlightActiveIndentGuide:e.viewInfo.highlightActiveIndentGuide,renderLineHighlight:e.viewInfo.renderLineHighlight,scrollbar:e.viewInfo.scrollbar,minimap:{enabled:!i&&e.viewInfo.minimap.enabled,side:e.viewInfo.minimap.side,renderCharacters:e.viewInfo.minimap.renderCharacters,showSlider:e.viewInfo.minimap.showSlider,maxColumn:e.viewInfo.minimap.maxColumn},fixedOverflowWidgets:e.viewInfo.fixedOverflowWidgets},contribInfo:{selectionClipboard:e.contribInfo.selectionClipboard,hover:e.contribInfo.hover,
links:!i&&e.contribInfo.links,contextmenu:e.contribInfo.contextmenu,quickSuggestions:e.contribInfo.quickSuggestions,quickSuggestionsDelay:e.contribInfo.quickSuggestionsDelay,parameterHints:e.contribInfo.parameterHints,iconsInSuggestions:e.contribInfo.iconsInSuggestions,formatOnType:e.contribInfo.formatOnType,formatOnPaste:e.contribInfo.formatOnPaste,suggestOnTriggerCharacters:e.contribInfo.suggestOnTriggerCharacters,acceptSuggestionOnEnter:e.contribInfo.acceptSuggestionOnEnter,acceptSuggestionOnCommitCharacter:e.contribInfo.acceptSuggestionOnCommitCharacter,snippetSuggestions:e.contribInfo.snippetSuggestions,wordBasedSuggestions:e.contribInfo.wordBasedSuggestions,suggestSelection:e.contribInfo.suggestSelection,suggestFontSize:e.contribInfo.suggestFontSize,suggestLineHeight:e.contribInfo.suggestLineHeight,selectionHighlight:!i&&e.contribInfo.selectionHighlight,occurrencesHighlight:!i&&e.contribInfo.occurrencesHighlight,codeLens:!i&&e.contribInfo.codeLens,folding:!i&&e.contribInfo.folding,
foldingStrategy:e.contribInfo.foldingStrategy,showFoldingControls:e.contribInfo.showFoldingControls,matchBrackets:!i&&e.contribInfo.matchBrackets,find:e.contribInfo.find,colorDecorators:e.contribInfo.colorDecorators,lightbulbEnabled:e.contribInfo.lightbulbEnabled,codeActionsOnSave:e.contribInfo.codeActionsOnSave,codeActionsOnSaveTimeout:e.contribInfo.codeActionsOnSaveTimeout}}},e.createInternalEditorOptions=function(e,t){var n;n="auto"===t.accessibilitySupport?e.accessibilitySupport:"on"===t.accessibilitySupport?2:1;var i,r=this._tweakValidatedOptions(t,n);if("string"==typeof r.lineDecorationsWidth&&/^\d+(\.\d+)?ch$/.test(r.lineDecorationsWidth)){i=parseFloat(r.lineDecorationsWidth.substr(0,r.lineDecorationsWidth.length-2))*e.fontInfo.typicalHalfwidthCharacterWidth}else i=h(r.lineDecorationsWidth,0,0,1e3);r.contribInfo.folding&&(i+=16);var o=_.compute({outerWidth:e.outerWidth,outerHeight:e.outerHeight,showGlyphMargin:r.viewInfo.glyphMargin,lineHeight:e.fontInfo.lineHeight,
showLineNumbers:0!==r.viewInfo.renderLineNumbers,lineNumbersMinChars:r.lineNumbersMinChars,lineNumbersDigitCount:e.lineNumbersDigitCount,lineDecorationsWidth:i,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,verticalScrollbarWidth:r.viewInfo.scrollbar.verticalScrollbarSize,horizontalScrollbarHeight:r.viewInfo.scrollbar.horizontalScrollbarSize,scrollbarArrowSize:r.viewInfo.scrollbar.arrowSize,verticalScrollbarHasArrows:r.viewInfo.scrollbar.verticalHasArrows,minimap:r.viewInfo.minimap.enabled,minimapSide:r.viewInfo.minimap.side,minimapRenderCharacters:r.viewInfo.minimap.renderCharacters,minimapMaxColumn:r.viewInfo.minimap.maxColumn,pixelRatio:e.pixelRatio}),s=null,a=r.wordWrap,c=r.wordWrapColumn,l=r.wordWrapMinified;s=2===n?{isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1}:l&&e.isDominatedByLongLines?{isWordWrapMinified:!0,isViewportWrapping:!0,wrappingColumn:Math.max(1,o.viewportColumn)}:"on"===a?{isWordWrapMinified:!1,
isViewportWrapping:!0,wrappingColumn:Math.max(1,o.viewportColumn)}:"bounded"===a?{isWordWrapMinified:!1,isViewportWrapping:!0,wrappingColumn:Math.min(Math.max(1,o.viewportColumn),c)}:"wordWrapColumn"===a?{isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:c}:{isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1};var u={inDiffEditor:r.inDiffEditor,isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:s.isWordWrapMinified,isViewportWrapping:s.isViewportWrapping,wrappingColumn:s.wrappingColumn,wrappingIndent:r.wrappingIndent,wordWrapBreakBeforeCharacters:r.wordWrapBreakBeforeCharacters,wordWrapBreakAfterCharacters:r.wordWrapBreakAfterCharacters,wordWrapBreakObtrusiveCharacters:r.wordWrapBreakObtrusiveCharacters},d="monaco-editor";return r.viewInfo.extraEditorClassName&&(d+=" "+r.viewInfo.extraEditorClassName),e.extraEditorClassName&&(d+=" "+e.extraEditorClassName),r.viewInfo.fontLigatures&&(d+=" enable-ligatures"),
"default"===r.mouseStyle?d+=" mouse-default":"copy"===r.mouseStyle&&(d+=" mouse-copy"),new y({canUseLayerHinting:!r.disableLayerHinting,pixelRatio:e.pixelRatio,editorClassName:d,lineHeight:e.fontInfo.lineHeight,readOnly:r.readOnly,accessibilitySupport:n,multiCursorModifier:r.multiCursorModifier,multiCursorMergeOverlapping:r.multiCursorMergeOverlapping,wordSeparators:r.wordSeparators,autoClosingBrackets:r.autoClosingBrackets,autoIndent:r.autoIndent,useTabStops:r.useTabStops,tabFocusMode:!!r.readOnly||e.tabFocusMode,dragAndDrop:r.dragAndDrop,emptySelectionClipboard:r.emptySelectionClipboard&&e.emptySelectionClipboard,layoutInfo:o,fontInfo:e.fontInfo,viewInfo:r.viewInfo,wrappingInfo:u,contribInfo:r.contribInfo,showUnused:r.showUnused})},e}();t.InternalEditorOptionsFactory=S;var _=function(){function e(){}return e.compute=function(e){
var t=0|e.outerWidth,n=0|e.outerHeight,i=e.showGlyphMargin,r=0|e.lineHeight,o=e.showLineNumbers,s=0|e.lineNumbersMinChars,a=0|e.lineNumbersDigitCount,c=0|e.lineDecorationsWidth,l=e.typicalHalfwidthCharacterWidth,u=e.maxDigitWidth,d=0|e.verticalScrollbarWidth,h=e.verticalScrollbarHasArrows,p=0|e.scrollbarArrowSize,g=0|e.horizontalScrollbarHeight,v=e.minimap,m=e.minimapSide,y=e.minimapRenderCharacters,b=0|e.minimapMaxColumn,S=e.pixelRatio,_=0;if(o){var C=Math.max(a,s);_=Math.round(C*u)}var E=0;i&&(E=r);var w,I,T,x,k=0,D=k+E,A=D+_,L=A+c,R=t-E-_-c;if(v){var O=void 0;S>=2?(w=y?f.Large:f.LargeBlocks,O=2/S):(w=y?f.Small:f.SmallBlocks,O=1/S);(T=Math.max(0,Math.floor((R-d-2)*O/(l+O))))/O>b&&(T=Math.floor(b*O)),x=R-T,"left"===m?(I=0,k+=T,D+=T,A+=T,L+=T):I=t-T-d}else I=0,T=0,w=f.None,x=R;var M=Math.max(1,Math.floor((x-d-2)/l)),P=h?p:0;return{width:t,height:n,glyphMarginLeft:k,glyphMarginWidth:E,glyphMarginHeight:n,lineNumbersLeft:D,lineNumbersWidth:_,lineNumbersHeight:n,decorationsLeft:A,decorationsWidth:c,
decorationsHeight:n,contentLeft:L,contentWidth:x,contentHeight:n,renderMinimap:w,minimapLeft:I,minimapWidth:T,viewportColumn:M,verticalScrollbarWidth:d,horizontalScrollbarHeight:g,overviewRuler:{top:P,width:d,height:n-2*P,right:0}}},e}();t.EditorLayoutProvider=_;t.EDITOR_FONT_DEFAULTS={fontFamily:i.isMacintosh?"Menlo, Monaco, 'Courier New', monospace":i.isLinux?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:i.isMacintosh?12:14,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:o.USUAL_WORD_SEPARATORS,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:g.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",
wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:n.localize(1,null),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:v.Blink,mouseWheelZoom:!1,cursorStyle:m.Line,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,highlightActiveIndentGuide:!0,renderLineHighlight:"line",scrollbar:{
vertical:r.ScrollbarVisibility.Auto,horizontal:r.ScrollbarVisibility.Auto,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,snippetSuggestions:"inline",wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{
seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}}}),define(e[330],t([1,0,11,273,133]),function(e,t,i,r,o){"use strict";function s(e,t){if("number"==typeof e)return e;var n=parseFloat(e);return isNaN(n)?t:n}function a(e,t,n){return e<t?t:e>n?n:e}function c(e,t){return"string"!=typeof e?t:e}Object.defineProperty(t,"__esModule",{value:!0});var l=i.isMacintosh?1.5:1.35,u=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,n){var i=c(t.fontFamily,o.EDITOR_FONT_DEFAULTS.fontFamily),u=c(t.fontWeight,o.EDITOR_FONT_DEFAULTS.fontWeight),d=s(t.fontSize,o.EDITOR_FONT_DEFAULTS.fontSize);0===(d=a(d,0,100))?d=o.EDITOR_FONT_DEFAULTS.fontSize:d<8&&(d=8);var h=function(e,t){
if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?t:n}(t.lineHeight,0);0===(h=a(h,0,150))?h=Math.round(l*d):h<8&&(h=8);var p=s(t.letterSpacing,0);p=a(p,-5,20);var f=1+.1*r.EditorZoom.getZoomLevel();return d*=f,h*=f,new e({zoomLevel:n,fontFamily:i,fontWeight:u,fontSize:d,lineHeight:h,letterSpacing:p})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}();t.BareFontInfo=u;var d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.spaceWidth=t.spaceWidth,i.maxDigitWidth=t.maxDigitWidth,i}return n(t,e),t.prototype.equals=function(e){
return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(u);t.FontInfo=d}),define(e[1247],t([3,2]),function(e,t){return e.create("vs/editor/common/controller/cursor",t)}),define(e[1249],t([3,2]),function(e,t){return e.create("vs/editor/common/modes/modesRegistry",t)}),define(e[1254],t([3,2]),function(e,t){return e.create("vs/editor/common/services/modelServiceImpl",t)}),define(e[1255],t([3,2]),function(e,t){return e.create("vs/editor/common/view/editorColorRegistry",t)}),define(e[1262],t([3,2]),function(e,t){return e.create("vs/editor/contrib/bracketMatching/bracketMatching",t)}),define(e[1266],t([3,2]),function(e,t){return e.create("vs/editor/contrib/caretOperations/caretOperations",t)
}),define(e[1274],t([3,2]),function(e,t){return e.create("vs/editor/contrib/caretOperations/transpose",t)}),define(e[1277],t([3,2]),function(e,t){return e.create("vs/editor/contrib/clipboard/clipboard",t)}),define(e[1293],t([3,2]),function(e,t){return e.create("vs/editor/contrib/codeAction/codeActionCommands",t)}),define(e[1296],t([3,2]),function(e,t){return e.create("vs/editor/contrib/comment/comment",t)}),define(e[1297],t([3,2]),function(e,t){return e.create("vs/editor/contrib/contextmenu/contextmenu",t)}),define(e[1306],t([3,2]),function(e,t){return e.create("vs/editor/contrib/cursorUndo/cursorUndo",t)}),define(e[1307],t([3,2]),function(e,t){return e.create("vs/editor/contrib/documentSymbols/outlineTree",t)}),define(e[1308],t([3,2]),function(e,t){return e.create("vs/editor/contrib/find/findController",t)}),define(e[1309],t([3,2]),function(e,t){return e.create("vs/editor/contrib/find/findWidget",t)}),define(e[1310],t([3,2]),function(e,t){return e.create("vs/editor/contrib/find/simpleFindWidget",t)}),
define(e[1311],t([3,2]),function(e,t){return e.create("vs/editor/contrib/folding/folding",t)}),define(e[1312],t([3,2]),function(e,t){return e.create("vs/editor/contrib/fontZoom/fontZoom",t)}),define(e[1313],t([3,2]),function(e,t){return e.create("vs/editor/contrib/format/formatActions",t)}),define(e[1317],t([3,2]),function(e,t){return e.create("vs/editor/contrib/goToDefinition/goToDefinitionCommands",t)}),define(e[1320],t([3,2]),function(e,t){return e.create("vs/editor/contrib/goToDefinition/goToDefinitionMouse",t)}),define(e[1324],t([3,2]),function(e,t){return e.create("vs/editor/contrib/gotoError/gotoError",t)}),define(e[1328],t([3,2]),function(e,t){return e.create("vs/editor/contrib/gotoError/gotoErrorWidget",t)}),define(e[1329],t([3,2]),function(e,t){return e.create("vs/editor/contrib/hover/hover",t)}),define(e[1332],t([3,2]),function(e,t){return e.create("vs/editor/contrib/hover/modesContentHover",t)}),define(e[1334],t([3,2]),function(e,t){
return e.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace",t)}),define(e[1337],t([3,2]),function(e,t){return e.create("vs/editor/contrib/indentation/indentation",t)}),define(e[1338],t([3,2]),function(e,t){return e.create("vs/editor/contrib/linesOperations/linesOperations",t)}),define(e[1339],t([3,2]),function(e,t){return e.create("vs/editor/contrib/links/links",t)}),define(e[1342],t([3,2]),function(e,t){return e.create("vs/editor/contrib/message/messageController",t)}),define(e[1343],t([3,2]),function(e,t){return e.create("vs/editor/contrib/multicursor/multicursor",t)}),define(e[1346],t([3,2]),function(e,t){return e.create("vs/editor/contrib/parameterHints/parameterHints",t)}),define(e[1351],t([3,2]),function(e,t){return e.create("vs/editor/contrib/parameterHints/parameterHintsWidget",t)}),define(e[1353],t([3,2]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/peekViewWidget",t)}),define(e[1356],t([3,2]),function(e,t){
return e.create("vs/editor/contrib/referenceSearch/referenceSearch",t)}),define(e[1362],t([3,2]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referencesController",t)}),define(e[1363],t([3,2]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referencesModel",t)}),define(e[324],t([1,0,1363,7,25,5,14,149,4,19]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this._parent=e,this._range=t,this._onRefChanged=new i.Emitter,this.onRefChanged=this._onRefChanged.event,this._id=a.defaultGenerator.nextId()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){
return this._parent.uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._parent.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"directory",{get:function(){return this._parent.directory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e,this._onRefChanged.fire(this)},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){return n.localize(0,null,r.basename(this.uri.fsPath),this.range.startLineNumber,this.range.startColumn)},e}();t.OneReference=u;var d=function(){function e(e){this._modelReference=e}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.preview=function(e,t){void 0===t&&(t=8);var n=this._model;if(n){var i=e.startLineNumber,r=e.startColumn,o=e.endLineNumber,a=e.endColumn,c=n.getWordUntilPosition({lineNumber:i,
column:r-t}),u=new l.Range(i,c.startColumn,i,r),d=new l.Range(o,a,o,Number.MAX_VALUE);return{before:n.getValueInRange(u).replace(/^\s+/,s.empty),inside:n.getValueInRange(e),after:n.getValueInRange(d).replace(/\s+$/,s.empty)}}},e.prototype.dispose=function(){this._modelReference&&(this._modelReference.dispose(),this._modelReference=null)},e}();t.FilePreview=d;var h=function(){function e(e,t){this._parent=e,this._uri=t,this._children=[]}return Object.defineProperty(e.prototype,"id",{get:function(){return this._uri.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return r.basename(this.uri.fsPath)},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"directory",{get:function(){return r.dirname(this.uri.fsPath)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preview",{get:function(){return this._preview},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"failure",{get:function(){return this._loadFailure},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){var e=this.children.length;return 1===e?n.localize(1,null,r.basename(this.uri.fsPath),this.uri.fsPath):n.localize(2,null,e,r.basename(this.uri.fsPath),this.uri.fsPath)},e.prototype.resolve=function(e){var t=this;return this._resolved?c.TPromise.as(this):e.createModelReference(this._uri).then(function(e){if(!e.object)throw e.dispose(),new Error;return t._preview=new d(e),t._resolved=!0,t},function(e){return t._children=[],t._resolved=!0,t._loadFailure=e,t})},e.prototype.dispose=function(){this._preview&&(this._preview.dispose(),this._preview=null)},e}();t.FileReferences=h;var p=function(){function e(t){var n=this
;this._groups=[],this._references=[],this._onDidChangeReferenceRange=new i.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._disposables=[],t.sort(e._compareReferences);for(var r,o=0,s=t;o<s.length;o++){var a=s[o];if(r&&r.uri.toString()===a.uri.toString()||(r=new h(this,a.uri),this.groups.push(r)),0===r.children.length||!l.Range.equalsRange(a.range,r.children[r.children.length-1].range)){var c=new u(r,a.range);this._disposables.push(c.onRefChanged(function(e){return n._onDidChangeReferenceRange.fire(e)})),this._references.push(c),r.children.push(c)}}}return Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._groups.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groups",{get:function(){return this._groups},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){
return this.empty?n.localize(3,null):1===this.references.length?n.localize(4,null,this.references[0].uri.fsPath):1===this.groups.length?n.localize(5,null,this.references.length,this.groups[0].uri.fsPath):n.localize(6,null,this.references.length,this.groups.length)},e.prototype.nextOrPreviousReference=function(e,t){var n=e.parent,i=n.children.indexOf(e),r=n.children.length,o=n.parent.groups.length;return 1===o||t&&i+1<r||!t&&i>0?(i=t?(i+1)%r:(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%o,n.parent.groups[i].children[0]):(i=(i+o-1)%o,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))},e.prototype.nearestReference=function(e,t){var n=this._references.map(function(n,i){return{idx:i,prefixLen:s.commonPrefixLength(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}}).sort(function(e,t){
return e.prefixLen>t.prefixLen?-1:e.prefixLen<t.prefixLen?1:e.offsetDist<t.offsetDist?-1:e.offsetDist>t.offsetDist?1:0})[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=o.dispose(this._groups),o.dispose(this._disposables),this._disposables.length=0},e._compareReferences=function(e,t){var n=e.uri.toString(),i=t.uri.toString();return n<i?-1:n>i?1:l.Range.compareRangesUsingStarts(e.range,t.range)},e}();t.ReferencesModel=p}),define(e[1369],t([3,2]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referencesWidget",t)}),define(e[1370],t([3,2]),function(e,t){return e.create("vs/editor/contrib/rename/rename",t)}),define(e[1374],t([3,2]),function(e,t){return e.create("vs/editor/contrib/rename/renameInputField",t)}),define(e[1375],t([3,2]),function(e,t){return e.create("vs/editor/contrib/smartSelect/smartSelect",t)}),define(e[1377],t([3,2]),function(e,t){return e.create("vs/editor/contrib/snippet/snippetVariables",t)}),
define(e[458],t([1,0,1377,25,226,14]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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,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});var s=function(){function e(e){this._delegates=e}return e.prototype.resolve=function(e){for(var t=0,n=this._delegates;t<n.length;t++){var i=n[t].resolve(e);if(void 0!==i)return i}},e}();t.CompositeSnippetVariableResolver=s;var a=function(){function e(e,t){this._model=e,this._selection=t}return e.prototype.resolve=function(e){var t=e.name;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){var n=this._model.getValueInRange(this._selection)||void 0
;if(n&&this._selection.startLineNumber!==this._selection.endLineNumber){var i=this._model.getLineContent(this._selection.startLineNumber),s=o.getLeadingWhitespace(i,0,this._selection.startColumn-1),a=s;e.snippet.walk(function(t){return t!==e&&(t instanceof r.Text&&(a=o.getLeadingWhitespace(t.value.split(/\r\n|\r|\n/).pop())),!0)});var c=o.commonPrefixLength(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,function(e,t,n){return""+t+a.substr(c)+n})}return n}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){var l=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return l&&l.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0},e}();t.SelectionBasedVariableResolver=a;var c=function(){function e(e){this._model=e}return e.prototype.resolve=function(e){var t=e.name
;if("TM_FILENAME"===t)return i.basename(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){var n=i.basename(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}if("TM_DIRECTORY"===t){var o=i.dirname(this._model.uri.fsPath);return"."!==o?o:""}return"TM_FILEPATH"===t?this._model.uri.fsPath:void 0},e}();t.ModelBasedVariableResolver=c;var l=function(){function e(e,t,n){this._clipboardService=e,this._selectionIdx=t,this._selectionCount=n}return e.prototype.resolve=function(e){if("CLIPBOARD"===e.name&&this._clipboardService){var t=this._clipboardService.readText();if(t){var n=t.split(/\r\n|\n|\r/).filter(function(e){return!o.isFalsyOrWhitespace(e)});return n.length===this._selectionCount?n[this._selectionIdx]:t}}},e}();t.ClipboardBasedVariableResolver=l;var u=function(){function e(){}return e.prototype.resolve=function(t){var n=t.name
;return"CURRENT_YEAR"===n?String((new Date).getFullYear()):"CURRENT_YEAR_SHORT"===n?String((new Date).getFullYear()).slice(-2):"CURRENT_MONTH"===n?o.pad((new Date).getMonth().valueOf()+1,2):"CURRENT_DATE"===n?o.pad((new Date).getDate().valueOf(),2):"CURRENT_HOUR"===n?o.pad((new Date).getHours().valueOf(),2):"CURRENT_MINUTE"===n?o.pad((new Date).getMinutes().valueOf(),2):"CURRENT_SECOND"===n?o.pad((new Date).getSeconds().valueOf(),2):"CURRENT_DAY_NAME"===n?e.dayNames[(new Date).getDay()]:"CURRENT_DAY_NAME_SHORT"===n?e.dayNamesShort[(new Date).getDay()]:"CURRENT_MONTH_NAME"===n?e.monthNames[(new Date).getMonth()]:"CURRENT_MONTH_NAME_SHORT"===n?e.monthNamesShort[(new Date).getMonth()]:void 0},e.dayNames=[n.localize(0,null),n.localize(1,null),n.localize(2,null),n.localize(3,null),n.localize(4,null),n.localize(5,null),n.localize(6,null)],e.dayNamesShort=[n.localize(7,null),n.localize(8,null),n.localize(9,null),n.localize(10,null),n.localize(11,null),n.localize(12,null),n.localize(13,null)],
e.monthNames=[n.localize(14,null),n.localize(15,null),n.localize(16,null),n.localize(17,null),n.localize(18,null),n.localize(19,null),n.localize(20,null),n.localize(21,null),n.localize(22,null),n.localize(23,null),n.localize(24,null),n.localize(25,null)],e.monthNamesShort=[n.localize(26,null),n.localize(27,null),n.localize(28,null),n.localize(29,null),n.localize(30,null),n.localize(31,null),n.localize(32,null),n.localize(33,null),n.localize(34,null),n.localize(35,null),n.localize(36,null),n.localize(37,null)],e}();t.TimeBasedVariableResolver=u}),define(e[1384],t([3,2]),function(e,t){return e.create("vs/editor/contrib/suggest/suggestController",t)}),define(e[1385],t([3,2]),function(e,t){return e.create("vs/editor/contrib/suggest/suggestWidget",t)}),define(e[1390],t([3,2]),function(e,t){return e.create("vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode",t)}),define(e[1391],t([3,2]),function(e,t){return e.create("vs/editor/contrib/wordHighlighter/wordHighlighter",t)}),define(e[1394],t([3,2]),function(e,t){
return e.create("vs/platform/actions/browser/menuItemActionItem",t)}),define(e[1396],t([3,2]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[1397],t([3,2]),function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)}),define(e[1404],t([3,2]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionEnablementService",t)}),define(e[1408],t([3,2]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[1409],t([3,2]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionGalleryService",t)}),define(e[1411],t([3,2]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[1413],t([3,2]),function(e,t){return e.create("vs/platform/integrity/node/integrityServiceImpl",t)}),define(e[1416],t([3,2]),function(e,t){return e.create("vs/platform/keybinding/common/abstractKeybindingService",t)}),define(e[1417],t([3,2]),function(e,t){
return e.create("vs/platform/list/browser/listService",t)}),define(e[1418],t([3,2]),function(e,t){return e.create("vs/platform/markers/common/markers",t)}),define(e[1419],t([3,2]),function(e,t){return e.create("vs/platform/node/minimalTranslations",t)}),define(e[1420],t([3,2]),function(e,t){return e.create("vs/platform/request/node/request",t)}),define(e[1421],t([3,2]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[1422],t([3,2]),function(e,t){return e.create("vs/platform/theme/common/colorRegistry",t)}),define(e[1423],t([3,2]),function(e,t){return e.create("vs/platform/update/node/update.config.contribution",t)}),define(e[1427],t([3,2]),function(e,t){return e.create("vs/platform/url/electron-browser/inactiveExtensionUrlHandler",t)}),define(e[1429],t([3,2]),function(e,t){return e.create("vs/platform/workspaces/common/workspaces",t)}),define(e[1438],t([3,2]),function(e,t){return e.create("vs/workbench/api/browser/viewsContainersExtensionPoint",t)}),
define(e[1439],t([3,2]),function(e,t){return e.create("vs/workbench/api/browser/viewsExtensionPoint",t)}),define(e[1440],t([3,2]),function(e,t){return e.create("vs/workbench/api/electron-browser/mainThreadEditors",t)}),define(e[1442],t([3,2]),function(e,t){return e.create("vs/workbench/api/electron-browser/mainThreadMessageService",t)}),define(e[1447],t([3,2]),function(e,t){return e.create("vs/workbench/api/electron-browser/mainThreadSaveParticipant",t)}),define(e[1449],t([3,2]),function(e,t){return e.create("vs/workbench/api/electron-browser/mainThreadTask",t)}),define(e[1454],t([3,2]),function(e,t){return e.create("vs/workbench/api/electron-browser/mainThreadWebview",t)}),define(e[1457],t([3,2]),function(e,t){return e.create("vs/workbench/api/electron-browser/mainThreadWorkspace",t)}),define(e[1460],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleActivityBarVisibility",t)}),define(e[1462],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleCenteredLayout",t)
}),define(e[1463],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleEditorLayout",t)}),define(e[1464],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleSidebarPosition",t)}),define(e[1466],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleSidebarVisibility",t)}),define(e[1467],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleStatusbarVisibility",t)}),define(e[1469],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleTabsVisibility",t)}),define(e[1472],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/toggleZenMode",t)}),define(e[1475],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/workspaceActions",t)}),define(e[1481],t([3,2]),function(e,t){return e.create("vs/workbench/browser/actions/workspaceCommands",t)}),define(e[1489],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/activitybar/activitybarPart",t)}),
define(e[1490],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/compositePart",t)}),define(e[1494],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/compositebar/compositeBar",t)}),define(e[1498],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/compositebar/compositeBarActions",t)}),define(e[1499],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/binaryDiffEditor",t)}),define(e[1500],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/binaryEditor",t)}),define(e[1501],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editor.contribution",t)}),define(e[1502],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editorActions",t)}),define(e[1505],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editorCommands",t)}),define(e[1506],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editorGroupView",t)}),
define(e[1507],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editorPart",t)}),define(e[1508],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editorPicker",t)}),define(e[1512],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/editorStatus",t)}),define(e[1513],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/resourceViewer",t)}),define(e[1517],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/tabsTitleControl",t)}),define(e[1518],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/textDiffEditor",t)}),define(e[1523],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/textEditor",t)}),define(e[1533],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/textResourceEditor",t)}),define(e[1535],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/editor/titleControl",t)}),define(e[1538],t([3,2]),function(e,t){
return e.create("vs/workbench/browser/parts/menubar/menubar.contribution",t)}),define(e[1540],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/menubar/menubarPart",t)}),define(e[1541],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsActions",t)}),define(e[1548],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsAlerts",t)}),define(e[1551],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsCenter",t)}),define(e[1552],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsCommands",t)}),define(e[1555],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsStatus",t)}),define(e[1558],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/notifications/notificationsToasts",t)}),define(e[1560],t([3,2]),function(e,t){
return e.create("vs/workbench/browser/parts/notifications/notificationsViewer",t)}),define(e[1561],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/panel/panelActions",t)}),define(e[1562],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/panel/panelPart",t)}),define(e[1564],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/quickinput/quickInput",t)}),define(e[1567],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/quickinput/quickInputBox",t)}),define(e[1569],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/quickopen/quickOpenController",t)}),define(e[1571],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/quickopen/quickopen",t)}),define(e[1573],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/sidebar/sidebarPart",t)}),define(e[1574],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/statusbar/statusbarPart",t)}),define(e[1578],t([3,2]),function(e,t){
return e.create("vs/workbench/browser/parts/titlebar/titlebarPart",t)}),define(e[1579],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/views/panelViewlet",t)}),define(e[1580],t([3,2]),function(e,t){return e.create("vs/workbench/browser/parts/views/viewsViewlet",t)}),define(e[1587],t([3,2]),function(e,t){return e.create("vs/workbench/browser/quickopen",t)}),define(e[562],t([3,2]),function(e,t){return e.create("vs/workbench/browser/viewlet",t)}),define(e[563],t([3,2]),function(e,t){return e.create("vs/workbench/common/theme",t)}),define(e[564],t([3,2]),function(e,t){return e.create("vs/workbench/common/views",t)}),define(e[565],t([3,2]),function(e,t){return e.create("vs/workbench/electron-browser/actions",t)}),define(e[566],t([3,2]),function(e,t){return e.create("vs/workbench/electron-browser/main",t)}),define(e[567],t([3,2]),function(e,t){return e.create("vs/workbench/electron-browser/main.contribution",t)}),define(e[568],t([3,2]),function(e,t){
return e.create("vs/workbench/electron-browser/removedKeybindingsContribution",t)}),define(e[569],t([3,2]),function(e,t){return e.create("vs/workbench/electron-browser/window",t)}),define(e[570],t([3,2]),function(e,t){return e.create("vs/workbench/electron-browser/workbench",t)}),define(e[571],t([3,2]),function(e,t){return e.create("vs/workbench/parts/cli/electron-browser/cli.contribution",t)}),define(e[572],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/accessibility",t)}),define(e[573],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings",t)}),define(e[574],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint",t)}),define(e[575],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/largeFileOptimizations",t)}),define(e[576],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes",t)}),define(e[577],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/toggleMinimap",t)}),define(e[578],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier",t)}),define(e[579],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter",t)}),define(e[580],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace",t)}),define(e[581],t([3,2]),function(e,t){return e.create("vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap",t)}),define(e[582],t([3,2]),function(e,t){return e.create("vs/workbench/parts/comments/common/commentModel",t)}),define(e[583],t([3,2]),function(e,t){return e.create("vs/workbench/parts/comments/electron-browser/commentThreadWidget",t)}),define(e[584],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/debug/browser/breakpointsView",t)}),define(e[585],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugActionItems",t)}),define(e[586],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugActions",t)}),define(e[587],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugActionsWidget",t)}),define(e[588],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugCommands",t)}),define(e[589],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugContentProvider",t)}),define(e[590],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugEditorActions",t)}),define(e[591],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugQuickOpen",t)}),define(e[592],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/debugStatus",t)}),define(e[593],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/debug/browser/debugViewlet",t)}),define(e[594],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/exceptionWidget",t)}),define(e[595],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/linkDetector",t)}),define(e[596],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/browser/statusbarColorProvider",t)}),define(e[597],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/common/debug",t)}),define(e[598],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/common/debugModel",t)}),define(e[599],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/common/debugSchemas",t)}),define(e[600],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/common/debugSource",t)}),define(e[1082],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/breakpointWidget",t)}),define(e[602],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/debug/electron-browser/callStackView",t)}),define(e[603],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/debug.contribution",t)}),define(e[604],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/debugConfigurationManager",t)}),define(e[605],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/debugEditorContribution",t)}),define(e[606],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/debugHover",t)}),define(e[607],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/debugService",t)}),define(e[608],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/electronDebugActions",t)}),define(e[609],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/rawDebugSession",t)}),define(e[610],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/debug/electron-browser/repl",t)}),define(e[611],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/replViewer",t)}),define(e[612],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/terminalSupport",t)}),define(e[613],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/variablesView",t)}),define(e[614],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/electron-browser/watchExpressionsView",t)}),define(e[615],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/node/debugAdapter",t)}),define(e[616],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/node/debugger",t)}),define(e[617],t([3,2]),function(e,t){return e.create("vs/workbench/parts/debug/node/terminals",t)}),define(e[618],t([3,2]),function(e,t){return e.create("vs/workbench/parts/emmet/browser/actions/showEmmetCommands",t)}),define(e[619],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation",t)}),define(e[620],t([3,2]),function(e,t){return e.create("vs/workbench/parts/execution/electron-browser/execution.contribution",t)}),define(e[621],t([3,2]),function(e,t){return e.create("vs/workbench/parts/execution/electron-browser/terminalService",t)}),define(e[622],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/browser/dependenciesViewer",t)}),define(e[623],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/browser/extensionsQuickOpen",t)}),define(e[624],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/browser/extensionsWidgets",t)}),define(e[625],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/common/extensionsFileTemplate",t)}),define(e[626],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/common/extensionsInput",t)}),define(e[627],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/extensions/electron-browser/extensionEditor",t)}),define(e[628],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensionProfileService",t)}),define(e[629],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensionTipsService",t)}),define(e[630],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensions.contribution",t)}),define(e[631],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensionsActions",t)}),define(e[632],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensionsList",t)}),define(e[633],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensionsUtils",t)}),define(e[634],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/extensionsViewlet",t)}),define(e[635],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/extensions/electron-browser/extensionsViews",t)}),define(e[636],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor",t)}),define(e[637],t([3,2]),function(e,t){return e.create("vs/workbench/parts/extensions/node/extensionsWorkbenchService",t)}),define(e[638],t([3,2]),function(e,t){return e.create("vs/workbench/parts/feedback/electron-browser/feedback",t)}),define(e[639],t([3,2]),function(e,t){return e.create("vs/workbench/parts/feedback/electron-browser/feedback.contribution",t)}),define(e[640],t([3,2]),function(e,t){return e.create("vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem",t)}),define(e[641],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/browser/editors/binaryFileEditor",t)}),define(e[642],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/browser/editors/textFileEditor",t)}),define(e[643],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/files/common/dirtyFilesTracker",t)}),define(e[644],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/common/editors/fileEditorInput",t)}),define(e[645],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/explorerViewlet",t)}),define(e[646],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/fileActions",t)}),define(e[647],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/fileActions.contribution",t)}),define(e[648],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/fileCommands",t)}),define(e[649],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/files.contribution",t)}),define(e[650],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/saveErrorHandler",t)}),define(e[651],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/views/emptyView",t)}),
define(e[652],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/views/explorerDecorationsProvider",t)}),define(e[653],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/views/explorerView",t)}),define(e[654],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/views/explorerViewer",t)}),define(e[655],t([3,2]),function(e,t){return e.create("vs/workbench/parts/files/electron-browser/views/openEditorsView",t)}),define(e[656],t([3,2]),function(e,t){return e.create("vs/workbench/parts/html/electron-browser/html.contribution",t)}),define(e[657],t([3,2]),function(e,t){return e.create("vs/workbench/parts/html/electron-browser/htmlPreviewPart",t)}),define(e[658],t([3,2]),function(e,t){return e.create("vs/workbench/parts/localizations/electron-browser/localizations.contribution",t)}),define(e[659],t([3,2]),function(e,t){return e.create("vs/workbench/parts/localizations/electron-browser/localizationsActions",t)}),
define(e[660],t([3,2]),function(e,t){return e.create("vs/workbench/parts/logs/electron-browser/logs.contribution",t)}),define(e[661],t([3,2]),function(e,t){return e.create("vs/workbench/parts/logs/electron-browser/logsActions",t)}),define(e[662],t([3,2]),function(e,t){return e.create("vs/workbench/parts/markers/electron-browser/markers",t)}),define(e[663],t([3,2]),function(e,t){return e.create("vs/workbench/parts/markers/electron-browser/markers.contribution",t)}),define(e[664],t([3,2]),function(e,t){return e.create("vs/workbench/parts/markers/electron-browser/markersFileDecorations",t)}),define(e[665],t([3,2]),function(e,t){return e.create("vs/workbench/parts/markers/electron-browser/markersPanel",t)}),define(e[666],t([3,2]),function(e,t){return e.create("vs/workbench/parts/markers/electron-browser/markersPanelActions",t)}),define(e[667],t([3,2]),function(e,t){return e.create("vs/workbench/parts/markers/electron-browser/messages",t)}),define(e[668],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/outline/electron-browser/outline.contribution",t)}),define(e[669],t([3,2]),function(e,t){return e.create("vs/workbench/parts/outline/electron-browser/outlinePanel",t)}),define(e[670],t([3,2]),function(e,t){return e.create("vs/workbench/parts/output/browser/outputActions",t)}),define(e[671],t([3,2]),function(e,t){return e.create("vs/workbench/parts/output/browser/outputPanel",t)}),define(e[672],t([3,2]),function(e,t){return e.create("vs/workbench/parts/output/electron-browser/output.contribution",t)}),define(e[673],t([3,2]),function(e,t){return e.create("vs/workbench/parts/output/electron-browser/outputServices",t)}),define(e[674],t([3,2]),function(e,t){return e.create("vs/workbench/parts/performance/electron-browser/startupProfiler",t)}),define(e[675],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/keybindingWidgets",t)}),define(e[676],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/keybindingsEditor",t)}),
define(e[677],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/keybindingsEditorContribution",t)}),define(e[678],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/preferencesActions",t)}),define(e[679],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/preferencesEditor",t)}),define(e[680],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/preferencesRenderers",t)}),define(e[681],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/preferencesWidgets",t)}),define(e[682],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/settingsEditor2",t)}),define(e[683],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/settingsLayout",t)}),define(e[684],t([3,2]),function(e,t){return e.create("vs/workbench/parts/preferences/browser/settingsTree",t)}),define(e[685],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/preferences/electron-browser/preferences.contribution",t)}),define(e[686],t([3,2]),function(e,t){return e.create("vs/workbench/parts/quickopen/browser/commandsHandler",t)}),define(e[687],t([3,2]),function(e,t){return e.create("vs/workbench/parts/quickopen/browser/gotoLineHandler",t)}),define(e[688],t([3,2]),function(e,t){return e.create("vs/workbench/parts/quickopen/browser/gotoSymbolHandler",t)}),define(e[689],t([3,2]),function(e,t){return e.create("vs/workbench/parts/quickopen/browser/helpHandler",t)}),define(e[690],t([3,2]),function(e,t){return e.create("vs/workbench/parts/quickopen/browser/quickopen.contribution",t)}),define(e[691],t([3,2]),function(e,t){return e.create("vs/workbench/parts/quickopen/browser/viewPickerHandler",t)}),define(e[692],t([3,2]),function(e,t){return e.create("vs/workbench/parts/relauncher/electron-browser/relauncher.contribution",t)}),define(e[693],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/scm/electron-browser/dirtydiffDecorator",t)}),define(e[694],t([3,2]),function(e,t){return e.create("vs/workbench/parts/scm/electron-browser/scm.contribution",t)}),define(e[695],t([3,2]),function(e,t){return e.create("vs/workbench/parts/scm/electron-browser/scmActivity",t)}),define(e[696],t([3,2]),function(e,t){return e.create("vs/workbench/parts/scm/electron-browser/scmViewlet",t)}),define(e[697],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/openAnythingHandler",t)}),define(e[698],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/openFileHandler",t)}),define(e[699],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/openSymbolHandler",t)}),define(e[700],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/patternInputWidget",t)}),define(e[701],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/replaceService",t)}),define(e[702],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/search/browser/searchActions",t)}),define(e[703],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/searchResultsView",t)}),define(e[704],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/searchView",t)}),define(e[705],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/browser/searchWidget",t)}),define(e[706],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/common/queryBuilder",t)}),define(e[707],t([3,2]),function(e,t){return e.create("vs/workbench/parts/search/electron-browser/search.contribution",t)}),define(e[708],t([3,2]),function(e,t){return e.create("vs/workbench/parts/snippets/electron-browser/configureSnippets",t)}),define(e[709],t([3,2]),function(e,t){return e.create("vs/workbench/parts/snippets/electron-browser/insertSnippet",t)}),define(e[710],t([3,2]),function(e,t){return e.create("vs/workbench/parts/snippets/electron-browser/snippets.contribution",t)}),
define(e[711],t([3,2]),function(e,t){return e.create("vs/workbench/parts/snippets/electron-browser/snippetsFile",t)}),define(e[712],t([3,2]),function(e,t){return e.create("vs/workbench/parts/snippets/electron-browser/snippetsService",t)}),define(e[713],t([3,2]),function(e,t){return e.create("vs/workbench/parts/snippets/electron-browser/tabCompletion",t)}),define(e[714],t([3,2]),function(e,t){return e.create("vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution",t)}),define(e[715],t([3,2]),function(e,t){return e.create("vs/workbench/parts/surveys/electron-browser/nps.contribution",t)}),define(e[716],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/browser/quickOpen",t)}),define(e[717],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/browser/taskQuickOpen",t)}),define(e[718],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/common/problemMatcher",t)}),define(e[719],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/tasks/common/taskDefinitionRegistry",t)}),define(e[720],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/common/taskTemplates",t)}),define(e[721],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon",t)}),define(e[722],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/electron-browser/jsonSchema_v1",t)}),define(e[723],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/electron-browser/jsonSchema_v2",t)}),define(e[724],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/electron-browser/task.contribution",t)}),define(e[725],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/electron-browser/terminalTaskSystem",t)}),define(e[726],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/node/processRunnerDetector",t)}),define(e[727],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/node/processTaskSystem",t)}),
define(e[728],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/node/taskConfiguration",t)}),define(e[729],t([3,2]),function(e,t){return e.create("vs/workbench/parts/tasks/node/tasks",t)}),define(e[730],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/browser/terminalQuickOpen",t)}),define(e[731],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/common/terminalColorRegistry",t)}),define(e[732],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/electron-browser/terminal.contribution",t)}),define(e[733],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/electron-browser/terminalActions",t)}),define(e[734],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/electron-browser/terminalConfigHelper",t)}),define(e[735],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/electron-browser/terminalInstance",t)}),define(e[736],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/terminal/electron-browser/terminalLinkHandler",t)}),define(e[737],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/electron-browser/terminalPanel",t)}),define(e[738],t([3,2]),function(e,t){return e.create("vs/workbench/parts/terminal/electron-browser/terminalService",t)}),define(e[739],t([3,2]),function(e,t){return e.create("vs/workbench/parts/themes/electron-browser/themes.contribution",t)}),define(e[740],t([3,2]),function(e,t){return e.create("vs/workbench/parts/update/electron-browser/releaseNotesEditor",t)}),define(e[741],t([3,2]),function(e,t){return e.create("vs/workbench/parts/update/electron-browser/update",t)}),define(e[742],t([3,2]),function(e,t){return e.create("vs/workbench/parts/url/electron-browser/url.contribution",t)}),define(e[743],t([3,2]),function(e,t){return e.create("vs/workbench/parts/watermark/electron-browser/watermark",t)}),define(e[744],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/webview/electron-browser/webview.contribution",t)}),define(e[745],t([3,2]),function(e,t){return e.create("vs/workbench/parts/webview/electron-browser/webviewCommands",t)}),define(e[746],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut",t)}),define(e[747],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/overlay/browser/welcomeOverlay",t)}),define(e[748],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page",t)}),define(e[749],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/page/electron-browser/welcomePage",t)}),define(e[750],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution",t)}),define(e[751],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough",t)}),define(e[752],t([3,2]),function(e,t){
return e.create("vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution",t)}),define(e[753],t([3,2]),function(e,t){return e.create("vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart",t)}),define(e[754],t([3,2]),function(e,t){return e.create("vs/workbench/services/actions/electron-browser/menusExtensionPoint",t)}),define(e[755],t([3,2]),function(e,t){return e.create("vs/workbench/services/bulkEdit/electron-browser/bulkEditService",t)}),define(e[756],t([3,2]),function(e,t){return e.create("vs/workbench/services/configuration/common/configurationExtensionPoint",t)}),define(e[757],t([3,2]),function(e,t){return e.create("vs/workbench/services/configuration/node/configurationEditingService",t)}),define(e[758],t([3,2]),function(e,t){return e.create("vs/workbench/services/configuration/node/configurationService",t)}),define(e[759],t([3,2]),function(e,t){return e.create("vs/workbench/services/configuration/node/jsonEditingService",t)}),
define(e[760],t([3,2]),function(e,t){return e.create("vs/workbench/services/configurationResolver/electron-browser/configurationResolverService",t)}),define(e[761],t([3,2]),function(e,t){return e.create("vs/workbench/services/configurationResolver/node/variableResolver",t)}),define(e[762],t([3,2]),function(e,t){return e.create("vs/workbench/services/crashReporter/electron-browser/crashReporterService",t)}),define(e[763],t([3,2]),function(e,t){return e.create("vs/workbench/services/decorations/browser/decorationsService",t)}),define(e[764],t([3,2]),function(e,t){return e.create("vs/workbench/services/dialogs/electron-browser/dialogService",t)}),define(e[765],t([3,2]),function(e,t){return e.create("vs/workbench/services/editor/browser/editorService",t)}),define(e[766],t([3,2]),function(e,t){return e.create("vs/workbench/services/extensions/common/extensionsRegistry",t)}),define(e[767],t([3,2]),function(e,t){return e.create("vs/workbench/services/extensions/electron-browser/extensionHost",t)}),
define(e[768],t([3,2]),function(e,t){return e.create("vs/workbench/services/extensions/electron-browser/extensionService",t)}),define(e[769],t([3,2]),function(e,t){return e.create("vs/workbench/services/extensions/node/extensionPoints",t)}),define(e[770],t([3,2]),function(e,t){return e.create("vs/workbench/services/files/electron-browser/fileService",t)}),define(e[771],t([3,2]),function(e,t){return e.create("vs/workbench/services/files/electron-browser/remoteFileService",t)}),define(e[772],t([3,2]),function(e,t){return e.create("vs/workbench/services/jsonschemas/common/jsonValidationExtensionPoint",t)}),define(e[773],t([3,2]),function(e,t){return e.create("vs/workbench/services/keybinding/common/keybindingEditing",t)}),define(e[774],t([3,2]),function(e,t){return e.create("vs/workbench/services/keybinding/electron-browser/keybindingService",t)}),define(e[775],t([3,2]),function(e,t){return e.create("vs/workbench/services/mode/common/workbenchModeService",t)}),define(e[776],t([3,2]),function(e,t){
return e.create("vs/workbench/services/preferences/browser/preferencesService",t)}),define(e[777],t([3,2]),function(e,t){return e.create("vs/workbench/services/preferences/common/keybindingsEditorModel",t)}),define(e[778],t([3,2]),function(e,t){return e.create("vs/workbench/services/preferences/common/preferences",t)}),define(e[779],t([3,2]),function(e,t){return e.create("vs/workbench/services/preferences/common/preferencesEditorInput",t)}),define(e[780],t([3,2]),function(e,t){return e.create("vs/workbench/services/preferences/common/preferencesModels",t)}),define(e[781],t([3,2]),function(e,t){return e.create("vs/workbench/services/progress/browser/progressService2",t)}),define(e[782],t([3,2]),function(e,t){return e.create("vs/workbench/services/textMate/electron-browser/TMGrammars",t)}),define(e[783],t([3,2]),function(e,t){return e.create("vs/workbench/services/textMate/electron-browser/TMSyntax",t)}),define(e[784],t([3,2]),function(e,t){
return e.create("vs/workbench/services/textfile/common/textFileEditorModel",t)}),define(e[785],t([3,2]),function(e,t){return e.create("vs/workbench/services/textfile/common/textFileService",t)}),define(e[786],t([3,2]),function(e,t){return e.create("vs/workbench/services/textfile/electron-browser/textFileService",t)}),define(e[787],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/common/colorExtensionPoint",t)}),define(e[788],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/common/colorThemeSchema",t)}),define(e[789],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/common/fileIconThemeSchema",t)}),define(e[790],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/electron-browser/colorThemeData",t)}),define(e[791],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/electron-browser/colorThemeStore",t)}),define(e[792],t([3,2]),function(e,t){
return e.create("vs/workbench/services/themes/electron-browser/fileIconThemeData",t)}),define(e[793],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/electron-browser/fileIconThemeStore",t)}),define(e[794],t([3,2]),function(e,t){return e.create("vs/workbench/services/themes/electron-browser/workbenchThemeService",t)}),define(e[795],t([3,2]),function(e,t){return e.create("vs/workbench/services/workspace/node/workspaceEditingService",t)}),define(e[796],t([1,0,103,10,11]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.writeText=function(e){n.clipboard.writeText(e)},e.prototype.readText=function(){return n.clipboard.readText()},e.prototype.readFindText=function(){return r.isMacintosh?n.clipboard.readFindText():""},e.prototype.writeFindText=function(e){r.isMacintosh&&n.clipboard.writeFindText(e)},e.prototype.writeResources=function(t){t.length&&n.clipboard.writeBuffer(e.FILE_FORMAT,this.resourcesToBuffer(t))},
e.prototype.readResources=function(){return this.bufferToResources(n.clipboard.readBuffer(e.FILE_FORMAT))},e.prototype.hasResources=function(){return n.clipboard.has(e.FILE_FORMAT)},e.prototype.resourcesToBuffer=function(e){return Buffer.from(e.map(function(e){return e.toString()}).join("\n"))},e.prototype.bufferToResources=function(e){if(!e)return[];var t=e.toString();if(!t)return[];try{return t.split("\n").map(function(e){return i.default.parse(e)})}catch(e){return[]}},e.FILE_FORMAT="code/file-list",e}();t.ClipboardService=o}),define(e[797],t([1,0,74,5,82,23,356,817]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t,n,i){var r=this;this.setContainer(e),this.contextViewService=t,this.telemetryService=n,this.notificationService=i,this.actionRunner=new o.ActionRunner,this.menuContainerElement=null,this.toDispose=[];var s=!1;this.toDispose.push(this.actionRunner.onDidBeforeRun(function(e){
r.telemetryService&&r.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),(s=!!e.retainActionItem)||r.contextViewService.hideContextView(!1)})),this.toDispose.push(this.actionRunner.onDidRun(function(e){s&&r.contextViewService.hideContextView(!1),s=!1,e.error&&r.notificationService&&r.notificationService.error(e.error)}))}return e.prototype.setContainer=function(e){var t=this;this.$el&&(this.$el.off(["click","mousedown"]),this.$el=null),e&&(this.$el=n.$(e),this.$el.on("mousedown",function(e){return t.onMouseDown(e)}))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().done(function(n){n.length&&t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(r){t.menuContainerElement=r;var o=e.getMenuClassName?e.getMenuClassName():"";o&&(r.className+=" "+o);var a=new s.Menu(r,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:t.actionRunner,
getKeyBinding:e.getKeyBinding}),c=a.onDidCancel(function(){t.contextViewService.hideContextView(!0)}),l=a.onDidBlur(function(){t.contextViewService.hideContextView(!0)});return a.focus(),i.combinedDisposable([c,l,a])},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})})},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new r.StandardMouseEvent(e).target;t;){if(t===this.menuContainerElement)return;t=t.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}();t.ContextMenuHandler=a}),define(e[798],t([1,0,797,7]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,r,o){this._onDidContextMenu=new i.Emitter,this.contextMenuHandler=new n.ContextMenuHandler(e,o,t,r)}return e.prototype.dispose=function(){this.contextMenuHandler.dispose()},e.prototype.setContainer=function(e){this.contextMenuHandler.setContainer(e)},
e.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()},Object.defineProperty(e.prototype,"onDidContextMenu",{get:function(){return this._onDidContextMenu.event},enumerable:!0,configurable:!0}),e}();t.ContextMenuService=r}),define(e[799],t([1,0,131,7,10]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.service=e,this.onInstallExtension=i.buffer(e.onInstallExtension,!0),this.onDidInstallExtension=i.buffer(e.onDidInstallExtension,!0),this.onUninstallExtension=i.buffer(e.onUninstallExtension,!0),this.onDidUninstallExtension=i.buffer(e.onDidUninstallExtension,!0)}return e.prototype.call=function(e,t){switch(e){case"event:onInstallExtension":return n.eventToCall(this.onInstallExtension);case"event:onDidInstallExtension":return n.eventToCall(this.onDidInstallExtension);case"event:onUninstallExtension":return n.eventToCall(this.onUninstallExtension);case"event:onDidUninstallExtension":
return n.eventToCall(this.onDidUninstallExtension);case"install":return this.service.install(t[0]);case"installFromGallery":return this.service.installFromGallery(t[0]);case"uninstall":return this.service.uninstall(t[0],t[1]);case"reinstallFromGallery":return this.service.reinstallFromGallery(t[0]);case"getInstalled":return this.service.getInstalled(t[0]);case"updateMetadata":return this.service.updateMetadata(t[0],t[1]);case"getExtensionsReport":return this.service.getExtensionsReport()}},e}();t.ExtensionManagementChannel=o;var s=function(){function e(e,t){var r=this;this.channel=e,this.uriTransformer=t,this._onInstallExtension=n.eventFromCall(this.channel,"event:onInstallExtension"),this._onDidInstallExtension=i.mapEvent(n.eventFromCall(this.channel,"event:onDidInstallExtension"),function(e){return c({},e,{local:r._transform(e.local)})}),this._onUninstallExtension=n.eventFromCall(this.channel,"event:onUninstallExtension"),
this._onDidUninstallExtension=n.eventFromCall(this.channel,"event:onDidUninstallExtension")}return Object.defineProperty(e.prototype,"onInstallExtension",{get:function(){return this._onInstallExtension},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidInstallExtension",{get:function(){return this._onDidInstallExtension},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onUninstallExtension",{get:function(){return this._onUninstallExtension},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidUninstallExtension",{get:function(){return this._onDidUninstallExtension},enumerable:!0,configurable:!0}),e.prototype.install=function(e){var t=this;return this.channel.call("install",[e]).then(function(e){return t._transform(e)})},e.prototype.installFromGallery=function(e){var t=this;return this.channel.call("installFromGallery",[e]).then(function(e){return t._transform(e)})},e.prototype.uninstall=function(e,t){return void 0===t&&(t=!1),
this.channel.call("uninstall",[e,t])},e.prototype.reinstallFromGallery=function(e){var t=this;return this.channel.call("reinstallFromGallery",[e]).then(function(e){return t._transform(e)})},e.prototype.getInstalled=function(e){var t=this;return void 0===e&&(e=null),this.channel.call("getInstalled",[e]).then(function(e){return e.map(function(e){return t._transform(e)})})},e.prototype.updateMetadata=function(e,t){var n=this;return this.channel.call("updateMetadata",[e,t]).then(function(e){return n._transform(e)})},e.prototype.getExtensionsReport=function(){return this.channel.call("getExtensionsReport")},e.prototype._transform=function(e){return e?c({},e,{location:r.default.revive(this.uriTransformer.transformIncoming(e.location))}):e},e}();t.ExtensionManagementChannelClient=s}),define(e[461],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_LOG_BROADCAST_CHANNEL="vscode:extensionLog",t.EXTENSION_ATTACH_BROADCAST_CHANNEL="vscode:extensionAttach",
t.EXTENSION_TERMINATE_BROADCAST_CHANNEL="vscode:extensionTerminate",t.EXTENSION_RELOAD_BROADCAST_CHANNEL="vscode:extensionReload",t.EXTENSION_CLOSE_EXTHOST_BROADCAST_CHANNEL="vscode:extensionCloseExtensionHost"}),define(e[801],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MANIFEST_CACHE_FOLDER="CachedExtensions",t.USER_MANIFEST_CACHE_FILE="user",t.BUILTIN_MANIFEST_CACHE_FILE="builtin"}),define(e[802],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MAX_FILE_SIZE="ia32"===process.arch?314572800:17179869184,t.MAX_HEAP_SIZE="ia32"===process.arch?734003200:1468006400}),define(e[112],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.ctor=e,this.staticArguments=t}}();t.SyncDescriptor=n,t.createSyncDescriptor=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i]
;return new(n.bind.apply(n,[void 0,e].concat(t)))}}),define(e[107],t([1,0,112]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Services="di.services";var i=[];t.registerSingleton=function(e,t){i.push({id:e,descriptor:new n.SyncDescriptor(t)})},t.getServices=function(){return i}}),define(e[6],t([1,0]),function(e,t){"use strict";function n(e,t,n,i){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:n,optional:i}):(t[r.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[r.DI_TARGET]=t)}function i(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);var t=function(e,i,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,r,!1)};return t.toString=function(){return e},r.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}
}(r=t._util||(t._util={})),t.IInstantiationService=i("instantiationService"),t.createDecorator=i,t.optional=function(e){return function(t,i,r){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,r,!0)}}}),define(e[184],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBulkEditService=n.createDecorator("IWorkspaceEditService")}),define(e[71],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICodeEditorService=n.createDecorator("codeEditorService")}),define(e[195],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID_EDITOR_WORKER_SERVICE="editorWorkerService",t.IEditorWorkerService=n.createDecorator(t.ID_EDITOR_WORKER_SERVICE)}),define(e[54],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IModeService=n.createDecorator("modeService")}),define(e[47],t([1,0,6]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.IModelService=n.createDecorator("modelService"),t.shouldSynchronizeModel=function(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}}),define(e[811],t([1,0,7,1042,47]),function(e,t,n,i,r){"use strict";function o(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(o):e.exclusive)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new n.Emitter}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),{dispose:function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}}}},e.prototype.has=function(e){
return this.all(e).length>0},e.prototype.all=function(e){if(!e)return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n<i.length;n++){var r=i[n];r._score>0&&t.push(r.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,function(e){return t.push(e.provider)}),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))}),i},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var n=0;n<this._entries.length;n++){var i=this._entries[n];i._score>0&&t(i)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var s=0,a=this._entries;s<a.length;s++){var c=a[s];if(c._score=i.score(c.selector,t.uri,t.getLanguageIdentifier().language,r.shouldSynchronizeModel(t)),
o(c.selector)&&c._score>0){for(var l=0,u=this._entries;l<u.length;l++){u[l]._score=0}c._score=1e3;break}}this._entries.sort(e._compareByScoreAndTime)}},e._compareByScoreAndTime=function(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0},e}();t.default=s}),define(e[44],t([1,0,811,1063,30]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Null=0]="Null",e[e.PlainText=1]="PlainText"}(t.LanguageId||(t.LanguageId={}));var o=function(){return function(e,t){this.language=e,this.id=t}}();t.LanguageIdentifier=o;!function(e){e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline"}(t.FontStyle||(t.FontStyle={}));!function(e){e[e.None=0]="None",e[e.DefaultForeground=1]="DefaultForeground",e[e.DefaultBackground=2]="DefaultBackground"}(t.ColorId||(t.ColorId={}));!function(e){e[e.Other=0]="Other",e[e.Comment=1]="Comment",e[e.String=2]="String",e[e.RegEx=4]="RegEx"
}(t.StandardTokenType||(t.StandardTokenType={}));!function(e){e[e.LANGUAGEID_MASK=255]="LANGUAGEID_MASK",e[e.TOKEN_TYPE_MASK=1792]="TOKEN_TYPE_MASK",e[e.FONT_STYLE_MASK=14336]="FONT_STYLE_MASK",e[e.FOREGROUND_MASK=8372224]="FOREGROUND_MASK",e[e.BACKGROUND_MASK=4286578688]="BACKGROUND_MASK",e[e.LANGUAGEID_OFFSET=0]="LANGUAGEID_OFFSET",e[e.TOKEN_TYPE_OFFSET=8]="TOKEN_TYPE_OFFSET",e[e.FONT_STYLE_OFFSET=11]="FONT_STYLE_OFFSET",e[e.FOREGROUND_OFFSET=14]="FOREGROUND_OFFSET",e[e.BACKGROUND_OFFSET=23]="BACKGROUND_OFFSET"}(t.MetadataConsts||(t.MetadataConsts={}));var s=function(){function e(){}return e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.getClassNameFromMetadata=function(e){var t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t},
e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),r="color: "+t[n]+";";return 1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;"),4&i&&(r+="text-decoration: underline;"),r},e}();t.TokenMetadata=s;!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(t.SuggestTriggerKind||(t.SuggestTriggerKind={}));!function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(t.CodeActionTrigger||(t.CodeActionTrigger={}));!function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var a;!function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",
e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(a=t.SymbolKind||(t.SymbolKind={})),t.symbolKindToCssClass=function(){var e=Object.create(null);return e[a.File]="file",e[a.Module]="module",e[a.Namespace]="namespace",e[a.Package]="package",e[a.Class]="class",e[a.Method]="method",e[a.Property]="property",e[a.Field]="field",e[a.Constructor]="constructor",e[a.Enum]="enum",e[a.Interface]="interface",e[a.Function]="function",e[a.Variable]="variable",e[a.Constant]="constant",e[a.String]="string",e[a.Number]="number",e[a.Boolean]="boolean",e[a.Array]="array",e[a.Object]="object",e[a.Key]="key",e[a.Null]="null",e[a.EnumMember]="enum-member",e[a.Struct]="struct",e[a.Event]="event",e[a.Operator]="operator",
e[a.TypeParameter]="type-parameter",function(t){return e[t]||"property"}}();var c=function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();t.FoldingRangeKind=c,t.isResourceFileEdit=function(e){return r.isObject(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))},t.isResourceTextEdit=function(e){return r.isObject(e)&&e.resource&&Array.isArray(e.edits)};!function(e){e[e.Collapsed=0]="Collapsed",e[e.Expanded=1]="Expanded"}(t.CommentThreadCollapsibleState||(t.CommentThreadCollapsibleState={})),t.ReferenceProviderRegistry=new n.default,t.RenameProviderRegistry=new n.default,t.SuggestRegistry=new n.default,t.SignatureHelpProviderRegistry=new n.default,t.HoverProviderRegistry=new n.default,t.DocumentSymbolProviderRegistry=new n.default,t.DocumentHighlightProviderRegistry=new n.default,t.DefinitionProviderRegistry=new n.default,t.ImplementationProviderRegistry=new n.default,t.TypeDefinitionProviderRegistry=new n.default,
t.CodeLensProviderRegistry=new n.default,t.CodeActionProviderRegistry=new n.default,t.DocumentFormattingEditProviderRegistry=new n.default,t.DocumentRangeFormattingEditProviderRegistry=new n.default,t.OnTypeFormattingEditProviderRegistry=new n.default,t.LinkProviderRegistry=new n.default,t.ColorProviderRegistry=new n.default,t.FoldingRangeProviderRegistry=new n.default,t.TokenizationRegistry=new i.TokenizationRegistryImpl}),define(e[322],t([1,0,44]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,r=i+(n<<1),o=i;o<r;o++)if(this._tokens[o]!==e._tokens[o])return!1;return!0},e.prototype.getLineContent=function(){return this._text},
e.prototype.getCount=function(){return this._tokensCount},e.prototype.getStartOffset=function(e){return e>0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var i=this._tokens[1+(e<<1)];return n.TokenMetadata.getInlineStyleFromMetadata(i,t)},e.prototype.getEndOffset=function(e){return this._tokens[e<<1]},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t)},e.prototype.inflate=function(){return this},e.prototype.sliceAndInflate=function(e,t,n){return new r(this,e,t,n)},e.convertToEndOffset=function(e,t){
for(var n=(e.length>>>1)-1,i=0;i<n;i++)e[i<<1]=e[i+1<<1];e[n<<1]=t},e.findIndexInTokensArray=function(e,t){if(e.length<=2)return 0;for(var n=0,i=(e.length>>>1)-1;n<i;){var r=n+Math.floor((i-n)/2),o=e[r<<1];if(o===t)return r+1;o<t?n=r+1:o>t&&(i=r)}return n},e}();t.LineTokens=i;var r=function(){function e(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var r=this._firstTokenIndex,o=e.getCount();r<o;r++){if(e.getStartOffset(r)>=n)break;this._tokensCount++}}return e.prototype.equals=function(t){return t instanceof e&&(this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount))},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e)},e.prototype.getEndOffset=function(e){
var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e)},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)},e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex},e}();t.SlicedLineTokens=r}),define(e[222],t([1,0,44,311]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}();t.NULL_STATE=new r,t.NULL_MODE_ID="vs.editor.nullMode",t.NULL_LANGUAGE_IDENTIFIER=new n.LanguageIdentifier(t.NULL_MODE_ID,0),t.nullTokenize=function(e,t,n,r){return new i.TokenizationResult([new i.Token(r,"",e)],n)},t.nullTokenize2=function(e,t,n,r){
var o=new Uint32Array(2);return o[0]=r,o[1]=(16384|e<<0|2<<23)>>>0,new i.TokenizationResult2(o,n)}}),define(e[815],t([1,0,322,20,39,9,222]),function(e,t,n,i,r,o,s){"use strict";function a(e){return(16384|e<<0|2<<23)>>>0}Object.defineProperty(t,"__esModule",{value:!0});var c=new Uint32Array(0).buffer,l=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==c&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==c){var t=new Uint32Array(this._lineTokens),n=t[t.length-2];this.delete(e,n)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==c&&e!==t){var i=new Uint32Array(this._lineTokens),r=i.length>>>1;if(0!==e||i[i.length-2]!==t){var o=n.LineTokens.findIndexInTokensArray(i,e),s=o>0?i[o-1<<1]:0;if(t<i[o<<1])for(var a=t-e,l=o;l<r;l++)i[l<<1]-=a;else{var u,d;s!==e?(i[o<<1]=e,u=o+1<<1,d=e):(u=o<<1,d=s)
;for(var h=t-e,p=o+1;p<r;p++){var f=i[p<<1]-h;f>d&&(i[u++]=f,i[u++]=i[1+(p<<1)],d=f)}if(u!==i.length){var g=new Uint32Array(u);g.set(i.subarray(0,u),0),this._lineTokens=g.buffer}}}else this._lineTokens=c}},e.prototype.append=function(e){if(e!==c)if(this._lineTokens!==c){if(null!==this._lineTokens)if(null!==e){var t=new Uint32Array(this._lineTokens),n=new Uint32Array(e),i=n.length>>>1,r=new Uint32Array(t.length+n.length);r.set(t,0);for(var o=t.length,s=t[t.length-2],a=0;a<i;a++)r[o++]=n[a<<1]+s,r[o++]=n[1+(a<<1)];this._lineTokens=r.buffer}else this._lineTokens=null}else this._lineTokens=e},e.prototype.insert=function(e,t){if(this._lineTokens){var i=new Uint32Array(this._lineTokens),r=i.length>>>1,o=n.LineTokens.findIndexInTokensArray(i,e);if(o>0){(o>0?i[o-1<<1]:0)===e&&o--}for(var s=o;s<r;s++)i[s<<1]+=t}},e}(),u=function(){function e(e,t){if(this.languageIdentifier=e,this.tokenizationSupport=t,this._tokens=[],this.tokenizationSupport){var n=null;try{n=this.tokenizationSupport.getInitialState()}catch(e){
o.onUnexpectedError(e),this.tokenizationSupport=null}n&&(this._tokens[0]=new l(n))}this._invalidLineStartIndex=0,this._lastState=null}return Object.defineProperty(e.prototype,"inValidLineStartIndex",{get:function(){return this._invalidLineStartIndex},enumerable:!0,configurable:!0}),e.prototype.getTokens=function(e,t,i){var r=null;if(t<this._tokens.length&&this._tokens[t]&&(r=this._tokens[t]._lineTokens),null!==r&&r!==c)return new n.LineTokens(new Uint32Array(r),i);var o=new Uint32Array(2);return o[0]=i.length,o[1]=a(e),new n.LineTokens(o,i)},e.prototype.isCheapToTokenize=function(e){return this._invalidLineStartIndex+1>=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex<e.getLineCount()},e.prototype.invalidateLine=function(e){this._setIsInvalid(e,!0),e<this._invalidLineStartIndex&&(this._setIsInvalid(this._invalidLineStartIndex,!0),this._invalidLineStartIndex=e)},e.prototype._setIsInvalid=function(e,t){e<this._tokens.length&&this._tokens[e]&&(this._tokens[e]._invalid=t)},
e.prototype._isInvalid=function(e){return!(e<this._tokens.length&&this._tokens[e])||this._tokens[e]._invalid},e.prototype._getState=function(e){return e<this._tokens.length&&this._tokens[e]?this._tokens[e]._state:null},e.prototype._setTokens=function(e,t,i,r){var o;t<this._tokens.length&&this._tokens[t]?o=this._tokens[t]:(o=new l(null),this._tokens[t]=o),0!==i?(r&&0!==r.length||((r=new Uint32Array(2))[0]=0,r[1]=a(e)),n.LineTokens.convertToEndOffset(r,i),o._lineTokens=r.buffer):o._lineTokens=c},e.prototype._setState=function(e,t){if(e<this._tokens.length&&this._tokens[e])this._tokens[e]._state=t;else{var n=new l(t);this._tokens[e]=n}},e.prototype.applyEdits=function(e,t,n){for(var i=e.endLineNumber-e.startLineNumber,o=t,s=Math.min(i,o);s>=0;s--)this.invalidateLine(e.startLineNumber+s-1);this._acceptDeleteRange(e),this._acceptInsertText(new r.Position(e.startLineNumber,e.startColumn),t,n)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1
;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var n=this._tokens[t];n.deleteEnding(e.startColumn-1);var i=e.endLineNumber-1,r=null;if(i<this._tokens.length){var o=this._tokens[i];o.deleteBeginning(e.endColumn-1),r=o._lineTokens}n.append(r),this._tokens.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber)}else{if(e.startColumn===e.endColumn)return;this._tokens[t].delete(e.startColumn-1,e.endColumn-1)}},e.prototype._acceptInsertText=function(e,t,n){if(0!==t||0!==n){var r=e.lineNumber-1;if(!(r>=this._tokens.length))if(0!==t){var o=this._tokens[r];o.deleteEnding(e.column-1),o.insert(e.column-1,n);for(var s=new Array(t),a=t-1;a>=0;a--)s[a]=new l(null);this._tokens=i.arrayInsert(this._tokens,e.lineNumber,s)}else this._tokens[r].insert(e.column-1,n)}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var n=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,n),n},e.prototype._tokenizeText=function(e,t,n){var i=null;try{
i=this.tokenizationSupport.tokenize2(t,n,0)}catch(e){o.onUnexpectedError(e)}return i||(i=s.nullTokenize2(this.languageIdentifier.id,t,n,0)),i},e.prototype._updateTokensUntilLine=function(e,t,n){if(this.tokenizationSupport){for(var i=e.getLineCount(),r=n-1,a=this._invalidLineStartIndex;a<=r;a++){var c=a+1,l=null,u=e.getLineContent(a+1);try{var d=this._getState(a).clone();l=this.tokenizationSupport.tokenize2(u,d,0)}catch(e){o.onUnexpectedError(e)}if(l||(l=s.nullTokenize2(this.languageIdentifier.id,u,this._getState(a),0)),this._setTokens(this.languageIdentifier.id,a,u.length,l.tokens),t.registerChangedTokens(a+1),this._setIsInvalid(a,!1),c<i)if(null!==this._getState(c)&&l.endState.equals(this._getState(c))){for(var h=a+1;h<i&&!this._isInvalid(h);){if(h+1<i){if(null===this._getState(h+1))break}else if(null===this._lastState)break;h++}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,h),a=h-1}else this._setState(c,l.endState);else this._lastState=l.endState}
this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,r+1)}else this._invalidLineStartIndex=e.getLineCount()},e}();t.ModelLinesTokens=u;var d=function(){function e(){this._ranges=[]}return e.prototype.registerChangedTokens=function(e){var t=this._ranges,n=t.length,i=n>0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}();t.ModelTokensChangedEventBuilder=d}),define(e[66],t([1,0,10,7,57,44,1022,19,60,1029,9,14,370,5,1083,222,261,259,39,114,237,815,1026,133,369,4,1037]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";function k(){return new x.PieceTreeTextBufferBuilder}function D(e){var t=k();return t.acceptChunk(e),t.finish()}function A(e,t){return("string"==typeof e?D(e):e).create(t)}function L(e){return e.replace(/[^a-z0-9\-_]/gi," ")}function R(e){return e instanceof W?e:W.createDynamic(e)}Object.defineProperty(t,"__esModule",{value:!0
}),t.createTextBufferFactory=D,t.createTextBufferFactoryFromStream=function(e,t){return new T.TPromise(function(n,i,r){var o=!1,s=k();e.on("data",function(e){t&&(e=t(e)),s.acceptChunk(e)}),e.on("error",function(e){o||(o=!0,i(e))}),e.on("end",function(){o||(o=!0,n(s.finish()))})})},t.createTextBufferFactoryFromSnapshot=function(e){for(var t,n=k();"string"==typeof(t=e.read());)n.acceptChunk(t);return n.finish()},t.createTextBuffer=A;var O=0;t.LONG_LINE_BOUNDARY=1e4;var M=function(){function e(e){this._source=e,this._eos=!1}return e.prototype.read=function(){if(this._eos)return null;for(var e=[],t=0,n=0;;){var i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}},e}(),P=function(e){function f(t,n,l,u){void 0===u&&(u=null);var d=e.call(this)||this;d._onWillDispose=d._register(new r.Emitter),d.onWillDispose=d._onWillDispose.event,d._onDidChangeDecorations=d._register(new V),
d.onDidChangeDecorations=d._onDidChangeDecorations.event,d._onDidChangeLanguage=d._register(new r.Emitter),d.onDidChangeLanguage=d._onDidChangeLanguage.event,d._onDidChangeLanguageConfiguration=d._register(new r.Emitter),d.onDidChangeLanguageConfiguration=d._onDidChangeLanguageConfiguration.event,d._onDidChangeTokens=d._register(new r.Emitter),d.onDidChangeTokens=d._onDidChangeTokens.event,d._onDidChangeOptions=d._register(new r.Emitter),d.onDidChangeOptions=d._onDidChangeOptions.event,d._eventEmitter=d._register(new z),O++,d.id="$model"+O,d.isForSimpleWidget=n.isForSimpleWidget,d._associatedResource=void 0===u||null===u?i.default.parse("inmemory://model/"+O):u,d._attachedEditorCount=0,d._buffer=A(t,n.defaultEOL),d._options=f.resolveOptions(d._buffer,n);var h=d._buffer.getLineCount(),p=d._buffer.getValueLengthInRange(new c.Range(1,1,h,d._buffer.getLineLength(h)+1),o.EndOfLinePreference.TextDefined)
;return n.largeFileOptimizations?d._isTooLargeForTokenization=p>f.LARGE_FILE_SIZE_THRESHOLD||h>f.LARGE_FILE_LINE_COUNT_THRESHOLD:d._isTooLargeForTokenization=!1,d._isTooLargeForSyncing=p>f.MODEL_SYNC_LIMIT,d._setVersionId(1),d._isDisposed=!1,d._isDisposing=!1,d._languageIdentifier=l||v.NULL_LANGUAGE_IDENTIFIER,d._tokenizationListener=s.TokenizationRegistry.onDidChange(function(e){-1!==e.changedLanguages.indexOf(d._languageIdentifier.language)&&(d._resetTokenizationState(),d.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:d.getLineCount()}]}),d._shouldAutoTokenize()&&d._warmUpTokens())}),d._revalidateTokensTimeout=-1,d._languageRegistryListener=S.LanguageConfigurationRegistry.onDidChange(function(e){e.languageIdentifier.id===d._languageIdentifier.id&&d._onDidChangeLanguageConfiguration.fire({})}),d._resetTokenizationState(),d._instanceId=function(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}(O),d._lastDecorationId=0,d._decorations=Object.create(null),
d._decorationsTree=new N,d._commandManager=new a.EditStack(d),d._isUndoing=!1,d._isRedoing=!1,d._trimAutoWhitespaceLines=null,d}return n(f,e),f.createFromString=function(e,t,n,i){return void 0===t&&(t=f.DEFAULT_CREATION_OPTIONS),void 0===n&&(n=null),void 0===i&&(i=null),new f(e,t,n,i)},f.resolveOptions=function(e,t){if(t.detectIndentation){var n=E.guessIndentation(e,t.tabSize,t.insertSpaces);return new o.TextModelResolvedOptions({tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new o.TextModelResolvedOptions({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},f.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent(function(t){return e(t.rawContentChangedEvent)})},f.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent(function(t){return e(t.rawContentChangedEvent)})},f.prototype.onDidChangeContent=function(e){
return this._eventEmitter.slowEvent(function(t){return e(t.contentChangedEvent)})},f.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._commandManager=null,this._decorations=null,this._decorationsTree=null,this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._tokens=null,this._isDisposed=!0,this._buffer=null,e.prototype.dispose.call(this),this._isDisposing=!1},f.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},f.prototype.equalsTextBuffer=function(e){return this._assertNotDisposed(),this._buffer.equals(e)},f.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new u.InternalModelContentChangeEvent(e,t))},f.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=A(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},f.prototype._createContentChanged2=function(e,t,n,i,r,o,s){return{changes:[{range:e,rangeOffset:t,
rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:r,isRedoing:o,isFlush:s}},f.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),r=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new N,this._commandManager=new a.EditStack(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new u.ModelRawContentChangedEvent([new u.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new c.Range(1,1,i,r),0,n,this.getValue(),!1,!1,!0))}},f.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===o.EndOfLineSequence.CRLF?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),
this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new u.ModelRawContentChangedEvent([new u.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new c.Range(1,1,r,s),0,i,this.getValue(),!1,!1,!1))}},f.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},f.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n<i;n++){var r=t[n],o=r.cachedAbsoluteStart-r.start,s=this._buffer.getOffsetAt(r.range.startLineNumber,r.range.startColumn),a=this._buffer.getOffsetAt(r.range.endLineNumber,r.range.endColumn);r.cachedAbsoluteStart=s,r.cachedAbsoluteEnd=a,r.cachedVersionId=e,r.start=s-o,r.end=a-o,p.recomputeMaxEnd(r)}},f.prototype._resetTokenizationState=function(){this._clearTimers();var e=this._isTooLargeForTokenization?null:s.TokenizationRegistry.get(this._languageIdentifier.language)
;this._tokens=new C.ModelLinesTokens(this._languageIdentifier,e),this._beginBackgroundTokenization()},f.prototype._clearTimers=function(){-1!==this._revalidateTokensTimeout&&(clearTimeout(this._revalidateTokensTimeout),this._revalidateTokensTimeout=-1)},f.prototype.onBeforeAttached=function(){this._attachedEditorCount++,this._warmUpTokens()},f.prototype.onBeforeDetached=function(){this._attachedEditorCount--},f.prototype._shouldAutoTokenize=function(){return this.isAttachedToEditor()},f.prototype.isAttachedToEditor=function(){return this._attachedEditorCount>0},f.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},f.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},f.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},f.prototype.isDisposed=function(){return this._isDisposed},f.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1
;for(var e=0,n=0,i=this._buffer.getLineCount(),r=1;r<=i;r++){var o=this._buffer.getLineLength(r);o>=t.LONG_LINE_BOUNDARY?n+=o:e+=o}return n>e},Object.defineProperty(f.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),f.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},f.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new o.TextModelResolvedOptions({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(r)){var s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}},f.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=E.guessIndentation(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,
tabSize:n.tabSize})},f._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,r=0;r<e.length;r++)"\t"===e.charAt(r)?i+=t:i++;var o="";if(!n){var s=Math.floor(i/t);i%=t;for(r=0;r<s;r++)o+="\t"}for(r=0;r<i;r++)o+=" ";return o},f.normalizeIndentation=function(e,t,n){var i=h.firstNonWhitespaceIndex(e);return-1===i&&(i=e.length),f._normalizeIndentationFromWhitespace(e.substring(0,i),t,n)+e.substring(i)},f.prototype.normalizeIndentation=function(e){return this._assertNotDisposed(),f.normalizeIndentation(e,this._options.tabSize,this._options.insertSpaces)},f.prototype.getOneIndent=function(){this._assertNotDisposed();var e=this._options.tabSize;if(this._options.insertSpaces){for(var t="",n=0;n<e;n++)t+=" ";return t}return"\t"},f.prototype.getVersionId=function(){return this._assertNotDisposed(),this._versionId},f.prototype.mightContainRTL=function(){return this._buffer.mightContainRTL()},f.prototype.mightContainNonBasicASCII=function(){return this._buffer.mightContainNonBasicASCII()},
f.prototype.getAlternativeVersionId=function(){return this._assertNotDisposed(),this._alternativeVersionId},f.prototype.getOffsetAt=function(e){this._assertNotDisposed();var t=this._validatePosition(e.lineNumber,e.column,!1);return this._buffer.getOffsetAt(t.lineNumber,t.column)},f.prototype.getPositionAt=function(e){this._assertNotDisposed();var t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)},f.prototype._increaseVersionId=function(){this._setVersionId(this._versionId+1)},f.prototype._setVersionId=function(e){this._versionId=e,this._alternativeVersionId=this._versionId},f.prototype._overwriteAlternativeVersionId=function(e){this._alternativeVersionId=e},f.prototype.getValue=function(e,t){void 0===t&&(t=!1),this._assertNotDisposed();var n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i},f.prototype.createSnapshot=function(e){return void 0===e&&(e=!1),new M(this._buffer.createSnapshot(e))},f.prototype.getValueLength=function(e,t){
void 0===t&&(t=!1),this._assertNotDisposed();var n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i},f.prototype.getValueInRange=function(e,t){return void 0===t&&(t=o.EndOfLinePreference.TextDefined),this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)},f.prototype.getValueLengthInRange=function(e,t){return void 0===t&&(t=o.EndOfLinePreference.TextDefined),this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)},f.prototype.getLineCount=function(){return this._assertNotDisposed(),this._buffer.getLineCount()},f.prototype.getLineContent=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},f.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},f.prototype.getLinesContent=function(){
return this._assertNotDisposed(),this._buffer.getLinesContent()},f.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},f.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},f.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},f.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},f.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},f.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),r=e.startLineNumber,o=e.startColumn;if(r<1)t=1,n=1;else if(r>i)t=i,
n=this.getLineMaxColumn(t);else if(t=0|r,o<=1)n=1;else{n=o>=(h=this.getLineMaxColumn(t))?h:0|o}var s,a,u=e.endLineNumber,d=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else if(s=0|u,d<=1)a=1;else{var h=this.getLineMaxColumn(s);a=d>=h?h:0|d}return r===t&&o===n&&u===s&&d===a&&e instanceof c.Range&&!(e instanceof l.Selection)?e:new c.Range(t,n,s,a)},f.prototype._isValidPosition=function(e,t,n){if(isNaN(e))return!1;if(e<1)return!1;if(e>this._buffer.getLineCount())return!1;if(isNaN(t))return!1;if(t<1)return!1;if(t>this.getLineMaxColumn(e))return!1;if(n&&t>1){var i=this._buffer.getLineCharCode(e,t-2);if(h.isHighSurrogate(i))return!1}return!0},f.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),r=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(i<1)return new b.Position(1,1);if(i>o)return new b.Position(o,this.getLineMaxColumn(o));if(r<=1)return new b.Position(i,1);var s=this.getLineMaxColumn(i)
;if(r>=s)return new b.Position(i,s);if(n){var a=this._buffer.getLineCharCode(i,r-2);if(h.isHighSurrogate(a))return new b.Position(i,r-1)}return new b.Position(i,r)},f.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof b.Position&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},f.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,i,!1))return!1;if(!this._isValidPosition(r,o,!1))return!1;if(t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=o>1&&o<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,o-2):0,c=h.isHighSurrogate(s),l=h.isHighSurrogate(a);return!c&&!l}return!0},f.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof c.Range&&!(e instanceof l.Selection)&&this._isValidRange(e,!0))return e
;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),i=t.lineNumber,r=t.column,o=n.lineNumber,s=n.column,a=r>1?this._buffer.getLineCharCode(i,r-2):0,u=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,d=h.isHighSurrogate(a),p=h.isHighSurrogate(u);return d||p?i===o&&r===s?new c.Range(i,r-1,o,s-1):d&&p?new c.Range(i,r-1,o,s+1):d?new c.Range(i,r-1,o,s):new c.Range(i,r,o,s+1):new c.Range(i,r,o,s)},f.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},f.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new c.Range(1,1,e,this.getLineMaxColumn(e))},f.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},f.prototype.findMatches=function(e,t,n,i,r,o,s){void 0===s&&(s=999),this._assertNotDisposed();var a
;if(a=c.Range.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var l=new I.SearchParams(e,n,i,r).parseSearchRequest();return l?this.findMatchesLineByLine(a,l,o,s):[]}return I.TextModelSearch.findMatches(this,new I.SearchParams(e,n,i,r),a,o,s)},f.prototype.findNextMatch=function(e,t,n,i,r,o){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new I.SearchParams(e,n,i,r).parseSearchRequest(),l=this.getLineCount(),u=new c.Range(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(u,a,o,1);return I.TextModelSearch.findNextMatch(this,new I.SearchParams(e,n,i,r),s,o),d.length>0?d[0]:(u=new c.Range(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(u,a,o,1)).length>0?d[0]:null)}return I.TextModelSearch.findNextMatch(this,new I.SearchParams(e,n,i,r),s,o)},f.prototype.findPreviousMatch=function(e,t,n,i,r,o){this._assertNotDisposed();var s=this.validatePosition(t)
;return I.TextModelSearch.findPreviousMatch(this,new I.SearchParams(e,n,i,r),s,o)},f.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},f.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?o.EndOfLineSequence.LF:o.EndOfLineSequence.CRLF)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},f.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},f.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var r=t.map(function(e){return{range:i.validateRange(e.range),text:e.text}}),o=!0,s=0,a=e.length;s<a;s++){
for(var l=e[s],u=!1,d=0,h=r.length;d<h;d++){var p=(y=r[d].range).startLineNumber>l.endLineNumber,f=l.startLineNumber>y.endLineNumber;if(!p&&!f){u=!0;break}}if(!u){o=!1;break}}if(o)for(var s=0,a=this._trimAutoWhitespaceLines.length;s<a;s++){for(var g=this._trimAutoWhitespaceLines[s],v=this.getLineMaxColumn(g),m=!0,d=0,h=r.length;d<h;d++){var y=r[d].range,b=r[d].text;if(!(g<y.startLineNumber||g>y.endLineNumber)&&!(g===y.startLineNumber&&y.startColumn===v&&y.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===y.startLineNumber&&1===y.startColumn&&y.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){m=!1;break}}m&&t.push({range:new c.Range(g,1,g,v),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},f.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},
f._eolCount=function(e){for(var t=0,n=0,i=0,r=e.length;i<r;i++){var o=e.charCodeAt(i);13===o?(0===t&&(n=i),t++,i+1<r&&10===e.charCodeAt(i+1)&&i++):10===o&&(0===t&&(n=i),t++)}return 0===t&&(n=e.length),[t,n]},f.prototype._applyEdits=function(e){for(var t=0,n=e.length;t<n;t++)e[t].range=this.validateRange(e[t].range);var i=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace),o=this._buffer.getLineCount(),s=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,0!==s.length){for(var a=[],c=i,t=0,n=s.length;t<n;t++){var l=s[t],d=f._eolCount(l.text),h=d[0],p=d[1];this._tokens.applyEdits(l.range,h,p),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(l.rangeOffset,l.rangeLength,l.text.length,l.forceMoveMarkers);for(var g=l.range.startLineNumber,v=l.range.endLineNumber,m=v-g,y=h,b=Math.min(m,y),S=y-m,_=b;_>=0;_--){var C=g+_,E=o-c-S+C;a.push(new u.ModelRawLineChanged(C,this.getLineContent(E)))}if(b<m){var w=g+b
;a.push(new u.ModelRawLinesDeleted(w+1,v))}if(b<y){for(var I=g+b,T=y-b,x=o-c-T+I+1,k=[],D=0;D<T;D++){var A=x+D;k[A-x]=this.getLineContent(A)}a.push(new u.ModelRawLinesInserted(I+1,g+y,k))}c+=S}this._increaseVersionId(),this._emitContentChangedEvent(new u.ModelRawContentChangedEvent(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization(),r.reverseEdits},f.prototype._undo=function(){this._isUndoing=!0;var e=this._commandManager.undo();return this._isUndoing=!1,e?(this._overwriteAlternativeVersionId(e.recordedVersionId),e.selections):null},f.prototype.undo=function(){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._undo()}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},
f.prototype._redo=function(){this._isRedoing=!0;var e=this._commandManager.redo();return this._isRedoing=!1,e?(this._overwriteAlternativeVersionId(e.recordedVersionId),e.selections):null},f.prototype.redo=function(){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._redo()}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},f.prototype.changeDecorations=function(e,t){void 0===t&&(t=0),this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}},f.prototype._changeDecorations=function(e,t){var n=this,i={addDecoration:function(t,i){return n._onDidChangeDecorations.fire(),n._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0]},changeDecoration:function(e,t){n._onDidChangeDecorations.fire(),n._changeDecorationImpl(e,t)},changeDecorationOptions:function(e,t){n._onDidChangeDecorations.fire(),
n._changeDecorationOptionsImpl(e,R(t))},removeDecoration:function(t){n._onDidChangeDecorations.fire(),n._deltaDecorationsImpl(e,[t],[])},deltaDecorations:function(t,i){return 0===t.length&&0===i.length?[]:(n._onDidChangeDecorations.fire(),n._deltaDecorationsImpl(e,t,i))}},r=null;try{r=t(i)}catch(e){d.onUnexpectedError(e)}return i.addDecoration=null,i.changeDecoration=null,i.removeDecoration=null,i.deltaDecorations=null,r},f.prototype.deltaDecorations=function(e,t,n){if(void 0===n&&(n=0),this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}},f.prototype._getTrackedRange=function(e){return this.getDecorationRange(e)},f.prototype._setTrackedRange=function(e,t,n){var i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:B[n]}])[0]:null
;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;var r=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),s=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,r),i.setOptions(B[n]),this._decorationsTree.insert(i),i.id},f.prototype.removeAllDecorationsWithOwnerId=function(e){if(!this._isDisposed)for(var t=this._decorationsTree.collectNodesFromOwner(e),n=0,i=t.length;n<i;n++){var r=t[n];this._decorationsTree.delete(r),delete this._decorations[r.id]}},f.prototype.getDecorationOptions=function(e){var t=this._decorations[e];return t?t.options:null},f.prototype.getDecorationRange=function(e){var t=this._decorations[e];if(!t)return null;var n=this.getVersionId();return t.cachedVersionId!==n&&this._decorationsTree.resolveNode(t,n),null===t.range&&(t.range=this._getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range},
f.prototype.getLineDecorations=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=!1),e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},f.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var r=this.getLineCount(),o=Math.min(r,Math.max(1,e)),s=Math.min(r,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new c.Range(o,1,s,a),n,i)},f.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},f.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},f.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},f.prototype._getDecorationsInRange=function(e,t,n){
var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),r=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),o=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,r,t,n,o);return this._ensureNodesHaveRanges(s)},f.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t];null===i.range&&(i.range=this._getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd))}return e},f.prototype._getRangeAt=function(e,t){return this._buffer.getRangeAt(e,t-e)},f.prototype._changeDecorationImpl=function(e,t){var n=this._decorations[e];if(n){var i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),o=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,o,i),this._decorationsTree.insert(n)}},f.prototype._changeDecorationOptionsImpl=function(e,t){var n=this._decorations[e];if(n){!!n.options.overviewRuler.color!==!!t.overviewRuler.color?(this._decorationsTree.delete(n),
n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}},f.prototype._deltaDecorationsImpl=function(e,t,n){for(var i=this.getVersionId(),r=t.length,o=0,s=n.length,a=0,c=new Array(s);o<r||a<s;){var l=null;if(o<r){do{l=this._decorations[t[o++]]}while(!l&&o<r);l&&this._decorationsTree.delete(l)}if(a<s){if(!l){var u=++this._lastDecorationId,d=this._instanceId+";"+u;l=new p.IntervalNode(d,0,0),this._decorations[d]=l}var h=n[a],f=this._validateRangeRelaxedNoAllocations(h.range),g=R(h.options),v=this._buffer.getOffsetAt(f.startLineNumber,f.startColumn),m=this._buffer.getOffsetAt(f.endLineNumber,f.endColumn);l.ownerId=e,l.reset(i,v,m,f),l.setOptions(g),this._decorationsTree.insert(l),c[a]=l.id,a++}else l&&delete this._decorations[l.id]}return c},f.prototype.tokenizeViewport=function(e,t){if(this._tokens.tokenizationSupport){var n=Math.floor(.3*this._tokens.inValidLineStartIndex);if((e=Math.max(1,e-n))<=this._tokens.inValidLineStartIndex)this.forceTokenization(t);else{
var i=new C.ModelTokensChangedEventBuilder,r=this.getLineFirstNonWhitespaceColumn(e),o=[],s=e-1,a=null;if(r>0)for(;r>0&&s>=1;){var c=this.getLineFirstNonWhitespaceColumn(s);if(0!==c){if(c<r){if(a=this._tokens._getState(s-1))break;o.push(this.getLineContent(s)),r=c}s--}else s--}a||(a=this._tokens.tokenizationSupport.getInitialState());for(var l=a.clone(),u=o.length-1;u>=0;u--){l=(f=this._tokens._tokenizeText(this._buffer,o[u],l))?f.endState.clone():a.clone()}var d=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+d);for(var h=e;h<=t;h++){var p=this.getLineContent(h),f=this._tokens._tokenizeText(this._buffer,p,l);f?(this._tokens._setTokens(this._tokens.languageIdentifier.id,h-1,p.length,f.tokens),this._tokens._setIsInvalid(h-1,!1),this._tokens._setState(h-1,l),l=f.endState.clone(),i.registerChangedTokens(h)):l=a.clone()}var g=i.build();g&&this._onDidChangeTokens.fire(g)}}},f.prototype.forceTokenization=function(e){
if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new C.ModelTokensChangedEventBuilder;this._tokens._updateTokensUntilLine(this._buffer,t,e);var n=t.build();n&&this._onDidChangeTokens.fire(n)},f.prototype.isCheapToTokenize=function(e){return this._tokens.isCheapToTokenize(e)},f.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},f.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},f.prototype._getLineTokens=function(e){var t=this._buffer.getLineContent(e);return this._tokens.getTokens(this._languageIdentifier.id,e-1,t)},f.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},f.prototype.getModeId=function(){return this._languageIdentifier.language},f.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,
this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},f.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokens.tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,r=n.column,o=this._getLineTokens(i);return o.getLanguageId(o.findTokenIndexAtOffset(r-1))},f.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()},0))},f.prototype._warmUpTokens=function(){var e=Math.min(100,this.getLineCount());this._revalidateTokensNow(e),this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization()},f.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._buffer.getLineCount())
;for(var t=new C.ModelTokensChangedEventBuilder,n=g.StopWatch.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(n.elapsed()>20);){if(this._tokens._tokenizeOneLine(this._buffer,t)>=e)break}this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var i=t.build();i&&this._onDidChangeTokens.fire(i)},f.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},f.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var t=this.validatePosition(e),n=this.getLineContent(t.lineNumber),i=this._getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),o=f._findLanguageBoundaries(i,r),s=o[0],a=o[1],c=_.getWordAtText(t.column,S.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(r)),n.substring(s,a),s);if(c)return c;if(r>0&&s===t.column-1){var l=f._findLanguageBoundaries(i,r-1),u=l[0],d=l[1],h=_.getWordAtText(t.column,S.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(r-1)),n.substring(u,d),u)
;if(h)return h}return null},f._findLanguageBoundaries=function(e,t){for(var n,i=e.getLanguageId(t),r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);for(var o,r=t,s=e.getCount();r<s&&e.getLanguageId(r)===i;r++)o=e.getEndOffset(r);return[n,o]},f.prototype.getWordUntilPosition=function(e){var t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},f.prototype.findMatchingBracketUp=function(e,t){var n=e.toLowerCase(),i=this.validatePosition(t),r=this._getLineTokens(i.lineNumber),o=r.getLanguageId(r.findTokenIndexAtOffset(i.column-1)),s=S.LanguageConfigurationRegistry.getBracketsSupport(o);if(!s)return null;var a=s.textIsBracket[n];return a?this._findMatchingBracketUp(a,i):null},f.prototype.matchBracket=function(e){return this._matchBracket(this.validatePosition(e))},f.prototype._matchBracket=function(e){
var t=e.lineNumber,n=this._getLineTokens(t),i=this._buffer.getLineContent(t),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;var o=S.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(r));if(o&&!m.ignoreBracketsInToken(n.getStandardTokenType(r))){for(var s=Math.max(n.getStartOffset(r),e.column-1-o.maxBracketLength),a=Math.min(n.getEndOffset(r),e.column-1+o.maxBracketLength),c=null;;){if(!(u=y.BracketsUtils.findNextBracketInToken(o.forwardRegex,t,i,s,a)))break;if(u.startColumn<=e.column&&e.column<=u.endColumn){d=(d=i.substring(u.startColumn-1,u.endColumn-1)).toLowerCase();(h=this._matchFoundBracket(u,o.textIsBracket[d],o.textIsOpenBracket[d]))&&(c=h)}s=u.endColumn-1}if(c)return c}if(r>0&&n.getStartOffset(r)===e.column-1){a=n.getStartOffset(r);r--;var l=S.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(r));if(l&&!m.ignoreBracketsInToken(n.getStandardTokenType(r))){
var s=Math.max(n.getStartOffset(r),e.column-1-l.maxBracketLength),u=y.BracketsUtils.findPrevBracketInToken(l.reversedRegex,t,i,s,a);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){var d=i.substring(u.startColumn-1,u.endColumn-1);d=d.toLowerCase();var h=this._matchFoundBracket(u,l.textIsBracket[d],l.textIsOpenBracket[d]);if(h)return h}}}return null},f.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else{var i=this._findMatchingBracketUp(t,e.getStartPosition());if(i)return[e,i]}return null},f.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,r=-1,o=t.lineNumber;o>=1;o--){var s=this._getLineTokens(o),a=s.getCount(),c=this._buffer.getLineContent(o),l=a-1,u=-1;for(o===t.lineNumber&&(l=s.findTokenIndexAtOffset(t.column-1),u=t.column-1);l>=0;l--){var d=s.getLanguageId(l),h=s.getStandardTokenType(l),p=s.getStartOffset(l),f=s.getEndOffset(l);if(-1===u&&(u=f),
d===n&&!m.ignoreBracketsInToken(h))for(;;){var g=y.BracketsUtils.findPrevBracketInToken(i,o,c,p,u);if(!g)break;var v=c.substring(g.startColumn-1,g.endColumn-1);if((v=v.toLowerCase())===e.open?r++:v===e.close&&r--,0===r)return g;u=g.startColumn-1}u=-1}}return null},f.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,r=1,o=t.lineNumber,s=this.getLineCount();o<=s;o++){var a=this._getLineTokens(o),c=a.getCount(),l=this._buffer.getLineContent(o),u=0,d=0;for(o===t.lineNumber&&(u=a.findTokenIndexAtOffset(t.column-1),d=t.column-1);u<c;u++){var h=a.getLanguageId(u),p=a.getStandardTokenType(u),f=a.getStartOffset(u),g=a.getEndOffset(u);if(0===d&&(d=f),h===n&&!m.ignoreBracketsInToken(p))for(;;){var v=y.BracketsUtils.findNextBracketInToken(i,o,l,d,g);if(!v)break;var b=l.substring(v.startColumn-1,v.endColumn-1);if((b=b.toLowerCase())===e.open?r++:b===e.close&&r--,0===r)return v;d=v.endColumn-1}d=0}}return null},f.prototype.findPrevBracket=function(e){
for(var t=this.validatePosition(e),n=-1,i=null,r=t.lineNumber;r>=1;r--){var o=this._getLineTokens(r),s=o.getCount(),a=this._buffer.getLineContent(r),c=s-1,l=-1;for(r===t.lineNumber&&(c=o.findTokenIndexAtOffset(t.column-1),l=t.column-1);c>=0;c--){var u=o.getLanguageId(c),d=o.getStandardTokenType(c),h=o.getStartOffset(c),p=o.getEndOffset(c);if(-1===l&&(l=p),n!==u&&(n=u,i=S.LanguageConfigurationRegistry.getBracketsSupport(n)),i&&!m.ignoreBracketsInToken(d)){var f=y.BracketsUtils.findPrevBracketInToken(i.reversedRegex,r,a,h,l);if(f)return this._toFoundBracket(i,f)}l=-1}}return null},f.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=-1,i=null,r=t.lineNumber,o=this.getLineCount();r<=o;r++){var s=this._getLineTokens(r),a=s.getCount(),c=this._buffer.getLineContent(r),l=0,u=0;for(r===t.lineNumber&&(l=s.findTokenIndexAtOffset(t.column-1),u=t.column-1);l<a;l++){var d=s.getLanguageId(l),h=s.getStandardTokenType(l),p=s.getStartOffset(l),f=s.getEndOffset(l);if(0===u&&(u=p),n!==d&&(n=d,
i=S.LanguageConfigurationRegistry.getBracketsSupport(n)),i&&!m.ignoreBracketsInToken(h)){var g=y.BracketsUtils.findNextBracketInToken(i.forwardRegex,r,c,u,f);if(g)return this._toFoundBracket(i,g)}u=0}}return null},f.prototype._toFoundBracket=function(e,t){if(!t)return null;var n=this.getValueInRange(t);n=n.toLowerCase();var i=e.textIsBracket[n];return i?{range:t,open:i.open,close:i.close,isOpen:e.textIsOpenBracket[n]}:null},f.computeIndentLevel=function(e,t){for(var n=0,i=0,r=e.length;i<r;){var o=e.charCodeAt(i);if(32===o)n++;else{if(9!==o)break;n=n-n%t+t}i++}return i===r?-1:n},f.prototype._computeIndentLevel=function(e){return f.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)},f.prototype.getActiveIndentGuide=function(e,t,n){var i=this;this._assertNotDisposed();var r=this.getLineCount();if(e<1||e>r)throw new Error("Illegal value for lineNumber");for(var o=S.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),s=o&&o.offSide,a=-2,c=-1,l=-2,u=-1,d=function(e){
if(-1!==a&&(-2===a||a>e-1)){a=-1,c=-1;for(n=e-2;n>=0;n--){var t=i._computeIndentLevel(n);if(t>=0){a=n,c=t;break}}}if(-2===l){l=-1,u=-1;for(var n=e;n<r;n++){var o=i._computeIndentLevel(n);if(o>=0){l=n,u=o;break}}}},h=-2,p=-1,f=-2,g=-1,v=function(e){if(-2===h){h=-1,p=-1;for(n=e-2;n>=0;n--){var t=i._computeIndentLevel(n);if(t>=0){h=n,p=t;break}}}if(-1!==f&&(-2===f||f<e-1)){f=-1,g=-1;for(var n=e;n<r;n++){var o=i._computeIndentLevel(n);if(o>=0){f=n,g=o;break}}}},m=0,y=!0,b=0,_=!0,C=0,E=0;y||_;E++){var w=e-E,I=e+E;if(0!==E&&(w<1||w<t)&&(y=!1),0!==E&&(I>r||I>n)&&(_=!1),E>5e4&&(y=!1,_=!1),y){var T=void 0;if((k=this._computeIndentLevel(w-1))>=0?(l=w-1,u=k,T=Math.ceil(k/this._options.tabSize)):(d(w),T=this._getIndentLevelForWhitespaceLine(s,c,u)),0===E){if(m=w,b=I,0===(C=T))return{startLineNumber:m,endLineNumber:b,indent:C};continue}T>=C?m=w:y=!1}if(_){var x=void 0,k=this._computeIndentLevel(I-1);k>=0?(h=I-1,p=k,x=Math.ceil(k/this._options.tabSize)):(v(I),x=this._getIndentLevelForWhitespaceLine(s,p,g)),x>=C?b=I:_=!1}}
return{startLineNumber:m,endLineNumber:b,indent:C}},f.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=S.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),r=i&&i.offSide,o=new Array(t-e+1),s=-2,a=-1,c=-2,l=-1,u=e;u<=t;u++){var d=u-e,h=this._computeIndentLevel(u-1);if(h>=0)s=u-1,a=h,o[d]=Math.ceil(h/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(p=u-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break}}}if(-1!==c&&(-2===c||c<u-1)){c=-1,l=-1;for(var p=u;p<n;p++){var f=this._computeIndentLevel(p);if(f>=0){c=p,l=f;break}}}o[d]=this._getIndentLevelForWhitespaceLine(r,a,l)}}return o},f.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){
return-1===t||-1===n?0:t<n?1+Math.floor(t/this._options.tabSize):t===n?Math.ceil(n/this._options.tabSize):e?Math.ceil(n/this._options.tabSize):1+Math.floor(n/this._options.tabSize)},f.MODEL_SYNC_LIMIT=52428800,f.LARGE_FILE_SIZE_THRESHOLD=20971520,f.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,f.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:w.EDITOR_MODEL_DEFAULTS.tabSize,insertSpaces:w.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:o.DefaultEndOfLine.LF,trimAutoWhitespace:w.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:w.EDITOR_MODEL_DEFAULTS.largeFileOptimizations},f}(f.Disposable);t.TextModel=P;var N=function(){function e(){this._decorationsTree0=new p.IntervalTree,this._decorationsTree1=new p.IntervalTree}return e.prototype.intervalSearch=function(e,t,n,i,r){var o=this._decorationsTree0.intervalSearch(e,t,n,i,r),s=this._decorationsTree1.intervalSearch(e,t,n,i,r);return o.concat(s)},e.prototype.search=function(e,t,n,i){if(n)return this._decorationsTree1.search(e,t,i)
;var r=this._decorationsTree0.search(e,t,i),o=this._decorationsTree1.search(e,t,i);return r.concat(o)},e.prototype.collectNodesFromOwner=function(e){var t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e);return t.concat(n)},e.prototype.collectNodesPostOrder=function(){var e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder();return e.concat(t)},e.prototype.insert=function(e){p.getNodeIsInOverviewRuler(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)},e.prototype.delete=function(e){p.getNodeIsInOverviewRuler(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)},e.prototype.resolveNode=function(e,t){p.getNodeIsInOverviewRuler(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)},e.prototype.acceptReplace=function(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i)},e}(),F=function(){return function(e){
this.color=h.empty,this.darkColor=h.empty,this.hcColor=h.empty,this.position=o.OverviewRulerLane.Center,this._resolvedColor=null,e&&e.color&&(this.color=e.color),e&&e.darkColor&&(this.darkColor=e.darkColor,this.hcColor=e.darkColor),e&&e.hcColor&&(this.hcColor=e.hcColor),e&&e.hasOwnProperty("position")&&(this.position=e.position)}}();t.ModelDecorationOverviewRulerOptions=F;var W=function(){function e(e){this.stickiness=e.stickiness||o.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,this.zIndex=e.zIndex||0,this.className=e.className?L(e.className):h.empty,this.hoverMessage=e.hoverMessage||[],this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||[],this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.overviewRuler=new F(e.overviewRuler),this.glyphMarginClassName=e.glyphMarginClassName?L(e.glyphMarginClassName):h.empty,this.linesDecorationsClassName=e.linesDecorationsClassName?L(e.linesDecorationsClassName):h.empty,
this.marginClassName=e.marginClassName?L(e.marginClassName):h.empty,this.inlineClassName=e.inlineClassName?L(e.inlineClassName):h.empty,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?L(e.beforeContentClassName):h.empty,this.afterContentClassName=e.afterContentClassName?L(e.afterContentClassName):h.empty}return e.register=function(t){return new e(t)},e.createDynamic=function(t){return new e(t)},e}();t.ModelDecorationOptions=W,W.EMPTY=W.register({});var B=[W.register({stickiness:o.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges}),W.register({stickiness:o.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}),W.register({stickiness:o.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore}),W.register({stickiness:o.TrackedRangeStickiness.GrowsOnlyWhenTypingAfter})],V=function(e){function t(){var t=e.call(this)||this;return t._actual=t._register(new r.Emitter),t.event=t._actual.event,t._deferredCnt=0,t._shouldFire=!1,t}
return n(t,e),t.prototype.beginDeferredEmit=function(){this._deferredCnt++},t.prototype.endDeferredEmit=function(){this._deferredCnt--,0===this._deferredCnt&&this._shouldFire&&(this._shouldFire=!1,this._actual.fire({}))},t.prototype.fire=function(){this._shouldFire=!0},t}(f.Disposable);t.DidChangeDecorationsEmitter=V;var z=function(e){function t(){var t=e.call(this)||this;return t._fastEmitter=t._register(new r.Emitter),t.fastEvent=t._fastEmitter.event,t._slowEmitter=t._register(new r.Emitter),t.slowEvent=t._slowEmitter.event,t._deferredCnt=0,t._deferredEvent=null,t}return n(t,e),t.prototype.beginDeferredEmit=function(){this._deferredCnt++},t.prototype.endDeferredEmit=function(){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){var e=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(e),this._slowEmitter.fire(e)}},t.prototype.fire=function(e){
this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(f.Disposable);t.DidChangeContentEmitter=z}),define(e[130],t([1,0,39,14,66,60,19,114,9]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Primary=0]="Primary",e[e.TopMost=1]="TopMost",e[e.BottomMost=2]="BottomMost"}(t.RevealTarget||(t.RevealTarget={}));!function(e){e[e.Other=0]="Other",e[e.Typing=1]="Typing",e[e.DeletingLeft=2]="DeletingLeft",e[e.DeletingRight=3]="DeletingRight"}(t.EditOperationType||(t.EditOperationType={}));var l=function(){function e(t,n,i,r){this._languageIdentifier=t;var o=r.editor;this.readOnly=o.readOnly,this.tabSize=i.tabSize,this.insertSpaces=i.insertSpaces,this.oneIndent=n,this.pageSize=Math.max(1,Math.floor(o.layoutInfo.height/o.fontInfo.lineHeight)-2),this.lineHeight=o.lineHeight,this.useTabStops=o.useTabStops,this.wordSeparators=o.wordSeparators,
this.emptySelectionClipboard=o.emptySelectionClipboard,this.multiCursorMergeOverlapping=o.multiCursorMergeOverlapping,this.autoClosingBrackets=o.autoClosingBrackets,this.autoIndent=o.autoIndent,this.autoClosingPairsOpen={},this.autoClosingPairsClose={},this.surroundingPairs={},this._electricChars=null;var s=e._getAutoClosingPairs(t);if(s)for(c=0;c<s.length;c++)this.autoClosingPairsOpen[s[c].open]=s[c].close,this.autoClosingPairsClose[s[c].close]=s[c].open;var a=e._getSurroundingPairs(t);if(a)for(var c=0;c<a.length;c++)this.surroundingPairs[a[c].open]=a[c].close}return e.shouldRecreate=function(e){return e.layoutInfo||e.wordSeparators||e.emptySelectionClipboard||e.multiCursorMergeOverlapping||e.autoClosingBrackets||e.useTabStops||e.lineHeight||e.readOnly},Object.defineProperty(e.prototype,"electricChars",{get:function(){if(!this._electricChars){this._electricChars={};var t=e._getElectricCharacters(this._languageIdentifier);if(t)for(var n=0;n<t.length;n++)this._electricChars[t[n]]=!0}return this._electricChars
},enumerable:!0,configurable:!0}),e.prototype.normalizeIndentation=function(e){return r.TextModel.normalizeIndentation(e,this.tabSize,this.insertSpaces)},e._getElectricCharacters=function(e){try{return a.LanguageConfigurationRegistry.getElectricCharacters(e.id)}catch(e){return c.onUnexpectedError(e),null}},e._getAutoClosingPairs=function(e){try{return a.LanguageConfigurationRegistry.getAutoClosingPairs(e.id)}catch(e){return c.onUnexpectedError(e),null}},e._getSurroundingPairs=function(e){try{return a.LanguageConfigurationRegistry.getSurroundingPairs(e.id)}catch(e){return c.onUnexpectedError(e),null}},e}();t.CursorConfiguration=l;var u=function(){function e(t,n,i,r){this.selectionStart=t,this.selectionStartLeftoverVisibleColumns=n,this.position=i,this.leftoverVisibleColumns=r,this.selection=e._computeSelection(this.selectionStart,this.position)}return e.prototype.equals=function(e){
return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)},e.prototype.hasSelection=function(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()},e.prototype.move=function(t,i,r,o){return t?new e(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new n.Position(i,r),o):new e(new s.Range(i,r,i,r),o,new n.Position(i,r),o)},e._computeSelection=function(e,t){var n,i,r,s;return e.isEmpty()?(n=e.startLineNumber,i=e.startColumn,r=t.lineNumber,s=t.column):t.isBeforeOrEqual(e.getStartPosition())?(n=e.endLineNumber,i=e.endColumn,r=t.lineNumber,s=t.column):(n=e.startLineNumber,i=e.startColumn,r=t.lineNumber,s=t.column),new o.Selection(n,i,r,s)},e}();t.SingleCursorState=u;var d=function(){function e(e,t,n){this.model=t,this.viewModel=n,
this.config=new l(this.model.getLanguageIdentifier(),this.model.getOneIndent(),this.model.getOptions(),e)}return e.prototype.validateViewPosition=function(e,t){return this.viewModel.coordinatesConverter.validateViewPosition(e,t)},e.prototype.validateViewRange=function(e,t){return this.viewModel.coordinatesConverter.validateViewRange(e,t)},e.prototype.convertViewRangeToModelRange=function(e){return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},e.prototype.convertViewPositionToModelPosition=function(e,t){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new n.Position(e,t))},e.prototype.convertModelPositionToViewPosition=function(e){return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(e)},e.prototype.getCurrentScrollTop=function(){return this.viewModel.viewLayout.getCurrentScrollTop()},
e.prototype.getCompletelyVisibleViewRange=function(){return this.viewModel.getCompletelyVisibleViewRange()},e.prototype.getCompletelyVisibleModelRange=function(){var e=this.viewModel.getCompletelyVisibleViewRange();return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},e.prototype.getCompletelyVisibleViewRangeAtScrollTop=function(e){return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(e)},e.prototype.getVerticalOffsetForViewLine=function(e){return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(e)},e}();t.CursorContext=d;var h=function(){function e(e,t){this.modelState=e,this.viewState=t}return e.fromModelState=function(t){return new e(t,null)},e.fromViewState=function(t){return new e(null,t)},e.fromModelSelection=function(t){var i=t.selectionStartLineNumber,r=t.selectionStartColumn,o=t.positionLineNumber,a=t.positionColumn,c=new u(new s.Range(i,r,i,r),0,new n.Position(o,a),0);return e.fromModelState(c)},e.fromModelSelections=function(e){
for(var t=[],n=0,i=e.length;n<i;n++)t[n]=this.fromModelSelection(e[n]);return t},e.prototype.equals=function(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)},e}();t.CursorState=h;var p=function(){return function(e,t,n){this.type=e,this.commands=t,this.shouldPushStackElementBefore=n.shouldPushStackElementBefore,this.shouldPushStackElementAfter=n.shouldPushStackElementAfter}}();t.EditOperationResult=p;var f=function(){function e(){}return e.isLowSurrogate=function(e,t,n){var r=e.getLineContent(t);return!(n<0||n>=r.length)&&i.isLowSurrogate(r.charCodeAt(n))},e.isHighSurrogate=function(e,t,n){var r=e.getLineContent(t);return!(n<0||n>=r.length)&&i.isHighSurrogate(r.charCodeAt(n))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var r=e.length;r>t-1&&(r=t-1);for(var o=0,s=0;s<r;s++){var a=e.charCodeAt(s);9===a?o=this.nextTabStop(o,n):i.isFullWidthCharacter(a)?o+=2:o+=1}return o},
e.visibleColumnFromColumn2=function(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)},e.columnFromVisibleColumn=function(e,t,n){if(t<=0)return 1;for(var r=e.length,o=0,s=0;s<r;s++){var a=e.charCodeAt(s),c=void 0;if((c=9===a?this.nextTabStop(o,n):i.isFullWidthCharacter(a)?o+2:o+1)>=t){return c-t<t-o?s+2:s+1}o=c}return r+1},e.columnFromVisibleColumn2=function(e,t,n,i){var r=this.columnFromVisibleColumn(t.getLineContent(n),i,e.tabSize),o=t.getLineMinColumn(n);if(r<o)return o;var s=t.getLineMaxColumn(n);return r>s?s:r},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}();t.CursorColumns=f}),define(e[371],t([1,0,14,130,19,60,114]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,n){
var r=i.CursorColumns.visibleColumnFromColumn(e,t,n);return i.CursorColumns.prevTabStop(r,n)/n},e.shiftIndentCount=function(e,t,n){var r=i.CursorColumns.visibleColumnFromColumn(e,t,n);return i.CursorColumns.nextTabStop(r,n)/n},e.prototype._addEditOperation=function(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)},e.prototype.getEditOperations=function(t,o){var a=this._selection.startLineNumber,c=this._selection.endLineNumber;1===this._selection.endColumn&&a!==c&&(c-=1);var l=this._opts.tabSize,u=this._opts.oneIndent,d=a===c;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(a))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var h=["",u],p=0,f=0,g=a;g<=c;g++,p=f){f=0;var v=t.getLineContent(g),m=n.firstNonWhitespaceIndex(v);if((!this._opts.isUnshift||0!==v.length&&0!==m)&&(d||this._opts.isUnshift||0!==v.length)){if(-1===m&&(m=v.length),g>1){
if(i.CursorColumns.visibleColumnFromColumn(v,m+1,l)%l!=0&&t.isCheapToTokenize(g-1)){var y=s.LanguageConfigurationRegistry.getRawEnterActionAtPosition(t,g-1,t.getLineMaxColumn(g-1));if(y){if(f=p,y.appendText)for(var b=0,S=y.appendText.length;b<S&&f<l&&32===y.appendText.charCodeAt(b);b++)f++;y.removeText&&(f=Math.max(0,f-y.removeText));for(b=0;b<f&&(0!==m&&32===v.charCodeAt(m-1));b++)m--}}}if(!this._opts.isUnshift||0!==m){var _=void 0;_=this._opts.isUnshift?e.unshiftIndentCount(v,m+1,l):e.shiftIndentCount(v,m+1,l);for(b=h.length;b<=_;b++)h[b]=h[b-1]+u;this._addEditOperation(o,new r.Range(g,1,g,m+1),h[_]),g===a&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=m+1)}}}else for(g=a;g<=c;g++){var v=t.getLineContent(g),m=n.firstNonWhitespaceIndex(v);if((!this._opts.isUnshift||0!==v.length&&0!==m)&&((d||this._opts.isUnshift||0!==v.length)&&(-1===m&&(m=v.length),!this._opts.isUnshift||0!==m)))if(this._opts.isUnshift){m=Math.min(m,l);for(var C=0;C<m;C++){if(9===v.charCodeAt(C)){m=C+1;break}}
this._addEditOperation(o,new r.Range(g,1,g,m+1),"")}else this._addEditOperation(o,new r.Range(g,1,g,1),u),g===a&&(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}this._selectionId=o.trackSelection(this._selection)},e.prototype.computeCursorState=function(e,t){if(this._useLastEditRangeForCursorEndPosition){var n=t.getInverseEditOperations()[0];return new o.Selection(n.range.endLineNumber,n.range.endColumn,n.range.endLineNumber,n.range.endColumn)}var i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){var r=this._selection.startColumn;return i.startColumn<=r?i:i.getDirection()===o.SelectionDirection.LTR?new o.Selection(i.startLineNumber,r,i.endLineNumber,i.endColumn):new o.Selection(i.endLineNumber,i.endColumn,i.startLineNumber,r)}return i},e}();t.ShiftCommand=a}),define(e[819],t([1,0,39,19,130]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e._columnSelect=function(e,t,o,s,a,c){
for(var l=Math.abs(a-o)+1,u=o>a,d=s>c,h=s<c,p=[],f=0;f<l;f++){var g=o+(u?-f:f),v=r.CursorColumns.columnFromVisibleColumn2(e,t,g,s),m=r.CursorColumns.columnFromVisibleColumn2(e,t,g,c),y=r.CursorColumns.visibleColumnFromColumn2(e,t,new n.Position(g,v)),b=r.CursorColumns.visibleColumnFromColumn2(e,t,new n.Position(g,m));if(h){if(y>c)continue;if(b<s)continue}if(d){if(b>s)continue;if(y<c)continue}p.push(new r.SingleCursorState(new i.Range(g,v,g,v),0,new n.Position(g,m),0))}return{viewStates:p,reversed:u,toLineNumber:a,toVisualColumn:c}},e.columnSelect=function(t,i,o,s,a){var c=new n.Position(o.selectionStartLineNumber,o.selectionStartColumn),l=r.CursorColumns.visibleColumnFromColumn2(t,i,c);return e._columnSelect(t,i,c.lineNumber,l,s,a)},e.columnSelectLeft=function(e,t,n,i,r){return r>1&&r--,this.columnSelect(e,t,n.selection,i,r)},e.columnSelectRight=function(e,t,i,o,s){for(var a=0,c=Math.min(i.position.lineNumber,o),l=Math.max(i.position.lineNumber,o),u=c;u<=l;u++){
var d=t.getLineMaxColumn(u),h=r.CursorColumns.visibleColumnFromColumn2(e,t,new n.Position(u,d));a=Math.max(a,h)}return s<a&&s++,this.columnSelect(e,t,i.selection,o,s)},e.columnSelectUp=function(e,t,n,i,r,o){return(r-=i?e.pageSize:1)<1&&(r=1),this.columnSelect(e,t,n.selection,r,o)},e.columnSelectDown=function(e,t,n,i,r,o){return(r+=i?e.pageSize:1)>t.getLineCount()&&(r=t.getLineCount()),this.columnSelect(e,t,n.selection,r,o)},e}();t.ColumnSelection=o}),define(e[501],t([1,0,130,39,19]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}}();t.CursorPosition=o;var s=function(){function e(){}return e.left=function(e,t,i,r){return r>t.getLineMinColumn(i)?n.CursorColumns.isLowSurrogate(t,i,r-2)?r-=2:r-=1:i>1&&(i-=1,r=t.getLineMaxColumn(i)),new o(i,r,0)},e.moveLeft=function(t,n,i,r,o){var s,a;if(i.hasSelection()&&!r)s=i.selection.startLineNumber,a=i.selection.startColumn;else{
var c=e.left(t,n,i.position.lineNumber,i.position.column-(o-1));s=c.lineNumber,a=c.column}return i.move(r,s,a,0)},e.right=function(e,t,i,r){return r<t.getLineMaxColumn(i)?n.CursorColumns.isHighSurrogate(t,i,r-1)?r+=2:r+=1:i<t.getLineCount()&&(i+=1,r=t.getLineMinColumn(i)),new o(i,r,0)},e.moveRight=function(t,n,i,r,o){var s,a;if(i.hasSelection()&&!r)s=i.selection.endLineNumber,a=i.selection.endColumn;else{var c=e.right(t,n,i.position.lineNumber,i.position.column+(o-1));s=c.lineNumber,a=c.column}return i.move(r,s,a,0)},e.down=function(e,t,i,r,s,a,c){var l=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),r,e.tabSize)+s;i+=a;var u=t.getLineCount();return i>u?(i=u,c?r=t.getLineMaxColumn(i):(r=Math.min(t.getLineMaxColumn(i),r),n.CursorColumns.isInsideSurrogatePair(t,i,r)&&(r-=1))):(r=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,r)&&(r-=1)),s=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),r,e.tabSize),new o(i,r,s)},
e.moveDown=function(t,n,i,r,o){var s,a;i.hasSelection()&&!r?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var c=e.down(t,n,s,a,i.leftoverVisibleColumns,o,!0);return i.move(r,c.lineNumber,c.column,c.leftoverVisibleColumns)},e.translateDown=function(t,o,s){var a=s.selection,c=e.down(t,o,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),l=e.down(t,o,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.SingleCursorState(new r.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new i.Position(l.lineNumber,l.column),l.leftoverVisibleColumns)},e.up=function(e,t,i,r,s,a,c){var l=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),r,e.tabSize)+s;return(i-=a)<1?(i=1,c?r=t.getLineMinColumn(i):(r=Math.min(t.getLineMaxColumn(i),r),n.CursorColumns.isInsideSurrogatePair(t,i,r)&&(r-=1))):(r=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),
n.CursorColumns.isInsideSurrogatePair(t,i,r)&&(r-=1)),s=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),r,e.tabSize),new o(i,r,s)},e.moveUp=function(t,n,i,r,o){var s,a;i.hasSelection()&&!r?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var c=e.up(t,n,s,a,i.leftoverVisibleColumns,o,!0);return i.move(r,c.lineNumber,c.column,c.leftoverVisibleColumns)},e.translateUp=function(t,o,s){var a=s.selection,c=e.up(t,o,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),l=e.up(t,o,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.SingleCursorState(new r.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new i.Position(l.lineNumber,l.column),l.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var r,o=n.position.lineNumber,s=t.getLineMinColumn(o),a=t.getLineFirstNonWhitespaceColumn(o)||s;return r=n.position.column===a?s:a,n.move(i,o,r,0)},
e.moveToEndOfLine=function(e,t,n,i){var r=n.position.lineNumber,o=t.getLineMaxColumn(r);return n.move(i,r,o,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var r=t.getLineCount(),o=t.getLineMaxColumn(r);return n.move(i,r,o,0)},e}();t.MoveOperations=s}),define(e[503],t([1,0,214,130,19,501,14]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){}return e.deleteRight=function(e,t,i,s){for(var a=[],c=3!==e,l=0,u=s.length;l<u;l++){var d=s[l],h=d;if(h.isEmpty()){var p=d.getPosition(),f=o.MoveOperations.right(t,i,p.lineNumber,p.column);h=new r.Range(f.lineNumber,f.column,p.lineNumber,p.column)}h.isEmpty()?a[l]=null:(h.startLineNumber!==h.endLineNumber&&(c=!0),a[l]=new n.ReplaceCommand(h,""))}return[c,a]},e._isAutoClosingPairDelete=function(e,t,n){if(!e.autoClosingBrackets)return!1;for(var i=0,r=n.length;i<r;i++){var o=n[i],s=o.getPosition();if(!o.isEmpty())return!1
;var a=t.getLineContent(s.lineNumber),c=a[s.column-2];if(!e.autoClosingPairsOpen.hasOwnProperty(c))return!1;if(a[s.column-1]!==e.autoClosingPairsOpen[c])return!1}return!0},e._runAutoClosingPairDelete=function(e,t,i){for(var o=[],s=0,a=i.length;s<a;s++){var c=i[s].getPosition(),l=new r.Range(c.lineNumber,c.column-1,c.lineNumber,c.column+1);o[s]=new n.ReplaceCommand(l,"")}return[!0,o]},e.deleteLeft=function(e,t,a,c){if(this._isAutoClosingPairDelete(t,a,c))return this._runAutoClosingPairDelete(t,a,c);for(var l=[],u=2!==e,d=0,h=c.length;d<h;d++){var p=c[d],f=p;if(f.isEmpty()){var g=p.getPosition();if(t.useTabStops&&g.column>1){var v=a.getLineContent(g.lineNumber),m=s.firstNonWhitespaceIndex(v),y=-1===m?v.length+1:m+1;if(g.column<=y){var b=i.CursorColumns.visibleColumnFromColumn2(t,a,g),S=i.CursorColumns.prevTabStop(b,t.tabSize),_=i.CursorColumns.columnFromVisibleColumn2(t,a,g.lineNumber,S);f=new r.Range(g.lineNumber,_,g.lineNumber,g.column)}else f=new r.Range(g.lineNumber,g.column-1,g.lineNumber,g.column)}else{
var C=o.MoveOperations.left(t,a,g.lineNumber,g.column);f=new r.Range(C.lineNumber,C.column,g.lineNumber,g.column)}}f.isEmpty()?l[d]=null:(f.startLineNumber!==f.endLineNumber&&(u=!0),l[d]=new n.ReplaceCommand(f,""))}return[u,l]},e.cut=function(e,t,o){for(var s=[],a=0,c=o.length;a<c;a++){var l=o[a];if(l.isEmpty())if(e.emptySelectionClipboard){var u=l.getPosition(),d=void 0,h=void 0,p=void 0,f=void 0;u.lineNumber<t.getLineCount()?(d=u.lineNumber,h=1,p=u.lineNumber+1,f=1):u.lineNumber>1?(d=u.lineNumber-1,h=t.getLineMaxColumn(u.lineNumber-1),p=u.lineNumber,f=t.getLineMaxColumn(u.lineNumber)):(d=u.lineNumber,h=1,p=u.lineNumber,f=t.getLineMaxColumn(u.lineNumber));var g=new r.Range(d,h,p,f);g.isEmpty()?s[a]=null:s[a]=new n.ReplaceCommand(g,"")}else s[a]=null;else s[a]=new n.ReplaceCommand(l,"")}return new i.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}();t.DeleteOperations=a}),define(e[360],t([1,0,9,214,130,19,14,371,114,208,971,239]),function(e,t,n,i,r,o,s,a,c,l,u,d){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(){}return e.indent=function(e,t,n){for(var i=[],r=0,o=n.length;r<o;r++)i[r]=new a.ShiftCommand(n[r],{isUnshift:!1,tabSize:e.tabSize,oneIndent:e.oneIndent,useTabStops:e.useTabStops});return i},e.outdent=function(e,t,n){for(var i=[],r=0,o=n.length;r<o;r++)i[r]=new a.ShiftCommand(n[r],{isUnshift:!0,tabSize:e.tabSize,oneIndent:e.oneIndent,useTabStops:e.useTabStops});return i},e.shiftIndent=function(e,t,n){n=n||1;for(var i=a.ShiftCommand.shiftIndentCount(t,t.length+n,e.tabSize),r="",o=0;o<i;o++)r+="\t";return r},e.unshiftIndent=function(e,t,n){n=n||1;for(var i=a.ShiftCommand.unshiftIndentCount(t,t.length+n,e.tabSize),r="",o=0;o<i;o++)r+="\t";return r},e._distributedPaste=function(e,t,n,o){for(var s=[],a=0,c=n.length;a<c;a++)s[a]=new i.ReplaceCommand(n[a],o[a]);return new r.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._simplePaste=function(e,t,n,s,a){
for(var c=[],l=0,u=n.length;l<u;l++){var d=n[l],h=d.getPosition();if(a&&s.indexOf("\n")!==s.length-1&&(a=!1),a&&d.startLineNumber!==d.endLineNumber&&(a=!1),a&&d.startColumn===t.getLineMinColumn(d.startLineNumber)&&d.endColumn===t.getLineMaxColumn(d.startLineNumber)&&(a=!1),a){var p=new o.Range(h.lineNumber,1,h.lineNumber,1);c[l]=new i.ReplaceCommand(p,s)}else c[l]=new i.ReplaceCommand(d,s)}return new r.EditOperationResult(0,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._distributePasteToCursors=function(e,t,n,i){if(n)return null;if(1===e.length)return null;if(i&&i.length===e.length)return i;10===t.charCodeAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.split(/\r\n|\r|\n/);return r.length===e.length?r:null},e.paste=function(e,t,n,i,r,s){var a=this._distributePasteToCursors(n,i,r,s);return a?(n=n.sort(o.Range.compareRangesUsingStarts),this._distributedPaste(e,t,n,a)):this._simplePaste(e,t,n,i,r)},e._goodIndentForLine=function(t,n,i){
var r,a,u=t.autoIndent?c.LanguageConfigurationRegistry.getInheritIndentForLine(n,i,!1):null;if(u)r=u.action,a=u.indentation;else if(i>1){var d=i-1;for(d=i-1;d>=1;d--){var h=n.getLineContent(d);if(s.lastNonWhitespaceIndex(h)>=0)break}if(d<1)return null;var p=n.getLineMaxColumn(d),f=c.LanguageConfigurationRegistry.getEnterAction(n,new o.Range(d,p,d,p));f&&(a=f.indentation,(r=f.enterAction)&&(a+=r.appendText))}return r&&(r===l.IndentAction.Indent&&(a=e.shiftIndent(t,a)),r===l.IndentAction.Outdent&&(a=e.unshiftIndent(t,a)),a=t.normalizeIndentation(a)),a||null},e._replaceJumpToNextIndent=function(e,t,n,o){var s="",a=n.getStartPosition();if(e.insertSpaces)for(var c=r.CursorColumns.visibleColumnFromColumn2(e,t,a),l=e.tabSize,u=l-c%l,d=0;d<u;d++)s+=" ";else s="\t";return new i.ReplaceCommand(n,s,o)},e.tab=function(e,t,n){for(var r=[],c=0,l=n.length;c<l;c++){var u=n[c];if(u.isEmpty()){var d=t.getLineContent(u.startLineNumber);if(/^\s*$/.test(d)&&t.isCheapToTokenize(u.startLineNumber)){
var h=this._goodIndentForLine(e,t,u.startLineNumber);h=h||"\t";var p=e.normalizeIndentation(h);if(!s.startsWith(d,p)){r[c]=new i.ReplaceCommand(new o.Range(u.startLineNumber,1,u.startLineNumber,d.length+1),p,!0);continue}}r[c]=this._replaceJumpToNextIndent(e,t,u,!0)}else{if(u.startLineNumber===u.endLineNumber){var f=t.getLineMaxColumn(u.startLineNumber);if(1!==u.startColumn||u.endColumn!==f){r[c]=this._replaceJumpToNextIndent(e,t,u,!1);continue}}r[c]=new a.ShiftCommand(u,{isUnshift:!1,tabSize:e.tabSize,oneIndent:e.oneIndent,useTabStops:e.useTabStops})}}return r},e.replacePreviousChar=function(e,t,n,s,a,c){for(var l=[],u=0,d=s.length;u<d;u++){var h=s[u];if(h.isEmpty()){var p=h.getPosition(),f=Math.max(1,p.column-c),g=new o.Range(p.lineNumber,f,p.lineNumber,p.column);l[u]=new i.ReplaceCommand(g,a)}else l[u]=null}return new r.EditOperationResult(1,l,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})},e._typeCommand=function(e,t,n){
return n?new i.ReplaceCommandWithoutChangingPosition(e,t,!0):new i.ReplaceCommand(e,t,!0)},e._enter=function(t,n,a,u){if(!n.isCheapToTokenize(u.getStartPosition().lineNumber)){var d=n.getLineContent(u.startLineNumber),h=s.getLeadingWhitespace(d).substring(0,u.startColumn-1);return e._typeCommand(u,"\n"+t.normalizeIndentation(h),a)}var p=c.LanguageConfigurationRegistry.getEnterAction(n,u);if(p){var f=p.enterAction,g=p.indentation;if(f.indentAction===l.IndentAction.None)return e._typeCommand(u,"\n"+t.normalizeIndentation(g+f.appendText),a);if(f.indentAction===l.IndentAction.Indent)return e._typeCommand(u,"\n"+t.normalizeIndentation(g+f.appendText),a);if(f.indentAction===l.IndentAction.IndentOutdent){var v=t.normalizeIndentation(g),m=t.normalizeIndentation(g+f.appendText),y="\n"+m+"\n"+v;return a?new i.ReplaceCommandWithoutChangingPosition(u,y,!0):new i.ReplaceCommandWithOffsetCursorState(u,y,-1,m.length-v.length,!0)}if(f.indentAction===l.IndentAction.Outdent){var b=e.unshiftIndent(t,g)
;return e._typeCommand(u,"\n"+t.normalizeIndentation(b+f.appendText),a)}}if(!t.autoIndent){var S=n.getLineContent(u.startLineNumber),_=s.getLeadingWhitespace(S).substring(0,u.startColumn-1);return e._typeCommand(u,"\n"+t.normalizeIndentation(_),a)}var C=c.LanguageConfigurationRegistry.getIndentForEnter(n,u,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}},t.autoIndent),E=n.getLineContent(u.startLineNumber),w=s.getLeadingWhitespace(E).substring(0,u.startColumn-1);if(C){var I=r.CursorColumns.visibleColumnFromColumn2(t,n,u.getEndPosition()),T=u.endColumn,x="\n";w!==t.normalizeIndentation(C.beforeEnter)&&(x=t.normalizeIndentation(C.beforeEnter)+E.substring(w.length,u.startColumn-1)+"\n",u=new o.Range(u.startLineNumber,1,u.endLineNumber,u.endColumn));var k=n.getLineContent(u.endLineNumber),D=s.firstNonWhitespaceIndex(k)
;if(u=D>=0?u.setEndPosition(u.endLineNumber,Math.max(u.endColumn,D+1)):u.setEndPosition(u.endLineNumber,n.getLineMaxColumn(u.endLineNumber)),a)return new i.ReplaceCommandWithoutChangingPosition(u,x+t.normalizeIndentation(C.afterEnter),!0);var A=0;return T<=D+1&&(t.insertSpaces||(I=Math.ceil(I/t.tabSize)),A=Math.min(I+1-t.normalizeIndentation(C.afterEnter).length-1,0)),new i.ReplaceCommandWithOffsetCursorState(u,x+t.normalizeIndentation(C.afterEnter),0,A,!0)}return e._typeCommand(u,"\n"+t.normalizeIndentation(w),a)},e._isAutoIndentType=function(e,t,n){if(!e.autoIndent)return!1;for(var i=0,r=n.length;i<r;i++)if(!t.isCheapToTokenize(n[i].getEndPosition().lineNumber))return!1;return!0},e._runAutoIndentType=function(t,n,i,r){var s=c.LanguageConfigurationRegistry.getIndentationAtPosition(n,i.startLineNumber,i.startColumn),a=c.LanguageConfigurationRegistry.getIndentActionForType(n,i,r,{shiftIndent:function(n){return e.shiftIndent(t,n)},unshiftIndent:function(n){return e.unshiftIndent(t,n)}});if(null===a)return null
;if(a!==t.normalizeIndentation(s)){var l=n.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===l?e._typeCommand(new o.Range(i.startLineNumber,0,i.endLineNumber,i.endColumn),t.normalizeIndentation(a)+r,!1):e._typeCommand(new o.Range(i.startLineNumber,0,i.endLineNumber,i.endColumn),t.normalizeIndentation(a)+n.getLineContent(i.startLineNumber).substring(l-1,i.startColumn-1)+r,!1)}return null},e._isAutoClosingCloseCharType=function(e,t,n,i){if(!e.autoClosingBrackets||!e.autoClosingPairsClose.hasOwnProperty(i))return!1;for(var r=i===e.autoClosingPairsClose[i],o=0,s=n.length;o<s;o++){var a=n[o];if(!a.isEmpty())return!1;var c=a.getPosition(),l=t.getLineContent(c.lineNumber);if(l.charAt(c.column-1)!==i)return!1;if(r){var u=l.substr(0,c.column-1);if(this._countNeedlesInHaystack(u,i)%2==0)return!1}}return!0},e._countNeedlesInHaystack=function(e,t){for(var n=0,i=-1;-1!==(i=e.indexOf(t,i+1));)n++;return n},e._runAutoClosingCloseCharType=function(e,t,n,s,a){for(var c=[],l=0,u=s.length;l<u;l++){
var d=s[l].getPosition(),h=new o.Range(d.lineNumber,d.column,d.lineNumber,d.column+1);c[l]=new i.ReplaceCommand(h,a)}return new r.EditOperationResult(1,c,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})},e._isBeforeClosingBrace=function(e,t,n){var i=e.autoClosingPairsOpen[t]===t,r=!1;for(var o in e.autoClosingPairsClose){var s=e.autoClosingPairsOpen[o]===o;if((i||!s)&&n===o){r=!0;break}}return r},e._isAutoClosingOpenCharType=function(t,i,r,o){if(!t.autoClosingBrackets||!t.autoClosingPairsOpen.hasOwnProperty(o))return!1;for(var s=0,a=r.length;s<a;s++){var l=r[s];if(!l.isEmpty())return!1;var u=l.getPosition(),h=i.getLineContent(u.lineNumber);if(("'"===o||'"'===o)&&u.column>1){var p=d.getMapForWordSeparators(t.wordSeparators),f=h.charCodeAt(u.column-2);if(0===p.get(f))return!1}var g=h.charAt(u.column-1);if(g){if(!e._isBeforeClosingBrace(t,o,g)&&!/\s/.test(g))return!1}if(!i.isCheapToTokenize(u.lineNumber))return!1;i.forceTokenization(u.lineNumber);var v=i.getLineTokens(u.lineNumber),m=!1;try{
m=c.LanguageConfigurationRegistry.shouldAutoClosePair(o,v,u.column)}catch(e){n.onUnexpectedError(e)}if(!m)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,n,o,s){for(var a=[],c=0,l=o.length;c<l;c++){var u=o[c],d=t.autoClosingPairsOpen[s];a[c]=new i.ReplaceCommandWithOffsetCursorState(u,s+d,0,-d.length)}return new r.EditOperationResult(1,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e._isSurroundSelectionType=function(e,t,n,i){if(!e.autoClosingBrackets||!e.surroundingPairs.hasOwnProperty(i))return!1;for(var r="'"===i||'"'===i,o=0,s=n.length;o<s;o++){var a=n[o];if(a.isEmpty())return!1;for(var c=!0,l=a.startLineNumber;l<=a.endLineNumber;l++){var u=t.getLineContent(l),d=l===a.startLineNumber?a.startColumn-1:0,h=l===a.endLineNumber?a.endColumn-1:u.length,p=u.substring(d,h);if(/[^ \t]/.test(p)){c=!1;break}}if(c)return!1;if(r&&a.startLineNumber===a.endLineNumber&&a.startColumn+1===a.endColumn){var f=t.getValueInRange(a);if("'"===f||'"'===f)return!1}}return!0},
e._runSurroundSelectionType=function(e,t,n,i,o){for(var s=[],a=0,c=i.length;a<c;a++){var l=i[a],d=t.surroundingPairs[o];s[a]=new u.SurroundSelectionCommand(l,o,d)}return new r.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._isTypeInterceptorElectricChar=function(e,t,n){return!(1!==n.length||!t.isCheapToTokenize(n[0].getEndPosition().lineNumber))},e._typeInterceptorElectricChar=function(e,t,a,l,u){if(!t.electricChars.hasOwnProperty(u)||!l.isEmpty())return null;var d=l.getPosition();a.forceTokenization(d.lineNumber);var h,p=a.getLineTokens(d.lineNumber);try{h=c.LanguageConfigurationRegistry.onElectricCharacter(u,p,d.column)}catch(e){n.onUnexpectedError(e)}if(!h)return null;if(h.appendText){E=new i.ReplaceCommandWithOffsetCursorState(l,u+h.appendText,0,-h.appendText.length);return new r.EditOperationResult(1,[E],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}if(h.matchOpenBracket){
var f=(p.getLineContent()+u).lastIndexOf(h.matchOpenBracket)+1,g=a.findMatchingBracketUp(h.matchOpenBracket,{lineNumber:d.lineNumber,column:f});if(g){if(g.startLineNumber===d.lineNumber)return null;var v=a.getLineContent(g.startLineNumber),m=s.getLeadingWhitespace(v),y=t.normalizeIndentation(m),b=a.getLineContent(d.lineNumber),S=a.getLineFirstNonWhitespaceColumn(d.lineNumber)||d.column,_=y+b.substring(S-1,d.column-1)+u,C=new o.Range(d.lineNumber,1,d.lineNumber,d.column),E=new i.ReplaceCommand(C,_);return new r.EditOperationResult(1,[E],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null},e.compositionEndWithInterceptors=function(t,o,s,a){if(!o.autoClosingBrackets)return null;for(var l=[],u=0;u<a.length;u++)if(a[u].isEmpty()){var h=a[u].getPosition(),p=s.getLineContent(h.lineNumber),f=p.charAt(h.column-2);if(o.autoClosingPairsClose.hasOwnProperty(f)&&f===o.autoClosingPairsClose[f]){var g=p.substr(0,h.column-2);if(this._countNeedlesInHaystack(g,f)%2==1)continue}
if(o.autoClosingPairsOpen.hasOwnProperty(f)){if(("'"===f||'"'===f)&&h.column>2){var v=d.getMapForWordSeparators(o.wordSeparators),m=p.charCodeAt(h.column-3);if(0===v.get(m))continue}var y=p.charAt(h.column-1);if(y){if(!e._isBeforeClosingBrace(o,f,y)&&!/\s/.test(y))continue}if(!s.isCheapToTokenize(h.lineNumber))continue;s.forceTokenization(h.lineNumber);var b=s.getLineTokens(h.lineNumber),S=!1;try{S=c.LanguageConfigurationRegistry.shouldAutoClosePair(f,b,h.column-1)}catch(e){n.onUnexpectedError(e)}if(S){var _=o.autoClosingPairsOpen[f];l[u]=new i.ReplaceCommandWithOffsetCursorState(a[u],_,0,-_.length)}}}return new r.EditOperationResult(1,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,n,o,s,a){if("\n"===a){for(var c=[],l=0,u=s.length;l<u;l++)c[l]=e._enter(n,o,!1,s[l]);return new r.EditOperationResult(1,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoIndentType(n,o,s)){
for(var d=[],h=!1,l=0,u=s.length;l<u;l++)if(d[l]=this._runAutoIndentType(n,o,s[l],a),!d[l]){h=!0;break}if(!h)return new r.EditOperationResult(1,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingCloseCharType(n,o,s,a))return this._runAutoClosingCloseCharType(t,n,o,s,a);if(this._isAutoClosingOpenCharType(n,o,s,a))return this._runAutoClosingOpenCharType(t,n,o,s,a);if(this._isSurroundSelectionType(n,o,s,a))return this._runSurroundSelectionType(t,n,o,s,a);if(this._isTypeInterceptorElectricChar(n,o,s)){var p=this._typeInterceptorElectricChar(t,n,o,s[0],a);if(p)return p}for(var f=[],l=0,u=s.length;l<u;l++)f[l]=new i.ReplaceCommand(s[l],a);var g=1!==t;return" "===a&&(g=!0),new r.EditOperationResult(1,f,{shouldPushStackElementBefore:g,shouldPushStackElementAfter:!1})},e.typeWithoutInterceptors=function(e,t,n,o,s){for(var a=[],c=0,l=o.length;c<l;c++)a[c]=new i.ReplaceCommand(o[c],s);return new r.EditOperationResult(1,a,{shouldPushStackElementBefore:1!==e,
shouldPushStackElementAfter:!1})},e.lineInsertBefore=function(e,t,n){for(var r=[],s=0,a=n.length;s<a;s++){var c=n[s].positionLineNumber;if(1===c)r[s]=new i.ReplaceCommandWithoutChangingPosition(new o.Range(1,1,1,1),"\n");else{c--;var l=t.getLineMaxColumn(c);r[s]=this._enter(e,t,!1,new o.Range(c,l,c,l))}}return r},e.lineInsertAfter=function(e,t,n){for(var i=[],r=0,s=n.length;r<s;r++){var a=n[r].positionLineNumber,c=t.getLineMaxColumn(a);i[r]=this._enter(e,t,!1,new o.Range(a,c,a,c))}return i},e.lineBreakInsert=function(e,t,n){for(var i=[],r=0,o=n.length;r<o;r++)i[r]=this._enter(e,t,!0,n[r]);return i},e}();t.TypeOperations=h}),define(e[355],t([1,0,130,39,239,14,19]),function(e,t,i,r,o,s,a){"use strict";function c(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var i=e.charCodeAt(n);if(32===i||9===i||s.isUpperAsciiLetter(i)||95===i)return n-1}return-1}function l(e,t){void 0===t&&(t=e.length-1);for(var n=32===e.charCodeAt(t-1),i=t;i<e.length;++i){var r=e.charCodeAt(i)
;if(32===r||9===r||s.isUpperAsciiLetter(r)||n&&s.isLowerAsciiLetter(r))return i+1;if(95===r)return i+2}return e.length+1}Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.None=0]="None",e[e.Regular=1]="Regular",e[e.Separator=2]="Separator"}(u||(u={}));!function(e){e[e.WordStart=0]="WordStart",e[e.WordEnd=1]="WordEnd"}(t.WordNavigationType||(t.WordNavigationType={}));var d=function(){function e(){}return e._createWord=function(e,t,n,i,r){return{start:i,end:r,wordType:t,nextCharClass:n}},e._findPreviousWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)},e._doFindPreviousWordOnLine=function(e,t,n){for(var i=0,r=n.column-2;r>=0;r--){var o=e.charCodeAt(r),s=t.get(o);if(0===s){if(2===i)return this._createWord(e,i,s,r+1,this._findEndOfWord(e,t,i,r+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,s,r+1,this._findEndOfWord(e,t,i,r+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,s,r+1,this._findEndOfWord(e,t,i,r+1))}
return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var r=e.length,o=i;o<r;o++){var s=e.charCodeAt(o),a=t.get(s);if(1===a)return o;if(1===n&&2===a)return o;if(2===n&&0===a)return o}return r},e._findNextWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindNextWordOnLine(i,e,n)},e._doFindNextWordOnLine=function(e,t,n){for(var i=0,r=e.length,o=n.column-1;o<r;o++){var s=e.charCodeAt(o),a=t.get(s);if(0===a){if(2===i)return this._createWord(e,i,a,this._findStartOfWord(e,t,i,o-1),o);i=1}else if(2===a){if(1===i)return this._createWord(e,i,a,this._findStartOfWord(e,t,i,o-1),o);i=2}else if(1===a&&0!==i)return this._createWord(e,i,a,this._findStartOfWord(e,t,i,o-1),o)}return 0!==i?this._createWord(e,i,1,this._findStartOfWord(e,t,i,r-1),r):null},e._findStartOfWord=function(e,t,n,i){for(var r=i;r>=0;r--){var o=e.charCodeAt(r),s=t.get(o);if(1===s)return r+1;if(1===n&&2===s)return r+1;if(2===n&&0===s)return r+1}return 0},
e.moveWordLeft=function(t,n,i,o){var s=i.lineNumber,a=i.column;1===a&&s>1&&(s-=1,a=n.getLineMaxColumn(s));var c=e._findPreviousWordOnLine(t,n,new r.Position(s,a));return 0===o?(c&&2===c.wordType&&c.end-c.start==1&&0===c.nextCharClass&&(c=e._findPreviousWordOnLine(t,n,new r.Position(s,c.start+1))),a=c?c.start+1:1):(c&&a<=c.end+1&&(c=e._findPreviousWordOnLine(t,n,new r.Position(s,c.start+1))),a=c?c.end+1:1),new r.Position(s,a)},e.moveWordRight=function(t,n,i,o){var s=i.lineNumber,a=i.column;a===n.getLineMaxColumn(s)&&s<n.getLineCount()&&(s+=1,a=1);var c=e._findNextWordOnLine(t,n,new r.Position(s,a));return 1===o?(c&&2===c.wordType&&c.end-c.start==1&&0===c.nextCharClass&&(c=e._findNextWordOnLine(t,n,new r.Position(s,c.end+1))),a=c?c.end+1:n.getLineMaxColumn(s)):(c&&a>=c.start+1&&(c=e._findNextWordOnLine(t,n,new r.Position(s,c.end+1))),a=c?c.start+1:n.getLineMaxColumn(s)),new r.Position(s,a)},e._deleteWordLeftWhitespace=function(e,t){
var n=e.getLineContent(t.lineNumber),i=t.column-2,r=s.lastNonWhitespaceIndex(n,i);return r+1<i?new a.Range(t.lineNumber,r+2,t.lineNumber,t.column):null},e.deleteWordLeft=function(t,n,i,o,s){if(!i.isEmpty())return i;var c=new r.Position(i.positionLineNumber,i.positionColumn),l=c.lineNumber,u=c.column;if(1===l&&1===u)return null;if(o){var d=this._deleteWordLeftWhitespace(n,c);if(d)return d}var h=e._findPreviousWordOnLine(t,n,c);return 0===s?h?u=h.start+1:u>1?u=1:(l--,u=n.getLineMaxColumn(l)):(h&&u<=h.end+1&&(h=e._findPreviousWordOnLine(t,n,new r.Position(l,h.start+1))),h?u=h.end+1:u>1?u=1:(l--,u=n.getLineMaxColumn(l))),new a.Range(l,u,c.lineNumber,c.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i<n;i++){var r=e.charAt(i);if(" "!==r&&"\t"!==r)return i}return n},e._deleteWordRightWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-1,r=this._findFirstNonWhitespaceChar(n,i);return i+1<r?new a.Range(t.lineNumber,t.column,t.lineNumber,r+1):null},
e.deleteWordRight=function(t,n,i,o,s){if(!i.isEmpty())return i;var c=new r.Position(i.positionLineNumber,i.positionColumn),l=c.lineNumber,u=c.column,d=n.getLineCount(),h=n.getLineMaxColumn(l);if(l===d&&u===h)return null;if(o){var p=this._deleteWordRightWhitespace(n,c);if(p)return p}var f=e._findNextWordOnLine(t,n,c);return 1===s?f?u=f.end+1:u<h||l===d?u=h:(l++,u=(f=e._findNextWordOnLine(t,n,new r.Position(l,1)))?f.start+1:n.getLineMaxColumn(l)):(f&&u>=f.start+1&&(f=e._findNextWordOnLine(t,n,new r.Position(l,f.end+1))),f?u=f.start+1:u<h||l===d?u=h:(l++,u=(f=e._findNextWordOnLine(t,n,new r.Position(l,1)))?f.start+1:n.getLineMaxColumn(l))),new a.Range(l,u,c.lineNumber,c.column)},e.word=function(t,n,s,c,l){var u=o.getMapForWordSeparators(t.wordSeparators),d=e._findPreviousWordOnLine(u,n,l),h=e._findNextWordOnLine(u,n,l);if(!c){var p,f,g=d&&1===d.wordType&&d.start<=l.column-1&&l.column-1<=d.end,v=h&&1===h.wordType&&h.start<=l.column-1&&l.column-1<=h.end;return g?(p=d.start+1,f=d.end+1):v?(p=h.start+1,
f=h.end+1):(p=d?d.end+1:1,f=h?h.start+1:n.getLineMaxColumn(l.lineNumber)),new i.SingleCursorState(new a.Range(l.lineNumber,p,l.lineNumber,f),0,new r.Position(l.lineNumber,f),0)}var m,y,b=d&&1===d.wordType&&d.start<l.column-1&&l.column-1<d.end,S=h&&1===h.wordType&&h.start<l.column-1&&l.column-1<h.end;b?(m=d.start+1,y=d.end+1):S?(m=h.start+1,y=h.end+1):(m=l.column,y=l.column);var _,C=l.lineNumber;if(s.selectionStart.containsPosition(l))_=s.selectionStart.endColumn;else if(l.isBeforeOrEqual(s.selectionStart.getStartPosition())){_=m;E=new r.Position(C,_);s.selectionStart.containsPosition(E)&&(_=s.selectionStart.endColumn)}else{_=y;var E=new r.Position(C,_);s.selectionStart.containsPosition(E)&&(_=s.selectionStart.startColumn)}return s.move(!0,C,_,0)},e}();t.WordOperations=d,t._lastWordPartEnd=c,t._nextWordPartBegin=l;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.deleteWordPartLeft=function(e,t,n,i,o){if(!n.isEmpty())return n
;var s=new r.Position(n.positionLineNumber,n.positionColumn),l=s.lineNumber,u=s.column;if(1===l&&1===u)return null;if(i){var h=d._deleteWordLeftWhitespace(t,s);if(h)return h}var p=d.deleteWordLeft(e,t,n,i,o),f=c(t.getLineContent(s.lineNumber),s.column-2),g=new a.Range(l,u,l,f+2);return g.getStartPosition().isBeforeOrEqual(p.getStartPosition())?p:g},t.deleteWordPartRight=function(e,t,n,i,o){if(!n.isEmpty())return n;var s=new r.Position(n.positionLineNumber,n.positionColumn),c=s.lineNumber,u=s.column,h=t.getLineCount(),p=t.getLineMaxColumn(c);if(c===h&&u===p)return null;if(i){var f=d._deleteWordRightWhitespace(t,s);if(f)return f}var g=d.deleteWordRight(e,t,n,i,o),v=l(t.getLineContent(s.lineNumber),s.column),m=new a.Range(c,u,c,v);return g.getEndPosition().isBeforeOrEqual(m.getEndPosition())?g:m},t.moveWordPartLeft=function(e,t,n,i){var o=n.lineNumber,s=n.column;if(1===s)return o>1?new r.Position(o-1,t.getLineMaxColumn(o-1)):n;var a=d.moveWordLeft(e,t,n,i),l=c(t.getLineContent(o),s-2),u=new r.Position(o,l+2)
;return u.isBeforeOrEqual(a)?a:u},t.moveWordPartRight=function(e,t,n,i){var o=n.lineNumber,s=n.column;if(s===t.getLineMaxColumn(o))return o<t.getLineCount()?new r.Position(o+1,1):n;var a=d.moveWordRight(e,t,n,i),c=l(t.getLineContent(o),s),u=new r.Position(o,c);return a.isBeforeOrEqual(u)?a:u},t}(d);t.WordPartOperations=h}),define(e[524],t([1,0,130,39,19,501,355,30]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(){}return e.addCursorDown=function(e,t,i){for(var r=[],s=0,a=0,c=t.length;a<c;a++){var l=t[a];r[s++]=new n.CursorState(l.modelState,l.viewState),r[s++]=i?n.CursorState.fromModelState(o.MoveOperations.translateDown(e.config,e.model,l.modelState)):n.CursorState.fromViewState(o.MoveOperations.translateDown(e.config,e.viewModel,l.viewState))}return r},e.addCursorUp=function(e,t,i){for(var r=[],s=0,a=0,c=t.length;a<c;a++){var l=t[a];r[s++]=new n.CursorState(l.modelState,l.viewState),
r[s++]=i?n.CursorState.fromModelState(o.MoveOperations.translateUp(e.config,e.model,l.modelState)):n.CursorState.fromViewState(o.MoveOperations.translateUp(e.config,e.viewModel,l.viewState))}return r},e.moveToBeginningOfLine=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r];i[r]=this._moveToLineStart(e,s,n)}return i},e._moveToLineStart=function(e,t,n){var i=t.viewState.position.column,r=i===t.modelState.position.column,o=t.viewState.position.lineNumber,s=e.viewModel.getLineFirstNonWhitespaceColumn(o);return r||i===s?this._moveToLineStartByModel(e,t,n):this._moveToLineStartByView(e,t,n)},e._moveToLineStartByView=function(e,t,i){return n.CursorState.fromViewState(o.MoveOperations.moveToBeginningOfLine(e.config,e.viewModel,t.viewState,i))},e._moveToLineStartByModel=function(e,t,i){return n.CursorState.fromModelState(o.MoveOperations.moveToBeginningOfLine(e.config,e.model,t.modelState,i))},e.moveToEndOfLine=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r]
;i[r]=this._moveToLineEnd(e,s,n)}return i},e._moveToLineEnd=function(e,t,n){var i=t.viewState.position,r=e.viewModel.getLineMaxColumn(i.lineNumber),o=i.column===r,s=t.modelState.position,a=e.model.getLineMaxColumn(s.lineNumber),c=r-i.column==a-s.column;return o||c?this._moveToLineEndByModel(e,t,n):this._moveToLineEndByView(e,t,n)},e._moveToLineEndByView=function(e,t,i){return n.CursorState.fromViewState(o.MoveOperations.moveToEndOfLine(e.config,e.viewModel,t.viewState,i))},e._moveToLineEndByModel=function(e,t,i){return n.CursorState.fromModelState(o.MoveOperations.moveToEndOfLine(e.config,e.model,t.modelState,i))},e.expandLineSelection=function(e,t){for(var o=[],s=0,a=t.length;s<a;s++){var c=t[s].viewState.selection,l=c.startLineNumber,u=e.viewModel.getLineCount(),d=c.endLineNumber,h=void 0;d===u?h=e.viewModel.getLineMaxColumn(u):(d++,h=1),o[s]=n.CursorState.fromViewState(new n.SingleCursorState(new r.Range(l,1,l,1),0,new i.Position(d,h),0))}return o},e.moveToBeginningOfBuffer=function(e,t,i){
for(var r=[],s=0,a=t.length;s<a;s++){var c=t[s];r[s]=n.CursorState.fromModelState(o.MoveOperations.moveToBeginningOfBuffer(e.config,e.model,c.modelState,i))}return r},e.moveToEndOfBuffer=function(e,t,i){for(var r=[],s=0,a=t.length;s<a;s++){var c=t[s];r[s]=n.CursorState.fromModelState(o.MoveOperations.moveToEndOfBuffer(e.config,e.model,c.modelState,i))}return r},e.selectAll=function(e,t){var o=e.model.getLineCount(),s=e.model.getLineMaxColumn(o);return n.CursorState.fromModelState(new n.SingleCursorState(new r.Range(1,1,1,1),0,new i.Position(o,s),0))},e.line=function(e,t,o,s,a){var c=e.model.validatePosition(s),l=a?e.validateViewPosition(new i.Position(a.lineNumber,a.column),c):e.convertModelPositionToViewPosition(c);if(!o||!t.modelState.hasSelection()){var u=e.model.getLineCount(),d=c.lineNumber+1,h=1;return d>u&&(d=u,h=e.model.getLineMaxColumn(d)),n.CursorState.fromModelState(new n.SingleCursorState(new r.Range(c.lineNumber,1,d,h),0,new i.Position(d,h),0))}
var p=t.modelState.selectionStart.getStartPosition().lineNumber;if(c.lineNumber<p)return n.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(),l.lineNumber,1,0));if(c.lineNumber>p){var u=e.viewModel.getLineCount(),f=l.lineNumber+1,g=1;return f>u&&(f=u,g=e.viewModel.getLineMaxColumn(f)),n.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(),f,g,0))}var v=t.modelState.selectionStart.getEndPosition();return n.CursorState.fromModelState(t.modelState.move(t.modelState.hasSelection(),v.lineNumber,v.column,0))},e.word=function(e,t,i,r){var o=e.model.validatePosition(r);return n.CursorState.fromModelState(s.WordOperations.word(e.config,e.model,t.modelState,i,o))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new n.CursorState(t.modelState,t.viewState);var o=t.viewState.position.lineNumber,s=t.viewState.position.column;return n.CursorState.fromViewState(new n.SingleCursorState(new r.Range(o,s,o,s),0,new i.Position(o,s),0))},e.moveTo=function(e,t,r,o,s){
var a=e.model.validatePosition(o),c=s?e.validateViewPosition(new i.Position(s.lineNumber,s.column),a):e.convertModelPositionToViewPosition(a);return n.CursorState.fromViewState(t.viewState.move(r,c.lineNumber,c.column,0))},e.move=function(e,t,n){var i=n.select,r=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,r);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,r);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,r):this._moveUpByModelLines(e,t,i,r);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,r):this._moveDownByModelLines(e,t,i,r);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:
var o=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,r),c=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,o,i,a,c)];case 11:var o=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,r),c=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,o,i,a,c)];case 10:var o=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,o,i,a,c)];case 12:for(var l=e.getCompletelyVisibleViewRange(),u=[],d=0,h=t.length;d<h;d++){o=t[d];u[d]=this.findPositionInViewportIfOutside(e,o,l,i)}return u}return null},e.findPositionInViewportIfOutside=function(e,t,i,r){var o=t.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new n.CursorState(t.modelState,t.viewState);o>i.endLineNumber-1&&(o=i.endLineNumber-1),o<i.startLineNumber&&(o=i.startLineNumber)
;var s=e.viewModel.getLineFirstNonWhitespaceColumn(o);return this._moveToViewPosition(e,t,r,o,s)},e._firstLineNumberInRange=function(e,t,n){var i=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(i)&&i++,Math.min(t.endLineNumber,i+n-1)},e._lastLineNumberInRange=function(e,t,n){var i=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(i)&&i++,Math.max(i,t.endLineNumber-n+1)},e._moveLeft=function(e,t,i,r){for(var s=[],a=0,c=t.length;a<c;a++){var l=t[a],u=o.MoveOperations.moveLeft(e.config,e.viewModel,l.viewState,i,r);if(1===r&&u.position.lineNumber!==l.viewState.position.lineNumber){e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(u.position).lineNumber===l.modelState.position.lineNumber&&(u=o.MoveOperations.moveLeft(e.config,e.viewModel,u,i,1))}s[a]=n.CursorState.fromViewState(u)}return s},e._moveHalfLineLeft=function(e,t,i){for(var r=[],s=0,a=t.length;s<a;s++){var c=t[s],l=c.viewState.position.lineNumber,u=Math.round(e.viewModel.getLineContent(l).length/2)
;r[s]=n.CursorState.fromViewState(o.MoveOperations.moveLeft(e.config,e.viewModel,c.viewState,i,u))}return r},e._moveRight=function(e,t,i,r){for(var s=[],a=0,c=t.length;a<c;a++){var l=t[a],u=o.MoveOperations.moveRight(e.config,e.viewModel,l.viewState,i,r);if(1===r&&u.position.lineNumber!==l.viewState.position.lineNumber){e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(u.position).lineNumber===l.modelState.position.lineNumber&&(u=o.MoveOperations.moveRight(e.config,e.viewModel,u,i,1))}s[a]=n.CursorState.fromViewState(u)}return s},e._moveHalfLineRight=function(e,t,i){for(var r=[],s=0,a=t.length;s<a;s++){var c=t[s],l=c.viewState.position.lineNumber,u=Math.round(e.viewModel.getLineContent(l).length/2);r[s]=n.CursorState.fromViewState(o.MoveOperations.moveRight(e.config,e.viewModel,c.viewState,i,u))}return r},e._moveDownByViewLines=function(e,t,i,r){for(var s=[],a=0,c=t.length;a<c;a++){var l=t[a];s[a]=n.CursorState.fromViewState(o.MoveOperations.moveDown(e.config,e.viewModel,l.viewState,i,r))}
return s},e._moveDownByModelLines=function(e,t,i,r){for(var s=[],a=0,c=t.length;a<c;a++){var l=t[a];s[a]=n.CursorState.fromModelState(o.MoveOperations.moveDown(e.config,e.model,l.modelState,i,r))}return s},e._moveUpByViewLines=function(e,t,i,r){for(var s=[],a=0,c=t.length;a<c;a++){var l=t[a];s[a]=n.CursorState.fromViewState(o.MoveOperations.moveUp(e.config,e.viewModel,l.viewState,i,r))}return s},e._moveUpByModelLines=function(e,t,i,r){for(var s=[],a=0,c=t.length;a<c;a++){var l=t[a];s[a]=n.CursorState.fromModelState(o.MoveOperations.moveUp(e.config,e.model,l.modelState,i,r))}return s},e._moveToViewPosition=function(e,t,i,r,o){return n.CursorState.fromViewState(t.viewState.move(i,r,o,0))},e._moveToModelPosition=function(e,t,i,r,o){return n.CursorState.fromModelState(t.modelState.move(i,r,o,0))},e._moveToViewMinColumn=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=s.viewState.position.lineNumber,c=e.viewModel.getLineMinColumn(a);i[r]=this._moveToViewPosition(e,s,n,a,c)}return i},
e._moveToViewFirstNonWhitespaceColumn=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=s.viewState.position.lineNumber,c=e.viewModel.getLineFirstNonWhitespaceColumn(a);i[r]=this._moveToViewPosition(e,s,n,a,c)}return i},e._moveToViewCenterColumn=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=s.viewState.position.lineNumber,c=Math.round((e.viewModel.getLineMaxColumn(a)+e.viewModel.getLineMinColumn(a))/2);i[r]=this._moveToViewPosition(e,s,n,a,c)}return i},e._moveToViewMaxColumn=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=s.viewState.position.lineNumber,c=e.viewModel.getLineMaxColumn(a);i[r]=this._moveToViewPosition(e,s,n,a,c)}return i},e._moveToViewLastNonWhitespaceColumn=function(e,t,n){for(var i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=s.viewState.position.lineNumber,c=e.viewModel.getLineLastNonWhitespaceColumn(a);i[r]=this._moveToViewPosition(e,s,n,a,c)}return i},e}();t.CursorMoveCommands=c;!function(e){e.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:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down'\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter',\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!a.isObject(e))return!1;var t=e
;return!(!a.isString(t.to)||!a.isUndefined(t.select)&&!a.isBoolean(t.select)||!a.isUndefined(t.by)&&!a.isString(t.by)||!a.isUndefined(t.value)&&!a.isNumber(t.value))}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;var n;switch(t.to){case e.RawDirection.Left:n=0;break;case e.RawDirection.Right:n=1;break;case e.RawDirection.Up:n=2;break;case e.RawDirection.Down:n=3;break;case e.RawDirection.WrappedLineStart:n=4;break
;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=5;break;case e.RawDirection.WrappedLineColumnCenter:n=6;break;case e.RawDirection.WrappedLineEnd:n=7;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=8;break;case e.RawDirection.ViewPortTop:n=9;break;case e.RawDirection.ViewPortBottom:n=11;break;case e.RawDirection.ViewPortCenter:n=10;break;case e.RawDirection.ViewPortIfOutside:n=12;break;default:return null}var i=0;switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Character:i=3;break;case e.RawUnit.HalfLine:i=4}return{direction:n,unit:i,select:!!t.select,value:t.value||1}};!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down",e[e.WrappedLineStart=4]="WrappedLineStart",e[e.WrappedLineFirstNonWhitespaceCharacter=5]="WrappedLineFirstNonWhitespaceCharacter",e[e.WrappedLineColumnCenter=6]="WrappedLineColumnCenter",e[e.WrappedLineEnd=7]="WrappedLineEnd",
e[e.WrappedLineLastNonWhitespaceCharacter=8]="WrappedLineLastNonWhitespaceCharacter",e[e.ViewPortTop=9]="ViewPortTop",e[e.ViewPortCenter=10]="ViewPortCenter",e[e.ViewPortBottom=11]="ViewPortBottom",e[e.ViewPortIfOutside=12]="ViewPortIfOutside"}(e.Direction||(e.Direction={}));!function(e){e[e.None=0]="None",e[e.Line=1]="Line",e[e.WrappedLine=2]="WrappedLine",e[e.Character=3]="Character",e[e.HalfLine=4]="HalfLine"}(e.Unit||(e.Unit={}))}(t.CursorMove||(t.CursorMove={}))}),define(e[825],t([1,0,130,39,19,60,57]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this.modelState=null,this.viewState=null,this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new n.SingleCursorState(new r.Range(1,1,1,1),0,new i.Position(1,1),0),new n.SingleCursorState(new r.Range(1,1,1,1),0,new i.Position(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,
this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,s.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,s.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges)},e.prototype.asCursorState=function(){return new n.CursorState(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===o.SelectionDirection.LTR?new o.Selection(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new o.Selection(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){
this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype._setState=function(e,t,o){if(t){var s=e.model.validateRange(t.selectionStart),a=t.selectionStart.equalsRange(s)?t.selectionStartLeftoverVisibleColumns:0,c=e.model.validatePosition(t.position),l=t.position.equals(c)?t.leftoverVisibleColumns:0;t=new n.SingleCursorState(s,a,c,l)}else{var s=e.model.validateRange(e.convertViewRangeToModelRange(o.selectionStart)),c=e.model.validatePosition(e.convertViewPositionToModelPosition(o.position.lineNumber,o.position.column));t=new n.SingleCursorState(s,o.selectionStartLeftoverVisibleColumns,c,o.leftoverVisibleColumns)}if(o){var u=e.validateViewRange(o.selectionStart,t.selectionStart),d=e.validateViewPosition(o.position,t.position);o=new n.SingleCursorState(u,t.selectionStartLeftoverVisibleColumns,d,t.leftoverVisibleColumns)}else{
var h=e.convertModelPositionToViewPosition(new i.Position(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),p=e.convertModelPositionToViewPosition(new i.Position(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),u=new r.Range(h.lineNumber,h.column,p.lineNumber,p.column),d=e.convertModelPositionToViewPosition(t.position);o=new n.SingleCursorState(u,t.selectionStartLeftoverVisibleColumns,d,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=o,this._updateTrackedRange(e)},e}();t.OneCursor=a}),define(e[826],t([1,0,825,60,130]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.context=e,this.primaryCursor=new n.OneCursor(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context)
;for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)},e.prototype.stopTrackingSelections=function(){this.primaryCursor.stopTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)},e.prototype.updateContext=function(e){this.context=e},e.prototype.ensureValidState=function(){this.primaryCursor.ensureValidState(this.context);for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)},e.prototype.readSelectionFromMarkers=function(){var e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e},e.prototype.getAll=function(){var e=[];e[0]=this.primaryCursor.asCursorState();for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e},
e.prototype.getViewPositions=function(){var e=[];e[0]=this.primaryCursor.viewState.position;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e},e.prototype.getSelections=function(){var e=[];e[0]=this.primaryCursor.modelState.selection;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e},e.prototype.getViewSelections=function(){var e=[];e[0]=this.primaryCursor.viewState.selection;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e},e.prototype.setSelections=function(e){this.setStates(r.CursorState.fromModelSelections(e))},e.prototype.getPrimaryCursor=function(){return this.primaryCursor.asCursorState()},e.prototype.setStates=function(e){null!==e&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))},e.prototype._setSecondaryStates=function(e){
var t=this.secondaryCursors.length,n=e.length;if(t<n)for(var i=n-t,r=0;r<i;r++)this._addSecondaryCursor();else if(t>n)for(var o=t-n,r=0;r<o;r++)this._removeSecondaryCursor(this.secondaryCursors.length-1);for(r=0;r<n;r++)this.secondaryCursors[r].setState(this.context,e[r].modelState,e[r].viewState)},e.prototype.killSecondaryCursors=function(){this._setSecondaryStates([])},e.prototype._addSecondaryCursor=function(){this.secondaryCursors.push(new n.OneCursor(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.getLastAddedCursorIndex=function(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex},e.prototype._removeSecondaryCursor=function(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t];return e},
e.prototype.normalize=function(){if(0!==this.secondaryCursors.length){for(var e=this._getAll(),t=[],n=0,o=e.length;n<o;n++)t.push({index:n,selection:e[n].modelState.selection});t.sort(function(e,t){return e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber});for(var s=0;s<t.length-1;s++){var a=t[s],c=t[s+1],l=a.selection,u=c.selection;if(this.context.config.multiCursorMergeOverlapping){if(u.isEmpty()||l.isEmpty()?u.getStartPosition().isBeforeOrEqual(l.getEndPosition()):u.getStartPosition().isBefore(l.getEndPosition())){var d=a.index<c.index?s:s+1,h=a.index<c.index?s+1:s,p=t[h].index,f=t[d].index,g=t[h].selection,v=t[d].selection;if(!g.equalsSelection(v)){var m=g.plusRange(v),y=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn,b=v.selectionStartLineNumber===v.startLineNumber&&v.selectionStartColumn===v.startColumn,S=void 0;p===this.lastAddedCursorIndex?(S=y,
this.lastAddedCursorIndex=f):S=b;var _=void 0;_=S?new i.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):new i.Selection(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn),t[d].selection=_;var C=r.CursorState.fromModelSelection(_);e[f].setState(this.context,C.modelState,C.viewState)}for(var E=0;E<t.length;E++)t[E].index>p&&t[E].index--;e.splice(p,1),t.splice(h,1),this._removeSecondaryCursor(p-1),s--}}}}},e}();t.CursorCollection=o}),define(e[827],t([1,0,1247,14,9,826,19,60,186,130,503,360,171,197,7,57]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){return function(e,t,n){this.selections=e,this.source=t,this.reason=n}}();t.CursorStateChangedEvent=m;var y=function(){function e(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getAll()}return e.prototype.equals=function(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1
;for(var t=0,n=this.cursorState.length;t<n;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0},e}();t.CursorModelState=y;var b=function(e){function t(t,n,i){var r=e.call(this)||this;r._onDidReachMaxCursorCount=r._register(new g.Emitter),r.onDidReachMaxCursorCount=r._onDidReachMaxCursorCount.event,r._onDidAttemptReadOnlyEdit=r._register(new g.Emitter),r.onDidAttemptReadOnlyEdit=r._onDidAttemptReadOnlyEdit.event,r._onDidChange=r._register(new g.Emitter),r.onDidChange=r._onDidChange.event,r._configuration=t,r._model=n,r._knownModelVersionId=r._model.getVersionId(),r._viewModel=i,r.context=new u.CursorContext(r._configuration,r._model,r._viewModel),r._cursors=new s.CursorCollection(r.context),r._isHandling=!1,r._isDoingComposition=!1,r._columnSelectData=null,r._prevEditOperationType=0,r._register(r._model.onDidChangeRawContent(function(e){if(r._knownModelVersionId=e.versionId,!r._isHandling){var t=e.containsEvent(1);r._onModelContentChanged(t)}})),r._register(i.addEventListener(function(e){
(function(e){for(var t=0,n=e.length;t<n;t++)if(6===e[t].type)return!0;return!1})(e)&&r._knownModelVersionId===r._model.getVersionId()&&r.setStates("viewModel",p.CursorChangeReason.NotSet,r.getAll())}));var o=function(){r.context=new u.CursorContext(r._configuration,r._model,r._viewModel),r._cursors.updateContext(r.context)};return r._register(r._model.onDidChangeLanguage(function(e){o()})),r._register(r._model.onDidChangeLanguageConfiguration(function(){o()})),r._register(r._model.onDidChangeOptions(function(){o()})),r._register(r._configuration.onDidChange(function(e){u.CursorConfiguration.shouldRecreate(e)&&o()})),r}return n(t,e),t.prototype.dispose=function(){this._cursors.dispose(),e.prototype.dispose.call(this)},t.prototype.getPrimaryCursor=function(){return this._cursors.getPrimaryCursor()},t.prototype.getLastAddedCursorIndex=function(){return this._cursors.getLastAddedCursorIndex()},t.prototype.getAll=function(){return this._cursors.getAll()},t.prototype.setStates=function(e,n,i){
i.length>t.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var r=new y(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,n,r)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n){this._revealRange(t,0,e,n)},t.prototype.revealRange=function(e,t,n,i){this.emitCursorRevealRange(t,n,e,i)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n<i;n++){var r=t[n];e.push({inSelectionMode:!r.isEmpty(),selectionStart:{lineNumber:r.selectionStartLineNumber,column:r.selectionStartColumn},position:{lineNumber:r.positionLineNumber,column:r.positionColumn}})}return e},t.prototype.restoreState=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n],o=1,s=1
;r.position&&r.position.lineNumber&&(o=r.position.lineNumber),r.position&&r.position.column&&(s=r.position.column);var a=o,c=s;r.selectionStart&&r.selectionStart.lineNumber&&(a=r.selectionStart.lineNumber),r.selectionStart&&r.selectionStart.column&&(c=r.selectionStart.column),t.push({selectionStartLineNumber:a,selectionStartColumn:c,positionLineNumber:o,positionColumn:s})}this.setStates("restoreState",p.CursorChangeReason.NotSet,u.CursorState.fromModelSelections(t)),this.reveal(!0,0,1)},t.prototype._onModelContentChanged=function(e){if(this._prevEditOperationType=0,e)this._cursors.dispose(),this._cursors=new s.CursorCollection(this.context),this._emitStateChangedIfNecessary("model",p.CursorChangeReason.ContentFlush,null);else{var t=this._cursors.readSelectionFromMarkers();this.setStates("modelChange",p.CursorChangeReason.RecoverFromMarkers,u.CursorState.fromModelSelections(t))}},t.prototype.getSelection=function(){return this._cursors.getPrimaryCursor().modelState.selection},
t.prototype.getColumnSelectData=function(){if(this._columnSelectData)return this._columnSelectData;var e=this._cursors.getPrimaryCursor().viewState.position;return{toViewLineNumber:e.lineNumber,toViewVisualColumn:u.CursorColumns.visibleColumnFromColumn2(this.context.config,this.context.viewModel,e)}},t.prototype.getSelections=function(){return this._cursors.getSelections()},t.prototype.getViewSelections=function(){return this._cursors.getViewSelections()},t.prototype.getPosition=function(){return this._cursors.getPrimaryCursor().modelState.position},t.prototype.setSelections=function(e,t){this.setStates(e,p.CursorChangeReason.NotSet,u.CursorState.fromModelSelections(t))},t.prototype.getPrevEditOperationType=function(){return this._prevEditOperationType},t.prototype.setPrevEditOperationType=function(e){this._prevEditOperationType=e},t.prototype._executeEditOperation=function(e){if(e){e.shouldPushStackElementBefore&&this._model.pushStackElement()
;var t=S.executeCommands(this._model,this._cursors.getSelections(),e.commands);t&&(this._interpretCommandResult(t),this._prevEditOperationType=e.type),e.shouldPushStackElementAfter&&this._model.pushStackElement()}},t.prototype._interpretCommandResult=function(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()},t.prototype._emitStateChangedIfNecessary=function(e,t,n){var i=new y(this._model,this);if(i.equals(n))return!1;var r=this._cursors.getSelections(),o=this._cursors.getViewSelections();try{this._beginEmit().emit(new f.ViewCursorStateChangedEvent(o))}finally{this._endEmit()}return n&&n.cursorState.length===i.cursorState.length&&!i.cursorState.some(function(e,t){return!e.modelState.equals(n.cursorState[t].modelState)})||this._onDidChange.fire(new m(r,e||"keyboard",t)),!0},t.prototype._revealRange=function(e,t,n,i){var r=this._cursors.getViewPositions(),o=r[0]
;if(1===e)for(s=1;s<r.length;s++)r[s].isBefore(o)&&(o=r[s]);else if(2===e)for(var s=1;s<r.length;s++)o.isBeforeOrEqual(r[s])&&(o=r[s]);else if(r.length>1)return;var c=new a.Range(o.lineNumber,o.column,o.lineNumber,o.column);this.emitCursorRevealRange(c,t,n,i)},t.prototype.emitCursorRevealRange=function(e,t,n,i){try{this._beginEmit().emit(new f.ViewRevealRangeRequestEvent(e,t,n,i))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,n){var i=l.Handler;if(t!==i.CompositionStart)if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var r=new y(this._model,this),s=p.CursorChangeReason.NotSet;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:s=p.CursorChangeReason.Paste,
this._paste(n.text,n.pasteOnNewLine,n.multicursorText);break;case i.Cut:this._cut();break;case i.Undo:s=p.CursorChangeReason.Undo,this._interpretCommandResult(this._model.undo());break;case i.Redo:s=p.CursorChangeReason.Redo,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){o.onUnexpectedError(e)}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,s,r)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(h.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){
if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(h.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,i=t.length;n<i;n++){var o=t.charCodeAt(n),s=void 0;r.isHighSurrogate(o)&&n+1<i?(s=t.charAt(n)+t.charAt(n+1),n++):s=t.charAt(n),this._executeEditOperation(h.TypeOperations.typeWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),s))}},t.prototype._replacePreviousChar=function(e,t){this._executeEditOperation(h.TypeOperations.replacePreviousChar(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),e,t))},t.prototype._paste=function(e,t,n){this._executeEditOperation(h.TypeOperations.paste(this.context.config,this.context.model,this.getSelections(),e,t,n))},t.prototype._cut=function(){this._executeEditOperation(d.DeleteOperations.cut(this.context.config,this.context.model,this.getSelections()))},
t.prototype._externalExecuteCommand=function(e){this._cursors.killSecondaryCursors(),this._executeEditOperation(new u.EditOperationResult(0,[e],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},t.prototype._externalExecuteCommands=function(e){this._executeEditOperation(new u.EditOperationResult(0,e,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},t.MAX_CURSOR_COUNT=1e4,t}(f.ViewEventEmitter);t.Cursor=b;var S=function(){function e(){}return e.executeCommands=function(e,t,n){for(var i={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(i,n),o=0,s=i.trackedRanges.length;o<s;o++)i.model._setTrackedRange(i.trackedRanges[o],null,v.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges);return r},e._innerExecuteCommands=function(e,t){if(this._arrayIsEmpty(t))return null;var n=this._getEditOperations(e,t);if(0===n.operations.length)return null;var i=n.operations,r=this._getLoserCursorMap(i)
;if(r.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;for(var o=[],s=0,a=i.length;s<a;s++)r.hasOwnProperty(i[s].identifier.major.toString())||o.push(i[s]);n.hadTrackedEditOperation&&o.length>0&&(o[0]._isTracked=!0);var l=e.model.pushEditOperations(e.selectionsBefore,o,function(n){for(var i=[],r=0;r<e.selectionsBefore.length;r++)i[r]=[];for(r=0;r<n.length;r++){var o=n[r];o.identifier&&i[o.identifier.major].push(o)}for(var s=function(e,t){return e.identifier.minor-t.identifier.minor},a=[],l=function(n){i[n].length>0?(i[n].sort(s),a[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return e.trackedRangesDirection[n]===c.SelectionDirection.LTR?new c.Selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new c.Selection(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):a[n]=e.selectionsBefore[n]
},r=0;r<e.selectionsBefore.length;r++)l(r);return a}),u=[];for(var d in r)r.hasOwnProperty(d)&&u.push(parseInt(d,10));u.sort(function(e,t){return t-e});for(s=0;s<u.length;s++)l.splice(u[s],1);return l},e._arrayIsEmpty=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t])return!1;return!0},e._getEditOperations=function(e,t){for(var n=[],i=!1,r=0,o=t.length;r<o;r++)if(t[r]){var s=this._getEditOperationsFromCommand(e,r,t[r]);n=n.concat(s.operations),i=i||s.hadTrackedEditOperation}return{operations:n,hadTrackedEditOperation:i}},e._getEditOperationsFromCommand=function(e,t,n){var r=[],s=0,a=function(e,i){e.isEmpty()&&""===i||r.push({identifier:{major:t,minor:s++},range:e,text:i,forceMoveMarkers:!1,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},c=!1,l={addEditOperation:a,addTrackedEditOperation:function(e,t){c=!0,a(e,t)},trackSelection:function(t,n){var i;if(t.isEmpty())if("boolean"==typeof n)i=n?v.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore:v.TrackedRangeStickiness.GrowsOnlyWhenTypingAfter;else{
var r=e.model.getLineMaxColumn(t.startLineNumber);i=t.startColumn===r?v.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore:v.TrackedRangeStickiness.GrowsOnlyWhenTypingAfter}else i=v.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges;var o=e.trackedRanges.length,s=e.model._setTrackedRange(null,t,i);return e.trackedRanges[o]=s,e.trackedRangesDirection[o]=t.getDirection(),o.toString()}};try{n.getEditOperations(e.model,l)}catch(e){return e.friendlyMessage=i.localize(0,null),o.onUnexpectedError(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:r,hadTrackedEditOperation:c}},e._getLoserCursorMap=function(e){(e=e.slice(0)).sort(function(e,t){return-a.Range.compareRangesUsingEnds(e.range,t.range)});for(var t={},n=1;n<e.length;n++){var i=e[n-1],r=e[n];if(i.range.getStartPosition().isBefore(r.range.getEndPosition())){var o=void 0;t[(o=i.identifier.major>r.identifier.major?i.identifier.major:r.identifier.major).toString()]=!0;for(var s=0;s<e.length;s++)e[s].identifier.major===o&&(e.splice(s,1),s<n&&n--,s--)
;n>0&&n--}}return t},e}()}),define(e[353],t([1,0,14,44,222,322]),function(e,t,n,i,r,o){"use strict";function s(e,t){return function(e,t){for(var i='<div class="monaco-tokenized-source">',r=e.split(/\r\n|\r|\n/),s=t.getInitialState(),a=0,c=r.length;a<c;a++){var l=r[a];a>0&&(i+="<br/>");var u=t.tokenize2(l,s,0);o.LineTokens.convertToEndOffset(u.tokens,l.length);for(var d=new o.LineTokens(u.tokens,l).inflate(),h=0,p=0,f=d.getCount();p<f;p++){var g=d.getClassName(p),v=d.getEndOffset(p);i+='<span class="'+g+'">'+n.escape(l.substring(h,v))+"</span>",h=v}s=u.endState}return i+="</div>"}(e,function(e){var t=i.TokenizationRegistry.get(e);if(t)return t;return{getInitialState:function(){return r.NULL_STATE},tokenize:void 0,tokenize2:function(e,t,n){return r.nullTokenize2(0,e,t,n)}}}(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.tokenizeToString=s,t.tokenizeLineToHTML=function(e,t,n,i,r,o){for(var s="<div>",a=i,c=0,l=0,u=t.getCount();l<u;l++){var d=t.getEndOffset(l);if(!(d<=i)){for(var h="";a<d&&a<r;a++){
var p=e.charCodeAt(a);switch(p){case 9:var f=o-(a+c)%o;for(c+=f-1;f>0;)h+="&nbsp;",f--;break;case 60:h+="&lt;";break;case 62:h+="&gt;";break;case 38:h+="&amp;";break;case 0:h+="&#00;";break;case 65279:case 8232:h+="�";break;case 13:h+="&#8203";break;default:h+=String.fromCharCode(p)}}if(s+='<span style="'+t.getInlineStyle(l,n)+'">'+h+"</span>",d>r||a>=r)break}}return s+="</div>"}}),define(e[72],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITextModelService=n.createDecorator("textModelService")}),define(e[127],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITextResourceConfigurationService=n.createDecorator("textResourceConfigurationService")});var l=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};define(e[554],t([1,0,18,5,4,433,952,44,47,1081,114,127]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";function g(e,t){var n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}
Object.defineProperty(t,"__esModule",{value:!0});var v=6e4,m=3e5,y=function(e){function t(t,n){var r=e.call(this)||this;return r._modelService=t,r._workerManager=r._register(new S(r._modelService)),r._register(u.LinkProviderRegistry.register("*",{provideLinks:function(e,t){return g(r._modelService,e.uri)?i.wireCancellationToken(t,r._workerManager.withWorker().then(function(t){return t.computeLinks(e.uri)})):o.TPromise.as([])}})),r._register(u.SuggestRegistry.register("*",new b(r._workerManager,n,r._modelService))),r}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.canComputeDiff=function(e,t){return g(this._modelService,e)&&g(this._modelService,t)},t.prototype.computeDiff=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.computeDiff(e,t,n)})},t.prototype.canComputeDirtyDiff=function(e,t){return g(this._modelService,e)&&g(this._modelService,t)},t.prototype.computeDirtyDiff=function(e,t,n){
return this._workerManager.withWorker().then(function(i){return i.computeDirtyDiff(e,t,n)})},t.prototype.computeMoreMinimalEdits=function(e,t){return Array.isArray(t)&&0!==t.length&&g(this._modelService,e)?this._workerManager.withWorker().then(function(n){return n.computeMoreMinimalEdits(e,t)}):o.TPromise.as(t)},t.prototype.canNavigateValueSet=function(e){return g(this._modelService,e)},t.prototype.navigateValueSet=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.navigateValueSet(e,t,n)})},t=a([l(0,d.IModelService),l(1,f.ITextResourceConfigurationService)],t)}(r.Disposable);t.EditorWorkerServiceImpl=y;var b=function(){function e(e,t,n){this._workerManager=e,this._configurationService=t,this._modelService=n}return e.prototype.provideCompletionItems=function(e,t){if(this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions&&g(this._modelService,e.uri))return this._workerManager.withWorker().then(function(n){return n.textualSuggest(e.uri,t)})},e}(),S=function(e){
function t(t){var n=e.call(this)||this;n._modelService=t,n._editorWorkerClient=null;return n._register(new i.IntervalTimer).cancelAndSet(function(){return n._checkStopIdleWorker()},Math.round(m/2)),n._register(n._modelService.onModelRemoved(function(e){return n._checkStopEmptyWorker()})),n}return n(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this)},t.prototype._checkStopEmptyWorker=function(){if(this._editorWorkerClient){0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype._checkStopIdleWorker=function(){if(this._editorWorkerClient){(new Date).getTime()-this._lastWorkerUsedTime>m&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),
this._editorWorkerClient||(this._editorWorkerClient=new E(this._modelService,"editorWorkerService")),o.TPromise.as(this._editorWorkerClient)},t}(r.Disposable),_=function(e){function t(t,n,r){var o=e.call(this)||this;if(o._syncedModels=Object.create(null),o._syncedModelsLastUsedTime=Object.create(null),o._proxy=t,o._modelService=n,!r){var s=new i.IntervalTimer;s.cancelAndSet(function(){return o._checkStopModelSync()},Math.round(v/2)),o._register(s)}return o}return n(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)r.dispose(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.esureSyncedResources=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=n.toString();this._syncedModels[i]||this._beginModelSync(n),this._syncedModels[i]&&(this._syncedModelsLastUsedTime[i]=(new Date).getTime())}},t.prototype._checkStopModelSync=function(){var e=(new Date).getTime(),t=[]
;for(var n in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[n]>v&&t.push(n)}for(var i=0;i<t.length;i++)this._stopModelSync(t[i])},t.prototype._beginModelSync=function(e){var t=this,n=this._modelService.getModel(e);if(n&&!n.isTooLargeForSyncing()){var i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});var r=[];r.push(n.onDidChangeContent(function(e){t._proxy.acceptModelChanged(i.toString(),e)})),r.push(n.onWillDispose(function(){t._stopModelSync(i)})),r.push({dispose:function(){t._proxy.acceptRemovedModel(i)}}),this._syncedModels[i]=r}},t.prototype._stopModelSync=function(e){var t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],r.dispose(t)},t}(r.Disposable),C=function(){function e(e){this._instance=e,this._proxyObj=o.TPromise.as(this._instance)}return e.prototype.dispose=function(){this._instance.dispose(),this._instance=null,this._proxyObj=null},
e.prototype.getProxyObject=function(){return new i.ShallowCancelThenPromise(this._proxyObj)},e}(),E=function(e){function t(t,n){var i=e.call(this)||this;return i._modelService=t,i._workerFactory=new c.DefaultWorkerFactory(n),i._worker=null,i._modelManager=null,i}return n(t,e),t.prototype._getOrCreateWorker=function(){if(!this._worker)try{this._worker=this._register(new s.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker"))}catch(e){s.logOnceWebWorkerWarning(e),this._worker=new C(new h.EditorSimpleWorkerImpl(null))}return this._worker},t.prototype._getProxy=function(){var e=this;return new i.ShallowCancelThenPromise(this._getOrCreateWorker().getProxyObject().then(null,function(t){return s.logOnceWebWorkerWarning(t),e._worker=new C(new h.EditorSimpleWorkerImpl(null)),e._getOrCreateWorker().getProxyObject()}))},t.prototype._getOrCreateModelManager=function(e){return this._modelManager||(this._modelManager=this._register(new _(e,this._modelService,!1))),this._modelManager},
t.prototype._withSyncedResources=function(e){var t=this;return this._getProxy().then(function(n){return t._getOrCreateModelManager(n).esureSyncedResources(e),n})},t.prototype.computeDiff=function(e,t,n){return this._withSyncedResources([e,t]).then(function(i){return i.computeDiff(e.toString(),t.toString(),n)})},t.prototype.computeDirtyDiff=function(e,t,n){return this._withSyncedResources([e,t]).then(function(i){return i.computeDirtyDiff(e.toString(),t.toString(),n)})},t.prototype.computeMoreMinimalEdits=function(e,t){return this._withSyncedResources([e]).then(function(n){return n.computeMoreMinimalEdits(e.toString(),t)})},t.prototype.computeLinks=function(e){return this._withSyncedResources([e]).then(function(t){return t.computeLinks(e.toString())})},t.prototype.textualSuggest=function(e,t){var n=this;return this._withSyncedResources([e]).then(function(i){var r=n._modelService.getModel(e);if(!r)return null
;var o=p.LanguageConfigurationRegistry.getWordDefinition(r.getLanguageIdentifier().id),s=o.source,a=(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"");return i.textualSuggest(e.toString(),t,s,a)})},t.prototype.navigateValueSet=function(e,t,n){var i=this;return this._withSyncedResources([e]).then(function(r){var o=i._modelService.getModel(e);if(!o)return null;var s=p.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),a=s.source,c=(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"");return r.navigateValueSet(e.toString(),t,n,a,c)})},t}(r.Disposable);t.EditorWorkerClient=E}),define(e[832],t([1,0,18,554]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWebWorker=function(e,t){return new o(e,t)};var o=function(e){function t(t,n){var i=e.call(this,t,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignProxy=null,i}return n(t,e),t.prototype._getForeignProxy=function(){var e=this
;return this._foreignProxy||(this._foreignProxy=new i.ShallowCancelThenPromise(this._getProxy().then(function(t){return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData).then(function(n){e._foreignModuleId=null,e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},r=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},o={},s=0;s<n.length;s++)o[n[s]]=r(n[s],i);return o})}))),this._foreignProxy},t.prototype.getProxy=function(){return this._getForeignProxy()},t.prototype.withSyncedResources=function(e){var t=this;return this._withSyncedResources(e).then(function(e){return t.getProxy()})},t}(r.EditorWorkerClient)}),define(e[344],t([1,0,44,7,966]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){var e=this;this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),n.TokenizationRegistry.onDidChange(function(t){
t.changedColorMap&&e._updateColorMap()})}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=n.TokenizationRegistry.getColorMap();if(!e)return this._colors=[null],void(this._backgroundIsLight=!0);this._colors=[null];for(var t=1;t<e.length;t++){var i=e[t].rgba;this._colors[t]=new r.RGBA8(i.r,i.g,i.b,Math.round(255*i.a))}var o=e[2].getRelativeLuminance();this._backgroundIsLight=o>=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}();t.MinimapTokensColorTracker=o;!function(e){e[e.START_CH_CODE=32]="START_CH_CODE",e[e.END_CH_CODE=126]="END_CH_CODE",e[e.CHAR_COUNT=95]="CHAR_COUNT",e[e.SAMPLED_CHAR_HEIGHT=16]="SAMPLED_CHAR_HEIGHT",e[e.SAMPLED_CHAR_WIDTH=10]="SAMPLED_CHAR_WIDTH",e[e.SAMPLED_HALF_CHAR_WIDTH=5]="SAMPLED_HALF_CHAR_WIDTH",
e[e.x2_CHAR_HEIGHT=4]="x2_CHAR_HEIGHT",e[e.x2_CHAR_WIDTH=2]="x2_CHAR_WIDTH",e[e.x1_CHAR_HEIGHT=2]="x1_CHAR_HEIGHT",e[e.x1_CHAR_WIDTH=1]="x1_CHAR_WIDTH",e[e.RGBA_CHANNELS_CNT=4]="RGBA_CHANNELS_CNT"}(t.Constants||(t.Constants={}));var s=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,r=e.length;i<r;i++)n[i]=e[i]*t;return n},e._getChIndex=function(e){return(e-=32)<0&&(e+=95),e%95},e.prototype.x2RenderChar=function(t,n,i,r,o,s,a){if(n+2>t.width||i+4>t.height)console.warn("bad render request outside image data");else{var c=a?this.x2charDataLight:this.x2charData,l=e._getChIndex(r),u=4*t.width,d=s.r,h=s.g,p=s.b,f=o.r-d,g=o.g-h,v=o.b-p,m=t.data,y=4*l*2,b=i*u+4*n,S=c[y]/255;m[b+0]=d+f*S,m[b+1]=h+g*S,m[b+2]=p+v*S;S=c[y+1]/255;m[b+4]=d+f*S,
m[b+5]=h+g*S,m[b+6]=p+v*S,b+=u;S=c[y+2]/255;m[b+0]=d+f*S,m[b+1]=h+g*S,m[b+2]=p+v*S;S=c[y+3]/255;m[b+4]=d+f*S,m[b+5]=h+g*S,m[b+6]=p+v*S,b+=u;S=c[y+4]/255;m[b+0]=d+f*S,m[b+1]=h+g*S,m[b+2]=p+v*S;S=c[y+5]/255;m[b+4]=d+f*S,m[b+5]=h+g*S,m[b+6]=p+v*S,b+=u;S=c[y+6]/255;m[b+0]=d+f*S,m[b+1]=h+g*S,m[b+2]=p+v*S;S=c[y+7]/255;m[b+4]=d+f*S,m[b+5]=h+g*S,m[b+6]=p+v*S}},e.prototype.x1RenderChar=function(t,n,i,r,o,s,a){if(n+1>t.width||i+2>t.height)console.warn("bad render request outside image data");else{var c=a?this.x1charDataLight:this.x1charData,l=e._getChIndex(r),u=4*t.width,d=s.r,h=s.g,p=s.b,f=o.r-d,g=o.g-h,v=o.b-p,m=t.data,y=2*l*1,b=i*u+4*n,S=c[y]/255;m[b+0]=d+f*S,m[b+1]=h+g*S,m[b+2]=p+v*S,b+=u;S=c[y+1]/255;m[b+0]=d+f*S,m[b+1]=h+g*S,m[b+2]=p+v*S}},e.prototype.x2BlockRenderChar=function(e,t,n,i,r,o){if(t+2>e.width||n+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=r.r,c=r.g,l=r.b,u=a+.5*(i.r-a),d=c+.5*(i.g-c),h=l+.5*(i.b-l),p=e.data,f=n*s+4*t;p[f+0]=u,p[f+1]=d,p[f+2]=h,p[f+4]=u,
p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=u,p[f+1]=d,p[f+2]=h,p[f+4]=u,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=u,p[f+1]=d,p[f+2]=h,p[f+4]=u,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=u,p[f+1]=d,p[f+2]=h,p[f+4]=u,p[f+5]=d,p[f+6]=h}},e.prototype.x1BlockRenderChar=function(e,t,n,i,r,o){if(t+1>e.width||n+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=r.r,c=r.g,l=r.b,u=a+.5*(i.r-a),d=c+.5*(i.g-c),h=l+.5*(i.b-l),p=e.data,f=n*s+4*t;p[f+0]=u,p[f+1]=d,p[f+2]=h,p[(f+=s)+0]=u,p[f+1]=d,p[f+2]=h}},e}();t.MinimapCharRenderer=s}),define(e[834],t([1,0,344]),function(e,t,n){"use strict";function i(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;n<i;n++)t[n]=e[n];return t}Object.defineProperty(t,"__esModule",{value:!0});var r=null;t.getOrCreateMinimapCharRenderer=function(){if(!r){var e=i(s);s=null;var t=i(o);o=null,r=new n.MinimapCharRenderer(t,e)}return r}
;var o=[0,0,0,0,0,0,0,0,39,14,39,14,14,5,29,10,96,96,29,29,0,0,0,0,49,113,195,214,227,166,135,42,40,29,194,38,75,148,197,187,145,0,160,61,75,143,2,183,138,58,163,6,177,223,197,227,38,13,11,4,0,0,0,0,10,54,52,8,62,4,71,122,73,2,19,40,10,50,155,36,79,70,145,121,7,5,0,0,2,1,36,12,204,166,16,5,0,0,0,0,1,0,154,34,0,0,0,0,96,83,0,0,0,0,0,0,0,0,46,34,0,82,2,56,53,3,146,0,146,119,152,132,152,131,145,119,170,42,15,42,15,42,172,194,131,132,0,139,80,28,227,143,159,135,15,118,11,126,171,144,20,124,88,106,217,196,0,106,189,92,168,43,5,130,164,133,130,115,183,65,134,120,141,141,170,196,2,106,31,32,105,2,145,130,116,114,132,135,138,140,138,113,147,137,81,183,129,94,0,0,21,16,4,3,46,34,0,0,45,34,1,0,160,49,0,0,43,143,203,23,1,76,0,0,38,28,131,96,38,28,0,0,168,31,29,191,98,0,118,139,5,113,45,13,37,6,97,115,161,179,204,105,223,224,83,52,111,100,184,186,120,132,212,145,180,139,174,161,212,182,104,162,131,0,131,0,104,161,219,120,110,116,110,116,219,120,207,154,163,40,147,22,207,154,202,159,161,47,145,23,111,0,139,154,144,30,144,135,139,187,110,110,168,161,150,145,110,110,185,162,43,16,43,16,185,162,73,129,0,110,0,110,191,87,149,149,236,48,195,91,146,149,146,0,146,0,146,0,187,173,200,201,222,215,172,147,95,95,193,97,224,129,159,206,97,192,155,139,153,115,153,115,156,140,189,158,123,136,190,64,111,0,155,139,153,115,153,114,156,241,197,148,150,152,170,116,110,157,156,128,169,14,13,159,158,149,212,189,43,16,43,16,43,16,148,110,148,110,147,109,182,151,133,121,106,118,114,103,89,66,94,94,211,188,205,207,139,168,151,152,87,76,101,79,151,152,130,156,125,116,47,29,43,16,169,228,11,103,120,6,230,176,55,49,55,6,55,6,193,102,92,0,71,0,13,30,0,147,63,43,12,43,12,43,142,152,71,53,61,61,0,0,0,0,0,0,0,0,0,0,158,146,25,2,0,0,0,0,0,0,0,0,107,130,170,194,176,188,109,0,203,159,113,111,202,158,0,0,135,135,114,0,136,135,0,109,187,190,148,126,177,187,0,0,149,130,218,105,169,135,37,113,146,113,49,13,49,13,0,0,178,195,147,114,255,255,109,0,193,149,110,109,109,109,12,15,125,41,33,41,144,188,1,6,75,53,10,53,210,161,110,0,152,148,210,60,110,156,213,5,63,5,63,5,45,111,0,0,232,172,190,168,190,169,0,0,190,144,109,109,109,109,0,0,168,140,148,111,168,140,0,0,200,151,113,110,255,158,0,0,184,188,147,139,186,255,0,0,122,130,111,0,109,0,0,0,132,69,109,93,110,136,51,5,205,103,61,6,47,106,0,0,110,109,110,122,155,179,0,0,132,120,113,114,84,63,0,0,124,108,202,189,160,174,0,0,144,142,79,57,159,146,0,0,138,138,119,117,255,69,0,0,97,198,47,38,208,84,23,112,41,14,157,7,121,192,35,11,35,11,35,11,160,61,129,9,40,19,20,139,236,44,0,0,15,3,97,93,0,0],s=[0,0,23,12,53,0,130,127,58,149,67,77,72,198,13,0,25,51,25,49,94,2,8,64,0,24,0,21,0,9,19,27,126,126,51,80,72,105,87,98,73,93,106,85,111,123,87,30,116,126,123,110,4,16,9,28,21,53,8,62,23,52,73,21,132,183,78,142,168,175,70,70,128,128,123,110,125,43,100,139,125,119,78,78,54,77,139,139,33,87,201,117,162,149,130,130,138,60,130,172,149,127,95,98,95,25,118,135,110,85,147,175,105,110,121,30,101,113,34,68,20,26,34,68,56,0,0,44,3,0,27,175,80,133,31,66,85,147,32,150,90,25,45,230,77,101,36,83,22,84,71,118,44,44,52,172,38,101,35,130,40,197,43,197,29,26,23,103,67,44,25,129,29,85,27,177,33,97,32,145,33,77,38,96,20,55,36,95,2,22]
}),define(e[387],t([1,0,39,19,326,209,197,66,51]),function(e,t,n,i,r,o,s,a,c){"use strict";function l(e,t,n,i,r,o,s){var a=e.createLineMapping(t,n,i,r,o);return null===a?s?g.INSTANCE:v.INSTANCE:new m(a,s)}function u(e,t){if(!e._resolvedColor){var n=t.type,i="dark"===n?e.darkColor:"light"===n?e.color:e.hcColor;e._resolvedColor=function(e,t){if("string"==typeof e)return e;var n=e?t.getColor(e.id):null;n||(n=c.Color.transparent);return n.toString()}(i,t)}return e._resolvedColor}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){return function(e,t){this.outputLineIndex=e,this.outputOffset=t}}();t.OutputPosition=d;var h=function(){function e(e){this._lines=e}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.convertViewRangeToModelRange=function(e){
var t=this._lines.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this._lines.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new i.Range(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)},e.prototype.validateViewRange=function(e,t){var n=this._lines.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),r=this._lines.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new i.Range(n.lineNumber,n.column,r.lineNumber,r.column)},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)},e.prototype.convertModelRangeToViewRange=function(e){var t=this._lines.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this._lines.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn)
;return new i.Range(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)},e}();t.CoordinatesConverter=h;var p;!function(e){e[e.BlockNone=0]="BlockNone",e[e.BlockSubsequent=1]="BlockSubsequent",e[e.BlockAll=2]="BlockAll"}(p||(p={}));var f=function(){function e(e,t,n,i,r,o){this.model=e,this._validModelVersionId=-1,this.tabSize=n,this.wrappingColumn=i,this.columnsForFullWidthChar=r,this.wrappingIndent=o,this.linePositionMapperFactory=t,this._constructLines(!0)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype.createCoordinatesConverter=function(){return new h(this)},e.prototype._ensureValidState=function(){if(this.model.getVersionId()!==this._validModelVersionId)throw new Error("ViewModel is out of sync with Model!")},e.prototype._constructLines=function(e){var t=this;this.lines=[],e&&(this.hiddenAreasIds=[])
;for(var n=this.model.getLinesContent(),o=n.length,s=new Uint32Array(o),a=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(i.Range.compareRangesUsingStarts),c=1,u=0,d=-1,h=d+1<a.length?u+1:o+2,p=0;p<o;p++){var f=p+1;f===h&&(c=a[++d].startLineNumber,u=a[d].endLineNumber,h=d+1<a.length?u+1:o+2);var g=f>=c&&f<=u,v=l(this.linePositionMapperFactory,n[p],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!g);s[p]=v.getViewLineCount(),this.lines[p]=v}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new r.PrefixSumComputerWithCache(s)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map(function(t){return e.model.getDecorationRange(t)})},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map(function(e){return t.model.validateRange(e)}).sort(i.Range.compareRangesUsingStarts),r=[],o=n[0].startLineNumber,s=n[0].endLineNumber,a=1,c=n.length;a<c;a++){var l=n[a]
;l.startLineNumber>s+1?(r.push(new i.Range(o,1,s,1)),o=l.startLineNumber,s=l.endLineNumber):l.endLineNumber>s&&(s=l.endLineNumber)}return r.push(new i.Range(o,1,s,1)),r},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),r=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(i.Range.compareRangesUsingStarts);if(n.length===r.length){for(var o=!1,s=0;s<n.length;s++)if(!n[s].equalsRange(r[s])){o=!0;break}if(!o)return!1}for(var c=[],s=0;s<n.length;s++)c.push({range:n[s],options:a.ModelDecorationOptions.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,c);for(var l=n,u=1,d=0,h=-1,p=h+1<l.length?d+1:this.lines.length+2,f=!1,s=0;s<this.lines.length;s++){var g=s+1;g===p&&(u=l[++h].startLineNumber,d=l[h].endLineNumber,p=h+1<l.length?d+1:this.lines.length+2);var v=!1;if(g>=u&&g<=d?this.lines[s].isVisible()&&(this.lines[s]=this.lines[s].setVisible(!1),v=!0):(f=!0,this.lines[s].isVisible()||(this.lines[s]=this.lines[s].setVisible(!0),v=!0)),v){
var m=this.lines[s].getViewLineCount();this.prefixSumComputer.changeValue(s,m)}}return f||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,r=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new s.ViewLinesDeletedEvent(i,r)},e.prototype.onModelLinesInserted=function(e,t,i,r){
if(e<=this._validModelVersionId)return null;for(var o=this.getHiddenAreas(),a=!1,c=new n.Position(t,1),u=0;u<o.length;u++)if(o[u].containsPosition(c)){a=!0;break}for(var d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=0,p=[],f=new Uint32Array(r.length),u=0,g=r.length;u<g;u++){var v=l(this.linePositionMapperFactory,r[u],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!a);p.push(v);var m=v.getViewLineCount();h+=m,f[u]=m}return this.lines=this.lines.slice(0,t-1).concat(p).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,f),new s.ViewLinesInsertedEvent(d,d+h-1)},e.prototype.onModelLineChanged=function(e,t,n){if(e<=this._validModelVersionId)return[!1,null,null,null];var i=t-1,r=this.lines[i].getViewLineCount(),o=this.lines[i].isVisible(),a=l(this.linePositionMapperFactory,n,this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,o);this.lines[i]=a;var c=this.lines[i].getViewLineCount(),u=!1,d=0,h=-1,p=0,f=-1,g=0,v=-1
;r>c?(v=(g=(h=(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+c-1)+1)+(r-c)-1,u=!0):r<c?(f=(p=(h=(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+r-1)+1)+(c-r)-1,u=!0):h=(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+c-1,this.prefixSumComputer.changeValue(i,c);return[u,d<=h?new s.ViewLinesChangedEvent(d,h):null,p<=f?new s.ViewLinesInsertedEvent(p,f):null,g<=v?new s.ViewLinesDeletedEvent(g,v):null]},e.prototype.acceptVersionId=function(e){this._validModelVersionId=e,1!==this.lines.length||this.lines[0].isVisible()||this.setHiddenAreas([])},e.prototype.getViewLineCount=function(){return this._ensureValidState(),this.prefixSumComputer.getTotalValue()},e.prototype._toValidViewLineNumber=function(e){if(e<1)return 1;var t=this.getViewLineCount();return e>t?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),
t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,r.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),c=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:c.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],s=[],a=[],c=i.lineNumber-1,l=r.lineNumber-1,u=null,d=c;d<=l;d++){var h=this.lines[d];if(h.isVisible()){
var p=h.getViewLineNumberOfModelPosition(0,d===c?i.column:1),f=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(d+1)),g=0;(C=f-p+1)>1&&1===h.getViewLineMinColumn(this.model,d+1,f)&&(g=0===p?1:2),s.push(C),a.push(g),null===u&&(u=new n.Position(d+1,0))}else null!==u&&(o=o.concat(this.model.getLinesIndentGuides(u.lineNumber,d)),u=null)}null!==u&&(o=o.concat(this.model.getLinesIndentGuides(u.lineNumber,r.lineNumber)),u=null);for(var v=t-e+1,m=new Array(v),y=0,b=0,S=o.length;b<S;b++){var _=o[b],C=Math.min(v-y,s[b]),E=void 0;E=2===(g=a[b])?0:1===g?1:C;for(var w=0;w<C;w++)w===E&&(_=0),m[y++]=_}return m},e.prototype.getViewLineContent=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineContent(this.model,n+1,i)},e.prototype.getViewLineLength=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder
;return this.lines[n].getViewLineLength(this.model,n+1,i)},e.prototype.getViewLineMinColumn=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMinColumn(this.model,n+1,i)},e.prototype.getViewLineMaxColumn=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMaxColumn(this.model,n+1,i)},e.prototype.getViewLineData=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineData(this.model,n+1,i)},e.prototype.getViewLinesData=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var i=this.prefixSumComputer.getIndexOf(e-1),r=e,o=i.index,s=i.remainder,a=[],c=o,l=this.model.getLineCount();c<l;c++){
var u=this.lines[c];if(u.isVisible()){var d=c===o?s:0,h=u.getViewLineCount()-d,p=!1;r+h>t&&(p=!0,h=t-r+1);var f=d+h;if(u.getViewLinesData(this.model,c+1,d,f,r-e,n,a),r+=h,p)break}}return a},e.prototype.validateViewPosition=function(e,t,i){this._ensureValidState(),e=this._toValidViewLineNumber(e);var r=this.prefixSumComputer.getIndexOf(e-1),o=r.index,s=r.remainder,a=this.lines[o],c=a.getViewLineMinColumn(this.model,o+1,s),l=a.getViewLineMaxColumn(this.model,o+1,s);t<c&&(t=c),t>l&&(t=l);var u=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new n.Position(o+1,u)).equals(i)?new n.Position(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),r=i.index,o=i.remainder,s=this.lines[r].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new n.Position(r+1,s))},
e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var i=this.model.validatePosition(new n.Position(e,t)),r=i.lineNumber,o=i.column,s=r-1,a=!1;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new n.Position(1,1);var c=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return a?this.lines[s].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(s+1)):this.lines[r-1].getViewPositionOfModelPosition(c,o)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var r=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(r,this.model.getLineMaxColumn(n+1))},
e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),r=new S,o=0,s=i.length;o<s;o++){var a=i[o],c=a.options.overviewRuler,l=c.position;if(0!==l){var d=u(c,n),h=this._getViewLineNumberForModelPosition(a.range.startLineNumber,a.range.startColumn),p=this._getViewLineNumberForModelPosition(a.range.endLineNumber,a.range.endColumn);r.accept(d,h,p,l)}}return r.result},e.prototype.getDecorationsInRange=function(e,t,r){var o=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-o.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new i.Range(o.lineNumber,o.column,s.lineNumber,s.column),t,r);for(var a=[],c=o.lineNumber-1,l=s.lineNumber-1,u=null,d=c;d<=l;d++){if(this.lines[d].isVisible())null===u&&(u=new n.Position(d+1,d===c?o.column:1));else if(null!==u){var h=this.model.getLineMaxColumn(d)
;a=a.concat(this.model.getDecorationsInRange(new i.Range(u.lineNumber,u.column,d,h),t,r)),u=null}}return null!==u&&(a=a.concat(this.model.getDecorationsInRange(new i.Range(u.lineNumber,u.column,s.lineNumber,s.column),t,r)),u=null),a},e}();t.SplitLinesCollection=f;var g=function(){function e(){}return e.prototype.isVisible=function(){return!0},e.prototype.setVisible=function(e){return e?this:v.INSTANCE},e.prototype.getViewLineCount=function(){return 1},e.prototype.getViewLineContent=function(e,t,n){return e.getLineContent(t)},e.prototype.getViewLineLength=function(e,t,n){return e.getLineLength(t)},e.prototype.getViewLineMinColumn=function(e,t,n){return e.getLineMinColumn(t)},e.prototype.getViewLineMaxColumn=function(e,t,n){return e.getLineMaxColumn(t)},e.prototype.getViewLineData=function(e,t,n){var i=e.getLineTokens(t),r=i.getLineContent();return new o.ViewLineData(r,!1,1,r.length+1,i.inflate())},e.prototype.getViewLinesData=function(e,t,n,i,r,o,s){o[r]?s[r]=this.getViewLineData(e,t,0):s[r]=null},
e.prototype.getModelColumnOfViewPosition=function(e,t){return t},e.prototype.getViewPositionOfModelPosition=function(e,t){return new n.Position(e,t)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){return e},e.INSTANCE=new e,e}(),v=function(){function e(){}return e.prototype.isVisible=function(){return!1},e.prototype.setVisible=function(e){return e?g.INSTANCE:this},e.prototype.getViewLineCount=function(){return 0},e.prototype.getViewLineContent=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineLength=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineMinColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineMaxColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineData=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLinesData=function(e,t,n,i,r,o,s){throw new Error("Not supported")},e.prototype.getModelColumnOfViewPosition=function(e,t){throw new Error("Not supported")},
e.prototype.getViewPositionOfModelPosition=function(e,t){throw new Error("Not supported")},e.prototype.getViewLineNumberOfModelPosition=function(e,t){throw new Error("Not supported")},e.INSTANCE=new e,e}(),m=function(){function e(e,t){this.positionMapper=e,this.wrappedIndent=this.positionMapper.getWrappedLinesIndent(),this.wrappedIndentLength=this.wrappedIndent.length,this.outputLineCount=this.positionMapper.getOutputLineCount(),this._isVisible=t}return e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){return this._isVisible=e,this},e.prototype.getViewLineCount=function(){return this._isVisible?this.outputLineCount:0},e.prototype.getInputStartOffsetOfOutputLineIndex=function(e){return this.positionMapper.getInputOffsetOfOutputPosition(e,0)},e.prototype.getInputEndOffsetOfOutputLineIndex=function(e,t,n){return n+1===this.outputLineCount?e.getLineMaxColumn(t)-1:this.positionMapper.getInputOffsetOfOutputPosition(n+1,0)},e.prototype.getViewLineContent=function(e,t,n){
if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n),o=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1});return n>0&&(o=this.wrappedIndent+o),o},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(r=this.wrappedIndent.length+r),r},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported")
;var i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n),s=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1});n>0&&(s=this.wrappedIndent+s);var a=n>0?this.wrappedIndentLength+1:1,c=s.length+1,l=n+1<this.getViewLineCount(),u=0;n>0&&(u=this.wrappedIndentLength);var d=e.getLineTokens(t);return new o.ViewLineData(s,l,a,c,d.sliceAndInflate(i,r,u))},e.prototype.getViewLinesData=function(e,t,n,i,r,o,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a<i;a++){var c=r+a-n;o[c]?s[c]=this.getViewLineData(e,t,a):s[c]=null}},e.prototype.getModelColumnOfViewPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");var n=t-1;return e>0&&(n<this.wrappedIndentLength?n=0:n-=this.wrappedIndentLength),this.positionMapper.getInputOffsetOfOutputPosition(e,n)+1},e.prototype.getViewPositionOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported")
;var i=this.positionMapper.getOutputPositionOfInputOffset(t-1),r=i.outputLineIndex,o=i.outputOffset+1;return r>0&&(o+=this.wrappedIndentLength),new n.Position(e+r,o)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();t.SplitLine=m;var y=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},
e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}();t.IdentityCoordinatesConverter=y;var b=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new y(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new s.ViewLinesDeletedEvent(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new s.ViewLinesInsertedEvent(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new s.ViewLinesChangedEvent(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){
return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),r=0;r<n;r++)i[r]=0;return i},e.prototype.getViewLineContent=function(e){return this.model.getLineContent(e)},e.prototype.getViewLineLength=function(e){return this.model.getLineLength(e)},e.prototype.getViewLineMinColumn=function(e){return this.model.getLineMinColumn(e)},e.prototype.getViewLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},e.prototype.getViewLineData=function(e){var t=this.model.getLineTokens(e),n=t.getLineContent();return new o.ViewLineData(n,!1,1,n.length+1,t.inflate())},e.prototype.getViewLinesData=function(e,t,n){var i=this.model.getLineCount();e=Math.min(Math.max(1,e),i),t=Math.min(Math.max(1,t),i);for(var r=[],o=e;o<=t;o++){var s=o-e;n[s]||(r[s]=null),r[s]=this.getViewLineData(o)}return r},
e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),r=new S,o=0,s=i.length;o<s;o++){var a=i[o],c=a.options.overviewRuler,l=c.position;if(0!==l){var d=u(c,n),h=a.range.startLineNumber,p=a.range.endLineNumber;r.accept(d,h,p,l)}}return r.result},e.prototype.getDecorationsInRange=function(e,t,n){return this.model.getDecorationsInRange(e,t,n)},e}();t.IdentityLinesCollection=b;var S=function(){function e(){this.result=Object.create(null)}return e.prototype.accept=function(e,t,n,i){var r=this.result[e];if(r){var o=r[r.length-3],s=r[r.length-1];if(o===i&&s+1>=t)return void(n>s&&(r[r.length-1]=n));r.push(i,t,n)}else this.result[e]=[i,t,n]},e}()}),define(e[836],t([1,0,14,326,387,241,269,133]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l;!function(e){e[e.NONE=0]="NONE",e[e.BREAK_BEFORE=1]="BREAK_BEFORE",e[e.BREAK_AFTER=2]="BREAK_AFTER",e[e.BREAK_OBTRUSIVE=3]="BREAK_OBTRUSIVE",
e[e.BREAK_IDEOGRAPHIC=4]="BREAK_IDEOGRAPHIC"}(l||(l={}));var u=function(e){function t(t,n,i){for(var r=e.call(this,0)||this,o=0;o<t.length;o++)r.set(t.charCodeAt(o),1);for(o=0;o<n.length;o++)r.set(n.charCodeAt(o),2);for(o=0;o<i.length;o++)r.set(i.charCodeAt(o),3);return r}return n(t,e),t.prototype.get=function(t){return t>=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(s.CharacterClassifier),d=function(){function e(e,t,n){this.classifier=new u(e,t,n)}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i},e.prototype.createLineMapping=function(t,n,o,s,l){if(-1===o)return null;n=+n,o=+o,s=+s;var u=0,d="",p=-1;if((l=+l)!==c.WrappingIndent.None&&-1!==(p=i.firstNonWhitespaceIndex(t))){d=t.substring(0,p);for(I=0;I<p;I++)u=e.nextVisibleColumn(u,n,9===t.charCodeAt(I),1);var f=0;l===c.WrappingIndent.Indent?f=1:l===c.WrappingIndent.DeepIndent&&(f=2);for(I=0;I<f;I++)d+="\t",u=e.nextVisibleColumn(u,n,!0,1);u+s>o&&(d="",u=0)}
for(var g=this.classifier,v=0,m=[],y=0,b=0,S=-1,_=0,C=-1,E=0,w=t.length,I=0;I<w;I++){var T=t.charCodeAt(I),x=9===T,k=g.get(T);if(1===k&&(S=I,_=u),4===k&&I>0){var D=t.charCodeAt(I-1);1!==g.get(D)&&(S=I,_=u)}var A=1;if(i.isFullWidthCharacter(T)&&(A=s),(b=e.nextVisibleColumn(b,n,x,A))>o&&0!==I){var L=void 0,R=void 0;-1!==S&&_<=o?(L=S,R=_):-1!==C&&E<=o?(L=C,R=E):(L=I,R=u),m[y++]=L-v,v=L,b=e.nextVisibleColumn(R,n,x,A),S=-1,_=0,C=-1,E=0}if(-1!==S&&(_=e.nextVisibleColumn(_,n,x,A)),-1!==C&&(E=e.nextVisibleColumn(E,n,x,A)),2===k&&(l===c.WrappingIndent.None||I>=p)&&(S=I+1,_=u),4===k&&I<w-1){var O=t.charCodeAt(I+1);2!==g.get(O)&&(S=I+1,_=u)}3===k&&(C=I+1,E=u)}return 0===y?null:(m[y++]=w-v,new h(new r.PrefixSumComputer(a.toUint32Array(m)),d))},e}();t.CharacterHardWrappingLineMapperFactory=d;var h=function(){function e(e,t){this._prefixSums=e,this._wrappedLinesIndent=t}return e.prototype.getOutputLineCount=function(){return this._prefixSums.getCount()},e.prototype.getWrappedLinesIndent=function(){
return this._wrappedLinesIndent},e.prototype.getInputOffsetOfOutputPosition=function(e,t){return 0===e?t:this._prefixSums.getAccumulatedValue(e-1)+t},e.prototype.getOutputPositionOfInputOffset=function(e){var t=this._prefixSums.getIndexOf(e);return new o.OutputPosition(t.index,t.remainder)},e}();t.CharacterHardWrappingLineMapping=h}),define(e[837],t([1,0,14,39,19,44,353,1108,209,387,197,344,836,1106,51,57]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=!0,y=function(e){function t(t,n,i,r){var o=e.call(this)||this;if(o.editorId=t,o.configuration=n,o.model=i,o.hasFocus=!1,o.viewportStartLine=-1,o.viewportStartLineTrackedRange=null,o.viewportStartLineTop=0,m&&o.model.isTooLargeForTokenization())o.lines=new u.IdentityLinesCollection(o.model);else{
var s=o.configuration.editor,a=new p.CharacterHardWrappingLineMapperFactory(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);o.lines=new u.SplitLinesCollection(o.model,a,o.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return o.coordinatesConverter=o.lines.createCoordinatesConverter(),o.viewLayout=o._register(new f.ViewLayout(o.configuration,o.getLineCount(),r)),o._register(o.viewLayout.onDidScroll(function(e){try{o._beginEmit().emit(new d.ViewScrollChangedEvent(e))}finally{o._endEmit()}})),o.decorations=new c.ViewModelDecorations(o.editorId,o.model,o.configuration,o.lines,o.coordinatesConverter),o._registerModelEvents(),o._register(o.configuration.onDidChange(function(e){try{var t=o._beginEmit();o._onConfigurationChanged(t,e)}finally{o._endEmit()}})),
o._register(h.MinimapTokensColorTracker.getInstance().onDidChange(function(){try{o._beginEmit().emit(new d.ViewTokensColorsChangedEvent)}finally{o._endEmit()}})),o}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,v.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var n=null;if(-1!==this.viewportStartLine){var i=new r.Position(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(i)}var o=!1,s=this.configuration.editor;if(this.lines.setWrappingSettings(s.wrappingInfo.wrappingIndent,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new d.ViewFlushedEvent),
e.emit(new d.ViewLineMappingChangedEvent),e.emit(new d.ViewDecorationsChangedEvent),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(o=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new d.ViewDecorationsChangedEvent)),e.emit(new d.ViewConfigurationChangedEvent(t)),this.viewLayout.onConfigurationChanged(t),o&&n){var a=this.coordinatesConverter.convertModelPositionToViewPosition(n),c=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber);this.viewLayout.deltaScrollNow(0,c-this.viewportStartLineTop)}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast(function(t){try{for(var n=e._beginEmit(),i=!1,r=!1,o=t.changes,s=t.versionId,a=0,c=o.length;a<c;a++){var l=o[a];switch(l.changeType){case 1:e.lines.onModelFlushed(),n.emit(new d.ViewFlushedEvent),e.decorations.reset(),e.viewLayout.onFlushed(e.getLineCount()),i=!0;break;case 3:
null!==(g=e.lines.onModelLinesDeleted(s,l.fromLineNumber,l.toLineNumber))&&(n.emit(g),e.viewLayout.onLinesDeleted(g.fromLineNumber,g.toLineNumber)),i=!0;break;case 4:null!==(f=e.lines.onModelLinesInserted(s,l.fromLineNumber,l.toLineNumber,l.detail))&&(n.emit(f),e.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),i=!0;break;case 2:var u=e.lines.onModelLineChanged(s,l.lineNumber,l.detail),h=u[0],p=u[1],f=u[2],g=u[3];r=h,p&&n.emit(p),f&&(n.emit(f),e.viewLayout.onLinesInserted(f.fromLineNumber,f.toLineNumber)),g&&(n.emit(g),e.viewLayout.onLinesDeleted(g.fromLineNumber,g.toLineNumber))}}e.lines.acceptVersionId(s),e.viewLayout.onHeightMaybeChanged(),!i&&r&&(n.emit(new d.ViewLineMappingChangedEvent),n.emit(new d.ViewDecorationsChangedEvent),e.decorations.onLineMappingChanged())}finally{e._endEmit()}if(e.viewportStartLine=-1,e.configuration.setMaxLineNumber(e.model.getLineCount()),!e.hasFocus&&e.model.getAttachedEditorCount()>=2&&e.viewportStartLineTrackedRange){
var v=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(v){var m=e.coordinatesConverter.convertModelPositionToViewPosition(v.getStartPosition()),y=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.deltaScrollNow(0,y-e.viewportStartLineTop)}}})),this._register(this.model.onDidChangeTokens(function(t){for(var n=[],i=0,o=t.ranges.length;i<o;i++){var s=t.ranges[i],a=e.coordinatesConverter.convertModelPositionToViewPosition(new r.Position(s.fromLineNumber,1)).lineNumber,c=e.coordinatesConverter.convertModelPositionToViewPosition(new r.Position(s.toLineNumber,e.model.getLineMaxColumn(s.toLineNumber))).lineNumber;n[i]={fromLineNumber:a,toLineNumber:c}}try{e._beginEmit().emit(new d.ViewTokensChangedEvent(n))}finally{e._endEmit()}})),this._register(this.model.onDidChangeLanguageConfiguration(function(t){try{e._beginEmit().emit(new d.ViewLanguageConfigurationEvent)}finally{e._endEmit()}})),this._register(this.model.onDidChangeOptions(function(t){
if(e.lines.setTabSize(e.model.getOptions().tabSize)){e.decorations.onLineMappingChanged(),e.viewLayout.onFlushed(e.getLineCount());try{var n=e._beginEmit();n.emit(new d.ViewFlushedEvent),n.emit(new d.ViewLineMappingChangedEvent),n.emit(new d.ViewDecorationsChangedEvent)}finally{e._endEmit()}}})),this._register(this.model.onDidChangeDecorations(function(t){e.decorations.onModelDecorationsChanged();try{e._beginEmit().emit(new d.ViewDecorationsChangedEvent)}finally{e._endEmit()}}))},t.prototype.setHiddenAreas=function(e){try{var t=this._beginEmit();this.lines.setHiddenAreas(e)&&(t.emit(new d.ViewFlushedEvent),t.emit(new d.ViewLineMappingChangedEvent),t.emit(new d.ViewDecorationsChangedEvent),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._endEmit()}},t.prototype.getVisibleRanges=function(){var e=this.getCompletelyVisibleViewRange(),t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this.lines.getHiddenAreas()
;if(0===n.length)return[t];for(var i=[],r=0,s=t.startLineNumber,a=t.startColumn,c=t.endLineNumber,l=t.endColumn,u=0,d=n.length;u<d;u++){var h=n[u].startLineNumber,p=n[u].endLineNumber;p<s||(h>c||(s<h&&(i[r++]=new o.Range(s,a,h-1,this.model.getLineMaxColumn(h-1))),s=p+1,a=1))}return(s<c||s===c&&a<l)&&(i[r++]=new o.Range(s,a,c,l)),i},t.prototype.getCompletelyVisibleViewRange=function(){var e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,n=e.completelyVisibleEndLineNumber;return new o.Range(t,this.getLineMinColumn(t),n,this.getLineMaxColumn(n))},t.prototype.getCompletelyVisibleViewRangeAtScrollTop=function(e){var t=this.viewLayout.getLinesViewportDataAtScrollTop(e),n=t.completelyVisibleStartLineNumber,i=t.completelyVisibleEndLineNumber;return new o.Range(n,this.getLineMinColumn(n),i,this.getLineMaxColumn(i))},t.prototype.saveState=function(){
var e=this.viewLayout.saveState(),t=e.scrollTop,n=this.viewLayout.getLineNumberAtVerticalOffset(t),i=this.coordinatesConverter.convertViewPositionToModelPosition(new r.Position(n,this.getLineMinColumn(n))),o=this.viewLayout.getVerticalOffsetForLineNumber(n)-t;return{scrollLeft:e.scrollLeft,firstPosition:i,firstPositionDeltaTop:o}},t.prototype.reduceRestoreState=function(e){if(void 0===e.firstPosition)return this._reduceRestoreStateCompatibility(e);var t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),i=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:i}},t.prototype._reduceRestoreStateCompatibility=function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}},t.prototype.getTabSize=function(){return this.model.getOptions().tabSize},t.prototype.getLineCount=function(){return this.lines.getViewLineCount()},t.prototype.setViewport=function(e,t,n){
this.lines.warmUpLookupCache(e,t),this.viewportStartLine=e;var i=this.coordinatesConverter.convertViewPositionToModelPosition(new r.Position(e,this.getLineMinColumn(e)));this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,new o.Range(i.lineNumber,i.column,i.lineNumber,i.column),v.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges),this.viewportStartLineTop=this.viewLayout.getVerticalOffsetForLineNumber(e)},t.prototype.getActiveIndentGuide=function(e,t,n){return this.lines.getActiveIndentGuide(e,t,n)},t.prototype.getLinesIndentGuides=function(e,t){return this.lines.getViewLinesIndentGuides(e,t)},t.prototype.getLineContent=function(e){return this.lines.getViewLineContent(e)},t.prototype.getLineLength=function(e){return this.lines.getViewLineLength(e)},t.prototype.getLineMinColumn=function(e){return this.lines.getViewLineMinColumn(e)},t.prototype.getLineMaxColumn=function(e){return this.lines.getViewLineMaxColumn(e)},
t.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=i.firstNonWhitespaceIndex(this.getLineContent(e));return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){var t=i.lastNonWhitespaceIndex(this.getLineContent(e));return-1===t?0:t+2},t.prototype.getDecorationsInViewport=function(e){return this.decorations.getDecorationsViewportData(e).decorations},t.prototype.getViewLineRenderingData=function(e,t){var n=this.model.mightContainRTL(),i=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),o=this.lines.getViewLineData(t),s=this.decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return new l.ViewLineRenderingData(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,n,i,o.tokens,s,r)},t.prototype.getViewLineData=function(e){return this.lines.getViewLineData(e)},t.prototype.getMinimapLinesRenderingData=function(e,t,n){var i=this.lines.getViewLinesData(e,t,n);return new l.MinimapLinesRenderingData(this.getTabSize(),i)},
t.prototype.getAllOverviewRulerDecorations=function(e){return this.lines.getAllOverviewRulerDecorations(this.editorId,this.configuration.editor.readOnly,e)},t.prototype.invalidateOverviewRulerColorCache=function(){for(var e=this.model.getOverviewRulerDecorations(),t=0,n=e.length;t<n;t++){e[t].options.overviewRuler._resolvedColor=null}},t.prototype.getValueInRange=function(e,t){var n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)},t.prototype.getModelLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},t.prototype.validateModelPosition=function(e){return this.model.validatePosition(e)},t.prototype.deduceModelPositionRelativeToViewPosition=function(e,t,n){var i=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=n:t+=n);var r=this.model.getOffsetAt(i)+t;return this.model.getPositionAt(r)},t.prototype.getEOL=function(){return this.model.getEOL()},t.prototype.getPlainTextToCopy=function(e,t,n){
var i=this,s=n?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(o.Range.compareRangesUsingStarts);var a=e.filter(function(e){return!e.isEmpty()});if(0===a.length){if(!t)return"";for(var c=e.map(function(e){var t=new r.Position(e.startLineNumber,1);return i.coordinatesConverter.convertViewPositionToModelPosition(t).lineNumber}),l="",u=0;u<c.length;u++)u>0&&c[u-1]===c[u]||(l+=this.model.getLineContent(c[u])+s);return l}for(var d=[],u=0;u<a.length;u++)d.push(this.getValueInRange(a[u],n?v.EndOfLinePreference.CRLF:v.EndOfLinePreference.TextDefined));return 1===d.length?d[0]:d},t.prototype.getHTMLToCopy=function(e,t){if(1===this.model.getLanguageIdentifier().id)return null;if(1!==e.length)return null;var n=this.coordinatesConverter.convertViewRangeToModelRange(e[0]);if(n.isEmpty()){if(!t)return null;var i=n.startLineNumber;n=new o.Range(i,this.model.getLineMinColumn(i),i,this.model.getLineMaxColumn(i))}var r=this.configuration.editor.fontInfo,s=this._getColorMap()
;return'<div style="color: '+s[1]+";background-color: "+s[2]+";font-family: "+r.fontFamily+";font-weight: "+r.fontWeight+";font-size: "+r.fontSize+"px;line-height: "+r.lineHeight+'px;white-space: pre;">'+this._getHTMLToCopy(n,s)+"</div>"},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,o=e.endColumn,s=this.getTabSize(),c="",l=n;l<=r;l++){var u=this.model.getLineTokens(l),d=u.getLineContent(),h=l===n?i-1:0,p=l===r?o-1:d.length;c+=""===d?"<br>":a.tokenizeLineToHTML(d,u.inflate(),t,h,p,s)}return c},t.prototype._getColorMap=function(){for(var e=s.TokenizationRegistry.getColorMap(),t=[null],n=1,i=e.length;n<i;n++)t[n]=g.Color.Format.CSS.formatHex(e[n]);return t},t}(d.ViewEventEmitter);t.ViewModel=y}),define(e[838],t([1,0,8,215,145,7,5,45,66,282,1223]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e){var t=this;this._disposables=[],this._onClick=new o.Emitter,
this.onClick=this._onClick.event,this._futureFixes=new r.CancellationTokenSource,this._domNode=document.createElement("div"),this._domNode.className="lightbulb-glyph",this._editor=e,this._editor.addContentWidget(this),this._disposables.push(this._editor.onDidChangeModel(function(e){return t._futureFixes.cancel()})),this._disposables.push(this._editor.onDidChangeModelLanguage(function(e){return t._futureFixes.cancel()})),this._disposables.push(this._editor.onDidChangeModelContent(function(e){t._model&&t.model.position.lineNumber>=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()})),this._disposables.push(n.addStandardDisposableListener(this._domNode,"click",function(e){t._editor.focus();var i=n.getDomNodePagePosition(t._domNode),r=i.top,o=i.height,s=t._editor.getConfiguration().lineHeight,a=Math.floor(s/3);t._position&&t._position.position.lineNumber<t._model.position.lineNumber&&(a+=s),t._onClick.fire({x:e.posx,y:r+o+a})})),
this._disposables.push(n.addDisposableListener(this._domNode,"mouseenter",function(e){if(1==(1&e.buttons)){t.hide();var n=new i.GlobalMouseMoveMonitor;n.startMonitoring(i.standardMouseMoveMerger,function(){},function(){n.dispose()})}})),this._disposables.push(this._editor.onDidChangeConfiguration(function(e){e.contribInfo&&!t._editor.getConfiguration().contribInfo.lightbulbEnabled&&t.hide()}))}return e.prototype.dispose=function(){s.dispose(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"LightBulbWidget"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){var t=this;!this._position||e.position&&this._position.position.lineNumber===e.position.lineNumber?this._futureFixes&&this._futureFixes.cancel():this.hide(),this._futureFixes=new r.CancellationTokenSource;var n=this._futureFixes.token;this._model=e
;var i=this._model.rangeOrSelection;this._model.actions.done(function(e){!n.isCancellationRequested&&e&&e.length>0?i.isEmpty()&&e.every(function(e){return e.kind&&l.CodeActionKind.Refactor.contains(e.kind)})?t.hide():t._show():t.hide()},function(e){t.hide()})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}),e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var n=this._model.position.lineNumber,i=this._editor.getModel();if(i){var r=i.getOptions().tabSize,o=i.getLineContent(n),s=c.TextModel.computeIndentLevel(o,r),a=n;t.fontInfo.spaceWidth*s>22||(n>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},
e._posPref=[a.ContentWidgetPositionPreference.EXACT],e}();t.LightBulbWidget=u}),define(e[389],t([1,0,44,18,4,110,19,113,20,14,9,50]),function(e,t,i,r,o,s,a,c,l,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(){}return e.findId=function(e,t){var n;"string"==typeof e?n=t.id+"/"+e:(n=t.id+"/"+e.name,void 0!==t.children[n]&&(n=t.id+"/"+e.name+"_"+e.range.startLineNumber+"_"+e.range.startColumn));for(var i=n,r=0;void 0!==t.children[i];r++)i=n+"_"+r;return i},e.getElementById=function(t,n){if(t){var i=u.commonPrefixLength(t,n.id);if(i===t.length)return n;if(!(i<n.id.length))for(var r in n.children){var o=e.getElementById(t,n.children[r]);if(o)return o}}},e.size=function(t){var n=1;for(var i in t.children)n+=e.size(t.children[i]);return n},e}();t.TreeElement=p;var f=function(e){function t(t,n,i){var r=e.call(this)||this;return r.id=t,r.parent=n,r.symbol=i,r.children=Object.create(null),r.score=[0,[]],r}return n(t,e),t}(p);t.OutlineElement=f;var g=function(e){
function t(t,n,i,r){var o=e.call(this)||this;return o.id=t,o.parent=n,o.provider=i,o.providerIndex=r,o.children=Object.create(null),o}return n(t,e),t.prototype.updateMatches=function(e,t){for(var n in this.children)t=this._updateMatches(e,this.children[n],t);return t},t.prototype._updateMatches=function(e,t,n){t.score=s.fuzzyScore(e,t.symbol.name,void 0,!0),t.score&&(!n||t.score[0]>n.score[0])&&(n=t);for(var i in t.children){var r=t.children[i];n=this._updateMatches(e,r,n),!t.score&&r.score&&(t.score=[0,[]])}return n},t.prototype.getItemEnclosingPosition=function(e){return this._getItemEnclosingPosition(e,this.children)},t.prototype._getItemEnclosingPosition=function(e,t){for(var n in t){var i=t[n];if(a.Range.containsPosition(i.symbol.range,e))return this._getItemEnclosingPosition(e,i.children)||i}},t.prototype.updateMarker=function(e){for(var t in this.children)this._updateMarker(e,this.children[t])},t.prototype._updateMarker=function(e,t){t.marker=void 0
;var n,i=l.binarySearch(e,t.symbol.range,a.Range.compareRangesUsingStarts);i<0?(n=~i)>0&&a.Range.areIntersecting(e[n-1],t.symbol.range)&&(n-=1):n=i;for(var r,o=[];n<e.length&&a.Range.areIntersecting(t.symbol.range,e[n]);n++){var s=e[n];o.push(s),e[n]=void 0,(!r||s.severity>r)&&(r=s.severity)}for(var c in t.children)this._updateMarker(o,t.children[c]);r&&(t.marker={count:o.length,topSev:r}),l.coalesce(e,!0)},t}(p);t.OutlineGroup=g;var v=function(e){function t(t){var n=e.call(this)||this;return n.textModel=t,n.id="root",n.parent=void 0,n._groups=Object.create(null),n.children=Object.create(null),n}return n(t,e),t.create=function(e){var n=this._keys.for(e),i=t._requests.get(n);return i||(i={promiseCnt:0,promise:t._create(e),model:void 0},t._requests.set(n,i)),i.model?o.TPromise.as(i.model):(i.promiseCnt+=1,new o.TPromise(function(e,r){i.promise.then(function(t){i.model=t,e(t)},function(e){t._requests.delete(n),r(e)})},function(){0==--i.promiseCnt&&(i.promise.cancel(),t._requests.delete(n))}))},
t._create=function(e){var n=new t(e),s=i.DocumentSymbolProviderRegistry.ordered(e).map(function(e,i){var o=p.findId("provider_"+i,n),s=new g(o,n,e,i);return r.asWinJsPromise(function(t){return e.provideDocumentSymbols(n.textModel,t)}).then(function(e){if(!l.isFalsyOrEmpty(e))for(var n=0,i=e;n<i.length;n++){var r=i[n];t._makeOutlineElement(r,s)}return s},function(e){return d.onUnexpectedExternalError(e),s}).then(function(e){n._groups[o]=e})});return o.TPromise.join(s).then(function(){var e=0;for(var t in n._groups){i=n._groups[t];void 0===c.first(i.children)?delete n._groups[t]:e+=1}if(1!==e)n.children=n._groups;else{var i=c.first(n._groups);for(var t in i.children){var r=i.children[t];r.parent=n,n.children[r.id]=r}}return n})},t._makeOutlineElement=function(e,n){var i=p.findId(e,n),r=new f(i,n,e);if(e.children)for(var o=0,s=e.children;o<s.length;o++){var a=s[o];t._makeOutlineElement(a,r)}n.children[r.id]=r},t.get=function(e){for(;e;){if(e instanceof t)return e;e=e.parent}},t.prototype.dispose=function(){},
t.prototype.adopt=function(e){return this.textModel.uri.toString()===e.textModel.uri.toString()&&(c.size(this._groups)===c.size(e._groups)&&(this._groups=e._groups,this.children=e.children,!0))},t.prototype.updateMatches=function(e){var t;for(var n in this._groups)t=this._groups[n].updateMatches(e,t);return t},t.prototype.getItemEnclosingPosition=function(e,t){var n;if(t)for(var i=t.parent;i&&!n;)i instanceof g&&(n=i),i=i.parent;var r=void 0;for(var o in this._groups){var s=this._groups[o];if((r=s.getItemEnclosingPosition(e))&&(!n||n===s))break}return r},t.prototype.getItemById=function(e){return p.getElementById(e,this)},t.prototype.updateMarker=function(e){e.sort(a.Range.compareRangesUsingStarts);for(var t in this._groups)this._groups[t].updateMarker(e.slice(0))},t._requests=new h.LRUCache(9,.75),t._keys=new(function(){function e(){this._counter=1,this._data=new WeakMap}return e.prototype.for=function(e){return e.id+"/"+e.getVersionId()+"/"+this._hash(i.DocumentSymbolProviderRegistry.all(e))},
e.prototype._hash=function(e){for(var t="",n=0,i=e;n<i.length;n++){var r=i[n],o=this._data.get(r);void 0===o&&(o=this._counter++,this._data.set(r,o)),t+=o}return t},e}()),t}(p);t.OutlineModel=v}),define(e[840],t([1,0,57,66]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION},e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),
e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}();t.FoldingDecorationProvider=r}),define(e[841],t([1,0,372,66,4,114]),function(e,t,n,i,r,o){"use strict";function s(e,t,n,r){void 0===r&&(r=a);var o=e.getOptions().tabSize,s=new l(r),c=void 0;n&&(c=new RegExp("("+n.start.source+")|(?:"+n.end.source+")"));var u=[];u.push({indent:-1,line:e.getLineCount()+1,marker:!1});for(var d=e.getLineCount();d>0;d--){var h=e.getLineContent(d),p=i.TextModel.computeIndentLevel(h,o),f=u[u.length-1];if(-1!==p){var g=void 0;if(c&&(g=h.match(c))){if(!g[1]){u.push({indent:-2,line:d,marker:!0});continue}for(var v=u.length-1;v>0&&!u[v].marker;)v--;if(v>0){u.length=v+1,f=u[v],s.insertFirst(d,f.line,p),f.marker=!1,f.indent=p,
f.line=d;continue}}if(f.indent>p){do{u.pop(),f=u[u.length-1]}while(f.indent>p);var m=f.line-1;m-d>=1&&s.insertFirst(d,m,p)}f.indent===p?f.line=d:u.push({indent:p,line:d,marker:!1})}else t&&!f.marker&&(f.line=d)}return s.toIndentRanges(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=5e3;t.ID_INDENT_PROVIDER="indent";var c=function(){function e(e){this.editorModel=e,this.id=t.ID_INDENT_PROVIDER}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=o.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&t.offSide,i=t&&t.markers;return r.TPromise.as(s(this.editorModel,n,i))},e}();t.IndentRangeProvider=c;var l=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,i){if(!(e>n.MAX_LINE_NUMBER||t>n.MAX_LINE_NUMBER)){var r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,
i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),r=new Uint32Array(this._length),o=this._length-1,s=0;o>=0;o--,s++)t[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new n.FoldingRegions(t,r)}for(var a=0,c=this._indentOccurrences.length,o=0;o<this._indentOccurrences.length;o++){var l=this._indentOccurrences[o];if(l){if(l+a>this._foldingRangesLimit){c=o;break}a+=l}}for(var u=e.getOptions().tabSize,t=new Uint32Array(this._foldingRangesLimit),r=new Uint32Array(this._foldingRangesLimit),o=this._length-1,s=0;o>=0;o--){var d=this._startIndexes[o],h=e.getLineContent(d),p=i.TextModel.computeIndentLevel(h,u);(p<c||p===c&&a++<this._foldingRangesLimit)&&(t[s]=d,r[s]=this._endIndexes[o],s++)}return new n.FoldingRegions(t,r)},e}();t.RangesCollector=l,t.computeRanges=s}),define(e[842],t([1,0,14,19,60,114,371,530,208]),function(e,t,n,i,r,o,s,a,c){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n){this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._moveEndLineSelectionShrink=!1}return e.prototype.getEditOperations=function(e,t){var s=e.getLineCount();if((!this._isMovingDown||this._selection.endLineNumber!==s)&&(this._isMovingDown||1!==this._selection.startLineNumber)){this._moveEndPositionDown=!1;var c=this._selection;c.startLineNumber<c.endLineNumber&&1===c.endColumn&&(this._moveEndPositionDown=!0,c=c.setEndPosition(c.endLineNumber-1,e.getLineMaxColumn(c.endLineNumber-1)));var l=e.getOptions().tabSize,u=e.getOptions().insertSpaces,d=this.buildIndentConverter(l),h={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:null};if(c.startLineNumber===c.endLineNumber&&1===e.getLineMaxColumn(c.startLineNumber)){
var p=c.startLineNumber,f=this._isMovingDown?p+1:p-1;1===e.getLineMaxColumn(f)?t.addEditOperation(new i.Range(1,1,1,1),null):(t.addEditOperation(new i.Range(p,1,p,1),e.getLineContent(f)),t.addEditOperation(new i.Range(f,1,f,e.getLineMaxColumn(f)),null)),c=new r.Selection(f,1,f,1)}else{var g,v=void 0;if(this._isMovingDown){g=c.endLineNumber+1,v=e.getLineContent(g),t.addEditOperation(new i.Range(g-1,e.getLineMaxColumn(g-1),g,e.getLineMaxColumn(g)),null);var m=v;if(this.shouldAutoIndent(e,c)){var y=this.matchEnterRule(e,d,l,g,c.startLineNumber-1);if(null!==y){var b=n.getLeadingWhitespace(e.getLineContent(g)),S=y+a.getSpaceCnt(b,l),_=a.generateIndent(S,l,u);m=_+this.trimLeft(v)}else{h.getLineContent=function(t){return t===c.startLineNumber?e.getLineContent(g):e.getLineContent(t)};var C=o.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(g,1),c.startLineNumber,d);if(null!==C){b=n.getLeadingWhitespace(e.getLineContent(g));if((S=a.getSpaceCnt(C,l))!==(x=a.getSpaceCnt(b,l))){
_=a.generateIndent(S,l,u);m=_+this.trimLeft(v)}}}t.addEditOperation(new i.Range(c.startLineNumber,1,c.startLineNumber,1),m+"\n");if(null!==(w=this.matchEnterRule(e,d,l,c.startLineNumber,c.startLineNumber,m)))0!==w&&this.getIndentEditsOfMovingBlock(e,t,c,l,u,w);else{h.getLineContent=function(t){return t===c.startLineNumber?m:t>=c.startLineNumber+1&&t<=c.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var E=o.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(g,1),c.startLineNumber+1,d);if(null!==E){b=n.getLeadingWhitespace(e.getLineContent(c.startLineNumber));if((S=a.getSpaceCnt(E,l))!==(x=a.getSpaceCnt(b,l))){k=S-x;this.getIndentEditsOfMovingBlock(e,t,c,l,u,k)}}}}else t.addEditOperation(new i.Range(c.startLineNumber,1,c.startLineNumber,1),m+"\n")}else if(g=c.startLineNumber-1,v=e.getLineContent(g),t.addEditOperation(new i.Range(g,1,g+1,1),null),
t.addEditOperation(new i.Range(c.endLineNumber,e.getLineMaxColumn(c.endLineNumber),c.endLineNumber,e.getLineMaxColumn(c.endLineNumber)),"\n"+v),this.shouldAutoIndent(e,c)){h.getLineContent=function(t){return t===g?e.getLineContent(c.startLineNumber):e.getLineContent(t)};var w=this.matchEnterRule(e,d,l,c.startLineNumber,c.startLineNumber-2);if(null!==w)0!==w&&this.getIndentEditsOfMovingBlock(e,t,c,l,u,w);else{var I=o.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(c.startLineNumber,1),g,d);if(null!==I){var T=n.getLeadingWhitespace(e.getLineContent(c.startLineNumber)),S=a.getSpaceCnt(I,l),x=a.getSpaceCnt(T,l);if(S!==x){var k=S-x;this.getIndentEditsOfMovingBlock(e,t,c,l,u,k)}}}}}this._selectionId=t.trackSelection(c)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var n=s.ShiftCommand.shiftIndentCount(t,t.length+1,e),i="",r=0;r<n;r++)i+="\t";return i},unshiftIndent:function(t){
for(var n=s.ShiftCommand.unshiftIndentCount(t,t.length+1,e),i="",r=0;r<n;r++)i+="\t";return i}}},e.prototype.matchEnterRule=function(e,t,r,s,l,u){for(var d=l;d>=1;){var h=void 0;h=d===l&&void 0!==u?u:e.getLineContent(d);if(n.lastNonWhitespaceIndex(h)>=0)break;d--}if(d<1||s>e.getLineCount())return null;var p=e.getLineMaxColumn(d),f=o.LanguageConfigurationRegistry.getEnterAction(e,new i.Range(d,p,d,p));if(f){var g=f.indentation,v=f.enterAction;v.indentAction===c.IndentAction.None?g=f.indentation+v.appendText:v.indentAction===c.IndentAction.Indent?g=f.indentation+v.appendText:v.indentAction===c.IndentAction.IndentOutdent?g=f.indentation:v.indentAction===c.IndentAction.Outdent&&(g=t.unshiftIndent(f.indentation)+v.appendText);var m=e.getLineContent(s);if(this.trimLeft(m).indexOf(this.trimLeft(g))>=0){var y=n.getLeadingWhitespace(e.getLineContent(s)),b=n.getLeadingWhitespace(g);2&o.LanguageConfigurationRegistry.getIndentMetadata(e,s)&&(b=t.unshiftIndent(b));return a.getSpaceCnt(b,r)-a.getSpaceCnt(y,r)}}return null
},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==o.LanguageConfigurationRegistry.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,r,o,s,c){for(var l=r.startLineNumber;l<=r.endLineNumber;l++){var u=e.getLineContent(l),d=n.getLeadingWhitespace(u),h=a.getSpaceCnt(d,o)+c,p=a.generateIndent(h,o,s);p!==d&&(t.addEditOperation(new i.Range(l,1,l,d.length+1),p),l===r.endLineNumber&&r.endColumn<=d.length+1&&""===p&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.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}()
;t.MoveLinesCommand=l}),define(e[843],t([1,0,4,19,47,1149]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this._modelService=e}return e.prototype.getRangesToPosition=function(e,t){return n.TPromise.as(this.getRangesToPositionSync(e,t))},e.prototype.getRangesToPositionSync=function(e,t){var n=this._modelService.getModel(e),i=[];return n&&this._doGetRangesToPosition(n,t).forEach(function(e){i.push({type:void 0,range:e})}),i},e.prototype._doGetRangesToPosition=function(e,t){var n,r,s=o.build(e);n=o.find(s,t);for(var a=[];n;)r&&i.Range.equalsRange(r,n.range)||a.push(n.range),r=n.range,n=n.parent;return a=a.reverse()},e=a([l(0,r.IModelService)],e)}();t.TokenSelectionSupport=s}),define(e[221],t([1,0,5,24,8,152,19,51,66,149,57,816]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=new a.Color(new a.RGBA(0,122,204)),h={showArrow:!0,showFrame:!0,className:"",frameColor:d,arrowColor:d,
keepEditorSelection:!1},p=function(){function e(e,t,n,i,r,o){this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=r,this._onComputedHeight=o}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}();t.ViewZoneDelegate=p;var f=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}();t.OverlayWidgetDelegate=f;var g=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[]}return e.prototype.dispose=function(){this.hide(),r.removeCSSRulesContainingSelector(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){
this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){r.removeCSSRulesContainingSelector(this._ruleName),r.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; ")},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:s.Range.fromPositions(e),options:{className:this._ruleName,stickiness:u.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new l.IdGenerator(".arrow-decoration-"),e}(),v=function(){function e(e,t){void 0===t&&(t={});var n=this;this._positionMarkerId=[],this._disposables=[],this._isShowing=!1,this.editor=e,this.options=i.deepClone(t),i.mixin(this.options,h,!1),this.domNode=document.createElement("div"),
this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.push(this.editor.onDidLayoutChange(function(e){var t=n._getWidth(e);n.domNode.style.width=t+"px",n.domNode.style.left=n._getLeft(e)+"px",n._onWidth(t)}))}return e.prototype.dispose=function(){var e=this;n.dispose(this._disposables),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(function(t){t.removeZone(e._viewZone.id),e._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[]},e.prototype.create=function(){r.addClass(this.domNode,"zone-widget"),r.addClass(this.domNode,this.options.className),this.container=document.createElement("div"),r.addClass(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new g(this.editor),this._disposables.push(this._arrow)),
this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n)),this._resizeSash.layout()},
Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var n=s.Range.isIRange(e)?e:new s.Range(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:c.ModelDecorationOptions.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones(function(t){t.removeZone(e._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t},
e.prototype._showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn},r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=o+"px",this.domNode.style.left=this._getLeft(r)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,c=this.editor.getLayoutInfo().height/a*.8;t>=c&&(t=c);var l=0,u=0;if(this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(u=Math.round(a/9)),this.editor.changeViewZones(function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new p(s,i.lineNumber,i.column,t,function(e){return n._onViewZoneTop(e)},function(e){return n._onViewZoneHeight(e)}),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new f("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),
n.editor.addOverlayWidget(n._overlayWidget)}),this.options.showFrame){var d=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=d+"px",this.container.style.borderBottomWidth=d+"px"}var h=t*a-this._decoratingElementsHeight();this.container.style.top=l+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden",this._doLayout(h,o),this.options.keepEditorSelection||this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(g)},e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),r.addClass(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones(function(n){t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id)})},e.prototype._initSash=function(){var e=this
;this._resizeSash=new o.Sash(this.domNode,this,{orientation:o.Orientation.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=o.SashState.Disabled);var t;this._disposables.push(this._resizeSash.onDidStart(function(n){e._viewZone&&(t={startY:n.startY,heightInLines:e._viewZone.heightInLines})})),this._disposables.push(this._resizeSash.onDidEnd(function(){t=void 0})),this._disposables.push(this._resizeSash.onDidChange(function(n){if(t){var i=(n.currentY-t.startY)/e.editor.getConfiguration().lineHeight,r=i<0?Math.ceil(i):Math.floor(i),o=t.heightInLines+r;o>5&&o<35&&e._relayout(o)}}))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}();t.ZoneWidget=v}),define(e[135],t([1,0,6]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.IClipboardService=n.createDecorator("clipboardService")}),define(e[846],t([1,0,14,57,105,226,60,19,20,5,458,66,135,6,813]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){this._nestingLevel=1,this._editor=e,this._snippet=t,this._offset=n,this._placeholderGroups=c.groupBy(t.placeholders,o.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}return e.prototype.dispose=function(){if(this._placeholderDecorations){var e=[];this._placeholderDecorations.forEach(function(t){return e.push(t)}),this._editor.deltaDecorations(e,[])}this._placeholderGroups.length=0},e.prototype._initDecorations=function(){var t=this;if(!this._placeholderDecorations){this._placeholderDecorations=new Map;var n=this._editor.getModel();this._editor.changeDecorations(function(i){for(var r=0,o=t._snippet.placeholders;r<o.length;r++){
var s=o[r],c=t._snippet.offset(s),l=t._snippet.fullLen(s),u=a.Range.fromPositions(n.getPositionAt(t._offset+c),n.getPositionAt(t._offset+c+l)),d=s.isFinalTabstop?e._decor.inactiveFinal:e._decor.inactive,h=i.addDecoration(u,d);t._placeholderDecorations.set(s,h)}})}},e.prototype.move=function(t){var n=this;if(this._initDecorations(),this._placeholderGroupsIdx>=0){for(var i=[],o=0,a=this._placeholderGroups[this._placeholderGroupsIdx];o<a.length;o++){var c=a[o];if(c.transform){var l=this._placeholderDecorations.get(c),u=this._editor.getModel().getDecorationRange(l),d=this._editor.getModel().getValueInRange(u);i.push(r.EditOperation.replaceMove(u,c.transform.resolve(d)))}}i.length>0&&this._editor.executeEdits("snippet.placeholderTransform",i)}return!0===t&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?this._placeholderGroupsIdx+=1:!1===t&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations(function(t){
for(var i=new Set,r=[],o=0,a=n._placeholderGroups[n._placeholderGroupsIdx];o<a.length;o++){var c=a[o],l=n._placeholderDecorations.get(c),u=n._editor.getModel().getDecorationRange(l);r.push(new s.Selection(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)),t.changeDecorationOptions(l,c.isFinalTabstop?e._decor.activeFinal:e._decor.active),i.add(c);for(var d=0,h=n._snippet.enclosingPlaceholders(c);d<h.length;d++){var p=h[d],f=n._placeholderDecorations.get(p);t.changeDecorationOptions(f,p.isFinalTabstop?e._decor.activeFinal:e._decor.active),i.add(p)}}return n._placeholderDecorations.forEach(function(n,r){i.has(r)||t.changeDecorationOptions(n,r.isFinalTabstop?e._decor.inactiveFinal:e._decor.inactive)}),r})},Object.defineProperty(e.prototype,"isAtFirstPlaceholder",{get:function(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAtLastPlaceholder",{get:function(){
return this._placeholderGroupsIdx===this._placeholderGroups.length-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPlaceholder",{get:function(){return this._snippet.placeholders.length>0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,n=this._placeholderGroups;t<n.length;t++)for(var i=void 0,r=0,o=n[t];r<o.length;r++){var s=o[r];if(s.isFinalTabstop)break;i||(i=[],e.set(s.index,i));var a=this._placeholderDecorations.get(s),c=this._editor.getModel().getDecorationRange(a);if(!c){e.delete(s.index);break}i.push(c)}return e},Object.defineProperty(e.prototype,"choice",{get:function(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice},enumerable:!0,configurable:!0}),e.prototype.merge=function(t){var n=this,i=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(function(r){for(var s=0,l=n._placeholderGroups[n._placeholderGroupsIdx];s<l.length;s++){var u=l[s],d=t.shift()
;console.assert(!d._placeholderDecorations);for(var h=0,p=d._snippet.placeholderInfo.all;h<p.length;h++){var f=p[h];f.isFinalTabstop?f.index=u.index+(d._snippet.placeholderInfo.last.index+1)/n._nestingLevel:f.index=u.index+f.index/n._nestingLevel}n._snippet.replace(u,d._snippet.children);var g=n._placeholderDecorations.get(u);r.removeDecoration(g),n._placeholderDecorations.delete(u);for(var v=0,m=d._snippet.placeholders;v<m.length;v++){var y=m[v],b=d._snippet.offset(y),S=d._snippet.fullLen(y),_=a.Range.fromPositions(i.getPositionAt(d._offset+b),i.getPositionAt(d._offset+b+S)),C=r.addDecoration(_,e._decor.inactive);n._placeholderDecorations.set(y,C)}}n._placeholderGroups=c.groupBy(n._snippet.placeholders,o.Placeholder.compareByIndex)})},e.prototype.getEnclosingRange=function(){var e,t=this._editor.getModel();return this._placeholderDecorations.forEach(function(n){var i=t.getDecorationRange(n);e=e?e.plusRange(i):i}),e},e._decor={active:d.ModelDecorationOptions.register({
stickiness:i.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,className:"snippet-placeholder"}),inactive:d.ModelDecorationOptions.register({stickiness:i.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"snippet-placeholder"}),activeFinal:d.ModelDecorationOptions.register({stickiness:i.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"finish-snippet-placeholder"}),inactiveFinal:d.ModelDecorationOptions.register({stickiness:i.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"finish-snippet-placeholder"})},e}();t.OneSnippet=f;var g=function(){function e(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0),this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._overwriteBefore=n,this._overwriteAfter=i}return e.adjustWhitespace2=function(e,t,i){var r=e.getLineContent(t.lineNumber),s=n.getLeadingWhitespace(r,0,t.column-1);i.walk(function(t){if(t instanceof o.Text&&!(t.parent instanceof o.Choice)){for(var i=t.value.split(/\r\n|\r|\n/),r=1;r<i.length;r++){
var a=n.getLeadingWhitespace(i[r]);i[r]=e.normalizeIndentation(s+a)+i[r].substr(a.length)}var c=i.join(e.getEOL());c!==t.value&&t.parent.replace(t,[new o.Text(c)])}return!0})},e.adjustSelection=function(e,t,n,i){if(0!==n||0!==i){var r=t.positionLineNumber,o=t.positionColumn,a=o-n,c=o+i,l=e.validateRange({startLineNumber:r,startColumn:a,endLineNumber:r,endColumn:c});t=s.Selection.createWithDirection(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn,t.getDirection())}return t},e.createEditsAndSnippets=function(t,n,i,s,c){for(var l=t.getModel(),d=[],g=[],v=new u.ModelBasedVariableResolver(l),m=t.invokeWithinContext(function(e){return e.get(h.IClipboardService,p.optional)}),y=0,b=l.getValueInRange(e.adjustSelection(l,t.getSelection(),i,0)),S=l.getValueInRange(e.adjustSelection(l,t.getSelection(),0,s)),_=t.getSelections().map(function(e,t){return{selection:e,idx:t}}).sort(function(e,t){return a.Range.compareRangesUsingStarts(e.selection,t.selection)}),C=0,E=_;C<E.length;C++){
var w=E[C],I=w.selection,T=w.idx,x=e.adjustSelection(l,I,i,0),k=e.adjustSelection(l,I,0,s);b!==l.getValueInRange(x)&&(x=I),S!==l.getValueInRange(k)&&(k=I);var D=I.setStartPosition(x.startLineNumber,x.startColumn).setEndPosition(k.endLineNumber,k.endColumn),A=(new o.SnippetParser).parse(n,!0,c),L=D.getStartPosition();e.adjustWhitespace2(l,L,A),A.resolveVariables(new u.CompositeSnippetVariableResolver([v,new u.ClipboardBasedVariableResolver(m,T,_.length),new u.SelectionBasedVariableResolver(l,I),new u.TimeBasedVariableResolver]));var R=l.getOffsetAt(L)+y;y+=A.toString().length-l.getValueLengthInRange(D),d[T]=r.EditOperation.replace(D,A.toString()),g[T]=new f(t,A,R)}return{edits:d,snippets:g}},e.prototype.dispose=function(){l.dispose(this._snippets)},e.prototype._logInfo=function(){return'template="'+this._template+'", merged_templates="'+this._templateMerges.join(" -> ")+'"'},e.prototype.insert=function(){
var t=this,n=this._editor.getModel(),i=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),r=i.edits,o=i.snippets;this._snippets=o;var a=n.pushEditOperations(this._editor.getSelections(),r,function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map(function(e){return s.Selection.fromPositions(e.range.getEndPosition())})});this._editor.setSelections(a),this._editor.revealRange(a[0])},e.prototype.merge=function(t,n,i){var r=this;void 0===n&&(n=0),void 0===i&&(i=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var o=e.createEditsAndSnippets(this._editor,t,n,i,!0),a=o.edits,c=o.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),a,function(e){for(var t=0,n=r._snippets;t<n.length;t++){n[t].merge(c)}return console.assert(0===c.length),r._snippets[0].hasPlaceholder?r._move(void 0):e.map(function(e){
return s.Selection.fromPositions(e.range.getEndPosition())})}))},e.prototype.next=function(){var e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())},e.prototype.prev=function(){var e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())},e.prototype._move=function(e){for(var t=[],n=0,i=this._snippets;n<i.length;n++){var r=i[n].move(e);t.push.apply(t,r)}return t},Object.defineProperty(e.prototype,"isAtFirstPlaceholder",{get:function(){return this._snippets[0].isAtFirstPlaceholder},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAtLastPlaceholder",{get:function(){return this._snippets[0].isAtLastPlaceholder},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPlaceholder",{get:function(){return this._snippets[0].hasPlaceholder},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"choice",{get:function(){
return this._snippets[0].choice},enumerable:!0,configurable:!0}),e.prototype.isSelectionWithinPlaceholders=function(){if(!this.hasPlaceholder)return!1;var e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;for(var t,n=function(n){var i=n.computePossibleSelections();if(t||(t=new Map,i.forEach(function(n,i){n.sort(a.Range.compareRangesUsingStarts);for(var r=0,o=e;r<o.length;r++){var s=o[r];if(n[0].containsRange(s)){t.set(i,[]);break}}})),0===t.size)return{value:!1};t.forEach(function(e,t){e.push.apply(e,i.get(t))})},i=0,r=this._snippets;i<r.length;i++){var o=n(r[i]);if("object"==typeof o)return o.value}return e.sort(a.Range.compareRangesUsingStarts),t.forEach(function(n,i){if(n.length===e.length){n.sort(a.Range.compareRangesUsingStarts);for(var r=0;r<n.length;r++)if(!n[r].containsRange(e[r]))return void t.delete(i)}else t.delete(i)}),t.size>0},e.prototype.getEnclosingRange=function(){for(var e,t=0,n=this._snippets;t<n.length;t++){var i=n[t].getEnclosingRange();e=e?e.plusRange(i):i}
return e},e}();t.SnippetSession=g}),define(e[29],t([1,0,4,30,6,363]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICommandService=r.createDecorator("commandService"),t.CommandsRegistry=new(function(){function e(){this._commands=new Map}return e.prototype.registerCommand=function(e,t){var n=this;if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){for(var r=[],s=0,a=e.description.args;s<a.length;s++){var c=a[s];r.push(c.constraint)}var l=e.handler;e.handler=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i.validateConstraints(t,r),l.apply(void 0,[e].concat(t))}}var u=e.id,d=this._commands.get(u);d||(d=new o.LinkedList,this._commands.set(u,d));var h=d.unshift(e);return{dispose:function(){h(),n._commands.get(u).isEmpty()&&n._commands.delete(u)}}},e.prototype.getCommand=function(e){var t=this._commands.get(e)
;if(t&&!t.isEmpty())return t.iterator().next().value},e.prototype.getCommands=function(){var e=this,t=Object.create(null);return this._commands.forEach(function(n,i){t[i]=e.getCommand(i)}),t},e}()),t.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:function(){return{dispose:function(){}}},executeCommand:function(){return n.TPromise.as(void 0)}}}),define(e[848],t([1,0,9,10,4,19,44,18,29,47]),function(e,t,n,i,r,o,s,a,c,l){"use strict";function u(e){var t=[],i=s.LinkProviderRegistry.ordered(e).reverse().map(function(i){return a.asWinJsPromise(function(t){return i.provideLinks(e,t)}).then(function(e){if(Array.isArray(e)){var n=e.map(function(e){return new d(e,i)});t=function(e,t){var n,i,r,s,a=[];for(n=0,r=0,i=e.length,s=t.length;n<i&&r<s;){var c=e[n],l=t[r];if(o.Range.areIntersectingOrTouching(c.range,l.range))n++;else{o.Range.compareRangesUsingStarts(c.range,l.range)<0?(a.push(c),n++):(a.push(l),r++)}}for(;n<i;n++)a.push(e[n]);for(;r<s;r++)a.push(t[r]);return a}(t,n)}},n.onUnexpectedExternalError)
});return r.TPromise.join(i).then(function(){return t})}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this._link=e,this._provider=t}return e.prototype.toJSON=function(){return{range:this.range,url:this.url}},Object.defineProperty(e.prototype,"range",{get:function(){return this._link.range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._link.url},enumerable:!0,configurable:!0}),e.prototype.resolve=function(){var e=this;if(this._link.url)try{return r.TPromise.as(i.default.parse(this._link.url))}catch(e){return r.TPromise.wrapError(new Error("invalid"))}return"function"==typeof this._provider.resolveLink?a.asWinJsPromise(function(t){return e._provider.resolveLink(e._link,t)}).then(function(t){return e._link=t||e._link,e._link.url?e.resolve():r.TPromise.wrapError(new Error("missing"))}):r.TPromise.wrapError(new Error("missing"))},e}();t.Link=d,t.getLinks=u,
c.CommandsRegistry.registerCommand("_executeLinkProvider",function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0];if(r instanceof i.default){var o=e.get(l.IModelService).getModel(r);if(o)return u(o)}})}),define(e[15],t([1,0,6,14]),function(e,t,i,r){"use strict";function o(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case s.Defined:case s.Not:case s.Equals:case s.NotEquals:case s.Regex:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And",e[e.Regex=6]="Regex"}(s=t.ContextKeyExprType||(t.ContextKeyExprType={}));var a=function(){function e(){}return e.has=function(e){return new c(e)},e.equals=function(e,t){return new l(e,t)},e.notEquals=function(e,t){return new u(e,t)},e.regex=function(e,t){return new h(e,t)},e.not=function(e){return new d(e)},e.and=function(){
for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new p(e)},e.deserialize=function(e){var t=this;if(!e)return null;var n=e.split("&&");return new p(n.map(function(e){return t._deserializeOne(e)})).normalize()},e._deserializeOne=function(e){if((e=e.trim()).indexOf("!=")>=0){t=e.split("!=");return new u(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){t=e.split("==");return new l(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){var t=e.split("=~");return new h(t[0].trim(),this._deserializeRegexValue(t[1]))}return/^\!\s*/.test(e)?new d(e.substr(1).trim()):new c(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e._deserializeRegexValue=function(e){if(r.isFalsyOrWhitespace(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null
;var i=e.slice(t+1,n),o="i"===e[n+1]?"i":"";try{return new RegExp(i,o)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();t.ContextKeyExpr=a;var c=function(){function e(e){this.key=e}return e.prototype.getType=function(){return s.Defined},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyDefinedExpr=c;var l=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return s.Equals},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){
return e.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new c(this.key):new d(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" == '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyEqualsExpr=l;var u=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return s.NotEquals},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new d(this.key):new c(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" != '"+this.value+"'"},
e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotEqualsExpr=u;var d=function(){function e(e){this.key=e}return e.prototype.getType=function(){return s.Not},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return"!"+this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotExpr=d;var h=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return s.Regex},e.prototype.cmp=function(e){if(this.key<e.key)return-1;if(this.key>e.key)return 1;var t=this.regexp?this.regexp.source:void 0;return t<e.regexp.source?-1:t>e.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:void 0;return this.key===t.key&&n===t.regexp.source}return!1},e.prototype.evaluate=function(e){
return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){var e=this.regexp?"/"+this.regexp.source+"/"+(this.regexp.ignoreCase?"i":""):"/invalid/";return this.key+" =~ "+e},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyRegexExpr=h;var p=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return s.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(t.expr[n]))return!1;return!0}return!1},e.prototype.evaluate=function(e){for(var t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0},e._normalizeArr=function(t){var n=[];if(t){for(var i=0,r=t.length;i<r;i++){var s=t[i];s&&((s=s.normalize())&&(s instanceof e?n=n.concat(s.expr):n.push(s)))}n.sort(o)}return n},e.prototype.normalize=function(){
return 0===this.expr.length?null:1===this.expr.length?this.expr[0]:this},e.prototype.serialize=function(){return 0===this.expr.length?"":1===this.expr.length?this.normalize().serialize():this.expr.map(function(e){return e.serialize()}).join(" && ")},e.prototype.keys=function(){for(var e=[],t=0,n=this.expr;t<n.length;t++){var i=n[t];e.push.apply(e,i.keys())}return e},e}();t.ContextKeyAndExpr=p;var f=function(e){function t(t,n){var i=e.call(this,t)||this;return i._defaultValue=n,i}return n(t,e),t.prototype.bindTo=function(e){return e.createKey(this.key,this._defaultValue)},t.prototype.getValue=function(e){return e.getContextKeyValue(this.key)},t.prototype.toNegated=function(){return a.not(this.key)},t.prototype.isEqualTo=function(e){return a.equals(this.key,e)},t.prototype.notEqualsTo=function(e){return a.notEquals(this.key,e)},t}(c);t.RawContextKey=f,t.IContextKeyService=i.createDecorator("contextKeyService"),t.SET_CONTEXT_COMMAND_ID="setContext"}),define(e[55],t([1,0,15]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.editorTextFocus=new n.RawContextKey("editorTextFocus",!1),e.focus=new n.RawContextKey("editorFocus",!1),e.textInputFocus=new n.RawContextKey("textInputFocus",!1),e.readOnly=new n.RawContextKey("editorReadonly",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new n.RawContextKey("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new n.RawContextKey("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new n.RawContextKey("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new n.RawContextKey("isInEmbeddedEditor",void 0),e.languageId=new n.RawContextKey("editorLangId",void 0),e.hasCompletionItemProvider=new n.RawContextKey("editorHasCompletionItemProvider",void 0),e.hasCodeActionsProvider=new n.RawContextKey("editorHasCodeActionsProvider",void 0),
e.hasCodeLensProvider=new n.RawContextKey("editorHasCodeLensProvider",void 0),e.hasDefinitionProvider=new n.RawContextKey("editorHasDefinitionProvider",void 0),e.hasImplementationProvider=new n.RawContextKey("editorHasImplementationProvider",void 0),e.hasTypeDefinitionProvider=new n.RawContextKey("editorHasTypeDefinitionProvider",void 0),e.hasHoverProvider=new n.RawContextKey("editorHasHoverProvider",void 0),e.hasDocumentHighlightProvider=new n.RawContextKey("editorHasDocumentHighlightProvider",void 0),e.hasDocumentSymbolProvider=new n.RawContextKey("editorHasDocumentSymbolProvider",void 0),e.hasReferenceProvider=new n.RawContextKey("editorHasReferenceProvider",void 0),e.hasRenameProvider=new n.RawContextKey("editorHasRenameProvider",void 0),e.hasDocumentFormattingProvider=new n.RawContextKey("editorHasDocumentFormattingProvider",void 0),e.hasDocumentSelectionFormattingProvider=new n.RawContextKey("editorHasDocumentSelectionFormattingProvider",void 0),
e.hasSignatureHelpProvider=new n.RawContextKey("editorHasSignatureHelpProvider",void 0)}(t.EditorContextKeys||(t.EditorContextKeys={}))}),define(e[31],t([1,0,23,112,6,15,29]),function(e,t,i,r,o,s,c){"use strict";function u(e){return void 0!==e.command}Object.defineProperty(t,"__esModule",{value:!0}),t.isIMenuItem=u,t.isISubmenuItem=function(e){return void 0!==e.submenu};var d=function(){function e(){this.id=String(e.ID++)}return e.ID=1,e.EditorTitle=new e,e.EditorTitleContext=new e,e.EditorContext=new e,e.EmptyEditorGroupContext=new e,e.ExplorerContext=new e,e.OpenEditorsContext=new e,e.ProblemsPanelContext=new e,e.DebugVariablesContext=new e,e.DebugWatchContext=new e,e.DebugCallStackContext=new e,e.DebugBreakpointsContext=new e,e.DebugConsoleContext=new e,e.SCMTitle=new e,e.SCMSourceControl=new e,e.SCMResourceGroupContext=new e,e.SCMResourceContext=new e,e.SCMChangeContext=new e,e.CommandPalette=new e,e.ViewTitle=new e,e.ViewItemContext=new e,e.TouchBarContext=new e,e.SearchContext=new e,
e.MenubarFileMenu=new e,e.MenubarEditMenu=new e,e.MenubarRecentMenu=new e,e.MenubarSelectionMenu=new e,e.MenubarViewMenu=new e,e.MenubarLayoutMenu=new e,e.MenubarGoMenu=new e,e.MenubarDebugMenu=new e,e.MenubarTasksMenu=new e,e.MenubarWindowMenu=new e,e.MenubarPreferencesMenu=new e,e.MenubarHelpMenu=new e,e}();t.MenuId=d,t.IMenuService=o.createDecorator("menuService"),t.MenuRegistry=new(function(){function e(){this._commands=Object.create(null),this._menuItems=Object.create(null)}return e.prototype.addCommand=function(e){var t=this._commands[e.id];return this._commands[e.id]=e,void 0!==t},e.prototype.getCommand=function(e){return this._commands[e]},e.prototype.appendMenuItem=function(e,t){var n=e.id,i=this._menuItems[n];return i?i.push(t):this._menuItems[n]=i=[t],{dispose:function(){var e=i.indexOf(t);e>=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===d.CommandPalette.id&&this._appendImplicitItems(n),n},e.prototype._appendImplicitItems=function(e){
for(var t=new Set,n=0,i=e.filter(function(e){return u(e)});n<i.length;n++){var r=i[n],o=r.command,s=r.alt;t.add(o.id),s&&t.add(s.id)}for(var a in this._commands)t.has(a)||e.push({command:this._commands[a]})},e}());var h=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._commandService=i,r}return n(t,e),t.prototype.run=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._commandService).executeCommand.apply(e,[this.id].concat(t))},t=a([l(2,c.ICommandService)],t)}(i.Action);t.ExecuteCommandAction=h;var p=function(e){function t(t){var n=this;return n="string"==typeof t.title?e.call(this,"",t.title,"submenu")||this:e.call(this,"",t.title.value,"submenu")||this,n.item=t,n}return n(t,e),t}(i.Action);t.SubmenuItemAction=p;var f=function(e){function t(n,i,r,o,s){var a=this;return a="string"==typeof n.title?e.call(this,n.id,n.title,s)||this:e.call(this,n.id,n.title.value,s)||this,a._cssClass=void 0,a._enabled=!n.precondition||o.contextMatchesRules(n.precondition),
a._options=r||{},a.item=n,a.alt=i?new t(i,void 0,a._options,o,s):void 0,a}return n(t,e),t.prototype.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=[];return this._options.arg&&(i=i.concat([this._options.arg])),this._options.shouldForwardArgs&&(i=i.concat(t)),e.prototype.run.apply(this,i)},t=a([l(3,s.IContextKeyService),l(4,c.ICommandService)],t)}(h);t.MenuItemAction=f;var g=function(){function e(e,t,n,i,o,s){this._id=t,this._label=n,this._keybindings=i,this._keybindingContext=o,this._keybindingWeight=s,this._descriptor=r.createSyncDescriptor(e,this._id,this._label)}return Object.defineProperty(e.prototype,"syncDescriptor",{get:function(){return this._descriptor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keybindings",{get:function(){
return this._keybindings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keybindingContext",{get:function(){return this._keybindingContext},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keybindingWeight",{get:function(){return this._keybindingWeight},enumerable:!0,configurable:!0}),e}();t.SyncActionDescriptor=g}),define(e[852],t([1,0,7,5,15,31,29]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(t,i,r,s){var a=this;this._commandService=r,this._contextKeyService=s,this._menuGroups=[],this._disposables=[],this._onDidChange=new n.Emitter,i.then(function(n){var i,r=o.MenuRegistry.getMenuItems(t),s=new Set;r.sort(e._compareMenuItems);for(var c=0,l=r;c<l.length;c++){var u=l[c],d=u.group;i&&i[0]===d||(i=[d,[]],a._menuGroups.push(i)),i[1].push(u),e._fillInKbExprKeys(u.when,s)}a._disposables.push(a._contextKeyService.onDidChangeContext(function(e){e.affectsSome(s)&&a._onDidChange.fire()})),a._onDidChange.fire(a)
})}return e.prototype.dispose=function(){this._disposables=i.dispose(this._disposables),this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.getActions=function(e){for(var t=[],n=0,i=this._menuGroups;n<i.length;n++){for(var r=i[n],s=r[0],a=[],c=0,l=r[1];c<l.length;c++){var u=l[c];if(this._contextKeyService.contextMatchesRules(u.when)){var d=o.isIMenuItem(u)?new o.MenuItemAction(u.command,u.alt,e,this._contextKeyService,this._commandService):new o.SubmenuItemAction(u);d.order=u.order,a.push(d)}}a.length>0&&t.push([s,a])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();n<i.length;n++){var r=i[n];t.add(r)}},e._compareMenuItems=function(e,t){var n=e.group,i=t.group;if(n!==i){if(!n)return 1;if(!i)return-1;if("navigation"===n)return-1;if("navigation"===i)return 1;var r=n.localeCompare(i);if(0!==r)return r}var o=e.order||0,s=t.order||0;if(o<s)return-1;if(o>s)return 1
;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,c="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(c)},e=a([l(2,s.ICommandService),l(3,r.IContextKeyService)],e)}();t.Menu=c}),define(e[35],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IContextViewService=n.createDecorator("contextViewService"),t.IContextMenuService=n.createDecorator("contextMenuService")}),define(e[100],t([1,0,6,25,1397]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDialogService=n.createDecorator("dialogService");var o=10;t.getConfirmMessage=function(e,t){var n=[e];return n.push(""),n.push.apply(n,t.slice(0,o).map(function(e){return i.basename(e.fsPath)})),t.length>o&&(t.length-o==1?n.push(r.localize(0,null)):n.push(r.localize(1,null,t.length-o))),n.push(""),n.join("\n")}}),define(e[855],t([1,0,4,100]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var r=function(){function e(e){this.dialogService=e}return e.prototype.call=function(e,t){switch(e){case"show":return this.dialogService.show(t[0],t[1],t[2]);case"confirm":return this.dialogService.confirm(t[0])}return n.TPromise.wrapError(new Error("invalid command"))},e=a([l(0,i.IDialogService)],e)}();t.DialogChannel=r;var o=function(){function e(e){this.channel=e}return e.prototype.show=function(e,t,n){return this.channel.call("show",[e,t,n])},e.prototype.confirm=function(e){return this.channel.call("confirm",[e])},e}();t.DialogChannelClient=o}),define(e[856],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="driverService",t.IDriver=n.createDecorator(t.ID);var i=function(){function e(e){this.driver=e}return e.prototype.call=function(e,t){switch(e){case"getWindowIds":return this.driver.getWindowIds();case"capturePage":return this.driver.capturePage(t);case"reloadWindow":return this.driver.reloadWindow(t);case"dispatchKeybinding":
return this.driver.dispatchKeybinding(t[0],t[1]);case"click":return this.driver.click(t[0],t[1],t[2],t[3]);case"doubleClick":return this.driver.doubleClick(t[0],t[1]);case"setValue":return this.driver.setValue(t[0],t[1],t[2]);case"getTitle":return this.driver.getTitle(t[0]);case"isActiveElement":return this.driver.isActiveElement(t[0],t[1]);case"getElements":return this.driver.getElements(t[0],t[1],t[2]);case"typeInEditor":return this.driver.typeInEditor(t[0],t[1],t[2]);case"getTerminalBuffer":return this.driver.getTerminalBuffer(t[0],t[1]);case"writeInTerminal":return this.driver.writeInTerminal(t[0],t[1],t[2])}},e}();t.DriverChannel=i;var r=function(){function e(e){this.channel=e}return e.prototype.getWindowIds=function(){return this.channel.call("getWindowIds")},e.prototype.capturePage=function(e){return this.channel.call("capturePage",e)},e.prototype.reloadWindow=function(e){return this.channel.call("reloadWindow",e)},e.prototype.dispatchKeybinding=function(e,t){
return this.channel.call("dispatchKeybinding",[e,t])},e.prototype.click=function(e,t,n,i){return this.channel.call("click",[e,t,n,i])},e.prototype.doubleClick=function(e,t){return this.channel.call("doubleClick",[e,t])},e.prototype.setValue=function(e,t,n){return this.channel.call("setValue",[e,t,n])},e.prototype.getTitle=function(e){return this.channel.call("getTitle",[e])},e.prototype.isActiveElement=function(e,t){return this.channel.call("isActiveElement",[e,t])},e.prototype.getElements=function(e,t,n){return this.channel.call("getElements",[e,t,n])},e.prototype.typeInEditor=function(e,t,n){return this.channel.call("typeInEditor",[e,t,n])},e.prototype.getTerminalBuffer=function(e,t){return this.channel.call("getTerminalBuffer",[e,t])},e.prototype.writeInTerminal=function(e,t,n){return this.channel.call("writeInTerminal",[e,t,n])},e}();t.DriverChannelClient=r;var o=function(){function e(e){this.registry=e}return e.prototype.call=function(e,t){switch(e){case"registerWindowDriver":
return this.registry.registerWindowDriver(t);case"reloadWindowDriver":return this.registry.reloadWindowDriver(t)}},e}();t.WindowDriverRegistryChannel=o;var s=function(){function e(e){this.channel=e}return e.prototype.registerWindowDriver=function(e){return this.channel.call("registerWindowDriver",e)},e.prototype.reloadWindowDriver=function(e){return this.channel.call("reloadWindowDriver",e)},e}();t.WindowDriverRegistryChannelClient=s;var a=function(){function e(e){this.driver=e}return e.prototype.call=function(e,t){switch(e){case"click":return this.driver.click(t[0],t[1],t[2]);case"doubleClick":return this.driver.doubleClick(t);case"setValue":return this.driver.setValue(t[0],t[1]);case"getTitle":return this.driver.getTitle();case"isActiveElement":return this.driver.isActiveElement(t);case"getElements":return this.driver.getElements(t[0],t[1]);case"typeInEditor":return this.driver.typeInEditor(t[0],t[1]);case"getTerminalBuffer":return this.driver.getTerminalBuffer(t);case"writeInTerminal":
return this.driver.writeInTerminal(t[0],t[1])}},e}();t.WindowDriverChannel=a;var c=function(){function e(e){this.channel=e}return e.prototype.click=function(e,t,n){return this.channel.call("click",[e,t,n])},e.prototype.doubleClick=function(e){return this.channel.call("doubleClick",e)},e.prototype.setValue=function(e,t){return this.channel.call("setValue",[e,t])},e.prototype.getTitle=function(){return this.channel.call("getTitle")},e.prototype.isActiveElement=function(e){return this.channel.call("isActiveElement",e)},e.prototype.getElements=function(e,t){return this.channel.call("getElements",[e,t])},e.prototype.typeInEditor=function(e,t){return this.channel.call("typeInEditor",[e,t])},e.prototype.getTerminalBuffer=function(e){return this.channel.call("getTerminalBuffer",e)},e.prototype.writeInTerminal=function(e,t){return this.channel.call("writeInTerminal",[e,t])},e}();t.WindowDriverChannelClient=c}),define(e[36],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[80],t([1,0,1408,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.EXTENSION_IDENTIFIER_REGEX=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN),t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)};!function(e){e[e.System=0]="System",e[e.User=1]="User"}(t.LocalExtensionType||(t.LocalExtensionType={})),t.IExtensionManagementService=i.createDecorator("extensionManagementService"),t.IExtensionGalleryService=i.createDecorator("extensionGalleryService");!function(e){e[e.NoneOrRelevance=0]="NoneOrRelevance",e[e.LastUpdatedDate=1]="LastUpdatedDate",e[e.Title=2]="Title",e[e.PublisherName=3]="PublisherName",e[e.InstallCount=4]="InstallCount",e[e.PublishedDate=5]="PublishedDate",e[e.AverageRating=6]="AverageRating",e[e.WeightedRating=12]="WeightedRating"
}(t.SortBy||(t.SortBy={}));!function(e){e[e.Default=0]="Default",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(t.SortOrder||(t.SortOrder={}));!function(e){e.Uninstall="uninstall"}(t.StatisticType||(t.StatisticType={}));!function(e){e[e.Install=1]="Install",e[e.Update=2]="Update"}(t.InstallOperation||(t.InstallOperation={})),t.IExtensionManagementServerService=i.createDecorator("extensionManagementServerService");!function(e){e[e.Disabled=0]="Disabled",e[e.WorkspaceDisabled=1]="WorkspaceDisabled",e[e.Enabled=2]="Enabled",e[e.WorkspaceEnabled=3]="WorkspaceEnabled"}(t.EnablementState||(t.EnablementState={})),t.IExtensionEnablementService=i.createDecorator("extensionEnablementService"),t.IExtensionTipsService=i.createDecorator("extensionTipsService");!function(e){e[e.Workspace=0]="Workspace",e[e.File=1]="File",e[e.Executable=2]="Executable",e[e.DynamicWorkspace=3]="DynamicWorkspace",e[e.Experimental=4]="Experimental"}(t.ExtensionRecommendationReason||(t.ExtensionRecommendationReason={})),
t.ExtensionsLabel=n.localize(0,null),t.ExtensionsChannelId="extensions",t.PreferencesLabel=n.localize(1,null)}),define(e[123],t([1,0,80]),function(e,t,n){"use strict";function i(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||s(e.id)===s(t.id)}function r(e,t){return e.toLocaleLowerCase()+"."+t.toLocaleLowerCase()}function o(e){return e.manifest?r(e.manifest.publisher,e.manifest.name):e.identifier.id}function s(e){return e.replace(n.EXTENSION_IDENTIFIER_REGEX,function(e,t,n){return r(t,n)})}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=i,t.getGalleryExtensionId=r,t.getGalleryExtensionIdFromLocal=o,t.LOCAL_EXTENSION_ID_REGEX=/^([^.]+\..+)-(\d+\.\d+\.\d+(-.*)?)$/,t.getIdFromLocalExtensionId=function(e){var n=t.LOCAL_EXTENSION_ID_REGEX.exec(e);return s(n&&n[1]?n[1]:e)},t.adoptToGalleryExtensionId=s,t.getLocalExtensionId=function(e,t){return e+"-"+t},t.groupByExtension=function(e,t){for(var n=[],r=function(e){for(var r=0,o=n;r<o.length;r++){var s=o[r];if(s.some(function(n){
return i(t(n),t(e))}))return s}return null},o=0,s=e;o<s.length;o++){var a=s[o],c=r(a);c?c.push(a):n.push([a])}return n},t.getLocalExtensionTelemetryData=function(e){return{id:o(e),name:e.manifest.name,galleryId:null,publisherId:e.metadata?e.metadata.publisherId:null,publisherName:e.manifest.publisher,publisherDisplayName:e.metadata?e.metadata.publisherDisplayName:null,dependencies:e.manifest.extensionDependencies&&e.manifest.extensionDependencies.length>0}},t.getGalleryExtensionTelemetryData=function(e){return c({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,publisherId:e.publisherId,publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:e.properties.dependencies.length>0},e.telemetryData)},t.BetterMergeDisabledNowKey="extensions/bettermergedisablednow",t.BetterMergeId="pprice.better-merge",t.getMaliciousExtensionsSet=function(e){for(var t=new Set,n=0,i=e;n<i.length;n++){var r=i[n];r.malicious&&t.add(r.id.id)}return t}}),
define(e[860],t([1,0,4,7,80,20]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.extensionManagementServerService=e,this.servers=this.extensionManagementServerService.extensionManagementServers,this.onInstallExtension=this.servers.reduce(function(e,t){return e.add(t.extensionManagementService.onInstallExtension),e},new i.EventMultiplexer).event,this.onDidInstallExtension=this.servers.reduce(function(e,t){return e.add(t.extensionManagementService.onDidInstallExtension),e},new i.EventMultiplexer).event,this.onUninstallExtension=this.servers.reduce(function(e,t){return e.add(t.extensionManagementService.onUninstallExtension),e},new i.EventMultiplexer).event,this.onDidUninstallExtension=this.servers.reduce(function(e,t){return e.add(t.extensionManagementService.onDidUninstallExtension),e},new i.EventMultiplexer).event}return e.prototype.getInstalled=function(e){return n.TPromise.join(this.servers.map(function(t){
return t.extensionManagementService.getInstalled(e)})).then(function(e){return o.flatten(e)})},e.prototype.uninstall=function(e,t){return this.getServer(e).extensionManagementService.uninstall(e,t)},e.prototype.reinstallFromGallery=function(e){return this.getServer(e).extensionManagementService.reinstallFromGallery(e)},e.prototype.updateMetadata=function(e,t){return this.getServer(e).extensionManagementService.updateMetadata(e,t)},e.prototype.install=function(e){return this.servers[0].extensionManagementService.install(e)},e.prototype.installFromGallery=function(e){return this.servers[0].extensionManagementService.installFromGallery(e)},e.prototype.getExtensionsReport=function(){return this.servers[0].extensionManagementService.getExtensionsReport()},e.prototype.getServer=function(e){return this.extensionManagementServerService.getExtensionManagementServer(e.location)},e=a([l(0,r.IExtensionManagementServerService)],e)}();t.MulitExtensionManagementService=s}),define(e[336],t([1,0,236,123]),function(e,t,n,i){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIdAndVersionFromLocalExtensionId=function(e){var t=i.LOCAL_EXTENSION_ID_REGEX.exec(e);if(t&&t[1]&&t[2]){var r=n.valid(t[2]);if(r)return{id:i.adoptToGalleryExtensionId(t[1]),version:r}}return{id:i.adoptToGalleryExtensionId(e),version:null}}}),define(e[33],t([1,0,25,11,6,14,70,30]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileService=o.createDecorator("fileService");!function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={}));!function(e){e[e.FileReadWrite=2]="FileReadWrite",e[e.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",e[e.FileFolderCopy=8]="FileFolderCopy",e[e.PathCaseSensitive=1024]="PathCaseSensitive",e[e.Readonly=2048]="Readonly"}(t.FileSystemProviderCapabilities||(t.FileSystemProviderCapabilities={}));!function(e){e[e.CREATE=0]="CREATE",e[e.DELETE=1]="DELETE",e[e.MOVE=2]="MOVE",
e[e.COPY=3]="COPY"}(t.FileOperation||(t.FileOperation={}));var l=function(){function e(e,t,n){this._resource=e,this._operation=t,this._target=n}return Object.defineProperty(e.prototype,"resource",{get:function(){return this._resource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operation",{get:function(){return this._operation},enumerable:!0,configurable:!0}),e}();t.FileOperationEvent=l;var u;!function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(u=t.FileChangeType||(t.FileChangeType={}));var d=function(){function e(e){this._changes=e}return Object.defineProperty(e.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),e.prototype.contains=function(e,t){return!!e&&this._changes.some(function(n){return n.type===t&&(t===u.DELETED?a.isEqualOrParent(e,n.resource,!r.isLinux):a.isEqual(e,n.resource,!r.isLinux))})},
e.prototype.getAdded=function(){return this.getOfType(u.ADDED)},e.prototype.gotAdded=function(){return this.hasType(u.ADDED)},e.prototype.getDeleted=function(){return this.getOfType(u.DELETED)},e.prototype.gotDeleted=function(){return this.hasType(u.DELETED)},e.prototype.getUpdated=function(){return this.getOfType(u.UPDATED)},e.prototype.gotUpdated=function(){return this.hasType(u.UPDATED)},e.prototype.getOfType=function(e){return this._changes.filter(function(t){return t.type===e})},e.prototype.hasType=function(e){return this._changes.some(function(t){return t.type===e})},e}();t.FileChangesEvent=d,t.isParent=function(e,t,n){return!(!e||!t||e===t)&&!(t.length>e.length)&&(t.charAt(t.length-1)!==i.nativeSep&&(t+=i.nativeSep),n?s.startsWithIgnoreCase(e,t):0===e.indexOf(t))};var h=function(){function e(e){this._value=e}return e.prototype.read=function(){var e=this._value;return this._value=null,e},e}();t.StringSnapshot=h,t.snapshotToString=function(e){for(var t,n=[];"string"==typeof(t=e.read());)n.push(t)
;return n.join("")};var p=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.fileOperationResult=n,r.options=i,r}return n(t,e),t.isFileOperationError=function(e){return e instanceof Error&&!c.isUndefinedOrNull(e.fileOperationResult)},t}(Error);t.FileOperationError=p;!function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_IS_DIRECTORY=1]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=2]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=3]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=4]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=5]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=6]="FILE_READ_ONLY",e[e.FILE_PERMISSION_DENIED=7]="FILE_PERMISSION_DENIED",e[e.FILE_TOO_LARGE=8]="FILE_TOO_LARGE",e[e.FILE_INVALID_PATH=9]="FILE_INVALID_PATH",e[e.FILE_EXCEED_MEMORY_LIMIT=10]="FILE_EXCEED_MEMORY_LIMIT"}(t.FileOperationResult||(t.FileOperationResult={})),t.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},t.HotExitConfiguration={OFF:"off",
ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},t.CONTENT_CHANGE_EVENT_BUFFER_DELAY=1e3,t.FILES_ASSOCIATIONS_CONFIG="files.associations",t.FILES_EXCLUDE_CONFIG="files.exclude",t.SUPPORTED_ENCODINGS={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",
labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:21},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:22},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:23},iso885913:{labelLong:"Estonian (ISO 8859-13)",
labelShort:"ISO 8859-13",order:24},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:25},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:26},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:27},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:28},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:29},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:30},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:31},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:32},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:33},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:34},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:35},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:36},big5hkscs:{
labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:37},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:38},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:39},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:40},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:41},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:42},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:43},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:44},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:45},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:46},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:47}};!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(t.FileKind||(t.FileKind={})),t.MIN_MAX_MEMORY_SIZE_MB=2048,t.FALLBACK_MAX_MEMORY_SIZE_MB=4096}),
define(e[137],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var n=0,i=e;n<i.length;n++){var r=i[n],o=r[0],s=r[1];this.set(o,s)}}return e.prototype.set=function(e,t){var n=this._entries.get(e);return this._entries.set(e,t),n},e.prototype.forEach=function(e){this._entries.forEach(function(t,n){return e(n,t)})},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=n}),define(e[865],t([1,0,9,30,170,955,112,6,137]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){void 0===e&&(e=new c.ServiceCollection),void 0===t&&(t=!1),this._services=e,this._strict=t,this._services.set(a.IInstantiationService,this)}return e.prototype.createChild=function(t){var n=this;return this._services.forEach(function(e,i){
t.has(e)||(i instanceof s.SyncDescriptor&&(i=n._createAndCacheServiceInstance(e,i)),t.set(e,i))}),new e(t,this._strict)},e.prototype.invokeFunction=function(e){for(var t=this,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];var o;try{return o={get:function(e,n){var i=t._getOrCreateServiceInstance(e);if(!i&&n!==a.optional)throw new Error("[invokeFunction] unknown service '"+e+"'");return i}},e.apply(void 0,[o].concat(i))}finally{o.get=function(){throw n.illegalState("service accessor is only valid during the invocation of its target method")}}},e.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e instanceof s.SyncDescriptor?this._createInstance(e,t):this._createInstance(new s.SyncDescriptor(e),t)},e.prototype._createInstance=function(e,t){for(var n=e.staticArguments.concat(t),r=a._util.getServiceDependencies(e.ctor).sort(function(e,t){return e.index-t.index}),o=[],s=0,c=r;s<c.length;s++){var l=c[s],u=this._getOrCreateServiceInstance(l.id)
;if(!u&&this._strict&&!l.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+l.id+".");o.push(u)}var d=r.length>0?r[0].index:n.length;if(n.length!==d){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(d+1)+" conflicts with "+n.length+" static arguments");var h=d-n.length;n=h>0?n.concat(new Array(h)):n.slice(0,d)}var p=[e.ctor];return p.push.apply(p,n),p.push.apply(p,o),i.create.apply(null,p)},e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof s.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},e.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=i.toString(),e}r.ok(this._services.get(e)instanceof s.SyncDescriptor);for(var i=new o.Graph(function(e){return e.id.toString()}),c=0,l=[{id:e,desc:t}];l.length;){var u=l.pop();i.lookupOrInsertNode(u),c++>100&&n()
;for(var d=0,h=a._util.getServiceDependencies(u.desc.ctor);d<h.length;d++){var p=h[d],f=this._services.get(p.id);if(f||console.warn("[createInstance] "+e+" depends on "+p.id+" which is NOT registered."),f instanceof s.SyncDescriptor){var g={id:p.id,desc:f};i.insertEdge(u,g),l.push(g)}}}for(;;){var v=i.roots();if(0===v.length){0!==i.length&&n();break}for(var m=0,y=v;m<y.length;m++){var b=y[m],S=this._createInstance(b.data.desc,[]);this._services.set(b.data.id,S),i.removeNode(b.data)}}return this._services.get(e)},e}();t.InstantiationService=l}),define(e[300],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IIntegrityService=n.createDecorator("integrityService")}),define(e[295],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IIssueService=n.createDecorator("issueService");!function(e){e[e.Bug=0]="Bug",e[e.PerformanceIssue=1]="PerformanceIssue",e[e.FeatureRequest=2]="FeatureRequest",
e[e.SettingsSearchIssue=3]="SettingsSearchIssue"}(t.IssueType||(t.IssueType={}))}),define(e[868],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"openIssueReporter":return this.service.openReporter(t);case"openProcessExplorer":return this.service.openProcessExplorer(t)}},e}();t.IssueChannel=n;var i=function(){function e(e){this.channel=e}return e.prototype.openReporter=function(e){return this.channel.call("openIssueReporter",e)},e.prototype.openProcessExplorer=function(e){return this.channel.call("openProcessExplorer",e)},e}();t.IssueChannelClient=i}),define(e[869],t([1,0,1416,5,7,18]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n,i,r,a){var c=e.call(this)||this;return c._contextKeyService=t,c._commandService=n,c._telemetryService=i,c._statusService=a,c._notificationService=r,c._currentChord=null,
c._currentChordChecker=new s.IntervalTimer,c._currentChordStatusMessage=null,c._onDidUpdateKeybindings=c._register(new o.Emitter),c}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"onDidUpdateKeybindings",{get:function(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:o.Event.None},enumerable:!0,configurable:!0}),t.prototype.getDefaultKeybindingsContent=function(){return""},t.prototype.getDefaultKeybindings=function(){return this._getResolver().getDefaultKeybindings()},t.prototype.getKeybindings=function(){return this._getResolver().getKeybindings()},t.prototype.customKeybindingsCount=function(){return 0},t.prototype.lookupKeybindings=function(e){return this._getResolver().lookupKeybindings(e).map(function(e){return e.resolvedKeybinding})},t.prototype.lookupKeybinding=function(e){var t=this._getResolver().lookupPrimaryKeybinding(e);return t?t.resolvedKeybinding:null},t.prototype.softDispatch=function(e,t){
var n=this.resolveKeyboardEvent(e);if(n.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var i=n.getDispatchParts()[0];if(null===i)return null;var r=this._contextKeyService.getContext(t),o=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(r,o,i)},t.prototype._enterChordMode=function(e,t){var n=this;this._currentChord={keypress:e,label:t},this._statusService&&(this._currentChordStatusMessage=this._statusService.setStatusMessage(i.localize(0,null,t)));var r=Date.now();this._currentChordChecker.cancelAndSet(function(){n._documentHasFocus()?Date.now()-r>5e3&&n._leaveChordMode():n._leaveChordMode()},500)},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null},t.prototype._dispatch=function(e,t){var n=this,r=!1,o=this.resolveKeyboardEvent(e)
;if(o.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var s=o.getDispatchParts()[0];if(null===s)return r;var a=this._contextKeyService.getContext(t),c=this._currentChord?this._currentChord.keypress:null,l=o.getLabel(),u=this._getResolver().resolve(a,c,s);return u&&u.enterChord?(r=!0,this._enterChordMode(s,l),r):(this._statusService&&this._currentChord&&(u&&u.commandId||(this._statusService.setStatusMessage(i.localize(1,null,this._currentChord.label,l),1e4),r=!0)),this._leaveChordMode(),u&&u.commandId&&(u.bubble||(r=!0),void 0===u.commandArgs?this._commandService.executeCommand(u.commandId).done(void 0,function(e){return n._notificationService.warn(e)}):this._commandService.executeCommand(u.commandId,u.commandArgs).done(void 0,function(e){return n._notificationService.warn(e)}),this._telemetryService.publicLog("workbenchActionExecuted",{id:u.commandId,from:"keybinding"})),r)},t}(r.Disposable);t.AbstractKeybindingService=a}),define(e[37],t([1,0,6]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(t.KeybindingSource||(t.KeybindingSource={})),t.IKeybindingService=n.createDecorator("keybindingService")}),define(e[313],t([1,0,20,15,29]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,r=t.length;i<r;i++){var o=t[i].command;this._defaultBoundCommands.set(o,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=e.combine(t,n);for(var i=0,r=this._keybindings.length;i<r;i++){var s=this._keybindings[i];null!==s.keypressFirstPart&&this._addKeyPress(s.keypressFirstPart,s)}}return e._isTargetedForRemoval=function(e,t,n,i,r){if(e.command!==i)return!1;if(t&&e.keypressFirstPart!==t)return!1;if(n&&e.keypressChordPart!==n)return!1;if(r){if(!e.when)return!1;if(!r.equals(e.when))return!1}return!0},e.combine=function(e,t){e=e.slice(0)
;for(var n=[],i=0,r=t.length;i<r;i++){var o=t[i];if(o.command&&0!==o.command.length&&"-"===o.command.charAt(0))for(var s=o.command.substr(1),a=o.keypressFirstPart,c=o.keypressChordPart,l=o.when,u=e.length-1;u>=0;u--)this._isTargetedForRemoval(e[u],a,c,s,l)&&e.splice(u,1);else n.push(o)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var r=i.length-1;r>=0;r--){var o=i[r];if(o.command!==n.command){var s=null!==o.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&o.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(o.when,n.when)&&this._removeFromLookupMap(o)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){var t=this._lookupMap.get(e.command)
;if(void 0!==t)for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return void t.splice(n,1)},e.whenIsEntirelyIncluded=function(e,t){if(!t)return!0;if(!e)return!1;for(var n=e instanceof i.ContextKeyAndExpr?e.expr:[e],r=t instanceof i.ContextKeyAndExpr?t.expr:[t],o=0,s=0;s<r.length;s++){for(var a=r[s],c=!1;!c&&o<n.length;){n[o].equals(a)&&(c=!0),o++}if(!c)return!1}return!0},e.prototype.getDefaultBoundCommands=function(){return this._defaultBoundCommands},e.prototype.getDefaultKeybindings=function(){return this._defaultKeybindings},e.prototype.getKeybindings=function(){return this._keybindings},e.prototype.lookupKeybindings=function(e){var t=this._lookupMap.get(e);if(void 0===t||0===t.length)return[];for(var n=[],i=0,r=t.length-1;r>=0;r--)n[i++]=t[r];return n},e.prototype.lookupPrimaryKeybinding=function(e){var t=this._lookupMap.get(e);return void 0===t||0===t.length?null:t[t.length-1]},e.prototype.resolve=function(e,t,n){var i=null;if(null!==t){if(void 0===(a=this._map.get(t)))return null;i=[]
;for(var r=0,o=a.length;r<o;r++){var s=a[r];s.keypressChordPart===n&&i.push(s)}}else{var a=this._map.get(n);if(void 0===a)return null;i=a}var c=this._findCommand(e,i);return c?null===t&&null!==c.keypressChordPart?{enterChord:!0,commandId:null,commandArgs:null,bubble:!1}:{enterChord:!1,commandId:c.command,commandArgs:c.commandArgs,bubble:c.bubble}:null},e.prototype._findCommand=function(t,n){for(var i=n.length-1;i>=0;i--){var r=n[i];if(e.contextMatchesRules(t,r.when))return r}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e.getAllUnboundCommands=function(e){var t=r.CommandsRegistry.getCommands(),i=[];for(var o in t)"_"!==o[0]&&0!==o.indexOf("vscode.")&&("object"!=typeof t[o].description||n.isFalsyOrEmpty(t[o].description.args))&&!0!==e.get(o)&&i.push(o);return i},e}();t.KeybindingResolver=o}),define(e[435],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t,n,i,r){if(this.resolvedKeybinding=e,e){
var o=e.getDispatchParts(),s=o[0],a=o[1];this.keypressFirstPart=s,this.keypressChordPart=a}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=r}}();t.ResolvedKeybindingItem=n}),define(e[873],t([1,0,73,210]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var i=e.call(this)||this;if(i._os=n,null===t)throw new Error("Invalid USLayoutResolvedKeybinding");return 2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i}return n(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return i.KeyCodeUtils.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){
var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return r.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":i.KeyCodeUtils.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return r.AriaLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._keyCodeToElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return i.KeyCodeUtils.toString(e)},t.prototype._getElectronAcceleratorLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode):null},t.prototype.getElectronAccelerator=function(){if(null!==this._chordPart)return null
;var e=this._getElectronAcceleratorLabelForKeybinding(this._firstPart);return r.ElectronAcceleratorLabelProvider.toLabel(this._firstPart,e,null,null,this._os)},t.prototype._getUserSettingsLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":i.KeyCodeUtils.toUserSettingsUS(e.keyCode):null},t.prototype.getUserSettingsLabel=function(){var e=this._getUserSettingsLabelForKeybinding(this._firstPart),t=this._getUserSettingsLabelForKeybinding(this._chordPart),n=r.UserSettingsLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os);return n?n.toLowerCase():n},t.prototype.isWYSIWYG=function(){return!0},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new i.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null
},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=i.KeyCodeUtils.toString(e.keyCode)},t}(i.ResolvedKeybinding);t.USLayoutResolvedKeybinding=o}),define(e[38],t([1,0,4,7,6]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILifecycleService=r.createDecorator("lifecycleService");!function(e){e[e.CLOSE=1]="CLOSE",e[e.QUIT=2]="QUIT",e[e.RELOAD=3]="RELOAD",e[e.LOAD=4]="LOAD"}(t.ShutdownReason||(t.ShutdownReason={}));var o;!function(e){e[e.NewWindow=1]="NewWindow",e[e.ReloadedWindow=3]="ReloadedWindow",e[e.ReopenedWindow=4]="ReopenedWindow"}(o=t.StartupKind||(t.StartupKind={}));var s;!function(e){e[e.Starting=1]="Starting",e[e.Restoring=2]="Restoring",e[e.Running=3]="Running",
e[e.Eventually=4]="Eventually"}(s=t.LifecyclePhase||(t.LifecyclePhase={})),t.NullLifecycleService={_serviceBrand:null,phase:s.Running,when:function(){return Promise.resolve()},startupKind:o.NewWindow,onWillShutdown:i.Event.None,onShutdown:i.Event.None},t.handleVetos=function(e,t){if(0===e.length)return n.TPromise.as(!1);for(var i=[],r=!1,o=0,s=e;o<s.length;o++){var a=s[o];if(!0===a)return n.TPromise.as(!0);n.TPromise.is(a)&&i.push(a.then(function(e){e&&(r=!0)},function(e){t(e),r=!0}))}return n.TPromise.join(i).then(function(){return r})}}),define(e[438],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Core=1]="Core",e[e.Contributed=2]="Contributed"}(t.LanguageType||(t.LanguageType={})),t.ILocalizationsService=n.createDecorator("localizationsService"),t.isValidLocalization=function(e){if("string"!=typeof e.languageId)return!1;if(!Array.isArray(e.translations)||0===e.translations.length)return!1;for(var t=0,n=e.translations;t<n.length;t++){var i=n[t]
;if("string"!=typeof i.id)return!1;if("string"!=typeof i.path)return!1}return!(e.languageName&&"string"!=typeof e.languageName||e.localizedLanguageName&&"string"!=typeof e.localizedLanguageName)}}),define(e[876],t([1,0,131,7]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.service=e,this.onDidLanguagesChange=i.buffer(e.onDidLanguagesChange,!0)}return e.prototype.call=function(e,t){switch(e){case"event:onDidLanguagesChange":return n.eventToCall(this.onDidLanguagesChange);case"getLanguageIds":return this.service.getLanguageIds(t)}},e}();t.LocalizationsChannel=r;var o=function(){function e(e){this.channel=e,this._onDidLanguagesChange=n.eventFromCall(this.channel,"event:onDidLanguagesChange")}return Object.defineProperty(e.prototype,"onDidLanguagesChange",{get:function(){return this._onDidLanguagesChange},enumerable:!0,configurable:!0}),e.prototype.getLanguageIds=function(e){return this.channel.call("getLanguageIds",e)},e}()
;t.LocalizationsChannelClient=o}),define(e[77],t([1,0,6,5,11,7]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=i.createDecorator("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=a.Info;var c=function(e){function i(){var n=null!==e&&e.apply(this,arguments)||this;return n.level=t.DEFAULT_LOG_LEVEL,n._onDidChangeLogLevel=n._register(new s.Emitter),n.onDidChangeLogLevel=n._onDidChangeLogLevel.event,n}return n(i,e),i.prototype.setLevel=function(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))},i.prototype.getLevel=function(){return this.level},i}(r.Disposable);t.AbstractLogService=c;var l=function(e){function i(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var i=e.call(this)||this;return i.setLevel(n),i.useColors=!o.isWindows,i}return n(i,e),
i.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Trace&&(this.useColors?console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},i.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Debug&&(this.useColors?console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},i.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Info&&(this.useColors?console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},i.prototype.warn=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Warning&&(this.useColors?console.warn.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)):console.warn.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},i.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Error&&(this.useColors?console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)):console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},i.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Critical&&(this.useColors?console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)):console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},i.prototype.dispose=function(){},i}(c);t.ConsoleLogMainService=l;var u=function(e){
function i(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var i=e.call(this)||this;return i.setLevel(n),i}return n(i,e),i.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Trace&&console.log.apply(console,["%cTRACE","color: #888",e].concat(t))},i.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Debug&&console.log.apply(console,["%cDEBUG","background: #eee; color: #888",e].concat(t))},i.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Info&&console.log.apply(console,["%c INFO","color: #33f",e].concat(t))},i.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Warning&&console.log.apply(console,["%c WARN","color: #993",e].concat(t))},i.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;this.getLevel()<=a.Error&&console.log.apply(console,["%c  ERR","color: #f33",e].concat(t))},i.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Critical&&console.log.apply(console,["%cCRITI","background: #f33; color: white",e].concat(t))},i.prototype.dispose=function(){},i}(c);t.ConsoleLogService=u;var d=function(e){function t(t){var n=e.call(this)||this;return n.logServices=t,t.length&&n.setLevel(t[0].getLevel()),n}return n(t,e),t.prototype.setLevel=function(t){for(var n=0,i=this.logServices;n<i.length;n++){i[n].setLevel(t)}e.prototype.setLevel.call(this,t)},t.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=this.logServices;i<r.length;i++){var o=r[i];o.trace.apply(o,[e].concat(t))}},t.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=this.logServices;i<r.length;i++){var o=r[i];o.debug.apply(o,[e].concat(t))}},t.prototype.info=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=this.logServices;i<r.length;i++){var o=r[i];o.info.apply(o,[e].concat(t))}},t.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=this.logServices;i<r.length;i++){var o=r[i];o.warn.apply(o,[e].concat(t))}},t.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=this.logServices;i<r.length;i++){var o=r[i];o.error.apply(o,[e].concat(t))}},t.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=this.logServices;i<r.length;i++){var o=r[i];o.critical.apply(o,[e].concat(t))}},t.prototype.dispose=function(){for(var e=0,t=this.logServices;e<t.length;e++){t[e].dispose()}},t}(c);t.MultiplexLogService=d;var h=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n._register(t),n}return n(t,e),Object.defineProperty(t.prototype,"onDidChangeLogLevel",{get:function(){
return this.logService.onDidChangeLogLevel},enumerable:!0,configurable:!0}),t.prototype.setLevel=function(e){this.logService.setLevel(e)},t.prototype.getLevel=function(){return this.logService.getLevel()},t.prototype.trace=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(t=this.logService).trace.apply(t,[e].concat(n))},t.prototype.debug=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(t=this.logService).debug.apply(t,[e].concat(n))},t.prototype.info=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(t=this.logService).info.apply(t,[e].concat(n))},t.prototype.warn=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(t=this.logService).warn.apply(t,[e].concat(n))},t.prototype.error=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(t=this.logService).error.apply(t,[e].concat(n))},t.prototype.critical=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i]
;(t=this.logService).critical.apply(t,[e].concat(n))},t}(r.Disposable);t.DelegatedLogService=h;var p=function(){function e(){this.onDidChangeLogLevel=(new s.Emitter).event}return e.prototype.setLevel=function(e){},e.prototype.getLevel=function(){return a.Info},e.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.dispose=function(){},e}();t.NullLogService=p,t.getLogLevel=function(e){if(e.verbose)return a.Trace;if("string"==typeof e.args.log)switch(e.args.log.toLowerCase()){case"trace":return a.Trace;case"debug":
return a.Debug;case"info":return a.Info;case"warn":return a.Warning;case"error":return a.Error;case"critical":return a.Critical;case"off":return a.Off}return t.DEFAULT_LOG_LEVEL}}),define(e[263],t([1,0,6,7,103,77]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBroadcastService=n.createDecorator("broadcastService");var s=function(){function e(e,t){this.windowId=e,this.logService=t,this._onBroadcast=new i.Emitter,this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;r.ipcRenderer.on("vscode:broadcast",function(t,n){e.logService.trace("Received broadcast from main in window "+e.windowId+": ",n),e._onBroadcast.fire(n)})},Object.defineProperty(e.prototype,"onBroadcast",{get:function(){return this._onBroadcast.event},enumerable:!0,configurable:!0}),e.prototype.broadcast=function(e){this.logService.trace("Sending broadcast to main from window "+this.windowId+": ",e),r.ipcRenderer.send("vscode:broadcast",this.windowId,{channel:e.channel,
payload:e.payload})},e=a([l(1,o.ILogService)],e)}();t.BroadcastService=s}),define(e[879],t([1,0,131,4,77,7]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this.service=e,this.onDidChangeLogLevel=s.buffer(e.onDidChangeLogLevel,!0)}return e.prototype.call=function(e,t){switch(e){case"event:onDidChangeLogLevel":return i.eventToCall(this.onDidChangeLogLevel);case"setLevel":return this.service.setLevel(t),r.TPromise.as(null)}},e}();t.LogLevelSetterChannel=a;var c=function(){function e(e){this.channel=e,this._onDidChangeLogLevel=i.eventFromCall(this.channel,"event:onDidChangeLogLevel")}return Object.defineProperty(e.prototype,"onDidChangeLogLevel",{get:function(){return this._onDidChangeLogLevel},enumerable:!0,configurable:!0}),e.prototype.setLevel=function(e){return this.channel.call("setLevel",e)},e}();t.LogLevelSetterChannelClient=c;var l=function(e){function t(t,n){var i=e.call(this,n)||this;return i.master=t,
i._register(t.onDidChangeLogLevel(function(e){return n.setLevel(e)})),i}return n(t,e),t.prototype.setLevel=function(e){this.master.setLevel(e)},t}(o.DelegatedLogService);t.FollowerLogService=l}),define(e[880],t([1,0,59,77]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,n,s){try{var a=e.__$__nodeRequire("spdlog");a.setAsyncMode(8192,2e3);var c=i.join(s,t+".log"),l=new a.RotatingLogger(t,c,5242880,6);return l.setLevel(0),new o(l,n)}catch(e){console.error(e)}return new r.NullLogService};var o=function(e){function t(t,n){void 0===n&&(n=r.LogLevel.Error);var i=e.call(this)||this;return i.logger=t,i.setLevel(n),i}return n(t,e),t.prototype.trace=function(){this.getLevel()<=r.LogLevel.Trace&&this.logger.trace(this.format(arguments))},t.prototype.debug=function(){this.getLevel()<=r.LogLevel.Debug&&this.logger.debug(this.format(arguments))},t.prototype.info=function(){this.getLevel()<=r.LogLevel.Info&&this.logger.info(this.format(arguments))},
t.prototype.warn=function(){this.getLevel()<=r.LogLevel.Warning&&this.logger.warn(this.format(arguments))},t.prototype.error=function(){if(this.getLevel()<=r.LogLevel.Error){var e=arguments[0];if(e instanceof Error){var t=Array.prototype.slice.call(arguments);t[0]=e.stack,this.logger.error(this.format(t))}else this.logger.error(this.format(arguments))}},t.prototype.critical=function(){this.getLevel()<=r.LogLevel.Critical&&this.logger.critical(this.format(arguments))},t.prototype.dispose=function(){this.logger.drop()},t.prototype.format=function(e){for(var t="",n=0;n<e.length;n++){var i=e[n];if("object"==typeof i)try{i=JSON.stringify(i)}catch(e){}t+=(n>0?" ":"")+i}return t},t}(r.AbstractLogService)}),define(e[90],t([1,0,6,1418,83]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Unnecessary=1]="Unnecessary"}(t.MarkerTag||(t.MarkerTag={}));var o;!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"
}(o=t.MarkerSeverity||(t.MarkerSeverity={})),function(e){e.compare=function(e,t){return t-e};var t=Object.create(null);t[e.Error]=i.localize(0,null),t[e.Warning]=i.localize(1,null),t[e.Info]=i.localize(2,null),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case r.default.Error:return e.Error;case r.default.Warning:return e.Warning;case r.default.Info:return e.Info;case r.default.Ignore:return e.Hint}}}(o=t.MarkerSeverity||(t.MarkerSeverity={}));!function(e){var t="";e.makeKey=function(e){var n=[t];return e.source?n.push(e.source.replace("¦","¦")):n.push(t),e.code?n.push(e.code.replace("¦","¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(o.toString(e.severity)):n.push(t),e.message?n.push(e.message.replace("¦","¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),
void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}}(t.IMarkerData||(t.IMarkerData={})),t.IMarkerService=n.createDecorator("markerService")}),define(e[882],t([1,0,20,43,30,7,90]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){e.get=function(e,t,n){if(e[t])return e[t][n]},e.set=function(e,t,n,i){e[t]||(e[t]=Object.create(null)),e[t][n]=i},e.remove=function(e,t,n){return!(!e[t]||!e[t][n]||(delete e[t][n],r.isEmptyObject(e[t])&&delete e[t],0))}}(a||(a={}));var c=function(){function e(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=Object.create(null),this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}return e.prototype.dispose=function(){this._subscription.dispose(),this._data=void 0},e.prototype._update=function(e){for(var t=0,n=e;t<n.length;t++){
var i=n[t],r=i.toString(),o=this._data[r];o&&this._substract(o);var s=this._resourceStats(i);this._add(s),this._data[r]=s}},e.prototype._resourceStats=function(e){var t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===i.Schemas.inMemory||e.scheme===i.Schemas.walkThrough||e.scheme===i.Schemas.walkThroughSnippet)return t;for(var n=0,r=this._service.read({resource:e});n<r.length;n++){var o=r[n].severity;o===s.MarkerSeverity.Error?t.errors+=1:o===s.MarkerSeverity.Warning?t.warnings+=1:o===s.MarkerSeverity.Info?t.infos+=1:t.unknowns+=1}return t},e.prototype._substract=function(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns},e.prototype._add=function(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns},e}(),l=function(){function e(){this._onMarkerChanged=new o.Emitter,this._onMarkerChangedEvent=o.debounceEvent(this._onMarkerChanged.event,e._debouncer,0),this._byResource=Object.create(null),
this._byOwner=Object.create(null),this._stats=new c(this)}return e.prototype.dispose=function(){this._stats.dispose()},Object.defineProperty(e.prototype,"onMarkerChanged",{get:function(){return this._onMarkerChangedEvent},enumerable:!0,configurable:!0}),e.prototype.getStatistics=function(){return this._stats},e.prototype.remove=function(e,t){if(!n.isFalsyOrEmpty(t))for(var i=0,r=t;i<r.length;i++){var o=r[i];this.changeOne(e,o,void 0)}},e.prototype.changeOne=function(t,i,r){if(n.isFalsyOrEmpty(r)){var o=a.remove(this._byResource,i.toString(),t),s=a.remove(this._byOwner,t,i.toString());if(o!==s)throw new Error("invalid marker service state");o&&s&&this._onMarkerChanged.fire([i])}else{for(var c=[],l=0,u=r;l<u.length;l++){var d=u[l],h=e._toMarker(t,i,d);h&&c.push(h)}a.set(this._byResource,i.toString(),t,c),a.set(this._byOwner,t,i.toString(),c),this._onMarkerChanged.fire([i])}},e._toMarker=function(e,t,n){
var i=n.code,r=n.severity,o=n.message,s=n.source,a=n.startLineNumber,c=n.startColumn,l=n.endLineNumber,u=n.endColumn,d=n.relatedInformation,h=n.tags;if(o)return i=i||null,a=a>0?a:1,c=c>0?c:1,l=l>=a?l:a,u=u>0?u:c,{resource:t,owner:e,code:i,severity:r,message:o,source:s,startLineNumber:a,startColumn:c,endLineNumber:l,endColumn:u,relatedInformation:d,tags:h}},e.prototype.changeAll=function(t,i){var r=[],o=this._byOwner[t];if(o){delete this._byOwner[t];for(var s in o){var c=a.get(this._byResource,s,t)[0];c&&r.push(c.resource),a.remove(this._byResource,s,t)}}if(!n.isFalsyOrEmpty(i)){for(var l=Object.create(null),u=0,d=i;u<d.length;u++){var h=d[u],s=h.resource,p=h.marker,f=e._toMarker(t,s,p);if(f){var g=l[s.toString()];g?g.push(f):(l[s.toString()]=[f],r.push(s))}}for(var s in l)a.set(this._byResource,s,t,l[s]),a.set(this._byOwner,t,s,l[s])}r.length>0&&this._onMarkerChanged.fire(r)},e.prototype.read=function(t){void 0===t&&(t=Object.create(null));var n=t.owner,i=t.resource,r=t.severities,o=t.take
;if((!o||o<0)&&(o=-1),n&&i){if(b=a.get(this._byResource,i.toString(),n)){for(var s=[],c=0,l=b;c<l.length;c++){var u=l[c];if(e._accept(u,r)){S=s.push(u);if(o>0&&S===o)break}}return s}return[]}if(n||i){var d=n?this._byOwner[n]:this._byResource[i.toString()];if(!d)return[];s=[];for(var h in d)for(var p=0,f=d[h];p<f.length;p++){b=f[p];if(e._accept(b,r)){S=s.push(b);if(o>0&&S===o)return s}}return s}s=[];for(var g in this._byResource)for(var v in this._byResource[g])for(var m=0,y=this._byResource[g][v];m<y.length;m++){var b=y[m];if(e._accept(b,r)){var S=s.push(b);if(o>0&&S===o)return s}}return s},e._accept=function(e,t){return void 0===t||(t&e.severity)===e.severity},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,r=n;i<r.length;i++){var o=r[i];void 0===e._dedupeMap[o.toString()]&&(e._dedupeMap[o.toString()]=!0,t.push(o))}return t},e}();t.MarkerService=l}),define(e[450],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.IMenubarService=n.createDecorator("menubarService")}),define(e[884],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"updateMenubar":return this.service.updateMenubar(t[0],t[1])}},e}();t.MenubarChannel=n;var i=function(){function e(e){this.channel=e}return e.prototype.updateMenubar=function(e,t){return this.channel.call("updateMenubar",[e,t])},e}();t.MenubarChannelClient=i}),define(e[885],t([1,0,1419]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minimumTranslatedStrings={showLanguagePackExtensions:n.localize(0,null),searchMarketplace:n.localize(1,null),installAndRestartMessage:n.localize(2,null),installAndRestart:n.localize(3,null)}}),define(e[139],t([1,0,59,10]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n.dirname(i.default.parse(e.toUrl("")).fsPath),o=n.join(r,"package.json")
;t.default=e.__$__nodeRequire(o)}),define(e[454],t([1,0,1411,139]),function(e,t,n,i){"use strict";function r(e){return"*"===(e=e.trim())||l.test(e)}function o(e){if(!r(e))return null;if("*"===(e=e.trim()))return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};var t=e.match(l);return{hasCaret:"^"===t[1],hasGreaterEquals:">="===t[1],majorBase:"x"===t[2]?0:parseInt(t[2],10),majorMustEqual:"x"!==t[2],minorBase:"x"===t[4]?0:parseInt(t[4],10),minorMustEqual:"x"!==t[4],patchBase:"x"===t[6]?0:parseInt(t[6],10),patchMustEqual:"x"!==t[6],preRelease:t[8]||null}}function s(e){if(!e)return null;var t=e.majorBase,n=e.majorMustEqual,i=e.minorBase,r=e.minorMustEqual,o=e.patchBase,s=e.patchMustEqual;return e.hasCaret&&(0===t?s=!1:(r=!1,s=!1)),{majorBase:t,majorMustEqual:n,minorBase:i,minorMustEqual:r,patchBase:o,patchMustEqual:s,isMinimum:e.hasGreaterEquals}}function a(e,t){var n;n="string"==typeof e?s(o(e)):e;var i
;if(i="string"==typeof t?s(o(t)):t,!n||!i)return!1;var r=n.majorBase,a=n.minorBase,c=n.patchBase,l=i.majorBase,u=i.minorBase,d=i.patchBase,h=i.majorMustEqual,p=i.minorMustEqual,f=i.patchMustEqual;return i.isMinimum?r>l||!(r<l)&&(a>u||!(a<u)&&c>=d):(1!==r||0!==l||h&&p&&f||(l=1,u=0,d=0,h=!0,p=!1,f=!1),!(r<l)&&(r>l?!h:!(a<u)&&(a>u?!p:!(c<d)&&(!(c>d)||!f))))}function c(e,t,i){void 0===i&&(i=[]);var r=s(o(t));if(!r)return i.push(n.localize(0,null,t)),!1;if(0===r.majorBase){if(!r.majorMustEqual||!r.minorMustEqual)return i.push(n.localize(1,null,t)),!1}else if(!r.majorMustEqual)return i.push(n.localize(2,null,t)),!1;return!!a(e,r)||(i.push(n.localize(3,null,e,t)),!1)}Object.defineProperty(t,"__esModule",{value:!0});var l=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;t.isValidVersionStr=r,t.parseVersion=o,t.normalizeVersion=s,t.isValidVersion=a,t.isValidExtensionVersion=function(e,t,n){return!(!t.isBuiltin&&void 0!==t.main)||c(e,t.engines.vscode,n)},t.isEngineValid=function(e){
return"*"===e||c(i.default.version,e)},t.isVersionValid=c}),define(e[76],t([1,0,59,10]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n.dirname(i.default.parse(e.toUrl("")).fsPath),o=n.join(r,"product.json"),s=e.__$__nodeRequire(o);process.env.VSCODE_DEV&&(s.nameShort+=" Dev",s.nameLong+=" Dev",s.dataFolderName+="-dev"),t.default=s}),define(e[889],t([1,0,163,913,93,59,10,111,139,76,397,11]),function(e,t,n,i,r,o,s,c,l,u,d,h){"use strict";function p(e,t){return h.isWindows?function(e,t){return"\\\\.\\pipe\\"+n.createHash("md5").update(e).digest("hex")+"-"+l.default.version+"-"+t+"-sock"}(e,t):function(e,t){if(b){var i=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(b,"vscode-"+i+"-"+l.default.version+"-"+t+".sock")}return o.join(e,l.default.version+"-"+t+".sock")}(e,t)}function f(e,t){return v(e.debugPluginHost,e.debugBrkPluginHost,5870,t,e.debugId)}function g(e,t){return v(e.debugSearch,e.debugBrkSearch,5876,t)}function v(e,t,n,i,r){
var o=t||e,s=Number(o)||(i?null:n);return{port:s,break:!!s&&Boolean(!!t),debugId:r}}function m(e,t){if(e){var n=o.resolve(e);return o.normalize(e)===n?n:o.resolve(t.env.VSCODE_CWD||t.cwd(),e)}}function y(e,t){return m(e["user-data-dir"],t)||o.resolve(i.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{value:!0});var b=process.env.XDG_RUNTIME_DIR,S=function(){function t(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){var n=d.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"");process.env.VSCODE_LOGS=o.join(this.userDataPath,"logs",n)}this.logsPath=process.env.VSCODE_LOGS}return Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appRoot",{get:function(){return o.dirname(s.default.parse(e.toUrl("")).fsPath)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"execPath",{get:function(){return this._execPath},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"cliPath",{get:function(){return function(e,t,n){return h.isWindows?n?o.join(o.dirname(e),"bin",u.default.applicationName+".cmd"):o.join(t,"scripts","code-cli.bat"):h.isLinux?n?o.join(o.dirname(e),"bin",""+u.default.applicationName):o.join(t,"scripts","code-cli.sh"):n?o.join(t,"bin","code"):o.join(t,"scripts","code-cli.sh")}(this.execPath,this.appRoot,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userHome",{get:function(){return r.homedir()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userDataPath",{get:function(){return process.env.VSCODE_PORTABLE?o.join(process.env.VSCODE_PORTABLE,"user-data"):y(this._args,process)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appNameLong",{get:function(){return u.default.nameLong},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appQuality",{get:function(){return u.default.quality},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"appSettingsHome",{get:function(){return o.join(this.userDataPath,"User")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appSettingsPath",{get:function(){return o.join(this.appSettingsHome,"settings.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchBuildId",{get:function(){return u.default.settingsSearchBuildId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchUrl",{get:function(){return u.default.settingsSearchUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appKeybindingsPath",{get:function(){return o.join(this.appSettingsHome,"keybindings.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isExtensionDevelopment",{get:function(){return!!this._args.extensionDevelopmentPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backupHome",{get:function(){return o.join(this.userDataPath,"Backups")},enumerable:!0,
configurable:!0}),Object.defineProperty(t.prototype,"backupWorkspacesPath",{get:function(){return o.join(this.backupHome,"workspaces.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workspacesHome",{get:function(){return o.join(this.userDataPath,"Workspaces")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"installSourcePath",{get:function(){return o.join(this.userDataPath,"installSource")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionsPath",{get:function(){var e=m(this._args["extensions-dir"],process);return e||(process.env.VSCODE_EXTENSIONS?process.env.VSCODE_EXTENSIONS:process.env.VSCODE_PORTABLE?o.join(process.env.VSCODE_PORTABLE,"extensions"):o.join(this.userHome,u.default.dataFolderName,"extensions"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionDevelopmentPath",{get:function(){
return this._args.extensionDevelopmentPath?o.normalize(this._args.extensionDevelopmentPath):this._args.extensionDevelopmentPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionTestsPath",{get:function(){return this._args.extensionTestsPath?o.normalize(this._args.extensionTestsPath):this._args.extensionTestsPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableExtensions",{get:function(){return this._args["disable-extensions"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipGettingStarted",{get:function(){return this._args["skip-getting-started"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipReleaseNotes",{get:function(){return this._args["skip-release-notes"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipAddToRecentlyOpened",{get:function(){return this._args["skip-add-to-recently-opened"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugExtensionHost",{
get:function(){return f(this._args,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugSearch",{get:function(){return g(this._args,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBuilt",{get:function(){return!process.env.VSCODE_DEV},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verbose",{get:function(){return this._args.verbose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wait",{get:function(){return this._args.wait},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logExtensionHostCommunication",{get:function(){return this._args.logExtensionHostCommunication},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"performance",{get:function(){return this._args.performance},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._args.status},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"mainIPCHandle",{get:function(){return p(this.userDataPath,"main")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharedIPCHandle",{get:function(){return p(this.userDataPath,"shared")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCachedDataDir",{get:function(){return this.isBuilt?o.join(this.userDataPath,"CachedData",u.default.commit||new Array(41).join("0")):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableUpdates",{get:function(){return!!this._args["disable-updates"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableCrashReporter",{get:function(){return!!this._args["disable-crash-reporter"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"driverHandle",{get:function(){return this._args.driver},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"driverVerbose",{get:function(){return this._args["driver-verbose"]},enumerable:!0,
configurable:!0}),a([c.memoize],t.prototype,"appRoot",null),a([c.memoize],t.prototype,"cliPath",null),a([c.memoize],t.prototype,"userHome",null),a([c.memoize],t.prototype,"userDataPath",null),a([c.memoize],t.prototype,"appSettingsHome",null),a([c.memoize],t.prototype,"appSettingsPath",null),a([c.memoize],t.prototype,"settingsSearchBuildId",null),a([c.memoize],t.prototype,"settingsSearchUrl",null),a([c.memoize],t.prototype,"appKeybindingsPath",null),a([c.memoize],t.prototype,"isExtensionDevelopment",null),a([c.memoize],t.prototype,"backupHome",null),a([c.memoize],t.prototype,"backupWorkspacesPath",null),a([c.memoize],t.prototype,"workspacesHome",null),a([c.memoize],t.prototype,"installSourcePath",null),a([c.memoize],t.prototype,"extensionsPath",null),a([c.memoize],t.prototype,"extensionDevelopmentPath",null),a([c.memoize],t.prototype,"extensionTestsPath",null),a([c.memoize],t.prototype,"debugExtensionHost",null),a([c.memoize],t.prototype,"debugSearch",null),a([c.memoize],t.prototype,"mainIPCHandle",null),
a([c.memoize],t.prototype,"sharedIPCHandle",null),a([c.memoize],t.prototype,"nodeCachedDataDir",null),t}();t.EnvironmentService=S,t.parseExtensionHostPort=f,t.parseSearchPort=g,t.parseDebugPort=v,t.parseUserDataDir=y}),define(e[22],t([1,0,83,6,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Severity=n.default,t.INotificationService=i.createDecorator("notificationService");var o=function(){function e(){this.progress=new s,this._onDidClose=new r.Emitter}return Object.defineProperty(e.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),e.prototype.updateSeverity=function(e){},e.prototype.updateMessage=function(e){},e.prototype.updateActions=function(e){},e.prototype.close=function(){this._onDidClose.dispose()},e}();t.NoOpNotification=o;var s=function(){function e(){}return e.prototype.infinite=function(){},e.prototype.done=function(){},e.prototype.total=function(e){},e.prototype.worked=function(e){},e}();t.NoOpProgress=s}),
define(e[143],t([1,0,1394,37,31,5,41,106,7,35,149,8,22,11]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";function m(e,t,n,i){void 0===i&&(i=function(e){return"navigation"===e});for(var r=0,s=e;r<s.length;r++){var a=s[r],l=a[0],u=a[1];if(n&&(u=u.map(function(e){return e instanceof o.MenuItemAction&&e.alt?e.alt:e})),i(l)){for(var d=Array.isArray(t)?t:t.primary,h=0;h<u.length&&!(u[h].order>=0);h++);d.unshift.apply(d,u.slice(0,h));for(var p=0;p<d.length&&!(d[p]instanceof c.Separator);)p++;d.splice.apply(d,[p,0].concat(u.slice(h)))}else{var f=Array.isArray(t)?t:t.secondary;f.length>0&&f.push(new c.Separator),f.push.apply(f,u)}}}Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t){var n=e.call(this)||this;return n._subscriptions=[],n._suppressAltKeyUp=!1,n._subscriptions.push(u.domEvent(document.body,"keydown")(function(e){n.isPressed=e.altKey||(v.isWindows||v.isLinux)&&e.shiftKey})),n._subscriptions.push(u.domEvent(document.body,"keyup")(function(e){
n.isPressed&&n._suppressAltKeyUp&&e.preventDefault(),n._suppressAltKeyUp=!1,n.isPressed=!1})),n._subscriptions.push(u.domEvent(document.body,"mouseleave")(function(e){return n.isPressed=!1})),n._subscriptions.push(u.domEvent(document.body,"blur")(function(e){return n.isPressed=!1})),n._subscriptions.push(t.onDidContextMenu(function(){return n.isPressed=!1})),n}return n(t,e),Object.defineProperty(t.prototype,"isPressed",{get:function(){return this._isPressed},set:function(e){this._isPressed=e,this.fire(this._isPressed)},enumerable:!0,configurable:!0}),t.prototype.suppressAltKeyUp=function(){this._suppressAltKeyUp=!0},t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._subscriptions=s.dispose(this._subscriptions)},t}(d.Emitter);t.fillInContextMenuActions=function(e,t,n,i,r){m(e.getActions(t),n,y.getInstance(i).isPressed,r)},t.fillInActionBarActions=function(e,t,n,i){m(e.getActions(t),n,!1,i)},
t.createActionItem=function(e,t,n,i){if(e instanceof o.MenuItemAction)return new S(e,t,n,i)};var b=new p.IdGenerator("menu-item-action-item-icon-"),S=function(e){function t(t,n,i,r){var o=e.call(this,void 0,t,{icon:!(!t.class&&!t.item.iconLocation),label:!t.class&&!t.item.iconLocation})||this;return o._action=t,o._keybindingService=n,o._notificationService=i,o._contextMenuService=r,o}return n(t,e),Object.defineProperty(t.prototype,"_commandAction",{get:function(){return this._wantsAltCommand&&this._action.alt||this._action},enumerable:!0,configurable:!0}),t.prototype.onClick=function(e){var t=this;e.preventDefault(),e.stopPropagation();var n=y.getInstance(this._contextMenuService);n.isPressed&&n.suppressAltKeyUp(),this.actionRunner.run(this._commandAction).done(void 0,function(e){return t._notificationService.error(e)})},t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this._updateItemClass(this._action.item)
;var i=!1,r=y.getInstance(this._contextMenuService),o=r.isPressed,s=function(){var e=i&&o;e!==n._wantsAltCommand&&(n._wantsAltCommand=e,n._updateLabel(),n._updateTooltip(),n._updateClass())};this._callOnDispose.push(r.event(function(e){o=e,s()})),this._callOnDispose.push(u.domEvent(t,"mouseleave")(function(e){i=!1,s()})),this._callOnDispose.push(u.domEvent(t,"mouseenter")(function(e){i=!0,s()}))},t.prototype._updateLabel=function(){this.options.label&&this.$e.text(this._commandAction.label)},t.prototype._updateTooltip=function(){var e=this.$e.getHTMLElement(),t=this._keybindingService.lookupKeybinding(this._commandAction.id),n=t&&t.getLabel();e.title=n?i.localize(0,null,this._commandAction.label,n):this._commandAction.label},t.prototype._updateClass=function(){this.options.icon&&(this._commandAction!==this._action?this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))},t.prototype._updateItemClass=function(e){var n=this;if(s.dispose(this._itemClassDispose),
this._itemClassDispose=void 0,e.iconLocation){var i,r=e.iconLocation.dark.toString();t.ICON_PATH_TO_CSS_RULES.has(r)?i=t.ICON_PATH_TO_CSS_RULES.get(r):(i=b.nextId(),f.createCSSRule(".icon."+i,'background-image: url("'+(e.iconLocation.light||e.iconLocation.dark).toString()+'")'),f.createCSSRule(".vs-dark .icon."+i+", .hc-black .icon."+i,'background-image: url("'+e.iconLocation.dark.toString()+'")'),t.ICON_PATH_TO_CSS_RULES.set(r,i)),this.$e.getHTMLElement().classList.add("icon",i),this._itemClassDispose={dispose:function(){return n.$e.getHTMLElement().classList.remove("icon",i)}}}},t.prototype.dispose=function(){this._itemClassDispose&&(s.dispose(this._itemClassDispose),this._itemClassDispose=void 0),e.prototype.dispose.call(this)},t.ICON_PATH_TO_CSS_RULES=new Map,t=a([l(1,r.IKeybindingService),l(2,g.INotificationService),l(3,h.IContextMenuService)],t)}(c.ActionItem);t.MenuItemActionItem=S;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),
t.prototype.onClick=function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.actionRunner.run(this._commandAction,this._context).done(void 0,function(e){return t._notificationService.error(e)})},t}(S);t.ContextAwareMenuItemActionItem=_}),define(e[88],t([1,0,4,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOpenerService=i.createDecorator("openerService"),t.NullOpenerService=Object.freeze({_serviceBrand:void 0,open:function(){return n.TPromise.as(void 0)}})}),define(e[338],t([1,0,251,88,54,10,9,353,6,7,5]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n){void 0===n&&(n=i.NullOpenerService),this._editor=e,this._modeService=t,this._openerService=n,this._onDidRenderCodeBlock=new d.Emitter,this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}return e.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,n){
var i=e?t._modeService.getModeIdForLanguageName(e):t._editor.getModel().getLanguageIdentifier().language;return t._modeService.getOrCreateMode(i).then(function(e){return c.tokenizeToString(n,i)}).then(function(e){return'<span style="font-family: '+t._editor.getConfiguration().fontInfo.fontFamily+'">'+e+"</span>"})},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(o.default.parse(e)).then(void 0,s.onUnexpectedError)},disposeables:e}}},e.prototype.render=function(e){var t,i=[];return t=e?n.renderMarkdown(e,this.getOptions(i)):document.createElement("span"),{element:t,dispose:function(){return h.dispose(i)}}},e=a([l(1,r.IModeService),l(2,u.optional(i.IOpenerService))],e)}();t.MarkdownRenderer=p}),define(e[119],t([1,0,6,145,5]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IProgressService=n.createDecorator("progressService"),t.emptyProgressRunner=Object.freeze({total:function(){},
worked:function(){},done:function(){}}),t.emptyProgress=Object.freeze({report:function(){}});var o=function(){function e(e){this._callback=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.report=function(e){this._value=e,this._callback(this._value)},e}();t.Progress=o;var s=function(){function e(e){this.progressService=e,this.currentOperationId=0,this.currentOperationDisposables=[]}return e.prototype.start=function(e){var t=this;this.stop();var n=++this.currentOperationId,o=new i.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(function(){n===t.currentOperationId&&(t.currentProgressRunner=t.progressService.show(!0))},e),this.currentOperationDisposables.push(r.toDisposable(function(){return clearTimeout(t.currentProgressTimeout)}),r.toDisposable(function(){return o.cancel()}),r.toDisposable(function(){return t.currentProgressRunner?t.currentProgressRunner.done():void 0})),{id:n,token:o.token,stop:function(){
return t.doStop(n)},isCurrent:function(){return t.currentOperationId===n}}},e.prototype.stop=function(){this.doStop(this.currentOperationId)},e.prototype.doStop=function(e){this.currentOperationId===e&&(this.currentOperationDisposables=r.dispose(this.currentOperationDisposables))},e.prototype.dispose=function(){this.currentOperationDisposables=r.dispose(this.currentOperationDisposables)},e}();t.LongRunningOperation=s}),define(e[64],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IQuickOpenService=n.createDecorator("quickOpenService")}),define(e[179],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IQuickInputService=n.createDecorator("quickInputService")}),define(e[16],t([1,0,30,170]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.data={}}return e.prototype.add=function(e,t){i.ok(n.isString(e)),i.ok(n.isObject(t)),
i.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new r}),define(e[181],t([1,0,1249,7,16,114,44]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={ModesRegistry:"editor.modesRegistry"};var a=function(){function e(){this._onDidAddLanguages=new i.Emitter,this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e])},e.prototype.registerLanguages=function(e){this._languages=this._languages.concat(e),this._onDidAddLanguages.fire(e)},e.prototype.getLanguages=function(){return this._languages.slice(0)},e}();t.EditorModesRegistry=a,t.ModesRegistry=new a,r.Registry.add(t.Extensions.ModesRegistry,t.ModesRegistry),t.PLAINTEXT_MODE_ID="plaintext",
t.PLAINTEXT_LANGUAGE_IDENTIFIER=new s.LanguageIdentifier(t.PLAINTEXT_MODE_ID,1),t.ModesRegistry.registerLanguage({id:t.PLAINTEXT_MODE_ID,extensions:[".txt",".gitignore"],aliases:[n.localize(0,null),"text"],mimetypes:["text/plain"]}),o.LanguageConfigurationRegistry.register(t.PLAINTEXT_LANGUAGE_IDENTIFIER,{brackets:[["(",")"],["[","]"],["{","}"]]})}),define(e[120],t([1,0,16,7]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};var r=new(function(){function e(){this._onDidChangeSchema=new i.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}return e.prototype.registerSchema=function(e,t){this.schemasById[function(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}(e)]=t,this._onDidChangeSchema.fire(e)},e.prototype.notifySchemaChanged=function(e){this._onDidChangeSchema.fire(e)},e.prototype.getSchemaContributions=function(){return{schemas:this.schemasById}},e}())
;n.Registry.add(t.Extensions.JSONContribution,r)}),define(e[63],t([1,0,1396,7,16,30,14,120]),function(e,t,n,i,r,o,s,a){"use strict";function c(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==g.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"};var l;!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(l=t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.editorConfigurationSchemaId="vscode://schemas/settings/editor";var u=r.Registry.as(a.Extensions.JSONContribution),d=function(){function e(){this.overrideIdentifiers=[],this._onDidRegisterConfiguration=new i.Emitter,
this.onDidRegisterConfiguration=this._onDidRegisterConfiguration.event,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,n){var i=this;void 0===n&&(n=!0);var r=this.toConfiguration(t);r&&e.push(r);var o=[];e.forEach(function(e){o.push.apply(o,i.validateAndRegisterProperties(e,n)),i.configurationContributors.push(e),i.registerJSONConfiguration(e),i.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidRegisterConfiguration.fire(o)},e.prototype.notifyConfigurationSchemaUpdated=function(e){
u.notifySchemaChanged(t.editorConfigurationSchemaId)},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.toConfiguration=function(e){for(var i={id:"defaultOverrides",title:n.localize(0,null),properties:{}},r=0,o=e;r<o.length;r++){var s=o[r];for(var a in s.defaults){var c=s.defaults[a];t.OVERRIDE_PROPERTY_PATTERN.test(a)&&"object"==typeof c&&(i.properties[a]={type:"object",default:c,description:n.localize(1,null,a),$ref:t.editorConfigurationSchemaId})}}return Object.keys(i.properties).length?i:null},e.prototype.validateAndRegisterProperties=function(e,t,n,i){void 0===t&&(t=!0),void 0===n&&(n=l.WINDOW),void 0===i&&(i=!1),n=void 0!==e.scope&&null!==e.scope?e.scope:n,i=e.overridable||i;var r=[],s=e.properties;if(s)for(var a in s){var u=void 0;if(t&&(u=c(a)))console.warn(u),delete s[a];else{var d=s[a],h=d.default;o.isUndefined(h)&&(d.default=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1
;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(d.type)),i&&(d.overridable=!0),void 0===d.scope&&(d.scope=n),!s[a].hasOwnProperty("included")||s[a].included?(this.configurationProperties[a]=s[a],r.push(a)):(this.excludedConfigurationProperties[a]=s[a],delete s[a])}}var p=e.allOf;if(p)for(var f=0,g=p;f<g.length;f++){var v=g[f];r.push.apply(r,this.validateAndRegisterProperties(v,t,n,i))}return r},e.prototype.getConfigurations=function(){return this.configurationContributors},e.prototype.getConfigurationProperties=function(){return this.configurationProperties},e.prototype.getExcludedConfigurationProperties=function(){return this.excludedConfigurationProperties},e.prototype.registerJSONConfiguration=function(e){function n(e){var i=e.properties;if(i)for(var r in i)switch(t.allSettings.properties[r]=i[r],i[r].scope){case l.APPLICATION:t.applicationSettings.properties[r]=i[r];break;case l.WINDOW:t.windowSettings.properties[r]=i[r];break
;case l.RESOURCE:t.resourceSettings.properties[r]=i[r]}var o=e.allOf;o&&o.forEach(n)}n(e)},e.prototype.updateSchemaForOverrideSettingsConfiguration=function(e){e.id!==h&&(this.update(e),u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema))},e.prototype.updateOverridePropertyPatternKey=function(){var e=t.allSettings.patternProperties[this.overridePropertyPattern];e||(e={type:"object",description:n.localize(2,null),errorMessage:"Unknown Identifier. Use language identifiers",$ref:t.editorConfigurationSchemaId}),delete t.allSettings.patternProperties[this.overridePropertyPattern],delete t.applicationSettings.patternProperties[this.overridePropertyPattern],delete t.windowSettings.patternProperties[this.overridePropertyPattern],delete t.resourceSettings.patternProperties[this.overridePropertyPattern],this.computeOverridePropertyPattern(),t.allSettings.patternProperties[this.overridePropertyPattern]=e,t.applicationSettings.patternProperties[this.overridePropertyPattern]=e,
t.windowSettings.patternProperties[this.overridePropertyPattern]=e,t.resourceSettings.patternProperties[this.overridePropertyPattern]=e},e.prototype.update=function(e){var t=this,n=e.properties;if(n)for(var i in n)n[i].overridable&&(this.editorConfigurationSchema.properties[i]=this.getConfigurationProperties()[i]);var r=e.allOf;r&&r.forEach(function(e){return t.update(e)})},e.prototype.computeOverridePropertyPattern=function(){this.overridePropertyPattern=this.overrideIdentifiers.length?f.replace("${0}",this.overrideIdentifiers.map(function(e){return s.createRegExp(e,!1).source}).join("|")):p},e}(),h="override",p="\\[.*\\]$",f="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(p);var g=new d;r.Registry.add(t.Extensions.Configuration,g),t.validateProperty=c,t.getScopes=function(){for(var e={},t=g.getConfigurationProperties(),n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];e[r]=t[r].scope}return e.launch=l.RESOURCE,e.task=l.RESOURCE,e}}),
define(e[260],t([1,0,1238,7,5,24,11,63,16,330,273,133]),function(e,t,i,r,o,s,a,c,l,u,d,h){"use strict";function p(){return null===_&&(_=Object.create(null),Object.keys(S.properties).forEach(function(e){_[e]=!0})),_}Object.defineProperty(t,"__esModule",{value:!0});var f=h.EDITOR_DEFAULTS,g=h.EDITOR_FONT_DEFAULTS,v=h.EDITOR_MODEL_DEFAULTS;t.TabFocus=new(function(){function e(){this._tabFocus=!1,this._onDidChangeTabFocus=new r.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}return e.prototype.getTabFocusMode=function(){return this._tabFocus},e.prototype.setTabFocusMode=function(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))},e}());var m=Object.hasOwnProperty,y=function(e){function i(n){var i=e.call(this)||this;return i._onDidChange=i._register(new r.Emitter),i.onDidChange=i._onDidChange.event,i._rawOptions=s.mixin({},n||{}),i._rawOptions.scrollbar=s.mixin({},i._rawOptions.scrollbar||{}),i._rawOptions.minimap=s.mixin({},i._rawOptions.minimap||{}),
i._rawOptions.find=s.mixin({},i._rawOptions.find||{}),i._rawOptions.hover=s.mixin({},i._rawOptions.hover||{}),i._validatedOptions=h.EditorOptionsValidator.validate(i._rawOptions,f),i.editor=null,i._isDominatedByLongLines=!1,i._lineNumbersDigitCount=1,i._register(d.EditorZoom.onDidChangeZoomLevel(function(e){return i._recomputeOptions()})),i._register(t.TabFocus.onDidChangeTabFocus(function(e){return i._recomputeOptions()})),i}return n(i,e),i.prototype.observeReferenceElement=function(e){},i.prototype.dispose=function(){e.prototype.dispose.call(this)},i.prototype._recomputeOptions=function(){var e=this.editor,t=this._computeInternalOptions();e&&e.equals(t)||(this.editor=t,e&&this._onDidChange.fire(e.createChangeEvent(t)))},i.prototype.getRawOptions=function(){return this._rawOptions},i.prototype._computeInternalOptions=function(){var e=this._validatedOptions,n=this._getEnvConfiguration(),i=u.BareFontInfo.createFromRawSettings(this._rawOptions,n.zoomLevel),r={outerWidth:n.outerWidth,outerHeight:n.outerHeight,
fontInfo:this.readConfiguration(i),extraEditorClassName:n.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:n.emptySelectionClipboard,pixelRatio:n.pixelRatio,tabFocusMode:t.TabFocus.getTabFocusMode(),accessibilitySupport:n.accessibilitySupport};return h.InternalEditorOptionsFactory.createInternalEditorOptions(r,e)},i._primitiveArrayEquals=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},i._subsetEquals=function(e,t){for(var n in t)if(m.call(t,n)){var i=t[n],r=e[n];if(r===i)continue;if(Array.isArray(r)&&Array.isArray(i)){if(!this._primitiveArrayEquals(r,i))return!1;continue}if("object"==typeof r&&"object"==typeof i){if(!this._subsetEquals(r,i))return!1;continue}return!1}return!0},i.prototype.updateOptions=function(e){void 0!==e&&(i._subsetEquals(this._rawOptions,e)||(this._rawOptions=s.mixin(this._rawOptions,e||{}),
this._validatedOptions=h.EditorOptionsValidator.validate(this._rawOptions,f),this._recomputeOptions()))},i.prototype.setIsDominatedByLongLines=function(e){this._isDominatedByLongLines=e,this._recomputeOptions()},i.prototype.setMaxLineNumber=function(e){var t=i._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())},i._digitCount=function(e){for(var t=0;e;)e=Math.floor(e/10),t++;return t||1},i}(o.Disposable);t.CommonEditorConfiguration=y;var b=l.Registry.as(c.Extensions.Configuration),S={id:"editor",order:5,type:"object",title:i.localize(0,null),overridable:!0,scope:c.ConfigurationScope.RESOURCE,properties:{"editor.fontFamily":{type:"string",default:g.fontFamily,description:i.localize(1,null)},"editor.fontWeight":{type:"string",enum:["normal","bold","100","200","300","400","500","600","700","800","900"],default:g.fontWeight,description:i.localize(2,null)},"editor.fontSize":{type:"number",default:g.fontSize,description:i.localize(3,null)},"editor.lineHeight":{
type:"number",default:g.lineHeight,description:i.localize(4,null)},"editor.letterSpacing":{type:"number",default:g.letterSpacing,description:i.localize(5,null)},"editor.lineNumbers":{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[i.localize(6,null),i.localize(7,null),i.localize(8,null),i.localize(9,null)],default:"on",description:i.localize(10,null)},"editor.rulers":{type:"array",items:{type:"number"},default:f.viewInfo.rulers,description:i.localize(11,null)},"editor.wordSeparators":{type:"string",default:f.wordSeparators,description:i.localize(12,null)},"editor.tabSize":{type:"number",default:v.tabSize,minimum:1,description:i.localize(13,null),errorMessage:i.localize(14,null)},"editor.insertSpaces":{type:"boolean",default:v.insertSpaces,description:i.localize(15,null),errorMessage:i.localize(16,null)},"editor.detectIndentation":{type:"boolean",default:v.detectIndentation,description:i.localize(17,null)},"editor.roundedSelection":{type:"boolean",default:f.viewInfo.roundedSelection,
description:i.localize(18,null)},"editor.scrollBeyondLastLine":{type:"boolean",default:f.viewInfo.scrollBeyondLastLine,description:i.localize(19,null)},"editor.scrollBeyondLastColumn":{type:"number",default:f.viewInfo.scrollBeyondLastColumn,description:i.localize(20,null)},"editor.smoothScrolling":{type:"boolean",default:f.viewInfo.smoothScrolling,description:i.localize(21,null)},"editor.minimap.enabled":{type:"boolean",default:f.viewInfo.minimap.enabled,description:i.localize(22,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:f.viewInfo.minimap.side,description:i.localize(23,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:f.viewInfo.minimap.showSlider,description:i.localize(24,null)},"editor.minimap.renderCharacters":{type:"boolean",default:f.viewInfo.minimap.renderCharacters,description:i.localize(25,null)},"editor.minimap.maxColumn":{type:"number",default:f.viewInfo.minimap.maxColumn,description:i.localize(26,null)},"editor.hover.enabled":{
type:"boolean",default:f.contribInfo.hover.enabled,description:i.localize(27,null)},"editor.hover.delay":{type:"number",default:f.contribInfo.hover.delay,description:i.localize(28,null)},"editor.hover.sticky":{type:"boolean",default:f.contribInfo.hover.sticky,description:i.localize(29,null)},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:f.contribInfo.find.seedSearchStringFromSelection,description:i.localize(30,null)},"editor.find.autoFindInSelection":{type:"boolean",default:f.contribInfo.find.autoFindInSelection,description:i.localize(31,null)},"editor.find.globalFindClipboard":{type:"boolean",default:f.contribInfo.find.globalFindClipboard,description:i.localize(32,null),included:a.isMacintosh},"editor.wordWrap":{type:"string",enum:["off","on","wordWrapColumn","bounded"],enumDescriptions:[i.localize(33,null),i.localize(34,null),i.localize(35,null),i.localize(36,null)],default:f.wordWrap,description:i.localize(37,null)},"editor.wordWrapColumn":{type:"integer",default:f.wordWrapColumn,
minimum:1,description:i.localize(38,null)},"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],default:"same",description:i.localize(39,null)},"editor.mouseWheelScrollSensitivity":{type:"number",default:f.viewInfo.scrollbar.mouseWheelScrollSensitivity,description:i.localize(40,null)},"editor.multiCursorModifier":{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[i.localize(41,null),i.localize(42,null)],default:"alt",description:i.localize(43,null)},"editor.multiCursorMergeOverlapping":{type:"boolean",default:f.multiCursorMergeOverlapping,description:i.localize(44,null)},"editor.quickSuggestions":{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:!1,description:i.localize(45,null)},comments:{type:"boolean",default:!1,description:i.localize(46,null)},other:{type:"boolean",default:!0,description:i.localize(47,null)}}}],default:f.contribInfo.quickSuggestions,description:i.localize(48,null)},"editor.quickSuggestionsDelay":{type:"integer",
default:f.contribInfo.quickSuggestionsDelay,minimum:0,description:i.localize(49,null)},"editor.parameterHints":{type:"boolean",default:f.contribInfo.parameterHints,description:i.localize(50,null)},"editor.autoClosingBrackets":{type:"boolean",default:f.autoClosingBrackets,description:i.localize(51,null)},"editor.formatOnType":{type:"boolean",default:f.contribInfo.formatOnType,description:i.localize(52,null)},"editor.formatOnPaste":{type:"boolean",default:f.contribInfo.formatOnPaste,description:i.localize(53,null)},"editor.autoIndent":{type:"boolean",default:f.autoIndent,description:i.localize(54,null)},"editor.suggestOnTriggerCharacters":{type:"boolean",default:f.contribInfo.suggestOnTriggerCharacters,description:i.localize(55,null)},"editor.acceptSuggestionOnEnter":{type:"string",enum:["on","smart","off"],default:f.contribInfo.acceptSuggestionOnEnter,description:i.localize(56,null)},"editor.acceptSuggestionOnCommitCharacter":{type:"boolean",default:f.contribInfo.acceptSuggestionOnCommitCharacter,
description:i.localize(57,null)},"editor.snippetSuggestions":{type:"string",enum:["top","bottom","inline","none"],enumDescriptions:[i.localize(58,null),i.localize(59,null),i.localize(60,null),i.localize(61,null)],default:f.contribInfo.snippetSuggestions,description:i.localize(62,null)},"editor.emptySelectionClipboard":{type:"boolean",default:f.emptySelectionClipboard,description:i.localize(63,null)},"editor.wordBasedSuggestions":{type:"boolean",default:f.contribInfo.wordBasedSuggestions,description:i.localize(64,null)},"editor.suggestSelection":{type:"string",enum:["first","recentlyUsed","recentlyUsedByPrefix"],enumDescriptions:[i.localize(65,null),i.localize(66,null),i.localize(67,null)],default:"recentlyUsed",description:i.localize(68,null)},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:i.localize(69,null)},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,description:i.localize(70,null)},"editor.selectionHighlight":{type:"boolean",
default:f.contribInfo.selectionHighlight,description:i.localize(71,null)},"editor.occurrencesHighlight":{type:"boolean",default:f.contribInfo.occurrencesHighlight,description:i.localize(72,null)},"editor.overviewRulerLanes":{type:"integer",default:3,description:i.localize(73,null)},"editor.overviewRulerBorder":{type:"boolean",default:f.viewInfo.overviewRulerBorder,description:i.localize(74,null)},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:h.blinkingStyleToString(f.viewInfo.cursorBlinking),description:i.localize(75,null)},"editor.mouseWheelZoom":{type:"boolean",default:f.viewInfo.mouseWheelZoom,description:i.localize(76,null)},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:h.cursorStyleToString(f.viewInfo.cursorStyle),description:i.localize(77,null)},"editor.cursorWidth":{type:"integer",default:f.viewInfo.cursorWidth,description:i.localize(78,null)},"editor.fontLigatures":{
type:"boolean",default:f.viewInfo.fontLigatures,description:i.localize(79,null)},"editor.hideCursorInOverviewRuler":{type:"boolean",default:f.viewInfo.hideCursorInOverviewRuler,description:i.localize(80,null)},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],default:f.viewInfo.renderWhitespace,description:i.localize(81,null)},"editor.renderControlCharacters":{type:"boolean",default:f.viewInfo.renderControlCharacters,description:i.localize(82,null)},"editor.renderIndentGuides":{type:"boolean",default:f.viewInfo.renderIndentGuides,description:i.localize(83,null)},"editor.highlightActiveIndentGuide":{type:"boolean",default:f.viewInfo.highlightActiveIndentGuide,description:i.localize(84,null)},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:f.viewInfo.renderLineHighlight,description:i.localize(85,null)},"editor.codeLens":{type:"boolean",default:f.contribInfo.codeLens,description:i.localize(86,null)},"editor.folding":{type:"boolean",
default:f.contribInfo.folding,description:i.localize(87,null)},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],enumDescriptions:[i.localize(88,null),i.localize(89,null)],default:f.contribInfo.foldingStrategy,description:i.localize(90,null)},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:f.contribInfo.showFoldingControls,description:i.localize(91,null)},"editor.matchBrackets":{type:"boolean",default:f.contribInfo.matchBrackets,description:i.localize(92,null)},"editor.glyphMargin":{type:"boolean",default:f.viewInfo.glyphMargin,description:i.localize(93,null)},"editor.useTabStops":{type:"boolean",default:f.useTabStops,description:i.localize(94,null)},"editor.trimAutoWhitespace":{type:"boolean",default:v.trimAutoWhitespace,description:i.localize(95,null)},"editor.stablePeek":{type:"boolean",default:!1,description:i.localize(96,null)},"editor.dragAndDrop":{type:"boolean",default:f.dragAndDrop,description:i.localize(97,null)},"editor.accessibilitySupport":{
type:"string",enum:["auto","on","off"],enumDescriptions:[i.localize(98,null),i.localize(99,null),i.localize(100,null)],default:f.accessibilitySupport,description:i.localize(101,null)},"editor.showUnused":{type:"boolean",default:f.showUnused,description:i.localize(102,null)},"editor.links":{type:"boolean",default:f.contribInfo.links,description:i.localize(103,null)},"editor.colorDecorators":{type:"boolean",default:f.contribInfo.colorDecorators,description:i.localize(104,null)},"editor.lightbulb.enabled":{type:"boolean",default:f.contribInfo.lightbulbEnabled,description:i.localize(105,null)},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:i.localize(106,null)}},additionalProperties:{type:"boolean"},default:f.contribInfo.codeActionsOnSave,description:i.localize(107,null)},"editor.codeActionsOnSaveTimeout":{type:"number",default:f.contribInfo.codeActionsOnSaveTimeout,description:i.localize(108,null)},"editor.selectionClipboard":{type:"boolean",
default:f.contribInfo.selectionClipboard,description:i.localize(109,null),included:a.isLinux},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.localize(110,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.localize(111,null)},"editor.largeFileOptimizations":{type:"boolean",default:v.largeFileOptimizations,description:i.localize(112,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.localize(113,null)}}},_=null;t.isEditorConfigurationKey=function(e){return p()["editor."+e]||!1},t.isDiffEditorConfigurationKey=function(e){return p()["diffEditor."+e]||!1},b.registerConfiguration(S)}),define(e[903],t([1,0,9,151,14,16,181,44,222,63]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=Object.prototype.hasOwnProperty,d=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=!1);var n=this;this._nextLanguageId=1,this._languages={},this._mimeTypesMap={},this._nameMap={},
this._lowercaseNameMap={},this._languageIds=[],this._warnOnOverwrite=t,e&&(this._registerLanguages(s.ModesRegistry.getLanguages()),s.ModesRegistry.onDidAddLanguages(function(e){return n._registerLanguages(e)}))}return e.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=0;n<e.length;n++)this._registerLanguage(e[n]);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(function(e){var n=t._languages[e];n.name&&(t._nameMap[n.name]=n.identifier),n.aliases.forEach(function(e){t._lowercaseNameMap[e.toLowerCase()]=n.identifier}),n.mimetypes.forEach(function(e){t._mimeTypesMap[e]=n.identifier})}),o.Registry.as(l.Extensions.Configuration).registerOverrideIdentifiers(s.ModesRegistry.getLanguages().map(function(e){return e.id}))}},e.prototype._registerLanguage=function(e){var t=e.id,n=null;if(u.call(this._languages,t))n=this._languages[t];else{var i=this._nextLanguageId++;n={identifier:new a.LanguageIdentifier(t,i),name:null,mimetypes:[],
aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languageIds[i]=t,this._languages[t]=n}this._mergeLanguage(n,e)},e.prototype._mergeLanguage=function(e,t){var o,s=t.id,a=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&((o=e.mimetypes).push.apply(o,t.mimetypes),a=t.mimetypes[0]),a||(a="text/x-"+s,e.mimetypes.push(a)),Array.isArray(t.extensions))for(var c=0,l=t.extensions;c<l.length;c++){var u=l[c];i.registerTextMime({id:s,mime:a,extension:u},this._warnOnOverwrite),e.extensions.push(u)}if(Array.isArray(t.filenames))for(var d=0,h=t.filenames;d<h.length;d++){var p=h[d];i.registerTextMime({id:s,mime:a,filename:p},this._warnOnOverwrite),e.filenames.push(p)}if(Array.isArray(t.filenamePatterns))for(var f=0,g=t.filenamePatterns;f<g.length;f++){var v=g[f];i.registerTextMime({id:s,mime:a,filepattern:v},this._warnOnOverwrite)}if("string"==typeof t.firstLine&&t.firstLine.length>0){var m=t.firstLine;"^"!==m.charAt(0)&&(m="^"+m);try{var y=new RegExp(m)
;r.regExpLeadsToEndlessLoop(y)||i.registerTextMime({id:s,mime:a,firstline:y},this._warnOnOverwrite)}catch(e){n.onUnexpectedError(e)}}e.aliases.push(s);var b=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(b=0===t.aliases.length?[null]:t.aliases),null!==b)for(var S=0;S<b.length;S++)b[S]&&0!==b[S].length&&e.aliases.push(b[S]);var _=null!==b&&b.length>0;if(_&&null===b[0]);else{var C=(_?b[0]:null)||s;!_&&e.name||(e.name=C)}t.configuration&&e.configurationFiles.push(t.configuration)},e.prototype.isRegisteredMode=function(e){return!!u.call(this._mimeTypesMap,e)||u.call(this._languages,e)},e.prototype.getRegisteredModes=function(){return Object.keys(this._languages)},e.prototype.getRegisteredLanguageNames=function(){return Object.keys(this._nameMap)},e.prototype.getLanguageName=function(e){return u.call(this._languages,e)?this._languages[e].name:null},e.prototype.getModeIdForLanguageNameLowercase=function(e){return u.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},
e.prototype.getConfigurationFiles=function(e){return u.call(this._languages,e)?this._languages[e].configurationFiles||[]:[]},e.prototype.getMimeForMode=function(e){if(!u.call(this._languages,e))return null;return this._languages[e].mimetypes[0]||null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim()}).map(function(e){return u.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e}).filter(function(e){return u.call(t._languages,e)}):[]},e.prototype.getLanguageIdentifier=function(e){if(e===c.NULL_MODE_ID||0===e)return c.NULL_LANGUAGE_IDENTIFIER;var t;if("string"==typeof e)t=e;else if(!(t=this._languageIds[e]))return null;return u.call(this._languages,t)?this._languages[t].identifier:null},e.prototype.getModeIdsFromLanguageName=function(e){return e&&u.call(this._nameMap,e)?[this._nameMap[e].language]:[]},e.prototype.getModeIdsFromFilenameOrFirstLine=function(e,t){if(!e&&!t)return[];var n=i.guessMimeTypes(e,t);return this.extractModeIds(n.join(","))},
e.prototype.getExtensions=function(e){if(!u.call(this._nameMap,e))return[];var t=this._nameMap[e];return this._languages[t.language].extensions},e.prototype.getFilenames=function(e){if(!u.call(this._nameMap,e))return[];var t=this._nameMap[e];return this._languages[t.language].filenames},e}();t.LanguagesRegistry=d}),define(e[904],t([1,0,9,7,4,1040,903]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){void 0===e&&(e=!1),this._onDidCreateMode=new i.Emitter,this.onDidCreateMode=this._onDidCreateMode.event,this._instantiatedModes={},this._registry=new s.LanguagesRegistry(!0,e)}return e.prototype._onReady=function(){return r.TPromise.as(!0)},e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e)},e.prototype.getRegisteredModes=function(){return this._registry.getRegisteredModes()},e.prototype.getRegisteredLanguageNames=function(){return this._registry.getRegisteredLanguageNames()},e.prototype.getExtensions=function(e){
return this._registry.getExtensions(e)},e.prototype.getFilenames=function(e){return this._registry.getFilenames(e)},e.prototype.getMimeForMode=function(e){return this._registry.getMimeForMode(e)},e.prototype.getLanguageName=function(e){return this._registry.getLanguageName(e)},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e)},e.prototype.getModeIdByFilenameOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilenameOrFirstLine(e,t);return n.length>0?n[0]:null},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.getConfigurationFiles=function(e){return this._registry.getConfigurationFiles(e)},e.prototype.getMode=function(e){for(var t=this._registry.extractModeIds(e),i=!1,r=0;r<t.length;r++){if(this._instantiatedModes.hasOwnProperty(t[r]))return this._instantiatedModes[t[r]]
;i=i||"plaintext"===t[r]}if(i){var o=null;return this.getOrCreateMode(e).then(function(e){o=e}).done(null,n.onUnexpectedError),o}return null},e.prototype.getOrCreateMode=function(e){var t=this;return this._onReady().then(function(){var n=t.getModeId(e);return t._getOrCreateMode(n||"plaintext")})},e.prototype.getOrCreateModeByLanguageName=function(e){var t=this;return this._onReady().then(function(){var n=t._getModeIdByLanguageName(e);return t._getOrCreateMode(n||"plaintext")})},e.prototype._getModeIdByLanguageName=function(e){var t=this._registry.getModeIdsFromLanguageName(e);return t.length>0?t[0]:null},e.prototype.getOrCreateModeByFilenameOrFirstLine=function(e,t){var n=this;return this._onReady().then(function(){var i=n.getModeIdByFilenameOrFirstLine(e,t);return n._getOrCreateMode(i||"plaintext")})},e.prototype._getOrCreateMode=function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e);this._instantiatedModes[e]=new o.FrankensteinMode(t),
this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]},e}();t.ModeServiceImpl=a}),define(e[17],t([1,0,24,30,10,16,6,63]),function(e,t,n,i,r,o,s,a){"use strict";function c(e,t){var n=Object.create(null);for(var i in e)l(n,i,e[i],t);return n}function l(e,t,n,i){for(var r=t.split("."),o=r.pop(),s=e,a=0;a<r.length;a++){var c=r[a],l=s[c];switch(typeof l){case"undefined":l=s[c]=Object.create(null);break;case"object":break;default:return void i("Ignoring "+t+" as "+r.slice(0,a+1).join(".")+" is "+JSON.stringify(l))}s=l}"object"==typeof s?s[o]=n:i("Ignoring "+t+" as "+r.join(".")+" is "+JSON.stringify(s))}function u(e,t){var n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){var i=e[n];"object"!=typeof i||Array.isArray(i)||(u(i,t),0===Object.keys(i).length&&delete e[n])}}else delete e[n]}function d(e,t,n){var i=function(e,t){for(var n=e,i=0;i<t.length;i++){if("object"!=typeof n||null===n)return;n=n[t[i]]}return n}(e,t.split("."));return void 0===i?n:i}function h(e,t,n){
Object.keys(t).forEach(function(r){r in e?i.isObject(e[r])&&i.isObject(t[r])?h(e[r],t[r],n):n&&(e[r]=t[r]):e[r]=t[r]})}function p(e){return e.substring(1,e.length-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationService=s.createDecorator("configurationService"),t.isConfigurationOverrides=function(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof r.default)};!function(e){e[e.USER=1]="USER",e[e.WORKSPACE=2]="WORKSPACE",e[e.WORKSPACE_FOLDER=3]="WORKSPACE_FOLDER",e[e.DEFAULT=4]="DEFAULT",e[e.MEMORY=5]="MEMORY"}(t.ConfigurationTarget||(t.ConfigurationTarget={})),t.compare=function(e,t){for(var i=t.keys.filter(function(t){return-1===e.keys.indexOf(t)}),r=e.keys.filter(function(e){return-1===t.keys.indexOf(e)}),o=[],s=0,a=e.keys;s<a.length;s++){var c=a[s],l=d(e.contents,c),u=d(t.contents,c);n.equals(l,u)||o.push(c)}return{added:i,removed:r,updated:o}},t.toOverrides=function(e,t){
for(var n=[],i=o.Registry.as(a.Extensions.Configuration).getConfigurationProperties(),r=0,s=Object.keys(e);r<s.length;r++){var l=s[r];if(a.OVERRIDE_PROPERTY_PATTERN.test(l)){var u={};for(var d in e[l])i[d]&&i[d].overridable&&(u[d]=e[l][d]);n.push({identifiers:[p(l).trim()],contents:c(u,t)})}}return n},t.toValuesTree=c,t.addToValueTree=l,t.removeFromValueTree=function(e,t){u(e,t.split("."))},t.getConfigurationValue=d,t.merge=h,t.getConfigurationKeys=function(){var e=o.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)},t.getDefaultValues=function(){var e=Object.create(null),t=o.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(var n in t)l(e,n,t[n].default,function(e){return console.error("Conflict in default settings: "+e)});return e},t.overrideIdentifierFromKey=p,t.keyFromOverrideIdentifier=function(e){return"["+e+"]"}}),define(e[906],t([1,0,7,5,17,39,54,47,25]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var h=function(e){function t(t,n,r){var o=e.call(this)||this;return o.configurationService=t,o.modelService=n,o.modeService=r,o._onDidChangeConfiguration=o._register(new i.Emitter),o.onDidChangeConfiguration=o._onDidChangeConfiguration.event,o._register(o.configurationService.onDidChangeConfiguration(function(e){return o._onDidChangeConfiguration.fire(e)})),o}return n(t,e),t.prototype.getValue=function(e,t,n){var i=s.Position.isIPosition(t)?t:null,r=i?"string"==typeof n?n:void 0:"string"==typeof t?t:void 0,o=e?this.getLanguage(e,i):void 0;return this.configurationService.getValue(r,{resource:e,overrideIdentifier:o})},t.prototype.getLanguage=function(e,t){var n=this.modelService.getModel(e);return n?t?this.modeService.getLanguageIdentifier(n.getLanguageIdAtPosition(t.lineNumber,t.column)).language:n.getLanguageIdentifier().language:this.modeService.getModeIdByFilenameOrFirstLine(d.basename(e.path))},t=a([l(0,o.IConfigurationService),l(1,u.IModelService),l(2,c.IModeService)],t)}(r.Disposable)
;t.TextResourceConfigurationService=h}),define(e[262],t([1,0,89,50,20,30,24,63,17]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)},enumerable:!0,configurable:!0}),e.prototype.getValue=function(e){return e?l.getConfigurationValue(this.contents,e):this.contents},e.prototype.override=function(t){var n=this.getContentsForOverrideIdentifer(t);if(!n||"object"!=typeof n||!Object.keys(n).length)return this
;for(var i={},r=0,s=o.distinct(Object.keys(this.contents).concat(Object.keys(n)));r<s.length;r++){var c=s[r],l=this.contents[c],u=n[c];u&&("object"==typeof l&&"object"==typeof u?(l=a.deepClone(l),this.mergeContents(l,u)):l=u),i[c]=l}return new e(i)},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=a.deepClone(this.contents),r=a.deepClone(this.overrides),s=this.keys.slice(),c=0,l=t;c<l.length;c++){var u=l[c];this.mergeContents(i,u.contents);for(var d=function(e){var t=r.filter(function(t){return o.equals(t.identifiers,e.identifiers)})[0];t?h.mergeContents(t.contents,e.contents):r.push(a.deepClone(e))},h=this,p=0,f=u.overrides;p<f.length;p++){d(f[p])}for(var g=0,v=u.keys;g<v.length;g++){var m=v[g];-1===s.indexOf(m)&&s.push(m)}}return new e(i,s,r)},e.prototype.freeze=function(){return this.isFrozen=!0,this},e.prototype.mergeContents=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n]
;r in e&&s.isObject(e[r])&&s.isObject(t[r])?this.mergeContents(e[r],t[r]):e[r]=a.deepClone(t[r])}},e.prototype.checkAndFreeze=function(e){return this.isFrozen&&!Object.isFrozen(e)?a.deepFreeze(e):e},e.prototype.getContentsForOverrideIdentifer=function(e){for(var t=0,n=this.overrides;t<n.length;t++){var i=n[t];if(-1!==i.identifiers.indexOf(e))return i.contents}return null},e.prototype.toJSON=function(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}},e.prototype.setValue=function(e,t){this.addKey(e),l.addToValueTree(this.contents,e,t,function(e){throw new Error(e)})},e.prototype.removeValue=function(e){this.removeKey(e)&&l.removeFromValueTree(this.contents,e)},e.prototype.addKey=function(e){for(var t=this.keys.length,n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n);this.keys.splice(t,1,e)},e.prototype.removeKey=function(e){var t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)},e}();t.ConfigurationModel=u;var d=function(e){function t(){
for(var t=l.getDefaultValues(),n=l.getConfigurationKeys(),i=[],r=0,o=Object.keys(t);r<o.length;r++){var s=o[r];c.OVERRIDE_PROPERTY_PATTERN.test(s)&&i.push({identifiers:[l.overrideIdentifierFromKey(s).trim()],contents:l.toValuesTree(t[s],function(e){return console.error("Conflict in default settings file: "+e)})})}return e.call(this,t,n,i)||this}return n(t,e),t}(u);t.DefaultConfigurationModel=d;var h=function(){function e(e){this._name=e,this._configurationModel=null,this._parseErrors=[]}return Object.defineProperty(e.prototype,"configurationModel",{get:function(){return this._configurationModel||new u},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._parseErrors},enumerable:!0,configurable:!0}),e.prototype.parse=function(e){var t=this.parseContent(e),n=this.parseRaw(t);this._configurationModel=new u(n.contents,n.keys,n.overrides)},e.prototype.parseContent=function(e){function t(e){Array.isArray(o)?o.push(e):r&&(o[r]=e)}var n={},r=null,o=[],s=[],a=[],c={
onObjectBegin:function(){var e={};t(e),s.push(o),o=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];t(e),s.push(o),o=e,r=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:t,onError:function(e){a.push({error:e})}};if(e)try{i.visit(e,c),n=o[0]||{}}catch(e){console.error("Error while parsing settings file "+this._name+": "+e),this._parseErrors=[e]}return n},e.prototype.parseRaw=function(e){var t=this;return{contents:l.toValuesTree(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)}),keys:Object.keys(e),overrides:l.toOverrides(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)})}},e}();t.ConfigurationModelParser=h;var p=function(){function e(e,t,n,i,o,s,a){void 0===n&&(n=new u),void 0===i&&(i=new r.ResourceMap),void 0===o&&(o=new u),void 0===s&&(s=new r.ResourceMap),void 0===a&&(a=!0),this._defaultConfiguration=e,this._userConfiguration=t,this._workspaceConfiguration=n,
this._folderConfigurations=i,this._memoryConfiguration=o,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new r.ResourceMap}return e.prototype.getValue=function(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)},e.prototype.updateValue=function(e,t,n){void 0===n&&(n={});var i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource))||(i=new u,this._memoryConfigurationByResource.set(n.resource,i)):i=this._memoryConfiguration,void 0===t?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)},e.prototype.inspect=function(e,t,n){var i=this.getConsolidateConfigurationModel(t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),o=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration;return{
default:t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),user:t.overrideIdentifier?this._userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._userConfiguration.freeze().getValue(e),workspace:n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,workspaceFolder:r?t.overrideIdentifier?r.freeze().override(t.overrideIdentifier).getValue(e):r.freeze().getValue(e):void 0,memory:t.overrideIdentifier?o.freeze().override(t.overrideIdentifier).getValue(e):o.freeze().getValue(e),value:i.getValue(e)}},e.prototype.keys=function(e){var t=this.getFolderConfigurationModelForResource(null,e);return{default:this._defaultConfiguration.freeze().keys,user:this._userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:t?t.freeze().keys:[]}},
e.prototype.updateDefaultConfiguration=function(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateUserConfiguration=function(e){this._userConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateWorkspaceConfiguration=function(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateFolderConfiguration=function(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)},e.prototype.deleteFolderConfiguration=function(e){this.folders.delete(e),this._foldersConsolidatedConfigurations.delete(e)},Object.defineProperty(e.prototype,"defaults",{get:function(){return this._defaultConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._userConfiguration},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"workspace",{get:function(){return this._workspaceConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"folders",{get:function(){return this._folderConfigurations},enumerable:!0,configurable:!0}),e.prototype.getConsolidateConfigurationModel=function(e,t){var n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n},e.prototype.getConsolidatedConfigurationModelForResource=function(e,t){var n=e.resource,i=this.getWorkspaceConsolidatedConfiguration();if(t&&n){var r=t.getFolder(n);r&&(i=this.getFolderConsolidatedConfiguration(r.uri)||i);var o=this._memoryConfigurationByResource.get(n);o&&(i=i.merge(o))}return i},e.prototype.getWorkspaceConsolidatedConfiguration=function(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this._userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),
this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration},e.prototype.getFolderConsolidatedConfiguration=function(e){var t=this._foldersConsolidatedConfigurations.get(e);if(!t){var n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t},e.prototype.getFolderConfigurationModelForResource=function(e,t){if(t&&e){var n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}return null},e.prototype.toData=function(){var e=this;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(function(t,n){var i=e._folderConfigurations.get(n),r=i.contents,o=i.overrides,s=i.keys;return t[n.toString()]={contents:r,overrides:o,keys:s},t},Object.create({})),isComplete:!0}},e.prototype.allKeys=function(e){var t=this.keys(e),n=t.default.slice(),i=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];-1===n.indexOf(r)&&n.push(r)}};i(t.user),i(t.workspace);for(var r=0,o=this.folders.keys();r<o.length;r++){var s=o[r];i(this.folders.get(s).keys)}return n},e}();t.Configuration=p;var f=function(){function e(){}return e.prototype.doesConfigurationContains=function(e,t){for(var n,i,r=e.contents,o=l.toValuesTree((n={},n[t]=!0,n),function(){});"object"==typeof o&&(i=Object.keys(o)[0]);){if(!(r=r[i]))return!1;o=o[i]}return!0},e.prototype.updateKeys=function(e,t,n){for(var i=0,r=t;i<r.length;i++){var o=r[i];e.setValue(o,{})}},e}();t.AbstractConfigurationChangeEvent=f;var g=function(e){function t(t,n){void 0===t&&(t=new u),
void 0===n&&(n=new r.ResourceMap);var i=e.call(this)||this;return i._changedConfiguration=t,i._changedConfigurationByResource=n,i}return n(t,e),Object.defineProperty(t.prototype,"changedConfiguration",{get:function(){return this._changedConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changedConfigurationByResource",{get:function(){return this._changedConfigurationByResource},enumerable:!0,configurable:!0}),t.prototype.change=function(e,n){if(e instanceof t){this._changedConfiguration=this._changedConfiguration.merge(e._changedConfiguration);for(var i=0,r=e._changedConfigurationByResource.keys();i<r.length;i++){var o=r[i],s=this.getOrSetChangedConfigurationForResource(o);s=s.merge(e._changedConfigurationByResource.get(o)),this._changedConfigurationByResource.set(o,s)}}else this.changeWithKeys(e,n);return this},t.prototype.telemetryData=function(e,t){return this._source=e,this._sourceConfig=t,this},Object.defineProperty(t.prototype,"affectedKeys",{get:function(){
var e=this._changedConfiguration.keys.slice();return this._changedConfigurationByResource.forEach(function(t){return e.push.apply(e,t.keys)}),o.distinct(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourceConfig",{get:function(){return this._sourceConfig},enumerable:!0,configurable:!0}),t.prototype.affectsConfiguration=function(e,t){var n=[this._changedConfiguration];if(t){var i=this._changedConfigurationByResource.get(t);i&&n.push(i)}else n.push.apply(n,this._changedConfigurationByResource.values());for(var r=0,o=n;r<o.length;r++){var s=o[r];if(this.doesConfigurationContains(s,e))return!0}return!1},t.prototype.changeWithKeys=function(e,t){var n=t?this.getOrSetChangedConfigurationForResource(t):this._changedConfiguration;this.updateKeys(n,e)},t.prototype.getOrSetChangedConfigurationForResource=function(e){var t=this._changedConfigurationByResource.get(e);return t||(t=new u,
this._changedConfigurationByResource.set(e,t)),t},t}(f);t.ConfigurationChangeEvent=g}),define(e[908],t([1,0,5,9,262,343,7,4]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=e.call(this)||this;return n._onDidChangeConfiguration=n._register(new a.Emitter),n.onDidChangeConfiguration=n._onDidChangeConfiguration.event,n.userConfigModelWatcher=new s.ConfigWatcher(t,{changeBufferDelay:300,onError:function(e){return r.onUnexpectedError(e)},defaultConfig:new o.ConfigurationModelParser(t),parse:function(e,n){var i=new o.ConfigurationModelParser(t);return i.parse(e),i.errors.slice(),i}}),n._register(n.userConfigModelWatcher),n._register(n.userConfigModelWatcher.onDidUpdateConfiguration(function(){return n._onDidChangeConfiguration.fire(n.configurationModel)})),n}return n(t,e),Object.defineProperty(t.prototype,"configurationModel",{get:function(){return this.userConfigModelWatcher.getConfig().configurationModel},enumerable:!0,configurable:!0
}),t.prototype.reload=function(){var e=this;return new c.TPromise(function(t){return e.userConfigModelWatcher.reload(function(){return t(null)})})},t}(i.Disposable);t.UserConfiguration=l}),define(e[909],t([1,0,5,29,313,15,17,7]),function(e,t,i,r,o,s,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h="data-keybinding-context",p=function(){function e(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}return e.prototype.setValue=function(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)},e.prototype.removeValue=function(e){return e in this._value&&(delete this._value[e],!0)},e.prototype.getValue=function(e){var t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t},e.prototype.collectAllValues=function(){var e=this._parent?this._parent.collectAllValues():Object.create(null);return e=c({},e,this._value),delete e._contextId,e},e}();t.Context=p;var f=function(e){function t(t,n,i){var r=e.call(this,t,null)||this;return r._emitter=i,
r._configurationService=n,r._subscription=n.onDidChangeConfiguration(r._onConfigurationUpdated,r),r._initFromConfiguration(),r}return n(t,e),t.prototype.dispose=function(){this._subscription.dispose()},t.prototype._onConfigurationUpdated=function(e){if(e.source===u.ConfigurationTarget.DEFAULT)this._initFromConfiguration();else for(var t=0,n=e.affectedKeys;t<n.length;t++){var i=n[t],r="config."+i;r in this._value&&(this._value[r]=this._configurationService.getValue(i),this._emitter.fire(r))}},t.prototype._initFromConfiguration=function(){var e=this,t=this._configurationService.getValue(),n=Object.create(null),i=[],r=function(t,o){for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){o.push(s);var a=t[s];if("boolean"==typeof a){var c=o.join("."),l=e._value[c];e._value[c]=a,l!==a?(i.push(c),n[c]=!0):n[c]=!1}else"object"==typeof a&&r(a,o);o.pop()}};r(t,["config"]);for(var o in this._value)0===o.indexOf("config.")&&void 0===n[o]&&(delete this._value[o],n[o]=!0,i.push(o));this._emitter.fire(i)},t
}(p),g=function(){function e(e,t,n){this._parent=e,this._key=t,this._defaultValue=n,this.reset()}return e.prototype.set=function(e){this._parent.setContext(this._key,e)},e.prototype.reset=function(){void 0===this._defaultValue?this._parent.removeContext(this._key):this._parent.setContext(this._key,this._defaultValue)},e.prototype.get=function(){return this._parent.getContextKeyValue(this._key)},e}(),v=function(){function e(){this._keys=[]}return e.prototype.collect=function(e){this._keys=this._keys.concat(e)},e.prototype.affectsSome=function(e){for(var t=0,n=this._keys;t<n.length;t++){var i=n[t];if(e.has(i))return!0}return!1},e}();t.ContextKeyChangeEvent=v;var m=function(){function e(e){this._myContextId=e,this._onDidChangeContextKey=new d.Emitter}return e.prototype.createKey=function(e,t){return new g(this,e,t)},Object.defineProperty(e.prototype,"onDidChangeContext",{get:function(){return this._onDidChangeContext||(this._onDidChangeContext=d.debounceEvent(this._onDidChangeContextKey.event,function(e,t){
return e||(e=new v),e.collect(t),e},25)),this._onDidChangeContext},enumerable:!0,configurable:!0}),e.prototype.createScoped=function(e){return new b(this,this._onDidChangeContextKey,e)},e.prototype.contextMatchesRules=function(e){var t=this.getContextValuesContainer(this._myContextId);return o.KeybindingResolver.contextMatchesRules(t,e)},e.prototype.getContextKeyValue=function(e){return this.getContextValuesContainer(this._myContextId).getValue(e)},e.prototype.setContext=function(e,t){var n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContextKey.fire(e)},e.prototype.removeContext=function(e){this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContextKey.fire(e)},e.prototype.getContext=function(e){return this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(h))return parseInt(e.getAttribute(h),10);e=e.parentElement}return 0}(e))},e}();t.AbstractContextKeyService=m;var y=function(e){function t(t){var n=e.call(this,0)||this
;n._toDispose=[],n._lastContextId=0,n._contexts=Object.create(null);var i=new f(n._myContextId,t,n._onDidChangeContextKey);return n._contexts[String(n._myContextId)]=i,n._toDispose.push(i),n}return n(t,e),t.prototype.dispose=function(){this._toDispose=i.dispose(this._toDispose)},t.prototype.getContextValuesContainer=function(e){return this._contexts[String(e)]},t.prototype.createChildContext=function(e){void 0===e&&(e=this._myContextId);var t=++this._lastContextId;return this._contexts[String(t)]=new p(t,this.getContextValuesContainer(e)),t},t.prototype.disposeContext=function(e){delete this._contexts[String(e)]},t=a([l(0,u.IConfigurationService)],t)}(m);t.ContextKeyService=y;var b=function(e){function t(t,n,i){var r=e.call(this,t.createChildContext())||this;return r._parent=t,r._onDidChangeContextKey=n,i&&(r._domNode=i,r._domNode.setAttribute(h,String(r._myContextId))),r}return n(t,e),t.prototype.dispose=function(){this._parent.disposeContext(this._myContextId),
this._domNode&&(this._domNode.removeAttribute(h),this._domNode=void 0)},Object.defineProperty(t.prototype,"onDidChangeContext",{get:function(){return this._parent.onDidChangeContext},enumerable:!0,configurable:!0}),t.prototype.getContextValuesContainer=function(e){return this._parent.getContextValuesContainer(e)},t.prototype.createChildContext=function(e){return void 0===e&&(e=this._myContextId),this._parent.createChildContext(e)},t.prototype.disposeContext=function(e){this._parent.disposeContext(e)},t}(m);r.CommandsRegistry.registerCommand(s.SET_CONTEXT_COMMAND_ID,function(e,t,n){e.get(s.IContextKeyService).createKey(String(t),n)})}),define(e[52],t([1,0,73,11,29,16]),function(e,t,n,i,r,o){"use strict";function s(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Core=0]="Core",e[e.Extension=1]="Extension"}(t.KeybindingRuleSource||(t.KeybindingRuleSource={}));var a=function(){
function e(){this.WEIGHT={editorCore:function(e){return void 0===e&&(e=0),0+e},editorContrib:function(e){return void 0===e&&(e=0),100+e},workbenchContrib:function(e){return void 0===e&&(e=0),200+e},builtinExtension:function(e){return void 0===e&&(e=0),300+e},externalExtension:function(e){return void 0===e&&(e=0),400+e}},this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===i.OS){if(e&&e.win)return e.win}else if(2===i.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.bindToCurrentPlatform2=function(e){if(1===i.OS){if(e&&e.win)return e.win}else if(2===i.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,r){void 0===r&&(r=0);var o=e.bindToCurrentPlatform(t);if(o&&o.primary&&this._registerDefaultKeybinding(n.createKeybinding(o.primary,i.OS),t.id,t.weight,0,t.when,r),o&&Array.isArray(o.secondary))for(var s=0,a=o.secondary.length;s<a;s++){var c=o.secondary[s]
;this._registerDefaultKeybinding(n.createKeybinding(c,i.OS),t.id,t.weight,-s-1,t.when,r)}},e.prototype.registerKeybindingRule2=function(t,n){void 0===n&&(n=0);var i=e.bindToCurrentPlatform2(t);i&&i.primary&&this._registerDefaultKeybinding(i.primary,t.id,t.weight,0,t.when,n)},e.prototype.registerCommandAndKeybindingRule=function(e,t){void 0===t&&(t=0),this.registerKeybindingRule(e,t),r.CommandsRegistry.registerCommand(e)},e._mightProduceChar=function(e){return e>=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype._registerDefaultKeybinding=function(e,t,n,r,o,s){0===s&&1===i.OS&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({
keybinding:e,command:t,commandArgs:void 0,when:o,weight1:n,weight2:r}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(s),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}();t.KeybindingsRegistry=new a,t.Extensions={EditorModes:"platform.keybindingsRegistry"},o.Registry.add(t.Extensions.EditorModes,t.KeybindingsRegistry)}),define(e[207],t([1,0,1420,6,63,16]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IRequestService=i.createDecorator("requestService2"),o.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:n.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$",description:n.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:n.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,description:n.localize(3,null)}}})
}),define(e[912],t([1,0,14]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i){this._hasParameters=!1,this._replacePattern=e;var r;("boolean"==typeof t?t:(r=t).isRegExp)&&this.parseReplaceString(e),this._regExp=i||n.createRegExp(r.pattern,r.isRegExp,{matchCase:r.isCaseSensitive,wholeWord:r.isWordMatch,multiline:r.isMultiline,global:!1}),this._regExp.global&&(this._regExp=n.createRegExp(this._regExp.source,!0,{matchCase:!this._regExp.ignoreCase,wholeWord:!1,multiline:this._regExp.multiline,global:!1}))}return Object.defineProperty(e.prototype,"hasParameters",{get:function(){return this._hasParameters},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this._replacePattern},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"regExp",{get:function(){return this._regExp},enumerable:!0,configurable:!0}),e.prototype.getReplaceString=function(e){this._regExp.lastIndex=0
;var t=this._regExp.exec(e);if(t){if(this.hasParameters){if(t[0]===e)return e.replace(this._regExp,this.pattern);var n=e.replace(this._regExp,this.pattern);return n.substr(t.index,t[0].length-(e.length-n.length))}return this.pattern}return null},e.prototype.parseReplaceString=function(e){if(e&&0!==e.length){for(var t=0,n="",i=0,r=e.length;i<r;i++){var o=e.charCodeAt(i);if(92===o){if(++i>=r)break;a=null;switch(s=e.charCodeAt(i)){case 92:a="\\";break;case 110:a="\n";break;case 116:a="\t"}a&&(n+=e.substring(t,i-1)+a,t=i+1)}if(36===o){if(++i>=r)break;var s=e.charCodeAt(i),a=null;switch(s){case 48:a="$&",this._hasParameters=!0;break;case 96:case 39:this._hasParameters=!0;break;default:if(!this.between(s,49,57))break;if(i===e.length-1){this._hasParameters=!0;break}var c=e.charCodeAt(++i);if(!this.between(c,48,57)){this._hasParameters=!0,--i;break}if(i===e.length-1){this._hasParameters=!0;break}if(c=e.charCodeAt(++i),!this.between(c,48,57)){this._hasParameters=!0,--i;break}}a&&(n+=e.substring(t,i-1)+a,t=i+1)}}
0!==t&&(this._replacePattern=n+e.substring(t))}},e.prototype.between=function(e,t,n){return t<=e&&e<=n},e}();t.ReplacePattern=i}),define(e[140],t([1,0,148,24,25,6]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_ID="workbench.view.search",t.ISearchHistoryService=o.createDecorator("searchHistoryService"),t.ISearchService=o.createDecorator("searchService");!function(e){e[e.File=1]="File",e[e.Text=2]="Text"}(t.QueryType||(t.QueryType={}));var s=function(){return function(e){this.resource=e,this.lineMatches=[]}}();t.FileMatch=s;var a=function(){return function(e,t,n){this.preview=e,this.lineNumber=t,this.offsetAndLengths=n}}();t.LineMatch=a,t.getExcludes=function(e){var t=e&&e.files&&e.files.exclude,n=e&&e.search&&e.search.exclude;if(t||n){if(!t||!n)return t||n;var r=Object.create(null);return r=i.mixin(r,i.deepClone(t)),r=i.mixin(r,i.deepClone(n),!0)}},t.pathIncludedInQuery=function(e,t){
return(!e.excludePattern||!n.match(e.excludePattern,t))&&!(e.includePattern&&!n.match(e.includePattern,t))&&(!e.usingSearchPaths||e.folderQueries.every(function(e){var i=e.folder.fsPath;return!(!r.isEqualOrParent(t,i)||e.includePattern&&!n.match(e.includePattern,t))}))}}),define(e[189],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IStatusbarService=n.createDecorator("statusbarService");!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.StatusbarAlignment||(t.StatusbarAlignment={}))}),define(e[34],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="storageService",t.IStorageService=n.createDecorator(t.ID);!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={})),t.NullStorageService={_serviceBrand:void 0,store:function(){},remove:function(){},get:function(e,t,n){return n},getInteger:function(e,t,n){return n},getBoolean:function(e,t,n){return n}}}),
define(e[167],t([1,0,7,5,11,78,260,330,945,943,34]),function(e,t,i,r,o,s,a,c,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(){this._keys=Object.create(null),this._values=Object.create(null)}return e.prototype.has=function(e){var t=e.getId();return!!this._values[t]},e.prototype.get=function(e){var t=e.getId();return this._values[t]},e.prototype.put=function(e,t){var n=e.getId();this._keys[n]=e,this._values[n]=t},e.prototype.remove=function(e){var t=e.getId();delete this._keys[t],delete this._values[t]},e.prototype.getValues=function(){var e=this;return Object.keys(this._keys).map(function(t){return e._values[t]})},e}();t.readFontInfo=function(e){return p.INSTANCE.readConfiguration(e)},t.restoreFontInfo=function(e){var t=e.get("editorFontInfo",d.StorageScope.GLOBAL);if("string"==typeof t){var n=null;try{n=JSON.parse(t)}catch(e){return}Array.isArray(n)&&p.INSTANCE.restoreFontInfo(n)}},t.saveFontInfo=function(e){var t=p.INSTANCE.saveFontInfo()
;e.store("editorFontInfo",JSON.stringify(t),d.StorageScope.GLOBAL)};var p=function(e){function t(){var t=e.call(this)||this;return t._onDidChange=t._register(new i.Emitter),t.onDidChange=t._onDidChange.event,t._cache=new h,t._evictUntrustedReadingsTimeout=-1,t}return n(t,e),t.prototype.dispose=function(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),e.prototype.dispose.call(this)},t.prototype._writeToCache=function(e,t){var n=this;this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(function(){n._evictUntrustedReadingsTimeout=-1,n._evictUntrustedReadings()},5e3))},t.prototype._evictUntrustedReadings=function(){for(var e=this._cache.getValues(),t=!1,n=0,i=e.length;n<i;n++){var r=e[n];r.isTrusted||(t=!0,this._cache.remove(r))}t&&this._onDidChange.fire()},t.prototype.saveFontInfo=function(){return this._cache.getValues().filter(function(e){
return e.isTrusted})},t.prototype.restoreFontInfo=function(e){for(var t=0,n=e.length;t<n;t++){var i=new c.FontInfo(e[t],!1);this._writeToCache(i,i)}},t.prototype.readConfiguration=function(e){if(!this._cache.has(e)){var n=t._actualReadConfiguration(e);(n.typicalHalfwidthCharacterWidth<=2||n.typicalFullwidthCharacterWidth<=2||n.spaceWidth<=2||n.maxDigitWidth<=2)&&(n=new c.FontInfo({zoomLevel:s.getZoomLevel(),fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,isMonospace:n.isMonospace,typicalHalfwidthCharacterWidth:Math.max(n.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(n.typicalFullwidthCharacterWidth,5),spaceWidth:Math.max(n.spaceWidth,5),maxDigitWidth:Math.max(n.maxDigitWidth,5)},!1)),this._writeToCache(e,n)}return this._cache.get(e)},t.createRequest=function(e,t,n,i){var r=new u.CharWidthRequest(e,t);return n.push(r),i&&i.push(r),r},t._actualReadConfiguration=function(e){
var t=[],n=[],i=this.createRequest("n",0,t,n),r=this.createRequest("m",0,t,null),o=this.createRequest(" ",0,t,n),a=this.createRequest("0",0,t,n),l=this.createRequest("1",0,t,n),d=this.createRequest("2",0,t,n),h=this.createRequest("3",0,t,n),p=this.createRequest("4",0,t,n),f=this.createRequest("5",0,t,n),g=this.createRequest("6",0,t,n),v=this.createRequest("7",0,t,n),m=this.createRequest("8",0,t,n),y=this.createRequest("9",0,t,n);this.createRequest("→",0,t,n),this.createRequest("·",0,t,n),this.createRequest("|",0,t,n),this.createRequest("/",0,t,n),this.createRequest("-",0,t,n),this.createRequest("_",0,t,n),this.createRequest("i",0,t,n),this.createRequest("l",0,t,n),this.createRequest("m",0,t,n),this.createRequest("|",1,t,n),this.createRequest("_",1,t,n),this.createRequest("i",1,t,n),this.createRequest("l",1,t,n),this.createRequest("m",1,t,n),this.createRequest("n",1,t,n),this.createRequest("|",2,t,n),this.createRequest("_",2,t,n),this.createRequest("i",2,t,n),this.createRequest("l",2,t,n),
this.createRequest("m",2,t,n),this.createRequest("n",2,t,n),u.readCharWidths(e,t);for(var b=Math.max(a.width,l.width,d.width,h.width,p.width,f.width,g.width,v.width,m.width,y.width),S=!0,_=n[0].width,C=1,E=n.length;C<E;C++){var w=_-n[C].width;if(w<-.001||w>.001){S=!1;break}}var I=s.getTimeSinceLastZoomLevelChanged()>2e3;return new c.FontInfo({zoomLevel:s.getZoomLevel(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:S,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:r.width,spaceWidth:o.width,maxDigitWidth:b},I)},t.INSTANCE=new t,t}(r.Disposable),f=function(e){function t(t,n){void 0===n&&(n=null);var i=e.call(this,t)||this;return i._elementSizeObserver=i._register(new l.ElementSizeObserver(n,function(){return i._onReferenceDomElementSizeChanged()})),i._register(p.INSTANCE.onDidChange(function(){return i._onCSSBasedConfigurationChanged()})),
i._validatedOptions.automaticLayout&&i._elementSizeObserver.startObserving(),i._register(s.onDidChangeZoomLevel(function(e){return i._recomputeOptions()})),i._register(s.onDidChangeAccessibilitySupport(function(){return i._recomputeOptions()})),i._recomputeOptions(),i}return n(t,e),t._massageFontFamily=function(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?'"'+e+'"':e},t.applyFontInfoSlow=function(e,n){e.style.fontFamily=t._massageFontFamily(n.fontFamily),e.style.fontWeight=n.fontWeight,e.style.fontSize=n.fontSize+"px",e.style.lineHeight=n.lineHeight+"px",e.style.letterSpacing=n.letterSpacing+"px"},t.applyFontInfo=function(e,n){e.setFontFamily(t._massageFontFamily(n.fontFamily)),e.setFontWeight(n.fontWeight),e.setFontSize(n.fontSize),e.setLineHeight(n.lineHeight),e.setLetterSpacing(n.letterSpacing)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){
this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return s.isIE?e+="ie ":s.isFirefox?e+="ff ":s.isEdge?e+="edge ":s.isSafari&&(e+="safari "),o.isMacintosh&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:s.isWebKit||s.isFirefox,pixelRatio:s.getPixelRatio(),zoomLevel:s.getZoomLevel(),accessibilitySupport:s.getAccessibilitySupport()}},t.prototype.readConfiguration=function(e){return p.INSTANCE.readConfiguration(e)},t}(a.CommonEditorConfiguration);t.Configuration=f}),define(e[917],t([1,0,85,316,167,116]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n._visibleLines=new r.VisibleLinesCollection(n),
n.domNode=n._visibleLines.domNode,n._dynamicOverlays=[],n._isFocused=!1,n.domNode.setClassName("view-overlays"),n}return n(t,e),t.prototype.shouldRender=function(){if(e.prototype.shouldRender.call(this))return!0;for(var t=0,n=this._dynamicOverlays.length;t<n;t++){if(this._dynamicOverlays[t].shouldRender())return!0}return!1},t.prototype.dispose=function(){e.prototype.dispose.call(this);for(var t=0,n=this._dynamicOverlays.length;t<n;t++){this._dynamicOverlays[t].dispose()}this._dynamicOverlays=null},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new c(this._context.configuration,this._dynamicOverlays)},t.prototype.addDynamicOverlay=function(e){this._dynamicOverlays.push(e)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e);for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++){this._visibleLines.getVisibleLine(i).onConfigurationChanged(e)}return!0},
t.prototype.onFlushed=function(e){return this._visibleLines.onFlushed(e)},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!0},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onScrollChanged=function(e){return this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._visibleLines.onZonesChanged(e)},t.prototype.prepareRender=function(e){for(var t=this._dynamicOverlays.filter(function(e){return e.shouldRender()}),n=0,i=t.length;n<i;n++){var r=t[n];r.prepareRender(e),r.onDidRender()}return null},t.prototype.render=function(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)},t.prototype._viewOverlaysRender=function(e){
this._visibleLines.renderLines(e.viewportData)},t}(s.ViewPart);t.ViewOverlays=a;var c=function(){function e(e,t){this._configuration=e,this._lineHeight=this._configuration.editor.lineHeight,this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}return e.prototype.getDomNode=function(){return this._domNode?this._domNode.domNode:null},e.prototype.setDomNode=function(e){this._domNode=i.createFastDomNode(e)},e.prototype.onContentChanged=function(){},e.prototype.onTokensChanged=function(){},e.prototype.onConfigurationChanged=function(e){e.lineHeight&&(this._lineHeight=this._configuration.editor.lineHeight)},e.prototype.renderLine=function(e,t,n,i){for(var r="",o=0,s=this._dynamicOverlays.length;o<s;o++){r+=this._dynamicOverlays[o].render(n.startLineNumber,e)}return this._renderedContent!==r&&(this._renderedContent=r,i.appendASCIIString('<div style="position:absolute;top:'),i.appendASCIIString(String(t)),i.appendASCIIString("px;width:100%;height:"),i.appendASCIIString(String(this._lineHeight)),
i.appendASCIIString('px;">'),i.appendASCIIString(r),i.appendASCIIString("</div>"),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}();t.ViewOverlayLine=c;var l=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n}return n(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(a);t.ContentViewOverlays=l;var u=function(e){function t(t){var n=e.call(this,t)||this
;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),o.Configuration.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n}return n(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(o.Configuration.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(a);t.MarginViewOverlays=u}),define(e[918],t([1,0,85,39,19,133,167,8,14]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var l=function(){return function(e,t,n,i,r,o){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=r,this.textContentClassName=o}}(),u=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=n.createFastDomNode(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new i.Position(1,1)),this._lastRenderedContent="",this._renderData=null}
return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0},e.prototype._prepareRender=function(e){
var t="",n="";if(this._cursorStyle===o.TextEditorCursorStyle.Line||this._cursorStyle===o.TextEditorCursorStyle.LineThin){var i=e.visibleRangeForPosition(this._position);if(!i)return null;var s;if(this._cursorStyle===o.TextEditorCursorStyle.Line){if((s=a.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)}}else s=a.computeScreenAwareSize(1);var u=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new l(u,i.left,s,this._lineHeight,t,n)}var d=e.linesVisibleRangesForRange(new r.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!d||0===d.length||0===d[0].ranges.length)return null;var h=d[0].ranges[0],p=h.width<1?this._typicalHalfwidthCharacterWidth:h.width;if(this._cursorStyle===o.TextEditorCursorStyle.Block){var f=this._context.model.getViewLineData(this._position.lineNumber)
;t=f.content.charAt(this._position.column-1),c.isHighSurrogate(f.content.charCodeAt(this._position.column-1))&&(t+=f.content.charAt(this._position.column));var g=f.tokens.findTokenIndexAtOffset(this._position.column-1);n=f.tokens.getClassName(g)}var v=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,m=this._lineHeight;return this._cursorStyle!==o.TextEditorCursorStyle.Underline&&this._cursorStyle!==o.TextEditorCursorStyle.UnderlineThin||(v+=this._lineHeight-2,m=2),new l(v,h.left,p,m,t,n)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+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.prototype.updatePosition=function(e){this._position=e},e}();t.ViewCursor=u}),define(e[919],t([1,0,50,34,18]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){}return e.prototype.select=function(e,t,n){if(0===n.length)return 0;for(var i=n[0].score,r=1;r<n.length;r++){var o=n[r],s=o.score,a=o.suggestion;if(s!==i)break;if(a.preselect)return r}return 0},e}();t.Memory=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.memorize=function(e,t,n){},t.prototype.toJSON=function(){},t.prototype.fromJSON=function(){},t}(s);t.NoMemory=c
;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._cache=new i.LRUCache(300,.66),t._seq=0,t}return n(t,e),t.prototype.memorize=function(e,t,n){var i=n.suggestion.label,r=e.getLanguageIdentifier().language+"/"+i;this._cache.set(r,{touch:this._seq++,type:n.suggestion.type,insertText:n.suggestion.insertText})},t.prototype.select=function(t,n,i){if(0!==t.getWordUntilPosition(n).word.length)return e.prototype.select.call(this,t,n,i);var r=t.getLineContent(n.lineNumber).substr(n.column-10,n.column-1);if(/\s$/.test(r))return e.prototype.select.call(this,t,n,i);for(var o=-1,s=-1,a=0;a<i.length;a++){var c=i[a].suggestion,l=t.getLanguageIdentifier().language+"/"+c.label,u=this._cache.get(l);u&&u.touch>s&&u.type===c.type&&u.insertText===c.insertText&&(s=u.touch,o=a)}return-1===o?e.prototype.select.call(this,t,n,i):o},t.prototype.toJSON=function(){var e=[];return this._cache.forEach(function(t,n){e.push([n,t])}),e},t.prototype.fromJSON=function(e){this._cache.clear()
;for(var t=0,n=e;t<n.length;t++){var i=n[t],r=i[0],o=i[1];o.touch=0,this._cache.set(r,o)}this._seq=this._cache.size},t}(s);t.LRUMemory=u;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._trie=i.TernarySearchTree.forStrings(),t._seq=0,t}return n(t,e),t.prototype.memorize=function(e,t,n){var i=e.getWordUntilPosition(t).word,r=e.getLanguageIdentifier().language+"/"+i;this._trie.set(r,{type:n.suggestion.type,insertText:n.suggestion.insertText,touch:this._seq++})},t.prototype.select=function(t,n,i){var r=t.getWordUntilPosition(n).word;if(!r)return e.prototype.select.call(this,t,n,i);var o=t.getLanguageIdentifier().language+"/"+r,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(var a=0;a<i.length;a++){var c=i[a].suggestion,l=c.type,u=c.insertText;if(l===s.type&&u===s.insertText)return a}return e.prototype.select.call(this,t,n,i)},t.prototype.toJSON=function(){var e=[];return this._trie.forEach(function(t,n){return e.push([n,t])}),e.sort(function(e,t){
return-(e[1].touch-t[1].touch)}).forEach(function(e,t){return e[1].touch=t}),e.slice(0,200)},t.prototype.fromJSON=function(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(var t=0,n=e;t<n.length;t++){var i=n[t],r=i[0],o=i[1];this._trie.set(r,o)}}},t}(s);t.PrefixMemory=d;var h=function(){function e(e,t){var n=this;this._storageService=t,this._storagePrefix="suggest/memories",this._persistSoon=new o.RunOnceScheduler(function(){return n._flush()},3e3),this.setMode(e)}return e.prototype.setMode=function(e){if(this._mode!==e){this._mode=e,this._strategy="recentlyUsedByPrefix"===e?new d:"recentlyUsed"===e?new u:new c;try{var t=this._storageService.get(this._storagePrefix+"/"+this._mode,r.StorageScope.WORKSPACE);t&&this._strategy.fromJSON(JSON.parse(t))}catch(e){}}},e.prototype.memorize=function(e,t,n){this._strategy.memorize(e,t,n),this._persistSoon.schedule()},e.prototype.select=function(e,t,n){return this._strategy.select(e,t,n)},e.prototype._flush=function(){var e=JSON.stringify(this._strategy)
;this._storageService.store(this._storagePrefix+"/"+this._mode,e,r.StorageScope.WORKSPACE)},e=a([l(1,r.IStorageService)],e)}();t.SuggestMemories=h}),define(e[920],t([1,0,1413,144,163,4,76,10,83,34,38,22]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e){this._storageService=e,this._value=this._read()}return e.prototype._read=function(){var t=this._storageService.get(e.KEY,d.StorageScope.GLOBAL);if(!t)return null;try{return JSON.parse(t)}catch(e){return null}},e.prototype.get=function(){return this._value},e.prototype.set=function(t){this._value=t,this._storageService.store(e.KEY,JSON.stringify(this._value),d.StorageScope.GLOBAL)},e.KEY="integrityService",e}(),g=function(){function t(e,t,n){var i=this;this.notificationService=e,this.lifecycleService=n,this._storage=new f(t),this._isPurePromise=this._isPure(),this.isPure().then(function(e){e.isPure||i._prompt()})}return t.prototype._prompt=function(){var e=this,t=this._storage.get()
;t&&t.dontShowPrompt&&t.commit===s.default.commit||this.notificationService.prompt(u.default.Warning,n.localize(0,null,s.default.nameShort),[{label:n.localize(1,null),run:function(){return window.open(c.default.parse(s.default.checksumFailMoreInfoUrl).toString(!0))}},{label:n.localize(2,null),isSecondary:!0,run:function(){return e._storage.set({dontShowPrompt:!0,commit:s.default.commit})}}])},t.prototype.isPure=function(){return this._isPurePromise},t.prototype._isPure=function(){var e=this,t=s.default.checksums||{};return this.lifecycleService.when(h.LifecyclePhase.Eventually).then(function(){var n=Object.keys(t).map(function(n){return e._resolve(n,t[n])});return o.TPromise.join(n).then(function(e){for(var t=!0,n=0,i=e.length;t&&n<i;n++)if(!e[n].isPure){t=!1;break}return{isPure:t,proof:e}})})},t.prototype._resolve=function(n,r){var s=this,a=c.default.parse(e.toUrl(n));return new o.TPromise(function(e,n,o){i.readFile(a.fsPath,function(i,o){if(i)return n(i);e(t._createChecksumPair(a,s._computeChecksum(o),r))})
})},t.prototype._computeChecksum=function(e){return r.createHash("md5").update(e).digest("base64").replace(/=+$/,"")},t._createChecksumPair=function(e,t,n){return{uri:e,actual:t,expected:n,isPure:t===n}},t=a([l(0,p.INotificationService),l(1,d.IStorageService),l(2,h.ILifecycleService)],t)}();t.IntegrityServiceImpl=g}),define(e[514],t([1,0,30,9,14,34,192]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t,n,i){this._globalStorage=e,this._workspaceStorage=t||e,this.setWorkspaceId(n,i)}return Object.defineProperty(e.prototype,"workspaceId",{get:function(){return this._workspaceId},enumerable:!0,configurable:!0}),e.prototype.setWorkspaceId=function(e,t){this._workspaceId=e,this.workspaceKey=this.getWorkspaceKey(e),n.isNumber(t)&&this.cleanupWorkspaceScope(t)},Object.defineProperty(e.prototype,"globalStorage",{get:function(){return this._globalStorage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"workspaceStorage",{
get:function(){return this._workspaceStorage},enumerable:!0,configurable:!0}),e.prototype.getWorkspaceKey=function(t){if(!t)return e.NO_WORKSPACE_IDENTIFIER;return 0===t.indexOf("file:///")&&(t=t.substr("file:///".length)),r.rtrim(t,"/")+"/"},e.prototype.cleanupWorkspaceScope=function(t){var i=this;s.mark("willReadWorkspaceIdentifier");var r=this.getInteger(e.WORKSPACE_IDENTIFIER,o.StorageScope.WORKSPACE);if(s.mark("didReadWorkspaceIdentifier"),n.isNumber(r)&&t!==r){for(var a=this.toStorageKey("",o.StorageScope.WORKSPACE),c=[],l=this._workspaceStorage.length,u=0;u<l;u++){var d=this._workspaceStorage.key(u);d.indexOf(e.WORKSPACE_PREFIX)<0||0===d.indexOf(a)&&c.push(d)}c.forEach(function(e){i._workspaceStorage.removeItem(e)})}t!==r&&this.store(e.WORKSPACE_IDENTIFIER,t,o.StorageScope.WORKSPACE)},e.prototype.store=function(e,t,r){void 0===r&&(r=o.StorageScope.GLOBAL);var s=r===o.StorageScope.GLOBAL?this._globalStorage:this._workspaceStorage;if(n.isUndefinedOrNull(t))this.remove(e,r);else{
var a=this.toStorageKey(e,r);try{s.setItem(a,t)}catch(e){i.onUnexpectedError(e)}}},e.prototype.get=function(e,t,i){void 0===t&&(t=o.StorageScope.GLOBAL);var r=(t===o.StorageScope.GLOBAL?this._globalStorage:this._workspaceStorage).getItem(this.toStorageKey(e,t));return n.isUndefinedOrNull(r)?i:r},e.prototype.getInteger=function(e,t,i){void 0===t&&(t=o.StorageScope.GLOBAL);var r=this.get(e,t,i);return n.isUndefinedOrNull(r)?i:parseInt(r,10)},e.prototype.getBoolean=function(e,t,i){void 0===t&&(t=o.StorageScope.GLOBAL);var r=this.get(e,t,i);return n.isUndefinedOrNull(r)?i:n.isString(r)?"true"===r.toLowerCase():!!r},e.prototype.remove=function(e,t){void 0===t&&(t=o.StorageScope.GLOBAL);var n=t===o.StorageScope.GLOBAL?this._globalStorage:this._workspaceStorage,i=this.toStorageKey(e,t);n.removeItem(i)},e.prototype.toStorageKey=function(t,n){return n===o.StorageScope.GLOBAL?e.GLOBAL_PREFIX+t.toLowerCase():e.WORKSPACE_PREFIX+this.workspaceKey+t.toLowerCase()},e.COMMON_PREFIX="storage://",
e.GLOBAL_PREFIX=e.COMMON_PREFIX+"global/",e.WORKSPACE_PREFIX=e.COMMON_PREFIX+"workspace/",e.WORKSPACE_IDENTIFIER="workspaceidentifier",e.NO_WORKSPACE_IDENTIFIER="__$noWorkspace__",e}();t.StorageService=a;var c=function(){function e(){this.store={}}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.store).length},enumerable:!0,configurable:!0}),e.prototype.key=function(e){var t=Object.keys(this.store);return t.length>e?t[e]:null},e.prototype.setItem=function(e,t){this.store[e]=t.toString()},e.prototype.getItem=function(e){var t=this.store[e];return n.isUndefinedOrNull(t)?null:t},e.prototype.removeItem=function(e){delete this.store[e]},e}();t.InMemoryLocalStorage=c,t.inMemoryLocalStorageInstance=new c}),define(e[923],t([1,0,514,14,10]),function(e,t,n,i,r){"use strict";function o(e){for(var t=new Map,o=new Map,c=new Map,l=new Map,u=[],d=0;d<e.length;d++){var h=e.key(d);if(i.startsWith(h,n.StorageService.WORKSPACE_PREFIX)){
if(i.endsWith(h,n.StorageService.WORKSPACE_IDENTIFIER)){var p=h.substring(n.StorageService.WORKSPACE_PREFIX.length,h.length-n.StorageService.WORKSPACE_IDENTIFIER.length);p=i.startsWith(p,"file:")?i.rtrim(p,"/"):"file:///"+i.rtrim(p,"/");var f=h.substr(0,h.length-n.StorageService.WORKSPACE_IDENTIFIER.length);u.push({prefix:f,resource:p})}else if(i.startsWith(h,s)){var g=h.substring(s.length,h.indexOf("/",s.length)),v=r.default.from({path:g,scheme:"empty"}).toString(),m=c.get(v);m||(m=Object.create(null),c.set(v,m));m[_=h.substr(s.length+g.length+1)]=e.getItem(h)}else if(i.startsWith(h,a)){var y=h.substring(a.length,h.indexOf("/",a.length)),b=r.default.from({path:y,scheme:"root"}).toString(),S=l.get(b);S||(S=Object.create(null),l.set(b,S));var _=h.substr(a.length+y.length+1);S[_]=e.getItem(h)}}else if(i.startsWith(h,n.StorageService.GLOBAL_PREFIX)){var C=h.substr(n.StorageService.GLOBAL_PREFIX.length);if(i.startsWith(C,n.StorageService.COMMON_PREFIX))continue;t.set(C,e.getItem(h))}}var E=u.sort(function(e,t){
return e.prefix.length>=t.prefix.length?-1:1}),w=new Map;return E.forEach(function(t){for(var n=0;n<e.length;n++){var r=e.key(n);if(!w.has(r)&&i.startsWith(r,t.prefix)){w.set(r,!0);var s=o.get(t.resource);s||(s=Object.create(null),o.set(t.resource,s));s[r.substr(t.prefix.length)]=e.getItem(r)}}}),{global:t,multiRoot:l,folder:o,empty:c}}Object.defineProperty(t,"__esModule",{value:!0});var s=n.StorageService.COMMON_PREFIX+"workspace/empty:",a=n.StorageService.COMMON_PREFIX+"workspace/root:";t.parseStorage=o,t.migrateStorageToMultiRootWorkspace=function(e,t,i){var s,a=o(i),c=r.default.from({path:t.id,scheme:"root"}).toString();return a.multiRoot.has(e)?s=a.multiRoot.get(e):a.empty.has(e)?s=a.empty.get(e):a.folder.has(e)&&(s=a.folder.get(e)),s&&Object.keys(s).forEach(function(e){e!==n.StorageService.WORKSPACE_IDENTIFIER&&i.setItem(""+n.StorageService.WORKSPACE_PREFIX+c+"/"+e,s[e])}),c}}),define(e[924],t([1,0,20,11,5,9,24]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a
;!function(e){e.compare=function(e,t){return e.callstack<t.callstack?-1:e.callstack>t.callstack?1:0}}(a||(a={}));var c=function(){function e(t,n){void 0===n&&(n=e.ERROR_FLUSH_TIMEOUT);var s=this;this._flushHandle=-1,this._buffer=[],this._disposables=[],this._telemetryService=t,this._flushDelay=n;var a=o.errorHandler.addListener(function(e){return s._onErrorEvent(e)});this._disposables.push(r.toDisposable(a));var c,l=this;"function"==typeof i.globals.onerror&&(c=i.globals.onerror),i.globals.onerror=function(e,t,n,i,r){l._onUncaughtError(e,t,n,i,r),c&&c.apply(this,arguments)},this._disposables.push(r.toDisposable(function(){c&&(i.globals.onerror=c)}))}return e.prototype.dispose=function(){clearTimeout(this._flushHandle),this._flushBuffer(),this._disposables=r.dispose(this._disposables)},e.prototype._onErrorEvent=function(e){if(e){e.detail&&e.detail.stack&&(e=e.detail);var t=Array.isArray(e.stack)?e.stack.join("\n"):e.stack,n=e.message?e.message:s.safeStringify(e);t&&this._enqueue({msg:n,callstack:t})}},
e.prototype._onUncaughtError=function(e,t,n,i,r){var o={callstack:e,msg:e,file:t,line:n,column:i};if(r){var s=r.name,a=r.message,c=r.stack;o.uncaught_error_name=s,a&&(o.uncaught_error_msg=a),c&&(o.callstack=Array.isArray(r.stack)?r.stack=r.stack.join("\n"):r.stack)}this._enqueue(o)},e.prototype._enqueue=function(e){var t=this,i=n.binarySearch(this._buffer,e,a.compare);i<0?(e.count=1,this._buffer.splice(~i,0,e)):this._buffer[i].count+=1,-1===this._flushHandle&&(this._flushHandle=setTimeout(function(){t._flushBuffer(),t._flushHandle=-1},this._flushDelay))},e.prototype._flushBuffer=function(){for(var e=0,t=this._buffer;e<t.length;e++){var n=t[e];this._telemetryService.publicLog("UnhandledError",n,!0)}this._buffer.length=0},e.ERROR_FLUSH_TIMEOUT=5e3,e}();t.default=c}),define(e[28],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),
define(e[32],t([1,0,9,10,29,52,16,28,39,47,31,15,71]),function(e,t,i,r,o,s,a,l,u,d,h,p,f){"use strict";function g(e,t){o.CommandsRegistry.registerCommand(e,function(e,n){return t(e,n||{})})}Object.defineProperty(t,"__esModule",{value:!0});var v=function(){function e(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._description=e.description}return e.prototype.toCommandAndKeybindingRule=function(e){var t=this,n=this._kbOpts||{primary:0},i=n.kbExpr;this.precondition&&(i=i?p.ContextKeyExpr.and(i,this.precondition):this.precondition);var r="number"==typeof n.weight?n.weight:e;return{id:this.id,handler:function(e,n){return t.runCommand(e,n)},weight:r,when:i,primary:n.primary,secondary:n.secondary,win:n.win,linux:n.linux,mac:n.mac,description:this._description}},e}();t.Command=v;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.bindToContribution=function(e){return function(t){function i(e){var n=t.call(this,e)||this
;return n._callback=e.handler,n}return n(i,t),i.prototype.runEditorCommand=function(t,n,i){e(n)&&this._callback(e(n))},i}(t)},t.prototype.runCommand=function(e,t){var n=this,i=e.get(f.ICodeEditorService),r=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(r)return r.invokeWithinContext(function(e){if(e.get(p.IContextKeyService).contextMatchesRules(n.precondition))return n.runEditorCommand(e,r,t)})},t}(v);t.EditorCommand=m;var y=function(e){function t(t){var n=e.call(this,t)||this;return n.label=t.label,n.alias=t.alias,n.menuOpts=t.menuOpts,n}return n(t,e),t.prototype.toMenuItem=function(){return this.menuOpts?{command:{id:this.id,title:this.label},when:p.ContextKeyExpr.and(this.precondition,this.menuOpts.when),group:this.menuOpts.group,order:this.menuOpts.order}:null},t.prototype.runEditorCommand=function(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})},t.prototype.reportTelemetry=function(e,t){e.get(l.ITelemetryService).publicLog("editorActionInvoked",c({name:this.label,id:this.id
},t.getTelemetryData()))},t}(m);t.EditorAction=y,t.registerLanguageCommand=g,t.registerDefaultLanguageCommand=function(e,t){g(e,function(e,n){var o=n.resource,s=n.position;if(!(o instanceof r.default))throw i.illegalArgument("resource");if(!u.Position.isIPosition(s))throw i.illegalArgument("position");var a=e.get(d.IModelService).getModel(o);if(!a)throw i.illegalArgument("Can not find open model for "+o);var c=u.Position.lift(s);return t(a,c,n)})},t.registerEditorCommand=function(e){return b.INSTANCE.registerEditorCommand(e),e},t.registerEditorAction=function(e){b.INSTANCE.registerEditorAction(new e)},t.registerInstantiatedEditorAction=function(e){b.INSTANCE.registerEditorAction(e)},t.registerEditorContribution=function(e){b.INSTANCE.registerEditorContribution(e)};!function(e){e.getEditorCommand=function(e){return b.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return b.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return b.INSTANCE.getEditorContributions()}
}(t.EditorExtensionsRegistry||(t.EditorExtensionsRegistry={}));var b=function(){function e(){this.editorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}return e.prototype.registerEditorContribution=function(e){this.editorContributions.push(e)},e.prototype.registerEditorAction=function(e){var t=e.toMenuItem();t&&h.MenuRegistry.appendMenuItem(h.MenuId.EditorContext,t),s.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib())),this.editorActions.push(e)},e.prototype.getEditorContributions=function(){return this.editorContributions.slice(0)},e.prototype.getEditorActions=function(){return this.editorActions.slice(0)},e.prototype.registerEditorCommand=function(e){s.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib())),this.editorCommands[e.id]=e},e.prototype.getEditorCommand=function(e){return this.editorCommands[e]||null},e.INSTANCE=new e,
e}();a.Registry.add("editor.contributions",b.INSTANCE)}),define(e[256],t([1,0,39,19,186,130,171,524,32,819,55,52,71,15,30,360,503]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m){"use strict";function y(e){return e.get(p.ICodeEditorService).getFocusedCodeEditor()}function b(e){h.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(C))}function S(e){b(new k("default:"+e,e)),b(new k(e,e))}Object.defineProperty(t,"__esModule",{value:!0});var _=o.Handler,C=h.KeybindingsRegistry.WEIGHT.editorCore(),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditorCommand(i,n||{})},t}(l.EditorCommand);t.CoreEditorCommand=E;var w;!function(e){e.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\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!g.isObject(e))return!1;var t=e;return!(!g.isString(t.to)||!g.isUndefined(t.by)&&!g.isString(t.by)||!g.isUndefined(t.value)&&!g.isNumber(t.value)||!g.isUndefined(t.revealCursor)&&!g.isBoolean(t.revealCursor))}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){var n;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}var i;switch(t.by){
case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}return{direction:n,unit:i,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}};!function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(e.Direction||(e.Direction={}));!function(e){e[e.Line=1]="Line",e[e.WrappedLine=2]="WrappedLine",e[e.Page=3]="Page",e[e.HalfPage=4]="HalfPage"}(e.Unit||(e.Unit={}))}(w=t.EditorScroll_||(t.EditorScroll_={}));var I;!function(e){e.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\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!g.isObject(e))return!1;var t=e
;return!(!g.isNumber(t.lineNumber)||!g.isUndefined(t.at)&&!g.isString(t.at))}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(I=t.RevealLine_||(t.RevealLine_={}));var T;!function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[c.CursorMoveCommands.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0,0)},t}(E);e.MoveTo=l.registerEditorCommand(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=l.registerEditorCommand(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement()
;var n=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,a.CursorChangeReason.Explicit,n.viewStates.map(function(e){return s.CursorState.fromViewState(e)})),e.setColumnSelectData({toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),e.reveal(!0,n.reversed?1:2,0)},t}(E);e.ColumnSelect=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return n(t,e),t.prototype._getColumnSelectResult=function(e,t,n,r){var o,s=e.model.validatePosition(r.position);return o=r.viewPosition?e.validateViewPosition(new i.Position(r.viewPosition.lineNumber,r.viewPosition.column),s):e.convertModelPositionToViewPosition(s),u.ColumnSelection.columnSelect(e.config,e.viewModel,t.viewState.selection,o.lineNumber,r.mouseColumn-1)},t}(o))),e.CursorColumnSelectLeft=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:C,
kbExpr:d.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})||this}return n(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return u.ColumnSelection.columnSelectLeft(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(o))),e.CursorColumnSelectRight=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})||this}return n(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return u.ColumnSelection.columnSelectRight(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(o)));var h=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return n(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return u.ColumnSelection.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(o)
;e.CursorColumnSelectUp=l.registerEditorCommand(new h({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=l.registerEditorCommand(new h({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));var p=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return n(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return u.ColumnSelection.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(o);e.CursorColumnSelectDown=l.registerEditorCommand(new p({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=l.registerEditorCommand(new p({isPaged:!0,id:"cursorColumnSelectPageDown",
precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));var f=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:c.CursorMove.description})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=c.CursorMove.parse(t);n&&this._runCursorMove(e,t.source,n)},t.prototype._runCursorMove=function(e,t,n){e.context.model.pushStackElement(),e.setStates(t,a.CursorChangeReason.Explicit,c.CursorMoveCommands.move(e.context,e.getAll(),n)),e.reveal(!0,0,0)},t}(E);e.CursorMoveImpl=f,e.CursorMove=l.registerEditorCommand(new f);var g;!function(e){e[e.PAGE_SIZE_MARKER=-1]="PAGE_SIZE_MARKER"}(g||(g={}));var v=function(t){function i(e){var n=t.call(this,e)||this;return n._staticArgs=e.args,n}return n(i,t),i.prototype.runCoreEditorCommand=function(t,n){var i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,
value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,n.source,i)},i}(E);e.CursorLeft=l.registerEditorCommand(new v({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=l.registerEditorCommand(new v({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1039}})),e.CursorRight=l.registerEditorCommand(new v({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=l.registerEditorCommand(new v({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1041}})),e.CursorUp=l.registerEditorCommand(new v({args:{
direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=l.registerEditorCommand(new v({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=l.registerEditorCommand(new v({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:11}})),e.CursorPageUpSelect=l.registerEditorCommand(new v({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1035}})),e.CursorDown=l.registerEditorCommand(new v({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:C,
kbExpr:d.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=l.registerEditorCommand(new v({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=l.registerEditorCommand(new v({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:12}})),e.CursorPageDownSelect=l.registerEditorCommand(new v({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1036}})),e.CreateCursor=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n,i=e.context
;n=t.wholeLine?c.CursorMoveCommands.line(i,e.getPrimaryCursor(),!1,t.position,t.viewPosition):c.CursorMoveCommands.moveTo(i,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var r=e.getAll();if(r.length>1)for(var o=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,l=0,u=r.length;l<u;l++){var d=r[l];if((!o||d.modelState.selection.containsPosition(o))&&(!s||d.viewState.selection.containsPosition(s)))return r.splice(l,1),e.context.model.pushStackElement(),void e.setStates(t.source,a.CursorChangeReason.Explicit,r)}r.push(n),e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,r)},t}(E))),e.LastCursorMoveToSelect=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"_lastCursorMoveToSelect",precondition:null})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=e.context,i=e.getLastAddedCursorIndex(),r=e.getAll().slice(0);r[i]=c.CursorMoveCommands.moveTo(n,r[i],!0,t.position,t.viewPosition),
e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,r)},t}(E)));var m=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,c.CursorMoveCommands.moveToBeginningOfLine(e.context,e.getAll(),this._inSelectionMode)),e.reveal(!0,0,0)},t}(E);e.CursorHome=l.registerEditorCommand(new m({inSelectionMode:!1,id:"cursorHome",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=l.registerEditorCommand(new m({inSelectionMode:!0,id:"cursorHomeSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}})),e.CursorLineStart=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"cursorLineStart",precondition:null,
kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,this._exec(e.context,e.getAll())),e.reveal(!0,0,0)},t.prototype._exec=function(e,t){for(var n=[],i=0,r=t.length;i<r;i++){var o=t[i],a=o.modelState.position.lineNumber;n[i]=s.CursorState.fromModelState(o.modelState.move(!1,a,1,0))}return n},t}(E)));var y=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,c.CursorMoveCommands.moveToEndOfLine(e.context,e.getAll(),this._inSelectionMode)),e.reveal(!0,0,0)},t}(E);e.CursorEnd=l.registerEditorCommand(new y({inSelectionMode:!1,id:"cursorEnd",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:13,mac:{
primary:13,secondary:[2065]}}})),e.CursorEndSelect=l.registerEditorCommand(new y({inSelectionMode:!0,id:"cursorEndSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}}})),e.CursorLineEnd=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"cursorLineEnd",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,this._exec(e.context,e.getAll())),e.reveal(!0,0,0)},t.prototype._exec=function(e,t){for(var n=[],i=0,r=t.length;i<r;i++){var o=t[i],a=o.modelState.position.lineNumber,c=e.model.getLineMaxColumn(a);n[i]=s.CursorState.fromModelState(o.modelState.move(!1,a,c,0))}return n},t}(E)));var b=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),
t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,c.CursorMoveCommands.moveToBeginningOfBuffer(e.context,e.getAll(),this._inSelectionMode)),e.reveal(!0,0,0)},t}(E);e.CursorTop=l.registerEditorCommand(new b({inSelectionMode:!1,id:"cursorTop",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=l.registerEditorCommand(new b({inSelectionMode:!0,id:"cursorTopSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));var S=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,c.CursorMoveCommands.moveToEndOfBuffer(e.context,e.getAll(),this._inSelectionMode)),e.reveal(!0,0,0)},t}(E)
;e.CursorBottom=l.registerEditorCommand(new S({inSelectionMode:!1,id:"cursorBottom",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=l.registerEditorCommand(new S({inSelectionMode:!0,id:"cursorBottomSelect",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));var _=function(e){function t(){return e.call(this,{id:"editorScroll",precondition:null,description:w.description})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=w.parse(t);n&&this._runEditorScroll(e,t.source,n)},t.prototype._runEditorScroll=function(e,t,n){var i=this._computeDesiredScrollTop(e.context,n);if(n.revealCursor){var r=e.context.getCompletelyVisibleViewRangeAtScrollTop(i);e.setStates(t,a.CursorChangeReason.Explicit,[c.CursorMoveCommands.findPositionInViewportIfOutside(e.context,e.getPrimaryCursor(),r,n.select)])}e.scrollTo(i)},
t.prototype._computeDesiredScrollTop=function(e,t){if(1===t.unit){var n=e.getCompletelyVisibleModelRange(),r=void 0;r=1===t.direction?Math.max(1,n.startLineNumber-t.value):Math.min(e.model.getLineCount(),n.startLineNumber+t.value);var o=e.convertModelPositionToViewPosition(new i.Position(r,1));return e.getVerticalOffsetForViewLine(o.lineNumber)}var s;s=3===t.unit?e.config.pageSize*t.value:4===t.unit?Math.round(e.config.pageSize/2)*t.value:t.value;var a=(1===t.direction?-1:1)*s;return e.getCurrentScrollTop()+a*e.config.lineHeight},t}(E);e.EditorScrollImpl=_,e.EditorScroll=l.registerEditorCommand(new _),e.ScrollLineUp=l.registerEditorCommand(new(function(t){function i(){return t.call(this,{id:"scrollLineUp",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})||this}return n(i,t),i.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})},i}(E))),
e.ScrollPageUp=l.registerEditorCommand(new(function(t){function i(){return t.call(this,{id:"scrollPageUp",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})||this}return n(i,t),i.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})},i}(E))),e.ScrollLineDown=l.registerEditorCommand(new(function(t){function i(){return t.call(this,{id:"scrollLineDown",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})||this}return n(i,t),i.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})},i}(E))),e.ScrollPageDown=l.registerEditorCommand(new(function(t){function i(){return t.call(this,{id:"scrollPageDown",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524
},linux:{primary:524}}})||this}return n(i,t),i.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})},i}(E)));var T=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[c.CursorMoveCommands.word(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position)]),e.reveal(!0,0,0)},t}(E);e.WordSelect=l.registerEditorCommand(new T({inSelectionMode:!1,id:"_wordSelect",precondition:null})),e.WordSelectDrag=l.registerEditorCommand(new T({inSelectionMode:!0,id:"_wordSelectDrag",precondition:null})),e.LastCursorWordSelect=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"lastCursorWordSelect",precondition:null})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){
var n=e.context,i=e.getLastAddedCursorIndex(),r=e.getAll().slice(0),o=r[i];r[i]=c.CursorMoveCommands.word(n,o,o.modelState.hasSelection(),t.position),n.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,r)},t}(E)));var x=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[c.CursorMoveCommands.line(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!1,0,0)},t}(E);e.LineSelect=l.registerEditorCommand(new x({inSelectionMode:!1,id:"_lineSelect",precondition:null})),e.LineSelectDrag=l.registerEditorCommand(new x({inSelectionMode:!0,id:"_lineSelectDrag",precondition:null}));var k=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){
var n=e.getLastAddedCursorIndex(),i=e.getAll().slice(0);i[n]=c.CursorMoveCommands.line(e.context,i[n],this._inSelectionMode,t.position,t.viewPosition),e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,i)},t}(E);e.LastCursorLineSelect=l.registerEditorCommand(new k({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:null})),e.LastCursorLineSelectDrag=l.registerEditorCommand(new k({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:null})),e.ExpandLineSelection=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"expandLineSelection",precondition:null,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2087}})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,c.CursorMoveCommands.expandLineSelection(e.context,e.getAll())),e.reveal(!0,0,0)},t}(E))),e.CancelSelection=l.registerEditorCommand(new(function(e){function t(){
return e.call(this,{id:"cancelSelection",precondition:d.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[c.CursorMoveCommands.cancelSelection(e.context,e.getPrimaryCursor())]),e.reveal(!0,0,0)},t}(E))),e.RemoveSecondaryCursors=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"removeSecondaryCursors",precondition:d.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:C+1,kbExpr:d.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[e.getPrimaryCursor()]),e.reveal(!0,0,0)},t}(E))),e.RevealLine=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"revealLine",
precondition:null,description:I.description})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=t,i=n.lineNumber+1;i<1&&(i=1);var o=e.context.model.getLineCount();i>o&&(i=o);var s=new r.Range(i,1,i,e.context.model.getLineMaxColumn(i)),a=0;if(n.at)switch(n.at){case I.RawAtArgument.Top:a=3;break;case I.RawAtArgument.Center:a=1;break;case I.RawAtArgument.Bottom:a=4}var c=e.context.convertModelRangeToViewRange(s);e.revealRange(!1,c,a,0)},t}(E))),e.SelectAll=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[c.CursorMoveCommands.selectAll(e.context,e.getPrimaryCursor())])},t}(E))),e.SetSelection=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return n(t,e),t.prototype.runCoreEditorCommand=function(e,t){
e.context.model.pushStackElement(),e.setStates(t.source,a.CursorChangeReason.Explicit,[s.CursorState.fromModelSelection(t.selection)])},t}(E)))}(T=t.CoreNavigationCommands||(t.CoreNavigationCommands={}));!function(e){e.LineBreakInsert=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:null,mac:{primary:301}}})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,v.TypeOperations.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(l.EditorCommand))),e.Outdent=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:f.ContextKeyExpr.and(d.EditorContextKeys.editorTextFocus,d.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})||this}return n(t,e),
t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,v.TypeOperations.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(l.EditorCommand))),e.Tab=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"tab",precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:f.ContextKeyExpr.and(d.EditorContextKeys.editorTextFocus,d.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,v.TypeOperations.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(l.EditorCommand))),e.DeleteLeft=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return n(t,e),
t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),r=m.DeleteOperations.deleteLeft(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),o=r[0],s=r[1];o&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(2)},t}(l.EditorCommand))),e.DeleteRight=l.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),r=m.DeleteOperations.deleteRight(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),o=r[0],s=r[1];o&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(3)},t}(l.EditorCommand)))}(t.CoreEditingCommands||(t.CoreEditingCommands={}));var x=function(e){function t(t){var n=e.call(this,t)||this
;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return n(t,e),t.prototype.runCommand=function(e,t){var n=y(e);if(n&&n.hasTextFocus())return this._runEditorHandler(n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var r=e.get(p.ICodeEditorService).getActiveCodeEditor();return r?(r.focus(),this._runEditorHandler(r,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t){var n=this._editorHandler;"string"==typeof n?e.trigger("keyboard",n,t):((t=t||{}).source="keyboard",n.runEditorCommand(null,e,t))},t}(l.Command),k=function(e){function t(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i}return n(t,e),t.prototype.runCommand=function(e,t){var n=y(e);n&&n.trigger("keyboard",this._handlerId,t)},t}(l.Command);b(new x({editorHandler:T.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:d.EditorContextKeys.focus,kbOpts:{weight:C,kbExpr:null,
primary:2079}})),b(new x({editorHandler:_.Undo,inputHandler:"undo",id:_.Undo,precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2104}})),b(new k("default:"+_.Undo,_.Undo)),b(new x({editorHandler:_.Redo,inputHandler:"redo",id:_.Redo,precondition:d.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:d.EditorContextKeys.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}}})),b(new k("default:"+_.Redo,_.Redo)),S(_.Type),S(_.ReplacePreviousChar),S(_.CompositionStart),S(_.CompositionEnd),S(_.Paste),S(_.Cut)}),define(e[928],t([1,0,39,256]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i,r){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=n,this.outgoingEvents=i,this.commandDelegate=r}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,n,i){this.commandDelegate.paste(e,t,n,i)},
e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this._execCoreEditorCommandFunc(i.CoreNavigationCommands.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new n.Position(e.lineNumber,t):e},e.prototype._hasMulticursorModifier=function(e){switch(this.configuration.editor.multiCursorModifier){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey}return!1},e.prototype._hasNonMulticursorModifier=function(e){switch(this.configuration.editor.multiCursorModifier){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":
return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey}return!1},e.prototype.dispatchMouse=function(e){
e.middleButton?e.inSelectionMode?this.columnSelect(e.position,e.mouseColumn):this.moveTo(e.position):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelect(e.position):this.createCursor(e.position,!0):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):e.mouseDownCount>=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position)
},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(i.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(i.CoreNavigationCommands.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(i.CoreNavigationCommands.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){
this._execMouseCommand(i.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(i.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(i.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(i.CoreNavigationCommands.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){
return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}();t.ViewController=r}),define(e[929],t([1,0,1266,55,32,1109]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){var i=e.call(this,n)||this;return i.left=t,i}return n(t,e),
t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),r=0;r<i.length;r++)n.push(new s.MoveCaretCommand(i[r],this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()},t}(o.EditorAction),c=function(e){function t(){return e.call(this,!0,{id:"editor.action.moveCarretLeftAction",label:i.localize(0,null),alias:"Move Caret Left",precondition:r.EditorContextKeys.writable})||this}return n(t,e),t}(a),l=function(e){function t(){return e.call(this,!1,{id:"editor.action.moveCarretRightAction",label:i.localize(1,null),alias:"Move Caret Right",precondition:r.EditorContextKeys.writable})||this}return n(t,e),t}(a);o.registerEditorAction(c),o.registerEditorAction(l)}),define(e[930],t([1,0,1274,14,19,39,55,32,214]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return e.call(this,{id:"editor.action.transposeLetters",label:i.localize(0,null),alias:"Transpose Letters",precondition:a.EditorContextKeys.writable,kbOpts:{
kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306}}})||this}return n(t,e),t.prototype.positionLeftOf=function(e,t){var n=e.column,i=e.lineNumber;return n>t.getLineMinColumn(i)?r.isLowSurrogate(t.getLineContent(i).charCodeAt(n-2))?n-=2:n-=1:i>1&&(i-=1,n=t.getLineMaxColumn(i)),new s.Position(i,n)},t.prototype.positionRightOf=function(e,t){var n=e.column,i=e.lineNumber;return n<t.getLineMaxColumn(i)?r.isHighSurrogate(t.getLineContent(i).charCodeAt(n-1))?n+=2:n+=1:i<t.getLineCount()&&(i+=1,n=0),new s.Position(i,n)},t.prototype.run=function(e,t){for(var n=t.getModel(),i=[],r=0,s=t.getSelections();r<s.length;r++){var a=s[r];if(a.isEmpty()){var c=a.startLineNumber,u=a.startColumn,d=n.getLineMaxColumn(c);if(1!==c||1!==u&&(2!==u||2!==d)){var h=u===d?a.getPosition():this.positionRightOf(a.getPosition(),n),p=this.positionLeftOf(h,n),f=this.positionLeftOf(p,n),g=n.getValueInRange(o.Range.fromPositions(f,p)),v=n.getValueInRange(o.Range.fromPositions(p,h)),m=o.Range.fromPositions(f,h)
;i.push(new l.ReplaceCommand(m,v+g))}}}i.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())},t}(c.EditorAction);c.registerEditorAction(u)}),define(e[931],t([1,0,1277,78,11,71,32,423,55,1218]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u="9_cutcopypaste",d=o.isNative||document.queryCommandSupported("cut"),h=o.isNative||document.queryCommandSupported("copy"),p=h&&!r.isEdgeOrIE,f=o.isNative||!r.isChrome&&document.queryCommandSupported("paste"),g=function(e){function t(t,n){var i=e.call(this,n)||this;return i.browserCommand=t,i}return n(t,e),t.prototype.runCommand=function(e,t){var n=e.get(s.ICodeEditorService).getFocusedCodeEditor();n&&n.hasTextFocus()?n.trigger("keyboard",this.id,t):document.execCommand(this.browserCommand)},t.prototype.run=function(e,t){t.focus(),document.execCommand(this.browserCommand)},t}(a.EditorAction),v=function(e){function t(){var t={kbExpr:l.EditorContextKeys.textInputFocus,primary:2102,win:{primary:2102,
secondary:[1044]}};return o.isNative||(t=null),e.call(this,"cut",{id:"editor.action.clipboardCutAction",label:i.localize(0,null),alias:"Cut",precondition:l.EditorContextKeys.writable,kbOpts:t,menuOpts:{group:u,order:1}})||this}return n(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(g),m=function(e){function t(){var t={kbExpr:l.EditorContextKeys.textInputFocus,primary:2081,win:{primary:2081,secondary:[2067]}};return o.isNative||(t=null),e.call(this,"copy",{id:"editor.action.clipboardCopyAction",label:i.localize(1,null),alias:"Copy",precondition:null,kbOpts:t,menuOpts:{group:u,order:2}})||this}return n(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(g),y=function(e){function t(){var t={kbExpr:l.EditorContextKeys.textInputFocus,primary:2100,win:{primary:2100,secondary:[1043]}};return o.isNative||(t=null),
e.call(this,"paste",{id:"editor.action.clipboardPasteAction",label:i.localize(2,null),alias:"Paste",precondition:l.EditorContextKeys.writable,kbOpts:t,menuOpts:{group:u,order:3}})||this}return n(t,e),t}(g),b=function(e){function t(){return e.call(this,"copy",{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:i.localize(3,null),alias:"Copy With Syntax Highlighting",precondition:null,kbOpts:{kbExpr:l.EditorContextKeys.textInputFocus,primary:null}})||this}return n(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||(c.CopyOptions.forceCopyWithSyntaxHighlighting=!0,e.prototype.run.call(this,t,n),c.CopyOptions.forceCopyWithSyntaxHighlighting=!1)},t}(g);d&&a.registerEditorAction(v),h&&a.registerEditorAction(m),f&&a.registerEditorAction(y),p&&a.registerEditorAction(b)}),define(e[544],t([1,0,20,18,9,10,4,32,19,44,47,282]),function(e,t,n,i,r,o,s,a,c,l,u,d){"use strict";function h(e,t,o){var a={
only:o&&o.filter&&o.filter.kind?o.filter.kind.value:void 0,trigger:o&&"manual"===o.type?l.CodeActionTrigger.Manual:l.CodeActionTrigger.Automatic},c=l.CodeActionProviderRegistry.all(e).map(function(n){return i.asWinJsPromise(function(i){return n.provideCodeActions(e,t,a,i)}).then(function(e){return Array.isArray(e)?e.filter(function(e){return function(e,t){if(!t)return!1;if(e&&e.kind&&(!t.kind||!e.kind.contains(t.kind)))return!1;if(t.kind&&d.CodeActionKind.Source.contains(t.kind)&&(!e||!e.includeSourceActions))return!1;return!0}(o&&o.filter,e)}):[]},function(e){if(r.isPromiseCanceledError(e))throw e;return r.onUnexpectedExternalError(e),[]})});return s.TPromise.join(c).then(n.flatten).then(function(e){return n.mergeSort(e,p)})}function p(e,t){var i=!n.isFalsyOrEmpty(e.diagnostics),r=!n.isFalsyOrEmpty(t.diagnostics);return i?r?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:r?1:0}Object.defineProperty(t,"__esModule",{value:!0}),t.getCodeActions=h,
a.registerLanguageCommand("_executeCodeActionProvider",function(e,t){var n=t.resource,i=t.range;if(!(n instanceof o.default&&c.Range.isIRange(i)))throw r.illegalArgument();var s=e.get(u.IModelService).getModel(n);if(!s)throw r.illegalArgument();return h(s,s.validateRange(i),void 0)})}),define(e[933],t([1,0,7,5,4,19,44,15,544]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_CODE_ACTIONS=new a.RawContextKey("supportedCodeAction","");var l=function(){function e(e,t,i,r,o){void 0===r&&(r=250);var s=this;this._editor=e,this._markerService=t,this._signalChange=i,this._progressService=o,this._disposables=[],this._disposables.push(n.debounceEvent(this._markerService.onMarkerChanged,function(e,t){return e?e.concat(t):t},r/2)(function(e){return s._onMarkerChanges(e)}),n.debounceEvent(this._editor.onDidChangeCursorPosition,function(e,t){return t},r)(function(e){return s._onCursorChange()}))}return e.prototype.dispose=function(){
this._disposables=i.dispose(this._disposables)},e.prototype.trigger=function(e){var t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)},e.prototype._onMarkerChanges=function(e){for(var t=this._editor.getModel().uri,n=0,i=e;n<i.length;n++){if(i[n].toString()===t.toString())return void this.trigger({type:"auto"})}},e.prototype._onCursorChange=function(){this.trigger({type:"auto"})},e.prototype._getRangeOfMarker=function(e){for(var t=this._editor.getModel(),n=0,i=this._markerService.read({resource:t.uri});n<i.length;n++){var r=i[n];if(o.Range.intersectRanges(r,e))return o.Range.lift(r)}},e.prototype._getRangeOfSelectionUnlessWhitespaceEnclosed=function(e){var t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&(!e.filter||!e.filter.includeSourceActions)){var i=n.getPosition(),r=i.lineNumber,o=i.column,s=t.getLineContent(r);if(0===s.length)return;if(1===o){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){
if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n},e.prototype._createEventAndSignalChange=function(e,t){if(t){var n=this._editor.getModel(),i=this._getRangeOfMarker(t),o=i?i.getStartPosition():t.getStartPosition(),s=c.getCodeActions(n,t,e);return this._progressService&&"manual"===e.type&&this._progressService.showWhile(s,250),this._signalChange({trigger:e,rangeOrSelection:t,position:o,actions:s}),s}return this._signalChange({trigger:e,rangeOrSelection:void 0,position:void 0,actions:void 0}),r.TPromise.as(void 0)},e}();t.CodeActionOracle=l;var u=function(){function e(e,i,r,o){var a=this;this._progressService=o,this._onDidChangeFixes=new n.Emitter,this._disposables=[],this._editor=e,this._markerService=i,this._supportedCodeActions=t.SUPPORTED_CODE_ACTIONS.bindTo(r),this._disposables.push(this._editor.onDidChangeModel(function(){return a._update()})),this._disposables.push(this._editor.onDidChangeModelLanguage(function(){return a._update()})),
this._disposables.push(s.CodeActionProviderRegistry.onDidChange(this._update,this)),this._update()}return e.prototype.dispose=function(){this._disposables=i.dispose(this._disposables),i.dispose(this._codeActionOracle)},Object.defineProperty(e.prototype,"onDidChangeFixes",{get:function(){return this._onDidChangeFixes.event},enumerable:!0,configurable:!0}),e.prototype._update=function(){var e=this;if(this._codeActionOracle&&(this._codeActionOracle.dispose(),this._codeActionOracle=void 0,this._onDidChangeFixes.fire(void 0)),this._editor.getModel()&&s.CodeActionProviderRegistry.has(this._editor.getModel())&&!this._editor.getConfiguration().readOnly){for(var t=[],n=0,i=s.CodeActionProviderRegistry.all(this._editor.getModel());n<i.length;n++){var r=i[n];Array.isArray(r.providedCodeActionKinds)&&t.push.apply(t,r.providedCodeActionKinds)}this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle=new l(this._editor,this._markerService,function(t){return e._onDidChangeFixes.fire(t)
},void 0,this._progressService),this._codeActionOracle.trigger({type:"auto"})}else this._supportedCodeActions.reset()},e.prototype.trigger=function(e){return this._codeActionOracle?this._codeActionOracle.trigger(e):r.TPromise.as(void 0)},e}();t.CodeActionModel=u}),define(e[934],t([1,0,9,20,10,4,32,44,47,18,145]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";function d(e){var t=[],r=a.CodeLensProviderRegistry.ordered(e),s=r.map(function(i){return l.asWinJsPromise(function(t){return i.provideCodeLenses(e,t)}).then(function(e){if(Array.isArray(e))for(var n=0,r=e;n<r.length;n++){var o=r[n];t.push({symbol:o,provider:i})}},n.onUnexpectedExternalError)});return o.TPromise.join(s).then(function(){return i.mergeSort(t,function(e,t){
return e.symbol.range.startLineNumber<t.symbol.range.startLineNumber?-1:e.symbol.range.startLineNumber>t.symbol.range.startLineNumber?1:r.indexOf(e.provider)<r.indexOf(t.provider)?-1:r.indexOf(e.provider)>r.indexOf(t.provider)?1:e.symbol.range.startColumn<t.symbol.range.startColumn?-1:e.symbol.range.startColumn>t.symbol.range.startColumn?1:0})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getCodeLensData=d,s.registerLanguageCommand("_executeCodeLensProvider",function(e,t){var i=t.resource,o=t.itemResolveCount;if(!(i instanceof r.default))throw n.illegalArgument();var s=e.get(c.IModelService).getModel(i);if(!s)throw n.illegalArgument();var a=[];return d(s).then(function(e){for(var t=[],n=0,i=e;n<i.length;n++){var r=i[n];void 0===o||Boolean(r.symbol.command)?a.push(r.symbol):o-- >0&&t.push(Promise.resolve(r.provider.resolveCodeLens(s,r.symbol,u.CancellationToken.None)).then(function(e){return a.push(e)}))}return Promise.all(t)}).then(function(){return a})})}),
define(e[547],t([1,0,10,4,44,18,32,19,9,47]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColors=function(e){var t=[],n=r.ColorProviderRegistry.ordered(e).reverse().map(function(n){return o.asWinJsPromise(function(t){return n.provideDocumentColors(e,t)}).then(function(e){if(Array.isArray(e))for(var i=0,r=e;i<r.length;i++){var o=r[i];t.push({colorInfo:o,provider:n})}})});return i.TPromise.join(n).then(function(){return t})},t.getColorPresentations=function(e,t,n){return o.asWinJsPromise(function(i){return n.provideColorPresentations(e,t,i)})},s.registerLanguageCommand("_executeDocumentColorProvider",function(e,t){var s=t.resource;if(!(s instanceof n.default))throw c.illegalArgument();var a=e.get(l.IModelService).getModel(s);if(!a)throw c.illegalArgument();var u=[],d=r.ColorProviderRegistry.ordered(a).reverse().map(function(e){return o.asWinJsPromise(function(t){return e.provideDocumentColors(a,t)}).then(function(e){
if(Array.isArray(e))for(var t=0,n=e;t<n.length;t++){var i=n[t];u.push({range:i.range,color:[i.color.red,i.color.green,i.color.blue,i.color.alpha]})}})});return i.TPromise.join(d).then(function(){return u})}),s.registerLanguageCommand("_executeColorPresentationProvider",function(e,t){var s=t.resource,u=t.color,d=t.range;if(!(s instanceof n.default&&Array.isArray(u)&&4===u.length&&a.Range.isIRange(d)))throw c.illegalArgument();var h=u[0],p=u[1],f=u[2],g=u[3],v=e.get(l.IModelService).getModel(s);if(!v)throw c.illegalArgument();var m={range:d,color:{red:h,green:p,blue:f,alpha:g}},y=[],b=r.ColorProviderRegistry.ordered(v).reverse().map(function(e){return o.asWinJsPromise(function(t){return e.provideColorPresentations(v,m,t)}).then(function(e){Array.isArray(e)&&y.push.apply(y,e)})});return i.TPromise.join(b).then(function(){return y})})}),define(e[550],t([1,0,51,483,5,4,32,19,44,71,547,17,66]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){
function e(e,t,n){var i=this;this._editor=e,this._codeEditorService=t,this._configurationService=n,this._globalToDispose=[],this._localToDispose=[],this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes={},this._globalToDispose.push(e.onDidChangeModel(function(e){i._isEnabled=i.isEnabled(),i.onModelChanged()})),this._globalToDispose.push(e.onDidChangeModelLanguage(function(e){return i.onModelChanged()})),this._globalToDispose.push(u.ColorProviderRegistry.onDidChange(function(e){return i.onModelChanged()})),this._globalToDispose.push(e.onDidChangeConfiguration(function(e){var t=i._isEnabled;i._isEnabled=i.isEnabled(),t!==i._isEnabled&&(i._isEnabled?i.onModelChanged():i.removeAllDecorations())})),this._timeoutPromise=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}return e.prototype.isEnabled=function(){var e=this._editor.getModel();if(!e)return!1;var t=e.getLanguageIdentifier(),n=this._configurationService.getValue(t.language)
;if(n){var i=n.colorDecorators;if(i&&void 0!==i.enable&&!i.enable)return i.enable}return this._editor.getConfiguration().contribInfo.colorDecorators},e.prototype.getId=function(){return e.ID},e.get=function(e){return e.getContribution(this.ID)},e.prototype.dispose=function(){this.stop(),this.removeAllDecorations(),this._globalToDispose=r.dispose(this._globalToDispose)},e.prototype.onModelChanged=function(){var t=this;if(this.stop(),this._isEnabled){var n=this._editor.getModel();u.ColorProviderRegistry.has(n)&&(this._localToDispose.push(this._editor.onDidChangeModelContent(function(n){t._timeoutPromise||(t._timeoutPromise=o.TPromise.timeout(e.RECOMPUTE_TIME),t._timeoutPromise.then(function(){t._timeoutPromise=null,t.beginCompute()}))})),this.beginCompute())}},e.prototype.beginCompute=function(){var e=this;this._computePromise=h.getColors(this._editor.getModel()).then(function(t){e.updateDecorations(t),e.updateColorDecorators(t),e._computePromise=null})},e.prototype.stop=function(){
this._timeoutPromise&&(this._timeoutPromise.cancel(),this._timeoutPromise=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose=r.dispose(this._localToDispose)},e.prototype.updateDecorations=function(e){var t=this,n=e.map(function(e){return{range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:f.ModelDecorationOptions.EMPTY}});this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach(function(n,i){return t._colorDatas.set(n,e[i])})},e.prototype.updateColorDecorators=function(e){for(var t=[],r={},o=0;o<e.length&&t.length<500;o++){var s=e[o].colorInfo.color,a=s.red,c=s.green,l=s.blue,u=s.alpha,d=new n.RGBA(Math.round(255*a),Math.round(255*c),Math.round(255*l),u),h=i.hash(d).toString(16),p="rgba("+d.r+", "+d.g+", "+d.b+", "+d.a+")",f="colorBox-"+h
;this._decorationsTypes[f]||r[f]||this._codeEditorService.registerDecorationType(f,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:p},dark:{before:{border:"solid 0.1em #eee"}}}),r[f]=!0,t.push({range:{startLineNumber:e[o].colorInfo.range.startLineNumber,startColumn:e[o].colorInfo.range.startColumn,endLineNumber:e[o].colorInfo.range.endLineNumber,endColumn:e[o].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(f,!0)})}for(var g in this._decorationsTypes)r[g]||this._codeEditorService.removeDecorationType(g);this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)},e.prototype.removeAllDecorations=function(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]);for(var e in this._decorationsTypes)this._codeEditorService.removeDecorationType(e)},
e.prototype.getColorData=function(e){var t=this,n=this._editor.getModel().getDecorationsInRange(c.Range.fromPositions(e,e)).filter(function(e){return t._colorDatas.has(e.id)});return 0===n.length?null:this._colorDatas.get(n[0].id)},e.ID="editor.contrib.colorDetector",e.RECOMPUTE_TIME=1e3,e=a([l(1,d.ICodeEditorService),l(2,p.IConfigurationService)],e)}();t.ColorDetector=g,s.registerEditorContribution(g)}),define(e[937],t([1,0,1296,73,55,32,498,1117]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return n(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){for(var i=[],r=t.getSelections(),o=n.getOptions(),s=0;s<r.length;s++)i.push(new c.LineCommentCommand(r[s],o.tabSize,this._type));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}},t}(s.EditorAction),u=function(e){function t(){return e.call(this,0,{id:"editor.action.commentLine",label:i.localize(0,null),
alias:"Toggle Line Comment",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2133}})||this}return n(t,e),t}(l),d=function(e){function t(){return e.call(this,1,{id:"editor.action.addCommentLine",label:i.localize(1,null),alias:"Add Line Comment",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:r.KeyChord(2089,2081)}})||this}return n(t,e),t}(l),h=function(e){function t(){return e.call(this,2,{id:"editor.action.removeCommentLine",label:i.localize(2,null),alias:"Remove Line Comment",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:r.KeyChord(2089,2099)}})||this}return n(t,e),t}(l),p=function(e){function t(){return e.call(this,{id:"editor.action.blockComment",label:i.localize(3,null),alias:"Toggle Block Comment",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103}}})||this}return n(t,e),
t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),r=0;r<i.length;r++)n.push(new a.BlockCommentCommand(i[r]));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()},t}(s.EditorAction);s.registerEditorAction(u),s.registerEditorAction(d),s.registerEditorAction(h),s.registerEditorAction(p)}),define(e[339],t([1,0,1297,5,4,8,41,35,37,15,31,55,32,45]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){function e(e,t,n,i,r,o){var s=this;this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=r,this._menuService=o,this._toDispose=[],this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.push(this._editor.onContextMenu(function(e){return s._onContextMenu(e)})),this._toDispose.push(this._editor.onDidScrollChange(function(e){s._contextMenuIsBeingShownCount>0&&s._contextViewService.hideContextView()})),this._toDispose.push(this._editor.onKeyDown(function(e){
58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())}))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(e.target.type!==v.MouseTargetType.OVERLAY_WIDGET&&(e.event.preventDefault(),e.target.type===v.MouseTargetType.CONTENT_TEXT||e.target.type===v.MouseTargetType.CONTENT_EMPTY||e.target.type===v.MouseTargetType.TEXTAREA)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);var t;e.target.type!==v.MouseTargetType.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)}},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){
var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(p.MenuId.EditorContext,this._contextKeyService),n=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var i=0,r=n;i<r.length;i++){var o=r[i][1];e.push.apply(e,o),e.push(new c.Separator)}return e.pop(),e},e.prototype._doShowContextMenu=function(e,t){var n=this;void 0===t&&(t=null);var i=this._editor.getConfiguration().contribInfo.hover;this._editor.updateOptions({hover:{enabled:!1}});var r=t;if(!r){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();var a=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),l=s.getDomNodePagePosition(this._editor.getDomNode()),u=l.left+a.left,d=l.top+a.top+a.height;r={x:u,y:d}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({getAnchor:function(){return r},getActions:function(){return o.TPromise.as(e)},
getActionItem:function(e){var t=n._keybindingFor(e);if(t)return new c.ActionItem(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});var i=e;return"function"==typeof i.getActionItem?i.getActionItem():new c.ActionItem(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:function(e){return n._keybindingFor(e)},onHide:function(e){n._contextMenuIsBeingShownCount--,n._editor.focus(),n._editor.updateOptions({hover:i})}})},e.prototype._keybindingFor=function(e){return this._keybindingService.lookupKeybinding(e.id)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose=r.dispose(this._toDispose)},e.ID="editor.contrib.contextmenu",e=a([l(1,u.IContextMenuService),l(2,u.IContextViewService),l(3,h.IContextKeyService),l(4,d.IKeybindingService),l(5,p.IMenuService)],e)}();t.ContextMenuController=m;var y=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:i.localize(0,null),
alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:f.EditorContextKeys.textInputFocus,primary:1092}})||this}return n(t,e),t.prototype.run=function(e,t){m.get(t).showContextMenu()},t}(g.EditorAction);g.registerEditorContribution(m),g.registerEditorAction(y)}),define(e[939],t([1,0,1306,32,5,55]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0},e}(),c=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._isCursorUndo=!1,n._undoStack=[],n._prevState=n._readState(),n._register(t.onDidChangeModel(function(e){n._undoStack=[],n._prevState=null})),n._register(t.onDidChangeModelContent(function(e){n._undoStack=[],n._prevState=null})),n._register(t.onDidChangeCursorSelection(function(e){
!n._isCursorUndo&&n._prevState&&(n._undoStack.push(n._prevState),n._undoStack.length>50&&n._undoStack.shift()),n._prevState=n._readState()})),n}return n(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new a(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new a(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(o.Disposable);t.CursorUndoController=c;var l=function(e){function t(){return e.call(this,{id:"cursorUndo",label:i.localize(0,null),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2099}})||this}return n(t,e),t.prototype.run=function(e,t,n){
c.get(t).cursorUndo()},t}(r.EditorAction);t.CursorUndo=l,r.registerEditorContribution(c),r.registerEditorAction(l)}),define(e[940],t([1,0,5,11,45,32,39,19,60,1119,66,1246]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";function d(e){return i.isMacintosh?e.altKey:e.ctrlKey}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e){var t=this;this._editor=e,this._toUnhook=[],this._toUnhook.push(this._editor.onMouseDown(function(e){return t._onEditorMouseDown(e)})),this._toUnhook.push(this._editor.onMouseUp(function(e){return t._onEditorMouseUp(e)})),this._toUnhook.push(this._editor.onMouseDrag(function(e){return t._onEditorMouseDrag(e)})),this._toUnhook.push(this._editor.onMouseDrop(function(e){return t._onEditorMouseDrop(e)})),this._toUnhook.push(this._editor.onKeyDown(function(e){return t.onEditorKeyDown(e)})),this._toUnhook.push(this._editor.onKeyUp(function(e){return t.onEditorKeyUp(e)})),this._dndDecorationIds=[],this._mouseDown=!1,this._modiferPressed=!1,this._dragSelection=null}
return e.get=function(t){return t.getContribution(e.ID)},e.prototype.onEditorKeyDown=function(e){this._editor.getConfiguration().dragAndDrop&&(d(e)&&(this._modiferPressed=!0),this._mouseDown&&d(e)&&this._editor.updateOptions({mouseStyle:"copy"}))},e.prototype.onEditorKeyUp=function(t){this._editor.getConfiguration().dragAndDrop&&(d(t)&&(this._modiferPressed=!1),this._mouseDown&&t.keyCode===e.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))},e.prototype._onEditorMouseDown=function(e){this._mouseDown=!0},e.prototype._onEditorMouseUp=function(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})},e.prototype._onEditorMouseDrag=function(e){var t=e.target;if(null===this._dragSelection){var n=this._editor.getSelections().filter(function(e){return e.containsPosition(t.position)});if(1!==n.length)return;this._dragSelection=n[0]}d(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),
this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position)},e.prototype._onEditorMouseDrop=function(t){if(t.target&&(this._hitContent(t.target)||this._hitMargin(t.target))&&t.target.position){var n=new s.Position(t.target.position.lineNumber,t.target.position.column);if(null===this._dragSelection)if(t.event.shiftKey){var i=this._editor.getSelection(),r=i.startLineNumber,o=i.startColumn;this._editor.setSelections([new c.Selection(r,o,n.lineNumber,n.column)])}else{var a=this._editor.getSelections().map(function(e){return e.containsPosition(n)?new c.Selection(n.lineNumber,n.column,n.lineNumber,n.column):e});this._editor.setSelections(a)}else(!this._dragSelection.containsPosition(n)||(d(t.event)||this._modiferPressed)&&(this._dragSelection.getEndPosition().equals(n)||this._dragSelection.getStartPosition().equals(n)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(e.ID,new l.DragAndDropCommand(this._dragSelection,n,d(t.event)||this._modiferPressed)),
this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1},e.prototype.showAt=function(t){var n=[{range:new a.Range(t.lineNumber,t.column,t.lineNumber,t.column),options:e._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,n),this._editor.revealPosition(t,1)},e.prototype._removeDecoration=function(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])},e.prototype._hitContent=function(e){return e.type===r.MouseTargetType.CONTENT_TEXT||e.type===r.MouseTargetType.CONTENT_EMPTY},e.prototype._hitMargin=function(e){return e.type===r.MouseTargetType.GUTTER_GLYPH_MARGIN||e.type===r.MouseTargetType.GUTTER_LINE_NUMBERS||e.type===r.MouseTargetType.GUTTER_LINE_DECORATIONS},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modiferPressed=!1,
this._toUnhook=n.dispose(this._toUnhook)},e.ID="editor.contrib.dragAndDrop",e.TRIGGER_KEY_VALUE=i.isMacintosh?6:5,e._DECORATION_OPTIONS=u.ModelDecorationOptions.register({className:"dnd-target"}),e}();t.DragAndDropController=h,o.registerEditorContribution(h)}),define(e[559],t([1,0,1311,30,14,18,73,5,32,45,1125,840,55,1126,114,841,44,500,1129,800]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b){"use strict";function S(e){if(!r.isUndefined(e)){if(!r.isObject(e))return!1;var t=e;if(!r.isUndefined(t.levels)&&!r.isNumber(t.levels))return!1;if(!r.isUndefined(t.direction)&&!r.isString(t.direction))return!1;if(!(r.isUndefined(t.selectionLines)||r.isArray(t.selectionLines)&&t.selectionLines.every(r.isNumber)))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.ID="editor.contrib.folding";var _=function(){function e(e){var t=this;this.editor=e,this._isEnabled=this.editor.getConfiguration().contribInfo.folding,
this._autoHideFoldingControls="mouseover"===this.editor.getConfiguration().contribInfo.showFoldingControls,this._useFoldingProviders="indentation"!==this.editor.getConfiguration().contribInfo.foldingStrategy,this.globalToDispose=[],this.localToDispose=[],this.foldingDecorationProvider=new h.FoldingDecorationProvider(e),this.foldingDecorationProvider.autoHideFoldingControls=this._autoHideFoldingControls,this.globalToDispose.push(this.editor.onDidChangeModel(function(){return t.onModelChanged()})),this.globalToDispose.push(m.FoldingRangeProviderRegistry.onDidChange(function(){return t.onFoldingStrategyChanged()})),this.globalToDispose.push(this.editor.onDidChangeConfiguration(function(e){if(e.contribInfo){var n=t._isEnabled;t._isEnabled=t.editor.getConfiguration().contribInfo.folding,n!==t._isEnabled&&t.onModelChanged();var i=t._autoHideFoldingControls;t._autoHideFoldingControls="mouseover"===t.editor.getConfiguration().contribInfo.showFoldingControls,
i!==t._autoHideFoldingControls&&(t.foldingDecorationProvider.autoHideFoldingControls=t._autoHideFoldingControls,t.onModelContentChanged());var r=t._useFoldingProviders;t._useFoldingProviders="indentation"!==t.editor.getConfiguration().contribInfo.foldingStrategy,r!==t._useFoldingProviders&&t.onFoldingStrategyChanged()}})),this.globalToDispose.push({dispose:function(){return c.dispose(t.localToDispose)}}),this.onModelChanged()}return e.get=function(e){return e.getContribution(t.ID)},e.prototype.getId=function(){return t.ID},e.prototype.dispose=function(){this.globalToDispose=c.dispose(this.globalToDispose)},e.prototype.saveViewState=function(){var e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){var t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n}}},
e.prototype.restoreViewState=function(e){var t=this.editor.getModel();t&&this._isEnabled&&!t.isTooLargeForTokenization()&&e&&e.collapsedRegions&&e.lineCount===t.getLineCount()&&(e.provider!==y.ID_SYNTAX_PROVIDER&&e.provider!==b.ID_INIT_PROVIDER||(this.foldingStateMemento=e),this.hiddenRangeModel.applyMemento(e.collapsedRegions)&&this.getFoldingModel().then(function(t){t&&t.applyMemento(e.collapsedRegions)}))},e.prototype.onModelChanged=function(){var e=this;this.localToDispose=c.dispose(this.localToDispose);var t=this.editor.getModel();this._isEnabled&&t&&!t.isTooLargeForTokenization()&&(this.foldingModel=new d.FoldingModel(t,this.foldingDecorationProvider),this.localToDispose.push(this.foldingModel),this.hiddenRangeModel=new f.HiddenRangeModel(this.foldingModel),this.localToDispose.push(this.hiddenRangeModel),this.localToDispose.push(this.hiddenRangeModel.onDidChange(function(t){return e.onHiddenRangesChanges(t)})),this.updateScheduler=new s.Delayer(200),
this.cursorChangedScheduler=new s.RunOnceScheduler(function(){return e.revealCursor()},200),this.localToDispose.push(this.cursorChangedScheduler),this.localToDispose.push(this.editor.onDidChangeModelLanguageConfiguration(function(t){return e.onModelContentChanged()})),this.localToDispose.push(this.editor.onDidChangeModelContent(function(t){return e.onModelContentChanged()})),this.localToDispose.push(this.editor.onDidChangeCursorPosition(function(t){return e.onCursorPositionChanged()})),this.localToDispose.push(this.editor.onMouseDown(function(t){return e.onEditorMouseDown(t)})),this.localToDispose.push(this.editor.onMouseUp(function(t){return e.onEditorMouseUp(t)})),this.localToDispose.push({dispose:function(){e.foldingRegionPromise&&(e.foldingRegionPromise.cancel(),e.foldingRegionPromise=null),e.updateScheduler.cancel(),e.updateScheduler=null,e.foldingModel=null,e.foldingModelPromise=null,e.hiddenRangeModel=null,e.cursorChangedScheduler=null,e.foldingStateMemento=null,
e.rangeProvider&&e.rangeProvider.dispose(),e.rangeProvider=null}}),this.onModelContentChanged())},e.prototype.onFoldingStrategyChanged=function(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()},e.prototype.getRangeProvider=function(e){var t=this;if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new v.IndentRangeProvider(e),this._useFoldingProviders){var n=m.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);if(0===n.length&&this.foldingStateMemento)return this.rangeProvider=new b.InitializingRangeProvider(e,this.foldingStateMemento.collapsedRegions,function(){t.foldingStateMemento=null,t.onFoldingStrategyChanged()},3e4),this.rangeProvider;n.length>0&&(this.rangeProvider=new y.SyntaxRangeProvider(e,n))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this
;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=s.asWinJsPromise(function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)});return t.then(function(n){if(n&&t===e.foldingRegionPromise){var i=e.editor.getSelections(),r=i?i.map(function(e){return e.startLineNumber}):[];e.foldingModel.update(n,r)}return e.foldingModel})}))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then(function(t){if(t){var n=e.editor.getSelections();if(n&&n.length>0){
for(var i=[],r=function(n){var r=n.selectionStartLineNumber;e.hiddenRangeModel.isHidden(r)&&i.push.apply(i,t.getAllRegionsAtLine(r,function(e){return e.isCollapsed&&r>e.startLineNumber}))},o=0,s=n;o<s.length;o++){r(s[o])}i.length&&(t.toggleCollapseState(i),e.reveal(n[0].getPosition()))}}})},e.prototype.onEditorMouseDown=function(e){this.mouseDownInfo=null;var t=e.target.range;if(this.hiddenRangeModel&&t&&(e.event.leftButton||e.event.middleButton)){var n=!1;switch(e.target.type){case u.MouseTargetType.GUTTER_LINE_DECORATIONS:var i=e.target.detail;if(i.offsetX-i.glyphMarginWidth-i.lineNumbersWidth-i.glyphMarginLeft<=10)return;n=!0;break;case u.MouseTargetType.CONTENT_EMPTY:if(this.hiddenRangeModel.hasRanges()){if(!e.target.detail.isAfterLines)break}return;case u.MouseTargetType.CONTENT_TEXT:if(this.hiddenRangeModel.hasRanges()){var r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}},
e.prototype.onEditorMouseUp=function(e){var t=this;if(this.mouseDownInfo){var n=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,r=e.target.range;if(r&&r.startLineNumber===n){if(i){if(e.target.type!==u.MouseTargetType.GUTTER_LINE_DECORATIONS)return}else{var o=this.editor.getModel();if(r.startColumn!==o.getLineMaxColumn(n))return}this.getFoldingModel().then(function(r){if(r){var o=r.getRegionAtLine(n);if(o&&o.startLineNumber===n){var s=o.isCollapsed;if(i||s){var a=[o];(e.event.middleButton||e.event.shiftKey)&&a.push.apply(a,r.getRegionsInside(o,function(e){return e.isCollapsed===s})),r.toggleCollapseState(a),t.reveal({lineNumber:n,column:1})}}}})}}},e.prototype.reveal=function(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)},e.MAX_FOLDING_REGIONS=5e3,e}();t.FoldingController=_;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,r=_.get(t);if(r){var o=r.getFoldingModel()
;return o?(this.reportTelemetry(e,t),o.then(function(e){e&&(i.invoke(r,e,t,n),r.reveal(t.getSelection().getStartPosition()))})):void 0}},t.prototype.getSelectedLines=function(e){var t=e.getSelections();return t?t.map(function(e){return e.startLineNumber}):[]},t.prototype.getLineNumbers=function(e,t){return e&&e.selectionLines?e.selectionLines.map(function(e){return e+1}):this.getSelectedLines(t)},t.prototype.run=function(e,t){},t}(l.EditorAction),E=function(e){function t(){return e.call(this,{id:"editor.unfold",label:i.localize(0,null),alias:"Unfold",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:3161,mac:{primary:2649}},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",
description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down\n\t\t\t\t\t\t* '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.\n\t\t\t\t\t\t",constraint:S}]}})||this}return n(t,e),t.prototype.invoke=function(e,t,n,i){var r=i&&i.levels||1,o=this.getLineNumbers(i,n);i&&"up"===i.direction?d.setCollapseStateLevelsUp(t,!1,r,o):d.setCollapseStateLevelsDown(t,!1,r,o)},t}(C),w=function(e){function t(){return e.call(this,{id:"editor.unfoldRecursively",label:i.localize(1,null),alias:"Unfold Recursively",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2137)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n,i){d.setCollapseStateLevelsDown(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))},t
}(C),I=function(e){function t(){return e.call(this,{id:"editor.fold",label:i.localize(2,null),alias:"Fold",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:3159,mac:{primary:2647}},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold. Defaults to 1\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down\n\t\t\t\t\t\t\t* '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.\n\t\t\t\t\t\t",constraint:S}]}})||this}return n(t,e),t.prototype.invoke=function(e,t,n,i){var r=i&&i.levels||1,o=this.getLineNumbers(i,n);i&&"up"===i.direction?d.setCollapseStateLevelsUp(t,!0,r,o):d.setCollapseStateLevelsDown(t,!0,r,o)},t}(C),T=function(e){function t(){return e.call(this,{id:"editor.foldRecursively",
label:i.localize(3,null),alias:"Fold Recursively",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2135)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n){var i=this.getSelectedLines(n);d.setCollapseStateLevelsDown(t,!0,Number.MAX_VALUE,i)},t}(C),x=function(e){function t(){return e.call(this,{id:"editor.foldAllBlockComments",label:i.localize(4,null),alias:"Fold All Block Comments",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2133)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n){if(t.regions.hasTypes())d.setCollapseStateForType(t,m.FoldingRangeKind.Comment.value,!0);else{var i=g.LanguageConfigurationRegistry.getComments(n.getModel().getLanguageIdentifier().id);if(i&&i.blockCommentStartToken){var r=new RegExp("^\\s*"+o.escapeRegExpCharacters(i.blockCommentStartToken));d.setCollapseStateForMatchingLines(t,r,!0)}}},t}(C),k=function(e){function t(){return e.call(this,{id:"editor.foldAllMarkerRegions",
label:i.localize(5,null),alias:"Fold All Regions",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2077)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n){if(t.regions.hasTypes())d.setCollapseStateForType(t,m.FoldingRangeKind.Region.value,!0);else{var i=g.LanguageConfigurationRegistry.getFoldingRules(n.getModel().getLanguageIdentifier().id);if(i&&i.markers&&i.markers.start){var r=new RegExp(i.markers.start);d.setCollapseStateForMatchingLines(t,r,!0)}}},t}(C),D=function(e){function t(){return e.call(this,{id:"editor.unfoldAllMarkerRegions",label:i.localize(6,null),alias:"Unfold All Regions",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2078)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n){if(t.regions.hasTypes())d.setCollapseStateForType(t,m.FoldingRangeKind.Region.value,!1);else{var i=g.LanguageConfigurationRegistry.getFoldingRules(n.getModel().getLanguageIdentifier().id)
;if(i&&i.markers&&i.markers.start){var r=new RegExp(i.markers.start);d.setCollapseStateForMatchingLines(t,r,!1)}}},t}(C),A=function(e){function t(){return e.call(this,{id:"editor.foldAll",label:i.localize(7,null),alias:"Fold All",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2069)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n){d.setCollapseStateLevelsDown(t,!0)},t}(C),L=function(e){function t(){return e.call(this,{id:"editor.unfoldAll",label:i.localize(8,null),alias:"Unfold All",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2088)}})||this}return n(t,e),t.prototype.invoke=function(e,t,n){d.setCollapseStateLevelsDown(t,!1)},t}(C),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getFoldingLevel=function(){return parseInt(this.id.substr(t.ID_PREFIX.length))},t.prototype.invoke=function(e,t,n){
d.setCollapseStateAtLevel(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))},t.ID_PREFIX="editor.foldLevel",t.ID=function(e){return t.ID_PREFIX+e},t}(C);l.registerEditorContribution(_),l.registerEditorAction(E),l.registerEditorAction(w),l.registerEditorAction(I),l.registerEditorAction(T),l.registerEditorAction(A),l.registerEditorAction(L),l.registerEditorAction(x),l.registerEditorAction(k),l.registerEditorAction(D);for(var O=1;O<=7;O++)l.registerInstantiatedEditorAction(new R({id:R.ID(O),label:i.localize(9,null,O),alias:"Fold Level "+O,precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2048|21+O)}}))}),define(e[942],t([1,0,1312,32,273]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomIn",label:i.localize(0,null),alias:"Editor Font Zoom In",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){
o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel()+1)},t}(r.EditorAction),a=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomOut",label:i.localize(1,null),alias:"Editor Font Zoom Out",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel()-1)},t}(r.EditorAction),c=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomReset",label:i.localize(2,null),alias:"Editor Font Zoom Reset",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){o.EditorZoom.setZoomLevel(0)},t}(r.EditorAction);r.registerEditorAction(s),r.registerEditorAction(a),r.registerEditorAction(c)}),define(e[379],t([1,0,9,10,20,4,19,32,44,47,18]),function(e,t,i,r,o,s,a,c,l,u,d){"use strict";function h(e,t,n){var r=l.DocumentRangeFormattingEditProviderRegistry.ordered(e);return 0===r.length?s.TPromise.wrapError(new g):d.first(r.map(function(r){return function(){return d.asWinJsPromise(function(i){
return r.provideDocumentRangeFormattingEdits(e,t,n,i)}).then(void 0,i.onUnexpectedExternalError)}}),function(e){return!o.isFalsyOrEmpty(e)})}function p(e,t){var n=l.DocumentFormattingEditProviderRegistry.ordered(e);return 0===n.length?h(e,e.getFullModelRange(),t):d.first(n.map(function(n){return function(){return d.asWinJsPromise(function(i){return n.provideDocumentFormattingEdits(e,t,i)}).then(void 0,i.onUnexpectedExternalError)}}),function(e){return!o.isFalsyOrEmpty(e)})}function f(e,t,n,r){var o=l.OnTypeFormattingEditProviderRegistry.ordered(e)[0];return o?o.autoFormatTriggerCharacters.indexOf(n)<0?s.TPromise.as(void 0):d.asWinJsPromise(function(i){return o.provideOnTypeFormattingEdits(e,t,n,r,i)}).then(function(e){return e},i.onUnexpectedExternalError):s.TPromise.as(void 0)}Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(n){var i=e.call(this)||this;return i.name=t.Name,i.message=n,i}return n(t,e),t.Name="NOPRO",t}(Error);t.NoProviderError=g,
t.getDocumentRangeFormattingEdits=h,t.getDocumentFormattingEdits=p,t.getOnTypeFormattingEdits=f,c.registerLanguageCommand("_executeFormatRangeProvider",function(e,t){var n=t.resource,o=t.range,s=t.options;if(!(n instanceof r.default&&a.Range.isIRange(o)))throw i.illegalArgument();var c=e.get(u.IModelService).getModel(n);if(!c)throw i.illegalArgument("resource");return h(c,a.Range.lift(o),s)}),c.registerLanguageCommand("_executeFormatDocumentProvider",function(e,t){var n=t.resource,o=t.options;if(!(n instanceof r.default))throw i.illegalArgument("resource");var s=e.get(u.IModelService).getModel(n);if(!s)throw i.illegalArgument("resource");return p(s,o)}),c.registerDefaultLanguageCommand("_executeFormatOnTypeProvider",function(e,t,n){var r=n.ch,o=n.options;if("string"!=typeof r)throw i.illegalArgument("ch");return f(e,t,r,o)})}),define(e[944],t([1,0,1313,20,73,5,4,15,32,44,379,507,29,71,195,241,19,128,203,55,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";function w(e){
if((e=e.filter(function(e){return e.range})).length){for(var t=e[0].range,n=1;n<e.length;n++)t=b.Range.plusRange(t,e[n].range);var r=t.startLineNumber,o=t.endLineNumber;r===o?1===e.length?S.alert(i.localize(0,null,r)):S.alert(i.localize(1,null,e.length,r)):1===e.length?S.alert(i.localize(2,null,r,o)):S.alert(i.localize(3,null,e.length,r,o))}}Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function e(e,t){var n=this;this.editor=e,this.workerService=t,this.callOnDispose=[],this.callOnModel=[],this.callOnDispose.push(e.onDidChangeConfiguration(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModel(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModelLanguage(function(){return n.update()})),this.callOnDispose.push(h.OnTypeFormattingEditProviderRegistry.onDidChange(this.update,this))}return e.prototype.update=function(){var e=this;if(this.callOnModel=s.dispose(this.callOnModel),
this.editor.getConfiguration().contribInfo.formatOnType&&this.editor.getModel()){var t=this.editor.getModel(),n=h.OnTypeFormattingEditProviderRegistry.ordered(t)[0];if(n&&n.autoFormatTriggerCharacters){for(var i=new y.CharacterSet,r=0,o=n.autoFormatTriggerCharacters;r<o.length;r++){var a=o[r];i.add(a.charCodeAt(0))}this.callOnModel.push(this.editor.onDidType(function(t){var n=t.charCodeAt(t.length-1);i.has(n)&&e.trigger(String.fromCharCode(n))}))}}},e.prototype.trigger=function(e){var t=this;if(!(this.editor.getSelections().length>1)){var n=this.editor.getModel(),i=this.editor.getPosition(),o=!1,s=this.editor.onDidChangeModelContent(function(e){if(e.isFlush)return o=!0,void s.dispose();for(var t=0,n=e.changes.length;t<n;t++){if(e.changes[t].range.endLineNumber<=i.lineNumber)return o=!0,void s.dispose()}}),a=n.getOptions();p.getOnTypeFormattingEdits(n,i,e,{tabSize:a.tabSize,insertSpaces:a.insertSpaces}).then(function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e)}).then(function(e){s.dispose(),
o||r.isFalsyOrEmpty(e)||(f.FormattingEdit.execute(t.editor,e),w(e))},function(e){throw s.dispose(),e})}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=s.dispose(this.callOnDispose),this.callOnModel=s.dispose(this.callOnModel)},e.ID="editor.contrib.autoFormat",e=a([l(1,m.IEditorWorkerService)],e)}(),T=function(){function e(e,t){var n=this;this.editor=e,this.workerService=t,this.callOnDispose=[],this.callOnModel=[],this.callOnDispose.push(e.onDidChangeConfiguration(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModel(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModelLanguage(function(){return n.update()})),this.callOnDispose.push(h.DocumentRangeFormattingEditProviderRegistry.onDidChange(this.update,this))}return e.prototype.update=function(){var e=this;if(this.callOnModel=s.dispose(this.callOnModel),this.editor.getConfiguration().contribInfo.formatOnPaste&&this.editor.getModel()){
var t=this.editor.getModel(),n=h.DocumentRangeFormattingEditProviderRegistry.ordered(t)[0];n&&n.provideDocumentRangeFormattingEdits&&this.callOnModel.push(this.editor.onDidPaste(function(t){e.trigger(t)}))}},e.prototype.trigger=function(e){var t=this;if(!(this.editor.getSelections().length>1)){var n=this.editor.getModel(),i=n.getOptions(),o=i.tabSize,s=i.insertSpaces,a=new _.EditorState(this.editor,5);p.getDocumentRangeFormattingEdits(n,e,{tabSize:o,insertSpaces:s}).then(function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e)}).then(function(e){a.validate(t.editor)&&!r.isFalsyOrEmpty(e)&&(f.FormattingEdit.execute(t.editor,e),w(e))})}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=s.dispose(this.callOnDispose),this.callOnModel=s.dispose(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=a([l(1,m.IEditorWorkerService)],e)}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e,t){
var n=this,i=e.get(m.IEditorWorkerService),o=e.get(E.INotificationService),s=this._getFormattingEdits(t);if(!s)return c.TPromise.as(void 0);var a=new _.EditorState(t,5);return s.then(function(e){return i.computeMoreMinimalEdits(t.getModel().uri,e)}).then(function(e){a.validate(t)&&!r.isFalsyOrEmpty(e)&&(f.FormattingEdit.execute(t,e),w(e),t.focus())},function(e){if(!(e instanceof Error&&e.name===p.NoProviderError.Name))throw e;n._notifyNoProviderError(o,t.getModel().getLanguageIdentifier().language)})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.localize(4,null,t))},t}(d.EditorAction);t.AbstractFormatAction=x;var k=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:i.localize(5,null),alias:"Format Document",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111}},menuOpts:{when:C.EditorContextKeys.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return n(t,e),
t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,r=n.insertSpaces;return p.getDocumentFormattingEdits(t,{tabSize:i,insertSpaces:r})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.localize(6,null,t))},t}(x);t.FormatDocumentAction=k;var D=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:i.localize(7,null),alias:"Format Code",precondition:u.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasNonEmptySelection),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:o.KeyChord(2089,2084)},menuOpts:{when:u.ContextKeyExpr.and(C.EditorContextKeys.hasDocumentSelectionFormattingProvider,C.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return n(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,r=n.insertSpaces;return p.getDocumentRangeFormattingEdits(t,e.getSelection(),{tabSize:i,insertSpaces:r})},
t.prototype._notifyNoProviderError=function(e,t){e.info(i.localize(8,null,t))},t}(x);t.FormatSelectionAction=D,d.registerEditorContribution(I),d.registerEditorContribution(T),d.registerEditorAction(k),d.registerEditorAction(D),g.CommandsRegistry.registerCommand("editor.action.format",function(e){var t=e.get(v.ICodeEditorService).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return n(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=e.getSelection(),i=t.getOptions(),r=i.tabSize,o=i.insertSpaces;return n.isEmpty()?p.getDocumentFormattingEdits(t,{tabSize:r,insertSpaces:o}):p.getDocumentRangeFormattingEdits(t,n,{tabSize:r,insertSpaces:o})},t}(x))).run(e,t)})}),define(e[561],t([1,0,9,4,32,44,18,20]),function(e,t,n,i,r,o,s,a){"use strict";function c(e,t,r,o){var c=r.ordered(e).map(function(i){return s.asWinJsPromise(function(n){return o(i,e,t,n)}).then(void 0,function(e){return n.onUnexpectedExternalError(e),null})})
;return i.TPromise.join(c).then(a.flatten).then(function(e){return e.filter(function(e){return!!e})})}function l(e,t){return c(e,t,o.DefinitionProviderRegistry,function(e,t,n,i){return e.provideDefinition(t,n,i)})}function u(e,t){return c(e,t,o.ImplementationProviderRegistry,function(e,t,n,i){return e.provideImplementation(t,n,i)})}function d(e,t){return c(e,t,o.TypeDefinitionProviderRegistry,function(e,t,n,i){return e.provideTypeDefinition(t,n,i)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getDefinitionsAtPosition=l,t.getImplementationsAtPosition=u,t.getTypeDefinitionsAtPosition=d,r.registerDefaultLanguageCommand("_executeDefinitionProvider",l),r.registerDefaultLanguageCommand("_executeImplementationProvider",u),r.registerDefaultLanguageCommand("_executeTypeDefinitionProvider",d)}),define(e[382],t([1,0,20,9,4,32,44,18]),function(e,t,n,i,r,o,s,a){"use strict";function c(e,t){var o=[],c=s.HoverProviderRegistry.ordered(e).map(function(n,r){return a.asWinJsPromise(function(i){
return n.provideHover(e,t,i)}).then(function(e){if(e){var t=void 0!==e.range,n=void 0!==e.contents&&e.contents&&e.contents.length>0;t&&n&&(o[r]=e)}},function(e){i.onUnexpectedExternalError(e)})});return r.TPromise.join(c).then(function(){return n.coalesce(o)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getHover=c,o.registerDefaultLanguageCommand("_executeHoverProvider",c)}),define(e[947],t([1,0,1337,5,4,14,55,32,64,47,19,60,105,66,114,371,530]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m){"use strict";function y(e,t,n){n=n||1;for(var i=v.ShiftCommand.shiftIndentCount(t,t.length+n,e),r="",o=0;o<i;o++)r+="\t";return r}function b(e,t,n){n=n||1;for(var i=v.ShiftCommand.unshiftIndentCount(t,t.length+n,e),r="",o=0;o<i;o++)r+="\t";return r}function S(e,t,n,i){if(1!==e.getLineCount()||1!==e.getLineMaxColumn(1)){var r=g.LanguageConfigurationRegistry.getIndentationRules(e.getLanguageIdentifier().id);if(r){for(n=Math.min(n,e.getLineCount());t<=n&&r.unIndentedLinePattern;){_=e.getLineContent(t)
;if(!r.unIndentedLinePattern.test(_))break;t++}if(!(t>n-1)){var o,a=e.getOptions(),c=a.tabSize,l=a.insertSpaces,u=[],d=e.getLineContent(t),v=d;if(void 0!==i&&null!==i){o=i;C=s.getLeadingWhitespace(d);v=o+d.substring(C.length),r.decreaseIndentPattern&&r.decreaseIndentPattern.test(v)&&(v=(o=b(c,o))+d.substring(C.length)),d!==v&&u.push(p.EditOperation.replace(new h.Selection(t,1,t,C.length+1),f.TextModel.normalizeIndentation(o,c,l)))}else o=s.getLeadingWhitespace(d);var m=o;r.increaseIndentPattern&&r.increaseIndentPattern.test(v)?(m=y(c,m),o=y(c,o)):r.indentNextLinePattern&&r.indentNextLinePattern.test(v)&&(m=y(c,m));for(var S=++t;S<=n;S++){var _=e.getLineContent(S),C=s.getLeadingWhitespace(_),E=m+_.substring(C.length);r.decreaseIndentPattern&&r.decreaseIndentPattern.test(E)&&(m=b(c,m),o=b(c,o)),C!==m&&u.push(p.EditOperation.replace(new h.Selection(S,1,S,C.length+1),f.TextModel.normalizeIndentation(m,c,l))),
r.unIndentedLinePattern&&r.unIndentedLinePattern.test(_)||(m=r.increaseIndentPattern&&r.increaseIndentPattern.test(E)?o=y(c,o):r.indentNextLinePattern&&r.indentNextLinePattern.test(E)?y(c,m):o)}return u}}}}function _(e,t,n,i){if(1!==e.getLineCount()||1!==e.getLineMaxColumn(1)){for(var r="",o=0;o<n;o++)r+=" ";for(var s=new RegExp(r,"gi"),a=1,c=e.getLineCount();a<=c;a++){var l=e.getLineFirstNonWhitespaceColumn(a);if(0===l&&(l=e.getLineMaxColumn(a)),1!==l){var u=new d.Range(a,1,a,l),h=e.getValueInRange(u),p=i?h.replace(/\t/gi,r):h.replace(s,"\t");t.addEditOperation(u,p)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.shiftIndent=y,t.unshiftIndent=b,t.getReindentEditOperations=S;var C=function(e){function t(){return e.call(this,{id:t.ID,label:i.localize(0,null),alias:"Convert Indentation to Spaces",precondition:a.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){var i=n.getOptions(),r=new R(t.getSelection(),i.tabSize);t.pushUndoStop(),
t.executeCommands(this.id,[r]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}},t.ID="editor.action.indentationToSpaces",t}(c.EditorAction);t.IndentationToSpacesAction=C;var E=function(e){function t(){return e.call(this,{id:t.ID,label:i.localize(1,null),alias:"Convert Indentation to Tabs",precondition:a.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){var i=n.getOptions(),r=new O(t.getSelection(),i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}},t.ID="editor.action.indentationToTabs",t}(c.EditorAction);t.IndentationToTabsAction=E;var w=function(e){function t(t,n){var i=e.call(this,n)||this;return i.insertSpaces=t,i}return n(t,e),t.prototype.run=function(e,t){var n=this,r=e.get(l.IQuickOpenService),s=e.get(u.IModelService),a=t.getModel();if(a){var c=s.getCreationOptions(a.getLanguageIdentifier().language,a.uri,a.isForSimpleWidget),d=[1,2,3,4,5,6,7,8].map(function(e){return{id:e.toString(),
label:e.toString(),description:e===c.tabSize?i.localize(2,null):null}}),h=Math.min(a.getOptions().tabSize-1,7);return o.TPromise.timeout(50).then(function(){return r.pick(d,{placeHolder:i.localize(3,null),autoFocus:{autoFocusIndex:h}}).then(function(e){e&&a.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:n.insertSpaces})})})}},t}(c.EditorAction);t.ChangeIndentationSizeAction=w;var I=function(e){function t(){return e.call(this,!1,{id:t.ID,label:i.localize(4,null),alias:"Indent Using Tabs",precondition:null})||this}return n(t,e),t.ID="editor.action.indentUsingTabs",t}(w);t.IndentUsingTabs=I;var T=function(e){function t(){return e.call(this,!0,{id:t.ID,label:i.localize(5,null),alias:"Indent Using Spaces",precondition:null})||this}return n(t,e),t.ID="editor.action.indentUsingSpaces",t}(w);t.IndentUsingSpaces=T;var x=function(e){function t(){return e.call(this,{id:t.ID,label:i.localize(6,null),alias:"Detect Indentation from Content",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){
var n=e.get(u.IModelService),i=t.getModel();if(i){var r=n.getCreationOptions(i.getLanguageIdentifier().language,i.uri,i.isForSimpleWidget);i.detectIndentation(r.insertSpaces,r.tabSize)}},t.ID="editor.action.detectIndentation",t}(c.EditorAction);t.DetectIndentation=x;var k=function(e){function t(){return e.call(this,{id:"editor.action.reindentlines",label:i.localize(7,null),alias:"Reindent Lines",precondition:a.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){var i=S(n,1,n.getLineCount());i&&(t.pushUndoStop(),t.executeEdits(this.id,i),t.pushUndoStop())}},t}(c.EditorAction);t.ReindentLinesAction=k;var D=function(e){function t(){return e.call(this,{id:"editor.action.reindentselectedlines",label:i.localize(8,null),alias:"Reindent Selected Lines",precondition:a.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){for(var i=[],r=0,o=t.getSelections();r<o.length;r++){
var s=o[r],a=s.startLineNumber,c=s.endLineNumber;if(a!==c&&1===s.endColumn&&c--,1===a){if(a===c)continue}else a--;var l=S(n,a,c)||[];i.push.apply(i,l)}i.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,i),t.pushUndoStop())}},t}(c.EditorAction);t.ReindentSelectedLinesAction=D;var A=function(){function e(e,t){this._initialSelection=t,this._edits=[];for(var n=0,i=e;n<i.length;n++){var r=i[n];r.range&&"string"==typeof r.text&&this._edits.push(r)}}return e.prototype.getEditOperations=function(e,t){for(var n=0,i=this._edits;n<i.length;n++){var r=i[n];t.addEditOperation(d.Range.lift(r.range),r.text)}var o=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(o=!0,
this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(o=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),o||(this._selectionId=t.trackSelection(this._initialSelection))},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e}();t.AutoIndentOnPasteCommand=A;var L=function(){function e(e){var t=this;this.editor=e,this.callOnDispose=[],this.callOnModel=[],this.callOnDispose.push(e.onDidChangeConfiguration(function(){return t.update()})),this.callOnDispose.push(e.onDidChangeModel(function(){return t.update()})),this.callOnDispose.push(e.onDidChangeModelLanguage(function(){return t.update()}))}return e.prototype.update=function(){var e=this;this.callOnModel=r.dispose(this.callOnModel),
this.editor.getConfiguration().autoIndent&&!this.editor.getConfiguration().contribInfo.formatOnPaste&&this.editor.getModel()&&this.callOnModel.push(this.editor.onDidPaste(function(t){e.trigger(t)}))},e.prototype.trigger=function(e){if(!(this.editor.getSelections().length>1)){var t=this.editor.getModel();if(t.isCheapToTokenize(e.getStartPosition().lineNumber)){var n=t.getOptions(),i=n.tabSize,r=n.insertSpaces;this.editor.pushUndoStop();for(var o=[],a={shiftIndent:function(e){for(var t=v.ShiftCommand.shiftIndentCount(e,e.length+1,i),n="",r=0;r<t;r++)n+="\t";return n},unshiftIndent:function(e){for(var t=v.ShiftCommand.unshiftIndentCount(e,e.length+1,i),n="",r=0;r<t;r++)n+="\t";return n}},c=e.startLineNumber;c<=e.endLineNumber&&this.shouldIgnoreLine(t,c);)c++;if(!(c>e.endLineNumber)){var l=t.getLineContent(c);if(!/\S/.test(l.substring(0,e.startColumn-1))){var u=g.LanguageConfigurationRegistry.getGoodIndentForLine(t,t.getLanguageIdentifier().id,c,a);if(null!==u){var h=s.getLeadingWhitespace(l),p=m.getSpaceCnt(u,i)
;if(p!==m.getSpaceCnt(h,i)){I=m.generateIndent(p,i,r);o.push({range:new d.Range(c,1,c,h.length+1),text:I}),l=I+l.substr(h.length)}else{var f=g.LanguageConfigurationRegistry.getIndentMetadata(t,c);if(0===f||8===f)return}}}for(var y=c;c<e.endLineNumber&&!/\S/.test(t.getLineContent(c+1));)c++;if(c!==e.endLineNumber){var b={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===y?l:t.getLineContent(e)}},S=g.LanguageConfigurationRegistry.getGoodIndentForLine(b,t.getLanguageIdentifier().id,c+1,a);if(null!==S){var _=m.getSpaceCnt(S,i),C=m.getSpaceCnt(s.getLeadingWhitespace(t.getLineContent(c+1)),i);if(_!==C)for(var E=_-C,w=c+1;w<=e.endLineNumber;w++){var I,T=t.getLineContent(w),x=s.getLeadingWhitespace(T),k=m.getSpaceCnt(x,i)+E;(I=m.generateIndent(k,i,r))!==x&&o.push({range:new d.Range(w,1,w,x.length+1),text:I})}}}
var D=new A(o,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",D),this.editor.pushUndoStop()}}}},e.prototype.shouldIgnoreLine=function(e,t){e.forceTokenization(t);var n=e.getLineFirstNonWhitespaceColumn(t);if(0===n)return!0;var i=e.getLineTokens(t);if(i.getCount()>0){var r=i.findTokenIndexAtOffset(n);if(r>=0&&1===i.getStandardTokenType(r))return!0}return!1},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=r.dispose(this.callOnDispose),this.callOnModel=r.dispose(this.callOnModel)},e.ID="editor.contrib.autoIndentOnPaste",e}();t.AutoIndentOnPaste=L;var R=function(){function e(e,t){this.selection=e,this.tabSize=t}return e.prototype.getEditOperations=function(e,t){this.selectionId=t.trackSelection(this.selection),_(e,t,this.tabSize,!0)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e}();t.IndentationToSpacesCommand=R;var O=function(){function e(e,t){this.selection=e,this.tabSize=t}
return e.prototype.getEditOperations=function(e,t){this.selectionId=t.trackSelection(this.selection),_(e,t,this.tabSize,!1)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e}();t.IndentationToTabsCommand=O,c.registerEditorContribution(L),c.registerEditorAction(C),c.registerEditorAction(E),c.registerEditorAction(I),c.registerEditorAction(T),c.registerEditorAction(x),c.registerEditorAction(k),c.registerEditorAction(D)}),define(e[384],t([1,0,1338,73,1148,105,380,55,214,19,60,39,32,1144,1146,842,360,256]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return n(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),r=0;r<i.length;r++)n.push(new f.CopyLinesCommand(i[r],this.down));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()},t}(p.EditorAction),S=function(e){function t(){return e.call(this,!1,{
id:"editor.action.copyLinesUpAction",label:i.localize(0,null),alias:"Copy Line Up",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600}}})||this}return n(t,e),t}(b),_=function(e){function t(){return e.call(this,!0,{id:"editor.action.copyLinesDownAction",label:i.localize(1,null),alias:"Copy Line Down",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602}}})||this}return n(t,e),t}(b),C=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return n(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),r=t.getConfiguration().autoIndent,o=0;o<i.length;o++)n.push(new v.MoveLinesCommand(i[o],this.down,r));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()},t}(p.EditorAction),E=function(e){function t(){return e.call(this,!1,{id:"editor.action.moveLinesUpAction",label:i.localize(2,null),alias:"Move Line Up",
precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528}}})||this}return n(t,e),t}(C),w=function(e){function t(){return e.call(this,!0,{id:"editor.action.moveLinesDownAction",label:i.localize(3,null),alias:"Move Line Down",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530}}})||this}return n(t,e),t}(C),I=function(e){function t(t,n){var i=e.call(this,n)||this;return i.descending=t,i}return n(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=0,r=n.length;i<r;i++){var s=n[i];if(!o.SortLinesCommand.canRun(t.getModel(),s,this.descending))return}for(var a=[],i=0,r=n.length;i<r;i++)a[i]=new o.SortLinesCommand(n[i],this.descending);t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()},t}(p.EditorAction);t.AbstractSortLinesAction=I;var T=function(e){function t(){return e.call(this,!1,{id:"editor.action.sortLinesAscending",label:i.localize(4,null),
alias:"Sort Lines Ascending",precondition:c.EditorContextKeys.writable})||this}return n(t,e),t}(I);t.SortLinesAscendingAction=T;var x=function(e){function t(){return e.call(this,!0,{id:"editor.action.sortLinesDescending",label:i.localize(5,null),alias:"Sort Lines Descending",precondition:c.EditorContextKeys.writable})||this}return n(t,e),t}(I);t.SortLinesDescendingAction=x;var k=function(e){function t(){return e.call(this,{id:t.ID,label:i.localize(6,null),alias:"Trim Trailing Whitespace",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:r.KeyChord(2089,2102)}})||this}return n(t,e),t.prototype.run=function(e,t,n){var i=[];"auto-save"===n.reason&&(i=t.getSelections().map(function(e){return new h.Position(e.positionLineNumber,e.positionColumn)}));var r=new a.TrimTrailingWhitespaceCommand(t.getSelection(),i);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()},t.ID="editor.action.trimTrailingWhitespace",t}(p.EditorAction)
;t.TrimTrailingWhitespaceAction=k;var D=function(e){function t(){return e.call(this,{id:"editor.action.deleteLines",label:i.localize(7,null),alias:"Delete Line",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:3113}})||this}return n(t,e),t.prototype.run=function(e,t){var n=this._getLinesToRemove(t).map(function(e){return new g.DeleteLinesCommand(e.startLineNumber,e.endLineNumber,e.positionColumn)});t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()},t.prototype._getLinesToRemove=function(e){var t=e.getSelections().map(function(e){var t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,endLineNumber:t,positionColumn:e.positionColumn}});t.sort(function(e,t){return e.startLineNumber-t.startLineNumber});for(var n=[],i=t[0],r=1;r<t.length;r++)i.endLineNumber+1===t[r].startLineNumber?i.endLineNumber=t[r].endLineNumber:(n.push(i),i=t[r]);return n.push(i),n},t
}(p.EditorAction),A=function(e){function t(){return e.call(this,{id:"editor.action.indentLines",label:i.localize(8,null),alias:"Indent Line",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2137}})||this}return n(t,e),t.prototype.run=function(e,t){t.pushUndoStop(),t.executeCommands(this.id,m.TypeOperations.indent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(p.EditorAction);t.IndentLinesAction=A;var L=function(e){function t(){return e.call(this,{id:"editor.action.outdentLines",label:i.localize(9,null),alias:"Outdent Line",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2135}})||this}return n(t,e),t.prototype.run=function(e,t){y.CoreEditingCommands.Outdent.runEditorCommand(null,t,null)},t}(p.EditorAction),R=function(e){function t(){return e.call(this,{id:"editor.action.insertLineBefore",label:i.localize(10,null),alias:"Insert Line Above",
precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:3075}})||this}return n(t,e),t.prototype.run=function(e,t){t.pushUndoStop(),t.executeCommands(this.id,m.TypeOperations.lineInsertBefore(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(p.EditorAction);t.InsertLineBeforeAction=R;var O=function(e){function t(){return e.call(this,{id:"editor.action.insertLineAfter",label:i.localize(11,null),alias:"Insert Line Below",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2051}})||this}return n(t,e),t.prototype.run=function(e,t){t.pushUndoStop(),t.executeCommands(this.id,m.TypeOperations.lineInsertAfter(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(p.EditorAction);t.InsertLineAfterAction=O;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e,t){
for(var n=t.getSelection(),i=this._getRangesToDelete(t),r=[],o=0,a=i.length-1;o<a;o++){var c=i[o],l=i[o+1];null===u.Range.intersectRanges(c,l)?r.push(c):i[o+1]=u.Range.plusRange(c,l)}r.push(i[i.length-1]);var d=this._getEndCursorState(n,r),h=r.map(function(e){return s.EditOperation.replace(e,"")});t.pushUndoStop(),t.executeEdits(this.id,h,d),t.pushUndoStop()},t}(p.EditorAction);t.AbstractDeleteAllToBoundaryAction=M;var P=function(e){function t(){return e.call(this,{id:"deleteAllLeft",label:i.localize(12,null),alias:"Delete All Left",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:null,mac:{primary:2049}}})||this}return n(t,e),t.prototype._getEndCursorState=function(e,t){var n,i=[],r=0;return t.forEach(function(t){var o;if(1===t.endColumn&&r>0){var s=t.startLineNumber-r;o=new d.Selection(s,t.startColumn,s,t.startColumn)}else o=new d.Selection(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);r+=t.endLineNumber-t.startLineNumber,
t.intersectRanges(e)?n=o:i.push(o)}),n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),n=e.getModel();return t.sort(u.Range.compareRangesUsingStarts),t=t.map(function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new u.Range(t,i,e.startLineNumber,1)}return new u.Range(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e})},t}(M);t.DeleteAllLeftAction=P;var N=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:i.localize(13,null),alias:"Delete All Right",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]}}})||this}return n(t,e),t.prototype._getEndCursorState=function(e,t){for(var n,i=[],r=0,o=t.length;r<o;r++){var s=t[r],a=new d.Selection(s.startLineNumber-0,s.startColumn,s.startLineNumber-0,s.startColumn);s.intersectRanges(e)?n=a:i.push(a)}return n&&i.unshift(n),i},
t.prototype._getRangesToDelete=function(e){var t=e.getModel(),n=e.getSelections().map(function(e){if(e.isEmpty()){var n=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===n?new u.Range(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new u.Range(e.startLineNumber,e.startColumn,e.startLineNumber,n)}return e});return n.sort(u.Range.compareRangesUsingStarts),n},t}(M);t.DeleteAllRightAction=N;var F=function(e){function t(){return e.call(this,{id:"editor.action.joinLines",label:i.localize(14,null),alias:"Join Lines",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296}}})||this}return n(t,e),t.prototype.run=function(e,t){var n=t.getSelections(),i=t.getSelection();n.sort(u.Range.compareRangesUsingStarts);var r=[],o=n.reduce(function(e,t){return e.isEmpty()?e.endLineNumber===t.startLineNumber?(i.equalsSelection(e)&&(i=t),t):t.startLineNumber>e.endLineNumber+1?(r.push(e),
t):new d.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(r.push(e),t):new d.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)});r.push(o);for(var a=t.getModel(),c=[],l=[],h=i,p=0,f=0,g=r.length;f<g;f++){var v=r[f],m=v.startLineNumber,y=0,b=void 0,S=void 0,_=a.getLineContent(v.endLineNumber).length-v.endColumn;if(v.isEmpty()||v.startLineNumber===v.endLineNumber){var C=v.getStartPosition();C.lineNumber<a.getLineCount()?(b=m+1,S=a.getLineMaxColumn(b)):(b=C.lineNumber,S=a.getLineMaxColumn(C.lineNumber))}else b=v.endLineNumber,S=a.getLineMaxColumn(b);for(var E=a.getLineContent(m),w=m+1;w<=b;w++){var I=a.getLineContent(w),T=a.getLineFirstNonWhitespaceColumn(w);if(T>=1){var x=!0;""===E&&(x=!1),!x||" "!==E.charAt(E.length-1)&&"\t"!==E.charAt(E.length-1)||(x=!1,E=E.replace(/[\s\uFEFF\xA0]+$/g," "));var k=I.substr(T-1);E+=(x?" ":"")+k,y=x?k.length+1:k.length}else y=0}var D=new u.Range(m,1,b,S);if(!D.isEmpty()){var A=void 0
;v.isEmpty()?(c.push(s.EditOperation.replace(D,E)),A=new d.Selection(D.startLineNumber-p,E.length-y+1,m-p,E.length-y+1)):v.startLineNumber===v.endLineNumber?(c.push(s.EditOperation.replace(D,E)),A=new d.Selection(v.startLineNumber-p,v.startColumn,v.endLineNumber-p,v.endColumn)):(c.push(s.EditOperation.replace(D,E)),A=new d.Selection(v.startLineNumber-p,v.startColumn,v.startLineNumber-p,E.length-_)),null!==u.Range.intersectRanges(D,i)?h=A:l.push(A)}p+=D.endLineNumber-D.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,c,l),t.pushUndoStop()},t}(p.EditorAction);t.JoinLinesAction=F;var W=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:i.localize(15,null),alias:"Transpose characters around the cursor",precondition:c.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),r=[],o=0,s=n.length;o<s;o++){var a=n[o];if(a.isEmpty()){var c=a.getStartPosition(),h=i.getLineMaxColumn(c.lineNumber)
;if(c.column>=h){if(c.lineNumber===i.getLineCount())continue;var p=new u.Range(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),f=i.getValueInRange(p).split("").reverse().join("");r.push(new l.ReplaceCommand(new d.Selection(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),f))}else{var p=new u.Range(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),f=i.getValueInRange(p).split("").reverse().join("");r.push(new l.ReplaceCommandThatPreservesSelection(p,f,new d.Selection(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()},t}(p.EditorAction);t.TransposeAction=W;var B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),r=[],o=0,s=n.length;o<s;o++){var a=n[o];if(a.isEmpty()){var c=a.getStartPosition(),h=i.getWordAtPosition(c);if(!h)continue
;var p=new u.Range(c.lineNumber,h.startColumn,c.lineNumber,h.endColumn),f=i.getValueInRange(p);r.push(new l.ReplaceCommandThatPreservesSelection(p,this._modifyText(f),new d.Selection(c.lineNumber,c.column,c.lineNumber,c.column)))}else{f=i.getValueInRange(a);r.push(new l.ReplaceCommandThatPreservesSelection(a,this._modifyText(f),a))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()},t}(p.EditorAction);t.AbstractCaseAction=B;var V=function(e){function t(){return e.call(this,{id:"editor.action.transformToUppercase",label:i.localize(16,null),alias:"Transform to Uppercase",precondition:c.EditorContextKeys.writable})||this}return n(t,e),t.prototype._modifyText=function(e){return e.toLocaleUpperCase()},t}(B);t.UpperCaseAction=V;var z=function(e){function t(){return e.call(this,{id:"editor.action.transformToLowercase",label:i.localize(17,null),alias:"Transform to Lowercase",precondition:c.EditorContextKeys.writable})||this}return n(t,e),t.prototype._modifyText=function(e){return e.toLocaleLowerCase()},t
}(B);t.LowerCaseAction=z,p.registerEditorAction(S),p.registerEditorAction(_),p.registerEditorAction(E),p.registerEditorAction(w),p.registerEditorAction(T),p.registerEditorAction(x),p.registerEditorAction(k),p.registerEditorAction(D),p.registerEditorAction(A),p.registerEditorAction(L),p.registerEditorAction(R),p.registerEditorAction(O),p.registerEditorAction(P),p.registerEditorAction(N),p.registerEditorAction(F),p.registerEditorAction(W),p.registerEditorAction(V),p.registerEditorAction(z)}),define(e[386],t([1,0,18,9,32,44,15]),function(e,t,n,i,r,o,s){"use strict";function a(e,t){var r=o.SignatureHelpProviderRegistry.ordered(e);return n.first(r.map(function(r){return function(){return n.asWinJsPromise(function(n){return r.provideSignatureHelp(e,t,n)}).then(void 0,i.onUnexpectedExternalError)}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.Context={Visible:new s.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new s.RawContextKey("parameterHintsMultipleSignatures",!1)},
t.provideSignatureHelp=a,r.registerDefaultLanguageCommand("_executeSignatureHelpProvider",a)}),define(e[950],t([1,0,9,10,4,19,32,44,47,18]),function(e,t,n,i,r,o,s,a,c,l){"use strict";function u(e){var t=[],i=a.DocumentSymbolProviderRegistry.all(e).map(function(i){return l.asWinJsPromise(function(t){return i.provideDocumentSymbols(e,t)}).then(function(e){Array.isArray(e)&&t.push.apply(t,e)},function(e){n.onUnexpectedExternalError(e)})});return r.TPromise.join(i).then(function(){var e=[];return h(e,t,""),e.sort(d),e})}function d(e,t){return o.Range.compareRangesUsingStarts(e.range,t.range)}function h(e,t,n){for(var i=0,r=t;i<r.length;i++){var o=r[i];e.push({kind:o.kind,name:o.name,detail:o.detail,containerName:o.containerName||n,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&h(e,o.children,o.name)}}Object.defineProperty(t,"__esModule",{value:!0}),t.getDocumentSymbols=u,s.registerLanguageCommand("_executeDocumentSymbolProvider",function(e,t){var r=t.resource
;if(!(r instanceof i.default))throw n.illegalArgument("resource");var o=e.get(c.IModelService).getModel(r);if(!o)throw n.illegalArgument("resource");return u(o)})}),define(e[951],t([1,0,1375,20,4,6,19,55,32,843]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){return function(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()}}(),f=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(h.TokenSelectionSupport),this._state=null,this._ignoreSelection=!1}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(e){var t=this,n=this.editor.getSelection(),i=this.editor.getModel();this._state&&this._state.editor!==this.editor&&(this._state=null);var s=o.TPromise.as(null);return this._state||(s=this._tokenSelectionSupport.getRangesToPosition(i.uri,n.getStartPosition()).then(function(e){
if(!r.isFalsyOrEmpty(e)){var n;e.filter(function(e){var n=t.editor.getSelection(),i=new c.Range(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return i.containsPosition(n.getStartPosition())&&i.containsPosition(n.getEndPosition())}).forEach(function(e){var i=e.range,r=new p(t.editor);r.selection=new c.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn),n&&(r.next=n,n.previous=r),n=r});var i=new p(t.editor);i.next=n,n&&(n.previous=i),t._state=i;var o=t.editor.onDidChangeCursorPosition(function(e){t._ignoreSelection||(t._state=null,o.dispose())})}})),s.then(function(){if(t._state&&(t._state=e?t._state.next:t._state.previous,t._state)){t._ignoreSelection=!0;try{t.editor.setSelection(t._state.selection)}finally{t._ignoreSelection=!1}}})},e.ID="editor.contrib.smartSelectController",e=a([l(1,s.IInstantiationService)],e)}(),g=function(e){function t(t,n){var i=e.call(this,n)||this;return i._forward=t,i}return n(t,e),t.prototype.run=function(e,t){var n=f.get(t)
;if(n)return n.run(this._forward)},t}(d.EditorAction),v=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:i.localize(0,null),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345}}})||this}return n(t,e),t}(g),m=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:i.localize(1,null),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343}}})||this}return n(t,e),t}(g);d.registerEditorContribution(f),d.registerEditorAction(v),d.registerEditorAction(m)}),define(e[168],t([1,0,18,20,14,24,9,4,32,44,15]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";function d(e,t,r,c,u){void 0===r&&(r="bottom");var d=[],h=function(e){return"none"===e?function(e){return"snippet"!==e.type}:function(){return!0}}(r);t=t.clone();var p=l.SuggestRegistry.orderedGroups(e);"none"!==r&&v&&p.unshift([v]);var f=u||{
triggerKind:l.SuggestTriggerKind.Invoke},m=!1,y=p.map(function(r){return function(){return a.TPromise.join(r.map(function(r){if(i.isFalsyOrEmpty(c)||!(c.indexOf(r)<0))return n.asWinJsPromise(function(n){return r.provideCompletionItems(e,t,f,n)}).then(function(s){var c=d.length;if(s&&!i.isFalsyOrEmpty(s.suggestions))for(var l=0,u=s.suggestions;l<u.length;l++){var p=u[l];h(p)&&(!function(e,t){"number"!=typeof e.overwriteBefore&&(e.overwriteBefore=0);("number"!=typeof e.overwriteAfter||e.overwriteAfter<0)&&(e.overwriteAfter=0)}(p),d.push({position:t,container:s,suggestion:p,support:r,resolve:function(e,t,i,r){return function(){return"function"==typeof e.resolveCompletionItem?n.asWinJsPromise(function(n){return e.resolveCompletionItem(i,r,t,n)}).then(function(e){o.assign(t,e)}):a.TPromise.as(void 0)}}(r,p,e,t)}))}c!==d.length&&r!==v&&(m=!0)},s.onUnexpectedExternalError)}))}});return n.first(y,function(){return m}).then(function(){return d.sort(g(r))})}function h(e,t){var n=0
;return"string"==typeof e.suggestion.sortText&&"string"==typeof t.suggestion.sortText&&(n=r.compareIgnoreCase(e.suggestion.sortText,t.suggestion.sortText)),0===n&&(n=r.compareIgnoreCase(e.suggestion.label,t.suggestion.label)),0===n&&e.suggestion.type!==t.suggestion.type&&("snippet"===e.suggestion.type?n=1:"snippet"===t.suggestion.type&&(n=-1)),n}function p(e,t){if(e.suggestion.type!==t.suggestion.type){if("snippet"===e.suggestion.type)return-1;if("snippet"===t.suggestion.type)return 1}return h(e,t)}function f(e,t){if(e.suggestion.type!==t.suggestion.type){if("snippet"===e.suggestion.type)return 1;if("snippet"===t.suggestion.type)return-1}return h(e,t)}function g(e){return"top"===e?p:"bottom"===e?f:h}Object.defineProperty(t,"__esModule",{value:!0}),t.Context={Visible:new u.RawContextKey("suggestWidgetVisible",!1),MultipleSuggestions:new u.RawContextKey("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new u.RawContextKey("suggestionMakesTextEdit",!0),
AcceptOnKey:new u.RawContextKey("suggestionSupportsAcceptOnKey",!0),AcceptSuggestionsOnEnter:new u.RawContextKey("acceptSuggestionOnEnter",!0)};var v;t.getSnippetSuggestSupport=function(){return v},t.setSnippetSuggestSupport=function(e){var t=v;return v=e,t},t.provideSuggestionItems=d,t.getSuggestionComparator=g,c.registerDefaultLanguageCommand("_executeCompletionItemProvider",function(e,t,n){var i={incomplete:!1,suggestions:[]},r=[],o=n.maxItemsToResolve||0;return d(e,t).then(function(e){for(var t=0,n=e;t<n.length;t++){var s=n[t];r.length<o&&r.push(s.resolve()),i.incomplete=i.incomplete||s.container.incomplete,i.suggestions.push(s.suggestion)}}).then(function(){return a.TPromise.join(r)}).then(function(){return i})});var m,y=new(function(){function e(){}return e.prototype.provideCompletionItems=function(){return m&&{suggestions:m}},e}());l.SuggestRegistry.register("*",y),t.showSimpleSuggestions=function(e,t){setTimeout(function(){m=t,e.getContribution("editor.contrib.suggestController").triggerSuggest([y]),
m=void 0},0)}}),define(e[160],t([1,0,15,32,5,846,55,168,60,14,52,77]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(t,n,i){this._editor=t,this._logService=n,this._snippetListener=[],this._inSnippet=e.InSnippetMode.bindTo(i),this._hasNextTabstop=e.HasNextTabstop.bindTo(i),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(i)}return e.get=function(e){return e.getContribution("snippetController2")},e.prototype.dispose=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),r.dispose(this._session)},e.prototype.getId=function(){return"snippetController2"},e.prototype.insert=function(e,t,n,i,r){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=!0),void 0===r&&(r=!0);try{this._doInsert(e,t,n,i,r)}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),
this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}},e.prototype._doInsert=function(e,t,n,i,s){var a=this;void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=!0),void 0===s&&(s=!0),this._snippetListener=r.dispose(this._snippetListener),i&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,n):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new o.SnippetSession(this._editor,e,t,n),this._session.insert()),s&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent(function(e){return e.isFlush&&a.cancel()}),this._editor.onDidChangeModel(function(){return a.cancel()}),this._editor.onDidChangeCursorSelection(function(){return a._updateState()})]},e.prototype._updateState=function(){if(this._session){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.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e=this._session.choice;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map(function(e){return u.Selection.fromPositions(e.getStartPosition())}));var t=e.options[0];c.showSimpleSuggestions(this._editor,e.options.map(function(e,n){return{type:"value",label:e.value,insertText:e.value,sortText:d.repeat("a",n),overwriteAfter:t.value.length}}))}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),
r.dispose(this._snippetListener),r.dispose(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.getSessionEnclosingRange=function(){if(this._session)return this._session.getEnclosingRange()},e.InSnippetMode=new n.RawContextKey("inSnippetMode",!1),e.HasNextTabstop=new n.RawContextKey("hasNextTabstop",!1),e.HasPrevTabstop=new n.RawContextKey("hasPrevTabstop",!1),e=a([l(1,p.ILogService),l(2,n.IContextKeyService)],e)}();t.SnippetController2=f,i.registerEditorContribution(f);var g=i.EditorCommand.bindToContribution(f.get);i.registerEditorCommand(new g({id:"jumpToNextSnippetPlaceholder",precondition:n.ContextKeyExpr.and(f.InSnippetMode,f.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:h.KeybindingsRegistry.WEIGHT.editorContrib(30),kbExpr:s.EditorContextKeys.editorTextFocus,primary:2}})),i.registerEditorCommand(new g({
id:"jumpToPrevSnippetPlaceholder",precondition:n.ContextKeyExpr.and(f.InSnippetMode,f.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:h.KeybindingsRegistry.WEIGHT.editorContrib(30),kbExpr:s.EditorContextKeys.editorTextFocus,primary:1026}})),i.registerEditorCommand(new g({id:"leaveSnippet",precondition:f.InSnippetMode,handler:function(e){return e.cancel()},kbOpts:{weight:h.KeybindingsRegistry.WEIGHT.editorContrib(30),kbExpr:s.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),i.registerEditorCommand(new g({id:"acceptSnippet",precondition:f.InSnippetMode,handler:function(e){return e.finish()}}))}),define(e[954],t([1,0,20,18,9,7,5,50,4,171,60,44,1153,168]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=n}
return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);var i=t.getWordAtPosition(n);return!!i&&(i.endColumn===n.column&&!!isNaN(Number(i.word)))},e}();t.LineContext=f;!function(e){e[e.Idle=0]="Idle",e[e.Manual=1]="Manual",e[e.Auto=2]="Auto"}(t.State||(t.State={}));var g=function(){function e(e){var t=this;this._toDispose=[],this._triggerRefilter=new i.TimeoutTimer,this._onDidCancel=new o.Emitter,this._onDidTrigger=new o.Emitter,this._onDidSuggest=new o.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._triggerAutoSuggestPromise=null,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new u.Selection(1,1,1,1),this._toDispose.push(this._editor.onDidChangeModel(function(){t._updateTriggerCharacters(),t.cancel()})),
this._toDispose.push(this._editor.onDidChangeModelLanguage(function(){t._updateTriggerCharacters(),t.cancel()})),this._toDispose.push(this._editor.onDidChangeConfiguration(function(){t._updateTriggerCharacters(),t._updateQuickSuggest()})),this._toDispose.push(d.SuggestRegistry.onDidChange(function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()})),this._toDispose.push(this._editor.onDidChangeCursorSelection(function(e){t._onCursorChange(e)})),this._toDispose.push(this._editor.onDidChangeModelContent(function(e){t._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){s.dispose([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerRefilter]),this._toDispose=s.dispose(this._toDispose),s.dispose(this._completionModel),this.cancel()},e.prototype._updateQuickSuggest=function(){this._quickSuggestDelay=this._editor.getConfiguration().contribInfo.quickSuggestionsDelay,
(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)},e.prototype._updateTriggerCharacters=function(){var e=this;if(s.dispose(this._triggerCharacterListener),!this._editor.getConfiguration().readOnly&&this._editor.getModel()&&this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),i=0,r=d.SuggestRegistry.all(this._editor.getModel());i<r.length;i++){var o=r[i];if(!n.isFalsyOrEmpty(o.triggerCharacters))for(var c=0,l=o.triggerCharacters;c<l.length;c++){var u=l[c],h=t[u];h||(h=t[u]=new Set).add(p.getSnippetSuggestSupport()),h.add(o)}}this._triggerCharacterListener=this._editor.onDidType(function(n){var i=n.charAt(n.length-1),r=t[i];if(r){var o=e._completionModel?e._completionModel.adopt(r):void 0;e.trigger({auto:!0,triggerCharacter:i},Boolean(e._completionModel),a.values(r),o)}})}},Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,
configurable:!0}),e.prototype.cancel=function(e){void 0===e&&(e=!1),this._triggerRefilter.cancel(),this._triggerAutoSuggestPromise&&(this._triggerAutoSuggestPromise.cancel(),this._triggerAutoSuggestPromise=null),this._requestPromise&&(this._requestPromise.cancel(),this._requestPromise=null),this._state=0,s.dispose(this._completionModel),this._completionModel=null,this._context=null,this._onDidCancel.fire({retrigger:e})},e.prototype._updateActiveSuggestSession=function(){0!==this._state&&(d.SuggestRegistry.has(this._editor.getModel())?this.trigger({auto:2===this._state},!0):this.cancel())},e.prototype._onCursorChange=function(e){var t=this,n=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==l.CursorChangeReason.NotSet||"keyboard"!==e.source&&"deleteLeft"!==e.source)0!==this._state&&this.cancel();else if(d.SuggestRegistry.has(this._editor.getModel())){
this._editor.getModel()&&0===this._state&&!1!==this._editor.getConfiguration().contribInfo.quickSuggestions&&(n.containsRange(this._currentSelection)||n.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&(this.cancel(),this._triggerAutoSuggestPromise=c.TPromise.timeout(this._quickSuggestDelay),this._triggerAutoSuggestPromise.then(function(){if(f.shouldAutoTrigger(t._editor)){var e=t._editor.getModel(),n=t._editor.getPosition();if(!e)return;var i=t._editor.getConfiguration().contribInfo.quickSuggestions;if(!1===i)return;if(!0===i);else{e.tokenizeIfCheap(n.lineNumber);var r=e.getLineTokens(n.lineNumber),o=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(!(i.other&&0===o||i.comments&&1===o||i.strings&&2===o))return}t.trigger({auto:!0})}t._triggerAutoSuggestPromise=null}))}},e.prototype._refilterCompletionItems=function(){var e=this;if(0!==this._state){var t=this._editor.getModel();t&&this._triggerRefilter.cancelAndSet(function(){
var n=e._editor.getPosition(),i=new f(t,n,2===e._state);e._onNewContext(i)},25)}},e.prototype.trigger=function(e,t,i,o){var a=this;void 0===t&&(t=!1);var c=this._editor.getModel();if(c){var l=e.auto,u=new f(c,this._editor.getPosition(),l);this.cancel(t),this._state=l?2:1,this._onDidTrigger.fire({auto:l}),this._context=u;var g;g=e.triggerCharacter?{triggerKind:d.SuggestTriggerKind.TriggerCharacter,triggerCharacter:e.triggerCharacter}:i&&i.length?{triggerKind:d.SuggestTriggerKind.TriggerForIncompleteCompletions}:{triggerKind:d.SuggestTriggerKind.Invoke},this._requestPromise=p.provideSuggestionItems(c,this._editor.getPosition(),this._editor.getConfiguration().contribInfo.snippetSuggestions,i,g).then(function(e){if(a._requestPromise=null,0!==a._state){var t=a._editor.getModel();if(t){if(!n.isFalsyOrEmpty(o)){var i=p.getSuggestionComparator(a._editor.getConfiguration().contribInfo.snippetSuggestions);e=e.concat(o).sort(i)}var r=new f(t,a._editor.getPosition(),l);s.dispose(a._completionModel),
a._completionModel=new h.CompletionModel(e,a._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:a._context?r.column-a._context.column:0},a._editor.getConfiguration().contribInfo.snippetSuggestions),a._onNewContext(r)}}}).then(null,r.onUnexpectedError)}},e.prototype._onNewContext=function(e){if(this._context)if(e.lineNumber===this._context.lineNumber){if(e.leadingWord.startColumn<this._context.leadingWord.startColumn)this.cancel();else if(e.column<this._context.column)e.leadingWord.word?this.trigger({auto:this._context.auto},!0):this.cancel();else if(this._completionModel)if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,n=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,a.values(t),n)}else{var i=this._completionModel.lineContext,r=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},
0===this._completionModel.items.length){if(f.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<e.leadingWord.startColumn)return void this.trigger({auto:this._context.auto},!0);if(this._context.auto)return void this.cancel();if(this._completionModel.lineContext=i,(r=this._completionModel.items.length>0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:r})}}else this.cancel()},e}();t.SuggestModel=g}),define(e[331],t([1,0,1390,32,260]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return e.call(this,{id:t.ID,label:i.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323}}})||this}return n(t,e),t.prototype.run=function(e,t){var n=o.TabFocus.getTabFocusMode();o.TabFocus.setTabFocusMode(!n)},t.ID="editor.action.toggleTabFocusMode",t}(r.EditorAction)
;t.ToggleTabFocusModeAction=s,r.registerEditorAction(s)}),define(e[392],t([1,0,55,60,32,39,19,355,214,239,130,171]),function(e,t,i,r,o,s,a,c,l,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n._wordNavigationType=t.wordNavigationType,n}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,r=t.getConfiguration(),o=u.getMapForWordSeparators(r.wordSeparators),a=t.getModel(),c=t.getSelections().map(function(e){var t=new s.Position(e.positionLineNumber,e.positionColumn),n=i._move(o,a,t,i._wordNavigationType);return i._moveTo(e,n,i._inSelectionMode)});if(t._getCursors().setStates("moveWordCommand",h.CursorChangeReason.NotSet,c.map(function(e){return d.CursorState.fromModelSelection(e)})),1===c.length){var l=new s.Position(c[0].positionLineNumber,c[0].positionColumn);t.revealPosition(l,0)}},t.prototype._moveTo=function(e,t,n){
return n?new r.Selection(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new r.Selection(t.lineNumber,t.column,t.lineNumber,t.column)},t}(o.EditorCommand);t.MoveWordCommand=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._move=function(e,t,n,i){return c.WordOperations.moveWordLeft(e,t,n,i)},t}(p);t.WordLeftCommand=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._move=function(e,t,n,i){return c.WordOperations.moveWordRight(e,t,n,i)},t}(p);t.WordRightCommand=g;var v=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2063,mac:{primary:527}}})||this}return n(t,e),t}(f);t.CursorWordStartLeft=v;var m=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndLeft",precondition:null})||this}
return n(t,e),t}(f);t.CursorWordEndLeft=m;var y=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordLeft",precondition:null})||this}return n(t,e),t}(f);t.CursorWordLeft=y;var b=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:3087,mac:{primary:1551}}})||this}return n(t,e),t}(f);t.CursorWordStartLeftSelect=b;var S=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndLeftSelect",precondition:null})||this}return n(t,e),t}(f);t.CursorWordEndLeftSelect=S;var _=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordLeftSelect",precondition:null})||this}return n(t,e),t}(f);t.CursorWordLeftSelect=_;var C=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:null})||this}
return n(t,e),t}(g);t.CursorWordStartRight=C;var E=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndRight",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2065,mac:{primary:529}}})||this}return n(t,e),t}(g);t.CursorWordEndRight=E;var w=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordRight",precondition:null})||this}return n(t,e),t}(g);t.CursorWordRight=w;var I=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:null})||this}return n(t,e),t}(g);t.CursorWordStartRightSelect=I;var T=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndRightSelect",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:3089,mac:{primary:1553}}})||this}return n(t,e),t}(g);t.CursorWordEndRightSelect=T;var x=function(e){function t(){return e.call(this,{
inSelectionMode:!0,wordNavigationType:1,id:"cursorWordRightSelect",precondition:null})||this}return n(t,e),t}(g);t.CursorWordRightSelect=x;var k=function(e){function t(t){var n=e.call(this,t)||this;return n._whitespaceHeuristics=t.whitespaceHeuristics,n._wordNavigationType=t.wordNavigationType,n}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,r=t.getConfiguration(),o=u.getMapForWordSeparators(r.wordSeparators),s=t.getModel(),a=t.getSelections().map(function(e){var t=i._delete(o,s,e,i._whitespaceHeuristics,i._wordNavigationType);return new l.ReplaceCommand(t,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()},t}(o.EditorCommand);t.DeleteWordCommand=k;var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._delete=function(e,t,n,i,r){var o=c.WordOperations.deleteWordLeft(e,t,n,i,r);return o||new a.Range(1,1,1,1)},t}(k);t.DeleteWordLeftCommand=D;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}
return n(t,e),t.prototype._delete=function(e,t,n,i,r){var o=c.WordOperations.deleteWordRight(e,t,n,i,r);if(o)return o;var s=t.getLineCount(),l=t.getLineMaxColumn(s);return new a.Range(s,l,s,l)},t}(k);t.DeleteWordRightCommand=A;var L=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:i.EditorContextKeys.writable})||this}return n(t,e),t}(D);t.DeleteWordStartLeft=L;var R=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndLeft",precondition:i.EditorContextKeys.writable})||this}return n(t,e),t}(D);t.DeleteWordEndLeft=R;var O=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513}}})||this}return n(t,e),t}(D);t.DeleteWordLeft=O;var M=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,
wordNavigationType:0,id:"deleteWordStartRight",precondition:i.EditorContextKeys.writable})||this}return n(t,e),t}(A);t.DeleteWordStartRight=M;var P=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndRight",precondition:i.EditorContextKeys.writable})||this}return n(t,e),t}(A);t.DeleteWordEndRight=P;var N=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordRight",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532}}})||this}return n(t,e),t}(A);t.DeleteWordRight=N,o.registerEditorCommand(new v),o.registerEditorCommand(new m),o.registerEditorCommand(new y),o.registerEditorCommand(new b),o.registerEditorCommand(new S),o.registerEditorCommand(new _),o.registerEditorCommand(new C),o.registerEditorCommand(new E),o.registerEditorCommand(new w),o.registerEditorCommand(new I),o.registerEditorCommand(new T),o.registerEditorCommand(new x),
o.registerEditorCommand(new L),o.registerEditorCommand(new R),o.registerEditorCommand(new O),o.registerEditorCommand(new M),o.registerEditorCommand(new P),o.registerEditorCommand(new N)}),define(e[957],t([1,0,55,32,19,355,392]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2561,mac:{primary:769}}})||this}return n(t,e),t.prototype._delete=function(e,t,n,i,r){var a=s.WordPartOperations.deleteWordPartLeft(e,t,n,i,r);return a||new o.Range(1,1,1,1)},t}(a.DeleteWordCommand);t.DeleteWordPartLeft=c;var l=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordPartRight",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2580,mac:{primary:788}}})||this}return n(t,e),
t.prototype._delete=function(e,t,n,i,r){var a=s.WordPartOperations.deleteWordPartRight(e,t,n,i,r);if(a)return a;var c=t.getLineCount(),l=t.getLineMaxColumn(c);return new o.Range(c,l,c,l)},t}(a.DeleteWordCommand);t.DeleteWordPartRight=l;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._move=function(e,t,n,i){return s.WordPartOperations.moveWordPartLeft(e,t,n,i)},t}(a.MoveWordCommand);t.WordPartLeftCommand=u;var d=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartStartLeft",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2575,mac:{primary:783}}})||this}return n(t,e),t}(u);t.CursorWordPartLeft=d;var h=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartStartLeftSelect",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:3599,mac:{primary:1807}}})||this}return n(t,e),t}(u);t.CursorWordPartLeftSelect=h
;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._move=function(e,t,n,i){return s.WordPartOperations.moveWordPartRight(e,t,n,i)},t}(a.MoveWordCommand);t.WordPartRightCommand=p;var f=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordPartRight",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2577,mac:{primary:785}}})||this}return n(t,e),t}(p);t.CursorWordPartRight=f;var g=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordPartRightSelect",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:3601,mac:{primary:1809}}})||this}return n(t,e),t}(p);t.CursorWordPartRightSelect=g,r.registerEditorCommand(new c),r.registerEditorCommand(new l),r.registerEditorCommand(new d),r.registerEditorCommand(new h),r.registerEditorCommand(new f),r.registerEditorCommand(new g)}),define(e[958],t([1,0,396,28,77]),function(e,t,n,i,r){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,i){this.logService=i,this.contextView=new n.ContextView(e)}return e.prototype.dispose=function(){this.contextView.dispose()},e.prototype.setContainer=function(e){this.logService.trace("ContextViewService#setContainer"),this.contextView.setContainer(e)},e.prototype.showContextView=function(e){this.logService.trace("ContextViewService#showContextView"),this.contextView.show(e)},e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.logService.trace("ContextViewService#hideContextView"),this.contextView.hide(e)},e=a([l(1,i.ITelemetryService),l(2,r.ILogService)],e)}();t.ContextViewService=o}),define(e[393],t([1,0,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.appender=e}return e.prototype.call=function(e,t){var i=t.eventName,r=t.data;return this.appender.log(i,r),n.TPromise.as(null)},e}()
;t.TelemetryAppenderChannel=i;var r=function(){function e(e){this.channel=e}return e.prototype.log=function(e,t){return this.channel.call("log",{eventName:e,data:t}).done(null,function(e){return"Failed to log telemetry: "+console.warn(e)}),n.TPromise.as(null)},e.prototype.dispose=function(){},e}();t.TelemetryAppenderClient=r}),define(e[394],t([1,0,1421,14,6,17,63,4,5,24,16]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,this._commonProperties=e.commonProperties||c.TPromise.as({}),this._piiPaths=e.piiPaths||[],this._userOptIn=void 0===e.userOptIn||e.userOptIn,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(var n=0,r=this._piiPaths;n<r.length;n++){var o=r[n];this._cleanupPatterns.push(new RegExp(i.escapeRegExpCharacters(o),"gi"))}this._configurationService&&(this._updateUserOptIn(),
this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog("optInStatus",{optIn:this._userOptIn}))}return e.prototype._updateUserOptIn=function(){var e=this._configurationService.getValue(f);this._userOptIn=e?e.enableTelemetry:this._userOptIn},Object.defineProperty(e.prototype,"isOptedIn",{get:function(){return this._userOptIn},enumerable:!0,configurable:!0}),e.prototype.getTelemetryInfo=function(){return this._commonProperties.then(function(e){return{sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"]}})},e.prototype.dispose=function(){this._disposables=u.dispose(this._disposables)},e.prototype.publicLog=function(e,t,n){var i=this;return this._userOptIn?this._commonProperties.then(function(r){t=d.mixin(t,r),t=d.cloneAndChange(t,function(e){if("string"==typeof e)return i._cleanupInfo(e,n)}),i._appender.log(e,t)},function(e){console.error(e)}):c.TPromise.as(void 0)},e.prototype._cleanupInfo=function(e,t){var n=e;if(t){
for(var i=[],r=0,o=this._cleanupPatterns;r<o.length;r++)for(h=o[r];;){var s=h.exec(e);if(!s)break;i.push([s.index,h.lastIndex])}for(var a=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,c=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,l=function(){var t=c.exec(e);if(!t)return"break";!a.test(t[0])&&i.every(function(e){var n=e[0],i=e[1];return t.index<n||t.index>=i})&&(n=n.slice(0,t.index)+t[0].replace(/./g,"a")+n.slice(c.lastIndex))};;){if("break"===l())break}}for(var u=0,d=this._cleanupPatterns;u<d.length;u++){var h=d[u];n=n.replace(h,"")}return n},e.IDLE_START_EVENT_NAME="UserIdleStart",e.IDLE_STOP_EVENT_NAME="UserIdleStop",e=a([l(1,r.optional(o.IConfigurationService))],e)}();t.TelemetryService=p;var f="telemetry";h.Registry.as(s.Extensions.Configuration).registerConfiguration({id:f,order:110,type:"object",title:n.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:n.localize(1,null),default:!0}}})}),
define(e[178],t([1,0,4,151,25,17,37]),function(e,t,n,i,r,o,s){"use strict";function a(e,t){return t.onDidChangeConfiguration(function(t){t.source!==o.ConfigurationTarget.DEFAULT&&(e.publicLog("updateConfiguration",{configurationSource:o.ConfigurationTarget[t.source],configurationKeys:function(e){if(!e)return[];var t=[];return c(t,"",e),t}(t.sourceConfig)}),e.publicLog("updateConfigurationValues",{configurationSource:o.ConfigurationTarget[t.source],configurationValues:function(e,t){if(!e)return[];return t.reduce(function(t,n){var i,r=n.split(".").reduce(function(e,t){return e&&"object"==typeof e?e[t]:void 0},e);return void 0!==r&&t.push((i={},i[n]=r,i)),t},[])}(t.sourceConfig,l)}))})}function c(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(function(i){return c(e,t?t+"."+i:i,n[i])}):e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new(function(){function e(){}return e.prototype.publicLog=function(e,t){return n.TPromise.wrap(null)},
e.prototype.getTelemetryInfo=function(){return n.TPromise.wrap({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}()),t.combinedAppender=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{log:function(t,n){return e.forEach(function(e){return e.log(t,n)})},dispose:function(){return n.TPromise.join(e.map(function(e){return e.dispose()}))}}},t.NullAppender={log:function(){return null},dispose:function(){return n.TPromise.as(null)}},t.telemetryURIDescriptor=function(e,t){var n=e&&e.fsPath;return n?{mimeType:i.guessMimeTypes(n).join(", "),ext:r.extname(n),path:t(n)}:{}}
;var l=["editor.tabCompletion","editor.fontFamily","editor.fontWeight","editor.fontSize","editor.lineHeight","editor.letterSpacing","editor.lineNumbers","editor.rulers","editor.wordSeparators","editor.tabSize","editor.insertSpaces","editor.detectIndentation","editor.roundedSelection","editor.scrollBeyondLastLine","editor.minimap.enabled","editor.minimap.side","editor.minimap.renderCharacters","editor.minimap.maxColumn","editor.find.seedSearchStringFromSelection","editor.find.autoFindInSelection","editor.wordWrap","editor.wordWrapColumn","editor.wrappingIndent","editor.mouseWheelScrollSensitivity","editor.multiCursorModifier","editor.quickSuggestions","editor.quickSuggestionsDelay","editor.parameterHints","editor.autoClosingBrackets","editor.autoIndent","editor.formatOnType","editor.formatOnPaste","editor.suggestOnTriggerCharacters","editor.acceptSuggestionOnEnter","editor.acceptSuggestionOnCommitCharacter","editor.snippetSuggestions","editor.emptySelectionClipboard","editor.wordBasedSuggestions","editor.suggestSelection","editor.suggestFontSize","editor.suggestLineHeight","editor.selectionHighlight","editor.occurrencesHighlight","editor.overviewRulerLanes","editor.overviewRulerBorder","editor.cursorBlinking","editor.cursorStyle","editor.mouseWheelZoom","editor.fontLigatures","editor.hideCursorInOverviewRuler","editor.renderWhitespace","editor.renderControlCharacters","editor.renderIndentGuides","editor.renderLineHighlight","editor.codeLens","editor.folding","editor.showFoldingControls","editor.matchBrackets","editor.glyphMargin","editor.useTabStops","editor.trimAutoWhitespace","editor.stablePeek","editor.dragAndDrop","editor.formatOnSave","editor.colorDecorators","window.zoomLevel","files.autoSave","files.hotExit","files.associations","workbench.statusBar.visible","files.trimTrailingWhitespace","git.confirmSync","workbench.sideBar.location","window.openFilesInNewWindow","javascript.validate.enable","window.restoreWindows","extensions.autoUpdate","files.eol","explorer.openEditors.visible","workbench.editor.enablePreview","files.autoSaveDelay","workbench.editor.showTabs","files.encoding","files.autoGuessEncoding","git.enabled","http.proxyStrictSSL","terminal.integrated.fontFamily","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.swipeToNavigate","php.builtInCompletions.enable","php.validate.enable","php.validate.run","workbench.welcome.enabled","workbench.startupEditor"]
;t.configurationTelemetry=a,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(function(t){t.source===s.KeybindingSource.User&&t.keybindings&&e.publicLog("updateKeybindings",{bindings:t.keybindings.map(function(e){return{key:e.key,command:e.command,when:e.when,args:!!e.args||void 0}})})})}}),define(e[962],t([1,0,8,418,43,4,71,25,29,28,6,178]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){void 0===n&&(n=p.NullTelemetryService),this._editorService=e,this._commandService=t,this._telemetryService=n}return e.prototype.open=function(e,t){var s;this._telemetryService.publicLog("openerService",{scheme:e.scheme});var a=e.scheme,l=e.path,d=e.query,h=e.fragment,p=o.TPromise.wrap(void 0);if(a===r.Schemas.http||a===r.Schemas.https||a===r.Schemas.mailto)n.windowOpenNoOpener(e.toString(!0));else if("command"===a&&u.CommandsRegistry.getCommand(l)){var f=[];try{f=i.parse(d),Array.isArray(f)||(f=[f])}catch(e){}
p=(s=this._commandService).executeCommand.apply(s,[l].concat(f))}else{var g=void 0,v=/^L?(\d+)(?:,(\d+))?/.exec(h);if(v&&(g={startLineNumber:parseInt(v[1]),startColumn:v[2]?parseInt(v[2]):1},e=e.with({fragment:""})),!e.scheme)return o.TPromise.as(void 0);e.scheme===r.Schemas.file&&(e=e.with({path:c.normalize(e.path)})),p=this._editorService.openCodeEditor({resource:e,options:{selection:g}},this._editorService.getFocusedCodeEditor(),t&&t.openToSide)}return p},e=a([l(0,s.ICodeEditorService),l(1,u.ICommandService),l(2,h.optional(d.ITelemetryService))],e)}();t.OpenerService=f}),define(e[963],t([1,0,11,93,136,87]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,s,a){var c=Object.create(null);c["common.machineId"]=s,c.sessionID=r.generateUuid()+Date.now(),c.commitHash=e,c.version=t,c["common.platformVersion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),c["common.platform"]=n.Platform[n.platform],
c["common.nodePlatform"]=process.platform,c["common.nodeArch"]=process.arch;var l=0,u=Date.now();return Object.defineProperties(c,{timestamp:{get:function(){return new Date},enumerable:!0},"common.timesincesessionstart":{get:function(){return Date.now()-u},enumerable:!0},"common.sequence":{get:function(){return l++},enumerable:!0}}),o.readFile(a,"utf8").then(function(e){return c["common.source"]=e.slice(0,30),c},function(e){return c})}}),define(e[964],t([1,0,4,76]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGAParameters=function(e,t,r,o,s){return void 0===s&&(s="1"),t.isBuilt&&!t.isExtensionDevelopment&&!t.args["disable-telemetry"]&&i.default.enableTelemetry&&"https"===r.scheme&&"code.visualstudio.com"===r.authority?e.getTelemetryInfo().then(function(e){return r.with({query:(r.query?r.query+"&":"")+"utm_source=VsCode&utm_medium="+encodeURIComponent(o)+"&utm_campaign="+encodeURIComponent(e.instanceId)+"&utm_content="+encodeURIComponent(s)})}):n.TPromise.as(r)}}),
define(e[965],t([1,0,136,963]),function(e,t,n,i){"use strict";function r(e,t,r,o,s){return i.resolveCommonProperties(t,r,o,s).then(function(t){t["common.version.shell"]=process.versions&&process.versions.electron,t["common.version.renderer"]=process.versions&&process.versions.chrome;var i=e.get("telemetry.lastSessionDate"),r=e.get("telemetry.firstSessionDate")||(new Date).toUTCString();return e.store("telemetry.firstSessionDate",r),e.store("telemetry.lastSessionDate",(new Date).toUTCString()),t["common.firstSessionDate"]=r,t["common.lastSessionDate"]=i,t["common.isNewSession"]=i?"0":"1",t["common.instanceId"]=function(e){var t=e.get("telemetry.instanceId")||n.generateUuid();return e.store("telemetry.instanceId",t),t}(e),t})}Object.defineProperty(t,"__esModule",{value:!0}),t.resolveWorkbenchCommonProperties=r}),define(e[26],t([1,0,16,51,1422]),function(e,t,n,i,r){"use strict";function o(e,t,n,i,r){return d.registerColor(e,t,n,i,r)}function s(e,t){return function(n){var i=u(e,n);return i?i.darken(t):null}}
function a(e,t){return function(n){var i=u(e,n);return i?i.lighten(t):null}}function c(e,t){return function(n){var i=u(e,n);return i?i.transparent(t):null}}function l(e,t,n,r){return function(o){var s=u(e,o);if(s){var a=u(t,o);return a?s.isDarkerThan(a)?i.Color.getLighterColor(s,a,n).transparent(r):i.Color.getDarkerColor(s,a,n).transparent(r):s.transparent(n*r)}return null}}function u(e,t){return null===e?null:"string"==typeof e?"#"===e[0]?i.Color.fromHex(e):t.getColor(e):e instanceof i.Color?e:"function"==typeof e?e(t):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={ColorContribution:"base.contributions.colors"};var d=new(function(){function e(){this.colorSchema={type:"object",description:r.localize(0,null),properties:{},additionalProperties:!1},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}return e.prototype.registerColor=function(e,t,n,i,r){void 0===i&&(i=!1);var o={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r}
;this.colorsById[e]=o;var s={type:"string",description:n,format:"color-hex",default:"#ff0000"};return r&&(s.deprecationMessage=r),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),e},e.prototype.getColors=function(){var e=this;return Object.keys(this.colorsById).map(function(t){return e.colorsById[t]})},e.prototype.resolveDefaultColor=function(e,t){var n=this.colorsById[e];if(n&&n.defaults){return u(n.defaults[t.type],t)}return null},e.prototype.getColorSchema=function(){return this.colorSchema},e.prototype.getColorReferenceSchema=function(){return this.colorReferenceSchema},e.prototype.toString=function(){var e=this;return Object.keys(this.colorsById).sort(function(e,t){var n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)}).map(function(t){return"- `"+t+"`: "+e.colorsById[t].description}).join("\n")},e}());n.Registry.add(t.Extensions.ColorContribution,d),t.registerColor=o,
t.getColorRegistry=function(){return d},t.foreground=o("foreground",{dark:"#CCCCCC",light:"#6C6C6C",hc:"#FFFFFF"},r.localize(1,null)),t.errorForeground=o("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},r.localize(2,null)),t.descriptionForeground=o("descriptionForeground",{light:c(t.foreground,.7),dark:c(t.foreground,.7),hc:c(t.foreground,.7)},r.localize(3,null)),t.focusBorder=o("focusBorder",{dark:i.Color.fromHex("#0E639C").transparent(.6),light:i.Color.fromHex("#007ACC").transparent(.4),hc:"#F38518"},r.localize(4,null)),t.contrastBorder=o("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},r.localize(5,null)),t.activeContrastBorder=o("contrastActiveBorder",{light:null,dark:null,hc:t.focusBorder},r.localize(6,null)),t.selectionBackground=o("selection.background",{light:null,dark:null,hc:null},r.localize(7,null)),t.textSeparatorForeground=o("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:i.Color.black},r.localize(8,null)),t.textLinkForeground=o("textLink.foreground",{
light:"#4080D0",dark:"#4080D0",hc:"#4080D0"},r.localize(9,null)),t.textLinkActiveForeground=o("textLink.activeForeground",{light:"#4080D0",dark:"#4080D0",hc:"#4080D0"},r.localize(10,null)),t.textPreformatForeground=o("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},r.localize(11,null)),t.textBlockQuoteBackground=o("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},r.localize(12,null)),t.textBlockQuoteBorder=o("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:i.Color.white},r.localize(13,null)),t.textCodeBlockBackground=o("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:i.Color.black},r.localize(14,null)),t.widgetShadow=o("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},r.localize(15,null)),t.inputBackground=o("input.background",{dark:"#3C3C3C",light:i.Color.white,hc:i.Color.black},r.localize(16,null)),t.inputForeground=o("input.foreground",{dark:t.foreground,light:t.foreground,hc:t.foreground},r.localize(17,null)),
t.inputBorder=o("input.border",{dark:null,light:null,hc:t.contrastBorder},r.localize(18,null)),t.inputActiveOptionBorder=o("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hc:t.activeContrastBorder},r.localize(19,null)),t.inputPlaceholderForeground=o("input.placeholderForeground",{dark:null,light:null,hc:null},r.localize(20,null)),t.inputValidationInfoBackground=o("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:i.Color.black},r.localize(21,null)),t.inputValidationInfoBorder=o("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:t.contrastBorder},r.localize(22,null)),t.inputValidationWarningBackground=o("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:i.Color.black},r.localize(23,null)),t.inputValidationWarningBorder=o("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:t.contrastBorder},r.localize(24,null)),t.inputValidationErrorBackground=o("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:i.Color.black
},r.localize(25,null)),t.inputValidationErrorBorder=o("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:t.contrastBorder},r.localize(26,null)),t.selectBackground=o("dropdown.background",{dark:"#3C3C3C",light:i.Color.white,hc:i.Color.black},r.localize(27,null)),t.selectListBackground=o("dropdown.listBackground",{dark:null,light:null,hc:i.Color.black},r.localize(28,null)),t.selectForeground=o("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:i.Color.white},r.localize(29,null)),t.selectBorder=o("dropdown.border",{dark:t.selectBackground,light:"#CECECE",hc:t.contrastBorder},r.localize(30,null)),t.listFocusBackground=o("list.focusBackground",{dark:"#073655",light:"#DCEBFC",hc:null},r.localize(31,null)),t.listFocusForeground=o("list.focusForeground",{dark:null,light:null,hc:null},r.localize(32,null)),t.listActiveSelectionBackground=o("list.activeSelectionBackground",{dark:"#094771",light:"#3399FF",hc:null},r.localize(33,null)),t.listActiveSelectionForeground=o("list.activeSelectionForeground",{
dark:i.Color.white,light:i.Color.white,hc:null},r.localize(34,null)),t.listInactiveSelectionBackground=o("list.inactiveSelectionBackground",{dark:"#3F3F46",light:"#CCCEDB",hc:null},r.localize(35,null)),t.listInactiveSelectionForeground=o("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},r.localize(36,null)),t.listInactiveFocusBackground=o("list.inactiveFocusBackground",{dark:"#313135",light:"#d8dae6",hc:null},r.localize(37,null)),t.listHoverBackground=o("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},r.localize(38,null)),t.listHoverForeground=o("list.hoverForeground",{dark:null,light:null,hc:null},r.localize(39,null)),t.listDropBackground=o("list.dropBackground",{dark:t.listFocusBackground,light:t.listFocusBackground,hc:null},r.localize(40,null)),t.listHighlightForeground=o("list.highlightForeground",{dark:"#0097fb",light:"#007acc",hc:t.focusBorder},r.localize(41,null)),t.listInvalidItemForeground=o("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"
},r.localize(42,null)),t.listErrorForeground=o("list.errorForeground",{dark:"#ea4646",light:"#d60a0a",hc:null},r.localize(43,null)),t.listWarningForeground=o("list.warningForeground",{dark:"#4d9e4d",light:"#117711",hc:null},r.localize(44,null)),t.pickerGroupForeground=o("pickerGroup.foreground",{dark:i.Color.fromHex("#0097FB").transparent(.6),light:i.Color.fromHex("#007ACC").transparent(.6),hc:i.Color.white},r.localize(45,null)),t.pickerGroupBorder=o("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:i.Color.white},r.localize(46,null)),t.buttonForeground=o("button.foreground",{dark:i.Color.white,light:i.Color.white,hc:i.Color.white},r.localize(47,null)),t.buttonBackground=o("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},r.localize(48,null)),t.buttonHoverBackground=o("button.hoverBackground",{dark:a(t.buttonBackground,.2),light:s(t.buttonBackground,.2),hc:null},r.localize(49,null)),t.badgeBackground=o("badge.background",{dark:"#4D4D4D",light:"#BEBEBE",hc:i.Color.black},r.localize(50,null)),
t.badgeForeground=o("badge.foreground",{dark:i.Color.white,light:i.Color.white,hc:i.Color.white},r.localize(51,null)),t.scrollbarShadow=o("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},r.localize(52,null)),t.scrollbarSliderBackground=o("scrollbarSlider.background",{dark:i.Color.fromHex("#797979").transparent(.4),light:i.Color.fromHex("#646464").transparent(.4),hc:c(t.contrastBorder,.6)},r.localize(53,null)),t.scrollbarSliderHoverBackground=o("scrollbarSlider.hoverBackground",{dark:i.Color.fromHex("#646464").transparent(.7),light:i.Color.fromHex("#646464").transparent(.7),hc:c(t.contrastBorder,.8)},r.localize(54,null)),t.scrollbarSliderActiveBackground=o("scrollbarSlider.activeBackground",{dark:i.Color.fromHex("#BFBFBF").transparent(.4),light:i.Color.fromHex("#000000").transparent(.6),hc:t.contrastBorder},r.localize(55,null)),t.progressBarBackground=o("progressBar.background",{dark:i.Color.fromHex("#0E70C0"),light:i.Color.fromHex("#0E70C0"),hc:t.contrastBorder},r.localize(56,null)),
t.editorBackground=o("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:i.Color.black},r.localize(57,null)),t.editorForeground=o("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:i.Color.white},r.localize(58,null)),t.editorWidgetBackground=o("editorWidget.background",{dark:"#2D2D30",light:"#EFEFF2",hc:"#0C141F"},r.localize(59,null)),t.editorWidgetBorder=o("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:t.contrastBorder},r.localize(60,null)),t.editorWidgetResizeBorder=o("editorWidget.resizeBorder",{light:null,dark:null,hc:null},r.localize(61,null)),t.editorSelectionBackground=o("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},r.localize(62,null)),t.editorSelectionForeground=o("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},r.localize(63,null)),t.editorInactiveSelection=o("editor.inactiveSelectionBackground",{light:c(t.editorSelectionBackground,.5),dark:c(t.editorSelectionBackground,.5),hc:c(t.editorSelectionBackground,.5)},r.localize(64,null),!0),
t.editorSelectionHighlight=o("editor.selectionHighlightBackground",{light:l(t.editorSelectionBackground,t.editorBackground,.3,.6),dark:l(t.editorSelectionBackground,t.editorBackground,.3,.6),hc:null},r.localize(65,null),!0),t.editorSelectionHighlightBorder=o("editor.selectionHighlightBorder",{light:null,dark:null,hc:t.activeContrastBorder},r.localize(66,null)),t.editorFindMatch=o("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},r.localize(67,null)),t.editorFindMatchHighlight=o("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},r.localize(68,null),!0),t.editorFindRangeHighlight=o("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},r.localize(69,null),!0),t.editorFindMatchBorder=o("editor.findMatchBorder",{light:null,dark:null,hc:t.activeContrastBorder},r.localize(70,null)),t.editorFindMatchHighlightBorder=o("editor.findMatchHighlightBorder",{light:null,dark:null,hc:t.activeContrastBorder},r.localize(71,null)),
t.editorFindRangeHighlightBorder=o("editor.findRangeHighlightBorder",{dark:null,light:null,hc:c(t.activeContrastBorder,.4)},r.localize(72,null),!0),t.editorHoverHighlight=o("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},r.localize(73,null),!0),t.editorHoverBackground=o("editorHoverWidget.background",{light:t.editorWidgetBackground,dark:t.editorWidgetBackground,hc:t.editorWidgetBackground},r.localize(74,null)),t.editorHoverBorder=o("editorHoverWidget.border",{light:t.editorWidgetBorder,dark:t.editorWidgetBorder,hc:t.editorWidgetBorder},r.localize(75,null)),t.editorActiveLinkForeground=o("editorLink.activeForeground",{dark:"#4E94CE",light:i.Color.blue,hc:i.Color.cyan},r.localize(76,null)),t.defaultInsertColor=new i.Color(new i.RGBA(155,185,85,.2)),t.defaultRemoveColor=new i.Color(new i.RGBA(255,0,0,.2)),t.diffInserted=o("diffEditor.insertedTextBackground",{dark:t.defaultInsertColor,light:t.defaultInsertColor,hc:null},r.localize(77,null),!0),
t.diffRemoved=o("diffEditor.removedTextBackground",{dark:t.defaultRemoveColor,light:t.defaultRemoveColor,hc:null},r.localize(78,null),!0),t.diffInsertedOutline=o("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},r.localize(79,null)),t.diffRemovedOutline=o("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},r.localize(80,null));var h=i.Color.fromHex("#40C8AE").transparent(.5),p=i.Color.fromHex("#40A6FF").transparent(.5),f=i.Color.fromHex("#606060").transparent(.4);t.mergeCurrentHeaderBackground=o("merge.currentHeaderBackground",{dark:h,light:h,hc:null},r.localize(81,null),!0),t.mergeCurrentContentBackground=o("merge.currentContentBackground",{dark:c(t.mergeCurrentHeaderBackground,.4),light:c(t.mergeCurrentHeaderBackground,.4),hc:c(t.mergeCurrentHeaderBackground,.4)},r.localize(82,null),!0),t.mergeIncomingHeaderBackground=o("merge.incomingHeaderBackground",{dark:p,light:p,hc:null},r.localize(83,null),!0),t.mergeIncomingContentBackground=o("merge.incomingContentBackground",{
dark:c(t.mergeIncomingHeaderBackground,.4),light:c(t.mergeIncomingHeaderBackground,.4),hc:c(t.mergeIncomingHeaderBackground,.4)},r.localize(84,null),!0),t.mergeCommonHeaderBackground=o("merge.commonHeaderBackground",{dark:f,light:f,hc:null},r.localize(85,null),!0),t.mergeCommonContentBackground=o("merge.commonContentBackground",{dark:c(t.mergeCommonHeaderBackground,.4),light:c(t.mergeCommonHeaderBackground,.4),hc:c(t.mergeCommonHeaderBackground,.4)},r.localize(86,null),!0),t.mergeBorder=o("merge.border",{dark:null,light:null,hc:"#C3DF6F"},r.localize(87,null)),t.overviewRulerCurrentContentForeground=o("editorOverviewRuler.currentContentForeground",{dark:c(t.mergeCurrentHeaderBackground,1),light:c(t.mergeCurrentHeaderBackground,1),hc:t.mergeBorder},r.localize(88,null)),t.overviewRulerIncomingContentForeground=o("editorOverviewRuler.incomingContentForeground",{dark:c(t.mergeIncomingHeaderBackground,1),light:c(t.mergeIncomingHeaderBackground,1),hc:t.mergeBorder},r.localize(89,null)),
t.overviewRulerCommonContentForeground=o("editorOverviewRuler.commonContentForeground",{dark:c(t.mergeCommonHeaderBackground,1),light:c(t.mergeCommonHeaderBackground,1),hc:t.mergeBorder},r.localize(90,null));var g=new i.Color(new i.RGBA(246,185,77,.7));t.overviewRulerFindMatchForeground=o("editorOverviewRuler.findMatchForeground",{dark:g,light:g,hc:g},r.localize(91,null),!0),t.overviewRulerSelectionHighlightForeground=o("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},r.localize(92,null),!0),t.darken=s,t.lighten=a,t.transparent=c,t.oneOf=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0,i=e;n<i.length;n++){var r=u(i[n],t);if(r)return r}return null}}}),define(e[68],t([1,0,26,24]),function(e,t,n,i){"use strict";function r(e,t){var n=Object.create(null);for(var i in t){var r=t[i];"string"==typeof r?n[i]=e.getColor(r):"function"==typeof r&&(n[i]=r(e))}return n}function o(e,t,n){function i(i){
var o=r(e.getTheme(),t);"function"==typeof n?n(o):n.style(o)}return i(e.getTheme()),e.onThemeChange(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.computeStyles=r,t.attachStyler=o,t.attachCheckboxStyler=function(e,t,i){return o(t,{inputActiveOptionBorder:i&&i.inputActiveOptionBorderColor||n.inputActiveOptionBorder},e)},t.attachBadgeStyler=function(e,t,i){return o(t,{badgeBackground:i&&i.badgeBackground||n.badgeBackground,badgeForeground:i&&i.badgeForeground||n.badgeForeground,badgeBorder:n.contrastBorder},e)},t.attachInputBoxStyler=function(e,t,i){return o(t,{inputBackground:i&&i.inputBackground||n.inputBackground,inputForeground:i&&i.inputForeground||n.inputForeground,inputBorder:i&&i.inputBorder||n.inputBorder,inputValidationInfoBorder:i&&i.inputValidationInfoBorder||n.inputValidationInfoBorder,inputValidationInfoBackground:i&&i.inputValidationInfoBackground||n.inputValidationInfoBackground,inputValidationWarningBorder:i&&i.inputValidationWarningBorder||n.inputValidationWarningBorder,
inputValidationWarningBackground:i&&i.inputValidationWarningBackground||n.inputValidationWarningBackground,inputValidationErrorBorder:i&&i.inputValidationErrorBorder||n.inputValidationErrorBorder,inputValidationErrorBackground:i&&i.inputValidationErrorBackground||n.inputValidationErrorBackground},e)},t.attachSelectBoxStyler=function(e,t,i){return o(t,{selectBackground:i&&i.selectBackground||n.selectBackground,selectListBackground:i&&i.selectListBackground||n.selectListBackground,selectForeground:i&&i.selectForeground||n.selectForeground,selectBorder:i&&i.selectBorder||n.selectBorder,focusBorder:i&&i.focusBorder||n.focusBorder,listFocusBackground:i&&i.listFocusBackground||n.listFocusBackground,listFocusForeground:i&&i.listFocusForeground||n.listFocusForeground,listFocusOutline:i&&i.listFocusOutline||n.activeContrastBorder,listHoverBackground:i&&i.listHoverBackground||n.listHoverBackground,listHoverForeground:i&&i.listHoverForeground||n.listHoverForeground,
listHoverOutline:i&&i.listFocusOutline||n.activeContrastBorder},e)},t.attachFindInputBoxStyler=function(e,t,i){return o(t,{inputBackground:i&&i.inputBackground||n.inputBackground,inputForeground:i&&i.inputForeground||n.inputForeground,inputBorder:i&&i.inputBorder||n.inputBorder,inputActiveOptionBorder:i&&i.inputActiveOptionBorder||n.inputActiveOptionBorder,inputValidationInfoBorder:i&&i.inputValidationInfoBorder||n.inputValidationInfoBorder,inputValidationInfoBackground:i&&i.inputValidationInfoBackground||n.inputValidationInfoBackground,inputValidationWarningBorder:i&&i.inputValidationWarningBorder||n.inputValidationWarningBorder,inputValidationWarningBackground:i&&i.inputValidationWarningBackground||n.inputValidationWarningBackground,inputValidationErrorBorder:i&&i.inputValidationErrorBorder||n.inputValidationErrorBorder,inputValidationErrorBackground:i&&i.inputValidationErrorBackground||n.inputValidationErrorBackground},e)},t.attachQuickOpenStyler=function(e,t,i){return o(t,{
foreground:i&&i.foreground||n.foreground,background:i&&i.background||n.editorBackground,borderColor:i&&i.borderColor||n.contrastBorder,widgetShadow:i&&i.widgetShadow||n.widgetShadow,progressBarBackground:i&&i.progressBarBackground||n.progressBarBackground,pickerGroupForeground:i&&i.pickerGroupForeground||n.pickerGroupForeground,pickerGroupBorder:i&&i.pickerGroupBorder||n.pickerGroupBorder,inputBackground:i&&i.inputBackground||n.inputBackground,inputForeground:i&&i.inputForeground||n.inputForeground,inputBorder:i&&i.inputBorder||n.inputBorder,inputValidationInfoBorder:i&&i.inputValidationInfoBorder||n.inputValidationInfoBorder,inputValidationInfoBackground:i&&i.inputValidationInfoBackground||n.inputValidationInfoBackground,inputValidationWarningBorder:i&&i.inputValidationWarningBorder||n.inputValidationWarningBorder,inputValidationWarningBackground:i&&i.inputValidationWarningBackground||n.inputValidationWarningBackground,inputValidationErrorBorder:i&&i.inputValidationErrorBorder||n.inputValidationErrorBorder,
inputValidationErrorBackground:i&&i.inputValidationErrorBackground||n.inputValidationErrorBackground,listFocusBackground:i&&i.listFocusBackground||n.listFocusBackground,listFocusForeground:i&&i.listFocusForeground||n.listFocusForeground,listActiveSelectionBackground:i&&i.listActiveSelectionBackground||n.lighten(n.listActiveSelectionBackground,.1),listActiveSelectionForeground:i&&i.listActiveSelectionForeground||n.listActiveSelectionForeground,listFocusAndSelectionBackground:i&&i.listFocusAndSelectionBackground||n.listActiveSelectionBackground,listFocusAndSelectionForeground:i&&i.listFocusAndSelectionForeground||n.listActiveSelectionForeground,listInactiveSelectionBackground:i&&i.listInactiveSelectionBackground||n.listInactiveSelectionBackground,listInactiveSelectionForeground:i&&i.listInactiveSelectionForeground||n.listInactiveSelectionForeground,listInactiveFocusBackground:i&&i.listInactiveFocusBackground||n.listInactiveFocusBackground,listHoverBackground:i&&i.listHoverBackground||n.listHoverBackground,
listHoverForeground:i&&i.listHoverForeground||n.listHoverForeground,listDropBackground:i&&i.listDropBackground||n.listDropBackground,listFocusOutline:i&&i.listFocusOutline||n.activeContrastBorder,listSelectionOutline:i&&i.listSelectionOutline||n.activeContrastBorder,listHoverOutline:i&&i.listHoverOutline||n.activeContrastBorder},e)},t.attachListStyler=function(e,n,r){return o(n,i.mixin(r||Object.create(null),t.defaultListStyles,!1),e)},t.defaultListStyles={listFocusBackground:n.listFocusBackground,listFocusForeground:n.listFocusForeground,listActiveSelectionBackground:n.lighten(n.listActiveSelectionBackground,.1),listActiveSelectionForeground:n.listActiveSelectionForeground,listFocusAndSelectionBackground:n.listActiveSelectionBackground,listFocusAndSelectionForeground:n.listActiveSelectionForeground,listInactiveSelectionBackground:n.listInactiveSelectionBackground,listInactiveSelectionForeground:n.listInactiveSelectionForeground,listInactiveFocusBackground:n.listInactiveFocusBackground,
listHoverBackground:n.listHoverBackground,listHoverForeground:n.listHoverForeground,listDropBackground:n.listDropBackground,listFocusOutline:n.activeContrastBorder,listSelectionOutline:n.activeContrastBorder,listHoverOutline:n.activeContrastBorder},t.attachButtonStyler=function(e,t,i){return o(t,{buttonForeground:i&&i.buttonForeground||n.buttonForeground,buttonBackground:i&&i.buttonBackground||n.buttonBackground,buttonHoverBackground:i&&i.buttonHoverBackground||n.buttonHoverBackground,buttonBorder:n.contrastBorder},e)},t.attachProgressBarStyler=function(e,t,i){return o(t,{progressBarBackground:i&&i.progressBarBackground||n.progressBarBackground},e)},t.attachStylerCallback=function(e,t,n){return o(e,t,n)}}),define(e[12],t([1,0,6,16,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IThemeService=n.createDecorator("themeService"),t.themeColorFromId=function(e){return{id:e}},t.FileThemeIcon={id:"file"},t.FolderThemeIcon={id:"folder"},t.DARK="dark",t.LIGHT="light",
t.HIGH_CONTRAST="hc",t.getThemeTypeSelector=function(e){switch(e){case t.DARK:return"vs-dark";case t.HIGH_CONTRAST:return"hc-black";default:return"vs"}},t.Extensions={ThemingContribution:"base.contributions.theming"};var o=new(function(){function e(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new r.Emitter}return e.prototype.onThemeChange=function(e){var t=this;return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),{dispose:function(){var n=t.themingParticipants.indexOf(e);t.themingParticipants.splice(n,1)}}},Object.defineProperty(e.prototype,"onThemingParticipantAdded",{get:function(){return this.onThemingParticipantAddedEmitter.event},enumerable:!0,configurable:!0}),e.prototype.getThemingParticipants=function(){return this.themingParticipants},e}());i.Registry.add(t.Extensions.ThemingContribution,o),t.registerThemingParticipant=function(e){return o.onThemeChange(e)}}),
define(e[969],t([1,0,14,10,8,186,57,949,5,12]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n){void 0===n&&(n=o.createStyleSheet());var i=e.call(this)||this;return i._styleSheet=n,i._decorationOptionProviders=Object.create(null),i._themeService=t,i}return n(t,e),t.prototype.registerDecorationType=function(e,t,n){var i=this._decorationOptionProviders[e];if(!i){var r={styleSheet:this._styleSheet,key:e,parentTypeKey:n,options:t||Object.create(null)};i=n?new g(this._themeService,r):new v(this._themeService,r),this._decorationOptionProviders[e]=i}i.refCount++},t.prototype.removeDecorationType=function(e){var t=this._decorationOptionProviders[e];t&&(t.refCount--,t.refCount<=0&&(delete this._decorationOptionProviders[e],t.dispose(),this.listCodeEditors().forEach(function(t){return t.removeDecorations(e)})))},t.prototype.resolveDecorationOptions=function(e,t){var n=this._decorationOptionProviders[e]
;if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)},t=a([l(0,h.IThemeService)],t)}(u.AbstractCodeEditorService);t.CodeEditorServiceImpl=p;var f,g=function(){function e(e,t){this._parentTypeKey=t.parentTypeKey,this.refCount=0,this._beforeContentRules=new y(3,t,e),this._afterContentRules=new y(4,t,e)}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n},e.prototype.dispose=function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null)},e}(),v=function(){function e(e,t){var n=this;this.refCount=0,this._disposables=[];var i=function(i){var r=new y(i,t,e);if(r.hasContent)return n._disposables.push(r),r.className}
;this.className=i(0);var r=function(i){var r=new y(i,t,e);return r.hasContent?(n._disposables.push(r),{className:r.className,hasLetterSpacing:r.hasLetterSpacing}):null}(1);r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=i(3),this.afterContentClassName=i(4),this.glyphMarginClassName=i(2);var o=t.options;this.isWholeLine=Boolean(o.isWholeLine),this.stickiness=o.rangeBehavior;var s=o.light&&o.light.overviewRulerColor||o.overviewRulerColor,a=o.dark&&o.dark.overviewRulerColor||o.overviewRulerColor;void 0===s&&void 0===a||(this.overviewRuler={color:s||a,darkColor:a||s,position:o.overviewRulerLane||c.OverviewRulerLane.Center})}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,
overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this},e.prototype.dispose=function(){this._disposables=d.dispose(this._disposables)},e}(),m={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},y=function(){function e(e,t,n){var i=this;this._theme=n.getTheme(),
this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var r=b.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(r=r+" "+b.getClassName(this._providerArgs.parentTypeKey,e)),this._className=r,this._unThemedSelector=b.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors&&(this._themeListener=n.onThemeChange(function(e){i._theme=n.getTheme(),i._removeCSS(),i._buildCSS()}))}return e.prototype.dispose=function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)},Object.defineProperty(e.prototype,"hasContent",{get:function(){return this._hasContent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasLetterSpacing",{get:function(){return this._hasLetterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},
enumerable:!0,configurable:!0}),e.prototype._buildCSS=function(){var e,t,n,i=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(i),t=this.getCSSTextForModelDecorationClassName(i.light),n=this.getCSSTextForModelDecorationClassName(i.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(i),t=this.getCSSTextForModelDecorationInlineClassName(i.light),n=this.getCSSTextForModelDecorationInlineClassName(i.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(i),t=this.getCSSTextForModelDecorationGlyphMarginClassName(i.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(i.before),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.before),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(i.after),
t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.after),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}var r=this._providerArgs.styleSheet.sheet,o=!1;e.length>0&&(r.insertRule(this._unThemedSelector+" {"+e+"}",0),o=!0),t.length>0&&(r.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),o=!0),n.length>0&&(r.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),o=!0),this._hasContent=o},e.prototype._removeCSS=function(){o.removeCSSRulesContainingSelector(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return""
;var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&("string"==typeof e.contentIconPath?t.push(i.format(m.contentIconPath,r.default.file(e.contentIconPath).toString().replace(/'/g,"%27"))):t.push(i.format(m.contentIconPath,r.default.revive(e.contentIconPath).toString(!0).replace(/'/g,"%27")))),"string"==typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(i.format(m.contentText,n))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){
if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(i.format(m.gutterIconPath,r.default.file(e.gutterIconPath).toString())):t.push(i.format(m.gutterIconPath,r.default.revive(e.gutterIconPath).toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(i.format(m.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(i.format("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,n){for(var r=n.length,o=0,s=t;o<s.length;o++){var a=s[o],c=this.resolveValue(e[a]);"string"==typeof c&&n.push(i.format(m[a],c))}return n.length!==r},e.prototype.resolveValue=function(e){if(s.isThemeColor(e)){this._usesThemeColors=!0;var t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e},e}();!function(e){e[e.ClassName=0]="ClassName",
e[e.InlineClassName=1]="InlineClassName",e[e.GlyphMarginClassName=2]="GlyphMarginClassName",e[e.BeforeContentClassName=3]="BeforeContentClassName",e[e.AfterContentClassName=4]="AfterContentClassName"}(f||(f={}));var b=function(){function e(){}return e.getClassName=function(e,t){return"ced-"+e+"-"+t},e.getSelector=function(e,t,n){var i=".monaco-editor ."+this.getClassName(e,n);return t&&(i=i+"."+this.getClassName(t,n)),3===n?i+="::before":4===n&&(i+="::after"),i},e}()}),define(e[970],t([1,0,8,129,116,85,12]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,c,l){var u=e.call(this,t)||this,d=u._context.configuration.editor.viewInfo.scrollbar,h={listenOnDomNode:c.domNode,className:"editor-scrollable "+a.getThemeTypeSelector(t.theme.type),useShadows:!1,lazyRender:!0,vertical:d.vertical,horizontal:d.horizontal,verticalHasArrows:d.verticalHasArrows,horizontalHasArrows:d.horizontalHasArrows,verticalScrollbarSize:d.verticalScrollbarSize,
verticalSliderSize:d.verticalSliderSize,horizontalScrollbarSize:d.horizontalScrollbarSize,horizontalSliderSize:d.horizontalSliderSize,handleMouseWheel:d.handleMouseWheel,arrowSize:d.arrowSize,mouseWheelScrollSensitivity:d.mouseWheelScrollSensitivity};u.scrollbar=u._register(new r.SmoothScrollableElement(n.domNode,h,u._context.viewLayout.scrollable)),o.PartFingerprints.write(u.scrollbar.getDomNode(),5),u.scrollbarDomNode=s.createFastDomNode(u.scrollbar.getDomNode()),u.scrollbarDomNode.setPosition("absolute"),u._setLayout();var p=function(e,t,n){var i={};if(t){var r=e.scrollTop;r&&(i.scrollTop=u._context.viewLayout.getCurrentScrollTop()+r,e.scrollTop=0)}if(n){var o=e.scrollLeft;o&&(i.scrollLeft=u._context.viewLayout.getCurrentScrollLeft()+o,e.scrollLeft=0)}u._context.viewLayout.setScrollPositionNow(i)};return u._register(i.addDisposableListener(c.domNode,"scroll",function(e){return p(c.domNode,!0,!0)})),u._register(i.addDisposableListener(n.domNode,"scroll",function(e){return p(n.domNode,!0,!1)})),
u._register(i.addDisposableListener(l.domNode,"scroll",function(e){return p(l.domNode,!0,!1)})),u._register(i.addDisposableListener(u.scrollbarDomNode.domNode,"scroll",function(e){return p(u.scrollbarDomNode.domNode,!0,!1)})),u}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.scrollbarDomNode.setLeft(e.contentLeft);"right"===this._context.configuration.editor.viewInfo.minimap.side?this.scrollbarDomNode.setWidth(e.contentWidth+e.minimapWidth):this.scrollbarDomNode.setWidth(e.contentWidth),this.scrollbarDomNode.setHeight(e.contentHeight)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.viewInfo){
var t=this._context.configuration.editor,n={handleMouseWheel:t.viewInfo.scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:t.viewInfo.scrollbar.mouseWheelScrollSensitivity};this.scrollbar.updateOptions(n)}return e.layoutInfo&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+a.getThemeTypeSelector(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(o.ViewPart);t.EditorScrollbar=c}),define(e[400],t([1,0,78,11,85,332,328,1067,230,12]),function(e,t,i,r,o,s,a,c,l,u){"use strict";function d(e,t,n,i,r){return new S(e,t,n,i,r)}function h(e,t,n,i,r){return new b(e,t,n,i,r)}Object.defineProperty(t,"__esModule",{value:!0});var p=!!r.isNative||!(r.isLinux||i.isFirefox||i.isSafari),f=i.isEdgeOrIE,g=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}
return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}();t.DomReadingContext=g;var v=function(){function e(e,t){this.themeType=t,this.renderWhitespace=e.editor.viewInfo.renderWhitespace,this.renderControlCharacters=e.editor.viewInfo.renderControlCharacters,this.spaceWidth=e.editor.fontInfo.spaceWidth,this.useMonospaceOptimizations=e.editor.fontInfo.isMonospace&&!e.editor.viewInfo.disableMonospaceOptimizations,this.lineHeight=e.editor.lineHeight,this.stopRenderingLineAfter=e.editor.viewInfo.stopRenderingLineAfter,this.fontLigatures=e.editor.viewInfo.fontLigatures}return e.prototype.equals=function(e){
return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}();t.ViewLineOptions=v;var m=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=o.createFastDomNode(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},
e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!f&&this._options.themeType!==u.HIGH_CONTRAST)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,n,i,r){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var o=i.getViewLineRenderingData(t),c=this._options,l=s.LineDecoration.filter(o.inlineDecorations,t,o.minColumn,o.maxColumn);if(f||c.themeType===u.HIGH_CONTRAST)for(var d=i.selections,h=0,g=d.length;h<g;h++){var v=d[h];if(!(v.endLineNumber<t||v.startLineNumber>t)){var m=v.startLineNumber===t?v.startColumn:o.minColumn,b=v.endLineNumber===t?v.endColumn:o.maxColumn;m<b&&l.push(new s.LineDecoration(m,b,"inline-selected-text",0))}}var S=new a.RenderLineInput(c.useMonospaceOptimizations,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,l,o.tabSize,c.spaceWidth,c.stopRenderingLineAfter,c.renderWhitespace,c.renderControlCharacters,c.fontLigatures)
;if(this._renderedViewLine&&this._renderedViewLine.input.equals(S))return!1;r.appendASCIIString('<div style="top:'),r.appendASCIIString(String(n)),r.appendASCIIString("px;height:"),r.appendASCIIString(String(this._options.lineHeight)),r.appendASCIIString('px;" class="'),r.appendASCIIString(e.CLASS_NAME),r.appendASCIIString('">');var C=a.renderViewLine(S,r);r.appendASCIIString("</div>");var E=null;return p&&o.isBasicASCII&&c.useMonospaceOptimizations&&0===C.containsForeignElements&&o.content.length<300&&S.lineTokens.getCount()<100&&(E=new y(this._renderedViewLine?this._renderedViewLine.domNode:null,S,C.characterMapping)),E||(E=_(this._renderedViewLine?this._renderedViewLine.domNode:null,S,C.characterMapping,C.containsRTL,C.containsForeignElements)),this._renderedViewLine=E,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){
return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==i&&e>i&&t>i?null:(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),this._renderedViewLine.getVisibleRangesForRange(e,t,n))},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e.CLASS_NAME="view-line",e}();t.ViewLine=m;var y=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},
e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),r=this._getCharPosition(t);return[new l.HorizontalRange(i,r-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,r=-1;t;)t=t.previousSibling,r++;return this._characterMapping.partDataToCharOffset(r,i,n)+1},e}(),b=function(){function e(e,t,n,i,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var o=0,s=this._characterMapping.length;o<=s;o++)this._pixelOffsetCache[o]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},
e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(e,n);if(-1===i)return null;var r=this._readPixelOffset(t,n);return-1===r?null:[new l.HorizontalRange(i,r-i)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new l.HorizontalRange(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth()}if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)return n
;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var n=c.RangeUtil.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),r=a.CharacterMapping.getPartIndex(i),o=a.CharacterMapping.getCharIndex(i),s=c.RangeUtil.readHorizontalRanges(this._getReadingTarget(),r,o,r,o,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new l.HorizontalRange(0,this.getWidth())]
;var i=this._characterMapping.charOffsetToPartData(e-1),r=a.CharacterMapping.getPartIndex(i),o=a.CharacterMapping.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),u=a.CharacterMapping.getPartIndex(s),d=a.CharacterMapping.getCharIndex(s);return c.RangeUtil.readHorizontalRanges(this._getReadingTarget(),r,o,u,d,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,r=-1;t;)t=t.previousSibling,r++;return this._characterMapping.partDataToCharOffset(r,i,n)+1},e}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var r=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!r||0===r.length||t===n||1===t&&n===this._characterMapping.length)return r;var o=this._readPixelOffset(n-1,i),s=this._readPixelOffset(n,i);if(-1!==o&&-1!==s){var a=o<=s,c=r[r.length-1];a&&c.left<s&&(c.width=s-c.left)}return r},t}(b),_=i.isWebKit?d:h}),
define(e[401],t([1,0,39,19,45,321,78,116,400]),function(e,t,i,r,o,s,a,c,l){"use strict";function u(e){return{isAfterLines:!1,horizontalDistanceToText:e}}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t,n,i,o,s){void 0===n&&(n=0),void 0===i&&(i=null),void 0===o&&(o=null),void 0===s&&(s=null),this.element=e,this.type=t,this.mouseColumn=n,this.position=i,!o&&i&&(o=new r.Range(i.lineNumber,i.column,i.lineNumber,i.column)),this.range=o,this.detail=s}return e._typeToString=function(e){
return e===o.MouseTargetType.TEXTAREA?"TEXTAREA":e===o.MouseTargetType.GUTTER_GLYPH_MARGIN?"GUTTER_GLYPH_MARGIN":e===o.MouseTargetType.GUTTER_LINE_NUMBERS?"GUTTER_LINE_NUMBERS":e===o.MouseTargetType.GUTTER_LINE_DECORATIONS?"GUTTER_LINE_DECORATIONS":e===o.MouseTargetType.GUTTER_VIEW_ZONE?"GUTTER_VIEW_ZONE":e===o.MouseTargetType.CONTENT_TEXT?"CONTENT_TEXT":e===o.MouseTargetType.CONTENT_EMPTY?"CONTENT_EMPTY":e===o.MouseTargetType.CONTENT_VIEW_ZONE?"CONTENT_VIEW_ZONE":e===o.MouseTargetType.CONTENT_WIDGET?"CONTENT_WIDGET":e===o.MouseTargetType.OVERVIEW_RULER?"OVERVIEW_RULER":e===o.MouseTargetType.SCROLLBAR?"SCROLLBAR":e===o.MouseTargetType.OVERLAY_WIDGET?"OVERLAY_WIDGET":"UNKNOWN"},e.toString=function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail},e.prototype.toString=function(){return e.toString(this)},e}();t.MouseTarget=d;var h=function(){function e(){}return e.isTextArea=function(e){return 2===e.length&&3===e[0]&&6===e[1]},e.isChildOfViewLines=function(e){
return e.length>=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),p=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){
var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var r=n.verticalOffset+n.height/2,o=e.model.getLineCount(),s=null,a=void 0,c=null;return n.afterLineNumber!==o&&(c=new i.Position(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new i.Position(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),a=null===c?s:null===s?c:t<r?s:c,{viewZoneId:n.id,afterLineNumber:n.afterLineNumber,positionBefore:s,positionAfter:c,position:a}}return null},e.prototype.getFullLineRangeAtCoord=function(e){if(this._context.viewLayout.isAfterLines(e)){var t=this._context.model.getLineCount(),n=this._context.model.getLineMaxColumn(t);return{range:new r.Range(t,n,t,n),isAfterLines:!0}}var i=this._context.viewLayout.getLineNumberAtVerticalOffset(e),o=this._context.model.getLineMaxColumn(i);return{range:new r.Range(i,1,i,o),isAfterLines:!1}},e.prototype.getLineNumberAtVerticalOffset=function(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)},e.prototype.isAfterLines=function(e){
return this._context.viewLayout.isAfterLines(e)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.findAttribute=function(t,n){return e._findAttribute(t,n,this._viewHelper.viewDomNode)},e._findAttribute=function(e,t,n){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===n)return null;e=e.parentNode}return null},e.prototype.getLineWidth=function(e){return this._viewHelper.getLineWidth(e)},e.prototype.visibleRangeForPosition2=function(e,t){return this._viewHelper.visibleRangeForPosition2(e,t)},e.prototype.getPositionFromDOMInfo=function(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)},e.prototype.getCurrentScrollTop=function(){return this._context.viewLayout.getCurrentScrollTop()},e.prototype.getCurrentScrollLeft=function(){return this._context.viewLayout.getCurrentScrollLeft()},e}();t.HitTestContext=p;var f=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i)||this
;return o._ctx=t,r?(o.target=r,o.targetPath=c.PartFingerprints.collect(r,t.viewDomNode)):(o.target=null,o.targetPath=new Uint8Array(0)),o}return n(t,e),t.prototype.toString=function(){return"pos("+this.pos.x+","+this.pos.y+"), editorPos("+this.editorPos.x+","+this.editorPos.y+"), mouseVerticalOffset: "+this.mouseVerticalOffset+", mouseContentHorizontalOffset: "+this.mouseContentHorizontalOffset+"\n\ttarget: "+(this.target?this.target.outerHTML:null)},t.prototype.fulfill=function(e,t,n,i){return void 0===t&&(t=null),void 0===n&&(n=null),void 0===i&&(i=null),new d(this.target,e,this.mouseColumn,t,n,i)},t.prototype.withTarget=function(e){return new t(this._ctx,this.editorPos,this.pos,e)},t}(function(){return function(e,t,n){this.editorPos=t,this.pos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+n.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+n.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=n.x-t.x<e.layoutInfo.contentLeft&&n.x-t.x>=e.layoutInfo.glyphMarginLeft,
this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,v._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}()),g={isAfterLines:!0},v=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=c.PartFingerprints.collect(t,this._viewHelper.viewDomNode);return!(!h.isChildOfContentWidgets(n)&&!h.isChildOfOverflowingContentWidgets(n))||!!h.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,r){var s=new p(this._context,this._viewHelper,t),a=new f(s,n,i,r);try{return e._createMouseTarget(s,a,!1)}catch(e){return a.fulfill(o.MouseTargetType.UNKNOWN)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(o.MouseTargetType.UNKNOWN);var r=e._doHitTest(t,n);return r.position?e.createMouseTargetFromHitTestPosition(t,n,r.position.lineNumber,r.position.column):this._createMouseTarget(t,n.withTarget(r.hitTarget),!0)}var s=null
;return s=s||e._hitTestContentWidget(t,n),s=s||e._hitTestOverlayWidget(t,n),s=s||e._hitTestMinimap(t,n),s=s||e._hitTestScrollbarSlider(t,n),s=s||e._hitTestViewZone(t,n),s=s||e._hitTestMargin(t,n),s=s||e._hitTestViewCursor(t,n),s=s||e._hitTestTextArea(t,n),s=s||e._hitTestViewLines(t,n,i),(s=s||e._hitTestScrollbar(t,n))||n.fulfill(o.MouseTargetType.UNKNOWN)},e._hitTestContentWidget=function(e,t){if(h.isChildOfContentWidgets(t.targetPath)||h.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(o.MouseTargetType.CONTENT_WIDGET,null,null,n):t.fulfill(o.MouseTargetType.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if(h.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(o.MouseTargetType.OVERLAY_WIDGET,null,null,n):t.fulfill(o.MouseTargetType.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=(r=e.lastViewCursorsRenderData).length;n<i;n++){c=r[n]
;if(t.target===c.domNode)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,c.position)}if(t.isInContentArea)for(var r=e.lastViewCursorsRenderData,s=t.mouseContentHorizontalOffset,a=t.mouseVerticalOffset,n=0,i=r.length;n<i;n++){var c;if(!(s<(c=r[n]).contentLeft)&&!(s>c.contentLeft+c.width)){var l=e.getVerticalOffsetForLineNumber(c.position.lineNumber);if(l<=a&&a<=l+c.height)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,c.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?o.MouseTargetType.CONTENT_VIEW_ZONE:o.MouseTargetType.GUTTER_VIEW_ZONE;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return h.isTextArea(t.targetPath)?t.fulfill(o.MouseTargetType.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),r=Math.abs(t.pos.x-t.editorPos.x),s={isAfterLines:n.isAfterLines,
glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};return(r-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(o.MouseTargetType.GUTTER_GLYPH_MARGIN,i,n.range,s):(r-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(o.MouseTargetType.GUTTER_LINE_NUMBERS,i,n.range,s):(r-=e.layoutInfo.lineNumbersWidth,t.fulfill(o.MouseTargetType.GUTTER_LINE_DECORATIONS,i,n.range,s))}return null},e._hitTestViewLines=function(t,n,r){if(!h.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var s=t.model.getLineCount(),a=t.model.getLineMaxColumn(s);return n.fulfill(o.MouseTargetType.CONTENT_EMPTY,new i.Position(s,a),void 0,g)}if(r){if(h.isStrictChildOfViewLines(n.targetPath)){var c=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(c)){var l=t.getLineWidth(c),d=u(n.mouseContentHorizontalOffset-l)
;return n.fulfill(o.MouseTargetType.CONTENT_EMPTY,new i.Position(c,1),void 0,d)}}return n.fulfill(o.MouseTargetType.UNKNOWN)}var p=e._doHitTest(t,n);return p.position?e.createMouseTargetFromHitTestPosition(t,n,p.position.lineNumber,p.position.column):this._createMouseTarget(t,n.withTarget(p.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(h.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(n);return t.fulfill(o.MouseTargetType.SCROLLBAR,new i.Position(n,r))}return null},e._hitTestScrollbarSlider=function(e,t){if(h.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.model.getLineMaxColumn(r);return t.fulfill(o.MouseTargetType.SCROLLBAR,new i.Position(r,s))}}return null},e._hitTestScrollbar=function(e,t){if(h.isChildOfScrollableElement(t.targetPath)){
var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(n);return t.fulfill(o.MouseTargetType.SCROLLBAR,new i.Position(n,r))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,r=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(r,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){if(e<0)return 1;return Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,s){var c=new i.Position(n,s),l=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>l){if(a.isEdge&&1===c.column){var d=u(t.mouseContentHorizontalOffset-l);return t.fulfill(o.MouseTargetType.CONTENT_EMPTY,new i.Position(n,e.model.getLineMaxColumn(n)),void 0,d)}var h=u(t.mouseContentHorizontalOffset-l);return t.fulfill(o.MouseTargetType.CONTENT_EMPTY,c,void 0,h)}var p=e.visibleRangeForPosition2(n,s);if(!p)return t.fulfill(o.MouseTargetType.UNKNOWN,c)
;var f=p.left;if(t.mouseContentHorizontalOffset===f)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,c);var g=[];if(g.push({offset:p.left,column:s}),s>1){var v=e.visibleRangeForPosition2(n,s-1);v&&g.push({offset:v.left,column:s-1})}if(s<e.model.getLineMaxColumn(n)){var m=e.visibleRangeForPosition2(n,s+1);m&&g.push({offset:m.left,column:s+1})}g.sort(function(e,t){return e.offset-t.offset});for(var y=1;y<g.length;y++){var b=g[y-1],S=g[y];if(b.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=S.offset){var _=new r.Range(n,b.column,n,S.column);return t.fulfill(o.MouseTargetType.CONTENT_TEXT,c,_)}}return t.fulfill(o.MouseTargetType.CONTENT_TEXT,c)},e._doHitTestWithCaretRangeFromPoint=function(e,t){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.getVerticalOffsetForLineNumber(n)+Math.floor(e.lineHeight/2),r=t.pos.y+(i-t.mouseVerticalOffset);r<=t.editorPos.y&&(r=t.editorPos.y+1),r>=t.editorPos.y+e.layoutInfo.height&&(r=t.editorPos.y+e.layoutInfo.height-1)
;var o=new s.PageCoordinates(t.pos.x,r),a=this._actualDoHitTestWithCaretRangeFromPoint(e,o.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i,r=n.startContainer;if(r.nodeType===r.TEXT_NODE){var o=(a=(s=r.parentNode)?s.parentNode:null)?a.parentNode:null;if((o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===l.ViewLine.CLASS_NAME){return{position:c=e.getPositionFromDOMInfo(s,n.startOffset),hitTarget:null}}i=r.parentNode}else if(r.nodeType===r.ELEMENT_NODE){var s=r.parentNode,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===l.ViewLine.CLASS_NAME){var c=e.getPositionFromDOMInfo(r,r.textContent.length);return{position:c,hitTarget:null}}i=r}return{position:null,hitTarget:i}},e._doHitTestWithCaretPositionFromPoint=function(e,t){
var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,r=i?i.parentNode:null,o=r?r.parentNode:null;if((o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===l.ViewLine.CLASS_NAME){return{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),hitTarget:null}}return{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,r=document.body.createTextRange();try{r.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}r.collapse(!0);var o=r?r.parentElement():null,s=o?o.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===l.ViewLine.CLASS_NAME){var c=r.duplicate();c.moveToElementText(o),c.setEndPoint("EndToStart",r),n=e.getPositionFromDOMInfo(o,c.text.length),c.moveToElementText(e.viewDomNode)}else i=o;return r.moveToElementText(e.viewDomNode),{position:n,
hitTarget:i}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}();t.MouseTargetFactory=v}),define(e[973],t([1,0,5,11,78,8,39,60,227,401,45,18,321,82,273]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g){"use strict";function v(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(n,i,r){var o=e.call(this)||this;o._isFocused=!1,o._context=n,o.viewController=i,o.viewHelper=r,o.mouseTargetFactory=new u.MouseTargetFactory(o._context,r),o._mouseDownOperation=o._register(new y(o._context,o.viewController,o.viewHelper,function(e,t){return o._createMouseTarget(e,t)},function(e){return o._getMouseColumn(e)})),
o._asyncFocus=o._register(new h.RunOnceScheduler(function(){return o.viewHelper.focusTextArea()},0)),o.lastMouseLeaveTime=-1;var a=new p.EditorMouseEventFactory(o.viewHelper.viewDomNode);o._register(a.onContextMenu(o.viewHelper.viewDomNode,function(e){return o._onContextMenu(e,!0)})),o._register(a.onMouseMoveThrottled(o.viewHelper.viewDomNode,function(e){return o._onMouseMove(e)},v(o.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),o._register(a.onMouseUp(o.viewHelper.viewDomNode,function(e){return o._onMouseUp(e)})),o._register(a.onMouseLeave(o.viewHelper.viewDomNode,function(e){return o._onMouseLeave(e)})),o._register(a.onMouseDown(o.viewHelper.viewDomNode,function(e){return o._onMouseDown(e)}));var c=function(e){if(o._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new f.StandardMouseWheelEvent(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=g.EditorZoom.getZoomLevel(),i=t.deltaY>0?1:-1;g.EditorZoom.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}}
;return o._register(s.addDisposableListener(o.viewHelper.viewDomNode,"mousewheel",c,!0)),o._register(s.addDisposableListener(o.viewHelper.viewDomNode,"DOMMouseScroll",c,!0)),o._context.addEventHandler(o),o}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new p.ClientCoordinates(e,t).toPageCoordinates(),i=p.createEditorPagePosition(this.viewHelper.viewDomNode);if(n.y<i.y||n.y>i.y+i.height||n.x<i.x||n.x>i.x+i.width)return null;var r=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(r,i,n,null)},t.prototype._createMouseTarget=function(e,t){
var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){if(!this._mouseDownOperation.isActive()){e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}},t.prototype._onMouseLeave=function(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})},t.prototype._onMouseUp=function(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})},t.prototype._onMouseDown=function(e){
var t=this,n=this._createMouseTarget(e,!0),i=n.type===d.MouseTargetType.CONTENT_TEXT||n.type===d.MouseTargetType.CONTENT_EMPTY,s=n.type===d.MouseTargetType.GUTTER_GLYPH_MARGIN||n.type===d.MouseTargetType.GUTTER_LINE_NUMBERS||n.type===d.MouseTargetType.GUTTER_LINE_DECORATIONS,a=n.type===d.MouseTargetType.GUTTER_LINE_NUMBERS,c=this._context.configuration.editor.viewInfo.selectOnLineNumbers,l=n.type===d.MouseTargetType.CONTENT_VIEW_ZONE||n.type===d.MouseTargetType.GUTTER_VIEW_ZONE,u=n.type===d.MouseTargetType.CONTENT_WIDGET,h=e.leftButton||e.middleButton;r.isMacintosh&&e.leftButton&&e.ctrlKey&&(h=!1);var p=function(){o.isIE&&!t._isFocused?t._asyncFocus.schedule():(e.preventDefault(),t.viewHelper.focusTextArea())};if(h&&(i||a&&c))p(),this._mouseDownOperation.start(n.type,e);else if(s)e.preventDefault();else if(l){var f=n.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(f.viewZoneId)&&(p(),this._mouseDownOperation.start(n.type,e),e.preventDefault())
}else u&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(p(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})},t.MOUSE_MOVE_MINIMUM_TIME=100,t}(l.ViewEventHandler);t.MouseHandler=m;var y=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s._context=t,s._viewController=n,s._viewHelper=i,s._createMouseTarget=r,s._getMouseColumn=o,s._mouseMoveMonitor=s._register(new p.GlobalEditorMouseMoveMonitor(s._viewHelper.viewDomNode)),s._onScrollTimeout=s._register(new h.TimeoutTimer),s._mouseState=new b,s._currentSelection=new c.Selection(1,1,1,1),s._isActive=!1,s._lastMouseEvent=null,s}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.isActive=function(){return this._isActive},t.prototype._onMouseDownThenMove=function(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);var t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))},
t.prototype.start=function(e,t){var n=this;this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===d.MouseTargetType.GUTTER_LINE_NUMBERS),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);var i=this._findMousePosition(t,!0);if(i){if(this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count,!this._context.configuration.editor.readOnly&&this._context.configuration.editor.dragAndDrop&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(v(null),function(e){return n._onMouseDownThenMove(e)},function(){var e=n._findMousePosition(n._lastMouseEvent,!0);n._viewController.emitMouseDrop({event:n._lastMouseEvent,target:e?n._createMouseTarget(n._lastMouseEvent,!0):null}),n._stop()});this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),
this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(v(null),function(e){return n._onMouseDownThenMove(e)},function(){return n._stop()}))}},t.prototype._stop=function(){this._isActive=!1,this._onScrollTimeout.cancel()},t.prototype.onScrollChanged=function(){var e=this;this._isActive&&this._onScrollTimeout.setIfNotSet(function(){var t=e._findMousePosition(e._lastMouseEvent,!1);t&&(e._mouseState.isDragAndDrop||e._dispatchMouse(t,!0))},10)},t.prototype.onCursorStateChanged=function(e){this._currentSelection=e.selections[0]},t.prototype._getPositionOutsideEditor=function(e){var t=e.editorPos,n=this._context.model,i=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posy<t.y){s=Math.max(i.getCurrentScrollTop()-(t.y-e.posy),0);if(c=u.HitTestContext.getZoneAtCoord(this._context,s)){if(l=this._helpPositionJumpOverViewZone(c))return new u.MouseTarget(null,d.MouseTargetType.OUTSIDE_EDITOR,r,l)}var o=i.getLineNumberAtVerticalOffset(s)
;return new u.MouseTarget(null,d.MouseTargetType.OUTSIDE_EDITOR,r,new a.Position(o,1))}if(e.posy>t.y+t.height){var s=i.getCurrentScrollTop()+(e.posy-t.y),c=u.HitTestContext.getZoneAtCoord(this._context,s);if(c){var l=this._helpPositionJumpOverViewZone(c);if(l)return new u.MouseTarget(null,d.MouseTargetType.OUTSIDE_EDITOR,r,l)}var h=i.getLineNumberAtVerticalOffset(s);return new u.MouseTarget(null,d.MouseTargetType.OUTSIDE_EDITOR,r,new a.Position(h,n.getLineMaxColumn(h)))}var p=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new u.MouseTarget(null,d.MouseTargetType.OUTSIDE_EDITOR,r,new a.Position(p,1)):e.posx>t.x+t.width?new u.MouseTarget(null,d.MouseTargetType.OUTSIDE_EDITOR,r,new a.Position(p,n.getLineMaxColumn(p))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null
;if(i.type===d.MouseTargetType.CONTENT_VIEW_ZONE||i.type===d.MouseTargetType.GUTTER_VIEW_ZONE){var r=this._helpPositionJumpOverViewZone(i.detail);if(r)return new u.MouseTarget(i.element,i.type,i.mouseColumn,r,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new a.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,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})},t}(i.Disposable),b=function(){function e(){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}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{
get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},
e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}()}),define(e[974],t([1,0,8,132,973,321]),function(e,t,i,r,o,s){"use strict";function a(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout(function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",
t.addPointer(n.pointerId)):o._lastPointerType="mouse"}),o._register(i.addDisposableThrottledListener(o.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return o._onGestureChange(e)},a)),o._register(i.addDisposableListener(o.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return o._onCaptureGestureTap(e)},!0))}},100),o._lastPointerType="mouse",o}return n(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new s.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),
e.prototype.dispose.call(this)},t}(o.MouseHandler),l=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout(function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"}),o._register(i.addDisposableThrottledListener(o.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return o._onGestureChange(e)},a)),o._register(i.addDisposableListener(o.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return o._onCaptureGestureTap(e)},!0))}},100),o._lastPointerType="mouse",o}return n(t,e),
t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new s.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(o.MouseHandler),u=function(e){function t(t,n,o){var a=e.call(this,t,n,o)||this;return r.Gesture.addTarget(a.viewHelper.linesContentDomNode),a._register(i.addDisposableListener(a.viewHelper.linesContentDomNode,r.EventType.Tap,function(e){return a.onTap(e)})),
a._register(i.addDisposableListener(a.viewHelper.linesContentDomNode,r.EventType.Change,function(e){return a.onChange(e)})),a._register(i.addDisposableListener(a.viewHelper.linesContentDomNode,r.EventType.Contextmenu,function(e){return a._onContextMenu(new s.EditorMouseEvent(e,a.viewHelper.viewDomNode),!1)})),a}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new s.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(o.MouseHandler),d=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new c(e,t,n):window.TouchEvent?this.handler=new u(e,t,n):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new l(e,t,n):this.handler=new o.MouseHandler(e,t,n)}
return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}();t.PointerHandler=d}),define(e[975],t([1,0,5,401]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return n.onDidScroll=null,n.onDidGainFocus=null,n.onDidLoseFocus=null,n.onKeyDown=null,n.onKeyUp=null,n.onContextMenu=null,n.onMouseMove=null,n.onMouseLeave=null,n.onMouseUp=null,n.onMouseDown=null,n.onMouseDrag=null,n.onMouseDrop=null,n._viewModel=t,n}return n(t,e),t.prototype.emitScrollChanged=function(e){this.onDidScroll&&this.onDidScroll(e)},t.prototype.emitViewFocusGained=function(){this.onDidGainFocus&&this.onDidGainFocus(void 0)},t.prototype.emitViewFocusLost=function(){this.onDidLoseFocus&&this.onDidLoseFocus(void 0)},t.prototype.emitKeyDown=function(e){this.onKeyDown&&this.onKeyDown(e)},t.prototype.emitKeyUp=function(e){this.onKeyUp&&this.onKeyUp(e)},
t.prototype.emitContextMenu=function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){
return new s(e.element,e.type,e.mouseColumn,e.position?this._convertViewToModelPosition(e.position):null,e.range?this._convertViewToModelRange(e.range):null,e.detail)},t.prototype._convertViewToModelPosition=function(e){return this._viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},t.prototype._convertViewToModelRange=function(e){return this._viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},t}(i.Disposable);t.ViewOutgoingEvents=o;var s=function(){function e(e,t,n,i,r,o){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=r,this.detail=o}return e.prototype.toString=function(){return r.MouseTarget.toString(this)},e}()}),define(e[976],t([1,0,18,19,39,316,400,167,230,116,1176]),function(e,t,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(){this._currentVisibleRange=new r.Range(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},
e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),h=function(){return function(e,t,n,i,r,o){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=r,this.scrollType=o}}(),p=function(e){function t(t,n){var r=e.call(this,t)||this;r._linesContent=n,r._textRangeRestingSpot=document.createElement("div"),r._visibleLines=new s.VisibleLinesCollection(r),r.domNode=r._visibleLines.domNode;var o=r._context.configuration;return r._lineHeight=o.editor.lineHeight,r._typicalHalfwidthCharacterWidth=o.editor.fontInfo.typicalHalfwidthCharacterWidth,r._isViewportWrapping=o.editor.wrappingInfo.isViewportWrapping,r._revealHorizontalRightPadding=o.editor.viewInfo.revealHorizontalRightPadding,r._canUseLayerHinting=o.editor.canUseLayerHinting,r._viewLineOptions=new a.ViewLineOptions(o,r._context.theme.type),u.PartFingerprints.write(r.domNode,7),r.domNode.setClassName("view-lines"),c.Configuration.applyFontInfo(r.domNode,o.editor.fontInfo),r._maxLineWidth=0,
r._asyncUpdateLineWidths=new i.RunOnceScheduler(function(){r._updateLineWidthsSlow()},200),r._lastRenderedData=new d,r._horizontalRevealRequest=null,r}return n(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new a.ViewLine(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),
e.fontInfo&&c.Configuration.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new a.ViewLineOptions(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),r=n;r<=i;r++){this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,r=t;r<=n;r++)i=this._visibleLines.getVisibleLine(r).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){
var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new h(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)
;return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>n)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},
t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new o.Position(i,1);var r=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(i<r||i>s)return null;var a=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),c=this._context.model.getLineMinColumn(i);return a<c&&(a=c),new o.Position(i,a)},t.prototype._getViewLineDomNode=function(e){for(;e&&1===e.nodeType;){if(e.className===a.ViewLine.CLASS_NAME)return e;e=e.parentElement}return null},t.prototype._getLineNumberFor=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++){if(e===this._visibleLines.getVisibleLine(i).getDomNode())return i}return-1},t.prototype.getLineWidth=function(e){
var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();return e<t||e>n?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber;if(!(e=r.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var i,s=[],c=0,u=new a.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);t&&(i=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e.startLineNumber,1)).lineNumber);for(var d=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber(),p=e.startLineNumber;p<=e.endLineNumber;p++)if(!(p<d||p>h)){var f=p===e.startLineNumber?e.startColumn:1,g=p===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(p),v=this._visibleLines.getVisibleLine(p).getVisibleRangesForRange(f,g,u);if(v&&0!==v.length){if(t&&p<n){
i!==(i=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(p+1,1)).lineNumber)&&(v[v.length-1].width+=this._typicalHalfwidthCharacterWidth)}s[c++]=new l.LineVisibleRanges(p,v)}}return 0===c?null:s},t.prototype.visibleRangesForRange2=function(e){if(this.shouldRender())return null;if(!(e=r.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;for(var t=[],n=new a.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),i=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),s=e.startLineNumber;s<=e.endLineNumber;s++)if(!(s<i||s>o)){var c=s===e.startLineNumber?e.startColumn:1,l=s===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(s),u=this._visibleLines.getVisibleLine(s).getVisibleRangesForRange(c,l,n);u&&0!==u.length&&(t=t.concat(u))}return 0===t.length?null:t},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){
return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,r=!0,o=t;o<=n;o++){var s=this._visibleLines.getVisibleLine(o);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):r=!1}return r&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),r},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){
var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,r=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var o=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(o.maxHorizontalOffset),0===r?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:o.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:o.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,
this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth))},t.prototype._computeScrollTopToRevealRange=function(e,t,n){var i,r,o=e.top,s=e.height,a=o+s;i=this._context.viewLayout.getVerticalOffsetForLineNumber(t.startLineNumber),r=this._context.viewLayout.getVerticalOffsetForLineNumber(t.endLineNumber)+this._lineHeight,0!==n&&4!==n||(r+=this._lineHeight);var c;if(1===n||2===n)if(2===n&&o<=i&&r<=a)c=o;else{var l=(i+r)/2;c=Math.max(0,l-s/2)}else c=this._computeMinimumScrolling(o,a,i,r,3===n,4===n);return c},t.prototype._computeScrollLeftToRevealRange=function(e,n,i){var o=0,s=this._context.viewLayout.getCurrentViewport(),a=s.left,c=a+s.width,l=this.visibleRangesForRange2(new r.Range(e,n,e,i)),u=Number.MAX_VALUE,d=0;if(!l)return{scrollLeft:a,maxHorizontalOffset:o};for(var h=0;h<l.length;h++){var p=l[h];p.left<u&&(u=p.left),p.left+p.width>d&&(d=p.left+p.width)}o=d,u=Math.max(0,u-t.HORIZONTAL_EXTRA_PX),d+=this._revealHorizontalRightPadding;return{scrollLeft:this._computeMinimumScrolling(a,c,u,d),
maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,r,o){r=!!r,o=!!o;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)<s?r?n:o?Math.max(0,i-s):n<e?n:i>t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(u.ViewPart);t.ViewLines=p}),define(e[977],t([1,0,116,14,834,8,344,85,316,19,197,215,11,12,26,1188]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g){"use strict";function v(e){return 2===e?4:4===e?6:1===e?2:3}function m(e){return 2===e?2:4===e?2:1}Object.defineProperty(t,"__esModule",{value:!0});var y;!function(e){e[e.None=0]="None",e[e.Small=1]="Small",e[e.Large=2]="Large",e[e.SmallBlocks=3]="SmallBlocks",e[e.LargeBlocks=4]="LargeBlocks"}(y||(y={}));var b=140,S=function(){function e(e){var t=e.editor.pixelRatio,n=e.editor.layoutInfo,i=e.editor.viewInfo,r=e.editor.fontInfo;this.renderMinimap=0|n.renderMinimap,this.scrollBeyondLastLine=i.scrollBeyondLastLine,this.showSlider=i.minimap.showSlider,this.pixelRatio=t,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,
this.lineHeight=e.editor.lineHeight,this.minimapLeft=n.minimapLeft,this.minimapWidth=n.minimapWidth,this.minimapHeight=n.height,this.canvasInnerWidth=Math.max(1,Math.floor(t*this.minimapWidth)),this.canvasInnerHeight=Math.max(1,Math.floor(t*this.minimapHeight)),this.canvasOuterWidth=this.canvasInnerWidth/t,this.canvasOuterHeight=this.canvasInnerHeight/t}return e.prototype.equals=function(e){return this.renderMinimap===e.renderMinimap&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight},e}(),_=function(){function e(e,t,n,i,r,o,s){this.scrollTop=e,
this.scrollHeight=t,this._computedSliderRatio=n,this.sliderTop=i,this.sliderHeight=r,this.startLineNumber=o,this.endLineNumber=s}return e.prototype.getDesiredScrollTopFromDelta=function(e){var t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)},e.create=function(t,n,i,r,o,s,a,c,l){var u,d=t.pixelRatio,h=v(t.renderMinimap),p=Math.floor(t.canvasInnerHeight/h),f=t.lineHeight;if(o&&i!==s){var g=i-n+1;u=Math.floor(g*h/d)}else{var m=r/f;u=Math.floor(m*h/d)}var y;y=t.scrollBeyondLastLine?(s-1)*h/d:Math.max(0,s*h/d-u);var b=(y=Math.min(t.minimapHeight-u,y))/(c-r),S=a*b;if(p>=s){return new e(a,c,b,S,u,_=1,C=s)}var _=Math.max(1,Math.floor(n-S*d/h));l&&l.scrollHeight===c&&(l.scrollTop>a&&(_=Math.min(_,l.startLineNumber)),l.scrollTop<a&&(_=Math.max(_,l.startLineNumber)));var C=Math.min(s,_+p-1);return new e(a,c,b,S,u,_,C)},e}(),C=function(){function e(e){this.dy=e}return e.prototype.onContentChanged=function(){this.dy=-1},e.prototype.onTokensChanged=function(){this.dy=-1},e.INVALID=new e(-1),e
}(),E=function(){function e(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new l.RenderedLinesCollection(function(){return C.INVALID}),this._renderedLines._set(e.startLineNumber,n)}return e.prototype.linesEquals=function(e){if(this.renderedLayout.startLineNumber!==e.startLineNumber)return!1;if(this.renderedLayout.endLineNumber!==e.endLineNumber)return!1;for(var t=this._renderedLines._get().lines,n=0,i=t.length;n<i;n++)if(-1===t[n].dy)return!1;return!0},e.prototype._get=function(){var e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}},e.prototype.onLinesChanged=function(e){return this._renderedLines.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){this._renderedLines.onLinesDeleted(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesInserted=function(e){this._renderedLines.onLinesInserted(e.fromLineNumber,e.toLineNumber)},e.prototype.onTokensChanged=function(e){
return this._renderedLines.onTokensChanged(e.ranges)},e}(),w=function(){function e(t,n,i,r){this._backgroundFillData=e._createBackgroundFillData(n,i,r),this._buffers=[t.createImageData(n,i),t.createImageData(n,i)],this._lastUsedBuffer=0}return e.prototype.getBuffer=function(){this._lastUsedBuffer=1-this._lastUsedBuffer;var e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e},e._createBackgroundFillData=function(e,t,n){for(var i=n.r,r=n.g,o=n.b,s=new Uint8ClampedArray(e*t*4),a=0,c=0;c<t;c++)for(var l=0;l<e;l++)s[a]=i,s[a+1]=r,s[a+2]=o,s[a+3]=255,a+=4;return s},e}(),I=function(e){function t(t){var n=e.call(this,t)||this;return n._options=new S(n._context.configuration),n._lastRenderData=null,n._buffers=null,n._domNode=c.createFastDomNode(document.createElement("div")),i.PartFingerprints.write(n._domNode,8),n._domNode.setClassName(n._getMinimapDomNodeClassName()),n._domNode.setPosition("absolute"),n._domNode.setAttribute("role","presentation"),
n._domNode.setAttribute("aria-hidden","true"),n._shadow=c.createFastDomNode(document.createElement("div")),n._shadow.setClassName("minimap-shadow-hidden"),n._domNode.appendChild(n._shadow),n._canvas=c.createFastDomNode(document.createElement("canvas")),n._canvas.setPosition("absolute"),n._canvas.setLeft(0),n._domNode.appendChild(n._canvas),n._slider=c.createFastDomNode(document.createElement("div")),n._slider.setPosition("absolute"),n._slider.setClassName("minimap-slider"),n._slider.setLayerHinting(!0),n._domNode.appendChild(n._slider),n._sliderHorizontal=c.createFastDomNode(document.createElement("div")),n._sliderHorizontal.setPosition("absolute"),n._sliderHorizontal.setClassName("minimap-slider-horizontal"),n._slider.appendChild(n._sliderHorizontal),n._tokensColorTracker=a.MinimapTokensColorTracker.getInstance(),n._applyLayout(),n._mouseDownListener=s.addStandardDisposableListener(n._canvas.domNode,"mousedown",function(e){e.preventDefault();var t=n._options.renderMinimap;if(0!==t&&n._lastRenderData){
var i=v(t),r=n._options.pixelRatio*e.browserEvent.offsetY,o=Math.floor(r/i)+n._lastRenderData.renderedLayout.startLineNumber;o=Math.min(o,n._context.model.getLineCount()),n._context.privateViewEventBus.emit(new d.ViewRevealRangeRequestEvent(new u.Range(o,1,o,1),1,!1,0))}}),n._sliderMouseMoveMonitor=new h.GlobalMouseMoveMonitor,n._sliderMouseDownListener=s.addStandardDisposableListener(n._slider.domNode,"mousedown",function(e){if(e.preventDefault(),e.leftButton&&n._lastRenderData){var t=e.posy,i=e.posx,r=n._lastRenderData.renderedLayout;n._slider.toggleClassName("active",!0),n._sliderMouseMoveMonitor.startMonitoring(h.standardMouseMoveMerger,function(e){var o=Math.abs(e.posx-i);if(p.isWindows&&o>b)n._context.viewLayout.setScrollPositionNow({scrollTop:r.scrollTop});else{var s=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:r.getDesiredScrollTopFromDelta(s)})}},function(){n._slider.toggleClassName("active",!1)})}}),n}return n(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),
this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){
return this._buffers||(this._buffers=new w(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new S(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},
t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=_.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),
this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*m(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=e.startLineNumber,r=e.endLineNumber,s=v(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new E(e,a.imageData,a.lines)}
for(var c=this._getBuffer(),l=t._renderUntouchedLines(c,i,r,s,this._lastRenderData),u=l[0],d=l[1],h=l[2],p=this._context.model.getMinimapLinesRenderingData(i,r,h),f=p.tabSize,g=this._tokensColorTracker.getColor(2),m=this._tokensColorTracker.backgroundIsLight(),y=0,b=[],S=0,_=r-i+1;S<_;S++)h[S]&&t._renderLine(c,g,m,n,this._tokensColorTracker,o.getOrCreateMinimapCharRenderer(),y,f,p.data[S]),b[S]=new C(y),y+=s;var w=-1===u?0:u,I=(-1===d?c.height:d)-w;return this._canvas.domNode.getContext("2d").putImageData(c,0,0,0,w,c.width,I),new E(e,c,b)},t._renderUntouchedLines=function(e,t,n,i,r){var o=[];if(!r){for(var s=0,a=n-t+1;s<a;s++)o[s]=!0;return[-1,-1,o]}for(var c=r._get(),l=c.imageData.data,u=c.rendLineNumberStart,d=c.lines,h=d.length,p=e.width,f=e.data,g=(n-t+1)*i*p*4,v=-1,m=-1,y=-1,b=-1,S=-1,_=-1,C=0,E=t;E<=n;E++){var w=E-t,I=E-u,T=I>=0&&I<h?d[I].dy:-1;if(-1!==T){var x=T*p*4,k=(T+i)*p*4,D=C*p*4,A=(C+i)*p*4;b===x&&_===D?(b=k,_=A):(-1!==y&&(f.set(l.subarray(y,b),S),-1===v&&0===y&&y===S&&(v=b),
-1===m&&b===g&&y===S&&(m=y)),y=x,b=k,S=D,_=A),o[w]=!1,C+=i}else o[w]=!0,C+=i}-1!==y&&(f.set(l.subarray(y,b),S),-1===v&&0===y&&y===S&&(v=b),-1===m&&b===g&&y===S&&(m=y));return[-1===v?-1:v/(4*p),-1===m?-1:m/(4*p),o]},t._renderLine=function(e,t,n,i,o,s,a,c,l){for(var u=l.content,d=l.tokens,h=m(i),p=e.width-h,f=0,g=0,v=0,y=0,b=d.getCount();y<b;y++)for(var S=d.getEndOffset(y),_=d.getForeground(y),C=o.getColor(_);g<S;g++){if(f>p)return;var E=u.charCodeAt(g);if(9===E){var w=c-(g+v)%c;v+=w-1,f+=w*h}else if(32===E)f+=h;else for(var I=r.isFullWidthCharacter(E)?2:1,T=0;T<I;T++)if(2===i?s.x2RenderChar(e,f,a,E,C,t,n):1===i?s.x1RenderChar(e,f,a,E,C,t,n):4===i?s.x2BlockRenderChar(e,f,a,C,t,n):s.x1BlockRenderChar(e,f,a,C,t,n),(f+=h)>p)return}},t}(i.ViewPart);t.Minimap=I,f.registerThemingParticipant(function(e,t){var n=e.getColor(g.scrollbarSliderBackground);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}
var r=e.getColor(g.scrollbarSliderHoverBackground);if(r){var o=r.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+o+"; }")}var s=e.getColor(g.scrollbarSliderActiveBackground);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var c=e.getColor(g.scrollbarShadow);c&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+c+" -6px 0 6px -6px inset; }")})}),define(e[978],t([1,0,85,116,12,26,1192]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n._scrollTop=0,n._width=0,n._updateWidth(),n._shouldShow=!1,n._useShadows=n._context.configuration.editor.viewInfo.scrollbar.useShadows,n._domNode=i.createFastDomNode(document.createElement("div")),n._domNode.setAttribute("role","presentation"),
n._domNode.setAttribute("aria-hidden","true"),n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._updateShouldShow=function(){var e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.editor.layoutInfo,t=0;return t=0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?e.width:e.width-e.minimapWidth-e.verticalScrollbarWidth,this._width!==t&&(this._width=t,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),
this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(r.ViewPart);t.ScrollDecorationViewPart=a,o.registerThemingParticipant(function(e,t){var n=e.getColor(s.scrollbarShadow);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")})}),define(e[979],t([1,0,12,26,188,78,1195]),function(e,t,i,r,o,s){"use strict";function a(e){return new d(e)}function c(e){return new h(e.lineNumber,e.ranges.map(a))}function l(e){return e<0?-e:e}Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.EXTERN=0]="EXTERN",e[e.INTERN=1]="INTERN",e[e.FLAT=2]="FLAT"}(u||(u={}));var d=function(){return function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}(),h=function(){return function(e,t){this.lineNumber=e,this.ranges=t}}(),p=s.isEdgeOrIE,f=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,
n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},
t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t<n;t++){if(e[t].ranges.length>1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,r=null,o=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(c=0;!r&&c<n.length;c++)n[c].lineNumber===s&&(r=n[c].ranges[0]);var a=t[t.length-1].lineNumber;if(a===e.endLineNumber)for(c=n.length-1;!o&&c>=0;c--)n[c].lineNumber===a&&(o=n[c].ranges[0]);r&&!r.startStyle&&(r=null),o&&!o.startStyle&&(o=null)}for(var c=0,u=t.length;c<u;c++){var d=t[c].ranges[0],h=d.left,p=d.left+d.width,f={top:0,bottom:0},g={top:0,bottom:0};if(c>0){var v=t[c-1].ranges[0].left,m=t[c-1].ranges[0].left+t[c-1].ranges[0].width
;l(h-v)<i?f.top=2:h>v&&(f.top=1),l(p-m)<i?g.top=2:v<p&&p<m&&(g.top=1)}else r&&(f.top=r.startStyle.top,g.top=r.endStyle.top);if(c+1<u){var y=t[c+1].ranges[0].left,b=t[c+1].ranges[0].left+t[c+1].ranges[0].width;l(h-y)<i?f.bottom=2:y<h&&h<b&&(f.bottom=1),l(p-b)<i?g.bottom=2:p<b&&(g.bottom=1)}else o&&(f.bottom=o.startStyle.bottom,g.bottom=o.endStyle.bottom);d.startStyle=f,d.endStyle=g}},t.prototype._getVisibleRangesWithStyle=function(e,t,n){var i=(t.linesVisibleRangesForRange(e,!0)||[]).map(c),r=this._visibleRangesHaveGaps(i);return p||r||!this._roundedSelection||this._enrichVisibleRangesWithStyle(t.visibleRange,i,n),i},t.prototype._createSelectionPiece=function(e,t,n,i,r){return'<div class="cslr '+n+'" style="top:'+e.toString()+"px;left:"+i.toString()+"px;width:"+r.toString()+"px;height:"+t+'px;"></div>'},t.prototype._actualRenderOneSelection=function(e,n,i,r){
for(var o=r.length>0&&r[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),c=r.length>0?r[0].lineNumber:0,l=r.length>0?r[r.length-1].lineNumber:0,u=0,d=r.length;u<d;u++){for(var h=r[u],p=h.lineNumber,f=p-n,g=i&&(p===l||p===c)?a:s,v=i&&p===c?1:0,m="",y=0,b=h.ranges.length;y<b;y++){var S=h.ranges[y];if(o){if(1===S.startStyle.top||1===S.startStyle.bottom){m+=this._createSelectionPiece(v,g,t.SELECTION_CLASS_NAME,S.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH);var _=t.EDITOR_BACKGROUND_CLASS_NAME;1===S.startStyle.top&&(_+=" "+t.SELECTION_TOP_RIGHT),1===S.startStyle.bottom&&(_+=" "+t.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(v,g,_,S.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH)}if(1===S.endStyle.top||1===S.endStyle.bottom){m+=this._createSelectionPiece(v,g,t.SELECTION_CLASS_NAME,S.left+S.width,t.ROUNDED_PIECE_WIDTH);var C=t.EDITOR_BACKGROUND_CLASS_NAME;1===S.endStyle.top&&(C+=" "+t.SELECTION_TOP_LEFT),1===S.endStyle.bottom&&(C+=" "+t.SELECTION_BOTTOM_LEFT),
m+=this._createSelectionPiece(v,g,C,S.left+S.width,t.ROUNDED_PIECE_WIDTH)}}var E=t.SELECTION_CLASS_NAME;o&&(0===S.startStyle.top&&(E+=" "+t.SELECTION_TOP_LEFT),0===S.startStyle.bottom&&(E+=" "+t.SELECTION_BOTTOM_LEFT),0===S.endStyle.top&&(E+=" "+t.SELECTION_TOP_RIGHT),0===S.endStyle.bottom&&(E+=" "+t.SELECTION_BOTTOM_RIGHT)),m+=this._createSelectionPiece(v,g,E,S.left,S.width)}e[f]+=m}},t.prototype.prepareRender=function(e){for(var t=[],n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=n;r<=i;r++){t[r-n]=""}for(var o=[],s=0,a=this._selections.length;s<a;s++){var c=this._selections[s];if(c.isEmpty())o[s]=null;else{var l=this._getVisibleRangesWithStyle(c,e,this._previousFrameVisibleRangesWithStyle[s]);o[s]=l,this._actualRenderOneSelection(t,n,this._selections.length>1,l)}}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},
t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(o.DynamicViewOverlay);t.SelectionsOverlay=f,i.registerThemingParticipant(function(e,t){var n=e.getColor(r.editorSelectionBackground);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(r.editorInactiveSelection);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(r.editorSelectionForeground);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")})}),define(e[97],t([1,0,1255,26,12,51]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLineHighlight=i.registerColor("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.localize(0,null)),
t.editorLineHighlightBorder=i.registerColor("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.localize(1,null)),t.editorRangeHighlight=i.registerColor("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.localize(2,null),!0),t.editorRangeHighlightBorder=i.registerColor("editor.rangeHighlightBorder",{dark:null,light:null,hc:i.activeContrastBorder},n.localize(3,null),!0),t.editorCursorForeground=i.registerColor("editorCursor.foreground",{dark:"#AEAFAD",light:o.Color.black,hc:o.Color.white},n.localize(4,null)),t.editorCursorBackground=i.registerColor("editorCursor.background",null,n.localize(5,null)),t.editorWhitespaces=i.registerColor("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.localize(6,null)),t.editorIndentGuides=i.registerColor("editorIndentGuide.background",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},n.localize(7,null)),
t.editorActiveIndentGuides=i.registerColor("editorIndentGuide.activeBackground",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},n.localize(8,null)),t.editorLineNumbers=i.registerColor("editorLineNumber.foreground",{dark:"#5A5A5A",light:"#2B91AF",hc:o.Color.white},n.localize(9,null));var s=i.registerColor("editorActiveLineNumber.foreground",{dark:"#AAAAAA",light:"#0B216F",hc:i.activeContrastBorder},n.localize(10,null),!1,n.localize(11,null));t.editorActiveLineNumber=i.registerColor("editorLineNumber.activeForeground",{dark:s,light:s,hc:s},n.localize(12,null)),t.editorRuler=i.registerColor("editorRuler.foreground",{dark:"#5A5A5A",light:o.Color.lightgrey,hc:o.Color.white},n.localize(13,null)),t.editorCodeLensForeground=i.registerColor("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.localize(14,null)),t.editorBracketMatchBackground=i.registerColor("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.localize(15,null)),
t.editorBracketMatchBorder=i.registerColor("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:"#fff"},n.localize(16,null)),t.editorOverviewRulerBorder=i.registerColor("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.localize(17,null)),t.editorGutter=i.registerColor("editorGutter.background",{dark:i.editorBackground,light:i.editorBackground,hc:i.editorBackground},n.localize(18,null)),t.editorErrorForeground=i.registerColor("editorError.foreground",{dark:"#ea4646",light:"#d60a0a",hc:null},n.localize(19,null)),t.editorErrorBorder=i.registerColor("editorError.border",{dark:null,light:null,hc:o.Color.fromHex("#E47777").transparent(.8)},n.localize(20,null)),t.editorWarningForeground=i.registerColor("editorWarning.foreground",{dark:"#4d9e4d",light:"#117711",hc:null},n.localize(21,null)),t.editorWarningBorder=i.registerColor("editorWarning.border",{dark:null,light:null,hc:o.Color.fromHex("#71B771").transparent(.8)},n.localize(22,null)),
t.editorInfoForeground=i.registerColor("editorInfo.foreground",{dark:"#008000",light:"#008000",hc:null},n.localize(23,null)),t.editorInfoBorder=i.registerColor("editorInfo.border",{dark:null,light:null,hc:o.Color.fromHex("#71B771").transparent(.8)},n.localize(24,null)),t.editorHintForeground=i.registerColor("editorHint.foreground",{dark:o.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},n.localize(25,null)),t.editorHintBorder=i.registerColor("editorHint.border",{dark:null,light:null,hc:o.Color.fromHex("#eeeeee").transparent(.8)},n.localize(26,null)),t.editorUnnecessaryCodeBorder=i.registerColor("editorUnnecessaryCode.border",{dark:null,light:null,hc:o.Color.fromHex("#fff").transparent(.8)},n.localize(27,null)),t.editorUnnecessaryCodeOpacity=i.registerColor("editorUnnecessaryCode.opacity",{dark:o.Color.fromHex("#000a"),light:o.Color.fromHex("#0007"),hc:null},n.localize(28,null));var a=new o.Color(new o.RGBA(0,122,204,.6))
;t.overviewRulerRangeHighlight=i.registerColor("editorOverviewRuler.rangeHighlightForeground",{dark:a,light:a,hc:a},n.localize(29,null),!0),t.overviewRulerError=i.registerColor("editorOverviewRuler.errorForeground",{dark:new o.Color(new o.RGBA(255,18,18,.7)),light:new o.Color(new o.RGBA(255,18,18,.7)),hc:new o.Color(new o.RGBA(255,50,50,1))},n.localize(30,null)),t.overviewRulerWarning=i.registerColor("editorOverviewRuler.warningForeground",{dark:new o.Color(new o.RGBA(18,136,18,.7)),light:new o.Color(new o.RGBA(18,136,18,.7)),hc:new o.Color(new o.RGBA(50,255,50,1))},n.localize(31,null)),t.overviewRulerInfo=i.registerColor("editorOverviewRuler.infoForeground",{dark:new o.Color(new o.RGBA(18,18,136,.7)),light:new o.Color(new o.RGBA(18,18,136,.7)),hc:new o.Color(new o.RGBA(50,50,255,1))},n.localize(32,null)),r.registerThemingParticipant(function(e,n){var r=e.getColor(i.editorBackground);r&&n.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+r+"; }")
;var o=e.getColor(i.editorForeground);o&&n.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+o+"; }");var s=e.getColor(t.editorGutter);s&&n.addRule(".monaco-editor .margin { background-color: "+s+"; }");var a=e.getColor(t.editorRangeHighlight);a&&n.addRule(".monaco-editor .rangeHighlight { background-color: "+a+"; }");var c=e.getColor(t.editorRangeHighlightBorder);c&&n.addRule(".monaco-editor .rangeHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+c+"; }");var l=e.getColor(t.editorWhitespaces);l&&n.addRule(".vs-whitespace { color: "+l+" !important; }")})}),define(e[981],t([1,0,188,12,97,1152]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,
n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},
t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){if(this._shouldShowCurrentLine()){return'<div class="'+("current-line"+(this._willRenderMarginCurrentLine()?" current-line-both":""))+'" style="width:'+String(Math.max(this._scrollWidth,this._contentWidth))+"px; height:"+String(this._lineHeight)+'px;"></div>'}return""}return""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._willRenderMarginCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(i.DynamicViewOverlay);t.CurrentLineHighlightOverlay=s,r.registerThemingParticipant(function(e,t){var n=e.getColor(o.editorLineHighlight)
;if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(o.editorLineHighlightBorder)){var i=e.getColor(o.editorLineHighlightBorder);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}})}),define(e[982],t([1,0,188,12,97,1155]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},
t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var n="current-line";if(this._shouldShowCurrentLine()){
n="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"")}return'<div class="'+n+'" style="width:'+String(this._contentLeft)+"px; height:"+String(this._lineHeight)+'px;"></div>'}return""},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(i.DynamicViewOverlay);t.CurrentLineMarginHighlightOverlay=s,r.registerThemingParticipant(function(e,t){var n=e.getColor(o.editorLineHighlight);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(o.editorLineHighlightBorder);i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),
"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}})}),define(e[983],t([1,0,188,12,97,39,1166]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._primaryLineNumber=0,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._activeIndentEnabled=n._context.configuration.editor.viewInfo.highlightActiveIndentGuide,n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),
e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){
var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize()*this._spaceWidth,r=e.scrollWidth,o=this._lineHeight,a=i,c=this._context.model.getLinesIndentGuides(t,n),l=0,u=0,d=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var h=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);l=h.startLineNumber,u=h.endLineNumber,d=h.indent}for(var p=[],f=t;f<=n;f++){for(var g=l<=f&&f<=u,v=f-t,m=c[v],y="",b=e.visibleRangeForPosition(new s.Position(f,1)),S=b?b.left:0,_=1;_<=m;_++){if(y+='<div class="'+(g&&_===d?"cigra":"cigr")+'" style="left:'+S+"px;height:"+o+"px;width:"+a+'px"></div>',(S+=i)>r)break}p[v]=y}this._renderResult=p}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(i.DynamicViewOverlay);t.IndentGuidesOverlay=a,r.registerThemingParticipant(function(e,t){var n=e.getColor(o.editorIndentGuides)
;n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(o.editorActiveIndentGuides)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")})}),define(e[404],t([1,0,97,12,11,188,39,1174]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new a.Position(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return n(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.editor;this._lineHeight=e.lineHeight,this._renderLineNumbers=e.viewInfo.renderLineNumbers,this._renderCustomLineNumbers=e.viewInfo.renderCustomLineNumbers,this._lineNumbersLeft=e.layoutInfo.lineNumbersLeft,this._lineNumbersWidth=e.layoutInfo.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,
e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new a.Position(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){
var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?'<span class="relative-current-line-number">'+n+"</span>":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n?String(n):n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=o.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s='<div class="'+t.CLASS_NAME+n+'" style="left:'+this._lineNumbersLeft.toString()+"px;width:"+this._lineNumbersWidth.toString()+'px;">',a=[],c=i;c<=r;c++){var l=c-i,u=this._getLineRenderLineNumber(c);a[l]=u?s+u+"</div>":""}this._renderResult=a}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(s.DynamicViewOverlay);t.LineNumbersOverlay=c,r.registerThemingParticipant(function(e,t){
var n=e.getColor(i.editorLineNumbers);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var r=e.getColor(i.editorActiveLineNumber);r&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+r+"; }")})}),define(e[985],t([1,0,11,78,14,423,421,19,60,39,167,197,85,116,488,404,239,1142]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m){"use strict";function y(e,t){var n=document.createElement("canvas").getContext("2d");n.font=function(e){return function(e,t,n,i,r){return e+" normal "+t+" "+n+"px / "+i+"px "+r}("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}(t);var i=n.measureText(e);return r.isFirefox?i.width+2:i.width}Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),S=r.isEdgeOrIE||r.isFirefox,_=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){
return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),C=function(e){function t(t,n,o){var u=e.call(this,t)||this;u._primaryCursorVisibleRange=null,u._viewController=n,u._viewHelper=o;var d=u._context.configuration.editor;u._accessibilitySupport=d.accessibilitySupport,u._contentLeft=d.layoutInfo.contentLeft,u._contentWidth=d.layoutInfo.contentWidth,u._contentHeight=d.layoutInfo.contentHeight,u._scrollLeft=0,u._scrollTop=0,u._fontInfo=d.fontInfo,u._lineHeight=d.lineHeight,u._emptySelectionClipboard=d.emptySelectionClipboard,u._visibleTextArea=null,u._selections=[new l.Selection(1,1,1,1)],u.textArea=p.createFastDomNode(document.createElement("textarea")),f.PartFingerprints.write(u.textArea,6),u.textArea.setClassName("inputarea"),u.textArea.setAttribute("wrap","off"),u.textArea.setAttribute("autocorrect","off"),u.textArea.setAttribute("autocapitalize","off"),u.textArea.setAttribute("autocomplete","off"),
u.textArea.setAttribute("spellcheck","false"),u.textArea.setAttribute("aria-label",d.viewInfo.ariaLabel),u.textArea.setAttribute("role","textbox"),u.textArea.setAttribute("aria-multiline","true"),u.textArea.setAttribute("aria-haspopup","false"),u.textArea.setAttribute("aria-autocomplete","both"),u.textAreaCover=p.createFastDomNode(document.createElement("div")),u.textAreaCover.setPosition("absolute");var g={getLineCount:function(){return u._context.model.getLineCount()},getLineMaxColumn:function(e){return u._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return u._context.model.getValueInRange(e,t)}},v={getPlainTextToCopy:function(){var e=u._context.model.getPlainTextToCopy(u._selections,u._emptySelectionClipboard,i.isWindows),t=u._context.model.getEOL(),n=u._emptySelectionClipboard&&1===u._selections.length&&u._selections[0].isEmpty(),o=Array.isArray(e)?e:null,s=Array.isArray(e)?e.join(t):e,a=null;if(n||o){a={lastCopiedValue:r.isFirefox?s.replace(/\r\n/g,"\n"):s,
isFromEmptySelection:u._emptySelectionClipboard&&1===u._selections.length&&u._selections[0].isEmpty(),multicursorText:o}}return _.INSTANCE.set(a),s},getHTMLToCopy:function(){return u._context.model.getHTMLToCopy(u._selections,u._emptySelectionClipboard)},getScreenReaderContent:function(e){if(r.isIPad)return a.TextAreaState.EMPTY;if(1===u._accessibilitySupport){if(i.isMacintosh){var t=u._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),o=u._getWordBeforePosition(n);if(0===o.length&&(o=u._getCharacterBeforePosition(n)),o.length>0)return new a.TextAreaState(o,o.length,o.length,n,n)}}return a.TextAreaState.EMPTY}return a.PagedScreenReaderStrategy.fromEditorSelection(e,g,u._selections[0],0===u._accessibilitySupport)},deduceModelPosition:function(e,t,n){return u._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return u._textAreaInput=u._register(new s.TextAreaInput(v,u.textArea)),u._register(u._textAreaInput.onKeyDown(function(e){u._viewController.emitKeyDown(e)})),
u._register(u._textAreaInput.onKeyUp(function(e){u._viewController.emitKeyUp(e)})),u._register(u._textAreaInput.onPaste(function(e){var t=_.INSTANCE.get(e.text),n=!1,i=null;t&&(n=u._emptySelectionClipboard&&t.isFromEmptySelection,i=t.multicursorText),u._viewController.paste("keyboard",e.text,n,i)})),u._register(u._textAreaInput.onCut(function(){u._viewController.cut("keyboard")})),u._register(u._textAreaInput.onType(function(e){e.replaceCharCnt?u._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):u._viewController.type("keyboard",e.text)})),u._register(u._textAreaInput.onSelectionChangeRequest(function(e){u._viewController.setSelection("keyboard",e)})),u._register(u._textAreaInput.onCompositionStart(function(){var e=u._selections[0].startLineNumber,t=u._selections[0].startColumn;u._context.privateViewEventBus.emit(new h.ViewRevealRangeRequestEvent(new c.Range(e,t,e,t),0,!0,1));var n=u._viewHelper.visibleRangeForPositionRelativeToEditor(e,t)
;n&&(u._visibleTextArea=new b(u._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,S?0:1),u._render()),u.textArea.setClassName("inputarea ime-input"),u._viewController.compositionStart("keyboard")})),u._register(u._textAreaInput.onCompositionUpdate(function(e){r.isEdgeOrIE?u._visibleTextArea=u._visibleTextArea.setWidth(0):u._visibleTextArea=u._visibleTextArea.setWidth(y(e.data,u._fontInfo)),u._render()})),u._register(u._textAreaInput.onCompositionEnd(function(){u._visibleTextArea=null,u._render(),u.textArea.setClassName("inputarea"),u._viewController.compositionEnd("keyboard")})),u._register(u._textAreaInput.onFocus(function(){u._context.privateViewEventBus.emit(new h.ViewFocusChangedEvent(!0))})),u._register(u._textAreaInput.onBlur(function(){u._context.privateViewEventBus.emit(new h.ViewFocusChangedEvent(!1))})),u}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){
for(var t=this._context.model.getLineContent(e.lineNumber),n=m.getMapForWordSeparators(this._context.configuration.editor.wordSeparators),i=e.column,r=0;i>1;){var o=t.charCodeAt(i-2);if(0!==n.get(o)||r>50)return t.substring(i-1,e.column-1);r++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!o.isHighSurrogate(t.charCodeAt(0)))return t}return""},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,
this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{
var t=new u.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,S?0:1,S?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,r){
var o=this.textArea,s=this.textAreaCover;r?d.Configuration.applyFontInfo(o,this._fontInfo):(o.setFontSize(1),o.setLineHeight(this._fontInfo.lineHeight)),o.setTop(e),o.setLeft(t),o.setWidth(n),o.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(d.Configuration.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),S)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+g.Margin.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+v.LineNumbersOverlay.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(f.ViewPart);t.TextAreaHandler=C}),
define(e[986],t([1,0,116,39,44,97,51,85]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l,u=function(){function e(e,t){this.lineHeight=e.editor.lineHeight,this.pixelRatio=e.editor.pixelRatio,this.overviewRulerLanes=e.editor.viewInfo.overviewRulerLanes,this.renderBorder=e.editor.viewInfo.overviewRulerBorder;var n=t.getColor(s.editorOverviewRulerBorder);this.borderColor=n?n.toString():null,this.hideCursor=e.editor.viewInfo.hideCursorInOverviewRuler;var i=t.getColor(s.editorCursorForeground);this.cursorColor=i?i.transparent(.7).toString():null,this.themeType=t.type;var r=e.editor.viewInfo.minimap.enabled,c=e.editor.viewInfo.minimap.side,l=r?o.TokenizationRegistry.getDefaultBackground():null;this.backgroundColor=null===l||"left"===c?null:a.Color.Format.CSS.formatHex(l);var u=e.editor.layoutInfo.overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,this.canvasWidth=this.domWidth*this.pixelRatio|0,
this.canvasHeight=this.domHeight*this.pixelRatio|0;var d=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes),h=d[0],p=d[1];this.x=h,this.w=p}return e.prototype._initLanes=function(e,t,n){var i=t-e;if(n>=3){var r=i-(s=Math.floor(i/3))-(a=Math.floor(i/3)),o=(c=e)+s;return[[0,c,o,c,l=c+s+r,c,o,c],[0,s,r,s+r,a,s+r+a,r+a,s+r+a]]}if(2===n){var s=Math.floor(i/2),a=i-s,c=e,l=c+s;return[[0,c,c,c,l,c,c,c],[0,s,s,s,a,s+a,s+a,s+a]]}var u=e,d=i;return[[0,u,u,u,u,u,u,u],[0,d,d,d,d,d,d,d]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e}()
;!function(e){e[e.MIN_DECORATION_HEIGHT=6]="MIN_DECORATION_HEIGHT"}(l||(l={}));var d;!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(d||(d={}));var h=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=c.createFastDomNode(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setAttribute("aria-hidden","true"),n._settings=null,n._updateSettings(!1),n._tokensColorTrackerListener=o.TokenizationRegistry.onDidChange(function(e){e.changedColorMap&&n._updateSettings(!0)}),n._cursorPositions=[],n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new u(this._context.configuration,this._context.theme);return(null===this._settings||!this._settings.equals(t))&&(this._settings=t,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,e&&this._render(),!0)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;t<n;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(r.Position.compare),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)},t.prototype.getDomNode=function(){return this._domNode.domNode},
t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._render()},t.prototype._render=function(){var e=this._settings.canvasWidth,t=this._settings.canvasHeight,n=this._settings.lineHeight,i=this._context.viewLayout,r=t/this._context.viewLayout.getScrollHeight(),o=this._context.model.getAllOverviewRulerDecorations(this._context.theme),s=6*this._settings.pixelRatio|0,a=s/2|0,c=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?c.clearRect(0,0,e,t):(c.fillStyle=this._settings.backgroundColor,c.fillRect(0,0,e,t));var l=this._settings.x,u=this._settings.w,d=Object.keys(o);d.sort();for(var h=0,p=d.length;h<p;h++){var f=d[h],g=o[f];c.fillStyle=f;for(var v=0,m=0,y=0,b=0,S=g.length;b<S;b++){var _=g[3*b],C=g[3*b+1],E=g[3*b+2],w=i.getVerticalOffsetForLineNumber(C)*r|0;if((L=(i.getVerticalOffsetForLineNumber(E)+n)*r|0)-w<s){(A=(w+L)/2|0)<a?A=a:A+a>t&&(A=t-a),w=A-a,L=A+a}w>y+1||_!==v?(0!==b&&c.fillRect(l[v],m,u[v],y-m),v=_,m=w,y=L):L>y&&(y=L)}c.fillRect(l[v],m,u[v],y-m)}
if(!this._settings.hideCursor){var I=2*this._settings.pixelRatio|0,T=I/2|0,x=this._settings.x[7],k=this._settings.w[7];c.fillStyle=this._settings.cursorColor;for(var m=-100,y=-100,b=0,S=this._cursorPositions.length;b<S;b++){var D=this._cursorPositions[b],A=i.getVerticalOffsetForLineNumber(D.lineNumber)*r|0;A<T?A=T:A+T>t&&(A=t-T);var L=(w=A-T)+I;w>y+1?(0!==b&&c.fillRect(x,m,k,y-m),m=w,y=L):L>y&&(y=L)}c.fillRect(x,m,k,y-m)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,t),c.stroke(),c.moveTo(0,0),c.lineTo(e,0),c.stroke())},t}(i.ViewPart);t.DecorationsOverviewRuler=h}),define(e[987],t([1,0,85,116,12,97,1190]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=i.createFastDomNode(document.createElement("div")),n.domNode.setAttribute("role","presentation"),
n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[],n._rulers=n._context.configuration.editor.viewInfo.rulers,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e<t)for(var n=this._context.model.getTabSize(),r=t-e;r>0;){(s=i.createFastDomNode(document.createElement("div"))).setClassName("view-ruler"),s.setWidth(n),
this.domNode.appendChild(s),this._renderedRulers.push(s),r--}else for(var o=e-t;o>0;){var s=this._renderedRulers.pop();this.domNode.removeChild(s),o--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t<n;t++){var i=this._renderedRulers[t];i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(this._rulers[t]*this._typicalHalfwidthCharacterWidth)}},t}(r.ViewPart);t.Rulers=a,o.registerThemingParticipant(function(e,t){var n=e.getColor(s.editorRuler);n&&t.addRule(".monaco-editor .view-ruler { box-shadow: 1px 0 0 0 "+n+" inset; }")})}),define(e[988],t([1,0,116,918,85,18,12,97,133,1200]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t){var n=e.call(this,t)||this;return n._readOnly=n._context.configuration.editor.readOnly,n._cursorBlinking=n._context.configuration.editor.viewInfo.cursorBlinking,n._cursorStyle=n._context.configuration.editor.viewInfo.cursorStyle,n._selectionIsEmpty=!0,
n._primaryCursor=new r.ViewCursor(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=o.createFastDomNode(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new s.TimeoutTimer,n._cursorFlatBlinkInterval=new s.IntervalTimer,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),
this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),e.viewInfo&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0},t.prototype._onCursorPositionChanged=function(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length)for(var n=t.length-this._secondaryCursors.length,i=0;i<n;i++){var o=new r.ViewCursor(this._context);this._domNode.domNode.insertBefore(o.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(o)}else if(this._secondaryCursors.length>t.length)for(var s=this._secondaryCursors.length-t.length,i=0;i<s;i++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1);for(i=0;i<t.length;i++)this._secondaryCursors[i].onCursorPositionChanged(t[i])},t.prototype.onCursorStateChanged=function(e){
for(var t=[],n=0,i=e.selections.length;n<i;n++)t[n]=e.selections[n].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));var r=e.selections[0].isEmpty();return this._selectionIsEmpty!==r&&(this._selectionIsEmpty=r,this._updateDomClassName()),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onFocusChanged=function(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){var t=function(t){for(var n=0,i=e.ranges.length;n<i;n++)if(e.ranges[n].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(var n=0;n<this._secondaryCursors.length;n++)if(t(this._secondaryCursors[n].getPosition()))return!0;return!1},
t.prototype.onZonesChanged=function(e){return!0},t.prototype._getCursorBlinking=function(){return this._editorHasFocus?this._readOnly?l.TextEditorCursorBlinkingStyle.Solid:this._cursorBlinking:l.TextEditorCursorBlinkingStyle.Hidden},t.prototype._updateBlinking=function(){var e=this;this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();var n=this._getCursorBlinking(),i=n===l.TextEditorCursorBlinkingStyle.Hidden,r=n===l.TextEditorCursorBlinkingStyle.Solid;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),i||r||(n===l.TextEditorCursorBlinkingStyle.Blink?this._cursorFlatBlinkInterval.cancelAndSet(function(){e._isVisible?e._hide():e._show()},t.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(function(){e._blinkingEnabled=!0,e._updateDomClassName()},t.BLINK_INTERVAL))},t.prototype._updateDomClassName=function(){this._domNode.setClassName(this._getClassName())},t.prototype._getClassName=function(){var e="cursors-layer"
;switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case l.TextEditorCursorStyle.Line:e+=" cursor-line-style";break;case l.TextEditorCursorStyle.Block:e+=" cursor-block-style";break;case l.TextEditorCursorStyle.Underline:e+=" cursor-underline-style";break;case l.TextEditorCursorStyle.LineThin:e+=" cursor-line-thin-style";break;case l.TextEditorCursorStyle.BlockOutline:e+=" cursor-block-outline-style";break;case l.TextEditorCursorStyle.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case l.TextEditorCursorBlinkingStyle.Blink:e+=" cursor-blink";break;case l.TextEditorCursorBlinkingStyle.Smooth:e+=" cursor-smooth";break;case l.TextEditorCursorBlinkingStyle.Phase:e+=" cursor-phase";break;case l.TextEditorCursorBlinkingStyle.Expand:e+=" cursor-expand";break;case l.TextEditorCursorBlinkingStyle.Solid:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return e},
t.prototype._show=function(){this._primaryCursor.show();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0},t.prototype._hide=function(){this._primaryCursor.hide();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1},t.prototype.prepareRender=function(e){this._primaryCursor.prepareRender(e);for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].prepareRender(e)},t.prototype.render=function(e){var t=[],n=0,i=this._primaryCursor.render(e);i&&(t[n++]=i);for(var r=0,o=this._secondaryCursors.length;r<o;r++){var s=this._secondaryCursors[r].render(e);s&&(t[n++]=s)}this._renderData=t},t.prototype.getLastRenderData=function(){return this._renderData},t.BLINK_INTERVAL=500,t}(i.ViewPart);t.ViewCursors=u,a.registerThemingParticipant(function(e,t){var n=e.getColor(c.editorCursorForeground);if(n){var i=e.getColor(c.editorCursorBackground);i||(i=n.opposite()),
t.addRule(".monaco-editor .cursor { background-color: "+n+"; border-color: "+n+"; color: "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid "+i+"; border-right: 1px solid "+i+"; }")}})}),define(e[989],t([1,0,9,8,85,19,227,985,974,928,1069,917,1085,981,982,1086,314,404,983,976,488,1088,1091,1095,986,1096,987,978,979,988,1103,116,1068,230,975,1074,970,977,197,12]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V){"use strict";function z(e){try{return e()}catch(e){i.onUnexpectedError(e)}}Object.defineProperty(t,"__esModule",{value:!0});var H=function(e){function t(t,n,i,r,o,s){var a=e.call(this)||this;a._cursor=o,a._renderAnimationFrame=null,a.outgoingEvents=new P.ViewOutgoingEvents(r);var h=new u.ViewController(n,r,s,a.outgoingEvents,t);return a.eventDispatcher=new d.ViewEventDispatcher(function(e){return a._renderOnce(e)}),a.eventDispatcher.addEventHandler(a),
a._context=new O.ViewContext(n,i.getTheme(),r,a.eventDispatcher),a._register(i.onThemeChange(function(e){a._context.theme=e,a.eventDispatcher.emit(new B.ViewThemeChangedEvent),a.render(!0,!1)})),a.viewParts=[],a._textAreaHandler=new c.TextAreaHandler(a._context,h,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.createViewParts(),a._setLayout(),a.pointerHandler=new l.PointerHandler(a._context,h,a.createPointerHandlerHelper()),a._register(r.addEventListener(function(e){a.eventDispatcher.emitMany(e)})),a._register(a._cursor.addEventListener(function(e){a.eventDispatcher.emitMany(e)})),a}return n(t,e),t.prototype.createViewParts=function(){this.linesContent=o.createFastDomNode(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=o.createFastDomNode(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),
this.overflowGuardContainer=o.createFastDomNode(document.createElement("div")),R.PartFingerprints.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new F.EditorScrollbar(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new S.ViewLines(this._context,this.linesContent),this.viewZones=new L.ViewZones(this._context),this.viewParts.push(this.viewZones);var e=new I.DecorationsOverviewRuler(this._context);this.viewParts.push(e);var t=new k.ScrollDecorationViewPart(this._context);this.viewParts.push(t);var n=new h.ContentViewOverlays(this._context);this.viewParts.push(n),n.addDynamicOverlay(new f.CurrentLineHighlightOverlay(this._context)),n.addDynamicOverlay(new D.SelectionsOverlay(this._context)),n.addDynamicOverlay(new b.IndentGuidesOverlay(this._context)),n.addDynamicOverlay(new v.DecorationsOverlay(this._context));var i=new h.MarginViewOverlays(this._context)
;this.viewParts.push(i),i.addDynamicOverlay(new g.CurrentLineMarginHighlightOverlay(this._context)),i.addDynamicOverlay(new m.GlyphMarginOverlay(this._context)),i.addDynamicOverlay(new E.MarginViewLineDecorationsOverlay(this._context)),i.addDynamicOverlay(new C.LinesDecorationsOverlay(this._context)),i.addDynamicOverlay(new y.LineNumbersOverlay(this._context));var r=new _.Margin(this._context);r.getDomNode().appendChild(this.viewZones.marginDomNode),r.getDomNode().appendChild(i.getDomNode()),this.viewParts.push(r),this.contentWidgets=new p.ViewContentWidgets(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new A.ViewCursors(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new w.ViewOverlayWidgets(this._context),this.viewParts.push(this.overlayWidgets);var s=new x.Rulers(this._context);this.viewParts.push(s);var a=new W.Minimap(this._context);if(this.viewParts.push(a),e){var c=this._scrollbar.getOverviewRulerLayoutInfo()
;c.parent.insertBefore(e.getDomNode(),c.insertBefore)}this.linesContent.appendChild(n.getDomNode()),this.linesContent.appendChild(s.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(r.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(a.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){
this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new s.Range(t,n,t,n));return i?i[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,n){e._flushAccumulatedAndRenderNow()
;var i=e.viewLines.visibleRangesForRange2(new s.Range(t,n,t,n));return i?i[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.editor.editorClassName+" "+V.getThemeTypeSelector(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},
t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,n=this.viewParts.length;t<n;t++)this.viewParts[t].dispose();this.viewParts=[],e.prototype.dispose.call(this)},t.prototype._renderOnce=function(e){var t=z(e);return this._scheduleRender(),t},t.prototype._scheduleRender=function(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=r.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))},t.prototype._onRenderScheduled=function(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()},t.prototype._renderNow=function(){var e=this;z(function(){
return e._actualRender()})},t.prototype._getViewPartsToRender=function(){for(var e=[],t=0,n=0,i=this.viewParts.length;n<i;n++){var r=this.viewParts[n];r.shouldRender()&&(e[t++]=r)}return e},t.prototype._actualRender=function(){if(r.isInDOM(this.domNode.domNode)){var e=this._getViewPartsToRender();if(this.viewLines.shouldRender()||0!==e.length){var t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);var n=new N.ViewportData(this._cursor.getViewSelections(),t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this.contentWidgets.shouldRender()&&this.contentWidgets.onBeforeRender(n),this.viewLines.shouldRender()&&(this.viewLines.renderText(n),this.viewLines.onDidRender(),e=this._getViewPartsToRender());for(var i=new M.RenderingContext(this._context.viewLayout,n,this.viewLines),o=0,s=e.length;o<s;o++){(a=e[o]).prepareRender(i)}for(var o=0,s=e.length;o<s;o++){var a=e[o];a.render(i),a.onDidRender()}}}},
t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.restoreState=function(e){this._context.viewLayout.setScrollPositionNow({scrollTop:e.scrollTop}),this._renderNow(),this.viewLines.updateLineWidths(),this._context.viewLayout.setScrollPositionNow({scrollLeft:e.scrollLeft})},t.prototype.getOffsetForColumn=function(e,t){var n=this._context.model.validateModelPosition({lineNumber:e,column:t}),i=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();var r=this.viewLines.visibleRangesForRange2(new s.Range(i.lineNumber,i.column,i.lineNumber,i.column));return r?r[0].left:-1},t.prototype.getTargetAtClientPoint=function(e,t){return this.pointerHandler.getTargetAtClientPoint(e,t)},t.prototype.getInternalEventBus=function(){return this.outgoingEvents},t.prototype.createOverviewRuler=function(e){return new T.OverviewRuler(this._context,e)},t.prototype.change=function(e){var t=this,n=!1
;return this._renderOnce(function(){var r={addZone:function(e){return n=!0,t.viewZones.addZone(e)},removeZone:function(e){e&&(n=t.viewZones.removeZone(e)||n)},layoutZone:function(e){e&&(n=t.viewZones.layoutZone(e)||n)}};!function(e,t){try{e(t)}catch(e){i.onUnexpectedError(e)}}(e,r),r.addZone=null,r.removeZone=null,n&&(t._context.viewLayout.onHeightMaybeChanged(),t._context.privateViewEventBus.emit(new B.ViewZonesChangedEvent))}),n},t.prototype.render=function(e,t){if(t){this.viewLines.forceShouldRender();for(var n=0,i=this.viewParts.length;n<i;n++){this.viewParts[n].forceShouldRender()}}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()},t.prototype.focus=function(){this._textAreaHandler.focusTextArea()},t.prototype.isFocused=function(){return this._textAreaHandler.isFocused()},t.prototype.addContentWidget=function(e){this.contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()},t.prototype.layoutContentWidget=function(e){
var t=e.position?e.position.position:null,n=e.position?e.position.preference:null;this.contentWidgets.setWidgetPosition(e.widget,t,n),this._scheduleRender()},t.prototype.removeContentWidget=function(e){this.contentWidgets.removeWidget(e.widget),this._scheduleRender()},t.prototype.addOverlayWidget=function(e){this.overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()},t.prototype.layoutOverlayWidget=function(e){var t=e.position?e.position.preference:null;this.overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()},t.prototype.removeOverlayWidget=function(e){this.overlayWidgets.removeWidget(e.widget),this._scheduleRender()},t}(a.ViewEventHandler);t.View=H}),define(e[157],t([1,0,1231,8,9,7,5,4,6,137,15,167,827,130,39,19,60,186,837,483,55,66,44,43,57,22,71,29,12,989,32,1008,97,370,1211,1214]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N){"use strict";function F(e){return j+encodeURIComponent(e.toString())+q}
Object.defineProperty(t,"__esModule",{value:!0});var W=0,B="showUnused",V=function(e){function t(t,n,i,r,a,c,l,u,d){var f=e.call(this)||this;f._onDidDispose=f._register(new s.Emitter),f.onDidDispose=f._onDidDispose.event,f._onDidChangeModelContent=f._register(new s.Emitter),f.onDidChangeModelContent=f._onDidChangeModelContent.event,f._onDidChangeModelLanguage=f._register(new s.Emitter),f.onDidChangeModelLanguage=f._onDidChangeModelLanguage.event,f._onDidChangeModelLanguageConfiguration=f._register(new s.Emitter),f.onDidChangeModelLanguageConfiguration=f._onDidChangeModelLanguageConfiguration.event,f._onDidChangeModelOptions=f._register(new s.Emitter),f.onDidChangeModelOptions=f._onDidChangeModelOptions.event,f._onDidChangeModelDecorations=f._register(new s.Emitter),f.onDidChangeModelDecorations=f._onDidChangeModelDecorations.event,f._onDidChangeConfiguration=f._register(new s.Emitter),f.onDidChangeConfiguration=f._onDidChangeConfiguration.event,f._onDidChangeModel=f._register(new s.Emitter),
f.onDidChangeModel=f._onDidChangeModel.event,f._onDidChangeCursorPosition=f._register(new s.Emitter),f.onDidChangeCursorPosition=f._onDidChangeCursorPosition.event,f._onDidChangeCursorSelection=f._register(new s.Emitter),f.onDidChangeCursorSelection=f._onDidChangeCursorSelection.event,f._onDidAttemptReadOnlyEdit=f._register(new s.Emitter),f.onDidAttemptReadOnlyEdit=f._onDidAttemptReadOnlyEdit.event,f._onDidLayoutChange=f._register(new s.Emitter),f.onDidLayoutChange=f._onDidLayoutChange.event,f._editorTextFocus=f._register(new H),f.onDidFocusEditorText=f._editorTextFocus.onDidChangeToTrue,f.onDidBlurEditorText=f._editorTextFocus.onDidChangeToFalse,f._editorWidgetFocus=f._register(new H),f.onDidFocusEditorWidget=f._editorWidgetFocus.onDidChangeToTrue,f.onDidBlurEditorWidget=f._editorWidgetFocus.onDidChangeToFalse,f._onWillType=f._register(new s.Emitter),f.onWillType=f._onWillType.event,f._onDidType=f._register(new s.Emitter),f.onDidType=f._onDidType.event,f._onDidPaste=f._register(new s.Emitter),
f.onDidPaste=f._onDidPaste.event,f._onMouseUp=f._register(new s.Emitter),f.onMouseUp=f._onMouseUp.event,f._onMouseDown=f._register(new s.Emitter),f.onMouseDown=f._onMouseDown.event,f._onMouseDrag=f._register(new s.Emitter),f.onMouseDrag=f._onMouseDrag.event,f._onMouseDrop=f._register(new s.Emitter),f.onMouseDrop=f._onMouseDrop.event,f._onContextMenu=f._register(new s.Emitter),f.onContextMenu=f._onContextMenu.event,f._onMouseMove=f._register(new s.Emitter),f.onMouseMove=f._onMouseMove.event,f._onMouseLeave=f._register(new s.Emitter),f.onMouseLeave=f._onMouseLeave.event,f._onKeyUp=f._register(new s.Emitter),f.onKeyUp=f._onKeyUp.event,f._onKeyDown=f._register(new s.Emitter),f.onKeyDown=f._onKeyDown.event,f._onDidScrollChange=f._register(new s.Emitter),f.onDidScrollChange=f._onDidScrollChange.event,f._onDidChangeViewZones=f._register(new s.Emitter),f.onDidChangeViewZones=f._onDidChangeViewZones.event,f.domElement=t,f.id=++W,f._decorationTypeKeysToIds={},f._decorationTypeSubtypes={},
f.isSimpleWidget=i.isSimpleWidget||!1,f._telemetryData=i.telemetryData||null,n=n||{},f._configuration=f._register(f._createConfiguration(n)),f._register(f._configuration.onDidChange(function(e){f._onDidChangeConfiguration.fire(e),e.layoutInfo&&f._onDidLayoutChange.fire(f._configuration.editor.layoutInfo),f._configuration.editor.showUnused?f.domElement.classList.add(B):f.domElement.classList.remove(B)})),f._contextKeyService=f._register(l.createScoped(f.domElement)),f._notificationService=d,f._codeEditorService=a,f._commandService=c,f._themeService=u,f._register(new K(f,f._contextKeyService)),f._register(new U(f,f._contextKeyService)),f._instantiationService=r.createChild(new h.ServiceCollection([p.IContextKeyService,f._contextKeyService])),f._attachModel(null),f._contributions={},f._actions={},f._focusTracker=new G(t),f._focusTracker.onChange(function(){f._editorWidgetFocus.setValue(f._focusTracker.hasFocus())}),f.contentWidgets={},f.overlayWidgets={};var g=i.contributions
;Array.isArray(g)||(g=O.EditorExtensionsRegistry.getEditorContributions());for(var v=0,m=g.length;v<m;v++){var y=g[v];try{var b=f._instantiationService.createInstance(y,f);f._contributions[b.getId()]=b}catch(e){o.onUnexpectedError(e)}}return O.EditorExtensionsRegistry.getEditorActions().forEach(function(e){var t=new M.InternalEditorAction(e.id,e.label,e.alias,e.precondition,function(){return f._instantiationService.invokeFunction(function(t){return e.runEditorCommand(t,f,null)})},f._contextKeyService);f._actions[t.id]=t}),f._codeEditorService.addCodeEditor(f),f}return n(t,e),t.prototype._createConfiguration=function(e){return new f.Configuration(e,this.domElement)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return S.EditorType.ICodeEditor},t.prototype.dispose=function(){this._codeEditorService.removeCodeEditor(this),this.contentWidgets={},this.overlayWidgets={},this._focusTracker.dispose()
;for(var t=Object.keys(this._contributions),n=0,i=t.length;n<i;n++){var r=t[n];this._contributions[r].dispose()}this._contributions={},this._actions={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),e.prototype.dispose.call(this)},t.prototype.invokeWithinContext=function(e){return this._instantiationService.invokeFunction(e)},t.prototype.updateOptions=function(e){this._configuration.updateOptions(e)},t.prototype.getConfiguration=function(){return this._configuration.editor},t.prototype.getRawConfiguration=function(){return this._configuration.getRawOptions()},t.prototype.getValue=function(e){if(void 0===e&&(e=null),this.model){var t=!(!e||!e.preserveBOM),n=x.EndOfLinePreference.TextDefined;return e&&e.lineEnding&&"\n"===e.lineEnding?n=x.EndOfLinePreference.LF:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=x.EndOfLinePreference.CRLF),this.model.getValue(n,t)}return""},t.prototype.setValue=function(e){this.model&&this.model.setValue(e)},
t.prototype.getModel=function(){return this.model},t.prototype.setModel=function(e){if(void 0===e&&(e=null),this.model!==e){var t=this._detachModel();this._attachModel(e);var n={oldModelUrl:t?t.uri:null,newModelUrl:e?e.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(n),this._postDetachModelCleanup(t)}},t.prototype._removeDecorationTypes=function(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(var e in this._decorationTypeSubtypes){var t=this._decorationTypeSubtypes[e];for(var n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}},t.prototype.getVisibleRanges=function(){return this.hasView?this.viewModel.getVisibleRanges():[]},t.prototype.getWhitespaces=function(){return this.hasView?this.viewModel.viewLayout.getWhitespaces():[]},t.prototype._getVerticalOffsetForPosition=function(e,t){var n=this.model.validatePosition({lineNumber:e,column:t}),i=this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n)
;return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)},t.prototype.getTopForLineNumber=function(e){return this.hasView?this._getVerticalOffsetForPosition(e,1):-1},t.prototype.getTopForPosition=function(e,t){return this.hasView?this._getVerticalOffsetForPosition(e,t):-1},t.prototype.setHiddenAreas=function(e){this.viewModel&&this.viewModel.setHiddenAreas(e.map(function(e){return y.Range.lift(e)}))},t.prototype.getVisibleColumnFromPosition=function(e){if(!this.model)return e.column;var t=this.model.validatePosition(e),n=this.model.getOptions().tabSize;return v.CursorColumns.visibleColumnFromColumn(this.model.getLineContent(t.lineNumber),t.column,n)+1},t.prototype.getPosition=function(){return this.cursor?this.cursor.getPosition().clone():null},t.prototype.setPosition=function(e){if(this.cursor){if(!m.Position.isIPosition(e))throw new Error("Invalid arguments");this.cursor.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,
positionLineNumber:e.lineNumber,positionColumn:e.column}])}},t.prototype._sendRevealRange=function(e,t,n,i){if(this.model&&this.cursor){if(!y.Range.isIRange(e))throw new Error("Invalid arguments");var r=this.model.validateRange(e),o=this.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this.cursor.emitCursorRevealRange(o,t,n,i)}},t.prototype.revealLine=function(e,t){void 0===t&&(t=0),this._revealLine(e,0,t)},t.prototype.revealLineInCenter=function(e,t){void 0===t&&(t=0),this._revealLine(e,1,t)},t.prototype.revealLineInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this._revealLine(e,2,t)},t.prototype._revealLine=function(e,t,n){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new y.Range(e,1,e,1),t,!1,n)},t.prototype.revealPosition=function(e,t){void 0===t&&(t=0),this._revealPosition(e,0,!0,t)},t.prototype.revealPositionInCenter=function(e,t){void 0===t&&(t=0),this._revealPosition(e,1,!0,t)},
t.prototype.revealPositionInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this._revealPosition(e,2,!0,t)},t.prototype._revealPosition=function(e,t,n,i){if(!m.Position.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new y.Range(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)},t.prototype.getSelection=function(){return this.cursor?this.cursor.getSelection().clone():null},t.prototype.getSelections=function(){if(!this.cursor)return null;for(var e=this.cursor.getSelections(),t=[],n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t},t.prototype.setSelection=function(e){var t=b.Selection.isISelection(e),n=y.Range.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){var i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i)}},t.prototype._setSelectionImpl=function(e){if(this.cursor){
var t=new b.Selection(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this.cursor.setSelections("api",[t])}},t.prototype.revealLines=function(e,t,n){void 0===n&&(n=0),this._revealLines(e,t,0,n)},t.prototype.revealLinesInCenter=function(e,t,n){void 0===n&&(n=0),this._revealLines(e,t,1,n)},t.prototype.revealLinesInCenterIfOutsideViewport=function(e,t,n){void 0===n&&(n=0),this._revealLines(e,t,2,n)},t.prototype._revealLines=function(e,t,n,i){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new y.Range(e,1,t,1),n,!1,i)},t.prototype.revealRange=function(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=!1),void 0===i&&(i=!0),this._revealRange(e,n?1:0,i,t)},t.prototype.revealRangeInCenter=function(e,t){void 0===t&&(t=0),this._revealRange(e,1,!0,t)},t.prototype.revealRangeInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this._revealRange(e,2,!0,t)},t.prototype.revealRangeAtTop=function(e,t){void 0===t&&(t=0),
this._revealRange(e,3,!0,t)},t.prototype._revealRange=function(e,t,n,i){if(!y.Range.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(y.Range.lift(e),t,n,i)},t.prototype.setSelections=function(e){if(this.cursor){if(!e||0===e.length)throw new Error("Invalid arguments");for(var t=0,n=e.length;t<n;t++)if(!b.Selection.isISelection(e[t]))throw new Error("Invalid arguments");this.cursor.setSelections("api",e)}},t.prototype.getScrollWidth=function(){return this.hasView?this.viewModel.viewLayout.getScrollWidth():-1},t.prototype.getScrollLeft=function(){return this.hasView?this.viewModel.viewLayout.getCurrentScrollLeft():-1},t.prototype.getScrollHeight=function(){return this.hasView?this.viewModel.viewLayout.getScrollHeight():-1},t.prototype.getScrollTop=function(){return this.hasView?this.viewModel.viewLayout.getCurrentScrollTop():-1},t.prototype.setScrollLeft=function(e){if(this.hasView){if("number"!=typeof e)throw new Error("Invalid arguments");this.viewModel.viewLayout.setScrollPositionNow({
scrollLeft:e})}},t.prototype.setScrollTop=function(e){if(this.hasView){if("number"!=typeof e)throw new Error("Invalid arguments");this.viewModel.viewLayout.setScrollPositionNow({scrollTop:e})}},t.prototype.setScrollPosition=function(e){this.hasView&&this.viewModel.viewLayout.setScrollPositionNow(e)},t.prototype.saveViewState=function(){if(!this.cursor||!this.hasView)return null;for(var e={},t=Object.keys(this._contributions),n=0,i=t.length;n<i;n++){var r=t[n],o=this._contributions[r];"function"==typeof o.saveViewState&&(e[r]=o.saveViewState())}return{cursorState:this.cursor.saveState(),viewState:this.viewModel.saveState(),contributionsState:e}},t.prototype.restoreViewState=function(e){if(this.cursor&&this.hasView&&e&&e.cursorState&&e.viewState){var t=e.cursorState;Array.isArray(t)?this.cursor.restoreState(t):this.cursor.restoreState([t]);for(var n=e.contributionsState||{},i=Object.keys(this._contributions),r=0,o=i.length;r<o;r++){var s=i[r],a=this._contributions[s]
;"function"==typeof a.restoreViewState&&a.restoreViewState(n[s])}var c=this.viewModel.reduceRestoreState(e.viewState),l=this.viewModel.viewLayout.getLinesViewportDataAtScrollTop(c.scrollTop),u=this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new m.Position(l.startLineNumber,1)),d=this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new m.Position(l.endLineNumber,1));this.model.tokenizeViewport(u.lineNumber,d.lineNumber),this._view.restoreState(c)}},t.prototype.onVisible=function(){},t.prototype.onHide=function(){},t.prototype.getContribution=function(e){return this._contributions[e]||null},t.prototype.getActions=function(){for(var e=[],t=Object.keys(this._actions),n=0,i=t.length;n<i;n++){var r=t[n];e.push(this._actions[r])}return e},t.prototype.getSupportedActions=function(){var e=this.getActions();return e=e.filter(function(e){return e.isSupported()})},t.prototype.getAction=function(e){return this._actions[e]||null},t.prototype.trigger=function(e,t,n){if(n=n||{},
t===S.Handler.Type){if(!this.cursor||"string"!=typeof n.text||0===n.text.length)return;return"keyboard"===e&&this._onWillType.fire(n.text),this.cursor.trigger(e,t,n),void("keyboard"===e&&this._onDidType.fire(n.text))}if(t!==S.Handler.Paste){var i=this.getAction(t);i?u.TPromise.as(i.run()).then(null,o.onUnexpectedError):this.cursor&&(this._triggerEditorCommand(e,t,n)||this.cursor.trigger(e,t,n))}else{if(!this.cursor||"string"!=typeof n.text||0===n.text.length)return;var r=this.cursor.getSelection().getStartPosition();this.cursor.trigger(e,t,n);var s=this.cursor.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire(new y.Range(r.lineNumber,r.column,s.lineNumber,s.column))}},t.prototype._triggerEditorCommand=function(e,t,n){var i=O.EditorExtensionsRegistry.getEditorCommand(t);return!!i&&(n=n||{},n.source=e,u.TPromise.as(i.runEditorCommand(null,this,n)).done(null,o.onUnexpectedError),!0)},t.prototype._getCursors=function(){return this.cursor},t.prototype._getCursorConfiguration=function(){
return this.cursor.context.config},t.prototype.pushUndoStop=function(){return!!this.model&&(!this._configuration.editor.readOnly&&(this.model.pushStackElement(),!0))},t.prototype.executeEdits=function(e,t,n){return!!this.cursor&&(!this._configuration.editor.readOnly&&(this.model.pushEditOperations(this.cursor.getSelections(),t,function(){return n||null}),n&&this.cursor.setSelections(e,n),!0))},t.prototype.executeCommand=function(e,t){this.cursor&&this.cursor.trigger(e,S.Handler.ExecuteCommand,t)},t.prototype.executeCommands=function(e,t){this.cursor&&this.cursor.trigger(e,S.Handler.ExecuteCommands,t)},t.prototype.changeDecorations=function(e){return this.model?this.model.changeDecorations(e,this.id):null},t.prototype.getLineDecorations=function(e){return this.model?this.model.getLineDecorations(e,this.id,this._configuration.editor.readOnly):null},t.prototype.deltaDecorations=function(e,t){return this.model?0===e.length&&0===t.length?e:this.model.deltaDecorations(e,t,this.id):[]},
t.prototype.setDecorations=function(e,t){var n={},i=this._decorationTypeSubtypes[e]||{};this._decorationTypeSubtypes[e]=n;for(var r=[],o=0,s=t;o<s.length;o++){var a=s[o],c=e;if(a.renderOptions){c=e+"-"+(u=C.hash(a.renderOptions).toString(16)),i[u]||n[u]||this._registerDecorationType(c,a.renderOptions,e),n[u]=!0}var l=this._resolveDecorationOptions(c,!!a.hoverMessage);a.hoverMessage&&(l.hoverMessage=a.hoverMessage),r.push({range:a.range,options:l})}for(var u in i)n[u]||this._removeDecorationType(e+"-"+u);var d=this._decorationTypeKeysToIds[e]||[];this._decorationTypeKeysToIds[e]=this.deltaDecorations(d,r)},t.prototype.setDecorationsFast=function(e,t){var n=this._decorationTypeSubtypes[e]||{};for(var i in n)this._removeDecorationType(e+"-"+i);this._decorationTypeSubtypes[e]={};for(var r=w.ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(e,!1)),o=new Array(t.length),s=0,a=t.length;s<a;s++)o[s]={range:t[s],options:r};var c=this._decorationTypeKeysToIds[e]||[]
;this._decorationTypeKeysToIds[e]=this.deltaDecorations(c,o)},t.prototype.removeDecorations=function(e){var t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]},t.prototype.getLayoutInfo=function(){return this._configuration.editor.layoutInfo},t.prototype.createOverviewRuler=function(e){return this._view.createOverviewRuler(e)},t.prototype.getDomNode=function(){return this.hasView?this._view.domNode.domNode:null},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.hasView&&this._view.delegateVerticalScrollbarMouseDown(e)},t.prototype.layout=function(e){this._configuration.observeReferenceElement(e),this.render()},t.prototype.focus=function(){this.hasView&&this._view.focus()},t.prototype.hasTextFocus=function(){return this.hasView&&this._view.isFocused()},t.prototype.hasWidgetFocus=function(){
return this._focusTracker&&this._focusTracker.hasFocus()},t.prototype.addContentWidget=function(e){var t={widget:e,position:e.getPosition()};this.contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this.contentWidgets[e.getId()]=t,this.hasView&&this._view.addContentWidget(t)},t.prototype.layoutContentWidget=function(e){var t=e.getId();if(this.contentWidgets.hasOwnProperty(t)){var n=this.contentWidgets[t];n.position=e.getPosition(),this.hasView&&this._view.layoutContentWidget(n)}},t.prototype.removeContentWidget=function(e){var t=e.getId();if(this.contentWidgets.hasOwnProperty(t)){var n=this.contentWidgets[t];delete this.contentWidgets[t],this.hasView&&this._view.removeContentWidget(n)}},t.prototype.addOverlayWidget=function(e){var t={widget:e,position:e.getPosition()};this.overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this.overlayWidgets[e.getId()]=t,this.hasView&&this._view.addOverlayWidget(t)},
t.prototype.layoutOverlayWidget=function(e){var t=e.getId();if(this.overlayWidgets.hasOwnProperty(t)){var n=this.overlayWidgets[t];n.position=e.getPosition(),this.hasView&&this._view.layoutOverlayWidget(n)}},t.prototype.removeOverlayWidget=function(e){var t=e.getId();if(this.overlayWidgets.hasOwnProperty(t)){var n=this.overlayWidgets[t];delete this.overlayWidgets[t],this.hasView&&this._view.removeOverlayWidget(n)}},t.prototype.changeViewZones=function(e){if(this.hasView){this._view.change(e)&&this._onDidChangeViewZones.fire()}},t.prototype.getTargetAtClientPoint=function(e,t){return this.hasView?this._view.getTargetAtClientPoint(e,t):null},t.prototype.getScrolledVisiblePosition=function(e){if(!this.hasView)return null;var t=this.model.validatePosition(e),n=this._configuration.editor.layoutInfo;return{top:this._getVerticalOffsetForPosition(t.lineNumber,t.column)-this.getScrollTop(),
left:this._view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:this._configuration.editor.lineHeight}},t.prototype.getOffsetForColumn=function(e,t){return this.hasView?this._view.getOffsetForColumn(e,t):-1},t.prototype.render=function(){this.hasView&&this._view.render(!0,!1)},t.prototype.applyFontInfo=function(e){f.Configuration.applyFontInfoSlow(e,this._configuration.editor.fontInfo)},t.prototype._attachModel=function(e){var t=this;if(this._view=null,this.model=e||null,this.listenersToRemove=[],this.viewModel=null,this.cursor=null,this.model?(this.domElement.setAttribute("data-mode-id",this.model.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines()),this._configuration.setMaxLineNumber(this.model.getLineCount()),this.model.onBeforeAttached(),this.viewModel=new _.ViewModel(this.id,this._configuration,this.model,function(e){return r.scheduleAtNextAnimationFrame(e)}),
this.listenersToRemove.push(this.model.onDidChangeDecorations(function(e){return t._onDidChangeModelDecorations.fire(e)})),this.listenersToRemove.push(this.model.onDidChangeLanguage(function(e){t.model&&(t.domElement.setAttribute("data-mode-id",t.model.getLanguageIdentifier().language),t._onDidChangeModelLanguage.fire(e))})),this.listenersToRemove.push(this.model.onDidChangeLanguageConfiguration(function(e){return t._onDidChangeModelLanguageConfiguration.fire(e)})),this.listenersToRemove.push(this.model.onDidChangeContent(function(e){return t._onDidChangeModelContent.fire(e)})),this.listenersToRemove.push(this.model.onDidChangeOptions(function(e){return t._onDidChangeModelOptions.fire(e)})),this.listenersToRemove.push(this.model.onWillDispose(function(){return t.setModel(null)})),this.cursor=new g.Cursor(this._configuration,this.model,this.viewModel),this._createView(),this.listenersToRemove.push(this.cursor.onDidReachMaxCursorCount(function(){
t._notificationService.warn(i.localize(0,null,g.Cursor.MAX_CURSOR_COUNT))})),this.listenersToRemove.push(this.cursor.onDidAttemptReadOnlyEdit(function(){t._onDidAttemptReadOnlyEdit.fire(void 0)})),this.listenersToRemove.push(this.cursor.onDidChange(function(e){for(var n=[],i=0,r=e.selections.length;i<r;i++)n[i]=e.selections[i].getPosition();var o={position:n[0],secondaryPositions:n.slice(1),reason:e.reason,source:e.source};t._onDidChangeCursorPosition.fire(o);var s={selection:e.selections[0],secondarySelections:e.selections.slice(1),source:e.source,reason:e.reason};t._onDidChangeCursorSelection.fire(s)}))):this.hasView=!1,this._view){this.domElement.appendChild(this._view.domNode.domNode);for(var n=Object.keys(this.contentWidgets),o=0,s=n.length;o<s;o++){a=n[o];this._view.addContentWidget(this.contentWidgets[a])}for(var o=0,s=(n=Object.keys(this.overlayWidgets)).length;o<s;o++){var a=n[o];this._view.addOverlayWidget(this.overlayWidgets[a])}this._view.render(!1,!0),this.hasView=!0,
this._view.domNode.domNode.setAttribute("data-uri",e.uri.toString())}},t.prototype._createView=function(){var e,t=this;e=this.isSimpleWidget?{paste:function(e,n,i,r){t.cursor.trigger(e,S.Handler.Paste,{text:n,pasteOnNewLine:i,multicursorText:r})},type:function(e,n){t.cursor.trigger(e,S.Handler.Type,{text:n})},replacePreviousChar:function(e,n,i){t.cursor.trigger(e,S.Handler.ReplacePreviousChar,{text:n,replaceCharCnt:i})},compositionStart:function(e){t.cursor.trigger(e,S.Handler.CompositionStart,void 0)},compositionEnd:function(e){t.cursor.trigger(e,S.Handler.CompositionEnd,void 0)},cut:function(e){t.cursor.trigger(e,S.Handler.Cut,void 0)}}:{paste:function(e,n,i,r){t._commandService.executeCommand(S.Handler.Paste,{text:n,pasteOnNewLine:i,multicursorText:r})},type:function(e,n){t._commandService.executeCommand(S.Handler.Type,{text:n})},replacePreviousChar:function(e,n,i){t._commandService.executeCommand(S.Handler.ReplacePreviousChar,{text:n,replaceCharCnt:i})},compositionStart:function(e){
t._commandService.executeCommand(S.Handler.CompositionStart,{})},compositionEnd:function(e){t._commandService.executeCommand(S.Handler.CompositionEnd,{})},cut:function(e){t._commandService.executeCommand(S.Handler.Cut,{})}},this._view=new R.View(e,this._configuration,this._themeService,this.viewModel,this.cursor,function(e,n){t.cursor&&e.runCoreEditorCommand(t.cursor,n)});var n=this._view.getInternalEventBus();n.onDidGainFocus=function(){t._editorTextFocus.setValue(!0),t._editorWidgetFocus.setValue(!0)},n.onDidScroll=function(e){return t._onDidScrollChange.fire(e)},n.onDidLoseFocus=function(){return t._editorTextFocus.setValue(!1)},n.onContextMenu=function(e){return t._onContextMenu.fire(e)},n.onMouseDown=function(e){return t._onMouseDown.fire(e)},n.onMouseUp=function(e){return t._onMouseUp.fire(e)},n.onMouseDrag=function(e){return t._onMouseDrag.fire(e)},n.onMouseDrop=function(e){return t._onMouseDrop.fire(e)},n.onKeyUp=function(e){return t._onKeyUp.fire(e)},n.onMouseMove=function(e){
return t._onMouseMove.fire(e)},n.onMouseLeave=function(e){return t._onMouseLeave.fire(e)},n.onKeyDown=function(e){return t._onKeyDown.fire(e)}},t.prototype._postDetachModelCleanup=function(e){e&&e.removeAllDecorationsWithOwnerId(this.id)},t.prototype._detachModel=function(){var e=null;this._view&&(this._view.dispose(),e=this._view.domNode.domNode,this._view=null),this.model&&this.model.onBeforeDetached(),this.hasView=!1,this.listenersToRemove=c.dispose(this.listenersToRemove),this.cursor&&(this.cursor.dispose(),this.cursor=null),this.viewModel&&(this.viewModel.dispose(),this.viewModel=null);var t=this.model;return this.model=null,this.domElement.removeAttribute("data-mode-id"),e&&this.domElement.removeChild(e),t},t.prototype._registerDecorationType=function(e,t,n){this._codeEditorService.registerDecorationType(e,t,n)},t.prototype._removeDecorationType=function(e){this._codeEditorService.removeDecorationType(e)},t.prototype._resolveDecorationOptions=function(e,t){
return this._codeEditorService.resolveDecorationOptions(e,t)},t.prototype.getTelemetryData=function(){return this._telemetryData},t=a([l(3,d.IInstantiationService),l(4,D.ICodeEditorService),l(5,A.ICommandService),l(6,p.IContextKeyService),l(7,L.IThemeService),l(8,k.INotificationService)],t)}(c.Disposable);t.CodeEditorWidget=V;var z;!function(e){e[e.NotSet=0]="NotSet",e[e.False=1]="False",e[e.True=2]="True"}(z||(z={}));var H=function(e){function t(){var t=e.call(this)||this;return t._onDidChangeToTrue=t._register(new s.Emitter),t.onDidChangeToTrue=t._onDidChangeToTrue.event,t._onDidChangeToFalse=t._register(new s.Emitter),t.onDidChangeToFalse=t._onDidChangeToFalse.event,t._value=0,t}return n(t,e),t.prototype.setValue=function(e){var t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())},t}(c.Disposable);t.BooleanEventEmitter=H;var K=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,
n.createKey("editorId",t.getId()),i._editorFocus=E.EditorContextKeys.focus.bindTo(n),i._textInputFocus=E.EditorContextKeys.textInputFocus.bindTo(n),i._editorTextFocus=E.EditorContextKeys.editorTextFocus.bindTo(n),i._editorTabMovesFocus=E.EditorContextKeys.tabMovesFocus.bindTo(n),i._editorReadonly=E.EditorContextKeys.readOnly.bindTo(n),i._hasMultipleSelections=E.EditorContextKeys.hasMultipleSelections.bindTo(n),i._hasNonEmptySelection=E.EditorContextKeys.hasNonEmptySelection.bindTo(n),i._register(i._editor.onDidChangeConfiguration(function(){return i._updateFromConfig()})),i._register(i._editor.onDidChangeCursorSelection(function(){return i._updateFromSelection()})),i._register(i._editor.onDidFocusEditorWidget(function(){return i._updateFromFocus()})),i._register(i._editor.onDidBlurEditorWidget(function(){return i._updateFromFocus()})),i._register(i._editor.onDidFocusEditorText(function(){return i._updateFromFocus()})),i._register(i._editor.onDidBlurEditorText(function(){return i._updateFromFocus()})),
i._updateFromConfig(),i._updateFromSelection(),i._updateFromFocus(),i}return n(t,e),t.prototype._updateFromConfig=function(){var e=this._editor.getConfiguration();this._editorTabMovesFocus.set(e.tabFocusMode),this._editorReadonly.set(e.readOnly)},t.prototype._updateFromSelection=function(){var e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(function(e){return!e.isEmpty()}))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t}(c.Disposable),U=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._langId=E.EditorContextKeys.languageId.bindTo(n),i._hasCompletionItemProvider=E.EditorContextKeys.hasCompletionItemProvider.bindTo(n),
i._hasCodeActionsProvider=E.EditorContextKeys.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=E.EditorContextKeys.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=E.EditorContextKeys.hasDefinitionProvider.bindTo(n),i._hasImplementationProvider=E.EditorContextKeys.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=E.EditorContextKeys.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=E.EditorContextKeys.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=E.EditorContextKeys.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=E.EditorContextKeys.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=E.EditorContextKeys.hasReferenceProvider.bindTo(n),i._hasRenameProvider=E.EditorContextKeys.hasRenameProvider.bindTo(n),i._hasDocumentFormattingProvider=E.EditorContextKeys.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=E.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(n),
i._hasSignatureHelpProvider=E.EditorContextKeys.hasSignatureHelpProvider.bindTo(n),i._isInWalkThrough=E.EditorContextKeys.isInEmbeddedEditor.bindTo(n);var r=function(){return i._update()};return i._register(t.onDidChangeModel(r)),i._register(t.onDidChangeModelLanguage(r)),i._register(I.SuggestRegistry.onDidChange(r)),i._register(I.CodeActionProviderRegistry.onDidChange(r)),i._register(I.CodeLensProviderRegistry.onDidChange(r)),i._register(I.DefinitionProviderRegistry.onDidChange(r)),i._register(I.ImplementationProviderRegistry.onDidChange(r)),i._register(I.TypeDefinitionProviderRegistry.onDidChange(r)),i._register(I.HoverProviderRegistry.onDidChange(r)),i._register(I.DocumentHighlightProviderRegistry.onDidChange(r)),i._register(I.DocumentSymbolProviderRegistry.onDidChange(r)),i._register(I.ReferenceProviderRegistry.onDidChange(r)),i._register(I.RenameProviderRegistry.onDidChange(r)),i._register(I.DocumentFormattingEditProviderRegistry.onDidChange(r)),
i._register(I.DocumentRangeFormattingEditProviderRegistry.onDidChange(r)),i._register(I.SignatureHelpProviderRegistry.onDidChange(r)),r(),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.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()},t.prototype._update=function(){var e=this._editor.getModel();e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(I.SuggestRegistry.has(e)),
this._hasCodeActionsProvider.set(I.CodeActionProviderRegistry.has(e)),this._hasCodeLensProvider.set(I.CodeLensProviderRegistry.has(e)),this._hasDefinitionProvider.set(I.DefinitionProviderRegistry.has(e)),this._hasImplementationProvider.set(I.ImplementationProviderRegistry.has(e)),this._hasTypeDefinitionProvider.set(I.TypeDefinitionProviderRegistry.has(e)),this._hasHoverProvider.set(I.HoverProviderRegistry.has(e)),this._hasDocumentHighlightProvider.set(I.DocumentHighlightProviderRegistry.has(e)),this._hasDocumentSymbolProvider.set(I.DocumentSymbolProviderRegistry.has(e)),this._hasReferenceProvider.set(I.ReferenceProviderRegistry.has(e)),this._hasRenameProvider.set(I.RenameProviderRegistry.has(e)),this._hasSignatureHelpProvider.set(I.SignatureHelpProviderRegistry.has(e)),this._hasDocumentFormattingProvider.set(I.DocumentFormattingEditProviderRegistry.has(e)||I.DocumentRangeFormattingEditProviderRegistry.has(e)),
this._hasDocumentSelectionFormattingProvider.set(I.DocumentRangeFormattingEditProviderRegistry.has(e)),this._isInWalkThrough.set(e.uri.scheme===T.Schemas.walkThroughSnippet)):this.reset()},t}(c.Disposable);t.EditorModeContext=U;var G=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new s.Emitter),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(r.trackFocus(t)),n._register(n._domFocusTracker.onDidFocus(function(){n._hasFocus=!0,n._onChange.fire(void 0)})),n._register(n._domFocusTracker.onDidBlur(function(){n._hasFocus=!1,n._onChange.fire(void 0)})),n}return n(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t
}(c.Disposable),j=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='"),q=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>"),$=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),Y=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');L.registerThemingParticipant(function(e,t){var n=e.getColor(P.editorErrorBorder);n&&t.addRule(".monaco-editor ."+N.ClassName.EditorErrorDecoration+" { border-bottom: 4px double "+n+"; }");var i=e.getColor(P.editorErrorForeground);i&&t.addRule(".monaco-editor ."+N.ClassName.EditorErrorDecoration+' { background: url("data:image/svg+xml,'+F(i)+'") repeat-x bottom left; }');var r=e.getColor(P.editorWarningBorder)
;r&&t.addRule(".monaco-editor ."+N.ClassName.EditorWarningDecoration+" { border-bottom: 4px double "+r+"; }");var o=e.getColor(P.editorWarningForeground);o&&t.addRule(".monaco-editor ."+N.ClassName.EditorWarningDecoration+' { background: url("data:image/svg+xml,'+F(o)+'") repeat-x bottom left; }');var s=e.getColor(P.editorInfoBorder);s&&t.addRule(".monaco-editor ."+N.ClassName.EditorInfoDecoration+" { border-bottom: 4px double "+s+"; }");var a=e.getColor(P.editorInfoForeground);a&&t.addRule(".monaco-editor ."+N.ClassName.EditorInfoDecoration+' { background: url("data:image/svg+xml,'+F(a)+'") repeat-x bottom left; }');var c=e.getColor(P.editorHintBorder);c&&t.addRule(".monaco-editor ."+N.ClassName.EditorHintDecoration+" { border-bottom: 2px dotted "+c+"; }");var l=e.getColor(P.editorHintForeground);l&&t.addRule(".monaco-editor ."+N.ClassName.EditorHintDecoration+' { background: url("data:image/svg+xml,'+function(e){return $+encodeURIComponent(e.toString())+Y}(l)+'") no-repeat bottom left; }')
;var u=e.getColor(P.editorUnnecessaryCodeOpacity);u&&t.addRule("."+B+" .monaco-editor ."+N.ClassName.EditorUnnecessaryInlineDecoration+" { opacity: "+u.rgba.a+"; }");var d=e.getColor(P.editorUnnecessaryCodeBorder);d&&t.addRule("."+B+" .monaco-editor ."+N.ClassName.EditorUnnecessaryDecoration+" { border-bottom: 2px dashed "+d+"; }")})}),define(e[991],t([1,0,1237,5,8,85,328,322,167,39,12,26,129,97,41,23,32,15,71,209,1206]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S){"use strict";function _(e){for(var t=e.get(b.ICodeEditorService).listDiffEditors(),n=0,i=t.length;n<i;n++){var r=t[n];if(r.hasWidgetFocus())return r}return null}Object.defineProperty(t,"__esModule",{value:!0});var C;!function(e){e[e.Equal=0]="Equal",e[e.Insert=1]="Insert",e[e.Delete=2]="Delete"}(C||(C={}));var E=function(){function e(e,t,n,i){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=n,this.modifiedLineEnd=i}return e.prototype.getType=function(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0},e
}(),w=function(){return function(e){this.entries=e}}(),I=function(e){function t(t){var n=e.call(this)||this;return n._width=0,n._diffEditor=t,n._isVisible=!1,n.shadow=s.createFastDomNode(document.createElement("div")),n.shadow.setClassName("diff-review-shadow"),n.actionBarContainer=s.createFastDomNode(document.createElement("div")),n.actionBarContainer.setClassName("diff-review-actions"),n._actionBar=n._register(new g.ActionBar(n.actionBarContainer.domNode)),n._actionBar.push(new v.Action("diffreview.close",i.localize(0,null),"close-diff-review",!0,function(){return n.hide(),null}),{label:!1,icon:!0}),n.domNode=s.createFastDomNode(document.createElement("div")),n.domNode.setClassName("diff-review monaco-editor-background"),n._content=s.createFastDomNode(document.createElement("div")),n._content.setClassName("diff-review-content"),n.scrollbar=n._register(new p.DomScrollableElement(n._content.domNode,{})),n.domNode.domNode.appendChild(n.scrollbar.getDomNode()),n._register(t.onDidUpdateDiff(function(){
n._isVisible&&(n._diffs=n._compute(),n._render())})),n._register(t.getModifiedEditor().onDidChangeCursorPosition(function(){n._isVisible&&n._render()})),n._register(t.getOriginalEditor().onDidFocusEditorWidget(function(){n._isVisible&&n.hide()})),n._register(t.getModifiedEditor().onDidFocusEditorWidget(function(){n._isVisible&&n.hide()})),n._register(o.addStandardDisposableListener(n.domNode.domNode,"click",function(e){e.preventDefault();var t=o.findParentWithClass(e.target,"diff-review-row");t&&n._goToRow(t)})),n._register(o.addStandardDisposableListener(n.domNode.domNode,"keydown",function(e){(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),n._goToRow(n._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),n._goToRow(n._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),n.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),n.accept())})),n._diffs=[],n._currentDiff=null,n}return n(t,e),
t.prototype.prev=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,n=0,i=this._diffs.length;n<i;n++)if(this._diffs[n]===this._currentDiff){t=n;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());0!==this._diffs.length&&(e%=this._diffs.length,this._diffEditor.setPosition(new u.Position(this._diffs[e].entries[0].modifiedLineStart,1)),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow()))},t.prototype.next=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,n=0,i=this._diffs.length;n<i;n++)if(this._diffs[n]===this._currentDiff){t=n;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());0!==this._diffs.length&&(e%=this._diffs.length,this._diffEditor.setPosition(new u.Position(this._diffs[e].entries[0].modifiedLineStart,1)),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow()))},
t.prototype.accept=function(){var e=-1,t=this._getCurrentFocusedRow();if(t){var n=parseInt(t.getAttribute("data-line"),10);isNaN(n)||(e=n)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new u.Position(e,1)),this._diffEditor.revealPosition(new u.Position(e,1),1))},t.prototype.hide=function(){this._isVisible=!1,this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()},t.prototype._getPrevRow=function(){var e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()},t.prototype._getNextRow=function(){var e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()},t.prototype._getFirstRow=function(){return this.domNode.domNode.querySelector(".diff-review-row")},t.prototype._getCurrentFocusedRow=function(){var e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null},t.prototype._goToRow=function(e){var t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),
this.scrollbar.scanDomNode()},t.prototype.isVisible=function(){return this._isVisible},t.prototype.layout=function(e,t,n){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(n),this._content.setHeight(n),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))},t.prototype._compute=function(){var e=this._diffEditor.getLineChanges();if(!e||0===e.length)return[];var n=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return n&&i?t._mergeAdjacent(e,n.getLineCount(),i.getLineCount()):[]},t._mergeAdjacent=function(e,t,n){if(!e||0===e.length)return[];for(var i=[],r=0,o=0,s=e.length;o<s;o++){
var a=e[o],c=a.originalStartLineNumber,l=a.originalEndLineNumber,u=a.modifiedStartLineNumber,d=a.modifiedEndLineNumber,h=[],p=0,f=0===l?c:c-1,g=0===d?u:u-1,v=1,m=1;if(o>0){var y=e[o-1];v=0===y.originalEndLineNumber?y.originalStartLineNumber+1:y.originalEndLineNumber+1,m=0===y.modifiedEndLineNumber?y.modifiedStartLineNumber+1:y.modifiedEndLineNumber+1}var b=f-3+1,S=g-3+1;if(b<v){b+=A=v-b,S+=A}if(S<m){b+=A=m-S,S+=A}h[p++]=new E(b,f,S,g),0!==l&&(h[p++]=new E(c,l,0,0)),0!==d&&(h[p++]=new E(0,0,u,d));var _=0===l?c+1:l+1,C=0===d?u+1:d+1,I=t,T=n;if(o+1<s){var x=e[o+1];I=0===x.originalEndLineNumber?x.originalStartLineNumber:x.originalStartLineNumber-1,T=0===x.modifiedEndLineNumber?x.modifiedStartLineNumber:x.modifiedStartLineNumber-1}var k=_+3-1,D=C+3-1;if(k>I){k+=A=I-k,D+=A}if(D>T){var A=T-D;k+=A,D+=A}h[p++]=new E(_,k,C,D),i[r++]=new w(h)}for(var L=i[0].entries,R=[],O=0,o=1,s=i.length;o<s;o++){var M=i[o].entries,P=L[L.length-1],N=M[0]
;0===P.getType()&&0===N.getType()&&N.originalLineStart<=P.originalLineEnd?(L[L.length-1]=new E(P.originalLineStart,N.originalLineEnd,P.modifiedLineStart,N.modifiedLineEnd),L=L.concat(M.slice(1))):(R[O++]=new w(L),L=M)}return R[O++]=new w(L),R},t.prototype._findDiffIndex=function(e){for(var t=e.lineNumber,n=0,i=this._diffs.length;n<i;n++){var r=this._diffs[n].entries;if(t<=r[r.length-1].modifiedLineEnd)return n}return 0},t.prototype._render=function(){var e=this._diffEditor.getOriginalEditor().getConfiguration(),n=this._diffEditor.getModifiedEditor().getConfiguration(),r=this._diffEditor.getOriginalEditor().getModel(),s=this._diffEditor.getModifiedEditor().getModel(),a=r.getOptions(),c=s.getOptions();if(!this._isVisible||!r||!s)return o.clearNode(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();var u=this._diffEditor.getPosition(),d=this._findDiffIndex(u);if(this._diffs[d]!==this._currentDiff){this._currentDiff=this._diffs[d]
;var h=this._diffs[d].entries,p=document.createElement("div");p.className="diff-review-table",p.setAttribute("role","list"),l.Configuration.applyFontInfoSlow(p,n.fontInfo);for(var f=0,g=0,v=0,m=0,y=0,b=h.length;y<b;y++){var S=(R=h[y]).originalLineStart,_=R.originalLineEnd,C=R.modifiedLineStart,E=R.modifiedLineEnd;0!==S&&(0===f||S<f)&&(f=S),0!==_&&(0===g||_>g)&&(g=_),0!==C&&(0===v||C<v)&&(v=C),0!==E&&(0===m||E>m)&&(m=E)}var w=document.createElement("div");w.className="diff-review-row";var I=document.createElement("div");I.className="diff-review-cell diff-review-summary";var T=g-f+1,x=m-v+1;I.appendChild(document.createTextNode(d+1+"/"+this._diffs.length+": @@ -"+f+","+T+" +"+v+","+x+" @@")),w.setAttribute("data-line",String(v));var k=function(e){return 0===e?i.localize(1,null):1===e?i.localize(2,null):i.localize(3,null,e)},D=k(T),A=k(x);w.setAttribute("aria-label",i.localize(4,null,d+1,this._diffs.length,f,D,v,A)),w.appendChild(I),w.setAttribute("role","listitem"),p.appendChild(w)
;for(var L=v,y=0,b=h.length;y<b;y++){var R=h[y];t._renderSection(p,R,L,this._width,e,r,a,n,s,c),0!==R.modifiedLineStart&&(L=R.modifiedLineEnd)}o.clearNode(this._content.domNode),this._content.domNode.appendChild(p),this.scrollbar.scanDomNode()}},t._renderSection=function(e,t,n,r,o,s,a,c,l,u){var d=t.getType(),h="diff-review-row",p="",f="diff-review-spacer";switch(d){case 1:h="diff-review-row line-insert",p=" char-insert",f="diff-review-spacer insert-sign";break;case 2:h="diff-review-row line-delete",p=" char-delete",f="diff-review-spacer delete-sign"}for(var g=t.originalLineStart,v=t.originalLineEnd,m=t.modifiedLineStart,y=t.modifiedLineEnd,b=Math.max(y-m,v-g),S=o.layoutInfo.glyphMarginWidth+o.layoutInfo.lineNumbersWidth,_=10+c.layoutInfo.glyphMarginWidth+c.layoutInfo.lineNumbersWidth,C=0;C<=b;C++){var E=0===g?0:g+C,w=0===m?0:m+C,I=document.createElement("div");I.style.minWidth=r+"px",I.className=h,I.setAttribute("role","listitem"),0!==w&&(n=w),I.setAttribute("data-line",String(n))
;var T=document.createElement("div");T.className="diff-review-cell",I.appendChild(T);var x=document.createElement("span");x.style.width=S+"px",x.style.minWidth=S+"px",x.className="diff-review-line-number"+p,0!==E?x.appendChild(document.createTextNode(String(E))):x.innerHTML="&nbsp;",T.appendChild(x);var k=document.createElement("span");k.style.width=_+"px",k.style.minWidth=_+"px",k.style.paddingRight="10px",k.className="diff-review-line-number"+p,0!==w?k.appendChild(document.createTextNode(String(w))):k.innerHTML="&nbsp;",T.appendChild(k);var D=document.createElement("span");D.className=f,D.innerHTML="&nbsp;&nbsp;",T.appendChild(D);var A=void 0;0!==w?(T.insertAdjacentHTML("beforeend",this._renderLine(l,c,u.tabSize,w)),A=l.getLineContent(w)):(T.insertAdjacentHTML("beforeend",this._renderLine(s,o,a.tabSize,E)),A=s.getLineContent(E)),0===A.length&&(A=i.localize(5,null));var L=void 0;switch(d){case 0:L=i.localize(6,null,E,w,A);break;case 1:L=i.localize(7,null,w,A);break;case 2:L=i.localize(8,null,E,A)}
I.setAttribute("aria-label",L),e.appendChild(I)}},t._renderLine=function(e,t,n,i){var r=e.getLineContent(i),o=new Uint32Array(2);o[0]=r.length,o[1]=16793600;var s=new c.LineTokens(o,r),l=S.ViewLineRenderingData.isBasicASCII(r,e.mightContainNonBasicASCII()),u=S.ViewLineRenderingData.containsRTL(r,l,e.mightContainRTL());return a.renderViewLine2(new a.RenderLineInput(t.fontInfo.isMonospace&&!t.viewInfo.disableMonospaceOptimizations,r,!1,l,u,0,s,[],n,t.fontInfo.spaceWidth,t.viewInfo.stopRenderingLineAfter,t.viewInfo.renderWhitespace,t.viewInfo.renderControlCharacters,t.viewInfo.fontLigatures)).html},t}(r.Disposable);t.DiffReview=I,d.registerThemingParticipant(function(e,t){var n=e.getColor(f.editorLineNumbers);n&&t.addRule(".monaco-diff-editor .diff-review-line-number { color: "+n+"; }");var i=e.getColor(h.scrollbarShadow);i&&t.addRule(".monaco-diff-editor .diff-review-shadow { box-shadow: "+i+" 0 -6px 6px -6px inset; }")});var T=function(e){function t(){return e.call(this,{id:"editor.action.diffReview.next",
label:i.localize(9,null),alias:"Go to Next Difference",precondition:y.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65}})||this}return n(t,e),t.prototype.run=function(e,t){var n=_(e);n&&n.diffReviewNext()},t}(m.EditorAction),x=function(e){function t(){return e.call(this,{id:"editor.action.diffReview.prev",label:i.localize(10,null),alias:"Go to Previous Difference",precondition:y.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089}})||this}return n(t,e),t.prototype.run=function(e,t){var n=_(e);n&&n.diffReviewPrev()},t}(m.EditorAction);m.registerEditorAction(T),m.registerEditorAction(x)}),define(e[341],t([1,0,1232,18,5,24,8,85,152,6,15,71,19,186,195,332,328,157,167,209,137,7,133,12,26,456,66,991,317,22,203,1203]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O){"use strict";function M(e,t,n,i,r){return{range:new g.Range(e,t,n,i),options:r}}function P(e){return e.modifiedEndLineNumber>0}function N(e){return e.originalEndLineNumber>0}
Object.defineProperty(t,"__esModule",{value:!0});var F=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter(function(e){return!t._zonesMap[String(e.id)]})},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones(function(e){for(var n=0,i=t._zones.length;n<i;n++)e.removeZone(t._zones[n])}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])},e.prototype.apply=function(e,t,n,i){var r=this,o=i?O.StableEditorScrollState.capture(e):null;e.changeViewZones(function(e){for(var t=0,i=r._zones.length;t<i;t++)e.removeZone(r._zones[t]);r._zones=[],r._zonesMap={};for(var t=0,o=n.zones.length;t<o;t++){n.zones[t].suppressMouseDown=!0;var s=e.addZone(n.zones[t]);r._zones.push(s),r._zonesMap[String(s)]=!0}}),o&&o.restore(e),this._decorations=e.deltaDecorations(this._decorations,n.decorations),t&&t.setZones(n.overviewZones)},e}(),W=0,B=function(e){
function t(n,i,o,s,a,l,d,h){var f=e.call(this)||this;f._onDidDispose=f._register(new w.Emitter),f.onDidDispose=f._onDidDispose.event,f._onDidUpdateDiff=f._register(new w.Emitter),f.onDidUpdateDiff=f._onDidUpdateDiff.event,f._lastOriginalWarning=null,f._lastModifiedWarning=null,f._editorWorkerService=o,f._codeEditorService=l,f._contextKeyService=f._register(s.createScoped(n)),f._contextKeyService.createKey("isInDiffEditor",!0),f._themeService=d,f._notificationService=h,f.id=++W,f._domElement=n,i=i||{},f._renderSideBySide=!0,void 0!==i.renderSideBySide&&(f._renderSideBySide=i.renderSideBySide),f._ignoreTrimWhitespace=!0,void 0!==i.ignoreTrimWhitespace&&(f._ignoreTrimWhitespace=i.ignoreTrimWhitespace),f._renderIndicators=!0,void 0!==i.renderIndicators&&(f._renderIndicators=i.renderIndicators),f._originalIsEditable=!1,void 0!==i.originalEditable&&(f._originalIsEditable=Boolean(i.originalEditable)),f._updateDecorationsRunner=f._register(new r.RunOnceScheduler(function(){return f._updateDecorations()},0)),
f._containerDomElement=document.createElement("div"),f._containerDomElement.className=t._getClassName(f._themeService.getTheme(),f._renderSideBySide),f._containerDomElement.style.position="relative",f._containerDomElement.style.height="100%",f._domElement.appendChild(f._containerDomElement),f._overviewViewportDomElement=u.createFastDomNode(document.createElement("div")),f._overviewViewportDomElement.setClassName("diffViewport"),f._overviewViewportDomElement.setPosition("absolute"),f._overviewDomElement=document.createElement("div"),f._overviewDomElement.className="diffOverview",f._overviewDomElement.style.position="absolute",f._overviewDomElement.appendChild(f._overviewViewportDomElement.domNode),f._register(c.addStandardDisposableListener(f._overviewDomElement,"mousedown",function(e){f.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),f._containerDomElement.appendChild(f._overviewDomElement),f._createLeftHandSide(),f._createRightHandSide(),f._beginUpdateDecorationsTimeout=-1,
f._currentlyChangingViewZones=!1,f._diffComputationToken=0,f._originalEditorState=new F,f._modifiedEditorState=new F,f._isVisible=!0,f._isHandlingScrollEvent=!1,f._width=0,f._height=0,f._reviewHeight=0,f._lineChanges=null;var g=f._contextKeyService.createScoped();g.createKey("isInDiffLeftEditor",!0);var v=new E.ServiceCollection;v.set(p.IContextKeyService,g);var m=a.createChild(v),y=f._contextKeyService.createScoped();y.createKey("isInDiffRightEditor",!0);var b=new E.ServiceCollection;b.set(p.IContextKeyService,y);var S=a.createChild(b);return f._createLeftHandSideEditor(i,m),f._createRightHandSideEditor(i,S),f._reviewPane=new A.DiffReview(f),f._containerDomElement.appendChild(f._reviewPane.domNode.domNode),f._containerDomElement.appendChild(f._reviewPane.shadow.domNode),f._containerDomElement.appendChild(f._reviewPane.actionBarContainer.domNode),i.automaticLayout&&(f._measureDomElementToken=window.setInterval(function(){return f._measureDomElement(!1)},100)),f._enableSplitViewResizing=!0,
void 0!==i.enableSplitViewResizing&&(f._enableSplitViewResizing=i.enableSplitViewResizing),f._renderSideBySide?f._setStrategy(new U(f._createDataSource(),f._enableSplitViewResizing)):f._setStrategy(new j(f._createDataSource(),f._enableSplitViewResizing)),f._register(d.onThemeChange(function(e){f._strategy&&f._strategy.applyColors(e)&&f._updateDecorationsRunner.schedule(),f._containerDomElement.className=t._getClassName(f._themeService.getTheme(),f._renderSideBySide)})),f._codeEditorService.addDiffEditor(f),f}return n(t,e),Object.defineProperty(t.prototype,"ignoreTrimWhitespace",{get:function(){return this._ignoreTrimWhitespace},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderSideBySide",{get:function(){return this._renderSideBySide},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderIndicators",{get:function(){return this._renderIndicators},enumerable:!0,configurable:!0}),t.prototype.hasWidgetFocus=function(){
return c.isAncestor(document.activeElement,this._domElement)},t.prototype.diffReviewNext=function(){this._reviewPane.next()},t.prototype.diffReviewPrev=function(){this._reviewPane.prev()},t._getClassName=function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=T.getThemeTypeSelector(e.type)},t.prototype._recreateOverviewRulers=function(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),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._modifiedOverviewRuler=this.modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),
this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode()),this._layoutOverviewRulers()},t.prototype._createLeftHandSide=function(){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)},t.prototype._createRightHandSide=function(){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)},t.prototype._createLeftHandSideEditor=function(e,t){var n=this;this.originalEditor=this._createInnerEditor(t,this._originalDomNode,this._adjustOptionsForLeftHandSide(e,this._originalIsEditable)),this._register(this.originalEditor.onDidScrollChange(function(e){
n._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(n._isHandlingScrollEvent=!0,n.modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),n._isHandlingScrollEvent=!1,n._layoutOverviewViewport())})),this._register(this.originalEditor.onDidChangeViewZones(function(){n._onViewZonesChanged()})),this._register(this.originalEditor.onDidChangeModelContent(function(){n._isVisible&&n._beginUpdateDecorationsSoon()}))},t.prototype._createRightHandSideEditor=function(e,t){var n=this;this.modifiedEditor=this._createInnerEditor(t,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e)),this._register(this.modifiedEditor.onDidScrollChange(function(e){n._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(n._isHandlingScrollEvent=!0,n.originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),n._isHandlingScrollEvent=!1,n._layoutOverviewViewport())})),
this._register(this.modifiedEditor.onDidChangeViewZones(function(){n._onViewZonesChanged()})),this._register(this.modifiedEditor.onDidChangeConfiguration(function(e){e.fontInfo&&n.modifiedEditor.getModel()&&n._onViewZonesChanged()})),this._register(this.modifiedEditor.onDidChangeModelContent(function(){n._isVisible&&n._beginUpdateDecorationsSoon()}))},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(S.CodeEditorWidget,t,n,{})},t.prototype.dispose=function(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),window.clearInterval(this._measureDomElementToken),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._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(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return v.EditorType.IDiffEditor},t.prototype.getLineChanges=function(){return this._lineChanges},t.prototype.getOriginalEditor=function(){
return this.originalEditor},t.prototype.getModifiedEditor=function(){return this.modifiedEditor},t.prototype.updateOptions=function(e){var n=!1;void 0!==e.renderSideBySide&&this._renderSideBySide!==e.renderSideBySide&&(this._renderSideBySide=e.renderSideBySide,n=!0);var i=!1;void 0!==e.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==e.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=e.ignoreTrimWhitespace,i=!0),void 0!==e.renderIndicators&&this._renderIndicators!==e.renderIndicators&&(this._renderIndicators=e.renderIndicators,i=!0),i&&this._beginUpdateDecorations(),void 0!==e.originalEditable&&(this._originalIsEditable=Boolean(e.originalEditable)),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e,this._originalIsEditable)),void 0!==e.enableSplitViewResizing&&(this._enableSplitViewResizing=e.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),
n&&(this._renderSideBySide?this._setStrategy(new U(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new j(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=t._getClassName(this._themeService.getTheme(),this._renderSideBySide))},t.prototype.getModel=function(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}},t.prototype.setModel=function(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this.originalEditor.setModel(e?e.original:null),this.modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this.originalEditor.setScrollTop(0),this.modifiedEditor.setScrollTop(0)),this._lineChanges=null,this._diffComputationToken++,e?(this._recreateOverviewRulers(),this._beginUpdateDecorations()):this._lineChanges=null,
this._layoutOverviewViewport()},t.prototype.getDomNode=function(){return this._domElement},t.prototype.getVisibleColumnFromPosition=function(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)},t.prototype.getPosition=function(){return this.modifiedEditor.getPosition()},t.prototype.setPosition=function(e){this.modifiedEditor.setPosition(e)},t.prototype.revealLine=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealLine(e,t)},t.prototype.revealLineInCenter=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealLineInCenter(e,t)},t.prototype.revealLineInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)},t.prototype.revealPosition=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealPosition(e,t)},t.prototype.revealPositionInCenter=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealPositionInCenter(e,t)},t.prototype.revealPositionInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),
this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)},t.prototype.getSelection=function(){return this.modifiedEditor.getSelection()},t.prototype.getSelections=function(){return this.modifiedEditor.getSelections()},t.prototype.setSelection=function(e){this.modifiedEditor.setSelection(e)},t.prototype.setSelections=function(e){this.modifiedEditor.setSelections(e)},t.prototype.revealLines=function(e,t,n){void 0===n&&(n=0),this.modifiedEditor.revealLines(e,t,n)},t.prototype.revealLinesInCenter=function(e,t,n){void 0===n&&(n=0),this.modifiedEditor.revealLinesInCenter(e,t,n)},t.prototype.revealLinesInCenterIfOutsideViewport=function(e,t,n){void 0===n&&(n=0),this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)},t.prototype.revealRange=function(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=!1),void 0===i&&(i=!0),this.modifiedEditor.revealRange(e,t,n,i)},t.prototype.revealRangeInCenter=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealRangeInCenter(e,t)},
t.prototype.revealRangeInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)},t.prototype.revealRangeAtTop=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealRangeAtTop(e,t)},t.prototype.getSupportedActions=function(){return this.modifiedEditor.getSupportedActions()},t.prototype.saveViewState=function(){return{original:this.originalEditor.saveViewState(),modified:this.modifiedEditor.saveViewState()}},t.prototype.restoreViewState=function(e){if(e.original&&e.original){var t=e;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}},t.prototype.layout=function(e){this._measureDomElement(!1,e)},t.prototype.focus=function(){this.modifiedEditor.focus()},t.prototype.hasTextFocus=function(){return this.originalEditor.hasTextFocus()||this.modifiedEditor.hasTextFocus()},t.prototype.onVisible=function(){this._isVisible=!0,this.originalEditor.onVisible(),this.modifiedEditor.onVisible(),
this._beginUpdateDecorations()},t.prototype.onHide=function(){this._isVisible=!1,this.originalEditor.onHide(),this.modifiedEditor.onHide(),this._cleanViewZonesAndDecorations()},t.prototype.trigger=function(e,t,n){this.modifiedEditor.trigger(e,t,n)},t.prototype.changeDecorations=function(e){return this.modifiedEditor.changeDecorations(e)},t.prototype._measureDomElement=function(e,t){if((t=t||{width:this._containerDomElement.clientWidth,height:this._containerDomElement.clientHeight}).width<=0)return this._width=0,this._height=0,void(this._reviewHeight=0);(e||t.width!==this._width||t.height!==this._height)&&(this._width=t.width,this._height=t.height,this._reviewHeight=this._reviewPane.isVisible()?this._height:0,this._doLayout())},t.prototype._layoutOverviewRulers=function(){var e=t.ENTIRE_DIFF_OVERVIEW_WIDTH-2*t.ONE_OVERVIEW_WIDTH;this.modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:t.ONE_OVERVIEW_WIDTH,right:e+t.ONE_OVERVIEW_WIDTH,height:this._height-this._reviewHeight}),
this._modifiedOverviewRuler.setLayout({top:0,right:0,width:t.ONE_OVERVIEW_WIDTH,height:this._height-this._reviewHeight}))},t.prototype._onViewZonesChanged=function(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()},t.prototype._beginUpdateDecorationsSoon=function(){var e=this;-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(function(){return e._beginUpdateDecorations()},t.UPDATE_DIFF_DECORATIONS_DELAY)},t._equals=function(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()},t.prototype._beginUpdateDecorations=function(){var e=this;this._beginUpdateDecorationsTimeout=-1;var n=this.originalEditor.getModel(),r=this.modifiedEditor.getModel();if(n&&r){this._diffComputationToken++;var o=this._diffComputationToken
;this._editorWorkerService.canComputeDiff(n.uri,r.uri)?this._editorWorkerService.computeDiff(n.uri,r.uri,this._ignoreTrimWhitespace).then(function(t){o===e._diffComputationToken&&n===e.originalEditor.getModel()&&r===e.modifiedEditor.getModel()&&(e._lineChanges=t,e._updateDecorationsRunner.schedule(),e._onDidUpdateDiff.fire())},function(t){o===e._diffComputationToken&&n===e.originalEditor.getModel()&&r===e.modifiedEditor.getModel()&&(e._lineChanges=null,e._updateDecorationsRunner.schedule())}):t._equals(n.uri,this._lastOriginalWarning)&&t._equals(r.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=n.uri,this._lastModifiedWarning=r.uri,this._notificationService.warn(i.localize(0,null)))}},t.prototype._cleanViewZonesAndDecorations=function(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)},t.prototype._updateDecorations=function(){if(this.originalEditor.getModel()&&this.modifiedEditor.getModel()){
var e=this._lineChanges||[],t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,i.original,!1),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,i.modified,!0)}finally{this._currentlyChangingViewZones=!1}}},t.prototype._adjustOptionsForSubEditor=function(e){var t=s.deepClone(e||{});return t.inDiffEditor=!0,t.wordWrap="off",t.wordWrapMinified=!1,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=!1,t.fixedOverflowWidgets=!0,t.lineDecorationsWidth="2ch",t.minimap||(t.minimap={}),t.minimap.enabled=!1,t},
t.prototype._adjustOptionsForLeftHandSide=function(e,t){var n=this._adjustOptionsForSubEditor(e);return n.readOnly=!t,n.overviewRulerLanes=1,n.extraEditorClassName="original-in-monaco-diff-editor",n},t.prototype._adjustOptionsForRightHandSide=function(e){var n=this._adjustOptionsForSubEditor(e);return n.revealHorizontalRightPadding=I.EDITOR_DEFAULTS.viewInfo.revealHorizontalRightPadding+t.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n},t.prototype.doLayout=function(){this._measureDomElement(!0)},t.prototype._doLayout=function(){var e=this._strategy.layout();this._originalDomNode.style.width=e+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=this._width-e+"px",this._modifiedDomNode.style.left=e+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=this._height-this._reviewHeight+"px",this._overviewDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",
this._overviewDomElement.style.left=this._width-t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(t.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this.originalEditor.layout({width:e,height:this._height-this._reviewHeight}),this.modifiedEditor.layout({width:this._width-e-t.ENTIRE_DIFF_OVERVIEW_WIDTH,height:this._height-this._reviewHeight}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(this._height-this._reviewHeight,this._width,this._reviewHeight),this._layoutOverviewViewport()},t.prototype._layoutOverviewViewport=function(){var e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))},t.prototype._computeOverviewViewport=function(){var e=this.modifiedEditor.getLayoutInfo();if(!e)return null
;var t=this.modifiedEditor.getScrollTop(),n=this.modifiedEditor.getScrollHeight(),i=Math.max(0,e.contentHeight),r=Math.max(0,i-0),o=n>0?r/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*o)),top:Math.floor(t*o)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e<t(this._lineChanges[0]))return null;for(var n=0,i=this._lineChanges.length-1;n<i;){
var r=Math.floor((n+i)/2),o=t(this._lineChanges[r]),s=r+1<=i?t(this._lineChanges[r+1]):Number.MAX_VALUE;e<o?i=r-1:e>=s?n=r+1:(n=r,i=r)}return this._lineChanges[n]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.originalStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?i+Math.min(s,o):i+o-r+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.modifiedStartLineNumber});if(!t)return e
;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=o?n+Math.min(s,r):n+r-o+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=a([l(2,m.IEditorWorkerService),l(3,p.IContextKeyService),l(4,h.IInstantiationService),l(5,f.ICodeEditorService),l(6,T.IThemeService),l(7,R.INotificationService)],t)}(o.Disposable);t.DiffEditorWidget=B;var V=function(e){function t(t){var n=e.call(this)||this
;return n._dataSource=t,n}return n(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(x.diffInserted)||x.defaultInsertColor).transparent(2),n=(e.getColor(x.diffRemoved)||x.defaultRemoveColor).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,r,o,s){r=r.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber}),i=i.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber});var a=this._getViewZones(e,i,r,o,s,n),c=this._getOriginalEditorDecorations(e,t,n,o,s),l=this._getModifiedEditorDecorations(e,t,n,o,s);return{original:{decorations:c.decorations,overviewZones:c.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},t}(o.Disposable),z=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,
this._index<this._source.length?this.current=this._source[this._index]:this.current=null},e}(),H=function(){function e(e,t,n){this.lineChanges=e,this.originalForeignVZ=t,this.modifiedForeignVZ=n}return e.prototype.getViewZones=function(){for(var e={original:[],modified:[]},t=0,n=0,i=0,r=0,o=0,s=0,a=function(e,t){return e.afterLineNumber-t.afterLineNumber},c=function(e,t){if(null===t.domNode&&e.length>0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},l=new z(this.modifiedForeignVZ),u=new z(this.originalForeignVZ),d=0,h=this.lineChanges.length;d<=h;d++){var p=d<h?this.lineChanges[d]:null;null!==p?(i=p.originalStartLineNumber+(p.originalEndLineNumber>0?-1:0),r=p.modifiedStartLineNumber+(p.modifiedEndLineNumber>0?-1:0),n=p.originalEndLineNumber>0?p.originalEndLineNumber-p.originalStartLineNumber+1:0,t=p.modifiedEndLineNumber>0?p.modifiedEndLineNumber-p.modifiedStartLineNumber+1:0,
o=Math.max(p.originalStartLineNumber,p.originalEndLineNumber),s=Math.max(p.modifiedStartLineNumber,p.modifiedEndLineNumber)):(o=i+=1e7+n,s=r+=1e7+t);for(var f=[],g=[];l.current&&l.current.afterLineNumber<=s;){v=void 0;v=l.current.afterLineNumber<=r?i-r+l.current.afterLineNumber:o,f.push({afterLineNumber:v,heightInLines:l.current.heightInLines,domNode:null}),l.advance()}for(;u.current&&u.current.afterLineNumber<=o;){var v=void 0;v=u.current.afterLineNumber<=i?r-i+u.current.afterLineNumber:s,g.push({afterLineNumber:v,heightInLines:u.current.heightInLines,domNode:null}),u.advance()}if(null!==p&&P(p)){(m=this._produceOriginalFromDiff(p,n,t))&&f.push(m)}if(null!==p&&N(p)){var m=this._produceModifiedFromDiff(p,n,t);m&&g.push(m)}var y=0,b=0;for(f=f.sort(a),g=g.sort(a);y<f.length&&b<g.length;){var S=f[y],_=g[b],C=S.afterLineNumber-i,E=_.afterLineNumber-r;C<E?(c(e.original,S),y++):E<C?(c(e.modified,_),b++):S.shouldNotShrink?(c(e.original,S),y++):_.shouldNotShrink?(c(e.modified,_),
b++):S.heightInLines>=_.heightInLines?(S.heightInLines-=_.heightInLines,b++):(_.heightInLines-=S.heightInLines,y++)}for(;y<f.length;)c(e.original,f[y]),y++;for(;b<g.length;)c(e.modified,g[b]),b++}var w=function(e){e.domNode||(e.domNode=function(){var e=document.createElement("div");return e.className="diagonal-fill",e}())};return e.original.forEach(w),e.modified.forEach(w),e},e}(),K={charDelete:D.ModelDecorationOptions.register({className:"char-delete"}),charDeleteWholeLine:D.ModelDecorationOptions.register({className:"char-delete",isWholeLine:!0}),charInsert:D.ModelDecorationOptions.register({className:"char-insert"}),charInsertWholeLine:D.ModelDecorationOptions.register({className:"char-insert",isWholeLine:!0}),lineInsert:D.ModelDecorationOptions.register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:D.ModelDecorationOptions.register({className:"line-insert",linesDecorationsClassName:"insert-sign",marginClassName:"line-insert",isWholeLine:!0}),
lineDelete:D.ModelDecorationOptions.register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:D.ModelDecorationOptions.register({className:"line-delete",linesDecorationsClassName:"delete-sign",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:D.ModelDecorationOptions.register({marginClassName:"line-delete"})},U=function(e){function t(t,n){var i=e.call(this,t)||this;return i._disableSash=!1===n,i._sashRatio=null,i._sashPosition=null,i._sash=i._register(new d.Sash(i._dataSource.getContainerDomNode(),i)),i._disableSash&&(i._sash.state=d.SashState.Disabled),i._sash.onDidStart(function(){return i.onSashDragStart()}),i._sash.onDidChange(function(e){return i.onSashDrag(e)}),i._sash.onDidEnd(function(){return i.onSashDragEnd()}),i._sash.onDidReset(function(){return i.onSashReset()}),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.setEnableSplitViewResizing=function(e){var t=!1===e
;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?d.SashState.Disabled:d.SashState.Enabled)},t.prototype.layout=function(e){void 0===e&&(e=this._sashRatio);var n=this._dataSource.getWidth()-B.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.floor((e||.5)*n),r=Math.floor(.5*n);return i=this._disableSash?r:i||r,n>2*t.MINIMUM_EDITOR_WIDTH?(i<t.MINIMUM_EDITOR_WIDTH&&(i=t.MINIMUM_EDITOR_WIDTH),i>n-t.MINIMUM_EDITOR_WIDTH&&(i=n-t.MINIMUM_EDITOR_WIDTH)):i=r,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-B.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()
},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,r){return new G(e,t,n).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,r){for(var o=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=i.getModel(),c=0,l=e.length;c<l;c++){var u=e[c];if(N(u)&&(s.decorations.push({range:new g.Range(u.originalStartLineNumber,1,u.originalEndLineNumber,Number.MAX_VALUE),options:n?K.lineDeleteWithSign:K.lineDelete}),P(u)&&u.charChanges||s.decorations.push(M(u.originalStartLineNumber,1,u.originalEndLineNumber,Number.MAX_VALUE,K.charDeleteWholeLine)),s.overviewZones.push(new k.OverviewRulerZone(u.originalStartLineNumber,u.originalEndLineNumber,o)),u.charChanges))for(var d=0,h=u.charChanges.length;d<h;d++){var p=u.charChanges[d]
;if(N(p))if(t)for(var f=p.originalStartLineNumber;f<=p.originalEndLineNumber;f++){var v=void 0,m=void 0;v=f===p.originalStartLineNumber?p.originalStartColumn:a.getLineFirstNonWhitespaceColumn(f),m=f===p.originalEndLineNumber?p.originalEndColumn:a.getLineLastNonWhitespaceColumn(f),s.decorations.push(M(f,v,f,m,K.charDelete))}else s.decorations.push(M(p.originalStartLineNumber,p.originalStartColumn,p.originalEndLineNumber,p.originalEndColumn,K.charDelete))}}return s},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,r){for(var o=this._insertColor.toString(),s={decorations:[],overviewZones:[]},a=r.getModel(),c=0,l=e.length;c<l;c++){var u=e[c];if(P(u)&&(s.decorations.push({range:new g.Range(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,Number.MAX_VALUE),options:n?K.lineInsertWithSign:K.lineInsert}),N(u)&&u.charChanges||s.decorations.push(M(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,Number.MAX_VALUE,K.charInsertWholeLine)),
s.overviewZones.push(new k.OverviewRulerZone(u.modifiedStartLineNumber,u.modifiedEndLineNumber,o)),u.charChanges))for(var d=0,h=u.charChanges.length;d<h;d++){var p=u.charChanges[d];if(P(p))if(t)for(var f=p.modifiedStartLineNumber;f<=p.modifiedEndLineNumber;f++){var v=void 0,m=void 0;v=f===p.modifiedStartLineNumber?p.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(f),m=f===p.modifiedEndLineNumber?p.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(f),s.decorations.push(M(f,v,f,m,K.charInsert))}else s.decorations.push(M(p.modifiedStartLineNumber,p.modifiedStartColumn,p.modifiedEndLineNumber,p.modifiedEndColumn,K.charInsert))}}return s},t.MINIMUM_EDITOR_WIDTH=100,t}(V),G=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype._produceOriginalFromDiff=function(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{
afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(H),j=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange(function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())})),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,r,o){return new q(e,t,n,i,r,o).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,r){for(var o=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=0,c=e.length;a<c;a++){var l=e[a];N(l)&&(s.decorations.push({range:new g.Range(l.originalStartLineNumber,1,l.originalEndLineNumber,Number.MAX_VALUE),options:K.lineDeleteMargin}),
s.overviewZones.push(new k.OverviewRulerZone(l.originalStartLineNumber,l.originalEndLineNumber,o)))}return s},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,r){for(var o=this._insertColor.toString(),s={decorations:[],overviewZones:[]},a=r.getModel(),c=0,l=e.length;c<l;c++){var u=e[c];if(P(u))if(s.decorations.push({range:new g.Range(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,Number.MAX_VALUE),options:n?K.lineInsertWithSign:K.lineInsert}),s.overviewZones.push(new k.OverviewRulerZone(u.modifiedStartLineNumber,u.modifiedEndLineNumber,o)),u.charChanges)for(var d=0,h=u.charChanges.length;d<h;d++){var p=u.charChanges[d];if(P(p))if(t)for(var f=p.modifiedStartLineNumber;f<=p.modifiedEndLineNumber;f++){var v=void 0,m=void 0;v=f===p.modifiedStartLineNumber?p.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(f),m=f===p.modifiedEndLineNumber?p.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(f),s.decorations.push(M(f,v,f,m,K.charInsert))
}else s.decorations.push(M(p.modifiedStartLineNumber,p.modifiedStartColumn,p.modifiedEndLineNumber,p.modifiedEndColumn,K.charInsert))}else s.decorations.push(M(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,Number.MAX_VALUE,K.charInsertWholeLine))}return s},t.prototype.layout=function(){return Math.max(5,this.decorationsLeft)},t}(V),q=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,i)||this;return a.originalModel=r.getModel(),a.modifiedEditorConfiguration=o.getConfiguration(),a.modifiedEditorTabSize=o.getModel().getOptions().tabSize,a.renderIndicators=s,a}return n(t,e),t.prototype._produceOriginalFromDiff=function(e,t,n){var i=document.createElement("div");return i.className="inline-added-margin-view-zone",_.Configuration.applyFontInfoSlow(i,this.modifiedEditorConfiguration.fontInfo),{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div"),marginDomNode:i}},t.prototype._produceModifiedFromDiff=function(e,t,n){var i=[]
;if(e.charChanges)for(var r=0,o=e.charChanges.length;r<o;r++){var s=e.charChanges[r];N(s)&&i.push(new C.InlineDecoration(new g.Range(s.originalStartLineNumber,s.originalStartColumn,s.originalEndLineNumber,s.originalEndColumn),"char-delete",0))}for(var a=L.createStringBuilder(1e4),c=[],l=this.modifiedEditorConfiguration.layoutInfo.decorationsWidth,u=this.modifiedEditorConfiguration.lineHeight,d=this.modifiedEditorConfiguration.fontInfo.typicalHalfwidthCharacterWidth,h=0,p=e.originalStartLineNumber;p<=e.originalEndLineNumber;p++)if(h=Math.max(h,this._renderOriginalLine(p-e.originalStartLineNumber,this.originalModel,this.modifiedEditorConfiguration,this.modifiedEditorTabSize,p,i,a)),this.renderIndicators){var f=p-e.originalStartLineNumber;c=c.concat(['<div class="delete-sign" style="position:absolute;top:'+f*u+"px;width:"+l+"px;height:"+u+'px;right:0;"></div>'])}h+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var v=document.createElement("div");v.className="view-lines line-delete",
v.innerHTML=a.build(),_.Configuration.applyFontInfoSlow(v,this.modifiedEditorConfiguration.fontInfo);var m=document.createElement("div");return m.className="inline-deleted-margin-view-zone",m.innerHTML=c.join(""),_.Configuration.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:h*d,domNode:v,marginDomNode:m}},t.prototype._renderOriginalLine=function(e,t,n,i,r,o,s){var a=t.getLineTokens(r),c=a.getLineContent(),l=y.LineDecoration.filter(o,r,1,c.length+1);s.appendASCIIString('<div class="view-line'),0===o.length&&s.appendASCIIString(" char-delete"),s.appendASCIIString('" style="top:'),s.appendASCIIString(String(e*n.lineHeight)),s.appendASCIIString('px;width:1000000px;">')
;var u=C.ViewLineRenderingData.isBasicASCII(c,t.mightContainNonBasicASCII()),d=C.ViewLineRenderingData.containsRTL(c,u,t.mightContainRTL()),h=b.renderViewLine(new b.RenderLineInput(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,c,!1,u,d,0,a,l,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures),s);s.appendASCIIString("</div>");var p=h.characterMapping.getAbsoluteOffsets();return p.length>0?p[p.length-1]:0},t}(H);T.registerThemingParticipant(function(e,t){var n=e.getColor(x.diffInserted);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(x.diffRemoved)
;i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var r=e.getColor(x.diffInsertedOutline);r&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var o=e.getColor(x.diffRemovedOutline);o&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var s=e.getColor(x.scrollbarShadow);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }")})}),define(e[218],t([1,0,24,6,29,15,71,157,12,341,195,22]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i,r,o,s,a,c,l){
var u=e.call(this,t,i.getRawConfiguration(),{},r,o,s,a,c,l)||this;return u._parentEditor=i,u._overwriteOptions=n,e.prototype.updateOptions.call(u,u._overwriteOptions),u._register(i.onDidChangeConfiguration(function(e){return u._onParentConfigurationChanged(e)})),u}return n(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){i.mixin(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t=a([l(3,r.IInstantiationService),l(4,c.ICodeEditorService),l(5,o.ICommandService),l(6,s.IContextKeyService),l(7,d.IThemeService),l(8,f.INotificationService)],t)}(u.CodeEditorWidget);t.EmbeddedCodeEditorWidget=g;var v=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,i.getRawConfiguration(),r,o,s,a,c,l)||this;return u._parentEditor=i,
u._overwriteOptions=n,e.prototype.updateOptions.call(u,u._overwriteOptions),u._register(i.onDidChangeConfiguration(function(e){return u._onParentConfigurationChanged(e)})),u}return n(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){i.mixin(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t=a([l(3,p.IEditorWorkerService),l(4,s.IContextKeyService),l(5,r.IInstantiationService),l(6,c.ICodeEditorService),l(7,d.IThemeService),l(8,f.INotificationService)],t)}(h.DiffEditorWidget);t.EmbeddedDiffEditorWidget=v}),define(e[994],t([1,0,1254,43,7,134,5,4,90,19,66,11,17,133,181,370,105,12,97,57,20,25]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";function w(e){return e.toString()}
Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function e(e,t,n){this.model=e,this._markerDecorations=[],this._modelEventListeners=[],this._modelEventListeners.push(e.onWillDispose(function(){return t(e)})),this._modelEventListeners.push(e.onDidChangeLanguage(function(t){return n(e,t)}))}return e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventListeners=s.dispose(this._modelEventListeners),this.model=null},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e)},e}(),T=function(){function e(){}return e.setMarkers=function(e,t){var n=this,i=t.read({resource:e.model.uri,take:500}).map(function(t){return{range:n._createDecorationRange(e.model,t),options:n._createDecorationOption(t)}});e.acceptMarkerDecorations(i)},e._createDecorationRange=function(e,t){var n=d.Range.lift(t)
;if(t.severity===u.MarkerSeverity.Hint&&d.Range.spansMultipleLines(n)&&(n=n.setEndPosition(n.startLineNumber,n.startColumn)),(n=e.validateRange(n)).isEmpty()){var i=e.getWordAtPosition(n.getStartPosition());if(i)n=new d.Range(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn);else{var r=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===r||(n=n.endColumn>=r?new d.Range(n.startLineNumber,r-1,n.endLineNumber,r):new d.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var o=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);o<n.endColumn&&(n=new d.Range(n.startLineNumber,o,n.endLineNumber,n.endColumn),t.startColumn=o)}return n},e._createDecorationOption=function(e){var t,i,r,s,a;switch(e.severity){case u.MarkerSeverity.Hint:
t=e.tags&&e.tags.indexOf(u.MarkerTag.Unnecessary)>=0?m.ClassName.EditorUnnecessaryDecoration:m.ClassName.EditorHintDecoration,s=0;break;case u.MarkerSeverity.Warning:t=m.ClassName.EditorWarningDecoration,i=b.themeColorFromId(S.overviewRulerWarning),r=b.themeColorFromId(S.overviewRulerWarning),s=20;break;case u.MarkerSeverity.Info:t=m.ClassName.EditorInfoDecoration,i=b.themeColorFromId(S.overviewRulerInfo),r=b.themeColorFromId(S.overviewRulerInfo),s=10;break;case u.MarkerSeverity.Error:default:t=m.ClassName.EditorErrorDecoration,i=b.themeColorFromId(S.overviewRulerError),r=b.themeColorFromId(S.overviewRulerError),s=30}e.tags&&-1!==e.tags.indexOf(u.MarkerTag.Unnecessary)&&(a=m.ClassName.EditorUnnecessaryInlineDecoration);var c=null,l=e.message,d=e.source,h=e.relatedInformation;if("string"==typeof l&&(l=l.trim(),d&&(l=/\n/g.test(l)?n.localize(0,null,d,l):n.localize(1,null,d,l)),c=(new o.MarkdownString).appendCodeblock("_",l),!C.isFalsyOrEmpty(h))){c.appendMarkdown("\n");for(var p=0,f=h;p<f.length;p++){
var g=f[p],v=g.message,y=g.resource,w=g.startLineNumber,I=g.startColumn;c.appendMarkdown("* ["+E.basename(y.path)+"("+w+", "+I+")]("+y.toString(!1)+"#"+w+","+I+"): "),c.appendText(""+v),c.appendMarkdown("\n")}c.appendMarkdown("\n")}return{stickiness:_.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:t,hoverMessage:c,showIfCollapsed:!0,overviewRuler:{color:i,darkColor:r,position:_.OverviewRulerLane.Right},zIndex:s,inlineClassName:a}},e}(),x=p.isLinux||p.isMacintosh?_.DefaultEndOfLine.LF:_.DefaultEndOfLine.CRLF,k=function(){function e(e,t){var n=this;this._markerService=e,this._configurationService=t,this._models={},this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._onModelAdded=new r.Emitter,this._onModelRemoved=new r.Emitter,this._onModelModeChanged=new r.Emitter,this._markerService&&(this._markerServiceSubscription=this._markerService.onMarkerChanged(this._handleMarkerChange,this)),
this._configurationServiceSubscription=this._configurationService.onDidChangeConfiguration(function(e){return n._updateModelOptions()}),this._updateModelOptions()}return e._readModelOptions=function(e,t){var n=g.EDITOR_MODEL_DEFAULTS.tabSize;if(e.editor&&void 0!==e.editor.tabSize){var i=parseInt(e.editor.tabSize,10);isNaN(i)||(n=i),n<1&&(n=1)}var r=g.EDITOR_MODEL_DEFAULTS.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));var o=x,s=e.files&&e.files.eol;"\r\n"===s?o=_.DefaultEndOfLine.CRLF:"\n"===s&&(o=_.DefaultEndOfLine.LF);var a=g.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));var c=g.EDITOR_MODEL_DEFAULTS.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));var l=g.EDITOR_MODEL_DEFAULTS.largeFileOptimizations
;return e.editor&&void 0!==e.editor.largeFileOptimizations&&(l="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:n,insertSpaces:r,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:a,largeFileOptimizations:l}},e.prototype.getCreationOptions=function(t,n,i){var r=this._modelCreationOptionsByLanguageAndResource[t+n];return r||(r=e._readModelOptions(this._configurationService.getValue({overrideIdentifier:t,resource:n}),i),this._modelCreationOptionsByLanguageAndResource[t+n]=r),r},e.prototype._updateModelOptions=function(){var t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);for(var n=Object.keys(this._models),i=0,r=n.length;i<r;i++){var o=n[i],s=this._models[o],a=s.model.getLanguageIdentifier().language,c=s.model.uri,l=t[a+c],u=this.getCreationOptions(a,c,s.model.isForSimpleWidget);e._setModelOptionsForModel(s.model,u,l)}},e._setModelOptionsForModel=function(e,t,n){
n&&n.detectIndentation===t.detectIndentation&&n.insertSpaces===t.insertSpaces&&n.tabSize===t.tabSize&&n.trimAutoWhitespace===t.trimAutoWhitespace||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,trimAutoWhitespace:t.trimAutoWhitespace}))},e.prototype.dispose=function(){this._markerServiceSubscription&&this._markerServiceSubscription.dispose(),this._configurationServiceSubscription.dispose()},e.prototype._handleMarkerChange=function(e){var t=this;e.forEach(function(e){var n=w(e),i=t._models[n];i&&T.setMarkers(i,t._markerService)})},e.prototype._cleanUp=function(e){var t=this;e.uri.scheme!==i.Schemas.inMemory&&e.uri.scheme!==i.Schemas.internal&&e.uri.scheme!==i.Schemas.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(function(e){return e.owner}).forEach(function(n){return t._markerService.remove(n,[e.uri])}),
delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language+e.uri]},e.prototype._createModelData=function(e,t,n,i){var r=this,o=this.getCreationOptions(t.language,n,i),s=new h.TextModel(e,o,t,n),a=w(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");var c=new I(s,function(e){return r._onWillDispose(e)},function(e,t){return r._onDidChangeLanguage(e,t)});return this._models[a]=c,c},e.prototype.updateModel=function(t,n){var i=this.getCreationOptions(t.getLanguageIdentifier().language,t.uri,t.isForSimpleWidget),r=h.createTextBuffer(n,i.defaultEOL);t.equalsTextBuffer(r)||(t.pushStackElement(),t.pushEOL("\r\n"===r.getEOL()?_.EndOfLineSequence.CRLF:_.EndOfLineSequence.LF),t.pushEditOperations([],e._computeEdits(t,r),function(e){return[]}),t.pushStackElement())},e._commonPrefix=function(e,t,n,i,r,o){for(var s=Math.min(t,r),a=0,c=0;c<s&&e.getLineContent(n+c)===i.getLineContent(o+c);c++)a++;return a},e._commonSuffix=function(e,t,n,i,r,o){
for(var s=Math.min(t,r),a=0,c=0;c<s&&e.getLineContent(n+t-c)===i.getLineContent(o+r-c);c++)a++;return a},e._computeEdits=function(e,t){var n=e.getLineCount(),i=t.getLineCount(),r=this._commonPrefix(e,n,1,t,i,1);if(n===i&&r===n)return[];var o,s,a=this._commonSuffix(e,n-r,r,t,i-r,r);return a>0?(o=new d.Range(r+1,1,n-a+1,1),s=new d.Range(r+1,1,i-a+1,1)):r>0?(o=new d.Range(r,e.getLineMaxColumn(r),n,e.getLineMaxColumn(n)),s=new d.Range(r,1+t.getLineLength(r),i,1+t.getLineLength(i))):(o=new d.Range(1,1,n,e.getLineMaxColumn(n)),s=new d.Range(1,1,i,1+t.getLineLength(i))),[y.EditOperation.replaceMove(o,t.getValueInRange(s,_.EndOfLinePreference.TextDefined))]},e.prototype.createModel=function(e,t,n,i){void 0===i&&(i=!1);var r;return!t||c.TPromise.is(t)?(r=this._createModelData(e,v.PLAINTEXT_LANGUAGE_IDENTIFIER,n,i),this.setMode(r.model,t)):r=this._createModelData(e,t.getLanguageIdentifier(),n,i),this._markerService&&T.setMarkers(r,this._markerService),this._onModelAdded.fire(r.model),r.model},
e.prototype.setMode=function(e,t){t&&(c.TPromise.is(t)?t.then(function(t){e.isDisposed()||e.setMode(t.getLanguageIdentifier())}):e.setMode(t.getLanguageIdentifier()))},e.prototype.destroyModel=function(e){var t=this._models[w(e)];t&&t.model.dispose()},e.prototype.getModels=function(){for(var e=[],t=Object.keys(this._models),n=0,i=t.length;n<i;n++){var r=t[n];e.push(this._models[r].model)}return e},e.prototype.getModel=function(e){var t=w(e),n=this._models[t];return n?n.model:null},Object.defineProperty(e.prototype,"onModelAdded",{get:function(){return this._onModelAdded?this._onModelAdded.event:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelRemoved",{get:function(){return this._onModelRemoved?this._onModelRemoved.event:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelModeChanged",{get:function(){return this._onModelModeChanged?this._onModelModeChanged.event:null},enumerable:!0,configurable:!0}),e.prototype._onWillDispose=function(e){
var t=w(e.uri),n=this._models[t];delete this._models[t],n.dispose(),this._cleanUp(e),this._onModelRemoved.fire(e)},e.prototype._onDidChangeLanguage=function(t,n){var i=n.oldLanguage,r=t.getLanguageIdentifier().language,o=this.getCreationOptions(i,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(r,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,o),this._onModelModeChanged.fire({model:t,oldModeId:i})},e=a([l(0,u.IMarkerService),l(1,f.IConfigurationService)],e)}();t.ModelServiceImpl=k}),define(e[995],t([1,0,1262,5,39,60,18,32,55,12,97,66,26,57,1215]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=p.registerColor("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.localize(0,null)),v=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:i.localize(1,null),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:l.EditorContextKeys.editorTextFocus,primary:3160}})||this}
return n(t,e),t.prototype.run=function(e,t){var n=b.get(t);n&&n.jumpToBracket()},t}(c.EditorAction),m=function(e){function t(){return e.call(this,{id:"editor.action.selectToBracket",label:i.localize(2,null),alias:"Select to Bracket",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){var n=b.get(t);n&&n.selectToBracket()},t}(c.EditorAction),y=function(){return function(e,t){this.position=e,this.brackets=t}}(),b=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._lastBracketsData=[],n._lastVersionId=0,n._decorations=[],n._updateBracketsSoon=n._register(new a.RunOnceScheduler(function(){return n._updateBrackets()},50)),n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,n._updateBracketsSoon.schedule(),n._register(t.onDidChangeCursorPosition(function(e){n._matchBrackets&&n._updateBracketsSoon.schedule()})),n._register(t.onDidChangeModel(function(e){n._decorations=[],n._updateBracketsSoon.schedule()})),
n._register(t.onDidChangeModelLanguageConfiguration(function(e){n._lastBracketsData=[],n._updateBracketsSoon.schedule()})),n._register(t.onDidChangeConfiguration(function(e){n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,!n._matchBrackets&&n._decorations.length>0&&(n._decorations=n._editor.deltaDecorations(n._decorations,[])),n._updateBracketsSoon.schedule()})),n}return n(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map(function(t){var n=t.getStartPosition(),i=e.matchBracket(n),r=null;if(i)i[0].containsPosition(n)?r=i[1].getStartPosition():i[1].containsPosition(n)&&(r=i[0].getStartPosition());else{var o=e.findNextBracket(n);o&&o.range&&(r=o.range.getStartPosition())}return r?new s.Selection(r.lineNumber,r.column,r.lineNumber,r.column):new s.Selection(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),
this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach(function(n){var i=n.getStartPosition(),r=e.matchBracket(i),o=null,a=null;if(!r){var c=e.findNextBracket(i);c&&c.range&&(r=e.matchBracket(c.range.getStartPosition()))}r&&(r[0].startLineNumber===r[1].startLineNumber?(o=r[1].startColumn<r[0].startColumn?r[1].getStartPosition():r[0].getStartPosition(),a=r[1].startColumn<r[0].startColumn?r[0].getEndPosition():r[1].getEndPosition()):(o=r[1].startLineNumber<r[0].startLineNumber?r[1].getStartPosition():r[0].getStartPosition(),a=r[1].startLineNumber<r[0].startLineNumber?r[0].getEndPosition():r[1].getEndPosition())),o&&a&&t.push(new s.Selection(o.lineNumber,o.column,a.lineNumber,a.column))}),t.length>0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],n=0,i=0,r=this._lastBracketsData.length;i<r;i++){
var o=this._lastBracketsData[i].brackets;o&&(e[n++]={range:o[0],options:t._DECORATION_OPTIONS},e[n++]={range:o[1],options:t._DECORATION_OPTIONS})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}},t.prototype._recomputeBrackets=function(){var e=this._editor.getModel();if(!e)return this._lastBracketsData=[],void(this._lastVersionId=0);var t=e.getVersionId(),n=[];this._lastVersionId===t&&(n=this._lastBracketsData);for(var i=this._editor.getSelections(),r=[],s=0,a=0,c=i.length;a<c;a++){var l=i[a];l.isEmpty()&&(r[s++]=l.getStartPosition())}r.length>1&&r.sort(o.Position.compare);for(var u=[],d=0,h=0,p=n.length,a=0,c=r.length;a<c;a++){for(var f=r[a];h<p&&n[h].position.isBefore(f);)h++;if(h<p&&n[h].position.equals(f))u[d++]=n[h];else{var g=e.matchBracket(f);u[d++]=new y(f,g)}}this._lastBracketsData=u,this._lastVersionId=t},t.ID="editor.contrib.bracketMatchingController",t._DECORATION_OPTIONS=h.ModelDecorationOptions.register({stickiness:f.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
className:"bracket-match",overviewRuler:{color:u.themeColorFromId(g),darkColor:u.themeColorFromId(g),position:f.OverviewRulerLane.Center}}),t}(r.Disposable);t.BracketMatchingController=b,c.registerEditorContribution(b),c.registerEditorAction(m),c.registerEditorAction(v),u.registerThemingParticipant(function(e,t){var n=e.getColor(d.editorBracketMatchBackground);n&&t.addRule(".monaco-editor .bracket-match { background-color: "+n+"; }");var i=e.getColor(d.editorBracketMatchBorder);i&&t.addRule(".monaco-editor .bracket-match { border: 1px solid "+i+"; }")})}),define(e[996],t([1,0,5,14,8,19,45,66,97,12,26,1226]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.onComputedHeight=function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())
},e}(),h=function(){function e(t,n,i,o){var s=this;this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._disposables=[],this._commands=Object.create(null),this._id="codeLensWidget"+ ++e._idPool,this._editor=t,this.setSymbolRange(n),this._domNode=document.createElement("span"),this._domNode.innerHTML="&nbsp;",r.addClass(this._domNode,"codelens-decoration"),r.addClass(this._domNode,"invisible-cl"),this._updateHeight(),this._disposables.push(this._editor.onDidChangeConfiguration(function(e){return e.fontInfo&&s._updateHeight()})),this._disposables.push(r.addDisposableListener(this._domNode,"click",function(e){var n=e.target;if("A"===n.tagName&&n.id){var r=s._commands[n.id];r&&(t.focus(),i.executeCommand.apply(i,[r.id].concat(r.arguments)).done(void 0,function(e){o.error(e)}))}})),this.updateVisibility()}return e.prototype.dispose=function(){n.dispose(this._disposables)},e.prototype._updateHeight=function(){var e=this._editor.getConfiguration(),t=e.fontInfo,n=e.lineHeight
;this._domNode.style.height=Math.round(1.1*n)+"px",this._domNode.style.lineHeight=n+"px",this._domNode.style.fontSize=Math.round(.9*t.fontSize)+"px",this._domNode.innerHTML="&nbsp;"},e.prototype.updateVisibility=function(){this.isVisible()&&(r.removeClass(this._domNode,"invisible-cl"),r.addClass(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),e&&e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n].command,o=i.escape(r.title),s=void 0;r.id?(s=i.format("<a id={0}>{1}</a>",n,o),this._commands[n]=r):s=i.format("<span>{0}</span>",o),t.push(s)}this._domNode.innerHTML=t.join("<span>&nbsp;|&nbsp;</span>"),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,n=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:n},
preference:[s.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),p=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;n<i;n++)this._addDecorationsCallbacks[n](t[n])},e}();t.CodeLensHelper=p;var f=function(){function e(e,t,n,i,r,s,c){var l=this;this._editor=t,this._data=e,this._decorationIds=new Array(this._data.length);var u;this._data.forEach(function(e,t){n.addDecoration({range:e.symbol.range,options:a.ModelDecorationOptions.EMPTY},function(e){return l._decorationIds[t]=e}),
u=u?o.Range.plusRange(u,e.symbol.range):o.Range.lift(e.symbol.range)}),this._contentWidget=new h(t,u,r,s),this._viewZone=new d(u.startLineNumber-1,c),this._viewZoneId=i.addZone(this._viewZone),this._editor.addContentWidget(this._contentWidget)}return e.prototype.dispose=function(e,t){for(;this._decorationIds.length;)e.removeDecoration(this._decorationIds.pop());t&&t.removeZone(this._viewZoneId),this._editor.removeContentWidget(this._contentWidget),this._contentWidget.dispose()},e.prototype.isValid=function(){var e=this;return this._decorationIds.some(function(t,n){var i=e._editor.getModel().getDecorationRange(t),r=e._data[n].symbol;return i&&o.Range.isEmpty(r.range)===i.isEmpty()})},e.prototype.updateCodeLensSymbols=function(e,t){for(var n=this;this._decorationIds.length;)t.removeDecoration(this._decorationIds.pop());this._data=e,this._decorationIds=new Array(this._data.length),this._data.forEach(function(e,i){t.addDecoration({range:e.symbol.range,options:a.ModelDecorationOptions.EMPTY},function(e){
return n._decorationIds[i]=e})})},e.prototype.computeIfNecessary=function(e){if(this._contentWidget.updateVisibility(),!this._contentWidget.isVisible())return null;for(var t=0;t<this._decorationIds.length;t++)this._data[t].symbol.range=e.getDecorationRange(this._decorationIds[t]);return this._data},e.prototype.updateCommands=function(e){this._contentWidget.withCommands(e)},e.prototype.getLineNumber=function(){var e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1},e.prototype.update=function(e){if(this.isValid()){var t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget.setSymbolRange(t),this._editor.layoutContentWidget(this._contentWidget)}},e}();t.CodeLens=f,l.registerThemingParticipant(function(e,t){var n=e.getColor(c.editorCodeLensForeground);n&&t.addRule(".monaco-editor .codelens-decoration { color: "+n+"; }")
;var i=e.getColor(u.editorActiveLinkForeground);i&&t.addRule(".monaco-editor .codelens-decoration > a:hover { color: "+i+" !important; }")})}),define(e[997],t([1,0,18,9,5,4,29,44,32,934,996,22,203]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n){var i=this;this._editor=e,this._commandService=t,this._notificationService=n,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel(function(){return i._onModelChange()})),this._globalToDispose.push(this._editor.onDidChangeModelLanguage(function(){return i._onModelChange()})),this._globalToDispose.push(this._editor.onDidChangeConfiguration(function(e){var t=i._isEnabled;i._isEnabled=i._editor.getConfiguration().contribInfo.codeLens,t!==i._isEnabled&&i._onModelChange()})),
this._globalToDispose.push(c.CodeLensProviderRegistry.onDidChange(this._onModelChange,this)),this._onModelChange()}return e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=r.dispose(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentFindOccPromise&&(this._currentFindOccPromise.cancel(),this._currentFindOccPromise=null),this._localToDispose=r.dispose(this._localToDispose)},e.prototype.getId=function(){return e.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&c.CodeLensProviderRegistry.has(t)){for(var r=0,o=c.CodeLensProviderRegistry.all(t);r<o.length;r++){var s=o[r];if("function"==typeof s.onDidChange){var a=s.onDidChange(function(){return l.schedule()});this._localToDispose.push(a)}}
this._detectVisibleLenses=new n.RunOnceScheduler(function(){e._onViewportChanged()},500);var l=new n.RunOnceScheduler(function(){var n=++e._modelChangeCounter;e._currentFindCodeLensSymbolsPromise&&e._currentFindCodeLensSymbolsPromise.cancel(),e._currentFindCodeLensSymbolsPromise=d.getCodeLensData(t),e._currentFindCodeLensSymbolsPromise.then(function(t){n===e._modelChangeCounter&&(e._renderCodeLensSymbols(t),e._detectVisibleLenses.schedule())},i.onUnexpectedError)},250);this._localToDispose.push(l),this._localToDispose.push(this._detectVisibleLenses),this._localToDispose.push(this._editor.onDidChangeModelContent(function(t){e._editor.changeDecorations(function(t){e._editor.changeViewZones(function(n){var i=[],r=-1;e._lenses.forEach(function(e){e.isValid()&&r!==e.getLineNumber()?(e.update(n),r=e.getLineNumber()):i.push(e)});var o=new h.CodeLensHelper;i.forEach(function(t){t.dispose(o,n),e._lenses.splice(e._lenses.indexOf(t),1)}),o.commit(t)})}),e._detectVisibleLenses.schedule(),l.schedule()})),
this._localToDispose.push(this._editor.onDidScrollChange(function(t){t.scrollTopChanged&&e._lenses.length>0&&e._detectVisibleLenses.schedule()})),this._localToDispose.push(this._editor.onDidLayoutChange(function(t){e._detectVisibleLenses.schedule()})),this._localToDispose.push({dispose:function(){if(e._editor.getModel()){var t=f.StableEditorScrollState.capture(e._editor);e._editor.changeDecorations(function(t){e._editor.changeViewZones(function(n){e._disposeAllLenses(t,n)})}),t.restore(e._editor)}else e._disposeAllLenses(null,null)}}),l.schedule()}},e.prototype._disposeAllLenses=function(e,t){var n=new h.CodeLensHelper;this._lenses.forEach(function(e){return e.dispose(n,t)}),e&&n.commit(e),this._lenses=[]},e.prototype._renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var n,i=this._editor.getModel().getLineCount(),r=[],o=0,s=e;o<s.length;o++){var a=s[o],c=a.symbol.range.startLineNumber;c<1||c>i||(n&&n[n.length-1].symbol.range.startLineNumber===c?n.push(a):(n=[a],r.push(n)))}
var l=f.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(function(e){t._editor.changeViewZones(function(n){for(var i=0,o=0,s=new h.CodeLensHelper;o<r.length&&i<t._lenses.length;){var a=r[o][0].symbol.range.startLineNumber,c=t._lenses[i].getLineNumber();c<a?(t._lenses[i].dispose(s,n),t._lenses.splice(i,1)):c===a?(t._lenses[i].updateCodeLensSymbols(r[o],s),o++,i++):(t._lenses.splice(i,0,new h.CodeLens(r[o],t._editor,s,n,t._commandService,t._notificationService,function(){return t._detectVisibleLenses.schedule()})),i++,o++)}for(;i<t._lenses.length;)t._lenses[i].dispose(s,n),t._lenses.splice(i,1);for(;o<r.length;)t._lenses.push(new h.CodeLens(r[o],t._editor,s,n,t._commandService,t._notificationService,function(){return t._detectVisibleLenses.schedule()})),o++;s.commit(e)})}),l.restore(this._editor)}},e.prototype._onViewportChanged=function(){var e=this;this._currentFindOccPromise&&(this._currentFindOccPromise.cancel(),this._currentFindOccPromise=null);var t=this._editor.getModel()
;if(t){var i=[],r=[];if(this._lenses.forEach(function(e){var n=e.computeIfNecessary(t);n&&(i.push(n),r.push(e))}),0!==i.length){var s=i.map(function(e,i){var s=new Array(e.length),a=e.map(function(e,i){return"function"==typeof e.provider.resolveCodeLens?n.asWinJsPromise(function(n){return e.provider.resolveCodeLens(t,e.symbol,n)}).then(function(e){s[i]=e}):(s[i]=e.symbol,o.TPromise.as(void 0))});return o.TPromise.join(a).then(function(){r[i].updateCommands(s)})});this._currentFindOccPromise=o.TPromise.join(s).then(function(){e._currentFindOccPromise=null})}}},e.ID="css.editor.codeLens",e=a([l(1,s.ICommandService),l(2,p.INotificationService)],e)}();t.CodeLensContribution=g,u.registerEditorContribution(g)}),define(e[998],t([1,0,7,92,8,78,5,215,51,26,12,1245]),function(e,t,i,r,o,s,a,c,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=o.$,p=function(e){function t(t,n,i){var r=e.call(this)||this;r.model=n,r.domNode=h(".colorpicker-header"),o.append(t,r.domNode),
r.pickedColorNode=o.append(r.domNode,h(".picked-color"));var s=o.append(r.domNode,h(".original-color"));return s.style.backgroundColor=l.Color.Format.CSS.format(r.model.originalColor),r.backgroundColor=i.getTheme().getColor(u.editorHoverBackground)||l.Color.white,r._register(d.registerThemingParticipant(function(e,t){r.backgroundColor=e.getColor(u.editorHoverBackground)||l.Color.white})),r._register(o.addDisposableListener(r.pickedColorNode,o.EventType.CLICK,function(){return r.model.selectNextColorPresentation()})),r._register(o.addDisposableListener(s,o.EventType.CLICK,function(){r.model.color=r.model.originalColor,r.model.flushColor()})),r._register(n.onDidChangeColor(r.onDidChangeColor,r)),r._register(n.onDidChangePresentation(r.onDidChangePresentation,r)),r.pickedColorNode.style.backgroundColor=l.Color.Format.CSS.format(n.color),o.toggleClass(r.pickedColorNode,"light",n.color.rgba.a<.5?r.backgroundColor.isLighter():n.color.isLighter()),r}return n(t,e),t.prototype.onDidChangeColor=function(e){
this.pickedColorNode.style.backgroundColor=l.Color.Format.CSS.format(e),o.toggleClass(this.pickedColorNode,"light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()},t.prototype.onDidChangePresentation=function(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""},t}(a.Disposable);t.ColorPickerHeader=p;var f=function(e){function t(t,n,i){var r=e.call(this)||this;return r.model=n,r.pixelRatio=i,r.domNode=h(".colorpicker-body"),o.append(t,r.domNode),r.saturationBox=new g(r.domNode,r.model,r.pixelRatio),r._register(r.saturationBox),r._register(r.saturationBox.onDidChange(r.onDidSaturationValueChange,r)),r._register(r.saturationBox.onColorFlushed(r.flushColor,r)),r.opacityStrip=new m(r.domNode,r.model),r._register(r.opacityStrip),r._register(r.opacityStrip.onDidChange(r.onDidOpacityChange,r)),r._register(r.opacityStrip.onColorFlushed(r.flushColor,r)),r.hueStrip=new y(r.domNode,r.model),r._register(r.hueStrip),
r._register(r.hueStrip.onDidChange(r.onDidHueChange,r)),r._register(r.hueStrip.onColorFlushed(r.flushColor,r)),r}return n(t,e),t.prototype.flushColor=function(){this.model.flushColor()},t.prototype.onDidSaturationValueChange=function(e){var t=e.s,n=e.v,i=this.model.color.hsva;this.model.color=new l.Color(new l.HSVA(i.h,t,n,i.a))},t.prototype.onDidOpacityChange=function(e){var t=this.model.color.hsva;this.model.color=new l.Color(new l.HSVA(t.h,t.s,t.v,e))},t.prototype.onDidHueChange=function(e){var t=this.model.color.hsva,n=360*(1-e);this.model.color=new l.Color(new l.HSVA(360===n?0:n,t.s,t.v,t.a))},t.prototype.layout=function(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()},t}(a.Disposable);t.ColorPickerBody=f;var g=function(e){function t(t,n,r){var s=e.call(this)||this;return s.model=n,s.pixelRatio=r,s._onDidChange=new i.Emitter,s.onDidChange=s._onDidChange.event,s._onColorFlushed=new i.Emitter,s.onColorFlushed=s._onColorFlushed.event,s.domNode=h(".saturation-wrap"),
o.append(t,s.domNode),s.canvas=document.createElement("canvas"),s.canvas.className="saturation-box",o.append(s.domNode,s.canvas),s.selection=h(".saturation-selection"),o.append(s.domNode,s.selection),s.layout(),s._register(o.addDisposableListener(s.domNode,o.EventType.MOUSE_DOWN,function(e){return s.onMouseDown(e)})),s._register(s.model.onDidChangeColor(s.onDidChangeColor,s)),s.monitor=null,s}return n(t,e),t.prototype.onMouseDown=function(e){var t=this;this.monitor=this._register(new c.GlobalMouseMoveMonitor);var n=o.getDomNodePagePosition(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(c.standardMouseMoveMerger,function(e){return t.onDidChangePosition(e.posx-n.left,e.posy-n.top)},function(){return null});var i=o.addDisposableListener(document,o.EventType.MOUSE_UP,function(){t._onColorFlushed.fire(),i.dispose(),t.monitor.stopMonitoring(!0),t.monitor=null},!0)},t.prototype.onDidChangePosition=function(e,t){
var n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})},t.prototype.layout=function(){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();var e=this.model.color.hsva;this.paintSelection(e.s,e.v)},t.prototype.paint=function(){var e=this.model.color.hsva,t=new l.Color(new l.HSVA(e.h,1,1,1)),n=this.canvas.getContext("2d"),i=n.createLinearGradient(0,0,this.canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");var r=n.createLinearGradient(0,0,0,this.canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=l.Color.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()},
t.prototype.paintSelection=function(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"},t.prototype.onDidChangeColor=function(){this.monitor&&this.monitor.isMonitoring()||this.paint()},t}(a.Disposable),v=function(e){function t(t,n){var r=e.call(this)||this;return r.model=n,r._onDidChange=new i.Emitter,r.onDidChange=r._onDidChange.event,r._onColorFlushed=new i.Emitter,r.onColorFlushed=r._onColorFlushed.event,r.domNode=o.append(t,h(".strip")),r.overlay=o.append(r.domNode,h(".overlay")),r.slider=o.append(r.domNode,h(".slider")),r.slider.style.top="0px",r._register(o.addDisposableListener(r.domNode,o.EventType.MOUSE_DOWN,function(e){return r.onMouseDown(e)})),r.layout(),r}return n(t,e),t.prototype.layout=function(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;var e=this.getValue(this.model.color);this.updateSliderPosition(e)},t.prototype.onMouseDown=function(e){
var t=this,n=this._register(new c.GlobalMouseMoveMonitor),i=o.getDomNodePagePosition(this.domNode);o.addClass(this.domNode,"grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),n.startMonitoring(c.standardMouseMoveMerger,function(e){return t.onDidChangeTop(e.posy-i.top)},function(){return null});var r=o.addDisposableListener(document,o.EventType.MOUSE_UP,function(){t._onColorFlushed.fire(),r.dispose(),n.stopMonitoring(!0),o.removeClass(t.domNode,"grabbing")},!0)},t.prototype.onDidChangeTop=function(e){var t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)},t.prototype.updateSliderPosition=function(e){this.slider.style.top=(1-e)*this.height+"px"},t}(a.Disposable),m=function(e){function t(t,n){var i=e.call(this,t,n)||this;return o.addClass(i.domNode,"opacity-strip"),i._register(n.onDidChangeColor(i.onDidChangeColor,i)),i.onDidChangeColor(i.model.color),i}return n(t,e),t.prototype.onDidChangeColor=function(e){
var t=e.rgba,n=t.r,i=t.g,r=t.b,o=new l.Color(new l.RGBA(n,i,r,1)),s=new l.Color(new l.RGBA(n,i,r,0));this.overlay.style.background="linear-gradient(to bottom, "+o+" 0%, "+s+" 100%)"},t.prototype.getValue=function(e){return e.hsva.a},t}(v),y=function(e){function t(t,n){var i=e.call(this,t,n)||this;return o.addClass(i.domNode,"hue-strip"),i}return n(t,e),t.prototype.getValue=function(e){return 1-e.hsva.h/360},t}(v),b=function(e){function t(t,n,i,r){var o=e.call(this)||this;o.model=n,o.pixelRatio=i,o._register(s.onDidChangeZoomLevel(function(){return o.layout()}));var a=h(".colorpicker-widget");t.appendChild(a);var c=new p(a,o.model,r);return o.body=new f(a,o.model,o.pixelRatio),o._register(c),o._register(o.body),o}return n(t,e),t.prototype.getId=function(){return t.ID},t.prototype.layout=function(){this.body.layout()},t.ID="editor.contrib.colorPickerWidget",t}(r.Widget);t.ColorPickerWidget=b}),define(e[999],t([1,0,19,66,26,12,57]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var a=function(){function e(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}return e.prototype.dispose=function(){this._editor.deltaDecorations(this._allDecorations(),[]),this._editor=null,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=null},e.prototype.reset=function(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype.getCount=function(){return this._decorations.length},e.prototype.getFindScope=function(){return this._findScopeDecorationId?this._editor.getModel().getDecorationRange(this._findScopeDecorationId):null},
e.prototype.getStartPosition=function(){return this._startPosition},e.prototype.setStartPosition=function(e){this._startPosition=e,this.setCurrentFindMatch(null)},e.prototype._getDecorationIndex=function(e){var t=this._decorations.indexOf(e);return t>=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var n=this._editor.getModel().getDecorationsInRange(t),i=0,r=n.length;i<r;i++){var o=n[i],s=o.options;if(s===e._FIND_MATCH_DECORATION||s===e._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(o.id)}return 1},e.prototype.setCurrentFindMatch=function(t){var i=this,r=null,o=0;if(t)for(var s=0,a=this._decorations.length;s<a;s++){var c=this._editor.getModel().getDecorationRange(this._decorations[s]);if(t.equalsRange(c)){r=this._decorations[s],o=s+1;break}}return null===this._highlightedDecorationId&&null===r||this._editor.changeDecorations(function(t){if(null!==i._highlightedDecorationId&&(t.changeDecorationOptions(i._highlightedDecorationId,e._FIND_MATCH_DECORATION),
i._highlightedDecorationId=null),null!==r&&(i._highlightedDecorationId=r,t.changeDecorationOptions(i._highlightedDecorationId,e._CURRENT_FIND_MATCH_DECORATION)),null!==i._rangeHighlightDecorationId&&(t.removeDecoration(i._rangeHighlightDecorationId),i._rangeHighlightDecorationId=null),null!==r){var o=i._editor.getModel().getDecorationRange(r);if(o.startLineNumber!==o.endLineNumber&&1===o.endColumn){var s=o.endLineNumber-1,a=i._editor.getModel().getLineMaxColumn(s);o=new n.Range(o.startLineNumber,o.startColumn,s,a)}i._rangeHighlightDecorationId=t.addDecoration(o,e._RANGE_HIGHLIGHT_DECORATION)}}),o},e.prototype.set=function(t,i){var r=this;this._editor.changeDecorations(function(o){var s=e._FIND_MATCH_DECORATION,a=[];if(t.length>1e3){s=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var c=r._editor.getModel().getLineCount(),l=r._editor.getLayoutInfo().height/c,u=Math.max(2,Math.ceil(3/l)),d=t[0].range.startLineNumber,h=t[0].range.endLineNumber,p=1,f=t.length;p<f;p++){var g=t[p].range
;h+u>=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(a.push({range:new n.Range(d,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,h=g.endLineNumber)}a.push({range:new n.Range(d,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}for(var v=new Array(t.length),p=0,f=t.length;p<f;p++)v[p]={range:t[p].range,options:s};r._decorations=o.deltaDecorations(r._decorations,v),r._overviewRulerApproximateDecorations=o.deltaDecorations(r._overviewRulerApproximateDecorations,a),r._rangeHighlightDecorationId&&(o.removeDecoration(r._rangeHighlightDecorationId),r._rangeHighlightDecorationId=null),r._findScopeDecorationId&&(o.removeDecoration(r._findScopeDecorationId),r._findScopeDecorationId=null),i&&(r._findScopeDecorationId=o.addDecoration(i,e._FIND_SCOPE_DECORATION))})},e.prototype.matchBeforePosition=function(e){if(0===this._decorations.length)return null;for(var t=this._decorations.length-1;t>=0;t--){var n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n)
;if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumber<e.lineNumber)return i;if(!(i.endColumn>e.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;t<n;t++){var i=this._decorations[t],r=this._editor.getModel().getDecorationRange(i);if(r&&!(r.startLineNumber<e.lineNumber)){if(r.startLineNumber>e.lineNumber)return r;if(!(r.startColumn<e.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[0])},e.prototype._allDecorations=function(){var e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationId&&e.push(this._findScopeDecorationId),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e},e._CURRENT_FIND_MATCH_DECORATION=i.ModelDecorationOptions.register({
stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:o.themeColorFromId(r.overviewRulerFindMatchForeground),darkColor:o.themeColorFromId(r.overviewRulerFindMatchForeground),position:s.OverviewRulerLane.Center}}),e._FIND_MATCH_DECORATION=i.ModelDecorationOptions.register({stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:o.themeColorFromId(r.overviewRulerFindMatchForeground),darkColor:o.themeColorFromId(r.overviewRulerFindMatchForeground),position:s.OverviewRulerLane.Center}}),e._FIND_MATCH_NO_OVERVIEW_DECORATION=i.ModelDecorationOptions.register({stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"findMatch",showIfCollapsed:!0}),e._FIND_MATCH_ONLY_OVERVIEW_DECORATION=i.ModelDecorationOptions.register({stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,overviewRuler:{
color:o.themeColorFromId(r.overviewRulerFindMatchForeground),darkColor:o.themeColorFromId(r.overviewRulerFindMatchForeground),position:s.OverviewRulerLane.Center}}),e._RANGE_HIGHLIGHT_DECORATION=i.ModelDecorationOptions.register({stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"rangeHighlight",isWholeLine:!0}),e._FIND_SCOPE_DECORATION=i.ModelDecorationOptions.register({className:"findScope",isWholeLine:!0}),e}();t.FindDecorations=a}),define(e[219],t([1,0,18,5,1123,214,39,19,999,1122,60,369,171,15,57]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_FIND_WIDGET_VISIBLE=new p.RawContextKey("findWidgetVisible",!1),t.CONTEXT_FIND_WIDGET_NOT_VISIBLE=t.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),t.CONTEXT_FIND_INPUT_FOCUSED=new p.RawContextKey("findInputFocussed",!1),t.CONTEXT_REPLACE_INPUT_FOCUSED=new p.RawContextKey("replaceInputFocussed",!1),t.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},
t.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},t.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},t.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},t.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",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",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},t.MATCHES_LIMIT=19999;var g=function(){
function e(e,t){var i=this;this._editor=e,this._state=t,this._toDispose=[],this._isDisposed=!1,this._startSearchingTimer=new n.TimeoutTimer,this._decorations=new c.FindDecorations(e),this._toDispose.push(this._decorations),this._updateDecorationsScheduler=new n.RunOnceScheduler(function(){return i.research(!1)},100),this._toDispose.push(this._updateDecorationsScheduler),this._toDispose.push(this._editor.onDidChangeCursorPosition(function(e){e.reason!==h.CursorChangeReason.Explicit&&e.reason!==h.CursorChangeReason.Undo&&e.reason!==h.CursorChangeReason.Redo||i._decorations.setStartPosition(i._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.push(this._editor.onDidChangeModelContent(function(e){i._ignoreModelContentChanged||(e.isFlush&&i._decorations.reset(),i._decorations.setStartPosition(i._editor.getPosition()),i._updateDecorationsScheduler.schedule())})),this._toDispose.push(this._state.onFindReplaceStateChange(function(e){return i._onStateChanged(e)})),
this.research(!1,this._state.searchScope)}return e.prototype.dispose=function(){this._isDisposed=!0,i.dispose(this._startSearchingTimer),this._toDispose=i.dispose(this._toDispose)},e.prototype._onStateChanged=function(e){var t=this;if(!this._isDisposed&&this._editor.getModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(function(){e.searchScope?t.research(e.moveCursor,t._state.searchScope):t.research(e.moveCursor)},240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}},e._getSearchRange=function(e,t){var n=e.getFullModelRange();return t&&(n=n.intersectRanges(t)),n},e.prototype.research=function(e,n){var i=null
;null!==(i=void 0!==n?n:this._decorations.getFindScope())&&i.startLineNumber!==i.endLineNumber&&(i=new a.Range(i.startLineNumber,1,i.endLineNumber,this._editor.getModel().getLineMaxColumn(i.endLineNumber)));var r=this._findMatches(i,!1,t.MATCHES_LIMIT);this._decorations.set(r,i),this._state.changeMatchInfo(this._decorations.getCurrentMatchesPosition(this._editor.getSelection()),this._decorations.getCount(),void 0),e&&this._moveToNextMatch(this._decorations.getStartPosition())},e.prototype._hasMatches=function(){return this._state.matchesCount>0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){
var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,r=this._editor.getModel();return t||1===i?(1===n?n=r.getLineCount():n--,i=r.getLineMaxColumn(n)):i--,new s.Position(n,i)},e.prototype._moveToPrevMatch=function(n,i){if(void 0===i&&(i=!1),this._decorations.getCount()<t.MATCHES_LIMIT){var r=this._decorations.matchBeforePosition(n);return r&&r.isEmpty()&&r.getStartPosition().equals(n)&&(n=this._prevSearchPosition(n),r=this._decorations.matchBeforePosition(n)),void(r&&this._setCurrentFindMatch(r))}if(!this._cannotFind()){var o=this._decorations.getFindScope(),a=e._getSearchRange(this._editor.getModel(),o);a.getEndPosition().isBefore(n)&&(n=a.getEndPosition()),n.isBefore(a.getStartPosition())&&(n=a.getEndPosition())
;var c=n.lineNumber,l=n.column,u=this._editor.getModel(),d=new s.Position(c,l),h=u.findPreviousMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._prevSearchPosition(d),h=u.findPreviousMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1)),h?i||a.containsRange(h.range)?void this._setCurrentFindMatch(h.range):this._moveToPrevMatch(h.range.getStartPosition(),!0):null}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._nextSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,r=this._editor.getModel()
;return t||i===r.getLineMaxColumn(n)?(n===r.getLineCount()?n=1:n++,i=1):i++,new s.Position(n,i)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()<t.MATCHES_LIMIT){var n=this._decorations.matchAfterPosition(e);return n&&n.isEmpty()&&n.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),n=this._decorations.matchAfterPosition(e)),void(n&&this._setCurrentFindMatch(n))}var i=this._getNextMatch(e,!1,!0);i&&this._setCurrentFindMatch(i.range)},e.prototype._getNextMatch=function(t,n,i,r){if(void 0===r&&(r=!1),this._cannotFind())return null;var o=this._decorations.getFindScope(),a=e._getSearchRange(this._editor.getModel(),o);a.getEndPosition().isBefore(t)&&(t=a.getStartPosition()),t.isBefore(a.getStartPosition())&&(t=a.getStartPosition());var c=t.lineNumber,l=t.column,u=this._editor.getModel(),d=new s.Position(c,l),h=u.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n)
;return i&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=u.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n)),h?r||a.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),n,i,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?r.parseReplaceString(this._state.replaceString):r.ReplacePattern.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches),r=new o.ReplaceCommand(t,i);this._executeEditorCommand("replace",r),
this._decorations.setStartPosition(new s.Position(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var r=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=t.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new d.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="m";t.ignoreCase&&(n+="i"),
t.global&&(n+="g"),t=new RegExp(t.source,n)}var i,r=this._editor.getModel(),s=r.getValue(f.EndOfLinePreference.LF),a=r.getFullModelRange(),c=this._getReplacePattern();i=c.hasReplacementPatterns?s.replace(t,function(){return c.buildReplaceString(arguments)}):s.replace(t,c.buildReplaceString(null));var l=new o.ReplaceCommandThatPreservesSelection(a,i,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns,1073741824),i=[],r=0,o=n.length;r<o;r++)i[r]=t.buildReplaceString(n[r].matches);var s=new l.ReplaceAllCommand(this._editor.getSelection(),n.map(function(e){return e.range}),i);this._executeEditorCommand("replaceAll",s)},e.prototype.selectAllMatches=function(){if(this._hasMatches()){for(var e=this._decorations.getFindScope(),t=this._findMatches(e,!1,1073741824).map(function(e){
return new u.Selection(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)}),n=this._editor.getSelection(),i=0,r=t.length;i<r;i++){if(t[i].equalsRange(n)){t=[n].concat(t.slice(0,i)).concat(t.slice(i+1));break}}this._editor.setSelections(t)}},e.prototype._executeEditorCommand=function(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}},e}();t.FindModelBoundToEditorModel=g}),define(e[1001],t([1,0,8,92,45,219,398,18,12,26]),function(e,t,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,r,o){var l=e.call(this)||this;l._hideSoon=l._register(new c.RunOnceScheduler(function(){return l._hide()},2e3)),l._isVisible=!1,l._editor=t,l._state=n,l._keybindingService=r,l._domNode=document.createElement("div"),l._domNode.className="findOptionsWidget",l._domNode.style.display="none",
l._domNode.style.top="10px",l._domNode.setAttribute("role","presentation"),l._domNode.setAttribute("aria-hidden","true");var d=o.getTheme().getColor(u.inputActiveOptionBorder);return l.caseSensitive=l._register(new a.CaseSensitiveCheckbox({appendTitle:l._keybindingLabelFor(s.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:l._state.matchCase,inputActiveOptionBorder:d})),l._domNode.appendChild(l.caseSensitive.domNode),l._register(l.caseSensitive.onChange(function(){l._state.change({matchCase:l.caseSensitive.checked},!1)})),l.wholeWords=l._register(new a.WholeWordsCheckbox({appendTitle:l._keybindingLabelFor(s.FIND_IDS.ToggleWholeWordCommand),isChecked:l._state.wholeWord,inputActiveOptionBorder:d})),l._domNode.appendChild(l.wholeWords.domNode),l._register(l.wholeWords.onChange(function(){l._state.change({wholeWord:l.wholeWords.checked},!1)})),l.regex=l._register(new a.RegexCheckbox({appendTitle:l._keybindingLabelFor(s.FIND_IDS.ToggleRegexCommand),isChecked:l._state.isRegex,inputActiveOptionBorder:d})),
l._domNode.appendChild(l.regex.domNode),l._register(l.regex.onChange(function(){l._state.change({isRegex:l.regex.checked},!1)})),l._editor.addOverlayWidget(l),l._register(l._state.onFindReplaceStateChange(function(e){var t=!1;e.isRegex&&(l.regex.checked=l._state.isRegex,t=!0),e.wholeWord&&(l.wholeWords.checked=l._state.wholeWord,t=!0),e.matchCase&&(l.caseSensitive.checked=l._state.matchCase,t=!0),!l._state.isRevealed&&t&&l._revealTemporarily()})),l._register(i.addDisposableNonBubblingMouseOutListener(l._domNode,function(e){return l._onMouseOut()})),l._register(i.addDisposableListener(l._domNode,"mouseover",function(e){return l._onMouseOver()})),l._applyTheme(o.getTheme()),l._register(o.onThemeChange(l._applyTheme.bind(l))),l}return n(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},
t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:o.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(u.inputActiveOptionBorder)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)},t.ID="editor.contrib.findOptionsWidget",t}(r.Widget);t.FindOptionsWidget=d,l.registerThemingParticipant(function(e,t){var n=e.getColor(u.editorWidgetBackground)
;n&&t.addRule(".monaco-editor .findOptionsWidget { background-color: "+n+"; }");var i=e.getColor(u.widgetShadow);i&&t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px "+i+"; }");var r=e.getColor(u.contrastBorder);r&&t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid "+r+"; }")})}),define(e[1002],t([1,0,1328,8,5,90,19,221,26,51,97,129,101,62,20,7,804]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){function e(e,t,n){var i=this;this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=[],this._editor=t;var o=document.createElement("div");o.className="descriptioncontainer",o.setAttribute("aria-live","assertive"),o.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),
this._disposables.push(r.addStandardDisposableListener(this._relatedBlock,"click",function(e){e.preventDefault();var t=i._relatedDiagnostics.get(e.target);t&&n(t)})),this._scrollable=new h.ScrollableElement(o,{horizontal:p.ScrollbarVisibility.Auto,vertical:p.ScrollbarVisibility.Auto,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),r.addClass(this._scrollable.getDomNode(),"block"),e.appendChild(this._scrollable.getDomNode()),this._disposables.push(this._scrollable.onScroll(function(e){o.style.left="-"+e.scrollLeft+"px",o.style.top="-"+e.scrollTop+"px"})),this._disposables.push(this._scrollable)}return e.prototype.dispose=function(){o.dispose(this._disposables)},e.prototype.update=function(e){var t=e.source,n=e.message,i=e.relatedInformation;if(t){this._lines=0,this._longestLineLength=0;for(var o=new Array(t.length+3+1).join(" "),s=n.split(/\r\n|\r|\n/g),a=0;a<s.length;a++){var c=s[a];this._lines+=1,this._longestLineLength=Math.max(c.length,this._longestLineLength),
0===a?n="["+t+"] "+c:n+="\n"+o+c}}else this._lines=1,this._longestLineLength=n.length;if(r.clearNode(this._relatedBlock),!g.isFalsyOrEmpty(i)){this._relatedBlock.style.paddingTop=Math.floor(.66*this._editor.getConfiguration().lineHeight)+"px",this._lines+=1;for(var l=0,u=i;l<u.length;l++){var d=u[l],h=document.createElement("div"),p=document.createElement("span");r.addClass(p,"filename"),p.innerHTML=f.getBaseLabel(d.resource)+"("+d.startLineNumber+", "+d.startColumn+"): ",p.title=f.getPathLabel(d.resource,void 0),this._relatedDiagnostics.set(p,d);var v=document.createElement("span");v.innerText=d.message,this._editor.applyFontInfo(v),h.appendChild(p),h.appendChild(v),this._lines+=1,this._relatedBlock.appendChild(h)}}this._messageBlock.innerText=n,this._editor.applyFontInfo(this._messageBlock);var m=this._editor.getConfiguration().fontInfo,y=Math.ceil(m.typicalFullwidthCharacterWidth*this._longestLineLength*.75),b=m.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:y,scrollHeight:b})},
e.prototype.layout=function(e,t){this._scrollable.getDomNode().style.height=e+"px",this._scrollable.setScrollDimensions({width:t,height:e})},e.prototype.getHeightInLines=function(){return Math.min(17,this._lines)},e}(),y=function(e){function c(t,n){var i=e.call(this,t,{showArrow:!0,showFrame:!0,isAccessible:!0})||this;return i._themeService=n,i._callOnDispose=[],i._onDidSelectRelatedInformation=new v.Emitter,i.onDidSelectRelatedInformation=i._onDidSelectRelatedInformation.event,i._severity=s.MarkerSeverity.Warning,i._backgroundColor=u.Color.white,i._applyTheme(n.getTheme()),i._callOnDispose.push(n.onThemeChange(i._applyTheme.bind(i))),i.create(),i}return n(c,e),c.prototype._applyTheme=function(e){this._backgroundColor=e.getColor(t.editorMarkerNavigationBackground);var n=t.editorMarkerNavigationError;this._severity===s.MarkerSeverity.Warning?n=t.editorMarkerNavigationWarning:this._severity===s.MarkerSeverity.Info&&(n=t.editorMarkerNavigationInfo);var i=e.getColor(n);this.style({arrowColor:i,frameColor:i})},
c.prototype._applyStyles=function(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor.toString()),e.prototype._applyStyles.call(this)},c.prototype.dispose=function(){this._callOnDispose=o.dispose(this._callOnDispose),e.prototype.dispose.call(this)},c.prototype.focus=function(){this._parentContainer.focus()},c.prototype._fillContainer=function(e){var t=this;this._parentContainer=e,r.addClass(e,"marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._title=document.createElement("div"),this._title.className="block title",this._container.appendChild(this._title),this._message=new m(this._container,this.editor,function(e){return t._onDidSelectRelatedInformation.fire(e)}),this._disposables.push(this._message)},c.prototype.show=function(e,t){throw new Error("call showAtMarker")},c.prototype.showAtMarker=function(t,n,r){
this._container.classList.remove("stale"),this._title.innerHTML=i.localize(0,null,n,r),this._message.update(t),this._severity=t.severity,this._applyTheme(this._themeService.getTheme());var o=a.Range.lift(t),s=o.containsPosition(this.editor.getPosition())?this.editor.getPosition():o.getStartPosition();e.prototype.show.call(this,s,this.computeRequiredHeight()),this.editor.revealPositionInCenter(s,0),1!==this.editor.getConfiguration().accessibilitySupport&&this.focus()},c.prototype.updateMarker=function(e){this._container.classList.remove("stale"),this._message.update(e)},c.prototype.showStale=function(){this._container.classList.add("stale"),this._relayout()},c.prototype._doLayout=function(e,t){this._message.layout(e,t),this._container.style.height=e+"px"},c.prototype._relayout=function(){e.prototype._relayout.call(this,this.computeRequiredHeight())},c.prototype.computeRequiredHeight=function(){return 1+this._message.getHeightInLines()},c}(c.ZoneWidget);t.MarkerNavigationWidget=y
;var b=l.oneOf(d.editorErrorForeground,d.editorErrorBorder),S=l.oneOf(d.editorWarningForeground,d.editorWarningBorder),_=l.oneOf(d.editorInfoForeground,d.editorInfoBorder);t.editorMarkerNavigationError=l.registerColor("editorMarkerNavigationError.background",{dark:b,light:b,hc:b},i.localize(1,null)),t.editorMarkerNavigationWarning=l.registerColor("editorMarkerNavigationWarning.background",{dark:S,light:S,hc:S},i.localize(2,null)),t.editorMarkerNavigationInfo=l.registerColor("editorMarkerNavigationInfo.background",{dark:_,light:_,hc:_},i.localize(3,null)),t.editorMarkerNavigationBackground=l.registerColor("editorMarkerNavigation.background",{dark:"#2D2D30",light:u.Color.white,hc:"#0C141F"},i.localize(4,null))}),define(e[1003],t([1,0,1324,7,5,15,90,19,32,12,55,52,1002,14,20,71,9]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(){function e(e,t){var n=this;this._editor=e,this._markers=null,this._nextIdx=-1,this._toUnbind=[],
this._ignoreSelectionChange=!1,this._onCurrentMarkerChanged=new r.Emitter,this._onMarkerSetChanged=new r.Emitter,this.setMarkers(t),this._toUnbind.push(this._editor.onDidDispose(function(){return n.dispose()})),this._toUnbind.push(this._editor.onDidChangeCursorPosition(function(){n._ignoreSelectionChange||n.currentMarker&&u.Range.containsPosition(n.currentMarker,n._editor.getPosition())||(n._nextIdx=-1)}))}return Object.defineProperty(e.prototype,"onCurrentMarkerChanged",{get:function(){return this._onCurrentMarkerChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMarkerSetChanged",{get:function(){return this._onMarkerSetChanged.event},enumerable:!0,configurable:!0}),e.prototype.setMarkers=function(e){var t=this._nextIdx>=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(C.compareMarker),this._nextIdx=t?Math.max(-1,m.binarySearch(this._markers,t,C.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},
e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i<this._markers.length;i++){var r=u.Range.lift(this._markers[i]);if(r.isEmpty()){var o=this._editor.getModel().getWordAtPosition(r.getStartPosition());o&&(r=new u.Range(r.startLineNumber,o.startColumn,r.startLineNumber,o.endColumn))}if(r.containsPosition(n)||n.isBeforeOrEqual(r.getStartPosition())){this._nextIdx=i,t=!0;break}}t||(this._nextIdx=e?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)},Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this.canNavigate()?this._markers[this._nextIdx]:void 0},enumerable:!0,configurable:!0}),e.prototype.move=function(e,t){if(!this.canNavigate())return this._onCurrentMarkerChanged.fire(void 0),!t;var n=this._nextIdx,i=!1
;if(-1===this._nextIdx?this._initIdx(e):e?t||this._nextIdx+1<this._markers.length?this._nextIdx=(this._nextIdx+1)%this._markers.length:i=!0:e||(t||this._nextIdx>0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:i=!0),n!==this._nextIdx){var r=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(r)}return i},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,n=this._markers;t<n.length;t++){var i=n[t];if(u.Range.containsPosition(i,e))return i}},Object.defineProperty(e.prototype,"total",{get:function(){return this._markers.length},enumerable:!0,configurable:!0}),e.prototype.indexOf=function(e){return 1+this._markers.indexOf(e)},e.prototype.dispose=function(){this._toUnbind=o.dispose(this._toUnbind)},e}(),_=function(){function e(e,t,n,i,r){this._markerService=t,this._contextKeyService=n,this._themeService=i,this._editorService=r,this._disposeOnClose=[],this._editor=e,
this._widgetVisible=x.bindTo(this._contextKeyService)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._cleanUp()},e.prototype._cleanUp=function(){this._widgetVisible.reset(),this._disposeOnClose=o.dispose(this._disposeOnClose),this._widget=null,this._model=null},e.prototype.getOrCreateModel=function(){var e=this;if(this._model)return this._model;var t=this._getMarkers();return this._model=new S(this._editor,t),this._markerService.onMarkerChanged(this._onMarkerChanged,this,this._disposeOnClose),this._widget=new g.MarkerNavigationWidget(this._editor,this._themeService),this._widgetVisible.set(!0),this._disposeOnClose.push(this._model),this._disposeOnClose.push(this._widget),this._disposeOnClose.push(this._widget.onDidSelectRelatedInformation(function(t){e._editorService.openCodeEditor({resource:t.resource,options:{pinned:!0,revealIfOpened:!0,selection:u.Range.lift(t).collapseToStart()}
},e._editor).then(void 0,b.onUnexpectedError),e.closeMarkersNavigation(!1)})),this._disposeOnClose.push(this._editor.onDidChangeModel(function(){return e._cleanUp()})),this._disposeOnClose.push(this._model.onCurrentMarkerChanged(function(t){t?e._model.withoutWatchingEditorPosition(function(){e._widget.showAtMarker(t,e._model.indexOf(t),e._model.total)}):e._cleanUp()})),this._disposeOnClose.push(this._model.onMarkerSetChanged(function(){var t=e._model.findMarkerAtPosition(e._widget.position);t?e._widget.updateMarker(t):e._widget.showStale()})),this._model},e.prototype.closeMarkersNavigation=function(e){void 0===e&&(e=!0),this._cleanUp(),e&&this._editor.focus()},e.prototype._onMarkerChanged=function(e){var t=this;e.some(function(e){return t._editor.getModel().uri.toString()===e.toString()})&&this._model.setMarkers(this._getMarkers())},e.prototype._getMarkers=function(){return this._markerService.read({resource:this._editor.getModel().uri,
severities:c.MarkerSeverity.Error|c.MarkerSeverity.Warning|c.MarkerSeverity.Info})},e.ID="editor.contrib.markerController",e=a([l(1,c.IMarkerService),l(2,s.IContextKeyService),l(3,h.IThemeService),l(4,y.ICodeEditorService)],e)}(),C=function(e){function t(t,n,i){var r=e.call(this,i)||this;return r._isNext=t,r._multiFile=n,r}return n(t,e),t.prototype.run=function(e,n){var i=this,r=e.get(c.IMarkerService),o=e.get(y.ICodeEditorService),s=_.get(n);if(s){var a=s.getOrCreateModel();if(a.move(this._isNext,!this._multiFile)&&this._multiFile){var l=r.read({severities:c.MarkerSeverity.Error|c.MarkerSeverity.Warning|c.MarkerSeverity.Info}).sort(t.compareMarker);if(0!==l.length){var u=a.currentMarker||{resource:n.getModel().uri,severity:c.MarkerSeverity.Error,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},d=m.binarySearch(l,u,t.compareMarker);d<0?(d=~d,d%=l.length):d=this._isNext?(d+1)%l.length:(d+l.length-1)%l.length;var h=l[d]
;if(h.resource.toString()!==n.getModel().uri.toString())return s.closeMarkersNavigation(),o.openCodeEditor({resource:h.resource,options:{pinned:!1,revealIfOpened:!0,revealInCenterIfOutsideViewport:!0,selection:h}},n).then(function(e){if(e)return e.getAction(i.id).run()});a.move(this._isNext,!0)}}}},t.compareMarker=function(e,t){var n=v.compare(e.resource.toString(),t.resource.toString());return 0===n&&(n=c.MarkerSeverity.compare(e.severity,t.severity)),0===n&&(n=u.Range.compareRangesUsingStarts(e,t)),n},t}(d.EditorAction),E=function(e){function t(){return e.call(this,!0,!1,{id:"editor.action.marker.next",label:i.localize(0,null),alias:"Go to Next Error or Warning",precondition:p.EditorContextKeys.writable})||this}return n(t,e),t}(C),w=function(e){function t(){return e.call(this,!1,!1,{id:"editor.action.marker.prev",label:i.localize(1,null),alias:"Go to Previous Error or Warning",precondition:p.EditorContextKeys.writable})||this}return n(t,e),t}(C),I=function(e){function t(){return e.call(this,!0,!0,{
id:"editor.action.marker.nextInFiles",label:i.localize(2,null),alias:"Go to Next Error or Warning in Files",precondition:p.EditorContextKeys.writable,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:66}})||this}return n(t,e),t}(C),T=function(e){function t(){return e.call(this,!1,!0,{id:"editor.action.marker.prevInFiles",label:i.localize(3,null),alias:"Go to Previous Error or Warning in Files",precondition:p.EditorContextKeys.writable,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:1090}})||this}return n(t,e),t}(C);d.registerEditorContribution(_),d.registerEditorAction(E),d.registerEditorAction(w),d.registerEditorAction(I),d.registerEditorAction(T);var x=new s.RawContextKey("markersNavigationVisible",!1),k=d.EditorCommand.bindToContribution(_.get);d.registerEditorCommand(new k({id:"closeMarkersNavigation",precondition:x,handler:function(e){return e.closeMarkersNavigation()},kbOpts:{weight:f.KeybindingsRegistry.WEIGHT.editorContrib(50),kbExpr:p.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),
define(e[1004],t([1,0,1332,8,4,19,39,44,382,525,527,134,66,1112,998,550,51,5,547]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=r.$,_=function(){return function(e,t,n){this.range=e,this.color=t,this.provider=n}}(),C=function(){function e(e){this._editor=e,this._range=null}return e.prototype.setRange=function(e){this._range=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeAsync=function(){var e=this._editor.getModel();return c.HoverProviderRegistry.has(e)?l.getHover(e,new a.Position(this._range.startLineNumber,this._range.startColumn)):o.TPromise.as(null)},e.prototype.computeSync=function(){var e=this,t=this._range.startLineNumber;if(t>this._editor.getModel().getLineCount())return[];var n=v.ColorDetector.get(this._editor),i=this._editor.getModel().getLineMaxColumn(t),r=!1;return this._editor.getLineDecorations(t).map(function(o){
var a=o.range.startLineNumber===t?o.range.startColumn:1,c=o.range.endLineNumber===t?o.range.endColumn:i;if(a>e._range.startColumn||e._range.endColumn>c)return null;var l=new s.Range(e._range.startLineNumber,a,e._range.startLineNumber,c),u=n.getColorData(o.range.getStartPosition());if(!r&&u){r=!0;var d=u.colorInfo,p=d.color,f=d.range;return new _(f,p,u.provider)}if(h.isEmptyMarkdownString(o.options.hoverMessage))return null;var g=void 0;return o.options.hoverMessage&&(g=Array.isArray(o.options.hoverMessage)?o.options.hoverMessage.slice():[o.options.hoverMessage]),{contents:g,range:l}}).filter(function(e){return!!e})},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort(function(e,t){return e instanceof _?-1:t instanceof _?1:0})):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{
range:this._range,contents:[(new h.MarkdownString).appendText(i.localize(0,null))]}},e}(),E=function(e){function t(n,i,o){var s=e.call(this,t.ID,n)||this;return s._themeService=o,s.renderDisposable=y.empty,s.toDispose=[],s._computer=new C(s._editor),s._highlightDecorations=[],s._isChangingDecorations=!1,s._markdownRenderer=i,i.onDidRenderCodeBlock(s.onContentsChange,s,s.toDispose),s._hoverOperation=new u.HoverOperation(s._computer,function(e){return s._withResult(e,!0)},null,function(e){return s._withResult(e,!1)}),s.toDispose.push(r.addStandardDisposableListener(s.getDomNode(),r.EventType.FOCUS,function(){s._colorPicker&&r.addClass(s.getDomNode(),"colorpicker-hover")})),s.toDispose.push(r.addStandardDisposableListener(s.getDomNode(),r.EventType.BLUR,function(){r.removeClass(s.getDomNode(),"colorpicker-hover")})),s.toDispose.push(n.onDidChangeConfiguration(function(e){s._hoverOperation.setHoverTime(s._editor.getConfiguration().contribInfo.hover.delay)})),s}return n(t,e),t.prototype.dispose=function(){
this.renderDisposable.dispose(),this.renderDisposable=y.empty,this._hoverOperation.cancel(),this.toDispose=y.dispose(this.toDispose),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var i=[],r=0,o=this._messages.length;r<o;r++){var s=this._messages[r],a=s.range;a.startColumn<=e.startColumn&&a.endColumn>=e.endColumn&&i.push(s)}if(i.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var i=e[n],r=t[n];if(i instanceof _)return!1;if(r instanceof _)return!1;if(!h.markedStringsEquals(i.contents,r.contents))return!1}return!0}(i,this._messages))return
;this._renderMessages(e,i)}else this.hide()}this._lastRange=e,this._computer.setRange(e),this._shouldFocus=n,this._hoverOperation.start(t)}},t.prototype.hide=function(){this._lastRange=null,this._hoverOperation.cancel(),e.prototype.hide.call(this),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this.renderDisposable.dispose(),this.renderDisposable=y.empty,this._colorPicker=null},t.prototype.isColorPickerVisible=function(){return!!this._colorPicker},t.prototype._withResult=function(e,t){this._messages=e,this._lastRange&&this._messages.length>0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var i=this;this.renderDisposable.dispose(),this._colorPicker=null;var r,o=Number.MAX_VALUE,c=n[0].range,l=document.createDocumentFragment(),u=!0,d=!1;n.forEach(function(t){if(t.range)if(o=Math.min(o,t.range.startColumn),c=s.Range.plusRange(c,t.range),
t instanceof _){d=!0;var n=t.color,p=n.red,v=n.green,C=n.blue,E=n.alpha,w=new m.RGBA(255*p,255*v,255*C,E),I=new m.Color(w),T=i._editor.getModel(),x=new s.Range(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),k={range:t.range,color:t.color},D=new f.ColorPickerModel(I,[],0),A=new g.ColorPickerWidget(l,D,i._editor.getConfiguration().pixelRatio,i._themeService);b.getColorPresentations(T,k,t.provider).then(function(n){D.colorPresentations=n;var c=i._editor.getModel().getValueInRange(t.range);D.guessColorPresentation(I,c);var u=function(){var e,t;D.presentation.textEdit?(e=[D.presentation.textEdit],t=(t=new s.Range(D.presentation.textEdit.range.startLineNumber,D.presentation.textEdit.range.startColumn,D.presentation.textEdit.range.endLineNumber,D.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+D.presentation.textEdit.text.length)):(e=[{identifier:null,range:x,text:D.presentation.label,forceMoveMarkers:!1}],
t=x.setEndPosition(x.endLineNumber,x.startColumn+D.presentation.label.length)),T.pushEditOperations([],e,function(){return[]}),D.presentation.additionalTextEdits&&(e=D.presentation.additionalTextEdits.slice(),T.pushEditOperations([],e,function(){return[]}),i.hide()),i._editor.pushUndoStop(),x=t},d=function(e){return b.getColorPresentations(T,{range:x,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider).then(function(e){D.colorPresentations=e})},h=D.onColorFlushed(function(e){d(e).then(u)}),p=D.onDidChangeColor(d);i._colorPicker=A,i.showAt(new a.Position(e.startLineNumber,o),i._shouldFocus),i.updateContents(l),i._colorPicker.layout(),i.renderDisposable=y.combinedDisposable([h,p,A,r])})}else t.contents.filter(function(e){return!h.isEmptyMarkdownString(e)}).forEach(function(e){var t=i._markdownRenderer.render(e);r=t,l.appendChild(S("div.hover-row",null,t.element)),u=!1})}),d||u||(this.showAt(new a.Position(e.startLineNumber,o),this._shouldFocus),this.updateContents(l)),
this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:c,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=p.ModelDecorationOptions.register({className:"hoverHighlight"}),t}(d.ContentHoverWidget);t.ModesContentHoverWidget=E}),define(e[1005],t([1,0,1329,73,11,88,54,19,32,45,1004,1135,5,12,26,55,338,805]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(){function e(e,t,n,i){var r=this;this._editor=e,this._openerService=t,this._modeService=n,this._themeService=i,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(function(e){e.contribInfo&&(r._hideWidgets(),r._unhookEvents(),r._hookEvents())})}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){
return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown(function(t){return e._onEditorMouseDown(t)})),this._toUnhook.push(this._editor.onMouseUp(function(t){return e._onEditorMouseUp(t)})),this._toUnhook.push(this._editor.onMouseMove(function(t){return e._onEditorMouseMove(t)})),this._toUnhook.push(this._editor.onKeyDown(function(t){return e._onKeyDown(t)})),this._toUnhook.push(this._editor.onDidChangeModelDecorations(function(){return e._onModelDecorationsChanged()
}))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange(function(t){return e._onEditorScrollChanged(t)}))},e.prototype._unhookEvents=function(){this._toUnhook=g.dispose(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==h.MouseTargetType.CONTENT_WIDGET||e.target.detail!==p.ModesContentHoverWidget.ID?t===h.MouseTargetType.OVERLAY_WIDGET&&e.target.detail===f.ModesGlyphHoverWidget.ID||(t!==h.MouseTargetType.OVERLAY_WIDGET&&e.target.detail!==f.ModesGlyphHoverWidget.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},
e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,n=o.isMacintosh?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==h.MouseTargetType.CONTENT_WIDGET||e.target.detail!==p.ModesContentHoverWidget.ID||n)&&(!this._isHoverSticky||t!==h.MouseTargetType.OVERLAY_WIDGET||e.target.detail!==f.ModesGlyphHoverWidget.ID||n)){if(t===h.MouseTargetType.CONTENT_EMPTY){var i=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,r=e.target.detail;r&&!r.isAfterLines&&"number"==typeof r.horizontalDistanceToText&&r.horizontalDistanceToText<i&&(t=h.MouseTargetType.CONTENT_TEXT)}t===h.MouseTargetType.CONTENT_TEXT?(this.glyphWidget.hide(),this._isHoverEnabled&&this.contentWidget.startShowingAt(e.target.range,0,!1)):t===h.MouseTargetType.GUTTER_GLYPH_MARGIN?(this.contentWidget.hide(),
this._isHoverEnabled&&this.glyphWidget.startShowingAt(e.target.position.lineNumber)):this._hideWidgets()}},e.prototype._onKeyDown=function(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&this._hideWidgets()},e.prototype._hideWidgets=function(){!this._contentWidget||this._isMouseDown&&this._hoverClicked&&this._contentWidget.isColorPickerVisible()||(this._glyphWidget.hide(),this._contentWidget.hide())},e.prototype._createHoverWidget=function(){var e=new b.MarkdownRenderer(this._editor,this._modeService,this._openerService);this._contentWidget=new p.ModesContentHoverWidget(this._editor,e,this._themeService),this._glyphWidget=new f.ModesGlyphHoverWidget(this._editor,e)},e.prototype.showContentHover=function(e,t,n){this.contentWidget.startShowingAt(e,t,n)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._unhookEvents(),this._didChangeConfigurationHandler.dispose(),this._glyphWidget&&(this._glyphWidget.dispose(),this._glyphWidget=null),
this._contentWidget&&(this._contentWidget.dispose(),this._contentWidget=null)},e.ID="editor.contrib.hover",e=a([l(1,s.IOpenerService),l(2,c.IModeService),l(3,v.IThemeService)],e)}();t.ModesHoverController=S;var _=function(e){function t(){return e.call(this,{id:"editor.action.showHover",label:i.localize(0,null),alias:"Show Hover",precondition:null,kbOpts:{kbExpr:y.EditorContextKeys.editorTextFocus,primary:r.KeyChord(2089,2087)}})||this}return n(t,e),t.prototype.run=function(e,t){var n=S.get(t);if(n){var i=t.getPosition(),r=new u.Range(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(r,1,!0)}},t}(d.EditorAction);d.registerEditorContribution(S),d.registerEditorAction(_),v.registerThemingParticipant(function(e,t){var n=e.getColor(m.editorHoverHighlight);n&&t.addRule(".monaco-editor .hoverHighlight { background-color: "+n+"; }");var i=e.getColor(m.editorHoverBackground);i&&t.addRule(".monaco-editor .monaco-editor-hover { background-color: "+i+"; }");var r=e.getColor(m.editorHoverBorder)
;r&&(t.addRule(".monaco-editor .monaco-editor-hover { border: 1px solid "+r+"; }"),t.addRule(".monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid "+r.transparent(.5)+"; }"));var o=e.getColor(m.textLinkForeground);o&&t.addRule(".monaco-editor .monaco-editor-hover a { color: "+o+"; }");var s=e.getColor(m.textCodeBlockBackground);s&&t.addRule(".monaco-editor .monaco-editor-hover code { background-color: "+s+"; }")})}),define(e[1006],t([1,0,1334,4,19,60,55,32,195,1141,203,12,97,66]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){function e(e,t){this.editor=e,this.editorWorkerService=t,this.currentRequest=r.TPromise.as(null),this.decorationRemover=r.TPromise.as(null),this.decorationIds=[]}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(t,n){var i=this;this.currentRequest.cancel()
;var a=this.editor.getSelection(),c=this.editor.getModel().uri;if(a.startLineNumber!==a.endLineNumber)return null;var l=new p.EditorState(this.editor,5);return this.editorWorkerService.canNavigateValueSet(c)?(this.currentRequest=this.editorWorkerService.navigateValueSet(c,a,n),this.currentRequest=this.currentRequest.then(function(e){return e&&e.range&&e.value?e:null})):this.currentRequest=r.TPromise.as(null),this.currentRequest.then(function(n){if(n&&n.range&&n.value&&l.validate(i.editor)){var c=o.Range.lift(n.range),u=n.range,d=n.value.length-(a.endColumn-a.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+n.value.length},d>1&&(a=new s.Selection(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+d-1));var p=new h.InPlaceReplaceCommand(c,a,n.value);i.editor.pushUndoStop(),i.editor.executeCommand(t,p),i.editor.pushUndoStop(),i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[{range:u,options:e.DECORATION}]),
i.decorationRemover.cancel(),i.decorationRemover=r.TPromise.timeout(350),i.decorationRemover.then(function(){i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[])})}})},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=v.ModelDecorationOptions.register({className:"valueSetReplacement"}),e=a([l(1,d.IEditorWorkerService)],e)}(),y=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:i.localize(0,null),alias:"Replace with Previous Value",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:3154}})||this}return n(t,e),t.prototype.run=function(e,t){var n=m.get(t);if(n)return n.run(this.id,!0)},t}(u.EditorAction),b=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:i.localize(1,null),alias:"Replace with Next Value",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:3156}})||this}return n(t,e),t.prototype.run=function(e,t){
var n=m.get(t);if(n)return n.run(this.id,!1)},t}(u.EditorAction);u.registerEditorContribution(m),u.registerEditorAction(y),u.registerEditorAction(b),f.registerThemingParticipant(function(e,t){var n=e.getColor(g.editorBracketMatchBorder);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")})}),define(e[1007],t([1,0,1339,9,11,4,88,32,44,45,848,5,12,26,66,512,134,57,22,806]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=(new b.MarkdownString).appendText(o.isMacintosh?i.localize(0,null):i.localize(1,null)),E=(new b.MarkdownString).appendText(o.isMacintosh?i.localize(2,null):i.localize(3,null)),w=(new b.MarkdownString).appendText(o.isMacintosh?i.localize(4,null):i.localize(5,null)),I=(new b.MarkdownString).appendText(o.isMacintosh?i.localize(6,null):i.localize(7,null)),T={meta:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",
hoverMessage:C}),metaActive:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:C}),alt:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:w}),altActive:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:w}),altCommand:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:I}),altCommandActive:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:I}),metaCommand:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:E}),
metaCommandActive:m.ModelDecorationOptions.register({stickiness:S.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:E})},x=function(){function e(e,t){this.link=e,this.decorationId=t}return e.decoration=function(t,n){return{range:t.range,options:e._getOptions(t,n,!1)}},e._getOptions=function(e,t,n){return/^command:/i.test(e.url)?t?n?T.metaCommandActive:T.metaCommand:n?T.altCommandActive:T.altCommand:t?n?T.metaActive:T.meta:n?T.altActive:T.alt},e.prototype.activate=function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!0))},e.prototype.deactivate=function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!1))},e}(),k=function(){function e(e,t,n){var i=this;this.editor=e,this.openerService=t,this.notificationService=n,this.listenersToRemove=[];var r=new y.ClickLinkGesture(e);this.listenersToRemove.push(r),this.listenersToRemove.push(r.onMouseMoveOrRelevantKeyDown(function(e){var t=e[0],n=e[1]
;i._onEditorMouseMove(t,n)})),this.listenersToRemove.push(r.onExecute(function(e){i.onEditorMouseUp(e)})),this.listenersToRemove.push(r.onCancel(function(e){i.cleanUpActiveLinkDecoration()})),this.enabled=e.getConfiguration().contribInfo.links,this.listenersToRemove.push(e.onDidChangeConfiguration(function(t){var n=e.getConfiguration().contribInfo.links;i.enabled!==n&&(i.enabled=n,i.updateDecorations([]),i.stop(),i.beginCompute())})),this.listenersToRemove.push(e.onDidChangeModelContent(function(e){return i.onChange()})),this.listenersToRemove.push(e.onDidChangeModel(function(e){return i.onModelChanged()})),this.listenersToRemove.push(e.onDidChangeModelLanguage(function(e){return i.onModelModeChanged()})),this.listenersToRemove.push(d.LinkProviderRegistry.onDidChange(function(e){return i.onModelModeChanged()})),this.timeoutPromise=null,this.computePromise=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}return e.get=function(t){return t.getContribution(e.ID)},
e.prototype.getId=function(){return e.ID},e.prototype.onModelChanged=function(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()},e.prototype.onModelModeChanged=function(){this.stop(),this.beginCompute()},e.prototype.onChange=function(){var t=this;this.timeoutPromise||(this.timeoutPromise=s.TPromise.timeout(e.RECOMPUTE_TIME),this.timeoutPromise.then(function(){t.timeoutPromise=null,t.beginCompute()}))},e.prototype.beginCompute=function(){var e=this;this.editor.getModel()&&this.enabled&&d.LinkProviderRegistry.has(this.editor.getModel())&&(this.computePromise=p.getLinks(this.editor.getModel()).then(function(t){e.updateDecorations(t),e.computePromise=null}))},e.prototype.updateDecorations=function(e){for(var t="altKey"===this.editor.getConfiguration().multiCursorModifier,n=[],i=Object.keys(this.currentOccurrences),r=0,o=i.length;r<o;r++){var s=i[r],a=this.currentOccurrences[s];n.push(a.decorationId)}var c=[];if(e)for(r=0;r<e.length;r++)c.push(x.decoration(e[r],t))
;var l=this.editor.deltaDecorations(n,c);this.currentOccurrences={},this.activeLinkDecorationId=null;for(var r=0,o=l.length;r<o;r++){a=new x(e[r],l[r]);this.currentOccurrences[a.decorationId]=a}},e.prototype._onEditorMouseMove=function(e,t){var n=this,i="altKey"===this.editor.getConfiguration().multiCursorModifier;if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();var r=this.getLinkOccurrence(e.target.position);r&&this.editor.changeDecorations(function(e){r.activate(e,i),n.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()},e.prototype.cleanUpActiveLinkDecoration=function(){var e="altKey"===this.editor.getConfiguration().multiCursorModifier;if(this.activeLinkDecorationId){var t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(function(n){t.deactivate(n,e)}),this.activeLinkDecorationId=null}},e.prototype.onEditorMouseUp=function(e){if(this.isEnabled(e)){var t=this.getLinkOccurrence(e.target.position)
;t&&this.openLinkOccurrence(t,e.hasSideBySideModifier)}},e.prototype.openLinkOccurrence=function(e,t){var n=this;if(this.openerService){var o=e.link;o.resolve().then(function(e){return n.openerService.open(e,{openToSide:t})},function(e){"invalid"===e?n.notificationService.warn(i.localize(8,null,o.url)):"missing"===e?n.notificationService.warn(i.localize(9,null)):r.onUnexpectedError(e)}).done(null,r.onUnexpectedError)}},e.prototype.getLinkOccurrence=function(e){for(var t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0),n=0;n<t.length;n++){var i=t[n],r=this.currentOccurrences[i.id];if(r)return r}return null},e.prototype.isEnabled=function(e,t){return e.target.type===h.MouseTargetType.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)},e.prototype.stop=function(){this.timeoutPromise&&(this.timeoutPromise.cancel(),this.timeoutPromise=null),this.computePromise&&(this.computePromise.cancel(),
this.computePromise=null)},e.prototype.dispose=function(){this.listenersToRemove=f.dispose(this.listenersToRemove),this.stop()},e.ID="editor.linkDetector",e.RECOMPUTE_TIME=1e3,e=a([l(1,c.IOpenerService),l(2,_.INotificationService)],e)}(),D=function(e){function t(){return e.call(this,{id:"editor.action.openLink",label:i.localize(10,null),alias:"Open Link",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){var n=k.get(t);if(n)for(var i=0,r=t.getSelections();i<r.length;i++){var o=r[i],s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}},t}(u.EditorAction);u.registerEditorContribution(k),u.registerEditorAction(D),g.registerThemingParticipant(function(e,t){var n=e.getColor(v.editorActiveLinkForeground);n&&t.addRule(".monaco-editor .detected-link-active { color: "+n+" !important; }")})}),define(e[265],t([1,0,1342,18,5,128,19,32,45,15,12,26,52,807]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){
function t(n,i){var r=e.call(this)||this;return r._messageListeners=[],r._editor=n,r._visible=t.MESSAGE_VISIBLE.bindTo(i),r._register(r._editor.onDidAttemptReadOnlyEdit(function(){return r._onDidAttemptReadOnlyEdit()})),r}return n(t,e),t.get=function(e){return e.getContribution(t._id)},t.prototype.getId=function(){return t._id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._visible.reset()},t.prototype.isVisible=function(){return this._visible.get()},t.prototype.showMessage=function(e,t){var n=this;s.alert(e),this._visible.set(!0),o.dispose(this._messageWidget),this._messageListeners=o.dispose(this._messageListeners),this._messageWidget=new y(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText(function(){return n.closeMessage()})),this._messageListeners.push(this._editor.onDidChangeCursorPosition(function(){return n.closeMessage()})),this._messageListeners.push(this._editor.onDidDispose(function(){return n.closeMessage()})),
this._messageListeners.push(this._editor.onDidChangeModel(function(){return n.closeMessage()})),this._messageListeners.push(r.setDisposableTimeout(function(){return n.closeMessage()},3e3));var i;this._messageListeners.push(this._editor.onMouseMove(function(e){e.target.position&&(i?i.containsPosition(e.target.position)||n.closeMessage():i=new c.Range(t.lineNumber-3,1,e.target.position.lineNumber+3,1))}))},t.prototype.closeMessage=function(){this._visible.reset(),this._messageListeners=o.dispose(this._messageListeners),this._messageListeners.push(y.fadeOut(this._messageWidget))},t.prototype._onDidAttemptReadOnlyEdit=function(){this.showMessage(i.localize(0,null),this._editor.getPosition())},t._id="editor.contrib.messageController",t.MESSAGE_VISIBLE=new h.RawContextKey("messageVisible",!1),t=a([l(1,h.IContextKeyService)],t)}(o.Disposable);t.MessageController=v;var m=u.EditorCommand.bindToContribution(v.get);u.registerEditorCommand(new m({id:"leaveEditorMessage",precondition:v.MESSAGE_VISIBLE,handler:function(e){
return e.closeMessage()},kbOpts:{weight:g.KeybindingsRegistry.WEIGHT.editorContrib(30),primary:9}}));var y=function(){function e(e,t,n){var i=t.lineNumber,r=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:r-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var o=document.createElement("div");o.classList.add("message"),o.textContent=n,this._domNode.appendChild(o);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,n=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}},e.prototype.dispose=function(){
this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[d.ContentWidgetPositionPreference.ABOVE]}},e}();u.registerEditorContribution(v),p.registerThemingParticipant(function(e,t){var n=e.getColor(f.inputValidationInfoBorder);if(n){var i=e.type===p.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+n+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+i+"px solid "+n+"; }")}var r=e.getColor(f.inputValidationInfoBackground);r&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+r+"; }")})}),define(e[415],t([1,0,5,4,32,55,265,1293,29,15,35,37,90,933,282,1111,838,14,184,119]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";function I(e){
return f.ContextKeyExpr.regex(y.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+C.escapeRegExpCharacters(e.value)+"\\b"))}function T(e,t,n,i){return o(this,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:return e.edit?[4,t.apply(e.edit,{editor:i})]:[3,2];case 1:r.sent(),r.label=2;case 2:return e.command?[4,n.executeCommand.apply(n,[e.command.id].concat(e.command.arguments))]:[3,4];case 3:r.sent(),r.label=4;case 4:return[2]}})})}function x(e,t,n,i){var r=k.get(e);if(r){var o=e.getPosition();r.triggerFromEditorSelection(n,i).then(function(n){n&&n.length||d.MessageController.get(e).showMessage(t,o)})}}Object.defineProperty(t,"__esModule",{value:!0});var k=function(){function e(e,t,n,i,r,o,s,a){var c=this;this._commandService=o,this._keybindingService=s,this._bulkEditService=a,this._disposables=[],this._editor=e,this._model=new y.CodeActionModel(this._editor,t,n,i),this._codeActionContextMenu=new S.CodeActionContextMenu(e,r,function(e){return c._onApplyCodeAction(e)}),
this._lightBulbWidget=new _.LightBulbWidget(e),this._updateLightBulbTitle(),this._disposables.push(this._codeActionContextMenu.onDidExecuteCodeAction(function(e){return c._model.trigger({type:"auto",filter:{}})}),this._lightBulbWidget.onClick(this._handleLightBulbSelect,this),this._model.onDidChangeFixes(function(e){return c._onCodeActionsEvent(e)}),this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitle,this))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._model.dispose(),i.dispose(this._disposables)},e.prototype._onCodeActionsEvent=function(e){var t=this;this._activeRequest&&(this._activeRequest.cancel(),this._activeRequest=void 0),e&&e.actions&&(this._activeRequest=e.actions),e&&e.trigger.filter&&e.trigger.filter.kind?e.actions.then(function(n){e.trigger.autoApply===b.CodeActionAutoApply.First||e.trigger.autoApply===b.CodeActionAutoApply.IfSingle&&1===n.length?t._onApplyCodeAction(n[0]):t._codeActionContextMenu.show(e.actions,e.position)
}):e&&"manual"===e.trigger.type?this._codeActionContextMenu.show(e.actions,e.position):e&&e.actions?this._codeActionContextMenu.isVisible?this._codeActionContextMenu.show(e.actions,e.position):this._lightBulbWidget.model=e:this._lightBulbWidget.hide()},e.prototype.getId=function(){return e.ID},e.prototype._handleLightBulbSelect=function(e){this._codeActionContextMenu.show(this._lightBulbWidget.model.actions,e)},e.prototype.triggerFromEditorSelection=function(e,t){return this._model.trigger({type:"manual",filter:e,autoApply:t})},e.prototype._updateLightBulbTitle=function(){var e,t=this._keybindingService.lookupKeybinding(D.Id);e=t?h.localize(0,null,t.getLabel()):h.localize(1,null),this._lightBulbWidget.title=e},e.prototype._onApplyCodeAction=function(e){return o(this,void 0,r.TPromise,function(){return s(this,function(t){switch(t.label){case 0:return[4,T(e,this._bulkEditService,this._commandService,this._editor)];case 1:return t.sent(),[2]}})})},e.ID="editor.contrib.quickFixController",
e=a([l(1,m.IMarkerService),l(2,f.IContextKeyService),l(3,w.IProgressService),l(4,g.IContextMenuService),l(5,p.ICommandService),l(6,v.IKeybindingService),l(7,E.IBulkEditService)],e)}();t.QuickFixController=k,t.applyCodeAction=T;var D=function(e){function t(){return e.call(this,{id:t.Id,label:h.localize(2,null),alias:"Quick Fix",precondition:f.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:2132}})||this}return n(t,e),t.prototype.run=function(e,t){return x(t,h.localize(3,null))},t.Id="editor.action.quickFix",t}(c.EditorAction);t.QuickFixAction=D;var A=function(){function e(e,t){this.kind=e,this.apply=t}return e.fromUser=function(t){return t&&"object"==typeof t?new e(e.getKindFromUser(t),e.getApplyFromUser(t)):new e(b.CodeActionKind.Empty,b.CodeActionAutoApply.IfSingle)},e.getApplyFromUser=function(e){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return b.CodeActionAutoApply.First
;case"never":return b.CodeActionAutoApply.Never;case"ifsingle":default:return b.CodeActionAutoApply.IfSingle}},e.getKindFromUser=function(e){return"string"==typeof e.kind?new b.CodeActionKind(e.kind):b.CodeActionKind.Empty},e}(),L=function(e){function t(){return e.call(this,{id:t.Id,precondition:f.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasCodeActionsProvider)})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=A.fromUser(n);return x(t,h.localize(4,null),{kind:i.kind,includeSourceActions:!0},i.apply)},t.Id="editor.action.codeAction",t}(c.EditorCommand);t.CodeActionCommand=L;var R=function(e){function t(){return e.call(this,{id:t.Id,label:h.localize(5,null),alias:"Refactor",precondition:f.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:3120,mac:{primary:1328}},menuOpts:{group:"1_modification",order:2,
when:f.ContextKeyExpr.and(u.EditorContextKeys.writable,I(b.CodeActionKind.Refactor))}})||this}return n(t,e),t.prototype.run=function(e,t){return x(t,h.localize(6,null),{kind:b.CodeActionKind.Refactor},b.CodeActionAutoApply.Never)},t.Id="editor.action.refactor",t}(c.EditorAction);t.RefactorAction=R;var O=function(e){function t(){return e.call(this,{id:t.Id,label:h.localize(7,null),alias:"Source Action",precondition:f.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasCodeActionsProvider),menuOpts:{group:"1_modification",order:2.1,when:f.ContextKeyExpr.and(u.EditorContextKeys.writable,I(b.CodeActionKind.Source))}})||this}return n(t,e),t.prototype.run=function(e,t){return x(t,h.localize(8,null),{kind:b.CodeActionKind.Source,includeSourceActions:!0},b.CodeActionAutoApply.Never)},t.Id="editor.action.sourceAction",t}(c.EditorAction);t.SourceAction=O;var M=function(e){function t(){return e.call(this,{id:t.Id,label:h.localize(9,null),alias:"Organize Imports",
precondition:f.ContextKeyExpr.and(u.EditorContextKeys.writable,I(b.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:u.EditorContextKeys.editorTextFocus,primary:1581}})||this}return n(t,e),t.prototype.run=function(e,t){return x(t,h.localize(10,null),{kind:b.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},b.CodeActionAutoApply.IfSingle)},t.Id="editor.action.organizeImports",t}(c.EditorAction);t.OrganizeImportsAction=M}),define(e[1010],t([1,0,32,415]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.registerEditorContribution(i.QuickFixController),n.registerEditorAction(i.QuickFixAction),n.registerEditorAction(i.RefactorAction),n.registerEditorAction(i.SourceAction),n.registerEditorAction(i.OrganizeImportsAction),n.registerEditorCommand(new i.CodeActionCommand)}),define(e[1011],t([1,0,1351,5,4,8,128,44,45,18,9,7,106,15,386,129,241,12,26,88,54,338,808]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var I=s.$,T=function(e){function t(n){var i=e.call(this)||this;return i._onHint=i._register(new f.Emitter),i.onHint=i._onHint.event,i._onCancel=i._register(new f.Emitter),i.onCancel=i._onCancel.event,i.editor=n,i.enabled=!1,i.triggerCharactersListeners=[],i.throttledDelayer=new h.RunOnceScheduler(function(){return i.doTrigger()},t.DELAY),i.active=!1,i._register(i.editor.onDidChangeConfiguration(function(){return i.onEditorConfigurationChange()})),i._register(i.editor.onDidChangeModel(function(e){return i.onModelChanged()})),i._register(i.editor.onDidChangeModelLanguage(function(e){return i.onModelChanged()})),i._register(i.editor.onDidChangeCursorSelection(function(e){return i.onCursorChange(e)})),i._register(i.editor.onDidChangeModelContent(function(e){return i.onModelContentChange()})),i._register(u.SignatureHelpProviderRegistry.onDidChange(i.onModelChanged,i)),i.onEditorConfigurationChange(),i.onModelChanged(),i}return n(t,e),t.prototype.cancel=function(e){void 0===e&&(e=!1),this.active=!1,
this.throttledDelayer.cancel(),e||this._onCancel.fire(void 0),this.provideSignatureHelpRequest&&(this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=void 0)},t.prototype.trigger=function(e){if(void 0===e&&(e=t.DELAY),u.SignatureHelpProviderRegistry.has(this.editor.getModel()))return this.cancel(!0),this.throttledDelayer.schedule(e)},t.prototype.doTrigger=function(){var e=this;this.provideSignatureHelpRequest&&this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=m.provideSignatureHelp(this.editor.getModel(),this.editor.getPosition()).then(null,p.onUnexpectedError).then(function(t){if(!t||!t.signatures||0===t.signatures.length)return e.cancel(),e._onCancel.fire(void 0),!1;e.active=!0;var n={hints:t};return e._onHint.fire(n),!0})},t.prototype.isTriggered=function(){return this.active||this.throttledDelayer.isScheduled()},t.prototype.onModelChanged=function(){var e=this;this.cancel(),this.triggerCharactersListeners=r.dispose(this.triggerCharactersListeners)
;var t=this.editor.getModel();if(t){for(var n=new b.CharacterSet,i=0,o=u.SignatureHelpProviderRegistry.ordered(t);i<o.length;i++){var s=o[i];if(Array.isArray(s.signatureHelpTriggerCharacters))for(var a=0,c=s.signatureHelpTriggerCharacters;a<c.length;a++){var l=c[a];n.add(l.charCodeAt(0))}}this.triggerCharactersListeners.push(this.editor.onDidType(function(t){e.enabled&&n.has(t.charCodeAt(t.length-1))&&e.trigger()}))}},t.prototype.onCursorChange=function(e){"mouse"===e.source?this.cancel():this.isTriggered()&&this.trigger()},t.prototype.onModelContentChange=function(){this.isTriggered()&&this.trigger()},t.prototype.onEditorConfigurationChange=function(){this.enabled=this.editor.getConfiguration().contribInfo.parameterHints,this.enabled||this.cancel()},t.prototype.dispose=function(){this.cancel(!0),this.triggerCharactersListeners=r.dispose(this.triggerCharactersListeners),e.prototype.dispose.call(this)},t.DELAY=120,t}(r.Disposable);t.ParameterHintsModel=T;var x=function(){function e(e,t,n,i){var r=this
;this.editor=e,this.allowEditorOverflow=!0,this.markdownRenderer=new w.MarkdownRenderer(e,i,n),this.model=new T(e),this.keyVisible=m.Context.Visible.bindTo(t),this.keyMultipleSignatures=m.Context.MultipleSignatures.bindTo(t),this.visible=!1,this.disposables=[],this.disposables.push(this.model.onHint(function(e){r.show(),r.hints=e.hints,r.currentSignature=e.hints.activeSignature,r.render()})),this.disposables.push(this.model.onCancel(function(){r.hide()}))}return e.prototype.createParamaterHintDOMNodes=function(){var e=this;this.element=I(".editor-widget.parameter-hints-widget");var t=s.append(this.element,I(".wrapper")),n=s.append(t,I(".buttons")),i=s.append(n,I(".button.previous")),r=s.append(n,I(".button.next"));g.stop(g.domEvent(i,"click"))(this.previous,this,this.disposables);g.stop(g.domEvent(r,"click"))(this.next,this,this.disposables),this.overloads=s.append(t,I(".overloads"));var o=I(".body");this.scrollbar=new y.DomScrollableElement(o,{}),this.disposables.push(this.scrollbar),
t.appendChild(this.scrollbar.getDomNode()),this.signature=s.append(o,I(".signature")),this.docs=s.append(o,I(".docs")),this.currentSignature=0,this.editor.addContentWidget(this),this.hide(),this.disposables.push(this.editor.onDidChangeCursorSelection(function(t){e.visible&&e.editor.layoutContentWidget(e)}));var a=function(){var t=e.editor.getConfiguration().fontInfo;e.element.style.fontSize=t.fontSize+"px"};a(),f.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo}).on(a,null,this.disposables),this.disposables.push(this.editor.onDidLayoutChange(function(t){return e.updateMaxHeight()})),this.updateMaxHeight()},e.prototype.show=function(){var e=this;this.model&&!this.visible&&(this.element||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,o.TPromise.timeout(100).done(function(){return s.addClass(e.element,"visible")}),this.editor.layoutContentWidget(this))},e.prototype.hide=function(){
this.model&&this.visible&&(this.element||this.createParamaterHintDOMNodes(),this.keyVisible.reset(),this.visible=!1,this.hints=null,this.announcedLabel=null,s.removeClass(this.element,"visible"),this.editor.layoutContentWidget(this))},e.prototype.getPosition=function(){return this.visible?{position:this.editor.getPosition(),preference:[d.ContentWidgetPositionPreference.ABOVE,d.ContentWidgetPositionPreference.BELOW]}:null},e.prototype.render=function(){var e=this.hints.signatures.length>1;s.toggleClass(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var n=s.append(this.signature,I(".code")),o=t.parameters.length>0,a=this.editor.getConfiguration().fontInfo;if(n.style.fontSize=a.fontSize+"px",n.style.fontFamily=a.fontFamily,o)this.renderParameters(n,t,this.hints.activeParameter);else{s.append(n,I("span")).textContent=t.label}r.dispose(this.renderDisposeables),this.renderDisposeables=[]
;var l=t.parameters[this.hints.activeParameter];if(l&&l.documentation){var u=I("span.documentation");if("string"==typeof l.documentation)u.textContent=l.documentation;else{d=this.markdownRenderer.render(l.documentation);s.addClass(d.element,"markdown-docs"),this.renderDisposeables.push(d),u.appendChild(d.element)}s.append(this.docs,I("p",null,u))}if(s.toggleClass(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation)s.append(this.docs,I("p",null,t.documentation));else{var d=this.markdownRenderer.render(t.documentation);s.addClass(d.element,"markdown-docs"),this.renderDisposeables.push(d),s.append(this.docs,d.element)}var h=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(h+="/"+this.hints.signatures.length),this.overloads.textContent=h,l){var p=l.label;this.announcedLabel!==p&&(c.alert(i.localize(0,null,p)),this.announcedLabel=p)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,n){
for(var i,r=t.label.length,o=0,a=t.parameters.length-1;a>=0;a--){var c=t.parameters[a],l=0,u=0;(o=t.label.lastIndexOf(c.label,r-1))>=0&&(l=o,u=o+c.label.length),(i=document.createElement("span")).textContent=t.label.substring(u,r),s.prepend(e,i),(i=document.createElement("span")).className="parameter "+(a===n?"active":""),i.textContent=t.label.substring(l,u),s.prepend(e,i),r=l}(i=document.createElement("span")).textContent=t.label.substring(0,r),s.prepend(e,i)},e.prototype.next=function(){var e=this.hints.signatures.length;return e<2?(this.cancel(),!1):(this.currentSignature=(this.currentSignature+1)%e,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length;return e<2?(this.cancel(),!1):(this.currentSignature=(this.currentSignature-1+e)%e,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},
e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=r.dispose(this.disposables),this.renderDisposeables=r.dispose(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=a([l(1,v.IContextKeyService),l(2,C.IOpenerService),l(3,E.IModeService)],e)}();t.ParameterHintsWidget=x,S.registerThemingParticipant(function(e,t){var n=e.getColor(_.editorHoverBorder);if(n){var i=e.type===S.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+i+"px solid "+n+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+n.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+n.transparent(.5)+"; }")}var r=e.getColor(_.editorHoverBackground)
;r&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+r+"; }");var o=e.getColor(_.textLinkForeground);o&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+o+"; }");var s=e.getColor(_.textCodeBlockBackground);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")})}),define(e[1012],t([1,0,1346,5,6,55,15,32,1011,386,52]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(d.ParameterHintsWidget,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=r.dispose(this.widget)},e.ID="editor.controller.parameterHints",
e=a([l(1,o.IInstantiationService)],e)}(),g=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:i.localize(0,null),alias:"Trigger Parameter Hints",precondition:s.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:3082}})||this}return n(t,e),t.prototype.run=function(e,t){var n=f.get(t);n&&n.trigger()},t}(u.EditorAction);t.TriggerParameterHintsAction=g,u.registerEditorContribution(f),u.registerEditorAction(g);var v=p.KeybindingsRegistry.WEIGHT.editorContrib(75),m=u.EditorCommand.bindToContribution(f.get);u.registerEditorCommand(new m({id:"closeParameterHints",precondition:h.Context.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:v,kbExpr:s.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),u.registerEditorCommand(new m({id:"showPrevParameterHint",precondition:c.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:v,
kbExpr:s.EditorContextKeys.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),u.registerEditorCommand(new m({id:"showNextParameterHint",precondition:c.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:v,kbExpr:s.EditorContextKeys.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(e[280],t([1,0,1353,23,14,24,74,7,8,41,71,221,218,15,51,809]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inPeekEditor=new f.RawContextKey("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(t.PeekContext||(t.PeekContext={})),t.getOuterEditor=function(e){var t=e.get(d.ICodeEditorService).getFocusedCodeEditor();return t instanceof p.EmbeddedCodeEditorWidget?t.getParentEditor():t};var v={headerBackgroundColor:g.Color.white,primaryHeadingColor:g.Color.fromHex("#333333"),
secondaryHeadingColor:g.Color.fromHex("#6c6c6cb3")},m=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new c.Emitter,s.mixin(i.options,v,!1),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),t.prototype.style=function(t){var n=this.options;t.headerBackgroundColor&&(n.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(n.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(n.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),
this._secondaryHeading&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=a.$(".head").getHTMLElement(),this._bodyElement=a.$(".body").getHTMLElement(),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,n=a.$(".peekview-title").on(l.EventType.CLICK,function(e){return t._onTitleClick(e)}).appendTo(this._headElement).getHTMLElement();this._primaryHeading=a.$("span.filename").appendTo(n).getHTMLElement(),this._secondaryHeading=a.$("span.dirname").appendTo(n).getHTMLElement(),this._metaHeading=a.$("span.meta").appendTo(n).getHTMLElement();var o=a.$(".peekview-actions").appendTo(this._headElement),s=this._getActionBarOptions();this._actionbarWidget=new u.ActionBar(o.getHTMLElement(),s),
this._disposables.push(this._actionbarWidget),this._actionbarWidget.push(new r.Action("peekview.close",i.localize(0,null),"close-peekview-action",!0,function(){return t.dispose(),null}),{label:!1,icon:!0})},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){a.$(this._primaryHeading).safeInnerHtml(e),this._primaryHeading.setAttribute("aria-label",e),t?a.$(this._secondaryHeading).safeInnerHtml(t):l.clearNode(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?a.$(this._metaHeading).safeInnerHtml(e):l.clearNode(this._metaHeading)},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),i=e-(n+2);this._doLayoutHead(n,t),this._doLayoutBody(i,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement.style.height=o.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},
t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=o.format("{0}px",e)},t}(h.ZoneWidget);t.PeekViewWidget=m}),define(e[1014],t([1,0,1374,5,4,19,45,12,26,39,812]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){var n=this;this.themeService=t,this._disposables=[],this.allowEditorOverflow=!0,this._currentAcceptInput=null,this._currentCancelInput=null,this._editor=e,this._editor.addContentWidget(this),this._disposables.push(e.onDidChangeConfiguration(function(e){e.fontInfo&&n.updateFont()})),this._disposables.push(t.onThemeChange(function(e){return n.onThemeChange(e)}))}return e.prototype.onThemeChange=function(e){this.updateStyles(e)},e.prototype.dispose=function(){this._disposables=i.dispose(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"__renameInputWidget"},e.prototype.getDomNode=function(){return this._domNode||(this._inputField=document.createElement("input"),
this._inputField.className="rename-input",this._inputField.type="text",this._inputField.setAttribute("aria-label",n.localize(0,null)),this._domNode=document.createElement("div"),this._domNode.style.height=this._editor.getConfiguration().lineHeight+"px",this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputField),this.updateFont(),this.updateStyles(this.themeService.getTheme())),this._domNode},e.prototype.updateStyles=function(e){if(this._inputField){var t=e.getColor(u.inputBackground),n=e.getColor(u.inputForeground),i=e.getColor(u.widgetShadow),r=e.getColor(u.inputBorder);this._inputField.style.backgroundColor=t?t.toString():null,this._inputField.style.color=n?n.toString():null,this._inputField.style.borderWidth=r?"1px":"0px",this._inputField.style.borderStyle=r?"solid":"none",this._inputField.style.borderColor=r?r.toString():"none",this._domNode.style.boxShadow=i?" 0 2px 8px "+i:null}},e.prototype.updateFont=function(){if(this._inputField){
var e=this._editor.getConfiguration().fontInfo;this._inputField.style.fontFamily=e.fontFamily,this._inputField.style.fontWeight=e.fontWeight,this._inputField.style.fontSize=e.fontSize+"px"}},e.prototype.getPosition=function(){return this._visible?{position:this._position,preference:[s.ContentWidgetPositionPreference.BELOW,s.ContentWidgetPositionPreference.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(e){this._currentCancelInput&&this._currentCancelInput(e)},e.prototype.getInput=function(e,t,n,s){var a=this;this._position=new d.Position(e.startLineNumber,e.startColumn),this._inputField.value=t,this._inputField.setAttribute("selectionStart",n.toString()),this._inputField.setAttribute("selectionEnd",s.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var c,l=[];return c=function(){i.dispose(l),a._hide()},new r.TPromise(function(n){a._currentCancelInput=function(e){
return a._currentAcceptInput=null,a._currentCancelInput=null,n(e),!0},a._currentAcceptInput=function(){0!==a._inputField.value.trim().length&&a._inputField.value!==t?(a._currentAcceptInput=null,a._currentCancelInput=null,n(a._inputField.value)):a.cancelInput(!0)};l.push(a._editor.onDidChangeCursorSelection(function(){o.Range.containsPosition(e,a._editor.getPosition())||a.cancelInput(!0)})),l.push(a._editor.onDidBlurEditorWidget(function(){return a.cancelInput(!1)})),a._show()},function(){a._currentCancelInput(!0)}).then(function(e){return c(),e},function(e){return c(),r.TPromise.wrapError(e)})},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._editor.layoutContentWidget(this),setTimeout(function(){e._inputField.focus(),e._inputField.setSelectionRange(parseInt(e._inputField.getAttribute("selectionStart")),parseInt(e._inputField.getAttribute("selectionEnd")))},100)},e.prototype._hide=function(){this._visible=!1,
this._editor.layoutContentWidget(this)},e=a([l(1,c.IThemeService)],e)}();t.default=h}),define(e[1015],t([1,0,1370,9,4,15,119,32,55,1014,12,18,44,39,128,19,265,203,52,22,184,10,71]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";function k(e,t,n){return o(this,void 0,c.TPromise,function(){return s(this,function(i){return[2,new D(e,t).provideRenameEdits(n)]})})}Object.defineProperty(t,"__esModule",{value:!0});var D=function(){function e(e,t){this.model=e,this.position=t,this._provider=m.RenameProviderRegistry.ordered(e)}return e.prototype.hasProvider=function(){return this._provider.length>0},e.prototype.resolveRenameLocation=function(){return o(this,void 0,c.TPromise,function(){var e,t,n,i=this;return s(this,function(r){switch(r.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,v.asWinJsPromise(function(t){return e.resolveRenameLocation(i.model,i.position,t)})]:[3,2];case 1:t=r.sent(),r.label=2;case 2:return t||(n=this.model.getWordAtPosition(this.position))&&(t={
range:new S.Range(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word}),[2,t]}})})},e.prototype.provideRenameEdits=function(e,t,n,r){return void 0===t&&(t=0),void 0===n&&(n=[]),void 0===r&&(r=this.position),o(this,void 0,c.TPromise,function(){var r,o,a=this;return s(this,function(s){switch(s.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:n.join("\n")}]:(r=this._provider[t],[4,v.asWinJsPromise(function(t){return r.provideRenameEdits(a.model,a.position,e,t)})]);case 1:return(o=s.sent())?o.rejectReason?[2,this.provideRenameEdits(e,t+1,n.concat(o.rejectReason))]:[2,o]:[2,this.provideRenameEdits(e,t+1,n.concat(i.localize(0,null)))]}})})},e}();t.rename=k;var A=new u.RawContextKey("renameInputVisible",!1),L=function(){function e(e,t,n,i,r,o){this.editor=e,this._notificationService=t,this._bulkEditService=n,this._progressService=i,this._renameInputField=new f.default(e,o),this._renameInputVisible=A.bindTo(r)}return e.get=function(t){
return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return o(this,void 0,c.TPromise,function(){var e,t,n,r,o,a,l,u=this;return s(this,function(s){switch(s.label){case 0:if(e=this.editor.getPosition(),!(t=new D(this.editor.getModel(),e)).hasProvider())return[2,void 0];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return n=s.sent(),[3,4];case 3:return r=s.sent(),_.MessageController.get(this.editor).showMessage(r,e),[2,void 0];case 4:return n?(o=this.editor.getSelection(),a=0,l=n.text.length,S.Range.isEmpty(o)||S.Range.spansMultipleLines(o)||!S.Range.containsRange(n.range,o)||(a=Math.max(0,o.startColumn-n.range.startColumn),l=Math.min(n.range.endColumn,o.endColumn)-n.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(n.range,n.text,a,l).then(function(e){u._renameInputVisible.reset();if("boolean"!=typeof e){u.editor.focus()
;var r=new C.EditorState(u.editor,15),o=t.provideRenameEdits(e,0,[],S.Range.lift(n.range).getStartPosition()).then(function(t){if(!t.rejectReason)return u._bulkEditService.apply(t,{editor:u.editor}).then(function(t){t.selection&&u.editor.setSelection(t.selection),t.ariaSummary&&b.alert(i.localize(1,null,n.text,e,t.ariaSummary))});r.validate(u.editor)?_.MessageController.get(u.editor).showMessage(t.rejectReason,u.editor.getPosition()):u._notificationService.info(t.rejectReason)},function(e){return u._notificationService.error(i.localize(2,null)),c.TPromise.wrapError(e)});return u._progressService.showWhile(o,250),o}e&&u.editor.focus()},function(e){return u._renameInputVisible.reset(),c.TPromise.wrapError(e)})]):[2,void 0]}})})},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",
e=a([l(1,w.INotificationService),l(2,I.IBulkEditService),l(3,d.IProgressService),l(4,u.IContextKeyService),l(5,g.IThemeService)],e)}(),R=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:i.localize(3,null),alias:"Rename Symbol",precondition:u.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:60},menuOpts:{group:"1_modification",order:1.1}})||this}return n(t,e),t.prototype.runCommand=function(t,n){var i=this,o=t.get(x.ICodeEditorService),s=n||[void 0,void 0],a=s[0],c=s[1];return T.default.isUri(a)&&y.Position.isIPosition(c)?o.openCodeEditor({resource:a},o.getActiveCodeEditor()).then(function(e){e.setPosition(c),e.invokeWithinContext(function(t){return i.reportTelemetry(t,e),i.run(t,e)})},r.onUnexpectedError):e.prototype.runCommand.call(this,t,n)},t.prototype.run=function(e,t){var n=L.get(t);if(n)return n.run()},t}(h.EditorAction);t.RenameAction=R,h.registerEditorContribution(L),
h.registerEditorAction(R);var O=h.EditorCommand.bindToContribution(L.get);h.registerEditorCommand(new O({id:"acceptRenameInput",precondition:A,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:E.KeybindingsRegistry.WEIGHT.editorContrib(99),kbExpr:p.EditorContextKeys.focus,primary:3}})),h.registerEditorCommand(new O({id:"cancelRenameInput",precondition:A,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:E.KeybindingsRegistry.WEIGHT.editorContrib(99),kbExpr:p.EditorContextKeys.focus,primary:9,secondary:[1033]}})),h.registerDefaultLanguageCommand("_executeDocumentRenameProvider",function(e,t,n){var i=n.newName;if("string"!=typeof i)throw r.illegalArgument("newName");return k(e,t,i)})}),define(e[1016],t([1,0,1385,110,14,7,4,9,5,8,194,169,129,37,15,45,168,128,28,68,12,26,34,338,54,88,814]),function(e,t,n,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";function D(e){return e&&e.match(O)?e:null}function A(e){if(!e)return!1;var t=e.suggestion
;return!!t.documentation||t.detail&&t.detail!==t.label}Object.defineProperty(t,"__esModule",{value:!0});var L=!1;t.editorSuggestWidgetBackground=w.registerColor("editorSuggestWidget.background",{dark:w.editorWidgetBackground,light:w.editorWidgetBackground,hc:w.editorWidgetBackground},n.localize(0,null)),t.editorSuggestWidgetBorder=w.registerColor("editorSuggestWidget.border",{dark:w.editorWidgetBorder,light:w.editorWidgetBorder,hc:w.editorWidgetBorder},n.localize(1,null)),t.editorSuggestWidgetForeground=w.registerColor("editorSuggestWidget.foreground",{dark:w.editorForeground,light:w.editorForeground,hc:w.editorForeground},n.localize(2,null)),t.editorSuggestWidgetSelectedBackground=w.registerColor("editorSuggestWidget.selectedBackground",{dark:w.listFocusBackground,light:w.listFocusBackground,hc:w.listFocusBackground},n.localize(3,null)),t.editorSuggestWidgetHighlightForeground=w.registerColor("editorSuggestWidget.highlightForeground",{dark:w.listHighlightForeground,light:w.listHighlightForeground,
hc:w.listHighlightForeground},n.localize(4,null));var R,O=/^(#([\da-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*\))$/i,M=function(){function e(e,t,n){this.widget=e,this.editor=t,this.triggerKeybindingLabel=n}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"suggestion"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,i=Object.create(null);i.disposables=[],i.root=e,i.icon=h.append(e,h.$(".icon")),i.colorspan=h.append(i.icon,h.$("span.colorspan"));var r=h.append(e,h.$(".contents")),s=h.append(r,h.$(".main"));i.highlightedLabel=new p.HighlightedLabel(s),i.disposables.push(i.highlightedLabel),i.typeLabel=h.append(s,h.$("span.type-label")),i.readMore=h.append(s,h.$("span.readMore")),i.readMore.title=n.localize(5,null,this.triggerKeybindingLabel);var a=function(){
var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,r=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",o=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";i.root.style.fontSize=r,s.style.fontFamily=n,s.style.lineHeight=o,i.icon.style.height=o,i.icon.style.width=o,i.readMore.style.height=o,i.readMore.style.width=o};return a(),o.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo||e.contribInfo}).on(a,null,i.disposables),i},e.prototype.renderElement=function(e,t,r){var o=this,s=r,a=e.suggestion;if(A(e)?s.root.setAttribute("aria-label",n.localize(6,null,a.label)):s.root.setAttribute("aria-label",n.localize(7,null,a.label)),s.icon.className="icon "+a.type,s.colorspan.style.backgroundColor="","color"===a.type){var c=D(a.label)||"string"==typeof a.documentation&&D(a.documentation);c&&(s.icon.className="icon customcolor",s.colorspan.style.backgroundColor=c)}s.highlightedLabel.set(a.label,i.createMatches(e.matches),"",!0),
s.typeLabel.textContent=(a.detail||"").replace(/\n.*$/m,""),A(e)?(h.show(s.readMore),s.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},s.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),o.widget.toggleDetails()}):(h.hide(s.readMore),s.readMore.onmousedown=null,s.readMore.onclick=null)},e.prototype.disposeTemplate=function(e){e.disposables=d.dispose(e.disposables)},e}();!function(e){e[e.Hidden=0]="Hidden",e[e.Loading=1]="Loading",e[e.Empty=2]="Empty",e[e.Open=3]="Open",e[e.Frozen=4]="Frozen",e[e.Details=5]="Details"}(R||(R={}));var P=function(){function e(e,t,i,r,s){var a=this;this.widget=t,this.editor=i,this.markdownRenderer=r,this.triggerKeybindingLabel=s,this.borderWidth=1,this.disposables=[],this.el=h.append(e,h.$(".details")),this.disposables.push(d.toDisposable(function(){return e.removeChild(a.el)})),this.body=h.$(".body"),this.scrollbar=new g.DomScrollableElement(this.body,{}),h.append(this.el,this.scrollbar.getDomNode()),
this.disposables.push(this.scrollbar),this.header=h.append(this.body,h.$(".header")),this.close=h.append(this.header,h.$("span.close")),this.close.title=n.localize(8,null,this.triggerKeybindingLabel),this.type=h.append(this.header,h.$("p.type")),this.docs=h.append(this.body,h.$("p.docs")),this.ariaLabel=null,this.configureFont(),o.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo}).on(this.configureFont,this,this.disposables),r.onDidRenderCodeBlock(function(){return a.scrollbar.scanDomNode()},this,this.disposables)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.el},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this;if(this.renderDisposeable=d.dispose(this.renderDisposeable),!e||!A(e))return this.type.textContent="",this.docs.textContent="",h.addClass(this.el,"no-docs"),void(this.ariaLabel=null);if(h.removeClass(this.el,"no-docs"),
"string"==typeof e.suggestion.documentation)h.removeClass(this.docs,"markdown-docs"),this.docs.textContent=e.suggestion.documentation;else{h.addClass(this.docs,"markdown-docs"),this.docs.innerHTML="";var n=this.markdownRenderer.render(e.suggestion.documentation);this.renderDisposeable=n,this.docs.appendChild(n.element)}e.suggestion.detail?(this.type.innerText=e.suggestion.detail,h.show(this.type)):(this.type.innerText="",h.hide(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),this.ariaLabel=r.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||"")},e.prototype.getAriaLabel=function(){return this.ariaLabel},e.prototype.scrollDown=function(e){void 0===e&&(e=8),this.body.scrollTop+=e},
e.prototype.scrollUp=function(e){void 0===e&&(e=8),this.body.scrollTop-=e},e.prototype.scrollTop=function(){this.body.scrollTop=0},e.prototype.scrollBottom=function(){this.body.scrollTop=this.body.scrollHeight},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.setBorderWidth=function(e){this.borderWidth=e},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,n=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",i=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";this.el.style.fontSize=n,this.type.style.fontFamily=t,this.close.style.height=i,this.close.style.width=i},e.prototype.dispose=function(){this.disposables=d.dispose(this.disposables),this.renderDisposeable=d.dispose(this.renderDisposeable)},e}(),N=function(){function e(e,n,i,r,s,a,c,l){var u=this;this.editor=e,this.telemetryService=n,this.allowEditorOverflow=!0,this.ignoreFocusEvents=!1,this.onDidSelectEmitter=new o.Emitter,
this.onDidFocusEmitter=new o.Emitter,this.onDidHideEmitter=new o.Emitter,this.onDidShowEmitter=new o.Emitter,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.storageServiceAvailable=!0,this.expandSuggestionDocs=!1,this.firstFocusInCurrentList=!1;var d=a.lookupKeybinding("editor.action.triggerSuggest"),p=d?" ("+d.getLabel()+")":"",g=new T.MarkdownRenderer(e,c,l);this.isAuto=!1,this.focusedItem=null,this.storageService=s,void 0===this.expandDocsSettingFromStorage()&&(this.storageService.store("expandSuggestionDocs",L,I.StorageScope.GLOBAL),void 0===this.expandDocsSettingFromStorage()&&(this.storageServiceAvailable=!1)),this.element=h.$(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||h.addClass(this.element,"no-icons"),this.messageElement=h.append(this.element,h.$(".message")),
this.listElement=h.append(this.element,h.$(".tree")),this.details=new P(this.element,this,this.editor,g,p);var v=new M(this,this.editor,p);this.list=new f.List(this.listElement,this,[v],{useShadows:!1,selectOnMouseDown:!0,focusOnMouseDown:!1,openController:{shouldOpen:function(){return!1}}}),this.toDispose=[C.attachListStyler(this.list,r,{listInactiveFocusBackground:t.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:w.activeContrastBorder}),r.onThemeChange(function(e){return u.onThemeChange(e)}),e.onDidBlurEditorText(function(){return u.onEditorBlur()}),e.onDidLayoutChange(function(){return u.onEditorLayoutChange()}),this.list.onSelectionChange(function(e){return u.onListSelection(e)}),this.list.onFocusChange(function(e){return u.onListFocus(e)}),this.editor.onDidChangeCursorSelection(function(){return u.onCursorSelectionChanged()})],this.suggestWidgetVisible=b.Context.Visible.bindTo(i),this.suggestWidgetMultipleSuggestions=b.Context.MultipleSuggestions.bindTo(i),
this.suggestionSupportsAutoAccept=b.Context.AcceptOnKey.bindTo(i),this.editor.addContentWidget(this),this.setState(0),this.onThemeChange(r.getTheme())}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;this.editorBlurTimeout=s.TPromise.timeout(150).then(function(){e.editor.hasTextFocus()||e.setState(0)})},e.prototype.onEditorLayoutChange=function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()},e.prototype.onListSelection=function(e){var t=this;if(e.elements.length){var i=e.elements[0],r=e.indexes[0];i.resolve().then(function(){t.onDidSelectEmitter.fire({item:i,index:r,model:t.completionModel}),S.alert(n.localize(11,null,i.suggestion.label)),t.editor.focus()})}},e.prototype._getSuggestionAriaAlertLabel=function(e){return A(e)?n.localize(12,null,e.suggestion.label):n.localize(13,null,e.suggestion.label)},e.prototype._ariaAlert=function(e){
this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&S.alert(this._lastAriaAlertLabel))},e.prototype.onThemeChange=function(e){var n=e.getColor(t.editorSuggestWidgetBackground);n&&(this.listElement.style.backgroundColor=n.toString(),this.details.element.style.backgroundColor=n.toString(),this.messageElement.style.backgroundColor=n.toString());var i=e.getColor(t.editorSuggestWidgetBorder);i&&(this.listElement.style.borderColor=i.toString(),this.details.element.style.borderColor=i.toString(),this.messageElement.style.borderColor=i.toString(),this.detailsBorderColor=i.toString());var r=e.getColor(w.focusBorder);r&&(this.detailsFocusBorderColor=r.toString()),this.details.setBorderWidth("hc"===e.type?2:1)},e.prototype.onListFocus=function(e){var t=this;if(!this.ignoreFocusEvents){if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this._ariaAlert(null);var n=e.elements[0]
;if(this._ariaAlert(this._getSuggestionAriaAlertLabel(n)),this.firstFocusInCurrentList=!this.focusedItem,n!==this.focusedItem){this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null);var i=e.indexes[0];this.suggestionSupportsAutoAccept.set(!n.suggestion.noAutoAccept),this.focusedItem=n,this.list.reveal(i),this.currentSuggestionDetails=n.resolve().then(function(){t.ignoreFocusEvents=!0,t.list.splice(i,1,[n]),t.list.setFocus([i]),t.ignoreFocusEvents=!1,t.expandDocsSettingFromStorage()?t.showDetails():h.removeClass(t.element,"docs-side")}).then(null,function(e){return!u.isPromiseCanceledError(e)&&u.onUnexpectedError(e)}).then(function(){return t.currentSuggestionDetails=null}),this.onDidFocusEmitter.fire({item:n,index:i,model:this.completionModel})}}},e.prototype.setState=function(t){if(this.element){var n=this.state!==t;switch(this.state=t,h.toggleClass(this.element,"frozen",4===t),t){case 0:h.hide(this.messageElement,this.details.element,this.listElement),
this.hide(),this.listHeight=0,n&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,h.hide(this.listElement,this.details.element),h.show(this.messageElement),h.removeClass(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,h.hide(this.listElement,this.details.element),h.show(this.messageElement),h.removeClass(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 3:case 4:h.hide(this.messageElement),h.show(this.listElement),this.show();break;case 5:h.hide(this.messageElement),h.show(this.details.element,this.listElement),this.show(),this._ariaAlert(this.details.getAriaLabel())}}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout(function(){t.loadingTimeout=null,t.setState(1)},50)))},e.prototype.showSuggestions=function(e,t,n,i){
if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel!==e&&(this.completionModel=e),n&&2!==this.state&&0!==this.state)this.setState(4);else{var r=this.completionModel.items.length,o=0===r;if(this.suggestWidgetMultipleSuggestions.set(r>1),o)i?this.setState(0):this.setState(2),this.completionModel=null;else{var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!i,this.telemetryService.publicLog("suggestWidget",c({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),n?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:
return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){
5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(A(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),h.hide(this.details.element),h.removeClass(this.element,"docs-side"),h.removeClass(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){
this.expandSideOrBelow(),h.show(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout=s.TPromise.timeout(100).then(function(){h.addClass(e.element,"visible"),e.onDidShowEmitter.fire(e)})},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),h.removeClass(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),
preference:[y.ContentWidgetPositionPreference.BELOW,y.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=h.getDomNodePagePosition(this.editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height,o=h.getDomNodePagePosition(this.element),s=o.left,a=o.top;s<i-this.listWidth?h.addClass(this.element,"list-right"):h.removeClass(this.element,"list-right"),
h.hasClass(this.element,"docs-side")&&r-e>a&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!A(this.focusedItem)&&this.firstFocusInCurrentList)return h.removeClass(this.element,"docs-side"),void h.removeClass(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])<this.maxWidgetWidth?(h.addClass(this.element,"docs-below"),h.removeClass(this.element,"docs-side")):A(this.focusedItem)&&(h.addClass(this.element,"docs-side"),h.removeClass(this.element,"docs-below"))},Object.defineProperty(e.prototype,"maxWidgetHeight",{get:function(){return 12*this.unfocusedHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unfocusedHeight",{get:function(){var e=this.editor.getConfiguration();return e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight},enumerable:!0,configurable:!0}),
e.prototype.getHeight=function(e){return this.unfocusedHeight},e.prototype.getTemplateId=function(e){return"suggestion"},e.prototype.expandDocsSettingFromStorage=function(){return this.storageServiceAvailable?this.storageService.getBoolean("expandSuggestionDocs",I.StorageScope.GLOBAL):this.expandSuggestionDocs},e.prototype.updateExpandDocsSetting=function(e){this.storageServiceAvailable?this.storageService.store("expandSuggestionDocs",e,I.StorageScope.GLOBAL):this.expandSuggestionDocs=e},e.prototype.dispose=function(){this.state=null,this.suggestionSupportsAutoAccept=null,this.currentSuggestionDetails=null,this.focusedItem=null,this.element=null,this.messageElement=null,this.listElement=null,this.details.dispose(),this.details=null,this.list.dispose(),this.list=null,this.toDispose=d.dispose(this.toDispose),this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.editorBlurTimeout&&(this.editorBlurTimeout.cancel(),this.editorBlurTimeout=null),
this.showTimeout&&(this.showTimeout.cancel(),this.showTimeout=null)},e.ID="editor.widget.suggestWidget",e.LOADING_MESSAGE=n.localize(9,null),e.NO_SUGGESTIONS_MESSAGE=n.localize(10,null),e=a([l(1,_.ITelemetryService),l(2,m.IContextKeyService),l(3,E.IThemeService),l(4,I.IStorageService),l(5,v.IKeybindingService),l(6,x.IModeService),l(7,k.IOpenerService)],e)}();t.SuggestWidget=N,E.registerThemingParticipant(function(e,n){var i=e.getColor(t.editorSuggestWidgetHighlightForeground);i&&n.addRule(".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: "+i+"; }");var r=e.getColor(t.editorSuggestWidgetForeground);r&&n.addRule(".monaco-editor .suggest-widget { color: "+r+"; }");var o=e.getColor(w.textLinkForeground);o&&n.addRule(".monaco-editor .suggest-widget a { color: "+o+"; }");var s=e.getColor(w.textCodeBlockBackground);s&&n.addRule(".monaco-editor .suggest-widget code { background-color: "+s+"; }")})}),
define(e[284],t([1,0,1384,9,20,5,6,15,29,55,32,128,105,19,226,160,168,954,1016,52,919]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e,t,n){var i=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow(function(){return i._onItem(t.getFocusedItem())})),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType(function(t){if(i._activeItem){var r=t[t.length-1];i._activeAcceptCharacters.has(r)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&n(i._activeItem)}}))}return e.prototype._onItem=function(e){if(e&&!o.isFalsyOrEmpty(e.item.suggestion.commitCharacters)){this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,n=e.item.suggestion.commitCharacters;t<n.length;t++){var i=n[t];i.length>0&&this._activeAcceptCharacters.add(i[0])}}else this.reset()},
e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){s.dispose(this._disposables)},e}(),I=function(){function e(e,t,n,i){var r=this;this._editor=e,this._commandService=t,this._contextKeyService=n,this._instantiationService=i,this._toDispose=[],this._model=new S.SuggestModel(this._editor),this._memory=i.createInstance(E.SuggestMemories,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger(function(e){r._widget||r._createSuggestWidget(),r._widget.showTriggered(e.auto)})),this._toDispose.push(this._model.onDidSuggest(function(e){var t=r._memory.select(r._editor.getModel(),r._editor.getPosition(),e.completionModel.items);r._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)})),this._toDispose.push(this._model.onDidCancel(function(e){r._widget&&!e.retrigger&&r._widget.hideWidget()}));var o=b.Context.AcceptSuggestionsOnEnter.bindTo(n),s=function(){
var e=r._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,n=e.suggestSelection;o.set("on"===t||"smart"===t),r._memory.setMode(n)};this._toDispose.push(this._editor.onDidChangeConfiguration(function(e){return s()})),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance(_.SuggestWidget,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new w(this._editor,this._widget,function(t){return e._onDidSelectItem(t)});this._toDispose.push(t,this._model.onDidSuggest(function(e){0===e.completionModel.items.length&&t.reset()}));var n=b.Context.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus(function(t){var i=t.item,r=e._editor.getPosition(),o=i.position.column-i.suggestion.overwriteBefore,s=r.column,a=!0
;if("smart"===e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter&&2===e._model.state&&!i.suggestion.command&&!i.suggestion.additionalTextEdits&&"textmate"!==i.suggestion.snippetType&&s-o===i.suggestion.insertText.length){a=e._editor.getModel().getValueInRange({startLineNumber:r.lineNumber,startColumn:o,endLineNumber:r.lineNumber,endColumn:s})!==i.suggestion.insertText}n.set(a)})),this._toDispose.push({dispose:function(){n.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=s.dispose(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var n=e.item,i=n.suggestion,o=n.position,s=this._editor.getPosition().column-o.column;this._editor.pushUndoStop(),Array.isArray(i.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",i.additionalTextEdits.map(function(e){
return g.EditOperation.replace(v.Range.lift(e.range),e.text)})),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=i.insertText;"textmate"!==i.snippetType&&(a=m.SnippetParser.escape(a)),y.SnippetController2.get(this._editor).insert(a,i.overwriteBefore+s,i.overwriteAfter,!1,!1),this._editor.pushUndoStop(),i.command?i.command.id===T.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[i.command.id].concat(i.command.arguments)).done(void 0,r.onUnexpectedError),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){var t=e.suggestion,n=i.localize(0,null,t.label,t.insertText);f.alert(n)},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem()
;this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=a([l(1,d.ICommandService),l(2,u.IContextKeyService),l(3,c.IInstantiationService)],e)}();t.SuggestController=I
;var T=function(e){function t(){return e.call(this,{id:t.id,label:i.localize(1,null),alias:"Trigger Suggest",precondition:u.ContextKeyExpr.and(h.EditorContextKeys.writable,h.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:h.EditorContextKeys.textInputFocus,primary:2058,mac:{primary:266}}})||this}return n(t,e),t.prototype.run=function(e,t){var n=I.get(t);n&&n.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(p.EditorAction);t.TriggerSuggestAction=T,p.registerEditorContribution(I),p.registerEditorAction(T);var x=C.KeybindingsRegistry.WEIGHT.editorContrib(90),k=p.EditorCommand.bindToContribution(I.get);p.registerEditorCommand(new k({id:"acceptSelectedSuggestion",precondition:b.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:2}})),p.registerEditorCommand(new k({id:"acceptSelectedSuggestionOnEnter",precondition:b.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:x,
kbExpr:u.ContextKeyExpr.and(h.EditorContextKeys.textInputFocus,b.Context.AcceptSuggestionsOnEnter,b.Context.MakesTextEdit),primary:3}})),p.registerEditorCommand(new k({id:"hideSuggestWidget",precondition:b.Context.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),p.registerEditorCommand(new k({id:"selectNextSuggestion",precondition:u.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),p.registerEditorCommand(new k({id:"selectNextPageSuggestion",precondition:u.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),p.registerEditorCommand(new k({
id:"selectLastSuggestion",precondition:u.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),p.registerEditorCommand(new k({id:"selectPrevSuggestion",precondition:u.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),p.registerEditorCommand(new k({id:"selectPrevPageSuggestion",precondition:u.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),p.registerEditorCommand(new k({id:"selectFirstSuggestion",precondition:u.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),p.registerEditorCommand(new k({
id:"toggleSuggestionDetails",precondition:b.Context.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:2058,mac:{primary:266}}})),p.registerEditorCommand(new k({id:"toggleSuggestionFocus",precondition:b.Context.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:x,kbExpr:h.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}}))}),define(e[419],t([1,0,1391,18,9,19,32,44,5,26,12,171,66,15,55,20,57]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";function S(e,t){var n=u.DocumentHighlightProviderRegistry.ordered(e);return r.first(n.map(function(n){return function(){return r.asWinJsPromise(function(i){return n.provideDocumentHighlights(e,t,i)}).then(void 0,o.onUnexpectedExternalError)}}),function(e){return!y.isFalsyOrEmpty(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.editorWordHighlight=h.registerColor("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null
},i.localize(0,null),!0),t.editorWordHighlightStrong=h.registerColor("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.localize(1,null),!0),t.editorWordHighlightBorder=h.registerColor("editor.wordHighlightBorder",{light:null,dark:null,hc:h.activeContrastBorder},i.localize(2,null)),t.editorWordHighlightStrongBorder=h.registerColor("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:h.activeContrastBorder},i.localize(3,null)),t.overviewRulerWordHighlightForeground=h.registerColor("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.localize(4,null),!0),t.overviewRulerWordHighlightStrongForeground=h.registerColor("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.localize(5,null),!0),t.ctxHasWordHighlights=new v.RawContextKey("hasWordHighlights",!1),t.getOccurrencesAtPosition=S,c.registerDefaultLanguageCommand("_executeDocumentHighlights",S);var _=function(){
function e(e,n){var i=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=t.ctxHasWordHighlights.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition(function(e){i._ignorePositionChangeEvent||i.occurrencesHighlight&&i._onPositionChanged(e)})),this.toUnhook.push(e.onDidChangeModel(function(e){i._stopAll(),i.model=i.editor.getModel()})),this.toUnhook.push(e.onDidChangeModelContent(function(e){i._stopAll()})),this.toUnhook.push(e.onDidChangeConfiguration(function(e){var t=i.editor.getConfiguration().contribInfo.occurrencesHighlight;i.occurrencesHighlight!==t&&(i.occurrencesHighlight=t,i._stopAll())})),this._lastWordRange=null,this._decorationIds=[],
this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map(function(t){return e.model.getDecorationRange(t)}).sort(s.Range.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),n=t[(y.firstIndex(t,function(t){return t.containsPosition(e.editor.getPosition())})+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),n=t[(y.firstIndex(t,function(t){return t.containsPosition(e.editor.getPosition())})-1+t.length)%t.length];try{
this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){this.occurrencesHighlight&&e.reason===f.CursorChangeReason.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(u.DocumentHighlightProviderRegistry.has(this.model)){var t=this.editor.getSelection()
;if(t.startLineNumber===t.endLineNumber){var n=t.startLineNumber,i=t.startColumn,r=t.endColumn,o=this.model.getWordAtPosition({lineNumber:n,column:i});if(!o||o.startColumn>i||o.endColumn<r)this._stopAll();else{for(var a=new s.Range(n,o.startColumn,n,o.endColumn),c=this._lastWordRange&&this._lastWordRange.equalsRange(a),l=0,d=this._decorationIds.length;!c&&l<d;l++){var h=this.model.getDecorationRange(this._decorationIds[l]);h&&h.startLineNumber===n&&h.startColumn<=i&&h.endColumn>=r&&(c=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),c)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var p=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=S(this.model,this.editor.getPosition()),this.workerRequest.then(function(t){p===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())
}).done()}this._lastWordRange=a}}else this._stopAll()}else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),n=this.lastCursorPositionChangeTime+250;t>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(function(){e.renderDecorations()},n-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],n=0,i=this.workerRequestValue.length;n<i;n++){var r=this.workerRequestValue[n];t.push({range:r.range,options:e._getDecorationOptions(r.kind)})}this._decorationIds=this.editor.deltaDecorations(this._decorationIds,t),this._hasWordHighlights.set(this.hasDecorations())},e._getDecorationOptions=function(e){return e===u.DocumentHighlightKind.Write?this._WRITE_OPTIONS:e===u.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS},e.prototype.dispose=function(){this._stopAll(),this.toUnhook=d.dispose(this.toUnhook)},e._WRITE_OPTIONS=g.ModelDecorationOptions.register({
stickiness:b.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"wordHighlightStrong",overviewRuler:{color:p.themeColorFromId(t.overviewRulerWordHighlightStrongForeground),darkColor:p.themeColorFromId(t.overviewRulerWordHighlightStrongForeground),position:b.OverviewRulerLane.Center}}),e._TEXT_OPTIONS=g.ModelDecorationOptions.register({stickiness:b.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:p.themeColorFromId(h.overviewRulerSelectionHighlightForeground),darkColor:p.themeColorFromId(h.overviewRulerSelectionHighlightForeground),position:b.OverviewRulerLane.Center}}),e._REGULAR_OPTIONS=g.ModelDecorationOptions.register({stickiness:b.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"wordHighlight",overviewRuler:{color:p.themeColorFromId(t.overviewRulerWordHighlightForeground),darkColor:p.themeColorFromId(t.overviewRulerWordHighlightForeground),position:b.OverviewRulerLane.Center}}),e}(),C=function(){function e(e,t){
this.wordHighligher=new _(e,t)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.saveViewState=function(){return!!this.wordHighligher.hasDecorations()},e.prototype.moveNext=function(){this.wordHighligher.moveNext()},e.prototype.moveBack=function(){this.wordHighligher.moveBack()},e.prototype.restoreViewState=function(e){e&&this.wordHighligher.restore()},e.prototype.dispose=function(){this.wordHighligher.dispose()},e.ID="editor.contrib.wordHighlighter",e=a([l(1,v.IContextKeyService)],e)}(),E=function(e){function t(t,n){var i=e.call(this,n)||this;return i._isNext=t,i}return n(t,e),t.prototype.run=function(e,t){var n=C.get(t);n&&(this._isNext?n.moveNext():n.moveBack())},t}(c.EditorAction),w=function(e){function r(){return e.call(this,!0,{id:"editor.action.wordHighlight.next",label:i.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:t.ctxHasWordHighlights,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:65}})||this}
return n(r,e),r}(E),I=function(e){function r(){return e.call(this,!1,{id:"editor.action.wordHighlight.prev",label:i.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:t.ctxHasWordHighlights,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:1089}})||this}return n(r,e),r}(E);c.registerEditorContribution(C),c.registerEditorAction(w),c.registerEditorAction(I),p.registerThemingParticipant(function(e,n){var i=e.getColor(h.editorSelectionHighlight);i&&(n.addRule(".monaco-editor .focused .selectionHighlight { background-color: "+i+"; }"),n.addRule(".monaco-editor .selectionHighlight { background-color: "+i.transparent(.5)+"; }"));var r=e.getColor(t.editorWordHighlight);r&&n.addRule(".monaco-editor .wordHighlight { background-color: "+r+"; }");var o=e.getColor(t.editorWordHighlightStrong);o&&n.addRule(".monaco-editor .wordHighlightStrong { background-color: "+o+"; }");var s=e.getColor(h.editorSelectionHighlightBorder)
;s&&n.addRule(".monaco-editor .selectionHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+s+"; box-sizing: border-box; }");var a=e.getColor(t.editorWordHighlightBorder);a&&n.addRule(".monaco-editor .wordHighlight { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+a+"; box-sizing: border-box; }");var c=e.getColor(t.editorWordHighlightStrongBorder);c&&n.addRule(".monaco-editor .wordHighlightStrong { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+c+"; box-sizing: border-box; }")})}),define(e[287],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e.Uninitialized="uninitialized",e.Idle="idle",e.CheckingForUpdates="checking for updates",e.AvailableForDownload="available for download",e.Downloading="downloading",e.Downloaded="downloaded",e.Updating="updating",e.Ready="ready"}(i=t.StateType||(t.StateType={})),t.State={Uninitialized:{type:i.Uninitialized},Idle:{type:i.Idle},CheckingForUpdates:function(e){return{type:i.CheckingForUpdates,
context:e}},AvailableForDownload:function(e){return{type:i.AvailableForDownload,update:e}},Downloading:function(e){return{type:i.Downloading,update:e}},Downloaded:function(e){return{type:i.Downloaded,update:e}},Updating:function(e){return{type:i.Updating,update:e}},Ready:function(e){return{type:i.Ready,update:e}}},t.IUpdateService=n.createDecorator("updateService")}),define(e[1020],t([1,0,4,131,7,9,287]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"event:onStateChange":return i.eventToCall(this.service.onStateChange);case"checkForUpdates":return this.service.checkForUpdates(t);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return n.TPromise.as(this.service.state);case"isLatestVersion":return this.service.isLatestVersion()}},e}()
;t.UpdateChannel=a;var c=function(){function e(e){var t=this;this.channel=e,this._onRemoteStateChange=i.eventFromCall(this.channel,"event:onStateChange"),this._onStateChange=new r.Emitter,this._state=s.State.Uninitialized,this.onStateChange(function(e){return t._state=e}),e.call("_getInitialState").done(function(e){t._onStateChange.fire(e),t._onRemoteStateChange(function(e){return t._onStateChange.fire(e)})},o.onUnexpectedError)}return Object.defineProperty(e.prototype,"onStateChange",{get:function(){return this._onStateChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.checkForUpdates=function(e){return this.channel.call("checkForUpdates",e)},e.prototype.downloadUpdate=function(){return this.channel.call("downloadUpdate")},e.prototype.applyUpdate=function(){return this.channel.call("applyUpdate")},e.prototype.quitAndInstall=function(){return this.channel.call("quitAndInstall")},
e.prototype.isLatestVersion=function(){return this.channel.call("isLatestVersion")},e}();t.UpdateChannelClient=c}),define(e[1021],t([1,0,1423,16,63]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:n.localize(0,null),type:"object",properties:{"update.channel":{type:"string",enum:["none","default"],default:"default",scope:r.ConfigurationScope.APPLICATION,description:n.localize(1,null)},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:r.ConfigurationScope.APPLICATION,description:n.localize(2,null)},"update.showReleaseNotes":{type:"boolean",default:!0,description:n.localize(3,null)}}})}),define(e[220],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="urlService",t.IURLService=n.createDecorator(t.ID)}),define(e[1023],t([1,0,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var i=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"open":return this.service.open(n.default.revive(t))}},e}();t.URLServiceChannel=i;var r=function(){function e(e){this.channel=e}return e.prototype.open=function(e){return this.channel.call("open",e.toJSON())},e.prototype.registerHandler=function(e){throw new Error("Not implemented.")},e}();t.URLServiceChannelClient=r;var o=function(){function e(e){this.handler=e}return e.prototype.call=function(e,t){switch(e){case"handleURL":return this.handler.handleURL(n.default.revive(t))}},e}();t.URLHandlerChannel=o;var s=function(){function e(e){this.channel=e}return e.prototype.handleURL=function(e){return this.channel.call("handleURL",e.toJSON())},e}();t.URLHandlerChannelClient=s}),define(e[1024],t([1,0,5,4]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this.handlers=new Set}return e.prototype.open=function(e){return o(this,void 0,r.TPromise,function(){
var t,n,i,r;return s(this,function(o){switch(o.label){case 0:t=Array.from(this.handlers),n=0,i=t,o.label=1;case 1:return n<i.length?(r=i[n],[4,r.handleURL(e)]):[3,4];case 2:if(o.sent())return[2,!0];o.label=3;case 3:return n++,[3,1];case 4:return[2,!1]}})})},e.prototype.registerHandler=function(e){var t=this;return this.handlers.add(e),i.toDisposable(function(){return t.handlers.delete(e)})},e}();t.URLService=a;var c=function(e){function t(t){var n=e.call(this)||this;return n.urlService=t,n}return n(t,e),t.prototype.open=function(e){return o(this,void 0,r.TPromise,function(){return s(this,function(t){return[2,this.urlService.open(e)]})})},t.prototype.handleURL=function(t){return e.prototype.open.call(this,t)},t}(a);t.RelayURLService=c}),define(e[1025],t([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindContextScopedWidget=function(e,t,i){new n.RawContextKey(i,t).bindTo(e)},t.createWidgetScopedContextKeyService=function(e,t){return e.createScoped(t.target)},
t.getContextScopedWidget=function(e,t){return e.getContext(document.activeElement).getValue(t)}}),define(e[185],t([1,0,15,118,409,1025,52]),function(e,t,i,r,o,s,c){"use strict";function u(e,n){var r=s.createWidgetScopedContextKeyService(e,n);s.bindContextScopedWidget(r,n,t.HistoryNavigationWidgetContext);return{scopedContextKeyService:r,historyNavigationEnablement:new i.RawContextKey(t.HistoryNavigationEnablementContext,!0).bindTo(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryNavigationWidgetContext="historyNavigationWidget",t.HistoryNavigationEnablementContext="historyNavigationEnabled",t.createAndBindHistoryNavigationWidgetScopedContextKeyService=u;var d=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i)||this;return o._register(u(r,{target:o.element,historyNavigator:o}).scopedContextKeyService),o}return n(t,e),t=a([l(3,i.IContextKeyService)],t)}(r.HistoryInputBox);t.ContextScopedHistoryInputBox=d;var h=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i)||this
;return o._register(u(r,{target:o.inputBox.element,historyNavigator:o.inputBox}).scopedContextKeyService),o}return n(t,e),t=a([l(3,i.IContextKeyService)],t)}(o.FindInput);t.ContextScopedFindInput=h,c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:c.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:i.ContextKeyExpr.and(new i.ContextKeyDefinedExpr(t.HistoryNavigationWidgetContext),new i.ContextKeyEqualsExpr(t.HistoryNavigationEnablementContext,!0)),primary:16,secondary:[528],handler:function(e,n){s.getContextScopedWidget(e.get(i.IContextKeyService),t.HistoryNavigationWidgetContext).historyNavigator.showPreviousValue()}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:c.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:new i.ContextKeyAndExpr([new i.ContextKeyDefinedExpr(t.HistoryNavigationWidgetContext),new i.ContextKeyEqualsExpr(t.HistoryNavigationEnablementContext,!0)]),primary:18,secondary:[530],handler:function(e,n){
s.getContextScopedWidget(e.get(i.IContextKeyService),t.HistoryNavigationWidgetContext).historyNavigator.showNextValue()}})}),define(e[426],t([1,0,1309,9,11,14,18,8,92,152,45,219,19,12,26,185,1380]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=i.localize(0,null),y=i.localize(1,null),b=i.localize(2,null),S=i.localize(3,null),_=i.localize(4,null),C=i.localize(5,null),E=i.localize(6,null),w=i.localize(7,null),I=i.localize(8,null),T=i.localize(9,null),x=i.localize(10,null),k=i.localize(11,null,h.MATCHES_LIMIT),D=i.localize(12,null),A=i.localize(13,null),L=69,R=17+(L+3+1)+92+2,O=34,M=function(){return function(e){this.afterLineNumber=e,this.heightInPx=O,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}();t.FindWidgetViewZone=M;var P=function(e){function t(t,n,i,r,o,s,l){var u=e.call(this)||this;return u._codeEditor=t,u._controller=n,u._state=i,u._contextViewProvider=r,
u._keybindingService=o,u._contextKeyService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._updateHistoryDelayer=new a.Delayer(500),u._register(u._state.onFindReplaceStateChange(function(e){return u._onStateChanged(e)})),u._buildDomNode(),u._updateButtons(),u._tryUpdateWidgetWidth(),u._register(u._codeEditor.onDidChangeConfiguration(function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&u._tryUpdateWidgetWidth()})),u._register(u._codeEditor.onDidChangeCursorSelection(function(){u._isVisible&&u._updateToggleSelectionFindButton()})),u._register(u._codeEditor.onDidFocusEditorWidget(function(){if(u._isVisible){var e=u._controller.getGlobalBufferTerm();e&&e!==u._state.searchString&&(u._state.change({searchString:e},!0),u._findInput.select())}})),u._findInputFocused=h.CONTEXT_FIND_INPUT_FOCUSED.bindTo(s),u._findFocusTracker=u._register(c.trackFocus(u._findInput.inputBox.inputElement)),
u._register(u._findFocusTracker.onDidFocus(function(){u._findInputFocused.set(!0),u._updateSearchScope()})),u._register(u._findFocusTracker.onDidBlur(function(){u._findInputFocused.set(!1)})),u._replaceInputFocused=h.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(s),u._replaceFocusTracker=u._register(c.trackFocus(u._replaceInputBox.inputElement)),u._register(u._replaceFocusTracker.onDidFocus(function(){u._replaceInputFocused.set(!0),u._updateSearchScope()})),u._register(u._replaceFocusTracker.onDidBlur(function(){u._replaceInputFocused.set(!1)})),u._codeEditor.addOverlayWidget(u),u._viewZone=new M(0),u._applyTheme(l.getTheme()),u._register(l.onThemeChange(u._applyTheme.bind(u))),u._register(u._codeEditor.onDidChangeModel(function(e){u._isVisible&&void 0!==u._viewZoneId&&u._codeEditor.changeViewZones(function(e){e.removeZone(u._viewZoneId),u._viewZoneId=void 0})})),u._register(u._codeEditor.onDidScrollChange(function(e){e.scrollTopChanged?u._layoutViewZone():setTimeout(function(){u._layoutViewZone()},0)})),u}
return n(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:d.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInputBox.width=this._findInput.inputBox.width,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),
e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;c.toggleClass(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){this._matchesCount.style.minWidth=L+"px",this._state.matchesCount>=h.MATCHES_LIMIT?this._matchesCount.title=k:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);var e
;if(this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=h.MATCHES_LIMIT&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=s.format(D,n,t)}else e=A;this._matchesCount.appendChild(document.createTextNode(e)),L=Math.max(L,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(n||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),
this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),c.toggleClass(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var n=this._codeEditor.getSelection();!!n&&(n.startLineNumber!==n.endLineNumber||n.startColumn!==n.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout(function(){c.addClass(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")},0),this._codeEditor.layoutOverlayWidget(this);var i=!0
;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&n){var r=c.getDomNodePagePosition(this._codeEditor.getDomNode()),o=this._codeEditor.getScrolledVisiblePosition(n.getStartPosition()),s=r.left+o.left;if(o.top<this._viewZone.heightInPx){n.endLineNumber>n.startLineNumber&&(i=!1);var a=c.getTopLeftOffset(this._domNode).left;s>a&&(i=!1);var l=this._codeEditor.getScrolledVisiblePosition(n.getEndPosition());r.left+l.left>a&&(i=!1)}}this._showViewZone(i)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),c.removeClass(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones(function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))}))},t.prototype._layoutViewZone=function(){var e=this
;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones(function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=O,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)})},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones(function(n){var i=O;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,i=64-O):(t._viewZone.heightInPx=O,i=O-64),n.removeZone(t._viewZoneId)):t._viewZone.heightInPx=O,t._viewZoneId=n.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+i)})},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(g.inputActiveOptionBorder),inputBackground:e.getColor(g.inputBackground),inputForeground:e.getColor(g.inputForeground),inputBorder:e.getColor(g.inputBorder),inputValidationInfoBackground:e.getColor(g.inputValidationInfoBackground),
inputValidationInfoBorder:e.getColor(g.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(g.inputValidationWarningBackground),inputValidationWarningBorder:e.getColor(g.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(g.inputValidationErrorBackground),inputValidationErrorBorder:e.getColor(g.inputValidationErrorBorder)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,n=!1,i=!1,r=!1;if(this._resized){if(c.getTotalWidth(this._domNode)>411)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=c.getTotalWidth(this._findInput.inputBox.inputElement)+"px")}if(439+t>=e&&(i=!0),439+t-L>=e&&(r=!0),439+t-L>=e+50&&(n=!0),c.toggleClass(this._domNode,"collapsed-find-widget",n),c.toggleClass(this._domNode,"narrow-find-widget",r),
c.toggleClass(this._domNode,"reduced-find-widget",i),r||n||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var o=c.getTotalWidth(this._findInput.inputBox.inputElement);o>0&&(this._replaceInputBox.inputElement.style.width=o+"px")}}},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(p.Range.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){
return e.equals(3)?(this._codeEditor.getAction(h.FIND_IDS.NextMatchFindAction).run().done(null,r.onUnexpectedError),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction(h.FIND_IDS.PreviousMatchFindAction).run().done(null,r.onUnexpectedError),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},
t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new v.ContextScopedFindInput(null,this._contextViewProvider,{width:221,label:m,placeholder:y,appendCaseSensitiveLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleRegexCommand),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(function(t){
return e._onFindInputKeyDown(t)})),this._register(this._findInput.inputBox.onDidChange(function(){e._state.change({searchString:e._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())})),o.isLinux&&this._register(this._findInput.onMouseDown(function(t){return e._onFindInputMouseDown(t)})),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new F({label:b+this._keybindingLabelFor(h.FIND_IDS.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(h.FIND_IDS.PreviousMatchFindAction).run().done(null,r.onUnexpectedError)}})),this._nextBtn=this._register(new F({
label:S+this._keybindingLabelFor(h.FIND_IDS.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(h.FIND_IDS.NextMatchFindAction).run().done(null,r.onUnexpectedError)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new N({parent:t,title:_+this._keybindingLabelFor(h.FIND_IDS.ToggleSearchScopeCommand),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new F({label:C+this._keybindingLabelFor(h.FIND_IDS.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},
onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new v.ContextScopedHistoryInputBox(t,null,{ariaLabel:E,placeholder:w,history:[]},this._contextKeyService)),this._register(c.addStandardDisposableListener(this._replaceInputBox.inputElement,"keydown",function(t){return e._onReplaceInputKeyDown(t)})),this._register(c.addStandardDisposableListener(this._replaceInputBox.inputElement,"input",function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)})),this._replaceBtn=this._register(new F({label:I+this._keybindingLabelFor(h.FIND_IDS.ReplaceOneAction),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}
})),this._replaceAllBtn=this._register(new F({label:T+this._keybindingLabelFor(h.FIND_IDS.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var n=document.createElement("div");return n.className="replace-part",n.appendChild(t),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),n},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),n=this._buildReplacePart();this._toggleReplaceBtn=this._register(new F({label:x,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),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="411px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(n),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new u.Sash(this._domNode,this,{orientation:u.Orientation.VERTICAL}),this._resized=!1;var t=411;this._register(this._resizeSash.onDidStart(function(n){t=c.getTotalWidth(e._domNode)})),this._register(this._resizeSash.onDidChange(function(n){e._resized=!0;var i=t+n.startX-n.currentX;if(!(i<411)){var r=i-R;i>(parseFloat(c.getComputedStyle(e._domNode).maxWidth)||0)||(e._domNode.style.width=i+"px",e._isReplaceVisible&&(e._replaceInputBox.width=r))}}))},t.ID="editor.contrib.findWidget",t}(l.Widget);t.FindWidget=P;var N=function(e){function t(n){var i=e.call(this)||this;return i._opts=n,i._domNode=document.createElement("div"),i._domNode.className="monaco-checkbox",i._domNode.title=i._opts.title,i._domNode.tabIndex=0,
i._checkbox=document.createElement("input"),i._checkbox.type="checkbox",i._checkbox.className="checkbox",i._checkbox.id="checkbox-"+t._COUNTER++,i._checkbox.tabIndex=-1,i._label=document.createElement("label"),i._label.className="label",i._label.htmlFor=i._checkbox.id,i._label.tabIndex=-1,i._domNode.appendChild(i._checkbox),i._domNode.appendChild(i._label),i._opts.parent.appendChild(i._domNode),i.onchange(i._checkbox,function(e){i._opts.onChange()}),i}return n(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this._checkbox.focus()},t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),
this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(l.Widget),F=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,function(e){n._opts.onTrigger(),e.preventDefault()}),n.onkeydown(n._domNode,function(e){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown&&n._opts.onKeyDown(e)}),n}return n(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){c.toggleClass(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),
this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){c.toggleClass(this._domNode,e,t)},t}(l.Widget);t.SimpleButton=F,f.registerThemingParticipant(function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")};n(".findMatch",e.getColor(g.editorFindMatchHighlight)),n(".currentFindMatch",e.getColor(g.editorFindMatch)),n(".findScope",e.getColor(g.editorFindRangeHighlight));n(".find-widget",e.getColor(g.editorWidgetBackground));var i=e.getColor(g.widgetShadow);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var r=e.getColor(g.editorFindMatchHighlightBorder);r&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+r+"; box-sizing: border-box; }");var o=e.getColor(g.editorFindMatchBorder);o&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+o+"; padding: 1px; box-sizing: border-box; }")
;var s=e.getColor(g.editorFindRangeHighlightBorder);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(g.contrastBorder);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var c=e.getColor(g.errorForeground);c&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+c+"; }");var l=e.getColor(g.editorWidgetResizeBorder);if(l)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+l+"; width: 3px !important; margin-left: -4px;}");else{var u=e.getColor(g.editorWidgetBorder);u&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+u+"; width: 3px !important; margin-left: -4px;}")}})}),define(e[296],t([1,0,1308,5,15,14,32,219,1120,18,55,34,135,35,37,426,1001,12,52,6]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";function E(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t)
;var n=e.getModel().getWordAtPosition(t.getStartPosition());if(n)return n.word}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionSearchString=E;!function(e){e[e.NoFocusChange=0]="NoFocusChange",e[e.FocusFindInput=1]="FocusFindInput",e[e.FocusReplaceInput=2]="FocusReplaceInput"}(t.FindStartFocusAction||(t.FindStartFocusAction={}));var w=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o._editor=t,o._findWidgetVisible=u.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(n),o._storageService=i,o._clipboardService=r,o._updateHistoryDelayer=new h.Delayer(500),o._state=o._register(new d.FindReplaceState),o.loadQueryState(),o._register(o._state.onFindReplaceStateChange(function(e){return o._onStateChanged(e)})),o._model=null,o._register(o._editor.onDidChangeModel(function(){var e=o._editor.getModel()&&o._state.isRevealed;o.disposeModel(),o._state.change({searchScope:null,matchCase:o._storageService.getBoolean("editor.matchCase",f.StorageScope.WORKSPACE,!1),
wholeWord:o._storageService.getBoolean("editor.wholeWord",f.StorageScope.WORKSPACE,!1),isRegex:o._storageService.getBoolean("editor.isRegex",f.StorageScope.WORKSPACE,!1)},!1),e&&o._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1})})),o}return n(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,f.StorageScope.WORKSPACE),
e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,f.StorageScope.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,f.StorageScope.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",f.StorageScope.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",f.StorageScope.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",f.StorageScope.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){
this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t={isRevealed:!0};if(e.seedSearchStringFromSelection){(n=E(this._editor))&&(this._state.isRegex?t.searchString=s.escapeRegExpCharacters(n):t.searchString=n)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){var n=this.getGlobalBufferTerm();n&&(t.searchString=n)}e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),this._state.change(t,!1),
this._model||(this._model=new u.FindModelBoundToEditorModel(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){
this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=a([l(1,o.IContextKeyService),l(2,f.IStorageService),l(3,g.IClipboardService)],t)}(r.Disposable);t.CommonFindController=w;var I=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,i,s,a)||this;return c._contextViewService=n,c._contextKeyService=i,c._keybindingService=r,c._themeService=o,c}return n(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){
this._widget=this._register(new y.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new b.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))},t=a([l(1,v.IContextViewService),l(2,o.IContextKeyService),l(3,m.IKeybindingService),l(4,S.IThemeService),l(5,f.IStorageService),l(6,C.optional(g.IClipboardService))],t)}(w);t.FindController=I;var T=function(e){function t(){return e.call(this,{id:u.FIND_IDS.StartFindAction,label:i.localize(0,null),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084}})||this}return n(t,e),t.prototype.run=function(e,t){var n=w.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(c.EditorAction)
;t.StartFindAction=T;var x=function(e){function t(){return e.call(this,{id:u.FIND_IDS.StartFindWithSelection,label:i.localize(1,null),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null,primary:null,mac:{primary:2083}}})||this}return n(t,e),t.prototype.run=function(e,t){var n=w.get(t);n&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),n.setGlobalBufferTerm(n.getState().searchString))},t}(c.EditorAction);t.StartFindWithSelectionAction=x;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e,t){var n=w.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(n))},t}(c.EditorAction);t.MatchFindAction=k;var D=function(e){function t(){
return e.call(this,{id:u.FIND_IDS.NextMatchFindAction,label:i.localize(2,null),alias:"Find Next",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]}}})||this}return n(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(k);t.NextMatchFindAction=D;var A=function(e){function t(){return e.call(this,{id:u.FIND_IDS.PreviousMatchFindAction,label:i.localize(3,null),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]}}})||this}return n(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(k);t.PreviousMatchFindAction=A;var L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e,t){var n=w.get(t);if(n){var i=E(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,
seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(n))}},t}(c.EditorAction);t.SelectionMatchFindAction=L;var R=function(e){function t(){return e.call(this,{id:u.FIND_IDS.NextSelectionMatchFindAction,label:i.localize(4,null),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2109}})||this}return n(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(L);t.NextSelectionMatchFindAction=R;var O=function(e){function t(){return e.call(this,{id:u.FIND_IDS.PreviousSelectionMatchFindAction,label:i.localize(5,null),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:3133}})||this}return n(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(L);t.PreviousSelectionMatchFindAction=O;var M=function(e){function t(){return e.call(this,{id:u.FIND_IDS.StartFindReplaceAction,label:i.localize(6,null),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596}}
})||this}return n(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var n=w.get(t),i=t.getSelection(),r=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,o=n.getState().searchString||r?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:o,shouldAnimate:!0})}},t}(c.EditorAction);t.StartFindReplaceAction=M,c.registerEditorContribution(I),c.registerEditorAction(T),c.registerEditorAction(x),c.registerEditorAction(D),c.registerEditorAction(A),c.registerEditorAction(R),c.registerEditorAction(O),c.registerEditorAction(M);var P=c.EditorCommand.bindToContribution(w.get);c.registerEditorCommand(new P({id:u.FIND_IDS.CloseFindWidgetCommand,precondition:u.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),
kbExpr:p.EditorContextKeys.focus,primary:9,secondary:[1033]}})),c.registerEditorCommand(new P({id:u.FIND_IDS.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:u.ToggleCaseSensitiveKeybinding.primary,mac:u.ToggleCaseSensitiveKeybinding.mac,win:u.ToggleCaseSensitiveKeybinding.win,linux:u.ToggleCaseSensitiveKeybinding.linux}})),c.registerEditorCommand(new P({id:u.FIND_IDS.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:u.ToggleWholeWordKeybinding.primary,mac:u.ToggleWholeWordKeybinding.mac,win:u.ToggleWholeWordKeybinding.win,linux:u.ToggleWholeWordKeybinding.linux}})),c.registerEditorCommand(new P({id:u.FIND_IDS.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{
weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:u.ToggleRegexKeybinding.primary,mac:u.ToggleRegexKeybinding.mac,win:u.ToggleRegexKeybinding.win,linux:u.ToggleRegexKeybinding.linux}})),c.registerEditorCommand(new P({id:u.FIND_IDS.ToggleSearchScopeCommand,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:u.ToggleSearchScopeKeybinding.primary,mac:u.ToggleSearchScopeKeybinding.mac,win:u.ToggleSearchScopeKeybinding.win,linux:u.ToggleSearchScopeKeybinding.linux}})),c.registerEditorCommand(new P({id:u.FIND_IDS.ReplaceOneAction,precondition:u.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replace()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:3094}})),c.registerEditorCommand(new P({id:u.FIND_IDS.ReplaceAllAction,precondition:u.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){
return e.replaceAll()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:2563}})),c.registerEditorCommand(new P({id:u.FIND_IDS.SelectAllMatchesAction,precondition:u.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:_.KeybindingsRegistry.WEIGHT.editorContrib(5),kbExpr:p.EditorContextKeys.focus,primary:515}}))}),define(e[428],t([1,0,1310,92,18,8,35,12,26,426,185,15,601]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=i.localize(0,null),v=i.localize(1,null),m=i.localize(2,null),y=i.localize(3,null),b=i.localize(4,null),S=function(e){function t(t,n){var i=e.call(this)||this;i._contextViewService=t,i._findInput=i._register(new p.ContextScopedFindInput(null,i._contextViewService,{label:g,placeholder:v},n)),i._updateHistoryDelayer=new o.Delayer(500),i.oninput(i._findInput.domNode,function(e){i.onInputChanged(),i._delayedUpdateHistory()}),
i._register(i._findInput.onKeyDown(function(e){return e.equals(3)?(i.find(!1),void e.preventDefault()):e.equals(1027)?(i.find(!0),void e.preventDefault()):void 0}));var r=new h.SimpleButton({label:m,className:"previous",onTrigger:function(){i.find(!0)}}),a=new h.SimpleButton({label:y,className:"next",onTrigger:function(){i.find(!1)}}),c=new h.SimpleButton({label:b,className:"close-fw",onTrigger:function(){i.hide()}});return i._innerDomNode=document.createElement("div"),i._innerDomNode.classList.add("simple-find-part"),i._innerDomNode.appendChild(i._findInput.domNode),i._innerDomNode.appendChild(r.domNode),i._innerDomNode.appendChild(a.domNode),i._innerDomNode.appendChild(c.domNode),i._domNode=document.createElement("div"),i._domNode.classList.add("simple-find-part-wrapper"),i._domNode.appendChild(i._innerDomNode),i.onkeyup(i._innerDomNode,function(e){if(e.equals(9))return i.hide(),void e.preventDefault()}),i._focusTracker=i._register(s.trackFocus(i._innerDomNode)),
i._register(i._focusTracker.onDidFocus(i.onFocusTrackerFocus.bind(i))),i._register(i._focusTracker.onDidBlur(i.onFocusTrackerBlur.bind(i))),i._findInputFocusTracker=i._register(s.trackFocus(i._findInput.domNode)),i._register(i._findInputFocusTracker.onDidFocus(i.onFindInputFocusTrackerFocus.bind(i))),i._register(i._findInputFocusTracker.onDidBlur(i.onFindInputFocusTrackerBlur.bind(i))),i._register(s.addDisposableListener(i._innerDomNode,"click",function(e){e.stopPropagation()})),i}return n(t,e),Object.defineProperty(t.prototype,"inputValue",{get:function(){return this._findInput.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusTracker",{get:function(){return this._findInputFocusTracker},enumerable:!0,configurable:!0}),t.prototype.updateTheme=function(e){var t={inputActiveOptionBorder:e.getColor(d.inputActiveOptionBorder),inputBackground:e.getColor(d.inputBackground),inputForeground:e.getColor(d.inputForeground),inputBorder:e.getColor(d.inputBorder),
inputValidationInfoBackground:e.getColor(d.inputValidationInfoBackground),inputValidationInfoBorder:e.getColor(d.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(d.inputValidationWarningBackground),inputValidationWarningBorder:e.getColor(d.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(d.inputValidationErrorBackground),inputValidationErrorBorder:e.getColor(d.inputValidationErrorBorder)};this._findInput.style(t)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._domNode&&this._domNode.parentElement&&(this._domNode.parentElement.removeChild(this._domNode),this._domNode=void 0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.reveal=function(e){var t=this;e&&this._findInput.setValue(e),this._isVisible?this._findInput.select():(this._isVisible=!0,setTimeout(function(){s.addClass(t._innerDomNode,"visible"),t._innerDomNode.setAttribute("aria-hidden","false"),setTimeout(function(){t._findInput.select()},200)},0))},
t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,s.removeClass(this._innerDomNode,"visible"),this._innerDomNode.setAttribute("aria-hidden","true"))},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._findInput.inputBox.addToHistory()},t=a([l(0,c.IContextViewService),l(1,f.IContextKeyService)],t)}(r.Widget);t.SimpleFindWidget=S,u.registerThemingParticipant(function(e,t){var n=e.getColor(d.editorWidgetBackground);n&&t.addRule(".monaco-workbench .simple-find-part { background-color: "+n+" !important; }");var i=e.getColor(d.widgetShadow);i&&t.addRule(".monaco-workbench .simple-find-part { box-shadow: 0 2px 8px "+i+"; }")})}),define(e[429],t([1,0,1343,5,73,18,57,55,32,19,60,171,524,44,296,66,26,12]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y){"use strict";function b(e,t,n){for(var i=S(e,t[0],!n),r=1,o=t.length;r<o;r++){var s=t[r];if(s.isEmpty())return!1;if(i!==S(e,s,!n))return!1}return!0}
function S(e,t,n){var i=e.getValueInRange(t);return n?i.toLowerCase():i}Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorAbove",label:i.localize(0,null),alias:"Add Cursor Above",precondition:null,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]}}})||this}return n(t,e),t.prototype.run=function(e,t,n){var i=n&&!0===n.logicalLine,r=t._getCursors(),o=r.context;o.config.readOnly||(o.model.pushStackElement(),r.setStates(n.source,h.CursorChangeReason.Explicit,p.CursorMoveCommands.addCursorUp(o,r.getAll(),i)),r.reveal(!0,1,0))},t}(l.EditorAction);t.InsertCursorAbove=_;var C=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorBelow",label:i.localize(1,null),alias:"Add Cursor Below",precondition:null,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]}}})||this}return n(t,e),t.prototype.run=function(e,t,n){
var i=n&&!0===n.logicalLine,r=t._getCursors(),o=r.context;o.config.readOnly||(o.model.pushStackElement(),r.setStates(n.source,h.CursorChangeReason.Explicit,p.CursorMoveCommands.addCursorDown(o,r.getAll(),i)),r.reveal(!0,2,0))},t}(l.EditorAction);t.InsertCursorBelow=C;var E=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.localize(2,null),alias:"Add Cursors to Line Ends",precondition:null,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:1575}})||this}return n(t,e),t.prototype.getCursorsForSelection=function(e,t,n){if(!e.isEmpty()){for(var i=e.startLineNumber;i<e.endLineNumber;i++){var r=t.getLineMaxColumn(i);n.push(new d.Selection(i,r,i,r))}e.endColumn>1&&n.push(new d.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var n=this,i=t.getModel(),r=[];t.getSelections().forEach(function(e){return n.getCursorsForSelection(e,i,r)}),r.length>0&&t.setSelections(r)},t}(l.EditorAction),w=function(){
return function(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}();t.MultiCursorSessionResult=w;var I=function(){function e(e,t,n,i,r,o,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=r,this.matchCase=o,this.currentMatch=s}return e.create=function(t,n){var i=n.getState();if(!t.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new e(t,n,!1,i.searchString,i.wholeWord,i.matchCase,null);var r,o,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,r=!0,o=!0):(r=i.wholeWord,o=i.matchCase);var c,l=t.getSelection(),u=null;if(l.isEmpty()){var h=t.getModel().getWordAtPosition(l.getStartPosition());if(!h)return null;c=h.word,u=new d.Selection(l.startLineNumber,h.startColumn,l.startLineNumber,h.endColumn)}else c=t.getModel().getValueInRange(l).replace(/\r\n/g,"\n");return new e(t,n,s,c,r,o,u)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null
;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new d.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null
;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new d.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}();t.MultiCursorSession=I;var T=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._ignoreSelectionChange=!1,n._session=null,n._sessionDispose=[],n}return n(t,e),
t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){var n=I.create(this._editor,e);if(!n)return;this._session=n;var i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection(function(e){t._ignoreSelectionChange||t._endSession()}),this._editor.onDidBlurEditorText(function(){t._endSession()}),e.getState().onFindReplaceStateChange(function(e){(e.matchCase||e.wholeWord)&&t._endSession()})]}},t.prototype._endSession=function(){if(this._sessionDispose=r.dispose(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController){var e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0}
;this._session.findController.getState().change(e,!1)}this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t;var n=e.getWordAtPosition(t.getStartPosition());return n?new d.Selection(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var n=e.getState().matchCase;if(!b(this._editor.getModel(),t,n)){for(var i=this._editor.getModel(),r=[],o=0,s=t.length;o<s;o++)r[o]=this._expandEmptyToWord(i,t[o]);return void this._editor.setSelections(r)}}}this._beginSessionIfNeeded(e),
this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())},t.prototype.addSelectionToPreviousFindMatch=function(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())},t.prototype.moveSelectionToNextFindMatch=function(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())},t.prototype.moveSelectionToPreviousFindMatch=function(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())},t.prototype.selectAll=function(e){var t=null,n=e.getState();if(n.isRevealed&&n.searchString.length>0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){
for(var i=this._editor.getSelection(),r=0,o=t.length;r<o;r++){var s=t[r];if(s.range.intersectRanges(i)){t[r]=t[0],t[0]=s;break}}this._setSelections(t.map(function(e){return new d.Selection(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)}))}},t.ID="editor.contrib.multiCursorController",t}(r.Disposable);t.MultiCursorSelectionController=T;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e,t){var n=T.get(t);if(n){var i=g.CommonFindController.get(t);if(!i)return null;this._run(n,i)}},t}(l.EditorAction);t.MultiCursorSelectionControllerAction=x;var k=function(e){function t(){return e.call(this,{id:"editor.action.addSelectionToNextFindMatch",label:i.localize(3,null),alias:"Add Selection To Next Find Match",precondition:null,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:2082}})||this}return n(t,e),t.prototype._run=function(e,t){e.addSelectionToNextFindMatch(t)},t}(x);t.AddSelectionToNextFindMatchAction=k
;var D=function(e){function t(){return e.call(this,{id:"editor.action.addSelectionToPreviousFindMatch",label:i.localize(4,null),alias:"Add Selection To Previous Find Match",precondition:null})||this}return n(t,e),t.prototype._run=function(e,t){e.addSelectionToPreviousFindMatch(t)},t}(x);t.AddSelectionToPreviousFindMatchAction=D;var A=function(e){function t(){return e.call(this,{id:"editor.action.moveSelectionToNextFindMatch",label:i.localize(5,null),alias:"Move Last Selection To Next Find Match",precondition:null,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:o.KeyChord(2089,2082)}})||this}return n(t,e),t.prototype._run=function(e,t){e.moveSelectionToNextFindMatch(t)},t}(x);t.MoveSelectionToNextFindMatchAction=A;var L=function(e){function t(){return e.call(this,{id:"editor.action.moveSelectionToPreviousFindMatch",label:i.localize(6,null),alias:"Move Last Selection To Previous Find Match",precondition:null})||this}return n(t,e),t.prototype._run=function(e,t){e.moveSelectionToPreviousFindMatch(t)},t}(x)
;t.MoveSelectionToPreviousFindMatchAction=L;var R=function(e){function t(){return e.call(this,{id:"editor.action.selectHighlights",label:i.localize(7,null),alias:"Select All Occurrences of Find Match",precondition:null,kbOpts:{kbExpr:c.EditorContextKeys.focus,primary:3114}})||this}return n(t,e),t.prototype._run=function(e,t){e.selectAll(t)},t}(x);t.SelectHighlightsAction=R;var O=function(e){function t(){return e.call(this,{id:"editor.action.changeAll",label:i.localize(8,null),alias:"Change All Occurrences",precondition:c.EditorContextKeys.writable,kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2108},menuOpts:{group:"1_modification",order:1.2}})||this}return n(t,e),t.prototype._run=function(e,t){e.selectAll(t)},t}(x);t.CompatChangeAll=O;var M=function(){function e(e,t,n,i){this.lastWordUnderCursor=e,this.searchText=t,this.matchCase=n,this.wordSeparators=i}return e.softEquals=function(e,t){
return!e&&!t||!(!e||!t)&&(e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators)},e}(),P=function(e){function t(t){var n=e.call(this)||this;return n.editor=t,n._isEnabled=t.getConfiguration().contribInfo.selectionHighlight,n.decorations=[],n.updateSoon=n._register(new s.RunOnceScheduler(function(){return n._update()},300)),n.state=null,n._register(t.onDidChangeConfiguration(function(e){n._isEnabled=t.getConfiguration().contribInfo.selectionHighlight})),n._register(t.onDidChangeCursorSelection(function(e){n._isEnabled&&(e.selection.isEmpty()?e.reason===h.CursorChangeReason.Explicit?(!n.state||n.state.lastWordUnderCursor&&n.state.lastWordUnderCursor.containsPosition(e.selection.getStartPosition())||n._setState(null),n.updateSoon.schedule()):n._setState(null):n._update())})),n._register(t.onDidChangeModel(function(e){n._setState(null)})),n._register(g.CommonFindController.get(t).getState().onFindReplaceStateChange(function(e){n._update()})),n}return n(t,e),
t.prototype.getId=function(){return t.ID},t.prototype._update=function(){this._setState(t._createState(this._isEnabled,this.editor))},t._createState=function(e,t){if(!e)return null;var n=t.getModel();if(!n)return null;var i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;var r=T.get(t);if(!r)return null;var o=g.CommonFindController.get(t);if(!o)return null;var s=r.getSession(o);if(!s){var a=t.getSelections();if(a.length>1){var c=o.getState().matchCase;if(!b(t.getModel(),a,c))return null}s=I.create(t,o)}if(!s)return null;var l=null,u=f.DocumentHighlightProviderRegistry.has(n);if(s.currentMatch){if(u)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;l=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var d=o.getState(),h=d.matchCase;if(d.isRevealed){var p=d.searchString;h||(p=p.toLowerCase());var v=s.searchText;if(h||(v=v.toLowerCase()),
p===v&&s.matchCase===d.matchCase&&s.wholeWord===d.wholeWord&&!d.isRegex)return null}return new M(l,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(M.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var n=this.editor.getModel();if(!n.isTooLargeForTokenization()){var i=f.DocumentHighlightProviderRegistry.has(n),r=n.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(function(e){return e.range});r.sort(u.Range.compareRangesUsingStarts);var o=this.editor.getSelections();o.sort(u.Range.compareRangesUsingStarts);for(var s=[],a=0,c=0,l=r.length,d=o.length;a<l;){var h=r[a];if(c>=d)s.push(h),a++;else{var p=u.Range.compareRangesUsingStarts(h,o[c]);p<0?(!o[c].isEmpty()&&u.Range.areIntersecting(h,o[c])||s.push(h),a++):p>0?c++:(a++,c++)}}var g=s.map(function(e){return{range:e,options:i?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}})
;this.decorations=this.editor.deltaDecorations(this.decorations,g)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=v.ModelDecorationOptions.register({stickiness:a.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:y.themeColorFromId(m.overviewRulerSelectionHighlightForeground),darkColor:y.themeColorFromId(m.overviewRulerSelectionHighlightForeground),position:a.OverviewRulerLane.Center}}),t._SELECTION_HIGHLIGHT=v.ModelDecorationOptions.register({stickiness:a.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(r.Disposable);t.SelectionHighlighter=P,l.registerEditorContribution(T),l.registerEditorContribution(P),l.registerEditorAction(_),l.registerEditorAction(C),l.registerEditorAction(E),l.registerEditorAction(k),l.registerEditorAction(D),
l.registerEditorAction(A),l.registerEditorAction(L),l.registerEditorAction(R),l.registerEditorAction(O)}),define(e[42],t([1,0,6,7,5]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWindowsService=n.createDecorator("windowsService"),t.IWindowService=n.createDecorator("windowService");!function(e){e[e.CLI=0]="CLI",e[e.DOCK=1]="DOCK",e[e.MENU=2]="MENU",e[e.DIALOG=3]="DIALOG",e[e.DESKTOP=4]="DESKTOP",e[e.API=5]="API"}(t.OpenContext||(t.OpenContext={}));!function(e){e[e.NONE=0]="NONE",e[e.LOADING=1]="LOADING",e[e.NAVIGATING=2]="NAVIGATING",e[e.READY=3]="READY"}(t.ReadyState||(t.ReadyState={}));var o=function(){function e(e){this.disposables=[];i.latch(i.anyEvent(e.onWindowOpen,e.onWindowFocus))(this.setActiveWindow,this,this.disposables)}return e.prototype.setActiveWindow=function(e){this._activeWindowId=e},Object.defineProperty(e.prototype,"activeClientId",{get:function(){return"window:"+this._activeWindowId},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){
this.disposables=r.dispose(this.disposables)},e=a([l(0,t.IWindowsService)],e)}();t.ActiveWindowManager=o}),define(e[1032],t([1,0,4,5,856,8,103,42]),function(e,t,n,i,r,c,u,d){"use strict";function h(e,t){for(var n=Object.create(null),i=0;i<e.attributes.length;i++){var r=e.attributes.item(i);n[r.name]=r.value}var o=[];if(t)for(var s=0;s<e.children.length;s++)o.push(h(e.children.item(s),!0));var a=c.getTopLeftOffset(e),l=a.left,u=a.top;return{tagName:e.tagName,className:e.className,textContent:e.textContent||"",attributes:n,children:o,left:l,top:u}}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e){this.windowService=e}return e.prototype.click=function(e,t,i){return o(this,void 0,n.TPromise,function(){return s(this,function(n){return[2,this._click(e,1,t,i)]})})},e.prototype.doubleClick=function(e){return this._click(e,2)},e.prototype._getElementXY=function(e,t,i){return o(this,void 0,n.TPromise,function(){var n,r,o,a,l,u,d,h,p;return s(this,function(s){
if(!(n=document.querySelector(e)))throw new Error("Element not found");return r=c.getTopLeftOffset(n),o=r.left,a=r.top,l=c.getClientArea(n),u=l.width,d=l.height,"number"==typeof t||"number"==typeof i?(h=o+t,p=a+i):(h=o+u/2,p=a+d/2),h=Math.round(h),p=Math.round(p),[2,{x:h,y:p}]})})},e.prototype._click=function(e,t,i,r){return o(this,void 0,n.TPromise,function(){var o,a,c,l;return s(this,function(s){switch(s.label){case 0:return[4,this._getElementXY(e,i,r)];case 1:return o=s.sent(),a=o.x,c=o.y,(l=u.remote.getCurrentWebContents()).sendInputEvent({type:"mouseDown",x:a,y:c,button:"left",clickCount:t}),[4,n.TPromise.timeout(10)];case 2:return s.sent(),l.sendInputEvent({type:"mouseUp",x:a,y:c,button:"left",clickCount:t}),[4,n.TPromise.timeout(100)];case 3:return s.sent(),[2]}})})},e.prototype.setValue=function(e,t){return o(this,void 0,n.TPromise,function(){var n,i,r;return s(this,function(o){if(!(n=document.querySelector(e)))throw new Error("Element not found");return i=n,i.value=t,r=new Event("input",{bubbles:!0,
cancelable:!0}),i.dispatchEvent(r),[2]})})},e.prototype.getTitle=function(){return o(this,void 0,n.TPromise,function(){return s(this,function(e){return[2,document.title]})})},e.prototype.isActiveElement=function(e){return o(this,void 0,n.TPromise,function(){var t,n,i,r,o,a;return s(this,function(s){if((t=document.querySelector(e))!==document.activeElement){for(n=[],i=document.activeElement;i;)r=i.tagName,o=i.id?"#"+i.id:"",a=i.className.split(/\s+/g).map(function(e){return e.trim()}).filter(function(e){return!!e}).map(function(e){return"."+e}).join(""),n.unshift(""+r+o+a),i=i.parentElement;throw new Error("Active element not found. Current active element is '"+n.join(" > ")+"'")}return[2,!0]})})},e.prototype.getElements=function(e,t){return o(this,void 0,n.TPromise,function(){var n,i,r,o;return s(this,function(s){for(n=document.querySelectorAll(e),i=[],r=0;r<n.length;r++)o=n.item(r),i.push(h(o,t));return[2,i]})})},e.prototype.typeInEditor=function(e,t){return o(this,void 0,n.TPromise,function(){
var n,i,r,o,a,c,l;return s(this,function(s){if(!(n=document.querySelector(e)))throw new Error("Editor not found: "+e);return i=n,r=i.selectionStart,o=r+t.length,a=i.value,c=a.substr(0,r)+t+a.substr(r),i.value=c,i.setSelectionRange(o,o),l=new Event("input",{bubbles:!0,cancelable:!0}),i.dispatchEvent(l),[2]})})},e.prototype.getTerminalBuffer=function(e){return o(this,void 0,n.TPromise,function(){var t,n,i,r;return s(this,function(o){if(!(t=document.querySelector(e)))throw new Error("Terminal not found: "+e);if(!(n=t.xterm))throw new Error("Xterm not found: "+e);for(i=[],r=0;r<n._core.buffer.lines.length;r++)i.push(n._core.buffer.translateBufferLineToString(r,!0));return[2,i]})})},e.prototype.writeInTerminal=function(e,t){return o(this,void 0,n.TPromise,function(){var n,i;return s(this,function(r){if(!(n=document.querySelector(e)))throw new Error("Element not found");if(!(i=n.xterm))throw new Error("Xterm not found");return i._core.send(t),[2]})})},e.prototype.openDevTools=function(){
return o(this,void 0,n.TPromise,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.windowService.openDevTools({mode:"detach"})];case 1:return e.sent(),[2]}})})},e=a([l(0,d.IWindowService)],e)}();t.registerWindowDriver=function(e,t,a){return o(this,void 0,n.TPromise,function(){var n,o,c,l,u,d;return s(this,function(s){switch(s.label){case 0:return n=a.createInstance(p),o=new r.WindowDriverChannel(n),e.registerChannel("windowDriver",o),c=e.getChannel("windowDriverRegistry"),l=new r.WindowDriverRegistryChannelClient(c),[4,l.registerWindowDriver(t)];case 1:return(u=s.sent()).verbose,d=i.toDisposable(function(){return l.reloadWindowDriver(t)}),[2,i.combinedDisposable([d,e])]}})})}}),define(e[1033],t([1,0,126,38,34,103,7,42,192,18,77,22]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(t,n,o,a){this._notificationService=t,this._windowService=n,this._storageService=o,this._logService=a,
this._onWillShutdown=new s.Emitter,this._onShutdown=new s.Emitter,this._phase=i.LifecyclePhase.Starting,this._phaseWhen=new Map;var c=this._storageService.getInteger(e._lastShutdownReasonKey,r.StorageScope.WORKSPACE);this._storageService.remove(e._lastShutdownReasonKey,r.StorageScope.WORKSPACE),c===i.ShutdownReason.RELOAD?this._startupKind=i.StartupKind.ReloadedWindow:c===i.ShutdownReason.LOAD?this._startupKind=i.StartupKind.ReopenedWindow:this._startupKind=i.StartupKind.NewWindow,this._logService.trace("lifecycle: starting up (startup kind: "+this._startupKind+")"),this._registerListeners()}return e.prototype._registerListeners=function(){var t=this,n=this._windowService.getCurrentWindowId();o.ipcRenderer.on("vscode:onBeforeUnload",function(i,s){t._logService.trace("lifecycle: onBeforeUnload (reason: "+s.reason+")"),t._storageService.store(e._lastShutdownReasonKey,JSON.stringify(s.reason),r.StorageScope.WORKSPACE),t.onBeforeUnload(s.reason).done(function(i){
i?(t._logService.trace("lifecycle: onBeforeUnload prevented via veto"),t._storageService.remove(e._lastShutdownReasonKey,r.StorageScope.WORKSPACE),o.ipcRenderer.send(s.cancelChannel,n)):(t._logService.trace("lifecycle: onBeforeUnload continues without veto"),o.ipcRenderer.send(s.okChannel,n))})}),o.ipcRenderer.on("vscode:onWillUnload",function(e,i){t._logService.trace("lifecycle: onWillUnload (reason: "+i.reason+")"),t._onShutdown.fire(i.reason),o.ipcRenderer.send(i.replyChannel,n)})},e.prototype.onBeforeUnload=function(e){var t=this,r=[];return this._onWillShutdown.fire({veto:function(e){r.push(e)},reason:e}),i.handleVetos(r,function(e){return t._notificationService.error(n.toErrorMessage(e))})},Object.defineProperty(e.prototype,"phase",{get:function(){return this._phase},set:function(e){if(e<this.phase)throw new Error("Lifecycle cannot go backwards");this._phase!==e&&(this._logService.trace("lifecycle: phase changed (value: "+e+")"),this._phase=e,u.mark("LifecyclePhase/"+i.LifecyclePhase[e]),
this._phaseWhen.has(this._phase)&&(this._phaseWhen.get(this._phase).open(),this._phaseWhen.delete(this._phase)))},enumerable:!0,configurable:!0}),e.prototype.when=function(e){if(e<=this._phase)return Promise.resolve();var t=this._phaseWhen.get(e);return t||(t=new d.Barrier,this._phaseWhen.set(e,t)),t.wait()},Object.defineProperty(e.prototype,"startupKind",{get:function(){return this._startupKind},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWillShutdown",{get:function(){return this._onWillShutdown.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onShutdown",{get:function(){return this._onShutdown.event},enumerable:!0,configurable:!0}),e._lastShutdownReasonKey="lifecyle.lastShutdownReason",e=a([l(0,p.INotificationService),l(1,c.IWindowService),l(2,r.IStorageService),l(3,h.ILogService)],e)}();t.LifecycleService=f}),define(e[1034],t([1,0,7,131,10]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){
this.service=e,this.onWindowOpen=n.buffer(e.onWindowOpen,!0),this.onWindowFocus=n.buffer(e.onWindowFocus,!0),this.onWindowBlur=n.buffer(e.onWindowBlur,!0),this.onWindowMaximize=n.buffer(e.onWindowMaximize,!0),this.onWindowUnmaximize=n.buffer(e.onWindowUnmaximize,!0),this.onRecentlyOpenedChange=n.buffer(e.onRecentlyOpenedChange,!0)}return e.prototype.call=function(e,t){switch(e){case"event:onWindowOpen":return i.eventToCall(this.onWindowOpen);case"event:onWindowFocus":return i.eventToCall(this.onWindowFocus);case"event:onWindowBlur":return i.eventToCall(this.onWindowBlur);case"event:onWindowMaximize":return i.eventToCall(this.onWindowMaximize);case"event:onWindowUnmaximize":return i.eventToCall(this.onWindowUnmaximize);case"event:onRecentlyOpenedChange":return i.eventToCall(this.onRecentlyOpenedChange);case"pickFileFolderAndOpen":return this.service.pickFileFolderAndOpen(t);case"pickFileAndOpen":return this.service.pickFileAndOpen(t);case"pickFolderAndOpen":return this.service.pickFolderAndOpen(t)
;case"pickWorkspaceAndOpen":return this.service.pickWorkspaceAndOpen(t);case"showMessageBox":return this.service.showMessageBox(t[0],t[1]);case"showSaveDialog":return this.service.showSaveDialog(t[0],t[1]);case"showOpenDialog":return this.service.showOpenDialog(t[0],t[1]);case"reloadWindow":return this.service.reloadWindow(t[0],t[1]);case"openDevTools":return this.service.openDevTools(t[0],t[1]);case"toggleDevTools":return this.service.toggleDevTools(t);case"closeWorkspace":return this.service.closeWorkspace(t);case"createAndEnterWorkspace":var n=t[1],o=void 0;return Array.isArray(n)&&(o=n.map(function(e){return{uri:r.default.revive(e.uri),name:e.name}})),this.service.createAndEnterWorkspace(t[0],o,t[2]);case"saveAndEnterWorkspace":return this.service.saveAndEnterWorkspace(t[0],t[1]);case"toggleFullScreen":return this.service.toggleFullScreen(t);case"setRepresentedFilename":return this.service.setRepresentedFilename(t[0],t[1]);case"addRecentlyOpened":return this.service.addRecentlyOpened(t)
;case"removeFromRecentlyOpened":return this.service.removeFromRecentlyOpened(t);case"clearRecentlyOpened":return this.service.clearRecentlyOpened();case"showPreviousWindowTab":return this.service.showPreviousWindowTab();case"showNextWindowTab":return this.service.showNextWindowTab();case"moveWindowTabToNewWindow":return this.service.moveWindowTabToNewWindow();case"mergeAllWindowTabs":return this.service.mergeAllWindowTabs();case"toggleWindowTabsBar":return this.service.toggleWindowTabsBar();case"updateTouchBar":return this.service.updateTouchBar(t[0],t[1]);case"getRecentlyOpened":return this.service.getRecentlyOpened(t);case"focusWindow":return this.service.focusWindow(t);case"closeWindow":return this.service.closeWindow(t);case"isFocused":return this.service.isFocused(t);case"isMaximized":return this.service.isMaximized(t);case"maximizeWindow":return this.service.maximizeWindow(t);case"unmaximizeWindow":return this.service.unmaximizeWindow(t);case"minimizeWindow":return this.service.minimizeWindow(t)
;case"onWindowTitleDoubleClick":return this.service.onWindowTitleDoubleClick(t);case"setDocumentEdited":return this.service.setDocumentEdited(t[0],t[1]);case"openWindow":return this.service.openWindow(t[0],t[1],t[2]);case"openNewWindow":return this.service.openNewWindow();case"showWindow":return this.service.showWindow(t);case"getWindows":return this.service.getWindows();case"getWindowCount":return this.service.getWindowCount();case"relaunch":return this.service.relaunch(t[0]);case"whenSharedProcessReady":return this.service.whenSharedProcessReady();case"toggleSharedProcess":return this.service.toggleSharedProcess();case"quit":return this.service.quit();case"log":return this.service.log(t[0],t[1]);case"showItemInFolder":return this.service.showItemInFolder(t);case"openExternal":return this.service.openExternal(t);case"startCrashReporter":return this.service.startCrashReporter(t);case"openAccessibilityOptions":return this.service.openAccessibilityOptions();case"openAboutDialog":
return this.service.openAboutDialog()}},e}();t.WindowsChannel=o;var s=function(){function e(e){this.channel=e,this._onWindowOpen=i.eventFromCall(this.channel,"event:onWindowOpen"),this._onWindowFocus=i.eventFromCall(this.channel,"event:onWindowFocus"),this._onWindowBlur=i.eventFromCall(this.channel,"event:onWindowBlur"),this._onWindowMaximize=i.eventFromCall(this.channel,"event:onWindowMaximize"),this._onWindowUnmaximize=i.eventFromCall(this.channel,"event:onWindowUnmaximize"),this._onRecentlyOpenedChange=i.eventFromCall(this.channel,"event:onRecentlyOpenedChange")}return Object.defineProperty(e.prototype,"onWindowOpen",{get:function(){return this._onWindowOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowFocus",{get:function(){return this._onWindowFocus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowBlur",{get:function(){return this._onWindowBlur},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowMaximize",{get:function(){
return this._onWindowMaximize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowUnmaximize",{get:function(){return this._onWindowUnmaximize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onRecentlyOpenedChange",{get:function(){return this._onRecentlyOpenedChange},enumerable:!0,configurable:!0}),e.prototype.pickFileFolderAndOpen=function(e){return this.channel.call("pickFileFolderAndOpen",e)},e.prototype.pickFileAndOpen=function(e){return this.channel.call("pickFileAndOpen",e)},e.prototype.pickFolderAndOpen=function(e){return this.channel.call("pickFolderAndOpen",e)},e.prototype.pickWorkspaceAndOpen=function(e){return this.channel.call("pickWorkspaceAndOpen",e)},e.prototype.showMessageBox=function(e,t){return this.channel.call("showMessageBox",[e,t])},e.prototype.showSaveDialog=function(e,t){return this.channel.call("showSaveDialog",[e,t])},e.prototype.showOpenDialog=function(e,t){return this.channel.call("showOpenDialog",[e,t])},
e.prototype.reloadWindow=function(e,t){return this.channel.call("reloadWindow",[e,t])},e.prototype.openDevTools=function(e,t){return this.channel.call("openDevTools",[e,t])},e.prototype.toggleDevTools=function(e){return this.channel.call("toggleDevTools",e)},e.prototype.closeWorkspace=function(e){return this.channel.call("closeWorkspace",e)},e.prototype.createAndEnterWorkspace=function(e,t,n){return this.channel.call("createAndEnterWorkspace",[e,t,n])},e.prototype.saveAndEnterWorkspace=function(e,t){return this.channel.call("saveAndEnterWorkspace",[e,t])},e.prototype.toggleFullScreen=function(e){return this.channel.call("toggleFullScreen",e)},e.prototype.setRepresentedFilename=function(e,t){return this.channel.call("setRepresentedFilename",[e,t])},e.prototype.addRecentlyOpened=function(e){return this.channel.call("addRecentlyOpened",e)},e.prototype.removeFromRecentlyOpened=function(e){return this.channel.call("removeFromRecentlyOpened",e)},e.prototype.clearRecentlyOpened=function(){
return this.channel.call("clearRecentlyOpened")},e.prototype.getRecentlyOpened=function(e){return this.channel.call("getRecentlyOpened",e)},e.prototype.showPreviousWindowTab=function(){return this.channel.call("showPreviousWindowTab")},e.prototype.showNextWindowTab=function(){return this.channel.call("showNextWindowTab")},e.prototype.moveWindowTabToNewWindow=function(){return this.channel.call("moveWindowTabToNewWindow")},e.prototype.mergeAllWindowTabs=function(){return this.channel.call("mergeAllWindowTabs")},e.prototype.toggleWindowTabsBar=function(){return this.channel.call("toggleWindowTabsBar")},e.prototype.focusWindow=function(e){return this.channel.call("focusWindow",e)},e.prototype.closeWindow=function(e){return this.channel.call("closeWindow",e)},e.prototype.isFocused=function(e){return this.channel.call("isFocused",e)},e.prototype.isMaximized=function(e){return this.channel.call("isMaximized",e)},e.prototype.maximizeWindow=function(e){return this.channel.call("maximizeWindow",e)},
e.prototype.unmaximizeWindow=function(e){return this.channel.call("unmaximizeWindow",e)},e.prototype.minimizeWindow=function(e){return this.channel.call("minimizeWindow",e)},e.prototype.onWindowTitleDoubleClick=function(e){return this.channel.call("onWindowTitleDoubleClick",e)},e.prototype.setDocumentEdited=function(e,t){return this.channel.call("setDocumentEdited",[e,t])},e.prototype.quit=function(){return this.channel.call("quit")},e.prototype.relaunch=function(e){return this.channel.call("relaunch",[e])},e.prototype.whenSharedProcessReady=function(){return this.channel.call("whenSharedProcessReady")},e.prototype.toggleSharedProcess=function(){return this.channel.call("toggleSharedProcess")},e.prototype.openWindow=function(e,t,n){return this.channel.call("openWindow",[e,t,n])},e.prototype.openNewWindow=function(){return this.channel.call("openNewWindow")},e.prototype.showWindow=function(e){return this.channel.call("showWindow",e)},e.prototype.getWindows=function(){return this.channel.call("getWindows")},
e.prototype.getWindowCount=function(){return this.channel.call("getWindowCount")},e.prototype.log=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.channel.call("log",[e,t])},e.prototype.showItemInFolder=function(e){return this.channel.call("showItemInFolder",e)},e.prototype.openExternal=function(e){return this.channel.call("openExternal",e)},e.prototype.startCrashReporter=function(e){return this.channel.call("startCrashReporter",e)},e.prototype.updateTouchBar=function(e,t){return this.channel.call("updateTouchBar",[e,t])},e.prototype.openAccessibilityOptions=function(){return this.channel.call("openAccessibilityOptions")},e.prototype.openAboutDialog=function(){return this.channel.call("openAboutDialog")},e}();t.WindowsChannelClient=s}),define(e[1035],t([1,0,7,42]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i){this.windowId=e,this.configuration=t,this.windowsService=i
;var r=n.mapEvent(n.filterEvent(i.onWindowFocus,function(t){return t===e}),function(e){return!0}),o=n.mapEvent(n.filterEvent(i.onWindowBlur,function(t){return t===e}),function(e){return!1}),s=n.mapEvent(n.filterEvent(i.onWindowMaximize,function(t){return t===e}),function(e){return!0}),a=n.mapEvent(n.filterEvent(i.onWindowUnmaximize,function(t){return t===e}),function(e){return!1});this.onDidChangeFocus=n.anyEvent(r,o),this.onDidChangeMaximize=n.anyEvent(s,a)}return e.prototype.getCurrentWindowId=function(){return this.windowId},e.prototype.getConfiguration=function(){return this.configuration},e.prototype.pickFileFolderAndOpen=function(e){return e.windowId=this.windowId,this.windowsService.pickFileFolderAndOpen(e)},e.prototype.pickFileAndOpen=function(e){return e.windowId=this.windowId,this.windowsService.pickFileAndOpen(e)},e.prototype.pickFolderAndOpen=function(e){return e.windowId=this.windowId,this.windowsService.pickFolderAndOpen(e)},e.prototype.pickWorkspaceAndOpen=function(e){
return e.windowId=this.windowId,this.windowsService.pickWorkspaceAndOpen(e)},e.prototype.reloadWindow=function(e){return this.windowsService.reloadWindow(this.windowId,e)},e.prototype.openDevTools=function(e){return this.windowsService.openDevTools(this.windowId,e)},e.prototype.toggleDevTools=function(){return this.windowsService.toggleDevTools(this.windowId)},e.prototype.closeWorkspace=function(){return this.windowsService.closeWorkspace(this.windowId)},e.prototype.createAndEnterWorkspace=function(e,t){return this.windowsService.createAndEnterWorkspace(this.windowId,e,t)},e.prototype.saveAndEnterWorkspace=function(e){return this.windowsService.saveAndEnterWorkspace(this.windowId,e)},e.prototype.openWindow=function(e,t){return this.windowsService.openWindow(this.windowId,e,t)},e.prototype.closeWindow=function(){return this.windowsService.closeWindow(this.windowId)},e.prototype.toggleFullScreen=function(){return this.windowsService.toggleFullScreen(this.windowId)},
e.prototype.setRepresentedFilename=function(e){return this.windowsService.setRepresentedFilename(this.windowId,e)},e.prototype.getRecentlyOpened=function(){return this.windowsService.getRecentlyOpened(this.windowId)},e.prototype.focusWindow=function(){return this.windowsService.focusWindow(this.windowId)},e.prototype.isFocused=function(){return this.windowsService.isFocused(this.windowId)},e.prototype.isMaximized=function(){return this.windowsService.isMaximized(this.windowId)},e.prototype.maximizeWindow=function(){return this.windowsService.maximizeWindow(this.windowId)},e.prototype.unmaximizeWindow=function(){return this.windowsService.unmaximizeWindow(this.windowId)},e.prototype.minimizeWindow=function(){return this.windowsService.minimizeWindow(this.windowId)},e.prototype.onWindowTitleDoubleClick=function(){return this.windowsService.onWindowTitleDoubleClick(this.windowId)},e.prototype.setDocumentEdited=function(e){return this.windowsService.setDocumentEdited(this.windowId,e)},e.prototype.show=function(){
return this.windowsService.showWindow(this.windowId)},e.prototype.showMessageBox=function(e){return this.windowsService.showMessageBox(this.windowId,e)},e.prototype.showSaveDialog=function(e){return this.windowsService.showSaveDialog(this.windowId,e)},e.prototype.showOpenDialog=function(e){return this.windowsService.showOpenDialog(this.windowId,e)},e.prototype.updateTouchBar=function(e){return this.windowsService.updateTouchBar(this.windowId,e)},e=a([l(2,i.IWindowsService)],e)}();t.WindowService=r}),define(e[304],t([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputFocusedContextKey="inputFocus",t.InputFocusedContext=new n.RawContextKey(t.InputFocusedContextKey,!1)}),define(e[58],t([1,0,169,6,5,15,427,257,68,12,304,17,1417,16,63,117,30,7,8,101]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";function w(e,n){var r=e.createScoped(n.getHTMLElement())
;return(n instanceof i.List||n instanceof u.PagedList)&&t.WorkbenchListSupportsMultiSelectContextKey.bindTo(r),R.bindTo(r),r}function I(e){return"alt"===e.getValue(t.multiSelectModifierSettingKey)}function T(e){return"doubleClick"!==e.getValue(t.openModeSettingKey)}function x(e,t){return!1===e.multipleSelectionSupport||e.multipleSelectionController||(e.multipleSelectionController=new P(t)),e.openController=new N(t,e.openController),e}function k(){return O||(O=C.createStyleSheet()),O}function D(e,t){return e.controller||(e.controller=t.createInstance(V,{})),e.styler||(e.styler=new b.DefaultTreestyler((M||(M=C.createStyleSheet()),M))),e}Object.defineProperty(t,"__esModule",{value:!0});var A;t.IListService=r.createDecorator("listService");var L=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this
;if(this.lists.some(function(t){return t.widget===e}))throw new Error("Cannot register the same widget multiple times");var i={widget:e,extraContextKeys:t};this.lists.push(i),e.isDOMFocused()&&(this._lastFocusedWidget=e);return o.combinedDisposable([e.onDidFocus(function(){return n._lastFocusedWidget=e}),o.toDisposable(function(){return n.lists.splice(n.lists.indexOf(i),1)}),e.onDidDispose(function(){n.lists=n.lists.filter(function(e){return e!==i}),n._lastFocusedWidget===e&&(n._lastFocusedWidget=void 0)})])},e=a([l(0,s.IContextKeyService)],e)}();t.ListService=L;var R=new s.RawContextKey("listFocus",!0);t.WorkbenchListSupportsMultiSelectContextKey=new s.RawContextKey("listSupportsMultiselect",!0),t.WorkbenchListFocusContextKey=s.ContextKeyExpr.and(R,s.ContextKeyExpr.not(f.InputFocusedContextKey)),t.WorkbenchListDoubleSelection=new s.RawContextKey("listDoubleSelection",!1),t.WorkbenchListMultiSelection=new s.RawContextKey("listMultiSelection",!1),
t.multiSelectModifierSettingKey="workbench.list.multiSelectModifier",t.openModeSettingKey="workbench.list.openMode",t.horizontalScrollingKey="workbench.tree.horizontalScrolling";var O,M,P=function(){function e(e){this.configurationService=e}return e.prototype.isSelectionSingleChangeEvent=function(e){return I(this.configurationService)?e.browserEvent.altKey:i.isSelectionSingleChangeEvent(e)},e.prototype.isSelectionRangeChangeEvent=function(e){return i.isSelectionRangeChangeEvent(e)},e}(),N=function(){function e(e,t){this.configurationService=e,this.existingOpenController=t}return e.prototype.shouldOpen=function(e){if(e instanceof MouseEvent){var t=2===e.detail;return!(!T(this.configurationService)&&!t)&&((0===e.button||1===e.button)&&(!this.existingOpenController||this.existingOpenController.shouldOpen(e)))}return!this.existingOpenController||this.existingOpenController.shouldOpen(e)},e}(),F=function(e){function r(n,r,s,a,l,u,d,p){var f=e.call(this,n,r,s,c({keyboardSupport:!1,selectOnMouseDown:!0,
styleController:new i.DefaultStyleController(k())},h.computeStyles(d.getTheme(),h.defaultListStyles),x(a,p)))||this;return f.configurationService=p,f.contextKeyService=w(l,f),f.listDoubleSelection=t.WorkbenchListDoubleSelection.bindTo(f.contextKeyService),f.listMultiSelection=t.WorkbenchListMultiSelection.bindTo(f.contextKeyService),f._useAltAsMultipleSelectionModifier=I(p),f.disposables.push(o.combinedDisposable([f.contextKeyService,u.register(f),h.attachListStyler(f,d),f.onSelectionChange(function(){var e=f.getSelection();f.listMultiSelection.set(e.length>1),f.listDoubleSelection.set(2===e.length)})])),f.registerListeners(),f}return n(r,e),r.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration(function(n){n.affectsConfiguration(t.multiSelectModifierSettingKey)&&(e._useAltAsMultipleSelectionModifier=I(e.configurationService))}))},Object.defineProperty(r.prototype,"useAltAsMultipleSelectionModifier",{get:function(){
return this._useAltAsMultipleSelectionModifier},enumerable:!0,configurable:!0}),r=a([l(4,s.IContextKeyService),l(5,t.IListService),l(6,p.IThemeService),l(7,g.IConfigurationService)],r)}(i.List);t.WorkbenchList=F;var W=function(e){function r(t,n,r,s,a,l,u,d){var p=e.call(this,t,n,r,c({keyboardSupport:!1,selectOnMouseDown:!0,styleController:new i.DefaultStyleController(k())},h.computeStyles(u.getTheme(),h.defaultListStyles),x(s,d)))||this;return p.configurationService=d,p.disposables=[],p.contextKeyService=w(a,p),p._useAltAsMultipleSelectionModifier=I(d),p.disposables.push(o.combinedDisposable([p.contextKeyService,l.register(p),h.attachListStyler(p,u)])),p.registerListeners(),p}return n(r,e),r.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration(function(n){n.affectsConfiguration(t.multiSelectModifierSettingKey)&&(e._useAltAsMultipleSelectionModifier=I(e.configurationService))}))},
Object.defineProperty(r.prototype,"useAltAsMultipleSelectionModifier",{get:function(){return this._useAltAsMultipleSelectionModifier},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=o.dispose(this.disposables)},r=a([l(4,s.IContextKeyService),l(5,t.IListService),l(6,p.IThemeService),l(7,g.IConfigurationService)],r)}(u.PagedList);t.WorkbenchPagedList=W;var B=function(e){function i(n,i,r,o,s,a,l,u){var d=this,p=D(i,l),f=u.getValue(t.horizontalScrollingKey)?E.ScrollbarVisibility.Auto:E.ScrollbarVisibility.Hidden,g=c({horizontalScrollMode:f,keyboardSupport:!1},h.computeStyles(a.getTheme(),h.defaultListStyles),r);return d=e.call(this,n,p,g)||this,d.disposables=[],d.contextKeyService=w(o,d),d.listDoubleSelection=t.WorkbenchListDoubleSelection.bindTo(d.contextKeyService),d.listMultiSelection=t.WorkbenchListMultiSelection.bindTo(d.contextKeyService),d._openOnSingleClick=T(u),d._useAltAsMultipleSelectionModifier=I(u),
d.disposables.push(d.contextKeyService,s.register(d),h.attachListStyler(d,a)),d.disposables.push(d.onDidChangeSelection(function(){var e=d.getSelection();d.listDoubleSelection.set(e&&2===e.length),d.listMultiSelection.set(e&&e.length>1)})),d.disposables.push(u.onDidChangeConfiguration(function(e){e.affectsConfiguration(t.openModeSettingKey)&&(d._openOnSingleClick=T(u)),e.affectsConfiguration(t.multiSelectModifierSettingKey)&&(d._useAltAsMultipleSelectionModifier=I(u))})),d}return n(i,e),Object.defineProperty(i.prototype,"openOnSingleClick",{get:function(){return this._openOnSingleClick},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useAltAsMultipleSelectionModifier",{get:function(){return this._useAltAsMultipleSelectionModifier},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=o.dispose(this.disposables)},
i=a([l(3,s.IContextKeyService),l(4,t.IListService),l(5,p.IThemeService),l(6,r.IInstantiationService),l(7,g.IConfigurationService)],i)}(d.Tree);t.WorkbenchTree=B;var V=function(e){function i(t,n){var i=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=b.ClickBehavior.ON_MOUSE_DOWN),e}(t))||this;return i.configurationService=n,i.disposables=[],S.isUndefinedOrNull(t.openMode)&&(i.setOpenMode(i.getOpenModeSetting()),i.registerListeners()),i}return n(i,e),i.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration(function(n){n.affectsConfiguration(t.openModeSettingKey)&&e.setOpenMode(e.getOpenModeSetting())}))},i.prototype.getOpenModeSetting=function(){return T(this.configurationService)?b.OpenMode.SINGLE_CLICK:b.OpenMode.DOUBLE_CLICK},i.prototype.dispose=function(){this.disposables=o.dispose(this.disposables)},i=a([l(1,g.IConfigurationService)],i)
}(b.DefaultController);t.WorkbenchTreeController=V;var z=function(e){function t(t,n){var i=e.call(this)||this;return i.tree=t,i.options=n,i._openResource=new _.Emitter,i.openResource=i._openResource.event,i.registerListeners(),i}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.options&&this.options.openOnFocus&&this._register(this.tree.onDidChangeFocus(function(t){return e.onFocus(t)})),this._register(this.tree.onDidChangeSelection(function(t){return e.onSelection(t)}))},t.prototype.onFocus=function(e){var t=e.payload,n=this.tree.getFocus();this.tree.setSelection([n],{fromFocus:!0});var i=t&&t.originalEvent,r=t&&"mouse"===t.origin,o=r&&i&&2===i.detail;t&&t.preventOpenOnFocus||r&&!this.tree.openOnSingleClick&&!o||this._openResource.fire({editorOptions:{preserveFocus:!0,pinned:!1,revealIfVisible:!0},sideBySide:!1,element:n,payload:t})},t.prototype.onSelection=function(e){var t=e.payload;if(!t||!t.fromFocus){var n=t&&t.originalEvent,i=t&&"mouse"===t.origin,r=i&&n&&2===n.detail
;if(!i||this.tree.openOnSingleClick||r){r&&n&&n.preventDefault();var o=t&&"keyboard"===t.origin,s=n&&(n.ctrlKey||n.metaKey||n.altKey),a=!(o&&(!t||!t.preserveFocus)||r||t&&t.focusEditor);this._openResource.fire({editorOptions:{preserveFocus:a,pinned:r,revealIfVisible:!0},sideBySide:s,element:this.tree.getSelection()[0],payload:t})}}},t}(o.Disposable);t.TreeResourceNavigator=z;m.Registry.as(y.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:v.localize(0,null),type:"object",properties:(A={},A[t.multiSelectModifierSettingKey]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[v.localize(1,null),v.localize(2,null)],default:"ctrlCmd",description:v.localize(3,null)},A[t.openModeSettingKey]={type:"string",enum:["singleClick","doubleClick"],enumDescriptions:[v.localize(4,null),v.localize(5,null)],default:"singleClick",description:v.localize(6,null)},A[t.horizontalScrollingKey]={type:"boolean",default:!1,description:v.localize(7,null)},A)})}),
define(e[1038],t([1,0,8,194,113,110,4,19,44,389,1307,58,90,26,12,17,1367]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _,C;!function(e){e[e.ByPosition=0]="ByPosition",e[e.ByName=1]="ByName",e[e.ByKind=2]="ByKind"}(C=t.OutlineItemCompareType||(t.OutlineItemCompareType={}));var E=function(){function e(e){void 0===e&&(e=C.ByPosition),this.type=e}return e.prototype.compare=function(e,t,n){if(t instanceof f.OutlineGroup&&n instanceof f.OutlineGroup)return t.providerIndex-n.providerIndex;if(t instanceof f.OutlineElement&&n instanceof f.OutlineElement)switch(this.type){case C.ByKind:return t.symbol.kind-n.symbol.kind;case C.ByName:return t.symbol.name.localeCompare(n.symbol.name);case C.ByPosition:default:return h.Range.compareRangesUsingStarts(t.symbol.range,n.symbol.range)}return 0},e}();t.OutlineItemComparator=E;var w=function(){function e(){this.enabled=!0}return e.prototype.isVisible=function(e,t){
return!this.enabled||(!(t instanceof f.OutlineElement)||Boolean(t.score))},e}();t.OutlineItemFilter=w;var I=function(){function e(){this.filterOnScore=!0}return e.prototype.getId=function(e,t){return t?t.id:"empty"},e.prototype.hasChildren=function(e,t){if(!t)return!1;if(t instanceof f.OutlineModel)return!0;if(t instanceof f.OutlineElement&&this.filterOnScore&&!t.score)return!1;for(var n in t.children)if(!this.filterOnScore||t.children[n].score)return!0;return!1},e.prototype.getChildren=function(e,t){return o(this,void 0,d.TPromise,function(){var e;return s(this,function(n){return e=c.values(t.children),[2,e]})})},e.prototype.getParent=function(e,t){return o(this,void 0,d.TPromise,function(){return s(this,function(e){return[2,t&&t.parent]})})},e.prototype.shouldAutoexpand=function(e,t){return t&&(t instanceof f.OutlineModel||t.parent instanceof f.OutlineModel||t instanceof f.OutlineGroup||t.parent instanceof f.OutlineGroup)},e}();t.OutlineDataSource=I;var T=function(){function e(e,t){this._themeService=e,
this._configurationService=t,this.renderProblemColors=!0,this.renderProblemBadges=!0}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(e,t){return t instanceof f.OutlineGroup?"outline-group":"outline-element"},e.prototype.renderTemplate=function(e,t,n){if("outline-element"===t){var o=i.$(".outline-element-icon symbol-icon"),s=i.$(".outline-element-label"),a=i.$(".outline-element-detail"),c=i.$(".outline-element-decoration");return i.addClass(n,"outline-element"),i.append(n,o,s,a,c),{icon:o,labelContainer:s,label:new r.HighlightedLabel(s),detail:a,decoration:c}}if("outline-group"===t){s=i.$(".outline-element-label");return i.addClass(n,"outline-element"),i.append(n,s),{labelContainer:s,label:new r.HighlightedLabel(s)}}throw new Error(t)},e.prototype.renderElement=function(t,n,i,r){n instanceof f.OutlineElement&&(r.icon.className="outline-element-icon symbol-icon "+p.symbolKindToCssClass(n.symbol.kind),
r.label.set(n.symbol.name,n.score?u.createMatches(n.score[1]):void 0,g.localize(0,null,n.symbol.name,e._symbolKindNames[n.symbol.kind])),r.detail.innerText=n.symbol.detail||"",this._renderMarkerInfo(n,r)),n instanceof f.OutlineGroup&&r.label.set(n.provider.displayName||g.localize(1,null))},e.prototype._renderMarkerInfo=function(e,t){if(!e.marker)return i.hide(t.decoration),void t.labelContainer.style.removeProperty("--outline-element-color");var n=e.marker,r=n.count,o=n.topSev,s=this._themeService.getTheme().getColor(o===m.MarkerSeverity.Error?y.listErrorForeground:y.listWarningForeground),a=s?s.toString():"inherit";this.renderProblemColors?t.labelContainer.style.setProperty("--outline-element-color",a):t.labelContainer.style.removeProperty("--outline-element-color"),this.renderProblemBadges?r>0?(i.show(t.decoration),i.removeClass(t.decoration,"bubble"),t.decoration.innerText=r<10?r.toString():"+9",t.decoration.title=1===r?g.localize(2,null):g.localize(3,null,r),
t.decoration.style.setProperty("--outline-element-color",a)):(i.show(t.decoration),i.addClass(t.decoration,"bubble"),t.decoration.innerText="",t.decoration.title=g.localize(4,null),t.decoration.style.setProperty("--outline-element-color",a)):i.hide(t.decoration)},e.prototype.disposeTemplate=function(e,t,n){n.label.dispose()},e._symbolKindNames=(_={},_[p.SymbolKind.Array]=g.localize(5,null),_[p.SymbolKind.Boolean]=g.localize(6,null),_[p.SymbolKind.Class]=g.localize(7,null),_[p.SymbolKind.Constant]=g.localize(8,null),_[p.SymbolKind.Constructor]=g.localize(9,null),_[p.SymbolKind.Enum]=g.localize(10,null),_[p.SymbolKind.EnumMember]=g.localize(11,null),_[p.SymbolKind.Event]=g.localize(12,null),_[p.SymbolKind.Field]=g.localize(13,null),_[p.SymbolKind.File]=g.localize(14,null),_[p.SymbolKind.Function]=g.localize(15,null),_[p.SymbolKind.Interface]=g.localize(16,null),_[p.SymbolKind.Key]=g.localize(17,null),_[p.SymbolKind.Method]=g.localize(18,null),_[p.SymbolKind.Module]=g.localize(19,null),
_[p.SymbolKind.Namespace]=g.localize(20,null),_[p.SymbolKind.Null]=g.localize(21,null),_[p.SymbolKind.Number]=g.localize(22,null),_[p.SymbolKind.Object]=g.localize(23,null),_[p.SymbolKind.Operator]=g.localize(24,null),_[p.SymbolKind.Package]=g.localize(25,null),_[p.SymbolKind.Property]=g.localize(26,null),_[p.SymbolKind.String]=g.localize(27,null),_[p.SymbolKind.Struct]=g.localize(28,null),_[p.SymbolKind.TypeParameter]=g.localize(29,null),_[p.SymbolKind.Variable]=g.localize(30,null),_),e=a([l(0,b.IThemeService),l(1,S.IConfigurationService)],e)}();t.OutlineRenderer=T;var x=function(){function e(){}return e.capture=function(e){var t,n=e.getSelection()[0];n instanceof f.TreeElement&&(t=n.id);var i;(n=e.getFocus(!0))instanceof f.TreeElement&&(i=n.id);for(var r=new Array,o=e.getNavigator();o.next();){var s=o.current();s instanceof f.TreeElement&&e.isExpanded(s)&&r.push(s.id)}return{selected:t,focused:i,expanded:r}},e.restore=function(e,t,n){return o(this,void 0,d.TPromise,function(){var i,r,o,a,c,l,u,h
;return s(this,function(s){switch(s.label){case 0:if(i=e.getInput(),!(t&&i instanceof f.OutlineModel))return[2,d.TPromise.as(void 0)];for(r=[],o=0,a=t.expanded;o<a.length;o++)c=a[o],(l=i.getItemById(c))&&r.push(l);return[4,e.collapseAll(void 0)];case 1:return s.sent(),[4,e.expandAll(r)];case 2:return s.sent(),u=i.getItemById(t.selected),h=i.getItemById(t.focused),e.setSelection([u],n),e.setFocus(h,n),[2]}})})},e}();t.OutlineTreeState=x;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldToggleExpansion=function(t,n,i){return t instanceof f.OutlineElement?this.isClickOnTwistie(n):e.prototype.shouldToggleExpansion.call(this,t,n,i)},t}(v.WorkbenchTreeController);t.OutlineController=k}),define(e[150],t([1,0,6,33,1429,25,11,62]),function(e,t,n,i,r,o,s,a){"use strict";function c(e){return e&&"object"==typeof e&&"string"==typeof e.path&&(!e.name||"string"==typeof e.name)}function l(e){
return e&&"object"==typeof e&&"string"==typeof e.uri&&(!e.name||"string"==typeof e.name)}function u(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspacesMainService=n.createDecorator("workspacesMainService"),t.IWorkspacesService=n.createDecorator("workspacesService"),t.WORKSPACE_EXTENSION="code-workspace",t.WORKSPACE_FILTER=[{name:r.localize(0,null),extensions:[t.WORKSPACE_EXTENSION]}],t.UNTITLED_WORKSPACE_NAME="workspace.json",t.isStoredWorkspaceFolder=function(e){return c(e)||l(e)},t.isRawFileWorkspaceFolder=c,t.isRawUriWorkspaceFolder=l,t.getWorkspaceLabel=function(e,n,c){if(u(e))return a.tildify(e,n.userHome);if(i.isParent(e.configPath,n.workspacesHome,!s.isLinux))return r.localize(1,null);var l=o.basename(e.configPath),d=l.substr(0,l.length-t.WORKSPACE_EXTENSION.length-1);return c&&c.verbose?r.localize(2,null,a.getPathLabel(o.join(o.dirname(e.configPath),d),n)):r.localize(3,null,d)},t.isSingleFolderWorkspaceIdentifier=u,t.isWorkspaceIdentifier=function(e){var t=e
;return t&&"string"==typeof t.id&&"string"==typeof t.configPath}}),define(e[27],t([1,0,10,25,70,6,50,150,20,11]),function(e,t,n,i,r,o,s,a,c,l){"use strict";function u(e,t){var o=function(e,t){return e.map(function(e,r){var o;if(a.isRawFileWorkspaceFolder(e))o=function(e,t){if(e){if(i.isAbsolute(e))return n.default.file(e);if(t)return t.with({path:i.join(t.path,e)})}return null}(e.path,t);else if(a.isRawUriWorkspaceFolder(e))try{"/"!==(o=n.default.parse(e.uri)).path[0]&&(o=o.with({path:"/"+o.path}))}catch(e){console.warn(e)}if(o)return new h({uri:o,name:e.name,index:r},e)})}(e,t);return function(e){return c.distinct(e,function(e){return l.isLinux?e.uri.toString():e.uri.toString().toLowerCase()})}(c.coalesce(o)).map(function(e,t){var n=e.uri,i=e.raw,o=e.name;return new h({uri:n,name:o||r.basenameOrAuthority(n),index:t},i)})}Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceContextService=o.createDecorator("contextService");!function(e){e[e.EMPTY=1]="EMPTY",e[e.FOLDER=2]="FOLDER",
e[e.WORKSPACE=3]="WORKSPACE"}(t.WorkbenchState||(t.WorkbenchState={}));var d=function(){function e(e,t,n,i,r){void 0===t&&(t=""),void 0===n&&(n=[]),void 0===i&&(i=null),this._id=e,this._name=t,this._configuration=i,this._ctime=r,this._foldersMap=s.TernarySearchTree.forPaths(),this.folders=n}return e.prototype.update=function(e){this._id=e.id,this._name=e.name,this._configuration=e.configuration,this._ctime=e.ctime,this.folders=e.folders},Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctime",{get:function(){return this._ctime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{
get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=s.TernarySearchTree.forPaths();for(var e=0,t=this.folders;e<t.length;e++){var n=t[e];this._foldersMap.set(n.uri.toString(),n)}},e.prototype.toJSON=function(){return{id:this.id,folders:this.folders,name:this.name,configuration:this.configuration}},e}();t.Workspace=d;var h=function(){function e(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}return e.prototype.toResource=function(e){return this.uri.with({path:i.join(this.uri.path,e)})},e.prototype.toJSON=function(){return{uri:this.uri,name:this.name,index:this.index}},e}();t.WorkspaceFolder=h,t.toWorkspaceFolders=u}),
define(e[198],t([1,0,1369,9,62,7,5,43,14,4,51,74,8,152,204,277,6,27,19,66,218,280,324,72,26,12,68,36,10,57,58,15,117,810]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var W=function(){function e(e,t){var n=this;this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=[],this._callOnModelChange=[],this._callOnDispose.push(this._editor.onDidChangeModel(function(){return n._onModelChanged()})),this._onModelChanged()}return e.prototype.dispose=function(){this._callOnModelChange=d.dispose(this._callOnModelChange),this._callOnDispose=d.dispose(this._callOnDispose),this.removeDecorations()},e.prototype._onModelChanged=function(){this._callOnModelChange=d.dispose(this._callOnModelChange);var e=this._editor.getModel();if(e)for(var t=0,n=this._model.groups;t<n.length;t++){var i=n[t];if(i.uri.toString()===e.uri.toString())return void this._addDecorations(i)}},
e.prototype._addDecorations=function(t){var n=this;this._callOnModelChange.push(this._editor.getModel().onDidChangeDecorations(function(e){return n._onDecorationChanged()}));for(var i=[],r=[],o=0,s=t.children.length;o<s;o++){var a=t.children[o];this._decorationIgnoreSet.has(a.id)||(i.push({range:a.range,options:e.DecorationOptions}),r.push(o))}for(var c=this._editor.deltaDecorations([],i),o=0;o<c.length;o++)this._decorations.set(c[o],t.children[r[o]])},e.prototype._onDecorationChanged=function(){var e=this,t=[];this._decorations.forEach(function(n,i){var r=e._editor.getModel().getDecorationRange(i);if(r){var o=!1;if(!E.Range.equalsRange(r,n.range)){if(E.Range.spansMultipleLines(r))o=!0;else{n.range.endColumn-n.range.startColumn!==r.endColumn-r.startColumn&&(o=!0)}o?(e._decorationIgnoreSet.add(n.id),t.push(i)):n.range=r}}});for(var n=0,i=t.length;n<i;n++)this._decorations.delete(t[n]);this._editor.deltaDecorations(t,[])},e.prototype.removeDecorations=function(){var e=[];this._decorations.forEach(function(t,n){
e.push(n)}),this._editor.deltaDecorations(e,[]),this._decorations.clear()},e.DecorationOptions=w.ModelDecorationOptions.register({stickiness:M.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"reference-decoration"}),e}(),B=function(){function e(e){this._textModelResolverService=e}return e.prototype.getId=function(e,t){return t instanceof x.ReferencesModel?"root":t instanceof x.FileReferences?t.id:t instanceof x.OneReference?t.id:void 0},e.prototype.hasChildren=function(e,t){return t instanceof x.ReferencesModel||t instanceof x.FileReferences&&!t.failure},e.prototype.getChildren=function(e,t){return t instanceof x.ReferencesModel?f.TPromise.as(t.groups):t instanceof x.FileReferences?t.resolve(this._textModelResolverService).then(function(n){return t.failure?e.refresh(t).then(function(){return n.children}):n.children}):f.TPromise.as([])},e.prototype.getParent=function(e,t){var n=null;return t instanceof x.FileReferences?n=t.parent:t instanceof x.OneReference&&(n=t.parent),f.TPromise.as(n)},
e=a([l(0,k.ITextModelService)],e)}(),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onDidFocus=new u.Emitter,t.onDidFocus=t._onDidFocus.event,t._onDidSelect=new u.Emitter,t.onDidSelect=t._onDidSelect.event,t._onDidOpenToSide=new u.Emitter,t.onDidOpenToSide=t._onDidOpenToSide.event,t}return n(t,e),t.prototype.onTap=function(t,n,i){if(n instanceof x.FileReferences)return i.preventDefault(),i.stopPropagation(),this._expandCollapse(t,n);var r=e.prototype.onTap.call(this,t,n,i);return this._onDidFocus.fire(n),r},t.prototype.onMouseDown=function(t,n,i){var r=2===i.detail;if(i.leftButton){if(n instanceof x.FileReferences&&(this.openOnSingleClick||r||this.isClickOnTwistie(i)))return i.preventDefault(),i.stopPropagation(),this._expandCollapse(t,n);var o=e.prototype.onClick.call(this,t,n,i);return(i.ctrlKey||i.metaKey||i.altKey)&&(r||this.openOnSingleClick)?this._onDidOpenToSide.fire(n):r?this._onDidSelect.fire(n):this.openOnSingleClick&&this._onDidFocus.fire(n),o}return!1},
t.prototype.onClick=function(t,n,i){return!i.leftButton&&e.prototype.onClick.call(this,t,n,i)},t.prototype._expandCollapse=function(e,t){return e.isExpanded(t)?e.collapse(t).done(null,r.onUnexpectedError):e.expand(t).done(null,r.onUnexpectedError),!0},t.prototype.onEscape=function(e,t){return!1},t.prototype.dispose=function(){this._onDidFocus.dispose(),this._onDidSelect.dispose(),this._onDidOpenToSide.dispose()},t}(P.WorkbenchTreeController),z=function(){function e(e,t,n,i){var r=this;this._contextService=t,this._environmentService=n;var o=document.createElement("div");m.addClass(o,"reference-file"),e.appendChild(o),this.file=new S.FileLabel(o,O.default.parse("no:file"),this._contextService,this._environmentService),this.badge=new b.CountBadge(v.$(".count").appendTo(o).getHTMLElement());var s=L.attachBadgeStyler(this.badge,i);this.dispose=function(){r.file.dispose(),s.dispose()}}return e.prototype.set=function(e){this.file.setFile(e.uri,this._contextService,this._environmentService);var t=e.children.length
;this.badge.setCount(t),e.failure?this.badge.setTitleFormat(i.localize(0,null)):t>1?this.badge.setTitleFormat(i.localize(1,null,t)):this.badge.setTitleFormat(i.localize(2,null,t))},e=a([l(1,C.IWorkspaceContextService),l(2,_.optional(R.IEnvironmentService)),l(3,A.IThemeService)],e)}(),H=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),m.addClass(this.inside,"referenceMatch"),m.addClass(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),n=t.before,i=t.inside,r=t.after;this.before.innerHTML=p.escape(n),this.inside.innerHTML=p.escape(i),this.after.innerHTML=p.escape(r)},e}(),K=function(){function e(e,t,n){this._contextService=e,this._themeService=t,this._environmentService=n}return e.prototype.getHeight=function(e,t){return 23},
e.prototype.getTemplateId=function(t,n){if(n instanceof x.FileReferences)return e._ids.FileReferences;if(n instanceof x.OneReference)return e._ids.OneReference;throw n},e.prototype.renderTemplate=function(t,n,i){if(n===e._ids.FileReferences)return new z(i,this._contextService,this._environmentService,this._themeService);if(n===e._ids.OneReference)return new H(i);throw n},e.prototype.renderElement=function(e,t,n,i){if(t instanceof x.FileReferences)i.set(t);else{if(!(t instanceof x.OneReference))throw n;i.set(t)}},e.prototype.disposeTemplate=function(e,t,n){n instanceof z&&n.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=a([l(0,C.IWorkspaceContextService),l(1,A.IThemeService),l(2,_.optional(R.IEnvironmentService))],e)}(),U=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof x.FileReferences?t.getAriaMessage():t instanceof x.OneReference?t.getAriaMessage():void 0},e}(),G=function(){function e(e,t){var n=this;this._disposables=[],
this._onDidChangePercentages=new u.Emitter,this._ratio=t,this._sash=new y.Sash(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}});var i;this._disposables.push(this._sash.onDidStart(function(e){i=e.startX-n._width*n.ratio})),this._disposables.push(this._sash.onDidChange(function(e){var t=e.currentX-i;t>20&&t+20<n._width&&(n._ratio=t/n._width,n._sash.layout(),n._onDidChangePercentages.fire(n))}))}return e.prototype.dispose=function(){this._sash.dispose(),this._onDidChangePercentages.dispose(),d.dispose(this._disposables)},Object.defineProperty(e.prototype,"onDidChangePercentages",{get:function(){return this._onDidChangePercentages.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{set:function(e){this._width=e,this._sash.layout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height=e,this._sash.layout()},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"percentages",{get:function(){var e=100*this._ratio;return[e+"%",100-e+"%"]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ratio",{get:function(){return this._ratio},enumerable:!0,configurable:!0}),e}();t.ctxReferenceWidgetSearchTreeFocused=new N.RawContextKey("referenceSearchTreeFocused",!0);var j=function(e){function a(t,n,i,r,o,s,a,c){var l=e.call(this,t,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0})||this;return l._defaultTreeKeyboardSupport=n,l.layoutData=i,l._textModelResolverService=r,l._contextService=o,l._instantiationService=a,l._environmentService=c,l._disposeOnNewModel=[],l._callOnDispose=[],l._onDidSelectReference=new u.Emitter,l._applyTheme(s.getTheme()),l._callOnDispose.push(s.onThemeChange(l._applyTheme.bind(l))),l.create(),l}return n(a,e),a.prototype._applyTheme=function(e){var n=e.getColor(t.peekViewBorder)||g.Color.transparent;this.style({arrowColor:n,frameColor:n,
headerBackgroundColor:e.getColor(t.peekViewTitleBackground)||g.Color.transparent,primaryHeadingColor:e.getColor(t.peekViewTitleForeground),secondaryHeadingColor:e.getColor(t.peekViewTitleInfoForeground)})},a.prototype.dispose=function(){this.setModel(null),this._callOnDispose=d.dispose(this._callOnDispose),d.dispose(this._preview,this._previewNotAvailableMessage,this._tree,this._sash,this._previewModelReference),e.prototype.dispose.call(this)},Object.defineProperty(a.prototype,"onDidSelectReference",{get:function(){return this._onDidSelectReference.event},enumerable:!0,configurable:!0}),a.prototype.show=function(t){this.editor.revealRangeInCenterIfOutsideViewport(t,0),e.prototype.show.call(this,t,this.layoutData.heightInLines||18)},a.prototype.focus=function(){this._tree.domFocus()},a.prototype._onTitleClick=function(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})},
a.prototype._fillBody=function(e){var n=this,r=v.$(e);this.setCssClass("reference-zone-widget"),r.div({class:"messages"},function(e){n._messageContainer=e.hide()}),r.div({class:"preview inline"},function(e){n._preview=n._instantiationService.createInstance(I.EmbeddedCodeEditorWidget,e.getHTMLElement(),{scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}},n.editor),n._previewContainer=e.hide(),n._previewNotAvailableMessage=w.TextModel.createFromString(i.localize(3,null))}),this._sash=new G(e,this.layoutData.ratio||.8),this._sash.onDidChangePercentages(function(){var e=n._sash.percentages,t=e[0],i=e[1];n._previewContainer.style({width:t}),n._treeContainer.style({width:i}),n._preview.layout(),n._tree.layout(),n.layoutData.ratio=n._sash.ratio}),r.div({class:"ref-tree inline"},function(e){var r=n._instantiationService.createInstance(V,{
keyboardSupport:n._defaultTreeKeyboardSupport,clickBehavior:F.ClickBehavior.ON_MOUSE_UP});n._callOnDispose.push(r);var o={dataSource:n._instantiationService.createInstance(B),renderer:n._instantiationService.createInstance(K),controller:r,accessibilityProvider:new U},s={twistiePixels:20,ariaLabel:i.localize(4,null)};n._tree=n._instantiationService.createInstance(P.WorkbenchTree,e.getHTMLElement(),o,s),t.ctxReferenceWidgetSearchTreeFocused.bindTo(n._tree.contextKeyService);var a=function(e,t){e instanceof x.OneReference&&("show"===t&&n._revealReference(e,!1),n._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};n._disposables.push(n._tree.onDidChangeFocus(function(e){e&&e.payload&&"keyboard"===e.payload.origin&&a(e.focus,"show")})),n._disposables.push(n._tree.onDidChangeSelection(function(e){e&&e.payload&&"keyboard"===e.payload.origin&&a(e.selection[0],"goto")})),n._disposables.push(r.onDidFocus(function(e){return a(e,"show")})),n._disposables.push(r.onDidSelect(function(e){return a(e,"goto")})),
n._disposables.push(r.onDidOpenToSide(function(e){return a(e,"side")})),n._treeContainer=e.hide()})},a.prototype._doLayoutBody=function(t,n){e.prototype._doLayoutBody.call(this,t,n);var i=t+"px";this._sash.height=t,this._sash.width=n;var r=this._sash.percentages,o=r[0],s=r[1];this._previewContainer.style({height:i,width:o}),this._treeContainer.style({height:i,width:s}),this._tree.layout(t),this._preview.layout(),this.layoutData={heightInLines:this._viewZone.heightInLines,ratio:this._sash.ratio}},a.prototype._onWidth=function(e){this._sash.width=e,this._preview.layout()},a.prototype.setSelection=function(e){var t=this;return this._revealReference(e,!0).then(function(){t._tree.setSelection([e]),t._tree.setFocus(e)})},a.prototype.setModel=function(e){if(this._disposeOnNewModel=d.dispose(this._disposeOnNewModel),this._model=e,this._model)return this._onNewModel()},a.prototype._onNewModel=function(){var e=this;if(this._model.empty)return this.setTitle(""),
this._messageContainer.innerHtml(i.localize(5,null)).show(),f.TPromise.as(void 0);this._messageContainer.hide(),this._decorationsManager=new W(this._preview,this._model),this._disposeOnNewModel.push(this._decorationsManager),this._disposeOnNewModel.push(this._model.onDidChangeReferenceRange(function(t){return e._tree.refresh(t)})),this._disposeOnNewModel.push(this._preview.onMouseDown(function(t){var n=t.event,i=t.target;2===n.detail&&e._onDidSelectReference.fire({element:{uri:e._getFocusedReference().uri,range:i.range},kind:n.ctrlKey||n.metaKey||n.altKey?"side":"open",source:"editor"})})),m.addClass(this.container,"results-loaded"),this._treeContainer.show(),this._previewContainer.show(),this._preview.layout(),this._tree.layout(),this.focus();var t=1===this._model.groups.length?this._model.groups[0]:this._model;return this._tree.setInput(t)},a.prototype._getFocusedReference=function(){var e=this._tree.getFocus()
;return e instanceof x.OneReference?e:e instanceof x.FileReferences&&e.children.length>0?e.children[0]:void 0},a.prototype._revealReference=function(e,t){return o(this,void 0,f.TPromise,function(){var n,o=this;return s(this,function(s){switch(s.label){case 0:return e.uri.scheme!==h.Schemas.inMemory?this.setTitle(e.name,c.getPathLabel(e.directory,this._environmentService,this._contextService)):this.setTitle(i.localize(6,null)),n=this._textModelResolverService.createModelReference(e.uri),t?[4,this._tree.reveal(e.parent)]:[3,2];case 1:s.sent(),s.label=2;case 2:return[2,f.TPromise.join([n,this._tree.reveal(e)]).then(function(t){var n=t[0];if(o._model){d.dispose(o._previewModelReference);var i=n.object;if(i){o._previewModelReference=n;var r=o._preview.getModel()===i.textEditorModel;o._preview.setModel(i.textEditorModel);var s=E.Range.lift(e.range).collapseToStart();o._preview.setSelection(s),o._preview.revealRangeInCenter(s,r?0:1)}else o._preview.setModel(o._previewNotAvailableMessage),n.dispose()}else n.dispose()
},r.onUnexpectedError)]}})})},a}(T.PeekViewWidget);t.ReferenceWidget=j,t.peekViewTitleBackground=D.registerColor("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},i.localize(7,null)),t.peekViewTitleForeground=D.registerColor("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},i.localize(8,null)),t.peekViewTitleInfoForeground=D.registerColor("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#6c6c6cb3",hc:"#FFFFFF99"},i.localize(9,null)),t.peekViewBorder=D.registerColor("peekView.border",{dark:"#007acc",light:"#007acc",hc:D.contrastBorder},i.localize(10,null)),t.peekViewResultsBackground=D.registerColor("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:g.Color.black},i.localize(11,null)),t.peekViewResultsMatchForeground=D.registerColor("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:g.Color.white},i.localize(12,null)),t.peekViewResultsFileForeground=D.registerColor("peekViewResult.fileForeground",{dark:g.Color.white,
light:"#1E1E1E",hc:g.Color.white},i.localize(13,null)),t.peekViewResultsSelectionBackground=D.registerColor("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},i.localize(14,null)),t.peekViewResultsSelectionForeground=D.registerColor("peekViewResult.selectionForeground",{dark:g.Color.white,light:"#6C6C6C",hc:g.Color.white},i.localize(15,null)),t.peekViewEditorBackground=D.registerColor("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:g.Color.black},i.localize(16,null)),t.peekViewEditorGutterBackground=D.registerColor("peekViewEditorGutter.background",{dark:t.peekViewEditorBackground,light:t.peekViewEditorBackground,hc:t.peekViewEditorBackground},i.localize(17,null)),t.peekViewResultsMatchHighlight=D.registerColor("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},i.localize(18,null)),t.peekViewEditorMatchHighlight=D.registerColor("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null
},i.localize(19,null)),t.peekViewEditorMatchHighlightBorder=D.registerColor("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:D.activeContrastBorder},i.localize(20,null)),A.registerThemingParticipant(function(e,n){var i=e.getColor(t.peekViewResultsMatchHighlight);i&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: "+i+"; }");var r=e.getColor(t.peekViewEditorMatchHighlight);r&&n.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: "+r+"; }");var o=e.getColor(t.peekViewEditorMatchHighlightBorder);o&&n.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid "+o+"; box-sizing: border-box; }");var s=e.getColor(D.activeContrastBorder);s&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted "+s+"; box-sizing: border-box; }");var a=e.getColor(t.peekViewResultsBackground)
;a&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: "+a+"; }");var c=e.getColor(t.peekViewResultsMatchForeground);c&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: "+c+"; }");var l=e.getColor(t.peekViewResultsFileForeground);l&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: "+l+"; }");var u=e.getColor(t.peekViewResultsSelectionBackground);u&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+u+"; }");var d=e.getColor(t.peekViewResultsSelectionForeground);d&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+d+" !important; }");var h=e.getColor(t.peekViewEditorBackground)
;h&&n.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var p=e.getColor(t.peekViewEditorGutterBackground);p&&n.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+p+";}")})}),define(e[367],t([1,0,1362,9,5,71,6,15,17,27,34,198,19,72,12,39,36,22]),function(e,t,n,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ctxReferenceSearchVisible=new d.RawContextKey("referenceSearchVisible",!1);var C=function(){function e(e,n,i,r,o,s,a,c,l,u,d,h){this._defaultTreeKeyboardSupport=e,this._editorService=r,this._textModelResolverService=o,this._notificationService=s,this._instantiationService=a,this._contextService=c,this._storageService=l,this._themeService=u,this._configurationService=d,this._environmentService=h,this._requestIdPool=0,this._disposables=[],
this._ignoreModelChangeEvent=!1,this._editor=n,this._referenceSearchVisible=t.ctxReferenceSearchVisible.bindTo(i)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._referenceSearchVisible.reset(),r.dispose(this._disposables),r.dispose(this._widget),r.dispose(this._model),this._widget=null,this._model=null,this._editor=null},e.prototype.toggleWidget=function(e,t,i){var r,o=this;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return null;this._referenceSearchVisible.set(!0),this._disposables.push(this._editor.onDidChangeModelLanguage(function(){o.closeWidget()})),this._disposables.push(this._editor.onDidChangeModel(function(){o._ignoreModelChangeEvent||o.closeWidget()}));var s=JSON.parse(this._storageService.get("peekViewLayout",void 0,"{}"))
;this._widget=new g.ReferenceWidget(this._editor,this._defaultTreeKeyboardSupport,s,this._textModelResolverService,this._contextService,this._themeService,this._instantiationService,this._environmentService),this._widget.setTitle(n.localize(0,null)),this._widget.show(e),this._disposables.push(this._widget.onDidClose(function(){t.cancel(),o._storageService.store("peekViewLayout",JSON.stringify(o._widget.layoutData)),o._widget=null,o.closeWidget()})),this._disposables.push(this._widget.onDidSelectReference(function(e){var t=e.element,n=e.kind;switch(n){case"open":if("editor"===e.source&&o._configurationService.getValue("editor.stablePeek"))break;case"side":o.openReference(t,"side"===n);break;case"goto":i.onGoto?i.onGoto(t):o._gotoReference(t)}}));var a=++this._requestIdPool;t.then(function(t){if(a===o._requestIdPool&&o._widget)return o._model&&o._model.dispose(),o._model=t,o._widget.setModel(o._model).then(function(){if(o._widget){o._widget.setMetaTitle(i.getMetaTitle(o._model))
;var t=o._editor.getModel().uri,n=new b.Position(e.startLineNumber,e.startColumn),r=o._model.nearestReference(t,n);if(r)return o._widget.setSelection(r)}})},function(e){o._notificationService.error(e)})},e.prototype.goToNextOrPreviousReference=function(e){return o(this,void 0,void 0,function(){var t,n,i;return s(this,function(r){switch(r.label){case 0:return this._model?(t=this._model.nearestReference(this._editor.getModel().uri,this._widget.position),n=this._model.nextOrPreviousReference(t,e),i=this._editor.hasTextFocus(),[4,this._widget.setSelection(n)]):[3,3];case 1:return r.sent(),[4,this._gotoReference(n)];case 2:r.sent(),i&&this._editor.focus(),r.label=3;case 3:return[2]}})})},e.prototype.closeWidget=function(){r.dispose(this._widget),this._widget=null,this._referenceSearchVisible.reset(),this._disposables=r.dispose(this._disposables),r.dispose(this._model),this._model=null,this._editor.focus(),this._requestIdPool+=1},e.prototype._gotoReference=function(e){var t=this;this._widget.hide(),
this._ignoreModelChangeEvent=!0;var n=v.Range.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n}},this._editor).then(function(e){t._ignoreModelChangeEvent=!1,e&&e===t._editor?(t._widget.show(n),t._widget.focus()):t.closeWidget()},function(e){t._ignoreModelChangeEvent=!1,i.onUnexpectedError(e)})},e.prototype.openReference=function(e,t){var n=e.uri,i=e.range;this._editorService.openCodeEditor({resource:n,options:{selection:i}},this._editor,t),t||this.closeWidget()},e.ID="editor.contrib.referencesController",e=a([l(2,d.IContextKeyService),l(3,c.ICodeEditorService),l(4,m.ITextModelService),l(5,_.INotificationService),l(6,u.IInstantiationService),l(7,p.IWorkspaceContextService),l(8,f.IStorageService),l(9,y.IThemeService),l(10,h.IConfigurationService),l(11,u.optional(S.IEnvironmentService))],e)}();t.ReferencesController=C}),define(e[448],t([1,0,1317,128,73,11,4,71,19,32,561,367,324,280,15,265,55,119,22]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(){return function(e,t,n,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=n,this.showMessage=i}}();t.DefinitionActionConfig=S;var _=function(e){function t(t,n){var i=e.call(this,n)||this;return i._configuration=t,i}return n(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(b.INotificationService),r=e.get(c.ICodeEditorService),o=e.get(y.IProgressService),s=t.getModel(),a=t.getPosition(),u=this._getDeclarationsAtPosition(s,a).then(function(e){if(!s.isDisposed()&&t.getModel()===s){for(var i=-1,o=[],c=0;c<e.length;c++){var u=e[c];if(u&&u.range){var d=u.uri,h=u.range,f=o.push({uri:d,range:h});n._configuration.filterCurrent&&d.toString()===s.uri.toString()&&l.Range.containsPosition(h,a)&&-1===i&&(i=f-1)}}if(0===o.length){if(n._configuration.showMessage){var g=s.getWordAtPosition(a);v.MessageController.get(t).showMessage(n._getNoResultFoundMessage(g),a)}
}else if(1===o.length&&-1!==i){var m=o[0];n._openReference(t,r,m,!1)}else n._onResult(r,t,new p.ReferencesModel(o))}},function(e){i.error(e)});return o.showWhile(u,250),u},t.prototype._getDeclarationsAtPosition=function(e,t){return d.getDefinitionsAtPosition(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.localize(0,null,e.word):i.localize(1,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.localize(2,null,e.references.length)},t.prototype._onResult=function(e,t,n){var i=this,o=n.getAriaMessage();if(r.alert(o),this._configuration.openInPeek)this._openInPeek(e,t,n);else{var s=n.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,s,this._configuration.openToSide).then(function(t){t&&n.references.length>1?i._openInPeek(e,t,n):n.dispose()})}},t.prototype._openReference=function(e,t,n,i){var r=n.uri,o=n.range;return t.openCodeEditor({resource:r,options:{selection:l.Range.collapseToStart(o),revealIfVisible:!0,
revealInCenterIfOutsideViewport:!0}},e,i)},t.prototype._openInPeek=function(e,t,n){var i=this,r=h.ReferencesController.get(t);r?r.toggleWidget(t.getSelection(),a.TPromise.as(n),{getMetaTitle:function(e){return i._getMetaTitle(e)},onGoto:function(n){return r.closeWidget(),i._openReference(t,e,n,!1)}}):n.dispose()},t}(u.EditorAction);t.DefinitionAction=_;var C=s.isWeb?2118:70,E=function(e){function t(){return e.call(this,new S,{id:t.ID,label:i.localize(3,null),alias:"Go to Definition",precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:C},menuOpts:{group:"navigation",order:1.1}})||this}return n(t,e),t.ID="editor.action.goToDeclaration",t}(_);t.GoToDefinitionAction=E;var w=function(e){function t(){return e.call(this,new S(!0),{id:t.ID,label:i.localize(4,null),alias:"Open Definition to the Side",
precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:o.KeyChord(2089,C)}})||this}return n(t,e),t.ID="editor.action.openDeclarationToTheSide",t}(_);t.OpenDefinitionToSideAction=w;var I=function(e){function t(){return e.call(this,new S(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:i.localize(5,null),alias:"Peek Definition",precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasDefinitionProvider,f.PeekContext.notInPeekEditor,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140}},menuOpts:{group:"navigation",order:1.2}})||this}return n(t,e),t}(_);t.PeekDefinitionAction=I;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return d.getImplementationsAtPosition(e,t)},
t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.localize(6,null,e.word):i.localize(7,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.localize(8,null,e.references.length)},t}(_);t.ImplementationAction=T;var x=function(e){function t(){return e.call(this,new S,{id:t.ID,label:i.localize(9,null),alias:"Go to Implementation",precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasImplementationProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:2118}})||this}return n(t,e),t.ID="editor.action.goToImplementation",t}(T);t.GoToImplementationAction=x;var k=function(e){function t(){return e.call(this,new S(!1,!0,!1),{id:t.ID,label:i.localize(10,null),alias:"Peek Implementation",precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasImplementationProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:3142}})||this}return n(t,e),
t.ID="editor.action.peekImplementation",t}(T);t.PeekImplementationAction=k;var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return d.getTypeDefinitionsAtPosition(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.localize(11,null,e.word):i.localize(12,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.localize(13,null,e.references.length)},t}(_);t.TypeDefinitionAction=D;var A=function(e){function t(){return e.call(this,new S,{id:t.ID,label:i.localize(14,null),alias:"Go to Type Definition",precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasTypeDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:0},menuOpts:{group:"navigation",order:1.4}})||this}return n(t,e),t.ID="editor.action.goToTypeDefinition",t}(D);t.GoToTypeDefinitionAction=A;var L=function(e){function t(){
return e.call(this,new S(!1,!0,!1),{id:t.ID,label:i.localize(15,null),alias:"Peek Type Definition",precondition:g.ContextKeyExpr.and(m.EditorContextKeys.hasTypeDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:0}})||this}return n(t,e),t.ID="editor.action.peekTypeDefinition",t}(D);t.PeekTypeDefinitionAction=L,u.registerEditorAction(E),u.registerEditorAction(w),u.registerEditorAction(I),u.registerEditorAction(x),u.registerEditorAction(k),u.registerEditorAction(A),u.registerEditorAction(L)}),define(e[1044],t([1,0,1320,18,9,134,4,54,19,44,45,32,561,5,72,12,26,203,448,512,39,443]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e,t,n){var o=this;this.textModelResolverService=t,this.modeService=n,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.Throttler;var s=new _.ClickLinkGesture(e);this.toUnhook.push(s),
this.toUnhook.push(s.onMouseMoveOrRelevantKeyDown(function(e){var t=e[0],n=e[1];o.startFindDefinition(t,n)})),this.toUnhook.push(s.onExecute(function(e){o.isEnabled(e)&&o.gotoDefinition(e.target,e.hasSideBySideModifier).done(function(){o.removeDecorations()},function(e){o.removeDecorations(),r.onUnexpectedError(e)})})),this.toUnhook.push(s.onCancel(function(){o.removeDecorations(),o.currentWordUnderMouse=null}))}return e.prototype.startFindDefinition=function(e,t){var i=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var a=e.target.position,c=a?this.editor.getModel().getWordAtPosition(a):null;if(!c)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==c.startColumn||this.currentWordUnderMouse.endColumn!==c.endColumn||this.currentWordUnderMouse.word!==c.word){this.currentWordUnderMouse=c;var l=new b.EditorState(this.editor,15);this.throttler.queue(function(){
return l.validate(i.editor)?i.findDefinition(e.target):s.TPromise.wrap(null)}).then(function(e){if(e&&e.length&&l.validate(i.editor))if(e.length>1)i.addDecoration(new u.Range(a.lineNumber,c.startColumn,a.lineNumber,c.endColumn),(new o.MarkdownString).appendText(n.localize(0,null,e.length)));else{var t=e[0];if(!t.uri)return;i.textModelResolverService.createModelReference(t.uri).then(function(e){if(e.object&&e.object.textEditorModel){var n=e.object.textEditorModel,r=t.range.startLineNumber;if(0!==n.getLineMaxColumn(r)){var s,l=i.getPreviewValue(n,r);s=t.origin?u.Range.lift(t.origin):new u.Range(a.lineNumber,c.startColumn,a.lineNumber,c.endColumn),i.addDecoration(s,(new o.MarkdownString).appendCodeblock(i.modeService.getModeIdByFilenameOrFirstLine(n.uri.fsPath),l)),e.dispose()}else e.dispose()}else e.dispose()})}else i.removeDecorations()}).done(void 0,r.onUnexpectedError)}},e.prototype.getPreviewValue=function(t,n){var i=this.getPreviewRangeBasedOnBrackets(t,n)
;i.endLineNumber-i.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(t,n));return this.stripIndentationFromPreviewRange(t,n,i)},e.prototype.stripIndentationFromPreviewRange=function(e,t,n){for(var i=e.getLineFirstNonWhitespaceColumn(t),r=t+1;r<n.endLineNumber;r++){var o=e.getLineFirstNonWhitespaceColumn(r);i=Math.min(i,o)}return e.getValueInRange(n).replace(new RegExp("^\\s{"+(i-1)+"}","gm"),"").trim()},e.prototype.getPreviewRangeBasedOnIndentation=function(t,n){for(var i=t.getLineFirstNonWhitespaceColumn(n),r=Math.min(t.getLineCount(),n+e.MAX_SOURCE_PREVIEW_LINES),o=n+1;o<r;o++){if(i===t.getLineFirstNonWhitespaceColumn(o))break}return new u.Range(n,1,o+1,1)},e.prototype.getPreviewRangeBasedOnBrackets=function(t,n){for(var i=Math.min(t.getLineCount(),n+e.MAX_SOURCE_PREVIEW_LINES),r=[],o=!0,s=t.findNextBracket(new C.Position(n,1));null!==s;){if(0===r.length)r.push(s);else{var a=r[r.length-1];if(a.open===s.open&&a.isOpen&&!s.isOpen?r.pop():r.push(s),0===r.length){
if(!o)return new u.Range(n,1,s.range.endLineNumber+1,1);o=!1}}var c=t.getLineMaxColumn(n),l=s.range.endLineNumber,d=s.range.endColumn;if(c===s.range.endColumn&&(l++,d=1),l>i)return new u.Range(n,1,i+1,1);s=t.findNextBracket(new C.Position(l,d))}return new u.Range(n,1,i+1,1)},e.prototype.addDecoration=function(e,t){var n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[n])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===h.MouseTargetType.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&d.DefinitionProviderRegistry.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?f.getDefinitionsAtPosition(t,e.position):s.TPromise.as(null)},
e.prototype.gotoDefinition=function(e,t){var n=this;this.editor.setPosition(e.position);var i=new S.DefinitionAction(new S.DefinitionActionConfig(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext(function(e){return i.run(e,n.editor)})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=g.dispose(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=a([l(1,v.ITextModelService),l(2,c.IModeService)],e)}();p.registerEditorContribution(E),m.registerThemingParticipant(function(e,t){var n=e.getColor(y.editorActiveLinkForeground);n&&t.addRule(".monaco-editor .goto-definition-link { color: "+n+" !important; }")})}),define(e[1045],t([1,0,1356,4,15,52,39,32,44,19,280,367,324,18,9,55,218,45,58,198,29,10,71]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";function T(e,t){x(e,function(e){return e.closeWidget()})}function x(e,t){var n=p.getOuterEditor(e);if(n){
var i=f.ReferencesController.get(n);i&&t(i)}}function k(e,t){var n=d.ReferenceProviderRegistry.ordered(e).map(function(n){return v.asWinJsPromise(function(i){return n.provideReferences(e,t,{includeDeclaration:!0},i)}).then(function(e){if(Array.isArray(e))return e},function(e){m.onUnexpectedExternalError(e)})});return r.TPromise.join(n).then(function(e){for(var t=[],n=0,i=e;n<i.length;n++){var r=i[n];r&&t.push.apply(t,r)}return t})}Object.defineProperty(t,"__esModule",{value:!0}),t.defaultReferenceSearchOptions={getMetaTitle:function(e){return e.references.length>1&&i.localize(0,null,e.references.length)}};var D=function(){function e(e,t){e instanceof b.EmbeddedCodeEditorWidget&&p.PeekContext.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=a([l(1,o.IContextKeyService)],e)}();t.ReferenceController=D;var A=function(e){function r(){return e.call(this,{id:"editor.action.referenceSearch.trigger",
label:i.localize(1,null),alias:"Find All References",precondition:o.ContextKeyExpr.and(y.EditorContextKeys.hasReferenceProvider,p.PeekContext.notInPeekEditor,y.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:y.EditorContextKeys.editorTextFocus,primary:1094},menuOpts:{group:"navigation",order:1.5}})||this}return n(r,e),r.prototype.run=function(e,n){var i=f.ReferencesController.get(n);if(i){var r=n.getSelection(),o=k(n.getModel(),r.getStartPosition()).then(function(e){return new g.ReferencesModel(e)});i.toggleWidget(r,o,t.defaultReferenceSearchOptions)}},r}(u.EditorAction);t.ReferenceAction=A,u.registerEditorContribution(D),u.registerEditorAction(A);E.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:function(e,n,i){if(!(n instanceof w.default))throw new Error("illegal argument, uri");if(!i)throw new Error("illegal argument, position");var o=e.get(I.ICodeEditorService);return o.openCodeEditor({resource:n},o.getFocusedCodeEditor()).then(function(e){
if(S.isCodeEditor(e)){var n=f.ReferencesController.get(e);if(n){var o=k(e.getModel(),c.Position.lift(i)).then(function(e){return new g.ReferencesModel(e)}),s=new h.Range(i.lineNumber,i.column,i.lineNumber,i.column);return r.TPromise.as(n.toggleWidget(s,o,t.defaultReferenceSearchOptions))}}})}}),E.CommandsRegistry.registerCommand({id:"editor.action.showReferences",handler:function(e,n,i,o){if(!(n instanceof w.default))throw new Error("illegal argument, uri expected");var s=e.get(I.ICodeEditorService);return s.openCodeEditor({resource:n},s.getFocusedCodeEditor()).then(function(e){if(S.isCodeEditor(e)){var n=f.ReferencesController.get(e);if(n)return r.TPromise.as(n.toggleWidget(new h.Range(i.lineNumber,i.column,i.lineNumber,i.column),r.TPromise.as(new g.ReferencesModel(o)),t.defaultReferenceSearchOptions)).then(function(){return!0})}})},description:{description:"Show references at a position in a file",args:[{name:"uri",description:"The text document in which to show references",constraint:w.default},{
name:"position",description:"The position at which to show",constraint:c.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array}]}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(50),primary:62,when:f.ctxReferenceSearchVisible,handler:function(e){x(e,function(e){e.goToNextOrPreviousReference(!0)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReferenceFromEmbeddedEditor",weight:s.KeybindingsRegistry.WEIGHT.editorContrib(50),primary:62,when:p.PeekContext.inPeekEditor,handler:function(e){x(e,function(e){e.goToNextOrPreviousReference(!0)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(50),primary:1086,when:f.ctxReferenceSearchVisible,handler:function(e){x(e,function(e){e.goToNextOrPreviousReference(!1)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({
id:"goToPreviousReferenceFromEmbeddedEditor",weight:s.KeybindingsRegistry.WEIGHT.editorContrib(50),primary:1086,when:p.PeekContext.inPeekEditor,handler:function(e){x(e,function(e){e.goToNextOrPreviousReference(!1)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearch",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(50),primary:9,secondary:[1033],when:o.ContextKeyExpr.and(f.ctxReferenceSearchVisible,o.ContextKeyExpr.not("config.editor.stablePeek")),handler:T}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearchEditor",weight:s.KeybindingsRegistry.WEIGHT.editorContrib(-101),primary:9,secondary:[1033],when:o.ContextKeyExpr.and(p.PeekContext.inPeekEditor,o.ContextKeyExpr.not("config.editor.stablePeek")),handler:T}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:s.KeybindingsRegistry.WEIGHT.editorContrib(),primary:2051,mac:{primary:259},
when:o.ContextKeyExpr.and(f.ctxReferenceSearchVisible,C.ctxReferenceWidgetSearchTreeFocused),handler:function(e,t){var n=e.get(_.IListService),i=n.lastFocusedList&&n.lastFocusedList.getFocus();i instanceof g.OneReference&&x(e,function(e){return e.openReference(i,!0)})}}),t.provideReferences=k,u.registerDefaultLanguageCommand("_executeReferenceProvider",k)}),define(e[1046],t([1,0,256,157,341,496,995,929,930,931,997,550,937,339,939,940,296,559,942,944,448,1044,1003,1005,1006,384,1007,429,1012,1010,1045,1015,951,160,284,331,419,392,957]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(e[1047],t([1,0,1404,4,7,5,80,123,27,34,36]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n,i){this.storageService=e,this.contextService=t,this.environmentService=n,this.disposables=[],this._onEnablementChanged=new r.Emitter,this.onEnablementChanged=this._onEnablementChanged.event,
i.onDidUninstallExtension(this._onDidUninstallExtension,this,this.disposables)}return Object.defineProperty(e.prototype,"hasWorkspace",{get:function(){return this.contextService.getWorkbenchState()!==u.WorkbenchState.EMPTY},enumerable:!0,configurable:!0}),e.prototype.getDisabledExtensions=function(){var e=this._getDisabledExtensions(d.StorageScope.GLOBAL);if(this.hasWorkspace){for(var t=function(t){e.some(function(e){return c.areSameExtensions(e,t)})||e.push(t)},n=0,r=this._getDisabledExtensions(d.StorageScope.WORKSPACE);n<r.length;n++){t(r[n])}var o=this._getEnabledExtensions(d.StorageScope.WORKSPACE);o.length&&(e=e.filter(function(e){return!o.some(function(t){return c.areSameExtensions(t,e)})}))}return i.TPromise.as(e)},e.prototype.getEnablementState=function(e){if(this.environmentService.disableExtensions&&e.type===s.LocalExtensionType.User)return s.EnablementState.Disabled;var t=this._getIdentifier(e);if(this.hasWorkspace){if(this._getEnabledExtensions(d.StorageScope.WORKSPACE).filter(function(e){
return c.areSameExtensions(e,t)})[0])return s.EnablementState.WorkspaceEnabled;if(this._getDisabledExtensions(d.StorageScope.WORKSPACE).filter(function(e){return c.areSameExtensions(e,t)})[0])return s.EnablementState.WorkspaceDisabled}return this._getDisabledExtensions(d.StorageScope.GLOBAL).filter(function(e){return c.areSameExtensions(e,t)})[0]?s.EnablementState.Disabled:s.EnablementState.Enabled},e.prototype.canChangeEnablement=function(e){return!(e.manifest&&e.manifest.contributes&&e.manifest.contributes.localizations&&e.manifest.contributes.localizations.length)&&(e.type!==s.LocalExtensionType.User||!this.environmentService.disableExtensions)},e.prototype.setEnablement=function(e,t){var r;if(s.isIExtensionIdentifier(e))r=e;else{if(!this.canChangeEnablement(e))return i.TPromise.wrap(!1);r=this._getIdentifier(e)}if((t===s.EnablementState.WorkspaceDisabled||t===s.EnablementState.WorkspaceEnabled)&&!this.hasWorkspace)return i.TPromise.wrapError(new Error(n.localize(0,null)))
;if(this._getEnablementState(r)===t)return i.TPromise.as(!1);switch(t){case s.EnablementState.Enabled:this._enableExtension(r);break;case s.EnablementState.Disabled:this._disableExtension(r);break;case s.EnablementState.WorkspaceEnabled:this._enableExtensionInWorkspace(r);break;case s.EnablementState.WorkspaceDisabled:this._disableExtensionInWorkspace(r)}return this._onEnablementChanged.fire(r),i.TPromise.as(!0)},e.prototype.isEnabled=function(e){var t=this.getEnablementState(e);return t===s.EnablementState.WorkspaceEnabled||t===s.EnablementState.Enabled},e.prototype._getEnablementState=function(e){if(this.hasWorkspace){if(this._getEnabledExtensions(d.StorageScope.WORKSPACE).filter(function(t){return c.areSameExtensions(t,e)})[0])return s.EnablementState.WorkspaceEnabled;if(this._getDisabledExtensions(d.StorageScope.WORKSPACE).filter(function(t){return c.areSameExtensions(t,e)})[0])return s.EnablementState.WorkspaceDisabled}return this._getDisabledExtensions(d.StorageScope.GLOBAL).filter(function(t){
return c.areSameExtensions(t,e)})[0]?s.EnablementState.Disabled:s.EnablementState.Enabled},e.prototype._getIdentifier=function(e){return{id:c.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid}},e.prototype._enableExtension=function(e){this._removeFromDisabledExtensions(e,d.StorageScope.WORKSPACE),this._removeFromEnabledExtensions(e,d.StorageScope.WORKSPACE),this._removeFromDisabledExtensions(e,d.StorageScope.GLOBAL)},e.prototype._disableExtension=function(e){this._removeFromDisabledExtensions(e,d.StorageScope.WORKSPACE),this._removeFromEnabledExtensions(e,d.StorageScope.WORKSPACE),this._addToDisabledExtensions(e,d.StorageScope.GLOBAL)},e.prototype._enableExtensionInWorkspace=function(e){this._removeFromDisabledExtensions(e,d.StorageScope.WORKSPACE),this._addToEnabledExtensions(e,d.StorageScope.WORKSPACE)},e.prototype._disableExtensionInWorkspace=function(e){this._addToDisabledExtensions(e,d.StorageScope.WORKSPACE),this._removeFromEnabledExtensions(e,d.StorageScope.WORKSPACE)},
e.prototype._addToDisabledExtensions=function(e,t){if(t===d.StorageScope.WORKSPACE&&!this.hasWorkspace)return i.TPromise.wrap(!1);var n=this._getDisabledExtensions(t);return n.every(function(t){return!c.areSameExtensions(t,e)})?(n.push(e),this._setDisabledExtensions(n,t,e),i.TPromise.wrap(!0)):i.TPromise.wrap(!1)},e.prototype._removeFromDisabledExtensions=function(e,t){if(t===d.StorageScope.WORKSPACE&&!this.hasWorkspace)return!1;for(var n=this._getDisabledExtensions(t),i=0;i<n.length;i++){var r=n[i];if(c.areSameExtensions(r,e))return n.splice(i,1),this._setDisabledExtensions(n,t,e),!0}return!1},e.prototype._addToEnabledExtensions=function(e,t){if(t===d.StorageScope.WORKSPACE&&!this.hasWorkspace)return!1;var n=this._getEnabledExtensions(t);return!!n.every(function(t){return!c.areSameExtensions(t,e)})&&(n.push(e),this._setEnabledExtensions(n,t,e),!0)},e.prototype._removeFromEnabledExtensions=function(e,t){if(t===d.StorageScope.WORKSPACE&&!this.hasWorkspace)return!1
;for(var n=this._getEnabledExtensions(t),i=0;i<n.length;i++){var r=n[i];if(c.areSameExtensions(r,e))return n.splice(i,1),this._setEnabledExtensions(n,t,e),!0}return!1},e.prototype._getEnabledExtensions=function(e){return this._getExtensions("extensionsIdentifiers/enabled",e)},e.prototype._setEnabledExtensions=function(e,t,n){this._setExtensions("extensionsIdentifiers/enabled",e,t,n)},e.prototype._getDisabledExtensions=function(e){return this._getExtensions("extensionsIdentifiers/disabled",e)},e.prototype._setDisabledExtensions=function(e,t,n){this._setExtensions("extensionsIdentifiers/disabled",e,t,n)},e.prototype._getExtensions=function(e,t){if(t===d.StorageScope.WORKSPACE&&!this.hasWorkspace)return[];var n=this.storageService.get(e,t,"");return n?JSON.parse(n):[]},e.prototype._setExtensions=function(e,t,n,i){t.length?this.storageService.store(e,JSON.stringify(t.map(function(e){return{id:e.id,uuid:e.uuid}})),n):this.storageService.remove(e,n)},e.prototype._onDidUninstallExtension=function(e){
var t=e.identifier;if(!e.error){var n=c.getIdFromLocalExtensionId(t.id);if(n){var i={id:n,uuid:t.uuid};this._removeFromDisabledExtensions(i,d.StorageScope.WORKSPACE),this._removeFromEnabledExtensions(i,d.StorageScope.WORKSPACE),this._removeFromDisabledExtensions(i,d.StorageScope.GLOBAL)}}},e.prototype.dispose=function(){this.disposables=o.dispose(this.disposables)},e=a([l(0,d.IStorageService),l(1,u.IWorkspaceContextService),l(2,h.IEnvironmentService),l(3,s.IExtensionManagementService)],e)}();t.ExtensionEnablementService=p}),define(e[1048],t([1,0,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"createWorkspace":var i=t,r=void 0;return Array.isArray(i)&&(r=i.map(function(e){return{uri:n.default.revive(e.uri),name:e.name}})),this.service.createWorkspace(r)}},e}();t.WorkspacesChannel=i;var r=function(){function e(e){this.channel=e}return e.prototype.createWorkspace=function(e){
return this.channel.call("createWorkspace",e)},e}();t.WorkspacesChannelClient=r}),define(e[1049],t([1,0,150,11,59,25,62]),function(e,t,n,i,r,o,s){"use strict";function a(e,t,a){var l=function(e){var t=!i.isWindows;i.isWindows&&e.forEach(function(e){n.isRawFileWorkspaceFolder(e)&&!t&&e.path.indexOf(c)>=0&&(t=!0)});return t}(a);return o.isEqualOrParent(e,t,!i.isLinux)&&(e=r.relative(t,e)||"."),i.isWindows&&(r.isAbsolute(e)?(l&&(e=o.normalize(e,!1)),e=s.normalizeDriveLetter(e)):l&&(e=e.replace(/[\\]/g,c))),e}Object.defineProperty(t,"__esModule",{value:!0});var c="/";t.massageFolderPathForWorkspace=a}),define(e[67],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extHostNamedCustomer=function(e){return function(t){n.INSTANCE.registerNamedCustomer(e,t)}},t.extHostCustomer=function(e){n.INSTANCE.registerCustomer(e)};!function(e){e.getNamedCustomers=function(){return n.INSTANCE.getNamedCustomers()},e.getCustomers=function(){return n.INSTANCE.getCustomers()}
}(t.ExtHostCustomersRegistry||(t.ExtHostCustomersRegistry={}));var n=function(){function e(){this._namedCustomers=[],this._customers=[]}return e.prototype.registerNamedCustomer=function(e,t){var n=[e,t];this._namedCustomers.push(n)},e.prototype.getNamedCustomers=function(){return this._namedCustomers},e.prototype.registerCustomer=function(e){this._customers.push(e)},e.prototype.getCustomers=function(){return this._customers},e.INSTANCE=new e,e}()}),define(e[375],t([1,0,163,10,9,134,59,14,50,20]),function(e,t,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e){this._callOnDispose=e}return e.from=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(function(){if(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];i&&"function"==typeof i.dispose&&i.dispose()}t=void 0}})},e.prototype.dispose=function(){"function"==typeof this._callOnDispose&&(this._callOnDispose(),this._callOnDispose=void 0)},e}();t.Disposable=d;var h=function(){
function e(e,t){if(e<0)throw o.illegalArgument("line must be non-negative");if(t<0)throw o.illegalArgument("character must be non-negative");this._line=e,this._character=t}return e.Min=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.pop(),i=0,r=e;i<r.length;i++){var o=r[i];o.isBefore(n)&&(n=o)}return n},e.Max=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.pop(),i=0,r=e;i<r.length;i++){var o=r[i];o.isAfter(n)&&(n=o)}return n},e.isPosition=function(t){if(!t)return!1;if(t instanceof e)return!0;var n=t,i=n.line,r=n.character;return"number"==typeof i&&"number"==typeof r},Object.defineProperty(e.prototype,"line",{get:function(){return this._line},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"character",{get:function(){return this._character},enumerable:!0,configurable:!0}),e.prototype.isBefore=function(e){return this._line<e._line||!(e._line<this._line)&&this._character<e._character},e.prototype.isBeforeOrEqual=function(e){
return this._line<e._line||!(e._line<this._line)&&this._character<=e._character},e.prototype.isAfter=function(e){return!this.isBeforeOrEqual(e)},e.prototype.isAfterOrEqual=function(e){return!this.isBefore(e)},e.prototype.isEqual=function(e){return this._line===e._line&&this._character===e._character},e.prototype.compareTo=function(e){return this._line<e._line?-1:this._line>e.line?1:this._character<e._character?-1:this._character>e._character?1:0},e.prototype.translate=function(t,n){if(void 0===n&&(n=0),null===t||null===n)throw o.illegalArgument();var i;return void 0===t?i=0:"number"==typeof t?i=t:(i="number"==typeof t.lineDelta?t.lineDelta:0,n="number"==typeof t.characterDelta?t.characterDelta:0),0===i&&0===n?this:new e(this.line+i,this.character+n)},e.prototype.with=function(t,n){if(void 0===n&&(n=this.character),null===t||null===n)throw o.illegalArgument();var i;return void 0===t?i=this.line:"number"==typeof t?i=t:(i="number"==typeof t.line?t.line:this.line,
n="number"==typeof t.character?t.character:this.character),i===this.line&&n===this.character?this:new e(i,n)},e.prototype.toJSON=function(){return{line:this.line,character:this.character}},e}();t.Position=h;var p=function(){function e(e,t,n,i){var r,o;if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof i?(r=new h(e,t),o=new h(n,i)):e instanceof h&&t instanceof h&&(r=e,o=t),!r||!o)throw new Error("Invalid arguments");r.isBefore(o)?(this._start=r,this._end=o):(this._start=o,this._end=r)}return e.isRange=function(t){return t instanceof e||!!t&&(h.isPosition(t.start)&&h.isPosition(t.end))},Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),e.prototype.contains=function(t){return t instanceof e?this.contains(t._start)&&this.contains(t._end):t instanceof h&&(!t.isBefore(this._start)&&!this._end.isBefore(t))},
e.prototype.isEqual=function(e){return this._start.isEqual(e._start)&&this._end.isEqual(e._end)},e.prototype.intersection=function(t){var n=h.Max(t.start,this._start),i=h.Min(t.end,this._end);if(!n.isAfter(i))return new e(n,i)},e.prototype.union=function(t){if(this.contains(t))return this;if(t.contains(this))return t;return new e(h.Min(t.start,this._start),h.Max(t.end,this.end))},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this._start.isEqual(this._end)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSingleLine",{get:function(){return this._start.line===this._end.line},enumerable:!0,configurable:!0}),e.prototype.with=function(t,n){if(void 0===n&&(n=this.end),null===t||null===n)throw o.illegalArgument();var i;return t?h.isPosition(t)?i=t:(i=t.start||this.start,n=t.end||this.end):i=this.start,i.isEqual(this._start)&&n.isEqual(this.end)?this:new e(i,n)},e.prototype.toJSON=function(){return[this.start,this.end]},e}();t.Range=p;var f=function(e){function t(t,n,i,r){
var o,s,a=this;if("number"==typeof t&&"number"==typeof n&&"number"==typeof i&&"number"==typeof r?(o=new h(t,n),s=new h(i,r)):t instanceof h&&n instanceof h&&(o=t,s=n),!o||!s)throw new Error("Invalid arguments");return a=e.call(this,o,s)||this,a._anchor=o,a._active=s,a}return n(t,e),t.isSelection=function(e){return e instanceof t||!!e&&(p.isRange(e)&&h.isPosition(e.anchor)&&h.isPosition(e.active)&&"boolean"==typeof e.isReversed)},Object.defineProperty(t.prototype,"anchor",{get:function(){return this._anchor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isReversed",{get:function(){return this._anchor===this._end},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}},t}(p);t.Selection=f;!function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.EndOfLine||(t.EndOfLine={}));var g=function(){function e(e,t){
this.range=e,this.newText=t}return e.isTextEdit=function(t){return t instanceof e||!!t&&(p.isRange(t)&&"string"==typeof t.newText)},e.replace=function(t,n){return new e(t,n)},e.insert=function(t,n){return e.replace(new p(t,t),n)},e.delete=function(t){return e.replace(t,"")},e.setEndOfLine=function(t){var n=new e(void 0,void 0);return n.newEol=t,n},Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){if(e&&!p.isRange(e))throw o.illegalArgument("range");this._range=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newText",{get:function(){return this._newText||""},set:function(e){if(e&&"string"!=typeof e)throw o.illegalArgument("newText");this._newText=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newEol",{get:function(){return this._newEol},set:function(e){if(e&&"number"!=typeof e)throw o.illegalArgument("newEol");this._newEol=e},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){return{range:this.range,
newText:this.newText,newEol:this._newEol}},e}();t.TextEdit=g;var v=function(){function e(){this._edits=new Array}return e.prototype.renameFile=function(e,t,n){this._edits.push({_type:1,from:e,to:t,options:n})},e.prototype.createFile=function(e,t){this._edits.push({_type:1,from:void 0,to:e,options:t})},e.prototype.deleteFile=function(e,t){this._edits.push({_type:1,from:e,to:void 0,options:t})},e.prototype.replace=function(e,t,n){this._edits.push({_type:2,uri:e,edit:new g(t,n)})},e.prototype.insert=function(e,t,n){this.replace(e,new p(t,t),n)},e.prototype.delete=function(e,t){this.replace(e,t,"")},e.prototype.has=function(e){for(var t=0,n=this._edits;t<n.length;t++){var i=n[t];if(2===i._type&&i.uri.toString()===e.toString())return!0}return!1},e.prototype.set=function(e,t){if(t)for(var n=0,i=t;n<i.length;n++){var r=i[n];r&&this._edits.push({_type:2,uri:e,edit:r})}else{for(var o=0;o<this._edits.length;o++){var s=this._edits[o];2===s._type&&s.uri.toString()===e.toString()&&(this._edits[o]=void 0)}
this._edits=u.coalesce(this._edits)}},e.prototype.get=function(e){for(var t=[],n=0,i=this._edits;n<i.length;n++){var r=i[n];2===r._type&&r.uri.toString()===e.toString()&&t.push(r.edit)}if(0!==t.length)return t},e.prototype.entries=function(){for(var e=new Map,t=0,n=this._edits;t<n.length;t++){var i=n[t];if(2===i._type){var r=e.get(i.uri.toString());r||(r=[i.uri,[]],e.set(i.uri.toString(),r)),r[1].push(i.edit)}}return l.values(e)},e.prototype._allEntries=function(){for(var e=[],t=0,n=this._edits;t<n.length;t++){var i=n[t];1===i._type?e.push([i.from,i.to,i.options]):e.push([i.uri,[i.edit]])}return e},Object.defineProperty(e.prototype,"size",{get:function(){return this.entries().length},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){return this.entries()},e}();t.WorkspaceEdit=v;var m=function(){function e(e){this._tabstop=1,this.value=e||""}return e.isSnippetString=function(t){return t instanceof e||!!t&&"string"==typeof t.value},e._escape=function(e){return e.replace(/\$|}|\\/g,"\\$&")},
e.prototype.appendText=function(t){return this.value+=e._escape(t),this},e.prototype.appendTabstop=function(e){return void 0===e&&(e=this._tabstop++),this.value+="$",this.value+=e,this},e.prototype.appendPlaceholder=function(t,n){if(void 0===n&&(n=this._tabstop++),"function"==typeof t){var i=new e;i._tabstop=this._tabstop,t(i),this._tabstop=i._tabstop,t=i.value}else t=e._escape(t);return this.value+="${",this.value+=n,this.value+=":",this.value+=t,this.value+="}",this},e.prototype.appendVariable=function(t,n){if("function"==typeof n){var i=new e;i._tabstop=this._tabstop,n(i),this._tabstop=i._tabstop,n=i.value}else"string"==typeof n&&(n=n.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=t,n&&(this.value+=":",this.value+=n),this.value+="}",this},e}();t.SnippetString=m;!function(e){e[e.Unnecessary=1]="Unnecessary"}(t.DiagnosticTag||(t.DiagnosticTag={}));var y;!function(e){e[e.Hint=3]="Hint",e[e.Information=2]="Information",e[e.Warning=1]="Warning",e[e.Error=0]="Error"
}(y=t.DiagnosticSeverity||(t.DiagnosticSeverity={}));var b=function(){function e(e,t){if(this.uri=e,t)if(t instanceof p)this.range=t;else{if(!(t instanceof h))throw new Error("Illegal argument");this.range=new p(t,t)}else;}return e.isLocation=function(t){return t instanceof e||!!t&&(p.isRange(t.range)&&r.default.isUri(t.uri))},e.prototype.toJSON=function(){return{uri:this.uri,range:this.range}},e}();t.Location=b;var S=function(){function e(e,t){this.location=e,this.message=t}return e.is=function(e){return!!e&&("string"==typeof e.message&&e.location&&p.isRange(e.location.range)&&r.default.isUri(e.location.uri))},e}();t.DiagnosticRelatedInformation=S;var _=function(){function e(e,t,n){void 0===n&&(n=y.Error),this.range=e,this.message=t,this.severity=n}return e.prototype.toJSON=function(){return{severity:y[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}},e}();t.Diagnostic=_;var C=function(){return function(e,t){
if(!e)throw new Error("Illegal argument, contents must be defined");Array.isArray(e)?this.contents=e:(s.isMarkdownString(e),this.contents=[e]),this.range=t}}();t.Hover=C;var E;!function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(E=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var w=function(){function e(e,t){void 0===t&&(t=E.Text),this.range=e,this.kind=t}return e.prototype.toJSON=function(){return{range:this.range,kind:E[this.kind]}},e}();t.DocumentHighlight=w;var I;!function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",
e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(I=t.SymbolKind||(t.SymbolKind={}));var T=function(){function e(e,t,n,i,r){this.name=e,this.kind=t,this.containerName=r,"string"==typeof n&&(this.containerName=n),i instanceof b?this.location=i:n instanceof p&&(this.location=new b(i,n))}return e.prototype.toJSON=function(){return{name:this.name,kind:I[this.kind],location:this.location,containerName:this.containerName}},e}();t.SymbolInformation=T;var x=function(){return function(e,t,n,i,r){if(this.name=e,this.detail=t,this.kind=n,this.range=i,this.selectionRange=r,this.children=[],!this.range.contains(this.selectionRange))throw new Error("selectionRange must be contained in fullRange")}}();t.DocumentSymbol=x;!function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(t.CodeActionTrigger||(t.CodeActionTrigger={}));var k=function(){return function(e,t){this.title=e,this.kind=t}}();t.CodeAction=k
;var D=function(){function e(e){this.value=e}return e.prototype.append=function(t){return new e(this.value?this.value+e.sep+t:t)},e.prototype.contains=function(t){return this.value===t.value||c.startsWith(t.value,this.value+e.sep)},e.sep=".",e.Empty=new e(""),e.QuickFix=e.Empty.append("quickfix"),e.Refactor=e.Empty.append("refactor"),e.RefactorExtract=e.Refactor.append("extract"),e.RefactorInline=e.Refactor.append("inline"),e.RefactorRewrite=e.Refactor.append("rewrite"),e.Source=e.Empty.append("source"),e.SourceOrganizeImports=e.Source.append("organizeImports"),e}();t.CodeActionKind=D;var A=function(){function e(e,t){this.range=e,this.command=t}return Object.defineProperty(e.prototype,"isResolved",{get:function(){return!!this.command},enumerable:!0,configurable:!0}),e}();t.CodeLens=A;var L=function(){function e(e){this.value=e||""}return e.prototype.appendText=function(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this},e.prototype.appendMarkdown=function(e){return this.value+=e,this},
e.prototype.appendCodeblock=function(e,t){return void 0===t&&(t=""),this.value+="\n```",this.value+=t,this.value+="\n",this.value+=e,this.value+="\n```\n",this},e}();t.MarkdownString=L;var R=function(){return function(e,t){this.label=e,this.documentation=t}}();t.ParameterInformation=R;var O=function(){return function(e,t){this.label=e,this.documentation=t,this.parameters=[]}}();t.SignatureInformation=O;var M=function(){return function(){this.signatures=[]}}();t.SignatureHelp=M;!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(t.CompletionTriggerKind||(t.CompletionTriggerKind={}));var P;!function(e){e[e.Text=0]="Text",e[e.Method=1]="Method",e[e.Function=2]="Function",e[e.Constructor=3]="Constructor",e[e.Field=4]="Field",e[e.Variable=5]="Variable",e[e.Class=6]="Class",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Unit=10]="Unit",e[e.Value=11]="Value",e[e.Enum=12]="Enum",
e[e.Keyword=13]="Keyword",e[e.Snippet=14]="Snippet",e[e.Color=15]="Color",e[e.File=16]="File",e[e.Reference=17]="Reference",e[e.Folder=18]="Folder",e[e.EnumMember=19]="EnumMember",e[e.Constant=20]="Constant",e[e.Struct=21]="Struct",e[e.Event=22]="Event",e[e.Operator=23]="Operator",e[e.TypeParameter=24]="TypeParameter"}(P=t.CompletionItemKind||(t.CompletionItemKind={}));var N=function(){function e(e,t){this.label=e,this.kind=t}return e.prototype.toJSON=function(){return{label:this.label,kind:P[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}},e}();t.CompletionItem=N;var F=function(){return function(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1),this.items=e,this.isIncomplete=t}}();t.CompletionList=F;!function(e){e[e.Active=-1]="Active",e[e.Beside=-2]="Beside",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Three=3]="Three",e[e.Four=4]="Four",e[e.Five=5]="Five",e[e.Six=6]="Six",
e[e.Seven=7]="Seven",e[e.Eight=8]="Eight",e[e.Nine=9]="Nine"}(t.ViewColumn||(t.ViewColumn={}));!function(e){e[e.Left=1]="Left",e[e.Right=2]="Right"}(t.StatusBarAlignment||(t.StatusBarAlignment={}));!function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative"}(t.TextEditorLineNumbersStyle||(t.TextEditorLineNumbersStyle={}));!function(e){e[e.Manual=1]="Manual",e[e.AfterDelay=2]="AfterDelay",e[e.FocusOut=3]="FocusOut"}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={}));!function(e){e[e.Default=0]="Default",e[e.InCenter=1]="InCenter",e[e.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",e[e.AtTop=3]="AtTop"}(t.TextEditorRevealType||(t.TextEditorRevealType={}));!function(e){e[e.Keyboard=1]="Keyboard",e[e.Mouse=2]="Mouse",e[e.Command=3]="Command"}(t.TextEditorSelectionChangeKind||(t.TextEditorSelectionChangeKind={}));!function(e){e[e.OpenOpen=0]="OpenOpen",e[e.ClosedClosed=1]="ClosedClosed",e[e.OpenClosed=2]="OpenClosed",e[e.ClosedOpen=3]="ClosedOpen"
}(t.DecorationRangeBehavior||(t.DecorationRangeBehavior={})),function(e){e.fromValue=function(t){switch(t){case"keyboard":return e.Keyboard;case"mouse":return e.Mouse;case"api":return e.Command}}}(t.TextEditorSelectionChangeKind||(t.TextEditorSelectionChangeKind={}));var W=function(){return function(e,t){if(t&&!(t instanceof r.default))throw o.illegalArgument("target");if(!p.isRange(e)||e.isEmpty)throw o.illegalArgument("range");this.range=e,this.target=t}}();t.DocumentLink=W;var B=function(){return function(e,t,n,i){this.red=e,this.green=t,this.blue=n,this.alpha=i}}();t.Color=B;var V=function(){return function(e,t){if(t&&!(t instanceof B))throw o.illegalArgument("color");if(!p.isRange(e)||e.isEmpty)throw o.illegalArgument("range");this.range=e,this.color=t}}();t.ColorInformation=V;var z=function(){return function(e){if(!e||"string"!=typeof e)throw o.illegalArgument("label");this.label=e}}();t.ColorPresentation=z;!function(e){e[e.RGB=0]="RGB",e[e.HEX=1]="HEX",e[e.HSL=2]="HSL"
}(t.ColorFormat||(t.ColorFormat={}));!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information"}(t.SourceControlInputBoxValidationType||(t.SourceControlInputBoxValidationType={}));!function(e){e[e.Always=1]="Always",e[e.Silent=2]="Silent",e[e.Never=3]="Never"}(t.TaskRevealKind||(t.TaskRevealKind={}));!function(e){e[e.Shared=1]="Shared",e[e.Dedicated=2]="Dedicated",e[e.New=3]="New"}(t.TaskPanelKind||(t.TaskPanelKind={}));var H=function(){function e(e,t){if("string"!=typeof e)throw o.illegalArgument("name");if("string"!=typeof t)throw o.illegalArgument("name");this._id=e}return e.from=function(t){switch(t){case"clean":return e.Clean;case"build":return e.Build;case"rebuild":return e.Rebuild;case"test":return e.Test;default:return}},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),e.Clean=new e("clean","Clean"),e.Build=new e("build","Build"),e.Rebuild=new e("rebuild","Rebuild"),e.Test=new e("test","Test"),e}();t.TaskGroup=H
;var K=function(){function e(e,t,n){if("string"!=typeof e)throw o.illegalArgument("process");this._process=e,void 0!==t&&(Array.isArray(t)?(this._args=t,this._options=n):this._options=t),void 0===this._args&&(this._args=[])}return Object.defineProperty(e.prototype,"process",{get:function(){return this._process},set:function(e){if("string"!=typeof e)throw o.illegalArgument("process");this._process=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"args",{get:function(){return this._args},set:function(e){Array.isArray(e)||(e=[]),this._args=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e},enumerable:!0,configurable:!0}),e.prototype.computeId=function(){var e=i.createHash("md5");if(e.update("process"),void 0!==this._process&&e.update(this._process),this._args&&this._args.length>0)for(var t=0,n=this._args;t<n.length;t++){var r=n[t];e.update(r)}return e.digest("hex")},e}();t.ProcessExecution=K
;var U=function(){function e(e,t,n){if(Array.isArray(t)){if(!e)throw o.illegalArgument("command can't be undefined or null");if("string"!=typeof e&&"string"!=typeof e.value)throw o.illegalArgument("command");this._command=e,this._args=t,this._options=n}else{if("string"!=typeof e)throw o.illegalArgument("commandLine");this._commandLine=e,this._options=t}}return Object.defineProperty(e.prototype,"commandLine",{get:function(){return this._commandLine},set:function(e){if("string"!=typeof e)throw o.illegalArgument("commandLine");this._commandLine=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"command",{get:function(){return this._command},set:function(e){if("string"!=typeof e&&"string"!=typeof e.value)throw o.illegalArgument("command");this._command=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"args",{get:function(){return this._args},set:function(e){this._args=e||[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){
return this._options},set:function(e){this._options=e},enumerable:!0,configurable:!0}),e.prototype.computeId=function(){var e=i.createHash("md5");if(e.update("shell"),void 0!==this._commandLine&&e.update(this._commandLine),void 0!==this._command&&e.update("string"==typeof this._command?this._command:this._command.value),this._args&&this._args.length>0)for(var t=0,n=this._args;t<n.length;t++){var r=n[t];e.update("string"==typeof r?r:r.value)}return e.digest("hex")},e}();t.ShellExecution=U;!function(e){e[e.Escape=1]="Escape",e[e.Strong=2]="Strong",e[e.Weak=3]="Weak"}(t.ShellQuoting||(t.ShellQuoting={}));var G;!function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace"}(G=t.TaskScope||(t.TaskScope={}));var j=function(){function e(e,t,n,i,r,o){this.definition=e;var s;"string"==typeof t?(this.name=t,this.source=n,this.execution=i,s=r):(t===G.Global||G.Workspace,this.target=t,this.name=n,this.source=i,this.execution=r,s=o),"string"==typeof s?(this._problemMatchers=[s],
this._hasDefinedMatchers=!0):Array.isArray(s)?(this._problemMatchers=s,this._hasDefinedMatchers=!0):(this._problemMatchers=[],this._hasDefinedMatchers=!1),this._isBackground=!1}return Object.defineProperty(e.prototype,"_id",{get:function(){return this.__id},set:function(e){this.__id=e},enumerable:!0,configurable:!0}),e.prototype.clear=function(){void 0!==this.__id&&(this.__id=void 0,this._scope=void 0,this._definition=void 0,this._execution instanceof K?this._definition={type:"process",id:this._execution.computeId()}:this._execution instanceof U&&(this._definition={type:"shell",id:this._execution.computeId()}))},Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(e){if(void 0===e||null===e)throw o.illegalArgument("Kind can't be undefined or null");this.clear(),this._definition=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this._scope},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"target",{set:function(e){this.clear(),this._scope=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){if("string"!=typeof e)throw o.illegalArgument("name");this.clear(),this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"execution",{get:function(){return this._execution},set:function(e){null===e&&(e=void 0),this.clear(),this._execution=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"problemMatchers",{get:function(){return this._problemMatchers},set:function(e){if(!Array.isArray(e))return this._problemMatchers=[],void(this._hasDefinedMatchers=!1);this.clear(),this._problemMatchers=e,this._hasDefinedMatchers=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasDefinedMatchers",{get:function(){return this._hasDefinedMatchers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBackground",{get:function(){
return this._isBackground},set:function(e){!0!==e&&!1!==e&&(e=!1),this.clear(),this._isBackground=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},set:function(e){if("string"!=typeof e||0===e.length)throw o.illegalArgument("source must be a string of length > 0");this.clear(),this._source=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this._group},set:function(e){void 0!==e&&null!==e?(this.clear(),this._group=e):this._group=void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentationOptions",{get:function(){return this._presentationOptions},set:function(e){null===e&&(e=void 0),this.clear(),this._presentationOptions=e},enumerable:!0,configurable:!0}),e}();t.Task=j;!function(e){e[e.SourceControl=1]="SourceControl",e[e.Window=10]="Window",e[e.Notification=15]="Notification"}(t.ProgressLocation||(t.ProgressLocation={}));var q=function(){return function(e,t){
void 0===t&&(t=$.None),this.collapsibleState=t,e instanceof r.default?this.resourceUri=e:this.label=e}}();t.TreeItem=q;var $;!function(e){e[e.None=0]="None",e[e.Collapsed=1]="Collapsed",e[e.Expanded=2]="Expanded"}($=t.TreeItemCollapsibleState||(t.TreeItemCollapsibleState={}));var Y=function(){function e(e){this.id=e}return e.File=new e("file"),e.Folder=new e("folder"),e}();t.ThemeIcon=Y;var X=function(){return function(e){this.id=e}}();t.ThemeColor=X;!function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.WorkspaceFolder=3]="WorkspaceFolder"}(t.ConfigurationTarget||(t.ConfigurationTarget={}));var Q=function(){function e(e,t){if(!("string"==typeof e||e&&r.default.isUri(e.uri)))throw o.illegalArgument("base");if("string"!=typeof t)throw o.illegalArgument("pattern");this.base="string"==typeof e?e:e.uri.fsPath,this.pattern=t}return e.prototype.pathToRelative=function(e,t){return a.relative(e,t)},e}();t.RelativePattern=Q;var Z=function(){return function(e,t,n,i){this.enabled="boolean"!=typeof e||e,
"string"==typeof t&&(this.condition=t),"string"==typeof n&&(this.hitCondition=n),"string"==typeof i&&(this.logMessage=i)}}();t.Breakpoint=Z;var J=function(e){function t(t,n,i,r,s){var a=e.call(this,n,i,r,s)||this;if(null===t)throw o.illegalArgument("location");return a.location=t,a}return n(t,e),t}(Z);t.SourceBreakpoint=J;var ee=function(e){function t(t,n,i,r,s){var a=e.call(this,n,i,r,s)||this;if(!t)throw o.illegalArgument("functionName");return a.functionName=t,a}return n(t,e),t}(Z);t.FunctionBreakpoint=ee;var te=function(){return function(e,t){this.command=e,this.args=t}}();t.DebugAdapterExecutable=te;!function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error",e[e.Critical=6]="Critical",e[e.Off=7]="Off"}(t.LogLevel||(t.LogLevel={}));!function(e){e[e.Changed=1]="Changed",e[e.Created=2]="Created",e[e.Deleted=3]="Deleted"}(t.FileChangeType||(t.FileChangeType={}));var ne=function(e){function t(n,i,o){
var s=e.call(this,r.default.isUri(n)?n.toString(!0):n)||this;return s.name=i?i+" (FileSystemError)":"FileSystemError","function"==typeof Object.setPrototypeOf&&Object.setPrototypeOf(s,t.prototype),"function"==typeof Error.captureStackTrace&&"function"==typeof o&&Error.captureStackTrace(s,o),s}return n(t,e),t.FileExists=function(e){return new t(e,"EntryExists",t.FileExists)},t.FileNotFound=function(e){return new t(e,"EntryNotFound",t.FileNotFound)},t.FileNotADirectory=function(e){return new t(e,"EntryNotADirectory",t.FileNotADirectory)},t.FileIsADirectory=function(e){return new t(e,"EntryIsADirectory",t.FileIsADirectory)},t.NoPermissions=function(e){return new t(e,"NoPermissions",t.NoPermissions)},t.Unavailable=function(e){return new t(e,"Unavailable",t.Unavailable)},t}(Error);t.FileSystemError=ne;var ie=function(){return function(e,t,n){this.start=e,this.end=t,this.kind=n}}();t.FoldingRange=ie;!function(e){e[e.Comment=1]="Comment",e[e.Imports=2]="Imports",e[e.Region=3]="Region"
}(t.FoldingRangeKind||(t.FoldingRangeKind={}));!function(e){e[e.Collapsed=0]="Collapsed",e[e.Expanded=1]="Expanded"}(t.CommentThreadCollapsibleState||(t.CommentThreadCollapsibleState={}))}),define(e[146],t([1,0,4,16,30,41]),function(e,t,n,i,r,o){"use strict";function s(e){if(!e.length)return e;for(var t=-1,n=0,i=0;i<e.length;i++){var s=e[i];r.isUndefinedOrNull(s.order)?(s.order=++t,n++):s.order+=n,t=s.order}e=e.sort(function(e,t){var n=e.order,i=t.order;return n<i?-1:n>i?1:0});for(var a=-1,c=0;c<e.length;c++)if(e[c].id!==o.Separator.ID){a=c;break}if(-1===a)return[];for(var l=(e=e.slice(a)).length-1;l>=0;l--){if(!(h=e[l].id===o.Separator.ID))break;e.splice(l,1)}for(var u=!1,d=e.length-1;d>=0;d--){var h=e[d].id===o.Separator.ID;h&&!u?e.splice(d,1):h?h&&(u=!1):u=!0}return e}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){}return e.prototype.hasActions=function(e){return!1},e.prototype.getActions=function(e){return[]},e.prototype.hasSecondaryActions=function(e){return!1},
e.prototype.getSecondaryActions=function(e){return[]},e.prototype.getActionItem=function(e,t){return null},e}();t.ActionBarContributor=a,t.Scope={VIEWER:"viewer"};var c=function(){function e(){this.registry=i.Registry.as(t.Extensions.Actionbar)}return e.prototype.toContext=function(e,t){return{viewer:e,element:t}},e.prototype.hasActions=function(e,n){for(var i=this.toContext(e,n),r=this.registry.getActionBarContributors(t.Scope.VIEWER),o=0;o<r.length;o++){if(r[o].hasActions(i))return!0}return!1},e.prototype.getActions=function(e,i){for(var r=[],o=this.toContext(e,i),a=this.registry.getActionBarContributors(t.Scope.VIEWER),c=0;c<a.length;c++){var l=a[c];l.hasActions(o)&&r.push.apply(r,l.getActions(o))}return n.TPromise.as(s(r))},e.prototype.hasSecondaryActions=function(e,n){for(var i=this.toContext(e,n),r=this.registry.getActionBarContributors(t.Scope.VIEWER),o=0;o<r.length;o++){if(r[o].hasSecondaryActions(i))return!0}return!1},e.prototype.getSecondaryActions=function(e,i){
for(var r=[],o=this.toContext(e,i),a=this.registry.getActionBarContributors(t.Scope.VIEWER),c=0;c<a.length;c++){var l=a[c];l.hasSecondaryActions(o)&&r.push.apply(r,l.getSecondaryActions(o))}return n.TPromise.as(s(r))},e.prototype.getActionItem=function(e,n,i){for(var r=this.registry.getActionBarContributors(t.Scope.VIEWER),o=this.toContext(e,n),s=r.length-1;s>=0;s--){var a=r[s].getActionItem(o,i);if(a)return a}return null},e}();t.ContributableActionProvider=c,t.prepareActions=s,t.Extensions={Actionbar:"workbench.contributions.actionbar"};var l=function(){function e(){this.actionBarContributorConstructors=[],this.actionBarContributorInstances=Object.create(null)}return e.prototype.setInstantiationService=function(e){for(this.instantiationService=e;this.actionBarContributorConstructors.length>0;){var t=this.actionBarContributorConstructors.shift();this.createActionBarContributor(t.scope,t.ctor)}},e.prototype.createActionBarContributor=function(e,t){
var n=this.instantiationService.createInstance(t),i=this.actionBarContributorInstances[e];i||(i=this.actionBarContributorInstances[e]=[]),i.push(n)},e.prototype.getContributors=function(e){return this.actionBarContributorInstances[e]||[]},e.prototype.getActionBarActionsForContext=function(e,t){var n=[];return this.getContributors(e).forEach(function(e){e.hasActions(t)&&n.push.apply(n,e.getActions(t))}),n},e.prototype.getSecondaryActionBarActionsForContext=function(e,t){var n=[];return this.getContributors(e).forEach(function(e){e.hasSecondaryActions(t)&&n.push.apply(n,e.getSecondaryActions(t))}),n},e.prototype.getActionItemForContext=function(e,t,n){for(var i=this.getContributors(e),r=0;r<i.length;r++){var o=i[r].getActionItem(t,n);if(o)return o}return null},e.prototype.registerActionBarContributor=function(e,t){this.instantiationService?this.createActionBarContributor(e,t):this.actionBarContributorConstructors.push({scope:e,ctor:t})},e.prototype.getActionBarContributors=function(e){
return this.getContributors(e).slice(0)},e}();i.Registry.add(t.Extensions.Actionbar,new l)}),define(e[1053],t([1,0,1538,31,11]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarRecentMenu,{group:"1_editor",command:{id:"workbench.action.reopenClosedEditor",title:n.localize(45,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarRecentMenu,{group:"y_more",command:{id:"workbench.action.openRecent",title:n.localize(46,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarRecentMenu,{group:"z_clear",command:{id:"workbench.action.clearRecentFiles",title:n.localize(47,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"1_new",command:{id:"workbench.action.files.newUntitledFile",title:n.localize(0,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"1_new",command:{id:"workbench.action.newWindow",title:n.localize(1,null)},order:2}),
i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"2_open",command:{id:"workbench.action.files.openFile",title:n.localize(2,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"2_open",command:{id:"workbench.action.files.openFolder",title:n.localize(3,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"2_open",command:{id:"workbench.action.openWorkspace",title:n.localize(4,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{title:n.localize(5,null),submenu:i.MenuId.MenubarRecentMenu,group:"2_open",order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:"workbench.action.addRootFolder",title:n.localize(6,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:"workbench.action.saveWorkspaceAs",title:n.localize(7,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"4_save",command:{
id:"workbench.action.files.save",title:n.localize(8,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"4_save",command:{id:"workbench.action.files.saveAs",title:n.localize(9,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"4_save",command:{id:"workbench.action.files.saveAll",title:n.localize(10,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"5_autosave",command:{id:"workbench.action.toggleAutoSave",title:n.localize(11,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{title:n.localize(12,null),submenu:i.MenuId.MenubarPreferencesMenu,group:"5_autosave",order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"6_close",command:{id:"",title:n.localize(13,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"6_close",command:{id:"workbench.action.closeActiveEditor",title:n.localize(14,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{
group:"6_close",command:{id:"workbench.action.closeFolder",title:n.localize(15,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"6_close",command:{id:"workbench.action.closeWindow",title:n.localize(16,null)},order:4}),r.isMacintosh||i.MenuRegistry.appendMenuItem(i.MenuId.MenubarFileMenu,{group:"z_Exit",command:{id:"workbench.action.quit",title:n.localize(17,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"1_do",command:{id:"undo",title:n.localize(18,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"1_do",command:{id:"redo",title:n.localize(19,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"2_ccp",command:{id:"editor.action.clipboardCutAction",title:n.localize(20,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"2_ccp",command:{id:"editor.action.clipboardCopyAction",title:n.localize(21,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{
group:"2_ccp",command:{id:"editor.action.clipboardPasteAction",title:n.localize(22,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"3_find",command:{id:"actions.find",title:n.localize(23,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"3_find",command:{id:"editor.action.startFindReplaceAction",title:n.localize(24,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"4_find_global",command:{id:"workbench.action.findInFiles",title:n.localize(25,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"4_find_global",command:{id:"workbench.action.replaceInFiles",title:n.localize(26,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"5_insert",command:{id:"editor.action.commentLine",title:n.localize(27,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"5_insert",command:{id:"editor.action.blockComment",title:n.localize(28,null)},order:2}),
i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"5_insert",command:{id:"editor.emmet.action.expandAbbreviation",title:n.localize(29,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarEditMenu,{group:"5_insert",command:{id:"workbench.action.showEmmetCommands",title:n.localize(30,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"1_basic",command:{id:"editor.action.selectAll",title:n.localize(31,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"1_basic",command:{id:"editor.action.smartSelect.grow",title:n.localize(32,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"1_basic",command:{id:"editor.action.smartSelect.shrink",title:n.localize(33,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"2_line",command:{id:"editor.action.copyLinesUpAction",title:n.localize(34,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{
group:"2_line",command:{id:"editor.action.copyLinesDownAction",title:n.localize(35,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"2_line",command:{id:"editor.action.moveLinesUpAction",title:n.localize(36,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"2_line",command:{id:"editor.action.moveLinesDownAction",title:n.localize(37,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{id:"workbench.action.toggleMultiCursorModifier",title:n.localize(38,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{id:"editor.action.insertCursorAbove",title:n.localize(39,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{id:"editor.action.insertCursorBelow",title:n.localize(40,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{
id:"editor.action.insertCursorAtEndOfEachLineSelected",title:n.localize(41,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{id:"editor.action.addSelectionToNextFindMatch",title:n.localize(42,null)},order:5}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{id:"editor.action.addSelectionToPreviousFindMatch",title:n.localize(43,null)},order:6}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarSelectionMenu,{group:"3_multi",command:{id:"editor.action.selectHighlights",title:n.localize(44,null)},order:7}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"1_open",command:{id:"workbench.action.showCommands",title:n.localize(48,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"1_open",command:{id:"workbench.action.openView",title:n.localize(49,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"2_views",command:{id:"workbench.view.explorer",
title:n.localize(50,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"2_views",command:{id:"workbench.view.search",title:n.localize(51,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"2_views",command:{id:"workbench.view.scm",title:n.localize(52,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"2_views",command:{id:"workbench.view.debug",title:n.localize(53,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"2_views",command:{id:"workbench.view.extensions",title:n.localize(54,null)},order:5}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"3_panels",command:{id:"workbench.action.output.toggleOutput",title:n.localize(55,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"3_panels",command:{id:"workbench.debug.action.toggleRepl",title:n.localize(56,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"3_panels",command:{
id:"workbench.action.terminal.toggleTerminal",title:n.localize(57,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"3_panels",command:{id:"workbench.actions.view.problems",title:n.localize(58,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"4_toggle_view",command:{id:"workbench.action.toggleFullScreen",title:n.localize(59,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"4_toggle_view",command:{id:"workbench.action.toggleZenMode",title:n.localize(60,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"4_toggle_view",command:{id:"workbench.action.toggleCenteredLayout",title:n.localize(61,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"4_toggle_view",command:{id:"workbench.action.toggleMenuBar",title:n.localize(62,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{title:n.localize(63,null),submenu:i.MenuId.MenubarLayoutMenu,group:"5_layout",
order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"6_workbench_layout",command:{id:"workbench.action.toggleSidebarVisibility",title:n.localize(64,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"6_workbench_layout",command:{id:"workbench.action.toggleSidebarPosition",title:n.localize(65,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"6_workbench_layout",command:{id:"workbench.action.toggleStatusbarVisibility",title:n.localize(66,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"6_workbench_layout",command:{id:"workbench.action.toggleActivityBarVisibility",title:n.localize(67,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"6_workbench_layout",command:{id:"workbench.action.togglePanel",title:n.localize(68,null)},order:5}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"8_editor",command:{id:"workbench.action.toggleWordWrap",title:n.localize(69,null)},
order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"8_editor",command:{id:"workbench.action.toggleMinimap",title:n.localize(70,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"8_editor",command:{id:"workbench.action.toggleRenderWhitespace",title:n.localize(71,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"8_editor",command:{id:"workbench.action.toggleRenderControlCharacters",title:n.localize(72,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"9_zoom",command:{id:"workbench.action.zoomIn",title:n.localize(73,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"9_zoom",command:{id:"workbench.action.zoomOut",title:n.localize(74,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarViewMenu,{group:"9_zoom",command:{id:"workbench.action.zoomReset",title:n.localize(75,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"1_split",
command:{id:"workbench.action.splitEditorUp",title:n.localize(76,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:"workbench.action.splitEditorDown",title:n.localize(77,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:"workbench.action.splitEditorLeft",title:n.localize(78,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:"workbench.action.splitEditorRight",title:n.localize(79,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutSingle",title:n.localize(80,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutCentered",title:n.localize(81,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutTwoColumns",
title:n.localize(82,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutThreeColumns",title:n.localize(83,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutTwoRows",title:n.localize(84,null)},order:5}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutThreeRows",title:n.localize(85,null)},order:6}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutTwoByTwoGrid",title:n.localize(86,null)},order:7}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutTwoColumnsRight",title:n.localize(87,null)},order:8}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"2_layouts",command:{id:"workbench.action.editorLayoutTwoColumnsBottom",
title:n.localize(88,null)},order:9}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarLayoutMenu,{group:"z_flip",command:{id:"workbench.action.toggleEditorGroupLayout",title:n.localize(89,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"1_fwd_back",command:{id:"workbench.action.navigateBack",title:n.localize(90,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"1_fwd_back",command:{id:"workbench.action.navigateForward",title:n.localize(91,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"2_switch_editor",command:{id:"workbench.action.nextEditor",title:n.localize(92,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"2_switch_editor",command:{id:"workbench.action.previousEditor",title:n.localize(93,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"2_switch_editor",command:{id:"workbench.action.openNextRecentlyUsedEditorInGroup",title:n.localize(94,null)},order:3}),
i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"2_switch_editor",command:{id:"workbench.action.openPreviousRecentlyUsedEditorInGroup",title:n.localize(95,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"3_switch_group",command:{id:"workbench.action.focusNextGroup",title:n.localize(96,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"3_switch_group",command:{id:"workbench.action.focusPreviousGroup",title:n.localize(97,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"3_switch_group",command:{id:"workbench.action.focusLeftGroup",title:n.localize(98,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"3_switch_group",command:{id:"workbench.action.focusRightGroup",title:n.localize(99,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"3_switch_group",command:{id:"workbench.action.focusAboveGroup",title:n.localize(100,null)},order:5}),
i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"3_switch_group",command:{id:"workbench.action.focusBelowGroup",title:n.localize(101,null)},order:6}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{id:"workbench.action.quickOpen",title:n.localize(102,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{id:"workbench.action.gotoSymbol",title:n.localize(103,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{id:"workbench.action.showAllSymbols",title:n.localize(104,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{id:"editor.action.goToDeclaration",title:n.localize(105,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{id:"editor.action.goToTypeDefinition",title:n.localize(106,null)},order:5}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{
id:"editor.action.goToImplementation",title:n.localize(107,null)},order:6}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"z_go_to",command:{id:"workbench.action.gotoLine",title:n.localize(108,null)},order:7}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:"workbench.action.debug.start",title:n.localize(109,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:"workbench.action.debug.run",title:n.localize(110,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:"workbench.action.debug.stop",title:n.localize(111,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:"workbench.action.debug.restart",title:n.localize(112,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"2_configuration",command:{id:"workbench.action.debug.configure",title:n.localize(113,null)},order:1}),
i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"2_configuration",command:{id:"debug.addConfiguration",title:n.localize(114,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:"workbench.action.debug.stepOver",title:n.localize(115,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:"workbench.action.debug.stepInto",title:n.localize(116,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:"workbench.action.debug.stepOut",title:n.localize(117,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:"workbench.action.debug.continue",title:n.localize(118,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"4_new_breakpoint",command:{id:"editor.debug.action.toggleBreakpoint",title:n.localize(119,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{
group:"4_new_breakpoint",command:{id:"editor.debug.action.conditionalBreakpoint",title:n.localize(120,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"4_new_breakpoint",command:{id:"editor.debug.action.toggleInlineBreakpoint",title:n.localize(121,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"4_new_breakpoint",command:{id:"workbench.debug.viewlet.action.addFunctionBreakpointAction",title:n.localize(122,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"4_new_breakpoint",command:{id:"editor.debug.action.toggleLogPoint",title:n.localize(123,null)},order:5}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"5_breakpoints",command:{id:"workbench.debug.viewlet.action.enableAllBreakpoints",title:n.localize(124,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"5_breakpoints",command:{id:"workbench.debug.viewlet.action.disableAllBreakpoints",title:n.localize(125,null)},order:2
}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarDebugMenu,{group:"5_breakpoints",command:{id:"workbench.debug.viewlet.action.removeAllBreakpoints",title:n.localize(126,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"1_run",command:{id:"workbench.action.tasks.runTask",title:n.localize(127,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"1_run",command:{id:"workbench.action.tasks.build",title:n.localize(128,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"2_manage",command:{id:"workbench.action.tasks.showTasks",title:n.localize(129,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"2_manage",command:{id:"workbench.action.tasks.restartTask",title:n.localize(130,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"2_manage",command:{id:"workbench.action.tasks.terminate",title:n.localize(131,null)},order:3}),
i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"3_configure",command:{id:"workbench.action.tasks.configureTaskRunner",title:n.localize(132,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarTasksMenu,{group:"3_configure",command:{id:"workbench.action.tasks.configureDefaultBuildTask",title:n.localize(133,null)},order:2}),r.isMacintosh,i.MenuRegistry.appendMenuItem(i.MenuId.MenubarPreferencesMenu,{group:"1_settings",command:{id:"workbench.action.openSettings",title:n.localize(134,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarPreferencesMenu,{group:"2_keybindings",command:{id:"workbench.action.openGlobalKeybindings",title:n.localize(135,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarPreferencesMenu,{group:"2_keybindings",command:{id:"workbench.extensions.action.showRecommendedKeymapExtensions",title:n.localize(136,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarPreferencesMenu,{group:"3_snippets",command:{
id:"workbench.action.openSnippets",title:n.localize(137,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:"workbench.action.selectTheme",title:n.localize(138,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:"workbench.action.selectIconTheme",title:n.localize(139,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:"workbench.action.showWelcomePage",title:n.localize(140,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:"workbench.action.showInteractivePlayground",title:n.localize(141,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:"workbench.action.openDocumentationUrl",title:n.localize(142,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:"update.showCurrentReleaseNotes",
title:n.localize(143,null)},order:4}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"2_reference",command:{id:"workbench.action.keybindingsReference",title:n.localize(144,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"2_reference",command:{id:"workbench.action.openIntroductoryVideosUrl",title:n.localize(145,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"2_reference",command:{id:"workbench.action.openTipsAndTricksUrl",title:n.localize(146,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:"workbench.action.openTwitterUrl",title:n.localize(147,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:"workbench.action.openRequestFeatureUrl",title:n.localize(148,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:"workbench.action.openIssueReporter",title:n.localize(149,null)},
order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"4_legal",command:{id:"workbench.action.openLicenseUrl",title:n.localize(150,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"4_legal",command:{id:"workbench.action.openPrivacyStatementUrl",title:n.localize(151,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"5_tools",command:{id:"workbench.action.toggleDevTools",title:n.localize(152,null)},order:1}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"5_tools",command:{id:"workbench.action.openProcessExplorer",title:n.localize(153,null)},order:2}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"5_tools",command:{id:"workbench.action.showAccessibilityOptions",title:n.localize(154,null)},order:3}),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarHelpMenu,{group:"z_about",command:{id:"workbench.action.showAboutDialog",title:n.localize(155,null)},order:1})}),
define(e[1054],t([1,0,8,118,1567,26,5,84,83,323]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n.$,u=r.localize(0,null),d=function(){function e(e){var t=this;this.parent=e,this.disposables=[],this.onKeyDown=function(e){return n.addDisposableListener(t.inputBox.inputElement,n.EventType.KEY_DOWN,function(t){e(new a.StandardKeyboardEvent(t))})},this.onDidChange=function(e){return t.inputBox.onDidChange(e)},this.container=n.append(this.parent,l(".quick-input-box")),this.inputBox=new i.InputBox(this.container,null,{ariaLabel:u}),this.disposables.push(this.inputBox);var r=this.inputBox.inputElement;r.setAttribute("role","combobox"),r.setAttribute("aria-haspopup","false"),r.setAttribute("aria-autocomplete","list")}return Object.defineProperty(e.prototype,"value",{get:function(){return this.inputBox.value},set:function(e){this.inputBox.value=e},enumerable:!0,configurable:!0}),e.prototype.select=function(e){void 0===e&&(e=null),this.inputBox.select(e)},
e.prototype.setPlaceholder=function(e){this.inputBox.setPlaceHolder(e)},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.inputBox.inputElement.getAttribute("placeholder")},set:function(e){this.inputBox.setPlaceHolder(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"password",{get:function(){return"password"===this.inputBox.inputElement.type},set:function(e){this.inputBox.inputElement.type=e?"password":"text"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{set:function(e){this.inputBox.setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype.showDecoration=function(e){e===c.default.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===c.default.Info?i.MessageType.INFO:e===c.default.Warning?i.MessageType.WARNING:i.MessageType.ERROR,content:""})},e.prototype.setFocus=function(){this.inputBox.focus()},e.prototype.layout=function(){this.inputBox.layout()},e.prototype.style=function(e){this.inputBox.style({
inputForeground:e.getColor(o.inputForeground),inputBackground:e.getColor(o.inputBackground),inputBorder:e.getColor(o.inputBorder),inputValidationInfoBackground:e.getColor(o.inputValidationInfoBackground),inputValidationInfoBorder:e.getColor(o.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(o.inputValidationWarningBackground),inputValidationWarningBorder:e.getColor(o.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(o.inputValidationErrorBackground),inputValidationErrorBorder:e.getColor(o.inputValidationErrorBorder)})},e.prototype.dispose=function(){this.disposables=s.dispose(this.disposables)},e}();t.QuickInputBox=d}),define(e[1055],t([1,0,8,5,58,6,436,252,7,24,84,277,194,111,20,11,26,12,323]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=n.$,_=function(){function e(e){this.shouldAlwaysShow=!1,this.hidden=!1,this._onChecked=new u.Emitter,this.onChecked=this._onChecked.event,d.assign(this,e)}
return Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))},enumerable:!0,configurable:!0}),e}(),C=function(){function e(){}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[];var i=n.append(e,S(".quick-input-list-entry")),r=n.append(i,S("label.quick-input-list-label"));t.checkbox=n.append(r,S("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(n.addStandardDisposableListener(t.checkbox,n.EventType.CHANGE,function(e){t.element.checked=t.checkbox.checked}));var o=n.append(r,S(".quick-input-list-rows")),s=n.append(o,S(".quick-input-list-row")),a=n.append(o,S(".quick-input-list-row"));t.label=new p.IconLabel(s,{supportHighlights:!0,supportDescriptionHighlights:!0})
;var c=n.append(a,S(".quick-input-list-label-meta"));return t.detail=new f.HighlightedLabel(c),t},e.prototype.renderElement=function(e,t,n){n.toDisposeElement=i.dispose(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(function(e){return n.checkbox.checked=e}));var r=e.labelHighlights,o=e.descriptionHighlights,s=e.detailHighlights,a=Object.create(null);a.matches=r||[],a.descriptionTitle=e.item.description,a.descriptionMatches=o||[],n.label.setValue(e.item.label,e.item.description,a),n.detail.set(e.item.detail,s)},e.prototype.disposeTemplate=function(e){e.toDisposeElement=i.dispose(e.toDisposeElement),e.toDisposeTemplate=i.dispose(e.toDisposeTemplate)},e.ID="listelement",e}(),E=function(){function e(){}return e.prototype.getHeight=function(e){return e.item.detail?44:22},e.prototype.getTemplateId=function(e){return C.ID},e}(),w=function(){function e(e,t){var i=this;this.parent=e,this.instantiationService=t,this.elements=[],this.elementsToIndexes=new Map,
this.matchOnDescription=!1,this.matchOnDetail=!1,this._onChangedAllVisibleChecked=new u.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new u.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedCheckedElements=new u.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onLeave=new u.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.container=n.append(this.parent,S(".quick-input-list"));var o=new E;this.list=this.instantiationService.createInstance(r.WorkbenchList,this.container,o,[new C],{identityProvider:function(e){return e.label},multipleSelectionSupport:!1}),this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(function(e){switch(new h.StandardKeyboardEvent(e).keyCode){case 10:i.toggleCheckbox();break;case 31:(m.isMacintosh?e.metaKey:e.ctrlKey)&&i.list.setFocus(v.range(i.list.length));break;case 16:
var t=i.list.getFocus();1===t.length&&0===t[0]&&i._onLeave.fire();break;case 18:var n=i.list.getFocus();1===n.length&&n[0]===i.list.length-1&&i._onLeave.fire()}})),this.disposables.push(n.addDisposableListener(this.container,n.EventType.CLICK,function(e){(e.x||e.y)&&i._onLeave.fire()})),this.disposables.push(this.list.onSelectionChange(function(e){e.elements.length&&i.list.setSelection([])}))}return Object.defineProperty(e.prototype,"onDidChangeFocus",{get:function(){return u.mapEvent(this.list.onFocusChange,function(e){return e.elements.map(function(e){return e.item})})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeSelection",{get:function(){return u.mapEvent(this.list.onSelectionChange,function(e){return e.elements.map(function(e){return e.item})})},enumerable:!0,configurable:!0}),e.prototype.getAllVisibleChecked=function(){return this.allVisibleChecked(this.elements,!1)},e.prototype.allVisibleChecked=function(e,t){void 0===t&&(t=!0);for(var n=0,i=e.length;n<i;n++){
var r=e[n];if(!r.hidden){if(!r.checked)return!1;t=!0}}return t},e.prototype.getCheckedCount=function(){for(var e=0,t=this.elements,n=0,i=t.length;n<i;n++)t[n].checked&&e++;return e},e.prototype.setAllVisibleChecked=function(e){try{this._fireCheckedEvents=!1,this.elements.forEach(function(t){t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}},e.prototype.setElements=function(e){var t,n=this;this.elementDisposables=i.dispose(this.elementDisposables),this.elements=e.map(function(e,t){return new _({index:t,item:e,checked:!1})}),(t=this.elementDisposables).push.apply(t,this.elements.map(function(e){return e.onChecked(function(){return n.fireCheckedEvents()})})),this.elementsToIndexes=this.elements.reduce(function(e,t,n){return e.set(t.item,n),e},new Map),this.list.splice(0,this.list.length,this.elements),this.list.setFocus([])},e.prototype.getFocusedElements=function(){return this.list.getFocusedElements().map(function(e){return e.item})},
e.prototype.setFocusedElements=function(e){var t=this;this.list.setFocus(e.filter(function(e){return t.elementsToIndexes.has(e)}).map(function(e){return t.elementsToIndexes.get(e)}))},e.prototype.getSelectedElements=function(){return this.list.getSelectedElements().map(function(e){return e.item})},e.prototype.setSelectedElements=function(e){var t=this;this.list.setSelection(e.filter(function(e){return t.elementsToIndexes.has(e)}).map(function(e){return t.elementsToIndexes.get(e)}))},e.prototype.getCheckedElements=function(){return this.elements.filter(function(e){return e.checked}).map(function(e){return e.item})},e.prototype.setCheckedElements=function(e){try{this._fireCheckedEvents=!1;for(var t=new Set,n=0,i=e;n<i.length;n++){var r=i[n];t.add(r)}for(var o=0,s=this.elements;o<s.length;o++){var a=s[o];a.checked=t.has(a.item)}}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}},Object.defineProperty(e.prototype,"enabled",{set:function(e){this.list.getHTMLElement().style.pointerEvents=e?null:"none"},
enumerable:!0,configurable:!0}),e.prototype.focus=function(e){this.list.length&&("Next"===e&&this.list.getFocus()[0]===this.list.length-1&&(e="First"),"Previous"===e&&0===this.list.getFocus()[0]&&(e="Last"),this.list["focus"+e](),this.list.reveal(this.list.getFocus()[0]))},e.prototype.clearFocus=function(){this.list.setFocus([])},e.prototype.domFocus=function(){this.list.domFocus()},e.prototype.layout=function(){this.list.layout()},e.prototype.filter=function(e){var t=this;(e=e.trim())?this.elements.forEach(function(n){var i=s.matchesFuzzyOcticonAware(e,s.parseOcticons(n.item.label)),r=t.matchOnDescription?s.matchesFuzzyOcticonAware(e,s.parseOcticons(n.item.description||"")):void 0,o=t.matchOnDetail?s.matchesFuzzyOcticonAware(e,s.parseOcticons(n.item.detail||"")):void 0;n.shouldAlwaysShow||i||r||o?(n.labelHighlights=i,n.descriptionHighlights=r,n.detailHighlights=o,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!0)}):this.elements.forEach(function(e){
e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1});var n=this.elements.filter(function(e){return!e.hidden}),i=e.toLowerCase();n.sort(function(t,n){return e?function(e,t,n){var i=e.labelHighlights||[],r=t.labelHighlights||[];return i.length&&!r.length?-1:!i.length&&r.length?1:c.compareAnything(e.item.label,t.item.label,n)}(t,n,i):t.index-n.index}),this.elementsToIndexes=n.reduce(function(e,t,n){return e.set(t.item,n),e},new Map),this.list.splice(0,this.list.length,n),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked())},e.prototype.toggleCheckbox=function(){try{this._fireCheckedEvents=!1;for(var e=this.list.getFocusedElements(),t=this.allVisibleChecked(e),n=0,i=e;n<i.length;n++){i[n].checked=!t}}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}},e.prototype.display=function(e){this.container.style.display=e?"":"none"},e.prototype.isDisplayed=function(){return"none"!==this.container.style.display},
e.prototype.dispose=function(){this.elementDisposables=i.dispose(this.elementDisposables),this.disposables=i.dispose(this.disposables)},e.prototype.fireCheckedEvents=function(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))},a([g.memoize],e.prototype,"onDidChangeFocus",null),a([g.memoize],e.prototype,"onDidChangeSelection",null),e=a([l(1,o.IInstantiationService)],e)}();t.QuickInputList=w,b.registerThemingParticipant(function(e,t){var n=e.getColor(y.listFocusBackground);n&&(t.addRule(".quick-input-list .monaco-list .monaco-list-row.focused { background-color:  "+n+"; }"),t.addRule(".quick-input-list .monaco-list .monaco-list-row.focused:hover { background-color:  "+n+"; }"))})}),define(e[164],t([1,0,4,1571,23,64,179,37,15,29]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.inQuickOpenContext=d.ContextKeyExpr.has("inQuickOpen"),t.defaultQuickOpenContextKey="inFilesPicker",t.defaultQuickOpenContext=d.ContextKeyExpr.and(t.inQuickOpenContext,d.ContextKeyExpr.has(t.defaultQuickOpenContextKey)),t.QUICKOPEN_ACTION_ID="workbench.action.quickOpen",t.QUICKOPEN_ACION_LABEL=r.localize(0,null),h.CommandsRegistry.registerCommand(t.QUICKOPEN_ACTION_ID,function(e,t){void 0===t&&(t=null);return e.get(s.IQuickOpenService).show("string"==typeof t?t:null).then(function(){})}),t.QUICKOPEN_FOCUS_SECONDARY_ACTION_ID="workbench.action.quickOpenPreviousEditor",h.CommandsRegistry.registerCommand(t.QUICKOPEN_FOCUS_SECONDARY_ACTION_ID,function(e,t){void 0===t&&(t=null);return e.get(s.IQuickOpenService).show(null,{autoFocus:{autoFocusSecondEntry:!0}}).then(function(){})});var p=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.next=i,c.quickNavigate=r,c.quickOpenService=o,c.quickInputService=s,c.keybindingService=a,c}return n(t,e),t.prototype.run=function(e){
var t=this.keybindingService.lookupKeybindings(this.id),n=this.quickNavigate?{keybindings:t}:void 0;return this.quickOpenService.navigate(this.next,n),this.quickInputService.navigate(this.next,n),i.TPromise.as(!0)},t=a([l(4,s.IQuickOpenService),l(5,c.IQuickInputService),l(6,u.IKeybindingService)],t)}(o.Action);t.BaseQuickOpenNavigateAction=p,t.getQuickNavigateHandler=function(e,t){return function(n){var i=n.get(u.IKeybindingService),r=n.get(s.IQuickOpenService),o=n.get(c.IQuickInputService),a={keybindings:i.lookupKeybindings(e)};r.navigate(t,a),o.navigate(t,a)}};var f=function(e){function t(t,n,i,r,o){return e.call(this,t,n,!0,!0,i,r,o)||this}return n(t,e),t.ID="workbench.action.quickOpenNavigateNext",t.LABEL=r.localize(1,null),t=a([l(2,s.IQuickOpenService),l(3,c.IQuickInputService),l(4,u.IKeybindingService)],t)}(p);t.QuickOpenNavigateNextAction=f;var g=function(e){function t(t,n,i,r,o){return e.call(this,t,n,!1,!0,i,r,o)||this}return n(t,e),t.ID="workbench.action.quickOpenNavigatePrevious",
t.LABEL=r.localize(2,null),t=a([l(2,s.IQuickOpenService),l(3,c.IQuickInputService),l(4,u.IKeybindingService)],t)}(p);t.QuickOpenNavigatePreviousAction=g;var v=function(e){function t(t,n,i,r,o){return e.call(this,t,n,!0,!1,i,r,o)||this}return n(t,e),t.ID="workbench.action.quickOpenSelectNext",t.LABEL=r.localize(3,null),t=a([l(2,s.IQuickOpenService),l(3,c.IQuickInputService),l(4,u.IKeybindingService)],t)}(p);t.QuickOpenSelectNextAction=v;var m=function(e){function t(t,n,i,r,o){return e.call(this,t,n,!1,!1,i,r,o)||this}return n(t,e),t.ID="workbench.action.quickOpenSelectPrevious",t.LABEL=r.localize(4,null),t=a([l(2,s.IQuickOpenService),l(3,c.IQuickInputService),l(4,u.IKeybindingService)],t)}(p);t.QuickOpenSelectPreviousAction=m}),define(e[172],t([1,0,16,189,112]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusbarAlignment=i.StatusbarAlignment;var o=function(){return function(e,n,i){this.syncDescriptor=r.createSyncDescriptor(e),
this.alignment=n||t.StatusbarAlignment.LEFT,this.priority=i||0}}();t.StatusbarItemDescriptor=o;var s=function(){function e(){this._items=[]}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),e.prototype.registerStatusbarItem=function(e){this._items.push(e)},e}();t.Extensions={Statusbar:"workbench.contributions.statusbar"},n.Registry.add(t.Extensions.Statusbar,new s)}),define(e[56],t([1,0,4,16,52,29,31,6,5,38,22]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={WorkbenchActions:"workbench.contributions.actions"},i.Registry.add(t.Extensions.WorkbenchActions,new(function(){function e(){}return e.prototype.registerWorkbenchAction=function(e,t,n){return this._registerWorkbenchCommandFromAction(e,t,n)},e.prototype._registerWorkbenchCommandFromAction=function(e,t,n){var i=[];i.push(o.CommandsRegistry.registerCommand(e.id,this._createCommandHandler(e)))
;var a=e.keybindingContext,l=void 0===e.keybindingWeight?r.KeybindingsRegistry.WEIGHT.workbenchContrib():e.keybindingWeight,u=e.keybindings;if(r.KeybindingsRegistry.registerKeybindingRule({id:e.id,weight:l,when:a,primary:u&&u.primary,secondary:u&&u.secondary,win:u&&u.win,mac:u&&u.mac,linux:u&&u.linux}),e.label){var d=t.indexOf(": "),h=void 0;d>0&&(h=t.substr(0,d),t=t.substr(d+2));var p={id:e.id,title:{value:e.label,original:t},category:n&&{value:n,original:h}};s.MenuRegistry.addCommand(p),i.push(s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:p}))}return c.combinedDisposable(i)},e.prototype._createCommandHandler=function(e){var t=this;return function(i,r){var o=i.get(u.INotificationService),s=i.get(a.IInstantiationService),c=i.get(l.ILifecycleService);n.TPromise.as(t._triggerAndDisposeAction(s,c,e,r)).then(null,function(e){o.error(e)})}},e.prototype._triggerAndDisposeAction=function(e,t,i,r){return t.when(l.LifecyclePhase.Running).then(function(){var t=e.createInstance(i.syncDescriptor);try{
if(t.label=i.label||t.label,!t.enabled)return void t.dispose();var o=r&&r.from||"keybinding";return n.TPromise.as(t.run(void 0,{from:o})).then(function(){t.dispose()},function(e){return t.dispose(),n.TPromise.wrapError(e)})}catch(e){return t.dispose(),n.TPromise.wrapError(e)}})},e}()))}),define(e[1059],t([1,0,1469,16,23,31,56,17]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.configurationService=i,r}return n(t,e),t.prototype.run=function(){var e=!this.configurationService.getValue(t.tabsVisibleKey);return this.configurationService.updateValue(t.tabsVisibleKey,e)},t.ID="workbench.action.toggleTabsVisibility",t.LABEL=i.localize(0,null),t.tabsVisibleKey="workbench.editor.showTabs",t=a([l(2,u.IConfigurationService)],t)}(o.Action);t.ToggleTabsVisibilityAction=d;r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(d,d.ID,d.LABEL,{primary:2357
}),"View: Toggle Tab Visibility",i.localize(1,null))}),define(e[459],t([1,0,16]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalActivityExtensions="workbench.contributions.globalActivities";var i=function(){function e(){this.activityDescriptors=new Set}return e.prototype.registerActivity=function(e){this.activityDescriptors.add(e)},e.prototype.getActivities=function(){var e=[];return this.activityDescriptors.forEach(function(t){return e.push(t)}),e},e}();t.GlobalActivityRegistry=i,n.Registry.add(t.GlobalActivityExtensions,new i)}),define(e[75],t([1,0,16,38]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e.Workbench="workbench.contributions.kind"}(r=t.Extensions||(t.Extensions={}));var o=function(){function e(){this.toBeInstantiated=new Map}return e.prototype.registerWorkbenchContribution=function(e,t){if(void 0===t&&(t=i.LifecyclePhase.Starting),
this.instantiationService&&this.lifecycleService&&this.lifecycleService.phase>=t)this.instantiationService.createInstance(e);else{var n=this.toBeInstantiated.get(t);n||(n=[],this.toBeInstantiated.set(t,n)),n.push(e)}},e.prototype.start=function(e,t){var n=this;this.instantiationService=e,this.lifecycleService=t,[i.LifecyclePhase.Starting,i.LifecyclePhase.Restoring,i.LifecyclePhase.Running,i.LifecyclePhase.Eventually].forEach(function(i){n.instantiateByPhase(e,t,i)})},e.prototype.instantiateByPhase=function(e,t,n){var i=this;t.phase>=n?this.doInstantiateByPhase(e,n):t.when(n).then(function(){i.doInstantiateByPhase(e,n)})},e.prototype.doInstantiateByPhase=function(e,t){var n=this.toBeInstantiated.get(t);if(n)for(;n.length>0;)e.createInstance(n.shift())},e}();t.WorkbenchContributionsRegistry=o,n.Registry.add(r.Workbench,new o)}),define(e[40],t([1,0,4,7,24,30,5,15,16,43,23]),function(e,t,i,r,o,s,a,c,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.EditorsVisibleContext=new c.RawContextKey("editorIsOpen",!1),t.EditorGroupActiveEditorDirtyContext=new c.RawContextKey("groupActiveEditorDirty",!1),t.NoEditorsVisibleContext=t.EditorsVisibleContext.toNegated(),t.TextCompareEditorVisibleContext=new c.RawContextKey("textCompareEditorVisible",!1),t.ActiveEditorGroupEmptyContext=new c.RawContextKey("activeEditorGroupEmpty",!1),t.MultipleEditorGroupsContext=new c.RawContextKey("multipleEditorGroups",!1),t.SingleEditorGroupsContext=t.MultipleEditorGroupsContext.toNegated(),t.InEditorZenModeContext=new c.RawContextKey("inZenMode",!1),t.SplitEditorsVertically=new c.RawContextKey("splitEditorsVertically",!1),t.TEXT_DIFF_EDITOR_ID="workbench.editors.textDiffEditor",t.BINARY_DIFF_EDITOR_ID="workbench.editors.binaryResourceDiffEditor";!function(e){e[e.SHORT=0]="SHORT",e[e.MEDIUM=1]="MEDIUM",e[e.LONG=2]="LONG"}(t.Verbosity||(t.Verbosity={}));var h=function(){function e(){this._onDidChangeDirty=new r.Emitter,this._onDidChangeLabel=new r.Emitter,
this._onDispose=new r.Emitter,this.disposed=!1}return Object.defineProperty(e.prototype,"onDidChangeDirty",{get:function(){return this._onDidChangeDirty.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeLabel",{get:function(){return this._onDidChangeLabel.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!0,configurable:!0}),e.prototype.getResource=function(){return null},e.prototype.getName=function(){return null},e.prototype.getDescription=function(e){return null},e.prototype.getTitle=function(e){return this.getName()},e.prototype.getPreferredEditorId=function(e){return e&&e.length>0?e[0]:null},e.prototype.getTelemetryDescriptor=function(){return{typeId:this.getTypeId()}},e.prototype.isDirty=function(){return!1},e.prototype.confirmSave=function(){return i.TPromise.wrap(p.DONT_SAVE)},e.prototype.save=function(){return i.TPromise.as(!0)},e.prototype.revert=function(e){
return i.TPromise.as(!0)},e.prototype.close=function(){this.dispose()},e.prototype.supportsSplitEditor=function(){return!0},e.prototype.matches=function(e){return this===e},e.prototype.dispose=function(){this.disposed=!0,this._onDispose.fire(),this._onDidChangeDirty.dispose(),this._onDidChangeLabel.dispose(),this._onDispose.dispose()},e.prototype.isDisposed=function(){return this.disposed},e}();t.EditorInput=h;var p;!function(e){e[e.SAVE=0]="SAVE",e[e.DONT_SAVE=1]="DONT_SAVE",e[e.CANCEL=2]="CANCEL"}(p=t.ConfirmResult||(t.ConfirmResult={}));!function(e){e[e.Encode=0]="Encode",e[e.Decode=1]="Decode"}(t.EncodingMode||(t.EncodingMode={}));var f=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.name=t,o.description=n,o._details=i,o._master=r,o._toUnbind=[],o.registerListeners(),o}return n(t,e),Object.defineProperty(t.prototype,"master",{get:function(){return this._master},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"details",{get:function(){return this._details},enumerable:!0,
configurable:!0}),t.prototype.isDirty=function(){return this.master.isDirty()},t.prototype.confirmSave=function(){return this.master.confirmSave()},t.prototype.save=function(){return this.master.save()},t.prototype.revert=function(){return this.master.revert()},t.prototype.getTelemetryDescriptor=function(){var t=this.master.getTelemetryDescriptor();return o.assign(t,e.prototype.getTelemetryDescriptor.call(this))},t.prototype.registerListeners=function(){var e=this,t=r.once(this.details.onDispose);this._toUnbind.push(t(function(){e.isDisposed()||e.dispose()}));var n=r.once(this.master.onDispose);this._toUnbind.push(n(function(){e.isDisposed()||e.dispose()})),this._toUnbind.push(this.master.onDidChangeDirty(function(){return e._onDidChangeDirty.fire()})),this._toUnbind.push(this.master.onDidChangeLabel(function(){return e._onDidChangeLabel.fire()}))},Object.defineProperty(t.prototype,"toUnbind",{get:function(){return this._toUnbind},enumerable:!0,configurable:!0}),t.prototype.resolve=function(e){
return i.TPromise.as(null)},t.prototype.getTypeId=function(){return t.ID},t.prototype.getName=function(){return this.name},t.prototype.getDescription=function(){return this.description},t.prototype.matches=function(n){if(!0===e.prototype.matches.call(this,n))return!0;if(n){if(!(n instanceof t))return!1;var i=n;return this.details.matches(i.details)&&this.master.matches(i.master)}return!1},t.prototype.dispose=function(){this._toUnbind=a.dispose(this._toUnbind),e.prototype.dispose.call(this)},t.ID="workbench.editorinputs.sidebysideEditorInput",t}(h);t.SideBySideEditorInput=f;var g=function(e){function t(){var t=e.call(this)||this;return t._onDispose=new r.Emitter,t}return n(t,e),Object.defineProperty(t.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!0,configurable:!0}),t.prototype.load=function(){return i.TPromise.as(this)},t.prototype.isResolved=function(){return!0},t.prototype.dispose=function(){this._onDispose.fire(),this._onDispose.dispose(),e.prototype.dispose.call(this)},t
}(a.Disposable);t.EditorModel=g,t.isEditorInputWithOptions=function(e){var t=e;return!!t&&!!t.editor};var v=function(){function e(){}return e.create=function(t){var n=new e;return n.preserveFocus=t.preserveFocus,n.forceOpen=t.forceOpen,n.revealIfVisible=t.revealIfVisible,n.revealIfOpened=t.revealIfOpened,n.pinned=t.pinned,n.index=t.index,n.inactive=t.inactive,n},e}();t.EditorOptions=v;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.from=function(e){return e&&e.options?t.create(e.options):null},t.create=function(e){void 0===e&&(e=Object.create(null));var n=new t;if(e.selection){var i=e.selection;n.selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)}return e.viewState&&(n.editorViewState=e.viewState),e.forceOpen&&(n.forceOpen=!0),e.revealIfVisible&&(n.revealIfVisible=!0),e.revealIfOpened&&(n.revealIfOpened=!0),e.preserveFocus&&(n.preserveFocus=!0),e.revealInCenterIfOutsideViewport&&(n.revealInCenterIfOutsideViewport=!0),e.pinned&&(n.pinned=!0),
e.inactive&&(n.inactive=!0),"number"==typeof e.index&&(n.index=e.index),n},t.prototype.hasOptionsDefined=function(){return!!this.editorViewState||!s.isUndefinedOrNull(this.startLineNumber)&&!s.isUndefinedOrNull(this.startColumn)},t.prototype.selection=function(e,t,n,i){return void 0===n&&(n=e),void 0===i&&(i=t),this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i,this},t.fromEditor=function(e,n){var i=t.create(n);return i.editorViewState=e.saveViewState(),i},t.prototype.apply=function(e,t){return this.applyViewState(e,t)},t.prototype.applyViewState=function(e,t){var n=!1;if(this.editorViewState)e.restoreViewState(this.editorViewState),n=!0;else if(!s.isUndefinedOrNull(this.startLineNumber)&&!s.isUndefinedOrNull(this.startColumn)){if(s.isUndefinedOrNull(this.endLineNumber)||s.isUndefinedOrNull(this.endColumn)){var i={lineNumber:this.startLineNumber,column:this.startColumn};e.setPosition(i),
this.revealInCenterIfOutsideViewport?e.revealPositionInCenterIfOutsideViewport(i,t):e.revealPositionInCenter(i,t)}else{var r={startLineNumber:this.startLineNumber,startColumn:this.startColumn,endLineNumber:this.endLineNumber,endColumn:this.endColumn};e.setSelection(r),this.revealInCenterIfOutsideViewport?e.revealRangeInCenterIfOutsideViewport(r,t):e.revealRangeInCenter(r,t)}n=!0}return n},t}(v);t.TextEditorOptions=m;var y=function(e){function t(t){var n=e.call(this)||this;return n.context=t,n}return n(t,e),t.prototype.run=function(t,n){return e.prototype.run.call(this,t,this.context)},t}(d.ActionRunner);t.EditorCommandsContextActionRunner=y,t.toResource=function(e,t){if(!e)return null;t&&t.supportSideBySide&&e instanceof f&&(e=e.master);var n=e.getResource();if(!t||!t.filter)return n;if(!n)return null;var i,r;return Array.isArray(t.filter)?(i=t.filter.indexOf(u.Schemas.file)>=0,r=t.filter.indexOf(u.Schemas.untitled)>=0):(i=t.filter===u.Schemas.file,r=t.filter===u.Schemas.untitled),
i&&n.scheme===u.Schemas.file?n:r&&n.scheme===u.Schemas.untitled?n:null};!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.CloseDirection||(t.CloseDirection={}));var b=function(){function e(){this.editorInputFactoryConstructors=Object.create(null),this.editorInputFactoryInstances=Object.create(null)}return e.prototype.setInstantiationService=function(e){this.instantiationService=e;for(var t in this.editorInputFactoryConstructors){var n=this.editorInputFactoryConstructors[t];this.createEditorInputFactory(t,n)}this.editorInputFactoryConstructors={}},e.prototype.createEditorInputFactory=function(e,t){var n=this.instantiationService.createInstance(t);this.editorInputFactoryInstances[e]=n},e.prototype.registerFileInputFactory=function(e){this.fileInputFactory=e},e.prototype.getFileInputFactory=function(){return this.fileInputFactory},e.prototype.registerEditorInputFactory=function(e,t){this.instantiationService?this.createEditorInputFactory(e,t):this.editorInputFactoryConstructors[e]=t},
e.prototype.getEditorInputFactory=function(e){return this.editorInputFactoryInstances[e]},e}();t.Extensions={EditorInputFactories:"workbench.contributions.editor.inputFactories"},l.Registry.add(t.Extensions.EditorInputFactories,new b)}),define(e[223],t([1,0,40,8,24,45]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDITOR_TITLE_HEIGHT=35,t.DEFAULT_EDITOR_MIN_DIMENSIONS=new i.Dimension(220,70),t.DEFAULT_EDITOR_MAX_DIMENSIONS=new i.Dimension(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),t.DEFAULT_EDITOR_PART_OPTIONS={showTabs:!0,tabCloseButton:"right",tabSizing:"fit",showIcons:!0,enablePreview:!0,openPositioning:"right",openSideBySideDirection:"right",closeEmptyGroups:!0,labelFormat:"default",iconTheme:"vs-seti"},t.impactsEditorPartOptions=function(e){return e.affectsConfiguration("workbench.editor")||e.affectsConfiguration("workbench.iconTheme")},t.getEditorPartOptions=function(e){var n=r.assign(Object.create(null),t.DEFAULT_EDITOR_PART_OPTIONS)
;return e&&e.workbench?("string"==typeof e.workbench.iconTheme&&(n.iconTheme=e.workbench.iconTheme),e.workbench.editor&&r.assign(n,e.workbench.editor),n):n},t.getActiveTextEditorOptions=function(e,t,i){var r=e.activeControl?o.getCodeEditor(e.activeControl.getControl()):void 0;return!r||t&&!t.matches(e.activeEditor)?i||new n.EditorOptions:n.TextEditorOptions.fromEditor(r,i)}}),define(e[464],t([1,0,4,40]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var i=e.call(this)||this;return i._originalModel=t,i._modifiedModel=n,i}return n(t,e),Object.defineProperty(t.prototype,"originalModel",{get:function(){return this._originalModel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"modifiedModel",{get:function(){return this._modifiedModel},enumerable:!0,configurable:!0}),t.prototype.load=function(){var e=this;return i.TPromise.join([this._originalModel.load(),this._modifiedModel.load()]).then(function(){return e})},
t.prototype.isResolved=function(){return this.originalModel.isResolved()&&this.modifiedModel.isResolved()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(r.EditorModel);t.DiffEditorModel=o}),define(e[466],t([1,0,7,40,6,17,5,16,50]),function(e,t,i,r,o,s,c,u,d){"use strict";function h(e){var t=e;return e&&"object"==typeof e&&Array.isArray(t.editors)&&Array.isArray(t.mru)}Object.defineProperty(t,"__esModule",{value:!0});var p={LEFT:"left",RIGHT:"right",FIRST:"first",LAST:"last"};t.isSerializedEditorGroup=h;var f=function(e){function t(n,r,o){var s=e.call(this)||this;return s.instantiationService=r,s.configurationService=o,s._onDidEditorActivate=s._register(new i.Emitter),s._onDidEditorOpen=s._register(new i.Emitter),s._onDidEditorClose=s._register(new i.Emitter),s._onDidEditorDispose=s._register(new i.Emitter),s._onDidEditorBecomeDirty=s._register(new i.Emitter),s._onDidEditorLabelChange=s._register(new i.Emitter),s._onDidEditorMove=s._register(new i.Emitter),
s._onDidEditorPin=s._register(new i.Emitter),s._onDidEditorUnpin=s._register(new i.Emitter),s.editors=[],s.mru=[],s.mapResourceToEditorCount=new d.ResourceMap,h(n)?s.deserialize(n):s._id=t.IDS++,s.onConfigurationUpdated(),s.registerListeners(),s}return n(t,e),Object.defineProperty(t.prototype,"onDidEditorActivate",{get:function(){return this._onDidEditorActivate.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorOpen",{get:function(){return this._onDidEditorOpen.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorClose",{get:function(){return this._onDidEditorClose.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorDispose",{get:function(){return this._onDidEditorDispose.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorBecomeDirty",{get:function(){return this._onDidEditorBecomeDirty.event},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"onDidEditorLabelChange",{get:function(){return this._onDidEditorLabelChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorMove",{get:function(){return this._onDidEditorMove.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorPin",{get:function(){return this._onDidEditorPin.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEditorUnpin",{get:function(){return this._onDidEditorUnpin.event},enumerable:!0,configurable:!0}),t.prototype.registerListeners=function(){var e=this;this._register(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated(t)}))},t.prototype.onConfigurationUpdated=function(e){this.editorOpenPositioning=this.configurationService.getValue("workbench.editor.openPositioning")},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{
get:function(){return this.editors.length},enumerable:!0,configurable:!0}),t.prototype.getEditors=function(e){return e?this.mru.slice(0):this.editors.slice(0)},t.prototype.getEditor=function(e){if("number"==typeof e)return this.editors[e];var t=e;if(!this.contains(t))return null;for(var n=0;n<this.editors.length;n++){var i=this.editors[n],o=r.toResource(i,{supportSideBySide:!0});if(o&&o.toString()===t.toString())return i}return null},Object.defineProperty(t.prototype,"activeEditor",{get:function(){return this.active},enumerable:!0,configurable:!0}),t.prototype.isActive=function(e){return this.matches(this.active,e)},Object.defineProperty(t.prototype,"previewEditor",{get:function(){return this.preview},enumerable:!0,configurable:!0}),t.prototype.isPreview=function(e){return this.matches(this.preview,e)},t.prototype.openEditor=function(e,t){var n=this.indexOf(e),i=t&&t.pinned,r=t&&t.active||!this.activeEditor||!i&&this.matches(this.preview,this.activeEditor);if(-1===n){var o=void 0,s=this.indexOf(this.active)
;if(o=t&&"number"==typeof t.index?t.index:this.editorOpenPositioning===p.FIRST?0:this.editorOpenPositioning===p.LAST?this.editors.length:this.editorOpenPositioning===p.LEFT?0!==s&&this.editors.length?s:0:s+1,!i&&this.preview||this.splice(o,!1,e),!i){if(this.preview){o>this.indexOf(this.preview)&&o--,this.replaceEditor(this.preview,e,o,!r)}this.preview=e}this.registerEditorListeners(e),this._onDidEditorOpen.fire(e),r&&this.setActive(e)}else i&&this.pin(e),r&&this.setActive(e),t&&"number"==typeof t.index&&this.moveEditor(e,t.index)},t.prototype.registerEditorListeners=function(e){var t=this,n=[],r=i.once(e.onDispose);n.push(r(function(){t.indexOf(e)>=0&&t._onDidEditorDispose.fire(e)})),n.push(e.onDidChangeDirty(function(){t._onDidEditorBecomeDirty.fire(e)})),n.push(e.onDidChangeLabel(function(){t._onDidEditorLabelChange.fire(e)})),n.push(this.onDidEditorClose(function(t){t.editor.matches(e)&&c.dispose(n)}))},t.prototype.replaceEditor=function(e,t,n,i){void 0===i&&(i=!0);var r=this.doCloseEditor(e,i,!0)
;this.splice(n,!1,t),r&&this._onDidEditorClose.fire(r)},t.prototype.closeEditor=function(e,t){void 0===t&&(t=!0);var n=this.doCloseEditor(e,t,!1);if(n)return this._onDidEditorClose.fire(n),n.index},t.prototype.doCloseEditor=function(e,t,n){var i=this.indexOf(e);return-1===i?null:(t&&this.matches(this.active,e)&&(this.mru.length>1?this.setActive(this.mru[1]):this.active=null),this.matches(this.preview,e)&&(this.preview=null),this.splice(i,!0),{editor:e,replaced:n,index:i,groupId:this.id})},t.prototype.closeEditors=function(e,t){var n=this,i=this.indexOf(e);if(-1!==i)if(t===r.CloseDirection.LEFT)for(o=i-1;o>=0;o--)this.closeEditor(this.editors[o]);else if(t===r.CloseDirection.RIGHT)for(var o=this.editors.length-1;o>i;o--)this.closeEditor(this.editors[o]);else this.mru.filter(function(t){return!n.matches(t,e)}).forEach(function(e){return n.closeEditor(e)})},t.prototype.closeAllEditors=function(){var e=this;this.mru.filter(function(t){return!e.matches(t,e.active)}).forEach(function(t){return e.closeEditor(t)}),
this.closeEditor(this.active)},t.prototype.moveEditor=function(e,t){var n=this.indexOf(e);n<0||(this.editors.splice(n,1),this.editors.splice(t,0,e),this._onDidEditorMove.fire(e))},t.prototype.setActive=function(e){-1!==this.indexOf(e)&&(this.matches(this.active,e)||(this.active=e,this.setMostRecentlyUsed(e),this._onDidEditorActivate.fire(e)))},t.prototype.pin=function(e){-1!==this.indexOf(e)&&this.isPreview(e)&&(this.preview=null,this._onDidEditorPin.fire(e))},t.prototype.unpin=function(e){if(-1!==this.indexOf(e)&&this.isPinned(e)){var t=this.preview;this.preview=e,this._onDidEditorUnpin.fire(e),this.closeEditor(t)}},t.prototype.isPinned=function(e){var t,n;return"number"==typeof e?(t=this.editors[e],n=e):(t=e,n=this.indexOf(t)),!(-1===n||!t)&&(!this.preview||!this.matches(this.preview,t))},t.prototype.splice=function(e,t,n){var i=this.editors[e],r=[e,t?1:0];if(n&&r.push(n),this.editors.splice.apply(this.editors,r),!t&&n)this.mru.push(n),this.updateResourceMap(n,!1);else{var o=this.indexOf(i,this.mru)
;t&&!n?(this.mru.splice(o,1),this.updateResourceMap(i,!0)):(this.mru.splice(o,1,n),this.updateResourceMap(n,!1),this.updateResourceMap(i,!0))}},t.prototype.updateResourceMap=function(e,t){var n=r.toResource(e,{supportSideBySide:!0});if(n){var i=this.mapResourceToEditorCount.get(n)||0,o=void 0;t?i>1&&(o=i-1):o=i+1,this.mapResourceToEditorCount.set(n,o)}},t.prototype.indexOf=function(e,t){if(void 0===t&&(t=this.editors),!e)return-1;for(var n=0;n<t.length;n++)if(this.matches(t[n],e))return n;return-1},t.prototype.contains=function(e,t){if(e instanceof r.EditorInput){if(this.indexOf(e)>=0)return!0;if(t&&e instanceof r.SideBySideEditorInput){if(this.indexOf(e.master)>=0)return!0}return!1}var n=this.mapResourceToEditorCount.get(e);return"number"==typeof n&&n>0},t.prototype.setMostRecentlyUsed=function(e){if(-1!==this.indexOf(e)){var t=this.indexOf(e,this.mru);this.mru.splice(t,1),this.mru.unshift(e)}},t.prototype.matches=function(e,t){return!!e&&!!t&&e.matches(t)},t.prototype.clone=function(){
var e=this.instantiationService.createInstance(t,void 0);return e.editors=this.editors.slice(0),e.mru=this.mru.slice(0),e.mapResourceToEditorCount=this.mapResourceToEditorCount.clone(),e.preview=this.preview,e.active=this.active,e.editorOpenPositioning=this.editorOpenPositioning,e},t.prototype.serialize=function(){var e,t=this,n=u.Registry.as(r.Extensions.EditorInputFactories),i=[],o=[];this.editors.forEach(function(r){var s=n.getEditorInputFactory(r.getTypeId());if(s){var a=s.serialize(r);"string"==typeof a&&(o.push({id:r.getTypeId(),value:a}),i.push(r),t.preview===r&&(e=i.length-1))}});var s=this.mru.map(function(e){return t.indexOf(e,i)}).filter(function(e){return e>=0});return{id:this.id,editors:o,mru:s,preview:e}},t.prototype.deserialize=function(e){var n=this,i=u.Registry.as(r.Extensions.EditorInputFactories);"number"==typeof e.id?(this._id=e.id,t.IDS=Math.max(e.id+1,t.IDS)):this._id=t.IDS++,this.editors=e.editors.map(function(e){var t=i.getEditorInputFactory(e.id);if(t){
var r=t.deserialize(n.instantiationService,e.value);return n.registerEditorListeners(r),n.updateResourceMap(r,!1),r}return null}).filter(function(e){return!!e}),this.mru=e.mru.map(function(e){return n.editors[e]}),this.active=this.mru[0],this.preview=this.editors[e.preview]},t.IDS=0,t=a([l(1,o.IInstantiationService),l(2,s.IConfigurationService)],t)}(c.Disposable);t.EditorGroup=f}),define(e[467],t([1,0,464]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.updateTextDiffEditorModel(),i}return n(t,e),Object.defineProperty(t.prototype,"originalModel",{get:function(){return this._originalModel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"modifiedModel",{get:function(){return this._modifiedModel},enumerable:!0,configurable:!0}),t.prototype.load=function(){var t=this;return e.prototype.load.call(this).then(function(){return t.updateTextDiffEditorModel(),t})},
t.prototype.updateTextDiffEditorModel=function(){this.originalModel.isResolved()&&this.modifiedModel.isResolved()&&(this._textDiffEditorModel?(this._textDiffEditorModel.original=this.originalModel.textEditorModel,this._textDiffEditorModel.modified=this.modifiedModel.textEditorModel):this._textDiffEditorModel={original:this.originalModel.textEditorModel,modified:this.modifiedModel.textEditorModel})},Object.defineProperty(t.prototype,"textDiffEditorModel",{get:function(){return this._textDiffEditorModel},enumerable:!0,configurable:!0}),t.prototype.isResolved=function(){return!!this._textDiffEditorModel},t.prototype.isReadonly=function(){return this.modifiedModel.isReadonly()},t.prototype.dispose=function(){this._textDiffEditorModel=null,e.prototype.dispose.call(this)},t}(i.DiffEditorModel);t.TextDiffEditorModel=r}),define(e[213],t([1,0,4,40,54,47]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i){var r=e.call(this)||this
;return r.modelService=t,r.modeService=n,i&&r.handleExistingModel(i),r}return n(t,e),t.prototype.handleExistingModel=function(e){var t=this.modelService.getModel(e);if(!t)throw new Error("Document with resource "+e.toString()+" does not exist");this.textEditorModelHandle=e,this.registerModelDisposeListener(t)},t.prototype.registerModelDisposeListener=function(e){var t=this;this.modelDisposeListener&&this.modelDisposeListener.dispose(),this.modelDisposeListener=e.onWillDispose(function(){t.textEditorModelHandle=null,t.dispose()})},Object.defineProperty(t.prototype,"textEditorModel",{get:function(){return this.textEditorModelHandle?this.modelService.getModel(this.textEditorModelHandle):null},enumerable:!0,configurable:!0}),t.prototype.createTextEditorModel=function(e,t,n){var r=this.getFirstLineText(e),o=this.getOrCreateMode(this.modeService,n,r);return i.TPromise.as(this.doCreateTextEditorModel(e,o,t))},t.prototype.doCreateTextEditorModel=function(e,t,n){var i=n&&this.modelService.getModel(n)
;return i?(this.modelService.updateModel(i,e),this.modelService.setMode(i,t)):(i=this.modelService.createModel(e,t,n),this.createdEditorModel=!0,this.registerModelDisposeListener(i)),this.textEditorModelHandle=i.uri,this},t.prototype.getFirstLineText=function(e){var t=e;if("function"==typeof t.getFirstLineText)return t.getFirstLineText(100);return e.getLineContent(1).substr(0,100)},t.prototype.getOrCreateMode=function(e,t,n){return e.getOrCreateMode(t)},t.prototype.updateTextEditorModel=function(e){this.textEditorModel&&this.modelService.updateModel(this.textEditorModel,e)},t.prototype.createSnapshot=function(){var e=this.textEditorModel;return e?e.createSnapshot(!0):null},t.prototype.isResolved=function(){return!!this.textEditorModelHandle},t.prototype.isReadonly=function(){return!0},t.prototype.dispose=function(){this.modelDisposeListener&&(this.modelDisposeListener.dispose(),this.modelDisposeListener=null),
this.textEditorModelHandle&&this.createdEditorModel&&this.modelService.destroyModel(this.textEditorModelHandle),this.textEditorModelHandle=null,this.createdEditorModel=!1,e.prototype.dispose.call(this)},t=a([l(0,s.IModelService),l(1,o.IModeService)],t)}(r.EditorModel);t.BaseTextEditorModel=c}),define(e[211],t([1,0,4,40,213,464,467]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,i,r)||this;return s.forceOpenAsBinary=o,s}return n(t,e),t.prototype.getTypeId=function(){return t.ID},Object.defineProperty(t.prototype,"originalInput",{get:function(){return this.details},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"modifiedInput",{get:function(){return this.master},enumerable:!0,configurable:!0}),t.prototype.resolve=function(e){var t=this;return(this.cachedModel&&!e?i.TPromise.as(this.cachedModel):this.createModel(e)).then(function(e){return t.cachedModel&&t.cachedModel.dispose(),
t.cachedModel=e,t.cachedModel})},t.prototype.getPreferredEditorId=function(e){return this.forceOpenAsBinary?r.BINARY_DIFF_EDITOR_ID:r.TEXT_DIFF_EDITOR_ID},t.prototype.createModel=function(e){return i.TPromise.join([this.originalInput.resolve(e),this.modifiedInput.resolve(e)]).then(function(e){var t=e[0],n=e[1];return n instanceof o.BaseTextEditorModel&&t instanceof o.BaseTextEditorModel?new a.TextDiffEditorModel(t,n):new s.DiffEditorModel(t,n)})},t.prototype.dispose=function(){this.cachedModel&&(this.cachedModel.dispose(),this.cachedModel=null),e.prototype.dispose.call(this)},t.ID="workbench.editors.diffEditorInput",t}(r.SideBySideEditorInput);t.DiffEditorInput=c}),define(e[478],t([1,0,213,54,47]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,i){var r=e.call(this,i,n,t)||this;return r.createdEditorModel=!0,r}return n(t,e),t=a([l(1,r.IModeService),l(2,o.IModelService)],t)}(i.BaseTextEditorModel);t.ResourceEditorModel=s}),
define(e[225],t([1,0,30,34]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(r=t.Scope||(t.Scope={}));var o=function(){function e(t){this.id=e.COMMON_PREFIX+t.toLowerCase()}return e.prototype.getMemento=function(t,n){if(void 0===n&&(n=r.GLOBAL),n===r.WORKSPACE){var i=e.workspaceMementos[this.id];return i||(i=new s(this.id,n,t),e.workspaceMementos[this.id]=i),i.getMemento()}var o=e.globalMementos[this.id];return o||(o=new s(this.id,n,t),e.globalMementos[this.id]=o),o.getMemento()},e.prototype.saveMemento=function(){var t=e.globalMementos[this.id];t&&t.save();var n=e.workspaceMementos[this.id];n&&n.save()},e.globalMementos={},e.workspaceMementos={},e.COMMON_PREFIX="memento/",e}();t.Memento=o;var s=function(){function e(e,t,n){this.storageService=n,this.id=e,this.scope=t,this.mementoObj=this.loadMemento()}return e.prototype.getMemento=function(){return this.mementoObj},e.prototype.loadMemento=function(){
var e=this.scope===r.GLOBAL?i.StorageScope.GLOBAL:i.StorageScope.WORKSPACE,t=this.storageService.get(this.id,e);return t?JSON.parse(t):{}},e.prototype.save=function(){var e=this.scope===r.GLOBAL?i.StorageScope.GLOBAL:i.StorageScope.WORKSPACE;n.isEmptyObject(this.mementoObj)?this.storageService.remove(this.id,e):this.storageService.store(this.id,JSON.stringify(this.mementoObj),e)},e}()}),define(e[180],t([1,0,22,126,7,5,9]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){e[e.ADD=0]="ADD",e[e.CHANGE=1]="CHANGE",e[e.REMOVE=2]="REMOVE"}(a=t.NotificationChangeType||(t.NotificationChangeType={}));var c=function(){function e(e,t){this.item=e,this.closeItem=t,this._onDidClose=new r.Emitter,this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;r.once(this.item.onDidClose)(function(){e._onDidClose.fire(),e._onDidClose.dispose()})},Object.defineProperty(e.prototype,"onDidClose",{get:function(){return this._onDidClose.event},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"progress",{get:function(){return this.item.progress},enumerable:!0,configurable:!0}),e.prototype.updateSeverity=function(e){this.item.updateSeverity(e)},e.prototype.updateMessage=function(e){this.item.updateMessage(e)},e.prototype.updateActions=function(e){this.item.updateActions(e)},e.prototype.close=function(){this.closeItem(this.item),this._onDidClose.dispose()},e}();t.NotificationHandle=c;var l=function(){function e(){this._notifications=[],this.toDispose=[],this._onDidNotificationChange=new r.Emitter,this.toDispose.push(this._onDidNotificationChange)}return Object.defineProperty(e.prototype,"notifications",{get:function(){return this._notifications},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidNotificationChange",{get:function(){return this._onDidNotificationChange.event},enumerable:!0,configurable:!0}),e.prototype.notify=function(t){var n=this,i=this.createViewItem(t);if(!i)return e.NO_OP_NOTIFICATION
;var r=this.findNotification(i);return r&&r.close(),this._notifications.splice(0,0,i),this._onDidNotificationChange.fire({item:i,index:0,kind:a.ADD}),new c(i,function(e){return n.closeItem(e)})},e.prototype.closeItem=function(e){var t=this.findNotification(e);t&&t!==e?t.close():e.close()},e.prototype.findNotification=function(e){for(var t=0;t<this._notifications.length;t++){var n=this._notifications[t];if(n.equals(e))return n}},e.prototype.createViewItem=function(e){var t=this,n=h.create(e);if(!n)return null;var i=function(){var e=t._notifications.indexOf(n);e>=0&&t._onDidNotificationChange.fire({item:n,index:e,kind:a.CHANGE})},o=n.onDidExpansionChange(function(){return i()}),s=n.onDidLabelChange(function(e){e.kind!==u.ACTIONS&&e.kind!==u.MESSAGE||i()});return r.once(n.onDidClose)(function(){o.dispose(),s.dispose();var e=t._notifications.indexOf(n);e>=0&&(t._notifications.splice(e,1),t._onDidNotificationChange.fire({item:n,index:e,kind:a.REMOVE}))}),n},e.prototype.dispose=function(){
this.toDispose=o.dispose(this.toDispose)},e.NO_OP_NOTIFICATION=new n.NoOpNotification,e}();t.NotificationsModel=l,t.isNotificationViewItem=function(e){return e instanceof h};var u;!function(e){e[e.SEVERITY=0]="SEVERITY",e[e.MESSAGE=1]="MESSAGE",e[e.ACTIONS=2]="ACTIONS",e[e.PROGRESS=3]="PROGRESS"}(u=t.NotificationViewItemLabelKind||(t.NotificationViewItemLabelKind={}));var d=function(){function e(){this.toDispose=[],this._state=Object.create(null),this._onDidChange=new r.Emitter,this.toDispose.push(this._onDidChange)}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.infinite=function(){this._state.infinite||(this._state.infinite=!0,this._state.total=void 0,this._state.worked=void 0,this._state.done=void 0,this._onDidChange.fire())},e.prototype.done=function(){this._state.done||(this._state.done=!0,
this._state.infinite=void 0,this._state.total=void 0,this._state.worked=void 0,this._onDidChange.fire())},e.prototype.total=function(e){this._state.total!==e&&(this._state.total=e,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire())},e.prototype.worked=function(e){"number"==typeof this._state.worked?this._state.worked+=e:this._state.worked=e,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire()},e.prototype.dispose=function(){this.toDispose=o.dispose(this.toDispose)},e}();t.NotificationViewItemProgress=d;var h=function(){function e(e,t,n,i){this._severity=e,this._message=t,this._source=n,this.toDispose=[],this.setActions(i),this._onDidExpansionChange=new r.Emitter,this.toDispose.push(this._onDidExpansionChange),this._onDidLabelChange=new r.Emitter,this.toDispose.push(this._onDidLabelChange),this._onDidClose=new r.Emitter,this.toDispose.push(this._onDidClose)}return e.create=function(t){if(!t||!t.message||s.isPromiseCanceledError(t.message))return null;var i
;i="number"==typeof t.severity?t.severity:n.Severity.Info;var r=e.parseNotificationMessage(t.message);if(!r)return null;var o;return t.actions?o=t.actions:s.isErrorWithActions(t.message)&&(o={primary:t.message.actions}),new e(i,r,t.source,o)},e.parseNotificationMessage=function(t){var n;if(t instanceof Error?n=i.toErrorMessage(t,!1):"string"==typeof t&&(n=t),!n)return null;var r=n;n.length>e.MAX_MESSAGE_LENGTH&&(n=n.substr(0,e.MAX_MESSAGE_LENGTH)+"...");var o=[];return(n=n.replace(/(\r\n|\n|\r)/gm," ").trim()).replace(e.LINK_REGEX,function(e,t,n,i){return o.push({name:t,href:n,offset:i,length:e.length}),e}),{raw:r,value:n,links:o,original:t}},e.prototype.setActions=function(e){e||(e={primary:[],secondary:[]}),Array.isArray(e.primary)||(e.primary=[]),Array.isArray(e.secondary)||(e.secondary=[]),this._actions=e,this._expanded=e.primary.length>0},Object.defineProperty(e.prototype,"onDidExpansionChange",{get:function(){return this._onDidExpansionChange.event},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onDidLabelChange",{get:function(){return this._onDidLabelChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canCollapse",{get:function(){return 0===this._actions.primary.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expanded",{get:function(){return this._expanded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"severity",{get:function(){return this._severity},enumerable:!0,configurable:!0}),e.prototype.hasProgress=function(){return!!this._progress},Object.defineProperty(e.prototype,"progress",{get:function(){var e=this;return this._progress||(this._progress=new d,this.toDispose.push(this._progress),this.toDispose.push(this._progress.onDidChange(function(){return e._onDidLabelChange.fire({kind:u.PROGRESS})}))),this._progress},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions},enumerable:!0,configurable:!0}),e.prototype.updateSeverity=function(e){this._severity=e,this._onDidLabelChange.fire({kind:u.SEVERITY})},e.prototype.updateMessage=function(t){var n=e.parseNotificationMessage(t);n&&(this._message=n,this._onDidLabelChange.fire({kind:u.MESSAGE}))},e.prototype.updateActions=function(e){this.setActions(e),this._onDidLabelChange.fire({kind:u.ACTIONS})},e.prototype.expand=function(){!this._expanded&&this.canCollapse&&(this._expanded=!0,this._onDidExpansionChange.fire())},e.prototype.collapse=function(e){this._expanded&&this.canCollapse&&(this._expanded=!1,e||this._onDidExpansionChange.fire())},e.prototype.toggle=function(){this._expanded?this.collapse():this.expand()},
e.prototype.close=function(){this._onDidClose.fire(),this.toDispose=o.dispose(this.toDispose)},e.prototype.equals=function(e){if(this.hasProgress()||e.hasProgress())return!1;if(this._source!==e.source)return!1;var t=this._actions.primary,n=e.actions.primary;if(t.length!==n.length)return!1;if(this._message.value!==e.message.value)return!1;for(var i=0;i<t.length;i++)if(t[i].id+t[i].label!==n[i].id+n[i].label)return!1;return!0},e.MAX_MESSAGE_LENGTH=1e3,e.LINK_REGEX=/\[([^\]]+)\]\((https?:\/\/[^\)\s]+)\)/gi,e}();t.NotificationViewItem=h}),define(e[1072],t([1,0,128,1548,180,5,126,22]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e){var t=this;this.model=e,this.toDispose=[],e.notifications.forEach(function(e){return t.ariaAlert(e)}),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.model.onDidNotificationChange(function(t){return e.onDidNotificationChange(t)}))},
e.prototype.onDidNotificationChange=function(e){e.kind===r.NotificationChangeType.ADD&&(this.ariaAlert(e.item),e.item.severity===a.Severity.Error&&(e.item.message.original instanceof Error?console.error(e.item.message.original):console.error(s.toErrorMessage(e.item.message.value,!0))))},e.prototype.ariaAlert=function(e){var t;t=e.severity===a.Severity.Error?i.localize(0,null,e.message.value):e.severity===a.Severity.Warning?i.localize(1,null,e.message.value):i.localize(2,null,e.message.value),n.alert(t)},e.prototype.dispose=function(){this.toDispose=o.dispose(this.toDispose)},e}();t.NotificationsAlerts=c}),define(e[206],t([1,0,29,15,52,180,31,1552,58]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW_NOTIFICATIONS_CENTER="notifications.showList",t.HIDE_NOTIFICATIONS_CENTER="notifications.hideList",t.TOGGLE_NOTIFICATIONS_CENTER="notifications.toggleList",t.HIDE_NOTIFICATION_TOAST="notifications.hideToasts",t.FOCUS_NOTIFICATION_TOAST="notifications.focusToasts",
t.FOCUS_NEXT_NOTIFICATION_TOAST="notifications.focusNextToast",t.FOCUS_PREVIOUS_NOTIFICATION_TOAST="notifications.focusPreviousToast",t.FOCUS_FIRST_NOTIFICATION_TOAST="notifications.focusFirstToast",t.FOCUS_LAST_NOTIFICATION_TOAST="notifications.focusLastToast",t.COLLAPSE_NOTIFICATION="notification.collapse",t.EXPAND_NOTIFICATION="notification.expand",t.TOGGLE_NOTIFICATION="notification.toggle",t.CLEAR_NOTIFICATION="notification.clear",t.CLEAR_ALL_NOTIFICATIONS="notifications.clearAll";t.NotificationFocusedContext=new i.RawContextKey("notificationFocus",!0);t.NotificationsCenterVisibleContext=new i.RawContextKey("notificationCenterVisible",!1);t.NotificationsToastsVisibleContext=new i.RawContextKey("notificationToastsVisible",!1),t.registerNotificationCommands=function(e,l){function u(e,t){if(o.isNotificationViewItem(t))return t;var n=e.lastFocusedList;if(n instanceof c.WorkbenchList){var i=n.getFocusedElements()[0];if(o.isNotificationViewItem(i))return i}}
n.CommandsRegistry.registerCommand(t.SHOW_NOTIFICATIONS_CENTER,function(){e.show()}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.HIDE_NOTIFICATIONS_CENTER,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(50),when:t.NotificationsCenterVisibleContext,primary:9,handler:function(t){return e.hide()}}),n.CommandsRegistry.registerCommand(t.TOGGLE_NOTIFICATIONS_CENTER,function(t){e.isVisible?e.hide():e.show()}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLEAR_NOTIFICATION,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:t.NotificationFocusedContext,primary:20,mac:{primary:2049},handler:function(e,t){var n=u(e.get(c.IListService),t);n&&n.close()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.EXPAND_NOTIFICATION,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:t.NotificationFocusedContext,primary:17,handler:function(e,t){var n=u(e.get(c.IListService),t);n&&n.expand()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({
id:t.COLLAPSE_NOTIFICATION,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:t.NotificationFocusedContext,primary:15,handler:function(e,t){var n=u(e.get(c.IListService),t);n&&n.collapse()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.TOGGLE_NOTIFICATION,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:t.NotificationFocusedContext,primary:10,secondary:[3],handler:function(e){var t=u(e.get(c.IListService));t&&t.toggle()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.HIDE_NOTIFICATION_TOAST,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(50),when:t.NotificationsToastsVisibleContext,primary:9,handler:function(e){return l.hide()}}),n.CommandsRegistry.registerCommand(t.FOCUS_NOTIFICATION_TOAST,function(){return l.focus()}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_NEXT_NOTIFICATION_TOAST,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),
when:i.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:18,handler:function(e){l.focusNext()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_PREVIOUS_NOTIFICATION_TOAST,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:i.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:16,handler:function(e){l.focusPrevious()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_FIRST_NOTIFICATION_TOAST,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:i.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:11,secondary:[14],handler:function(e){l.focusFirst()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.FOCUS_LAST_NOTIFICATION_TOAST,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:i.ContextKeyExpr.and(t.NotificationFocusedContext,t.NotificationsToastsVisibleContext),primary:12,secondary:[13],handler:function(e){
l.focusLast()}}),n.CommandsRegistry.registerCommand(t.CLEAR_ALL_NOTIFICATIONS,function(){return e.clearAll()});var d=a.localize(0,null);s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:t.SHOW_NOTIFICATIONS_CENTER,title:a.localize(1,null),category:d},when:t.NotificationsCenterVisibleContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:t.HIDE_NOTIFICATIONS_CENTER,title:a.localize(2,null),category:d},when:t.NotificationsCenterVisibleContext}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:t.CLEAR_ALL_NOTIFICATIONS,title:a.localize(3,null),category:d}})}}),define(e[347],t([1,0,1541,23,4,28,22,206,29,135,449]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n,i){var r=e.call(this,t,n,"clear-notification-action")||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(u.CLEAR_NOTIFICATION,e),
o.TPromise.as(void 0)},t.ID=u.CLEAR_NOTIFICATION,t.LABEL=i.localize(0,null),t=a([l(2,d.ICommandService)],t)}(r.Action);t.ClearNotificationAction=p;var f=function(e){function t(t,n,i){var r=e.call(this,t,n,"clear-all-notifications-action")||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(u.CLEAR_ALL_NOTIFICATIONS),o.TPromise.as(void 0)},t.ID=u.CLEAR_ALL_NOTIFICATIONS,t.LABEL=i.localize(1,null),t=a([l(2,d.ICommandService)],t)}(r.Action);t.ClearAllNotificationsAction=f;var g=function(e){function t(t,n,i){var r=e.call(this,t,n,"hide-all-notifications-action")||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(u.HIDE_NOTIFICATIONS_CENTER),o.TPromise.as(void 0)},t.ID=u.HIDE_NOTIFICATIONS_CENTER,t.LABEL=i.localize(2,null),t=a([l(2,d.ICommandService)],t)}(r.Action);t.HideNotificationsCenterAction=g;var v=function(e){function t(t,n,i){
var r=e.call(this,t,n,"expand-notification-action")||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(u.EXPAND_NOTIFICATION,e),o.TPromise.as(void 0)},t.ID=u.EXPAND_NOTIFICATION,t.LABEL=i.localize(3,null),t=a([l(2,d.ICommandService)],t)}(r.Action);t.ExpandNotificationAction=v;var m=function(e){function t(t,n,i){var r=e.call(this,t,n,"collapse-notification-action")||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(u.COLLAPSE_NOTIFICATION,e),o.TPromise.as(void 0)},t.ID=u.COLLAPSE_NOTIFICATION,t.LABEL=i.localize(4,null),t=a([l(2,d.ICommandService)],t)}(r.Action);t.CollapseNotificationAction=m;var y=function(e){function t(t,n,i){var r=e.call(this,t,n,"configure-notification-action")||this;return r._configurationActions=i,r}return n(t,e),Object.defineProperty(t.prototype,"configurationActions",{get:function(){return this._configurationActions},enumerable:!0,configurable:!0}),
t.ID="workbench.action.configureNotification",t.LABEL=i.localize(5,null),t}(r.Action);t.ConfigureNotificationAction=y;var b=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.clipboardService=i,r}return n(t,e),t.prototype.run=function(e){return this.clipboardService.writeText(e.message.raw),o.TPromise.as(void 0)},t.ID="workbench.action.copyNotificationMessage",t.LABEL=i.localize(6,null),t=a([l(2,h.IClipboardService)],t)}(r.Action);t.CopyNotificationMessageAction=b;var S=function(e){function t(t,n){var i=e.call(this)||this;return i.telemetryService=t,i.notificationService=n,i}return n(t,e),t.prototype.runAction=function(t,n){var i=this;return this.telemetryService.publicLog("workbenchActionExecuted",{id:t.id,from:"message"}),e.prototype.runAction.call(this,t,n).done(null,function(e){return i.notificationService.error(e)}),o.TPromise.as(void 0)},t=a([l(0,s.ITelemetryService),l(1,c.INotificationService)],t)}(r.ActionRunner);t.NotificationActionRunner=S}),
define(e[1075],t([1,0,180,189,5,206,1555]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){this.model=e,this.statusbarService=t,this.toDispose=[],this._counter=new Set,this.updateNotificationsStatusItem(),this.registerListeners()}return Object.defineProperty(e.prototype,"count",{get:function(){return this._counter.size},enumerable:!0,configurable:!0}),e.prototype.update=function(e){this.isNotificationsCenterVisible!==e&&(this.isNotificationsCenterVisible=e,this._counter.clear(),this.updateNotificationsStatusItem())},e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.model.onDidNotificationChange(function(t){return e.onDidNotificationChange(t)}))},e.prototype.onDidNotificationChange=function(e){this.isNotificationsCenterVisible||(e.kind===n.NotificationChangeType.ADD?this._counter.add(e.item):e.kind===n.NotificationChangeType.REMOVE&&this._counter.delete(e.item),this.updateNotificationsStatusItem())},
e.prototype.updateNotificationsStatusItem=function(){this.statusItem&&this.statusItem.dispose(),this.statusItem=this.statusbarService.addEntry({text:0===this.count?"$(bell)":"$(bell) "+this.count,command:this.isNotificationsCenterVisible?o.HIDE_NOTIFICATIONS_CENTER:o.SHOW_NOTIFICATIONS_CENTER,tooltip:this.getTooltip(),showBeak:this.isNotificationsCenterVisible},i.StatusbarAlignment.RIGHT,-1e3)},e.prototype.getTooltip=function(){return this.isNotificationsCenterVisible?s.localize(0,null):0===this.model.notifications.length?s.localize(1,null):0===this.count?s.localize(2,null):1===this.count?s.localize(3,null):s.localize(4,null,this.count)},e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose),this.statusItem&&this.statusItem.dispose()},e=a([l(1,i.IStatusbarService)],e)}();t.NotificationsStatus=c}),define(e[1076],t([1,0,8,88,10,9,1560,155,68,12,41,6,5,35,366,180,347,37,205,22]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var C=function(){function e(e){this.offsetHelper=this.createOffsetHelper(e)}return e.prototype.createOffsetHelper=function(e){var t=document.createElement("div");return n.addClass(t,"notification-offset-helper"),e.appendChild(t),t},e.prototype.getHeight=function(t){var n=e.ROW_HEIGHT;if(!t.expanded)return n;var i=this.computePreferredHeight(t);if(e.LINE_HEIGHT<i){n+=i-e.LINE_HEIGHT}return(t.source||t.actions.primary.length>0)&&(n+=e.ROW_HEIGHT),n===e.ROW_HEIGHT&&t.collapse(!0),n},e.prototype.computePreferredHeight=function(e){var t=1;e.canCollapse&&t++,e.actions.secondary.length>0&&t++,this.offsetHelper.style.width="calc(100% - "+(34+24*t)+"px)";var i=E.render(e.message);this.offsetHelper.appendChild(i);var r=Math.max(this.offsetHelper.offsetHeight,this.offsetHelper.scrollHeight);return n.clearNode(this.offsetHelper),r},e.prototype.getTemplateId=function(e){if(e instanceof m.NotificationViewItem)return w.TEMPLATE_ID},e.ROW_HEIGHT=42,e.LINE_HEIGHT=22,e}();t.NotificationsListDelegate=C;var E=function(){
function e(){}return e.render=function(e,t){var i=document.createElement("span");if(0===e.links.length)i.textContent=e.value;else{for(var r=0,o=function(o){var s=e.links[o],a=e.value.substring(r,s.offset);a&&i.appendChild(document.createTextNode(a));var c=document.createElement("a");c.textContent=s.name,c.title=s.href,c.href=s.href,t&&t.disposeables.push(n.addDisposableListener(c,"click",function(){return t.callback(s.href)})),i.appendChild(c),r=s.offset+s.length},s=0;s<e.links.length;s++)o(s);var a=e.value.substring(r);a&&i.appendChild(document.createTextNode(a))}return i},e}(),w=function(){function e(e,t,n,i){this.actionRunner=e,this.themeService=t,this.contextMenuService=n,this.instantiationService=i}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.TEMPLATE_ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,i=Object.create(null);i.toDispose=[],i.container=document.createElement("div"),n.addClass(i.container,"notification-list-item"),
i.mainRow=document.createElement("div"),n.addClass(i.mainRow,"notification-list-item-main-row"),i.icon=document.createElement("div"),n.addClass(i.icon,"notification-list-item-icon"),i.message=document.createElement("div"),n.addClass(i.message,"notification-list-item-message");var r=document.createElement("div");return n.addClass(r,"notification-list-item-toolbar-container"),i.toolbar=new h.ActionBar(r,{ariaLabel:s.localize(0,null),actionItemProvider:function(e){if(e instanceof y.ConfigureNotificationAction){var n=new v.DropdownMenuActionItem(e,e.configurationActions,t.contextMenuService,null,t.actionRunner,null,e.class);return i.toDispose.push(n),n}return null},actionRunner:this.actionRunner}),i.toDispose.push(i.toolbar),i.detailsRow=document.createElement("div"),n.addClass(i.detailsRow,"notification-list-item-details-row"),i.source=document.createElement("div"),n.addClass(i.source,"notification-list-item-source"),i.buttonsContainer=document.createElement("div"),
n.addClass(i.buttonsContainer,"notification-list-item-buttons-container"),e.appendChild(i.container),i.container.appendChild(i.detailsRow),i.detailsRow.appendChild(i.source),i.detailsRow.appendChild(i.buttonsContainer),i.container.appendChild(i.mainRow),i.mainRow.appendChild(i.icon),i.mainRow.appendChild(i.message),i.mainRow.appendChild(r),i.progress=new S.ProgressBar(e),i.toDispose.push(u.attachProgressBarStyler(i.progress,this.themeService)),i.toDispose.push(i.progress),i.renderer=this.instantiationService.createInstance(I,i,this.actionRunner),i.toDispose.push(i.renderer),i},e.prototype.renderElement=function(e,t,n){n.renderer.setInput(e)},e.prototype.disposeTemplate=function(e){e.toDispose=f.dispose(e.toDispose)},e.TEMPLATE_ID="notification",e=a([l(1,d.IThemeService),l(2,g.IContextMenuService),l(3,p.IInstantiationService)],e)}();t.NotificationRenderer=w;var I=function(){function e(t,n,i,r,o,s){this.template=t,this.actionRunner=n,this.openerService=i,this.instantiationService=r,this.themeService=o,
this.keybindingService=s,this.inputDisposeables=[],e.closeNotificationAction||(e.closeNotificationAction=r.createInstance(y.ClearNotificationAction,y.ClearNotificationAction.ID,y.ClearNotificationAction.LABEL),e.expandNotificationAction=r.createInstance(y.ExpandNotificationAction,y.ExpandNotificationAction.ID,y.ExpandNotificationAction.LABEL),e.collapseNotificationAction=r.createInstance(y.CollapseNotificationAction,y.CollapseNotificationAction.ID,y.CollapseNotificationAction.LABEL))}return e.prototype.setInput=function(e){this.inputDisposeables=f.dispose(this.inputDisposeables),this.render(e)},e.prototype.render=function(e){var t=this;n.toggleClass(this.template.container,"expanded",e.expanded),this.inputDisposeables.push(n.addDisposableListener(this.template.container,n.EventType.MOUSE_UP,function(t){1===t.button&&(n.EventHelper.stop(t),e.close())})),this.renderSeverity(e);var i=this.renderMessage(e);this.renderSecondaryActions(e,i),this.renderSource(e),this.renderButtons(e),this.renderProgress(e),
this.inputDisposeables.push(e.onDidLabelChange(function(n){switch(n.kind){case m.NotificationViewItemLabelKind.SEVERITY:t.renderSeverity(e);break;case m.NotificationViewItemLabelKind.PROGRESS:t.renderProgress(e)}}))},e.prototype.renderSeverity=function(t){var i=this;e.SEVERITIES.forEach(function(e){(t.severity===i.toSeverity(e)?n.addClass:n.removeClass)(i.template.icon,"icon-"+e)})},e.prototype.renderMessage=function(e){var t=this;n.clearNode(this.template.message),this.template.message.appendChild(E.render(e.message,{callback:function(e){return t.openerService.open(r.default.parse(e)).then(void 0,o.onUnexpectedError)},disposeables:this.inputDisposeables}));var i=e.canCollapse&&!e.expanded&&this.template.message.scrollWidth>this.template.message.clientWidth;i?this.template.message.title=this.template.message.textContent:this.template.message.removeAttribute("title");for(var s=this.template.message.querySelectorAll("a"),a=0;a<s.length;a++)s.item(a).tabIndex=-1;return i},
e.prototype.renderSecondaryActions=function(t,n){var i=this,r=[];if(t.actions.secondary.length>0){var o=this.instantiationService.createInstance(y.ConfigureNotificationAction,y.ConfigureNotificationAction.ID,y.ConfigureNotificationAction.LABEL,t.actions.secondary);r.push(o),this.inputDisposeables.push(o)}var s=!1;t.canCollapse&&(t.expanded?s=!0:t.source?s=!0:n&&(s=!0)),s&&r.push(t.expanded?e.collapseNotificationAction:e.expandNotificationAction),r.push(e.closeNotificationAction),this.template.toolbar.clear(),this.template.toolbar.context=t,r.forEach(function(e){return i.template.toolbar.push(e,{icon:!0,label:!1,keybinding:i.getKeybindingLabel(e)})})},e.prototype.renderSource=function(e){e.expanded&&e.source?(this.template.source.innerText=s.localize(1,null,e.source),this.template.source.title=e.source):(this.template.source.innerText="",this.template.source.removeAttribute("title"))},e.prototype.renderButtons=function(e){var t=this;if(n.clearNode(this.template.buttonsContainer),e.expanded){
var i=new c.ButtonGroup(this.template.buttonsContainer,e.actions.primary.length,{title:!0});i.buttons.forEach(function(i,r){var o=e.actions.primary[r];i.label=o.label,t.inputDisposeables.push(i.onDidClick(function(i){n.EventHelper.stop(i,!0),t.actionRunner.run(o,e),e.close()})),t.inputDisposeables.push(u.attachButtonStyler(i,t.themeService))}),this.inputDisposeables.push(i)}},e.prototype.renderProgress=function(e){if(e.hasProgress()){var t=e.progress.state;t.infinite?this.template.progress.infinite().show():"number"==typeof t.total||"number"==typeof t.worked?("number"!=typeof t.total||this.template.progress.hasTotal()||this.template.progress.total(t.total),"number"==typeof t.worked&&this.template.progress.setWorked(t.worked).show()):this.template.progress.done().hide()}else this.template.progress.stop().hide()},e.prototype.toSeverity=function(e){switch(e){case"info":return _.Severity.Info;case"warning":return _.Severity.Warning;case"error":return _.Severity.Error}},e.prototype.getKeybindingLabel=function(e){
var t=this.keybindingService.lookupKeybinding(e.id);return t?t.getLabel():void 0},e.prototype.dispose=function(){this.inputDisposeables=f.dispose(this.inputDisposeables)},e.SEVERITIES=["info","warning","error"],e=a([l(2,i.IOpenerService),l(3,p.IInstantiationService),l(4,d.IThemeService),l(5,b.IKeybindingService)],e)}();t.NotificationTemplateRenderer=I}),define(e[165],t([1,0,25,15,54,33]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(t,n,i){this._modeService=n,this._fileService=i,this._schemeKey=e.Scheme.bindTo(t),this._filenameKey=e.Filename.bindTo(t),this._langIdKey=e.LangId.bindTo(t),this._resourceKey=e.Resource.bindTo(t),this._extensionKey=e.Extension.bindTo(t),this._hasResource=e.HasResource.bindTo(t),this._isFile=e.IsFile.bindTo(t)}return e.prototype.set=function(e){this._resourceKey.set(e),this._schemeKey.set(e&&e.scheme),this._filenameKey.set(e&&n.basename(e.fsPath)),
this._langIdKey.set(e&&this._modeService.getModeIdByFilenameOrFirstLine(e.fsPath)),this._extensionKey.set(e&&n.extname(e.fsPath)),this._hasResource.set(!!e),this._isFile.set(e&&this._fileService.canHandleResource(e))},e.prototype.reset=function(){this._schemeKey.reset(),this._langIdKey.reset(),this._resourceKey.reset(),this._langIdKey.reset(),this._extensionKey.reset(),this._hasResource.reset(),this._isFile.reset()},e.prototype.get=function(){return this._resourceKey.get()},e.Scheme=new i.RawContextKey("resourceScheme",void 0),e.Filename=new i.RawContextKey("resourceFilename",void 0),e.LangId=new i.RawContextKey("resourceLangId",void 0),e.Resource=new i.RawContextKey("resource",void 0),e.Extension=new i.RawContextKey("resourceExtname",void 0),e.HasResource=new i.RawContextKey("resourceSet",!1),e.IsFile=new i.RawContextKey("resourceIsFile",!1),e=a([l(0,i.IContextKeyService),l(1,r.IModeService),l(2,o.IFileService)],e)}();t.ResourceContextKey=s;!function(e){e.META_DATA_LABEL="label",
e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){var n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(function(e){var t=e.split(":"),i=t[0],r=t[1];i&&r&&n.set(i,r)});var i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}}(t.DataUri||(t.DataUri={}))}),define(e[268],t([1,0,4,40,33,43,165]),function(e,t,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n,i){var r=e.call(this)||this;if(r.fileService=i,r.resource=t,r.name=n,t.scheme===s.Schemas.data){var o=c.DataUri.parseMetaData(t);o.has(c.DataUri.META_DATA_SIZE)&&(r.size=Number(o.get(c.DataUri.META_DATA_SIZE))),r.mime=o.get(c.DataUri.META_DATA_MIME)}return r}return n(t,e),t.prototype.getName=function(){return this.name},t.prototype.getResource=function(){return this.resource},t.prototype.getSize=function(){return this.size},t.prototype.getMime=function(){return this.mime},
t.prototype.getETag=function(){return this.etag},t.prototype.load=function(){var e=this;return this.fileService.canHandleResource(this.resource)?this.fileService.resolveFile(this.resource).then(function(t){return e.etag=t.etag,e.size=t.size,e}):i.TPromise.wrap(this)},t=a([l(2,o.IFileService)],t)}(r.EditorModel);t.BinaryEditorModel=u}),define(e[491],t([1,0,40,6,268,165]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i,r){var o=e.call(this)||this;if(o.instantiationService=r,o.name=t,o.description=n,o.resource=i,!o.name||!o.description){var a=s.DataUri.parseMetaData(o.resource);o.name||(o.name=a.get(s.DataUri.META_DATA_LABEL)),o.description||(o.description=a.get(s.DataUri.META_DATA_DESCRIPTION))}return o}return n(t,e),t.prototype.getResource=function(){return this.resource},t.prototype.getTypeId=function(){return t.ID},t.prototype.getName=function(){return this.name},t.prototype.getDescription=function(){return this.description},
t.prototype.resolve=function(e){return this.instantiationService.createInstance(o.BinaryEditorModel,this.resource,this.getName()).load().then(function(e){return e})},t.prototype.matches=function(n){if(!0===e.prototype.matches.call(this,n))return!0;if(n instanceof t){return n.resource.toString()===this.resource.toString()}return!1},t.ID="workbench.editors.dataUriEditorInput",t=a([l(3,r.IInstantiationService)],t)}(i.EditorInput);t.DataUriEditorInput=c}),define(e[69],t([1,0,563,26,5,51]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WORKBENCH_BACKGROUND=function(e){switch(e.type){case"dark":return s.Color.fromHex("#252526");case"light":return s.Color.fromHex("#F3F3F3");default:return s.Color.fromHex("#000000")}},t.TAB_ACTIVE_BACKGROUND=r.registerColor("tab.activeBackground",{dark:r.editorBackground,light:r.editorBackground,hc:r.editorBackground},i.localize(0,null)),t.TAB_INACTIVE_BACKGROUND=r.registerColor("tab.inactiveBackground",{dark:"#2D2D2D",light:"#ECECEC",hc:null
},i.localize(1,null)),t.TAB_HOVER_BACKGROUND=r.registerColor("tab.hoverBackground",{dark:null,light:null,hc:null},i.localize(2,null)),t.TAB_UNFOCUSED_HOVER_BACKGROUND=r.registerColor("tab.unfocusedHoverBackground",{dark:r.transparent(t.TAB_HOVER_BACKGROUND,.5),light:r.transparent(t.TAB_HOVER_BACKGROUND,.7),hc:null},i.localize(3,null)),t.TAB_BORDER=r.registerColor("tab.border",{dark:"#252526",light:"#F3F3F3",hc:r.contrastBorder},i.localize(4,null)),t.TAB_ACTIVE_BORDER=r.registerColor("tab.activeBorder",{dark:null,light:null,hc:null},i.localize(5,null)),t.TAB_ACTIVE_BORDER_TOP=r.registerColor("tab.activeBorderTop",{dark:null,light:null,hc:null},i.localize(6,null)),t.TAB_UNFOCUSED_ACTIVE_BORDER=r.registerColor("tab.unfocusedActiveBorder",{dark:r.transparent(t.TAB_ACTIVE_BORDER,.5),light:r.transparent(t.TAB_ACTIVE_BORDER,.7),hc:null},i.localize(7,null)),t.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=r.registerColor("tab.unfocusedActiveBorderTop",{dark:r.transparent(t.TAB_ACTIVE_BORDER_TOP,.5),
light:r.transparent(t.TAB_ACTIVE_BORDER_TOP,.7),hc:null},i.localize(8,null)),t.TAB_HOVER_BORDER=r.registerColor("tab.hoverBorder",{dark:null,light:null,hc:null},i.localize(9,null)),t.TAB_UNFOCUSED_HOVER_BORDER=r.registerColor("tab.unfocusedHoverBorder",{dark:r.transparent(t.TAB_HOVER_BORDER,.5),light:r.transparent(t.TAB_HOVER_BORDER,.7),hc:null},i.localize(10,null)),t.TAB_ACTIVE_FOREGROUND=r.registerColor("tab.activeForeground",{dark:s.Color.white,light:"#333333",hc:s.Color.white},i.localize(11,null)),t.TAB_INACTIVE_FOREGROUND=r.registerColor("tab.inactiveForeground",{dark:r.transparent(t.TAB_ACTIVE_FOREGROUND,.5),light:r.transparent(t.TAB_ACTIVE_FOREGROUND,.5),hc:s.Color.white},i.localize(12,null)),t.TAB_UNFOCUSED_ACTIVE_FOREGROUND=r.registerColor("tab.unfocusedActiveForeground",{dark:r.transparent(t.TAB_ACTIVE_FOREGROUND,.5),light:r.transparent(t.TAB_ACTIVE_FOREGROUND,.7),hc:s.Color.white},i.localize(13,null)),t.TAB_UNFOCUSED_INACTIVE_FOREGROUND=r.registerColor("tab.unfocusedInactiveForeground",{
dark:r.transparent(t.TAB_INACTIVE_FOREGROUND,.5),light:r.transparent(t.TAB_INACTIVE_FOREGROUND,.5),hc:s.Color.white},i.localize(14,null)),r.registerColor("editorGroup.background",{dark:null,light:null,hc:null},i.localize(15,null),!1,i.localize(16,null)),t.EDITOR_GROUP_EMPTY_BACKGROUND=r.registerColor("editorGroup.emptyBackground",{dark:null,light:null,hc:null},i.localize(17,null)),t.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=r.registerColor("editorGroup.focusedEmptyBorder",{dark:null,light:null,hc:r.focusBorder},i.localize(18,null)),t.EDITOR_GROUP_HEADER_TABS_BACKGROUND=r.registerColor("editorGroupHeader.tabsBackground",{dark:"#252526",light:"#F3F3F3",hc:null},i.localize(19,null)),t.EDITOR_GROUP_HEADER_TABS_BORDER=r.registerColor("editorGroupHeader.tabsBorder",{dark:null,light:null,hc:r.contrastBorder},i.localize(20,null)),t.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=r.registerColor("editorGroupHeader.noTabsBackground",{dark:r.editorBackground,light:r.editorBackground,hc:r.editorBackground},i.localize(21,null)),
t.EDITOR_GROUP_BORDER=r.registerColor("editorGroup.border",{dark:"#444444",light:"#E7E7E7",hc:r.contrastBorder},i.localize(22,null)),t.EDITOR_DRAG_AND_DROP_BACKGROUND=r.registerColor("editorGroup.dropBackground",{dark:s.Color.fromHex("#53595D").transparent(.5),light:s.Color.fromHex("#3399FF").transparent(.18),hc:null},i.localize(23,null)),t.PANEL_BACKGROUND=r.registerColor("panel.background",{dark:r.editorBackground,light:r.editorBackground,hc:r.editorBackground},i.localize(24,null)),t.PANEL_BORDER=r.registerColor("panel.border",{dark:s.Color.fromHex("#808080").transparent(.35),light:s.Color.fromHex("#808080").transparent(.35),hc:r.contrastBorder},i.localize(25,null)),t.PANEL_ACTIVE_TITLE_FOREGROUND=r.registerColor("panelTitle.activeForeground",{dark:"#E7E7E7",light:"#424242",hc:s.Color.white},i.localize(26,null)),t.PANEL_INACTIVE_TITLE_FOREGROUND=r.registerColor("panelTitle.inactiveForeground",{dark:r.transparent(t.PANEL_ACTIVE_TITLE_FOREGROUND,.5),light:r.transparent(t.PANEL_ACTIVE_TITLE_FOREGROUND,.75),
hc:s.Color.white},i.localize(27,null)),t.PANEL_ACTIVE_TITLE_BORDER=r.registerColor("panelTitle.activeBorder",{dark:t.PANEL_BORDER,light:t.PANEL_BORDER,hc:r.contrastBorder},i.localize(28,null)),t.PANEL_DRAG_AND_DROP_BACKGROUND=r.registerColor("panel.dropBackground",{dark:s.Color.white.transparent(.12),light:s.Color.fromHex("#3399FF").transparent(.18),hc:s.Color.white.transparent(.12)},i.localize(29,null)),t.STATUS_BAR_FOREGROUND=r.registerColor("statusBar.foreground",{dark:"#FFFFFF",light:"#FFFFFF",hc:"#FFFFFF"},i.localize(30,null)),t.STATUS_BAR_NO_FOLDER_FOREGROUND=r.registerColor("statusBar.noFolderForeground",{dark:t.STATUS_BAR_FOREGROUND,light:t.STATUS_BAR_FOREGROUND,hc:t.STATUS_BAR_FOREGROUND},i.localize(31,null)),t.STATUS_BAR_BACKGROUND=r.registerColor("statusBar.background",{dark:"#007ACC",light:"#007ACC",hc:null},i.localize(32,null)),t.STATUS_BAR_NO_FOLDER_BACKGROUND=r.registerColor("statusBar.noFolderBackground",{dark:"#68217A",light:"#68217A",hc:null},i.localize(33,null)),
t.STATUS_BAR_BORDER=r.registerColor("statusBar.border",{dark:null,light:null,hc:r.contrastBorder},i.localize(34,null)),t.STATUS_BAR_NO_FOLDER_BORDER=r.registerColor("statusBar.noFolderBorder",{dark:t.STATUS_BAR_BORDER,light:t.STATUS_BAR_BORDER,hc:t.STATUS_BAR_BORDER},i.localize(35,null)),t.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=r.registerColor("statusBarItem.activeBackground",{dark:s.Color.white.transparent(.18),light:s.Color.white.transparent(.18),hc:s.Color.white.transparent(.18)},i.localize(36,null)),t.STATUS_BAR_ITEM_HOVER_BACKGROUND=r.registerColor("statusBarItem.hoverBackground",{dark:s.Color.white.transparent(.12),light:s.Color.white.transparent(.12),hc:s.Color.white.transparent(.12)},i.localize(37,null)),t.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=r.registerColor("statusBarItem.prominentBackground",{dark:"#388A34",light:"#388A34",hc:"#3883A4"},i.localize(38,null)),t.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=r.registerColor("statusBarItem.prominentHoverBackground",{dark:"#369432",light:"#369432",hc:"#369432"
},i.localize(39,null)),t.ACTIVITY_BAR_BACKGROUND=r.registerColor("activityBar.background",{dark:"#333333",light:"#2C2C2C",hc:"#000000"},i.localize(40,null)),t.ACTIVITY_BAR_FOREGROUND=r.registerColor("activityBar.foreground",{dark:s.Color.white,light:s.Color.white,hc:s.Color.white},i.localize(41,null)),t.ACTIVITY_BAR_BORDER=r.registerColor("activityBar.border",{dark:null,light:null,hc:r.contrastBorder},i.localize(42,null)),t.ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND=r.registerColor("activityBar.dropBackground",{dark:s.Color.white.transparent(.12),light:s.Color.white.transparent(.12),hc:s.Color.white.transparent(.12)},i.localize(43,null)),t.ACTIVITY_BAR_BADGE_BACKGROUND=r.registerColor("activityBarBadge.background",{dark:"#007ACC",light:"#007ACC",hc:"#000000"},i.localize(44,null)),t.ACTIVITY_BAR_BADGE_FOREGROUND=r.registerColor("activityBarBadge.foreground",{dark:s.Color.white,light:s.Color.white,hc:s.Color.white},i.localize(45,null)),t.SIDE_BAR_BACKGROUND=r.registerColor("sideBar.background",{dark:"#252526",
light:"#F3F3F3",hc:"#000000"},i.localize(46,null)),t.SIDE_BAR_FOREGROUND=r.registerColor("sideBar.foreground",{dark:null,light:null,hc:null},i.localize(47,null)),t.SIDE_BAR_BORDER=r.registerColor("sideBar.border",{dark:null,light:null,hc:r.contrastBorder},i.localize(48,null)),t.SIDE_BAR_TITLE_FOREGROUND=r.registerColor("sideBarTitle.foreground",{dark:t.SIDE_BAR_FOREGROUND,light:t.SIDE_BAR_FOREGROUND,hc:t.SIDE_BAR_FOREGROUND},i.localize(49,null)),t.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=r.registerColor("sideBar.dropBackground",{dark:s.Color.white.transparent(.12),light:s.Color.white.transparent(.12),hc:s.Color.white.transparent(.12)},i.localize(50,null)),t.SIDE_BAR_SECTION_HEADER_BACKGROUND=r.registerColor("sideBarSectionHeader.background",{dark:s.Color.fromHex("#808080").transparent(.2),light:s.Color.fromHex("#808080").transparent(.2),hc:null},i.localize(51,null)),t.SIDE_BAR_SECTION_HEADER_FOREGROUND=r.registerColor("sideBarSectionHeader.foreground",{dark:t.SIDE_BAR_FOREGROUND,light:t.SIDE_BAR_FOREGROUND,
hc:t.SIDE_BAR_FOREGROUND},i.localize(52,null)),t.TITLE_BAR_ACTIVE_FOREGROUND=r.registerColor("titleBar.activeForeground",{dark:"#CCCCCC",light:"#333333",hc:"#FFFFFF"},i.localize(53,null)),t.TITLE_BAR_INACTIVE_FOREGROUND=r.registerColor("titleBar.inactiveForeground",{dark:r.transparent(t.TITLE_BAR_ACTIVE_FOREGROUND,.6),light:r.transparent(t.TITLE_BAR_ACTIVE_FOREGROUND,.6),hc:null},i.localize(54,null)),t.TITLE_BAR_ACTIVE_BACKGROUND=r.registerColor("titleBar.activeBackground",{dark:"#3C3C3C",light:"#DDDDDD",hc:"#000000"},i.localize(55,null)),t.TITLE_BAR_INACTIVE_BACKGROUND=r.registerColor("titleBar.inactiveBackground",{dark:r.transparent(t.TITLE_BAR_ACTIVE_BACKGROUND,.6),light:r.transparent(t.TITLE_BAR_ACTIVE_BACKGROUND,.6),hc:null},i.localize(56,null)),t.TITLE_BAR_BORDER=r.registerColor("titleBar.border",{dark:null,light:null,hc:r.contrastBorder},i.localize(57,null)),t.NOTIFICATIONS_CENTER_BORDER=r.registerColor("notificationCenter.border",{dark:null,light:null,hc:r.contrastBorder},i.localize(58,null)),
t.NOTIFICATIONS_TOAST_BORDER=r.registerColor("notificationToast.border",{dark:null,light:null,hc:r.contrastBorder},i.localize(59,null)),t.NOTIFICATIONS_FOREGROUND=r.registerColor("notifications.foreground",{dark:null,light:null,hc:null},i.localize(60,null)),t.NOTIFICATIONS_BACKGROUND=r.registerColor("notifications.background",{dark:r.editorWidgetBackground,light:r.editorWidgetBackground,hc:r.editorWidgetBackground},i.localize(61,null)),t.NOTIFICATIONS_LINKS=r.registerColor("notificationLink.foreground",{dark:r.textLinkForeground,light:r.textLinkForeground,hc:r.textLinkForeground},i.localize(62,null)),t.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=r.registerColor("notificationCenterHeader.foreground",{dark:null,light:null,hc:null},i.localize(63,null)),t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=r.registerColor("notificationCenterHeader.background",{dark:r.lighten(t.NOTIFICATIONS_BACKGROUND,.3),light:r.darken(t.NOTIFICATIONS_BACKGROUND,.05),hc:t.NOTIFICATIONS_BACKGROUND},i.localize(64,null)),
t.NOTIFICATIONS_BORDER=r.registerColor("notifications.border",{dark:t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,light:t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,hc:t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND},i.localize(65,null));var a=function(e){function t(t){var n=e.call(this)||this;return n.themeService=t,n.theme=t.getTheme(),n._register(n.themeService.onThemeChange(function(e){return n.onThemeChange(e)})),n}return n(t,e),Object.defineProperty(t.prototype,"toUnbind",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),t.prototype.onThemeChange=function(e){this.theme=e,this.updateStyles()},t.prototype.updateStyles=function(){},t.prototype.getColor=function(e,t){var n=this.theme.getColor(e);return n&&t&&(n=t(n,this.theme)),n?n.toString():null},t}(o.Disposable);t.Themable=a}),define(e[494],t([1,0,8,58,6,69,12,26,1076,347,206,35,4,850]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t,n,i,r,o){var s=e.call(this,r)||this
;return s.container=t,s.options=n,s.instantiationService=i,s.contextMenuService=o,s.viewModel=[],s}return n(t,e),t.prototype.show=function(e){this.isVisible?e&&this.list.domFocus():(this.list||this.createNotificationsList(),this.isVisible=!0,e&&this.list.domFocus())},t.prototype.createNotificationsList=function(){var e=this;this.listContainer=document.createElement("div"),i.addClass(this.listContainer,"notifications-list-container");var t=this.instantiationService.createInstance(h.NotificationActionRunner);this.toUnbind.push(t);var n=this.instantiationService.createInstance(d.NotificationRenderer,t);this.list=this.instantiationService.createInstance(r.WorkbenchList,this.listContainer,new d.NotificationsListDelegate(this.listContainer),[n],this.options),this.toUnbind.push(this.list);var o=this.instantiationService.createInstance(h.CopyNotificationMessageAction,h.CopyNotificationMessageAction.ID,h.CopyNotificationMessageAction.LABEL);this.toUnbind.push(o),this.toUnbind.push(this.list.onContextMenu(function(n){
e.contextMenuService.showContextMenu({getAnchor:function(){return n.anchor},getActions:function(){return g.TPromise.as([o])},getActionsContext:function(){return n.element},actionRunner:t})})),this.toUnbind.push(this.list.onMouseDblClick(function(e){return e.element.toggle()}));var s=i.trackFocus(this.list.getHTMLElement());s.onDidBlur(function(){document.hasFocus()&&e.list.setFocus([])}),this.toUnbind.push(s),p.NotificationFocusedContext.bindTo(this.list.contextKeyService),this.toUnbind.push(this.list.onSelectionChange(function(t){t.indexes.length>0&&e.list.setSelection([])})),this.container.appendChild(this.listContainer),this.updateStyles()},t.prototype.updateNotificationsList=function(e,t,n){var r;void 0===n&&(n=[]);var o,s=i.isAncestor(document.activeElement,this.listContainer),a=this.list.getFocus()[0],c=this.viewModel[a];if("number"==typeof a&&(o=this.list.getRelativeTop(a)),(r=this.viewModel).splice.apply(r,[e,t].concat(n)),this.list.splice(e,t,n),this.list.layout(),
0===this.viewModel.length)this.hide();else if("number"==typeof a){var l=0;if(c){var u=this.viewModel.indexOf(c);-1===u&&(u=a-1),u<this.viewModel.length&&u>=0&&(l=u)}"number"==typeof o&&this.list.reveal(l,o),this.list.setFocus([l])}s&&this.list.domFocus()},t.prototype.hide=function(){this.isVisible&&this.list&&(this.isVisible=!1,this.list.splice(0,this.viewModel.length),this.viewModel=[])},t.prototype.focusFirst=function(){this.isVisible&&this.list&&(this.list.focusFirst(),this.list.domFocus())},t.prototype.hasFocus=function(){return!(!this.isVisible||!this.list)&&i.isAncestor(document.activeElement,this.listContainer)},t.prototype.updateStyles=function(){if(this.listContainer){var e=this.getColor(s.NOTIFICATIONS_FOREGROUND);this.listContainer.style.color=e?e.toString():null;var t=this.getColor(s.NOTIFICATIONS_BACKGROUND);this.listContainer.style.background=t?t.toString():null;var n=this.getColor(u.contrastBorder);this.listContainer.style.outlineColor=n?n.toString():null}},t.prototype.layout=function(e,t){
this.list&&(this.listContainer.style.width=e+"px","number"==typeof t&&(this.list.getHTMLElement().style.maxHeight=t+"px"),this.list.layout())},t.prototype.dispose=function(){this.hide(),e.prototype.dispose.call(this)},t=a([l(2,o.IInstantiationService),l(3,c.IThemeService),l(4,f.IContextMenuService)],t)}(s.Themable);t.NotificationsList=v,c.registerThemingParticipant(function(e,t){var n=e.getColor(s.NOTIFICATIONS_LINKS);n&&t.addRule(".monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a { color: "+n+"; }");var i=e.getColor(u.focusBorder);i&&t.addRule("\n\t\t.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus {\n\t\t\toutline-color: "+i+";\n\t\t}")})}),define(e[270],t([1,0,225,69]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var r=e.call(this,n)||this;return r.id=t,r.componentMemento=new i.Memento(r.id),r}return n(t,e),
t.prototype.getId=function(){return this.id},t.prototype.getMemento=function(e,t){return void 0===t&&(t=i.Scope.GLOBAL),this.componentMemento.getMemento(e,t)},t.prototype.saveMemento=function(){this.componentMemento.saveMemento()},t.prototype.shutdown=function(){this.saveMemento()},t}(r.Themable);t.Component=o}),define(e[497],t([1,0,4,23,270,7,8]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i){var r=e.call(this,t,i)||this;return r._telemetryService=n,r.visible=!1,r._onTitleAreaUpdate=new s.Emitter,r._onDidFocus=new s.Emitter,r}return n(t,e),t.prototype.getTitle=function(){return null},Object.defineProperty(t.prototype,"telemetryService",{get:function(){return this._telemetryService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onTitleAreaUpdate",{get:function(){return this._onTitleAreaUpdate.event},enumerable:!0,configurable:!0}),t.prototype.create=function(e){return this.parent=e,i.TPromise.as(null)},
t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this)},t.prototype.getContainer=function(){return this.parent},Object.defineProperty(t.prototype,"onDidFocus",{get:function(){var e=this;return this._focusTracker=a.trackFocus(this.getContainer()),this._focusListenerDisposable=this._focusTracker.onDidFocus(function(){e._onDidFocus.fire()}),this._onDidFocus.event},enumerable:!0,configurable:!0}),t.prototype.setVisible=function(e){return this.visible=e,i.TPromise.as(null)},t.prototype.focus=function(){},t.prototype.getActions=function(){return[]},t.prototype.getSecondaryActions=function(){return[]},t.prototype.getContextMenuActions=function(){return[]},t.prototype.getActionItem=function(e){return null},t.prototype.getActionRunner=function(){return this.actionRunner||(this.actionRunner=new r.ActionRunner),this.actionRunner},t.prototype.updateTitleArea=function(){this._onTitleAreaUpdate.fire()},t.prototype.isVisible=function(){return this.visible},t.prototype.getControl=function(){return null},
t.prototype.dispose=function(){this._onTitleAreaUpdate.dispose(),this._onDidFocus.dispose(),this._focusTracker&&this._focusTracker.dispose(),this._focusListenerDisposable&&this._focusListenerDisposable.dispose(),e.prototype.dispose.call(this)},t}(o.Component);t.Composite=c;var l=function(){function e(e,t,n,i,r,o){this.ctor=e,this.id=t,this.name=n,this.cssClass=i,this.order=r,this.enabled=!0,this.keybindingId=o}return e.prototype.instantiate=function(e){return e.createInstance(this.ctor)},e}();t.CompositeDescriptor=l;var u=function(){function e(){this._onDidRegister=new s.Emitter,this.onDidRegister=this._onDidRegister.event,this.composites=[]}return e.prototype.registerComposite=function(e){null===this.compositeById(e.id)&&(this.composites.push(e),this._onDidRegister.fire(e))},e.prototype.getComposite=function(e){return this.compositeById(e)},e.prototype.getComposites=function(){return this.composites.slice(0)},e.prototype.compositeById=function(e){
for(var t=0;t<this.composites.length;t++)if(this.composites[t].id===e)return this.composites[t];return null},e}();t.CompositeRegistry=u}),define(e[108],t([1,0,8,16,497,23]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(o.Composite);t.Panel=a;var c=function(e){function t(t,n,i,r,o,s){return e.call(this,t,n,i,r,o,s)||this}return n(t,e),t}(o.CompositeDescriptor);t.PanelDescriptor=c;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.registerPanel=function(t){e.prototype.registerComposite.call(this,t)},t.prototype.getPanels=function(){return this.getComposites()},t.prototype.setDefaultPanelId=function(e){this.defaultPanelId=e},t.prototype.getDefaultPanelId=function(){return this.defaultPanelId},t}(o.CompositeRegistry);t.PanelRegistry=l;var u=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,s)||this;return a.panelService=r,
a.partService=o,a.panelId=i,a}return n(t,e),t.prototype.run=function(){return this.isPanelShowing()?this.partService.setPanelHidden(!0):this.panelService.openPanel(this.panelId,!0)},t.prototype.isPanelShowing=function(){var e=this.panelService.getActivePanel();return e&&e.getId()===this.panelId},t.prototype.isPanelFocused=function(){var e=this.panelService.getActivePanel(),t=document.activeElement;return e&&t&&i.isAncestor(t,e.getContainer())},t}(s.Action);t.TogglePanelAction=u,t.Extensions={Panels:"workbench.contributions.panels"},r.Registry.add(t.Extensions.Panels,new l)}),define(e[200],t([1,0,270,8,820]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n,i){var r=e.call(this,t,i)||this;return r.options=n,r}return n(t,e),t.prototype.onThemeChange=function(t){this.parent&&e.prototype.onThemeChange.call(this,t)},t.prototype.create=function(e){this.parent=e,this.titleArea=this.createTitleArea(e),this.contentArea=this.createContentArea(e),
this.partLayout=new s(this.parent,this.options,this.titleArea,this.contentArea),this.updateStyles()},t.prototype.getContainer=function(){return this.parent},t.prototype.createTitleArea=function(e){return null},t.prototype.getTitleArea=function(){return this.titleArea},t.prototype.createContentArea=function(e){return null},t.prototype.getContentArea=function(){return this.contentArea},t.prototype.layout=function(e){return this.partLayout.layout(e)},t}(i.Component);t.Part=o;var s=function(){function e(e,t,n,i){this.options=t,this.contentArea=i}return e.prototype.layout=function(e){var t,n=e.width,i=e.height,o=[];t=this.options&&this.options.hasTitle?new r.Dimension(n,Math.min(i,35)):new r.Dimension(0,0);var s=new r.Dimension(n,i-t.height);return this.options&&"function"==typeof this.options.borderWidth&&(s.width-=this.options.borderWidth()),o.push(t),o.push(s),this.contentArea&&r.size(this.contentArea,s.width,s.height),o},e}();t.PartLayout=s}),
define(e[124],t([1,0,4,108,40,50,7,30,223]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.minimumWidth=l.DEFAULT_EDITOR_MIN_DIMENSIONS.width,r.maximumWidth=l.DEFAULT_EDITOR_MAX_DIMENSIONS.width,r.minimumHeight=l.DEFAULT_EDITOR_MIN_DIMENSIONS.height,r.maximumHeight=l.DEFAULT_EDITOR_MAX_DIMENSIONS.height,r.onDidSizeConstraintsChange=a.Event.None,r}return n(t,e),Object.defineProperty(t.prototype,"input",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"group",{get:function(){return this._group},enumerable:!0,configurable:!0}),t.prototype.setInput=function(e,t,n){return this._input=e,this._options=t,i.TPromise.wrap(null)},t.prototype.clearInput=function(){this._input=null,this._options=null},t.prototype.setOptions=function(e){
this._options=e},t.prototype.create=function(t){var n=e.prototype.create.call(this,t);return this.createEditor(t),n},t.prototype.setVisible=function(t,n){var i=e.prototype.setVisible.call(this,t);return this.setEditorVisible(t,n),i},t.prototype.setEditorVisible=function(e,t){this._group=t},t.prototype.getEditorMemento=function(e,n,i,r){void 0===r&&(r=10);var o=""+this.getId()+i,s=t.EDITOR_MEMENTOS.get(o);return s||(s=new d(this.getId(),i,this.getMemento(e),r,n),t.EDITOR_MEMENTOS.set(o,s)),s},t.prototype.shutdown=function(){var n=this;t.EDITOR_MEMENTOS.forEach(function(e){e.id===n.getId()&&e.shutdown()}),e.prototype.shutdown.call(this)},t.prototype.dispose=function(){this._input=null,this._options=null,e.prototype.dispose.call(this)},t.EDITOR_MEMENTOS=new Map,t}(r.Panel);t.BaseEditor=u;var d=function(){function e(e,t,n,i,r){this._id=e,this.key=t,this.memento=n,this.limit=i,this.editorGroupService=r,this.cleanedUp=!1}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,
configurable:!0}),e.prototype.saveState=function(e,t,n){var i=this,r=this.doGetResource(t);if(r&&e){var s=this.doLoad(),c=s.get(r.toString());c||(c=Object.create(null),s.set(r.toString(),c)),c[e.id]=n,t instanceof o.EditorInput&&a.once(t.onDispose)(function(){i.clearState(r)})}},e.prototype.loadState=function(e,t){var n=this.doGetResource(t);if(n&&e){var i=this.doLoad().get(n.toString());return i?i[e.id]:void 0}},e.prototype.clearState=function(e){var t=this.doGetResource(e);if(t){this.doLoad().delete(t.toString())}},e.prototype.doGetResource=function(e){return e instanceof o.EditorInput?e.getResource():e},e.prototype.doLoad=function(){if(!this.cache){this.cache=new s.LRUCache(this.limit);var e=this.memento[this.key];Array.isArray(e)&&this.cache.fromJSON(e)}return this.cache},e.prototype.shutdown=function(){var e=this.doLoad();this.cleanedUp||(this.cleanUp(),this.cleanedUp=!0),this.memento[this.key]=e.toJSON()},e.prototype.cleanUp=function(){var e=this,t=this.doLoad();t.forEach(function(n,i){
Object.keys(n).forEach(function(r){var o=Number(r);e.editorGroupService.getGroup(o)||(delete n[o],c.isEmptyObject(n)&&t.delete(i))})})},e}();t.EditorMemento=d}),define(e[147],t([1,0,16,124,30]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){this.ctor=e,this.id=t,this.name=n}return e.prototype.instantiate=function(e){return e.createInstance(this.ctor)},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.name},e.prototype.describes=function(e){return e instanceof i.BaseEditor&&e.getId()===this.id},e}();t.EditorDescriptor=o;var s=function(){function e(){this.editors=[]}return e.prototype.registerEditor=function(e,t){var n=[];r.isArray(t)?n=t:n.push(t),e.__$inputDescriptors=n,this.editors.push(e)},e.prototype.getEditor=function(e){var t=this,n=function(e,i){for(var r=[],o=0;o<t.editors.length;o++)for(var s=t.editors[o],a=s.__$inputDescriptors,c=0;c<a.length;c++){var l=a[c].ctor;if(!i&&e.constructor===l){
r.push(s);break}if(i&&e instanceof l){r.push(s);break}}return i||0!==r.length?r:n(e,!0)},i=n(e);if(i&&i.length>0){var r=e.getPreferredEditorId(i.map(function(e){return e.getId()}));return r?this.getEditorById(r):i[0]}return null},e.prototype.getEditorById=function(e){for(var t=0;t<this.editors.length;t++){var n=this.editors[t];if(n.getId()===e)return n}return null},e.prototype.getEditors=function(){return this.editors.slice(0)},e.prototype.setEditors=function(e){this.editors=e},e.prototype.getEditorInputs=function(){for(var e=[],t=0;t<this.editors.length;t++){var n=this.editors[t].__$inputDescriptors;e.push.apply(e,n.map(function(e){return e.ctor}))}return e},e}();t.Extensions={Editors:"workbench.contributions.editors"},n.Registry.add(t.Extensions.Editors,new s)}),define(e[374],t([1,0,4,8,16,124,28,6,12,26,147,183,7]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(n,i,o){var s=e.call(this,t.ID,n,o)||this
;return s.instantiationService=i,s.dimension=new r.Dimension(0,0),s.onDidCreateEditors=s._register(new g.Emitter),s._onDidSizeConstraintsChange=s._register(new g.Relay),s.onDidSizeConstraintsChange=g.anyEvent(s.onDidCreateEditors.event,s._onDidSizeConstraintsChange.event),s}return n(t,e),Object.defineProperty(t.prototype,"minimumMasterWidth",{get:function(){return this.masterEditor?this.masterEditor.minimumWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumMasterWidth",{get:function(){return this.masterEditor?this.masterEditor.maximumWidth:Number.POSITIVE_INFINITY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minimumMasterHeight",{get:function(){return this.masterEditor?this.masterEditor.minimumHeight:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumMasterHeight",{get:function(){return this.masterEditor?this.masterEditor.maximumHeight:Number.POSITIVE_INFINITY},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"minimumDetailsWidth",{get:function(){return this.detailsEditor?this.detailsEditor.minimumWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumDetailsWidth",{get:function(){return this.detailsEditor?this.detailsEditor.maximumWidth:Number.POSITIVE_INFINITY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minimumDetailsHeight",{get:function(){return this.detailsEditor?this.detailsEditor.minimumHeight:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumDetailsHeight",{get:function(){return this.detailsEditor?this.detailsEditor.maximumHeight:Number.POSITIVE_INFINITY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minimumWidth",{get:function(){return this.minimumMasterWidth+this.minimumDetailsWidth},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumWidth",{get:function(){return this.maximumMasterWidth+this.maximumDetailsWidth},set:function(e){},
enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minimumHeight",{get:function(){return this.minimumMasterHeight+this.minimumDetailsHeight},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumHeight",{get:function(){return this.maximumMasterHeight+this.maximumDetailsHeight},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.createEditor=function(e){var t=this;r.addClass(e,"side-by-side-editor"),this.splitview=new f.SplitView(e,{orientation:f.Orientation.HORIZONTAL}),this._register(this.splitview),this._register(this.splitview.onDidSashReset(function(){return t.splitview.distributeViewSizes()})),this.detailsEditorContainer=r.$(".details-editor-container"),this.splitview.addView({element:this.detailsEditorContainer,layout:function(e){return t.detailsEditor&&t.detailsEditor.layout(new r.Dimension(e,t.dimension.height))},minimumSize:220,maximumSize:Number.POSITIVE_INFINITY,onDidChange:g.Event.None},f.Sizing.Distribute),
this.masterEditorContainer=r.$(".master-editor-container"),this.splitview.addView({element:this.masterEditorContainer,layout:function(e){return t.masterEditor&&t.masterEditor.layout(new r.Dimension(e,t.dimension.height))},minimumSize:220,maximumSize:Number.POSITIVE_INFINITY,onDidChange:g.Event.None},f.Sizing.Distribute),this.updateStyles()},t.prototype.setInput=function(t,n,i){var r=this,o=this.input;return e.prototype.setInput.call(this,t,n,i).then(function(){return r.updateInput(o,t,n,i)})},t.prototype.setOptions=function(e){this.masterEditor&&this.masterEditor.setOptions(e)},t.prototype.setEditorVisible=function(t,n){this.masterEditor&&this.masterEditor.setVisible(t,n),this.detailsEditor&&this.detailsEditor.setVisible(t,n),e.prototype.setEditorVisible.call(this,t,n)},t.prototype.clearInput=function(){this.masterEditor&&this.masterEditor.clearInput(),this.detailsEditor&&this.detailsEditor.clearInput(),this.disposeEditors(),e.prototype.clearInput.call(this)},t.prototype.focus=function(){
this.masterEditor&&this.masterEditor.focus()},t.prototype.layout=function(e){this.dimension=e,this.splitview.layout(e.width)},t.prototype.getControl=function(){return this.masterEditor?this.masterEditor.getControl():null},t.prototype.getMasterEditor=function(){return this.masterEditor},t.prototype.getDetailsEditor=function(){return this.detailsEditor},t.prototype.updateInput=function(e,t,n,r){return t.matches(e)?i.TPromise.join([this.detailsEditor.setInput(t.details,null,r),this.masterEditor.setInput(t.master,n,r)]).then(function(){}):(e&&this.disposeEditors(),this.setNewInput(t,n,r))},t.prototype.setNewInput=function(e,t,n){var i=this._createEditor(e.details,this.detailsEditorContainer),r=this._createEditor(e.master,this.masterEditorContainer);return this.onEditorsCreated(i,r,e.details,e.master,t,n)},t.prototype._createEditor=function(e,t){var n=o.Registry.as(p.Extensions.Editors).getEditor(e).instantiate(this.instantiationService);return n.create(t),n.setVisible(this.isVisible(),this.group),n},
t.prototype.onEditorsCreated=function(e,t,n,r,o,s){var a=this;return this.detailsEditor=e,this.masterEditor=t,this._onDidSizeConstraintsChange.input=g.anyEvent(g.mapEvent(e.onDidSizeConstraintsChange,function(){}),g.mapEvent(t.onDidSizeConstraintsChange,function(){})),this.onDidCreateEditors.fire(),i.TPromise.join([this.detailsEditor.setInput(n,null,s),this.masterEditor.setInput(r,o,s)]).then(function(){return a.focus()})},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this),this.masterEditorContainer&&(this.masterEditorContainer.style.boxShadow="-6px 0 5px -5px "+this.getColor(h.scrollbarShadow))},t.prototype.disposeEditors=function(){this.detailsEditor&&(this.detailsEditor.dispose(),this.detailsEditor=null),this.masterEditor&&(this.masterEditor.dispose(),this.masterEditor=null),this.detailsEditorContainer.innerHTML="",this.masterEditorContainer.innerHTML=""},t.prototype.dispose=function(){this.disposeEditors(),e.prototype.dispose.call(this)},t.ID="workbench.editor.sidebysideEditor",
t=a([l(0,c.ITelemetryService),l(1,u.IInstantiationService),l(2,d.IThemeService)],t)}(s.BaseEditor);t.SideBySideEditor=v}),define(e[1089],t([1,0,1540,78,200,450,31,12,42,15,23,74,41,8,69,37,11,356,84,17,51,7,5,106,150,62,36,1053,845]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var A=function(e){function t(t,n,r,o,s,a,l,u,d,h){var f=e.call(this,t,{hasTitle:!1},n)||this;if(f.menubarService=r,f.menuService=o,f.windowService=s,f.windowsService=a,f.contextKeyService=l,f.keybindingService=u,f.configurationService=d,f.environmentService=h,f.keys=["files.autoSave","window.menuBarVisibility","editor.multiCursorModifier","workbench.sideBar.location","workbench.statusBar.visible","workbench.activityBar.visible","window.enableMenuBarMnemonics"],f.topLevelTitles={File:i.localize(0,null),Edit:i.localize(1,null),Selection:i.localize(2,null),View:i.localize(3,null),Go:i.localize(4,null),Debug:i.localize(5,null),Tasks:i.localize(6,null),
Help:i.localize(7,null)},f.initialSizing={},f.topLevelMenus={File:f.menuService.createMenu(c.MenuId.MenubarFileMenu,f.contextKeyService),Edit:f.menuService.createMenu(c.MenuId.MenubarEditMenu,f.contextKeyService),Selection:f.menuService.createMenu(c.MenuId.MenubarSelectionMenu,f.contextKeyService),View:f.menuService.createMenu(c.MenuId.MenubarViewMenu,f.contextKeyService),Go:f.menuService.createMenu(c.MenuId.MenubarGoMenu,f.contextKeyService),Debug:f.menuService.createMenu(c.MenuId.MenubarDebugMenu,f.contextKeyService),Tasks:f.menuService.createMenu(c.MenuId.MenubarTasksMenu,f.contextKeyService),Help:f.menuService.createMenu(c.MenuId.MenubarHelpMenu,f.contextKeyService)},b.isMacintosh&&(f.topLevelMenus.Window=f.menuService.createMenu(c.MenuId.MenubarWindowMenu,f.contextKeyService)),f.actionRunner=new p.ActionRunner,f.actionRunner.onDidBeforeRun(function(){f.focusedMenu&&f.focusedMenu.holder&&f.focusedMenu.holder.hide()}),f._onVisibilityChange=new w.Emitter,
b.isMacintosh||"custom"!==f.currentTitlebarStyleSetting){for(var g=0,v=Object.keys(f.topLevelMenus);g<v.length;g++){var m=v[g];f.topLevelMenus[m].onDidChange(function(){return f.setupMenubar()})}f.setupMenubar()}return f.isFocused=!1,f.windowService.getRecentlyOpened().then(function(e){f.recentlyOpened=e}),f.registerListeners(),f}return n(t,e),Object.defineProperty(t.prototype,"currentEnableMenuBarMnemonics",{get:function(){var e=this.configurationService.getValue("window.enableMenuBarMnemonics");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentMultiCursorSetting",{get:function(){return this.configurationService.getValue("editor.multiCursorModifier")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentAutoSaveSetting",{get:function(){return this.configurationService.getValue("files.autoSave")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentSidebarPosition",{get:function(){
return this.configurationService.getValue("workbench.sideBar.location")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentStatusBarVisibility",{get:function(){var e=this.configurationService.getValue("workbench.statusBar.visible");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentActivityBarVisibility",{get:function(){var e=this.configurationService.getValue("workbench.activityBar.visible");return"boolean"!=typeof e&&(e=!0),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentMenubarVisibility",{get:function(){return this.configurationService.getValue("window.menuBarVisibility")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTitlebarStyleSetting",{get:function(){return this.configurationService.getValue("window.titleBarStyle")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},set:function(e){
this._isFocused=e,this._isFocused||"toggle"!==this.currentMenubarVisibility||this.container&&this.hideMenubar()},enumerable:!0,configurable:!0}),t.prototype.onDidChangeFullscreen=function(){this.updateStyles()},t.prototype.onConfigurationUpdated=function(e){this.keys.some(function(t){return e.affectsConfiguration(t)})&&this.setupMenubar()},t.prototype.hideMenubar=function(){this._onVisibilityChange.fire(new v.Dimension(0,0)),this.container.style("visibility","hidden")},t.prototype.showMenubar=function(){this._onVisibilityChange.fire(this.getMenubarItemsDimensions()),this.container.style("visibility",null)},t.prototype.onModifierKeyToggled=function(e){if("toggle"===this.currentMenubarVisibility){!((!this._modifierKeyStatus||!this._modifierKeyStatus.altKey)&&e.altKey)||e.ctrlKey||e.shiftKey?this.isFocused||this.hideMenubar():this.showMenubar()}this._modifierKeyStatus=e,this.currentEnableMenuBarMnemonics&&this.customMenus&&this.customMenus.forEach(function(t){var n=t.titleElement.child();if(n){var i=n.child()
;i&&i.style("text-decoration",e.altKey?"underline":null)}})},t.prototype.onRecentlyOpenedChange=function(){var e=this;this.windowService.getRecentlyOpened().then(function(t){e.recentlyOpened=t,e.setupMenubar()})},t.prototype.registerListeners=function(){var e=this;r.onDidChangeFullscreen(function(){return e.onDidChangeFullscreen()}),this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated(t)}),this.windowsService.onRecentlyOpenedChange(function(){e.onRecentlyOpenedChange()}),this.keybindingService.onDidUpdateKeybindings(function(){return e.setupMenubar()}),L.getInstance().event(this.onModifierKeyToggled,this)},t.prototype.setupMenubar=function(){b.isMacintosh||"custom"!==this.currentTitlebarStyleSetting?this.setupNativeMenubar():this.setupCustomMenubar()},t.prototype.setupNativeMenubar=function(){b.isMacintosh&&b.isWindows&&this.menubarService.updateMenubar(this.windowService.getCurrentWindowId(),this.getMenubarMenus())},t.prototype.registerMnemonic=function(e,t){
e.accessKey=t.toLocaleLowerCase()},t.prototype.setCheckedStatus=function(e){switch(e.id){case"workbench.action.toggleAutoSave":e.checked="off"!==this.currentAutoSaveSetting}},t.prototype.calculateActionLabel=function(e){var t=e.label;switch(e.id){case"workbench.action.toggleMultiCursorModifier":t="ctrlCmd"===this.currentMultiCursorSetting?i.localize(8,null):b.isMacintosh?i.localize(9,null):i.localize(10,null);break;case"workbench.action.toggleSidebarPosition":t="right"!==this.currentSidebarPosition?i.localize(11,null):i.localize(12,null);break;case"workbench.action.toggleStatusbarVisibility":t=this.currentStatusBarVisibility?i.localize(13,null):i.localize(14,null);break;case"workbench.action.toggleActivityBarVisibility":t=this.currentActivityBarVisibility?i.localize(15,null):i.localize(16,null)}return this.currentEnableMenuBarMnemonics?t:t.replace(/&&(.)/g,"$1")},t.prototype.createOpenRecentMenuAction=function(e,t,n){var i,r,o=this
;return x.isSingleFolderWorkspaceIdentifier(e)||"string"==typeof e?(i=k.getPathLabel(e,this.environmentService),r=e):(i=x.getWorkspaceLabel(e,this.environmentService,{verbose:!0}),r=e.configPath),new p.Action(t,i,void 0,void 0,function(e){var t=e&&(!b.isMacintosh&&(e.ctrlKey||e.shiftKey)||b.isMacintosh&&(e.metaKey||e.altKey));return o.windowService.openWindow([r],{forceNewWindow:t,forceOpenWorkspaceAsFile:n})})},t.prototype.getOpenRecentActions=function(){if(!this.recentlyOpened)return[];var e=this.recentlyOpened,n=e.workspaces,i=e.files,r=[];if(n.length>0){for(o=0;o<t.MAX_MENU_RECENT_ENTRIES&&o<n.length;o++)r.push(this.createOpenRecentMenuAction(n[o],"openRecentWorkspace",!1));r.push(new g.Separator)}if(i.length>0){for(var o=0;o<t.MAX_MENU_RECENT_ENTRIES&&o<i.length;o++)r.push(this.createOpenRecentMenuAction(i[o],"openRecentFile",!1));r.push(new g.Separator)}return r},t.prototype.insertActionsBefore=function(e,t){switch(e.id){case"workbench.action.openRecent":t.push.apply(t,this.getOpenRecentActions())}},
t.prototype.setupCustomMenubar=function(){var e=this;this.container.empty(),this.container.attr("role","menubar"),this.customMenus=[];for(var t=0,n=function(n){var r=i.topLevelMenus[n],o=t++,s=f.$(i.container).div({class:"menubar-menu-button"}),a=i.topLevelTitles[n].replace(/&&(.)/g,i.currentEnableMenuBarMnemonics?"<mnemonic>$1</mnemonic>":"$1"),l=i.topLevelTitles[n].replace(/&&(.)/g,"$1");if(f.$(s).div({class:"menubar-menu-title","aria-hidden":!0}).innerHtml(a),s.attr("aria-label",l),s.attr("role","menu"),i.currentEnableMenuBarMnemonics){var u=/&&(.)/g.exec(i.topLevelTitles[n]);u&&u[1]&&i.registerMnemonic(s.getHTMLElement(),u[1])}i.customMenus.push({title:n,titleElement:s});var d=function(t,n){n.splice(0);for(var i=0,r=t.getActions();i<r.length;i++){for(var o=0,s=r[i][1];o<s.length;o++){var a=s[o];if(e.insertActionsBefore(a,n),a instanceof c.SubmenuItemAction){var l=e.menuService.createMenu(a.item.submenu,e.contextKeyService),u=[];d(l,u),n.push(new S.SubmenuAction(a.label,u))
}else a.label=e.calculateActionLabel(a),e.setCheckedStatus(a),n.push(a)}n.push(new g.Separator)}n.pop()};i.customMenus[o].actions=[],r.onDidChange(function(){return d(r,e.customMenus[o].actions)}),d(r,i.customMenus[o].actions),i.customMenus[o].titleElement.on(v.EventType.CLICK,function(t){e._modifierKeyStatus&&(e._modifierKeyStatus.shiftKey||e._modifierKeyStatus.ctrlKey)||(e.toggleCustomMenu(o),e.isFocused=!e.isFocused)}),i.customMenus[o].titleElement.getHTMLElement().onmouseenter=function(){e.isFocused&&!e.isCurrentMenu(o)&&e.toggleCustomMenu(o)},i.customMenus[o].titleElement.getHTMLElement().onmouseleave=function(){e.isFocused||e.cleanupCustomMenu()},i.customMenus[o].titleElement.getHTMLElement().onblur=function(){e.cleanupCustomMenu()}},i=this,r=0,o=Object.keys(this.topLevelMenus);r<o.length;r++){n(o[r])}this.container.off(v.EventType.KEY_DOWN),this.container.on(v.EventType.KEY_DOWN,function(t){var n=new _.StandardKeyboardEvent(t),i=!0
;n.equals(15)||n.shiftKey&&2===n.keyCode?e.focusPrevious():n.equals(17)||n.equals(2)?e.focusNext():i=!1,i&&(n.preventDefault(),n.stopPropagation())})},t.prototype.focusPrevious=function(){if(this.focusedMenu){var e=(this.focusedMenu.index-1+this.customMenus.length)%this.customMenus.length;e!==this.focusedMenu.index&&this.toggleCustomMenu(e)}},t.prototype.focusNext=function(){if(this.focusedMenu){var e=(this.focusedMenu.index+1)%this.customMenus.length;e!==this.focusedMenu.index&&this.toggleCustomMenu(e)}},t.prototype.getMenubarMenus=function(){for(var e=this,t={},n=function(n){for(var r={items:[]},o=0,s=i.topLevelMenus[n].getActions();o<s.length;o++){s[o][1].forEach(function(t){var n={id:t.id,label:t.label,checked:t.checked,enabled:t.enabled};e.setCheckedStatus(n),n.label=e.calculateActionLabel(n),r.items.push(n)}),r.items.push({id:"vscode.menubar.separator"})}r.items.length>0&&r.items.pop(),t[n]=r},i=this,r=0,o=Object.keys(this.topLevelMenus);r<o.length;r++){n(o[r])}return t},
t.prototype.isCurrentMenu=function(e){return!!this.focusedMenu&&this.focusedMenu.index===e},t.prototype.cleanupCustomMenu=function(){this.focusedMenu&&(this.focusedMenu.holder&&(f.$(this.focusedMenu.holder.getHTMLElement().parentElement).removeClass("open"),this.focusedMenu.holder.dispose()),this.focusedMenu.widget&&this.focusedMenu.widget.dispose()),this.focusedMenu=null},t.prototype.focusCustomMenu=function(e){this.toggleCustomMenu(0)},t.prototype.toggleCustomMenu=function(e){var t=this,n=this.customMenus[e];if(this.focusedMenu){var i=this.isCurrentMenu(e);if(this.cleanupCustomMenu(),i)return}n.titleElement.domFocus();var o=f.$(n.titleElement).div({class:"menubar-menu-items-holder"});f.$(o.getHTMLElement().parentElement).addClass("open"),o.addClass("menubar-menu-items-holder-open context-view"),o.style({zoom:""+1/r.getZoomFactor(),top:this.container.getClientArea().height*r.getZoomFactor()+"px"});var s={getKeyBinding:function(e){return t.keybindingService.lookupKeybinding(e.id)},
actionRunner:this.actionRunner},a=new S.Menu(o.getHTMLElement(),n.actions,s);a.onDidCancel(function(){t.cleanupCustomMenu(),t.isFocused=!1}),a.onDidBlur(function(){setTimeout(function(){t.cleanupCustomMenu(),t.isFocused=!1},100)}),a.focus(),this.focusedMenu={index:e,holder:o,widget:a}},t.prototype.updateStyles=function(){if(e.prototype.updateStyles.call(this),this.container){var t=this.getColor(m.TITLE_BAR_ACTIVE_FOREGROUND),n=this.getColor(m.TITLE_BAR_ACTIVE_BACKGROUND);this.container.style("color",t),r.isFullscreen()?this.container.style("background-color",n):this.container.style("background-color",null),v.toggleClass(this.container.getHTMLElement(),"light",E.Color.fromHex(n).isLighter())}},Object.defineProperty(t.prototype,"onVisibilityChange",{get:function(){return this._onVisibilityChange.event},enumerable:!0,configurable:!0}),t.prototype.layout=function(t){var n=this
;return this.customMenus&&("number"!=typeof this.initialSizing.menubarFontSize&&(this.initialSizing.menubarFontSize=parseInt(this.container.getComputedStyle().fontSize,10)),"number"!=typeof this.initialSizing.menubarHeight&&(this.initialSizing.menubarHeight=parseInt(this.container.getComputedStyle().height,10)),"number"!=typeof this.initialSizing.menubarPaddingLeft&&(this.initialSizing.menubarPaddingLeft=parseInt(this.container.getComputedStyle().paddingLeft,10)),"number"!=typeof this.initialSizing.menubarPaddingRight&&(this.initialSizing.menubarPaddingRight=parseInt(this.container.getComputedStyle().paddingRight,10)),"number"!=typeof this.initialSizing.menuButtonPaddingLeftRight&&(this.initialSizing.menuButtonPaddingLeftRight=parseInt(this.customMenus[0].titleElement.getComputedStyle().paddingLeft,10)),this.container.style({height:this.initialSizing.menubarHeight/r.getZoomFactor()+"px","padding-left":this.initialSizing.menubarPaddingLeft/r.getZoomFactor()+"px",
"padding-right":this.initialSizing.menubarPaddingRight/r.getZoomFactor()+"px","font-size":this.initialSizing.menubarFontSize/r.getZoomFactor()+"px"}),this.customMenus.forEach(function(e){e.titleElement.style({padding:"0 "+n.initialSizing.menuButtonPaddingLeftRight/r.getZoomFactor()+"px"})})),"toggle"===this.currentMenubarVisibility?this.hideMenubar():this.showMenubar(),e.prototype.layout.call(this,t)},t.prototype.getMenubarItemsDimensions=function(){if(this.customMenus){var e=this.customMenus[0].titleElement.getHTMLElement().getBoundingClientRect().left,t=this.customMenus[this.customMenus.length-1].titleElement.getHTMLElement().getBoundingClientRect().right;return new v.Dimension(t-e,this.container.getClientArea().height)}return new v.Dimension(0,0)},t.prototype.createContentArea=function(e){return this.container=f.$(e),b.isWindows?(this.container&&this.setupMenubar(),this.container.getHTMLElement()):this.container.getHTMLElement()},t.MAX_MENU_RECENT_ENTRIES=5,
t=a([l(1,u.IThemeService),l(2,s.IMenubarService),l(3,c.IMenuService),l(4,d.IWindowService),l(5,d.IWindowsService),l(6,h.IContextKeyService),l(7,y.IKeybindingService),l(8,C.IConfigurationService),l(9,D.IEnvironmentService)],t)}(o.Part);t.MenubarPart=A;var L=function(e){function t(){var t=e.call(this)||this;return t._subscriptions=[],t._isPressed={altKey:!1,shiftKey:!1,ctrlKey:!1},t._subscriptions.push(T.domEvent(document.body,"keydown")(function(e){(e.altKey||e.shiftKey||e.ctrlKey)&&(t.isPressed={altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey})})),t._subscriptions.push(T.domEvent(document.body,"keyup")(function(e){(!e.altKey&&t.isPressed.altKey||!e.shiftKey&&t.isPressed.shiftKey||!e.ctrlKey&&t.isPressed.ctrlKey)&&(t.isPressed={altKey:e.altKey,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey})})),t._subscriptions.push(T.domEvent(document.body,"blur")(function(e){(t.isPressed.altKey||t.isPressed.shiftKey||t.isPressed.ctrlKey)&&(t.isPressed={altKey:!1,shiftKey:!1,ctrlKey:!1})})),t}return n(t,e),
Object.defineProperty(t.prototype,"isPressed",{get:function(){return this._isPressed},set:function(e){this._isPressed.altKey===e.altKey&&this._isPressed.shiftKey===e.shiftKey&&this._isPressed.ctrlKey===e.ctrlKey||(this._isPressed=e,this.fire(this._isPressed))},enumerable:!0,configurable:!0}),t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._subscriptions=I.dispose(this._subscriptions)},t}(w.Emitter)}),define(e[98],t([1,0,7,564,6,50,16]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEST_VIEW_CONTAINER_ID="workbench.view.extension.test";var c;!function(e){e.ViewContainersRegistry="workbench.registry.view.containers"}(c=t.Extensions||(t.Extensions={}));var l=function(){return function(e){this.id=e}}();t.ViewContainer=l;var u=function(){function e(){this._onDidRegister=new i.Emitter,this.onDidRegister=this._onDidRegister.event,this.viewContainers=new Map}
return Object.defineProperty(e.prototype,"all",{get:function(){return s.values(this.viewContainers)},enumerable:!0,configurable:!0}),e.prototype.registerViewContainer=function(e){if(!this.viewContainers.has(e)){var t=new(function(t){function i(){return t.call(this,e)||this}return n(i,t),i}(l));this.viewContainers.set(e,t),this._onDidRegister.fire(t)}return this.get(e)},e.prototype.get=function(e){return this.viewContainers.get(e)},e}();a.Registry.add(c.ViewContainersRegistry,new u),t.ViewsRegistry=new(function(){function e(){this._onViewsRegistered=new i.Emitter,this.onViewsRegistered=this._onViewsRegistered.event,this._onViewsDeregistered=new i.Emitter,this.onViewsDeregistered=this._onViewsDeregistered.event,this._viewContainer=[],this._views=new Map}return e.prototype.registerViews=function(e){if(e.length){for(var t=function(e){var t=n._views.get(e.container);if(t||(t=[],n._views.set(e.container,t),n._viewContainer.push(e.container)),t.some(function(t){return t.id===e.id
}))throw new Error(r.localize(0,null,e.id,e.container.id));t.push(e)},n=this,i=0,o=e;i<o.length;i++){t(o[i])}this._onViewsRegistered.fire(e)}},e.prototype.deregisterViews=function(e,t){var n=this._views.get(t);if(n){var i=n.filter(function(t){return-1!==e.indexOf(t.id)});if(i.length){var r=n.filter(function(t){return-1===e.indexOf(t.id)});r.length?this._views.set(t,r):(this._views.delete(t),this._viewContainer.splice(this._viewContainer.indexOf(t),1)),this._onViewsDeregistered.fire(i)}}},e.prototype.getViews=function(e){return this._views.get(e)||[]},e.prototype.getView=function(e){for(var t=0,n=this._viewContainer;t<n.length;t++){var i=n[t],r=(this._views.get(i)||[]).filter(function(t){return t.id===e})[0];if(r)return r}return null},e}()),t.IViewsService=o.createDecorator("viewsService");!function(e){e[e.None=0]="None",e[e.Collapsed=1]="Collapsed",e[e.Expanded=2]="Expanded"}(t.TreeItemCollapsibleState||(t.TreeItemCollapsibleState={}))}),
define(e[509],t([1,0,10,24,27,5,7,17,148,59,25]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n,i){this.globFn=e,this.shouldUpdate=t,this.contextService=n,this.configurationService=i,this.toUnbind=[],this.mapRootToParsedExpression=new Map,this.mapRootToExpressionConfig=new Map,this._onExpressionChange=new s.Emitter,this.toUnbind.push(this._onExpressionChange),this.updateExcludes(!1),this.registerListeners()}return Object.defineProperty(e.prototype,"onExpressionChange",{get:function(){return this._onExpressionChange.event},enumerable:!0,configurable:!0}),e.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){e.shouldUpdate(t)&&e.updateExcludes(!0)})),this.toUnbind.push(this.contextService.onDidChangeWorkspaceFolders(function(){return e.updateExcludes(!0)}))},e.prototype.updateExcludes=function(t){var r=this,o=!1
;this.contextService.getWorkspace().folders.forEach(function(e){var t=r.globFn(e.uri);r.mapRootToExpressionConfig.has(e.uri.toString())&&i.equals(r.mapRootToExpressionConfig.get(e.uri.toString()),t)||(o=!0,r.mapRootToParsedExpression.set(e.uri.toString(),u.parse(t)),r.mapRootToExpressionConfig.set(e.uri.toString(),i.deepClone(t)))}),this.mapRootToExpressionConfig.forEach(function(t,i){i!==e.NO_ROOT&&(r.contextService.getWorkspaceFolder(n.default.parse(i))||(r.mapRootToParsedExpression.delete(i),r.mapRootToExpressionConfig.delete(i),o=!0))});var s=this.globFn();this.mapRootToExpressionConfig.has(e.NO_ROOT)&&i.equals(this.mapRootToExpressionConfig.get(e.NO_ROOT),s)||(o=!0,this.mapRootToParsedExpression.set(e.NO_ROOT,u.parse(s)),this.mapRootToExpressionConfig.set(e.NO_ROOT,i.deepClone(s))),t&&o&&this._onExpressionChange.fire()},e.prototype.matches=function(t){var n,i=this.contextService.getWorkspaceFolder(t)
;n=i&&this.mapRootToParsedExpression.has(i.uri.toString())?this.mapRootToParsedExpression.get(i.uri.toString()):this.mapRootToParsedExpression.get(e.NO_ROOT);var r;return r=i?h.normalize(d.relative(i.uri.fsPath,t.fsPath)):t.fsPath,!!n(r)},e.prototype.dispose=function(){this.toUnbind=o.dispose(this.toUnbind)},e.NO_ROOT=null,e=a([l(2,r.IWorkspaceContextService),l(3,c.IConfigurationService)],e)}();t.ResourceGlobMatcher=p}),define(e[1092],t([1,0,571,59,156,87,11,18,4,10,23,56,16,31,76,22,100,83,77]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";function C(e,t){return void 0===t&&(t=null),function(n){return n.code===e?d.TPromise.as(t):d.TPromise.wrapError(n)}}function E(){if(!I){var t=h.default.parse(e.toUrl("")).fsPath;I=r.resolve(t,"..","bin","code")}return I}function w(){return s.exists(E())}Object.defineProperty(t,"__esModule",{value:!0});var I=null,T=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.notificationService=i,s.dialogService=r,s.logService=o,s}return n(t,e),
Object.defineProperty(t.prototype,"target",{get:function(){return"/usr/local/bin/"+m.default.applicationName},enumerable:!0,configurable:!0}),t.prototype.run=function(){var e=this;return w().then(function(t){if(t)return e.isInstalled().then(function(n){if(!t||n)return d.TPromise.as(null);var i=function(){return s.unlink(e.target).then(null,C("ENOENT")).then(function(){return s.symlink(E(),e.target)})};return i().then(null,function(t){return"EACCES"===t.code||"ENOENT"===t.code?e.createBinFolder().then(function(){return i()}):d.TPromise.wrapError(t)})}).then(function(){e.logService.trace("cli#install",e.target),e.notificationService.info(i.localize(2,null,m.default.applicationName))});var n=i.localize(1,null);e.notificationService.info(n)})},t.prototype.isInstalled=function(){var e=this;return s.lstat(this.target).then(function(e){return e.isSymbolicLink()}).then(function(){return s.readlink(e.target)}).then(function(e){return e===E()}).then(null,C("ENOENT",!1))},t.prototype.createBinFolder=function(){
var e=this;return new d.TPromise(function(t,n){var r=[i.localize(3,null),i.localize(4,null)];e.dialogService.show(S.default.Info,i.localize(5,null),r,{cancelId:1}).then(function(e){switch(e){case 0:u.nfcall(o.exec,'osascript -e "do shell script \\"mkdir -p /usr/local/bin && chown \\" & (do shell script (\\"whoami\\")) & \\" /usr/local/bin\\" with administrator privileges"',{}).then(null,function(e){return d.TPromise.wrapError(new Error(i.localize(6,null)))}).done(t,n);break;case 1:n(new Error(i.localize(7,null)))}})})},t.ID="workbench.action.installCommandLine",t.LABEL=i.localize(0,null,m.default.applicationName),t=a([l(2,y.INotificationService),l(3,b.IDialogService),l(4,_.ILogService)],t)}(p.Action),x=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.notificationService=i,o.logService=r,o}return n(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return"/usr/local/bin/"+m.default.applicationName},enumerable:!0,configurable:!0}),t.prototype.run=function(){var e=this
;return w().then(function(t){if(t)return s.unlink(e.target).then(null,C("ENOENT")).then(function(){e.logService.trace("cli#uninstall",e.target),e.notificationService.info(i.localize(10,null,m.default.applicationName))});var n=i.localize(9,null);e.notificationService.info(n)})},t.ID="workbench.action.uninstallCommandLine",t.LABEL=i.localize(8,null,m.default.applicationName),t=a([l(2,y.INotificationService),l(3,_.ILogService)],t)}(p.Action);if(c.isMacintosh){var k=i.localize(11,null),D=g.Registry.as(f.Extensions.WorkbenchActions);D.registerWorkbenchAction(new v.SyncActionDescriptor(T,T.ID,T.LABEL),"Shell Command: Install 'code' command in PATH",k),D.registerWorkbenchAction(new v.SyncActionDescriptor(x,x.ID,x.LABEL),"Shell Command: Uninstall 'code' command from PATH",k)}}),define(e[1093],t([1,0,572,5,14,8,251,85,92,6,37,15,55,32,331,12,26,17,11,128,88,10,52,870]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var T=new f.RawContextKey("accessibilityHelpWidgetVisible",!1),x=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._widget=i._register(n.createInstance(k,i._editor)),i}return n(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=a([l(1,h.IInstantiationService)],t)}(r.Disposable),k=function(e){function t(n,r,o,a,c){var l=e.call(this)||this;return l._contextKeyService=r,l._keybindingService=o,l._configurationService=a,l._openerService=c,l._editor=n,l._isVisibleKey=T.bindTo(l._contextKeyService),l._domNode=u.createFastDomNode(document.createElement("div")),l._domNode.setClassName("accessibilityHelpWidget"),l._domNode.setWidth(t.WIDTH),l._domNode.setHeight(t.HEIGHT),l._domNode.setDisplay("none"),l._domNode.setAttribute("role","dialog"),l._domNode.setAttribute("aria-hidden","true"),
l._contentDomNode=u.createFastDomNode(document.createElement("div")),l._contentDomNode.setAttribute("role","document"),l._domNode.appendChild(l._contentDomNode),l._isVisible=!1,l._register(l._editor.onDidLayoutChange(function(){l._isVisible&&l._layout()})),l._register(s.addStandardDisposableListener(l._contentDomNode.domNode,"keydown",function(e){l._isVisible&&(e.equals(2083)&&(C.alert(i.localize(0,null)),l._configurationService.updateValue("editor.accessibilitySupport","on",S.ConfigurationTarget.USER),e.preventDefault(),e.stopPropagation()),e.equals(2086)&&(C.alert(i.localize(1,null)),l._openerService.open(w.default.parse("https://go.microsoft.com/fwlink/?linkid=851010")),e.preventDefault(),e.stopPropagation()))})),l.onblur(l._contentDomNode.domNode,function(){l.hide()}),l._editor.addOverlayWidget(l),l}return n(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){
return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){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())},t.prototype._descriptionForCommand=function(e,t,n){var i=this._keybindingService.lookupKeybinding(e);return i?o.format(t,i.getAriaLabel()):o.format(n,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=i.localize(2,null);t+="\n\n"+i.localize(3,null);var n=this._configurationService.getValue("editor").accessibilitySupport,r=e.accessibilitySupport,o=_.isMacintosh?i.localize(4,null):i.localize(5,null);switch(n){case"auto":switch(r){case 0:t+="\n\n - "+i.localize(6,null);break;case 2:t+="\n\n - "+i.localize(7,null);break;case 1:t+="\n\n - "+i.localize(8,null),t+=" "+o}break;case"on":
t+="\n\n - "+i.localize(9,null);break;case"off":t+="\n\n - "+i.localize(10,null),t+=" "+o}var s=i.localize(11,null),a=i.localize(12,null),l=i.localize(13,null),u=i.localize(14,null);e.tabFocusMode?t+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,s,a):t+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,l,u);t+="\n\n"+(_.isMacintosh?i.localize(15,null):i.localize(16,null)),t+="\n\n"+i.localize(17,null),this._contentDomNode.domNode.appendChild(c.renderFormattedText(t)),this._contentDomNode.domNode.setAttribute("aria-label",t)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,s.clearNode(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),n=Math.round((e.height-t.HEIGHT)/2);this._domNode.setTop(n);var i=Math.round((e.width-t.WIDTH)/2)
;this._domNode.setLeft(i)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=a([l(1,f.IContextKeyService),l(2,p.IKeybindingService),l(3,S.IConfigurationService),l(4,E.IOpenerService)],t)}(d.Widget),D=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:i.localize(18,null),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:571}})||this}return n(t,e),t.prototype.run=function(e,t){var n=x.get(t);n&&n.show()},t}(v.EditorAction);v.registerEditorContribution(x),v.registerEditorAction(D);var A=v.EditorCommand.bindToContribution(x.get);v.registerEditorCommand(new A({id:"closeAccessibilityHelp",precondition:T,handler:function(e){return e.hide()},kbOpts:{weight:I.KeybindingsRegistry.WEIGHT.editorContrib(100),kbExpr:g.EditorContextKeys.focus,primary:9,secondary:[1033]}})),y.registerThemingParticipant(function(e,t){var n=e.getColor(b.editorWidgetBackground)
;n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+n+"; }");var i=e.getColor(b.widgetShadow);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+i+"; }");var r=e.getColor(b.contrastBorder);r&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+r+"; }")})}),define(e[1094],t([1,0,575,59,5,32,22,34,17]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,o,s){var a=e.call(this)||this;return a._editor=t,a._notificationService=n,a._configurationService=o,a._storageService=s,a._isDisabled=a._storageService.getBoolean("editor.neverPromptForLargeFiles",u.StorageScope.GLOBAL,!1),a._register(a._editor.onDidChangeModel(function(e){var t=a._editor.getModel();if(t&&!a._isDisabled&&t.isTooLargeForTokenization()){var n=i.localize(0,null,r.basename(t.uri.path));a._notificationService.prompt(c.Severity.Info,n,[{label:i.localize(1,null),run:function(){a._isDisabled=!0,
a._storageService.store("editor.neverPromptForLargeFiles",!0,u.StorageScope.GLOBAL)}},{label:i.localize(2,null),run:function(){a._configurationService.updateValue("editor.largeFileOptimizations",!1).then(function(){a._notificationService.info(i.localize(3,null))},function(e){a._notificationService.error(e)})}}])}})),a}return n(t,e),t.prototype.getId=function(){return t.ID},t.ID="editor.contrib.largeFileOptimizationsWarner",t=a([l(1,c.INotificationService),l(2,d.IConfigurationService),l(3,u.IStorageService)],t)}(o.Disposable);t.LargeFileOptimizationsWarner=h,s.registerEditorContribution(h)}),define(e[309],t([1,0,5,32]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._altListeningMouse=!1,n._altMouseTriggered=!1,n._register(n._editor.onMouseDown(function(e){n._altListeningMouse&&(n._altMouseTriggered=!0)})),n._register(n._editor.onKeyDown(function(e){
e.equals(512)&&(n._altListeningMouse||(n._altMouseTriggered=!1),n._altListeningMouse=!0)})),n._register(n._editor.onKeyUp(function(e){e.equals(512)&&(n._altMouseTriggered&&e.preventDefault(),n._altListeningMouse=!1,n._altMouseTriggered=!1)})),n}return n(t,e),t.prototype.getId=function(){return t.ID},t.ID="editor.contrib.menuPreventer",t}(i.Disposable);t.MenuPreventer=o,r.registerEditorContribution(o)}),define(e[312],t([1,0,103,11,45,5,57,32,15,18,19]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,n){var s=e.call(this)||this;if(r.isLinux){var a=t.getConfiguration().contribInfo.selectionClipboard;s._register(t.onDidChangeConfiguration(function(e){e.contribInfo&&(a=t.getConfiguration().contribInfo.selectionClipboard)})),s._register(t.onMouseDown(function(e){if(a&&t.getModel()&&e.event.middleButton){if(e.event.preventDefault(),t.focus(),e.target.position&&t.setPosition(e.target.position),
e.target.type===o.MouseTargetType.SCROLLBAR)return;process.nextTick(function(){i.clipboard.readText("selection")})}}));var l=s._register(new h.RunOnceScheduler(function(){var e=t.getModel();if(e){var n=t.getSelections();(n=n.slice(0)).sort(p.Range.compareRangesUsingStarts);for(var r=[],o=0;o<n.length;o++){var s=n[o];if(s.isEmpty())return;r.push(e.getValueInRange(s,c.EndOfLinePreference.TextDefined))}var a=r.join(e.getEOL());i.clipboard.writeText(a,"selection")}},100));s._register(t.onDidChangeCursorSelection(function(e){a&&l.schedule()}))}return s}return n(t,e),t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionClipboard",t=a([l(1,d.IContextKeyService)],t)}(s.Disposable);t.SelectionClipboard=f,u.registerEditorContribution(f)}),define(e[1097],t([1,0,577,17,16,56,23,31]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var r=e.call(this,t,n)||this
;return r._configurationService=i,r}return n(t,e),t.prototype.run=function(){var e=!this._configurationService.getValue("editor.minimap.enabled");return this._configurationService.updateValue("editor.minimap.enabled",e,r.ConfigurationTarget.USER)},t.ID="editor.action.toggleMinimap",t.LABEL=i.localize(0,null),t=a([l(2,r.IConfigurationService)],t)}(c.Action);t.ToggleMinimapAction=d;o.Registry.as(s.Extensions.WorkbenchActions).registerWorkbenchAction(new u.SyncActionDescriptor(d,d.ID,d.LABEL),"View: Toggle Minimap")}),define(e[1098],t([1,0,578,16,23,31,56,17]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.configurationService=i,r}return n(t,e),t.prototype.run=function(){var e="ctrlCmd"===this.configurationService.getValue("editor").multiCursorModifier?"alt":"ctrlCmd";return this.configurationService.updateValue(t.multiCursorModifierConfigurationKey,e,u.ConfigurationTarget.USER)},
t.ID="workbench.action.toggleMultiCursorModifier",t.LABEL=i.localize(0,null),t.multiCursorModifierConfigurationKey="editor.multiCursorModifier",t=a([l(2,u.IConfigurationService)],t)}(o.Action);t.ToggleMultiCursorModifierAction=d;r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(d,d.ID,d.LABEL),"Toggle Multi-Cursor Modifier")}),define(e[1099],t([1,0,579,17,16,56,23,31]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._configurationService=i,r}return n(t,e),t.prototype.run=function(){var e=!this._configurationService.getValue("editor.renderControlCharacters");return this._configurationService.updateValue("editor.renderControlCharacters",e,r.ConfigurationTarget.USER)},t.ID="editor.action.toggleRenderControlCharacter",t.LABEL=i.localize(0,null),t=a([l(2,r.IConfigurationService)],t)}(c.Action);t.ToggleRenderControlCharacterAction=d
;o.Registry.as(s.Extensions.WorkbenchActions).registerWorkbenchAction(new u.SyncActionDescriptor(d,d.ID,d.LABEL),"View: Toggle Control Characters")}),define(e[1100],t([1,0,580,17,16,56,23,31]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._configurationService=i,r}return n(t,e),t.prototype.run=function(){var e;return e="none"===this._configurationService.getValue("editor.renderWhitespace")?"all":"none",this._configurationService.updateValue("editor.renderWhitespace",e,r.ConfigurationTarget.USER)},t.ID="editor.action.toggleRenderWhitespace",t.LABEL=i.localize(0,null),t=a([l(2,r.IConfigurationService)],t)}(c.Action);t.ToggleRenderWhitespaceAction=d;o.Registry.as(s.Extensions.WorkbenchActions).registerWorkbenchAction(new u.SyncActionDescriptor(d,d.ID,d.LABEL),"View: Toggle Render Whitespace")}),define(e[1101],t([1,0,581,32,71,31,15,5,10,133,127,22]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict"
;function g(e,t,n){var i=t.getValue(e.uri,"editor"),r=!i||"string"!=typeof i.wordWrap&&"boolean"!=typeof i.wordWrap?void 0:i.wordWrap;!0===r?r="on":!1===r&&(r="off");var o=i&&"boolean"==typeof i.wordWrapMinified?i.wordWrapMinified:void 0,s=function(e,t){return t.getTransientModelProperty(e,y)}(e,n);return{configuredWordWrap:r,configuredWordWrapMinified:"boolean"==typeof o?o:h.EDITOR_DEFAULTS.wordWrapMinified,transientState:s}}function v(e,t){t.transientState?e.updateOptions({wordWrap:t.transientState.forceWordWrap,wordWrapMinified:t.transientState.forceWordWrapMinified}):e.updateOptions({wordWrap:t.configuredWordWrap,wordWrapMinified:t.configuredWordWrapMinified})}function m(e){return!!e&&("output"!==e.scheme&&"vscode"!==e.scheme)}Object.defineProperty(t,"__esModule",{value:!0});var y="transientWordWrapState",b="isWordWrapMinified",S="isDominatedByLongLines",_="inDiffEditor",C=function(e){function t(){return e.call(this,{id:"editor.action.toggleWordWrap",label:i.localize(0,null),
alias:"View: Toggle Word Wrap",precondition:null,kbOpts:{kbExpr:null,primary:568}})||this}return n(t,e),t.prototype.run=function(e,t){if(t.getConfiguration().wrappingInfo.inDiffEditor){e.get(f.INotificationService).info(i.localize(1,null))}else{var n=e.get(p.ITextResourceConfigurationService),r=e.get(o.ICodeEditorService),s=t.getModel();if(m(s.uri)){var a=function(e,t){if(t.transientState)return{configuredWordWrap:t.configuredWordWrap,configuredWordWrapMinified:t.configuredWordWrapMinified,transientState:null};var n;return n=e.getConfiguration().wrappingInfo.isWordWrapMinified?{forceWordWrap:"off",forceWordWrapMinified:!1}:"off"!==t.configuredWordWrap?{forceWordWrap:"off",forceWordWrapMinified:!1}:{forceWordWrap:"on",forceWordWrapMinified:t.configuredWordWrapMinified},{configuredWordWrap:t.configuredWordWrap,configuredWordWrapMinified:t.configuredWordWrapMinified,transientState:n}}(t,g(s,n,r));!function(e,t,n){n.setTransientModelProperty(e,y,t)}(s,a.transientState,r),v(t,a)}}},t
}(r.EditorAction),E=function(e){function t(t,n,i,r){var o=e.call(this)||this;o.editor=t,o.contextKeyService=n,o.configurationService=i,o.codeEditorService=r;var s=o.editor.getConfiguration(),a=o.contextKeyService.createKey(b,o._isWordWrapMinified(s)),c=o.contextKeyService.createKey(S,o._isDominatedByLongLines(s)),l=o.contextKeyService.createKey(_,o._inDiffEditor(s));return o._register(t.onDidChangeConfiguration(function(e){if(e.wrappingInfo){var t=o.editor.getConfiguration();a.set(o._isWordWrapMinified(t)),c.set(o._isDominatedByLongLines(t)),l.set(o._inDiffEditor(t))}})),o._register(t.onDidChangeModel(function(e){var n=o.editor.getModel();if(n){var i=o.editor.getConfiguration();if(!o._inDiffEditor(i)&&m(n.uri)){var r=g(n,o.configurationService,o.codeEditorService);v(t,r)}}})),o}return n(t,e),t.prototype._isWordWrapMinified=function(e){return e.wrappingInfo.isWordWrapMinified},t.prototype._isDominatedByLongLines=function(e){return e.wrappingInfo.isDominatedByLongLines},t.prototype._inDiffEditor=function(e){
return e.wrappingInfo.inDiffEditor},t.prototype.getId=function(){return t._ID},t._ID="editor.contrib.toggleWordWrapController",t=a([l(1,c.IContextKeyService),l(2,p.ITextResourceConfigurationService),l(3,o.ICodeEditorService)],t)}(u.Disposable);r.registerEditorContribution(E),r.registerEditorAction(C),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:"editor.action.toggleWordWrap",title:i.localize(2,null),iconLocation:{dark:d.default.parse(e.toUrl("vs/workbench/parts/codeEditor/electron-browser/media/WordWrap_16x.svg"))}},group:"navigation",order:1,when:c.ContextKeyExpr.and(c.ContextKeyExpr.not(_),c.ContextKeyExpr.has(S),c.ContextKeyExpr.has(b))}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:"editor.action.toggleWordWrap",title:i.localize(3,null),iconLocation:{dark:d.default.parse(e.toUrl("vs/workbench/parts/codeEditor/electron-browser/media/WordWrap_16x.svg"))}},group:"navigation",order:1,
when:c.ContextKeyExpr.and(c.ContextKeyExpr.not(_),c.ContextKeyExpr.has(S),c.ContextKeyExpr.not(b))})}),define(e[1102],t([1,0,6,15,17,27,34,32,72,12,36,22,367,71]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(t,n,i,r,o,s,a,c,l,u,d){return e.call(this,!1,t,n,i,r,o,s,a,c,l,u,d)||this}return n(t,e),t=a([l(1,r.IContextKeyService),l(2,v.ICodeEditorService),l(3,d.ITextModelService),l(4,f.INotificationService),l(5,i.IInstantiationService),l(6,s.IWorkspaceContextService),l(7,c.IStorageService),l(8,h.IThemeService),l(9,o.IConfigurationService),l(10,i.optional(p.IEnvironmentService))],t)}(g.ReferencesController);t.WorkbenchReferencesController=m,u.registerEditorContribution(m)}),define(e[516],t([1,0,10,20,582,50]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n,i){this.replies=[],this.threadId=e,this.comment=n,this.resource=t,this.range=i}
return e.prototype.hasReply=function(){return this.replies&&0!==this.replies.length},e}();t.CommentNode=s;var a=function(){function e(t,n){this.id=t.toString(),this.resource=t,this.commentThreads=n.map(function(n){return e.createCommentNode(t,n)})}return e.createCommentNode=function(e,t){var n=t.threadId,i=t.comments,r=t.range,o=i.map(function(t){return new s(n,e,t,r)});return o.length>1&&(o[0].replies=o.slice(1,o.length)),o[0]},e}();t.ResourceWithCommentThreads=a;var c=function(){function e(){this.resourceCommentThreads=[],this.commentThreadsMap=new Map}return e.prototype.setCommentThreads=function(e,t){this.commentThreadsMap.set(e,this.groupByResource(t)),this.resourceCommentThreads=i.flatten(o.values(this.commentThreadsMap))},e.prototype.updateCommentThreads=function(e){var t=e.owner,r=e.removed,s=e.changed,c=e.added,l=this.commentThreadsMap.get(t);r.forEach(function(e){var t=i.firstIndex(l,function(t){return t.id===e.resource}),n=l[t],r=i.firstIndex(n.commentThreads,function(t){
return t.threadId===e.threadId});n.commentThreads.splice(r,1),0===n.commentThreads.length&&l.splice(t,1)}),s.forEach(function(e){var t=i.firstIndex(l,function(t){return t.id===e.resource}),r=l[t],o=i.firstIndex(r.commentThreads,function(t){return t.threadId===e.threadId});r.commentThreads[o]=a.createCommentNode(n.default.parse(r.id),e)}),l=l.concat(this.groupByResource(c)),this.commentThreadsMap.set(t,l),this.resourceCommentThreads=i.flatten(o.values(this.commentThreadsMap))},e.prototype.hasCommentThreads=function(){return!!this.resourceCommentThreads.length},e.prototype.getMessage=function(){return this.resourceCommentThreads.length?"":r.localize(0,null)},e.prototype.groupByResource=function(t){for(var r=[],o=new Map,s=0,c=i.groupBy(t,e._compareURIs);s<c.length;s++){var l=c[s];o.set(l[0].resource,new a(n.default.parse(l[0].resource),l))}return o.forEach(function(e,t,n){r.push(e)}),r},e._compareURIs=function(e,t){var n=e.resource.toString(),i=t.resource.toString();return n<i?-1:n>i?1:0},e}();t.CommentsModel=c
}),define(e[1104],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.Complete=0]="Complete",e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(i=t.ReviewStyle||(t.ReviewStyle={}));var r=function(){function e(){this._onDidChangeStyle=new n.Emitter,this._style=i.Inline}return Object.defineProperty(e.prototype,"style",{get:function(){return this._style},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeStyle",{get:function(){return this._onDidChangeStyle.event},enumerable:!0,configurable:!0}),e.prototype.setStyle=function(e){this._style=e,this._onDidChangeStyle.fire(this._style)},e}();t.ReviewModel=r}),define(e[517],t([1,0,45]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,i,r){this._id=e,this._domNode=document.createElement("div"),this._domNode.className=i?"comment-hint commenting-disabled":"comment-hint",this._domNode.addEventListener("click",r),
this._lineNumber=n,this._editor=t,this._editor.addContentWidget(this)}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getId=function(){return this._id},e.prototype.setLineNumber=function(e){this._lineNumber=e},e.prototype.getPosition=function(){return{position:{lineNumber:this._lineNumber,column:1},preference:[n.ContentWidgetPositionPreference.EXACT]}},e}();t.CommentGlyphWidget=i}),define(e[283],t([1,0,6,7,5,4,18,50]),function(e,t,i,r,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICommentService=i.createDecorator("commentService");var d=function(e){function t(){var t=e.call(this)||this;return t._onDidSetDataProvider=t._register(new r.Emitter),t.onDidSetDataProvider=t._onDidSetDataProvider.event,t._onDidDeletetDataProvider=t._register(new r.Emitter),t.onDidDeleteDataProvider=t._onDidDeletetDataProvider.event,t._onDidSetResourceCommentInfos=t._register(new r.Emitter),t.onDidSetResourceCommentInfos=t._onDidSetResourceCommentInfos.event,
t._onDidSetAllCommentThreads=t._register(new r.Emitter),t.onDidSetAllCommentThreads=t._onDidSetAllCommentThreads.event,t._onDidUpdateCommentThreads=t._register(new r.Emitter),t.onDidUpdateCommentThreads=t._onDidUpdateCommentThreads.event,t._commentProviders=new Map,t}return n(t,e),t.prototype.setDocumentComments=function(e,t){this._onDidSetResourceCommentInfos.fire({resource:e,commentInfos:t})},t.prototype.setWorkspaceComments=function(e,t){this._onDidSetAllCommentThreads.fire({ownerId:e,commentThreads:t})},t.prototype.removeWorkspaceComments=function(e){this._onDidSetAllCommentThreads.fire({ownerId:e,commentThreads:[]})},t.prototype.registerDataProvider=function(e,t){this._commentProviders.set(e,t),this._onDidSetDataProvider.fire()},t.prototype.unregisterDataProvider=function(e){this._commentProviders.delete(e),this._onDidDeletetDataProvider.fire(e)},t.prototype.updateComments=function(e){this._onDidUpdateCommentThreads.fire(e)},t.prototype.createNewCommentThread=function(e,t,n,i){
var r=this._commentProviders.get(e);return r?l.asWinJsPromise(function(e){return r.createNewCommentThread(t,n,i,e)}):null},t.prototype.replyToCommentThread=function(e,t,n,i,r){var o=this._commentProviders.get(e);return o?l.asWinJsPromise(function(e){return o.replyToCommentThread(t,n,i,r,e)}):null},t.prototype.getComments=function(e){return o(this,void 0,c.TPromise,function(){var t,n,i,r,o,a;return s(this,function(s){for(t=[],n=function(n){var r=i._commentProviders.get(n);r.provideDocumentComments&&t.push(l.asWinJsPromise(function(t){return r.provideDocumentComments(e,t)}))},i=this,r=0,o=u.keys(this._commentProviders);r<o.length;r++)a=o[r],n(a);return[2,c.TPromise.join(t)]})})},t}(a.Disposable);t.CommentService=d}),define(e[1107],t([1,0]),function(e,t){"use strict";function n(e,t,n,i){if(e&&t){var r,o=i.handleLinks(t);"string"==typeof o?(r=document.createElement("span")).textContent=o:r=o,r.className=n.join(" "),e.appendChild(r)}}Object.defineProperty(t,"__esModule",{value:!0}),
t.handleANSIOutput=function(e,t){for(var i=document.createElement("span"),r=e.length,o=[],s=0,a="";s<r;){var c=!1;if(27===e.charCodeAt(s)&&"["===e.charAt(s+1)){var l=s;s+=2;for(var u="";s<r;){var d=e.charAt(s);if(u+=d,s++,d.match(/^[ABCDHIJKfhmpsu]$/)){c=!0;break}}if(c){if(n(i,a,o,t),a="",u.match(/^(?:[349][0-7]|10[0-7]|[01]|4|[34]9)(?:;(?:[349][0-7]|10[0-7]|[01]|4|[34]9))*;?m$/))for(var h=0,p=u.slice(0,-1).split(";").filter(function(e){return""!==e}).map(function(e){return parseInt(e,10)});h<p.length;h++){var f=p[h];0===f?o=[]:1===f?o.push("code-bold"):4===f?o.push("code-underline"):f>=30&&f<=37||f>=90&&f<=97?o.push("code-foreground-"+f):39===f?o=o.filter(function(e){return!e.match(/^code-foreground-\d+$/)}):f>=40&&f<=47||f>=100&&f<=107?o.push("code-background-"+f):49===f&&(o=o.filter(function(e){return!e.match(/^code-background-\d+$/)}))}}else s=l}!1===c&&(a+=e.charAt(s),s++)}return a&&n(i,a,o,t),i},t.appendStylizedStringToContainer=n}),define(e[79],t([1,0,597,6,15,98,16]),function(e,t,n,i,r,o,s){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWLET_ID="workbench.view.debug",t.VIEW_CONTAINER=s.Registry.as(o.Extensions.ViewContainersRegistry).registerViewContainer(t.VIEWLET_ID),t.VARIABLES_VIEW_ID="workbench.debug.variablesView",t.WATCH_VIEW_ID="workbench.debug.watchExpressionsView",t.CALLSTACK_VIEW_ID="workbench.debug.callStackView",t.BREAKPOINTS_VIEW_ID="workbench.debug.breakPointsView",t.REPL_ID="workbench.panel.repl",t.DEBUG_SERVICE_ID="debugService",t.CONTEXT_DEBUG_TYPE=new r.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_STATE=new r.RawContextKey("debugState",void 0),t.CONTEXT_IN_DEBUG_MODE=new r.RawContextKey("inDebugMode",!1),t.CONTEXT_NOT_IN_DEBUG_MODE=t.CONTEXT_IN_DEBUG_MODE.toNegated(),t.CONTEXT_IN_DEBUG_REPL=new r.RawContextKey("inDebugRepl",!1),t.CONTEXT_NOT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_REPL.toNegated(),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new r.RawContextKey("breakpointWidgetVisible",!1),t.CONTEXT_IN_BREAKPOINT_WIDGET=new r.RawContextKey("inBreakpointWidget",!1),
t.CONTEXT_BREAKPOINTS_FOCUSED=new r.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new r.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_VARIABLES_FOCUSED=new r.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new r.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_SELECTED=new r.RawContextKey("breakpointSelected",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new r.RawContextKey("callStackItemType",void 0),t.EDITOR_CONTRIBUTION_ID="editor.contrib.debug",t.DEBUG_SCHEME="debug",t.INTERNAL_CONSOLE_OPTIONS_SCHEMA={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:n.localize(0,null)};!function(e){e[e.ATTACH=0]="ATTACH",e[e.LAUNCH=1]="LAUNCH"}(t.SessionState||(t.SessionState={}));!function(e){e[e.Inactive=0]="Inactive",e[e.Initializing=1]="Initializing",e[e.Stopped=2]="Stopped",e[e.Running=3]="Running"}(t.State||(t.State={})),t.IDebugService=i.createDecorator(t.DEBUG_SERVICE_ID);!function(e){
e[e.CONDITION=0]="CONDITION",e[e.HIT_COUNT=1]="HIT_COUNT",e[e.LOG_MESSAGE=2]="LOG_MESSAGE"}(t.BreakpointWidgetContext||(t.BreakpointWidgetContext={}))}),define(e[526],t([1,0,585,9,8,84,279,41,17,29,79,12,68,69,26,35,27,5]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=o.$,C=function(){function e(e,t,n,i,r,o,s,a){this.context=e,this.action=t,this.debugService=n,this.themeService=i,this.configurationService=r,this.commandService=o,this.contextService=s,this.toDispose=[],this.selectBox=new c.SelectBox([],-1,a),this.toDispose.push(this.selectBox),this.toDispose.push(g.attachSelectBoxStyler(this.selectBox,i,{selectBackground:v.SIDE_BAR_BACKGROUND})),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){t.affectsConfiguration("launch")&&e.updateOptions()})),
this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(function(){e.updateOptions()}))},e.prototype.render=function(e){var t=this;this.container=e,o.addClass(e,"start-debug-action-item"),this.start=o.append(e,_(".icon")),this.start.title=this.action.label,this.start.tabIndex=0,this.toDispose.push(o.addDisposableListener(this.start,o.EventType.CLICK,function(){t.start.blur(),t.actionRunner.run(t.action,t.context).done(null,r.onUnexpectedError)})),this.toDispose.push(o.addDisposableListener(this.start,o.EventType.MOUSE_DOWN,function(e){t.action.enabled&&0===e.button&&o.addClass(t.start,"active")})),this.toDispose.push(o.addDisposableListener(this.start,o.EventType.MOUSE_UP,function(){o.removeClass(t.start,"active")})),this.toDispose.push(o.addDisposableListener(this.start,o.EventType.MOUSE_OUT,function(){o.removeClass(t.start,"active")})),this.toDispose.push(o.addDisposableListener(this.start,o.EventType.KEY_DOWN,function(e){var n=new s.StandardKeyboardEvent(e)
;n.equals(3)&&t.actionRunner.run(t.action,t.context).done(null,r.onUnexpectedError),n.equals(17)&&(t.selectBox.focus(),n.stopPropagation())})),this.toDispose.push(this.selectBox.onDidSelect(function(e){t.options[e.index].handler()?t.selected=e.index:t.selectBox.select(t.selected)}));var n=_(".configuration");this.selectBox.render(o.append(e,n)),this.toDispose.push(o.addDisposableListener(n,o.EventType.KEY_DOWN,function(e){var n=new s.StandardKeyboardEvent(e);n.equals(15)&&(t.start.focus(),n.stopPropagation())})),this.toDispose.push(g.attachStylerCallback(this.themeService,{selectBorder:m.selectBorder},function(e){t.container.style.border=e.selectBorder?"1px solid "+e.selectBorder:null,n.style.borderLeft=e.selectBorder?"1px solid "+e.selectBorder:null})),this.updateOptions()},e.prototype.setActionContext=function(e){this.context=e},e.prototype.isEnabled=function(){return!0},e.prototype.focus=function(e){e?this.selectBox.focus():this.start.focus()},e.prototype.blur=function(){this.container.blur()},
e.prototype.dispose=function(){this.toDispose=S.dispose(this.toDispose)},e.prototype.updateOptions=function(){var t=this;this.selected=0,this.options=[];var n=this.debugService.getConfigurationManager(),o=n.getLaunches(),s=this.contextService.getWorkbenchState()===b.WorkbenchState.WORKSPACE;o.forEach(function(e){return e.getConfigurationNames().forEach(function(i){i===n.selectedConfiguration.name&&e===n.selectedConfiguration.launch&&(t.selected=t.options.length);var r=s?i+" ("+e.name+")":i;t.options.push({label:r,handler:function(){return n.selectConfiguration(e,i),!0}})})}),0===this.options.length&&this.options.push({label:i.localize(0,null),handler:function(){return!1}}),this.options.push({label:e.SEPARATOR,handler:void 0});var a=this.options.length-1;o.filter(function(e){return!e.hidden}).forEach(function(e){var n=s?i.localize(1,null,e.name):i.localize(2,null);t.options.push({label:n,handler:function(){
return t.commandService.executeCommand("debug.addConfiguration",e.uri.toString()).done(void 0,r.onUnexpectedError),!1}})}),this.selectBox.setOptions(this.options.map(function(e){return e.label}),this.selected,a)},e.SEPARATOR="─────────",e=a([l(2,p.IDebugService),l(3,f.IThemeService),l(4,d.IConfigurationService),l(5,h.ICommandService),l(6,b.IWorkspaceContextService),l(7,y.IContextViewService)],e)}();t.StartDebugActionItem=C;var E=function(e){function t(t,n,i,r){var o=e.call(this,null,t,[],-1,r)||this;return o.debugService=n,o.toDispose.push(g.attachSelectBoxStyler(o.selectBox,i)),o.debugService.getViewModel().onDidFocusStackFrame(function(){var e=o.debugService.getViewModel().focusedSession;if(e){var t=o.debugService.getModel().getSessions().indexOf(e);o.select(t)}}),o.debugService.getModel().onDidChangeCallStack(function(){return o.update()}),o.update(),o}return n(t,e),t.prototype.update=function(){
var e=this.debugService.getViewModel().focusedSession,t=this.debugService.getModel().getSessions(),n=this.debugService.getConfigurationManager().getLaunches().length>1,i=t.map(function(e){return e.getName(n)});this.setOptions(i,e?t.indexOf(e):void 0)},t=a([l(1,p.IDebugService),l(2,f.IThemeService),l(3,y.IContextViewService)],t)}(u.SelectActionItem);t.FocusSessionActionItem=E}),define(e[318],t([1,0]),function(e,t){"use strict";function n(e,t){switch(e.type){case"event":var n=e;switch(n.event){case"output":case"loadedSource":t(!1,n.body.source);break;case"breakpoint":t(!1,n.body.breakpoint.source)}break;case"request":var i=e;switch(i.command){case"setBreakpoints":case"source":case"gotoTargets":t(!0,i.arguments.source)}break;case"response":var r=e;switch(r.command){case"stackTrace":r.body.stackFrames.forEach(function(e){return t(!1,e.source)});break;case"loadedSources":r.body.sources.forEach(function(e){return t(!1,e)});break;case"scopes":r.body.scopes.forEach(function(e){return t(!1,e.source)});break
;case"setFunctionBreakpoints":r.body.breakpoints.forEach(function(e){return t(!1,e.source)});break;case"setBreakpoints":r.body.breakpoints.forEach(function(e){return t(!1,e.source)})}}}Object.defineProperty(t,"__esModule",{value:!0});var i=/{([^}]+)}/g;t.formatPII=function(e,t,n){return e.replace(i,function(e,i){return t&&i.length>0&&"_"!==i[0]?e:n&&n.hasOwnProperty(i)?n[i]:e})},t.getExactExpressionStartAndEnd=function(e,t,n){for(var i=void 0,r=0,o=/([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g,s=void 0;s=o.exec(e);){var a=s.index+1,c=a+s[0].length;if(a<=t&&c>=n){i=s[0],r=a;break}}if(i){for(var l=/\w+/g,u=void 0;(u=l.exec(i))&&!(u.index+1+r+u[0].length>=n););u&&(i=i.substring(0,l.lastIndex))}return i?{start:r,end:r+i.length-1}:{start:0,end:0}},t.convertToDAPaths=function(e,t){n(e,function(e,n){e&&n&&t(n)})},t.convertToVSCPaths=function(e,t){n(e,function(e,n){!e&&n&&t(n)})}}),define(e[528],t([1,0,7,79]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){
this._onDidFocusSession=new n.Emitter,this._onDidFocusStackFrame=new n.Emitter,this._onDidSelectExpression=new n.Emitter,this.multiSessionView=!1,this.expressionSelectedContextKey=i.CONTEXT_EXPRESSION_SELECTED.bindTo(e),this.breakpointSelectedContextKey=i.CONTEXT_BREAKPOINT_SELECTED.bindTo(e)}return e.prototype.getId=function(){return"root"},Object.defineProperty(e.prototype,"focusedSession",{get:function(){return this._focusedSession},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusedThread",{get:function(){if(this._focusedStackFrame)return this._focusedStackFrame.thread;if(this._focusedSession){var e=this._focusedSession.getAllThreads();if(e&&e.length)return e[e.length-1]}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusedStackFrame",{get:function(){return this._focusedStackFrame},enumerable:!0,configurable:!0}),e.prototype.setFocus=function(e,t,n,i){var r=this._focusedSession!==n||this._focusedThread!==t||this._focusedStackFrame!==e
;this._focusedSession!==n&&(this._focusedSession=n,this._onDidFocusSession.fire(n)),this._focusedThread=t,this._focusedStackFrame=e,r&&this._onDidFocusStackFrame.fire({stackFrame:e,explicit:i})},Object.defineProperty(e.prototype,"onDidFocusSession",{get:function(){return this._onDidFocusSession.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidFocusStackFrame",{get:function(){return this._onDidFocusStackFrame.event},enumerable:!0,configurable:!0}),e.prototype.getSelectedExpression=function(){return this.selectedExpression},e.prototype.setSelectedExpression=function(e){this.selectedExpression=e,this.expressionSelectedContextKey.set(!!e),this._onDidSelectExpression.fire(e)},Object.defineProperty(e.prototype,"onDidSelectExpression",{get:function(){return this._onDidSelectExpression.event},enumerable:!0,configurable:!0}),e.prototype.getSelectedFunctionBreakpoint=function(){return this.selectedFunctionBreakpoint},e.prototype.setSelectedFunctionBreakpoint=function(e){
this.selectedFunctionBreakpoint=e,this.breakpointSelectedContextKey.set(!!e)},e.prototype.isMultiSessionView=function(){return this.multiSessionView},e.prototype.setMultiSessionView=function(e){this.multiSessionView=e},e}();t.ViewModel=r}),define(e[319],t([1,0,144,156,615,289,25,14,24,11,499,7,4,80]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(){this.sequence=1,this.pendingRequests=new Map,this._onError=new h.Emitter,this._onExit=new h.Emitter}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onExit",{get:function(){return this._onExit.event},enumerable:!0,configurable:!0}),e.prototype.onEvent=function(e){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Event' callback")),this.eventCallback=e},e.prototype.onRequest=function(e){
this.requestCallback&&this._onError.fire(new Error("attempt to set more than one 'Request' callback")),this.requestCallback=e},e.prototype.sendResponse=function(e){e.seq>0?this._onError.fire(new Error("attempt to send more than one response for command "+e.command)):this.internalSend("response",e)},e.prototype.sendRequest=function(e,t,n){var i={command:e};t&&Object.keys(t).length>0&&(i.arguments=t),this.internalSend("request",i),n&&this.pendingRequests.set(i.seq,n)},e.prototype.acceptMessage=function(e){switch(e.type){case"event":this.eventCallback&&this.eventCallback(e);break;case"request":this.requestCallback&&this.requestCallback(e);break;case"response":var t=e,n=this.pendingRequests.get(t.request_seq);n&&(this.pendingRequests.delete(t.request_seq),n(t))}},e.prototype.internalSend=function(e,t){t.type=e,t.seq=this.sequence++,this.sendMessage(t)},e}();t.AbstractDebugAdapter=g;var v=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.connect=function(e,t){var n=this
;this.outputStream=t,this.rawData=Buffer.allocUnsafe(0),this.contentLength=-1,e.on("data",function(e){return n.handleData(e)})},t.prototype.sendMessage=function(e){if(this.outputStream){var n=JSON.stringify(e);this.outputStream.write("Content-Length: "+Buffer.byteLength(n,"utf8")+t.TWO_CRLF+n,"utf8")}},t.prototype.handleData=function(e){for(this.rawData=Buffer.concat([this.rawData,e]);;){if(this.contentLength>=0){if(this.rawData.length>=this.contentLength){var n=this.rawData.toString("utf8",0,this.contentLength);if(this.rawData=this.rawData.slice(this.contentLength),this.contentLength=-1,n.length>0)try{this.acceptMessage(JSON.parse(n))}catch(e){this._onError.fire(new Error((e.message||e)+"\n"+n))}continue}}else{var i=this.rawData.indexOf(t.TWO_CRLF);if(-1!==i){for(var r=0,o=this.rawData.toString("utf8",0,i).split(t.HEADER_LINESEPARATOR);r<o.length;r++){var s=o[r].split(t.HEADER_FIELDSEPARATOR);"Content-Length"===s[0]&&(this.contentLength=Number(s[1]))}this.rawData=this.rawData.slice(i+t.TWO_CRLF.length)
;continue}}break}},t.TWO_CRLF="\r\n\r\n",t.HEADER_LINESEPARATOR=/\r?\n/,t.HEADER_FIELDSEPARATOR=/: */,t}(g);t.StreamDebugAdapter=v;var m=function(e){function t(t,n){void 0===n&&(n="127.0.0.1");var i=e.call(this)||this;return i.port=t,i.host=n,i}return n(t,e),t.prototype.startSession=function(){var e=this;return new p.TPromise(function(t,n){e.socket=s.createConnection(e.port,e.host,function(){e.connect(e.socket,e.socket),t(null)}),e.socket.on("error",function(e){n(e)}),e.socket.on("close",function(){return e._onExit.fire(0)})})},t.prototype.stopSession=function(){null!==this.socket&&(this.socket.end(),this.socket=void 0)},t}(v);t.SocketDebugAdapter=m;var y=function(e){function t(n,i,r,o){var s=e.call(this)||this;return s.debugType=n,s.adapterExecutable=i,s.outputService=o,s.adapterExecutable||(s.adapterExecutable=t.platformAdapterExecutable(r,s.debugType)),s}return n(t,e),t.prototype.startSession=function(){var e=this;return new p.TPromise(function(t,n){
e.adapterExecutable.command?a.isAbsolute(e.adapterExecutable.command)?i.existsSync(e.adapterExecutable.command)||n(new Error(o.localize(0,null,e.adapterExecutable.command))):e.adapterExecutable.command.indexOf("/")<0&&e.adapterExecutable.command.indexOf("\\"):n(new Error(o.localize(1,null,e.debugType))),"node"===e.adapterExecutable.command&&e.outputService?Array.isArray(e.adapterExecutable.args)&&e.adapterExecutable.args.length>0?d.fork(e.adapterExecutable.args[0],e.adapterExecutable.args.slice(1),{},function(i,r){i&&n(new Error(o.localize(2,null,e.adapterExecutable.args[0]))),e.serverProcess=r,t(null)}):n(new Error(o.localize(3,null))):(e.serverProcess=r.spawn(e.adapterExecutable.command,e.adapterExecutable.args),t(null))}).then(function(t){if(e.serverProcess.on("error",function(t){return e._onError.fire(t)}),e.serverProcess.on("exit",function(t,n){return e._onExit.fire(t)}),e.outputService){e.serverProcess.stderr.on("data",function(t){e.outputService.getChannel(f.ExtensionsChannelId).append(function(e){
return e.toString().replace(/\r?\n$/gm,"")}(t))})}e.connect(e.serverProcess.stdout,e.serverProcess.stdin)},function(t){e._onError.fire(t)})},t.prototype.stopSession=function(){var e=this;return this.serverProcess?u.isWindows?new p.TPromise(function(t,n){var i=r.exec("taskkill /F /T /PID "+e.serverProcess.pid,function(e,t,i){if(e)return n(e)});i.on("exit",t),i.on("error",n)}):(this.serverProcess.kill("SIGTERM"),p.TPromise.as(null)):p.TPromise.as(null)},t.extract=function(e,n){if(e){var i=Object.create(null);return e.runtime&&(0===e.runtime.indexOf("./")?i.runtime=a.join(n,e.runtime):i.runtime=e.runtime),e.runtimeArgs&&(i.runtimeArgs=e.runtimeArgs),e.program&&(a.isAbsolute(e.program)?i.program=e.program:i.program=a.join(n,e.program)),e.args&&(i.args=e.args),e.win&&(i.win=t.extract(e.win,n)),e.winx86&&(i.winx86=t.extract(e.winx86,n)),e.windows&&(i.windows=t.extract(e.windows,n)),e.osx&&(i.osx=t.extract(e.osx,n)),e.linux&&(i.linux=t.extract(e.linux,n)),i}},t.platformAdapterExecutable=function(e,n){
var i=Object.create(null);n=n.toLowerCase();for(var r=function(e){if(e.contributes){var r=e.contributes.debuggers;r&&r.length>0&&r.filter(function(e){return c.equalsIgnoreCase(e.type,n)}).forEach(function(n){var r=t.extract(n,e.extensionLocation.fsPath);l.mixin(i,r,e.isBuiltin)})}},o=0,s=e;o<s.length;o++){r(s[o])}var a;u.isWindows&&!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?a=i.winx86||i.win||i.windows:u.isWindows?a=i.win||i.windows:u.isMacintosh?a=i.osx:u.isLinux&&(a=i.linux);var d=(a=a||i).program||i.program,h=a.args||i.args,p=a.runtime||i.runtime,f=a.runtimeArgs||i.runtimeArgs;return p?{command:p,args:(f||[]).concat([d]).concat(h||[])}:{command:d,args:h||[]}},t}(v);t.DebugAdapter=y}),define(e[1113],t([1,0,156,617,11,87,24,4,10]),function(e,t,i,r,o,s,a,c,l){"use strict";function u(){return f||(f=new c.TPromise(function(e){o.isLinux?c.TPromise.join([s.exists("/etc/debian_version"),process.lazyEnv]).then(function(t){var n=t[0]
;e(n?"x-terminal-emulator":"gnome"===process.env.DESKTOP_SESSION||"gnome-classic"===process.env.DESKTOP_SESSION?"gnome-terminal":"kde-plasma"===process.env.DESKTOP_SESSION?"konsole":process.env.COLORTERM?process.env.COLORTERM:process.env.TERM?process.env.TERM:"xterm")}):e("xterm")},function(){})),f}function d(){if(!g){var e=!!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");g=(process.env.windir?process.env.windir:"C:\\Windows")+"\\"+(e?"Sysnative":"System32")+"\\cmd.exe"}return g}Object.defineProperty(t,"__esModule",{value:!0});var h=r.localize(0,null),p=void 0;t.getTerminalLauncher=function(){return p||(o.isWindows?p=new m:o.isMacintosh?p=new y:o.isLinux&&(p=new b)),p};var f=null;t.getDefaultTerminalLinuxReady=u;var g=null;t.getDefaultTerminalWindows=d;var v=function(){function e(){}return e.prototype.runInTerminal=function(e,t){return this.runInTerminal0(e.title,e.cwd,e.args,e.env||{},t)},e.prototype.runInTerminal0=function(e,t,n,i,r){},e}(),m=function(e){function t(){
return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runInTerminal0=function(e,n,r,o,s){var l=s.external.windowsExec||d();return new c.TPromise(function(e,s){var c='"'+n+" - "+h+'"',u='""'+r.join('" "')+'" & pause"',d=["/c","start",c,"/wait",l,"/c",u],p=a.assign({},process.env,o);Object.keys(p).filter(function(e){return null===p[e]}).forEach(function(e){return delete p[e]});var f={cwd:n,env:p,windowsVerbatimArguments:!0};i.spawn(t.CMD,d,f).on("error",s),e(null)})},t.CMD="cmd.exe",t}(v),y=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n(o,t),o.prototype.runInTerminal0=function(t,n,s,a,u){var d=u.external.osxExec||o.DEFAULT_TERMINAL_OSX;return new c.TPromise(function(c,u){if(d===o.DEFAULT_TERMINAL_OSX||"iTerm.app"===d){for(var p=d===o.DEFAULT_TERMINAL_OSX?"TerminalHelper":"iTermHelper",f=[l.default.parse(e.toUrl("vs/workbench/parts/execution/electron-browser/"+p+".scpt")).fsPath,"-t",t||h,"-w",n],g=0,v=s;g<v.length;g++){var m=v[g];f.push("-a"),f.push(m)}
if(a)for(var y in a){var b=a[y];null===b?(f.push("-u"),f.push(y)):(f.push("-e"),f.push(y+"="+b))}var S="",_=i.spawn(o.OSASCRIPT,f);_.on("error",u),_.stderr.on("data",function(e){S+=e.toString()}),_.on("exit",function(e){if(0===e)c(null);else if(S){var t=S.split("\n",1);u(new Error(t[0]))}else u(new Error(r.localize(1,null,p,e)))})}else u(new Error(r.localize(2,null,d)))})},o.DEFAULT_TERMINAL_OSX="Terminal.app",o.OSASCRIPT="/usr/bin/osascript",o}(v),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runInTerminal0=function(e,n,o,s,l){var d=l.external,h=d.linuxExec?c.TPromise.as(d.linuxExec):u();return new c.TPromise(function(e,c){var l=[];h.then(function(u){u.indexOf("gnome-terminal")>=0?l.push("-x"):l.push("-e"),l.push("bash"),l.push("-c");var d=function(e){for(var t="",n=0,i=e;n<i.length;n++){var r=i[n];r.indexOf(" ")>=0?t+='"'+r+'"':t+=r,t+=" "}return t}(o)+'; echo; read -p "'+t.WAIT_MESSAGE+'" -n1;';l.push("''"+d+"''");var h=a.assign({},process.env,s)
;Object.keys(h).filter(function(e){return null===h[e]}).forEach(function(e){return delete h[e]});var p={cwd:n,env:h},f="",g=i.spawn(u,l,p);g.on("error",c),g.stderr.on("data",function(e){f+=e.toString()}),g.on("exit",function(t){if(0===t)e(null);else if(f){var n=f.split("\n",1);c(new Error(n[0]))}else c(new Error(r.localize(4,null,u,t)))})})})},t.WAIT_MESSAGE=r.localize(3,null),t}(v);t.hasChildprocesses=function(e){if(e)try{if(o.isWindows){if((t=i.spawnSync("wmic",["process","get","ParentProcessId"])).stdout&&!t.stdout.toString().split("\r\n").some(function(t){return parseInt(t)===e}))return!1}else{var t=i.spawnSync("/usr/bin/pgrep",["-lP",String(e)]);if(t.stdout){var n=t.stdout.toString().trim();if(0===n.length||n.indexOf(" tmux")>=0)return!1}}}catch(e){}return!0};var S;!function(e){e[e.cmd=0]="cmd",e[e.powershell=1]="powershell",e[e.bash=2]="bash"}(S||(S={})),t.prepareCommand=function(e,t){var n,i,r=t.integrated.shell;o.isWindows?(i=r.windows,n=0):o.isLinux?(i=r.linux,n=2):o.isMacintosh&&(i=r.osx,n=2),
(i=i.trim().toLowerCase()).indexOf("powershell")>=0?n=1:i.indexOf("cmd.exe")>=0?n=0:i.indexOf("bash")>=0?n=2:i.indexOf("git\\bin\\bash.exe")>=0&&(n=2);var s,a="";switch(n){case 1:if(s=function(e){return"'"+(e=e.replace(/\'/g,"''"))+"'"},e.cwd&&(a+="cd '"+e.cwd+"'; "),e.env)for(var c in e.env)a+=null===(f=e.env[c])?"Remove-Item env:"+c+"; ":"${env:"+c+"}='"+f+"'; ";if(e.args&&e.args.length>0){var l=s(e.args.shift());a+="'"===l[0]?"& "+l+" ":l+" ";for(var u=0,d=e.args;u<d.length;u++)a+=s(m=d[u])+" "}break;case 0:if(s=function(e){return(e=e.replace(/\"/g,'""')).indexOf(" ")>=0||e.indexOf('"')>=0?'"'+e+'"':e},e.cwd&&(a+="cd "+s(e.cwd)+" && "),e.env){a+='cmd /C "';for(var c in e.env)a+=null===(f=e.env[c])?'set "'+c+'=" && ':'set "'+c+"="+e.env[c]+'" && '}for(var h=0,p=e.args;h<p.length;h++)a+=s(m=p[h])+" ";e.env&&(a+='"');break;case 2:if(s=function(e){return(e=e.replace(/\"/g,'\\"')).indexOf(" ")>=0||e.indexOf("\\")>=0?'"'+e+'"':e},e.cwd&&(a+="cd "+s(e.cwd)+" ; "),e.env){a+="env";for(var c in e.env){var f=e.env[c]
;a+=null===f?' -u "'+c+'"':' "'+c+"="+f+'"'}a+=" "}for(var g=0,v=e.args;g<v.length;g++){var m=v[g];a+=s(m)+" "}}return a}}),define(e[1114],t([1,0,618,4,32,64,55]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){return e.call(this,{id:"workbench.action.showEmmetCommands",label:i.localize(0,null),alias:"Show Emmet Commands",precondition:a.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t){return e.get(s.IQuickOpenService).show(">Emmet: "),r.TPromise.as(null)},t}(o.EditorAction);o.registerEditorAction(c)}),define(e[1115],t([1,0,1114]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(e[531],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalService=n.createDecorator("nativeTerminalService")}),define(e[532],t([1,0,11,87,4]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=null
;t.getDefaultTerminalLinuxReady=function(){return o||(o=new r.TPromise(function(e){n.isLinux?r.TPromise.join([i.exists("/etc/debian_version"),process.lazyEnv]).then(function(t){var n=t[0];e(n?"x-terminal-emulator":"gnome"===process.env.DESKTOP_SESSION||"gnome-classic"===process.env.DESKTOP_SESSION?"gnome-terminal":"kde-plasma"===process.env.DESKTOP_SESSION?"konsole":process.env.COLORTERM?process.env.COLORTERM:process.env.TERM?process.env.TERM:"xterm")}):e("xterm")},function(){})),o},t.DEFAULT_TERMINAL_OSX="Terminal.app";var s=null;t.getDefaultTerminalWindows=function(){if(!s){var e=!!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");s=(process.env.windir?process.env.windir:"C:\\Windows")+"\\"+(e?"Sysnative":"System32")+"\\cmd.exe"}return s}}),define(e[1118],t([1,0,156,59,224,621,9,24,4,17,532,10]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f,g=o.localize(0,null);!function(e){e[e.CMD=0]="CMD",e[e.CMDER=1]="CMDER"}(f||(f={}));var v=function(){
function e(e){this._configurationService=e}return e.prototype.openTerminal=function(e){var t=this._configurationService.getValue();this.spawnTerminal(n,t,r.getWindowsShell(),e).done(null,s.onUnexpectedError)},e.prototype.runInTerminal=function(t,i,r,o){var s=this._configurationService.getValue().terminal.external.windowsExec||h.getDefaultTerminalWindows();return new u.TPromise(function(t,a){var l='"'+i+" - "+g+'"',u='""'+r.join('" "')+'" & pause"',d=["/c","start",l,"/wait",s,"/c",u],h=c.assign({},process.env,o);Object.keys(h).filter(function(e){return null===h[e]}).forEach(function(e){return delete h[e]});var p={cwd:i,env:h,windowsVerbatimArguments:!0};n.spawn(e.CMD,d,p).on("error",a),t(null)})},e.prototype.spawnTerminal=function(e,t,n,i){var r=t.terminal.external.windowsExec||h.getDefaultTerminalWindows(),o=this.getSpawnType(r);if(i&&":"===i[1]&&(i=i[0].toUpperCase()+i.substr(1)),o===f.CMDER)return e.spawn(r,[i]),u.TPromise.as(void 0);var s=["/c","start","/wait",'""',r];return new u.TPromise(function(t,r){
var o=i?{cwd:i}:void 0,a=e.spawn(n,s,o);a.on("error",r),a.on("exit",function(){return t(null)})})},e.prototype.getSpawnType=function(e){var t=i.basename(e).toLowerCase();return"cmder"===t||"cmder.exe"===t?f.CMDER:f.CMD},e.CMD="cmd.exe",e=a([l(0,d.IConfigurationService)],e)}();t.WinTerminalService=v;var m=function(){function t(e){this._configurationService=e}return t.prototype.openTerminal=function(e){var t=this._configurationService.getValue();this.spawnTerminal(n,t,e).done(null,s.onUnexpectedError)},t.prototype.runInTerminal=function(i,r,s,a){var c=this._configurationService.getValue().terminal.external.osxExec||h.DEFAULT_TERMINAL_OSX;return new u.TPromise(function(l,u){if(c===h.DEFAULT_TERMINAL_OSX||"iTerm.app"===c){for(var d=c===h.DEFAULT_TERMINAL_OSX?"TerminalHelper":"iTermHelper",f=[p.default.parse(e.toUrl("vs/workbench/parts/execution/electron-browser/"+d+".scpt")).fsPath,"-t",i||g,"-w",r],v=0,m=s;v<m.length;v++){var y=m[v];f.push("-a"),f.push(y)}if(a)for(var b in a){var S=a[b];null===S?(f.push("-u"),
f.push(b)):(f.push("-e"),f.push(b+"="+S))}var _="",C=n.spawn(t.OSASCRIPT,f);C.on("error",u),C.stderr.on("data",function(e){_+=e.toString()}),C.on("exit",function(e){if(0===e)l(null);else if(_){var t=_.split("\n",1);u(new Error(t[0]))}else u(new Error(o.localize(1,null,d,e)))})}else u(new Error(o.localize(2,null,c)))})},t.prototype.spawnTerminal=function(e,t,n){var i=t.terminal.external.osxExec||h.DEFAULT_TERMINAL_OSX;return new u.TPromise(function(t,r){var o=e.spawn("/usr/bin/open",["-a",i,n]);o.on("error",r),o.on("exit",function(){return t(null)})})},t.OSASCRIPT="/usr/bin/osascript",t=a([l(0,d.IConfigurationService)],t)}();t.MacTerminalService=m;var y=function(){function e(e){this._configurationService=e}return e.prototype.openTerminal=function(e){var t=this._configurationService.getValue();this.spawnTerminal(n,t,e).done(null,s.onUnexpectedError)},e.prototype.runInTerminal=function(t,i,r,s){
var a=this._configurationService.getValue().terminal.external,l=a.linuxExec?u.TPromise.as(a.linuxExec):h.getDefaultTerminalLinuxReady();return new u.TPromise(function(t,a){var u=[];l.then(function(l){l.indexOf("gnome-terminal")>=0?u.push("-x"):u.push("-e"),u.push("bash"),u.push("-c");var d=function(e){for(var t="",n=0,i=e;n<i.length;n++){var r=i[n];r.indexOf(" ")>=0?t+='"'+r+'"':t+=r,t+=" "}return t}(r)+'; echo; read -p "'+e.WAIT_MESSAGE+'" -n1;';u.push("''"+d+"''");var h=c.assign({},process.env,s);Object.keys(h).filter(function(e){return null===h[e]}).forEach(function(e){return delete h[e]});var p={cwd:i,env:h},f="",g=n.spawn(l,u,p);g.on("error",a),g.stderr.on("data",function(e){f+=e.toString()}),g.on("exit",function(e){if(0===e)t(null);else if(f){var n=f.split("\n",1);a(new Error(n[0]))}else a(new Error(o.localize(4,null,l,e)))})})})},e.prototype.spawnTerminal=function(e,t,n){var i=t.terminal.external,r=i.linuxExec?u.TPromise.as(i.linuxExec):h.getDefaultTerminalLinuxReady(),o=n?{cwd:n}:void 0
;return new u.TPromise(function(t,n){r.then(function(i){var r=e.spawn(i,[],o);r.on("error",n),r.on("exit",function(){return t(null)})})})},e.WAIT_MESSAGE=o.localize(3,null),e=a([l(0,d.IConfigurationService)],e)}();t.LinuxTerminalService=y}),define(e[540],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.value=e,this.sortBy=t,this.groupBy=n,this.value=e.trim()}return e.parse=function(t){var n="",i="";return t=(t=t.replace(/@sort:(\w+)(-\w*)?/g,function(e,t,i){return n=t,""})).replace(/@group:(\w+)(-\w*)?/g,function(e,t,n){return i=t,""}),new e(t,n,i)},e.prototype.toString=function(){var e=this.value;return this.sortBy&&(e=e+(e?" ":"")+"@sort:"+this.sortBy),this.groupBy&&(e=e+(e?" ":"")+"@group:"+this.groupBy),e},e.prototype.isValid=function(){return!/@outdated/.test(this.value)},e.prototype.equals=function(e){return this.value===e.value&&this.sortBy===e.sortBy},e}();t.Query=n}),define(e[104],t([1,0,6,98,16]),function(e,t,n,i,r){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWLET_ID="workbench.view.extensions",t.VIEW_CONTAINER=r.Registry.as(i.Extensions.ViewContainersRegistry).registerViewContainer(t.VIEWLET_ID);!function(e){e[e.Installing=0]="Installing",e[e.Installed=1]="Installed",e[e.Uninstalling=2]="Uninstalling",e[e.Uninstalled=3]="Uninstalled"}(t.ExtensionState||(t.ExtensionState={})),t.SERVICE_ID="extensionsWorkbenchService",t.IExtensionsWorkbenchService=n.createDecorator(t.SERVICE_ID),t.ConfigurationKey="extensions",t.AutoUpdateConfigurationKey="extensions.autoUpdate",t.ShowRecommendationsOnlyOnDemandKey="extensions.showRecommendationsOnlyOnDemand",t.CloseExtensionDetailsOnViewChangeKey="extensions.closeExtensionDetailsOnViewChange"}),define(e[1121],t([1,0,8,622,5,4,23,104,7,106,6,58,17]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(){function e(){}return e.prototype.getId=function(e,t){var n=this,i=t.identifier
;return this.getParent(e,t).then(function(t){i=t?n.getId(e,t)+"/"+i:i}),i},e.prototype.hasChildren=function(e,t){return t.hasDependencies},e.prototype.getChildren=function(e,t){return s.TPromise.as(t.dependencies)},e.prototype.getParent=function(e,t){return s.TPromise.as(t.dependent)},e}();t.DataSource=v;var m=function(){function e(e){this.instantiationService=e}return e.prototype.getHeight=function(e,t){return 62},e.prototype.getTemplateId=function(t,n){return n.extension?e.EXTENSION_TEMPLATE_ID:e.UNKNOWN_EXTENSION_TEMPLATE_ID},e.prototype.renderTemplate=function(t,n,i){return e.EXTENSION_TEMPLATE_ID===n?this.renderExtensionTemplate(t,i):this.renderUnknownExtensionTemplate(t,i)},e.prototype.renderExtensionTemplate=function(e,t){i.addClass(t,"dependency");var n=i.append(t,i.$("img.icon")),r=i.append(t,i.$(".details")),o=i.append(r,i.$(".header")),s=i.append(o,i.$("span.name")),a=this.instantiationService.createInstance(b),c=[i.addDisposableListener(s,"click",function(t){e.setFocus(a.extensionDependencies),
e.setSelection([a.extensionDependencies]),a.run(t.ctrlKey||t.metaKey),t.stopPropagation(),t.preventDefault()})],l=i.append(o,i.$("span.identifier")),u=i.append(r,i.$(".footer"));return{icon:n,name:s,identifier:l,author:i.append(u,i.$(".author")),extensionDisposables:c,set extensionDependencies(e){a.extensionDependencies=e}}},e.prototype.renderUnknownExtensionTemplate=function(e,t){var n=i.append(t,i.$("div.unknown-dependency"));i.append(n,i.$("span.error-marker")).textContent=r.localize(0,null),i.append(n,i.$("span.message")).textContent=r.localize(1,null);return{identifier:i.append(n,i.$("span.message"))}},e.prototype.renderElement=function(t,n,i,r){i!==e.EXTENSION_TEMPLATE_ID?this.renderUnknownExtension(t,n,r):this.renderExtension(t,n,r)},e.prototype.renderExtension=function(e,t,n){var i=t.extension;d.once(h.domEvent(n.icon,"error"))(function(){return n.icon.src=i.iconUrlFallback},null,n.extensionDisposables),n.icon.src=i.iconUrl,
n.icon.complete?n.icon.style.visibility="inherit":(n.icon.style.visibility="hidden",n.icon.onload=function(){return n.icon.style.visibility="inherit"}),n.name.textContent=i.displayName,n.identifier.textContent=i.id,n.author.textContent=i.publisherDisplayName,n.extensionDependencies=t},e.prototype.renderUnknownExtension=function(e,t,n){n.identifier.textContent=t.identifier},e.prototype.disposeTemplate=function(t,n,i){n===e.EXTENSION_TEMPLATE_ID&&(i.extensionDisposables=o.dispose(i.extensionDisposables))},e.EXTENSION_TEMPLATE_ID="extension-template",e.UNKNOWN_EXTENSION_TEMPLATE_ID="unknown-extension-template",e=a([l(0,p.IInstantiationService)],e)}();t.Renderer=m;var y=function(e){function t(t,n){var i=e.call(this,{},n)||this;return i.extensionsWorkdbenchService=t,i.downKeyBindingDispatcher.set(2051,function(e,t){return i.openExtension(e,!0)}),i}return n(t,e),t.prototype.onLeftClick=function(t,n,i){var r=t.getFocus()
;return!(!e.prototype.onLeftClick.call(this,t,n,i)||null!==n.dependent)&&(r?t.setFocus(r):t.focusFirst(),!0)},t.prototype.openExtension=function(e,t){var n=e.getFocus();return!!n.extension&&(this.extensionsWorkdbenchService.open(n.extension,t),!0)},t=a([l(0,u.IExtensionsWorkbenchService),l(1,g.IConfigurationService)],t)}(f.WorkbenchTreeController);t.Controller=y;var b=function(e){function t(t){var n=e.call(this,"extensions.action.openDependency","")||this;return n.extensionsWorkdbenchService=t,n}return n(t,e),Object.defineProperty(t.prototype,"extensionDependencies",{get:function(){return this._extensionDependencies},set:function(e){this._extensionDependencies=e},enumerable:!0,configurable:!0}),t.prototype.run=function(e){return this.extensionsWorkdbenchService.open(this._extensionDependencies.extension,e)},t=a([l(0,u.IExtensionsWorkbenchService)],t)}(c.Action)}),define(e[545],t([1,0,5,104,8,11,624,888]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){
function e(e,t,n){this.element=e,this.fn=t,this.render(),this.listener=n.onChange(this.render,this)}return Object.defineProperty(e.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.render()},enumerable:!0,configurable:!0}),e.prototype.render=function(){this.element.textContent=this.extension?this.fn(this.extension):""},e.prototype.dispose=function(){this.listener=n.dispose(this.listener)},e=a([l(2,i.IExtensionsWorkbenchService)],e)}();t.Label=c;var u=function(){function e(e,t,n){var i=this;this.container=e,this.options=t,this.disposables=[],this._extension=t.extension,this.disposables.push(n.onChange(function(){return i.render()})),r.addClass(e,"extension-install-count"),this.render()}return Object.defineProperty(e.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.render()},enumerable:!0,configurable:!0}),e.prototype.render=function(){if(this.container.innerHTML="",this.extension){
var e=this.extension.installCount;if(null!==e){var t;t=this.options.small?e>1e6?Math.floor(e/1e5)/10+"M":e>1e3?Math.floor(e/1e3)+"K":String(e):e.toLocaleString(o.locale),r.append(this.container,r.$("span.octicon.octicon-cloud-download"));r.append(this.container,r.$("span.count")).textContent=t}}},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e=a([l(2,i.IExtensionsWorkbenchService)],e)}();t.InstallCountWidget=u;var d=function(){function e(e,t,n){var i=this;this.container=e,this.options=t,this.disposables=[],this._extension=t.extension,this.disposables.push(n.onChange(function(){return i.render()})),r.addClass(e,"extension-ratings"),t.small&&r.addClass(e,"small"),this.render()}return Object.defineProperty(e.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.render()},enumerable:!0,configurable:!0}),e.prototype.render=function(){if(this.container.innerHTML="",this.extension){var e=Math.round(2*this.extension.rating)/2
;if(null!==this.extension.rating&&(!this.options.small||0!==this.extension.ratingCount))if(this.options.small){r.append(this.container,r.$("span.full.star"));r.append(this.container,r.$("span.count")).textContent=String(e),this.container.title=this.extension.ratingCount>1?s.localize(0,null,this.extension.ratingCount):s.localize(1,null)}else for(var t=1;t<=5;t++)e>=t?r.append(this.container,r.$("span.full.star")):e>=t-.5?r.append(this.container,r.$("span.half.star")):r.append(this.container,r.$("span.empty.star"))}},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e=a([l(2,i.IExtensionsWorkbenchService)],e)}();t.RatingsWidget=d}),define(e[546],t([1,0,625,80]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionsConfigurationSchemaId="vscode://schemas/extensions",t.ExtensionsConfigurationSchema={id:t.ExtensionsConfigurationSchemaId,allowComments:!0,type:"object",title:n.localize(0,null),additionalProperties:!1,properties:{recommendations:{
type:"array",description:n.localize(1,null),items:{type:"string",pattern:i.EXTENSION_IDENTIFIER_PATTERN,errorMessage:n.localize(2,null)}},unwantedRecommendations:{type:"array",description:n.localize(3,null),items:{type:"string",pattern:i.EXTENSION_IDENTIFIER_PATTERN,errorMessage:n.localize(4,null)}}}},t.ExtensionsConfigurationInitialContent=["{","\t// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.","\t// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp","","\t// List of extensions which should be recommended for users of this workspace.",'\t"recommendations": [',"\t\t","\t],","\t// List of extensions recommended by VS Code that should not be recommended for users of this workspace.",'\t"unwantedRecommendations": [',"\t\t","\t]","}"].join("\n")}),define(e[285],t([1,0,626,4,40,10,80]),function(e,t,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n){var i=e.call(this)||this
;return i._extension=t,i.extensionManagementServerService=n,i}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){return this.extensionManagementServerService.extensionManagementServers},enumerable:!0,configurable:!0}),t.prototype.getTypeId=function(){return t.ID},t.prototype.getName=function(){return i.localize(0,null,this.extension.displayName)},t.prototype.matches=function(e){if(!(e instanceof t))return!1;var n=e;return this.extension===n.extension},t.prototype.resolve=function(e){return r.TPromise.as(null)},t.prototype.supportsSplitEditor=function(){return!1},t.prototype.getResource=function(){return s.default.from({scheme:"extension",path:this.extension.id})},t.ID="workbench.extensions.input2",t=a([l(1,c.IExtensionManagementServerService)],t)}(o.EditorInput);t.ExtensionsInput=u}),
define(e[549],t([1,0,20,633,7,9,4,5,28,80,38,6,123,336,22]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";function m(e){var t=e.get(d.IExtensionManagementService),n=e.get(d.IExtensionEnablementService);return r.debounceEvent(r.anyEvent(r.chain(r.anyEvent(t.onDidInstallExtension,t.onDidUninstallExtension)).map(function(e){return{id:S(e.identifier.id),uuid:e.identifier.uuid}}).event,n.onEnablementChanged),function(e,t){return e?(e.some(function(e){return!f.areSameExtensions(e,t)})&&e.push(t),e):[t]})}function y(e){var t=e.get(d.IExtensionManagementService),n=e.get(d.IExtensionEnablementService);return t.getInstalled().then(function(e){return n.getDisabledExtensions().then(function(t){return e.map(function(e){return{identifier:{id:f.adoptToGalleryExtensionId(S(e.identifier.id)),uuid:e.identifier.uuid},local:e,globallyEnabled:t.every(function(t){return!f.areSameExtensions(t,e.identifier)})}})})})}function b(e,t){var n=t.local.manifest.categories
;return n&&-1!==n.indexOf("Keymaps")||e.getKeymapRecommendations().some(function(e){var n=e.extensionId;return f.areSameExtensions({id:n},{id:f.getGalleryExtensionIdFromLocal(t.local)})})}function S(e){return g.getIdAndVersionFromLocalExtensionId(e).id}Object.defineProperty(t,"__esModule",{value:!0});var _=function(){function e(e,t,n,i,r,a){var c=this;this.instantiationService=e,this.extensionEnablementService=t,this.tipsService=n,this.notificationService=r,this.telemetryService=a,this.disposables=[],this.disposables.push(i.onShutdown(function(){return c.dispose()}),e.invokeFunction(m)(function(e){s.TPromise.join(e.map(function(e){return c.checkForOtherKeymaps(e)})).then(null,o.onUnexpectedError)}))}return e.prototype.checkForOtherKeymaps=function(e){var t=this;return this.instantiationService.invokeFunction(y).then(function(i){var r=i.filter(function(e){return b(t.tipsService,e)}),o=n.first(r,function(t){return S(t.identifier.id)===e.id});if(o&&o.globallyEnabled){var s=r.filter(function(t){
return S(t.identifier.id)!==e.id&&t.globallyEnabled});if(s.length)return t.promptForDisablingOtherKeymaps(o,s)}})},e.prototype.promptForDisablingOtherKeymaps=function(e,t){var n=this,r=function(i){var r={newKeymap:e.identifier,oldKeymaps:t.map(function(e){return e.identifier}),confirmed:i};n.telemetryService.publicLog("disableOtherKeymaps",r),i&&s.TPromise.join(t.map(function(e){return n.extensionEnablementService.setEnablement(e.local,d.EnablementState.Disabled)}))};this.notificationService.prompt(v.Severity.Info,i.localize(0,null,t.map(function(e){return"'"+e.local.manifest.displayName+"'"}).join(", ")),[{label:i.localize(1,null),run:function(){return r(!0)}},{label:i.localize(2,null),run:function(){return r(!1)}}])},e.prototype.dispose=function(){this.disposables=c.dispose(this.disposables)},e=a([l(0,p.IInstantiationService),l(1,d.IExtensionEnablementService),l(2,d.IExtensionTipsService),l(3,h.ILifecycleService),l(4,v.INotificationService),l(5,u.ITelemetryService)],e)}();t.KeymapExtensions=_,
t.onExtensionChanged=m,t.getInstalledExtensions=y,t.isKeymapExtension=b}),define(e[202],t([1,0,10,25,70,50,11,27,40,5,43,14]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e){var t=this;this.contextService=e;var n=function(){return t._roots=t.contextService.getWorkspace().folders.map(function(e){return new v(e.uri,void 0,!1,!1,!0,e.name)})};this._listener=this.contextService.onDidChangeWorkspaceFolders(function(){return n()}),n()}return Object.defineProperty(e.prototype,"roots",{get:function(){return this._roots},enumerable:!0,configurable:!0}),e.prototype.findAll=function(e){return this.roots.map(function(t){return t.find(e)}).filter(function(e){return!!e})},e.prototype.findClosest=function(e){var t=this.contextService.getWorkspaceFolder(e);if(t){var n=this.roots.filter(function(e){return e.resource.toString()===t.uri.toString()}).pop();if(n)return n.find(e)}return null},e.prototype.dispose=function(){
this._listener=h.dispose(this._listener)},e=a([l(0,u.IWorkspaceContextService)],e)}();t.Model=g;var v=function(){function e(e,t,n,i,r,s,a,c,l){void 0===s&&(s=o.basenameOrAuthority(e)),this.root=t,this.resource=e,this._name=s,this.isDirectory=!!r,this._isSymbolicLink=!!n,this._isReadonly=!!i,this.etag=c,this.mtime=a,this._isError=!!l,this.root||(this.root=this),this.isDirectoryResolved=!1}return Object.defineProperty(e.prototype,"isSymbolicLink",{get:function(){return this._isSymbolicLink},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDirectory",{get:function(){return this._isDirectory},set:function(e){e!==this._isDirectory&&(this._isDirectory=e,this._isDirectory?this.children=new Map:this.children=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReadonly",{get:function(){return this._isReadonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isError",{get:function(){return this._isError},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.updateName=function(e){this.parent&&this.parent.removeChild(this),this._name=e,this.parent&&this.parent.addChild(this)},e.prototype.getId=function(){return this.resource.toString()},Object.defineProperty(e.prototype,"isRoot",{get:function(){return this===this.root},enumerable:!0,configurable:!0}),e.create=function(t,n,i,r){void 0===r&&(r=!1);var s=new e(t.resource,n,t.isSymbolicLink,t.isReadonly,t.isDirectory,t.name,t.mtime,t.etag,r);if(s.isDirectory&&(s.isDirectoryResolved=!!t.children||!!i&&i.some(function(e){return o.isEqualOrParent(e,s.resource,!c.isLinux)}),t.children))for(var a=0,l=t.children.length;a<l;a++){var u=e.create(t.children[a],n,i);u.parent=s,s.addChild(u)}return s},e.mergeLocalWithDisk=function(t,n){if(t.resource.toString()===n.resource.toString()){var i=t.isDirectory||n.isDirectory;if((!i||!n.isDirectoryResolved||t.isDirectoryResolved)&&(n.resource=t.resource,
n.updateName(t.name),n.isDirectory=t.isDirectory,n.mtime=t.mtime,n.isDirectoryResolved=t.isDirectoryResolved,n._isSymbolicLink=t.isSymbolicLink,n._isReadonly=t.isReadonly,n._isError=t.isError,i&&t.isDirectoryResolved)){var r=new s.ResourceMap;n.children&&n.children.forEach(function(e){r.set(e.resource,e)}),n.children=new Map,t.children.forEach(function(t){var i=r.get(t.resource);i?(e.mergeLocalWithDisk(t,i),i.parent=n,n.addChild(i)):(t.parent=n,n.addChild(t))})}}},e.prototype.addChild=function(e){this.children||(this.isDirectory=!0),e.parent=this,e.updateResource(!1),this.children.set(this.getPlatformAwareName(e.name),e)},e.prototype.getChild=function(e){if(this.children)return this.children.get(this.getPlatformAwareName(e))},e.prototype.getChildrenArray=function(){if(this.children){var e=[];return this.children.forEach(function(t){e.push(t)}),e}},e.prototype.getChildrenCount=function(){return this.children?this.children.size:0},e.prototype.getChildrenNames=function(){if(!this.children)return[];var e=[]
;return this.children.forEach(function(t){e.push(t.name)}),e},e.prototype.removeChild=function(e){this.children.delete(this.getPlatformAwareName(e.name))},e.prototype.getPlatformAwareName=function(e){return c.isLinux||!e?e:e.toLowerCase()},e.prototype.move=function(e,t,n){var i=this;t||(t=function(e){e()}),this.parent.removeChild(this),t(function(){e.removeChild(i),e.addChild(i),i.updateResource(!0),n&&n()})},e.prototype.updateResource=function(e){this.resource=this.parent.resource.with({path:r.join(this.parent.resource.path,this.name)}),e&&this.isDirectory&&this.children&&this.children.forEach(function(e){e.updateResource(!0)})},e.prototype.rename=function(e){this.updateName(e.name),this.mtime=e.mtime,this.updateResource(!0)},e.prototype.find=function(e){return e&&this.resource.scheme===e.scheme&&this.resource.authority===e.authority&&(c.isLinux?f.startsWith(e.path,this.resource.path):f.startsWithIgnoreCase(e.path,this.resource.path))?this.findByPath(f.rtrim(e.path,r.sep),this.resource.path.length):null},
e.prototype.findByPath=function(e,t){if(r.isEqual(f.rtrim(this.resource.path,r.sep),e,!c.isLinux))return this;if(this.children){for(;t<e.length&&e[t]===r.sep;)t++;var n=e.indexOf(r.sep,t);-1===n&&(n=e.length);var i=e.substring(t,n),o=this.children.get(this.getPlatformAwareName(i));if(o)return o.findByPath(e,n)}return null},e}();t.ExplorerItem=v;var m=function(e){function t(n,r){var o=e.call(this,i.default.file(""),r,!1,!1,!1,t.NAME)||this;return o.id=t.ID++,o.isDirectoryResolved=n,o.directoryPlaceholder=n,o}return n(t,e),t.prototype.destroy=function(){this.parent.removeChild(this),this.isDirectoryResolved=void 0,this.isDirectory=void 0,this.mtime=void 0},t.prototype.getId=function(){return"new-stat-placeholder:"+this.id+":"+this.parent.resource.toString()},t.prototype.isDirectoryPlaceholder=function(){return this.directoryPlaceholder},t.prototype.addChild=function(e){throw new Error("Can't perform operations in NewStatPlaceholder.")},t.prototype.removeChild=function(e){
throw new Error("Can't perform operations in NewStatPlaceholder.")},t.prototype.move=function(e){throw new Error("Can't perform operations in NewStatPlaceholder.")},t.prototype.rename=function(e){throw new Error("Can't perform operations in NewStatPlaceholder.")},t.prototype.find=function(e){return null},t.addNewStatPlaceholder=function(e,n){var i=new t(n,e.root);return i.parent=e,e.addChild(i),i},t.NAME="",t.ID=0,t}(v);t.NewStatPlaceholder=m;var y=function(){function e(e,t){this._editor=e,this._group=t}return Object.defineProperty(e.prototype,"editor",{get:function(){return this._editor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"editorIndex",{get:function(){return this._group.getIndexOfEditor(this.editor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this._group},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._group.id},enumerable:!0,configurable:!0}),
e.prototype.getId=function(){return"openeditor:"+this.groupId+":"+this.editorIndex+":"+this.editor.getName()+":"+this.editor.getDescription()},e.prototype.isPreview=function(){return this._group.previewEditor===this.editor},e.prototype.isUntitled=function(){return!!d.toResource(this.editor,{supportSideBySide:!0,filter:p.Schemas.untitled})},e.prototype.isDirty=function(){return this.editor.isDirty()},e.prototype.getResource=function(){return d.toResource(this.editor,{supportSideBySide:!0})},e}();t.OpenEditor=y}),define(e[327],t([1,0,10,202,40,257,169]),function(e,t,n,i,r,o,s){"use strict";function a(e,t,o){if(n.default.isUri(e))return e;var a=t.lastFocusedList;if(a&&a.isDOMFocused()){var c;if(a instanceof s.List){var l=a.getFocusedElements();l.length&&(c=l[0])}else c=a.getFocus();if(c instanceof i.ExplorerItem)return c.resource;if(c instanceof i.OpenEditor)return c.getResource()}return r.toResource(o.activeEditor,{supportSideBySide:!0})}Object.defineProperty(t,"__esModule",{value:!0}),
t.getResourceForCommand=a,t.getMultiSelectedResources=function(e,t,r){var c=t.lastFocusedList;if(c&&c.isDOMFocused()){if(c instanceof o.Tree){var l=c.getSelection().map(function(e){return e.resource}),u=c.getFocus(),d=n.default.isUri(e)?e.toString():u instanceof i.ExplorerItem?u.resource.toString():void 0;if(l.some(function(e){return n.default.isUri(e)&&e.toString()===d}))return l}if(c instanceof s.List){var l=c.getSelectedElements().filter(function(e){return e instanceof i.OpenEditor}).map(function(e){return e.getResource()}),h=c.getFocusedElements(),p=h.length?h[0]:void 0,f=n.default.isUri(e)?e.toString():p instanceof i.OpenEditor?p.getResource().toString():void 0;if(l.some(function(e){return e.toString()===f}))return l}}var g=a(e,t,r);return g?[g]:[]}}),define(e[1128],t([1,0,7,652,27,26,5]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){var r=this;this.model=e,this.label=i.localize(0,null),this._onDidChange=new n.Emitter,
this.toDispose=[],this.toDispose.push(t.onDidChangeWorkspaceFolders(function(e){r._onDidChange.fire(e.changed.concat(e.added).map(function(e){return e.uri}))}))}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.changed=function(e){this._onDidChange.fire(e)},e.prototype.provideDecorations=function(e){var t=this.model.findClosest(e);return t&&t.isRoot&&t.isError?{tooltip:i.localize(1,null),letter:"!",color:o.listInvalidItemForeground}:t&&t.isSymbolicLink?{tooltip:i.localize(2,null),letter:"⤷"}:void 0},e.prototype.dispose=function(){return s.dispose(this.toDispose)},e=a([l(1,r.IWorkspaceContextService)],e)}();t.ExplorerDecorationsProvider=c}),define(e[556],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mainLogChannelId="mainLog",t.sharedLogChannelId="sharedLog",t.rendererLogChannelId="rendererLog",t.extHostLogChannelId="extHostLog"}),define(e[201],t([1,0,15]),function(e,t,n){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={MARKERS_PANEL_ID:"workbench.panel.markers",MARKER_COPY_ACTION_ID:"problems.action.copy",MARKER_COPY_MESSAGE_ACTION_ID:"problems.action.copyMessage",RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID:"problems.action.copyRelatedInformationMessage",MARKER_OPEN_SIDE_ACTION_ID:"problems.action.openToSide",MARKER_SHOW_PANEL_ID:"workbench.action.showErrorsWarnings",MarkerFocusContextKey:new n.RawContextKey("problemFocus",!0),RelatedInformationFocusContextKey:new n.RawContextKey("relatedInformationFocus",!0)}}),define(e[228],t([1,0,667,25,90]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.MARKERS_PANEL_VIEW_CATEGORY=n.localize(0,null),e.MARKERS_PANEL_TOGGLE_LABEL=n.localize(1,null),e.MARKERS_PANEL_SHOW_LABEL=n.localize(2,null),e.PROBLEMS_PANEL_CONFIGURATION_TITLE=n.localize(3,null),e.PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL=n.localize(4,null),
e.MARKERS_PANEL_TITLE_PROBLEMS=n.localize(5,null),e.MARKERS_PANEL_ARIA_LABEL_PROBLEMS_TREE=n.localize(6,null),e.MARKERS_PANEL_NO_PROBLEMS_BUILT=n.localize(7,null),e.MARKERS_PANEL_NO_PROBLEMS_FILTERS=n.localize(8,null),e.MARKERS_PANEL_NO_PROBLEMS_FILE_EXCLUSIONS_FILTER=n.localize(9,null),e.MARKERS_PANEL_ACTION_TOOLTIP_USE_FILES_EXCLUDE=n.localize(10,null),e.MARKERS_PANEL_ACTION_TOOLTIP_DO_NOT_USE_FILES_EXCLUDE=n.localize(11,null),e.MARKERS_PANEL_ACTION_TOOLTIP_FILTER=n.localize(12,null),e.MARKERS_PANEL_FILTER_ARIA_LABEL=n.localize(13,null),e.MARKERS_PANEL_FILTER_PLACEHOLDER=n.localize(14,null),e.MARKERS_PANEL_FILTER_ERRORS=n.localize(15,null),e.MARKERS_PANEL_FILTER_WARNINGS=n.localize(16,null),e.MARKERS_PANEL_FILTER_INFOS=n.localize(17,null),e.MARKERS_PANEL_SINGLE_ERROR_LABEL=n.localize(18,null),e.MARKERS_PANEL_MULTIPLE_ERRORS_LABEL=function(e){return n.localize(19,null,""+e)},e.MARKERS_PANEL_SINGLE_WARNING_LABEL=n.localize(20,null),e.MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL=function(e){
return n.localize(21,null,""+e)},e.MARKERS_PANEL_SINGLE_INFO_LABEL=n.localize(22,null),e.MARKERS_PANEL_MULTIPLE_INFOS_LABEL=function(e){return n.localize(23,null,""+e)},e.MARKERS_PANEL_SINGLE_UNKNOWN_LABEL=n.localize(24,null),e.MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=function(e){return n.localize(25,null,""+e)},e.MARKERS_PANEL_AT_LINE_COL_NUMBER=function(e,t){return n.localize(26,null,""+e,""+t)},e.MARKERS_TREE_ARIA_LABEL_RESOURCE=function(e,t){return n.localize(27,null,e,t)},e.MARKERS_TREE_ARIA_LABEL_MARKER=function(e){var t=e.resourceRelatedInformation.length?n.localize(28,null,e.resourceRelatedInformation.length):"";switch(e.raw.severity){case r.MarkerSeverity.Error:return e.raw.source?n.localize(29,null,e.raw.source,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t):n.localize(30,null,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t);case r.MarkerSeverity.Warning:
return e.raw.source?n.localize(31,null,e.raw.source,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t):n.localize(32,null,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t,t);case r.MarkerSeverity.Info:return e.raw.source?n.localize(33,null,e.raw.source,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t):n.localize(34,null,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t);default:return e.raw.source?n.localize(35,null,e.raw.source,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t):n.localize(36,null,e.raw.message,e.raw.startLineNumber,e.raw.startColumn,t)}},e.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION=function(e){return n.localize(37,null,e.message,e.startLineNumber,e.startColumn,i.basename(e.resource.fsPath))},e.SHOW_ERRORS_WARNINGS_ACTION_LABEL=n.localize(38,null),e}();t.default=o}),define(e[229],t([1,0,25,19,90,110,228,43,20,50,148,14]),function(e,t,i,r,o,s,a,l,u,d,h,p){"use strict";function f(e,t){return e.toString()<t.toString()?-1:e.toString()>t.toString()?1:0}
Object.defineProperty(t,"__esModule",{value:!0});var g=function(){return function(e){this.id=e}}();t.NodeWithId=g;var v=function(e){function t(t){var n=e.call(this,t.toString())||this;return n.uri=t,n._name=null,n._path=null,n.markers=[],n.isExcluded=!1,n.isIncluded=!1,n.uriMatches=[],n}return n(t,e),Object.defineProperty(t.prototype,"path",{get:function(){return null===this._path&&(this._path=this.uri.fsPath),this._path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return null===this._name&&(this._name=i.basename(this.uri.fsPath)),this._name},enumerable:!0,configurable:!0}),t.compare=function(e,t){var n=e.markers[0],i=t.markers[0],r=0;return n&&i&&(r=o.MarkerSeverity.compare(n.raw.severity,i.raw.severity)),0===r&&(r=e.path.localeCompare(t.path)||e.name.localeCompare(t.name)),r},t}(g);t.ResourceMarkers=v;var m=function(e){function t(t,n){var i=e.call(this,t)||this;return i.raw=n,i.isSelected=!1,i.messageMatches=[],i.sourceMatches=[],i.resourceRelatedInformation=[],i
}return n(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return this.raw.resource},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"range",{get:function(){return this.raw},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return JSON.stringify(c({},this.raw,{resource:this.raw.resource.path,relatedInformation:this.resourceRelatedInformation.length?this.resourceRelatedInformation.map(function(e){return c({},e.raw,{resource:e.raw.resource.path})}):void 0}),null,"\t")},t.compare=function(e,t){return o.MarkerSeverity.compare(e.raw.severity,t.raw.severity)||r.Range.compareRangesUsingStarts(e.raw,t.raw)},t}(g);t.Marker=m;var y=function(e){function t(t,n){var i=e.call(this,t)||this;return i.raw=n,i}return n(t,e),t}(g);t.RelatedInformation=y;var b=function(){function e(e,t){void 0===e&&(e=""),void 0===t&&(t={}),this.filter=e,this.filterErrors=!1,this.filterWarnings=!1,this.filterInfos=!1,this.excludePattern=null,this.includePattern=null,this.textFilter="",e=e.trim()
;for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];t[r]&&this.setPattern(t,r),delete t[r]}var o=h.getEmptyExpression();if(e)for(var s=0,c=h.splitGlobAware(e,",").map(function(e){return e.trim()}).filter(function(e){return!!e.length});s<c.length;s++){var l=c[s];this.filterErrors=this.filterErrors||this.matches(l,a.default.MARKERS_PANEL_FILTER_ERRORS),this.filterWarnings=this.filterWarnings||this.matches(l,a.default.MARKERS_PANEL_FILTER_WARNINGS),this.filterInfos=this.filterInfos||this.matches(l,a.default.MARKERS_PANEL_FILTER_INFOS),p.startsWith(l,"!")?this.setPattern(t,p.ltrim(l,"!")):(this.setPattern(o,l),this.textFilter+=" "+l)}Object.keys(t).length&&(this.excludePattern=h.parse(t)),Object.keys(o).length&&(this.includePattern=h.parse(o)),this.textFilter=this.textFilter.trim()}return e.prototype.setPattern=function(e,t){"."===t[0]&&(t="*"+t),e["**/"+t+"/**"]=!0,e["**/"+t]=!0},e.prototype.matches=function(e,t){var n=s.matchesPrefix(e,t);return n&&n.length>0},
e._filter=s.or(s.matchesPrefix,s.matchesContiguousSubString),e._fuzzyFilter=s.or(s.matchesPrefix,s.matchesContiguousSubString,s.matchesFuzzy),e}();t.FilterOptions=b;var S=function(){function e(t){void 0===t&&(t=[]),this._markersByResource=new Map,this._filterOptions=new b;for(var n=0,i=u.groupBy(t,e._compareMarkersByUri);n<i.length;n++){var r=i[n],o=this.createResource(r[0].resource,r);this._markersByResource.set(o.uri.toString(),o)}}return e._compareMarkersByUri=function(e,t){return f(e.resource,t.resource)},Object.defineProperty(e.prototype,"filterOptions",{get:function(){return this._filterOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resources",{get:function(){return this._cachedSortedResources||(this._cachedSortedResources=d.values(this._markersByResource).sort(v.compare)),this._cachedSortedResources},enumerable:!0,configurable:!0}),e.prototype.forEachFilteredResource=function(e){this._markersByResource.forEach(function(t){t.filteredCount>0&&e(t)})},
e.prototype.hasFilteredResources=function(){var e=!1;return this._markersByResource.forEach(function(t){e=e||t.filteredCount>0}),e},e.prototype.hasResources=function(){return this._markersByResource.size>0},e.prototype.hasResource=function(e){return this._markersByResource.has(e.toString())},e.prototype.stats=function(){var e=0,t=0;return this._markersByResource.forEach(function(n){e+=n.markers.length,t+=n.filteredCount}),{total:e,filtered:t}},e.prototype.updateMarkers=function(e){var t=this;e(function(e,n){u.isFalsyOrEmpty(n)?t._markersByResource.delete(e.toString()):t._markersByResource.set(e.toString(),t.createResource(e,n))}),this._cachedSortedResources=void 0},e.prototype.updateFilterOptions=function(e){var t=this;this._filterOptions=e,this._markersByResource.forEach(function(e){t.updateResource(e);for(var n=0,i=e.markers;n<i.length;n++){var r=i[n];t.updateMarker(r,e)}t.updateFilteredCount(e)})},e.prototype.createResource=function(t,n){var i=this,r=[],o=new v(t);return this.updateResource(o),
n.forEach(function(n,s){var a=new m(t.toString()+s,n);if(n.relatedInformation){var c=u.groupBy(n.relatedInformation,e._compareMarkersByUri);c.sort(function(e,t){return f(e[0].resource,t[0].resource)}),a.resourceRelatedInformation=u.flatten(c).map(function(e,t){return new y(a.id+t,e)})}i.updateMarker(a,o),r.push(a)}),o.markers=r.sort(m.compare),this.updateFilteredCount(o),o},e.prototype.updateResource=function(e){e.isExcluded=this.isResourceExcluded(e),e.isIncluded=this.isResourceIncluded(e),e.uriMatches=this._filterOptions.textFilter?b._filter(this._filterOptions.textFilter,i.basename(e.uri.fsPath)):[]},e.prototype.updateFilteredCount=function(e){e.isExcluded?e.filteredCount=0:e.isIncluded?e.filteredCount=e.markers.length:e.filteredCount=e.markers.filter(function(e){return e.isSelected}).length},e.prototype.updateMarker=function(e,t){var n=this;e.messageMatches=!t.isExcluded&&this._filterOptions.textFilter?b._fuzzyFilter(this._filterOptions.textFilter,e.raw.message):[],
e.sourceMatches=!t.isExcluded&&e.raw.source&&this._filterOptions.textFilter?b._filter(this._filterOptions.textFilter,e.raw.source):[],e.resourceRelatedInformation.forEach(function(e){e.uriMatches=!t.isExcluded&&n._filterOptions.textFilter?b._filter(n._filterOptions.textFilter,i.basename(e.raw.resource.fsPath)):[],e.messageMatches=!t.isExcluded&&n._filterOptions.textFilter?b._fuzzyFilter(n._filterOptions.textFilter,e.raw.message):[]}),e.isSelected=this.isMarkerSelected(e.raw,t)},e.prototype.isResourceExcluded=function(e){return e.uri.scheme===l.Schemas.walkThrough||e.uri.scheme===l.Schemas.walkThroughSnippet||!(!this.filterOptions.excludePattern||!this.filterOptions.excludePattern(e.uri.fsPath))},e.prototype.isResourceIncluded=function(e){return!(!this.filterOptions.includePattern||!this.filterOptions.includePattern(e.uri.fsPath))||!(!this._filterOptions.textFilter||!b._filter(this._filterOptions.textFilter,i.basename(e.uri.fsPath)))},e.prototype.isMarkerSelected=function(e,t){var n=this
;return!t.isExcluded&&(!!t.isIncluded||(!(!this._filterOptions.filterErrors||o.MarkerSeverity.Error!==e.severity)||(!(!this._filterOptions.filterWarnings||o.MarkerSeverity.Warning!==e.severity)||(!(!this._filterOptions.filterInfos||o.MarkerSeverity.Info!==e.severity)||(!this._filterOptions.textFilter||(!!b._fuzzyFilter(this._filterOptions.textFilter,e.message)||(!(!e.source||!b._filter(this._filterOptions.textFilter,e.source))||!(!e.relatedInformation||!e.relatedInformation.some(function(e){return!!b._filter(n._filterOptions.textFilter,i.basename(e.resource.fsPath))||!!b._filter(n._filterOptions.textFilter,e.message)})))))))))},e.prototype.dispose=function(){this._markersByResource.clear()},e}();t.MarkersModel=S}),define(e[1133],t([1,0,4,229,35,31,41,37,58,17]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n,i,r){var o=e.call(this,{},r)||this;return o.contextMenuService=t,o.menuService=n,o._keybindingService=i,o}return n(t,e),
t.prototype.onLeftClick=function(t,n,i){var o=t.getFocus();return!!e.prototype.onLeftClick.call(this,t,n,i)&&(n instanceof r.MarkersModel&&(o?t.setFocus(o):t.focusFirst()),!0)},t.prototype.onContextMenu=function(e,t,n){var r=this;e.setFocus(t,{preventOpenOnFocus:!0});var o=this._getMenuActions(e);if(!o.length)return!0;var s={x:n.posx,y:n.posy};return this.contextMenuService.showContextMenu({getAnchor:function(){return s},getActions:function(){return i.TPromise.as(o)},getActionItem:function(e){var t=r._keybindingService.lookupKeybinding(e.id);return t?new c.ActionItem(e,e,{label:!0,keybinding:t.getLabel()}):null},onHide:function(t){t&&e.domFocus()}}),!0},t.prototype._getMenuActions=function(e){var t=[],n=this.menuService.createMenu(s.MenuId.ProblemsPanelContext,e.contextKeyService),i=n.getActions();n.dispose();for(var r=0,o=i;r<o.length;r++){var a=o[r][1];t.push.apply(t,a),t.push(new c.Separator)}return t.pop(),t},
t=a([l(0,o.IContextMenuService),l(1,s.IMenuService),l(2,u.IKeybindingService),l(3,h.IConfigurationService)],t)}(d.WorkbenchTreeController);t.Controller=p}),define(e[381],t([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineViewId="outline",t.OutlineViewFiltered=new n.RawContextKey("outlineFiltered",!1),t.OutlineViewFocused=new n.RawContextKey("outlineFocused",!1);!function(e){e.icons="outline.icons",e.problemsEnabled="outline.problems.enabled",e.problemsColors="outline.problems.colors",e.problemsBadges="outline.problems.badges"}(t.OutlineConfigKeys||(t.OutlineConfigKeys={}))}),define(e[125],t([1,0,7,16,6,15]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OUTPUT_MIME="text/x-code-output",t.OUTPUT_SCHEME="output",t.OUTPUT_MODE_ID="Log",t.LOG_MIME="text/x-code-log-output",t.LOG_SCHEME="log",t.LOG_MODE_ID="log",t.OUTPUT_PANEL_ID="workbench.panel.output",t.COMMAND_OPEN_LOG_VIEWER="workbench.action.openLogViewer",t.Extensions={
OutputChannels:"workbench.contributions.outputChannels"},t.OUTPUT_SERVICE_ID="outputService",t.MAX_OUTPUT_LENGTH=1e6,t.CONTEXT_IN_OUTPUT=new o.RawContextKey("inOutput",!1),t.CONTEXT_ACTIVE_LOG_OUTPUT=new o.RawContextKey("activeLogOutput",!1),t.IOutputService=r.createDecorator(t.OUTPUT_SERVICE_ID);var s=function(){function e(){this.channels=new Map,this._onDidRegisterChannel=new n.Emitter,this.onDidRegisterChannel=this._onDidRegisterChannel.event,this._onDidRemoveChannel=new n.Emitter,this.onDidRemoveChannel=this._onDidRemoveChannel.event}return e.prototype.registerChannel=function(e,t,n){this.channels.has(e)||(this.channels.set(e,{id:e,label:t,file:n}),this._onDidRegisterChannel.fire(e))},e.prototype.getChannels=function(){var e=[];return this.channels.forEach(function(t){return e.push(t)}),e},e.prototype.getChannel=function(e){return this.channels.get(e)},e.prototype.removeChannel=function(e){this.channels.delete(e),this._onDidRemoveChannel.fire(e)},e}();i.Registry.add(t.Extensions.OutputChannels,new s)}),
define(e[1136],t([1,0,609,7,24,23,9,4,28,125,22,318,319]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function t(e,t,n,r,o,s,a,c){this.id=e,this.debugServerPort=t,this._debugger=n,this.customTelemetryService=r,this.root=o,this.notificationService=s,this.telemetryService=a,this.outputService=c,this.emittedStopped=!1,this.readyForBreakpoints=!1,this.allThreadsContinued=!0,this.sentPromises=[],this._onDidInitialize=new i.Emitter,this._onDidStop=new i.Emitter,this._onDidContinued=new i.Emitter,this._onDidTerminateDebugee=new i.Emitter,this._onDidExitDebugee=new i.Emitter,this._onDidExitAdapter=new i.Emitter,this._onDidThread=new i.Emitter,this._onDidOutput=new i.Emitter,this._onDidBreakpoint=new i.Emitter,this._onDidCustomEvent=new i.Emitter,this._onDidEvent=new i.Emitter}return t.prototype.getId=function(){return this.id},Object.defineProperty(t.prototype,"onDidInitialize",{get:function(){return this._onDidInitialize.event},enumerable:!0,
configurable:!0}),Object.defineProperty(t.prototype,"onDidStop",{get:function(){return this._onDidStop.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidContinued",{get:function(){return this._onDidContinued.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidTerminateDebugee",{get:function(){return this._onDidTerminateDebugee.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidExitDebugee",{get:function(){return this._onDidExitDebugee.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidExitAdapter",{get:function(){return this._onDidExitAdapter.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidThread",{get:function(){return this._onDidThread.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidOutput",{get:function(){return this._onDidOutput.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidBreakpoint",{get:function(){
return this._onDidBreakpoint.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidCustomEvent",{get:function(){return this._onDidCustomEvent.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidEvent",{get:function(){return this._onDidEvent.event},enumerable:!0,configurable:!0}),t.prototype.initServer=function(){var e=this;if(this.cachedInitServerP)return this.cachedInitServerP;var t=this.startSession();return this.cachedInitServerP=t.then(function(){e.startTime=(new Date).getTime()},function(t){return e.cachedInitServerP=null,c.TPromise.wrapError(t)}),this.cachedInitServerP},t.prototype.startSession=function(){var e=this;return this._debugger.createDebugAdapter(this.root,this.outputService,this.debugServerPort).then(function(t){return e.debugAdapter=t,e.debugAdapter.onError(function(t){return e.onDebugAdapterError(t)}),e.debugAdapter.onEvent(function(t){return e.onDapEvent(t)}),e.debugAdapter.onRequest(function(t){return e.dispatchRequest(t)}),
e.debugAdapter.onExit(function(t){return e.onDebugAdapterExit()}),e.debugAdapter.startSession()})},t.prototype.custom=function(e,t){return this.send(e,t)},t.prototype.send=function(e,t,i){var r=this;return void 0===i&&(i=!0),this.initServer().then(function(){var a=r.internalSend(e,t).then(function(e){return e},function(e){var t=e&&e.body?e.body.error:null,i=e?e.message:"",a=t?p.formatPII(t.format,!0,t.variables):i;t&&t.sendTelemetry&&(r.telemetryService.publicLog("debugProtocolErrorResponse",{error:a}),r.customTelemetryService&&r.customTelemetryService.publicLog("debugProtocolErrorResponse",{error:a}));var l=t?p.formatPII(t.format,!1,t.variables):i;if(t&&t.url){var u=t.urlLabel?t.urlLabel:n.localize(0,null);return c.TPromise.wrapError(s.create(l,{actions:[new o.Action("debug.moreInfo",u,null,!0,function(){return window.open(t.url),c.TPromise.as(null)})]}))}return s.isPromiseCanceledError(e)?void 0:c.TPromise.wrapError(new Error(l))});return i&&r.sentPromises.push(a),a})},
t.prototype.internalSend=function(e,t){var n,i=this;return new c.TPromise(function(r,o){n=o,i.debugAdapter.sendRequest(e,t,function(e){e.success?r(e):o(e)})},function(){return n(s.canceled())})},t.prototype.onDapEvent=function(e){if(e.sessionId=this.id,"initialized"===e.event)this.readyForBreakpoints=!0,this._onDidInitialize.fire(e);else if("capabilities"===e.event&&e.body){var t=e.body.capabilities;this._capabilities=r.mixin(this._capabilities,t)}else"stopped"===e.event?(this.emittedStopped=!0,this._onDidStop.fire(e)):"continued"===e.event?(this.allThreadsContinued=!1!==e.body.allThreadsContinued,this._onDidContinued.fire(e)):"thread"===e.event?this._onDidThread.fire(e):"output"===e.event?this._onDidOutput.fire(e):"breakpoint"===e.event?this._onDidBreakpoint.fire(e):"terminated"===e.event?this._onDidTerminateDebugee.fire(e):"exit"===e.event?this._onDidExitDebugee.fire(e):this._onDidCustomEvent.fire(e);this._onDidEvent.fire(e)},Object.defineProperty(t.prototype,"capabilities",{get:function(){
return this._capabilities||{}},enumerable:!0,configurable:!0}),t.prototype.initialize=function(e){var t=this;return this.send("initialize",e).then(function(e){return t.readCapabilities(e)})},t.prototype.readCapabilities=function(e){return e&&(this._capabilities=r.mixin(this._capabilities,e.body)),e},t.prototype.launch=function(e){var t=this;return this.send("launch",e).then(function(e){return t.readCapabilities(e)})},t.prototype.attach=function(e){var t=this;return this.send("attach",e).then(function(e){return t.readCapabilities(e)})},t.prototype.next=function(e){var t=this;return this.send("next",e).then(function(n){return t.fireFakeContinued(e.threadId),n})},t.prototype.stepIn=function(e){var t=this;return this.send("stepIn",e).then(function(n){return t.fireFakeContinued(e.threadId),n})},t.prototype.stepOut=function(e){var t=this;return this.send("stepOut",e).then(function(n){return t.fireFakeContinued(e.threadId),n})},t.prototype.continue=function(e){var t=this
;return this.send("continue",e).then(function(n){return n&&n.body&&void 0!==n.body.allThreadsContinued&&(t.allThreadsContinued=n.body.allThreadsContinued),t.fireFakeContinued(e.threadId,t.allThreadsContinued),n})},t.prototype.pause=function(e){return this.send("pause",e)},t.prototype.terminateThreads=function(e){return this.send("terminateThreads",e)},t.prototype.setVariable=function(e){return this.send("setVariable",e)},t.prototype.restartFrame=function(e,t){var n=this;return this.send("restartFrame",e).then(function(e){return n.fireFakeContinued(t),e})},t.prototype.completions=function(e){return this.send("completions",e)},t.prototype.disconnect=function(e,t){var n=this;return void 0===e&&(e=!1),void 0===t&&(t=!1),this.disconnected&&t?this.stopServer():(setTimeout(function(){n.sentPromises.forEach(function(e){return e&&e.cancel()}),n.sentPromises=[]},1e3),this.debugAdapter&&!this.disconnected?(this.disconnected=!0,this.send("disconnect",{restart:e},!1).then(function(){return n.stopServer()},function(){
return n.stopServer()})):c.TPromise.as(null))},t.prototype.setBreakpoints=function(e){return this.send("setBreakpoints",e)},t.prototype.setFunctionBreakpoints=function(e){return this.send("setFunctionBreakpoints",e)},t.prototype.setExceptionBreakpoints=function(e){return this.send("setExceptionBreakpoints",e)},t.prototype.configurationDone=function(){return this.send("configurationDone",null)},t.prototype.stackTrace=function(e){return this.send("stackTrace",e)},t.prototype.exceptionInfo=function(e){return this.send("exceptionInfo",e)},t.prototype.scopes=function(e){return this.send("scopes",e)},t.prototype.variables=function(e){return this.send("variables",e)},t.prototype.source=function(e){return this.send("source",e)},t.prototype.threads=function(){return this.send("threads",null)},t.prototype.evaluate=function(e){return this.send("evaluate",e)},t.prototype.stepBack=function(e){var t=this;return this.send("stepBack",e).then(function(n){return void 0===n.body&&t.fireFakeContinued(e.threadId),n})},
t.prototype.reverseContinue=function(e){var t=this;return this.send("reverseContinue",e).then(function(n){return void 0===n.body&&t.fireFakeContinued(e.threadId),n})},t.prototype.getLengthInSeconds=function(){return((new Date).getTime()-this.startTime)/1e3},t.prototype.dispatchRequest=function(t){var n=this,i={type:"response",seq:0,command:t.command,request_seq:t.seq,success:!0};if("runInTerminal"===t.command)this._debugger.runInTerminal(t.arguments).then(function(e){i.body={},n.debugAdapter.sendResponse(i)},function(e){i.success=!1,i.message=e.message,n.debugAdapter.sendResponse(i)});else if("handshake"===t.command)try{var r=(new(e.__$__nodeRequire("vsda").signer)).sign(t.arguments.value);i.body={signature:r},this.debugAdapter.sendResponse(i)}catch(e){i.success=!1,i.message=e.message,this.debugAdapter.sendResponse(i)}else i.success=!1,i.message="unknown request '"+t.command+"'",this.debugAdapter.sendResponse(i)},t.prototype.fireFakeContinued=function(e,t){void 0===t&&(t=!1),this._onDidContinued.fire({
type:"event",event:"continued",body:{threadId:e,allThreadsContinued:t},seq:void 0})},t.prototype.stopServer=function(){return this.debugAdapter instanceof f.SocketDebugAdapter&&(this.debugAdapter.stopSession(),this.cachedInitServerP=null),this._onDidExitAdapter.fire({sessionId:this.getId()}),this.disconnected=!0,!this.debugAdapter||this.debugAdapter instanceof f.SocketDebugAdapter?c.TPromise.as(null):this.debugAdapter.stopSession()},t.prototype.onDebugAdapterError=function(e){this.notificationService.error(e.message||e.toString()),this.stopServer().done(null,s.onUnexpectedError)},t.prototype.onDebugAdapterExit=function(){this.debugAdapter=null,this.cachedInitServerP=null,this.disconnected||this.notificationService.error(n.localize(1,null)),this._onDidExitAdapter.fire({sessionId:this.getId()})},t.prototype.dispose=function(){this.disconnect().done(null,s.onUnexpectedError)},t=a([l(5,h.INotificationService),l(6,u.ITelemetryService),l(7,d.IOutputService)],t)}();t.RawDebugSession=g}),
define(e[1137],t([1,0,661,23,25,36,42,64,77,125,556,29,10,27]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.environmentService=i,o.windowsService=r,o}return n(t,e),t.prototype.run=function(){return this.windowsService.showItemInFolder(o.join(this.environmentService.logsPath,"main.log"))},t.ID="workbench.action.openLogsFolder",t.LABEL=i.localize(0,null),t=a([l(2,s.IEnvironmentService),l(3,c.IWindowsService)],t)}(r.Action);t.OpenLogsFolderAction=m;var y=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.quickOpenService=i,s.outputService=r,s.contextService=o,s}return n(t,e),t.prototype.run=function(){var e=this,t=[{id:p.rendererLogChannelId,label:this.contextService.getWorkspace().name?i.localize(2,null,this.contextService.getWorkspace().name):i.localize(3,null)},{id:p.extHostLogChannelId,label:i.localize(4,null)},{id:p.sharedLogChannelId,
label:i.localize(5,null)},{id:p.mainLogChannelId,label:i.localize(6,null)}];return this.quickOpenService.pick(t,{placeHolder:i.localize(7,null)}).then(function(t){return t?e.outputService.showChannel(t.id):null})},t.ID="workbench.action.showLogs",t.LABEL=i.localize(1,null),t=a([l(2,u.IQuickOpenService),l(3,h.IOutputService),l(4,v.IWorkspaceContextService)],t)}(r.Action);t.ShowLogsAction=y;var b=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.quickOpenService=i,c.environmentService=r,c.commandService=o,c.windowService=s,c.contextService=a,c}return n(t,e),t.prototype.run=function(){var e=this,t=[{id:g.default.file(o.join(this.environmentService.logsPath,"renderer"+this.windowService.getCurrentWindowId()+".log")).fsPath,label:this.contextService.getWorkspace().name?i.localize(9,null,this.contextService.getWorkspace().name):i.localize(10,null)},{id:g.default.file(o.join(this.environmentService.logsPath,"exthost"+this.windowService.getCurrentWindowId()+".log")).fsPath,
label:i.localize(11,null)},{id:g.default.file(o.join(this.environmentService.logsPath,"sharedprocess.log")).fsPath,label:i.localize(12,null)},{id:g.default.file(o.join(this.environmentService.logsPath,"main.log")).fsPath,label:i.localize(13,null)}];return this.quickOpenService.pick(t,{placeHolder:i.localize(14,null)}).then(function(t){return t?e.commandService.executeCommand(h.COMMAND_OPEN_LOG_VIEWER,g.default.file(t.id)):null})},t.ID="workbench.action.openLogFile",t.LABEL=i.localize(8,null),t=a([l(2,u.IQuickOpenService),l(3,s.IEnvironmentService),l(4,f.ICommandService),l(5,c.IWindowService),l(6,v.IWorkspaceContextService)],t)}(r.Action);t.OpenLogFileAction=b;var S=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=i,o.logService=r,o}return n(t,e),t.prototype.run=function(){var e=this,t=this.logService.getLevel(),n=[{label:i.localize(16,null),level:d.LogLevel.Trace,description:this.getDescription(d.LogLevel.Trace,t)},{label:i.localize(17,null),level:d.LogLevel.Debug,
description:this.getDescription(d.LogLevel.Debug,t)},{label:i.localize(18,null),level:d.LogLevel.Info,description:this.getDescription(d.LogLevel.Info,t)},{label:i.localize(19,null),level:d.LogLevel.Warning,description:this.getDescription(d.LogLevel.Warning,t)},{label:i.localize(20,null),level:d.LogLevel.Error,description:this.getDescription(d.LogLevel.Error,t)},{label:i.localize(21,null),level:d.LogLevel.Critical,description:this.getDescription(d.LogLevel.Critical,t)},{label:i.localize(22,null),level:d.LogLevel.Off,description:this.getDescription(d.LogLevel.Off,t)}];return this.quickOpenService.pick(n,{placeHolder:i.localize(23,null),autoFocus:{autoFocusIndex:this.logService.getLevel()}}).then(function(t){t&&e.logService.setLevel(t.level)})},t.prototype.getDescription=function(e,t){return d.DEFAULT_LOG_LEVEL===e&&t===e?i.localize(24,null):d.DEFAULT_LOG_LEVEL===e?i.localize(25,null):t===e?i.localize(26,null):void 0},t.ID="workbench.action.setLogLevel",t.LABEL=i.localize(15,null),
t=a([l(2,u.IQuickOpenService),l(3,d.ILogService)],t)}(r.Action);t.SetLogLevelAction=S}),define(e[1138],t([1,0,660,25,16,75,125,38,36,42,5,10,6,556,56,31,1137]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(t,n,s){var a=e.call(this)||this;a.windowService=t,a.environmentService=n;var l=o.Registry.as(c.Extensions.OutputChannels);l.registerChannel(v.mainLogChannelId,i.localize(0,null),f.default.file(r.join(a.environmentService.logsPath,"main.log"))),l.registerChannel(v.sharedLogChannelId,i.localize(1,null),f.default.file(r.join(a.environmentService.logsPath,"sharedprocess.log"))),l.registerChannel(v.rendererLogChannelId,i.localize(2,null),f.default.file(r.join(a.environmentService.logsPath,"renderer"+a.windowService.getCurrentWindowId()+".log"))),l.registerChannel(v.extHostLogChannelId,i.localize(3,null),f.default.file(r.join(a.environmentService.logsPath,"exthost"+a.windowService.getCurrentWindowId()+".log")))
;var u=o.Registry.as(m.Extensions.WorkbenchActions),d=i.localize(4,null);return u.registerWorkbenchAction(new y.SyncActionDescriptor(b.OpenLogsFolderAction,b.OpenLogsFolderAction.ID,b.OpenLogsFolderAction.LABEL),"Developer: Open Log Folder",d),u.registerWorkbenchAction(new y.SyncActionDescriptor(b.SetLogLevelAction,b.SetLogLevelAction.ID,b.SetLogLevelAction.LABEL),"Developer: Set Log Level",d),u.registerWorkbenchAction(new y.SyncActionDescriptor(b.ShowLogsAction,b.ShowLogsAction.ID,b.ShowLogsAction.LABEL),"Developer: Show Logs...",d),u.registerWorkbenchAction(new y.SyncActionDescriptor(b.OpenLogFileAction,b.OpenLogFileAction.ID,b.OpenLogFileAction.LABEL),"Developer: Open Log File...",d),a}return n(t,e),t=a([l(0,h.IWindowService),l(1,d.IEnvironmentService),l(2,g.IInstantiationService)],t)}(p.Disposable);o.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(S,u.LifecyclePhase.Eventually)}),define(e[1139],t([1,0,18,47,44,27,125,832,5]),function(e,t,n,i,r,o,s,c,u){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(t,i){var r=this;this.contextService=t,this.modelService=i,this.disposeWorkerScheduler=new n.RunOnceScheduler(function(){return r.disposeWorker()},e.DISPOSE_WORKER_TIME),this.registerListeners(),this.updateLinkProviderWorker()}return e.prototype.registerListeners=function(){var e=this;this.contextService.onDidChangeWorkspaceFolders(function(){return e.updateLinkProviderWorker()})},e.prototype.updateLinkProviderWorker=function(){var e=this;this.contextService.getWorkspace().folders.length>0?this.linkProviderRegistration||(this.linkProviderRegistration=r.LinkProviderRegistry.register([{language:s.OUTPUT_MODE_ID,scheme:"*"},{language:s.LOG_MODE_ID,scheme:"*"}],{provideLinks:function(t,i){return n.wireCancellationToken(i,e.provideLinks(t.uri))}})):this.linkProviderRegistration=u.dispose(this.linkProviderRegistration),this.disposeWorker(),this.disposeWorkerScheduler.cancel()},e.prototype.getOrCreateWorker=function(){
if(this.disposeWorkerScheduler.schedule(),!this.worker){var e={workspaceFolders:this.contextService.getWorkspace().folders.map(function(e){return e.uri.toString()})};this.worker=c.createWebWorker(this.modelService,{moduleId:"vs/workbench/parts/output/common/outputLinkComputer",createData:e,label:"outputLinkComputer"})}return this.worker},e.prototype.provideLinks=function(e){return this.getOrCreateWorker().withSyncedResources([e]).then(function(t){return t.computeLinks(e.toString())})},e.prototype.disposeWorker=function(){this.worker&&(this.worker.dispose(),this.worker=null)},e.DISPOSE_WORKER_TIME=18e4,e=a([l(0,o.IWorkspaceContextService),l(1,i.IModelService)],e)}();t.OutputLinkProvider=d}),define(e[1140],t([1,0,29,135]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e[e.LoaderAvailable=1]="LoaderAvailable",e[e.BeginLoadingScript=10]="BeginLoadingScript",e[e.EndLoadingScriptOK=11]="EndLoadingScriptOK",e[e.EndLoadingScriptError=12]="EndLoadingScriptError",
e[e.BeginInvokeFactory=21]="BeginInvokeFactory",e[e.EndInvokeFactory=22]="EndInvokeFactory",e[e.NodeBeginEvaluatingScript=31]="NodeBeginEvaluatingScript",e[e.NodeEndEvaluatingScript=32]="NodeEndEvaluatingScript",e[e.NodeBeginNativeRequire=33]="NodeBeginNativeRequire",e[e.NodeEndNativeRequire=34]="NodeEndNativeRequire"}(r||(r={}));var o=function(){function e(e,t){this.start=e,this.end=t,console.assert(e.detail===t.detail),this.duration=this.end.timestamp-this.start.timestamp,this.detail=e.detail}return e.compareUsingStartTimestamp=function(e,t){return e.start.timestamp<t.start.timestamp?-1:e.start.timestamp>t.start.timestamp?1:0},e}();n.CommandsRegistry.registerCommand("dev.stats.loader",function(t){for(var n=t.get(i.IClipboardService),s="Name\tDuration\n",a=0,c=function(){var t=e.getStats().slice(0).sort(function(e,t){return e.detail<t.detail?-1:e.detail>t.detail?1:e.type<t.type?-1:e.type>t.type?1:0}),n=new Map;n.set(r.BeginLoadingScript,[]),n.set(r.BeginInvokeFactory,[]),
n.set(r.NodeBeginEvaluatingScript,[]),n.set(r.NodeBeginNativeRequire,[]);for(var i=1;i<t.length-1;i++){var s=t[i],a=t[i+1];if(a.type-s.type>2)break;i+=1,n.get(s.type).push(new o(s,a))}return n.get(r.BeginLoadingScript).sort(o.compareUsingStartTimestamp),n.get(r.BeginInvokeFactory).sort(o.compareUsingStartTimestamp),n.get(r.NodeBeginEvaluatingScript).sort(o.compareUsingStartTimestamp),n.get(r.NodeBeginNativeRequire).sort(o.compareUsingStartTimestamp),n}().get(r.BeginInvokeFactory);a<c.length;a++){var l=c[a];s+=l.detail+"\t"+l.duration.toPrecision(2)+"\n"}console.log(s),n.writeText(s)})}),define(e[383],t([1,0,675,11,4,5,7,264,92,8,118,85,37,35,6,68,12,26,901]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.options=n,s.contextViewService=i,s.keybindingService=r,s._onKeybinding=s._register(new c.Emitter),s.onKeybinding=s._onKeybinding.event,s._onEnter=s._register(new c.Emitter),
s.onEnter=s._onEnter.event,s._onEscape=s._register(new c.Emitter),s.onEscape=s._onEscape.event,s._onBlur=s._register(new c.Emitter),s.onBlur=s._onBlur.event,s.inputBox=s._register(new p.InputBox(t,s.contextViewService,s.options)),s._register(y.attachInputBoxStyler(s.inputBox,o)),s.onkeydown(s.inputBox.inputElement,function(e){return s._onKeyDown(e)}),s.onblur(s.inputBox.inputElement,function(e){return s._onBlur.fire()}),s.oninput(s.inputBox.inputElement,function(e){s.setInputValue(s._inputValue)}),s._acceptChords=!0,s._firstPart=null,s._chordPart=null,s}return n(t,e),t.prototype.setInputValue=function(e){this._inputValue=e,this.inputBox.value=this._inputValue},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.reset=function(){this._firstPart=null,this._chordPart=null},t.prototype._onKeyDown=function(e){e.preventDefault(),e.stopPropagation(),e.equals(3)?this._onEnter.fire():e.equals(9)?this._onEscape.fire():this.printKeybinding(e)},t.prototype.printKeybinding=function(e){
var t=this.keybindingService.resolveKeyboardEvent(e),n="code: "+e.browserEvent.code+", keyCode: "+e.browserEvent.keyCode+", key: "+e.browserEvent.key+" => UI: "+t.getAriaLabel()+", user settings: "+t.getUserSettingsLabel()+", dispatch: "+t.getDispatchParts()[0];if(this._acceptChords){var i=this._firstPart&&null!==this._firstPart.getDispatchParts()[0],r=this._chordPart&&null!==this._chordPart.getDispatchParts()[0];i&&r?(this._firstPart=t,this._chordPart=null):i?this._chordPart=t:this._firstPart=t}else this._firstPart=t;var o="";this._firstPart&&(o=this._firstPart.getUserSettingsLabel()),this._chordPart&&(o=o+" "+this._chordPart.getUserSettingsLabel()),this.setInputValue(o),this.inputBox.inputElement.title=n,this._onKeybinding.fire([this._firstPart,this._chordPart])},t=a([l(2,v.IContextViewService),l(3,g.IKeybindingService),l(4,b.IThemeService)],t)}(d.Widget),C=function(e){function t(t,n,i){var r=e.call(this)||this;return r.instantiationService=n,r.themeService=i,r._firstPart=null,r._chordPart=null,
r._isVisible=!1,r._onHide=r._register(new c.Emitter),r._onDidChange=r._register(new c.Emitter),r.onDidChange=r._onDidChange.event,r._onShowExistingKeybindings=r._register(new c.Emitter),r.onShowExistingKeybidings=r._onShowExistingKeybindings.event,r.create(),t&&h.append(t,r._domNode.domNode),r}return n(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode.domNode},enumerable:!0,configurable:!0}),t.prototype.define=function(){var e=this;return this._keybindingInputWidget.reset(),new o.TPromise(function(t,n){e._isVisible||(e._isVisible=!0,e._domNode.setDisplay("block"),e._firstPart=null,e._chordPart=null,e._keybindingInputWidget.setInputValue(""),h.clearNode(e._outputNode),h.clearNode(e._showExistingKeybindingsNode),e._keybindingInputWidget.focus());var i=e._onHide.event(function(){t(e.getUserSettingsLabel()),i.dispose()})})},t.prototype.layout=function(e){var n=Math.round((e.height-t.HEIGHT)/2);this._domNode.setTop(n);var i=Math.round((e.width-t.WIDTH)/2)
;this._domNode.setLeft(i)},t.prototype.printExisting=function(e){var t=this;if(e>0){var n=h.$("span.existingText"),r=1===e?i.localize(0,null,e):i.localize(1,null,e);h.append(n,document.createTextNode(r)),this._showExistingKeybindingsNode.appendChild(n),n.onmousedown=function(e){e.preventDefault()},n.onmouseup=function(e){e.preventDefault()},n.onclick=function(){t._onShowExistingKeybindings.fire(t.getUserSettingsLabel())}}},t.prototype.create=function(){var e=this;this._domNode=f.createFastDomNode(document.createElement("div")),this._domNode.setDisplay("none"),this._domNode.setClassName("defineKeybindingWidget"),this._domNode.setWidth(t.WIDTH),this._domNode.setHeight(t.HEIGHT),h.append(this._domNode.domNode,h.$(".message",null,i.localize(2,null))),this._register(y.attachStylerCallback(this.themeService,{editorWidgetBackground:S.editorWidgetBackground,widgetShadow:S.widgetShadow},function(t){
t.editorWidgetBackground?e._domNode.domNode.style.backgroundColor=t.editorWidgetBackground.toString():e._domNode.domNode.style.backgroundColor=null,t.widgetShadow?e._domNode.domNode.style.boxShadow="0 2px 8px "+t.widgetShadow:e._domNode.domNode.style.boxShadow=null})),this._keybindingInputWidget=this._register(this.instantiationService.createInstance(_,this._domNode.domNode,{})),this._register(this._keybindingInputWidget.onKeybinding(function(t){return e.onKeybinding(t)})),this._register(this._keybindingInputWidget.onEnter(function(){return e.hide()})),this._register(this._keybindingInputWidget.onEscape(function(){return e.onCancel()})),this._register(this._keybindingInputWidget.onBlur(function(){return e.onCancel()})),this._outputNode=h.append(this._domNode.domNode,h.$(".output")),this._showExistingKeybindingsNode=h.append(this._domNode.domNode,h.$(".existing"))},t.prototype.onKeybinding=function(e){var t=e[0],n=e[1];this._firstPart=t,this._chordPart=n,h.clearNode(this._outputNode),
h.clearNode(this._showExistingKeybindingsNode),new u.KeybindingLabel(this._outputNode,r.OS).set(this._firstPart,null),this._chordPart&&(this._outputNode.appendChild(document.createTextNode(i.localize(3,null))),new u.KeybindingLabel(this._outputNode,r.OS).set(this._chordPart,null));var o=this.getUserSettingsLabel();o&&this._onDidChange.fire(o)},t.prototype.getUserSettingsLabel=function(){var e=null;return this._firstPart&&(e=this._firstPart.getUserSettingsLabel(),this._chordPart&&(e=e+" "+this._chordPart.getUserSettingsLabel())),e},t.prototype.onCancel=function(){this._firstPart=null,this._chordPart=null,this.hide()},t.prototype.hide=function(){this._domNode.setDisplay("none"),this._isVisible=!1,this._onHide.fire()},t.WIDTH=400,t.HEIGHT=110,t=a([l(1,m.IInstantiationService),l(2,b.IThemeService)],t)}(d.Widget);t.DefineKeybindingWidget=C;var E=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._widget=n.createInstance(C,null),i._editor.addOverlayWidget(i),i}return n(t,e),
t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._widget.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.start=function(){this._editor.revealPositionInCenterIfOutsideViewport(this._editor.getPosition(),0);var e=this._editor.getLayoutInfo();return this._widget.layout(new h.Dimension(e.width,e.height)),this._widget.define()},t.ID="editor.contrib.defineKeybindingWidget",t=a([l(1,m.IInstantiationService)],t)}(s.Disposable);t.DefineKeybindingOverlayWidget=E}),define(e[196],t([1,0,681,10,74,8,4,5,92,7,84,45,118,6,35,37,27,23,68,12,26,41,134,17,69,57]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(t,n){var i=e.call(this)||this;return i.editor=t,i.title=n,i.create(),i._register(i.editor.onDidChangeConfiguration(function(){return i.layout()
})),i._register(i.editor.onDidLayoutChange(function(){return i.layout()})),i}return n(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"heightInLines",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterLineNumber",{get:function(){return 0},enumerable:!0,configurable:!0}),t.prototype.create=function(){var e=this;this._domNode=s.$(".settings-header-widget"),this.titleContainer=s.append(this._domNode,s.$(".title-container")),this.title&&(s.append(this.titleContainer,s.$(".title")).textContent=this.title),this.messageElement=s.append(this.titleContainer,s.$(".message")),this.title&&(this.messageElement.style.paddingLeft="12px"),this.editor.changeViewZones(function(t){e.id=t.addZone(e),e.layout()})},t.prototype.setMessage=function(e){this.messageElement.textContent=e},t.prototype.layout=function(){var e=this.editor.getConfiguration()
;this.titleContainer.style.fontSize=e.fontInfo.fontSize+"px",e.contribInfo.folding||(this.titleContainer.style.paddingLeft="6px")},t.prototype.dispose=function(){var t=this;this.editor.changeViewZones(function(e){e.removeZone(t.id)}),e.prototype.dispose.call(this)},t}(d.Widget);t.SettingsHeaderWidget=D;var A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onClick=t._register(new h.Emitter),t.onClick=t._onClick.event,t}return n(t,e),t.prototype.create=function(){e.prototype.create.call(this),this.toggleMessage(!0)},t.prototype.toggleMessage=function(e){e?this.setMessage(i.localize(0,null)):this.setMessage(i.localize(1,null))},t}(D);t.DefaultSettingsHeaderWidget=A;var L=function(e){function t(t,n){var i=e.call(this)||this;return i.editor=t,i.settingsGroup=n,i._onToggled=i._register(new h.Emitter),i.onToggled=i._onToggled.event,i.create(),i._register(i.editor.onDidChangeConfiguration(function(){return i.layout()})),i._register(i.editor.onDidLayoutChange(function(){
return i.layout()})),i._register(i.editor.onDidChangeCursorPosition(function(e){return i.onCursorChange(e)})),i}return n(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"heightInLines",{get:function(){return 1.5},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterLineNumber",{get:function(){return this._afterLineNumber},enumerable:!0,configurable:!0}),t.prototype.create=function(){var e=this;this._domNode=s.$(".settings-group-title-widget"),this.titleContainer=s.append(this._domNode,s.$(".title-container")),this.titleContainer.tabIndex=0,this.onclick(this.titleContainer,function(){return e.toggle()}),this.onkeydown(this.titleContainer,function(t){return e.onKeyDown(t)});var t=this._register(s.trackFocus(this.titleContainer));this._register(t.onDidFocus(function(){return e.toggleFocus(!0)})),this._register(t.onDidBlur(function(){return e.toggleFocus(!1)})),
this.icon=s.append(this.titleContainer,s.$(".expand-collapse-icon")),this.title=s.append(this.titleContainer,s.$(".title")),this.title.textContent=this.settingsGroup.title+" ("+this.settingsGroup.sections.reduce(function(e,t){return e+t.settings.length},0)+")",this.layout()},t.prototype.render=function(){var e=this;this._afterLineNumber=this.settingsGroup.range.startLineNumber-2,this.editor.changeViewZones(function(t){e.id=t.addZone(e),e.layout()})},t.prototype.toggleCollapse=function(e){s.toggleClass(this.titleContainer,"collapsed",e)},t.prototype.toggleFocus=function(e){s.toggleClass(this.titleContainer,"focused",e)},t.prototype.isCollapsed=function(){return s.hasClass(this.titleContainer,"collapsed")},t.prototype.layout=function(){var e=this.editor.getConfiguration(),t=this.editor.getLayoutInfo();this._domNode.style.width=t.contentWidth-t.verticalScrollbarWidth+"px",this.titleContainer.style.lineHeight=e.lineHeight+3+"px",this.titleContainer.style.height=e.lineHeight+3+"px",
this.titleContainer.style.fontSize=e.fontInfo.fontSize+"px",this.icon.style.minWidth=this.getIconSize(16)+"px"},t.prototype.getIconSize=function(e){var t=this.editor.getConfiguration().fontInfo.fontSize;return t>8?Math.max(t,e):12},t.prototype.onKeyDown=function(e){switch(e.keyCode){case 3:case 10:this.toggle();break;case 15:this.collapse(!0);break;case 17:this.collapse(!1);break;case 16:if(this.settingsGroup.range.startLineNumber-3!=1){this.editor.focus();var t=this.settingsGroup.range.startLineNumber-2;this.editor.setPosition({lineNumber:t,column:this.editor.getModel().getLineMinColumn(t)})}break;case 18:var n=this.isCollapsed()?this.settingsGroup.range.startLineNumber:this.settingsGroup.range.startLineNumber-1;this.editor.focus(),this.editor.setPosition({lineNumber:n,column:this.editor.getModel().getLineMinColumn(n)})}},t.prototype.toggle=function(){this.collapse(!this.isCollapsed())},t.prototype.collapse=function(e){e!==this.isCollapsed()&&(s.toggleClass(this.titleContainer,"collapsed",e),
this._onToggled.fire(e))},t.prototype.onCursorChange=function(e){"mouse"!==e.source&&this.focusTitle(e.position)&&this.titleContainer.focus()},t.prototype.focusTitle=function(e){var t=this.previousPosition;return this.previousPosition=e,!!t&&(t.lineNumber!==e.lineNumber&&(e.lineNumber===this.settingsGroup.range.startLineNumber-1||e.lineNumber===this.settingsGroup.range.startLineNumber-2||!(!this.isCollapsed()||e.lineNumber!==this.settingsGroup.range.endLineNumber)))},t.prototype.dispose=function(){var t=this;this.editor.changeViewZones(function(e){e.removeZone(t.id)}),e.prototype.dispose.call(this)},t}(d.Widget);t.SettingsGroupTitleWidget=L;var R=function(e){function t(t,n,i){var r=e.call(this,null,t)||this;r.contextService=n,r.contextMenuService=i,r._folderSettingCounts=new Map,r.disposables=[];var o=r.contextService.getWorkspace();return r._folder=1===o.folders.length?o.folders[0]:null,r.disposables.push(r.contextService.onDidChangeWorkspaceFolders(function(){return r.onWorkspaceFoldersChanged()})),r}
return n(t,e),Object.defineProperty(t.prototype,"folder",{get:function(){return this._folder},set:function(e){this._folder=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.setCount=function(e,t){var n=this.contextService.getWorkspaceFolder(e).uri;this._folderSettingCounts.set(n.toString(),t),this.update()},t.prototype.render=function(e){var t=this;this.builder=o.$(e),this.container=e,this.labelElement=s.$(".action-title"),this.detailsElement=s.$(".action-details"),this.dropDownElement=s.$(".dropdown-icon.octicon.octicon-triangle-down.hide"),this.anchorElement=s.$("a.action-label.folder-settings",{role:"button","aria-haspopup":"true",tabindex:"0"},this.labelElement,this.detailsElement,this.dropDownElement),this.disposables.push(s.addDisposableListener(this.anchorElement,s.EventType.CLICK,function(e){return t.onClick(e)})),this.disposables.push(s.addDisposableListener(this.anchorElement,s.EventType.KEY_UP,function(e){return t.onKeyUp(e)})),s.append(this.container,this.anchorElement),this.update()},
t.prototype.onKeyUp=function(e){switch(new p.StandardKeyboardEvent(e).keyCode){case 3:case 10:return void this.onClick(e)}},t.prototype.onClick=function(e){s.EventHelper.stop(e,!0),!this.folder||this._action.checked?this.showMenu():this._action.run(this._folder)},t.prototype._updateEnabled=function(){this.update()},t.prototype._updateChecked=function(){this.update()},t.prototype.onWorkspaceFoldersChanged=function(){var e=this,t=this._folder,n=this.contextService.getWorkspace();this._folder&&(this._folder=n.folders.filter(function(t){return t.uri.toString()===e._folder.uri.toString()})[0]||n.folders[0]),this._folder=this._folder?this._folder:1===n.folders.length?n.folders[0]:null,this.update(),this._action.checked&&(t||!this._folder||!t||this._folder||t&&this._folder&&t.uri.toString()===this._folder.uri.toString())&&this._action.run(this._folder)},t.prototype.update=function(){var e=0;this._folderSettingCounts.forEach(function(t){return e+=t});var t=this.contextService.getWorkspace();if(this._folder){
this.labelElement.textContent=this._folder.name,this.anchorElement.title=this._folder.name;var n=this.labelWithCount(this._action.label,e);this.detailsElement.textContent=n,s.toggleClass(this.dropDownElement,"hide",1===t.folders.length||!this._action.checked)}else{var i=this.labelWithCount(this._action.label,e);this.labelElement.textContent=i,this.detailsElement.textContent="",this.anchorElement.title=this._action.label,s.removeClass(this.dropDownElement,"hide")}s.toggleClass(this.anchorElement,"checked",this._action.checked),s.toggleClass(this.container,"disabled",!this._action.enabled)},t.prototype.showMenu=function(){var e=this;this.contextMenuService.showContextMenu({getAnchor:function(){return e.container},getActions:function(){return c.TPromise.as(e.getDropdownMenuActions())},getActionItem:function(e){return null},onHide:function(){e.anchorElement.blur()}})},t.prototype.getDropdownMenuActions=function(){var e=this,t=[],n=this.contextService.getWorkspace().folders
;return this.contextService.getWorkbenchState()===b.WorkbenchState.WORKSPACE&&n.length>0&&t.push.apply(t,n.map(function(t,n){var i=e._folderSettingCounts.get(t.uri.toString());return{id:"folderSettingsTarget"+n,label:e.labelWithCount(t.name,i),checked:e.folder&&e.folder.uri.toString()===t.uri.toString(),enabled:!0,run:function(){return e._action.run(t)}}})),t},t.prototype.labelWithCount=function(e,t){return t&&(e+=" ("+t+")"),e},t.prototype.dispose=function(){u.dispose(this.disposables),e.prototype.dispose.call(this)},t=a([l(1,b.IWorkspaceContextService),l(2,m.IContextMenuService)],t)}(w.BaseActionItem);t.FolderSettingsActionItem=R;var O=function(e){function t(t,n,i){var r=e.call(this)||this;return r.contextService=n,r.instantiationService=i,r._onDidTargetChange=new h.Emitter,r.onDidTargetChange=r._onDidTargetChange.event,r.create(t),r._register(r.contextService.onDidChangeWorkbenchState(function(){return r.onWorkbenchStateChanged()})),r._register(r.contextService.onDidChangeWorkspaceFolders(function(){
return r.update()})),r}return n(t,e),t.prototype.create=function(e){var t=this,n=s.append(e,s.$(".settings-tabs-widget"));this.settingsSwitcherBar=this._register(new w.ActionBar(n,{orientation:w.ActionsOrientation.HORIZONTAL,ariaLabel:i.localize(2,null),animated:!1,actionItemProvider:function(e){return"folderSettings"===e.id?t.folderSettings:null}})),this.userSettings=new S.Action("userSettings",i.localize(3,null),".settings-tab",!0,function(){return t.updateTarget(T.ConfigurationTarget.USER)}),this.userSettings.tooltip=this.userSettings.label,this.workspaceSettings=new S.Action("workspaceSettings",i.localize(4,null),".settings-tab",!1,function(){return t.updateTarget(T.ConfigurationTarget.WORKSPACE)}),this.workspaceSettings.tooltip=this.workspaceSettings.label;var r=new S.Action("folderSettings",i.localize(5,null),".settings-tab",!1,function(e){return t.updateTarget(e?e.uri:T.ConfigurationTarget.USER)});this.folderSettings=this.instantiationService.createInstance(R,r),this.update(),
this.settingsSwitcherBar.push([this.userSettings,this.workspaceSettings,r])},Object.defineProperty(t.prototype,"settingsTarget",{get:function(){return this._settingsTarget},set:function(e){this._settingsTarget=e,this.userSettings.checked=T.ConfigurationTarget.USER===this.settingsTarget,this.workspaceSettings.checked=T.ConfigurationTarget.WORKSPACE===this.settingsTarget,this.settingsTarget instanceof r.default?(this.folderSettings.getAction().checked=!0,this.folderSettings.folder=this.contextService.getWorkspaceFolder(this.settingsTarget)):this.folderSettings.getAction().checked=!1},enumerable:!0,configurable:!0}),t.prototype.setResultCount=function(e,t){if(e===T.ConfigurationTarget.WORKSPACE){n=i.localize(6,null);t&&(n+=" ("+t+")"),this.workspaceSettings.label=n}else if(e===T.ConfigurationTarget.USER){var n=i.localize(7,null);t&&(n+=" ("+t+")"),this.userSettings.label=n}else e instanceof r.default&&this.folderSettings.setCount(e,t)},t.prototype.onWorkbenchStateChanged=function(){
this.folderSettings.folder=null,this.update(),this.settingsTarget===T.ConfigurationTarget.WORKSPACE&&this.contextService.getWorkbenchState()===b.WorkbenchState.WORKSPACE&&this.updateTarget(T.ConfigurationTarget.USER)},t.prototype.updateTarget=function(e){return this.settingsTarget===e||e instanceof r.default&&this.settingsTarget instanceof r.default&&this.settingsTarget.toString()===e.toString()||(this.settingsTarget=e,this._onDidTargetChange.fire(this.settingsTarget)),c.TPromise.as(null)},t.prototype.update=function(){s.toggleClass(this.settingsSwitcherBar.domNode,"empty-workbench",this.contextService.getWorkbenchState()===b.WorkbenchState.EMPTY),this.workspaceSettings.enabled=this.contextService.getWorkbenchState()!==b.WorkbenchState.EMPTY,this.folderSettings.getAction().enabled=this.contextService.getWorkbenchState()===b.WorkbenchState.WORKSPACE&&this.contextService.getWorkspace().folders.length>0},t=a([l(1,b.IWorkspaceContextService),l(2,v.IInstantiationService)],t)}(d.Widget);t.SettingsTargetsWidget=O
;var M=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.options=n,s.contextViewService=i,s.instantiationService=r,s.themeService=o,s._onDidChange=s._register(new h.Emitter),s.onDidChange=s._onDidChange.event,s._onFocus=s._register(new h.Emitter),s.onFocus=s._onFocus.event,s.create(t),s}return n(t,e),t.prototype.create=function(e){var t=this;this.domNode=s.append(e,s.$("div.settings-header-widget")),this.createSearchContainer(s.append(this.domNode,s.$("div.settings-search-container"))),this.controlsDiv=s.append(this.domNode,s.$("div.settings-search-controls")),this.options.showResultCount&&(this.countElement=s.append(this.controlsDiv,s.$(".settings-count-widget")),this._register(_.attachStylerCallback(this.themeService,{badgeBackground:E.badgeBackground,contrastBorder:E.contrastBorder},function(e){var n=e.badgeBackground?e.badgeBackground.toString():null,i=e.contrastBorder?e.contrastBorder.toString():null;t.countElement.style.backgroundColor=n,t.countElement.style.borderWidth=i?"1px":null,
t.countElement.style.borderStyle=i?"solid":null,t.countElement.style.borderColor=i,t.styleCountElementForeground()}))),this.inputBox.inputElement.setAttribute("aria-live","assertive");var n=this._register(s.trackFocus(this.inputBox.inputElement));this._register(n.onDidFocus(function(){return t._onFocus.fire()})),this.options.focusKey&&(this._register(n.onDidFocus(function(){return t.options.focusKey.set(!0)})),this._register(n.onDidBlur(function(){return t.options.focusKey.set(!1)})))},t.prototype.createSearchContainer=function(e){var t=this;this.searchContainer=e;var n=s.append(this.searchContainer,s.$("div.settings-search-input"));this.inputBox=this._register(this.createInputBox(n)),this._register(this.inputBox.onDidChange(function(e){return t._onDidChange.fire(e)}))},t.prototype.createInputBox=function(e){var t=this._register(new g.InputBox(e,this.contextViewService,this.options));return this._register(_.attachInputBoxStyler(t,this.themeService)),t},t.prototype.showMessage=function(e,t){
this.countElement&&e!==this.countElement.textContent&&(this.countElement.textContent=e,this.inputBox.inputElement.setAttribute("aria-label",e),s.toggleClass(this.countElement,"no-results",0===t),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px",this.styleCountElementForeground())},t.prototype.styleCountElementForeground=function(){var e=s.hasClass(this.countElement,"no-results")?E.errorForeground:E.badgeForeground,t=this.themeService.getTheme().getColor(e);this.countElement.style.color=t?t.toString():null},t.prototype.layout=function(e){e.width<400?(this.countElement&&s.addClass(this.countElement,"hide"),this.inputBox.inputElement.style.paddingRight="0px"):(this.countElement&&s.removeClass(this.countElement,"hide"),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px")},t.prototype.getControlsWidth=function(){return(this.countElement?s.getTotalWidth(this.countElement):0)+20},t.prototype.focus=function(){this.inputBox.focus(),this.getValue()&&this.inputBox.select()
},t.prototype.hasFocus=function(){return this.inputBox.hasFocus()},t.prototype.clear=function(){this.inputBox.value=""},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){return this.inputBox.value=e},t.prototype.dispose=function(){this.options.focusKey&&this.options.focusKey.set(!1),e.prototype.dispose.call(this)},t=a([l(2,m.IContextViewService),l(3,v.IInstantiationService),l(4,C.IThemeService)],t)}(d.Widget);t.SearchWidget=M;var P=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;if(s.editor=t,s.label=n,s.themeService=o,s._onClick=s._register(new h.Emitter),s.onClick=s._onClick.event,i){var a=r.lookupKeybinding(i);a&&(s.label+=" ("+a.getLabel()+")")}return s}return n(t,e),t.prototype.render=function(){var e=this;this._domNode=s.$(".floating-click-widget"),this._register(_.attachStylerCallback(this.themeService,{buttonBackground:E.buttonBackground,buttonForeground:E.buttonForeground,editorBackground:E.editorBackground,editorForeground:E.editorForeground,
contrastBorder:E.contrastBorder},function(t){e._domNode.style.backgroundColor=t.buttonBackground?t.buttonBackground.toString():t.editorBackground.toString(),e._domNode.style.color=t.buttonForeground?t.buttonForeground.toString():t.editorForeground.toString();var n=t.contrastBorder?t.contrastBorder.toString():null;e._domNode.style.borderWidth=n?"1px":null,e._domNode.style.borderStyle=n?"solid":null,e._domNode.style.borderColor=n})),s.append(this._domNode,s.$("")).textContent=this.label,this.onclick(this._domNode,function(t){return e._onClick.fire()}),this.editor.addOverlayWidget(this)},t.prototype.dispose=function(){this.editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return"editor.overlayWidget.floatingClickWidget"},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:f.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER}},t=a([l(3,y.IKeybindingService),l(4,C.IThemeService)],t)}(d.Widget)
;t.FloatingClickWidget=P;var N=function(e){function t(t){var n=e.call(this)||this;return n.editor=t,n._onClick=new h.Emitter,n._editPreferenceDecoration=[],n._register(n.editor.onMouseDown(function(e){var t=e.target.detail;e.target.type===f.MouseTargetType.GUTTER_GLYPH_MARGIN&&!t.isAfterLines&&n.isVisible()&&n._onClick.fire(e)})),n}return n(t,e),Object.defineProperty(t.prototype,"onClick",{get:function(){return this._onClick.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preferences",{get:function(){return this._preferences},enumerable:!0,configurable:!0}),t.prototype.getLine=function(){return this._line},t.prototype.show=function(e,n,i){this._preferences=i;var r=[];this._line=e,r.push({options:{glyphMarginClassName:t.GLYPH_MARGIN_CLASS_NAME,glyphMarginHoverMessage:(new I.MarkdownString).appendText(n),stickiness:k.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges},range:{startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1}}),
this._editPreferenceDecoration=this.editor.deltaDecorations(this._editPreferenceDecoration,r)},t.prototype.hide=function(){this._editPreferenceDecoration=this.editor.deltaDecorations(this._editPreferenceDecoration,[])},t.prototype.isVisible=function(){return this._editPreferenceDecoration.length>0},t.prototype.dispose=function(){this.hide(),e.prototype.dispose.call(this)},t.GLYPH_MARGIN_CLASS_NAME="edit-preferences-widget",t}(u.Disposable);t.EditPreferenceWidget=N,C.registerThemingParticipant(function(e,t){t.addRule("\n\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus,\n\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked {\n\t\t\tborder-bottom: 1px solid;\n\t\t}\n\t");var n=e.getColor(x.PANEL_ACTIVE_TITLE_FOREGROUND),i=e.getColor(x.PANEL_ACTIVE_TITLE_BORDER)
;(n||i)&&t.addRule("\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover,\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked {\n\t\t\t\tcolor: "+n+";\n\t\t\t\tborder-bottom-color: "+i+";\n\t\t\t}\n\t\t");var r=e.getColor(x.PANEL_INACTIVE_TITLE_FOREGROUND);r&&t.addRule("\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label {\n\t\t\t\tcolor: "+r+";\n\t\t\t}\n\t\t");var o=e.getColor(E.focusBorder);o&&(t.addRule("\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus {\n\t\t\t\tborder-bottom-color: "+o+" !important;\n\t\t\t}\n\t\t\t"),t.addRule("\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t\t"));if(e.getColor(E.activeContrastBorder)){var s=e.getColor(E.activeContrastBorder)
;t.addRule("\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked,\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover {\n\t\t\t\toutline-color: "+s+";\n\t\t\t\toutline-width: 1px;\n\t\t\t\toutline-style: solid;\n\t\t\t\tborder-bottom: none;\n\t\t\t\tpadding-bottom: 0;\n\t\t\t\toutline-offset: 2px;\n\t\t\t}\n\n\t\t\t.settings-tabs-widget > .monaco-action-bar .action-item .action-label:not(.checked):hover {\n\t\t\t\toutline-style: dashed;\n\t\t\t}\n\t\t")}})}),define(e[1143],t([1,0,683]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commonlyUsedData={id:"commonlyUsed",label:n.localize(0,null),settings:["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations"]},t.tocData={id:"root",label:"root",children:[{id:"editor",label:n.localize(1,null),
children:[{id:"editor/cursor",label:n.localize(2,null),settings:["editor.cursor*"]},{id:"editor/find",label:n.localize(3,null),settings:["editor.find.*"]},{id:"editor/font",label:n.localize(4,null),settings:["editor.font*"]},{id:"editor/format",label:n.localize(5,null),settings:["editor.format*"]},{id:"editor/diffEditor",label:n.localize(6,null),settings:["diffEditor.*"]},{id:"editor/minimap",label:n.localize(7,null),settings:["editor.minimap.*"]},{id:"editor/suggestions",label:n.localize(8,null),settings:["editor.*suggestion*"]},{id:"editor/files",label:n.localize(9,null),settings:["files.*"]},{id:"editor/editor",label:n.localize(10,null),settings:["editor.*"]}]},{id:"workbench",label:n.localize(11,null),children:[{id:"workbench/appearance",label:n.localize(12,null),settings:["workbench.activityBar.*","workbench.*color*","workbench.fontAliasing","workbench.iconTheme","workbench.sidebar.location","workbench.*.visible","workbench.tips.enabled","workbench.tree.*","workbench.view.*"]},{id:"workbench/editor",
label:n.localize(13,null),settings:["workbench.editor.*"]},{id:"workbench/settings",label:n.localize(14,null),settings:["workbench.settings.*"]},{id:"workbench/zenmode",label:n.localize(15,null),settings:["zenmode.*"]},{id:"workbench/workbench",label:n.localize(16,null),settings:["workbench.*"]}]},{id:"window",label:n.localize(17,null),children:[{id:"window/newWindow",label:n.localize(18,null),settings:["window.*newwindow*"]},{id:"window/window",label:n.localize(19,null),settings:["window.*"]}]},{id:"features",label:n.localize(20,null),children:[{id:"features/explorer",label:n.localize(21,null),settings:["explorer.*","outline.*"]},{id:"features/search",label:n.localize(22,null),settings:["search.*"]},{id:"features/debug",label:n.localize(23,null),settings:["debug.*","launch"]},{id:"features/scm",label:n.localize(24,null),settings:["scm.*"]},{id:"features/extensions",label:n.localize(25,null),settings:["extensions.*"]},{id:"features/terminal",label:n.localize(26,null),settings:["terminal.*"]},{
id:"features/problems",label:n.localize(27,null),settings:["problems.*"]}]},{id:"application",label:n.localize(28,null),children:[{id:"application/http",label:n.localize(29,null),settings:["http.*"]},{id:"application/keyboard",label:n.localize(30,null),settings:["keyboard.*"]},{id:"application/update",label:n.localize(31,null),settings:["update.*"]},{id:"application/telemetry",label:n.localize(32,null),settings:["telemetry.*"]}]}]}}),define(e[385],t([1,0,8,155,246,118,279,20,51,7,5,24,14,10,4,684,17,35,58,26,68,12]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";function I(e,t,n,i){var r=new P;r.id=function(e){return e.replace(/[\.\/]/,"_")}(t.id+"_"+e.key),r.parent=t;var o=function(e,t,n){var i=v.default.isUri(t)?{resource:t}:void 0,r=n.inspect(e,i),o=t===b.ConfigurationTarget.USER?"user":t===b.ConfigurationTarget.WORKSPACE?"workspace":"workspaceFolder";return{isConfigured:void 0!==r[o],inspected:r,targetSelector:o}
}(e.key,n,i),s=o.isConfigured,a=o.inspected,c=o.targetSelector,l=s?a[c]:a.default,u=[];"user"===c&&void 0!==a.workspace&&u.push(y.localize(1,null)),"workspace"===c&&void 0!==a.user&&u.push(y.localize(2,null));var d=D(e.key,t.id);return r.setting=e,r.displayLabel=d.label,r.displayCategory=d.category,r.isExpanded=!1,r.value=l,r.isConfigured=s,r.overriddenScopeList=u,r.description=e.description.join("\n"),r.enum=e.enum,r.valueType=e.type,r}function T(e,t){return k(e,function(e){for(var t=new Set,n=0,i=e;n<i.length;n++)for(var r=0,o=i[n].sections;r<o.length;r++)for(var s=0,a=o[r].settings;s<a.length;s++){var c=a[s];t.add(c)}return t}(t))}function x(e){var t=e.sort(function(e,t){return e.title.localeCompare(t.title)}).map(function(e){return function(e){var t=u.flatten(e.sections.map(function(e){return e.settings}));return{id:e.id,label:e.title,settings:t}}(e)});return{id:"extensions",label:y.localize(3,null),children:t}}function k(e,t){return e.settings?{id:e.id,label:e.label,
settings:u.flatten(e.settings.map(function(e){return function(e,t){var n=[];return e.forEach(function(i){(function(e,t){return t=g.escapeRegExpCharacters(t).replace(/\\\*/g,".*"),new RegExp("^"+t,"i").test(e.key)})(i,t)&&(n.push(i),e.delete(i))}),n.sort(function(e,t){return e.key.localeCompare(t.key)})}(t,e)}))}:e.children?{id:e.id,label:e.label,children:e.children.map(function(e){return k(e,t)}).filter(function(e){return e.children&&e.children.length||e.settings&&e.settings.length})}:null}function D(e,t){void 0===t&&(t="");var n=A(e),i=n.lastIndexOf("."),r="";return i>=0&&(r=n.substr(0,i),n=n.substr(i+1)),t=A(t.replace(/\//g,".")),r=function(e,t){var n=function(n){for(var i=t.split(".");i.length;){var r=new RegExp("^"+i.join("\\.")+"(\\.|$)","i");if(r.test(e))return e.replace(r,"");n?i.pop():i.shift()}return null},i=n(!0);null===i&&(i=n(!1));null===i&&(i=e);return i}(r,t),{category:r,label:n}}function A(e){return e.replace(/\.([a-z])/g,function(e,t){return"."+t.toUpperCase()
}).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^[a-z]/g,function(e){return e.toUpperCase()})}function L(e){return e&&e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}Object.defineProperty(t,"__esModule",{value:!0});var R=i.$;t.modifiedItemForeground=C.registerColor("settings.modifiedItemForeground",{light:"#019001",dark:"#73C991",hc:"#73C991"},y.localize(0,null)),w.registerThemingParticipant(function(e,n){var i=e.getColor(t.modifiedItemForeground);i&&n.addRule(".settings-editor > .settings-body > .settings-tree-container .setting-item.is-configured .setting-item-is-configured-label { color: "+i+"; }")}),w.registerThemingParticipant(function(e,t){var n=e.getColor(C.selectBackground);n&&t.addRule(".settings-editor > .settings-body > .settings-tree-container .setting-item-bool .setting-value-checkbox { background-color: "+n+" !important; }");var i=e.getColor(C.selectBorder)
;i&&(t.addRule(".settings-editor > .settings-body > .settings-tree-container .setting-item-bool .setting-value-checkbox { border-color: "+i+" !important; }"),t.addRule(".settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-control > .monaco-inputbox { border: solid 1px "+i+" !important; }"))});var O=function(){return function(){}}();t.SettingsTreeElement=O;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(O);t.SettingsTreeGroupElement=M;var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(O);t.SettingsTreeSettingElement=P;var N=function(){function e(e,t,n){this._viewState=e,this._tocRoot=t,this._configurationService=n,this._treeElementsById=new Map,this.update(this._tocRoot)}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.update=function(e){void 0===e&&(e=this._tocRoot)
;var t=this.createSettingsTreeGroupElement(e);t.children[0].isFirstGroup=!0,this._root?this._root.children=t.children:this._root=t},e.prototype.getElementById=function(e){return this._treeElementsById.get(e)},e.prototype.createSettingsTreeGroupElement=function(e,t){var n=this,i=new M;return i.id=e.id,i.label=e.label,i.parent=t,i.level=this.getDepth(i),e.children?i.children=e.children.map(function(e){return n.createSettingsTreeGroupElement(e,i)}):e.settings&&(i.children=e.settings.map(function(e){return n.createSettingsTreeSettingElement(e,i)})),this._treeElementsById.set(i.id,i),i},e.prototype.getDepth=function(e){return e.parent?1+this.getDepth(e.parent):0},e.prototype.createSettingsTreeSettingElement=function(e,t){var n=I(e,t,this._viewState.settingsTarget,this._configurationService);return this._treeElementsById.set(n.id,n),n},e=a([l(2,b.IConfigurationService)],e)}();t.SettingsTreeModel=N,t.resolveSettingsTree=T,t.resolveExtensionsSettings=x;var F=function(){function e(){}
return e.prototype.getId=function(e,t){return t.id},e.prototype.hasChildren=function(e,t){return t instanceof K||t instanceof M},e.prototype.getChildren=function(e,t){return m.TPromise.as(this._getChildren(t))},e.prototype._getChildren=function(e){return e instanceof K?e.getChildren():e instanceof M?e.children:null},e.prototype.getParent=function(e,t){return m.TPromise.wrap(t.parent)},e.prototype.shouldAutoexpand=function(){return!0},e}();t.SettingsDataSource=F,t.settingKeyToDisplayFormat=D;var W=function(){function e(e,t,n){this.themeService=t,this.contextViewService=n,this._onDidChangeSetting=new h.Emitter,this.onDidChangeSetting=this._onDidChangeSetting.event,this._onDidOpenSettings=new h.Emitter,this.onDidOpenSettings=this._onDidOpenSettings.event,this.measureContainer=i.append(e,R(".setting-measure-container.monaco-tree-row"))}return e.prototype.getHeight=function(e,t){if(t instanceof M)return t.isFirstGroup?31:40+7*t.level;if(t instanceof P){
return this.elementIsSelected(e,t)?this.measureSettingElementHeight(e,t):this._getUnexpandedSettingHeight(t)}return 0},e.prototype._getUnexpandedSettingHeight=function(t){return"boolean"===t.valueType?e.SETTING_BOOL_ROW_HEIGHT:e.SETTING_ROW_HEIGHT},e.prototype.measureSettingElementHeight=function(e,t){var n=i.append(this.measureContainer,R(".setting-measure-helper")),r=this.getTemplateId(e,t),o=this.renderTemplate(e,r,n);this.renderElement(e,t,r,o);var s=this.measureContainer.offsetHeight;return this.measureContainer.removeChild(this.measureContainer.firstChild),Math.max(s,this._getUnexpandedSettingHeight(t))},e.prototype.getTemplateId=function(e,t){return t instanceof M?"settings.group.template":t instanceof P?"boolean"===t.valueType?"settings.bool.template":"settings.entry.template":""},e.prototype.renderTemplate=function(e,t,n){
return"settings.group.template"===t?this.renderGroupTitleTemplate(n):"settings.entry.template"===t?this.renderSettingTemplate(e,n):"settings.bool.template"===t?this.renderSettingBoolTemplate(e,n):null},e.prototype.renderGroupTitleTemplate=function(e){i.addClass(e,"group-title");return{parent:e,toDispose:[]}},e.prototype.renderSettingTemplate=function(e,t){i.addClass(t,"setting-item");var n=i.append(t,R(".setting-item-title")),r=i.append(n,R("span.setting-item-category")),o=i.append(n,R("span.setting-item-label")),s=i.append(n,R("span.setting-item-is-configured-label")),a=i.append(n,R("span.setting-item-overrides")),c=i.append(t,R(".setting-item-description")),l=i.append(t,R(".setting-item-value")),u=i.append(l,R("div")),d=i.append(l,R(".reset-button-container")),h=[],p={parent:t,toDispose:h,containerElement:t,categoryElement:r,labelElement:o,descriptionElement:c,controlElement:u,isConfiguredElement:s,otherOverridesElement:a};return h.push(i.addDisposableListener(u,"mousedown",function(e){
return e.stopPropagation()})),h.push(i.addDisposableListener(d,"mousedown",function(e){return e.stopPropagation()})),h.push(i.addStandardDisposableListener(l,"keydown",function(t){9===t.keyCode&&(e.domFocus(),t.browserEvent.stopPropagation())})),p},e.prototype.renderSettingBoolTemplate=function(e,t){i.addClass(t,"setting-item"),i.addClass(t,"setting-item-bool");var n=i.append(t,R(".setting-item-title")),r=i.append(n,R("span.setting-item-category")),s=i.append(n,R("span.setting-item-label")),a=i.append(n,R("span.setting-item-is-configured-label")),c=i.append(n,R("span.setting-item-overrides")),l=i.append(t,R(".setting-item-value-description")),u=i.append(l,R(".setting-item-bool-control")),d=i.append(l,R(".setting-item-description")),h=[],p=new o.Checkbox({actionClassName:"setting-value-checkbox",isChecked:!0,title:"",inputActiveOptionBorder:null});u.appendChild(p.domNode),h.push(p),h.push(p.onChange(function(){f.onChange&&f.onChange(p.checked)}));var f={parent:t,toDispose:h,containerElement:t,
categoryElement:r,labelElement:s,checkbox:p,descriptionElement:d,isConfiguredElement:a,otherOverridesElement:c};return h.push(i.addDisposableListener(u,"mousedown",function(e){return e.stopPropagation()})),h.push(i.addStandardDisposableListener(u,"keydown",function(t){9===t.keyCode&&(e.domFocus(),t.browserEvent.stopPropagation())})),f},e.prototype.renderElement=function(e,t,n,i){return"settings.entry.template"===n?this.renderSettingElement(e,t,i):"settings.bool.template"===n?this.renderSettingElement(e,t,i):"settings.group.template"===n?this.renderGroupElement(t,i):void 0},e.prototype.renderGroupElement=function(e,t){t.parent.innerHTML="";var n=i.append(t.parent,R("div.settings-group-title-label"));n.classList.add("settings-group-level-"+e.level),n.textContent=e.label,e.isFirstGroup&&n.classList.add("settings-group-first")},e.prototype.elementIsSelected=function(e,t){var n=e.getSelection(),i=n&&n[0];return i&&i.id===t.id},e.prototype.renderSettingElement=function(e,t,n){
var r=!!this.elementIsSelected(e,t),o=t.setting;i.toggleClass(n.parent,"is-configured",t.isConfigured),i.toggleClass(n.parent,"is-expanded",r),n.containerElement.id=t.id.replace(/\./g,"_");var s=o.key;if(n.categoryElement.textContent=t.displayCategory&&t.displayCategory+": ",n.categoryElement.title=s,n.labelElement.textContent=t.displayLabel,n.labelElement.title=s,n.descriptionElement.textContent=t.description,this.renderValue(t,r,n),n.isConfiguredElement.textContent=t.isConfigured?y.localize(4,null):"",t.overriddenScopeList.length){var a=t.isConfigured?y.localize(5,null):y.localize(6,null);n.otherOverridesElement.textContent="("+a+": "+t.overriddenScopeList.join(", ")+")"}else n.otherOverridesElement.textContent=""},e.prototype.renderValue=function(e,t,n){var i=this,r=function(t){return i._onDidChangeSetting.fire({key:e.setting.key,value:t})};if("boolean"!==e.valueType)return this._renderValue(e,t,n,r);this.renderBool(e,t,n,r)},e.prototype._renderValue=function(e,t,n,i){var r=n.controlElement
;if(r.innerHTML="",r.setAttribute("class","setting-item-control"),!e.enum||"string"!==e.valueType&&e.valueType)if("string"===e.valueType)r.classList.add("setting-type-string"),this.renderText(e,t,n,r,i);else if("number"===e.valueType||"integer"===e.valueType){r.classList.add("setting-type-number");var o="integer"===e.valueType?parseInt:parseFloat;this.renderText(e,t,n,r,function(e){return i(o(e))})}else r.classList.add("setting-type-complex"),this.renderEditInSettingsJson(e,t,n,r);else r.classList.add("setting-type-enum"),this.renderEnum(e,t,n,r,i)},e.prototype.renderBool=function(e,t,n,i){n.onChange=null,n.checkbox.checked=e.value,n.onChange=i,n.checkbox.domNode.tabIndex=t?0:-1},e.prototype.renderEnum=function(e,t,n,i,r){var o=e.enum.indexOf(e.value),s=e.enum.map(L),a=new c.SelectBox(s,o,this.contextViewService);n.toDispose.push(E.attachSelectBoxStyler(a,this.themeService)),a.render(i),i.firstElementChild&&i.firstElementChild.setAttribute("tabindex",t?"0":"-1"),n.toDispose.push(a.onDidSelect(function(t){
return r(e.enum[t.index])}))},e.prototype.renderText=function(e,t,n,i,r){var o=new s.InputBox(i,this.contextViewService);n.toDispose.push(E.attachInputBoxStyler(o,this.themeService)),n.toDispose.push(o),o.value=e.value,o.inputElement.tabIndex=t?0:-1,n.toDispose.push(o.onDidChange(function(e){return r(e)}))},e.prototype.renderEditInSettingsJson=function(e,t,n,i){var o=this,s=new r.Button(i,{title:!0,buttonBackground:null,buttonHoverBackground:null});s.onDidClick(function(){return o._onDidOpenSettings.fire()}),s.label=y.localize(7,null),s.element.classList.add("edit-in-settings-button"),s.element.tabIndex=t?0:-1,n.toDispose.push(s),n.toDispose.push(E.attachButtonStyler(s,this.themeService,{buttonBackground:d.Color.transparent.toString(),buttonHoverBackground:d.Color.transparent.toString(),buttonForeground:"foreground"}))},e.prototype.disposeTemplate=function(e,t,n){p.dispose(n.toDispose)},e.SETTING_ROW_HEIGHT=94,e.SETTING_BOOL_ROW_HEIGHT=61,e=a([l(1,w.IThemeService),l(2,S.IContextViewService)],e)}()
;t.SettingsRenderer=W;var B=function(){function e(e){this.viewState=e}return e.prototype.isVisible=function(e,t){return!(this.viewState.filterToCategory&&t instanceof P&&!this.settingContainedInGroup(t.setting,this.viewState.filterToCategory))&&(t instanceof P&&this.viewState.showConfiguredOnly?t.isConfigured:!(t instanceof M&&this.viewState.showConfiguredOnly)||this.groupHasConfiguredSetting(t))},e.prototype.settingContainedInGroup=function(e,t){var n=this;return t.children.some(function(t){return t instanceof M?n.settingContainedInGroup(e,t):t instanceof P&&t.setting.key===e.key})},e.prototype.groupHasConfiguredSetting=function(e){for(var t=0,n=e.children;t<n.length;t++){var i=n[t];if(i instanceof P){if(i.isConfigured)return!0}else if(i instanceof M&&this.groupHasConfiguredSetting(i))return!0}return!1},e}();t.SettingsTreeFilter=B;var V=function(e){function t(t){return e.call(this,{},t)||this}return n(t,e),t=a([l(0,b.IConfigurationService)],t)}(_.WorkbenchTreeController);t.SettingsTreeController=V
;var z=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t?t instanceof P?y.localize(8,null,t.displayCategory,t.displayLabel):t instanceof M?y.localize(9,null,t.label):"":""},e}();t.SettingsAccessibilityProvider=z;var H;!function(e){e[e.Local=0]="Local",e[e.Remote=1]="Remote"}(H=t.SearchResultIdx||(t.SearchResultIdx={}));var K=function(){function e(e,t){this._viewState=e,this._configurationService=t,this.id="searchResultModel"}return e.prototype.getChildren=function(){return this.children},e.prototype.getUniqueResults=function(){if(this.cachedUniqueSearchResults)return this.cachedUniqueSearchResults;if(!this.rawSearchResults)return[];var e=new Set,t=f.deepClone(this.rawSearchResults[H.Local]);t&&t.filterMatches.forEach(function(t){return e.add(t.setting.key)});var n=f.deepClone(this.rawSearchResults[H.Remote]);return n&&(n.filterMatches=n.filterMatches.filter(function(t){return!e.has(t.setting.key)})),this.cachedUniqueSearchResults=[t,n],this.cachedUniqueSearchResults},
e.prototype.getRawResults=function(){return this.rawSearchResults},e.prototype.setResult=function(e,t){this.cachedUniqueSearchResults=null,this.rawSearchResults=this.rawSearchResults||[],t?(this.rawSearchResults[e]=t,this.updateChildren()):delete this.rawSearchResults[e]},e.prototype.updateChildren=function(){var e=this;this.children=this.getFlatSettings().map(function(t){return I(t,e,e._viewState.settingsTarget,e._configurationService)})},e.prototype.getFlatSettings=function(){var e=[];return this.getUniqueResults().filter(function(e){return!!e}).forEach(function(t){e.push.apply(e,t.filterMatches.map(function(e){return e.setting}))}),e},e=a([l(1,b.IConfigurationService)],e)}();t.SearchResultModel=K;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.expand=function(){return m.TPromise.wrap(null)},t.prototype.collapse=function(){return m.TPromise.wrap(null)},t}(_.WorkbenchTree);t.NonExpandableTree=U}),define(e[1145],t([1,0,8,4,385,17]),function(e,t,n,i,r,o){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n.$,c=function(){function e(){}return Object.defineProperty(e.prototype,"settingsTreeRoot",{set:function(e){this._settingsTreeRoot=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentSearchModel",{set:function(e){this._currentSearchModel=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._settingsTreeRoot.children},enumerable:!0,configurable:!0}),e.prototype.update=function(){this.updateGroupCount(this._settingsTreeRoot)},e.prototype.updateGroupCount=function(e){var t=this;e.count=this._currentSearchModel?this.getSearchResultChildrenCount(e):void 0,e.children.forEach(function(e){e instanceof r.SettingsTreeGroupElement&&t.updateGroupCount(e)})},e.prototype.getSearchResultChildrenCount=function(e){var t=this;return this._currentSearchModel.getChildren().filter(function(n){return t.groupContainsSetting(e,n.setting)}).length},
e.prototype.groupContainsSetting=function(e,t){var n=this;return e.children.some(function(e){return e instanceof r.SettingsTreeSettingElement?e.setting.key===t.key:e instanceof r.SettingsTreeGroupElement&&n.groupContainsSetting(e,t)})},e}();t.TOCTreeModel=c;var u=function(){function e(e){this.configService=e}return e.prototype.getId=function(e,t){return t.id},e.prototype.hasChildren=function(e,t){return t instanceof c||t instanceof r.SettingsTreeGroupElement&&t.children&&t.children.every(function(e){return e instanceof r.SettingsTreeGroupElement})},e.prototype.getChildren=function(e,t){return i.TPromise.as(this._getChildren(t))},e.prototype._getChildren=function(e){if("filter"===this.configService.getValue("workbench.settings.settingsSearchTocBehavior")){return e.children.filter(function(e){return 0!==e.count})}return e.children},e.prototype.getParent=function(e,t){return i.TPromise.wrap(t instanceof r.SettingsTreeGroupElement&&t.parent)},e.prototype.shouldAutoexpand=function(){return!0},
e=a([l(0,o.IConfigurationService)],e)}();t.TOCDataSource=u;var d=function(){function e(){}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(e,t){return"settings.toc.entry"},e.prototype.renderTemplate=function(e,t,i){return{element:n.append(i,s(".settings-toc-entry"))}},e.prototype.renderElement=function(e,t,i,r){var o=t.count?t.label+" ("+t.count+")":t.label;n.toggleClass(r.element,"no-results",0===t.count),r.element.textContent=o},e.prototype.disposeTemplate=function(e,t,n){},e}();t.TOCRenderer=d}),define(e[297],t([1,0,6,15,25]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPreferencesSearchService=n.createDecorator("preferencesSearchService"),t.CONTEXT_SETTINGS_EDITOR=new i.RawContextKey("inSettingsEditor",!1),t.CONTEXT_SETTINGS_SEARCH_FOCUS=new i.RawContextKey("inSettingsSearch",!1),t.CONTEXT_SETTINGS_FIRST_ROW_FOCUS=new i.RawContextKey("firstSettingRowFocused",!1),
t.CONTEXT_SETTINGS_ROW_FOCUS=new i.RawContextKey("settingRowFocused",!1),t.CONTEXT_TOC_ROW_FOCUS=new i.RawContextKey("settingsTocRowFocus",!1),t.CONTEXT_KEYBINDINGS_EDITOR=new i.RawContextKey("inKeybindings",!1),t.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=new i.RawContextKey("inKeybindingsSearch",!1),t.CONTEXT_KEYBINDING_FOCUS=new i.RawContextKey("keybindingFocus",!1),t.SETTINGS_EDITOR_COMMAND_SEARCH="settings.action.search",t.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="settings.action.clearSearchResults",t.SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING="settings.action.focusNextSetting",t.SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING="settings.action.focusPreviousSetting",t.SETTINGS_EDITOR_COMMAND_FOCUS_FILE="settings.action.focusSettingsFile",t.SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING="settings.action.editFocusedSetting",t.SETTINGS_EDITOR_COMMAND_FOCUS_SEARCH_FROM_SETTINGS="settings.action.focusSearchFromSettings",t.SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_FROM_SEARCH="settings.action.focusSettingsFromSearch",
t.SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_LIST="settings.action.focusSettingsList",t.KEYBINDINGS_EDITOR_COMMAND_SEARCH="keybindings.editor.searchKeybindings",t.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="keybindings.editor.clearSearchResults",t.KEYBINDINGS_EDITOR_COMMAND_DEFINE="keybindings.editor.defineKeybinding",t.KEYBINDINGS_EDITOR_COMMAND_REMOVE="keybindings.editor.removeKeybinding",t.KEYBINDINGS_EDITOR_COMMAND_RESET="keybindings.editor.resetKeybinding",t.KEYBINDINGS_EDITOR_COMMAND_COPY="keybindings.editor.copyKeybindingEntry",t.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND="keybindings.editor.copyCommandKeybindingEntry",t.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR="keybindings.editor.showConflicts",t.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS="keybindings.editor.focusKeybindings",t.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS="keybindings.editor.showDefaultKeybindings",t.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS="keybindings.editor.showUserKeybindings",
t.FOLDER_SETTINGS_PATH=r.join(".vscode","settings.json"),t.DEFAULT_SETTINGS_EDITOR_SETTING="workbench.settings.openDefaultSettings"}),define(e[1147],t([1,0,89,39,19]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.hasOpenBrace=function(e){for(;e.scan()!==n.SyntaxKind.EOF;){if(e.getToken()===n.SyntaxKind.OpenBraceToken)return!0}return!1},e.offsetToPosition=function(e,t){for(var n=0,r=e.getEOL().length,o=e.getLineCount(),s=1;s<=o;s++){var a=n+(e.getLineContent(s).length+r);if(a>t)return new i.Position(s,t-n+1);n=a}return new i.Position(o,e.getLineMaxColumn(o))},e.insertSnippet=function(e,t){var o,s=e.getValueLengthInRange(new r.Range(1,1,t.lineNumber,t.column));!function(e){e[e.INVALID=0]="INVALID",e[e.AFTER_OBJECT=1]="AFTER_OBJECT",e[e.BEFORE_OBJECT=2]="BEFORE_OBJECT"}(o||(o={}));for(var a=o.INVALID,c=-1,l=o.INVALID,u=n.createScanner(e.getValue()),d=0,h=0,p=function(e,t){t!==o.INVALID&&1===d&&0===h?(a=t,c=e,
l=t):a!==o.INVALID&&(a=o.INVALID,c=u.getTokenOffset())};u.scan()!==n.SyntaxKind.EOF;){var f=u.getPosition(),g=!1;switch(u.getToken()){case n.SyntaxKind.OpenBracketToken:g=!0,d++,p(f,o.BEFORE_OBJECT);break;case n.SyntaxKind.CloseBracketToken:g=!0,d--,p(f,o.INVALID);break;case n.SyntaxKind.CommaToken:g=!0,p(f,o.BEFORE_OBJECT);break;case n.SyntaxKind.OpenBraceToken:g=!0,h++,p(f,o.INVALID);break;case n.SyntaxKind.CloseBraceToken:g=!0,h--,p(f,o.AFTER_OBJECT);break;case n.SyntaxKind.Trivia:case n.SyntaxKind.LineBreakTrivia:g=!0}if(f>=s&&(a!==o.INVALID||-1!==c)){var v=void 0,m=void 0;return a!==o.INVALID?(v=g?f:u.getTokenOffset(),m=a):(v=c,m=l),m===o.AFTER_OBJECT?{position:this.offsetToPosition(e,v),prepend:",",append:""}:(u.setPosition(v),{position:this.offsetToPosition(e,v),prepend:"",append:this.hasOpenBrace(u)?",":""})}}var y=e.getLineCount();return{position:new i.Position(y,e.getLineMaxColumn(y)),prepend:"\n[",append:"]"}},e}();t.SmartSnippetInserter=o}),define(e[299],t([1,0,16,98]),function(e,t,n,i){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWLET_ID="workbench.view.scm",t.VIEW_CONTAINER=n.Registry.as(i.Extensions.ViewContainersRegistry).registerViewContainer(t.VIEWLET_ID)}),define(e[388],t([1,0]),function(e,t){"use strict";function n(e){return!!e.sourceUri}Object.defineProperty(t,"__esModule",{value:!0}),t.isSCMResource=n,t.getSCMResourceContextKey=function(e){return n(e)?e.resourceGroup.id:e.id}}),define(e[1150],t([1,0,7,5,15,31,143,388,35,470]),function(e,t,n,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t,i,r){this.menuService=i,this.contextMenuService=r,this.titleActions=[],this.titleSecondaryActions=[],this._onDidChangeTitle=new n.Emitter,this.disposables=[],this.contextKeyService=t.createScoped();var s=this.contextKeyService.createKey("scmProvider",void 0);e?s.set(e.contextValue):s.set(""),this.titleMenu=this.menuService.createMenu(o.MenuId.SCMTitle,this.contextKeyService),this.disposables.push(this.titleMenu),
this.titleMenu.onDidChange(this.updateTitleActions,this,this.disposables),this.updateTitleActions()}return Object.defineProperty(e.prototype,"onDidChangeTitle",{get:function(){return this._onDidChangeTitle.event},enumerable:!0,configurable:!0}),e.prototype.updateTitleActions=function(){this.titleActions=[],this.titleSecondaryActions=[],s.fillInActionBarActions(this.titleMenu,{shouldForwardArgs:!0},{primary:this.titleActions,secondary:this.titleSecondaryActions}),this._onDidChangeTitle.fire()},e.prototype.getTitleActions=function(){return this.titleActions},e.prototype.getTitleSecondaryActions=function(){return this.titleSecondaryActions},e.prototype.getResourceGroupActions=function(e){return this.getActions(o.MenuId.SCMResourceGroupContext,e).primary},e.prototype.getResourceGroupContextActions=function(e){return this.getActions(o.MenuId.SCMResourceGroupContext,e).secondary},e.prototype.getResourceActions=function(e){return this.getActions(o.MenuId.SCMResourceContext,e).primary},
e.prototype.getResourceContextActions=function(e){return this.getActions(o.MenuId.SCMResourceContext,e).secondary},e.prototype.getActions=function(e,t){var n=this.contextKeyService.createScoped();n.createKey("scmResourceGroup",c.getSCMResourceContextKey(t));var i=this.menuService.createMenu(e,n),r={primary:[],secondary:[]};return s.fillInContextMenuActions(i,{shouldForwardArgs:!0},r,this.contextMenuService,function(e){return/^inline/.test(e)}),i.dispose(),n.dispose(),r},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},e=a([l(1,r.IContextKeyService),l(2,o.IMenuService),l(3,u.IContextMenuService)],e)}();t.SCMMenus=d}),define(e[1151],t([1,0,700,8,92,246,7,12,68,185,15]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,n,r,o,s){void 0===r&&(r=Object.create(null));var a=e.call(this)||this;return a.contextViewProvider=n,a.themeService=o,a.contextKeyService=s,a._onSubmit=a._register(new c.Emitter),
a.onSubmit=a._onSubmit.event,a._onCancel=a._register(new c.Emitter),a.onCancel=a._onCancel.event,a.onOptionChange=null,a.width=r.width||100,a.placeholder=r.placeholder||"",a.ariaLabel=r.ariaLabel||i.localize(0,null),a.domNode=null,a.inputBox=null,a.render(r),t.appendChild(a.domNode),a}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.inputFocusTracker&&this.inputFocusTracker.dispose()},t.prototype.on=function(e,n){switch(e){case"keydown":case"keyup":this._register(r.addDisposableListener(this.inputBox.inputElement,e,n));break;case t.OPTION_CHANGE:this.onOptionChange=n}return this},t.prototype.setWidth=function(e){this.width=e,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},
t.prototype.inputHasFocus=function(){return this.inputBox.hasFocus()},t.prototype.setInputWidth=function(){this.inputBox.width=this.width-this.getSubcontrolsWidth()-2},t.prototype.getSubcontrolsWidth=function(){return 0},t.prototype.getHistory=function(){return this.inputBox.getHistory()},t.prototype.clearHistory=function(){this.inputBox.clearHistory()},t.prototype.onSearchSubmit=function(){this.inputBox.addToHistory()},t.prototype.showNextTerm=function(){this.inputBox.showNextValue()},t.prototype.showPreviousTerm=function(){this.inputBox.showPreviousValue()},t.prototype.render=function(e){var t=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",r.addClass(this.domNode,"monaco-findInput"),this.inputBox=new h.ContextScopedHistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.ariaLabel||"",validationOptions:{validation:null},history:e.history||[]},this.contextKeyService),
this._register(d.attachInputBoxStyler(this.inputBox,this.themeService)),this.inputFocusTracker=r.trackFocus(this.inputBox.inputElement),this.onkeyup(this.inputBox.inputElement,function(e){return t.onInputKeyUp(e)});var n=document.createElement("div");n.className="controls",this.renderSubcontrols(n),this.domNode.appendChild(n),this.setInputWidth()},t.prototype.renderSubcontrols=function(e){},t.prototype.onInputKeyUp=function(e){switch(e.keyCode){case 3:return void this._onSubmit.fire();case 9:return void this._onCancel.fire();default:return}},t.OPTION_CHANGE="optionChange",t=a([l(3,u.IThemeService),l(4,p.IContextKeyService)],t)}(o.Widget);t.PatternInputWidget=f;var g=function(e){function t(t,n,i,r,o){return void 0===i&&(i=Object.create(null)),e.call(this,t,n,i,r,o)||this}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.useExcludesAndIgnoreFilesBox.dispose()},t.prototype.useExcludesAndIgnoreFiles=function(){return this.useExcludesAndIgnoreFilesBox.checked},
t.prototype.setUseExcludesAndIgnoreFiles=function(e){this.useExcludesAndIgnoreFilesBox.checked=e},t.prototype.getSubcontrolsWidth=function(){return e.prototype.getSubcontrolsWidth.call(this)+this.useExcludesAndIgnoreFilesBox.width()},t.prototype.renderSubcontrols=function(t){var n=this;this.useExcludesAndIgnoreFilesBox=this._register(new s.Checkbox({actionClassName:"useExcludesAndIgnoreFiles",title:i.localize(1,null),isChecked:!0})),this._register(this.useExcludesAndIgnoreFilesBox.onChange(function(e){n.onOptionChange(null),e||n.inputBox.focus()})),this._register(d.attachCheckboxStyler(this.useExcludesAndIgnoreFilesBox,this.themeService)),t.appendChild(this.useExcludesAndIgnoreFilesBox.domNode),e.prototype.renderSubcontrols.call(this,t)},t=a([l(3,u.IThemeService),l(4,p.IContextKeyService)],t)}(f);t.ExcludePatternInputWidget=g}),define(e[231],t([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindInFilesActionId="workbench.action.findInFiles",
t.FocusActiveEditorCommandId="search.action.focusActiveEditor",t.FocusSearchFromResults="search.action.focusSearchFromResults",t.OpenMatchToSide="search.action.openResultToSide",t.CancelActionId="search.action.cancel",t.RemoveActionId="search.action.remove",t.CopyPathCommandId="search.action.copyPath",t.CopyMatchCommandId="search.action.copyMatch",t.CopyAllCommandId="search.action.copyAll",t.ClearSearchHistoryCommandId="search.action.clearHistory",t.ReplaceActionId="search.action.replace",t.ReplaceAllInFileActionId="search.action.replaceAllInFile",t.ReplaceAllInFolderActionId="search.action.replaceAllInFolder",t.CloseReplaceWidgetActionId="closeReplaceInFilesWidget",t.ToggleCaseSensitiveCommandId="toggleSearchCaseSensitive",t.ToggleWholeWordCommandId="toggleSearchWholeWord",t.ToggleRegexCommandId="toggleSearchRegex",t.ToggleSearchViewPositionCommandId="search.action.toggleSearchViewPosition",t.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),
t.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),t.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),t.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),t.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),t.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),t.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),t.MatchFocusKey=new n.RawContextKey("matchFocus",!1)}),define(e[390],t([1,0,706,20,24,113,14,148,25,10,62,27,140,17,36]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";function m(e){
return e.length?e.reduce(function(e,t){return e[t]=!0,e},Object.create(null)):void 0}function y(e){return c.splitGlobAware(e,",").map(function(e){return e.trim()}).filter(function(e){return!!e.length})}Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(e,t,n){this.configurationService=e,this.workspaceContextService=t,this.environmentService=n}return e.prototype.text=function(e,t,n){return this.query(f.QueryType.Text,e,t,n)},e.prototype.file=function(e,t){return this.query(f.QueryType.File,null,e,t)},e.prototype.query=function(e,t,n,i){var o=this;void 0===i&&(i={});var s=this.parseSearchPaths(i.includePattern),a=s.searchPaths,c=s.pattern,l=this.parseExcludePattern(i.excludePattern),u=n&&n.map(function(t){return o.getFolderQueryForRoot(t,e===f.QueryType.File,i)});if(a&&a.length){var d=u&&this.mergeExcludesFromFolderQueries(u);u=a.map(function(e){return o.getFolderQueryForSearchPath(e)}),d&&(l=r.mixin(l||Object.create(null),d))}var h=!n||n.every(function(e){
return o.configurationService.getValue({resource:e}).search.useIgnoreFiles}),p=!n||n.every(function(e){return o.configurationService.getValue({resource:e}).search.useRipgrep}),g=!this.configurationService.getValue().search.followSymlinks;t&&this.resolveSmartCaseToCaseSensitive(t);var v={type:e,folderQueries:u,usingSearchPaths:!(!a||!a.length),extraFileResources:i.extraFileResources,filePattern:i.filePattern,excludePattern:l,includePattern:c,maxResults:i.maxResults,sortByScore:i.sortByScore,cacheKey:i.cacheKey,contentPattern:t,useRipgrep:p,disregardIgnoreFiles:i.disregardIgnoreFiles||!h,disregardExcludeSettings:i.disregardExcludeSettings,ignoreSymlinks:g},m=i.extraFileResources&&i.extraFileResources.filter(function(e){return f.pathIncludedInQuery(v,e.fsPath)});return v.extraFileResources=m&&m.length?m:void 0,v},e.prototype.resolveSmartCaseToCaseSensitive=function(e){
e.isSmartCase&&(e.isRegExp?s.containsUppercaseCharacter(e.pattern,!0)&&(e.isCaseSensitive=!0):s.containsUppercaseCharacter(e.pattern)&&(e.isCaseSensitive=!0))},e.prototype.parseSearchPaths=function(e){var t=this,n=y(e).map(function(e){return h.untildify(e,t.environmentService.userHome)}),r=o.groupBy(n,function(e){return function(e){return u.isAbsolute(e)||/^\.\.?[\/\\]/.test(e)}(e)?"searchPaths":"exprSegments"}),s=(r.exprSegments||[]).map(function(e){return"."===e[0]&&(e="*"+e),function(e){return["**/"+e+"/**","**/"+e].map(function(e){return e.replace(/\*\*\/\*\*/g,"**")})}(e)}),a=i.flatten(s),c={},l=this.expandSearchPathPatterns(r.searchPaths);l&&l.length&&(c.searchPaths=l);var d=m(a);return d&&(c.pattern=d),c},e.prototype.parseExcludePattern=function(e){var t=this.parseSearchPaths(e),n=c.getEmptyExpression();return t.pattern&&(n=r.mixin(n,t.pattern)),t.searchPaths&&t.searchPaths.forEach(function(e){var t=e.searchPath.fsPath,i=e.pattern?u.join(t,e.pattern):t;n[i]=!0}),Object.keys(n).length?n:void 0},
e.prototype.parseIncludeExcludePattern=function(e){var t=o.groupBy(y(e),function(e){return s.startsWith(e,"!")?"excludePattern":"includePattern"}),n={};return t.includePattern&&(n.includePattern=t.includePattern.join(", ")),t.excludePattern&&(n.excludePattern=t.excludePattern.map(function(e){return s.ltrim(e,"!")}).join(", ")),n},e.prototype.mergeExcludesFromFolderQueries=function(e){var t=this,n=e.reduce(function(e,n){return n.excludePattern&&r.mixin(e,t.getAbsoluteIExpression(n.excludePattern,n.folder.fsPath)),e},Object.create(null));return Object.keys(n).length?n:void 0},e.prototype.getAbsoluteIExpression=function(e,t){return Object.keys(e).reduce(function(n,i){if(e[i]&&!u.isAbsolute(i)){n[u.join(t,i)]=e[i]}return n},Object.create(null))},e.prototype.getExcludesForFolder=function(e,t){return t.disregardExcludeSettings?void 0:f.getExcludes(e)},e.prototype.expandSearchPathPatterns=function(e){var t=this;if(this.workspaceContextService.getWorkbenchState()===p.WorkbenchState.EMPTY||!e||!e.length)return[]
;return i.flatten(e.map(function(e){var n=function(e){var t=e.match(/[\*\{\}\(\)\[\]\?]/);if(t){var n=t.index,i=e.substr(0,n).match(/[/|\\][^/\\]*$/);if(i){var r=e.substr(0,i.index);return r.match(/[/\\]/)||(r+="/"),{pathPortion:r,globPortion:e.substr(i.index+1)}}}return{pathPortion:e}}(e),i=n.pathPortion,r=n.globPortion;return t.expandAbsoluteSearchPaths(i).map(function(e){return{searchPath:e,pattern:r}})})).filter(i.uniqueFilter(function(e){return e.searchPath.toString()}))},e.prototype.expandAbsoluteSearchPaths=function(e){if(u.isAbsolute(e))return[d.default.file(u.normalize(e))];if(this.workspaceContextService.getWorkbenchState()===p.WorkbenchState.FOLDER){var t=this.workspaceContextService.getWorkspace().folders[0].uri;return[t.with({path:u.normalize(u.join(t.path,e))})]}if("./"===e)return[];var i=e.match(/\.[\/\\]([^\/\\]+)([\/\\].+)?/);if(i){var r=i[1],o=this.workspaceContextService.getWorkspace().folders.filter(function(e){return u.basename(e.uri.fsPath)===r||e.name===r})
;if(o.length)return o.map(function(e){return i[2]?e.uri.with({path:u.normalize(u.join(e.uri.path,i[2]))}):e.uri});var s=n.localize(0,null,r);throw new Error(s)}return[]},e.prototype.getFolderQueryForSearchPath=function(e){var t=e.searchPath,n=this.configurationService.getValue({resource:t});return{folder:t,includePattern:e.pattern&&m([e.pattern]),fileEncoding:n.files&&n.files.encoding}},e.prototype.getFolderQueryForRoot=function(e,t,n){var i=this.configurationService.getValue({resource:e});return{folder:e,excludePattern:this.getExcludesForFolder(i,n),fileEncoding:i.files&&i.files.encoding,disregardIgnoreFiles:t?!i.search.useIgnoreFiles:void 0}},e=a([l(0,g.IConfigurationService),l(1,p.IWorkspaceContextService),l(2,v.IEnvironmentService)],e)}();t.QueryBuilder=b}),define(e[232],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IReplaceService=n.createDecorator("replaceService")}),define(e[233],t([1,0,4,9,40]),function(e,t,n,i,r){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){var t=[];e.register=function(e){return e&&t.push(e),{dispose:function(){if(e){var n=t.indexOf(e);n>=0&&(t.splice(n,1),e=void 0)}}}},e.all=function(){return t.slice(0)}}(o=t.WorkspaceSymbolProviderRegistry||(t.WorkspaceSymbolProviderRegistry={})),t.getWorkspaceSymbols=function(e){var t=[],r=o.all().map(function(n){return n.provideWorkspaceSymbols(e).then(function(e){Array.isArray(e)&&t.push([n,e])},i.onUnexpectedError)});return n.TPromise.join(r).then(function(e){return t})},t.getOutOfWorkspaceEditorResources=function(e,t){var n=[];return e.editors.forEach(function(e){var i=r.toResource(e,{supportSideBySide:!0});i&&!t.isInsideWorkspace(i)&&n.push(i)}),n}}),define(e[234],t([1,0,24,14,9,18,5,10,50,7,140,912,28,19,57,6,47,232,66,26,12,62]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function e(e,t,n,i,r){this._parent=e,this._lineText=t,
this._range=new v.Range(1+n,1+i,1+n,1+i+r),this._id=this._parent.id()+">"+n+">"+i+this.getMatchString()}return e.prototype.id=function(){return this._id},e.prototype.parent=function(){return this._parent},e.prototype.text=function(){return this._lineText},e.prototype.range=function(){return this._range},e.prototype.preview=function(){var e=this._lineText.substring(0,this._range.startColumn-1),t=this.getMatchString(),n=this._lineText.substring(this._range.endColumn-1,Math.min(this._range.endColumn+150,this._lineText.length));return e=r.lcut(e,26),{before:e,inside:t,after:n}},Object.defineProperty(e.prototype,"replaceString",{get:function(){var e=this.parent().parent().searchModel,t=this.getMatchString(),n=e.replacePattern.getReplaceString(t);return null===n&&(n=e.replacePattern.getReplaceString(t+this._lineText.substring(this._range.endColumn-1))),null===n&&(n=e.replacePattern.pattern),n},enumerable:!0,configurable:!0}),e.prototype.getMatchString=function(){
return this._lineText.substring(this._range.startColumn-1,this._range.endColumn-1)},e}();t.Match=I;var T=function(e){function t(t,n,i,r,o,a){var c=e.call(this)||this;return c._query=t,c._maxResults=n,c._parent=i,c.rawMatch=r,c.modelService=o,c.replaceService=a,c._onChange=c._register(new h.Emitter),c.onChange=c._onChange.event,c._onDispose=c._register(new h.Emitter),c.onDispose=c._onDispose.event,c._modelDecorations=[],c._resource=c.rawMatch.resource,c._matches=new Map,c._removedMatches=new Set,c._updateScheduler=new s.RunOnceScheduler(c.updateMatchesForModel.bind(c),250),c.createMatches(),c.registerListeners(),c}return n(t,e),t.getDecorationOption=function(e){return e?t._CURRENT_FIND_MATCH:t._FIND_MATCH},t.prototype.createMatches=function(){var e=this,t=this.modelService.getModel(this._resource);t?(this.bindModel(t),this.updateMatchesForModel()):this.rawMatch.lineMatches.forEach(function(t){t.offsetAndLengths.forEach(function(n){var i=new I(e,t.preview,t.lineNumber,n[0],n[1]);e.add(i)})})},
t.prototype.registerListeners=function(){var e=this;this._register(this.modelService.onModelAdded(function(t){t.uri.toString()===e._resource.toString()&&e.bindModel(t)}))},t.prototype.bindModel=function(e){var t=this;this._model=e,this._modelListener=this._model.onDidChangeContent(function(){t._updateScheduler.schedule()}),this._model.onWillDispose(function(){return t.onModelWillDispose()}),this.updateHighlights()},t.prototype.onModelWillDispose=function(){this.updateMatchesForModel(),this.unbindModel()},t.prototype.unbindModel=function(){this._model&&(this._updateScheduler.cancel(),this._model.deltaDecorations(this._modelDecorations,[]),this._model=null,this._modelListener.dispose())},t.prototype.updateMatchesForModel=function(){if(this._model){this._matches=new Map;var e=this._model.findMatches(this._query.pattern,this._model.getFullModelRange(),this._query.isRegExp,this._query.isCaseSensitive,this._query.isWordMatch?this._query.wordSeparators:null,!1,this._maxResults);this.updateMatches(e,!0)}},
t.prototype.updatesMatchesForLineAfterReplace=function(e,t){var n=this,i={startLineNumber:e,startColumn:this._model.getLineMinColumn(e),endLineNumber:e,endColumn:this._model.getLineMaxColumn(e)};d.values(this._matches).filter(function(t){return t.range().startLineNumber===e}).forEach(function(e){return n._matches.delete(e.id())});var r=this._model.findMatches(this._query.pattern,i,this._query.isRegExp,this._query.isCaseSensitive,this._query.isWordMatch?this._query.wordSeparators:null,!1,this._maxResults);this.updateMatches(r,t)},t.prototype.updateMatches=function(e,t){var n=this;e.forEach(function(e){var t=new I(n,n._model.getLineContent(e.range.startLineNumber),e.range.startLineNumber-1,e.range.startColumn-1,e.range.endColumn-e.range.startColumn);n._removedMatches.has(t.id())||(n.add(t),n.isMatchSelected(t)&&(n._selectedMatch=t))}),this._onChange.fire(t),this.updateHighlights()},t.prototype.updateHighlights=function(){var e=this
;this._model&&(this.parent().showHighlights?this._modelDecorations=this._model.deltaDecorations(this._modelDecorations,this.matches().map(function(n){return{range:n.range(),options:t.getDecorationOption(e.isMatchSelected(n))}})):this._modelDecorations=this._model.deltaDecorations(this._modelDecorations,[]))},t.prototype.id=function(){return this.resource().toString()},t.prototype.parent=function(){return this._parent},t.prototype.matches=function(){return d.values(this._matches)},t.prototype.remove=function(e){this.removeMatch(e),this._removedMatches.add(e.id()),this._onChange.fire(!1)},t.prototype.replace=function(e){var t=this;return this.replaceService.replace(e).then(function(){return t.updatesMatchesForLineAfterReplace(e.range().startLineNumber,!1)})},t.prototype.setSelectedMatch=function(e){if(e){if(!this._matches.has(e.id()))return;if(this.isMatchSelected(e))return}this._selectedMatch=e,this.updateHighlights()},t.prototype.getSelectedMatch=function(){return this._selectedMatch},
t.prototype.isMatchSelected=function(e){return this._selectedMatch&&this._selectedMatch.id()===e.id()},t.prototype.count=function(){return this.matches().length},t.prototype.resource=function(){return this._resource},t.prototype.name=function(){return w.getBaseLabel(this.resource())},t.prototype.add=function(e,t){this._matches.set(e.id(),e),t&&this._onChange.fire(!0)},t.prototype.removeMatch=function(e){this._matches.delete(e.id()),this.isMatchSelected(e)?this.setSelectedMatch(null):this.updateHighlights()},t.prototype.dispose=function(){this.setSelectedMatch(null),this.unbindModel(),this._onDispose.fire(),e.prototype.dispose.call(this)},t._CURRENT_FIND_MATCH=_.ModelDecorationOptions.register({stickiness:m.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:"currentFindMatch",overviewRuler:{color:E.themeColorFromId(C.overviewRulerFindMatchForeground),darkColor:E.themeColorFromId(C.overviewRulerFindMatchForeground),position:m.OverviewRulerLane.Center}}),
t._FIND_MATCH=_.ModelDecorationOptions.register({stickiness:m.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"findMatch",overviewRuler:{color:E.themeColorFromId(C.overviewRulerFindMatchForeground),darkColor:E.themeColorFromId(C.overviewRulerFindMatchForeground),position:m.OverviewRulerLane.Center}}),t=a([l(4,b.IModelService),l(5,S.IReplaceService)],t)}(c.Disposable);t.FileMatch=T;var x=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this)||this;return l._resource=t,l._id=n,l._index=i,l._query=r,l._parent=o,l._searchModel=s,l.replaceService=a,l.instantiationService=c,l._onChange=l._register(new h.Emitter),l.onChange=l._onChange.event,l._onDispose=l._register(new h.Emitter),l.onDispose=l._onDispose.event,l._replacingAll=!1,l._fileMatches=new d.ResourceMap,l._unDisposedFileMatches=new d.ResourceMap,l}return n(t,e),Object.defineProperty(t.prototype,"searchModel",{get:function(){return this._searchModel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showHighlights",{
get:function(){return this._parent.showHighlights},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replacingAll",{set:function(e){this._replacingAll=e},enumerable:!0,configurable:!0}),t.prototype.id=function(){return this._id},t.prototype.resource=function(){return this._resource},t.prototype.index=function(){return this._index},t.prototype.name=function(){return w.getBaseLabel(this.resource())},t.prototype.parent=function(){return this._parent},t.prototype.hasRoot=function(){return""!==this._resource.fsPath},t.prototype.add=function(e,t){var n=this,i=[];e.forEach(function(e){n._fileMatches.has(e.resource)&&n._fileMatches.get(e.resource).dispose();var t=n.instantiationService.createInstance(T,n._query.contentPattern,n._query.maxResults,n,e);n.doAdd(t),i.push(t);var r=t.onChange(function(){return n.onFileChange(t)});t.onDispose(function(){return r.dispose()})}),!t&&i.length&&this._onChange.fire({elements:i,added:!0})},t.prototype.clear=function(){var e=this.matches();this.disposeMatches(),
this._onChange.fire({elements:e,removed:!0})},t.prototype.remove=function(e){this.doRemove(e)},t.prototype.replace=function(e){var t=this;return this.replaceService.replace([e]).then(function(){t.doRemove(e,!1,!0)})},t.prototype.replaceAll=function(){var e=this,t=this.matches();return this.replaceService.replace(t).then(function(){t.forEach(function(t){return e.doRemove(t,!1,!0)})})},t.prototype.matches=function(){return this._fileMatches.values()},t.prototype.isEmpty=function(){return 0===this.fileCount()},t.prototype.fileCount=function(){return this._fileMatches.size},t.prototype.count=function(){return this.matches().reduce(function(e,t){return e+t.count()},0)},t.prototype.onFileChange=function(e){var t=!1,n=!1;this._fileMatches.has(e.resource())||(this.doAdd(e),t=!0),0===e.count()&&(this.doRemove(e,!1,!1),t=!1,n=!0),this._replacingAll||this._onChange.fire({elements:[e],added:t,removed:n})},t.prototype.doAdd=function(e){this._fileMatches.set(e.resource(),e),
this._unDisposedFileMatches.has(e.resource())&&this._unDisposedFileMatches.delete(e.resource())},t.prototype.doRemove=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!0),this._fileMatches.delete(e.resource()),t?e.dispose():this._unDisposedFileMatches.set(e.resource(),e),n&&this._onChange.fire({elements:[e],removed:!0})},t.prototype.disposeMatches=function(){this._fileMatches.values().forEach(function(e){return e.dispose()}),this._unDisposedFileMatches.values().forEach(function(e){return e.dispose()}),this._fileMatches.clear(),this._unDisposedFileMatches.clear()},t.prototype.dispose=function(){this.disposeMatches(),this._onDispose.fire(),e.prototype.dispose.call(this)},t=a([l(6,S.IReplaceService),l(7,y.IInstantiationService)],t)}(c.Disposable);t.FolderMatch=x,t.searchMatchComparer=function(e,t){
return e instanceof x&&t instanceof x?e.index()-t.index():e instanceof T&&t instanceof T?e.resource().fsPath.localeCompare(t.resource().fsPath)||e.name().localeCompare(t.name()):e instanceof I&&t instanceof I?v.Range.compareRangesUsingStarts(e.range(),t.range()):void 0};var k=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o._searchModel=t,o.replaceService=n,o.telemetryService=i,o.instantiationService=r,o._onChange=o._register(new h.Emitter),o.onChange=o._onChange.event,o._folderMatches=[],o._folderMatchesMap=d.TernarySearchTree.forPaths(),o._rangeHighlightDecorations=o.instantiationService.createInstance(L),o}return n(t,e),Object.defineProperty(t.prototype,"query",{set:function(e){var t=this;this.clear();var n=u.default.parse("");this._folderMatches=(e.folderQueries||[]).map(function(e){return e.folder}).concat([n]).map(function(n,i){var r=n.toString()||"otherFiles",o=t.instantiationService.createInstance(x,n,r,i,e,t,t._searchModel),s=o.onChange(function(e){return t._onChange.fire(e)})
;return o.onDispose(function(){return s.dispose()}),o}),this._folderMatches.slice(0,this.folderMatches.length-1).forEach(function(e){return t._folderMatchesMap.set(e.resource().fsPath,e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchModel",{get:function(){return this._searchModel},enumerable:!0,configurable:!0}),t.prototype.add=function(e,t){var n=this;void 0===t&&(t=!1);var i=new d.ResourceMap;this._folderMatches.forEach(function(e){return i.set(e.resource(),[])}),e.forEach(function(e){var t=n.getFolderMatch(e.resource);t&&i.get(t.resource()).push(e)}),i.forEach(function(e){if(e.length){var i=n.getFolderMatch(e[0].resource);i&&i.add(e,t)}})},t.prototype.clear=function(){this._folderMatches.forEach(function(e){return e.clear()}),this.disposeMatches()},t.prototype.remove=function(e){e instanceof T?this.getFolderMatch(e.resource()).remove(e):e.clear()},t.prototype.replace=function(e){return this.getFolderMatch(e.resource()).replace(e)},t.prototype.replaceAll=function(e){var t=this
;this.replacingAll=!0;var n=this.replaceService.replace(this.matches(),e);return h.stopwatch(h.fromPromise(n))(function(e){return t.telemetryService.publicLog("replaceAll.started",{duration:e})}),n.then(function(){t.replacingAll=!1,t.clear()},function(){t.replacingAll=!1})},t.prototype.folderMatches=function(){return this._folderMatches.concat()},t.prototype.matches=function(){var e=[];return this._folderMatches.forEach(function(t){e.push(t.matches())}),[].concat.apply([],e)},t.prototype.isEmpty=function(){return this._folderMatches.every(function(e){return e.isEmpty()})},t.prototype.fileCount=function(){return this.folderMatches().reduce(function(e,t){return e+t.fileCount()},0)},t.prototype.count=function(){return this.matches().reduce(function(e,t){return e+t.count()},0)},Object.defineProperty(t.prototype,"showHighlights",{get:function(){return this._showHighlights},enumerable:!0,configurable:!0}),t.prototype.toggleHighlights=function(e){if(this._showHighlights!==e){this._showHighlights=e;var t=null
;this.matches().forEach(function(e){e.updateHighlights(),t||(t=e.getSelectedMatch())}),this._showHighlights&&t?this._rangeHighlightDecorations.highlightRange(t.parent().resource(),t.range()):this._rangeHighlightDecorations.removeHighlightRange()}},Object.defineProperty(t.prototype,"rangeHighlightDecorations",{get:function(){return this._rangeHighlightDecorations},enumerable:!0,configurable:!0}),t.prototype.getFolderMatch=function(e){var t=this._folderMatchesMap.findSubstr(e.fsPath);return t||this.otherFiles},Object.defineProperty(t.prototype,"otherFiles",{get:function(){return this._folderMatches[this._folderMatches.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replacingAll",{set:function(e){this._folderMatches.forEach(function(t){t.replacingAll=e})},enumerable:!0,configurable:!0}),t.prototype.disposeMatches=function(){this._folderMatches.forEach(function(e){return e.dispose()}),this._folderMatches=[],this._folderMatchesMap=d.TernarySearchTree.forPaths(),
this._rangeHighlightDecorations.removeHighlightRange()},t.prototype.dispose=function(){this.disposeMatches(),this._rangeHighlightDecorations.dispose(),e.prototype.dispose.call(this)},t=a([l(1,S.IReplaceService),l(2,g.ITelemetryService),l(3,y.IInstantiationService)],t)}(c.Disposable);t.SearchResult=k;var D=function(e){function t(t,n,i){var r=e.call(this)||this;return r.searchService=t,r.telemetryService=n,r.instantiationService=i,r._searchQuery=null,r._replaceActive=!1,r._replaceString=null,r._replacePattern=null,r._onReplaceTermChanged=r._register(new h.Emitter),r.onReplaceTermChanged=r._onReplaceTermChanged.event,r._searchResult=r.instantiationService.createInstance(k,r),r}return n(t,e),t.prototype.isReplaceActive=function(){return this._replaceActive},Object.defineProperty(t.prototype,"replaceActive",{set:function(e){this._replaceActive=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"replacePattern",{get:function(){return this._replacePattern},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"replaceString",{get:function(){return this._replaceString},set:function(e){this._replaceString=e,this._searchQuery&&(this._replacePattern=new f.ReplacePattern(e,this._searchQuery.contentPattern)),this._onReplaceTermChanged.fire()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchResult",{get:function(){return this._searchResult},enumerable:!0,configurable:!0}),t.prototype.search=function(e){var t=this;this.cancelSearch(),this._searchQuery=e,this.currentRequest=this.searchService.search(this._searchQuery),this.searchResult.clear(),this._searchResult.query=this._searchQuery,this._replacePattern=new f.ReplacePattern(this._replaceString,this._searchQuery.contentPattern);var n=h.fromPromise(this.currentRequest),i=new h.Emitter,r=h.anyEvent(n,i.event);h.stopwatch(r)(function(e){return t.telemetryService.publicLog("searchResultsFirstRender",{duration:e})});var o=h.stopwatch(n),s=Date.now();o(function(e){
return t.telemetryService.publicLog("searchResultsFinished",{duration:e})});var a=this.currentRequest;return this.currentRequest.then(function(e){return t.onSearchCompleted(e,Date.now()-s)},function(e){return t.onSearchError(e,Date.now()-s)},function(e){i.fire(),t.onSearchProgress(e)}),a},t.prototype.onSearchCompleted=function(e,t){this.currentRequest=null;var n=i.assign({},this._searchQuery.contentPattern);return delete n.pattern,this.telemetryService.publicLog("searchResultsShown",{count:this._searchResult.count(),fileCount:this._searchResult.fileCount(),options:n,duration:t,useRipgrep:this._searchQuery.useRipgrep}),e},t.prototype.onSearchError=function(e,t){o.isPromiseCanceledError(e)&&this.onSearchCompleted(null,t)},t.prototype.onSearchProgress=function(e){e.resource&&this._searchResult.add([e],!0)},t.prototype.cancelSearch=function(){return!!this.currentRequest&&(this.currentRequest.cancel(),this.currentRequest=null,!0)},t.prototype.dispose=function(){this.cancelSearch(),this.searchResult.dispose(),
e.prototype.dispose.call(this)},t=a([l(0,p.ISearchService),l(1,g.ITelemetryService),l(2,y.IInstantiationService)],t)}(c.Disposable);t.SearchModel=D;var A=function(){function e(e){this.instantiationService=e}return Object.defineProperty(e.prototype,"searchModel",{get:function(){return this._searchModel||(this._searchModel=this.instantiationService.createInstance(D)),this._searchModel},enumerable:!0,configurable:!0}),e=a([l(0,y.IInstantiationService)],e)}();t.SearchWorkbenchService=A,t.ISearchWorkbenchService=y.createDecorator("searchWorkbenchService");var L=function(){function e(e){this._modelService=e,this._decorationId=null,this._model=null,this._modelDisposables=[]}return e.prototype.removeHighlightRange=function(){this._model&&this._decorationId&&this._model.deltaDecorations([this._decorationId],[]),this._decorationId=null},e.prototype.highlightRange=function(e,t,n){void 0===n&&(n=0);var i;(i=u.default.isUri(e)?this._modelService.getModel(e):e)&&this.doHighlightRange(i,t)},
e.prototype.doHighlightRange=function(t,n){this.removeHighlightRange(),this._decorationId=t.deltaDecorations([],[{range:n,options:e._RANGE_HIGHLIGHT_DECORATION}])[0],this.setModel(t)},e.prototype.setModel=function(e){var t=this;this._model!==e&&(this.disposeModelListeners(),this._model=e,this._modelDisposables.push(this._model.onDidChangeDecorations(function(e){t.disposeModelListeners(),t.removeHighlightRange(),t._model=null})),this._modelDisposables.push(this._model.onWillDispose(function(){t.disposeModelListeners(),t.removeHighlightRange(),t._model=null})))},e.prototype.disposeModelListeners=function(){this._modelDisposables.forEach(function(e){return e.dispose()}),this._modelDisposables=[]},e.prototype.dispose=function(){this._model&&(this.removeHighlightRange(),this.disposeModelListeners(),this._model=null)},e._RANGE_HIGHLIGHT_DECORATION=_.ModelDecorationOptions.register({stickiness:m.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"rangeHighlight",isWholeLine:!0}),
e=a([l(0,b.IModelService)],e)}();t.RangeHighlightDecorations=L}),define(e[235],t([1,0,16,120,710,6]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISnippetsService=o.createDecorator("snippetService");var s={id:"vscode://schemas/snippets",allowComments:!0,defaultSnippets:[{label:r.localize(0,null),body:{"${1:snippetName}":{prefix:"${2:prefix}",body:"${3:snippet}",description:"${4:description}"}}}],type:"object",description:r.localize(1,null),additionalProperties:{type:"object",required:["prefix","body"],properties:{prefix:{description:r.localize(2,null),type:"string"},body:{description:r.localize(3,null),type:["string","array"],items:{type:"string"}},description:{description:r.localize(4,null),type:"string"}},additionalProperties:!1}},a={id:"vscode://schemas/global-snippets",allowComments:!0,defaultSnippets:[{label:r.localize(5,null),body:{"${1:snippetName}":{scope:"${2:scope}",prefix:"${3:prefix}",body:"${4:snippet}",description:"${5:description}"}}}],type:"object",
description:r.localize(6,null),additionalProperties:{type:"object",required:["prefix","body"],properties:{prefix:{description:r.localize(7,null),type:"string"},scope:{description:r.localize(8,null),type:"string"},body:{description:r.localize(9,null),type:["string","array"],items:{type:"string"}},description:{description:r.localize(10,null),type:"string"}},additionalProperties:!1}},c=n.Registry.as(i.Extensions.JSONContribution);c.registerSchema("vscode://schemas/snippets",s),c.registerSchema("vscode://schemas/global-snippets",a)}),define(e[1158],t([1,0,708,29,87,36,54,64,42,59,31,18,88,10,235,50]),function(e,t,n,i,r,a,c,l,u,d,h,p,f,g,v,m){"use strict";var y=this;Object.defineProperty(t,"__esModule",{value:!0});var b,S="workbench.action.openSnippets";!function(e){e.is=function(e){return e&&"string"==typeof e.filepath}}(b||(b={})),i.CommandsRegistry.registerCommand(S,function(e){return o(y,void 0,void 0,function(){var t,i,h,y,S,_,C,E,w,I,T;return s(this,function(x){switch(x.label){case 0:
return t=e.get(v.ISnippetsService),i=e.get(l.IQuickOpenService),h=e.get(f.IOpenerService),y=e.get(u.IWindowService),S=e.get(c.IModeService),_=e.get(a.IEnvironmentService),[4,function(e,t,i){return o(this,void 0,void 0,function(){var r,o,a,c,l,u,h,p,f,g,v,y,b,S,_,C,E,w,I;return s(this,function(s){switch(s.label){case 0:return r=[],o=[],a=new Set,c=0,[4,e.getSnippetFiles()];case 1:l=s.sent(),s.label=2;case 2:return c<l.length?(u=l[c]).isUserSnippets?u.isGlobalSnippets?[4,u.load()]:[3,4]:[3,5]:[3,6];case 3:s.sent(),h=new Set;e:for(p=0,f=u.data;p<f.length;p++)for(g=f[p],v=0,y=g.scopes;v<y.length;v++){if(b=y[v],S=i.getLanguageName(b),h.size>=4){h.add(S+"...");break e}h.add(S)}return r.push({label:d.basename(u.location.fsPath),filepath:u.location.fsPath,description:0===h.size?n.localize(0,null):n.localize(1,null,m.values(h).join(", "))}),[3,5];case 4:w=d.basename(u.location.fsPath,".json"),r.push({label:d.basename(u.location.fsPath),description:"("+i.getLanguageName(w)+")",filepath:u.location.fsPath}),a.add(w),
s.label=5;case 5:return c++,[3,2];case 6:for(_=d.join(t.appSettingsHome,"snippets"),C=0,E=i.getRegisteredModes();C<E.length;C++)w=E[C],(I=i.getLanguageName(w))&&!a.has(w)&&o.push({label:w,description:"("+I+")",filepath:d.join(_,w+".json"),hint:!0});return r.sort(function(e,t){var n=d.extname(e.filepath);return n===d.extname(t.filepath)?e.label.localeCompare(t.label):".code-snippets"===n?-1:1}),o.sort(function(e,t){return e.label.localeCompare(t.label)}),[2,{existing:r,future:o}]}})})}(t,_,S)];case 1:return C=x.sent(),E=C.existing,w=C.future,I={label:n.localize(2,null)},E.length>0?(E[0].separator={label:n.localize(3,null)},I.separator={border:!0,label:n.localize(4,null)}):I.separator={label:n.localize(5,null)},[4,i.pick([].concat(E,I,w),{placeHolder:n.localize(6,null),matchOnDescription:!0})];case 2:return(T=x.sent())!==I?[3,3]:[2,function(e,t,n){return o(this,void 0,void 0,function(){var i,o;return s(this,function(s){switch(s.label){case 0:return[4,p.timeout(100)];case 1:return s.sent(),
i=d.join(e.appSettingsHome,"snippets"),[4,t.showSaveDialog({defaultPath:i,filters:[{name:"Code Snippets",extensions:["code-snippets"]}]})];case 2:
return(o=s.sent())&&d.dirname(o)===i?[4,r.writeFile(o,["{","\t// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and ","\t// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope ","\t// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is ","\t// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: ","\t// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. ","\t// Placeholders with the same ids are connected.","\t// Example:",'\t// "Print to console": {','\t// \t"scope": "javascript,typescript",','\t// \t"prefix": "log",','\t// \t"body": [',"\t// \t\t\"console.log('$1');\",",'\t// \t\t"$2"',"\t// \t],",'\t// \t"description": "Log output to console"',"\t// }","}"].join("\n"))]:[2,void 0];case 3:return s.sent(),[4,n.open(g.default.file(o))];case 4:
return s.sent(),[2]}})})}(_,y,h)];case 3:return b.is(T)?T.hint?[4,function(e){return o(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return[4,r.exists(e.filepath)];case 1:return n.sent()?[2]:(t=["{","\t// Place your snippets for "+e.label+" here. Each snippet is defined under a snippet name and has a prefix, body and ","\t// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:","\t// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the ","\t// same ids are connected.","\t// Example:",'\t// "Print to console": {','\t// \t"prefix": "log",','\t// \t"body": [',"\t// \t\t\"console.log('$1');\",",'\t// \t\t"$2"',"\t// \t],",'\t// \t"description": "Log output to console"',"\t// }","}"].join("\n"),[4,r.writeFile(e.filepath,t)]);case 2:return n.sent(),[2]}})})}(T)]:[3,5]:[3,6];case 4:x.sent(),x.label=5;case 5:
return[2,h.open(g.default.file(T.filepath))];case 6:return[2]}})})}),h.MenuRegistry.appendMenuItem(h.MenuId.CommandPalette,{command:{id:S,title:{value:n.localize(7,null),original:"Preferences: Configure User Snippets"},category:n.localize(8,null)}})}),define(e[395],t([1,0,89,113,711,59,226,458,14]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n,i,r,o,s){this.scopes=e,this.name=t,this.prefix=n,this.description=i,this.body=r,this.source=o,this.isFromExtension=s}return Object.defineProperty(e.prototype,"codeSnippet",{get:function(){return this._ensureCodeSnippet(),this._codeSnippet},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBogous",{get:function(){return this._ensureCodeSnippet(),this._isBogous},enumerable:!0,configurable:!0}),e.prototype._ensureCodeSnippet=function(){if(!this._codeSnippet){var t=e._rewriteBogousVariables(this.body);"string"==typeof t?(this._codeSnippet=t,
this._isBogous=!0):(this._codeSnippet=this.body,this._isBogous=!1)}},e.compare=function(e,t){return e.isFromExtension!==t.isFromExtension?e.isFromExtension?1:-1:e.name>t.name?1:e.name<t.name?-1:0},e._rewriteBogousVariables=function(e){for(var t=(new s.SnippetParser).parse(e,!1),n=new Map,i=0,r=0,o=t.placeholders;r<o.length;r++){var c=o[r];i=Math.max(i,c.index)}for(var l=!1,u=t.children.slice();u.length>0;){var d=u.shift();if(d instanceof s.Variable&&0===d.children.length&&!a.KnownSnippetVariableNames[d.name]){var h=n.has(d.name)?n.get(d.name):++i;n.set(d.name,h);var p=new s.Placeholder(h).appendChild(new s.Text(d.name));t.replace(d,[p]),l=!0}else u.push.apply(u,d.children)}return!!l&&t.toTextmateString()},e}();t.Snippet=l;var u=function(){function e(e,t,n,i){this.location=e,this.defaultScopes=t,this._extension=n,this._fileService=i,this.data=[],this.isGlobalSnippets=".code-snippets"===o.extname(e.path),this.isUserSnippets=!this._extension}return e.prototype.select=function(e,t){
this.isGlobalSnippets||!this.isUserSnippets?this._scopeSelect(e,t):this._filepathSelect(e,t)},e.prototype._filepathSelect=function(e,t){e===o.basename(this.location.path,".json")&&t.push.apply(t,this.data)},e.prototype._scopeSelect=function(e,t){for(var n=0,i=this.data;n<i.length;n++){var r=i[n],o=r.scopes.length;if(0===o)t.push(r);else for(var s=0;s<o;s++)if(r.scopes[s]===e){t.push(r);break}}var a=e.lastIndexOf(".");a>=0&&this._scopeSelect(e.substring(0,a),t)},e.prototype.load=function(){var e=this;return this._loadPromise||(this._loadPromise=Promise.resolve(this._fileService.resolveContent(this.location)).then(function(t){var r=n.parse(t.value.toString());return"object"==typeof r&&i.forEach(r,function(t){var n=t.key,r=t.value;!function(e){return Boolean(e.body)&&Boolean(e.prefix)}(r)?i.forEach(r,function(t){var n=t.key,i=t.value;e._parseSnippet(n,i,e.data)}):e._parseSnippet(n,r,e.data)}),e})),this._loadPromise},e.prototype.reset=function(){this._loadPromise=void 0,this.data.length=0},
e.prototype._parseSnippet=function(e,t,n){var i=t.prefix,o=t.body,s=t.description;if(Array.isArray(o)&&(o=o.join("\n")),"string"==typeof i&&"string"==typeof o){var a;a=this.defaultScopes?this.defaultScopes:"string"==typeof t.scope?t.scope.split(",").map(function(e){return e.trim()}).filter(function(e){return!c.isFalsyOrWhitespace(e)}):[];var u;u=this._extension?this._extension.displayName||this._extension.name:this.isGlobalSnippets?r.localize(0,null):r.localize(1,null),n.push(new l(a,e,i,s,o,u,void 0!==this._extension))}},e}();t.SnippetFile=u}),define(e[1160],t([1,0,709,4,32,64,54,29,235,160,55,395]),function(e,t,i,r,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n){this.snippet=e,this.name=t,this.langId=n}return e.fromUser=function(t){if(!t||"object"!=typeof t)return e._empty;var n=t.snippet,i=t.name,r=t.langId;return"string"!=typeof n&&(n=void 0),"string"!=typeof i&&(i=void 0),"string"!=typeof r&&(r=void 0),new e(n,i,r)},
e._empty=new e(void 0,void 0,void 0),e}(),v=function(e){function t(){return e.call(this,{id:"editor.action.insertSnippet",label:i.localize(0,null),alias:"Insert Snippet",precondition:p.EditorContextKeys.writable})||this}return n(t,e),t.prototype.run=function(e,t,n){var a=this,u=e.get(l.IModeService),p=e.get(d.ISnippetsService);if(t.getModel()){var v=e.get(c.IQuickOpenService),m=t.getPosition(),y=m.lineNumber,b=m.column,S=g.fromUser(n),_=S.snippet,C=S.name,E=S.langId;return new r.TPromise(function(e,n){return o(a,void 0,void 0,function(){var r,o,a,c,l,d,h,g,m;return s(this,function(s){switch(s.label){case 0:return _?[2,e(new f.Snippet(void 0,void 0,void 0,void 0,_,void 0))]:(E?r=u.getLanguageIdentifier(E).id:(t.getModel().tokenizeIfCheap(y),r=t.getModel().getLanguageIdAtPosition(y,b),o=u.getLanguageIdentifier(r).language,u.getLanguageName(o)||(r=t.getModel().getLanguageIdentifier().id)),C?[4,p.getSnippets(r)]:[3,2]);case 1:return s.sent().every(function(t){return t.name!==C||(e(t),!1)}),[3,4];case 2:
return[4,p.getSnippets(r)];case 3:for(a=s.sent().sort(f.Snippet.compare),c=[],l=void 0,d=0,h=a;d<h.length;d++)g=h[d],m={label:g.prefix,detail:g.description,snippet:g},g.isFromExtension||l?!g.isFromExtension||l&&l.isFromExtension||(m.separator={label:i.localize(2,null)}):m.separator={label:i.localize(1,null)},c.push(m),l=g;return[2,v.pick(c,{matchOnDetail:!0}).then(function(t){return e(t&&t.snippet)},n)];case 4:return[2]}})})}).then(function(e){e&&h.SnippetController2.get(t).insert(e.codeSnippet,0,0)})}},t}(a.EditorAction);a.registerEditorAction(v),u.CommandsRegistry.registerCommand("editor.action.showSnippets",function(e){return e.get(u.ICommandService).executeCommand("editor.action.insertSnippet")})}),define(e[349],t([1,0,163,4,9,10,33,28,27,36,42,14]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";function f(e){var t=e.match(I);return t?t[1]:null}function g(e){if(-1===e.indexOf("://")){var t=e.match(C);if(t)return f(t[2])}try{var n=o.default.parse(e);if(n.authority)return f(n.authority)}catch(e){}
return null}function v(e,t){for(var n,i=new Set;n=T.exec(e);){var r=g(n[1]);r&&i.add(r)}var o=t.reduce(function(e,t){return e[t]=!0,e},Object.create(null)),s=[];return i.forEach(function(e){return s.push(e)}),s.map(function(e){return o[e]?e:e.replace(x,"a")})}function m(e,t,n){return e&&t?(n&&p.endsWith(t,".git")&&(t=t.substr(0,t.length-4)),0===t.indexOf("/")?""+e+t:e+"/"+t):null}function y(e,t){if(-1===e.indexOf("://")){var n=e.match(E);if(n)return m(n[2],n[3],t)}try{var i=o.default.parse(e);if(i.authority)return m(function(e){var t=e.match(w);return t?t[2]:null}(i.authority),i.path,t)}catch(e){}return null}function b(e,t){void 0===t&&(t=!1);for(var n,i=[];n=T.exec(e);){var r=y(n[1],t);r&&i.push(r)}return i}function S(e,t){return void 0===t&&(t=!1),b(e,t).map(function(e){return n.createHash("sha1").update(e).digest("hex")})}function _(e,t,n){void 0===n&&(n=!1);var i=e.path,r=e.with({path:("/"!==i?i:"")+"/.git/config"});return t.resolveFile(r).then(function(){return t.resolveContent(r,{acceptTextOnly:!0
}).then(function(e){return S(e.value,n)},function(e){return[]})},function(e){return[]})}Object.defineProperty(t,"__esModule",{value:!0});var C=/^([^@:]+@)?([^:]+):/,E=/^([^@:]+@)?([^:]+):(.+)$/,w=/^([^@]+@)?([^:]+)(:\d+)?$/,I=/([^@:.]+\.[^@:.]+)(:\d+)?$/,T=/^\s*url\s*=\s*(.+\S)\s*$/gm,x=/[^.]/g,k=["github.com","bitbucket.org","visualstudio.com","gitlab.com","heroku.com","azurewebsites.net","ibm.com","amazon.com","amazonaws.com","cloudapp.net","rhcloud.com","google.com"],D=["express","sails","koa","hapi","socket.io","restify","react","react-native","@angular/core","vue","aws-sdk","azure","azure-storage","@google-cloud/common","heroku-cli"];t.getDomainsOfRemotes=v,t.getRemotes=b,t.getHashedRemotesFromConfig=S,t.getHashedRemotesFromUri=_;var A=function(){function e(e,t,n,i,r){this.fileService=e,this.contextService=t,this.telemetryService=n,this.environmentService=i,this.reportWorkspaceTags(r.getConfiguration()),this.reportCloudStats()}return e.prototype.searchArray=function(e,t){return e.some(function(e){
return e.search(t)>-1})||void 0},e.prototype.getWorkspaceTags=function(e){var t,r=this,o=Object.create(null),s=this.contextService.getWorkbenchState(),a=this.contextService.getWorkspace();switch(s){case u.WorkbenchState.EMPTY:t=void 0;break;case u.WorkbenchState.FOLDER:t=n.createHash("sha1").update(a.folders[0].uri.fsPath).digest("hex");break;case u.WorkbenchState.WORKSPACE:t=n.createHash("sha1").update(a.configuration.fsPath).digest("hex")}o["workspace.id"]=t;var c=e.filesToOpen,l=e.filesToCreate,d=e.filesToDiff;o["workbench.filesToOpen"]=c&&c.length||0,o["workbench.filesToCreate"]=l&&l.length||0,o["workbench.filesToDiff"]=d&&d.length||0;var h=s===u.WorkbenchState.EMPTY;o["workspace.roots"]=h?0:a.folders.length,o["workspace.empty"]=h;var p=h?"stable"!==this.environmentService.appQuality&&this.findFolders(e):a.folders.map(function(e){return e.uri});return p&&p.length&&this.fileService?this.fileService.resolveFiles(p.map(function(e){return{resource:e}})).then(function(e){
var t,n=(t=[]).concat.apply(t,e.map(function(e){return e.success?e.stat.children||[]:[]})).map(function(e){return e.name}),s=n.reduce(function(e,t){return e.add(t.toLowerCase())},new Set);o["workspace.grunt"]=s.has("gruntfile.js"),o["workspace.gulp"]=s.has("gulpfile.js"),o["workspace.jake"]=s.has("jakefile.js"),o["workspace.tsconfig"]=s.has("tsconfig.json"),o["workspace.jsconfig"]=s.has("jsconfig.json"),o["workspace.config.xml"]=s.has("config.xml"),o["workspace.vsc.extension"]=s.has("vsc-extension-quickstart.md"),o["workspace.ASP5"]=s.has("project.json")&&r.searchArray(n,/^.+\.cs$/i),o["workspace.sln"]=r.searchArray(n,/^.+\.sln$|^.+\.csproj$/i),o["workspace.unity"]=s.has("assets")&&s.has("library")&&s.has("projectsettings"),o["workspace.npm"]=s.has("package.json")||s.has("node_modules"),o["workspace.bower"]=s.has("bower.json")||s.has("bower_components"),o["workspace.yeoman.code.ext"]=s.has("vsc-extension-quickstart.md")
;var a=s.has("mainactivity.cs")||s.has("mainactivity.fs"),c=s.has("appdelegate.cs")||s.has("appdelegate.fs"),l=s.has("androidmanifest.xml"),u=s.has("platforms"),d=s.has("plugins"),h=s.has("www"),f=s.has("properties"),g=s.has("resources"),v=s.has("jni");!o["workspace.config.xml"]||o["workspace.language.cs"]||o["workspace.language.vb"]||o["workspace.language.aspx"]||(u&&d&&h?o["workspace.cordova.high"]=!0:o["workspace.cordova.low"]=!0),a&&f&&g&&(o["workspace.xamarin.android"]=!0),c&&g&&(o["workspace.xamarin.ios"]=!0),l&&v&&(o["workspace.android.cpp"]=!0);var m=s.has("package.json")?p.map(function(e){var t=e.with({path:("/"!==e.path?e.path:"")+"/package.json"});return r.fileService.resolveFile(t).then(function(){return r.fileService.resolveContent(t,{acceptTextOnly:!0}).then(function(e){try{var t=JSON.parse(e.value);if(t.dependencies)for(var n=0,i=D;n<i.length;n++){var r=i[n];"react-native"===r?t.dependencies[r]&&(o["workspace.reactNative"]=!0):t.dependencies[r]&&(o["workspace.npm."+r]=!0)}}catch(e){}})
},function(e){})}):[];return i.TPromise.join(m).then(function(){return o})}):i.TPromise.as(o)},e.prototype.findFolders=function(e){var t=this.findFolder(e);return t&&[t]},e.prototype.findFolder=function(e){var t=e.filesToOpen,n=e.filesToCreate,i=e.filesToDiff;return t&&t.length?this.parentURI(o.default.file(t[0].filePath)):n&&n.length?this.parentURI(o.default.file(n[0].filePath)):i&&i.length?this.parentURI(o.default.file(i[0].filePath)):void 0},e.prototype.parentURI=function(e){var t=e.path,n=t.lastIndexOf("/");return-1!==n?e.with({path:t.substr(0,n)}):void 0},e.prototype.reportWorkspaceTags=function(t){var n=this;this.getWorkspaceTags(t).then(function(t){n.telemetryService.publicLog("workspce.tags",t),e.tags=t},function(e){return r.onUnexpectedError(e)})},e.prototype.reportRemoteDomains=function(e){var t=this;i.TPromise.join(e.map(function(e){var n=e.path,i=e.with({path:("/"!==n?n:"")+"/.git/config"});return t.fileService.resolveFile(i).then(function(){return t.fileService.resolveContent(i,{acceptTextOnly:!0
}).then(function(e){return v(e.value,k)},function(e){return[]})},function(e){return[]})})).then(function(e){var n=e.reduce(function(e,t){return t.reduce(function(e,t){return e.add(t)},e)},new Set),i=[];n.forEach(function(e){return i.push(e)}),t.telemetryService.publicLog("workspace.remotes",{domains:i.sort()})},r.onUnexpectedError)},e.prototype.reportRemotes=function(e){var t=this;i.TPromise.join(e.map(function(e){return _(e,t.fileService,!0)})).then(function(e){t.telemetryService.publicLog("workspace.hashedRemotes",{remotes:e})},r.onUnexpectedError)},e.prototype.reportAzureNode=function(e,t){var n=this,i=e.map(function(e){var t=e.path;return e.with({path:("/"!==t?t:"")+"/node_modules"})});return this.fileService.resolveFiles(i.map(function(e){return{resource:e}})).then(function(e){var i,r=(i=[]).concat.apply(i,e.map(function(e){return e.success?e.stat.children||[]:[]})).map(function(e){return e.name});return n.searchArray(r,/azure/i)&&(t.node=!0),t},function(e){return t})},
e.prototype.reportAzureJava=function(e,t){var n=this;return i.TPromise.join(e.map(function(e){var t=e.path,i=e.with({path:("/"!==t?t:"")+"/pom.xml"});return n.fileService.resolveFile(i).then(function(e){return n.fileService.resolveContent(i,{acceptTextOnly:!0}).then(function(e){return!!e.value.match(/azure/i)},function(e){return!1})},function(e){return!1})})).then(function(e){return-1!==e.indexOf(!0)&&(t.java=!0),t})},e.prototype.reportAzure=function(e){var t=this,n=Object.create(null);this.reportAzureNode(e,n).then(function(n){return t.reportAzureJava(e,n)}).then(function(e){Object.keys(e).length&&t.telemetryService.publicLog("workspace.azure",e)}).then(null,r.onUnexpectedError)},e.prototype.reportCloudStats=function(){var e=this.contextService.getWorkspace().folders.map(function(e){return e.uri});e.length&&this.fileService&&(this.reportRemoteDomains(e),this.reportRemotes(e),this.reportAzure(e))},
e=a([l(0,s.IFileService),l(1,u.IWorkspaceContextService),l(2,c.ITelemetryService),l(3,d.IEnvironmentService),l(4,h.IWindowService)],e)}();t.WorkspaceStats=A}),define(e[1162],t([1,0,16,75,349,38]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(r.WorkspaceStats,o.LifecyclePhase.Eventually)}),define(e[1163],t([1,0,715,11,75,16,6,28,34,139,76,38,22]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=.15,v="nps/sessionCount",m="nps/lastSessionDate",y="nps/skipVersion",b="nps/isCandidate",S=function(){function e(e,t,i,r){if(!t.get(y,u.StorageScope.GLOBAL,"")){var o=(new Date).toDateString();if(o!==t.get(m,u.StorageScope.GLOBAL,new Date(0).toDateString())){var s=t.getInteger(v,u.StorageScope.GLOBAL,0)+1;if(t.store(m,o,u.StorageScope.GLOBAL),t.store(v,s,u.StorageScope.GLOBAL),!(s<9)){var a=t.getBoolean(b,u.StorageScope.GLOBAL,!1)||Math.random()<g
;t.store(b,a,u.StorageScope.GLOBAL),a?i.prompt(f.Severity.Info,n.localize(0,null),[{label:n.localize(1,null),run:function(){r.getTelemetryInfo().then(function(e){window.open(h.default.npsSurveyUrl+"?o="+encodeURIComponent(process.platform)+"&v="+encodeURIComponent(d.default.version)+"&m="+encodeURIComponent(e.machineId)),t.store(b,!1,u.StorageScope.GLOBAL),t.store(y,d.default.version,u.StorageScope.GLOBAL)})}},{label:n.localize(2,null),run:function(){return t.store(v,s-3,u.StorageScope.GLOBAL)}},{label:n.localize(3,null),isSecondary:!0,run:function(){t.store(b,!1,u.StorageScope.GLOBAL),t.store(y,d.default.version,u.StorageScope.GLOBAL)}}]):t.store(y,d.default.version,u.StorageScope.GLOBAL)}}}}return e=a([l(0,s.IInstantiationService),l(1,u.IStorageService),l(2,f.INotificationService),l(3,c.ITelemetryService)],e)}();if("en"===i.language&&h.default.npsSurveyUrl){o.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(S,p.LifecyclePhase.Running)}}),define(e[350],t([1,0]),function(e,t){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.NotConfigured=0]="NotConfigured",e[e.RunningTask=1]="RunningTask",e[e.NoBuildTask=2]="NoBuildTask",e[e.NoTestTask=3]="NoTestTask",e[e.ConfigValidationError=4]="ConfigValidationError",e[e.TaskNotFound=5]="TaskNotFound",e[e.NoValidTaskRunner=6]="NoValidTaskRunner",e[e.UnknownError=7]="UnknownError"}(t.TaskErrors||(t.TaskErrors={}));var n=function(){return function(e,t,n){this.severity=e,this.message=t,this.code=n}}();t.TaskError=n;!function(e){e.shortcut="shortcut",e.command="command"}(t.Triggers||(t.Triggers={}));!function(e){e[e.Started=1]="Started",e[e.Active=2]="Active"}(t.TaskExecuteKind||(t.TaskExecuteKind={}))}),define(e[1165],t([1,0,720]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={id:"dotnetCore",label:".NET Core",sort:"NET Core",autoDetect:!1,description:n.localize(0,null),
content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "build",','\t\t\t"command": "dotnet build",','\t\t\t"type": "shell",','\t\t\t"group": "build",','\t\t\t"presentation": {','\t\t\t\t"reveal": "silent"',"\t\t\t},",'\t\t\t"problemMatcher": "$msCompile"',"\t\t}","\t]","}"].join("\n")},r={id:"msbuild",label:"MSBuild",autoDetect:!1,description:n.localize(1,null),
content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "build",','\t\t\t"type": "shell",','\t\t\t"command": "msbuild",','\t\t\t"args": [',"\t\t\t\t// Ask msbuild to generate full paths for file names.",'\t\t\t\t"/property:GenerateFullPaths=true",','\t\t\t\t"/t:build"',"\t\t\t],",'\t\t\t"group": "build",','\t\t\t"presentation": {',"\t\t\t\t// Reveal the output only if unrecognized errors occur.",'\t\t\t\t"reveal": "silent"',"\t\t\t},","\t\t\t// Use the standard MS compiler pattern to detect errors, warnings and infos",'\t\t\t"problemMatcher": "$msCompile"',"\t\t}","\t]","}"].join("\n")},o={id:"externalCommand",label:"Others",autoDetect:!1,description:n.localize(2,null),
content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "echo",','\t\t\t"type": "shell",','\t\t\t"command": "echo Hello"',"\t\t}","\t]","}"].join("\n")},s={id:"maven",label:"maven",sort:"MVN",autoDetect:!1,description:n.localize(3,null),content:["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format",'\t"version": "2.0.0",','\t"tasks": [',"\t\t{",'\t\t\t"label": "verify",','\t\t\t"type": "shell",','\t\t\t"command": "mvn -B verify",','\t\t\t"group": "build"',"\t\t},","\t\t{",'\t\t\t"label": "test",','\t\t\t"type": "shell",','\t\t\t"command": "mvn -B test",','\t\t\t"group": "test"',"\t\t}","\t]","}"].join("\n")},a=null;t.getTemplates=function(){return a||(a=[i,r,s].sort(function(e,t){return(e.sort||e.label).localeCompare(t.sort||t.label)})).push(o),a}}),define(e[154],t([1,0,30,24]),function(e,t,n,i){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Escape=1]="Escape",e[e.Strong=2]="Strong",e[e.Weak=3]="Weak"}(t.ShellQuoting||(t.ShellQuoting={})),function(e){e.from=function(t){if(!t)return e.Strong;switch(t.toLowerCase()){case"escape":return e.Escape;case"strong":return e.Strong;case"weak":return e.Weak;default:return e.Strong}}}(t.ShellQuoting||(t.ShellQuoting={}));!function(e){e[e.Always=1]="Always",e[e.Silent=2]="Silent",e[e.Never=3]="Never"}(t.RevealKind||(t.RevealKind={})),function(e){e.fromString=function(t){switch(t.toLowerCase()){case"always":return e.Always;case"silent":return e.Silent;case"never":return e.Never;default:return e.Always}}}(t.RevealKind||(t.RevealKind={}));!function(e){e[e.Shared=1]="Shared",e[e.Dedicated=2]="Dedicated",e[e.New=3]="New"}(t.PanelKind||(t.PanelKind={})),function(e){e.fromString=function(t){switch(t.toLowerCase()){case"shared":return e.Shared;case"dedicated":return e.Dedicated;case"new":return e.New;default:return e.Shared}}
}(t.PanelKind||(t.PanelKind={}));var r;!function(e){e[e.Shell=1]="Shell",e[e.Process=2]="Process"}(r=t.RuntimeType||(t.RuntimeType={})),function(e){e.fromString=function(t){switch(t.toLowerCase()){case"shell":return e.Shell;case"process":default:return e.Process}}}(r=t.RuntimeType||(t.RuntimeType={}));!function(e){e.value=function(e){return n.isString(e)?e:e.value}}(t.CommandString||(t.CommandString={}));!function(e){e.Clean="clean",e.Build="build",e.Rebuild="rebuild",e.Test="test",e.is=function(t){return t===e.Clean||t===e.Build||t===e.Rebuild||t===e.Test}}(t.TaskGroup||(t.TaskGroup={}));var o;!function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.Folder=3]="Folder"}(o=t.TaskScope||(t.TaskScope={}));var s;!function(e){e.Workspace="workspace",e.Extension="extension",e.InMemory="inMemory"}(s=t.TaskSourceKind||(t.TaskSourceKind={}));!function(e){e.default="default",e.user="user"}(t.GroupType||(t.GroupType={}));var a;!function(e){e.is=function(e){var t=e;return t&&"custom"===t.type},
e.getDefinition=function(e){return{type:void 0!==e.command?e.command.runtime===r.Shell?"shell":"process":"$composite",_key:e._id,id:e._id}},e.customizes=function(e){if(e._source&&e._source.customizes)return e._source.customizes}}(a=t.CustomTask||(t.CustomTask={}));!function(e){e.is=function(e){var t=e;return t&&t.configures&&n.isString(t.configures.type)&&void 0===e.command}}(t.ConfiguringTask||(t.ConfiguringTask={}));var c;!function(e){e.is=function(e){var t=e;return t&&t.defines&&n.isString(t.defines.type)&&void 0!==t.command}}(c=t.ContributedTask||(t.ContributedTask={}));var l;!function(e){e.is=function(e){var t=e;return t&&t._source&&t._source.kind===s.InMemory}}(l=t.InMemoryTask||(t.InMemoryTask={}));var u;!function(e){function t(e){return a.is(e)?e._source.config.workspaceFolder:c.is(e)?e._source.workspaceFolder:void 0}e.getRecentlyUsedKey=function(e){if(!l.is(e)){if(a.is(e)){var t=e._source.config.workspaceFolder;if(!t)return;return n={type:"custom",folder:t.uri.toString(),id:e.identifier},
JSON.stringify(n)}if(c.is(e)){var n={type:"contributed",scope:e._source.scope,id:e._id};return e._source.scope===o.Folder&&e._source.workspaceFolder&&(n.folder=e._source.workspaceFolder.uri.toString()),JSON.stringify(n)}}},e.getMapKey=function(e){if(a.is(e))return(t=e._source.config.workspaceFolder)?t.uri.toString()+"|"+e._id:e._id;if(c.is(e)){var t=e._source.workspaceFolder;return t?e._source.scope.toString()+"|"+t.uri.toString()+"|"+e._id:e._source.scope.toString()+"|"+e._id}return e._id},e.getWorkspaceFolder=t,e.clone=function(e){return i.assign({},e)},e.getTelemetryKind=function(e){return c.is(e)?"extension":a.is(e)?e._source.customizes?"workspace>extension":"workspace":l.is(e)?"composite":"unknown"},e.matches=function(t,i,r){if(void 0===r&&(r=!1),void 0===i)return!1;if(n.isString(i))return i===t._label||i===t.identifier||r&&i===t._id;var o=e.getTaskDefinition(t,!0);return void 0!==o&&o._key===i._key},e.getQualifiedLabel=function(e){var n=t(e);return n?e._label+" ("+n.name+")":e._label},
e.getTaskDefinition=function(e,t){return void 0===t&&(t=!1),c.is(e)?e.defines:a.is(e)?t&&void 0!==e._source.customizes?e._source.customizes:a.getDefinition(e):void 0},e.getTaskExecution=function(e){return{id:e._id,task:e}}}(u=t.Task||(t.Task={}));!function(e){e[e.Process=1]="Process",e[e.Terminal=2]="Terminal"}(t.ExecutionEngine||(t.ExecutionEngine={})),function(e){e._default=e.Terminal}(t.ExecutionEngine||(t.ExecutionEngine={}));!function(e){e[e.V0_1_0=1]="V0_1_0",e[e.V2_0_0=2]="V2_0_0"}(t.JsonSchemaVersion||(t.JsonSchemaVersion={}));var d=function(){function e(e){this._order=new Map;for(var t=0;t<e.length;t++)this._order.set(e[t].uri.toString(),t)}return e.prototype.compare=function(e,t){var n=u.getWorkspaceFolder(e),i=u.getWorkspaceFolder(t);if(n&&i){var r=this._order.get(n.uri.toString());r=void 0===r?0:r+1;var o=this._order.get(i.uri.toString());return o=void 0===o?0:o+1,r===o?e._label.localeCompare(t._label):r-o}return!n&&i?-1:n&&!i?1:0},e}();t.TaskSorter=d;var h;!function(e){e.Start="start",
e.ProcessStarted="processStarted",e.Active="active",e.Inactive="inactive",e.Changed="changed",e.Terminated="terminated",e.ProcessEnded="processEnded",e.End="end"}(h=t.TaskEventKind||(t.TaskEventKind={}));var p;!function(e){e.SingleRun="singleRun",e.Background="background"}(p=t.TaskRunType||(t.TaskRunType={}));!function(e){e.create=function(e,t,n){if(t){var i={kind:e,taskId:t._id,taskName:t.name,runType:t.isBackground?p.Background:p.SingleRun,group:t.group,processId:void 0,exitCode:void 0,__task:t};return e===h.ProcessStarted?i.processId=n:e===h.ProcessEnded&&(i.exitCode=n),Object.freeze(i)}return Object.freeze({kind:h.Changed})}}(t.TaskEvent||(t.TaskEvent={}))}),define(e[216],t([1,0,6,154]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Task=i.Task,t.ITaskService=n.createDecorator("taskService")}),define(e[1168],t([1,0,5]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=29,r=function(){function e(e){this._messageListeners=[],
this._container=document.createElement("div"),this._container.classList.add("terminal-widget-overlay"),e.appendChild(this._container),this._initTerminalHeightWatcher(e)}return e.prototype.dispose=function(){this._container&&(this._container.parentElement.removeChild(this._container),this._container=null),this._xtermViewport=null},e.prototype._initTerminalHeightWatcher=function(e){var t=this;this._xtermViewport=e.querySelector(".xterm-viewport");new MutationObserver(function(){return t._refreshHeight()}).observe(this._xtermViewport,{attributes:!0,attributeFilter:["style"]})},e.prototype.showMessage=function(e,t,i){n.dispose(this._messageWidget),this._messageListeners=n.dispose(this._messageListeners),this._messageWidget=new o(this._container,e,t,i)},e.prototype.closeMessage=function(){this._messageListeners=n.dispose(this._messageListeners),this._messageWidget&&this._messageListeners.push(o.fadeOut(this._messageWidget))},e.prototype._refreshHeight=function(){
this._container.style.height=this._xtermViewport.style.height},e}();t.TerminalWidgetManager=r;var o=function(){function e(e,t,n,r){this._container=e,this._left=t,this._top=n,this._text=r,this._domNode=document.createElement("div"),this._domNode.style.position="absolute",this._domNode.style.left=t+"px",this._domNode.style.bottom=e.offsetHeight-Math.max(n,i)+"px",this._domNode.classList.add("terminal-message-widget","fadeIn"),this._domNode.textContent=r,this._container.appendChild(this._domNode)}return Object.defineProperty(e.prototype,"left",{get:function(){return this._left},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this._top},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),e.fadeOut=function(e){var t,n=function(){e.dispose(),clearTimeout(t),
e.domNode.removeEventListener("animationend",n)};return t=setTimeout(n,110),e.domNode.addEventListener("animationend",n),e.domNode.classList.add("fadeOut"),{dispose:n}},e.prototype.dispose=function(){this.domNode.parentElement===this._container&&this._container.removeChild(this.domNode)},e}()}),define(e[94],t([1,0,15,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TERMINAL_PANEL_ID="workbench.panel.terminal",t.TERMINAL_SERVICE_ID="terminalService",t.KEYBINDING_CONTEXT_TERMINAL_FOCUS=new n.RawContextKey("terminalFocus",void 0),t.KEYBINDING_CONTEXT_TERMINAL_NOT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FOCUS.toNegated(),t.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED=new n.RawContextKey("terminalTextSelected",void 0),t.KEYBINDING_CONTEXT_TERMINAL_TEXT_NOT_SELECTED=t.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.toNegated(),t.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE=new n.RawContextKey("terminalFindWidgetVisible",void 0),
t.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE=t.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.toNegated(),t.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED=new n.RawContextKey("terminalFindWidgetInputFocused",!1),t.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_NOT_FOCUSED=t.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED.toNegated(),t.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY="terminal.integrated.isWorkspaceShellAllowed",t.NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY="terminal.integrated.neverSuggestSelectWindowsShell",t.NEVER_MEASURE_RENDER_TIME_STORAGE_KEY="terminal.integrated.neverMeasureRenderTime",t.EXT_HOST_CREATION_DELAY=100,t.ITerminalService=i.createDecorator(t.TERMINAL_SERVICE_ID),t.TerminalCursorStyle={BLOCK:"block",LINE:"line",UNDERLINE:"underline"},t.TERMINAL_CONFIG_SECTION="terminal.integrated",t.DEFAULT_LETTER_SPACING=0,t.MINIMUM_LETTER_SPACING=-5,t.DEFAULT_LINE_HEIGHT=1;!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down"
}(t.Direction||(t.Direction={}));!function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LAUNCHING=1]="LAUNCHING",e[e.RUNNING=2]="RUNNING",e[e.KILLED_DURING_LAUNCH=3]="KILLED_DURING_LAUNCH",e[e.KILLED_BY_USER=4]="KILLED_BY_USER",e[e.KILLED_BY_PROCESS=5]="KILLED_BY_PROCESS"}(t.ProcessState||(t.ProcessState={}))}),define(e[1170],t([1,0,612,4,94,531,1113]),function(e,t,n,i,r,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this.terminalService=e,this.nativeTerminalService=t}return e.prototype.runInTerminal=function(e,t){return o(this,void 0,i.TPromise,function(){var r,o=this;return s(this,function(s){return"external"===e.kind?[2,this.nativeTerminalService.runInTerminal(e.title,e.cwd,e.args,e.env||{})]:(this.terminalDisposedListener||(this.terminalDisposedListener=this.terminalService.onInstanceDisposed(function(e){o.integratedTerminalInstance&&o.integratedTerminalInstance.id===e.id&&(o.integratedTerminalInstance=null)})),
((r=this.integratedTerminalInstance)&&u.hasChildprocesses(r.processId)||!r)&&(r=this.terminalService.createTerminal({name:e.title||n.localize(0,null)}),this.integratedTerminalInstance=r),this.terminalService.setActiveInstance(r),this.terminalService.showPanel(!0),[2,new i.TPromise(function(n,i){setTimeout(function(i){var o=u.prepareCommand(e,t);r.sendText(o,!0),n(void 0)},500)})])})})},e=a([l(0,r.ITerminalService),l(1,c.ITerminalService)],e)}();t.TerminalLauncher=d}),define(e[1171],t([1,0,428,35,94,15]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._contextKeyService=n,r._terminalService=i,r._findInputFocused=o.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED.bindTo(r._contextKeyService),r}return n(t,e),t.prototype.find=function(e){var t=this._terminalService.getActiveInstance();null!==t&&(e?t.findPrevious(this.inputValue):t.findNext(this.inputValue))},t.prototype.hide=function(){
e.prototype.hide.call(this),this._terminalService.getActiveInstance().focus()},t.prototype.onInputChanged=function(){},t.prototype.onFocusTrackerFocus=function(){this._terminalService.getActiveInstance().notifyFindWidgetFocusChanged(!0)},t.prototype.onFocusTrackerBlur=function(){this._terminalService.getActiveInstance().notifyFindWidgetFocusChanged(!1)},t.prototype.onFindInputFocusTrackerFocus=function(){this._findInputFocused.set(!0)},t.prototype.onFindInputFocusTrackerBlur=function(){this._findInputFocused.reset()},t=a([l(0,r.IContextViewService),l(1,s.IContextKeyService),l(2,o.ITerminalService)],t)}(i.SimpleFindWidget);t.TerminalFindWidget=c}),define(e[358],t([1,0,731,26]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ansiColorIdentifiers=[],t.TERMINAL_BACKGROUND_COLOR=i.registerColor("terminal.background",null,n.localize(0,null)),t.TERMINAL_FOREGROUND_COLOR=i.registerColor("terminal.foreground",{light:"#333333",dark:"#CCCCCC",hc:"#FFFFFF"},n.localize(1,null)),
t.TERMINAL_CURSOR_FOREGROUND_COLOR=i.registerColor("terminalCursor.foreground",null,n.localize(2,null)),t.TERMINAL_CURSOR_BACKGROUND_COLOR=i.registerColor("terminalCursor.background",null,n.localize(3,null)),t.TERMINAL_SELECTION_BACKGROUND_COLOR=i.registerColor("terminal.selectionBackground",{light:"#00000040",dark:"#FFFFFF40",hc:"#FFFFFF80"},n.localize(4,null)),t.TERMINAL_BORDER_COLOR=i.registerColor("terminal.border",null,n.localize(5,null));var r={"terminal.ansiBlack":{index:0,defaults:{light:"#000000",dark:"#000000",hc:"#000000"}},"terminal.ansiRed":{index:1,defaults:{light:"#cd3131",dark:"#cd3131",hc:"#cd0000"}},"terminal.ansiGreen":{index:2,defaults:{light:"#00BC00",dark:"#0DBC79",hc:"#00cd00"}},"terminal.ansiYellow":{index:3,defaults:{light:"#949800",dark:"#e5e510",hc:"#cdcd00"}},"terminal.ansiBlue":{index:4,defaults:{light:"#0451a5",dark:"#2472c8",hc:"#0000ee"}},"terminal.ansiMagenta":{index:5,defaults:{light:"#bc05bc",dark:"#bc3fbc",hc:"#cd00cd"}},"terminal.ansiCyan":{index:6,defaults:{
light:"#0598bc",dark:"#11a8cd",hc:"#00cdcd"}},"terminal.ansiWhite":{index:7,defaults:{light:"#555555",dark:"#e5e5e5",hc:"#e5e5e5"}},"terminal.ansiBrightBlack":{index:8,defaults:{light:"#666666",dark:"#666666",hc:"#7f7f7f"}},"terminal.ansiBrightRed":{index:9,defaults:{light:"#cd3131",dark:"#f14c4c",hc:"#ff0000"}},"terminal.ansiBrightGreen":{index:10,defaults:{light:"#14CE14",dark:"#23d18b",hc:"#00ff00"}},"terminal.ansiBrightYellow":{index:11,defaults:{light:"#b5ba00",dark:"#f5f543",hc:"#ffff00"}},"terminal.ansiBrightBlue":{index:12,defaults:{light:"#0451a5",dark:"#3b8eea",hc:"#5c5cff"}},"terminal.ansiBrightMagenta":{index:13,defaults:{light:"#bc05bc",dark:"#d670d6",hc:"#ff00ff"}},"terminal.ansiBrightCyan":{index:14,defaults:{light:"#0598bc",dark:"#29b8db",hc:"#00ffff"}},"terminal.ansiBrightWhite":{index:15,defaults:{light:"#a5a5a5",dark:"#e5e5e5",hc:"#ffffff"}}};t.registerColors=function(){for(var e in r){var o=r[e],s=e.substring(13)
;t.ansiColorIdentifiers[o.index]=i.registerColor(e,o.defaults,n.localize(6,null,s))}}}),define(e[1173],t([1,0,52,94]),function(e,t,n,i){"use strict";function r(){!function(){for(var e=function(e){var t=e,r=e+1;n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.terminal.focusAtIndex"+r,weight:n.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:null,handler:function(e){var n=e.get(i.ITerminalService);return n.setActiveInstanceByIndex(t),n.showPanel(!0)}})},t=0;t<9;t++)e(t)}()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=r}),define(e[378],t([1,0,93,11,224,87]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=null;t.getTerminalDefaultShellUnixLike=function(){if(!s){var e="sh";!i.isWindows&&process.env.SHELL&&"/bin/false"===(e=process.env.SHELL)&&(e="/bin/bash"),s=e}return s};var a=null;if(t.getTerminalDefaultShellWindows=function(){if(!a){
var e=i.isWindows&&parseFloat(n.release())>=10,t=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),o=process.env.windir+"\\"+(t?"Sysnative":"System32")+"\\WindowsPowerShell\\v1.0\\powershell.exe";a=e?o:r.getWindowsShell()}return a},i.isLinux){o.fileExists("/etc/os-release").then(function(e){e&&o.readFile("/etc/os-release").then(function(e){e.toString().indexOf("NAME=Fedora")>=0&&(t.isFedora=!0)})})}t.isFedora=!1}),define(e[1175],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom"}(n||(n={}));var i;!function(e){e[e.Top=0]="Top",e[e.Middle=1]="Middle"}(i=t.ScrollPosition||(t.ScrollPosition={}));var r=function(){function e(e){var t=this;this._xterm=e,this._currentMarker=n.Bottom,this._selectionStart=null,this._isDisposable=!1,this._xterm.on("key",function(e){return t._onKey(e)})}return e.prototype.dispose=function(){this._xterm=null},e.prototype._onKey=function(e){"\r"===e&&this._onEnter(),this._currentMarker=n.Bottom,
this._selectionStart=null},e.prototype._onEnter=function(){this._xterm._core.buffer.x>=2&&this._xterm.addMarker(0)},e.prototype.scrollToPreviousCommand=function(e,t){void 0===e&&(e=i.Top),void 0===t&&(t=!1),t||(this._selectionStart=null);var r;if(this._currentMarker===n.Bottom?r=this._xterm.markers.length-1:this._currentMarker===n.Top?r=-1:this._isDisposable?(r=this._findPreviousCommand(),this._currentMarker.dispose(),this._isDisposable=!1):r=this._xterm.markers.indexOf(this._currentMarker)-1,r<0)return this._currentMarker=n.Top,void this._xterm.scrollToTop();this._currentMarker=this._xterm.markers[r],this._scrollToMarker(this._currentMarker,e)},e.prototype.scrollToNextCommand=function(e,t){void 0===e&&(e=i.Top),void 0===t&&(t=!1),t||(this._selectionStart=null);var r;if(this._currentMarker===n.Bottom?r=this._xterm.markers.length:this._currentMarker===n.Top?r=0:this._isDisposable?(r=this._findNextCommand(),this._currentMarker.dispose(),
this._isDisposable=!1):r=this._xterm.markers.indexOf(this._currentMarker)+1,r>=this._xterm.markers.length)return this._currentMarker=n.Bottom,void this._xterm.scrollToBottom();this._currentMarker=this._xterm.markers[r],this._scrollToMarker(this._currentMarker,e)},e.prototype._scrollToMarker=function(e,t){var n=e.line;t===i.Middle&&(n=Math.max(n-this._xterm.rows/2,0)),this._xterm.scrollToLine(n)},e.prototype.selectToPreviousCommand=function(){null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToPreviousCommand(i.Middle,!0),this._selectLines(this._currentMarker,this._selectionStart)},e.prototype.selectToNextCommand=function(){null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToNextCommand(i.Middle,!0),this._selectLines(this._currentMarker,this._selectionStart)},e.prototype.selectToPreviousLine=function(){null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToPreviousLine(i.Middle,!0),
this._selectLines(this._currentMarker,this._selectionStart)},e.prototype.selectToNextLine=function(){null===this._selectionStart&&(this._selectionStart=this._currentMarker),this.scrollToNextLine(i.Middle,!0),this._selectLines(this._currentMarker,this._selectionStart)},e.prototype._selectLines=function(e,t){null===t&&(t=n.Bottom);var i=this._getLine(e),r=this._getLine(t);if(i>r){var o=i;i=r,r=o}r-=1,this._xterm.selectLines(i,r)},e.prototype._getLine=function(e){return e===n.Bottom?this._xterm._core.buffer.ybase+this._xterm.rows-1:e===n.Top?0:e.line},e.prototype.scrollToPreviousLine=function(e,t){if(void 0===e&&(e=i.Top),void 0===t&&(t=!1),t||(this._selectionStart=null),this._currentMarker!==n.Top){if(this._currentMarker===n.Bottom)this._currentMarker=this._xterm.addMarker(this._getOffset()-1);else{var r=this._getOffset();this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._xterm.addMarker(r-1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,e)
}else this._xterm.scrollToTop()},e.prototype.scrollToNextLine=function(e,t){if(void 0===e&&(e=i.Top),void 0===t&&(t=!1),t||(this._selectionStart=null),this._currentMarker!==n.Bottom){if(this._currentMarker===n.Top)this._currentMarker=this._xterm.addMarker(this._getOffset()+1);else{var r=this._getOffset();this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._xterm.addMarker(r+1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,e)}else this._xterm.scrollToBottom()},e.prototype._getOffset=function(){if(this._currentMarker===n.Bottom)return 0;if(this._currentMarker===n.Top)return 0-(this._xterm._core.buffer.ybase+this._xterm._core.buffer.y);var e=this._getLine(this._currentMarker);return e-=this._xterm._core.buffer.ybase+this._xterm._core.buffer.y},e.prototype._findPreviousCommand=function(){if(this._currentMarker===n.Top)return 0;if(this._currentMarker===n.Bottom)return this._xterm.markers.length-1;var e
;for(e=this._xterm.markers.length-1;e>=0;e--)if(this._xterm.markers[e].line<this._currentMarker.line)return e;return-1},e.prototype._findNextCommand=function(){if(this._currentMarker===n.Top)return 0;if(this._currentMarker===n.Bottom)return this._xterm.markers.length-1;var e;for(e=0;e<this._xterm.markers.length;e++)if(this._xterm.markers[e].line>this._currentMarker.line)return e;return this._xterm.markers.length},e}();t.TerminalCommandTracker=r}),define(e[403],t([1,0,93,25,11,139]),function(e,t,n,i,r,o){"use strict";function s(e,t){if(t)if(r.isWindows)for(var n in t){var i=n;for(var o in e)if(n.toLowerCase()===o.toLowerCase()){i=o;break}var s=t[n];a(e,i,s)}else Object.keys(t).forEach(function(n){var i=t[n];a(e,n,i)})}function a(e,t,n){"string"==typeof n?e[t]=n:delete e[t]}function l(e,t,o){if(e.cwd)return e.cwd;var s;if(!e.ignoreConfigurationCwd){var a=o.config.cwd;a&&(i.isAbsolute(a)?s=a:t&&(s=i.normalize(i.join(t.fsPath,a))))}return s||(s=t?t.fsPath:n.homedir()),function(e){
if(r.platform===r.Platform.Windows&&e&&":"===e[1])return e[0].toUpperCase()+e.substr(1);return e}(s)}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeEnvironments=s,t.createTerminalEnv=function(e,t,n,i,r,a){var l=c({},e);return t.env&&s(l,t.env),l.PTYPID=process.pid.toString(),l.PTYSHELL=t.executable,l.TERM_PROGRAM="vscode",l.TERM_PROGRAM_VERSION=o.default.version,t.args&&("string"==typeof t.args?l.PTYSHELLCMDLINE=t.args:t.args.forEach(function(e,t){return l["PTYSHELLARG"+t]=e})),l.PTYCWD=n,l.LANG=function(e){var t=e?e.split("-"):[],n=t.length;if(0===n)return"en_US.UTF-8";if(1===n){var i={de:"DE",en:"US",es:"ES",fi:"FI",fr:"FR",it:"IT",ja:"JP",ko:"KR",pl:"PL",ru:"RU",zh:"CN"};t[0]in i&&t.push(i[t[0]])}else t[1]=t[1].toUpperCase();return t.join("_")+".UTF-8"}(i),r&&a&&(l.PTYCOLS=r.toString(),l.PTYROWS=a.toString()),l.AMD_ENTRYPOINT="vs/workbench/parts/terminal/node/terminalProcess",l},t.resolveConfigurationVariables=function(e,t,n){return Object.keys(t).forEach(function(i){
"string"==typeof t[i]&&(t[i]=e.resolve(n,t[i]))}),t},t.getCwd=l,t.preparePathForTerminal=function(e){if(r.isWindows)return/\s+/.test(e)?'"'+e+'"':e;e=e.replace(/(%5C|\\)/g,"\\\\");for(var t=[" ","'",'"',"?",":",";","!","*","(",")","{","}","[","]"],n=0;n<e.length;n++)t.indexOf(e.charAt(n))>=0&&(e=e.substring(0,n)+"\\"+e.charAt(n)+e.substring(n+1),n++);return e}}),define(e[1177],t([1,0,1596,94,5]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.terminalId=t,s._terminalService=o,s.connected=!0,s._disposables=[],s._terminalService.requestExtHostProcess(s,n,i,r),s}return n(t,e),t.prototype.dispose=function(){this._disposables.forEach(function(e){return e.dispose()}),this._disposables.length=0},t.prototype.emitData=function(e){this.emit("message",{type:"data",content:e})},t.prototype.emitTitle=function(e){this.emit("message",{type:"title",content:e})},t.prototype.emitPid=function(e){this.emit("message",{
type:"pid",content:e})},t.prototype.emitExit=function(e){this.emit("exit",e),this.dispose()},t.prototype.send=function(e){switch(e.event){case"input":this.emit("input",e.data);break;case"resize":this.emit("resize",e.cols,e.rows);break;case"shutdown":this.emit("shutdown")}return!0},t.prototype.onInput=function(e){var t=this,n=function(t){return e(t)};this.on("input",n),this._disposables.push(o.toDisposable(function(){return t.removeListener("input",n)}))},t.prototype.onResize=function(e){var t=this,n=function(t,n){return e(t,n)};this.on("resize",n),this._disposables.push(o.toDisposable(function(){return t.removeListener("resize",n)}))},t.prototype.onShutdown=function(e){var t=this,n=function(){return e()};this.on("shutdown",n),this._disposables.push(o.toDisposable(function(){return t.removeListener("shutdown",n)}))},t=a([l(4,r.ITerminalService)],t)}(i.EventEmitter);t.TerminalProcessExtHostProxy=s}),define(e[1179],t([1,0,11,4,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var o,s=["cmd.exe","powershell.exe","bash.exe","wsl.exe","ubuntu.exe","ubuntu1804.exe","kali.exe","debian.exe","opensuse-42.exe","sles-12.exe"],a=function(){function t(t,i,s){var a=this;if(this._rootProcessId=t,this._terminalInstance=i,this._xterm=s,!n.isWindows)throw new Error("WindowsShellHelper cannot be instantiated on "+n.platform);this._isDisposed=!1,new Promise(function(t,n){e(["windows-process-tree"],t,n)}).then(function(e){a._isDisposed||(o=e,a._onCheckShell=new r.Emitter,r.debounceEvent(a._onCheckShell.event,function(e,t){return t},150,!0)(function(){setTimeout(function(){a.checkShell()},50)}),a._xterm.on("linefeed",function(){return a._newLineFeed=!0}),a._xterm.on("cursormove",function(){a._newLineFeed&&a._onCheckShell.fire()}),a._xterm.on("keypress",function(){return a._onCheckShell.fire()}))})}return t.prototype.checkShell=function(){var e=this;n.isWindows&&this._terminalInstance.isTitleSetByProcess&&this.getShellName().then(function(t){e._isDisposed||e._terminalInstance.setTitle(t,!0)})},
t.prototype.traverseTree=function(e){if(!e)return"";if(-1===s.indexOf(e.name))return e.name;if(!e.children||0===e.children.length)return e.name;for(var t=0;t<e.children.length;t++){var n=e.children[t];if(!n.children||0===n.children.length)break;if("conhost.exe"!==n.children[0].name)break}return t>=e.children.length?e.name:this.traverseTree(e.children[t])},t.prototype.dispose=function(){this._isDisposed=!0},t.prototype.getShellName=function(){var e=this;return this._isDisposed?i.TPromise.as(""):this._currentRequest?this._currentRequest:(this._currentRequest=new i.TPromise(function(t){o.getProcessTree(e._rootProcessId,function(n){var i=e.traverseTree(n);e._currentRequest=null,t(i)})}),this._currentRequest)},t}();t.WindowsShellHelper=a}),define(e[1180],t([1,0,742,31,16,56,220,179,10,4,23]),function(e,t,i,r,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.urlService=i,o.quickInputService=r,o}return n(t,e),
t.prototype.run=function(){return o(this,void 0,f.TPromise,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return[4,this.quickInputService.input({prompt:"URL to open"})];case 1:return e=n.sent(),t=p.default.parse(e),this.urlService.open(t),[2]}})})},t.ID="workbench.action.url.openUrl",t.LABEL=i.localize(0,null),t=a([l(2,d.IURLService),l(3,h.IQuickInputService)],t)}(g.Action);t.OpenUrlAction=v,c.Registry.as(u.Extensions.WorkbenchActions).registerWorkbenchAction(new r.SyncActionDescriptor(v,v.ID,v.LABEL),"OpenUrl",i.localize(1,null))}),define(e[362],t([1,0,15,124]),function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FOCUS=new i.RawContextKey("webviewEditorFocus",!1),t.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FIND_WIDGET_INPUT_FOCUSED=new i.RawContextKey("webviewEditorFindWidgetInputFocused",!1),t.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE=new i.RawContextKey("webviewFindWidgetVisible",!1);var o=function(e){function i(n,i,r,o){
var s=e.call(this,n,i,r)||this;return o&&(s.contextKey=t.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FOCUS.bindTo(o),s.findInputFocusContextKey=t.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FIND_WIDGET_INPUT_FOCUSED.bindTo(o),s.findWidgetVisible=t.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(o)),s}return n(i,e),i.prototype.showFind=function(){this._webview&&(this._webview.showFind(),this.findWidgetVisible.set(!0))},i.prototype.hideFind=function(){this.findWidgetVisible.reset(),this._webview&&this._webview.hideFind()},Object.defineProperty(i.prototype,"isWebviewEditor",{get:function(){return!0},enumerable:!0,configurable:!0}),i.prototype.reload=function(){this._webview&&this._webview.reload()},i.prototype.layout=function(e){this._webview&&this._webview.layout()},i.prototype.focus=function(){this._webview&&this._webview.focus()},i}(r.BaseEditor);t.BaseWebviewEditor=o}),define(e[1182],t([1,0,428,35,15]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,i){
var r=e.call(this,n,i)||this;return r.webview=t,r}return n(t,e),t.prototype.dispose=function(){this.webview=void 0,e.prototype.dispose.call(this)},t.prototype.find=function(e){var t=this.inputValue;t&&this.webview.find(t,{findNext:!0,forward:!e})},t.prototype.hide=function(){e.prototype.hide.call(this),this.webview.stopFind(!0),this.webview.focus()},t.prototype.onInputChanged=function(){var e=this.inputValue;e?this.webview.startFind(e):this.webview.stopFind(!1)},t.prototype.onFocusTrackerFocus=function(){this.webview.notifyFindWidgetFocusChanged(!0)},t.prototype.onFocusTrackerBlur=function(){this.webview.notifyFindWidgetFocusChanged(!1)},t.prototype.onFindInputFocusTrackerFocus=function(){this.webview.notifyFindWidgetInputFocusChanged(!0)},t.prototype.onFindInputFocusTrackerBlur=function(){this.webview.notifyFindWidgetInputFocusChanged(!1)},t=a([l(1,r.IContextViewService),l(2,o.IContextKeyService)],t)}(i.SimpleFindWidget);t.WebviewFindWidget=s}),define(e[1183],t([1,0,34,28,36,11,76]),function(e,t,n,i,r,o,s){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t,n){this.storageService=e,this.telemetryService=n,this.appName=s.default.nameLong,s.default.welcomePage&&(t.skipGettingStarted||t.isExtensionDevelopment||(this.welcomePageURL=s.default.welcomePage,this.handleWelcome()))}return e.prototype.getUrl=function(e){return this.welcomePageURL+"&&from="+this.appName+"&&id="+e.machineId},e.prototype.openExternal=function(e){o.isLinux&&o.isRootUser()||window.open(e)},e.prototype.handleWelcome=function(){var t=this;if(navigator.onLine){!this.storageService.get(e.hideWelcomeSettingskey)&&this.welcomePageURL&&this.telemetryService.getTelemetryInfo().then(function(n){var i=t.getUrl(n);t.openExternal(i),t.storageService.store(e.hideWelcomeSettingskey,!0)})}},e.hideWelcomeSettingskey="workbench.hide.welcome",e=a([l(0,n.IStorageService),l(1,r.IEnvironmentService),l(2,i.ITelemetryService)],e)}();t.GettingStarted=c}),
define(e[1184],t([1,0,34,28,76,88,22,10,746,9,42]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(t,n,i,o,a,l){r.default.telemetryOptOutUrl&&!t.get(e.TELEMETRY_OPT_OUT_SHOWN)&&Promise.all([o.isFocused(),a.getWindowCount()]).then(function(o){var a=o[0],d=o[1];if(!a&&d>1)return null;t.store(e.TELEMETRY_OPT_OUT_SHOWN,!0);var h=r.default.telemetryOptOutUrl,p=r.default.privacyStatementUrl||r.default.telemetryOptOutUrl,f=u.localize(0,null,p,h),g=u.localize(1,null,p,h);i.prompt(s.Severity.Info,l.isOptedIn?f:g,[{label:u.localize(2,null),run:function(){return n.open(c.default.parse(h))}}])}).then(null,d.onUnexpectedError)}return e.TELEMETRY_OPT_OUT_SHOWN="workbench.telemetryOptOutShown",e=a([l(0,n.IStorageService),l(1,o.IOpenerService),l(2,s.INotificationService),l(3,h.IWindowService),l(4,h.IWindowsService),l(5,i.ITelemetryService)],e)}();t.TelemetryOptOut=p}),define(e[1185],t([1,0,16,1183,1184,75,38]),function(e,t,n,i,r,o,s){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),n.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(i.GettingStarted,s.LifecyclePhase.Running),n.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(r.TelemetryOptOut,s.LifecyclePhase.Eventually)}),define(e[1186],t([1,0,14,748]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.used=function(){},t.default=function(){
return'\n<div class="welcomePageContainer">\n\t<div class="welcomePage">\n\t\t<div class="title">\n\t\t\t<h1 class="caption">'+n.escape(i.localize(0,null))+'</h1>\n\t\t\t<p class="subtitle detail">'+n.escape(i.localize(1,null))+'</p>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="splash">\n\t\t\t\t<div class="section start">\n\t\t\t\t\t<h2 class="caption">'+n.escape(i.localize(2,null))+'</h2>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a href="command:workbench.action.files.newUntitledFile">'+n.escape(i.localize(3,null))+'</a></li>\n\t\t\t\t\t\t<li class="mac-only"><a href="command:workbench.action.files.openFileFolder">'+n.escape(i.localize(4,null))+'</a></li>\n\t\t\t\t\t\t<li class="windows-only linux-only"><a href="command:workbench.action.files.openFolder">'+n.escape(i.localize(5,null))+'</a></li>\n\t\t\t\t\t\t<li><a href="command:workbench.action.addRootFolder">'+n.escape(i.localize(6,null))+'</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div class="section recent">\n\t\t\t\t\t<h2 class="caption">'+n.escape(i.localize(7,null))+'</h2>\n\t\t\t\t\t<ul class="list">\n\t\t\t\t\t\t\x3c!-- Filled programmatically --\x3e\n\t\t\t\t\t\t<li class="moreRecent"><a href="command:workbench.action.openRecent">'+n.escape(i.localize(8,null))+'</a><span class="path detail if_shortcut" data-command="workbench.action.openRecent">(<span class="shortcut" data-command="workbench.action.openRecent"></span>)</span></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p class="none detail">'+n.escape(i.localize(9,null))+'</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="section help">\n\t\t\t\t\t<h2 class="caption">'+n.escape(i.localize(10,null))+'</h2>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li class="keybindingsReferenceLink"><a href="command:workbench.action.keybindingsReference">'+n.escape(i.localize(11,null))+'</a></li>\n\t\t\t\t\t\t<li><a href="command:workbench.action.openIntroductoryVideosUrl">'+n.escape(i.localize(12,null))+'</a></li>\n\t\t\t\t\t\t<li><a href="command:workbench.action.openTipsAndTricksUrl">'+n.escape(i.localize(13,null))+'</a></li>\n\t\t\t\t\t\t<li><a href="command:workbench.action.openDocumentationUrl">'+n.escape(i.localize(14,null))+'</a></li>\n\t\t\t\t\t\t<li><a href="https://github.com/Microsoft/vscode">'+n.escape(i.localize(15,null))+'</a></li>\n\t\t\t\t\t\t<li><a href="http://stackoverflow.com/questions/tagged/vscode?sort=votes&pageSize=50">'+n.escape(i.localize(16,null))+'</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<p class="showOnStartup"><input type="checkbox" id="showOnStartup" class="checkbox"> <label class="caption" for="showOnStartup">'+n.escape(i.localize(17,null))+'</label></p>\n\t\t\t</div>\n\t\t\t<div class="commands">\n\t\t\t\t<div class="section customize">\n\t\t\t\t\t<h2 class="caption">'+n.escape(i.localize(18,null))+'</h2>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li class="showLanguageExtensions"><button role="group" data-href="command:workbench.extensions.action.showLanguageExtensions"><h3 class="caption">'+n.escape(i.localize(19,null))+'</h3> <span class="detail">'+n.escape(i.localize(20,null)).replace("{0}",'<span class="extensionPackList"></span>').replace("{1}",'<a href="command:workbench.extensions.action.showLanguageExtensions">'+n.escape(i.localize(21,null))+"</a>")+'\n\t\t\t\t\t\t</span></button></li>\n\t\t\t\t\t\t<li class="showRecommendedKeymapExtensions"><button role="group" data-href="command:workbench.extensions.action.showRecommendedKeymapExtensions"><h3 class="caption">'+n.escape(i.localize(22,null))+'</h3> <span class="detail">'+n.escape(i.localize(23,null)).replace("{0}",'<span class="keymapList"></span>').replace("{1}",'<a href="command:workbench.extensions.action.showRecommendedKeymapExtensions">'+n.escape(i.localize(24,null))+"</a>")+'\n\t\t\t\t\t\t</span></button></li>\n\t\t\t\t\t\t<li class="selectTheme"><button data-href="command:workbench.action.selectTheme"><h3 class="caption">'+n.escape(i.localize(25,null))+'</h3> <span class="detail">'+n.escape(i.localize(26,null))+'</span></button></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div class="section learn">\n\t\t\t\t\t<h2 class="caption">'+n.escape(i.localize(27,null))+'</h2>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li class="showCommands"><button data-href="command:workbench.action.showCommands"><h3 class="caption">'+n.escape(i.localize(28,null))+'</h3> <span class="detail">'+n.escape(i.localize(29,null)).replace("{0}",'<span class="shortcut" data-command="workbench.action.showCommands"></span>')+'</span></button></li>\n\t\t\t\t\t\t<li class="showInterfaceOverview"><button data-href="command:workbench.action.showInterfaceOverview"><h3 class="caption">'+n.escape(i.localize(30,null))+'</h3> <span class="detail">'+n.escape(i.localize(31,null))+'</span></button></li>\n\t\t\t\t\t\t<li class="showInteractivePlayground"><button data-href="command:workbench.action.showInteractivePlayground"><h3 class="caption">'+n.escape(i.localize(32,null))+'</h3> <span class="detail">'+n.escape(i.localize(33,null))+"</span></button></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"
}}),define(e[405],t([1,0,26]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExtraColor=function(e,t,i){var r=e.getColor(t);if(r)return r;if("dark"===e.type){var o=e.getColor(n.editorBackground);if(o&&o.getRelativeLuminance()<.004)return i.extra_dark}return i[e.type]}}),define(e[175],t([1,0,6]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.descriptorFn=e}return e.prototype.getDescription=function(){return this.descriptorFn(null)},e}();t.BaseBadge=r;var o=function(e){function t(t,n){var i=e.call(this,n)||this;return i.number=t,i}return n(t,e),t.prototype.getDescription=function(){return this.descriptorFn(this.number)},t}(r);t.NumberBadge=o;var s=function(e){function t(t,n){var i=e.call(this,n)||this;return i.text=t,i}return n(t,e),t}(r);t.TextBadge=s;var a=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t}(r);t.IconBadge=a;var c=function(e){function t(){
return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(r);t.ProgressBadge=c,t.IActivityService=i.createDecorator("activityService")}),define(e[238],t([1,0,1498,23,4,8,74,41,29,5,35,12,175,6,26,182,37,7]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(t){var n=e.call(this,t.id,t.name,t.cssClass)||this;return n._activity=t,n._onDidChangeActivity=new S.Emitter,n._onDidChangeBadge=new S.Emitter,n.badge=null,n}return n(t,e),Object.defineProperty(t.prototype,"activity",{get:function(){return this._activity},set:function(e){this._activity=e,this._onDidChangeActivity.fire(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidChangeActivity",{get:function(){return this._onDidChangeActivity.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidChangeBadge",{get:function(){return this._onDidChangeBadge.event},enumerable:!0,configurable:!0}),t.prototype.activate=function(){
this.checked||this._setChecked(!0)},t.prototype.deactivate=function(){this.checked&&this._setChecked(!1)},t.prototype.getBadge=function(){return this.badge},t.prototype.getClass=function(){return this.clazz},t.prototype.setBadge=function(e,t){this.badge=e,this.clazz=t,this._onDidChangeBadge.fire(this)},t}(r.Action);t.ActivityAction=_;var C=function(e){function t(t,n,i){var r=e.call(this,null,t,n)||this;return r.themeService=i,r.badgeDisposable=h.empty,r.themeService.onThemeChange(r.onThemeChange,r,r._callOnDispose),t.onDidChangeActivity(r.updateActivity,r,r._callOnDispose),t.onDidChangeBadge(r.updateBadge,r,r._callOnDispose),r}return n(t,e),Object.defineProperty(t.prototype,"activity",{get:function(){return this._action.activity},enumerable:!0,configurable:!0}),t.prototype.updateStyles=function(){var e=this.themeService.getTheme();if(this.$label&&this.options.icon){var t=e.getColor(this.options.colors.backgroundColor);this.$label.style("background-color",t?t.toString():null)}if(this.$badgeContent){
var n=e.getColor(this.options.colors.badgeForeground),i=e.getColor(this.options.colors.badgeBackground),r=e.getColor(m.contrastBorder);this.$badgeContent.style("color",n?n.toString():null),this.$badgeContent.style("background-color",i?i.toString():null),this.$badgeContent.style("border-style",r?"solid":null),this.$badgeContent.style("border-width",r?"1px":null),this.$badgeContent.style("border-color",r?r.toString():null)}},t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.$container=c.$(t).attr({tabIndex:"0",role:"button"}),this.$container.on(s.EventType.MOUSE_DOWN,function(){n.$container.addClass("clicked")}),this.$container.on(s.EventType.MOUSE_UP,function(){n.mouseUpTimeout&&clearTimeout(n.mouseUpTimeout),n.mouseUpTimeout=setTimeout(function(){n.$container.removeClass("clicked")},800)}),this.$label=c.$("a.action-label").appendTo(this.builder),this.$badge=this.builder.clone().div({class:"badge"},function(e){n.$badgeContent=e.div({class:"badge-content"})}),this.$badge.hide(),
this.updateActivity(),this.updateStyles()},t.prototype.onThemeChange=function(e){this.updateStyles()},t.prototype.updateActivity=function(){this.updateLabel(),this.updateTitle(this.activity.name),this.updateBadge()},t.prototype.updateBadge=function(){var e=this,t=this.getAction();if(this.$badge&&this.$badgeContent&&t instanceof _){var n=t.getBadge(),r=t.getClass();if(this.badgeDisposable.dispose(),this.badgeDisposable=h.empty,this.$badgeContent.empty(),this.$badge.hide(),n){if(n instanceof g.NumberBadge){if(n.number){var o=n.number.toString();n.number>9999?o=i.localize(0,null):n.number>999&&(o=o.charAt(0)+"k"),this.$badgeContent.text(o),this.$badge.show()}}else n instanceof g.TextBadge?(this.$badgeContent.text(n.text),this.$badge.show()):n instanceof g.IconBadge?this.$badge.show():n instanceof g.ProgressBadge&&this.$badge.show();r&&(this.$badge.addClass(r),this.badgeDisposable=h.toDisposable(function(){return e.$badge.removeClass(r)}))}var s
;s=n&&n.getDescription()?this.activity.name?i.localize(1,null,this.activity.name,n.getDescription()):n.getDescription():this.activity.name,this.updateTitle(s)}},t.prototype.updateLabel=function(){this.activity.cssClass&&this.$label.addClass(this.activity.cssClass),this.options.icon||this.$label.text(this.getAction().label)},t.prototype.updateTitle=function(e){[this.$label,this.$badge,this.$container].forEach(function(t){t&&(t.attr("aria-label",e),t.title(e))})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.mouseUpTimeout&&clearTimeout(this.mouseUpTimeout),this.$badge.destroy()},t=a([l(2,f.IThemeService)],t)}(u.BaseActionItem);t.ActivityActionItem=C;var E=function(e){function t(t){var n=e.call(this,{id:"additionalComposites.action",name:i.localize(2,null),cssClass:"toggle-more"})||this;return n.showMenu=t,n}return n(t,e),t.prototype.run=function(e){return this.showMenu(),o.TPromise.as(!0)},t}(_);t.CompositeOverflowActivityAction=E;var w=function(e){function t(t,n,i,r,o,s,a,c){
var l=e.call(this,t,{icon:!0,colors:s},c)||this;return l.getOverflowingComposites=n,l.getActiveCompositeId=i,l.getBadge=r,l.getCompositeOpenAction=o,l.contextMenuService=a,l}return n(t,e),t.prototype.showMenu=function(){var e=this;this.actions&&h.dispose(this.actions),this.actions=this.getActions(),this.contextMenuService.showContextMenu({getAnchor:function(){return e.builder.getHTMLElement()},getActions:function(){return o.TPromise.as(e.actions)},onHide:function(){return h.dispose(e.actions)}})},t.prototype.getActions=function(){var e=this;return this.getOverflowingComposites().map(function(t){var n=e.getCompositeOpenAction(t.id);n.radio=e.getActiveCompositeId()===n.id;var r,o=e.getBadge(t.id);return o instanceof g.NumberBadge?r=o.number:o instanceof g.TextBadge&&(r=o.text),n.label=r?i.localize(3,null,t.name,r):t.name,n})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.actions=h.dispose(this.actions)},t=a([l(6,p.IContextMenuService),l(7,f.IThemeService)],t)}(C)
;t.CompositeOverflowActivityActionItem=w;var I=function(e){function t(t){var n=e.call(this,"activitybar.manage.extension",i.localize(4,null))||this;return n.commandService=t,n}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand("_extensions.manage",e)},t=a([l(0,d.ICommandService)],t)}(r.Action),T=function(e){function t(n,i,r,o,s,a,c,l,u){var d=e.call(this,n,{draggable:!0,colors:r,icon:o},u)||this;return d.compositeActivityAction=n,d.toggleCompositePinnedAction=i,d.compositeBar=s,d.contextMenuService=a,d.keybindingService=c,d.cssClass=n.class,t.manageExtensionAction||(t.manageExtensionAction=l.createInstance(I)),n.onDidChangeActivity(function(){d.compositeActivity=null,d.updateActivity()},d,d._callOnDispose),d}return n(t,e),Object.defineProperty(t.prototype,"activity",{get:function(){if(!this.compositeActivity){var e=void 0,t=this.getKeybindingLabel(this.compositeActivityAction.activity.keybindingId)
;e=t?i.localize(5,null,this.compositeActivityAction.activity.name,t):this.compositeActivityAction.activity.name,this.compositeActivity={id:this.compositeActivityAction.activity.id,cssClass:this.cssClass,name:e}}return this.compositeActivity},enumerable:!0,configurable:!0}),t.prototype.getKeybindingLabel=function(e){var t=this.keybindingService.lookupKeybinding(e);return t?t.getLabel():null},t.prototype.render=function(n){var i=this;e.prototype.render.call(this,n),this._updateChecked(),this._updateEnabled(),this.$container.on("contextmenu",function(e){s.EventHelper.stop(e,!0),i.showContextMenu(n)}),this.$container.on(s.EventType.DRAG_START,function(e){e.dataTransfer.effectAllowed="move",i.setDraggedComposite(i.activity.id),i.getAction().checked||i.getAction().run()});var r=0;this.$container.on(s.EventType.DRAG_ENTER,function(e){var o=t.getDraggedCompositeId();o&&o!==i.activity.id&&(r++,i.updateFromDragging(n,!0))}),this.$container.on(s.EventType.DRAG_LEAVE,function(e){
t.getDraggedCompositeId()&&0===--r&&i.updateFromDragging(n,!1)}),this.$container.on(s.EventType.DRAG_END,function(e){t.getDraggedCompositeId()&&(r=0,i.updateFromDragging(n,!1),t.clearDraggedComposite())}),this.$container.on(s.EventType.DROP,function(e){s.EventHelper.stop(e,!0);var r=t.getDraggedCompositeId();r&&r!==i.activity.id&&(i.updateFromDragging(n,!1),t.clearDraggedComposite(),i.compositeBar.move(r,i.activity.id))}),[this.$badge,this.$label].forEach(function(e){return new y.DelayedDragHandler(e.getHTMLElement(),function(){t.getDraggedCompositeId()||i.getAction().checked||i.getAction().run()})}),this.updateStyles()},t.prototype.updateFromDragging=function(e,t){var n=this.themeService.getTheme().getColor(this.options.colors.dragAndDropBackground);e.style.backgroundColor=t&&n?n.toString():null},t.getDraggedCompositeId=function(){return t.draggedCompositeId},t.prototype.setDraggedComposite=function(e){t.draggedCompositeId=e},t.clearDraggedComposite=function(){t.draggedCompositeId=void 0},
t.prototype.showContextMenu=function(e){var n=this,r=[this.toggleCompositePinnedAction];this.compositeActivityAction.activity.extensionId&&(r.push(new u.Separator),r.push(t.manageExtensionAction));this.compositeBar.isPinned(this.activity.id)?(this.toggleCompositePinnedAction.label=i.localize(6,null),this.toggleCompositePinnedAction.checked=!1):this.toggleCompositePinnedAction.label=i.localize(7,null),this.contextMenuService.showContextMenu({getAnchor:function(){return e},getActionsContext:function(){return n.activity.id},getActions:function(){return o.TPromise.as(r)}})},t.prototype.focus=function(){this.$container.domFocus()},t.prototype._updateClass=function(){this.cssClass&&this.$label.removeClass(this.cssClass),this.cssClass=this.getAction().class,this.cssClass&&this.$label.addClass(this.cssClass)},t.prototype._updateChecked=function(){this.getAction().checked?this.$container.addClass("checked"):this.$container.removeClass("checked")},t.prototype._updateEnabled=function(){
this.getAction().enabled?this.builder.removeClass("disabled"):this.builder.addClass("disabled")},t.prototype.dispose=function(){e.prototype.dispose.call(this),t.clearDraggedComposite(),this.$label.destroy()},t=a([l(5,p.IContextMenuService),l(6,b.IKeybindingService),l(7,v.IInstantiationService),l(8,f.IThemeService)],t)}(C);t.CompositeActionItem=T;var x=function(e){function t(t,n){var r=e.call(this,"show.toggleCompositePinned",t?t.name:i.localize(8,null))||this;return r.activity=t,r.compositeBar=n,r.checked=r.activity&&r.compositeBar.isPinned(r.activity.id),r}return n(t,e),t.prototype.run=function(e){var t=this.activity?this.activity.id:e;return this.compositeBar.isPinned(t)?this.compositeBar.unpin(t):this.compositeBar.pin(t),o.TPromise.as(!0)},t}(r.Action);t.ToggleCompositePinnedAction=x}),define(e[408],t([1,0,1494,9,20,5,34,6,41,238,4,8,82,35,92]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t,n,i,r){var o=e.call(this)||this
;return o.options=t,o.instantiationService=n,o.storageService=i,o.contextMenuService=r,o.model=new b(t),o.storedState=o.loadCompositeItemsFromStorage(),o.visibleComposites=[],o.compositeSizeInBar=new Map,o}return n(t,e),t.prototype.getCompositesFromStorage=function(){return this.storedState.map(function(e){return e.id})},t.prototype.create=function(e){var t=this,n=e.appendChild(f.$(".composite-bar"));return this.compositeSwitcherBar=this._register(new d.ActionBar(n,{actionItemProvider:function(e){if(e instanceof h.CompositeOverflowActivityAction)return t.compositeOverflowActionItem;var n=t.model.findItem(e.id);return n&&t.instantiationService.createInstance(h.CompositeActionItem,e,n.pinnedAction,t.options.colors,t.options.icon,t)},orientation:this.options.orientation,ariaLabel:i.localize(0,null),animated:!1})),this._register(f.addDisposableListener(e,f.EventType.CONTEXT_MENU,function(e){return t.showContextMenu(e)})),this._register(f.addDisposableListener(e,f.EventType.DROP,function(e){
var n=h.CompositeActionItem.getDraggedCompositeId();if(n){f.EventHelper.stop(e,!0),h.CompositeActionItem.clearDraggedComposite();var i=t.model.items[t.model.items.length-1];i&&i.id!==n&&t.move(n,i.id)}})),n},t.prototype.layout=function(e){this.dimension=e,0!==e.height&&0!==e.width&&(0===this.compositeSizeInBar.size&&this.computeSizes(this.model.items),this.updateCompositeSwitcher())},t.prototype.addComposite=function(e){var t=e.id,n=e.name,i=e.order,r=this.storedState.filter(function(e){return e.id===t})[0],o=!r||r.pinned,s=i>=0?i:this.model.items.length;if(r){s=0;for(var a=this.storedState.indexOf(r)-1;a>=0;a--){var c=this.storedState[a].id,l=this.model.findIndex(c);if(-1!==l){s=l+1;break}}}this.model.add(t,n,i,s)&&(this.computeSizes([this.model.findItem(t)]),o?this.pin(t):this.updateCompositeSwitcher())},t.prototype.removeComposite=function(e){this.isPinned(e)&&this.unpin(e),this.model.remove(e)&&this.updateCompositeSwitcher()},t.prototype.activateComposite=function(e){var t=this.model.activeItem
;this.model.activate(e)&&(-1===this.visibleComposites.indexOf(e)||!this.model.activeItem.pinned||t&&!t.pinned)&&this.updateCompositeSwitcher()},t.prototype.deactivateComposite=function(e){var t=this.model.activeItem;this.model.deactivate()&&t&&!t.pinned&&this.updateCompositeSwitcher()},t.prototype.showActivity=function(e,t,n,i){var o=this;if(!t)throw r.illegalArgument("badge");"number"!=typeof i&&(i=0);var a={badge:t,clazz:n,priority:i};return this.model.addActivity(e,a),s.toDisposable(function(){return o.model.removeActivity(e,a)})},t.prototype.pin=function(e,t){var n=this;this.model.setPinned(e,!0)&&(this.updateCompositeSwitcher(),t&&this.options.openComposite(e).done(function(){return n.activateComposite(e)}))},t.prototype.unpin=function(e){if(this.model.setPinned(e,!1)){this.updateCompositeSwitcher();var t=this.options.getDefaultCompositeId();if(!this.model.activeItem||this.model.activeItem.id!==e)return;this.deactivateComposite(e),
t!==e&&this.isPinned(t)?this.options.openComposite(t):1===this.visibleComposites.length?this.options.hidePart():this.options.openComposite(this.visibleComposites.filter(function(t){return t!==e})[0])}},t.prototype.isPinned=function(e){var t=this.model.findItem(e);return t&&t.pinned},t.prototype.move=function(e,t){var n=this;this.model.move(e,t)&&setTimeout(function(){return n.updateCompositeSwitcher()},0)},t.prototype.getAction=function(e){var t=this.model.findItem(e);return t&&t.activityAction},t.prototype.computeSizes=function(e){var t=this,n=this.options.compositeSize;if(n)e.forEach(function(e){return t.compositeSizeInBar.set(e.id,n)});else if(this.dimension&&0!==this.dimension.height&&0!==this.dimension.width){var i=this.compositeSwitcherBar.items.length;this.compositeSwitcherBar.push(e.map(function(e){return e.activityAction})),e.map(function(e,n){
return t.compositeSizeInBar.set(e.id,t.options.orientation===d.ActionsOrientation.VERTICAL?t.compositeSwitcherBar.getHeight(i+n):t.compositeSwitcherBar.getWidth(i+n))}),e.forEach(function(){return t.compositeSwitcherBar.pull(t.compositeSwitcherBar.items.length-1)})}},t.prototype.updateCompositeSwitcher=function(){var e=this;if(this.compositeSwitcherBar&&this.dimension){for(var t=this.model.items.filter(function(t){return t.pinned||e.model.activeItem&&e.model.activeItem.id===t.id}).map(function(e){return e.id}),n=!1,i=t.length,r=0,s=this.options.orientation===d.ActionsOrientation.VERTICAL?this.dimension.height:this.dimension.width,a=0;a<t.length&&r<=s;a++)(r+=this.compositeSizeInBar.get(t[a]))>s&&(i=a);if((n=t.length>i)&&(r-=this.compositeSizeInBar.get(t[i]),t=t.slice(0,i),r+=this.options.overflowActionSize),r>s&&(r-=this.compositeSizeInBar.get(t.pop())),this.model.activeItem&&t.every(function(t){return t!==e.model.activeItem.id})){var c=t.pop()
;r=r-this.compositeSizeInBar.get(c)+this.compositeSizeInBar.get(this.model.activeItem.id),t.push(this.model.activeItem.id)}r>s&&(t.length?t.splice(t.length-2,1):t.pop());var l=!o.equals(t,this.visibleComposites);this.compositeOverflowAction&&l&&(this.compositeSwitcherBar.pull(this.compositeSwitcherBar.length()-1),this.compositeOverflowAction.dispose(),this.compositeOverflowAction=null,this.compositeOverflowActionItem.dispose(),this.compositeOverflowActionItem=null);var u=[];this.visibleComposites.forEach(function(e,n){-1===t.indexOf(e)&&u.push(n)}),u.reverse().forEach(function(t){var n=e.compositeSwitcherBar.items[t];e.compositeSwitcherBar.pull(t),n.dispose(),e.visibleComposites.splice(t,1)}),t.forEach(function(t,n){var i=e.visibleComposites.indexOf(t);if(n!==i){if(-1!==i){var r=e.compositeSwitcherBar.items[i];e.compositeSwitcherBar.pull(i),r.dispose(),e.visibleComposites.splice(i,1)}e.compositeSwitcherBar.push(e.model.findItem(t).activityAction,{label:!0,icon:e.options.icon,index:n}),
e.visibleComposites.splice(n,0,t)}}),(l&&n||0===this.compositeSwitcherBar.length())&&(this.compositeOverflowAction=this.instantiationService.createInstance(h.CompositeOverflowActivityAction,function(){return e.compositeOverflowActionItem.showMenu()}),this.compositeOverflowActionItem=this.instantiationService.createInstance(h.CompositeOverflowActivityActionItem,this.compositeOverflowAction,function(){return e.getOverflowingComposites()},function(){return e.model.activeItem?e.model.activeItem.id:void 0},function(t){var n=e.model.findItem(t);return n&&n.activity[0]&&n.activity[0].badge},this.options.getOnCompositeClickAction,this.options.colors),this.compositeSwitcherBar.push(this.compositeOverflowAction,{label:!1,icon:!0})),this.saveCompositeItems()}},t.prototype.getOverflowingComposites=function(){var e=this,t=this.model.items.filter(function(e){return e.pinned}).map(function(e){return e.id});return this.model.activeItem&&!this.model.activeItem.pinned&&t.push(this.model.activeItem.id),t=t.filter(function(t){
return-1===e.visibleComposites.indexOf(t)}),this.model.items.filter(function(e){return-1!==t.indexOf(e.id)})},t.prototype.showContextMenu=function(e){var t=this;f.EventHelper.stop(e,!0);var n=new g.StandardMouseEvent(e),i=this.model.items.map(function(e){var n=e.id,i=e.name,r=e.activityAction;return{id:n,label:i,checked:t.isPinned(n),enabled:r.enabled,run:function(){t.isPinned(n)?t.unpin(n):t.pin(n,!0)}}}),r=this.options.getContextMenuActions();r.length&&(i.push(new d.Separator),i.push.apply(i,r)),this.contextMenuService.showContextMenu({getAnchor:function(){return{x:n.posx,y:n.posy}},getActions:function(){return p.TPromise.as(i)}})},t.prototype.loadCompositeItemsFromStorage=function(){return JSON.parse(this.storageService.get(this.options.storageId,c.StorageScope.GLOBAL,"[]")).map(function(e){return"string"==typeof e?{id:e,pinned:!0}:e})},t.prototype.saveCompositeItems=function(){this.storedState=this.model.toJSON(),
this.storageService.store(this.options.storageId,JSON.stringify(this.storedState),c.StorageScope.GLOBAL)},t=a([l(1,u.IInstantiationService),l(2,c.IStorageService),l(3,v.IContextMenuService)],t)}(m.Widget);t.CompositeBar=y;var b=function(){function e(e){this.options=e,this.items=[]}return e.prototype.createCompositeBarItem=function(e,t,n,i){var r=this.options;return{id:e,name:t,pinned:i,order:n,activity:[],get activityAction(){return r.getActivityAction(e)},get pinnedAction(){return r.getCompositePinnedAction(e)}}},e.prototype.add=function(e,t,n,i){var r=this.findItem(e);if(r)return r.order=n,r.name=t,!1;if(void 0===i)for(i=0;i<this.items.length&&this.items[i].order<n;)i++;return this.items.splice(i,0,this.createCompositeBarItem(e,t,n,!1)),!0},e.prototype.remove=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].id===e)return this.items.splice(t,1),!0;return!1},e.prototype.move=function(e,t){var n=this.findIndex(e),i=this.findIndex(t);if(-1===n||-1===i)return!1;var r=this.items.splice(n,1)[0]
;return this.items.splice(i,0,r),r.pinned=!0,!0},e.prototype.setPinned=function(e,t){for(var n=0;n<this.items.length;n++){var i=this.items[n];if(i.id===e)return i.pinned!==t&&(i.pinned=t,!0)}return!1},e.prototype.addActivity=function(e,t){var n=this.findItem(e);if(n){for(var i=n.activity,r=0;r<=i.length;r++){if(r===i.length){i.push(t);break}if(i[r].priority<=t.priority){i.splice(r,0,t);break}}return this.updateActivity(e),!0}return!1},e.prototype.removeActivity=function(e,t){var n=this.findItem(e);if(n){var i=n.activity.indexOf(t);if(-1!==i)return n.activity.splice(i,1),this.updateActivity(e),!0}return!1},e.prototype.updateActivity=function(e){var t=this.findItem(e);if(t)if(t.activity.length){var n=t.activity[0],i=n.badge,r=n.clazz;t.activityAction.setBadge(i,r)}else t.activityAction.setBadge(void 0)},e.prototype.activate=function(e){if(!this.activeItem||this.activeItem.id!==e){this.activeItem&&this.deactivate();for(var t=0;t<this.items.length;t++){var n=this.items[t];if(n.id===e)return this.activeItem=n,
this.activeItem.activityAction.activate(),!0}}return!1},e.prototype.deactivate=function(){return!!this.activeItem&&(this.activeItem.activityAction.deactivate(),this.activeItem=void 0,!0)},e.prototype.findItem=function(e){return this.items.filter(function(t){return t.id===e})[0]},e.prototype.findIndex=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].id===e)return t;return-1},e.prototype.toJSON=function(){return this.items.map(function(e){return{id:e.id,pinned:e.pinned,order:e.order}})},e}()}),define(e[368],t([1,0,6,229,5,90,175,662,201,7,107,17,24,148,27,25]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMarkersWorkbenchService=i.createDecorator("markersWorkbenchService");var b=function(e){function t(t,n,i,o){var s=e.call(this)||this;return s.markerService=t,s.configurationService=n,s.workspaceContextService=i,s.activityService=o,s._onDidChange=s._register(new h.Emitter),s.onDidChange=s._onDidChange.event,s.useFilesExclude=!1,
s.markersModel=s._register(new r.MarkersModel(s.readMarkers())),s._register(t.onMarkerChanged(function(e){return s.onMarkerChanged(e)})),s._register(n.onDidChangeConfiguration(function(e){s.useFilesExclude&&e.affectsConfiguration("files.exclude")&&s.doFilter(s.markersModel.filterOptions.filter,s.getExcludeExpression())})),s}return n(t,e),t.prototype.filter=function(e){this.useFilesExclude=e.useFilesExclude,this.doFilter(e.filterText,this.getExcludeExpression())},t.prototype.onMarkerChanged=function(e){var t=this;this.markersModel.updateMarkers(function(n){for(var i=0,r=e;i<r.length;i++){var o=r[i];n(o,t.readMarkers(o))}}),this.refreshBadge(),this._onDidChange.fire(e)},t.prototype.readMarkers=function(e){return this.markerService.read({resource:e,severities:s.MarkerSeverity.Error|s.MarkerSeverity.Warning|s.MarkerSeverity.Info})},t.prototype.getExcludeExpression=function(){if(this.useFilesExclude){var e=this.workspaceContextService.getWorkspace().folders;if(e.length){
for(var t=v.getEmptyExpression(),n=0,i=e;n<i.length;n++){var r=i[n];g.mixin(t,this.getExcludesForFolder(r))}return t}return this.getFilesExclude()}return{}},t.prototype.doFilter=function(e,t){this.markersModel.updateFilterOptions(new r.FilterOptions(e,t)),this.refreshBadge(),this._onDidChange.fire([])},t.prototype.refreshBadge=function(){var e=this.markersModel.stats().total,t=u.localize(0,null,e);this.activityService.showActivity(d.default.MARKERS_PANEL_ID,new c.NumberBadge(e,function(){return t}))},t.prototype.getExcludesForFolder=function(e){var t=this.getFilesExclude(e.uri);return this.getAbsoluteExpression(t,e.uri.fsPath)},t.prototype.getFilesExclude=function(e){return g.deepClone(this.configurationService.getValue("files.exclude",{resource:e}))||{}},t.prototype.getAbsoluteExpression=function(e,t){return Object.keys(e).reduce(function(n,i){if(e[i]&&!y.isAbsolute(i)){n[y.join(t,i)]=e[i]}return n},Object.create(null))},
t=a([l(0,s.IMarkerService),l(1,f.IConfigurationService),l(2,m.IWorkspaceContextService),l(3,c.IActivityService)],t)}(o.Disposable);t.MarkersWorkbenchService=b,p.registerSingleton(t.IMarkersWorkbenchService,b)}),define(e[153],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBackupFileService=n.createDecorator("backupFileService"),t.BACKUP_FILE_RESOLVE_OPTIONS={acceptTextOnly:!0,encoding:"utf8"},t.BACKUP_FILE_UPDATE_OPTIONS={encoding:"utf8"}}),define(e[1193],t([1,0,5,4,213,181,33,54,47,7,18,153,127,66]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(n,i,r,o,s,a,c,l,u){var d=e.call(this,c,a)||this;return d.modeId=n,d.resource=i,d.hasAssociatedFilePath=r,d.initialValue=o,d.preferredEncoding=s,d.backupFileService=l,d.configurationService=u,d.dirty=!1,d.versionId=0,d.toDispose=[],d._onDidChangeContent=new h.Emitter,d.toDispose.push(d._onDidChangeContent),d._onDidChangeDirty=new h.Emitter,
d.toDispose.push(d._onDidChangeDirty),d._onDidChangeEncoding=new h.Emitter,d.toDispose.push(d._onDidChangeEncoding),d.contentChangeEventScheduler=new p.RunOnceScheduler(function(){return d._onDidChangeContent.fire()},t.DEFAULT_CONTENT_CHANGE_BUFFER_DELAY),d.toDispose.push(d.contentChangeEventScheduler),d.registerListeners(),d}return n(t,e),Object.defineProperty(t.prototype,"onDidChangeContent",{get:function(){return this._onDidChangeContent.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidChangeDirty",{get:function(){return this._onDidChangeDirty.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidChangeEncoding",{get:function(){return this._onDidChangeEncoding.event},enumerable:!0,configurable:!0}),t.prototype.getOrCreateMode=function(t,n,i){return n&&n!==s.PLAINTEXT_MODE_ID?e.prototype.getOrCreateMode.call(this,t,n,i):t.getOrCreateModeByFilenameOrFirstLine(this.resource.fsPath,i)},t.prototype.registerListeners=function(){var e=this
;this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationChange()}))},t.prototype.onConfigurationChange=function(){var e=this.configurationService.getValue(this.resource,"files.encoding");this.configuredEncoding!==e&&(this.configuredEncoding=e,this.preferredEncoding||this._onDidChangeEncoding.fire())},t.prototype.getVersionId=function(){return this.versionId},t.prototype.getModeId=function(){return this.textEditorModel?this.textEditorModel.getLanguageIdentifier().language:null},t.prototype.getEncoding=function(){return this.preferredEncoding||this.configuredEncoding},t.prototype.setEncoding=function(e){var t=this.getEncoding();this.preferredEncoding=e,t!==this.preferredEncoding&&this._onDidChangeEncoding.fire()},t.prototype.isDirty=function(){return this.dirty},t.prototype.setDirty=function(e){this.dirty!==e&&(this.dirty=e,this._onDidChangeDirty.fire())},t.prototype.getResource=function(){return this.resource},t.prototype.revert=function(){this.setDirty(!1),
this.contentChangeEventScheduler.schedule()},t.prototype.load=function(){var e=this;return this.backupFileService.loadBackupResource(this.resource).then(function(t){return t?e.backupFileService.resolveBackupContent(t):null}).then(function(t){var n=!!t;e.setDirty(e.hasAssociatedFilePath||n);var i;return i=t||v.createTextBufferFactory(e.initialValue||""),e.doLoad(i).then(function(t){return e.configuredEncoding=e.configurationService.getValue(e.resource,"files.encoding"),e.toDispose.push(e.textEditorModel.onDidChangeContent(function(){return e.onModelContentChanged()})),e.toDispose.push(e.textEditorModel.onDidChangeLanguage(function(){return e.onConfigurationChange()})),t})})},t.prototype.doLoad=function(e){var t=this;return this.textEditorModel?(this.updateTextEditorModel(e),r.TPromise.as(this)):this.createTextEditorModel(e,this.resource,this.modeId).then(function(e){return t})},t.prototype.onModelContentChanged=function(){this.versionId++,
this.hasAssociatedFilePath||1!==this.textEditorModel.getLineCount()||""!==this.textEditorModel.getLineContent(1)?this.setDirty(!0):this.setDirty(!1),this.contentChangeEventScheduler.schedule()},t.prototype.isReadonly=function(){return!1},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=i.dispose(this.toDispose)},t.DEFAULT_CONTENT_CHANGE_BUFFER_DELAY=c.CONTENT_CHANGE_EVENT_BUFFER_DELAY,t=a([l(5,u.IModeService),l(6,d.IModelService),l(7,f.IBackupFileService),l(8,g.ITextResourceConfigurationService)],t)}(o.BaseTextEditorModel);t.UntitledEditorModel=m}),define(e[411],t([1,0,59,163,87,10,18,153,33,4,406,66,50]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t){this.snapshot=e,this.preamble=t}return e.prototype.read=function(){var e=this.snapshot.read();return this.preambleHandled||(this.preambleHandled=!0,e="string"==typeof e?this.preamble+e:this.preamble),e},e}();t.BackupSnapshot=g;var v=function(){
function e(){this.cache=Object.create(null)}return e.prototype.resolve=function(e){var t=this;return r.readDirsInDir(e).then(function(i){return d.TPromise.join(i.map(function(i){var s=n.join(e,i);return r.readdir(s).then(function(e){e.forEach(function(e){var i=o.default.file(n.join(s,e));t.add(i)})})}))}).then(function(){return t},function(e){return t})},e.prototype.add=function(e,t){void 0===t&&(t=0),this.cache[e.toString()]=t},e.prototype.count=function(){return Object.keys(this.cache).length},e.prototype.has=function(e,t){var n=this.cache[e.toString()];return"number"==typeof n&&("number"!=typeof t||t===n)},e.prototype.get=function(){return Object.keys(this.cache).map(function(e){return o.default.parse(e)})},e.prototype.remove=function(e){delete this.cache[e.toString()]},e.prototype.clear=function(){this.cache=Object.create(null)},e}();t.BackupFilesModel=v;var m=function(){function e(e,t){this.fileService=t,this.isShuttingDown=!1,this.ioOperationQueues=new s.ResourceQueue,this.initialize(e)}
return e.prototype.initialize=function(e){this.backupWorkspacePath=e,this.ready=this.init()},e.prototype.init=function(){return(new v).resolve(this.backupWorkspacePath)},e.prototype.hasBackups=function(){return this.ready.then(function(e){return e.count()>0})},e.prototype.loadBackupResource=function(e){var t=this;return this.ready.then(function(n){var i=t.toBackupResource(e);if(n.has(i))return i})},e.prototype.backupResource=function(t,n,i){var r=this;return this.isShuttingDown?d.TPromise.as(void 0):this.ready.then(function(o){var s=r.toBackupResource(t);if(!o.has(s,i))return r.ioOperationQueues.queueFor(s).queue(function(){var a=""+t.toString()+e.META_MARKER;return r.fileService.updateContent(s,new g(n,a),c.BACKUP_FILE_UPDATE_OPTIONS).then(function(){return o.add(s,i)})})})},e.prototype.discardResourceBackup=function(e){var t=this;return this.ready.then(function(n){var i=t.toBackupResource(e);return t.ioOperationQueues.queueFor(i).queue(function(){return r.del(i.fsPath).then(function(){return n.remove(i)})})
})},e.prototype.discardAllWorkspaceBackups=function(){var e=this;return this.isShuttingDown=!0,this.ready.then(function(t){return r.del(e.backupWorkspacePath).then(function(){return t.clear()})})},e.prototype.getWorkspaceFileBackups=function(){return this.ready.then(function(t){var n=[];return t.get().forEach(function(t){n.push(h.readToMatchingString(t.fsPath,e.META_MARKER,2e3,1e4).then(o.default.parse))}),d.TPromise.join(n)})},e.prototype.resolveBackupContent=function(t){return this.fileService.resolveStreamContent(t,c.BACKUP_FILE_RESOLVE_OPTIONS).then(function(t){var n=!1;return p.createTextBufferFactoryFromStream(t.value,function(t){if(!n&&t){var i=t.indexOf(e.META_MARKER);return-1===i?"":(n=!0,t.substr(i+1))}return t})})},e.prototype.toBackupResource=function(e){return o.default.file(n.join(this.backupWorkspacePath,e.scheme,this.hashPath(e)))},e.prototype.hashPath=function(e){return i.createHash("md5").update(e.fsPath).digest("hex")},e.META_MARKER="\n",e=a([l(1,u.IFileService)],e)}();t.BackupFileService=m
;var y=function(){function e(){this.backups=new Map}return e.prototype.hasBackups=function(){return d.TPromise.as(this.backups.size>0)},e.prototype.loadBackupResource=function(e){var t=this.toBackupResource(e);return this.backups.has(t.toString())?d.TPromise.as(t):d.TPromise.as(void 0)},e.prototype.backupResource=function(e,t,n){var i=this.toBackupResource(e);return this.backups.set(i.toString(),t),d.TPromise.as(void 0)},e.prototype.resolveBackupContent=function(e){var t=this.backups.get(e.toString());return t?d.TPromise.as(p.createTextBufferFactoryFromSnapshot(t)):d.TPromise.as(void 0)},e.prototype.getWorkspaceFileBackups=function(){return d.TPromise.as(f.keys(this.backups).map(function(e){return o.default.parse(e)}))},e.prototype.discardResourceBackup=function(e){return this.backups.delete(this.toBackupResource(e).toString()),d.TPromise.as(void 0)},e.prototype.discardAllWorkspaceBackups=function(){return this.backups.clear(),d.TPromise.as(void 0)},e.prototype.toBackupResource=function(e){
return o.default.file(n.join(e.scheme,this.hashPath(e)))},e.prototype.hashPath=function(e){return i.createHash("md5").update(e.fsPath).digest("hex")},e}();t.InMemoryBackupFileService=y}),define(e[95],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOLDER_CONFIG_FOLDER_NAME=".vscode",t.FOLDER_SETTINGS_NAME="settings",t.FOLDER_SETTINGS_PATH=t.FOLDER_CONFIG_FOLDER_NAME+"/"+t.FOLDER_SETTINGS_NAME+".json",t.IWorkspaceConfigurationService=n.createDecorator("configurationService"),t.defaultSettingsSchemaId="vscode://schemas/settings/default",t.userSettingsSchemaId="vscode://schemas/settings/user",t.workspaceSettingsSchemaId="vscode://schemas/settings/workspace",t.folderSettingsSchemaId="vscode://schemas/settings/folder",t.launchSchemaId="vscode://schemas/launch",t.TASKS_CONFIGURATION_KEY="tasks",t.LAUNCH_CONFIGURATION_KEY="launch",t.WORKSPACE_STANDALONE_CONFIGURATIONS=Object.create(null),
t.WORKSPACE_STANDALONE_CONFIGURATIONS[t.TASKS_CONFIGURATION_KEY]=t.FOLDER_CONFIG_FOLDER_NAME+"/"+t.TASKS_CONFIGURATION_KEY+".json",t.WORKSPACE_STANDALONE_CONFIGURATIONS[t.LAUNCH_CONFIGURATION_KEY]=t.FOLDER_CONFIG_FOLDER_NAME+"/"+t.LAUNCH_CONFIGURATION_KEY+".json"}),define(e[1196],t([1,0,638,74,366,76,8,29,9,300,12,68,26,95,155,28,895]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEEDBACK_VISIBLE_CONFIG="workbench.statusBar.feedback.visible";var b;!function(e){e[e.SENDING=0]="SENDING",e[e.SENT=1]="SENT",e[e.SEND_ERROR=2]="SEND_ERROR"}(b||(b={}));var S=function(e){function o(t,n,o,a,l,u,d){var h=e.call(this,t,{contextViewProvider:n.contextViewProvider,labelRenderer:function(e){return r.$(e).addClass("send-feedback","mask-icon"),null}})||this;return h.options=n,h.commandService=o,h.telemetryService=a,h.integrityService=l,h.themeService=u,h.configurationService=d,h._isPure=!0,h.integrityService.isPure().then(function(e){e.isPure||(h._isPure=!1)}),
c.addClass(h.element,"send-feedback"),h.element.title=i.localize(0,null),h.feedbackService=n.feedbackService,h.feedback="",h.sentiment=1,h.maxFeedbackCharacters=h.feedbackService.getCharacterLimit(h.sentiment),h.feedbackForm=null,h.feedbackDescriptionInput=null,h.smileyInput=null,h.frownyInput=null,h.sendButton=null,h.$sendButton=null,h.requestFeatureLink=s.default.sendASmile.requestFeatureUrl,h}return n(o,e),o.prototype.getAnchor=function(){var e=c.getDomNodePagePosition(this.element);return{x:e.left,y:e.top-9,width:e.width,height:e.height}},o.prototype.renderContents=function(e){var t=this,n=r.$("form.feedback-form").attr({action:"javascript:void(0);"}).appendTo(e);r.$(e).addClass("monaco-menu-container"),this.feedbackForm=n.getHTMLElement(),r.$("h2.title").text(i.localize(1,null)).appendTo(n);var o=r.$("div.cancel").attr({tabindex:"0",role:"button",title:i.localize(2,null)});o.on(c.EventType.MOUSE_OVER,function(){var e,n=t.themeService.getTheme();switch(n.type){case"light":e=.1;break;case"dark":e=.2}
e&&(o.getHTMLElement().style.backgroundColor=g.darken(n.getColor(g.editorWidgetBackground),e)(n).toString())}),o.on(c.EventType.MOUSE_OUT,function(){o.getHTMLElement().style.backgroundColor=null}),this.invoke(o,function(){t.hide()}).appendTo(n);var s=r.$("div.content").appendTo(n),a=r.$("div").appendTo(s);this._isPure||(r.$("span").text(i.localize(3,null)).appendTo(a),r.$("br").appendTo(a),r.$("span").text(i.localize(4,null)).appendTo(a),r.$("br").appendTo(a)),r.$("span").text(i.localize(5,null)).appendTo(a);var l=r.$("div.feedback-sentiment").appendTo(a);this.smileyInput=r.$("div").addClass("sentiment smile").attr({"aria-checked":"false","aria-label":i.localize(6,null),title:i.localize(7,null),tabindex:0,role:"checkbox"}),this.invoke(this.smileyInput,function(){t.setSentiment(!0)}).appendTo(l),this.frownyInput=r.$("div").addClass("sentiment frown").attr({"aria-checked":"false","aria-label":i.localize(8,null),title:i.localize(9,null),tabindex:0,role:"checkbox"}),this.invoke(this.frownyInput,function(){
t.setSentiment(!1)}).appendTo(l),1===this.sentiment?this.smileyInput.addClass("checked").attr("aria-checked","true"):this.frownyInput.addClass("checked").attr("aria-checked","true");var u=r.$("div.contactus").appendTo(s);r.$("span").text(i.localize(10,null)).appendTo(u);var h=r.$("div.channels").appendTo(u);r.$("div").append(r.$("a").attr("target","_blank").attr("href","#").text(i.localize(11,null)).attr("tabindex","0")).on("click",function(e){c.EventHelper.stop(e);var n="workbench.action.openIssueReporter";t.commandService.executeCommand(n).done(null,d.onUnexpectedError),t.telemetryService.publicLog("workbenchActionExecuted",{id:n,from:"feedback"})}).appendTo(h),r.$("div").append(r.$("a").attr("target","_blank").attr("href",this.requestFeatureLink).text(i.localize(12,null)).attr("tabindex","0")).appendTo(h),this.remainingCharacterCount=r.$("span.char-counter").text(this.getCharCountText(0)),r.$("h3").text(i.localize(13,null)).append(this.remainingCharacterCount).appendTo(n),
this.feedbackDescriptionInput=r.$("textarea.feedback-description").attr({rows:3,maxlength:this.maxFeedbackCharacters,"aria-label":i.localize(14,null)}).text(this.feedback).attr("required","required").on("keyup",function(){t.updateCharCountText()}).appendTo(n).domFocus().getHTMLElement();var p=r.$("div.form-buttons").appendTo(n),v=r.$("div.hide-button-container").appendTo(p);return this.hideButton=r.$("input.hide-button").type("checkbox").attr("checked","").id("hide-button").appendTo(v).getHTMLElement(),r.$("label").attr("for","hide-button").text(i.localize(15,null)).appendTo(v),this.sendButton=new m.Button(p.getHTMLElement()),this.sendButton.enabled=!1,this.sendButton.label=i.localize(16,null),this.$sendButton=new r.Builder(this.sendButton.element),this.$sendButton.addClass("send"),this.$sendButton.title(i.localize(17,null)),this.toDispose.push(f.attachButtonStyler(this.sendButton,this.themeService)),this.sendButton.onDidClick(function(){t.isSendingFeedback||t.onSubmit()}),
this.toDispose.push(f.attachStylerCallback(this.themeService,{widgetShadow:g.widgetShadow,editorWidgetBackground:g.editorWidgetBackground,inputBackground:g.inputBackground,inputForeground:g.inputForeground,inputBorder:g.inputBorder,editorBackground:g.editorBackground,contrastBorder:g.contrastBorder},function(e){n.style("background-color",e.editorWidgetBackground?e.editorWidgetBackground.toString():null),n.style("box-shadow",e.widgetShadow?"0 0 8px "+e.widgetShadow:null),t.feedbackDescriptionInput&&(t.feedbackDescriptionInput.style.backgroundColor=e.inputBackground?e.inputBackground.toString():null,t.feedbackDescriptionInput.style.color=e.inputForeground?e.inputForeground.toString():null,t.feedbackDescriptionInput.style.border="1px solid "+(e.inputBorder||"transparent")),u.style("background-color",e.editorBackground?e.editorBackground.toString():null),u.style("border","1px solid "+(e.contrastBorder||"transparent"))})),{dispose:function(){t.feedbackForm=null,t.feedbackDescriptionInput=null,t.smileyInput=null,
t.frownyInput=null}}},o.prototype.getCharCountText=function(e){var t=this.maxFeedbackCharacters-e;return"("+t+" "+(1===t?i.localize(18,null):i.localize(19,null))+")"},o.prototype.updateCharCountText=function(){this.remainingCharacterCount.text(this.getCharCountText(this.feedbackDescriptionInput.value.length)),this.sendButton.enabled=this.feedbackDescriptionInput.value.length>0},o.prototype.setSentiment=function(e){e?(this.smileyInput.addClass("checked"),this.smileyInput.attr("aria-checked","true"),this.frownyInput.removeClass("checked"),this.frownyInput.attr("aria-checked","false")):(this.frownyInput.addClass("checked"),this.frownyInput.attr("aria-checked","true"),this.smileyInput.removeClass("checked"),this.smileyInput.attr("aria-checked","false")),this.sentiment=e?1:0,this.maxFeedbackCharacters=this.feedbackService.getCharacterLimit(this.sentiment),this.updateCharCountText(),r.$(this.feedbackDescriptionInput).attr({maxlength:this.maxFeedbackCharacters})},o.prototype.invoke=function(e,t){
return e.on("click",t),e.on("keypress",function(e){if(e instanceof KeyboardEvent){var n=e;13!==n.keyCode&&32!==n.keyCode||t()}}),e},o.prototype.show=function(){e.prototype.show.call(this),this.options.onFeedbackVisibilityChange&&this.options.onFeedbackVisibilityChange(!0)},o.prototype.onHide=function(){this.options.onFeedbackVisibilityChange&&this.options.onFeedbackVisibilityChange(!1)},o.prototype.hide=function(){this.feedbackDescriptionInput&&(this.feedback=this.feedbackDescriptionInput.value),this.autoHideTimeout&&(clearTimeout(this.autoHideTimeout),this.autoHideTimeout=null),this.hideButton&&!this.hideButton.checked&&this.configurationService.updateValue(t.FEEDBACK_VISIBLE_CONFIG,!1).done(null,d.onUnexpectedError),e.prototype.hide.call(this)},o.prototype.onEvent=function(e,t){if(e instanceof KeyboardEvent){27===e.keyCode&&this.hide()}},o.prototype.onSubmit=function(){this.feedbackForm.checkValidity&&!this.feedbackForm.checkValidity()||(this.changeFormStatus(b.SENDING),this.feedbackService.submitFeedback({
feedback:this.feedbackDescriptionInput.value,sentiment:this.sentiment}),this.changeFormStatus(b.SENT))},o.prototype.changeFormStatus=function(e){var t=this;switch(e){case b.SENDING:this.isSendingFeedback=!0,this.sendButton.label=i.localize(20,null),this.$sendButton.addClass("in-progress");break;case b.SENT:this.isSendingFeedback=!1,this.sendButton.label=i.localize(21,null),this.$sendButton.addClass("success"),this.resetForm(),this.autoHideTimeout=setTimeout(function(){t.hide()},1e3),this.$sendButton.off(["click","keypress"]),this.invoke(this.$sendButton,function(){t.hide(),t.$sendButton.off(["click","keypress"]),t.$sendButton.removeClass("in-progress")});break;case b.SEND_ERROR:this.isSendingFeedback=!1,this.$sendButton.addClass("error"),this.sendButton.label=i.localize(22,null)}},o.prototype.resetForm=function(){this.feedbackDescriptionInput&&(this.feedbackDescriptionInput.value=""),this.sentiment=1,this.maxFeedbackCharacters=this.feedbackService.getCharacterLimit(this.sentiment)},
o=a([l(2,u.ICommandService),l(3,y.ITelemetryService),l(4,h.IIntegrityService),l(5,p.IThemeService),l(6,v.IWorkspaceConfigurationService)],o)}(o.Dropdown);t.FeedbackDropdown=S,p.registerThemingParticipant(function(e,t){var n=e.getColor(g.inputActiveOptionBorder);n&&t.addRule(".monaco-shell .feedback-form .sentiment.checked { border: 1px solid "+n+"; }");var i=e.getColor(g.buttonBackground)||e.getColor(g.contrastBorder);i&&t.addRule(".monaco-shell .feedback-form .content .channels a { color: "+i+"; }")})}),define(e[1197],t([1,0,5,1196,35,6,76,69,12,27,95,8,74,640,4,23]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(){}return e.prototype.combineHashTagsAsString=function(){return e.HASHTAGS.join(",")},e.prototype.submitFeedback=function(t){
var n="?"+(1===t.sentiment?"hashtags="+this.combineHashTagsAsString()+"&":null)+"ref_src=twsrc%5Etfw&related=twitterapi%2Ctwitter&text="+encodeURIComponent(t.feedback)+"&tw_p=tweetbutton&via="+e.VIA_NAME,i=e.TWITTER_URL+n;window.open(i)},e.prototype.getCharacterLimit=function(t){var n=0;return 1===t&&e.HASHTAGS.forEach(function(e){n+=e.length+2}),e.VIA_NAME&&(n+=(" via @"+e.VIA_NAME).length),280-n},e.TWITTER_URL="https://twitter.com/intent/tweet",e.VIA_NAME="code",e.HASHTAGS=["HappyCoding"],e}(),S=function(e){function t(t,n,i,o,s,a){var c=e.call(this,a)||this;return c.instantiationService=t,c.contextViewService=n,c.contextService=i,c.contextMenuService=o,c.configurationService=s,c.enabled=c.configurationService.getValue(r.FEEDBACK_VISIBLE_CONFIG),c.hideAction=c.instantiationService.createInstance(_),c.toUnbind.push(c.hideAction),c.registerListeners(),c}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.contextService.onDidChangeWorkbenchState(function(){
return e.updateStyles()})),this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated(t)}))},t.prototype.onConfigurationUpdated=function(e){e.affectsConfiguration(r.FEEDBACK_VISIBLE_CONFIG)&&(this.enabled=this.configurationService.getValue(r.FEEDBACK_VISIBLE_CONFIG),this.update())},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this),this.dropdown&&g.$(this.dropdown.label).style("background-color",this.getColor(this.contextService.getWorkbenchState()!==h.WorkbenchState.EMPTY?u.STATUS_BAR_FOREGROUND:u.STATUS_BAR_NO_FOLDER_FOREGROUND))},t.prototype.render=function(e){var t=this;return this.container=e,g.$(this.container).on("mousedown",function(e){0!==e.button&&f.EventHelper.stop(e,!0)},this.toUnbind,!0),g.$(this.container).on("contextmenu",function(e){f.EventHelper.stop(e,!0),t.contextMenuService.showContextMenu({getAnchor:function(){return t.container},getActions:function(){return m.TPromise.as([t.hideAction])}})},this.toUnbind),
this.update()},t.prototype.update=function(){var e=this;if(c.default.sendASmile&&this.enabled){if(!this.dropdown)return this.dropdown=this.instantiationService.createInstance(r.FeedbackDropdown,this.container,{contextViewProvider:this.contextViewService,feedbackService:this.instantiationService.createInstance(b),onFeedbackVisibilityChange:function(t){t?f.addClass(e.container,"has-beak"):f.removeClass(e.container,"has-beak")}}),this.toUnbind.push(this.dropdown),this.updateStyles(),this.dropdown}else i.dispose(this.dropdown),this.dropdown=void 0,f.clearNode(this.container);return null},t=a([l(0,s.IInstantiationService),l(1,o.IContextViewService),l(2,h.IWorkspaceContextService),l(3,o.IContextMenuService),l(4,p.IWorkspaceConfigurationService),l(5,d.IThemeService)],t)}(u.Themable);t.FeedbackStatusbarItem=S;var _=function(e){function t(t){var n=e.call(this,"feedback.hide",v.localize(0,null))||this;return n.configurationService=t,n}return n(t,e),t.prototype.run=function(e){
return this.configurationService.updateValue(r.FEEDBACK_VISIBLE_CONFIG,!1)},t=a([l(0,p.IWorkspaceConfigurationService)],t)}(y.Action);d.registerThemingParticipant(function(e,t){var n=e.getColor(u.STATUS_BAR_ITEM_HOVER_BACKGROUND);n&&t.addRule(".monaco-workbench > .part.statusbar > .statusbar-item .monaco-dropdown.send-feedback:hover { background-color: "+n+"; }")})}),define(e[1198],t([1,0,16,172,1197,639,63]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.Registry.as(i.Extensions.Statusbar).registerStatusbarItem(new i.StatusbarItemDescriptor(r.FeedbackStatusbarItem,i.StatusbarAlignment.RIGHT,-100));n.Registry.as(s.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:o.localize(0,null),type:"object",properties:{"workbench.statusBar.feedback.visible":{type:"boolean",default:!0,description:o.localize(1,null)}}})}),define(e[413],t([1,0,734,59,11,133,17,95,34,94,83,378,22]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n,i){var r=this;this._configurationService=e,this._workspaceConfigurationService=t,this._notificationService=n,this._storageService=i,this._updateConfig(),this._configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration(d.TERMINAL_CONFIG_SECTION)&&r._updateConfig()})}return e.prototype._updateConfig=function(){this.config=this._configurationService.getValue(d.TERMINAL_CONFIG_SECTION)},e.prototype.configFontIsMonospace=function(){this._createCharMeasureElementIfNecessary();var e=this.config.fontFamily||this._configurationService.getValue("editor").fontFamily,t=this._getBoundingRectFor("i",e,15),n=this._getBoundingRectFor("w",e,15);return!(t.width&&n.width)||t.width===n.width},e.prototype._createCharMeasureElementIfNecessary=function(){this._charMeasureElement&&this._charMeasureElement.parentElement||(this._charMeasureElement=document.createElement("div"),
this.panelContainer.appendChild(this._charMeasureElement))},e.prototype._getBoundingRectFor=function(e,t,n){var i=this._charMeasureElement.style;i.display="inline-block",i.fontFamily=t,i.fontSize=n+"px",i.lineHeight="normal",this._charMeasureElement.innerText=e;var r=this._charMeasureElement.getBoundingClientRect();return i.display="none",r},e.prototype._measureFont=function(e,t,n,i){this._createCharMeasureElementIfNecessary();var r=this._getBoundingRectFor("X",e,t);return!this._lastFontMeasurement||r.width||r.height?(this._lastFontMeasurement={fontFamily:e,fontSize:t,letterSpacing:n,lineHeight:i,charWidth:r.width,charHeight:Math.ceil(r.height)},this._lastFontMeasurement):this._lastFontMeasurement},e.prototype.getFont=function(e,t){var n=this._configurationService.getValue("editor"),i=this.config.fontFamily||n.fontFamily;this.config.fontFamily||p.isFedora&&(i="'DejaVu Sans Mono'")
;var r=this._toInteger(this.config.fontSize,6,25,o.EDITOR_FONT_DEFAULTS.fontSize),s=this.config.letterSpacing?Math.max(Math.floor(this.config.letterSpacing),d.MINIMUM_LETTER_SPACING):d.DEFAULT_LETTER_SPACING,a=this.config.lineHeight?Math.max(this.config.lineHeight,1):d.DEFAULT_LINE_HEIGHT;return t?{fontFamily:i,fontSize:r,letterSpacing:s,lineHeight:a}:e&&e._core.charMeasure&&e._core.charMeasure.width&&e._core.charMeasure.height?{fontFamily:i,fontSize:r,letterSpacing:s,lineHeight:a,charHeight:e._core.charMeasure.height,charWidth:e._core.charMeasure.width}:this._measureFont(i,r,s,a)},e.prototype.setWorkspaceShellAllowed=function(e){this._storageService.store(d.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY,e,u.StorageScope.WORKSPACE)},e.prototype.mergeDefaultShellPathAndArgs=function(e,t){var o=this;void 0===t&&(t=r.platform)
;var s=t===r.Platform.Windows?"windows":t===r.Platform.Mac?"osx":"linux",a=this._workspaceConfigurationService.inspect("terminal.integrated.shell."+s),c=this._workspaceConfigurationService.inspect("terminal.integrated.shellArgs."+s),l=!1;if(void 0===a.workspace&&void 0===c.workspace||(l=this._storageService.getBoolean(d.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY,u.StorageScope.WORKSPACE,void 0)),void 0===a.workspace&&c.workspace&&0===c.workspace.length&&(l=!0),void 0===l){var p=void 0;a.workspace&&(p='"'+a.workspace+'"');var f=void 0;c.workspace&&(f="["+c.workspace.map(function(e){return'"'+e+'"'}).join(", ")+"]");var g=void 0;g=void 0!==a.workspace?void 0!==c.workspace?"shell: "+p+", shellArgs: "+f:"shell: "+p:"shellArgs: "+f,this._notificationService.prompt(h.default.Info,n.localize(0,null,g),[{label:n.localize(1,null),run:function(){return o._storageService.store(d.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY,!0,u.StorageScope.WORKSPACE)}},{label:n.localize(2,null),run:function(){
return o._storageService.store(d.IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY,!1,u.StorageScope.WORKSPACE)}}])}if(e.executable=(l?a.value:a.user)||a.default,e.args=(l?c.value:c.user)||c.default,r.isWindows&&!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")){var v=i.join(process.env.windir,"Sysnative").toLowerCase();0===e.executable.toLowerCase().indexOf(v)&&(e.executable=i.join(process.env.windir,"System32",e.executable.substr(v.length)))}},e.prototype._toInteger=function(e,t,n,i){var r=parseInt(e,10);return isNaN(r)?i:("number"==typeof t&&(r=Math.max(t,r)),"number"==typeof n&&(r=Math.min(n,r)),r)},e=a([l(0,s.IConfigurationService),l(1,c.IWorkspaceConfigurationService),l(2,f.INotificationService),l(3,u.IStorageService)],e)}();t.TerminalConfigHelper=g}),define(e[414],t([1,0,24,17,262,16,63,50]),function(e,t,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=e.call(this,t)||this;return n._folders=[],
n._settingsModelParser=new d(t,[a.ConfigurationScope.WINDOW,a.ConfigurationScope.RESOURCE]),n._launchModel=new o.ConfigurationModel,n}return n(t,e),Object.defineProperty(t.prototype,"folders",{get:function(){return this._folders},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsModel",{get:function(){return this._settingsModelParser.configurationModel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"launchModel",{get:function(){return this._launchModel},enumerable:!0,configurable:!0}),t.prototype.reprocessWorkspaceSettings=function(){this._settingsModelParser.reprocess()},t.prototype.parseRaw=function(t){return this._folders=t.folders||[],this._settingsModelParser.parse(t.settings),this._launchModel=this.createConfigurationModelFrom(t,"launch"),e.prototype.parseRaw.call(this,t)},t.prototype.createConfigurationModelFrom=function(e,t){var n=this,i=e[t];if(i){var s=r.toValuesTree(i,function(e){return console.error("Conflict in settings file "+n._name+": "+e)
}),a=Object.create(null);a[t]=s;var c=Object.keys(i).map(function(e){return t+"."+e});return new o.ConfigurationModel(a,c,[])}return new o.ConfigurationModel},t}(o.ConfigurationModelParser);t.WorkspaceConfigurationModelParser=l;var u=function(e){function t(t,n){var i=e.call(this,t)||this;return i.scope=n,i}return n(t,e),t.prototype.parseRaw=function(e){var t=this,n=r.toValuesTree(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)}),i=Object.create(null);i[this.scope]=n;return{contents:i,keys:Object.keys(e).map(function(e){return t.scope+"."+e}),overrides:[]}},t}(o.ConfigurationModelParser);t.StandaloneConfigurationModelParser=u;var d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.scopes=n,i}return n(t,e),t.prototype.parse=function(e){this._raw="string"==typeof e?this.parseContent(e):e,this.parseWorkspaceSettings(this._raw)},Object.defineProperty(t.prototype,"configurationModel",{get:function(){return this._settingsModel||new o.ConfigurationModel},enumerable:!0,
configurable:!0}),t.prototype.reprocess=function(){this.parse(this._raw)},t.prototype.parseWorkspaceSettings=function(e){var t={},n=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(var i in e){var r=this.getScope(i,n);-1!==this.scopes.indexOf(r)&&(t[i]=e[i])}var c=this.parseRaw(t);this._settingsModel=new o.ConfigurationModel(c.contents,c.keys,c.overrides)},t.prototype.getScope=function(e,t){var n=t[e];return n?n.scope:a.ConfigurationScope.WINDOW},t}(o.ConfigurationModelParser);t.FolderSettingsModelParser=d;var h=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n,i,r,o,s)||this;return c._workspace=a,c}return n(t,e),t.prototype.getValue=function(t,n){return void 0===n&&(n={}),e.prototype.getValue.call(this,t,n,this._workspace)},t.prototype.inspect=function(t,n){return void 0===n&&(n={}),e.prototype.inspect.call(this,t,n,this._workspace)},t.prototype.keys=function(){return e.prototype.keys.call(this,this._workspace)},t.prototype.compareAndUpdateUserConfiguration=function(t){
var n=r.compare(this.user,t),i=n.added,s=n.updated,a=n.removed,c=i.concat(s,a);return c.length&&e.prototype.updateUserConfiguration.call(this,t),(new o.ConfigurationChangeEvent).change(c)},t.prototype.compareAndUpdateWorkspaceConfiguration=function(t){var n=r.compare(this.workspace,t),i=n.added,s=n.updated,a=n.removed,c=i.concat(s,a);return c.length&&e.prototype.updateWorkspaceConfiguration.call(this,t),(new o.ConfigurationChangeEvent).change(c)},t.prototype.compareAndUpdateFolderConfiguration=function(t,n){var i=this.folders.get(t);if(i){var s=r.compare(i,n),a=s.added,c=s.updated,l=s.removed,u=a.concat(c,l);return u.length&&e.prototype.updateFolderConfiguration.call(this,t,n),(new o.ConfigurationChangeEvent).change(u,t)}return e.prototype.updateFolderConfiguration.call(this,t,n),(new o.ConfigurationChangeEvent).change(n.keys,t)},t.prototype.compareAndDeleteFolderConfiguration=function(t){
if(this._workspace&&this._workspace.folders.length>0&&this._workspace.folders[0].uri.toString()===t.toString())return new o.ConfigurationChangeEvent;var n=this.folders.get(t).keys;return e.prototype.deleteFolderConfiguration.call(this,t),(new o.ConfigurationChangeEvent).change(n,t)},t.prototype.compare=function(e){for(var t=this,n=[],r=function(r){(!i.equals(o.getValue(r),e.getValue(r))||o._workspace&&o._workspace.folders.some(function(n){return!i.equals(t.getValue(r,{resource:n.uri}),e.getValue(r,{resource:n.uri}))}))&&n.push(r)},o=this,s=0,a=this.allKeys();s<a.length;s++){r(a[s])}return n},t.prototype.allKeys=function(){return e.prototype.allKeys.call(this,this._workspace)},t}(o.Configuration);t.Configuration=h;var p=function(e){function t(t,n,i){var r=e.call(this)||this;return r._configuration=t,r.source=n,r.sourceConfig=i,r._changedConfiguration=null,r}return n(t,e),Object.defineProperty(t.prototype,"changedConfiguration",{get:function(){
return this._changedConfiguration||(this._changedConfiguration=new o.ConfigurationModel,this.updateKeys(this._changedConfiguration,this.affectedKeys)),this._changedConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changedConfigurationByResource",{get:function(){return new c.ResourceMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"affectedKeys",{get:function(){return this._configuration.allKeys()},enumerable:!0,configurable:!0}),t.prototype.affectsConfiguration=function(e,t){return this.doesConfigurationContains(this.changedConfiguration,e)},t}(o.AbstractConfigurationChangeEvent);t.AllKeysConfigurationChangeEvent=p;var f=function(){function e(e,t){this.configurationChangeEvent=e,this.workspace=t}return Object.defineProperty(e.prototype,"changedConfiguration",{get:function(){return this.configurationChangeEvent.changedConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changedConfigurationByResource",{get:function(){
return this.configurationChangeEvent.changedConfigurationByResource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"affectedKeys",{get:function(){return this.configurationChangeEvent.affectedKeys},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.configurationChangeEvent.source},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sourceConfig",{get:function(){return this.configurationChangeEvent.sourceConfig},enumerable:!0,configurable:!0}),e.prototype.affectsConfiguration=function(e,t){if(this.configurationChangeEvent.affectsConfiguration(e,t))return!0;if(t&&this.workspace){var n=this.workspace.getFolder(t);if(n)return this.configurationChangeEvent.affectsConfiguration(e,n.uri)}return!1},e}();t.WorkspaceConfigurationChangeEvent=f}),define(e[212],t([1,0,6]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IJSONEditingService=i.createDecorator("jsonEditingService");!function(e){
e[e.ERROR_FILE_DIRTY=0]="ERROR_FILE_DIRTY",e[e.ERROR_INVALID_FILE=1]="ERROR_INVALID_FILE"}(t.JSONEditingErrorCode||(t.JSONEditingErrorCode={}));var r=function(e){function t(t,n){var i=e.call(this,t)||this;return i.code=n,i}return n(t,e),t}(Error);t.JSONEditingError=r}),define(e[1202],t([1,0,10,163,25,4,7,87,9,113,5,18,33,11,343,262,414,95,166,27,63,59,24,43]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";function I(e){var t=o.basename(e.path);return[y.FOLDER_SETTINGS_NAME+".json",y.TASKS_CONFIGURATION_KEY+".json",y.LAUNCH_CONFIGURATION_KEY+".json"].some(function(e){return e===t})}Object.defineProperty(t,"__esModule",{value:!0});var T=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._workspaceConfigurationWatcherDisposables=[],t._onDidUpdateConfiguration=t._register(new a.Emitter),t.onDidUpdateConfiguration=t._onDidUpdateConfiguration.event,
t._workspaceConfigurationModelParser=new m.WorkspaceConfigurationModelParser(t._workspaceConfigPath?t._workspaceConfigPath.fsPath:""),t._cache=new v.ConfigurationModel,t}return n(t,e),t.prototype.load=function(e){var t=this;return this._workspaceConfigPath&&this._workspaceConfigPath.fsPath===e.fsPath?this.reload():(this._workspaceConfigPath=e,new s.TPromise(function(e,n){var i=new m.WorkspaceConfigurationModelParser(t._workspaceConfigPath.fsPath);i.parse(JSON.stringify({folders:[]},null,"\t")),t._workspaceConfigurationWatcher&&t.disposeConfigurationWatcher(),t._workspaceConfigurationWatcher=new g.ConfigWatcher(t._workspaceConfigPath.fsPath,{changeBufferDelay:300,onError:function(e){return l.onUnexpectedError(e)},defaultConfig:i,parse:function(e,n){return t._workspaceConfigurationModelParser=new m.WorkspaceConfigurationModelParser(t._workspaceConfigPath.fsPath),t._workspaceConfigurationModelParser.parse(e),t._workspaceConfigurationModelParser.errors.slice(),t.consolidate(),t._workspaceConfigurationModelParser
},initCallback:function(){return e(null)}}),t.listenToWatcher()}))},t.prototype.reload=function(){var e=this;return this.stopListeningToWatcher(),new s.TPromise(function(t){return e._workspaceConfigurationWatcher.reload(function(){e.listenToWatcher(),t(null)})})},t.prototype.getFolders=function(){return this._workspaceConfigurationModelParser.folders},t.prototype.setFolders=function(e,t){var n=this;return t.write(this._workspaceConfigPath,{key:"folders",value:e},!0).then(function(){return n.reload()})},t.prototype.getConfiguration=function(){return this._cache},t.prototype.reprocessWorkspaceSettings=function(){return this._workspaceConfigurationModelParser.reprocessWorkspaceSettings(),this.consolidate(),this.getConfiguration()},t.prototype.listenToWatcher=function(){var e=this;this._workspaceConfigurationWatcher.onDidUpdateConfiguration(function(){return e._onDidUpdateConfiguration.fire()},this,this._workspaceConfigurationWatcherDisposables)},t.prototype.stopListeningToWatcher=function(){
this._workspaceConfigurationWatcherDisposables=d.dispose(this._workspaceConfigurationWatcherDisposables)},t.prototype.consolidate=function(){this._cache=this._workspaceConfigurationModelParser.settingsModel.merge(this._workspaceConfigurationModelParser.launchModel)},t.prototype.disposeConfigurationWatcher=function(){this.stopListeningToWatcher(),this._workspaceConfigurationWatcher&&this._workspaceConfigurationWatcher.dispose()},t.prototype.dispose=function(){this.disposeConfigurationWatcher(),e.prototype.dispose.call(this)},t}(d.Disposable);t.WorkspaceConfiguration=T;var x=function(e){function t(t,n,i){var r=e.call(this)||this;return r.folder=t,r._loaded=!1,r._onDidChange=r._register(new a.Emitter),r.onDidChange=r._onDidChange.event,r._folderSettingsModelParser=i?i._folderSettingsModelParser:new m.FolderSettingsModelParser(y.FOLDER_SETTINGS_PATH,S.WorkbenchState.WORKSPACE===n?[_.ConfigurationScope.RESOURCE]:[_.ConfigurationScope.WINDOW,_.ConfigurationScope.RESOURCE]),
r._standAloneConfigurations=i?i._standAloneConfigurations:[],r._cache=i?i._cache:new v.ConfigurationModel,r}return n(t,e),Object.defineProperty(t.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),t.prototype.loadConfiguration=function(){var e=this;return this.loadFolderConfigurationContents().then(function(t){return e._standAloneConfigurations=[],e._folderSettingsModelParser.parse(""),e.parseContents(t),e.consolidate(),e._loaded=!0,e._cache})},t.prototype.reprocess=function(){var e=this._folderSettingsModelParser.configurationModel.contents;return this._folderSettingsModelParser.reprocess(),E.equals(e,this._folderSettingsModelParser.configurationModel.contents)||this.consolidate(),this._cache},t.prototype.consolidate=function(){var e;this._cache=(e=this._folderSettingsModelParser.configurationModel).merge.apply(e,this._standAloneConfigurations)},t.prototype.parseContents=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t],r=o.basename(i.resource.path)
;if(r===y.FOLDER_SETTINGS_NAME+".json")this._folderSettingsModelParser.parse(i.value);else{var s=/([^\.]*)*\.json/.exec(r);if(s&&s[1]){var a=new m.StandaloneConfigurationModelParser(i.resource.toString(),s[1]);a.parse(i.value),this._standAloneConfigurations.push(a.configurationModel)}}}},t}(d.Disposable);t.AbstractFolderConfiguration=x;var k=function(e){function t(t,n,r){var s=e.call(this,t,r)||this;return s.folderConfigurationPath=i.default.file(o.join(s.folder.fsPath,n)),s}return n(t,e),t.prototype.loadFolderConfigurationContents=function(){var e=this;return this.resolveStat(this.folderConfigurationPath).then(function(t){return t.isDirectory?e.resolveContents(t.children.filter(function(e){return I(e.resource)}).map(function(e){return e.resource})):s.TPromise.as([])},function(e){return[]}).then(null,l.onUnexpectedError)},t.prototype.resolveContents=function(e){return s.TPromise.join(e.map(function(e){return c.readFile(e.fsPath).then(function(t){return{resource:e,value:t.toString()}})}))},
t.prototype.resolveStat=function(e){return new s.TPromise(function(t,n){b.readdir(e.fsPath,function(r,s){r?"ENOTDIR"===r.code?t({resource:e}):n(r):t({resource:e,isDirectory:!0,children:s.map(function(t){return{resource:i.default.file(o.join(e.fsPath,t))}})})})})},t}(x);t.NodeBasedFolderConfiguration=k;var D=function(e){function t(t,n,i,r,s){var a=e.call(this,t,i,s)||this;return a.configFolderRelativePath=n,a.fileService=r,a.loadConfigurationDelayer=new h.Delayer(50),a.folderConfigurationPath=t.with({path:o.join(a.folder.path,n)}),a.reloadConfigurationScheduler=a._register(new h.RunOnceScheduler(function(){return a._onDidChange.fire()},50)),a._register(r.onFileChanges(function(e){return a.handleWorkspaceFileEvents(e)})),a}return n(t,e),t.prototype.loadFolderConfigurationContents=function(){var e=this;return this.loadConfigurationDelayer.trigger(function(){return e.doLoadFolderConfigurationContents()})},t.prototype.doLoadFolderConfigurationContents=function(){var e=this,t=Object.create(null)
;return this.fileService.resolveFile(this.folderConfigurationPath).then(function(n){n.isDirectory&&n.children&&n.children.filter(function(e){return I(e.resource)}).forEach(function(n){return t[e.toFolderRelativePath(n.resource)]=e.fileService.resolveContent(n.resource).then(null,l.onUnexpectedError)})}).then(null,function(e){return[]}).then(function(){return s.TPromise.join(t).then(function(e){return u.values(e)})})},t.prototype.handleWorkspaceFileEvents=function(e){for(var t=e.changes,n=!1,i=0,r=t.length;i<r;i++){var s=t[i].resource,a=o.basename(s.path),c=".json"===o.extname(a),l=t[i].type===p.FileChangeType.DELETED&&a===this.configFolderRelativePath;if(c||l){if(this.toFolderRelativePath(s)&&(l&&(n=!0),I(s)))switch(t[i].type){case p.FileChangeType.DELETED:case p.FileChangeType.UPDATED:case p.FileChangeType.ADDED:n=!0}}}n&&this.reloadConfigurationScheduler.schedule()},t.prototype.toFolderRelativePath=function(e){if(e.scheme===w.Schemas.file){
if(o.isEqualOrParent(e.fsPath,this.folderConfigurationPath.fsPath,!f.isLinux))return o.normalize(C.relative(this.folderConfigurationPath.fsPath,e.fsPath))}else if(o.isEqualOrParent(e.path,this.folderConfigurationPath.path,!0))return o.normalize(C.relative(this.folderConfigurationPath.path,e.path));return null},t}(x);t.FileServiceBasedFolderConfiguration=D;var A=function(e){function t(t,n,i){var s=e.call(this)||this;return s._onDidChange=s._register(new a.Emitter),s.onDidChange=s._onDidChange.event,s.loaded=!1,s.cachedFolderPath=o.join(i.appSettingsHome,r.createHash("md5").update(o.join(t.path,n)).digest("hex")),s.cachedConfigurationPath=o.join(s.cachedFolderPath,"configuration.json"),s.configurationModel=new v.ConfigurationModel,s}return n(t,e),t.prototype.loadConfiguration=function(){var e=this;return c.readFile(this.cachedConfigurationPath).then(function(t){var n=JSON.parse(t.toString());return e.configurationModel=new v.ConfigurationModel(n.contents,n.keys,n.overrides),e.loaded=!0,e.configurationModel
},function(){return e.configurationModel})},t.prototype.updateConfiguration=function(e){var t=this,n=JSON.stringify(e.toJSON());return this.createCachedFolder().then(function(i){return i?e.keys.length?c.writeFile(t.cachedConfigurationPath,n):c.rimraf(t.cachedFolderPath):null})},t.prototype.reprocess=function(){return this.configurationModel},t.prototype.getUnsupportedKeys=function(){return[]},t.prototype.createCachedFolder=function(){var e=this;return c.exists(this.cachedFolderPath).then(null,function(){return!1}).then(function(t){return t||c.mkdirp(e.cachedFolderPath).then(function(){return!0},function(){return!1})})},t}(d.Disposable);t.CachedFolderConfiguration=A;var L=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.workspaceFolder=t,s.configFolderRelativePath=n,s.workbenchState=i,s.environmentService=r,s._onDidChange=s._register(new a.Emitter),s.onDidChange=s._onDidChange.event,s._loaded=!1,
s.cachedFolderConfiguration=new A(s.workspaceFolder.uri,s.configFolderRelativePath,s.environmentService),s.folderConfiguration=s.cachedFolderConfiguration,o?s.folderConfiguration=new D(s.workspaceFolder.uri,s.configFolderRelativePath,s.workbenchState,o):s.workspaceFolder.uri.scheme===w.Schemas.file&&(s.folderConfiguration=new k(s.workspaceFolder.uri,s.configFolderRelativePath,s.workbenchState)),s._register(s.folderConfiguration.onDidChange(function(e){return s.onDidFolderConfigurationChange()})),s}return n(t,e),t.prototype.loadConfiguration=function(){var e=this;return this.folderConfiguration.loadConfiguration().then(function(t){return e._loaded=e.folderConfiguration.loaded,t})},t.prototype.reprocess=function(){return this.folderConfiguration.reprocess()},Object.defineProperty(t.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),t.prototype.adopt=function(e){if(e){if(this.folderConfiguration instanceof A)return this.adoptFromCachedConfiguration(e)
;if(this.folderConfiguration instanceof k)return this.adoptFromNodeBasedConfiguration(e)}return s.TPromise.as(!1)},t.prototype.adoptFromCachedConfiguration=function(e){var t=this,n=new D(this.workspaceFolder.uri,this.configFolderRelativePath,this.workbenchState,e);return n.loadConfiguration().then(function(){return t.folderConfiguration=n,t._register(t.folderConfiguration.onDidChange(function(e){return t.onDidFolderConfigurationChange()})),t.updateCache(),!0})},t.prototype.adoptFromNodeBasedConfiguration=function(e){var t=this,n=this.folderConfiguration;return this.folderConfiguration=new D(this.workspaceFolder.uri,this.configFolderRelativePath,this.workbenchState,e,n),n.dispose(),this._register(this.folderConfiguration.onDidChange(function(e){return t.onDidFolderConfigurationChange()})),s.TPromise.as(!1)},t.prototype.onDidFolderConfigurationChange=function(){this.updateCache(),this._onDidChange.fire()},t.prototype.updateCache=function(){var e=this
;return this.workspaceFolder.uri.scheme!==w.Schemas.file&&this.folderConfiguration instanceof D?this.folderConfiguration.loadConfiguration().then(function(t){return e.cachedFolderConfiguration.updateConfiguration(t)}):s.TPromise.as(null)},t}(d.Disposable);t.FolderConfiguration=L}),define(e[266],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationResolverService=n.createDecorator("configurationResolverService")}),define(e[1204],t([1,0,25,30,24,59,11,62,761]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){void 0===t&&(t=process.env);var n=this;this._context=e,this._envVariables=t,s.isWindows&&(this._envVariables=Object.create(null),Object.keys(t).forEach(function(e){n._envVariables[e.toLowerCase()]=t[e]}))}return e.prototype.resolve=function(e,t){return this.recursiveResolve(e?e.uri:void 0,t)},e.prototype.resolveAny=function(e,t,n){var i=r.deepClone(t)
;return s.isWindows&&i.windows?Object.keys(i.windows).forEach(function(e){return i[e]=i.windows[e]}):s.isMacintosh&&i.osx?Object.keys(i.osx).forEach(function(e){return i[e]=i.osx[e]}):s.isLinux&&i.linux&&Object.keys(i.linux).forEach(function(e){return i[e]=i.linux[e]}),delete i.windows,delete i.osx,delete i.linux,this.recursiveResolve(e?e.uri:void 0,i,n)},e.prototype.resolveWithCommands=function(e,t){throw new Error("resolveWithCommands not implemented.")},e.prototype.recursiveResolve=function(e,t,n){var r=this;if(i.isString(t))return this.resolveString(e,t,n);if(i.isArray(t))return t.map(function(t){return r.recursiveResolve(e,t,n)});if(i.isObject(t)){var o=Object.create(null);return Object.keys(t).forEach(function(i){var s=r.resolveString(e,i,n);o[s]=r.recursiveResolve(e,t[i],n)}),o}return t},e.prototype.resolveString=function(t,r,l){var u=this,d=this._context.getFilePath();return r.replace(e.VARIABLE_REGEXP,function(e,r){var h,p=r.split(":");switch(p&&p.length>1&&(r=p[0],h=p[1]),r){case"env":if(h){
s.isWindows&&(h=h.toLowerCase());var f=u._envVariables[h];return i.isString(f)?f:""}throw new Error(c.localize(0,null,e));case"config":if(h){var g=u._context.getConfigurationValue(t,h);if(i.isUndefinedOrNull(g))throw new Error(c.localize(1,null,e,h));if(i.isObject(g))throw new Error(c.localize(2,null,e,h));return g}throw new Error(c.localize(3,null,e));case"command":if(h&&l){var v=l[h];if("string"==typeof v)return v;throw new Error(c.localize(4,null,e))}return e;default:switch(r){case"workspaceRoot":case"workspaceFolder":case"workspaceRootFolderName":case"workspaceFolderBasename":case"relativeFile":if(h){var m=u._context.getFolderUri(h);if(!m)throw new Error(c.localize(5,null,e,h));t=m}if(!t){if(u._context.getWorkspaceFolderCount()>1)throw new Error(c.localize(6,null,e));throw new Error(c.localize(7,null,e))}}switch(r){case"file":case"relativeFile":case"fileDirname":case"fileExtname":case"fileBasename":case"fileBasenameNoExtension":if(!d)throw new Error(c.localize(8,null,e))}switch(r){case"workspaceRoot":
case"workspaceFolder":return a.normalizeDriveLetter(t.fsPath);case"cwd":return t?a.normalizeDriveLetter(t.fsPath):process.cwd();case"workspaceRootFolderName":case"workspaceFolderBasename":return n.basename(t.fsPath);case"lineNumber":var y=u._context.getLineNumber();if(y)return y;throw new Error(c.localize(9,null,e));case"selectedText":var b=u._context.getSelectedText();if(b)return b;throw new Error(c.localize(10,null,e));case"file":return d;case"relativeFile":return t?n.normalize(o.relative(t.fsPath,d)):d;case"fileDirname":return n.dirname(d);case"fileExtname":return n.extname(d);case"fileBasename":return n.basename(d);case"fileBasenameNoExtension":var S=n.basename(d);return S.slice(0,S.length-n.extname(S).length);case"execPath":var _=u._context.getExecPath();return _||e;default:return e}}})},e.VARIABLE_REGEXP=/\$\{(.*?)\}/g,e}();t.AbstractVariableResolverService=l}),define(e[1205],t([1,0,4,23,41,8,28,37,103,62,7,22,267]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var g=function(){function e(e,t,n){this.notificationService=e,this.telemetryService=t,this.keybindingService=n,this._onDidContextMenu=new h.Emitter}return Object.defineProperty(e.prototype,"onDidContextMenu",{get:function(){return this._onDidContextMenu.event},enumerable:!0,configurable:!0}),e.prototype.showContextMenu=function(e){var t=this;e.getActions().then(function(i){return i.length?n.TPromise.timeout(0).then(function(){var n,r,s=t.createMenu(e,i),a=e.getAnchor();if(o.isHTMLElement(a)){var c=o.getDomNodePagePosition(a);n=c.left,r=c.top+c.height}else{var l=a;n=l.x+1,r=l.y}var d=u.webFrame.getZoomFactor();n*=d,r*=d,s.popup(u.remote.getCurrentWindow(),{x:Math.floor(n),y:Math.floor(r),positioningItem:e.autoSelectFirstItem?0:void 0}),t._onDidContextMenu.fire(),e.onHide&&e.onHide(void 0)}):n.TPromise.as(null)})},e.prototype.createMenu=function(e,t){var n=this,o=new u.remote.Menu,s=e.actionRunner||new i.ActionRunner;return t.forEach(function(t){
if(t instanceof r.Separator)o.append(new u.remote.MenuItem({type:"separator"}));else if(t instanceof f.ContextSubMenu){var i=new u.remote.MenuItem({submenu:n.createMenu(e,t.entries),label:d.unmnemonicLabel(t.label)});o.append(i)}else{var a={label:d.unmnemonicLabel(t.label),checked:!!t.checked||!!t.radio,type:t.checked?"checkbox":t.radio?"radio":void 0,enabled:!!t.enabled,click:function(i,r,o){n.runAction(s,t,e,o)}},c=e.getKeyBinding?e.getKeyBinding(t):n.keybindingService.lookupKeybinding(t.id);if(c){var l=c.getElectronAccelerator();if(l)a.accelerator=l;else{var h=c.getLabel();h&&(a.label=a.label+" ["+h+"]")}}var p=new u.remote.MenuItem(a);o.append(p)}}),o},e.prototype.runAction=function(e,t,i,r){var o=this;this.telemetryService.publicLog("workbenchActionExecuted",{id:t.id,from:"contextMenu"});var s=i.getActionsContext?i.getActionsContext(r):r;(e.run(t,s)||n.TPromise.as(null)).done(null,function(e){return o.notificationService.error(e)})},
e=a([l(0,p.INotificationService),l(1,s.ITelemetryService),l(2,c.IKeybindingService)],e)}();t.ContextMenuService=g}),define(e[417],t([1,0,762,9,24,17,42,28,103,76,139,93,11,6,63,16]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICrashReporterService=g.createDecorator("crashReporterService"),t.TELEMETRY_SECTION_ID="telemetry";m.Registry.as(v.Extensions.Configuration).registerConfiguration({id:t.TELEMETRY_SECTION_ID,order:110,title:n.localize(0,null),type:"object",properties:{"telemetry.enableCrashReporter":{type:"boolean",description:n.localize(1,null),default:!0}}}),t.NullCrashReporterService={_serviceBrand:void 0,getChildProcessStartOptions:function(e){}};var y=function(){function e(e,n,i){this.telemetryService=e,this.windowsService=n;var r=i.getValue(t.TELEMETRY_SECTION_ID);this.isEnabled=!!r.enableCrashReporter,this.isEnabled&&this.startCrashReporter()}return e.prototype.startCrashReporter=function(){var e=this;this.options={
companyName:d.default.crashReporter.companyName,productName:d.default.crashReporter.productName,submitURL:this.getSubmitURL(),extra:{vscode_version:h.default.version,vscode_commit:d.default.commit}},this.telemetryService.getTelemetryInfo().then(function(t){return r.assign(e.options.extra,{vscode_sessionId:t.sessionId}),u.crashReporter.start(r.deepClone(e.options)),e.windowsService.startCrashReporter(e.options)}).done(null,i.onUnexpectedError)},e.prototype.getSubmitURL=function(){var e;return f.isWindows?e=d.default.hockeyApp["win32-"+process.arch]:f.isMacintosh?e=d.default.hockeyApp.darwin:f.isLinux&&(e=d.default.hockeyApp["linux-"+process.arch]),e},e.prototype.getChildProcessStartOptions=function(e){if(this.isEnabled&&f.isMacintosh){var t=r.deepClone(this.options);return t.extra.processName=e,t.crashesDirectory=p.tmpdir(),t}},e=a([l(0,c.ITelemetryService),l(1,s.IWindowsService),l(2,o.IConfigurationService)],e)}();t.CrashReporterService=y}),define(e[240],t([1,0,6]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationsService=n.createDecorator("IFileDecorationsService")}),define(e[1208],t([1,0,75,90,240,5,664,16,26,17,63,38]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e){this._markerService=e,this.label=s.localize(0,null),this.onDidChange=e.onMarkerChanged}return e.prototype.provideDecorations=function(e){for(var t,n=this._markerService.read({resource:e,severities:i.MarkerSeverity.Error|i.MarkerSeverity.Warning}),r=0,o=n;r<o.length;r++){var a=o[r];(!t||a.severity>t.severity)&&(t=a)}if(t)return{weight:100*t.severity,bubble:!0,tooltip:1===n.length?s.localize(1,null):s.localize(2,null,n.length),letter:n.length<10?n.length.toString():"+9",color:t.severity===i.MarkerSeverity.Error?u.listErrorForeground:u.listWarningForeground}},e}(),g=function(){function e(e,t,n){this._markerService=e,this._decorationsService=t,this._configurationService=n,
this._disposables=[this._configurationService.onDidChangeConfiguration(this._updateEnablement,this)],this._updateEnablement()}return e.prototype.dispose=function(){o.dispose(this._provider),o.dispose(this._disposables)},e.prototype._updateEnablement=function(){var e=this._configurationService.getValue("problems");if(e.decorations.enabled!==this._enabled)if(this._enabled=e.decorations.enabled,this._enabled){var t=new f(this._markerService);this._provider=this._decorationsService.registerDecorationsProvider(t)}else this._provider&&(this._enabled=e.decorations.enabled,this._provider.dispose())},e=a([l(0,i.IMarkerService),l(1,r.IDecorationsService),l(2,d.IConfigurationService)],e)}();c.Registry.as(n.Extensions.Workbench).registerWorkbenchContribution(g,p.LifecyclePhase.Running),c.Registry.as(h.Extensions.Configuration).registerConfiguration({id:"problems",order:101,type:"object",properties:{"problems.decorations.enabled":{description:s.localize(3,null),type:"boolean",default:!0}}})}),
define(e[1209],t([1,0,7,50,5,18,363,8,12,149,14,763,4,9]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(){function e(t){this.data=t,this.itemColorClassName=e._classNames.nextId(),this.itemBadgeClassName=e._classNames.nextId(),this.bubbleBadgeClassName=e._classNames.nextId()}return e.keyOf=function(t){if(Array.isArray(t))return t.map(e.keyOf).join(",");return t.color+"/"+t.letter},e.prototype.appendCSSRules=function(e,t){Array.isArray(this.data)?this._appendForMany(this.data,e,t):this._appendForOne(this.data,e,t)},e.prototype._appendForOne=function(e,t,n){var i=e.color,r=e.letter;c.createCSSRule("."+this.itemColorClassName,"color: "+(n.getColor(i)||"inherit")+";",t),r&&c.createCSSRule("."+this.itemBadgeClassName+"::after",'content: "'+r+'"; color: '+(n.getColor(i)||"inherit")+";",t)},e.prototype._appendForMany=function(e,t,n){var i=e[0].color;c.createCSSRule("."+this.itemColorClassName,"color: "+(n.getColor(i)||"inherit")+";",t)
;var r=e.filter(function(e){return!h.isFalsyOrWhitespace(e.letter)}).map(function(e){return e.letter});r.length&&c.createCSSRule("."+this.itemBadgeClassName+"::after",'content: "'+r.join(", ")+'"; color: '+(n.getColor(i)||"inherit")+";",t),c.createCSSRule("."+this.bubbleBadgeClassName+"::after",'content: ""; color: '+(n.getColor(i)||"inherit")+"; font-family: octicons; font-size: 14px; padding-right: 14px; opacity: 0.4;",t)},e.prototype.removeCSSRules=function(e){c.removeCSSRulesContainingSelector(this.itemColorClassName,e),c.removeCSSRulesContainingSelector(this.itemBadgeClassName,e),c.removeCSSRulesContainingSelector(this.bubbleBadgeClassName,e)},e.prototype.isUnused=function(){return!document.querySelector("."+this.itemColorClassName)&&!document.querySelector("."+this.itemBadgeClassName)&&!document.querySelector("."+this.bubbleBadgeClassName)},e._classNames=new d.IdGenerator("monaco-decorations-style-"),e}(),m=function(){function e(e){this._themeService=e,this._styleElement=c.createStyleSheet(),
this._decorationRules=new Map,this._disposables=[this._themeService.onThemeChange(this._onThemeChange,this)]}return e.prototype.dispose=function(){r.dispose(this._disposables),this._styleElement.parentElement.removeChild(this._styleElement)},e.prototype.asDecoration=function(e,t){var n=this;e.sort(function(e,t){return t.weight-e.weight});var i=v.keyOf(e),r=this._decorationRules.get(i);r||(r=new v(e),this._decorationRules.set(i,r),r.appendCSSRules(this._styleElement,this._themeService.getTheme()));var o=r.itemColorClassName,s=r.itemBadgeClassName,a=e.filter(function(e){return!h.isFalsyOrWhitespace(e.tooltip)}).map(function(e){return e.tooltip}).join(" • ");return t&&(s=r.bubbleBadgeClassName,a=p.localize(0,null)),{labelClassName:o,badgeClassName:s,tooltip:a,update:function(i,r){var o=e.slice();if(i)for(var s=0;s<o.length;s++)o[s].source===i&&(r?o[s]=r:(o.splice(s,1),s--));else o.push(r);return n.asDecoration(o,t)}}},e.prototype._onThemeChange=function(){var e=this;this._decorationRules.forEach(function(t){
t.removeCSSRules(e._styleElement),t.appendCSSRules(e._styleElement,e._themeService.getTheme())})},e.prototype.cleanUp=function(e){for(var t=this,n=new Set,i=e.next();!i.done;i=e.next())i.value.data.forEach(function(e,t){!o.isThenable(e)&&e&&n.add(v.keyOf(e))});this._decorationRules.forEach(function(e,i){var r=e.data;if(e.isUnused()){var o=void 0;Array.isArray(r)?o=r.some(function(e){return!n.has(v.keyOf(e))}):n.has(v.keyOf(r))||(o=!0),o&&(e.removeCSSRules(t._styleElement),t._decorationRules.delete(i))}})},e}(),y=function(){function e(){this._data=i.TernarySearchTree.forPaths()}return e.prototype.affectsResource=function(e){return this._data.get(e.toString())||void 0!==this._data.findSuperstr(e.toString())},e.debouncer=function(t,n){if(t||(t=new e),Array.isArray(n))for(var i=0,r=n;i<r.length;i++){var o=r[i];t._data.set(o.toString(),!0)}else t._data.set(n.toString(),!0);return t},e}(),b=function(){function e(e,t,n){var r=this;this._provider=e,this._uriEmitter=t,this._flushEmitter=n,
this.data=i.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(function(e){if(e)for(var t=0,n=e;t<n.length;t++){var i=n[t];r._fetchData(i)}else r.data.clear(),r._flushEmitter.fire({affectsResource:function(){return!0}})})}return e.prototype.dispose=function(){this._dispoable.dispose(),this.data.clear()},e.prototype.knowsAbout=function(e){return Boolean(this.data.get(e.toString()))||Boolean(this.data.findSuperstr(e.toString()))},e.prototype.getOrRetrieve=function(e,t,n){var i=e.toString(),r=this.data.get(i);if(void 0===r&&(r=this._fetchData(e)),r&&!o.isThenable(r)&&n(r,!1),t){var s=this.data.findSuperstr(i);if(s)for(var a=s.next();!a.done;a=s.next())a.value&&!o.isThenable(a.value)&&n(a.value,!0)}},e.prototype._fetchData=function(e){var t=this,n=this.data.get(e.toString());f.TPromise.is(n)&&(n.cancel(),this.data.delete(e.toString()));var i=this._provider.provideDecorations(e);if(!o.isThenable(i))return this._keepItem(e,i);var r=f.TPromise.wrap(i).then(function(n){
t.data.get(e.toString())===r&&t._keepItem(e,n)},function(n){g.isPromiseCanceledError(n)||t.data.get(e.toString())!==r||t.data.delete(e.toString())});this.data.set(e.toString(),r)},e.prototype._keepItem=function(e,t){var n=t||null,i=this.data.set(e.toString(),n);return(n||i)&&this._uriEmitter.fire(e),n},e}(),S=function(){function e(e,t){void 0===t&&(t=17);var i=this;this._data=new s.LinkedList,this._onDidChangeDecorationsDelayed=new n.Emitter,this._onDidChangeDecorations=new n.Emitter,this.onDidChangeDecorations=n.anyEvent(this._onDidChangeDecorations.event,n.debounceEvent(this._onDidChangeDecorationsDelayed.event,y.debouncer)),this._decorationStyles=new m(e);var r=0,o=this.onDidChangeDecorations(function(){++r%t==0&&i._decorationStyles.cleanUp(i._data.iterator())});this._disposables=[o,this._decorationStyles]}return e.prototype.dispose=function(){r.dispose(this._disposables),r.dispose(this._onDidChangeDecorations),r.dispose(this._onDidChangeDecorationsDelayed)},
e.prototype.registerDecorationsProvider=function(e){var t=this,n=new b(e,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),i=this._data.push(n);return this._onDidChangeDecorations.fire({affectsResource:function(){return!0}}),{dispose:function(){i(),t._onDidChangeDecorations.fire({affectsResource:function(e){return n.knowsAbout(e)}}),n.dispose()}}},e.prototype.getDecoration=function(e,t,n){for(var i,r=[],o=this._data.iterator(),s=o.next();!s.done;s=o.next())s.value.getOrRetrieve(e,t,function(e,t){t&&!e.bubble||(r.push(e),i=t||i)});if(0===r.length)return n?this._decorationStyles.asDecoration([n],i):void 0;var a=this._decorationStyles.asDecoration(r,i);return n?a.update(n.source,n):a},e=a([l(0,u.IThemeService)],e)}();t.FileDecorationsService=S}),define(e[1210],t([1,0,764,76,83,11,42,62]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e){this.windowService=e}return e.prototype.confirm=function(e){
var t=this.massageMessageBoxOptions(this.getConfirmOptions(e)),n=t.options,i=t.buttonIndexMap;return this.windowService.showMessageBox(n).then(function(e){return{confirmed:0===i[e.button],checkboxChecked:e.checkboxChecked}})},e.prototype.getConfirmOptions=function(e){var t=[];e.primaryButton?t.push(e.primaryButton):t.push(n.localize(0,null)),e.secondaryButton?t.push(e.secondaryButton):void 0===e.secondaryButton&&t.push(n.localize(1,null));var i={title:e.title,message:e.message,buttons:t,cancelId:1};return e.detail&&(i.detail=e.detail),e.type&&(i.type=e.type),e.checkbox&&(i.checkboxLabel=e.checkbox.label,i.checkboxChecked=e.checkbox.checked),i},e.prototype.show=function(e,t,n,i){var o=this.massageMessageBoxOptions({message:t,buttons:n,type:e===r.default.Info?"question":e===r.default.Error?"error":e===r.default.Warning?"warning":"none",cancelId:i?i.cancelId:void 0,detail:i?i.detail:void 0}),s=o.options,a=o.buttonIndexMap;return this.windowService.showMessageBox(s).then(function(e){return a[e.button]})},
e.prototype.massageMessageBoxOptions=function(e){var t=e.buttons.map(function(e,t){return t}),n=e.buttons.map(function(e){return c.mnemonicButtonLabel(e)}),r=e.cancelId;if(o.isLinux&&(n=n.reverse(),t=t.reverse()),e.defaultId=t[0],"number"==typeof r&&(r=t[r],!o.isWindows&&n.length>2&&1!==r)){var s=n[r];n.splice(r,1),n.splice(1,0,s);var a=t[r];t.splice(r,1),t.splice(1,0,a),r=1}return e.buttons=n,e.cancelId=r,e.noLink=!0,e.title=e.title||i.default.nameLong,{options:e,buttonIndexMap:t}},e=a([l(0,s.IWindowService)],e)}();t.DialogService=u}),define(e[21],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorService=n.createDecorator("editorService"),t.ACTIVE_GROUP=-1,t.SIDE_GROUP=-2}),define(e[420],t([1,0,7,21,171,66,57]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e){this.editorService=e,this.rangeHighlightDecorationId=null,this.editor=null,this.editorDisposables=[],
this._onHighlightRemoved=new n.Emitter,this.onHighlghtRemoved=this._onHighlightRemoved.event}return e.prototype.removeHighlightRange=function(){this.editor&&this.editor.getModel()&&this.rangeHighlightDecorationId&&(this.editor.deltaDecorations([this.rangeHighlightDecorationId],[]),this._onHighlightRemoved.fire()),this.rangeHighlightDecorationId=null},e.prototype.highlightRange=function(e,t){(t=t||this.getEditor(e))&&this.doHighlightRange(t,e)},e.prototype.doHighlightRange=function(e,t){var n=this;this.removeHighlightRange(),e.changeDecorations(function(e){n.rangeHighlightDecorationId=e.addDecoration(t.range,n.createRangeHighlightDecoration(t.isWholeLine))}),this.setEditor(e)},e.prototype.getEditor=function(e){var t=this.editorService.activeEditor,n=t&&t.getResource();return n&&n.toString()===e.resource.toString()?this.editorService.activeTextEditorWidget:null},e.prototype.setEditor=function(e){var t=this;this.editor!==e&&(this.disposeEditorListeners(),this.editor=e,
this.editorDisposables.push(this.editor.onDidChangeCursorPosition(function(e){e.reason!==r.CursorChangeReason.NotSet&&e.reason!==r.CursorChangeReason.Explicit&&e.reason!==r.CursorChangeReason.Undo&&e.reason!==r.CursorChangeReason.Redo||t.removeHighlightRange()})),this.editorDisposables.push(this.editor.onDidChangeModel(function(){t.removeHighlightRange()})),this.editorDisposables.push(this.editor.onDidDispose(function(){t.removeHighlightRange(),t.editor=null})))},e.prototype.disposeEditorListeners=function(){this.editorDisposables.forEach(function(e){return e.dispose()}),this.editorDisposables=[]},e.prototype.createRangeHighlightDecoration=function(t){return void 0===t&&(t=!0),t?e._WHOLE_LINE_RANGE_HIGHLIGHT:e._RANGE_HIGHLIGHT},e.prototype.dispose=function(){this.editor&&this.editor.getModel()&&(this.removeHighlightRange(),this.disposeEditorListeners(),this.editor=null)},e._WHOLE_LINE_RANGE_HIGHLIGHT=o.ModelDecorationOptions.register({stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
className:"rangeHighlight",isWholeLine:!0}),e._RANGE_HIGHLIGHT=o.ModelDecorationOptions.register({stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"rangeHighlight"}),e=a([l(0,i.IEditorService)],e)}();t.RangeHighlightDecorations=c}),define(e[1213],t([1,0,1513,151,74,8,50,43,298,69,172,35,12,16,4,23,21,111,11,831]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";function C(e){var t=e.mime;return t||e.resource.scheme===u.Schemas.data||(t=r.getMediaMime(e.resource.toString())),t||r.MIME_BINARY}Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(){}return e.formatSize=function(t){return t<e.KB?i.localize(0,null,t):t<e.MB?i.localize(1,null,(t/e.KB).toFixed(2)):t<e.GB?i.localize(2,null,(t/e.MB).toFixed(2)):t<e.TB?i.localize(3,null,(t/e.GB).toFixed(2)):i.localize(4,null,(t/e.TB).toFixed(2))},e.KB=1024,e.MB=e.KB*e.KB,e.GB=e.MB*e.KB,e.TB=e.GB*e.KB,e}(),w=function(){function e(){}return e.show=function(t,n,i,r,s,a,c){
return o.$(i).setClass("monaco-resource-viewer"),e.isImageResource(t)?I.create(i,t,n,r,a,c):(t.size>e.MAX_OPEN_INTERNAL_SIZE?x.create(i,t,r,c):k.create(i,t,r,s,c),null)},e.isImageResource=function(e){return C(e).indexOf("image/")>=0},e.MAX_OPEN_INTERNAL_SIZE=200*E.MB,e}();t.ResourceViewer=w;var I=function(){function e(){}return e.create=function(t,n,i,r,o,s){return e.shouldShowImageInline(n)?A.create(t,n,i,r,s):(T.create(t,n,o),null)},e.shouldShowImageInline=function(t){var n;if(t.resource.scheme===u.Schemas.data){var i=t.resource.path.indexOf(e.BASE64_MARKER);n=!(i>=0&&t.resource.path.substring(i+e.BASE64_MARKER.length).length>0)||t.size>e.MAX_IMAGE_SIZE||t.resource.path.length>e.MAX_IMAGE_SIZE}else n="number"!=typeof t.size||t.size>e.MAX_IMAGE_SIZE;return!n},e.MAX_IMAGE_SIZE=E.MB,e.BASE64_MARKER="base64,",e}(),T=function(){function e(){}return e.create=function(e,t,n){var r=E.formatSize(t.size),a=o.$(e).empty().p({text:i.localize(5,null,r)});t.resource.scheme!==u.Schemas.data&&a.append(o.$("a",{
role:"button",class:"embedded-link",text:i.localize(6,null)}).on(s.EventType.CLICK,function(e){n(t.resource)}))},e}(),x=function(){function e(){}return e.create=function(e,t,n,r){var s=E.formatSize(t.size);o.$(e).empty().span({text:i.localize(7,null,s)}),r&&r(s),n.scanDomNode()},e}(),k=function(){function e(){}return e.create=function(e,t,n,r,a){var c=o.$(e).empty().p({text:i.localize(8,null)});t.resource.scheme!==u.Schemas.data&&c.append(o.$("a",{role:"button",class:"embedded-link",text:i.localize(9,null)}).on(s.EventType.CLICK,function(e){r(t.resource)})),a&&a(E.formatSize(t.size)),n.scanDomNode()},e}(),D=function(e){function t(n,i,r){var o=e.call(this,r)||this;return o.contextMenuService=n,t.instance=o,o.toUnbind.push(i.onDidActiveEditorChange(function(){return o.onActiveEditorChanged()})),o}return n(t,e),t.prototype.onActiveEditorChanged=function(){this.hide(),this.onSelectScale=void 0},t.prototype.show=function(e,t){var n=this;clearTimeout(this.showTimeout),this.showTimeout=setTimeout(function(){
n.onSelectScale=t,n.statusBarItem.style.display="block",n.updateLabel(e)},0)},t.prototype.hide=function(){this.statusBarItem.style.display="none"},t.prototype.render=function(e){var t=this;return!this.statusBarItem&&e&&(this.statusBarItem=o.$(e).a().addClass(".zoom-statusbar-item").on("click",function(){t.contextMenuService.showContextMenu({getAnchor:function(){return e},getActions:function(){return m.TPromise.as(t.zoomActions)}})}).getHTMLElement(),this.statusBarItem.style.display="none"),this},t.prototype.updateLabel=function(e){this.statusBarItem.textContent=t.zoomLabel(e)},Object.defineProperty(t.prototype,"zoomActions",{get:function(){var e=this;return[10,5,2,1,.5,.2,"fit"].map(function(n){return new y.Action("zoom."+n,t.zoomLabel(n),void 0,void 0,function(){return e.onSelectScale&&e.onSelectScale(n),null})})},enumerable:!0,configurable:!0}),t.zoomLabel=function(e){return"fit"===e?i.localize(10,null):Math.round(100*e)+"%"},a([S.memoize],t.prototype,"zoomActions",null),
t=a([l(0,f.IContextMenuService),l(1,b.IEditorService),l(2,g.IThemeService)],t)}(h.Themable);v.Registry.as(p.Extensions.Statusbar).registerStatusbarItem(new p.StatusbarItemDescriptor(D,p.StatusbarAlignment.RIGHT,101));var A=function(){function e(){}return e.create=function(t,n,r,a,c){function l(t){if(m&&y.parentElement){if("fit"===t)v="fit",m.addClass("scale-to-fit"),m.removeClass("pixelated"),m.style("min-width","auto"),m.style("width","auto"),e.imageStateCache.set(h,null);else{var n=y.width,i=y.height;(v=d.clamp(t,e.MIN_SCALE,e.MAX_SCALE))>=e.PIXELATION_THRESHOLD?m.addClass("pixelated"):m.removeClass("pixelated");var r=y.parentElement,o=r.scrollTop,s=r.scrollLeft,c=(s+y.parentElement.clientWidth/2)/y.parentElement.scrollWidth,u=(o+y.parentElement.clientHeight/2)/y.parentElement.scrollHeight;m.removeClass("scale-to-fit"),m.style("min-width",y.naturalWidth*v+"px"),m.style("width",y.naturalWidth*v+"px");var p=(y.width-n)/n,f=n*p*c+s,g=i*p*u+o;a.setScrollPosition({scrollLeft:f,scrollTop:g}),
e.imageStateCache.set(h,{scale:v,offsetX:f,offsetY:g})}D.instance.show(v,l),a.scanDomNode()}}function u(){l(v=y.clientWidth/y.naturalWidth)}var h=n.resource.toString(),p=!1,f=!1,g=e.imageStateCache.get(h)||{scale:"fit",offsetX:0,offsetY:0},v=g.scale,m=null,y=null;return o.$(t).on(s.EventType.KEY_DOWN,function(e,t){m&&(p=e.ctrlKey,f=e.altKey,(_.isMacintosh?f:p)&&t.removeClass("zoom-in").addClass("zoom-out"))}).on(s.EventType.KEY_UP,function(e,t){m&&(p=e.ctrlKey,f=e.altKey,(_.isMacintosh?f:p)||t.removeClass("zoom-out").addClass("zoom-in"))}).on(s.EventType.CLICK,function(t){if(m&&0===t.button)if("fit"===v&&u(),_.isMacintosh?f:p){for(n=e.zoomLevels.length-1;n>=0&&!(e.zoomLevels[n]<v);--n);l(e.zoomLevels[n]||e.MIN_SCALE)}else{for(var n=0;n<e.zoomLevels.length&&!(e.zoomLevels[n]>v);++n);l(e.zoomLevels[n]||e.MAX_SCALE)}}).on(s.EventType.WHEEL,function(t){if(m){var n=_.isMacintosh?f:p;if(n||t.ctrlKey){t.preventDefault(),t.stopPropagation(),"fit"===v&&u();var i=t.deltaY<0?1:-1;t.ctrlKey&&!n&&(i*=-1),
l(v*(1-i*e.SCALE_PINCH_FACTOR))}}}).on(s.EventType.SCROLL,function(){if(y&&y.parentElement&&"fit"!==v){var t=e.imageStateCache.get(h);if(t){var n=y.parentElement,i=n.scrollTop,r=n.scrollLeft;e.imageStateCache.set(h,{scale:t.scale,offsetX:r,offsetY:i})}}}),o.$(t).empty().addClass("image","zoom-in").img({}).style("visibility","hidden").addClass("scale-to-fit").on(s.EventType.LOAD,function(e,t){y=(m=t).getHTMLElement(),c(i.localize(11,null,y.naturalWidth,y.naturalHeight,E.formatSize(n.size))),a.scanDomNode(),m.style("visibility","visible"),l(v),"fit"!==g.scale&&a.setScrollPosition({scrollLeft:g.offsetX,scrollTop:g.offsetY})}),e.imageSrc(n,r).then(function(e){var n=t.getElementsByTagName("img");n.length&&(n[0].src=e)}),{layout:function(e){}}},e.imageSrc=function(e,t){return e.resource.scheme===u.Schemas.data?m.TPromise.as(e.resource.toString(!0)):t.resolveContent(e.resource,{encoding:"base64"}).then(function(t){return"data:"+C(e)+";base64,"+t.value})},e.SCALE_PINCH_FACTOR=.075,e.MAX_SCALE=20,e.MIN_SCALE=.1,
e.zoomLevels=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.5,2,3,5,7,10,15,20],e.PIXELATION_THRESHOLD=3,e.imageStateCache=new c.LRUCache(100),e}()}),define(e[376],t([1,0,1500,7,4,74,124,268,129,101,1213,33]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i,o,s){var a=e.call(this,t,i,o)||this;return a._fileService=s,a._onMetadataChanged=new r.Emitter,a.toUnbind.push(a._onMetadataChanged),a.callbacks=n,a}return n(t,e),Object.defineProperty(t.prototype,"onMetadataChanged",{get:function(){return this._onMetadataChanged.event},enumerable:!0,configurable:!0}),t.prototype.getTitle=function(){return this.input?this.input.getName():i.localize(0,null)},t.prototype.createEditor=function(e){var t=document.createElement("div");t.className="binary-container",this.binaryContainer=s.$(t),this.binaryContainer.style("outline","none"),this.binaryContainer.tabindex(0),this.scrollbar=new d.DomScrollableElement(t,{horizontal:h.ScrollbarVisibility.Auto,
vertical:h.ScrollbarVisibility.Auto}),e.appendChild(this.scrollbar.getDomNode())},t.prototype.setInput=function(t,n,i){var r=this;return e.prototype.setInput.call(this,t,n,i).then(function(){return t.resolve(!0).then(function(e){if(!i.isCancellationRequested)return e instanceof u.BinaryEditorModel?void(r.resourceViewerContext=p.ResourceViewer.show({name:e.getName(),resource:e.getResource(),size:e.getSize(),etag:e.getETag(),mime:e.getMime()},r._fileService,r.binaryContainer.getHTMLElement(),r.scrollbar,function(e){return r.callbacks.openInternal(t,n)},function(e){return r.callbacks.openExternal(e)},function(e){return r.handleMetadataChanged(e)})):o.TPromise.wrapError(new Error("Unable to open file as binary"))})})},t.prototype.handleMetadataChanged=function(e){this.metadata=e,this._onMetadataChanged.fire()},t.prototype.getMetadata=function(){return this.metadata},t.prototype.clearInput=function(){this.handleMetadataChanged(null),s.$(this.binaryContainer).empty(),e.prototype.clearInput.call(this)},
t.prototype.layout=function(e){this.binaryContainer.size(e.width,e.height),this.scrollbar.scanDomNode(),this.resourceViewerContext&&this.resourceViewerContext.layout(e)},t.prototype.focus=function(){this.binaryContainer.domFocus()},t.prototype.dispose=function(){this.binaryContainer.destroy(),this.scrollbar.dispose(),e.prototype.dispose.call(this)},t=a([l(4,f.IFileService)],t)}(c.BaseEditor);t.BaseBinaryResourceEditor=g}),define(e[422],t([1,0,1499,40,28,12,374,6,376]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype.getMetadata=function(){var e=this.masterEditor,t=this.detailsEditor;return e instanceof d.BaseBinaryResourceEditor&&t instanceof d.BaseBinaryResourceEditor?i.localize(0,null,t.getMetadata(),e.getMetadata()):null},t.ID=r.BINARY_DIFF_EDITOR_ID,t=a([l(0,o.ITelemetryService),l(1,u.IInstantiationService),l(2,s.IThemeService)],t)}(c.SideBySideEditor)
;t.BinaryResourceDiffEditor=h}),define(e[1216],t([1,0,1574,126,4,5,74,243,16,29,21,200,172,6,28,35,23,12,69,27,26,186,51,8,22,859]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k=function(e){function t(t,n,i,r){var o=e.call(this,t,{hasTitle:!1},i)||this;return o.instantiationService=n,o.contextService=r,o.registerListeners(),o}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.contextService.onDidChangeWorkbenchState(function(){return e.updateStyles()}))},t.prototype.addEntry=function(e,n,i){void 0===i&&(i=0);for(var r=this.doCreateStatusItem(n,i,e.showBeak?"has-beak":void 0),o=this.instantiationService.createInstance(A,e).render(r),s=this.statusItemsContainer,a=this.getEntries(n),l=!1,u=0;u<a.length;u++){var d=a[u],h=c.$(d).getProperty(t.PRIORITY_PROP);if(n===g.StatusbarAlignment.LEFT&&h<i||n===g.StatusbarAlignment.RIGHT&&h>i){s.insertBefore(r,d),l=!0;break}}return l||s.appendChild(r),{
dispose:function(){c.$(r).destroy(),o&&o.dispose()}}},t.prototype.getEntries=function(e){for(var n=[],i=this.statusItemsContainer.children,r=0;r<i.length;r++){var o=i.item(r);c.$(o).getProperty(t.ALIGNMENT_PROP)===e&&n.push(o)}return n},t.prototype.createContentArea=function(e){var t,n=this;this.statusItemsContainer=e;var i=d.Registry.as(g.Extensions.Statusbar),r=i.items.filter(function(e){return e.alignment===g.StatusbarAlignment.LEFT}).sort(function(e,t){return t.priority-e.priority}),o=i.items.filter(function(e){return e.alignment===g.StatusbarAlignment.RIGHT}).sort(function(e,t){return e.priority-t.priority}).concat(r);return(t=this.toUnbind).push.apply(t,o.map(function(e){var t=n.instantiationService.createInstance(e.syncDescriptor),i=n.doCreateStatusItem(e.alignment,e.priority),r=t.render(i);return n.statusItemsContainer.appendChild(i),r})),this.statusItemsContainer},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this)
;var t=c.$(this.getContainer()),n=this.getColor(this.contextService.getWorkbenchState()!==C.WorkbenchState.EMPTY?_.STATUS_BAR_BACKGROUND:_.STATUS_BAR_NO_FOLDER_BACKGROUND);t.style("background-color",n),t.style("color",this.getColor(this.contextService.getWorkbenchState()!==C.WorkbenchState.EMPTY?_.STATUS_BAR_FOREGROUND:_.STATUS_BAR_NO_FOLDER_FOREGROUND));var i=this.getColor(this.contextService.getWorkbenchState()!==C.WorkbenchState.EMPTY?_.STATUS_BAR_BORDER:_.STATUS_BAR_NO_FOLDER_BORDER)||this.getColor(E.contrastBorder);t.style("border-top-width",i?"1px":null),t.style("border-top-style",i?"solid":null),t.style("border-top-color",i),this.styleElement||(this.styleElement=T.createStyleSheet(t.getHTMLElement())),this.styleElement.innerHTML=".monaco-workbench > .part.statusbar > .statusbar-item.has-beak:before { border-bottom-color: "+n+"; }"},t.prototype.doCreateStatusItem=function(e,n,i){void 0===n&&(n=0);var r=document.createElement("div");return T.addClass(r,"statusbar-item"),i&&T.addClass(r,i),
e===g.StatusbarAlignment.RIGHT?T.addClass(r,"right"):T.addClass(r,"left"),c.$(r).setProperty(t.PRIORITY_PROP,n),c.$(r).setProperty(t.ALIGNMENT_PROP,e),r},t.prototype.setStatusMessage=function(e,t,n){var i=this;void 0===t&&(t=-1),void 0===n&&(n=0),this.statusMsgDispose&&this.statusMsgDispose.dispose();var r,o,s=setTimeout(function(){r=i.addEntry({text:e},g.StatusbarAlignment.LEFT,-Number.MAX_VALUE),s=null},n),a={dispose:function(){s&&clearTimeout(s),o&&clearTimeout(o),r&&r.dispose()}};return this.statusMsgDispose=a,"number"==typeof t&&t>0&&(o=setTimeout(function(){return a.dispose()},t)),a},t.PRIORITY_PROP="priority",t.ALIGNMENT_PROP="alignment",t=a([l(1,v.IInstantiationService),l(2,S.IThemeService),l(3,C.IWorkspaceContextService)],t)}(f.Part);t.StatusbarPart=k;var D,A=function(){function e(e,t,n,i,r,o,s,a){this.entry=e,this.commandService=t,this.instantiationService=n,this.notificationService=i,this.telemetryService=r,this.contextMenuService=o,this.editorService=s,this.themeService=a,this.entry=e,
D||(D=this.instantiationService.createInstance(L))}return e.prototype.render=function(e){var t=this,n=[];T.addClass(e,"statusbar-entry");var i;this.entry.command?(i=document.createElement("a"),c.$(i).on("click",function(){return t.executeCommand(t.entry.command,t.entry.arguments)},n)):i=document.createElement("span"),new u.OcticonLabel(i).text=this.entry.text,this.entry.tooltip&&c.$(i).title(this.entry.tooltip);var r=this.entry.color;if(r){if(w.isThemeColor(r)){var a=r.id;r=(this.themeService.getTheme().getColor(a)||I.Color.transparent).toString(),n.push(this.themeService.onThemeChange(function(e){var n=(t.themeService.getTheme().getColor(a)||I.Color.transparent).toString();c.$(i).color(n)}))}c.$(i).color(r)}return this.entry.extensionId&&c.$(i).on("contextmenu",function(n){T.EventHelper.stop(n,!0),t.contextMenuService.showContextMenu({getAnchor:function(){return e},getActionsContext:function(){return t.entry.extensionId},getActions:function(){return o.TPromise.as([D])}})},n),e.appendChild(i),{
dispose:function(){n=s.dispose(n)}}},e.prototype.executeCommand=function(e,t){var n,i=this;t=t||[];var o=this.editorService.activeTextEditorWidget;o&&o.focus(),this.telemetryService.publicLog("workbenchActionExecuted",{id:e,from:"status bar"}),(n=this.commandService).executeCommand.apply(n,[e].concat(t)).done(void 0,function(e){return i.notificationService.error(r.toErrorMessage(e))})},e=a([l(1,h.ICommandService),l(2,v.IInstantiationService),l(3,x.INotificationService),l(4,m.ITelemetryService),l(5,y.IContextMenuService),l(6,p.IEditorService),l(7,S.IThemeService)],e)}(),L=function(e){function t(t){var n=e.call(this,"statusbar.manage.extension",i.localize(0,null))||this;return n.commandService=t,n}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand("_extensions.manage",e)},t=a([l(0,h.ICommandService)],t)}(b.Action);S.registerThemingParticipant(function(e,t){var n=e.getColor(_.STATUS_BAR_ITEM_HOVER_BACKGROUND)
;n&&t.addRule(".monaco-workbench > .part.statusbar > .statusbar-item a:hover { background-color: "+n+"; }");var i=e.getColor(_.STATUS_BAR_ITEM_ACTIVE_BACKGROUND);i&&t.addRule(".monaco-workbench > .part.statusbar > .statusbar-item a:active { background-color: "+i+"; }");var r=e.getColor(_.STATUS_BAR_PROMINENT_ITEM_BACKGROUND);r&&t.addRule(".monaco-workbench > .part.statusbar > .statusbar-item .status-bar-info { background-color: "+r+"; }");var o=e.getColor(_.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND);o&&t.addRule(".monaco-workbench > .part.statusbar > .statusbar-item a.status-bar-info:hover { background-color: "+o+"; }")})}),define(e[86],t([1,0,1587,4,24,20,14,30,16,23,122,109,40,64,21]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLOSE_ON_FOCUS_LOST_CONFIG="workbench.quickOpen.closeOnFocusLost";var y=function(){function e(){}return e.prototype.getResults=function(e){return r.TPromise.as(null)},e.prototype.getAriaLabel=function(){return null},
e.prototype.getClass=function(){return null},e.prototype.canRun=function(){return!0},e.prototype.hasShortResponseTime=function(){return!1},e.prototype.getAutoFocus=function(e,t){return{}},e.prototype.onOpen=function(){},e.prototype.onClose=function(e){},e.prototype.getGroupLabel=function(){return null},e.prototype.getEmptyLabel=function(e){return e.length>0?i.localize(0,null):i.localize(1,null)},e}();t.QuickOpenHandler=y;var b=function(){function e(e,t,n,i,r,o){void 0===o&&(o=!1),this.ctor=e,this.id=t,this.prefix=n,this.contextKey=i,this.instantProgress=o,u.isString(r)?this.description=r:this.helpEntries=r}return e.prototype.getId=function(){return this.id},e.prototype.instantiate=function(e){return e.createInstance(this.ctor)},e}();t.QuickOpenHandlerDescriptor=b,t.Extensions={Quickopen:"workbench.contributions.quickopen"};var S=function(){function e(){this.handlers=[]}return e.prototype.registerQuickOpenHandler=function(e){this.handlers.push(e),this.handlers.sort(function(e,t){
return t.prefix.length-e.prefix.length})},e.prototype.registerDefaultQuickOpenHandler=function(e){this.defaultHandler=e},e.prototype.getQuickOpenHandlers=function(){return this.handlers.slice(0)},e.prototype.getQuickOpenHandler=function(e){return e?s.first(this.handlers,function(t){return c.startsWith(e,t.prefix)},null):null},e.prototype.getDefaultQuickOpenHandler=function(){return this.defaultHandler},e}();d.Registry.add(t.Extensions.Quickopen,new S);var _=function(e){function t(t){var n=e.call(this)||this;return n._editorService=t,n}return n(t,e),Object.defineProperty(t.prototype,"editorService",{get:function(){return this._editorService},enumerable:!0,configurable:!0}),t.prototype.getInput=function(){return null},t.prototype.getOptions=function(){return null},t.prototype.run=function(e,t){var n=e===p.Mode.OPEN;if(e===p.Mode.OPEN||e===p.Mode.OPEN_IN_BACKGROUND){var i=t.keymods.ctrlCmd,r=void 0;e===p.Mode.OPEN_IN_BACKGROUND?r={pinned:!0,preserveFocus:!0}:t.keymods.alt&&(r={pinned:!0});var s=this.getInput()
;if(s instanceof g.EditorInput){var a=this.getOptions();a?a=o.mixin(a,r,!0):r&&(a=g.EditorOptions.create(r)),this.editorService.openEditor(s,a,i?m.SIDE_GROUP:m.ACTIVE_GROUP)}else{var c=s;r&&(c.options=o.assign(c.options||Object.create(null),r)),this.editorService.openEditor(c,i?m.SIDE_GROUP:m.ACTIVE_GROUP)}}return n},t}(f.QuickOpenEntry);t.EditorQuickOpenEntry=_;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getInput=function(){return null},t.prototype.getOptions=function(){return null},t}(f.QuickOpenEntryGroup);t.EditorQuickOpenEntryGroup=C;var E=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=r,o.prefix=i,o.enabled=!!o.quickOpenService,o}return n(t,e),t.prototype.run=function(e){return this.quickOpenService.show(this.prefix),r.TPromise.as(null)},t=a([l(3,v.IQuickOpenService)],t)}(h.Action);t.QuickOpenAction=E}),define(e[424],t([1,0,11,9,82,595,21]),function(e,t,n,i,r,o,s){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e){this.editorService=e}return e.prototype.handleLinks=function(t){if(t.length>e.MAX_LENGTH)return t;for(var n,i=0,r=e.FILE_LOCATION_PATTERNS;i<r.length;i++){var o=r[i];o.lastIndex=0;for(var s=o.exec(t),a=function(){return s=o.exec(t),"continue"};null!==s;)a()}return n||t},e.prototype.onLinkClick=function(e,t,n,r){void 0===r&&(r=0);if("Range"!==window.getSelection().type){e.preventDefault();var o=e.ctrlKey||e.metaKey?s.SIDE_GROUP:s.ACTIVE_GROUP;this.editorService.openEditor({resource:t,options:{selection:{startLineNumber:n,startColumn:r}}},o).done(null,i.onUnexpectedError)}},e.MAX_LENGTH=500,e.FILE_LOCATION_PATTERNS=[/(?![\(])(?:file:\/\/)?((?:([a-zA-Z]+:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?\.[a-zA-Z]+[0-9]*):(\d+)(?::(\d+))?/g],e=a([l(0,s.IEditorService)],e)}();t.LinkDetector=c}),define(e[1219],t([1,0,594,8,221,18,12,51,26,6,424,886]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var f=r.$;t.debugExceptionWidgetBorder=d.registerColor("debugExceptionWidget.border",{dark:"#a31515",light:"#a31515",hc:"#a31515"},i.localize(0,null)),t.debugExceptionWidgetBackground=d.registerColor("debugExceptionWidget.background",{dark:"#420b0d",light:"#f1dfde",hc:"#420b0d"},i.localize(1,null));var g=function(e){function o(t,n,i,r){var o=e.call(this,t,{showFrame:!0,showArrow:!0,frameWidth:1,className:"exception-widget-container"})||this;o.exceptionInfo=n,o.instantiationService=r,o._backgroundColor=u.Color.white,o._applyTheme(i.getTheme()),o._disposables.push(i.onThemeChange(o._applyTheme.bind(o))),o.create();var a=new s.RunOnceScheduler(function(){return o._doLayout(void 0,void 0)},50);return o._disposables.push(o.editor.onDidLayoutChange(function(){return a.schedule()})),o._disposables.push(a),o}return n(o,e),o.prototype._applyTheme=function(e){this._backgroundColor=e.getColor(t.debugExceptionWidgetBackground)
;var n=e.getColor(t.debugExceptionWidgetBorder);this.style({arrowColor:n,frameColor:n})},o.prototype._applyStyles=function(){this.container&&(this.container.style.backgroundColor=this._backgroundColor.toString()),e.prototype._applyStyles.call(this)},o.prototype._fillContainer=function(e){this.setCssClass("exception-widget");var t=this.editor.getConfiguration().fontInfo;this.container.style.fontSize=t.fontSize+"px",this.container.style.lineHeight=t.lineHeight+"px";var n=f(".title");if(n.textContent=this.exceptionInfo.id?i.localize(2,null,this.exceptionInfo.id):i.localize(3,null),r.append(e,n),this.exceptionInfo.description){var o=f(".description");o.textContent=this.exceptionInfo.description,r.append(e,o)}if(this.exceptionInfo.details&&this.exceptionInfo.details.stackTrace){var s=f(".stack-trace"),a=this.instantiationService.createInstance(p.LinkDetector).handleLinks(this.exceptionInfo.details.stackTrace);"string"==typeof a?s.textContent=a:s.appendChild(a),r.append(e,s)}},o.prototype._doLayout=function(e,t){
this.container.style.height="initial";var n=this.editor.getConfiguration().lineHeight,i=Math.round(n/3),r=Math.ceil((this.container.offsetHeight+i)/n);this._relayout(r)},o=a([l(2,c.IThemeService),l(3,h.IInstantiationService)],o)}(o.ZoneWidget);t.ExceptionWidget=g}),define(e[310],t([1,0,600,4,10,25,70,79,21,43]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=n.localize(0,null),d=function(){function e(e,t){this.raw=e,e||(this.raw={name:u}),this.available=this.raw.name!==u;var n=this.raw.path||this.raw.name;this.raw.sourceReference>0?this.uri=r.default.parse(a.DEBUG_SCHEME+":"+encodeURIComponent(n)+"?session="+encodeURIComponent(t)+"&ref="+this.raw.sourceReference):o.isAbsolute(n)?this.uri=r.default.file(n):this.uri=r.default.parse(n)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.raw.name||s.basenameOrAuthority(this.uri)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){
return this.raw.origin},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentationHint",{get:function(){return this.raw.presentationHint},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reference",{get:function(){return this.raw.sourceReference},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inMemory",{get:function(){return this.uri.scheme===a.DEBUG_SCHEME},enumerable:!0,configurable:!0}),e.prototype.openInEditor=function(e,t,n,r,o){return this.available?e.openEditor({resource:this.uri,description:this.origin,options:{preserveFocus:n,selection:t,revealIfVisible:!0,revealInCenterIfOutsideViewport:!0,pinned:o||!n&&!this.inMemory}},r?c.SIDE_GROUP:c.ACTIVE_GROUP):i.TPromise.as(null)},e.getEncodedDebugData=function(e){var t,n,i;switch(e.scheme){case l.Schemas.file:t=o.normalize(e.fsPath,!0);break;case a.DEBUG_SCHEME:if(t=e.path,e.query)for(var r=0,c=e.query.split("&");r<c.length;r++){var u=c[r].split("=");if(2===u.length)switch(u[0]){case"session":
i=decodeURIComponent(u[1]);break;case"ref":n=parseInt(u[1])}}break;default:t=e.toString()}return{name:s.basenameOrAuthority(e),path:t,sourceReference:n,sessionId:i}},e}();t.Source=d}),define(e[1221],t([1,0,589,4,151,47,54,72,79,310]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,n,i){this.debugService=t,this.modelService=n,this.modeService=i,e.registerTextModelContentProvider(u.DEBUG_SCHEME,this)}return e.prototype.provideTextContent=function(e){var t,o,s=this;if(e.query){var a=d.Source.getEncodedDebugData(e);t=this.debugService.getModel().getSessions().filter(function(e){return e.getId()===a.sessionId}).pop(),o=a.sourceReference}if(t||(t=this.debugService.getViewModel().focusedSession),!t)return i.TPromise.wrapError(new Error(n.localize(0,null)));var c,l=t.getSourceForUri(e);l?(c=l.raw,o||(o=l.reference)):c={path:e.with({scheme:"",query:""}).toString(!0),sourceReference:o};var u=function(t){s.debugService.sourceIsNotAvailable(e)
;var n=s.modeService.getOrCreateMode(r.MIME_TEXT);return s.modelService.createModel(t,n,e)};return t.raw.source({sourceReference:o,source:c}).then(function(t){if(!t)return u(n.localize(1,null,e.toString()));var i=t.body.mimeType||r.guessMimeTypes(e.path)[0],o=s.modeService.getOrCreateMode(i);return s.modelService.createModel(t.body.content,o,e)},function(e){return u(e.message)})},e=a([l(0,c.ITextModelService),l(1,u.IDebugService),l(2,o.IModelService),l(3,s.IModeService)],e)}();t.DebugContentProvider=h}),define(e[142],t([1,0,598,70,4,5,7,136,9,18,30,20,19,79,310,24,14,25]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(t,n){void 0===n&&(n=e.ID_COUNTER++),this.sourceData=t,this.id=n}return e.prototype.getId=function(){return"replelement:"+this.id},e.ID_COUNTER=0,e}();t.AbstractReplElement=b;var S=function(e){function t(t,n,i){var r=e.call(this,i)||this;return r.value=t,r.severity=n,r}return n(t,e),
t.prototype.toString=function(){return this.value},t}(b);t.SimpleReplElement=S;var _=function(e){function t(t,n,i,r){var o=e.call(this,i)||this;return o.name=t,o.valueObj=n,o.annotation=r,o}return n(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return null===this.valueObj?"null":Array.isArray(this.valueObj)?"Array["+this.valueObj.length+"]":d.isObject(this.valueObj)?"Object":d.isString(this.valueObj)?'"'+this.valueObj+'"':String(this.valueObj)||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return Array.isArray(this.valueObj)&&this.valueObj.length>0||d.isObject(this.valueObj)&&Object.getOwnPropertyNames(this.valueObj).length>0},enumerable:!0,configurable:!0}),t.prototype.getChildren=function(){var e=this,n=[];return Array.isArray(this.valueObj)?n=this.valueObj.slice(0,t.MAX_CHILDREN).map(function(e,n){return new t(String(n),e)}):d.isObject(this.valueObj)&&(n=Object.getOwnPropertyNames(this.valueObj).slice(0,t.MAX_CHILDREN).map(function(n){
return new t(n,e.valueObj[n])})),o.TPromise.as(n)},t.prototype.toString=function(){return this.name+"\n"+this.value},t.MAX_CHILDREN=1e3,t}(b);t.RawObjectReplElement=_;var C=function(){function e(e,t,n,i,r,o){void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0),this.session=e,this._reference=t,this.id=n,this.namedVariables=i,this.indexedVariables=r,this.startOfVariables=o}return Object.defineProperty(e.prototype,"reference",{get:function(){return this._reference},set:function(e){this._reference=e,this.children=void 0},enumerable:!0,configurable:!0}),e.prototype.getChildren=function(){return this.children||(this.children=this.doGetChildren()),this.children},e.prototype.doGetChildren=function(){var t=this;return this.hasChildren?this.getChildrenInChunks?(this.namedVariables?this.fetchVariables(void 0,void 0,"named"):o.TPromise.as([])).then(function(n){for(var i=e.BASE_CHUNK_SIZE;t.indexedVariables>i*e.BASE_CHUNK_SIZE;)i*=e.BASE_CHUNK_SIZE;if(t.indexedVariables>i){
for(var r=Math.ceil(t.indexedVariables/i),o=0;o<r;o++){var s=t.startOfVariables+o*i,a=Math.min(i,t.indexedVariables-o*i);n.push(new w(t.session,t,t.reference,"["+s+".."+(s+a-1)+"]","","",null,a,{kind:"virtual"},null,!0,s))}return n}return t.fetchVariables(t.startOfVariables,t.indexedVariables,"indexed").then(function(e){return n.concat(e)})}):this.fetchVariables(void 0,void 0,void 0):o.TPromise.as([])},e.prototype.getId=function(){return this.id},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t,this.valueChanged=e.allValues.get(this.getId())&&e.allValues.get(this.getId())!==E.DEFAULT_VALUE&&e.allValues.get(this.getId())!==t,e.allValues.set(this.getId(),t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasChildren",{get:function(){return this.reference>0},enumerable:!0,configurable:!0}),e.prototype.fetchVariables=function(e,t,n){var i=this;return this.session.raw.variables({variablesReference:this.reference,start:e,count:t,filter:n
}).then(function(e){return e&&e.body&&e.body.variables?h.distinct(e.body.variables.filter(function(e){return!!e&&d.isString(e.name)}),function(e){return e.name}).map(function(e){return new w(i.session,i,e.variablesReference,e.name,e.evaluateName,e.value,e.namedVariables,e.indexedVariables,e.presentationHint,e.type)}):[]},function(e){return[new w(i.session,i,0,null,e.message,"",0,0,{kind:"virtual"},null,!1)]})},Object.defineProperty(e.prototype,"getChildrenInChunks",{get:function(){return!!this.indexedVariables},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.value},e.allValues=new Map,e.BASE_CHUNK_SIZE=100,e}();t.ExpressionContainer=C;var E=function(e){function t(n,i){void 0===i&&(i=c.generateUuid());var r=e.call(this,null,0,i)||this;return r.name=n,r.available=!1,n&&(r.value=t.DEFAULT_VALUE),r}return n(t,e),t.prototype.evaluate=function(e,n,r){var s=this;return!e||!n&&"repl"!==r?(this.value="repl"===r?i.localize(1,null):t.DEFAULT_VALUE,this.available=!1,this.reference=0,
o.TPromise.as(null)):(this.session=e,e.raw.evaluate({expression:this.name,frameId:n?n.frameId:void 0,context:r}).then(function(e){s.available=!(!e||!e.body),e&&e.body&&(s.value=e.body.result,s.reference=e.body.variablesReference,s.namedVariables=e.body.namedVariables,s.indexedVariables=e.body.indexedVariables,s.type=e.body.type)},function(e){s.value=e.message,s.available=!1,s.reference=0}))},t.prototype.toString=function(){return this.name+"\n"+this.value},t.DEFAULT_VALUE=i.localize(0,null),t}(C);t.Expression=E;var w=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,h){void 0===u&&(u=null),void 0===d&&(d=!0),void 0===h&&(h=0);var p=e.call(this,t,i,"variable:"+n.getId()+":"+r,a,c,h)||this;return p.parent=n,p.name=r,p.evaluateName=o,p.presentationHint=l,p.type=u,p.available=d,p.value=s,p}return n(t,e),t.prototype.setVariable=function(e){var t=this;return this.session.raw.setVariable({name:this.name,value:e,variablesReference:this.parent.reference}).then(function(e){e&&e.body&&(t.value=e.body.value,
t.type=e.body.type||t.type,t.reference=e.body.variablesReference,t.namedVariables=e.body.namedVariables,t.indexedVariables=e.body.indexedVariables)},function(e){t.errorMessage=e.message})},t.prototype.toString=function(){return this.name+": "+this.value},t}(C);t.Variable=w;var I=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,t.thread.session,r,"scope:"+t.getId()+":"+i+":"+n,s,a)||this;return l.name=i,l.expensive=o,l.range=c,l}return n(t,e),t}(C);t.Scope=I;var T=function(){function e(e,t,n,i,r,o,s){this.thread=e,this.frameId=t,this.source=n,this.name=i,this.presentationHint=r,this.range=o,this.index=s,this.scopes=null}return e.prototype.getId=function(){return"stackframe:"+this.thread.getId()+":"+this.frameId+":"+this.index},e.prototype.getScopes=function(){var e=this;return this.scopes||(this.scopes=this.thread.session.raw.scopes({frameId:this.frameId}).then(function(t){return t&&t.body&&t.body.scopes?t.body.scopes.map(function(t,n){
return new I(e,n,t.name,t.variablesReference,t.expensive,t.namedVariables,t.indexedVariables,t.line&&t.column&&t.endLine&&t.endColumn?new p.Range(t.line,t.column,t.endLine,t.endColumn):null)}):[]},function(e){return[]})),this.scopes},e.prototype.getSpecificSourceName=function(){var e=this,t=0;if(this.thread.getCallStack().map(function(e){return e.source}).filter(function(t){return t!==e.source}).forEach(function(n){n.name===e.source.name&&(t=Math.max(t,m.commonSuffixLength(e.source.uri.path,n.uri.path)))}),0===t)return this.source.name;var n=Math.max(0,this.source.uri.path.lastIndexOf(y.sep,this.source.uri.path.length-t-1));return(n>0?"...":"")+this.source.uri.path.substr(n)},e.prototype.getMostSpecificScopes=function(e){return this.getScopes().then(function(t){if(!(t=t.filter(function(e){return!e.expensive})).some(function(e){return!!e.range}))return t;var n=t.filter(function(t){return t.range&&p.Range.containsRange(t.range,e)}).sort(function(e,t){
return e.range.endLineNumber-e.range.startLineNumber-(t.range.endLineNumber-t.range.startLineNumber)});return n.length?n:t})},e.prototype.restart=function(){return this.thread.session.raw.restartFrame({frameId:this.frameId},this.thread.threadId)},e.prototype.toString=function(){return this.name+" ("+(this.source.inMemory?this.source.name:this.source.uri.fsPath)+":"+this.range.startLineNumber+")"},e.prototype.openInEditor=function(e,t,n,i){return this.source.available?this.source.openInEditor(e,this.range,t,n,i):o.TPromise.as(null)},e}();t.StackFrame=T;var x=function(){function e(e,t,n){this.session=e,this.name=t,this.threadId=n,this.stoppedDetails=null,this.callStack=[],this.staleCallStack=[],this.stopped=!1}return e.prototype.getId=function(){return"thread:"+this.session.getId()+":"+this.threadId},e.prototype.clearCallStack=function(){this.callStack.length&&(this.staleCallStack=this.callStack),this.callStack=[]},e.prototype.getCallStack=function(){return this.callStack},
e.prototype.getStaleCallStack=function(){return this.staleCallStack},e.prototype.fetchCallStack=function(e){var t=this;if(void 0===e&&(e=20),!this.stopped)return o.TPromise.as(null);var n=this.callStack.length;return this.getCallStackImpl(n,e).then(function(e){n<t.callStack.length&&t.callStack.splice(n,t.callStack.length-n),t.callStack=t.callStack.concat(e||[])})},e.prototype.getCallStackImpl=function(e,t){var n=this;return this.session.raw.stackTrace({threadId:this.threadId,startFrame:e,levels:t}).then(function(t){return t&&t.body?(n.stoppedDetails&&(n.stoppedDetails.totalFrames=t.body.totalFrames),t.body.stackFrames.map(function(t,i){var r=n.session.getSource(t.source);return new T(n,t.id,r,t.name,t.presentationHint,new p.Range(t.line,t.column,t.endLine,t.endColumn),e+i)})):[]},function(e){return n.stoppedDetails&&(n.stoppedDetails.framesErrorMessage=e.message),[]})},Object.defineProperty(e.prototype,"exceptionInfo",{get:function(){var e=this.session.raw
;return this.stoppedDetails&&"exception"===this.stoppedDetails.reason?e.capabilities.supportsExceptionInfoRequest?e.exceptionInfo({threadId:this.threadId}).then(function(e){return e?{id:e.body.exceptionId,description:e.body.description,breakMode:e.body.breakMode,details:e.body.details}:null}):o.TPromise.as({description:this.stoppedDetails.text,breakMode:null}):o.TPromise.as(null)},enumerable:!0,configurable:!0}),e.prototype.next=function(){return this.session.raw.next({threadId:this.threadId})},e.prototype.stepIn=function(){return this.session.raw.stepIn({threadId:this.threadId})},e.prototype.stepOut=function(){return this.session.raw.stepOut({threadId:this.threadId})},e.prototype.stepBack=function(){return this.session.raw.stepBack({threadId:this.threadId})},e.prototype.continue=function(){return this.session.raw.continue({threadId:this.threadId})},e.prototype.pause=function(){return this.session.raw.pause({threadId:this.threadId})},e.prototype.terminate=function(){return this.session.raw.terminateThreads({
threadIds:[this.threadId]})},e.prototype.reverseContinue=function(){return this.session.raw.reverseContinue({threadId:this.threadId})},e}();t.Thread=x;var k=function(){function e(e,t){this._configuration=e,this.session=t,this.threads=new Map,this.sources=new Map}return Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration.resolved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unresolvedConfiguration",{get:function(){return this._configuration.unresolved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"raw",{get:function(){return this.session},set:function(e){this.session=e},enumerable:!0,configurable:!0}),e.prototype.getName=function(e){return e&&this.raw.root?this.configuration.name+" ("+r.basenameOrAuthority(this.raw.root.uri)+")":this.configuration.name},Object.defineProperty(e.prototype,"state",{get:function(){return"attach"===this.configuration.type?f.SessionState.ATTACH:f.SessionState.LAUNCH},enumerable:!0,configurable:!0}),
e.prototype.getSourceForUri=function(e){return this.sources.get(e.toString())},e.prototype.getSource=function(e){var t=new g.Source(e,this.getId());return this.sources.has(t.uri.toString())?((t=this.sources.get(t.uri.toString())).raw=v.mixin(t.raw,e),t.raw&&e&&(t.raw.presentationHint=e.presentationHint)):this.sources.set(t.uri.toString(),t),t},e.prototype.getThread=function(e){return this.threads.get(e)},e.prototype.getAllThreads=function(){var e=[];return this.threads.forEach(function(t){return e.push(t)}),e},e.prototype.getId=function(){return this.session.getId()},e.prototype.rawUpdate=function(e){if(e.thread&&!this.threads.has(e.threadId)?this.threads.set(e.threadId,new x(this,e.thread.name,e.thread.id)):e.thread&&e.thread.name&&(this.threads.get(e.threadId).name=e.thread.name),e.stoppedDetails)if(e.stoppedDetails.allThreadsStopped)this.threads.forEach(function(t){t.stoppedDetails=t.threadId===e.threadId?e.stoppedDetails:{reason:void 0},t.stopped=!0,t.clearCallStack()
});else if(this.threads.has(e.threadId)){var t=this.threads.get(e.threadId);t.stoppedDetails=e.stoppedDetails,t.clearCallStack(),t.stopped=!0}},e.prototype.clearThreads=function(e,t){if(void 0===t&&(t=void 0),void 0!==t&&null!==t){if(this.threads.has(t)){var n=this.threads.get(t);n.clearCallStack(),n.stoppedDetails=void 0,n.stopped=!1,e&&this.threads.delete(t)}}else this.threads.forEach(function(e){e.clearCallStack(),e.stoppedDetails=void 0,e.stopped=!1}),e&&(this.threads.clear(),C.allValues.clear())},e.prototype.completions=function(e,t,n,i){return this.raw.capabilities.supportsCompletionsRequest?this.raw.completions({frameId:e,text:t,column:n.column,line:n.lineNumber}).then(function(e){var n=[];return e&&e.body&&e.body.targets&&e.body.targets.forEach(function(e){e&&e.label&&n.push({label:e.label,insertText:e.text||e.label,type:e.type,filterText:e.start&&e.length&&t.substr(e.start,e.length).concat(e.label),overwriteBefore:e.length||i})}),n},function(){return[]}):o.TPromise.as([])},
e.prototype.setNotAvailable=function(e){var t=this.sources.get(e.toString());t&&(t.available=!1)},e}();t.Session=k;var D=function(){function e(e,t){this.enabled=e,this.id=t}return e.prototype.getId=function(){return this.id},e}();t.Enablement=D;var A=function(e){function t(t,n,i,r,o){var s=e.call(this,t,o)||this;return s.hitCondition=n,s.condition=i,s.logMessage=r,s.sessionData=new Map,void 0===t&&(s.enabled=!0),s}return n(t,e),t.prototype.getSessionData=function(){return this.sessionData.get(this.sessionId)},t.prototype.setSessionData=function(e,t){this.sessionData.set(e,t)},t.prototype.setSessionId=function(e){this.sessionId=e},Object.defineProperty(t.prototype,"verified",{get:function(){var e=this.getSessionData();return!e||e.verified},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"idFromAdapter",{get:function(){var e=this.getSessionData();return e?e.id:void 0},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){var e=Object.create(null);return e.enabled=this.enabled,
e.condition=this.condition,e.hitCondition=this.hitCondition,e.logMessage=this.logMessage,e},t}(D);t.BaseBreakpoint=A;var L=function(e){function t(t,n,i,r,o,s,a,l,u){void 0===u&&(u=c.generateUuid());var d=e.call(this,r,s,o,a,u)||this;return d.uri=t,d._lineNumber=n,d._column=i,d._adapterData=l,d}return n(t,e),Object.defineProperty(t.prototype,"lineNumber",{get:function(){var e=this.getSessionData();return e&&"number"==typeof e.line?e.line:this._lineNumber},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){var e=this.getSessionData();return e&&"number"==typeof e.column&&"number"==typeof this._column?e.column:this._column},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){var e=this.getSessionData();return e?e.message:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"adapterData",{get:function(){var e=this.getSessionData();return e&&e.source&&e.source.adapterData?e.source.adapterData:this._adapterData},
enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endLineNumber",{get:function(){var e=this.getSessionData();return e?e.endLine:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endColumn",{get:function(){var e=this.getSessionData();return e?e.endColumn:void 0},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.uri=this.uri,t.lineNumber=this._lineNumber,t.column=this._column,t.adapterData=this.adapterData,t},t.prototype.update=function(e){d.isUndefinedOrNull(e.lineNumber)||(this._lineNumber=e.lineNumber),d.isUndefinedOrNull(e.column)||(this._column=e.column),d.isUndefinedOrNull(e.condition)||(this.condition=e.condition),d.isUndefinedOrNull(e.hitCondition)||(this.hitCondition=e.hitCondition),d.isUndefinedOrNull(e.logMessage)||(this.logMessage=e.logMessage)},t}(A);t.Breakpoint=L;var R=function(e){function t(t,n,i,r,o,s){void 0===s&&(s=c.generateUuid());var a=e.call(this,n,i,r,o,s)||this;return a.name=t,a}
return n(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.name=this.name,t},t}(A);t.FunctionBreakpoint=R;var O=function(e){function t(t,n,i){var r=e.call(this,i,c.generateUuid())||this;return r.filter=t,r.label=n,r}return n(t,e),t.prototype.toJSON=function(){var e=Object.create(null);return e.filter=this.filter,e.label=this.label,e.enabled=this.enabled,e},t}(D);t.ExceptionBreakpoint=O;var M=function(){function e(e,t){this.sessionId=e,this.threadId=t}return e.prototype.getId=function(){return this.sessionId+":"+this.threadId},e}();t.ThreadAndSessionIds=M;var P=function(){function e(e,t,n,i,r){this.breakpoints=e,this.breakpointsActivated=t,this.functionBreakpoints=n,this.exceptionBreakpoints=i,this.watchExpressions=r,this.schedulers=new Map,this.sessions=[],this.replElements=[],this.toDispose=[],this._onDidChangeBreakpoints=new a.Emitter,this._onDidChangeCallStack=new a.Emitter,this._onDidChangeWatchExpressions=new a.Emitter,this._onDidChangeREPLElements=new a.Emitter}
return e.prototype.getId=function(){return"root"},e.prototype.getSessions=function(){return this.sessions},e.prototype.addSession=function(e,t){var n=new k(e,t);return this.sessions.push(n),n},e.prototype.removeSession=function(e){this.sessions=this.sessions.filter(function(t){return t.getId()!==e}),this._onDidChangeCallStack.fire()},Object.defineProperty(e.prototype,"onDidChangeBreakpoints",{get:function(){return this._onDidChangeBreakpoints.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeCallStack",{get:function(){return this._onDidChangeCallStack.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeWatchExpressions",{get:function(){return this._onDidChangeWatchExpressions.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeReplElements",{get:function(){return this._onDidChangeREPLElements.event},enumerable:!0,configurable:!0}),e.prototype.rawUpdate=function(e){var t=this.sessions.filter(function(t){
return t.getId()===e.sessionId}).pop();t&&(t.rawUpdate(e),this._onDidChangeCallStack.fire())},e.prototype.clearThreads=function(e,t,n){void 0===n&&(n=void 0);var i=this.sessions.filter(function(t){return t.getId()===e}).pop();this.schedulers.forEach(function(e){return e.dispose()}),this.schedulers.clear(),i&&(i.clearThreads(t,n),this._onDidChangeCallStack.fire())},e.prototype.fetchCallStack=function(e){var t=this;return e.session.raw.capabilities.supportsDelayedStackTraceLoading?e.fetchCallStack(1).then(function(){t.schedulers.has(e.getId())||t.schedulers.set(e.getId(),new u.RunOnceScheduler(function(){e.fetchCallStack(19).done(function(){return t._onDidChangeCallStack.fire()},l.onUnexpectedError)},420)),t.schedulers.get(e.getId()).schedule(),t._onDidChangeCallStack.fire()}):e.fetchCallStack()},e.prototype.getBreakpoints=function(e){var t=this;if(e){var n=e.uri?e.uri.toString():void 0;return this.breakpoints.filter(function(i){
return(!n||i.uri.toString()===n)&&((!e.lineNumber||i.lineNumber===e.lineNumber)&&((!e.column||i.column===e.column)&&!!(!e.enabledOnly||t.breakpointsActivated&&i.enabled)))})}return this.breakpoints},e.prototype.getFunctionBreakpoints=function(){return this.functionBreakpoints},e.prototype.getExceptionBreakpoints=function(){return this.exceptionBreakpoints},e.prototype.setExceptionBreakpoints=function(e){var t=this;if(e){if(this.exceptionBreakpoints.length===e.length&&this.exceptionBreakpoints.every(function(t,n){return t.filter===e[n].filter&&t.label===e[n].label}))return;this.exceptionBreakpoints=e.map(function(e){var n=t.exceptionBreakpoints.filter(function(t){return t.filter===e.filter}).pop();return new O(e.filter,e.label,n?n.enabled:e.default)}),this._onDidChangeBreakpoints.fire()}},e.prototype.areBreakpointsActivated=function(){return this.breakpointsActivated},e.prototype.setBreakpointsActivated=function(e){this.breakpointsActivated=e,this._onDidChangeBreakpoints.fire()},
e.prototype.addBreakpoints=function(e,t,n){var i=this;void 0===n&&(n=!0);var r=t.map(function(t){return new L(e,t.lineNumber,t.column,t.enabled,t.condition,t.hitCondition,t.logMessage,void 0,t.id)});return r.forEach(function(e){return e.setSessionId(i.breakpointsSessionId)}),this.breakpoints=this.breakpoints.concat(r),this.breakpointsActivated=!0,this.sortAndDeDup(),n&&this._onDidChangeBreakpoints.fire({added:r}),r},e.prototype.removeBreakpoints=function(e){this.breakpoints=this.breakpoints.filter(function(t){return!e.some(function(e){return e.getId()===t.getId()})}),this._onDidChangeBreakpoints.fire({removed:e})},e.prototype.updateBreakpoints=function(e){var t=[];this.breakpoints.forEach(function(n){var i=e[n.getId()];i&&(n.update(i),t.push(n))}),this.sortAndDeDup(),this._onDidChangeBreakpoints.fire({changed:t})},e.prototype.setBreakpointSessionData=function(e,t){this.breakpoints.forEach(function(n){var i=t[n.getId()];i&&n.setSessionData(e,i)}),this.functionBreakpoints.forEach(function(n){var i=t[n.getId()]
;i&&n.setSessionData(e,i)}),this._onDidChangeBreakpoints.fire({sessionOnly:!0})},e.prototype.setBreakpointsSessionId=function(e){this.breakpointsSessionId=e,this.breakpoints.forEach(function(t){return t.setSessionId(e)}),this.functionBreakpoints.forEach(function(t){return t.setSessionId(e)}),this._onDidChangeBreakpoints.fire({sessionOnly:!0})},e.prototype.sortAndDeDup=function(){this.breakpoints=this.breakpoints.sort(function(e,t){return e.uri.toString()!==t.uri.toString()?r.basenameOrAuthority(e.uri).localeCompare(r.basenameOrAuthority(t.uri)):e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}),this.breakpoints=h.distinct(this.breakpoints,function(e){return e.uri.toString()+":"+e.lineNumber+":"+e.column})},e.prototype.setEnablement=function(e,t){if(e instanceof L||e instanceof R||e instanceof O){var n=[];e.enabled!==t&&(e instanceof L||e instanceof R)&&n.push(e),e.enabled=t,this._onDidChangeBreakpoints.fire({changed:n})}},e.prototype.enableOrDisableAllBreakpoints=function(e){var t=[]
;this.breakpoints.forEach(function(n){n.enabled!==e&&t.push(n),n.enabled=e}),this.functionBreakpoints.forEach(function(n){n.enabled!==e&&t.push(n),n.enabled=e}),this._onDidChangeBreakpoints.fire({changed:t})},e.prototype.addFunctionBreakpoint=function(e,t){var n=new R(e,!0,void 0,void 0,void 0,t);return this.functionBreakpoints.push(n),this._onDidChangeBreakpoints.fire({added:[n]}),n},e.prototype.renameFunctionBreakpoint=function(e,t){var n=this.functionBreakpoints.filter(function(t){return t.getId()===e}).pop();n&&(n.name=t,this._onDidChangeBreakpoints.fire({changed:[n]}))},e.prototype.removeFunctionBreakpoints=function(e){var t;e?(t=this.functionBreakpoints.filter(function(t){return t.getId()===e}),this.functionBreakpoints=this.functionBreakpoints.filter(function(t){return t.getId()!==e})):(t=this.functionBreakpoints,this.functionBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:t})},e.prototype.getReplElements=function(){return this.replElements},e.prototype.addReplExpression=function(e,t,n){
var i=this,r=new E(n);return this.addReplElements([r]),r.evaluate(e,t,"repl").then(function(){return i._onDidChangeREPLElements.fire()})},e.prototype.appendToRepl=function(e,t,n){if("string"==typeof e){var i=this.replElements.length&&this.replElements[this.replElements.length-1],r=e.split("\n").map(function(e,i){return new S(e,t,0===i?n:void 0)});i&&""===i.value?this.replElements.pop():i instanceof S&&t===i.severity&&r.length&&r[0].sourceData===i.sourceData&&(i.value+=r.shift().value),this.addReplElements(r)}else e.severity=t,e.sourceData=n,this.addReplElements([e]);this._onDidChangeREPLElements.fire()},e.prototype.addReplElements=function(e){var t;(t=this.replElements).push.apply(t,e),this.replElements.length>1e4&&this.replElements.splice(0,this.replElements.length-1e4)},e.prototype.removeReplExpressions=function(){this.replElements.length>0&&(this.replElements=[],this._onDidChangeREPLElements.fire())},e.prototype.getWatchExpressions=function(){return this.watchExpressions},
e.prototype.addWatchExpression=function(e){var t=new E(e);return this.watchExpressions.push(t),this._onDidChangeWatchExpressions.fire(t),t},e.prototype.renameWatchExpression=function(e,t){var n=this.watchExpressions.filter(function(t){return t.getId()===e});1===n.length&&(n[0].name=t,this._onDidChangeWatchExpressions.fire(n[0]))},e.prototype.removeWatchExpressions=function(e){void 0===e&&(e=null),this.watchExpressions=e?this.watchExpressions.filter(function(t){return t.getId()!==e}):[],this._onDidChangeWatchExpressions.fire()},e.prototype.moveWatchExpression=function(e,t){var n=this.watchExpressions.filter(function(t){return t.getId()===e}).pop();this.watchExpressions=this.watchExpressions.filter(function(t){return t.getId()!==e}),this.watchExpressions=this.watchExpressions.slice(0,t).concat(n,this.watchExpressions.slice(t)),this._onDidChangeWatchExpressions.fire()},e.prototype.sourceIsNotAvailable=function(e){this.sessions.forEach(function(t){return t.setNotAvailable(e)}),this._onDidChangeCallStack.fire()},
e.prototype.dispose=function(){this.toDispose=s.dispose(this.toDispose)},e}();t.Model=P}),define(e[242],t([1,0,8,79,142,35,118,68,5,303,15,31,143,9,58,17]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";function b(e){var t={"\n":"\\n","\r":"\\r","\t":"\\t"};return e.replace(/[\n\r\t]/g,function(e){return t[e]})}function S(e,t,n){var r="string"==typeof e?e:e.value;t.className="value",null===r||(e instanceof o.Expression||e instanceof o.Variable)&&!e.available?(i.addClass(t,"unavailable"),r!==o.Expression.DEFAULT_VALUE&&i.addClass(t,"error")):n.showChanged&&e.valueChanged&&r!==o.Expression.DEFAULT_VALUE&&(t.className="value changed"),n.colorize&&"string"!=typeof e&&("number"===e.type||"boolean"===e.type||"string"===e.type?i.addClass(t,e.type):isNaN(+r)?_.test(r)?i.addClass(t,"boolean"):C.test(r)&&i.addClass(t,"string"):i.addClass(t,"number")),n.maxValueLength&&r.length>n.maxValueLength&&(r=r.substr(0,n.maxValueLength)+"..."),r&&!n.preserveWhitespace?t.textContent=b(r):t.textContent=r,
n.showHover&&(t.title=r)}Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_VALUE_RENDER_LENGTH_IN_VIEWLET=1024,t.twistiePixels=20;var _=/^true|false$/i,C=/^(['"]).*\1$/,E=i.$;t.renderViewTree=function(e){var t=document.createElement("div");return i.addClass(t,"debug-view-content"),e.appendChild(t),t},t.replaceWhitespace=b,t.renderExpressionValue=S,t.renderVariable=function(e,n,r){e.available&&(n.name.textContent=b(e.name),n.name.title=e.type?e.type:e.name,i.toggleClass(n.name,"virtual",!!e.presentationHint&&"virtual"===e.presentationHint.kind)),e.value?(n.name.textContent+="string"==typeof e.name?":":"",S(e,n.value,{showChanged:r,maxValueLength:t.MAX_VALUE_RENDER_LENGTH_IN_VIEWLET,preserveWhitespace:!1,showHover:!0,colorize:!0})):(n.value.textContent="",n.value.title="")},t.renderRenameBox=function(e,t,n,r,s,a,l){var p=i.append(a,E(".inputBoxContainer")),f=new c.InputBox(p,t,{validationOptions:l.validationOptions,placeholder:l.placeholder,ariaLabel:l.ariaLabel}),g=u.attachInputBoxStyler(f,n)
;f.value=l.initialValue?l.initialValue:"",f.focus(),f.select();var m=!1,y=[f,g],b=h.once(function(t){m||(m=!0,e.getViewModel().setSelectedExpression(void 0),s instanceof o.Expression&&t&&f.value?e.renameWatchExpression(s.getId(),f.value):s instanceof o.Expression&&!s.name?e.removeWatchExpressions(s.getId()):s instanceof o.Variable&&(s.errorMessage=null,t&&s.value!==f.value&&s.setVariable(f.value).done(function(){r.refresh(s,!1),e.focusStackFrame(e.getViewModel().focusedStackFrame)},v.onUnexpectedError)),r.domFocus(),r.setFocus(s),a.removeChild(p),d.dispose(y))});y.push(i.addStandardDisposableListener(f.inputElement,"keydown",function(e){var t=e.equals(9),n=e.equals(3);(t||n)&&(e.preventDefault(),e.stopPropagation(),b(n))})),y.push(i.addDisposableListener(f.inputElement,"blur",function(){b(!0)}))};var w=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,i,c)||this;return l.actionProvider=t,l.debugService=r,l.contextMenuService=o,l.contributedContextMenu=a.createMenu(n,s),l}return n(t,e),
t.prototype.onContextMenu=function(e,t,n,i){var r=this;if(void 0===i&&(i=!0),n.target&&n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(n.preventDefault(),n.stopPropagation(),i&&e.setFocus(t),this.actionProvider.hasSecondaryActions(e,t)){var o={x:n.posx,y:n.posy};return this.contextMenuService.showContextMenu({getAnchor:function(){return o},getActions:function(){return r.actionProvider.getSecondaryActions(e,t).then(function(e){return g.fillInContextMenuActions(r.contributedContextMenu,{arg:r.getContext(t)},e,r.contextMenuService),e})},onHide:function(t){t&&e.domFocus()},getActionsContext:function(){return t}}),!0}return!1},t.prototype.getContext=function(e){},t=a([l(3,r.IDebugService),l(4,s.IContextMenuService),l(5,p.IContextKeyService),l(6,f.IMenuService),l(7,y.IConfigurationService)],t)}(m.WorkbenchTreeController);t.BaseDebugController=w}),define(e[271],t([1,0,608,23,4,14,142,79,103,11]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var p=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"debug-action copy-value")||this;return o.value=i,o.debugService=r,o._enabled="string"==typeof o.value||o.value instanceof c.Variable&&!!o.value.evaluateName,o}return n(t,e),t.prototype.run=function(){var e=this;if(this.value instanceof c.Variable){var t=this.debugService.getViewModel().focusedStackFrame.frameId;return this.debugService.getViewModel().focusedSession.raw.evaluate({expression:this.value.evaluateName,frameId:t}).then(function(e){d.clipboard.writeText(e.body.result)},function(t){return d.clipboard.writeText(e.value.value)})}return d.clipboard.writeText(this.value),o.TPromise.as(null)},t.ID="workbench.debug.viewlet.action.copyValue",t.LABEL=i.localize(0,null),t=a([l(3,u.IDebugService)],t)}(r.Action);t.CopyValueAction=p;var f=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.value=i,r._enabled=r.value&&!!r.value.evaluateName,r}return n(t,e),t.prototype.run=function(){return d.clipboard.writeText(this.value.evaluateName),
o.TPromise.as(null)},t.ID="workbench.debug.viewlet.action.copyEvaluatePath",t.LABEL=i.localize(1,null),t}(r.Action);t.CopyEvaluatePathAction=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(){return d.clipboard.writeText(window.getSelection().toString()),o.TPromise.as(null)},t.ID="workbench.debug.action.copy",t.LABEL=i.localize(2,null),t}(r.Action);t.CopyAction=g;var v=h.isWindows?"\r\n":"\n",m=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.tree=i,r}return n(t,e),t.prototype.run=function(){for(var e="",t=this.tree.getNavigator();t.next();)e&&(e+=v),e+=t.current().toString();return d.clipboard.writeText(s.removeAnsiEscapeCodes(e)),o.TPromise.as(null)},t.ID="workbench.debug.action.copyAll",t.LABEL=i.localize(3,null),t}(r.Action);t.CopyAllAction=m;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e){
return d.clipboard.writeText(e.thread.getCallStack().map(function(e){return e.toString()}).join(v)),o.TPromise.as(null)},t.ID="workbench.action.debug.copyStackTrace",t.LABEL=i.localize(4,null),t}(r.Action);t.CopyStackTraceAction=y}),define(e[1225],t([1,0,659,23,33,27,36,25,10,21,62,11]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n)||this;return a.fileService=i,a.contextService=r,a.environmentService=o,a.editorService=s,a}return n(t,e),t.prototype.run=function(e){var n=this,r=d.default.file(u.join(this.environmentService.appSettingsHome,"locale.json"));return this.fileService.resolveFile(r).then(null,function(e){return n.fileService.createFile(r,t.DEFAULT_CONTENT)}).then(function(e){if(e)return n.editorService.openEditor({resource:e.resource,options:{forceOpen:!0}})},function(e){throw new Error(i.localize(4,null,p.getPathLabel(r,n.environmentService,n.contextService),e))})},
t.ID="workbench.action.configureLocale",t.LABEL=i.localize(0,null),t.DEFAULT_CONTENT=["{","\t// "+i.localize(1,null),"\t// "+i.localize(2,null,"https://go.microsoft.com/fwlink/?LinkId=761051"),"\t",'\t"locale":"'+f.language+'" // '+i.localize(3,null),"}"].join("\n"),t=a([l(2,o.IFileService),l(3,s.IWorkspaceContextService),l(4,c.IEnvironmentService),l(5,h.IEditorService)],t)}(r.Action);t.ConfigureLocaleAction=g}),define(e[272],t([1,0,4,686,20,30,11,23,122,109,31,15,86,110,6,28,37,64,32,34,38,7,50,17,21,9,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";function A(e){var t=e.getValue(),n=t.workbench&&t.workbench.commandPalette&&t.workbench.commandPalette.history;return"number"!=typeof n&&(n=M.DEFAULT_COMMANDS_HISTORY_LENGTH),n}Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_COMMANDS_PREFIX=">";var L,R,O=1,M=function(){function e(e,t,n){this.storageService=e,this.lifecycleService=t,this.configurationService=n,this.updateConfiguration(),this.load(),this.registerListeners()}
return e.prototype.updateConfiguration=function(){this.commandHistoryLength=A(this.configurationService),R&&(R.limit=this.commandHistoryLength)},e.prototype.load=function(){var t,n=this.storageService.get(e.PREF_KEY_CACHE);if(n)try{t=JSON.parse(n)}catch(e){}if(R=new I.LRUCache(this.commandHistoryLength,1),t){(t.usesLRU?t.entries:t.entries.sort(function(e,t){return e.value-t.value})).forEach(function(e){return R.set(e.key,e.value)})}O=this.storageService.getInteger(e.PREF_KEY_COUNTER,void 0,O)},e.prototype.registerListeners=function(){var e=this;this.configurationService.onDidChangeConfiguration(function(t){return e.updateConfiguration()}),w.once(this.lifecycleService.onShutdown)(function(t){return e.save()})},e.prototype.save=function(){var t={usesLRU:!0,entries:[]};R.forEach(function(e,n){return t.entries.push({key:n,value:e})}),this.storageService.store(e.PREF_KEY_CACHE,JSON.stringify(t)),this.storageService.store(e.PREF_KEY_COUNTER,O)},e.prototype.push=function(e){R.set(e,O++)},
e.prototype.peek=function(e){return R.peek(e)},e.DEFAULT_COMMANDS_HISTORY_LENGTH=50,e.PREF_KEY_CACHE="commandPalette.mru.cache",e.PREF_KEY_COUNTER="commandPalette.mru.counter",e=a([l(0,C.IStorageService),l(1,E.ILifecycleService),l(2,T.IConfigurationService)],e)}(),P=function(e){function o(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=i,o.configurationService=r,o}return n(o,e),o.prototype.run=function(e){var n=this.configurationService.getValue(),r=n.workbench&&n.workbench.commandPalette&&!0===n.workbench.commandPalette.preserveInput,o=t.ALL_COMMANDS_PREFIX;return r&&L&&(o=""+o+L),this.quickOpenService.show(o,{inputSelection:L?{start:1,end:o.length}:void 0}),i.TPromise.as(null)},o.ID="workbench.action.showCommands",o.LABEL=r.localize(0,null),o=a([l(2,S.IQuickOpenService),l(3,T.IConfigurationService)],o)}(u.Action);t.ShowAllCommandsAction=P;var N=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.configurationService=i,r}return n(t,e),t.prototype.run=function(e){
var t=A(this.configurationService);return t>0&&(R=new I.LRUCache(t),O=1),i.TPromise.as(null)},t.ID="workbench.action.clearCommandHistory",t.LABEL=r.localize(1,null),t=a([l(2,T.IConfigurationService)],t)}(u.Action);t.ClearCommandHistoryAction=N;var F=function(e){function o(){return e.call(this,{id:P.ID,label:r.localize(2,null),alias:"Command Palette",precondition:null,menuOpts:{group:"z_commands",order:1}})||this}return n(o,e),o.prototype.run=function(e,n){return e.get(S.IQuickOpenService).show(t.ALL_COMMANDS_PREFIX),i.TPromise.as(null)},o}(_.EditorAction),W=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this)||this;return l.commandId=t,l.keybinding=n,l.label=i,l.onBeforeRun=s,l.notificationService=a,l.telemetryService=c,l.labelLowercase=l.label.toLowerCase(),l.keybindingAriaLabel=n?n.getAriaLabel():void 0,l.label!==r?l.alias=r:o.alias=null,l.setHighlights(o.label,null,o.alias),l}return n(t,e),t.prototype.getCommandId=function(){return this.commandId},t.prototype.getLabel=function(){return this.label},
t.prototype.getSortLabel=function(){return this.labelLowercase},t.prototype.getDescription=function(){return this.description},t.prototype.setDescription=function(e){this.description=e},t.prototype.getKeybinding=function(){return this.keybinding},t.prototype.getDetail=function(){return this.alias},t.prototype.getAriaLabel=function(){return this.keybindingAriaLabel?r.localize(3,null,this.getLabel(),this.keybindingAriaLabel):r.localize(4,null,this.getLabel())},t.prototype.run=function(e,t){return e===d.Mode.OPEN&&(this.runAction(this.getAction()),!0)},t.prototype.runAction=function(e){var t=this;this.onBeforeRun(this.commandId),i.TPromise.timeout(50).done(function(){if(!e||e instanceof u.Action&&!e.enabled)t.notificationService.info(r.localize(5,null,t.getLabel()));else try{t.telemetryService.publicLog("workbenchActionExecuted",{id:e.id,from:"quick open"}),(e.run()||i.TPromise.as(null)).done(function(){e instanceof u.Action&&e.dispose()},function(e){return t.onError(e)})}catch(e){t.onError(e)}},function(e){
return t.onError(e)})},t.prototype.onError=function(e){k.isPromiseCanceledError(e)||this.notificationService.error(e||r.localize(6,null,this.label))},t=a([l(6,D.INotificationService),l(7,y.ITelemetryService)],t)}(h.QuickOpenEntryGroup),B=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,n,i,r,o,a,c,l)||this;return u.action=s,u}return n(t,e),t.prototype.getAction=function(){return this.action},t=a([l(7,D.INotificationService),l(8,y.ITelemetryService)],t)}(W),V=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,n,i,r,o,a,c,l)||this;return u.action=s,u}return n(t,e),t.prototype.getAction=function(){return this.action},t=a([l(7,D.INotificationService),l(8,y.ITelemetryService)],t)}(W),z=v.or(v.matchesPrefix,v.matchesWords,v.matchesContiguousSubString),H=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.editorService=t,s.instantiationService=n,s.keybindingService=i,s.menuService=r,s.configurationService=o,s.commandsHistory=s.instantiationService.createInstance(M),
s.configurationService.onDidChangeConfiguration(function(e){return s.updateConfiguration()}),s.updateConfiguration(),s}return n(t,e),t.prototype.updateConfiguration=function(){this.commandHistoryEnabled=A(this.configurationService)>0},t.prototype.getResults=function(e){var t=this;e=e.trim(),this.lastSearchValue=e;var n=this.editorService.activeTextEditorWidget,a=[];n&&s.isFunction(n.getSupportedActions)&&(a=n.getSupportedActions());var c=this.editorActionsToEntries(a,e),l=this.editorService.invokeWithinEditorContext(function(e){return t.menuService.createMenu(p.MenuId.CommandPalette,e.get(f.IContextKeyService))}).getActions().reduce(function(e,t){var n=t[1];return e.concat(n)},[]).filter(function(e){return e instanceof p.MenuItemAction}),u=this.menuItemActionsToEntries(l,e),d=c.concat(u);d=o.distinct(d,function(e){return""+e.getLabel()+e.getGroupLabel()+e.getCommandId()});var g=new Set;d.forEach(function(e){var t=""+e.getLabel()+e.getGroupLabel();g.has(t)?e.setDescription(e.getCommandId()):g.add(t)})
;var v=(d=d.sort(function(e,n){var i=t.commandsHistory.peek(e.getCommandId()),r=t.commandsHistory.peek(n.getCommandId());return i&&r?i>r?-1:1:i?-1:r?1:e.getSortLabel().localeCompare(n.getSortLabel())}))[0];if(v&&this.commandsHistory.peek(v.getCommandId())){v.setGroupLabel(r.localize(7,null));for(var m=1;m<d.length;m++){var y=d[m];if(!this.commandsHistory.peek(y.getCommandId())){y.setShowBorder(!0),y.setGroupLabel(r.localize(8,null));break}}}return i.TPromise.as(new h.QuickOpenModel(d))},t.prototype.editorActionsToEntries=function(e,t){for(var n=this,i=[],r=0;r<e.length;r++){var o=e[r];if(o.id!==P.ID){var s=o.label;if(s){var a=c.language!==c.LANGUAGE_DEFAULT?o.alias:null,l=z(t,s),u=a?z(t,a):null;(l||u)&&i.push(this.instantiationService.createInstance(B,o.id,this.keybindingService.lookupKeybinding(o.id),s,a,{label:l,alias:u},o,function(e){return n.onBeforeRunCommand(e)}))}}}return i},t.prototype.onBeforeRunCommand=function(e){L=this.lastSearchValue,this.commandsHistory.push(e)},
t.prototype.menuItemActionsToEntries=function(e,t){for(var n=this,i=[],o=0,s=e;o<s.length;o++){var a=s[o],l="string"==typeof a.item.title?a.item.title:a.item.title.value,u=void 0,d=l;if(a.item.category&&(u="string"==typeof a.item.category?a.item.category:a.item.category.value,d=r.localize(9,null,u,l)),d){var h=z(t,d),p=c.language!==c.LANGUAGE_DEFAULT&&"string"!=typeof a.item.title?a.item.title.original:null,f=c.language!==c.LANGUAGE_DEFAULT&&u&&"string"!=typeof a.item.category?a.item.category.original:null,g=void 0;p&&u?g=f?f+": "+p:u+": "+p:p&&(g=p);var v=g?z(t,g):null;(h||v)&&i.push(this.instantiationService.createInstance(V,a.id,this.keybindingService.lookupKeybinding(a.item.id),d,g,{label:h,alias:v},a,function(e){return n.onBeforeRunCommand(e)}))}}return i},t.prototype.getAutoFocus=function(e,t){var n=e.trim();if(n&&this.commandHistoryEnabled){var i=t.model&&t.model.entries[0];i instanceof W&&this.commandsHistory.peek(i.getCommandId())&&(n=void 0)}return{autoFocusFirstEntry:!0,autoFocusPrefixMatch:n}},
t.prototype.getEmptyLabel=function(e){return r.localize(10,null)},t.prototype.onClose=function(e){e&&(L=void 0)},t.ID="workbench.picker.commands",t=a([l(0,x.IEditorService),l(1,m.IInstantiationService),l(2,b.IKeybindingService),l(3,p.IMenuService),l(4,T.IConfigurationService)],t)}(g.QuickOpenHandler);t.CommandsHandler=H,_.registerEditorAction(F)}),define(e[1227],t([1,0,4,687,30,122,109,86,57,64,97,12,21,45]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GOTO_LINE_PREFIX=":";var m=function(e){function i(n,i,r,o){var s=e.call(this,n,i,t.GOTO_LINE_PREFIX,r)||this;return s._quickOpenService=r,s.editorService=o,s}return n(i,e),i.prototype.run=function(){var t=this.editorService.activeTextEditorWidget;v.isDiffEditor(t)&&(t=t.getModifiedEditor());var n=null;if(v.isCodeEditor(t)){2===t.getConfiguration().viewInfo.renderLineNumbers&&(t.updateOptions({lineNumbers:"on"}),n={lineNumbers:"relative"})}var i=e.prototype.run.call(this)
;if(n)var r=this._quickOpenService.onHide(function(){r&&(r.dispose(),r=null,t.updateOptions(n))});return i},i.ID="workbench.action.gotoLine",i.LABEL=r.localize(0,null),i=a([l(2,h.IQuickOpenService),l(3,g.IEditorService)],i)}(u.QuickOpenAction);t.GotoLineAction=m;var y=function(e){function t(t,n,i){var r=e.call(this,n)||this;return r.parseInput(t),r.handler=i,r}return n(t,e),t.prototype.parseInput=function(e){var t=e.split(/,|:|#/).map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)});this.line=t[0],this.column=t[1]},t.prototype.getLabel=function(){var e=this.getMaxLineNumber();return this.invalidRange(e)?e>0?r.localize(1,null,e):r.localize(2,null):this.column?r.localize(3,null,this.line,this.column):r.localize(4,null,this.line)},t.prototype.invalidRange=function(e){return void 0===e&&(e=this.getMaxLineNumber()),!this.line||!o.isNumber(this.line)||e>0&&o.isNumber(this.line)&&this.line>e},t.prototype.getMaxLineNumber=function(){var e=this.editorService.activeTextEditorWidget.getModel()
;return e&&e.modified&&e.original&&(e=e.modified),e&&o.isFunction(e.getLineCount)?e.getLineCount():-1},t.prototype.run=function(e,t){return e===s.Mode.OPEN?this.runOpen(t):this.runPreview()},t.prototype.getInput=function(){return this.editorService.activeEditor},t.prototype.getOptions=function(e){return{selection:this.toSelection(),pinned:e}},t.prototype.runOpen=function(e){if(this.invalidRange())return!1;e.keymods.ctrlCmd&&this.editorService.openEditor(this.getInput(),this.getOptions(e.keymods.alt),g.SIDE_GROUP);var t=this.toSelection(),n=this.editorService.activeTextEditorWidget;return n&&(n.setSelection(t),n.revealRangeInCenter(t,0)),!0},t.prototype.runPreview=function(){if(this.invalidRange())return this.handler.clearDecorations(),!1;var e=this.toSelection(),t=this.editorService.activeTextEditorWidget;return t&&(t.revealRangeInCenter(e,0),o.isFunction(t.changeDecorations)&&this.handler.decorateOutline(e,t,this.editorService.activeControl.group)),!1},t.prototype.toSelection=function(){return{
startLineNumber:this.line,startColumn:this.column||1,endLineNumber:this.line,endColumn:this.column||1}},t}(u.EditorQuickOpenEntry),b=function(e){function t(t){var n=e.call(this)||this;return n.editorService=t,n}return n(t,e),t.prototype.getAriaLabel=function(){return r.localize(5,null)},t.prototype.getResults=function(e){if(e=e.trim(),!this.lastKnownEditorViewState){var t=this.editorService.activeTextEditorWidget;this.lastKnownEditorViewState=t.saveViewState()}return i.TPromise.as(new c.QuickOpenModel([new y(e,this.editorService,this)]))},t.prototype.canRun=function(){return!!!!this.editorService.activeTextEditorWidget||r.localize(6,null)},t.prototype.decorateOutline=function(e,t,n){var i=this;t.changeDecorations(function(t){var r=[];i.rangeHighlightDecorationId&&(r.push(i.rangeHighlightDecorationId.lineDecorationId),r.push(i.rangeHighlightDecorationId.rangeHighlightId),i.rangeHighlightDecorationId=null);var o=[{range:e,options:{className:"rangeHighlight",isWholeLine:!0}},{range:e,options:{overviewRuler:{
color:f.themeColorFromId(p.overviewRulerRangeHighlight),darkColor:f.themeColorFromId(p.overviewRulerRangeHighlight),position:d.OverviewRulerLane.Full}}}],s=t.deltaDecorations(r,o),a=s[0],c=s[1];i.rangeHighlightDecorationId={groupId:n.id,rangeHighlightId:a,lineDecorationId:c}})},t.prototype.clearDecorations=function(){var e=this;this.rangeHighlightDecorationId&&(this.editorService.visibleControls.forEach(function(t){if(t.group.id===e.rangeHighlightDecorationId.groupId){t.getControl().changeDecorations(function(t){t.deltaDecorations([e.rangeHighlightDecorationId.lineDecorationId,e.rangeHighlightDecorationId.rangeHighlightId],[])})}}),this.rangeHighlightDecorationId=null)},t.prototype.onClose=function(e){if(this.clearDecorations(),e&&this.lastKnownEditorViewState){var t=this.editorService.activeTextEditorWidget;t&&t.restoreViewState(this.lastKnownEditorViewState)}this.lastKnownEditorViewState=null},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:e.trim().length>0}},t.ID="workbench.picker.line",
t=a([l(0,g.IEditorService)],t)}(u.QuickOpenHandler);t.GotoLineHandler=b}),define(e[1228],t([1,0,4,688,30,14,122,109,86,110,57,64,950,44,12,97,21,910]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GOTO_SYMBOL_PREFIX="@",t.SCOPE_PREFIX=":";var S=function(e){function i(n,i,r){return e.call(this,n,i,t.GOTO_SYMBOL_PREFIX,r)||this}return n(i,e),i.ID="workbench.action.gotoSymbol",i.LABEL=r.localize(0,null),i=a([l(2,f.IQuickOpenService)],i)}(d.QuickOpenAction);t.GotoSymbolAction=S;var _=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.applyFilter=function(e){var n=e;0===e.indexOf(t.SCOPE_PREFIX)&&(n=n.substr(t.SCOPE_PREFIX.length)),this.entries.forEach(function(e){if(e.setGroupLabel(null),e.setShowBorder(!1),e.setHighlights(null),e.setHidden(!1),n){var t=h.matchesFuzzy(n,e.getLabel());t?(e.setHighlights(t),e.setHidden(!1)):e.isHidden()||e.setHidden(!0)}}),
e?0===e.indexOf(t.SCOPE_PREFIX)?this.entries.sort(this.sortScoped.bind(this,e.toLowerCase())):this.entries.sort(this.sortNormal.bind(this,e.toLowerCase())):this.entries.sort(function(e,t){return e.getIndex()-t.getIndex()});var i=this.getEntries(!0);if(i.length>0&&0===e.indexOf(t.SCOPE_PREFIX)){for(var o=null,s=null,a=0,c=0;c<i.length;c++){var l=i[c];o!==l.getType()?(s&&s.setGroupLabel(this.renderGroupLabel(o,a)),o=l.getType(),s=l,a=1,l.setShowBorder(c>0)):a++}s&&s.setGroupLabel(this.renderGroupLabel(o,a))}else i.length>0&&i[0].setGroupLabel(r.localize(1,null,i.length))},i.prototype.sortNormal=function(e,t,n){if(t.isHidden()&&n.isHidden())return 0;if(t.isHidden())return 1;if(n.isHidden())return-1;var i=t.getLabel().toLowerCase(),r=n.getLabel().toLowerCase(),o=i.localeCompare(r);if(0!==o)return o;var s=t.getRange(),a=n.getRange();return s.startLineNumber-a.startLineNumber},i.prototype.sortScoped=function(e,n,i){if(n.isHidden()&&i.isHidden())return 0;if(n.isHidden())return 1;if(i.isHidden())return-1
;e=e.substr(t.SCOPE_PREFIX.length);var r=n.getType(),o=i.getType(),s=r.localeCompare(o);if(0!==s)return s;if(e){var a=n.getLabel().toLowerCase(),c=i.getLabel().toLowerCase();if(0!==(s=a.localeCompare(c)))return s}var l=n.getRange(),u=i.getRange();return l.startLineNumber-u.startLineNumber},i.prototype.renderGroupLabel=function(e,t){var n=i.getDefaultGroupLabelPatterns()[e];return n?s.format(n,t):e},i.getDefaultGroupLabelPatterns=function(){var e=Object.create(null);return e.method=r.localize(2,null),e.function=r.localize(3,null),e.constructor=r.localize(4,null),e.variable=r.localize(5,null),e.class=r.localize(6,null),e.interface=r.localize(7,null),e.namespace=r.localize(8,null),e.package=r.localize(9,null),e.module=r.localize(10,null),e.property=r.localize(11,null),e.enum=r.localize(12,null),e.string=r.localize(13,null),e.rule=r.localize(14,null),e.file=r.localize(15,null),e.array=r.localize(16,null),e.number=r.localize(17,null),e.boolean=r.localize(18,null),e.object=r.localize(19,null),
e.key=r.localize(20,null),e},i}(u.QuickOpenModel),C=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this)||this;return u.index=t,u.name=n,u.type=i,u.icon=o,u.description=r,u.range=s,u.setHighlights(a),u.editorService=c,u.handler=l,u}return n(t,e),t.prototype.getIndex=function(){return this.index},t.prototype.getLabel=function(){return this.name},t.prototype.getAriaLabel=function(){return r.localize(21,null,this.getLabel())},t.prototype.getIcon=function(){return this.icon},t.prototype.getDescription=function(){return this.description},t.prototype.getType=function(){return this.type},t.prototype.getRange=function(){return this.range},t.prototype.getInput=function(){return this.editorService.activeEditor},t.prototype.getOptions=function(e){return{selection:this.toSelection(),pinned:e}},t.prototype.run=function(e,t){return e===c.Mode.OPEN?this.runOpen(t):this.runPreview()},t.prototype.runOpen=function(e){
if(e.keymods.ctrlCmd)this.editorService.openEditor(this.getInput(),this.getOptions(e.keymods.alt),b.SIDE_GROUP);else{var t=this.toSelection(),n=this.editorService.activeTextEditorWidget;n&&(n.setSelection(t),n.revealRangeInCenter(t,0))}return!0},t.prototype.runPreview=function(){var e=this.toSelection(),t=this.editorService.activeTextEditorWidget;return t&&(t.revealRangeInCenter(e,0),o.isFunction(t.changeDecorations)&&this.handler.decorateOutline(this.range,e,t,this.editorService.activeControl.group)),!1},t.prototype.toSelection=function(){return{startLineNumber:this.range.startLineNumber,startColumn:this.range.startColumn||1,endLineNumber:this.range.startLineNumber,endColumn:this.range.startColumn||1}},t}(d.EditorQuickOpenEntryGroup),E=function(e){function c(t){var n=e.call(this)||this;return n.editorService=t,n.outlineToModelCache={},n}return n(c,e),c.prototype.getResults=function(e){if(e=e.trim(),!this.lastKnownEditorViewState){var t=this.editorService.activeTextEditorWidget
;this.lastKnownEditorViewState=t.saveViewState()}return this.getActiveOutline().then(function(t){return t.applyFilter(e),t})},c.prototype.getEmptyLabel=function(e){return e.length>0?r.localize(22,null):r.localize(23,null)},c.prototype.getAriaLabel=function(){return r.localize(24,null)},c.prototype.canRun=function(){var e=!1,t=this.editorService.activeTextEditorWidget;if(t){var n=t.getModel();n&&n.modified&&n.original&&(n=n.modified),n&&o.isFunction(n.getLanguageIdentifier)&&(e=v.DocumentSymbolProviderRegistry.has(n))}return!!e||(null!==t?r.localize(25,null):r.localize(26,null))},c.prototype.getAutoFocus=function(e){return 0===(e=e.trim()).indexOf(t.SCOPE_PREFIX)&&(e=e.substr(t.SCOPE_PREFIX.length)),{autoFocusPrefixMatch:e,autoFocusFirstEntry:!!e}},c.prototype.toQuickOpenEntries=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=s.trim(i.name),o=i.containerName,a=v.symbolKindToCssClass(i.kind);t.push(new C(n,r,a,o,a,i.range,null,this.editorService,this))}return t},
c.prototype.getActiveOutline=function(){return this.activeOutlineRequest||(this.activeOutlineRequest=this.doGetActiveOutline()),this.activeOutlineRequest},c.prototype.doGetActiveOutline=function(){var e=this,t=this.editorService.activeTextEditorWidget;if(t){var n=t.getModel();if(n&&n.modified&&n.original&&(n=n.modified),n&&o.isFunction(n.getLanguageIdentifier)){var r=n.id;return this.outlineToModelCache[r]?i.TPromise.as(this.outlineToModelCache[r]):g.getDocumentSymbols(n).then(function(t){var n=new _(e.toQuickOpenEntries(t));return e.outlineToModelCache={},e.outlineToModelCache[r]=n,n})}}return i.TPromise.wrap(null)},c.prototype.decorateOutline=function(e,t,n,i){var r=this;n.changeDecorations(function(n){var o=[];r.rangeHighlightDecorationId&&(o.push(r.rangeHighlightDecorationId.lineDecorationId),o.push(r.rangeHighlightDecorationId.rangeHighlightId),r.rangeHighlightDecorationId=null);var s=[{range:e,options:{className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{overviewRuler:{
color:m.themeColorFromId(y.overviewRulerRangeHighlight),darkColor:m.themeColorFromId(y.overviewRulerRangeHighlight),position:p.OverviewRulerLane.Full}}}],a=n.deltaDecorations(o,s),c=a[0],l=a[1];r.rangeHighlightDecorationId={groupId:i.id,rangeHighlightId:c,lineDecorationId:l}})},c.prototype.clearDecorations=function(){var e=this;this.rangeHighlightDecorationId&&(this.editorService.visibleControls.forEach(function(t){if(t.group.id===e.rangeHighlightDecorationId.groupId){t.getControl().changeDecorations(function(t){t.deltaDecorations([e.rangeHighlightDecorationId.lineDecorationId,e.rangeHighlightDecorationId.rangeHighlightId],[])})}}),this.rangeHighlightDecorationId=null)},c.prototype.onClose=function(e){if(this.outlineToModelCache={},this.clearDecorations(),e&&this.lastKnownEditorViewState){var t=this.editorService.activeTextEditorWidget;t&&t.restoreViewState(this.lastKnownEditorViewState)}this.lastKnownEditorViewState=null,this.activeOutlineRequest=null},c.ID="workbench.picker.filesymbols",
c=a([l(0,b.IEditorService)],c)}(d.QuickOpenHandler);t.GotoSymbolHandler=E}),define(e[1229],t([1,0,4,689,30,16,122,109,86,64]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HELP_PREFIX="?";var p=function(e){function t(t,n,i,r){var o=e.call(this)||this;return t?o.prefix=o.prefixLabel=t:(o.prefix="",o.prefixLabel="…"),o.description=n,o.quickOpenService=i,o.openOnPreview=r,o}return n(t,e),t.prototype.getLabel=function(){return this.prefixLabel},t.prototype.getAriaLabel=function(){return r.localize(0,null,this.getLabel())},t.prototype.getDescription=function(){return this.description},t.prototype.run=function(e,t){return(e===c.Mode.OPEN||this.openOnPreview)&&this.quickOpenService.show(this.prefix),!1},t}(u.QuickOpenEntryGroup),f=function(e){function c(t){var n=e.call(this)||this;return n.quickOpenService=t,n}return n(c,e),c.prototype.getResults=function(e){var n=this;e=e.trim()
;var a=s.Registry.as(d.Extensions.Quickopen),c=a.getQuickOpenHandlers(),l=a.getDefaultQuickOpenHandler();l&&c.push(l);var h,f=[],g=[];return c.sort(function(e,t){return e.prefix.localeCompare(t.prefix)}).forEach(function(i){if(i.prefix!==t.HELP_PREFIX)if(o.isArray(i.helpEntries))for(var r=0;r<i.helpEntries.length;r++){var s=i.helpEntries[r];0===s.prefix.indexOf(e)&&(h=new p(s.prefix,s.description,n.quickOpenService,e.length>0),s.needsEditor?g.push(h):f.push(h))}else 0===i.prefix.indexOf(e)&&(h=new p(i.prefix,i.description,n.quickOpenService,e.length>0),f.push(h))}),f.length>0&&f[0].setGroupLabel(r.localize(1,null)),g.length>0&&(g[0].setGroupLabel(r.localize(2,null)),f.length>0&&g[0].setShowBorder(!0)),i.TPromise.as(new u.QuickOpenModel(f.concat(g)))},c.prototype.getAutoFocus=function(e){return e=e.trim(),{autoFocusFirstEntry:e.length>0,autoFocusPrefixMatch:e}},c.ID="workbench.picker.help",c=a([l(0,h.IQuickOpenService)],c)}(d.QuickOpenHandler);t.HelpHandler=f}),
define(e[430],t([1,0,699,4,9,18,86,109,122,110,14,19,62,44,6,27,17,233,36,25,21]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var w=function(e){function t(t,n,i,r,o,s){var a=e.call(this,o)||this;return a._bearing=t,a._provider=n,a._configurationService=i,a._contextService=r,a._environmentService=s,a}return n(t,e),t.prototype.getLabel=function(){return this._bearing.name},t.prototype.getAriaLabel=function(){return i.localize(0,null,this.getLabel())},t.prototype.getDescription=function(){var e=this._bearing.containerName;return this._bearing.location.uri?e?e+" — "+C.basename(this._bearing.location.uri.fsPath):g.getPathLabel(this._bearing.location.uri,this._environmentService,this._contextService):e},t.prototype.getIcon=function(){return v.symbolKindToCssClass(this._bearing.kind)},t.prototype.getResource=function(){return this._bearing.location.uri},t.prototype.run=function(t,n){var i=this
;return this._bearingResolve||"function"!=typeof this._provider.resolveWorkspaceSymbol||this._bearing.location.range||(this._bearingResolve=this._provider.resolveWorkspaceSymbol(this._bearing).then(function(e){return i._bearing=e||i._bearing,i},o.onUnexpectedError)),r.TPromise.as(this._bearingResolve).then(function(r){return e.prototype.run.call(i,t,n)}).then(void 0,o.onUnexpectedError),t===d.Mode.OPEN},t.prototype.getInput=function(){var e={resource:this._bearing.location.uri,options:{pinned:!this._configurationService.getValue().workbench.editor.enablePreviewFromQuickOpen}};return this._bearing.location.range&&(e.options.selection=f.Range.collapseToStart(this._bearing.location.range)),e},t.compare=function(e,t,n){if(e.getLabel().toLowerCase()===t.getLabel().toLowerCase()){var i=v.symbolKindToCssClass(e._bearing.kind),r=v.symbolKindToCssClass(t._bearing.kind);return i.localeCompare(r)}return u.compareEntries(e,t,n)},
t=a([l(2,b.IConfigurationService),l(3,y.IWorkspaceContextService),l(4,E.IEditorService),l(5,_.IEnvironmentService)],t)}(c.EditorQuickOpenEntry),I=function(e){function t(n){var i=e.call(this)||this;return i.instantiationService=n,i.delayer=new s.ThrottledDelayer(t.SEARCH_DELAY),i.options=Object.create(null),i}return n(t,e),t.prototype.setOptions=function(e){this.options=e},t.prototype.canRun=function(){return!0},t.prototype.getResults=function(e){var t=this;e=e.trim();return(this.options.skipDelay?this.doGetResults(e):this.delayer.trigger(function(){return t.doGetResults(e)})).then(function(e){return new u.QuickOpenModel(e)})},t.prototype.doGetResults=function(e){var t=this;return S.getWorkspaceSymbols(e).then(function(n){for(var i=[],r=0,o=n;r<o.length;r++){var s=o[r],a=s[0],c=s[1];t.fillInSymbolEntries(i,a,c,e)}return t.options.skipSorting?i:(e=e?p.stripWildcards(e.toLowerCase()):e,i.sort(function(t,n){return w.compare(t,n,e)}))})},t.prototype.fillInSymbolEntries=function(e,t,n,i){
for(var r=0,o=n;r<o.length;r++){var s=o[r];if(!this.options.skipLocalSymbols||!s.containerName){var a=this.instantiationService.createInstance(w,s,t);a.setHighlights(h.matchesFuzzy(i,a.getLabel())),e.push(a)}}},t.prototype.getGroupLabel=function(){return i.localize(1,null)},t.prototype.getEmptyLabel=function(e){return e.length>0?i.localize(2,null):i.localize(3,null)},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!0,autoFocusPrefixMatch:e.trim()}},t.ID="workbench.picker.symbols",t.SEARCH_DELAY=500,t=a([l(0,m.IInstantiationService)],t)}(c.QuickOpenHandler);t.OpenSymbolHandler=I}),define(e[431],t([1,0,716,110,23,86,109,64,154,216,146]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,n,i,r){void 0===r&&(r=[]);var o=e.call(this,r)||this;return o.quickOpenService=t,o.taskService=n,o._task=i,o}return n(t,e),t.prototype.getLabel=function(){return this.task._label},t.prototype.getDescription=function(){
if(!this.taskService.needsFolderQualification())return null;var e=d.Task.getWorkspaceFolder(this.task);return e?""+e.name:null},t.prototype.getAriaLabel=function(){return i.localize(0,null,this.getLabel())},Object.defineProperty(t.prototype,"task",{get:function(){return this._task},enumerable:!0,configurable:!0}),t.prototype.doRun=function(e,t){return this.taskService.run(e,t),!(!e.command||e.command.presentation.focus)||(this.quickOpenService.close(),!1)},t}(c.QuickOpenEntry);t.TaskEntry=f;var g=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t}(c.QuickOpenEntryGroup);t.TaskGroupEntry=g;var v=function(e){function t(t,n){var i=e.call(this)||this;return i.quickOpenService=t,i.taskService=n,i.quickOpenService=t,i.taskService=n,i}return n(t,e),t.prototype.onOpen=function(){this.tasks=this.getTasks()},t.prototype.onClose=function(e){this.tasks=void 0},t.prototype.getResults=function(e){var t=this;return this.tasks.then(function(n){var r=[];if(0===n.length)return new c.QuickOpenModel(r)
;var o=t.taskService.getRecentlyUsedTasks(),s=[],a=[],l=[],u=Object.create(null);n.forEach(function(e){var t=d.Task.getRecentlyUsedKey(e);t&&(u[t]=e)}),o.keys().forEach(function(e){var t=u[e];t&&s.push(t)});for(var h=0,f=n;h<f.length;h++){var g=f[h],v=d.Task.getRecentlyUsedKey(g);v&&o.has(v)||(d.CustomTask.is(g)?a.push(g):l.push(g))}var m=t.taskService.createSorter(),y=s.length>0;t.fillEntries(r,e,s,i.localize(1,null));var b=(a=a.sort(function(e,t){return m.compare(e,t)})).length>0;return t.fillEntries(r,e,a,i.localize(2,null),y),l=l.sort(function(e,t){return m.compare(e,t)}),t.fillEntries(r,e,l,i.localize(3,null),y||b),new c.QuickOpenModel(r,new p.ContributableActionProvider)})},t.prototype.fillEntries=function(e,t,n,i,o){void 0===o&&(o=!1);for(var s=!0,a=0,c=n;a<c.length;a++){var l=c[a],u=r.matchesFuzzy(t,l._label);u&&(s?(s=!1,e.push(new g(this.createEntry(l,u),i,o))):e.push(this.createEntry(l,u)))}},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!!e}},t}(s.QuickOpenHandler)
;t.QuickOpenHandler=v;var m=function(e){function t(n,i){var r=e.call(this,t.ID,t.LABEL)||this;return r.taskService=n,r.quickOpenService=i,r.updateClass(),r}return n(t,e),t.prototype.updateClass=function(){this.class="quick-open-task-configure"},t.prototype.run=function(e){var t=this,n=this.getTask(e);return d.ContributedTask.is(n)?this.taskService.customize(n,void 0,!0).then(function(){t.quickOpenService.close()}):this.taskService.openConfig(n).then(function(){t.quickOpenService.close()})},t.prototype.getTask=function(e){return e instanceof f?e.task:e instanceof g?e.getEntry().task:void 0},t.ID="workbench.action.tasks.customizeTask",t.LABEL=i.localize(4,null),t}(o.Action),y=function(e){function t(t,n){var i=e.call(this)||this;return i.action=new m(t,n),i}return n(t,e),t.prototype.hasActions=function(e){return!!this.getTask(e)},t.prototype.getActions=function(e){var t=[],n=this.getTask(e);return(n&&d.ContributedTask.is(n)||d.CustomTask.is(n))&&t.push(this.action),t},t.prototype.getTask=function(e){if(e){
var t=e.element;return t instanceof f?t.task:t instanceof g?t.getEntry().task:void 0}},t=a([l(0,h.ITaskService),l(1,u.IQuickOpenService)],t)}(p.ActionBarContributor);t.QuickOpenActionContributor=y}),define(e[315],t([1,0,730,4,122,109,86,94,146,14,110,29]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i){var r=e.call(this)||this;return r.instance=t,r.label=n,r.terminalService=i,r}return n(t,e),t.prototype.getLabel=function(){return this.label},t.prototype.getAriaLabel=function(){return i.localize(0,null,this.getLabel())},t.prototype.run=function(t,n){var i=this;return t===o.Mode.OPEN?(setTimeout(function(){i.terminalService.setActiveInstance(i.instance),i.terminalService.showPanel(!0)},0),!0):e.prototype.run.call(this,t,n)},t}(s.QuickOpenEntry);t.TerminalEntry=g;var v=function(e){function t(t,n){var i=e.call(this)||this;return i.label=t,i.commandService=n,i}return n(t,e),t.prototype.getLabel=function(){return this.label},
t.prototype.getAriaLabel=function(){return i.localize(1,null,this.getLabel())},t.prototype.run=function(t,n){var i=this;return t===o.Mode.OPEN?(setTimeout(function(){return i.commandService.executeCommand("workbench.action.terminal.new")},0),!0):e.prototype.run.call(this,t,n)},t}(s.QuickOpenEntry);t.CreateTerminal=v;var m=function(e){function t(t,n){var i=e.call(this)||this;return i.terminalService=t,i.commandService=n,i}return n(t,e),t.prototype.getResults=function(e){e=e.trim();var t=h.stripWildcards(e).toLowerCase(),n=this.getTerminals();n.push(new v(i.localize(2,null),this.commandService));var o=n.filter(function(n){if(!e)return!0;var i=p.matchesFuzzy(t,n.getLabel(),!0);return!!i&&(n.setHighlights(i),!0)});return r.TPromise.as(new s.QuickOpenModel(o,new d.ContributableActionProvider))},t.prototype.getTerminals=function(){var e=this;return this.terminalService.terminalTabs.reduce(function(t,n,i){var r=n.terminalInstances.map(function(t,n){var r=i+1+"."+(n+1)+": "+t.title;return new g(t,r,e.terminalService)
});return t.concat(r)},[])},t.prototype.getAutoFocus=function(e,t){return{autoFocusFirstEntry:!!e||!!t.quickNavigateConfiguration}},t.prototype.getEmptyLabel=function(e){return e.length>0?i.localize(3,null):i.localize(4,null)},t.ID="workbench.picker.terminals",t=a([l(0,u.ITerminalService),l(1,f.ICommandService)],t)}(c.QuickOpenHandler);t.TerminalPickerHandler=m}),define(e[1233],t([1,0,736,59,11,87,10,5,88,4,17,94,21]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var g="(((\\.\\.?|\\~)|([^\\0\\s!$`&*()\\[\\]+'\":;\\\\])+)?(\\/([^\\0\\s!$`&*()\\[\\]+'\":;\\\\])+)+)",v="((([a-zA-Z]:|\\.\\.?|\\~)|([^\\0<>\\?\\|\\/\\s!$`&*()\\[\\]+'\":;])+)?((\\\\|\\/)([^\\0<>\\?\\|\\/\\s!$`&*()\\[\\]+'\":;])+)+)",m=['((\\S*)", line ((\\d+)( column (\\d+))?))',"((\\S*) on line ((\\d+)(, column (\\d+))?))","((\\S*):line ((\\d+)(, column (\\d+))?))","(([^\\s\\(\\)]*)(\\s?[\\(\\[](\\d+)(,\\s?(\\d+))?)[\\)\\]])","(([^:\\s\\(\\)<>'\"\\[\\]]*)(:(\\d+))?(:(\\d+))?)"].join("|").replace(/ /g,"[  ]"),y=function(){function e(e,t,n,i,o,s,a){this._xterm=e,this._platform=t,this._initialCwd=n,this._openerService=i,this._editorService=o,this._configurationService=s,this._terminalService=a,this._hoverDisposables=[];var c=t===r.Platform.Windows?v:g;this._localLinkPattern=new RegExp(c+"("+m+")"),this.registerWebLinkHandler(),this.registerLocalLinkHandler()}return e.prototype.setWidgetManager=function(e){this._widgetManager=e},e.prototype.registerCustomLinkHandler=function(e,t,n,i){var r=this
;return this._xterm.registerLinkMatcher(e,this._wrapLinkHandler(t),{matchIndex:n,validationCallback:function(e,t){return i(e,t)},tooltipCallback:function(e){return r._widgetManager.showMessage(e.offsetX,e.offsetY,r._getLinkHoverString())},leaveCallback:function(){return r._widgetManager.closeMessage()},willLinkActivate:function(e){return r._isLinkActivationModifierDown(e)},priority:-1})},e.prototype.registerWebLinkHandler=function(){var e=this,t=this._wrapLinkHandler(function(t){e._handleHypertextLink(t)});this._xterm.webLinksInit(t,{validationCallback:function(t,n){return e._validateWebLink(t,n)},tooltipCallback:function(t){return e._widgetManager.showMessage(t.offsetX,t.offsetY,e._getLinkHoverString())},leaveCallback:function(){return e._widgetManager.closeMessage()},willLinkActivate:function(t){return e._isLinkActivationModifierDown(t)}})},e.prototype.registerLocalLinkHandler=function(){var e=this,t=this._wrapLinkHandler(function(t){e._handleLocalLink(t)})
;this._xterm.registerLinkMatcher(this._localLinkRegex,t,{validationCallback:function(t,n){return e._validateLocalLink(t,n)},tooltipCallback:function(t){return e._widgetManager.showMessage(t.offsetX,t.offsetY,e._getLinkHoverString())},leaveCallback:function(){return e._widgetManager.closeMessage()},willLinkActivate:function(t){return e._isLinkActivationModifierDown(t)},priority:-2})},e.prototype.dispose=function(){this._xterm=null,this._hoverDisposables=c.dispose(this._hoverDisposables),this._mouseMoveDisposable=c.dispose(this._mouseMoveDisposable)},e.prototype._wrapLinkHandler=function(e){var t=this;return function(n,i){return n.preventDefault(),t._isLinkActivationModifierDown(n)?e(i):(t._terminalService.getActiveInstance().focus(!0),!1)}},Object.defineProperty(e.prototype,"_localLinkRegex",{get:function(){return this._localLinkPattern},enumerable:!0,configurable:!0}),e.prototype._handleLocalLink=function(e){var t=this;return this._resolvePath(e).then(function(n){if(n){
var r=i.normalize(i.resolve(n)),o=t.extractLinkUrl(r),a=s.default.file(o),c=t.extractLineColumnInfo(e),l={startLineNumber:c.lineNumber,startColumn:c.columnNumber};return t._editorService.openEditor({resource:a,options:{pinned:!0,selection:l}})}})},e.prototype._validateLocalLink=function(e,t){this._resolvePath(e).then(function(e){return t(!!e)})},e.prototype._validateWebLink=function(e,t){t(!0)},e.prototype._handleHypertextLink=function(e){var t=s.default.parse(e);this._openerService.open(t)},e.prototype._isLinkActivationModifierDown=function(e){return"ctrlCmd"===this._configurationService.getValue("editor").multiCursorModifier?!!e.altKey:r.isMacintosh?e.metaKey:e.ctrlKey},e.prototype._getLinkHoverString=function(){return"ctrlCmd"===this._configurationService.getValue("editor").multiCursorModifier?n.localize(0,null):r.isMacintosh?n.localize(1,null):n.localize(2,null)},e.prototype._preprocessPath=function(e){if(this._platform===r.Platform.Windows){if("~"===e.charAt(0)){
if(!process.env.HOMEDRIVE||!process.env.HOMEPATH)return null;e=process.env.HOMEDRIVE+"\\"+(process.env.HOMEPATH+e.substring(1))}if(!e.match("^[a-zA-Z]:")){if(!this._initialCwd)return null;e=i.join(this._initialCwd,e)}}else if("/"!==e.charAt(0)&&"~"!==e.charAt(0)){if(!this._initialCwd)return null;e=i.join(this._initialCwd,e)}return e},e.prototype._resolvePath=function(e){if(!(e=this._preprocessPath(e)))return d.TPromise.as(void 0);var t=this.extractLinkUrl(e);return t?o.fileExists(t).then(function(t){return t?e:null}):d.TPromise.as(void 0)},e.prototype.extractLineColumnInfo=function(e){for(var t=this._localLinkRegex.exec(e),n={lineNumber:1,columnNumber:1},i=this._platform===r.Platform.Windows?12:11,o=0;o<m.length;o++){var s=i+6*o,a=t[s];if(a){n.lineNumber=parseInt(a,10);var c=t[s+2];c&&(n.columnNumber=parseInt(c,10));break}}return n},e.prototype.extractLinkUrl=function(e){var t=this._localLinkRegex.exec(e);return t?t[1]:null},
e=a([l(3,u.IOpenerService),l(4,f.IEditorService),l(5,h.IConfigurationService),l(6,p.ITerminalService)],e)}();t.TerminalLinkHandler=y}),define(e[1234],t([1,0,23,32,745,21]),function(e,t,i,r,o,s){"use strict";function c(e){var t=e.get(s.IEditorService).activeControl;return t.isWebviewEditor?t:null}Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=c(e);n&&n.showFind()},t.ID="editor.action.webvieweditor.showFind",t}(r.Command);t.ShowWebViewEditorFindWidgetCommand=u;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=c(e);n&&n.hideFind()},t.ID="editor.action.webvieweditor.hideFind",t}(r.Command);t.HideWebViewEditorFindCommand=d;var h=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){
for(var e=document.querySelectorAll("webview.ready"),t=0;t<e.length;t++)try{e.item(t).openDevTools()}catch(e){console.error(e)}return null},t.ID="workbench.action.webview.openDeveloperTools",t.LABEL=o.localize(0,null),t}(i.Action);t.OpenWebviewDeveloperToolsAction=h;var p=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorService=i,r}return n(t,e),t.prototype.run=function(){for(var e=0,t=this.getVisibleWebviews();e<t.length;e++){t[e].reload()}return null},t.prototype.getVisibleWebviews=function(){return this.editorService.visibleControls.filter(function(e){return e&&e.isWebviewEditor}).map(function(e){return e})},t.ID="workbench.action.webview.reloadWebviewAction",t.LABEL=o.localize(1,null),t=a([l(2,s.IEditorService)],t)}(i.Action);t.ReloadWebviewAction=p}),define(e[1235],t([1,0,969,45,21,12,4,40]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n){var i=e.call(this,n)||this;return i.editorService=t,i}return n(t,e),
t.prototype.getActiveCodeEditor=function(){var e=this.editorService.activeTextEditorWidget;return r.isCodeEditor(e)?e:r.isDiffEditor(e)?e.getModifiedEditor():null},t.prototype.openCodeEditor=function(e,t,n){var i=this.editorService.activeTextEditorWidget;if(!n&&r.isDiffEditor(i)&&e.options&&e.resource&&i.getModel()&&t===i.getModifiedEditor()&&e.resource.toString()===i.getModel().modified.uri.toString()){var o=i.getModifiedEditor();return u.TextEditorOptions.create(e.options).apply(o,0),c.TPromise.as(o)}return this.doOpenCodeEditor(e,t,n)},t.prototype.doOpenCodeEditor=function(e,t,n){return this.editorService.openEditor(e,n?o.SIDE_GROUP:o.ACTIVE_GROUP).then(function(e){if(e){var t=e.getControl();if(r.isCodeEditor(t))return t}return null})},t=a([l(0,o.IEditorService),l(1,s.IThemeService)],t)}(i.CodeEditorServiceImpl);t.CodeEditorService=d}),define(e[1236],t([1,0,760,25,43,4,18,40,113,36,17,29,27,21,1204,45,211,30]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var _=function(e){function t(t,n,i,s,a,c){var l=e.call(this,{getFolderUri:function(e){var t=c.getWorkspace().folders.filter(function(t){return t.name===e}).pop();return t?t.uri:void 0},getWorkspaceFolderCount:function(){return c.getWorkspace().folders.length},getConfigurationValue:function(e,t){return s.getValue(t,e?{resource:e}:void 0)},getExecPath:function(){return i.execPath},getFilePath:function(){var e=n.activeEditor;e instanceof b.DiffEditorInput&&(e=e.modifiedInput);var t=u.toResource(e,{filter:o.Schemas.file});if(t)return r.normalize(t.fsPath,!0)},getSelectedText:function(){var e=n.activeTextEditorWidget;if(y.isCodeEditor(e)){var t=e.getModel(),i=e.getSelection();if(t&&i)return t.getValueInRange(i)}},getLineNumber:function(){var e=n.activeTextEditorWidget;if(y.isCodeEditor(e)){var t=e.getSelection().positionLineNumber;return String(t)}}},t)||this;return l.commandService=a,l}return n(t,e),t.prototype.resolveWithCommands=function(e,t,n){var i=this;return t=this.resolveAny(e,t),
this.executeCommandVariables(t,n).then(function(n){return n?d.size(n)>0?i.resolveAny(e,t,n):t:null})},t.prototype.executeCommandVariables=function(e,t){var n=this;if(!e)return s.TPromise.as(null);var r=[],o=/\${command:(.*?)}/g,a=function(e){Object.keys(e).forEach(function(t){var n=e[t];if(n&&"object"==typeof n)a(n);else if("string"==typeof n)for(var i=void 0;null!==(i=o.exec(n));)if(2===i.length){var s=i[1];r.indexOf(s)<0&&r.push(s)}})};a(e);var l=!1,u=Object.create(null),d=r.map(function(r){return function(){var o=t?t[r]:null;return o||(o=r),n.commandService.executeCommand(o,e).then(function(e){if("string"==typeof e)u[r]=e;else{if(!S.isUndefinedOrNull(e))throw new Error(i.localize(0,null,r));l=!0}})}});return c.sequence(d).then(function(){return l?null:u})},t=a([l(1,v.IEditorService),l(2,h.IEnvironmentService),l(3,p.IConfigurationService),l(4,f.ICommandService),l(5,g.IWorkspaceContextService)],t)}(m.AbstractVariableResolverService);t.ConfigurationResolverService=_}),define(e[49],t([1,0,6]),function(e,t,n){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionService=n.createDecorator("extensionService");var i=function(){return function(e,t,n,i,r){this.startup=e,this.codeLoadingTime=t,this.activateCallTime=n,this.activateResolvedTime=i,this.activationEvent=r}}();t.ActivationTimes=i;var r=function(){return function(e,t){this.description=e,this.value=t}}();t.ExtensionPointContribution=r}),define(e[434],t([1,0,220,4,49,6,5,100,1427]),function(e,t,n,i,r,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=3e4;t.IExtensionUrlHandler=c.createDecorator("inactiveExtensionUrlHandler");var f=function(){function e(e,t,n){var i=this;this.extensionService=t,this.dialogService=n,this.extensionHandlers=new Map,this.uriBuffer=new Map;var r=setInterval(function(){return i.garbageCollect()},p);this.disposable=u.combinedDisposable([e.registerHandler(this),u.toDisposable(function(){return clearInterval(r)})])}return e.prototype.handleURL=function(e){
return o(this,void 0,i.TPromise,function(){var t,n,r,o,a,c,l,u;return s(this,function(s){switch(s.label){case 0:return function(e){return/^[a-z0-9][a-z0-9\-]*\.[a-z0-9][a-z0-9\-]*$/i.test(e)}(e.authority)?(t=e.authority,n=this.extensionHandlers.has(t),[4,this.extensionService.getExtensions()]):[2,!1];case 1:return r=s.sent(),(o=r.filter(function(e){return e.id===t})[0])?[4,this.dialogService.confirm({message:h.localize(0,null,t),detail:(o.displayName||o.name)+" ("+t+") wants to open a URL:\n\n"+e.toString()})]:[2,!1];case 2:return(a=s.sent()).confirmed?(c=this.extensionHandlers.get(t))?n?[2,i.TPromise.as(!1)]:[2,c.handleURL(e)]:(l=(new Date).getTime(),(u=this.uriBuffer.get(t))||(u=[],this.uriBuffer.set(t,u)),u.push({timestamp:l,uri:e}),[4,this.extensionService.activateByEvent("onUri:"+t)]):[2,!0];case 3:return s.sent(),[2,!0]}})})},e.prototype.registerExtensionHandler=function(e,t){this.extensionHandlers.set(e,t);for(var n=0,i=this.uriBuffer.get(e)||[];n<i.length;n++){var r=i[n].uri;t.handleURL(r)}
this.uriBuffer.delete(e)},e.prototype.unregisterExtensionHandler=function(e){this.extensionHandlers.delete(e)},e.prototype.garbageCollect=function(){var e=(new Date).getTime(),t=new Map;this.uriBuffer.forEach(function(n,i){(n=n.filter(function(t){var n=t.timestamp;return e-n<3e5})).length>0&&t.set(i,n)}),this.uriBuffer=t},e.prototype.dispose=function(){this.disposable.dispose(),this.extensionHandlers.clear(),this.uriBuffer.clear()},e=a([l(0,n.IURLService),l(1,r.IExtensionService),l(2,d.IDialogService)],e)}();t.ExtensionUrlHandler=f}),define(e[1239],t([1,0,5,75,16,42,17,692,36,27,49,18,70,11,38,100,24]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(e,t,n,i,r,o,s){var a=this;this.windowsService=e,this.windowService=t,this.configurationService=n,this.envService=i,this.dialogService=r,this.contextService=o,this.extensionService=s,this.toDispose=[];var c=this.contextService.getWorkspace()
;this.firstFolderResource=c.folders.length>0?c.folders[0].uri:void 0,this.extensionHostRestarter=new p.RunOnceScheduler(function(){return a.extensionService.restartExtensionHost()},10),this.onConfigurationChange(n.getValue(),!1),this.handleWorkbenchState(),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationChange(e.configurationService.getValue(),!0)})),this.toDispose.push(this.contextService.onDidChangeWorkbenchState(function(){return setTimeout(function(){return e.handleWorkbenchState()})}))},e.prototype.onConfigurationChange=function(e,t){var n=this,i=!1;!e.window||e.window.titleBarStyle===this.titleBarStyle||"native"!==e.window.titleBarStyle&&"custom"!==e.window.titleBarStyle||(this.titleBarStyle=e.window.titleBarStyle,i=!0),g.isMacintosh&&e.window&&"boolean"==typeof e.window.nativeTabs&&e.window.nativeTabs!==this.nativeTabs&&(this.nativeTabs=e.window.nativeTabs,
i=!0),g.isMacintosh&&e.window&&"boolean"==typeof e.window.clickThroughInactive&&e.window.clickThroughInactive!==this.clickThroughInactive&&(this.clickThroughInactive=e.window.clickThroughInactive,i=!0),e.update&&"string"==typeof e.update.channel&&e.update.channel!==this.updateChannel&&(this.updateChannel=e.update.channel,i=!0),e.telemetry&&"boolean"==typeof e.telemetry.enableCrashReporter&&e.telemetry.enableCrashReporter!==this.enableCrashReporter&&(this.enableCrashReporter=e.telemetry.enableCrashReporter,i=!0),e.files&&"boolean"==typeof e.files.useExperimentalFileWatcher&&e.files.useExperimentalFileWatcher!==this.experimentalFileWatcher&&(this.experimentalFileWatcher=e.files.useExperimentalFileWatcher,i=!0),this.experimentalFileWatcher||this.contextService.getWorkbenchState()!==d.WorkbenchState.FOLDER||e.files&&"object"==typeof e.files.watcherExclude&&!y.equals(e.files.watcherExclude,this.fileWatcherExclude)&&(this.fileWatcherExclude=e.files.watcherExclude,i=!0),
g.isMacintosh&&e.keyboard&&e.keyboard.touchbar&&"boolean"==typeof e.keyboard.touchbar.enabled&&e.keyboard.touchbar.enabled!==this.touchbarEnabled&&(this.touchbarEnabled=e.keyboard.touchbar.enabled,i=!0),e.workbench&&e.workbench.tree&&"boolean"==typeof e.workbench.tree.horizontalScrolling&&e.workbench.tree.horizontalScrolling!==this.treeHorizontalScrolling&&(this.treeHorizontalScrolling=e.workbench.tree.horizontalScrolling,i=!0),g.isWindows&&e.window&&"boolean"==typeof e.window.smoothScrollingWorkaround&&e.window.smoothScrollingWorkaround!==this.windowsSmoothScrollingWorkaround&&(this.windowsSmoothScrollingWorkaround=e.window.smoothScrollingWorkaround,i=!0),t&&i&&this.doConfirm(c.localize(0,null),c.localize(1,null,this.envService.appNameLong),c.localize(2,null),function(){return n.windowsService.relaunch(Object.create(null))})},e.prototype.handleWorkbenchState=function(){var e=this;if(this.contextService.getWorkbenchState()===d.WorkbenchState.WORKSPACE){var t=this.contextService.getWorkspace()
;this.firstFolderResource=t.folders.length>0?t.folders[0].uri:void 0,this.onDidChangeWorkspaceFoldersUnbind||(this.onDidChangeWorkspaceFoldersUnbind=this.contextService.onDidChangeWorkspaceFolders(function(){return e.onDidChangeWorkspaceFolders()}))}else this.onDidChangeWorkspaceFoldersUnbind=n.dispose(this.onDidChangeWorkspaceFoldersUnbind)},e.prototype.onDidChangeWorkspaceFolders=function(){var e=this.contextService.getWorkspace(),t=e.folders.length>0?e.folders[0].uri:void 0;f.isEqual(this.firstFolderResource,t,!g.isLinux)||(this.firstFolderResource=t,this.extensionHostRestarter.schedule())},e.prototype.doConfirm=function(e,t,n,i){var r=this;this.windowService.isFocused().then(function(o){if(o)return r.dialogService.confirm({type:"info",message:e,detail:t,primaryButton:n}).then(function(e){e.confirmed&&i()})})},e.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose)},
e=a([l(0,o.IWindowsService),l(1,o.IWindowService),l(2,s.IConfigurationService),l(3,u.IEnvironmentService),l(4,m.IDialogService),l(5,d.IWorkspaceContextService),l(6,h.IExtensionService)],e)}();t.SettingsChangeRelauncher=b;r.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(b,v.LifecyclePhase.Running)}),define(e[1240],t([1,0,717,122,64,154,216,49,431]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i,r){return void 0===r&&(r=[]),e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.run=function(e,t){if(e===r.Mode.PREVIEW)return!1;var n=this._task;return this.doRun(n,{attachProblemMatcher:!0})},t}(d.TaskEntry),p=function(e){function t(t,n,i){var r=e.call(this,t,i)||this;return r.activationPromise=n.activateByEvent("onCommand:workbench.action.tasks.runTask"),r}return n(t,e),t.prototype.getAriaLabel=function(){return i.localize(0,null)},t.prototype.getTasks=function(){var e=this;return this.activationPromise.then(function(){
return e.taskService.tasks().then(function(e){return e.filter(function(e){return s.ContributedTask.is(e)||s.CustomTask.is(e)})})})},t.prototype.createEntry=function(e,t){return new h(this.quickOpenService,this.taskService,e,t)},t.prototype.getEmptyLabel=function(e){return e.length>0?i.localize(1,null):i.localize(2,null)},t.ID="workbench.picker.tasks",t=a([l(0,o.IQuickOpenService),l(1,u.IExtensionService),l(2,c.ITaskService)],t)}(d.QuickOpenHandler);t.QuickOpenHandler=p}),define(e[1241],t([1,0,852,49,29]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._extensionService=e,this._commandService=t}return e.prototype.createMenu=function(e,t){return new n.Menu(e,this._extensionService.whenInstalledExtensionsRegistered(),this._commandService,t)},e=a([l(0,i.IExtensionService),l(1,r.ICommandService)],e)}();t.MenuService=o}),define(e[1242],t([1,0,4,6,29,49,7,5,77]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var h=function(e){function t(t,n,i){var r=e.call(this)||this;return r._instantiationService=t,r._extensionService=n,r._logService=i,r._extensionHostIsReady=!1,r._onWillExecuteCommand=r._register(new c.Emitter),r.onWillExecuteCommand=r._onWillExecuteCommand.event,r._extensionService.whenInstalledExtensionsRegistered().then(function(e){return r._extensionHostIsReady=e}),r}return n(t,e),t.prototype.executeCommand=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._logService.trace("CommandService#executeCommand",e);var s=this._extensionService.activateByEvent("onCommand:"+e),a=!!o.CommandsRegistry.getCommand(e);if(!this._extensionHostIsReady&&a)return this._tryExecuteCommand(e,n);var c=s;return a||(c=i.TPromise.join([s,this._extensionService.activateByEvent("*")])),c.then(function(i){return t._tryExecuteCommand(e,n)})},t.prototype._tryExecuteCommand=function(e,t){var n=o.CommandsRegistry.getCommand(e)
;if(!n)return i.TPromise.wrapError(new Error("command '"+e+"' not found"));try{this._onWillExecuteCommand.fire({commandId:e});var r=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler].concat(t));return i.TPromise.as(r)}catch(e){return i.TPromise.wrapError(e)}},t=a([l(0,r.IInstantiationService),l(1,s.IExtensionService),l(2,d.ILogService)],t)}(u.Disposable);t.CommandService=h}),define(e[102],t([1,0,766,9,83,120,16,80]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=Object.hasOwnProperty,l=s.Registry.as(o.Extensions.JSONContribution),u=function(){function e(e,t,n){this._messageHandler=e,this._extension=t,this._extensionPointId=n}return e.prototype._msg=function(e,t){this._messageHandler({type:e,message:t,extensionId:this._extension.id,extensionPointId:this._extensionPointId})},e.prototype.error=function(e){this._msg(r.default.Error,e)},e.prototype.warn=function(e){this._msg(r.default.Warning,e)},e.prototype.info=function(e){
this._msg(r.default.Info,e)},e}();t.ExtensionMessageCollector=u;var d=function(){function e(e){this.name=e,this._handler=null,this._users=null,this._done=!1}return e.prototype.setHandler=function(e){if(null!==this._handler||this._done)throw new Error("Handler already set!");this._handler=e,this._handle()},e.prototype.acceptUsers=function(e){if(null!==this._users||this._done)throw new Error("Users already set!");this._users=e,this._handle()},e.prototype._handle=function(){if(null!==this._handler&&null!==this._users){this._done=!0;var e=this._handler;this._handler=null;var t=this._users;this._users=null;try{e(t)}catch(e){i.onUnexpectedError(e)}}},e}();t.ExtensionPoint=d;var h="vscode://schemas/vscode-extensions",p={properties:{engines:{type:"object",description:n.localize(0,null),properties:{vscode:{type:"string",description:n.localize(1,null),default:"^1.22.0"}}},publisher:{description:n.localize(2,null),type:"string"},displayName:{description:n.localize(3,null),type:"string"},categories:{
description:n.localize(4,null),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:["Programming Languages","Snippets","Linters","Themes","Debuggers","Other","Keymaps","Formatters","Extension Packs","SCM Providers","Azure","Language Packs"]},{type:"string",const:"Languages",deprecationMessage:n.localize(5,null)}]}},galleryBanner:{type:"object",description:n.localize(6,null),properties:{color:{description:n.localize(7,null),type:"string"},theme:{description:n.localize(8,null),type:"string",enum:["dark","light"]}}},contributes:{description:n.localize(9,null),type:"object",properties:{},default:{}},preview:{type:"boolean",description:n.localize(10,null)},activationEvents:{description:n.localize(11,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onLanguage",description:n.localize(12,null),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:n.localize(13,null),body:"onCommand:${2:commandId}"},{label:"onDebug",description:n.localize(14,null),body:"onDebug"},{
label:"onDebugInitialConfigurations",description:n.localize(15,null),body:"onDebugInitialConfigurations"},{label:"onDebugResolve",description:n.localize(16,null),body:"onDebugResolve:${6:type}"},{label:"workspaceContains",description:n.localize(17,null),body:"workspaceContains:${4:filePattern}"},{label:"onView",body:"onView:${5:viewId}",description:n.localize(18,null)},{label:"onUri",body:"onUri",description:n.localize(19,null)},{label:"*",description:n.localize(20,null),body:"*"}]}},badges:{type:"array",description:n.localize(21,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:n.localize(22,null)},href:{type:"string",description:n.localize(23,null)},description:{type:"string",description:n.localize(24,null)}}}},markdown:{type:"string",description:n.localize(25,null),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:n.localize(26,null),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},
extensionDependencies:{description:n.localize(27,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:a.EXTENSION_IDENTIFIER_PATTERN}},scripts:{type:"object",properties:{"vscode:prepublish":{description:n.localize(28,null),type:"string"},"vscode:uninstall":{description:n.localize(29,null),type:"string"}}},icon:{type:"string",description:n.localize(30,null)}}},f=function(){function e(){this._extensionPoints={}}return e.prototype.registerExtensionPoint=function(e,t,n){if(c.call(this._extensionPoints,e))throw new Error("Duplicate extension point: "+e);var i=new d(e);return this._extensionPoints[e]=i,p.properties.contributes.properties[e]=n,l.registerSchema(h,p),i},e.prototype.getExtensionPoints=function(){var e=this;return Object.keys(this._extensionPoints).map(function(t){return e._extensionPoints[t]})},e}();t.ExtensionsRegistryImpl=f;var g={ExtensionsRegistry:"ExtensionsRegistry"};s.Registry.add(g.ExtensionsRegistry,new f),t.ExtensionsRegistry=s.Registry.as(g.ExtensionsRegistry),l.registerSchema(h,p)
}),define(e[1244],t([1,0,102,599,95]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debuggersExtPoint=n.ExtensionsRegistry.registerExtensionPoint("debuggers",[],{description:i.localize(0,null),type:"array",defaultSnippets:[{body:[{type:"",extensions:[]}]}],items:{type:"object",defaultSnippets:[{body:{type:"",program:"",runtime:"",enableBreakpointsFor:{languageIds:[""]}}}],properties:{type:{description:i.localize(1,null),type:"string"},label:{description:i.localize(2,null),type:"string"},program:{description:i.localize(3,null),type:"string"},args:{description:i.localize(4,null),type:"array"},runtime:{description:i.localize(5,null),type:"string"},runtimeArgs:{description:i.localize(6,null),type:"array"},variables:{description:i.localize(7,null),type:"object"},initialConfigurations:{description:i.localize(8,null),type:["array","string"]},languages:{description:i.localize(9,null),type:"array"},adapterExecutableCommand:{description:i.localize(10,null),type:"string"},
configurationSnippets:{description:i.localize(11,null),type:"array"},configurationAttributes:{description:i.localize(12,null),type:"object"},windows:{description:i.localize(13,null),type:"object",properties:{runtime:{description:i.localize(14,null),type:"string"}}},osx:{description:i.localize(15,null),type:"object",properties:{runtime:{description:i.localize(16,null),type:"string"}}},linux:{description:i.localize(17,null),type:"object",properties:{runtime:{description:i.localize(18,null),type:"string"}}}}}}),t.breakpointsExtPoint=n.ExtensionsRegistry.registerExtensionPoint("breakpoints",[],{description:i.localize(19,null),type:"array",defaultSnippets:[{body:[{language:""}]}],items:{type:"object",defaultSnippets:[{body:{language:""}}],properties:{language:{description:i.localize(20,null),type:"string"}}}});var o={name:"Compound",configurations:[]};t.launchSchema={id:r.launchSchemaId,type:"object",title:i.localize(21,null),required:[],default:{version:"0.2.0",configurations:[],compounds:[]},properties:{
version:{type:"string",description:i.localize(22,null),default:"0.2.0"},configurations:{type:"array",description:i.localize(23,null),items:{defaultSnippets:[],type:"object",oneOf:[]}},compounds:{type:"array",description:i.localize(24,null),items:{type:"object",required:["name","configurations"],properties:{name:{type:"string",description:i.localize(25,null)},configurations:{type:"array",default:[],items:{oneOf:[{enum:[],description:i.localize(26,null)},{type:"object",required:["name"],properties:{name:{enum:[],description:i.localize(27,null)},folder:{enum:[],description:i.localize(28,null)}}}]},description:i.localize(29,null)}},default:o},default:[o]}}}}),define(e[177],t([1,0,718,24,14,170,25,30,136,11,83,10,4,391,90,102]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";function m(e){return!(!e||!c.isString(e.name))}function y(e,t){var n,i=t.fileLocation;return i===b.Absolute?n=e:i===b.Relative&&(n=a.join(t.filePrefix,e)),"/"!==(n=n.replace(/\\/g,"/"))[0]&&(n="/"+n),
void 0!==t.uriProvider?t.uriProvider(n):h.default.file(n)}Object.defineProperty(t,"__esModule",{value:!0});var b;!function(e){e[e.Auto=0]="Auto",e[e.Relative=1]="Relative",e[e.Absolute=2]="Absolute"}(b=t.FileLocationKind||(t.FileLocationKind={})),function(e){e.fromString=function(t){return"absolute"===(t=t.toLowerCase())?e.Absolute:"relative"===t?e.Relative:void 0}}(b=t.FileLocationKind||(t.FileLocationKind={}));var S;!function(e){e[e.File=0]="File",e[e.Location=1]="Location"}(S=t.ProblemLocationKind||(t.ProblemLocationKind={})),function(e){e.fromString=function(t){return"file"===(t=t.toLowerCase())?e.File:"location"===t?e.Location:void 0}}(S=t.ProblemLocationKind||(t.ProblemLocationKind={}));var _;!function(e){e[e.allDocuments=0]="allDocuments",e[e.openDocuments=1]="openDocuments",e[e.closedDocuments=2]="closedDocuments"}(_=t.ApplyToKind||(t.ApplyToKind={})),function(e){e.fromString=function(t){
return"alldocuments"===(t=t.toLowerCase())?e.allDocuments:"opendocuments"===t?e.openDocuments:"closeddocuments"===t?e.closedDocuments:void 0}}(_=t.ApplyToKind||(t.ApplyToKind={})),t.isNamedProblemMatcher=m,t.getResource=y,t.createLineMatcher=function(e){var t=e.pattern;return c.isArray(t)?new T(e):new I(e)};var C,E=1===u.OS?"\r\n":"\n",w=function(){function e(e){this.matcher=e}return e.prototype.handle=function(e,t){return void 0===t&&(t=0),{match:null,continue:!1}},e.prototype.next=function(e){return null},e.prototype.fillProblemData=function(e,t,n){this.fillProperty(e,"file",t,n,!0),this.appendProperty(e,"message",t,n,!0),this.fillProperty(e,"code",t,n,!0),this.fillProperty(e,"severity",t,n,!0),this.fillProperty(e,"location",t,n,!0),this.fillProperty(e,"line",t,n),this.fillProperty(e,"character",t,n),this.fillProperty(e,"endLine",t,n),this.fillProperty(e,"endCharacter",t,n)},e.prototype.appendProperty=function(e,t,n,i,r){if(void 0===r&&(r=!1),
c.isUndefined(e[t]))this.fillProperty(e,t,n,i,r);else if(!c.isUndefined(n[t])&&n[t]<i.length){var s=i[n[t]];r&&(s=o.trim(s)),e[t]+=E+s}},e.prototype.fillProperty=function(e,t,n,i,r){if(void 0===r&&(r=!1),c.isUndefined(e[t])&&!c.isUndefined(n[t])&&n[t]<i.length){var s=i[n[t]];void 0!==s&&(r&&(s=o.trim(s)),e[t]=s)}},e.prototype.getMarkerMatch=function(e){try{var t=this.getLocation(e);if(e.file&&t&&e.message){var n={severity:this.getSeverity(e),startLineNumber:t.startLineNumber,startColumn:t.startCharacter,endLineNumber:t.startLineNumber,endColumn:t.endCharacter,message:e.message};return void 0!==e.code&&(n.code=e.code),void 0!==this.matcher.source&&(n.source=this.matcher.source),{description:this.matcher,resource:this.getResource(e.file),marker:n}}}catch(t){console.error("Failed to convert problem data into match: "+JSON.stringify(e))}},e.prototype.getResource=function(e){return y(e,this.matcher)},e.prototype.getLocation=function(e){if(e.kind===S.File)return this.createLocation(0,0,0,0)
;if(e.location)return this.parseLocationInfo(e.location);if(!e.line)return null;var t=parseInt(e.line),n=e.character?parseInt(e.character):void 0,i=e.endLine?parseInt(e.endLine):void 0,r=e.endCharacter?parseInt(e.endCharacter):void 0;return this.createLocation(t,n,i,r)},e.prototype.parseLocationInfo=function(e){if(!e||!e.match(/(\d+|\d+,\d+|\d+,\d+,\d+,\d+)/))return null;var t=e.split(","),n=parseInt(t[0]),i=t.length>1?parseInt(t[1]):void 0;return t.length>3?this.createLocation(n,i,parseInt(t[2]),parseInt(t[3])):this.createLocation(n,i,void 0,void 0)},e.prototype.createLocation=function(e,t,n,i){return e&&t&&i?{startLineNumber:e,startCharacter:t,endLineNumber:n||e,endCharacter:i}:e&&t?{startLineNumber:e,startCharacter:t,endLineNumber:e,endCharacter:t}:{startLineNumber:e,startCharacter:1,endLineNumber:e,endCharacter:Number.MAX_VALUE}},e.prototype.getSeverity=function(e){var t=null;if(e.severity){var n=e.severity
;n&&(t=d.default.fromValue(n))===d.default.Ignore&&("E"===n?t=d.default.Error:"W"===n?t=d.default.Warning:"I"===n?t=d.default.Info:o.equalsIgnoreCase(n,"hint")?t=d.default.Info:o.equalsIgnoreCase(n,"note")&&(t=d.default.Info))}return null!==t&&t!==d.default.Ignore||(t=this.matcher.severity||d.default.Error),g.MarkerSeverity.fromSeverity(t)},e}(),I=function(e){function t(t){var n=e.call(this,t)||this;return n.pattern=t.pattern,n}return n(t,e),Object.defineProperty(t.prototype,"matchLength",{get:function(){return 1},enumerable:!0,configurable:!0}),t.prototype.handle=function(e,t){void 0===t&&(t=0),s.ok(e.length-t==1);var n=Object.create(null);void 0!==this.pattern.kind&&(n.kind=this.pattern.kind);var i=this.pattern.regexp.exec(e[t]);if(i){this.fillProblemData(n,this.pattern,i);var r=this.getMarkerMatch(n);if(r)return{match:r,continue:!1}}return{match:null,continue:!1}},t.prototype.next=function(e){return null},t}(w),T=function(e){function t(t){var n=e.call(this,t)||this;return n.patterns=t.pattern,n}
return n(t,e),Object.defineProperty(t.prototype,"matchLength",{get:function(){return this.patterns.length},enumerable:!0,configurable:!0}),t.prototype.handle=function(e,t){void 0===t&&(t=0),s.ok(e.length-t===this.patterns.length),this.data=Object.create(null);var n=this.data;n.kind=this.patterns[0].kind;for(var i=0;i<this.patterns.length;i++){var o=this.patterns[i],a=o.regexp.exec(e[i+t]);if(!a)return{match:null,continue:!1};o.loop&&i===this.patterns.length-1&&(n=r.deepClone(n)),this.fillProblemData(n,o,a)}var c=this.patterns[this.patterns.length-1].loop;return c||(this.data=null),{match:this.getMarkerMatch(n),continue:c}},t.prototype.next=function(e){var t=this.patterns[this.patterns.length-1];s.ok(!0===t.loop&&null!==this.data);var n=t.regexp.exec(e);if(!n)return this.data=null,null;var i=r.deepClone(this.data);return this.fillProblemData(i,t,n),this.getMarkerMatch(i)},t}(w);!function(e){!function(e){e.is=function(e){var t=e;return t&&c.isString(t.name)}}(e.NamedProblemPattern||(e.NamedProblemPattern={}))
;!function(e){e.is=function(e){return e&&c.isArray(e)}}(e.MultiLineProblemPattern||(e.MultiLineProblemPattern={}));!function(e){e.is=function(e){var t=e;return t&&c.isString(t.name)&&c.isArray(t.patterns)}}(e.NamedMultiLineProblemPattern||(e.NamedMultiLineProblemPattern={})),e.isNamedProblemMatcher=function(e){return c.isString(e.name)}}(C=t.Config||(t.Config={}));var x=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.parse=function(e){if(C.NamedMultiLineProblemPattern.is(e))return this.createNamedMultiLineProblemPattern(e);if(C.MultiLineProblemPattern.is(e))return this.createMultiLineProblemPattern(e);if(C.NamedProblemPattern.is(e)){var t=this.createSingleProblemPattern(e);return t.name=e.name,t}return e?this.createSingleProblemPattern(e):null},t.prototype.createSingleProblemPattern=function(e){var t=this.doCreateSingleProblemPattern(e,!0);return void 0===t.kind&&(t.kind=S.Location),this.validateProblemPattern([t])?t:null},
t.prototype.createNamedMultiLineProblemPattern=function(e){var t={name:e.name,label:e.label?e.label:e.name,patterns:this.createMultiLineProblemPattern(e.patterns)};return t.patterns?t:null},t.prototype.createMultiLineProblemPattern=function(e){for(var t=[],n=0;n<e.length;n++){var r=this.doCreateSingleProblemPattern(e[n],!1);n<e.length-1&&!c.isUndefined(r.loop)&&r.loop&&(r.loop=!1,this.error(i.localize(0,null))),t.push(r)}return void 0===t[0].kind&&(t[0].kind=S.Location),this.validateProblemPattern(t)?t:null},t.prototype.doCreateSingleProblemPattern=function(e,t){function n(e,t,n,i){var r=t[i];"number"==typeof r&&(e[n]=r)}var i={regexp:this.createRegularExpression(e.regexp)};if(e.kind&&(i.kind=S.fromString(e.kind)),n(i,e,"file","file"),n(i,e,"location","location"),n(i,e,"line","line"),n(i,e,"character","column"),n(i,e,"endLine","endLine"),n(i,e,"endCharacter","endColumn"),n(i,e,"severity","severity"),n(i,e,"code","code"),n(i,e,"message","message"),!0!==e.loop&&!1!==e.loop||(i.loop=e.loop),
t)if(i.location||i.kind===S.File){o={file:1,message:0};i=r.mixin(i,o,!1)}else{var o={file:1,line:2,character:3,message:0};i=r.mixin(i,o,!1)}return i},t.prototype.validateProblemPattern=function(e){var t,n,r,o,s=this,a=0,l=void 0===e[0].kind?S.Location:e[0].kind;return e.forEach(function(e,l){0!==l&&e.kind&&s.error(i.localize(1,null)),t=t||!c.isUndefined(e.file),n=n||!c.isUndefined(e.message),r=r||!c.isUndefined(e.location),o=o||!c.isUndefined(e.line),e.regexp&&a++}),a!==e.length?(this.error(i.localize(2,null)),!1):t&&n?!(l===S.Location&&!r&&!o)||(this.error(i.localize(4,null)),!1):(this.error(i.localize(3,null)),!1)},t.prototype.createRegularExpression=function(e){var t=null;if(!e)return t;try{t=new RegExp(e)}catch(t){this.error(i.localize(5,null,e))}return t},t}(f.Parser);t.ProblemPatternParser=x;var k=function(){function e(e,t){void 0===t&&(t=new f.ValidationStatus),this._collector=e,this._validationStatus=t}return e.prototype.info=function(e){this._validationStatus.state=f.ValidationState.Info,
this._collector.info(e)},e.prototype.warn=function(e){this._validationStatus.state=f.ValidationState.Warning,this._collector.warn(e)},e.prototype.error=function(e){this._validationStatus.state=f.ValidationState.Error,this._collector.error(e)},e.prototype.fatal=function(e){this._validationStatus.state=f.ValidationState.Fatal,this._collector.error(e)},Object.defineProperty(e.prototype,"status",{get:function(){return this._validationStatus},enumerable:!0,configurable:!0}),e}();t.ExtensionRegistryReporter=k;var D;!function(e){e.ProblemPattern={default:{regexp:"^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",file:1,location:2,message:3},type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:i.localize(6,null)},kind:{type:"string",description:i.localize(7,null)},file:{type:"integer",description:i.localize(8,null)},location:{type:"integer",description:i.localize(9,null)},line:{type:"integer",description:i.localize(10,null)},column:{type:"integer",description:i.localize(11,null)},
endLine:{type:"integer",description:i.localize(12,null)},endColumn:{type:"integer",description:i.localize(13,null)},severity:{type:"integer",description:i.localize(14,null)},code:{type:"integer",description:i.localize(15,null)},message:{type:"integer",description:i.localize(16,null)},loop:{type:"boolean",description:i.localize(17,null)}}},e.NamedProblemPattern=r.deepClone(e.ProblemPattern),e.NamedProblemPattern.properties=r.deepClone(e.NamedProblemPattern.properties),e.NamedProblemPattern.properties.name={type:"string",description:i.localize(18,null)},e.MultiLineProblemPattern={type:"array",items:e.ProblemPattern},e.NamedMultiLineProblemPattern={type:"object",additionalProperties:!1,properties:{name:{type:"string",description:i.localize(19,null)},patterns:{type:"array",description:i.localize(20,null),items:e.ProblemPattern}}}}(D=t.Schemas||(t.Schemas={}));var A=v.ExtensionsRegistry.registerExtensionPoint("problemPatterns",[],{description:i.localize(21,null),type:"array",items:{
anyOf:[D.NamedProblemPattern,D.NamedMultiLineProblemPattern]}}),L=function(){function e(){var e=this;this.patterns=Object.create(null),this.fillDefaults(),this.readyPromise=new p.TPromise(function(t,n){A.setHandler(function(n){try{n.forEach(function(t){for(var n=t.value,r=new x(new k(t.collector)),o=0,s=n;o<s.length;o++){var a=s[o];if(C.NamedMultiLineProblemPattern.is(a)){c=r.parse(a);r.problemReporter.status.state<f.ValidationState.Error?e.add(c.name,c.patterns):(t.collector.error(i.localize(22,null)),t.collector.error(JSON.stringify(a,void 0,4)))}else if(C.NamedProblemPattern.is(a)){var c=r.parse(a);r.problemReporter.status.state<f.ValidationState.Error?e.add(a.name,c):(t.collector.error(i.localize(23,null)),t.collector.error(JSON.stringify(a,void 0,4)))}r.reset()}})}catch(e){}t(void 0)})},function(){})}return e.prototype.onReady=function(){return this.readyPromise},e.prototype.add=function(e,t){this.patterns[e]=t},e.prototype.get=function(e){return this.patterns[e]},e.prototype.fillDefaults=function(){
this.add("msCompile",{regexp:/^(?:\s+\d+\>)?([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+(error|warning|info)\s+(\w{1,2}\d+)\s*:\s*(.*)$/,kind:S.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("gulp-tsc",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(\d+)\s+(.*)$/,kind:S.Location,file:1,location:2,code:3,message:4}),this.add("cpp",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(C\d+)\s*:\s*(.*)$/,kind:S.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("csc",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(CS\d+)\s*:\s*(.*)$/,kind:S.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("vb",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(BC\d+)\s*:\s*(.*)$/,kind:S.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("lessCompile",{regexp:/^\s*(.*) in file (.*) line no. (\d+)$/,kind:S.Location,message:1,file:2,line:3}),this.add("jshint",{
regexp:/^(.*):\s+line\s+(\d+),\s+col\s+(\d+),\s(.+?)(?:\s+\((\w)(\d+)\))?$/,kind:S.Location,file:1,line:2,character:3,message:4,severity:5,code:6}),this.add("jshint-stylish",[{regexp:/^(.+)$/,kind:S.Location,file:1},{regexp:/^\s+line\s+(\d+)\s+col\s+(\d+)\s+(.+?)(?:\s+\((\w)(\d+)\))?$/,line:1,character:2,message:3,severity:4,code:5,loop:!0}]),this.add("eslint-compact",{regexp:/^(.+):\sline\s(\d+),\scol\s(\d+),\s(Error|Warning|Info)\s-\s(.+)\s\((.+)\)$/,file:1,kind:S.Location,line:2,character:3,severity:4,message:5,code:6}),this.add("eslint-stylish",[{regexp:/^([^\s].*)$/,kind:S.Location,file:1},{regexp:/^\s+(\d+):(\d+)\s+(error|warning|info)\s+(.+?)(?:\s\s+(.*))?$/,line:1,character:2,severity:3,message:4,code:5,loop:!0}]),this.add("go",{regexp:/^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+))?: (.*)$/,kind:S.Location,file:2,line:4,character:6,message:7})},e}();t.ProblemPatternRegistry=new L;var R=function(e){function o(t){return e.call(this,t)||this}return n(o,e),o.prototype.parse=function(e){
var t=this.createProblemMatcher(e);return this.checkProblemMatcherValid(e,t)?(this.addWatchingMatcher(e,t),t):null},o.prototype.checkProblemMatcherValid=function(e,t){return t?t.pattern?t.owner?!c.isUndefined(t.fileLocation)||(this.error(i.localize(27,null,JSON.stringify(e,null,4))),!1):(this.error(i.localize(26,null,JSON.stringify(e,null,4))),!1):(this.error(i.localize(25,null,JSON.stringify(e,null,4))),!1):(this.error(i.localize(24,null,JSON.stringify(e,null,4))),!1)},o.prototype.createProblemMatcher=function(e){var n=null,o=e.owner?e.owner:l.generateUuid(),s=c.isString(e.source)?e.source:void 0,a=c.isString(e.applyTo)?_.fromString(e.applyTo):_.allDocuments;a||(a=_.allDocuments);var u,h=void 0,p=void 0;if(c.isUndefined(e.fileLocation))h=b.Relative,p="${workspaceFolder}";else if(c.isString(e.fileLocation))(u=b.fromString(e.fileLocation))&&(h=u,u===b.Relative&&(p="${workspaceFolder}"));else if(c.isStringArray(e.fileLocation)){var f=e.fileLocation;f.length>0&&(u=b.fromString(f[0]),
1===f.length&&u===b.Absolute?h=u:2===f.length&&u===b.Relative&&f[1]&&(h=u,p=f[1]))}var g=e.pattern?this.createProblemPattern(e.pattern):void 0,v=e.severity?d.default.fromValue(e.severity):void 0;if(v===d.default.Ignore&&(this.info(i.localize(28,null,e.severity)),v=d.default.Error),c.isString(e.base)){var m=e.base;if(m.length>1&&"$"===m[0]){var y=t.ProblemMatcherRegistry.get(m.substring(1));y&&(n=r.deepClone(y),e.owner&&(n.owner=o),s&&(n.source=s),h&&(n.fileLocation=h),p&&(n.filePrefix=p),e.pattern&&(n.pattern=g),e.severity&&(n.severity=v))}}else h&&(n={owner:o,applyTo:a,fileLocation:h,pattern:g},s&&(n.source=s),p&&(n.filePrefix=p),v&&(n.severity=v));return C.isNamedProblemMatcher(e)&&(n.name=e.name,n.label=c.isString(e.label)?e.label:e.name),n},o.prototype.createProblemPattern=function(e){if(c.isString(e)){var n=e;if(n.length>1&&"$"===n[0]){var r=t.ProblemPatternRegistry.get(n.substring(1));return r||this.error(i.localize(29,null,n)),r}
0===n.length?this.error(i.localize(30,null)):this.error(i.localize(31,null,n))}else if(e){var o=new x(this.problemReporter);return Array.isArray(e),o.parse(e)}return null},o.prototype.addWatchingMatcher=function(e,t){var n=this.createRegularExpression(e.watchedTaskBeginsRegExp),r=this.createRegularExpression(e.watchedTaskEndsRegExp);if(n&&r)t.watching={activeOnStart:!1,beginsPattern:{regexp:n},endsPattern:{regexp:r}};else{var o=e.background||e.watching;if(!c.isUndefinedOrNull(o)){var s=this.createWatchingPattern(o.beginsPattern),a=this.createWatchingPattern(o.endsPattern);s&&a?t.watching={activeOnStart:!!c.isBoolean(o.activeOnStart)&&o.activeOnStart,beginsPattern:s,endsPattern:a}:(s||a)&&this.error(i.localize(32,null))}}},o.prototype.createWatchingPattern=function(e){if(c.isUndefinedOrNull(e))return null;var t,n;return c.isString(e)?t=this.createRegularExpression(e):(t=this.createRegularExpression(e.regexp),c.isNumber(e.file)&&(n=e.file)),t?n?{regexp:t,file:n}:{regexp:t,file:1}:null},
o.prototype.createRegularExpression=function(e){var t=null;if(!e)return t;try{t=new RegExp(e)}catch(t){this.error(i.localize(33,null,e))}return t},o}(f.Parser);t.ProblemMatcherParser=R,function(e){e.WatchingPattern={type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:i.localize(34,null)},file:{type:"integer",description:i.localize(35,null)}}},e.PatternType={anyOf:[{type:"string",description:i.localize(36,null)},e.ProblemPattern,e.MultiLineProblemPattern],description:i.localize(37,null)},e.ProblemMatcher={type:"object",additionalProperties:!1,properties:{base:{type:"string",description:i.localize(38,null)},owner:{type:"string",description:i.localize(39,null)},source:{type:"string",description:i.localize(40,null)},severity:{type:"string",enum:["error","warning","info"],description:i.localize(41,null)},applyTo:{type:"string",enum:["allDocuments","openDocuments","closedDocuments"],description:i.localize(42,null)},pattern:e.PatternType,fileLocation:{oneOf:[{type:"string",
enum:["absolute","relative"]},{type:"array",items:{type:"string"}}],description:i.localize(43,null)},background:{type:"object",additionalProperties:!1,description:i.localize(44,null),properties:{activeOnStart:{type:"boolean",description:i.localize(45,null)},beginsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:i.localize(46,null)},endsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:i.localize(47,null)}}},watching:{type:"object",additionalProperties:!1,deprecationMessage:i.localize(48,null),description:i.localize(49,null),properties:{activeOnStart:{type:"boolean",description:i.localize(50,null)},beginsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:i.localize(51,null)},endsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:i.localize(52,null)}}}}},e.LegacyProblemMatcher=r.deepClone(e.ProblemMatcher),e.LegacyProblemMatcher.properties=r.deepClone(e.LegacyProblemMatcher.properties),e.LegacyProblemMatcher.properties.watchedTaskBeginsRegExp={type:"string",
deprecationMessage:i.localize(53,null),description:i.localize(54,null)},e.LegacyProblemMatcher.properties.watchedTaskEndsRegExp={type:"string",deprecationMessage:i.localize(55,null),description:i.localize(56,null)},e.NamedProblemMatcher=r.deepClone(e.ProblemMatcher),e.NamedProblemMatcher.properties=r.deepClone(e.NamedProblemMatcher.properties),e.NamedProblemMatcher.properties.name={type:"string",description:i.localize(57,null)},e.NamedProblemMatcher.properties.label={type:"string",description:i.localize(58,null)}}(D=t.Schemas||(t.Schemas={}));var O=v.ExtensionsRegistry.registerExtensionPoint("problemMatchers",[A],{description:i.localize(59,null),type:"array",items:D.NamedProblemMatcher}),M=function(){function e(){var e=this;this.matchers=Object.create(null),this.fillDefaults(),this.readyPromise=new p.TPromise(function(t,n){O.setHandler(function(n){try{n.forEach(function(t){for(var n=t.value,i=new R(new k(t.collector)),r=0,o=n;r<o.length;r++){var s=o[r],a=i.parse(s);a&&m(a)&&e.add(a)}})}catch(e){}
var i=e.get("tsc-watch");i&&(i.tscWatch=!0),t(void 0)})},function(){})}return e.prototype.onReady=function(){return t.ProblemPatternRegistry.onReady(),this.readyPromise},e.prototype.add=function(e){this.matchers[e.name]=e},e.prototype.get=function(e){return this.matchers[e]},e.prototype.keys=function(){return Object.keys(this.matchers)},e.prototype.fillDefaults=function(){this.add({name:"msCompile",label:i.localize(60,null),owner:"msCompile",applyTo:_.allDocuments,fileLocation:b.Absolute,pattern:t.ProblemPatternRegistry.get("msCompile")}),this.add({name:"lessCompile",label:i.localize(61,null),deprecated:!0,owner:"lessCompile",source:"less",applyTo:_.allDocuments,fileLocation:b.Absolute,pattern:t.ProblemPatternRegistry.get("lessCompile"),severity:d.default.Error}),this.add({name:"gulp-tsc",label:i.localize(62,null),owner:"typescript",source:"ts",applyTo:_.closedDocuments,fileLocation:b.Relative,filePrefix:"${workspaceFolder}",pattern:t.ProblemPatternRegistry.get("gulp-tsc")}),this.add({name:"jshint",
label:i.localize(63,null),owner:"jshint",source:"jshint",applyTo:_.allDocuments,fileLocation:b.Absolute,pattern:t.ProblemPatternRegistry.get("jshint")}),this.add({name:"jshint-stylish",label:i.localize(64,null),owner:"jshint",source:"jshint",applyTo:_.allDocuments,fileLocation:b.Absolute,pattern:t.ProblemPatternRegistry.get("jshint-stylish")}),this.add({name:"eslint-compact",label:i.localize(65,null),owner:"eslint",source:"eslint",applyTo:_.allDocuments,fileLocation:b.Absolute,filePrefix:"${workspaceFolder}",pattern:t.ProblemPatternRegistry.get("eslint-compact")}),this.add({name:"eslint-stylish",label:i.localize(66,null),owner:"eslint",source:"eslint",applyTo:_.allDocuments,fileLocation:b.Absolute,pattern:t.ProblemPatternRegistry.get("eslint-stylish")}),this.add({name:"go",label:i.localize(67,null),owner:"go",source:"go",applyTo:_.allDocuments,fileLocation:b.Relative,filePrefix:"${workspaceFolder}",pattern:t.ProblemPatternRegistry.get("go")})},e}();t.ProblemMatcherRegistry=new M}),
define(e[437],t([1,0,10,7,177,90,136]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c;!function(e){e.BackgroundProcessingBegins="backgroundProcessingBegins",e.BackgroundProcessingEnds="backgroundProcessingEnds"}(c=t.ProblemCollectorEventKind||(t.ProblemCollectorEventKind={}));var l;!function(e){e.create=function(e){return Object.freeze({kind:e})}}(l||(l={}));var u=function(){function e(e,t,n){var i=this;this.markerService=t,this.modelService=n,this.matchers=Object.create(null),this.bufferLength=1,e.map(function(e){return o.createLineMatcher(e)}).forEach(function(e){var t=e.matchLength;t>i.bufferLength&&(i.bufferLength=t);var n=i.matchers[t];n||(n=[],i.matchers[t]=n),n.push(e)}),this.buffer=[],this.activeMatcher=null,this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.openModels=Object.create(null),this.modelListeners=[],this.applyToByOwner=new Map;for(var s=0,a=e;s<a.length;s++){var c=a[s],l=this.applyToByOwner.get(c.owner)
;void 0===l?this.applyToByOwner.set(c.owner,c.applyTo):this.applyToByOwner.set(c.owner,this.mergeApplyTo(l,c.applyTo))}this.resourcesToClean=new Map,this.markers=new Map,this.deliveredMarkers=new Map,this.modelService.onModelAdded(function(e){i.openModels[e.uri.toString()]=!0},this,this.modelListeners),this.modelService.onModelRemoved(function(e){delete i.openModels[e.uri.toString()]},this,this.modelListeners),this.modelService.getModels().forEach(function(e){return i.openModels[e.uri.toString()]=!0}),this._onDidStateChange=new r.Emitter}return Object.defineProperty(e.prototype,"onDidStateChange",{get:function(){return this._onDidStateChange.event},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.modelListeners.forEach(function(e){return e.dispose()})},Object.defineProperty(e.prototype,"numberOfMatches",{get:function(){return this._numberOfMatches},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxMarkerSeverity",{get:function(){return this._maxMarkerSeverity},
enumerable:!0,configurable:!0}),e.prototype.tryFindMarker=function(e){var t=null;if(this.activeMatcher){if(t=this.activeMatcher.next(e))return this.captureMatch(t),t;this.clearBuffer(),this.activeMatcher=null}if(this.buffer.length<this.bufferLength)this.buffer.push(e);else{for(var n=this.buffer.length-1,i=0;i<n;i++)this.buffer[i]=this.buffer[i+1];this.buffer[n]=e}return(t=this.tryMatchers())&&this.clearBuffer(),t},e.prototype.shouldApplyMatch=function(e){switch(e.description.applyTo){case o.ApplyToKind.allDocuments:return!0;case o.ApplyToKind.openDocuments:return!!this.openModels[e.resource.toString()];case o.ApplyToKind.closedDocuments:return!this.openModels[e.resource.toString()];default:return!0}},e.prototype.mergeApplyTo=function(e,t){return e===t||e===o.ApplyToKind.allDocuments?e:o.ApplyToKind.allDocuments},e.prototype.tryMatchers=function(){this.activeMatcher=null;for(var e=this.buffer.length,t=0;t<e;t++){var n=this.matchers[e-t];if(n)for(var i=0;i<n.length;i++){var r=n[i],o=r.handle(this.buffer,t)
;if(o.match)return this.captureMatch(o.match),o.continue&&(this.activeMatcher=r),o.match}}return null},e.prototype.captureMatch=function(e){this._numberOfMatches++,(void 0===this._maxMarkerSeverity||e.marker.severity>this._maxMarkerSeverity)&&(this._maxMarkerSeverity=e.marker.severity)},e.prototype.clearBuffer=function(){this.buffer.length>0&&(this.buffer=[])},e.prototype.recordResourcesToClean=function(e){var t=this.getResourceSetToClean(e);this.markerService.read({owner:e}).forEach(function(e){return t.set(e.resource.toString(),e.resource)})},e.prototype.recordResourceToClean=function(e,t){this.getResourceSetToClean(e).set(t.toString(),t)},e.prototype.removeResourceToClean=function(e,t){var n=this.resourcesToClean.get(e);n&&n.delete(t)},e.prototype.getResourceSetToClean=function(e){var t=this.resourcesToClean.get(e);return t||(t=new Map,this.resourcesToClean.set(e,t)),t},e.prototype.cleanAllMarkers=function(){var e=this;this.resourcesToClean.forEach(function(t,n){e._cleanMarkers(n,t)}),
this.resourcesToClean=new Map},e.prototype.cleanMarkers=function(e){var t=this.resourcesToClean.get(e);t&&(this._cleanMarkers(e,t),this.resourcesToClean.delete(e))},e.prototype._cleanMarkers=function(e,t){var n=this,i=[],r=this.applyToByOwner.get(e);t.forEach(function(e,t){(r===o.ApplyToKind.allDocuments||r===o.ApplyToKind.openDocuments&&n.openModels[t]||r===o.ApplyToKind.closedDocuments&&!n.openModels[t])&&i.push(e)}),this.markerService.remove(e,i)},e.prototype.recordMarker=function(e,t,n){var i=this.markers.get(t);i||(i=new Map,this.markers.set(t,i));var r=i.get(n);r||(r=new Map,i.set(n,r));var o=s.IMarkerData.makeKey(e);r.has(o)||r.set(o,e)},e.prototype.reportMarkers=function(){var e=this;this.markers.forEach(function(t,n){var i=e.getDeliveredMarkersPerOwner(n);t.forEach(function(t,r){e.deliverMarkersPerOwnerAndResourceResolved(n,r,t,i)})})},e.prototype.deliverMarkersPerOwnerAndResource=function(e,t){var n=this.markers.get(e);if(n){var i=this.getDeliveredMarkersPerOwner(e),r=n.get(t)
;r&&this.deliverMarkersPerOwnerAndResourceResolved(e,t,r,i)}},e.prototype.deliverMarkersPerOwnerAndResourceResolved=function(e,t,n,r){if(n.size!==r.get(t)){var o=[];n.forEach(function(e){return o.push(e)}),this.markerService.changeOne(e,i.default.parse(t),o),r.set(t,n.size)}},e.prototype.getDeliveredMarkersPerOwner=function(e){var t=this.deliveredMarkers.get(e);return t||(t=new Map,this.deliveredMarkers.set(e,t)),t},e.prototype.cleanMarkerCaches=function(){this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.markers.clear(),this.deliveredMarkers.clear()},e.prototype.done=function(){this.reportMarkers(),this.cleanAllMarkers()},e}();t.AbstractProblemCollector=u;var d;!function(e){e[e.Clean=0]="Clean"}(d=t.ProblemHandlingStrategy||(t.ProblemHandlingStrategy={}));var h=function(e){function t(t,n,i,r){void 0===r&&(r=d.Clean);var o=e.call(this,t,n,i)||this,s=Object.create(null);return t.forEach(function(e){return s[e.owner]=!0}),o.owners=Object.keys(s),o.owners.forEach(function(e){o.recordResourcesToClean(e)
}),o}return n(t,e),t.prototype.processLine=function(e){var t=this.tryFindMarker(e);if(t){var n=t.description.owner,i=t.resource.toString();this.removeResourceToClean(n,i);this.shouldApplyMatch(t)&&(this.recordMarker(t.marker,n,i),this.currentOwner===n&&this.currentResource===i||(this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource),this.currentOwner=n,this.currentResource=i))}},t}(u);t.StartStopProblemCollector=h;var p=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.problemMatchers=t,r.resetCurrentResource(),r.backgroundPatterns=[],r._activeBackgroundMatchers=new Set,r.problemMatchers.forEach(function(e){if(e.watching){var t=a.generateUuid();r.backgroundPatterns.push({key:t,matcher:e,begin:e.watching.beginsPattern,end:e.watching.endsPattern})}}),r}return n(t,e),t.prototype.aboutToStart=function(){for(var e=0,t=this.backgroundPatterns;e<t.length;e++){var n=t[e]
;n.matcher.watching&&n.matcher.watching.activeOnStart&&(this._activeBackgroundMatchers.add(n.key),this._onDidStateChange.fire(l.create(c.BackgroundProcessingBegins)),this.recordResourcesToClean(n.matcher.owner))}},t.prototype.processLine=function(e){if(!this.tryBegin(e)&&!this.tryFinish(e)){var t=this.tryFindMarker(e);if(t){var n=t.resource,i=t.description.owner,r=n.toString();this.removeResourceToClean(i,r);this.shouldApplyMatch(t)&&(this.recordMarker(t.marker,i,r),this.currentOwner===i&&this.currentResource===r||(this.reportMarkersForCurrentResource(),this.currentOwner=i,this.currentResource=r))}}},t.prototype.forceDelivery=function(){this.reportMarkersForCurrentResource()},t.prototype.tryBegin=function(e){for(var t=!1,n=0;n<this.backgroundPatterns.length;n++){var i=this.backgroundPatterns[n],r=i.begin.regexp.exec(e);if(r){if(this._activeBackgroundMatchers.has(i.key))continue;this._activeBackgroundMatchers.add(i.key),t=!0,this._onDidStateChange.fire(l.create(c.BackgroundProcessingBegins)),
this.cleanMarkerCaches(),this.resetCurrentResource();var s=i.matcher.owner,a=r[i.begin.file];if(a){var u=o.getResource(a,i.matcher);this.recordResourceToClean(s,u)}else this.recordResourcesToClean(s)}}return t},t.prototype.tryFinish=function(e){for(var t=!1,n=0;n<this.backgroundPatterns.length;n++){var i=this.backgroundPatterns[n];if(i.end.regexp.exec(e)&&this._activeBackgroundMatchers.has(i.key)){this._activeBackgroundMatchers.delete(i.key),this.resetCurrentResource(),this._onDidStateChange.fire(l.create(c.BackgroundProcessingEnds)),t=!0;var r=i.matcher.owner;this.cleanMarkers(r),this.cleanMarkerCaches()}}return t},t.prototype.resetCurrentResource=function(){this.reportMarkersForCurrentResource(),this.currentOwner=null,this.currentResource=null},t.prototype.reportMarkersForCurrentResource=function(){this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource)},t}(u);t.WatchingProblemCollector=p}),
define(e[274],t([1,0,719,4,30,24,102]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,c={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:n.localize(0,null)},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:n.localize(1,null),additionalProperties:{$ref:"http://json-schema.org/draft-04/schema#"}}}};!function(e){e.from=function(e,t,i){if(e){var s=r.isString(e.type)?e.type:void 0;if(s&&0!==s.length){var a=[];if(Array.isArray(e.required))for(var c=0,l=e.required;c<l.length;c++){var u=l[c];r.isString(u)&&a.push(u)}return{extensionId:t,taskType:s,required:a,properties:e.properties?o.deepClone(e.properties):{}}}i.error(n.localize(2,null))}}}(a||(a={}));var l=s.ExtensionsRegistry.registerExtensionPoint("taskDefinitions",[],{description:n.localize(3,null),type:"array",items:c}),u=function(){function e(){var e=this;this.taskTypes=Object.create(null),this.readyPromise=new i.TPromise(function(t,n){
l.setHandler(function(n){try{for(var i=0,r=n;i<r.length;i++)for(var o=r[i],s=0,c=o.value;s<c.length;s++){var l=c[s],u=a.from(l,o.description.id,o.collector);u&&(e.taskTypes[u.taskType]=u)}}catch(e){}t(void 0)})},function(){})}return e.prototype.onReady=function(){return this.readyPromise},e.prototype.get=function(e){return this.taskTypes[e]},e.prototype.all=function(){var e=this;return Object.keys(this.taskTypes).map(function(t){return e.taskTypes[t]})},e.prototype.getJsonSchema=function(){if(void 0===this._schema){for(var e=[],t=0,n=this.all();t<n.length;t++){var i=n[t],r={type:"object",additionalProperties:!1};i.required.length>0&&(r.required=i.required.slice(0)),void 0!==i.properties?r.properties=o.deepClone(i.properties):r.properties=Object.create(null),r.properties.type={type:"string",enum:[i.taskType]},e.push(r)}this._schema={oneOf:e}}return this._schema},e}();t.TaskDefinitionRegistry=new u}),
define(e[1248],t([1,0,616,4,258,14,24,393,79,17,29,319,266,394,10,28,111,274]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(){function t(e,t,n,i,r,o,s){this.configurationManager=e,this.debuggerContribution=t,this.extensionDescription=n,this.configurationService=i,this.commandService=r,this.configurationResolverService=o,this.telemetryService=s,this.hasConfigurationProvider=!1,this.mergedExtensionDescriptions=[n]}return t.prototype.createDebugAdapter=function(e,t,n){var i=this;return this.getAdapterExecutable(e).then(function(e){return i.inEH()?i.configurationManager.createDebugAdapter(i.type,e,n):n?new p.SocketDebugAdapter(n):new p.DebugAdapter(i.type,e,i.mergedExtensionDescriptions,t)})},t.prototype.getAdapterExecutable=function(e){var t=this;return this.configurationManager.debugAdapterExecutable(e?e.uri:void 0,this.type).then(function(n){
return n||(t.debuggerContribution.adapterExecutableCommand?t.commandService.executeCommand(t.debuggerContribution.adapterExecutableCommand,e?e.uri.toString():void 0):i.TPromise.as(null))})},t.prototype.substituteVariables=function(e,t){var n=this;return this.inEH()?this.configurationManager.substituteVariables(this.type,e,t).then(function(t){return n.configurationResolverService.resolveWithCommands(e,t,n.variables)}):this.configurationResolverService.resolveWithCommands(e,t,this.variables)},t.prototype.runInTerminal=function(e){var t=this.configurationService.getValue("terminal");return this.configurationManager.runInTerminal(this.inEH()?this.type:"*",e,t)},t.prototype.inEH=function(){return this.configurationService.getValue("debug").extensionHostDebugAdapter||"file"!==this.extensionDescription.extensionLocation.scheme},Object.defineProperty(t.prototype,"label",{get:function(){return this.debuggerContribution.label||this.debuggerContribution.type},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"type",{get:function(){return this.debuggerContribution.type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.debuggerContribution.variables},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"configurationSnippets",{get:function(){return this.debuggerContribution.configurationSnippets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"languages",{get:function(){return this.debuggerContribution.languages},enumerable:!0,configurable:!0}),t.prototype.merge=function(e,t){this.mergedExtensionDescriptions.push(t),t.isBuiltin&&(this.extensionDescription=t),s.mixin(this.debuggerContribution,e,t.isBuiltin)},t.prototype.hasInitialConfiguration=function(){return!!this.debuggerContribution.initialConfigurations},t.prototype.getInitialConfigurationContent=function(e){var t=this.debuggerContribution.initialConfigurations||[];e&&(t=t.concat(e))
;var r="\r\n"===this.configurationService.getValue("files.eol")?"\r\n":"\n",s=JSON.stringify(t,null,"\t").split("\n").map(function(e){return"\t"+e}).join(r).trim(),a=["{","\t// "+n.localize(0,null),"\t// "+n.localize(1,null),"\t// "+n.localize(2,null,"https://go.microsoft.com/fwlink/?linkid=830387"),'\t"version": "0.2.0",','\t"configurations": '+s,"}"].join(r),c=this.configurationService.getValue();return c.editor&&c.editor.insertSpaces&&(a=a.replace(new RegExp("\t","g"),o.repeat(" ",c.editor.tabSize))),i.TPromise.as(a)},t.prototype.getCustomTelemetryService=function(){var t=this;return this.debuggerContribution.aiKey?this.telemetryService.getTelemetryInfo().then(function(e){var t=Object.create(null);return t["common.vscodemachineid"]=e.machineId,t["common.vscodesessionid"]=e.sessionId,t}).then(function(n){var i=new r.Client(v.default.parse(e.toUrl("bootstrap")).fsPath,{serverName:"Debug Telemetry",timeout:3e5,args:[t.extensionDescription.publisher+"."+t.type,JSON.stringify(n),t.debuggerContribution.aiKey],
env:{ELECTRON_RUN_AS_NODE:1,PIPE_LOGGING:"true",AMD_ENTRYPOINT:"vs/workbench/parts/debug/node/telemetryApp"}}).getChannel("telemetryAppender"),o=new c.TelemetryAppenderClient(i);return new g.TelemetryService({appender:o},t.configurationService)}):i.TPromise.as(void 0)},t.prototype.getSchemaAttributes=function(){var e=this;if(!this.debuggerContribution.configurationAttributes)return null;var t=b.TaskDefinitionRegistry.getJsonSchema();return Object.keys(this.debuggerContribution.configurationAttributes).map(function(i){var r=e.debuggerContribution.configurationAttributes[i],o=["name","type","request"];r.required=r.required&&r.required.length?o.concat(r.required):o,r.additionalProperties=!1,r.type="object",r.properties||(r.properties={});var a=r.properties;a.type={enum:[e.type],description:n.localize(3,null),pattern:"^(?!node2)",errorMessage:n.localize(4,null),patternErrorMessage:n.localize(5,null)},a.name={type:"string",description:n.localize(6,null),default:"Launch"},a.request={enum:[i],
description:n.localize(7,null)},a.debugServer={type:"number",description:n.localize(8,null),default:4711},a.preLaunchTask={anyOf:[t,{type:["string","null"]}],default:"",description:n.localize(9,null)},a.postDebugTask={anyOf:[t,{type:["string","null"]}],default:"",description:n.localize(10,null)},a.internalConsoleOptions=u.INTERNAL_CONSOLE_OPTIONS_SCHEMA;var c=s.deepClone(a);return a.windows={type:"object",description:n.localize(11,null),properties:c},a.osx={type:"object",description:n.localize(12,null),properties:c},a.linux={type:"object",description:n.localize(13,null),properties:c},Object.keys(r.properties).forEach(function(e){r.properties[e].pattern=r.properties[e].pattern||"^(?!.*\\$\\{(env|config|command)\\.)",r.properties[e].patternErrorMessage=r.properties[e].patternErrorMessage||n.localize(14,null)}),r})},a([y.memoize],t.prototype,"getCustomTelemetryService",null),t=a([l(3,d.IConfigurationService),l(4,h.ICommandService),l(5,f.IConfigurationResolverService),l(6,m.ITelemetryService)],t)}();t.Debugger=S
}),define(e[439],t([1,0,721,177]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={definitions:{showOutputType:{type:"string",enum:["always","silent","never"]},options:{type:"object",description:n.localize(0,null),properties:{cwd:{type:"string",description:n.localize(1,null)},env:{type:"object",additionalProperties:{type:"string"},description:n.localize(2,null)}},additionalProperties:{type:["string","array","object"]}},problemMatcherType:{oneOf:[{type:"string"},i.Schemas.LegacyProblemMatcher,{type:"array",items:{anyOf:[i.Schemas.LegacyProblemMatcher,{type:"string"}]}}]},shellConfiguration:{type:"object",additionalProperties:!1,description:n.localize(3,null),properties:{executable:{type:"string",description:n.localize(4,null)},args:{type:"array",description:n.localize(5,null),items:{type:"string"}}}},commandConfiguration:{type:"object",additionalProperties:!1,properties:{command:{type:"string",description:n.localize(6,null)},args:{type:"array",
description:n.localize(7,null),items:{type:"string"}},options:{$ref:"#/definitions/options"}}},taskDescription:{type:"object",required:["taskName"],additionalProperties:!1,properties:{taskName:{type:"string",description:n.localize(8,null)},command:{type:"string",description:n.localize(9,null)},args:{type:"array",description:n.localize(10,null),items:{type:"string"}},options:{$ref:"#/definitions/options"},windows:{$ref:"#/definitions/commandConfiguration",description:n.localize(11,null)},osx:{$ref:"#/definitions/commandConfiguration",description:n.localize(12,null)},linux:{$ref:"#/definitions/commandConfiguration",description:n.localize(13,null)},suppressTaskName:{type:"boolean",description:n.localize(14,null),default:!0},showOutput:{$ref:"#/definitions/showOutputType",description:n.localize(15,null)},echoCommand:{type:"boolean",description:n.localize(16,null),default:!0},isWatching:{type:"boolean",deprecationMessage:n.localize(17,null),description:n.localize(18,null),default:!0},isBackground:{type:"boolean",
description:n.localize(19,null),default:!0},promptOnClose:{type:"boolean",description:n.localize(20,null),default:!1},isBuildCommand:{type:"boolean",description:n.localize(21,null),default:!0},isTestCommand:{type:"boolean",description:n.localize(22,null),default:!0},problemMatcher:{$ref:"#/definitions/problemMatcherType",description:n.localize(23,null)}}},taskRunnerConfiguration:{type:"object",required:[],properties:{command:{type:"string",description:n.localize(24,null)},args:{type:"array",description:n.localize(25,null),items:{type:"string"}},options:{$ref:"#/definitions/options"},showOutput:{$ref:"#/definitions/showOutputType",description:n.localize(26,null)},isWatching:{type:"boolean",deprecationMessage:n.localize(27,null),description:n.localize(28,null),default:!0},isBackground:{type:"boolean",description:n.localize(29,null),default:!0},promptOnClose:{type:"boolean",description:n.localize(30,null),default:!1},echoCommand:{type:"boolean",description:n.localize(31,null),default:!0},suppressTaskName:{
type:"boolean",description:n.localize(32,null),default:!0},taskSelector:{type:"string",description:n.localize(33,null)},problemMatcher:{$ref:"#/definitions/problemMatcherType",description:n.localize(34,null)},tasks:{type:"array",description:n.localize(35,null),items:{type:"object",$ref:"#/definitions/taskDescription"}}}}}};t.default=r}),define(e[1250],t([1,0,722,24,177,439]),function(e,t,n,i,r,o){"use strict";function s(e){Array.isArray(e)?e.forEach(s):"object"==typeof e&&(e.$ref&&(e.$ref=e.$ref+"1"),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];(Array.isArray(n)||"object"==typeof n)&&s(n)}))}Object.defineProperty(t,"__esModule",{value:!0});var a={oneOf:[{allOf:[{type:"object",required:["version"],properties:{version:{type:"string",enum:["0.1.0"],description:n.localize(0,null)},_runner:{deprecationMessage:n.localize(1,null)},runner:{type:"string",enum:["process","terminal"],default:"process",description:n.localize(2,null)},windows:{$ref:"#/definitions/taskRunnerConfiguration",
description:n.localize(3,null)},osx:{$ref:"#/definitions/taskRunnerConfiguration",description:n.localize(4,null)},linux:{$ref:"#/definitions/taskRunnerConfiguration",description:n.localize(5,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]},c={type:"boolean",default:!0,description:n.localize(6,null)};a.definitions=i.deepClone(o.default.definitions);var l=a.definitions;l.commandConfiguration.properties.isShellCommand=i.deepClone(c),l.taskDescription.properties.isShellCommand=i.deepClone(c),l.taskRunnerConfiguration.properties.isShellCommand=i.deepClone(c),Object.getOwnPropertyNames(l).forEach(function(e){l[e+"1"]=l[e],delete l[e]}),s(a),r.ProblemMatcherRegistry.onReady().then(function(){try{var e=r.ProblemMatcherRegistry.keys().map(function(e){return"$"+e});l.problemMatcherType1.oneOf[0].enum=e,l.problemMatcherType1.oneOf[2].items.anyOf[1].enum=e}catch(e){console.log("Installing problem matcher ids failed")}}),t.default=a}),define(e[1251],t([1,0,723,24,439,177,274]),function(e,t,n,i,r,o,s){
"use strict";function a(e){Array.isArray(e)?e.forEach(a):"object"==typeof e&&(e.$ref&&(e.$ref=e.$ref+"2"),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];(Array.isArray(n)||"object"==typeof n)&&a(n)}))}Object.defineProperty(t,"__esModule",{value:!0});var c={anyOf:[{type:"boolean",default:!0,description:n.localize(0,null)},{$ref:"#definitions/shellConfiguration"}],deprecationMessage:n.localize(1,null)},l={type:"object",additionalProperties:!0,properties:{type:{type:"string",description:n.localize(2,null)}}},u={anyOf:[{type:"string",description:n.localize(3,null)},l,{type:"array",description:n.localize(4,null),items:{anyOf:[{type:"string"},l]}}]},d={type:"object",default:{echo:!0,reveal:"always",focus:!1,panel:"shared",showReuseMessage:!0},description:n.localize(5,null),additionalProperties:!1,properties:{echo:{type:"boolean",default:!0,description:n.localize(6,null)},focus:{type:"boolean",default:!1,description:n.localize(7,null)},reveal:{type:"string",enum:["always","silent","never"],
enumDescriptions:[n.localize(8,null),n.localize(9,null),n.localize(10,null)],default:"always",description:n.localize(11,null)},panel:{type:"string",enum:["shared","dedicated","new"],default:"shared",description:n.localize(12,null)},showReuseMessage:{type:"boolean",default:!0,description:n.localize(13,null)}}},h=i.deepClone(d);h.deprecationMessage=n.localize(14,null);var p={oneOf:[{type:"string"},{type:"object",properties:{kind:{type:"string",default:"none",description:n.localize(15,null)},isDefault:{type:"boolean",default:!1,description:n.localize(16,null)}}}],enum:[{kind:"build",isDefault:!0},{kind:"test",isDefault:!0},"build","test","none"],enumDescriptions:[n.localize(17,null),n.localize(18,null),n.localize(19,null),n.localize(20,null),n.localize(21,null)],description:n.localize(22,null)},f={type:"string",enum:["shell","process"],default:"shell",description:n.localize(23,null)},g={oneOf:[{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:n.localize(24,null)}]},{type:"object",
required:["value","quoting"],properties:{value:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:n.localize(25,null)}],description:n.localize(26,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[n.localize(27,null),n.localize(28,null),n.localize(29,null)],default:"strong",description:n.localize(30,null)}}}],description:n.localize(31,null)},v={type:"array",items:{oneOf:[{type:"string"},{type:"object",required:["value","quoting"],properties:{value:{type:"string",description:n.localize(32,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[n.localize(33,null),n.localize(34,null),n.localize(35,null)],default:"strong",description:n.localize(36,null)}}}]},description:n.localize(37,null)},m={type:"string",description:n.localize(38,null)},y={type:"string",enum:["2.0.0"],description:n.localize(39,null)},b={type:"string",description:n.localize(40,null)},S=i.deepClone(r.default.definitions.options)
;S.properties.shell=i.deepClone(r.default.definitions.shellConfiguration);var _={type:"object",additionalProperties:!1,properties:{label:{type:"string",description:n.localize(41,null)},taskName:{type:"string",description:n.localize(42,null),deprecationMessage:n.localize(43,null)},identifier:i.deepClone(b),group:i.deepClone(p),isBackground:{type:"boolean",description:n.localize(44,null),default:!0},promptOnClose:{type:"boolean",description:n.localize(45,null),default:!1},presentation:i.deepClone(d),options:S,problemMatcher:{$ref:"#/definitions/problemMatcherType",description:n.localize(46,null)}}},C=[];s.TaskDefinitionRegistry.onReady().then(function(){for(var e=0,t=s.TaskDefinitionRegistry.all();e<t.length;e++){var r=t[e],o=i.deepClone(_);if(o.properties.type={type:"string",description:n.localize(47,null),enum:[r.taskType]},r.required&&(o.required=r.required.slice()),r.properties)for(var c=0,l=Object.keys(r.properties);c<l.length;c++){var u=l[c],d=r.properties[u];o.properties[u]=i.deepClone(d)}a(o),C.push(o)}
});var E=i.deepClone(_);E.properties.customize={type:"string",deprecationMessage:n.localize(48,null)},C.push(E);var w=i.deepClone(r.default.definitions),I=w.taskDescription;I.required=["label"],I.properties.label=i.deepClone(m),I.properties.command=i.deepClone(g),I.properties.args=i.deepClone(v),I.properties.isShellCommand=i.deepClone(c),I.properties.dependsOn=u,I.properties.identifier=i.deepClone(b),I.properties.type=i.deepClone(f),I.properties.presentation=i.deepClone(d),I.properties.terminal=h,I.properties.group=i.deepClone(p),I.properties.taskName.deprecationMessage=n.localize(49,null),I.default={label:"My Task",type:"shell",command:"echo Hello",problemMatcher:[]},w.showOutputType.deprecationMessage=n.localize(50,null),w.taskDescription.properties.echoCommand.deprecationMessage=n.localize(51,null),w.taskDescription.properties.suppressTaskName.deprecationMessage=n.localize(52,null),w.taskDescription.properties.isBuildCommand.deprecationMessage=n.localize(53,null),
w.taskDescription.properties.isTestCommand.deprecationMessage=n.localize(54,null),C.push({$ref:"#/definitions/taskDescription"});w.taskRunnerConfiguration.properties.tasks.items={oneOf:C},w.commandConfiguration.properties.isShellCommand=i.deepClone(c),w.options.properties.shell={$ref:"#/definitions/shellConfiguration"},w.taskRunnerConfiguration.properties.isShellCommand=i.deepClone(c),w.taskRunnerConfiguration.properties.type=i.deepClone(f),w.taskRunnerConfiguration.properties.group=i.deepClone(p),w.taskRunnerConfiguration.properties.presentation=i.deepClone(d),w.taskRunnerConfiguration.properties.suppressTaskName.deprecationMessage=n.localize(55,null),w.taskRunnerConfiguration.properties.taskSelector.deprecationMessage=n.localize(56,null);var T=i.deepClone(w.taskRunnerConfiguration);delete T.properties.tasks,T.additionalProperties=!1,w.osSpecificTaskRunnerConfiguration=T,w.taskRunnerConfiguration.properties.version=i.deepClone(y);var x={oneOf:[{allOf:[{type:"object",required:["version"],properties:{
version:i.deepClone(y),windows:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:n.localize(57,null)},osx:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:n.localize(58,null)},linux:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:n.localize(59,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]};x.definitions=w,Object.getOwnPropertyNames(w).forEach(function(e){w[e+"2"]=w[e],delete w[e]}),a(x),o.ProblemMatcherRegistry.onReady().then(function(){try{var e=o.ProblemMatcherRegistry.keys().map(function(e){return"$"+e});w.problemMatcherType2.oneOf[0].enum=e,w.problemMatcherType2.oneOf[2].items.anyOf[1].enum=e}catch(e){console.log("Installing problem matcher ids failed")}}),t.default=x}),define(e[1252],t([1,0,144,59,725,24,30,11,18,4,50,83,7,5,25,90,27,177,437,154,350]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(){function e(e,t,n,i){this.workspaceFolder=e,
this.taskSystemInfo=t,this._values=n,this._service=i}return e.prototype.resolve=function(e){var t=this;return e.replace(/\$\{(.*?)\}/g,function(e,n){var i=t._values.get(e);return i||(t._service?t._service.resolve(t.workspaceFolder,e):e)})},e}(),C=function(){function e(e,t,n,i,r,o,s,a,c){this.terminalService=e,this.outputService=t,this.markerService=n,this.modelService=i,this.configurationResolverService=r,this.telemetryService=o,this.contextService=s,this.outputChannel=this.outputService.getChannel(a),this.activeTasks=Object.create(null),this.terminals=Object.create(null),this.idleTaskTerminals=new u.LinkedMap,this.sameTaskTerminals=Object.create(null),this._onDidStateChange=new h.Emitter,this.taskSystemInfoResolver=c}return Object.defineProperty(e.prototype,"onDidStateChange",{get:function(){return this._onDidStateChange.event},enumerable:!0,configurable:!0}),e.prototype.log=function(e){this.outputChannel.append(e+"\n")},e.prototype.showOutput=function(){
this.outputService.showChannel(this.outputChannel.id,!0)},e.prototype.run=function(e,t,n){void 0===n&&(n=S.Triggers.command);var i=this.activeTasks[b.Task.getMapKey(e)];if(i&&i.promise){var o=b.RevealKind.Always,s=!1;return(b.CustomTask.is(e)||b.ContributedTask.is(e))&&(o=e.command.presentation.reveal,s=e.command.presentation.focus),(o===b.RevealKind.Always||s)&&(this.terminalService.setActiveInstance(i.terminal),this.terminalService.showPanel(s)),{kind:S.TaskExecuteKind.Active,active:{same:!0,background:e.isBackground},promise:i.promise}}try{return{kind:S.TaskExecuteKind.Started,started:{},promise:this.executeTask(Object.create(null),e,t,n)}}catch(e){throw e instanceof S.TaskError?e:e instanceof Error?(this.log(e.message),new S.TaskError(d.default.Error,e.message,S.TaskErrors.UnknownError)):(this.log(e.toString()),new S.TaskError(d.default.Error,r.localize(0,null),S.TaskErrors.UnknownError))}},e.prototype.revealTask=function(e){var t=this.activeTasks[b.Task.getMapKey(e)]
;return!!t&&(this.terminalService.setActiveInstance(t.terminal),(b.CustomTask.is(e)||b.ContributedTask.is(e))&&this.terminalService.showPanel(e.command.presentation.focus),!0)},e.prototype.isActive=function(){return l.TPromise.as(this.isActiveSync())},e.prototype.isActiveSync=function(){return Object.keys(this.activeTasks).length>0},e.prototype.canAutoTerminate=function(){var e=this;return Object.keys(this.activeTasks).every(function(t){return!e.activeTasks[t].task.promptOnClose})},e.prototype.getActiveTasks=function(){var e=this;return Object.keys(this.activeTasks).map(function(t){return e.activeTasks[t].task})},e.prototype.terminate=function(e){var t=this,n=this.activeTasks[b.Task.getMapKey(e)];return n?new l.TPromise(function(e,i){var r=n.terminal,o=r.onExit(function(){var i=n.task;try{o.dispose(),t._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Terminated,i))}catch(e){}e({success:!0,task:i})});r.dispose()}):l.TPromise.as({success:!1,task:void 0})},e.prototype.terminateAll=function(){
var e=this,t=[];return Object.keys(this.activeTasks).forEach(function(n){var i=e.activeTasks[n],r=i.terminal;t.push(new l.TPromise(function(t,n){var o=r.onExit(function(){var n=i.task;try{o.dispose(),e._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Terminated,n))}catch(e){}t({success:!0,task:i.task})})})),r.dispose()}),this.activeTasks=Object.create(null),l.TPromise.join(t)},e.prototype.executeTask=function(e,t,n,i){var o=this,a=[];return t.dependsOn&&t.dependsOn.forEach(function(t){var c=n.resolve(t.workspaceFolder,t.task);if(c){var l=b.Task.getMapKey(c),u=e[l];u||(u=o.executeTask(e,c,n,i),e[l]=u),a.push(u)}else o.log(r.localize(1,null,s.isString(t.task)?t.task:JSON.stringify(t.task,void 0,0),t.workspaceFolder.name)),o.showOutput()}),(b.ContributedTask.is(t)||b.CustomTask.is(t))&&t.command?l.TPromise.join(a).then(function(e){for(var n=0,r=e;n<r.length;n++){var s=r[n];if(0!==s.exitCode)return{exitCode:s.exitCode}}return o.executeCommand(t,i)}):l.TPromise.join(a).then(function(e){
for(var t=0,n=e;t<n.length;t++){var i=n[t];if(0!==i.exitCode)return{exitCode:i.exitCode}}return{exitCode:0}})},e.prototype.executeCommand=function(e,t){var n=this,i=new Set;this.collectTaskVariables(i,e);var r,o=b.Task.getWorkspaceFolder(e);o&&(r=this.taskSystemInfoResolver(o));var s;if(r)s=r.resolveVariables(o,i);else{var a=new Map;i.forEach(function(e){a.set(e,n.configurationResolverService.resolve(o,e))}),s=l.TPromise.as(a)}return s.then(function(i){return n.executeInTerminal(e,t,new _(o,r,i,n.configurationResolverService))})},e.prototype.executeInTerminal=function(t,n,i){var r=this,o=void 0,s=void 0,a=void 0,d=void 0;return d=t.isBackground?new l.TPromise(function(e,n){var l,d=r.resolveMatchers(i,t.problemMatchers),h=new y.WatchingProblemCollector(d,r.markerService,r.modelService),f=[],v=0;f.push(h.onDidStateChange(function(e){if(e.kind===y.ProblemCollectorEventKind.BackgroundProcessingBegins)v++,
r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Active,t));else if(e.kind===y.ProblemCollectorEventKind.BackgroundProcessingEnds&&(v--,r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Inactive,t)),0===v)){t.command.presentation.reveal===b.RevealKind.Silent&&h.numberOfMatches>0&&h.maxMarkerSeverity>=g.MarkerSeverity.Error&&(r.terminalService.setActiveInstance(o),r.terminalService.showPanel(!1))}})),h.aboutToStart();var m=void 0;if(l=r.createTerminal(t,i),o=l[0],s=l[1],!(a=l[2])&&o){var S=!1;o.processReady.done(function(){S=!0,r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.ProcessStarted,t,o.processId))},function(e){}),r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Start,t));var _=r.registerLinkMatchers(o,d),C=o.onLineData(function(e){h.processLine(e),m||(m=new c.Delayer(3e3)),m.trigger(function(){h.forceDelivery(),m=void 0})}),E=o.onExit(function(n){C.dispose(),E.dispose();var i=b.Task.getMapKey(t);switch(delete r.activeTasks[i],
r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Changed)),t.command.presentation.panel){case b.PanelKind.Dedicated:r.sameTaskTerminals[i]=o.id.toString();break;case b.PanelKind.Shared:r.idleTaskTerminals.set(i,o.id.toString(),u.Touch.AsOld)}t.command.presentation.reveal===b.RevealKind.Silent&&(0!==n||h.numberOfMatches>0&&h.maxMarkerSeverity>=g.MarkerSeverity.Error)&&(r.terminalService.setActiveInstance(o),r.terminalService.showPanel(!1)),h.done(),h.dispose(),_.forEach(function(e){return o.deregisterLinkMatcher(e)}),S&&r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.ProcessEnded,t,n)),f=p.dispose(f),f=null;for(var s=0;s<v;s++){var a=b.TaskEvent.create(b.TaskEventKind.Inactive,t);r._onDidStateChange.fire(a)}v=0,r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.End,t)),e({exitCode:n})})}}):new l.TPromise(function(e,n){var c;if(c=r.createTerminal(t,i),o=c[0],s=c[1],!(a=c[2])&&o){var l=!1;o.processReady.done(function(){l=!0,
r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.ProcessStarted,t,o.processId))},function(e){}),r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Start,t)),r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Active,t));var d=r.resolveMatchers(i,t.problemMatchers),h=new y.StartStopProblemCollector(d,r.markerService,r.modelService),p=r.registerLinkMatchers(o,d),f=o.onLineData(function(e){h.processLine(e)}),v=o.onExit(function(n){f.dispose(),v.dispose();var i=b.Task.getMapKey(t);switch(delete r.activeTasks[i],r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Changed)),t.command.presentation.panel){case b.PanelKind.Dedicated:r.sameTaskTerminals[i]=o.id.toString();break;case b.PanelKind.Shared:r.idleTaskTerminals.set(i,o.id.toString(),u.Touch.AsOld)}t.command.presentation.reveal===b.RevealKind.Silent&&(0!==n||h.numberOfMatches>0&&h.maxMarkerSeverity>=g.MarkerSeverity.Error)&&(r.terminalService.setActiveInstance(o),r.terminalService.showPanel(!1)),h.done(),h.dispose(),
p.forEach(function(e){return o.deregisterLinkMatcher(e)}),l&&r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.ProcessEnded,t,n)),r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Inactive,t)),r._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.End,t)),e({exitCode:n})})}}),a?l.TPromise.wrapError(new Error(a.message)):o?((t.command.presentation.reveal===b.RevealKind.Always||t.command.presentation.reveal===b.RevealKind.Silent&&0===t.problemMatchers.length)&&(this.terminalService.setActiveInstance(o),this.terminalService.showPanel(t.command.presentation.focus)),this.activeTasks[b.Task.getMapKey(t)]={terminal:o,task:t,promise:d},this._onDidStateChange.fire(b.TaskEvent.create(b.TaskEventKind.Changed)),d.then(function(i){try{var o={trigger:n,runner:"terminal",taskKind:b.Task.getTelemetryKind(t),command:r.getSanitizedCommand(s),success:!0,exitCode:i.exitCode};r.telemetryService.publicLog(e.TelemetryEventName,o)}catch(e){}return i},function(i){try{var o={trigger:n,runner:"terminal",
taskKind:b.Task.getTelemetryKind(t),command:r.getSanitizedCommand(s),success:!1};r.telemetryService.publicLog(e.TelemetryEventName,o)}catch(i){}return l.TPromise.wrapError(i)})):l.TPromise.wrapError(new Error("Failed to create terminal for task "+t._label))},e.prototype.createTerminal=function(e,t){var n=this,o=t.taskSystemInfo?t.taskSystemInfo.platform:a.platform,c=this.resolveOptions(t,e.command.options),l=this.resolveCommandAndArgs(t,e.command),u=l.command,h=l.args,p=b.CommandString.value(u),g=b.Task.getWorkspaceFolder(e),m=g&&this.contextService.getWorkbenchState()===v.WorkbenchState.WORKSPACE,y=r.localize(2,null,m?b.Task.getQualifiedLabel(e):e.name),_=!1;e.command.presentation.reveal===b.RevealKind.Never&&e.isBackground||(_=e.command.presentation.panel===b.PanelKind.New?r.localize(3,null):e.command.presentation.showReuseMessage?r.localize(4,null):"​");var C=void 0,E=e.command.runtime===b.RuntimeType.Shell;if(E){C={name:y,executable:null,args:null,waitOnExit:_},
this.terminalService.configHelper.mergeDefaultShellPathAndArgs(C,o);var w=!1,I=e.command.options&&e.command.options.shell;I&&(I.executable&&(C.executable=this.resolveVariable(t,I.executable),w=!0),I.args?C.args=this.resolveVariables(t,I.args.slice()):C.args=[]);var T=C.args.slice(0),x=[],k=this.buildShellCommandLine(C.executable,I,u,h),D=!1;if(o===a.Platform.Windows){if(!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")){var A=i.join(process.env.windir,"Sysnative").toLowerCase();0===C.executable.toLowerCase().indexOf(A)&&(C.executable=i.join(process.env.windir,"System32",C.executable.substr(A.length)))}D=!0;var L=i.basename(C.executable).toLowerCase();if("cmd.exe"===L&&(c.cwd&&f.isUNC(c.cwd)||!c.cwd&&f.isUNC(process.cwd())))return[void 0,void 0,new S.TaskError(d.default.Error,r.localize(5,null),S.TaskErrors.UnknownError)];"powershell.exe"===L||"pwsh.exe"===L?w||x.push("-Command"):"bash.exe"===L||"zsh.exe"===L?(D=!1,w||x.push("-c")):w||x.push("/d","/c")}else if(!w){if(a.isMacintosh){var R=T.indexOf("-l")
;-1!==R&&T.splice(R,1)}x.push("-c")}x.forEach(function(e){T.some(function(t){return t.toLowerCase()===e})||T.push(e)}),T.push(k),C.args=D?T.join(" "):T,e.command.presentation.echo&&(C.initialText=m?"> Executing task in folder "+g.name+": "+k+" <\n":"> Executing task: "+k+" <\n")}else{M=c&&c.cwd?c.cwd:process.cwd();if(C={name:y,executable:a.isWindows&&!E?this.findExecutable(p,M,c):p,args:h.map(function(e){return s.isString(e)?e:e.value}),waitOnExit:_},e.command.presentation.echo){var O=function(e){return e&&0!==e.length?s.isString(e)?e:e.join(" "):""};C.initialText=m?"> Executing task in folder "+g.name+": "+C.executable+" "+O(C.args)+" <\n":"> Executing task: "+C.executable+" "+O(C.args)+" <\n"}}if(c.cwd){var M=c.cwd,P=void 0;if(!(P=o===a.Platform.Windows?i.win32:o===a.Platform.Linux||o===a.Platform.Mac?i.posix:i).isAbsolute(M)){var N=b.Task.getWorkspaceFolder(e);"file"===N.uri.scheme&&(M=P.join(N.uri.fsPath,M))}C.cwd=P.normalize(M)}c.env&&(C.env=c.env)
;var F,W=e.command.presentation.panel===b.PanelKind.Dedicated,B=e.command.presentation.panel===b.PanelKind.Shared,V=b.Task.getMapKey(e);if(W){(z=this.sameTaskTerminals[V])&&(F=this.terminals[z],delete this.sameTaskTerminals[V])}else if(B){var z=this.idleTaskTerminals.remove(V)||this.idleTaskTerminals.shift();z&&(F=this.terminals[z])}if(F)return F.terminal.reuseTerminal(C),[F.terminal,p,void 0];var H=this.terminalService.createTerminal(C),K=H.id.toString();return H.onDisposed(function(e){var t=n.terminals[K];t&&(delete n.terminals[K],delete n.sameTaskTerminals[t.lastTask],n.idleTaskTerminals.delete(t.lastTask))}),this.terminals[K]={terminal:H,lastTask:V},[H,p,void 0]},e.prototype.buildShellCommandLine=function(e,t,n,r){function o(e,t){if(t===b.ShellQuoting.Strong&&f.strong)return[f.strong+e+f.strong,!0];if(t===b.ShellQuoting.Weak&&f.weak)return[f.weak+e+f.weak,!0];if(t===b.ShellQuoting.Escape&&f.escape){if(s.isString(f.escape))return[e.replace(/ /g,f.escape+" "),!0]
;for(var n=[],i=0,r=f.escape.charsToEscape;i<r.length;i++){var o=r[i];n.push("\\"+o)}var a=new RegExp("["+n.join(",")+"]","g"),c=f.escape.escapeChar;return[e.replace(a,function(e){return c+e}),!0]}return[e,!1]}function c(e){return s.isString(e)?function(e){if(e.length>=2&&(e[0]===f.strong?f.strong:e[0]===f.weak?f.weak:void 0)===e[e.length-1])return!1;for(var t,n=0;n<e.length;n++){var i=e[n];if(i===t)t=void 0;else{if(void 0!==t)continue;if(i===f.escape)n++;else if(i===f.strong||i===f.weak)t=i;else if(" "===i)return!0}}return!1}(e)?o(e,b.ShellQuoting.Strong):[e,!1]:o(e.value,e.quoting)}var l,u;if((!r||0===r.length)&&s.isString(n))return n;var d,h,p=i.parse(e).name.toLowerCase(),f=this.getQuotingOptions(p,t),g=[],v=!1,m=!1;d=(l=c(n))[0],h=l[1],g.push(d),v=h;for(var y=0,S=r;y<S.length;y++){d=(u=c(S[y]))[0],h=u[1],g.push(d),m=m||h}var _=g.join(" ");return a.isWindows&&("cmd"===p&&v&&m?_='"'+_+'"':"powershell"===p&&v&&(_="& "+_)),"cmd"===p&&a.isWindows&&v&&m&&(_='"'+_+'"'),_},
e.prototype.getQuotingOptions=function(t,n){return n&&n.quoting?n.quoting:e.shellQuotes[t]||e.osShellQuotes[process.platform]},e.prototype.collectTaskVariables=function(e,t){t.command&&this.collectCommandVariables(e,t.command),this.collectMatcherVariables(e,t.problemMatchers)},e.prototype.collectCommandVariables=function(e,t){var n=this;if(this.collectVariables(e,t.name),t.args&&t.args.forEach(function(t){return n.collectVariables(e,t)}),e.add("${workspaceFolder}"),t.options){var i=t.options;i.cwd&&this.collectVariables(e,i.cwd),i.env&&Object.keys(i.env).forEach(function(t){var r=i.env[t];s.isString(r)&&n.collectVariables(e,r)}),i.shell&&(i.shell.executable&&this.collectVariables(e,i.shell.executable),i.shell.args&&i.shell.args.forEach(function(t){return n.collectVariables(e,t)}))}},e.prototype.collectMatcherVariables=function(e,t){var n=this;void 0!==t&&null!==t&&0!==t.length&&t.forEach(function(t){var i
;(i=s.isString(t)?"$"===t[0]?m.ProblemMatcherRegistry.get(t.substring(1)):m.ProblemMatcherRegistry.get(t):t)&&i.filePrefix&&n.collectVariables(e,i.filePrefix)})},e.prototype.collectVariables=function(e,t){var n,i=s.isString(t)?t:t.value,r=/\$\{(.*?)\}/g;do{(n=r.exec(i))&&e.add(n[0])}while(n)},e.prototype.resolveCommandAndArgs=function(e,t){var n=t.args?t.args.slice():[];n=this.resolveVariables(e,n);return{command:this.resolveVariable(e,t.name),args:n}},e.prototype.findExecutable=function(e,t,r){if(i.isAbsolute(e))return e;if("."!==i.dirname(e))return i.join(t,e);var o=void 0;if(r&&r.env)for(var a=0,c=Object.keys(r.env);a<c.length;a++){var l=c[a];if("path"===l.toLowerCase()){s.isString(r.env[l])&&(o=r.env[l].split(i.delimiter));break}}if(void 0===o&&s.isString(process.env.PATH)&&(o=process.env.PATH.split(i.delimiter)),void 0===o||0===o.length)return i.join(t,e);for(var u=0,d=o;u<d.length;u++){var h=d[u],p=void 0;if(p=i.isAbsolute(h)?i.join(h,e):i.join(t,h,e),n.existsSync(p))return p;var f=p+".com"
;if(n.existsSync(f))return f;if(f=p+".exe",n.existsSync(f))return f}return i.join(t,e)},e.prototype.resolveVariables=function(e,t){var n=this;return t.map(function(t){return n.resolveVariable(e,t)})},e.prototype.resolveMatchers=function(e,t){var n=this;if(void 0===t||null===t||0===t.length)return[];var i=[];return t.forEach(function(t){var a;if(a=s.isString(t)?"$"===t[0]?m.ProblemMatcherRegistry.get(t.substring(1)):m.ProblemMatcherRegistry.get(t):t){var c=e.taskSystemInfo,l=void 0!==a.filePrefix,u=void 0!==c&&void 0!==c.uriProvider;if(l||u){var d=o.deepClone(a);u&&(d.uriProvider=c.uriProvider),l&&(d.filePrefix=n.resolveVariable(e,d.filePrefix)),i.push(d)}else i.push(a)}else n.outputChannel.append(r.localize(6,null))}),i},e.prototype.resolveVariable=function(e,t){return s.isString(t)?e.resolve(t):{value:e.resolve(t.value),quoting:t.quoting}},e.prototype.resolveOptions=function(e,t){var n=this;if(void 0===t||null===t)return{cwd:this.resolveVariable(e,"${workspaceFolder}")};var i=s.isString(t.cwd)?{
cwd:this.resolveVariable(e,t.cwd)}:{cwd:this.resolveVariable(e,"${workspaceFolder}")};return t.env&&(i.env=Object.create(null),Object.keys(t.env).forEach(function(r){var o=t.env[r];s.isString(o)?i.env[r]=n.resolveVariable(e,o):i.env[r]=o.toString()})),i},e.prototype.registerLinkMatchers=function(e,t){return[]},e.prototype.getSanitizedCommand=function(t){var n=t.toLowerCase(),r=n.lastIndexOf(i.sep);return-1!==r&&(n=n.substring(r+1)),e.WellKnowCommands[n]?n:"other"},e.TelemetryEventName="taskService",e.shellQuotes={cmd:{strong:'"'},powershell:{escape:{escapeChar:"`",charsToEscape:" \"'()"},strong:"'",weak:'"'},bash:{escape:{escapeChar:"\\",charsToEscape:" \"'"},strong:"'",weak:'"'},zsh:{escape:{escapeChar:"\\",charsToEscape:" \"'"},strong:"'",weak:'"'}},e.osShellQuotes={linux:e.shellQuotes.bash,darwin:e.shellQuotes.bash,win32:e.shellQuotes.powershell},e.WellKnowCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,grunt:!0,gulp:!0,jake:!0,jenkins:!0,jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,
tsc:!0,xbuild:!0},e}();t.TerminalTaskSystem=C}),define(e[1253],t([1,0,727,24,30,11,4,18,83,14,7,224,177,437,350,154,5]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){function e(e,t,n,i,r,o){this.markerService=e,this.modelService=t,this.outputService=i,this.telemetryService=n,this.configurationResolverService=r,this.childProcess=null,this.activeTask=null,this.activeTaskPromise=null,this.outputChannel=this.outputService.getChannel(o),this.errorsShown=!0,this._onDidStateChange=new u.Emitter}return Object.defineProperty(e.prototype,"onDidStateChange",{get:function(){return this._onDidStateChange.event},enumerable:!0,configurable:!0}),e.prototype.isActive=function(){return s.TPromise.as(!!this.childProcess)},e.prototype.isActiveSync=function(){return!!this.childProcess},e.prototype.getActiveTasks=function(){var e=[];return this.activeTask&&e.push(this.activeTask),e},e.prototype.run=function(e){return this.activeTask?{
kind:f.TaskExecuteKind.Active,active:{same:this.activeTask._id===e._id,background:this.activeTask.isBackground},promise:this.activeTaskPromise}:this.executeTask(e)},e.prototype.revealTask=function(e){return this.showOutput(),!0},e.prototype.hasErrors=function(e){this.errorsShown=!e},e.prototype.canAutoTerminate=function(){return!this.childProcess||!!this.activeTask&&!this.activeTask.promptOnClose},e.prototype.terminate=function(e){return this.activeTask&&g.Task.getMapKey(this.activeTask)===g.Task.getMapKey(e)?this.terminateAll().then(function(e){return e[0]}):s.TPromise.as({success:!1,task:void 0})},e.prototype.terminateAll=function(){var e=this;if(this.childProcess){var t=this.activeTask;return this.childProcess.terminate().then(function(n){var r=i.assign({task:t},n);return e._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.Terminated,t)),[r]})}return s.TPromise.as([{success:!0,task:void 0}])},e.prototype.executeTask=function(t,i){var r=this;if(void 0===i&&(i=f.Triggers.command),
!g.CustomTask.is(t))throw new Error("The process task system can only execute custom tasks.");var o={trigger:i,runner:"output",taskKind:g.Task.getTelemetryKind(t),command:"other",success:!0};try{var a=this.doExecuteTask(t,o);return a.promise=a.promise.then(function(t){return r.telemetryService.publicLog(e.TelemetryEventName,o),t},function(t){return o.success=!1,r.telemetryService.publicLog(e.TelemetryEventName,o),s.TPromise.wrapError(t)}),a}catch(t){if(o.success=!1,this.telemetryService.publicLog(e.TelemetryEventName,o),t instanceof f.TaskError)throw t;if(t instanceof Error){var l=t;throw this.outputChannel.append(l.message),new f.TaskError(c.default.Error,l.message,f.TaskErrors.UnknownError)}throw this.outputChannel.append(t.toString()),new f.TaskError(c.default.Error,n.localize(0,null),f.TaskErrors.UnknownError)}},e.prototype.doExecuteTask=function(e,t){var i=this,s={},c=e.command;this.errorsShown?this.clearOutput():(this.showOutput(),this.errorsShown=!0);var u=[]
;if(c.args)for(var h=0,m=c.args;h<m.length;h++){var y=m[h];r.isString(y)?u.push(y):(this.log("Quoting individual arguments is not supported in the process runner. Using plain value: "+y.value),u.push(y.value))}u=this.resolveVariables(e,u);var b=this.resolveVariable(e,r.isString(c.name)?c.name:c.name.value);this.childProcess=new d.LineProcess(b,u,c.runtime===g.RuntimeType.Shell,this.resolveOptions(e,c.options)),t.command=this.childProcess.getSanitizedCommand();var S=e.command.presentation.reveal;if((S===g.RevealKind.Always||S===g.RevealKind.Silent&&0===e.problemMatchers.length)&&this.showOutput(),c.presentation.echo){var _=o.isWindows?">":"$";this.log("running command"+_+" "+b+" "+u.join(" "))}if(e.isBackground){var C=new p.WatchingProblemCollector(this.resolveMatchers(e,e.problemMatchers),this.markerService,this.modelService),E=[],w=0;E.push(C.onDidStateChange(function(t){t.kind===p.ProblemCollectorEventKind.BackgroundProcessingBegins?(w++,
i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.Active,e))):t.kind===p.ProblemCollectorEventKind.BackgroundProcessingEnds&&(w--,i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.Inactive,e)))})),C.aboutToStart();var I=null;this.activeTask=e;var T=g.TaskEvent.create(g.TaskEventKind.Inactive,e),x=!1,k=this.childProcess.start();this.childProcess.pid.then(function(t){-1!==t&&(x=!0,i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.ProcessStarted,e,t)))}),this.activeTaskPromise=k.then(function(t){i.childProcessEnded(),C.done(),C.dispose(),x&&i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.ProcessEnded,e,t.cmdCode)),E=v.dispose(E),E=null;for(var r=0;r<w;r++)i._onDidStateChange.fire(T);return w=0,i.checkTerminated(e,t)||i.log(n.localize(1,null)),t.cmdCode&&1===t.cmdCode&&0===C.numberOfMatches&&S!==g.RevealKind.Never&&i.showOutput(),s.exitCode=t.cmdCode,s},function(t){i.childProcessEnded(),C.dispose(),E=v.dispose(E),E=null;for(var n=0;n<w;n++)i._onDidStateChange.fire(T)
;return w=0,i.handleError(e,t)},function(e){var t=l.removeAnsiEscapeCodes(e.line);i.outputChannel.append(t+"\n"),C.processLine(t),null===I&&(I=new a.Delayer(3e3)),I.trigger(function(){return C.forceDelivery(),null}).then(function(){I=null})});return e.tscWatch?{kind:f.TaskExecuteKind.Started,started:{restartOnFileChanges:"**/*.ts"},promise:this.activeTaskPromise}:{kind:f.TaskExecuteKind.Started,started:{},promise:this.activeTaskPromise}}this._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.Start,e)),this._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.Active,e));var D=new p.StartStopProblemCollector(this.resolveMatchers(e,e.problemMatchers),this.markerService,this.modelService);this.activeTask=e;var A=g.TaskEvent.create(g.TaskEventKind.Inactive,e),L=!1,k=this.childProcess.start();return this.childProcess.pid.then(function(t){-1!==t&&(L=!0,i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.ProcessStarted,e,t)))}),this.activeTaskPromise=k.then(function(t){
return i.childProcessEnded(),D.done(),D.dispose(),i.checkTerminated(e,t),L&&i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.ProcessEnded,e,t.cmdCode)),i._onDidStateChange.fire(A),i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.End,e)),t.cmdCode&&1===t.cmdCode&&0===D.numberOfMatches&&S!==g.RevealKind.Never&&i.showOutput(),s.exitCode=t.cmdCode,s},function(t){return i.childProcessEnded(),D.dispose(),i._onDidStateChange.fire(A),i._onDidStateChange.fire(g.TaskEvent.create(g.TaskEventKind.End,e)),i.handleError(e,t)},function(e){var t=l.removeAnsiEscapeCodes(e.line);i.outputChannel.append(t+"\n"),D.processLine(t)}),{kind:f.TaskExecuteKind.Started,started:{},promise:this.activeTaskPromise}},e.prototype.childProcessEnded=function(){this.childProcess=null,this.activeTask=null,this.activeTaskPromise=null},e.prototype.handleError=function(e,t){var i=!1;if(t.error&&!t.terminated){var r=e.command.args?e.command.args.join(" "):"";this.log(n.localize(2,null,e.command.name,r)),
this.outputChannel.append(t.error.message),i=!0}t.stdout&&(this.outputChannel.append(t.stdout),i=!0),t.stderr&&(this.outputChannel.append(t.stderr),i=!0),(i=this.checkTerminated(e,t)||i)&&this.showOutput();var o=t.error||new Error;return o.stderr=t.stderr,o.stdout=t.stdout,o.terminated=t.terminated,s.TPromise.wrapError(o)},e.prototype.checkTerminated=function(e,t){return!!t.terminated&&(this.log(n.localize(3,null,e.name)),!0)},e.prototype.resolveOptions=function(e,t){var n=this,i={cwd:this.resolveVariable(e,t.cwd)};return t.env&&(i.env=Object.create(null),Object.keys(t.env).forEach(function(o){var s=t.env[o];r.isString(s)?i.env[o]=n.resolveVariable(e,s):i.env[o]=s.toString()})),i},e.prototype.resolveVariables=function(e,t){var n=this;return t.map(function(t){return n.resolveVariable(e,t)})},e.prototype.resolveMatchers=function(e,t){var o=this;if(void 0===t||null===t||0===t.length)return[];var s=[];return t.forEach(function(t){var a
;if(a=r.isString(t)?"$"===t[0]?h.ProblemMatcherRegistry.get(t.substring(1)):h.ProblemMatcherRegistry.get(t):t)if(a.filePrefix){var c=i.deepClone(a);c.filePrefix=o.resolveVariable(e,c.filePrefix),s.push(c)}else s.push(a);else o.outputChannel.append(n.localize(4,null))}),s},e.prototype.resolveVariable=function(e,t){return this.configurationResolverService.resolve(g.Task.getWorkspaceFolder(e),t)},e.prototype.log=function(e){this.outputChannel.append(e+"\n")},e.prototype.showOutput=function(){this.outputService.showChannel(this.outputChannel.id,!0)},e.prototype.clearOutput=function(){this.outputChannel.clear()},e.TelemetryEventName="taskService",e}();t.ProcessTaskSystem=m}),define(e[320],t([1,0,729,163,24,274]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e.create=function(e){var t=i.createHash("md5");t.update(JSON.stringify(e));var n={_key:t.digest("hex"),type:e.taskType};return r.assign(n,e),n}}(s||(s={})),t.KeyedTaskIdentifier=s;var a;!function(e){
e.createTaskIdentifier=function(e,t){var i=o.TaskDefinitionRegistry.get(e.type);if(void 0!==i){var a=Object.create(null);a.type=i.taskType;var c=new Set;i.required.forEach(function(e){return c.add(e)});for(var l=i.properties,u=0,d=Object.keys(l);u<d.length;u++){var h=d[u],p=e[h];if(void 0!==p&&null!==p)a[h]=p;else if(c.has(h)){var f=l[h];if(void 0!==f.default)a[h]=r.deepClone(f.default);else switch(f.type){case"boolean":a[h]=!1;break;case"number":case"integer":a[h]=0;break;case"string":a[h]="";break;default:return void t.error(n.localize(0,null,JSON.stringify(e,void 0,0),h))}}}return s.create(a)}}}(a||(a={})),t.TaskDefinition=a}),define(e[441],t([1,0,728,24,11,30,136,177,154,274,320]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";function d(e,t,n){void 0!==t[n]&&(e[n]=t[n])}function h(e,t,n){void 0===e[n]&&void 0!==t[n]&&(e[n]=t[n])}function p(e,t){if(void 0===e||null===e)return!0;for(var n=0,i=t;n<i.length;n++){var r=i[n],o=e[r.property];if(void 0!==o&&null!==o){if(void 0!==r.type&&!r.type.isEmpty(o))return!1
;if(!Array.isArray(o)||o.length>0)return!1}}return!0}function f(e,t,n){if(p(t,n))return e;if(p(e,n))return t;for(var i=0,r=n;i<r.length;i++){var o=r[i],s=o.property,a=void 0;void 0!==(a=void 0!==o.type?o.type.assignProperties(e[s],t[s]):t[s])&&null!==a&&(e[s]=a)}return e}function g(e,t,n){if(p(t,n))return e;if(p(e,n))return t;for(var i=0,r=n;i<r.length;i++){var o=r[i],s=o.property,a=void 0;o.type?a=o.type.fillProperties(e[s],t[s]):void 0===e[s]&&(a=t[s]),void 0!==a&&null!==a&&(e[s]=a)}return e}function v(e,t,n,r){if(e&&Object.isFrozen(e))return e;if(void 0===e||null===e)return void 0!==t&&null!==t?i.deepClone(t):void 0;for(var o=0,s=n;o<s.length;o++){var a=s[o],c=a.property;if(void 0===e[c]){var l=void 0;void 0!==(l=a.type?a.type.fillDefaults(e[c],r):t[c])&&null!==l&&(e[c]=l)}}return e}function m(e,t){if(void 0!==e&&null!==e){if(Object.isFrozen(e))return e;for(var n=0,i=t;n<i.length;n++){var r=i[n];if(r.type){var o=e[r.property];o&&r.type.freeze(o)}}return Object.freeze(e),e}}
Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.escape=1]="escape",e[e.strong=2]="strong",e[e.weak=3]="weak"}(t.ShellQuoting||(t.ShellQuoting={}));var y;!function(e){e.is=function(e){return void 0!==e&&o.isString(e.type)}}(y=t.TaskIdentifier||(t.TaskIdentifier={}));!function(e){e.value=function(e){return o.isString(e)?e:o.isStringArray(e)?e.join(" "):o.isString(e.value)?e.value:e.value.join(" ")}}(t.CommandString||(t.CommandString={}));var b;!function(e){e[e.Unknown=0]="Unknown",e[e.String=1]="String",e[e.ProblemMatcher=2]="ProblemMatcher",e[e.Array=3]="Array"}(b||(b={}));var S=[];Object.freeze(S);var _;!function(e){function t(e){var t=e;return t&&(o.isString(t.executable)||o.isStringArray(t.args))}var n=[{property:"executable"},{property:"args"},{property:"quoting"}];e.is=t,e.from=function(e,n){if(t(e)){var r={};return void 0!==e.executable&&(r.executable=e.executable),void 0!==e.args&&(r.args=e.args.slice()),void 0!==e.quoting&&(r.quoting=i.deepClone(e.quoting)),r}},e.isEmpty=function(e){
return p(e,n)},e.assignProperties=function(e,t){return f(e,t,n)},e.fillProperties=function(e,t){return g(e,t,n)},e.fillDefaults=function(e,t){return e},e.freeze=function(e){if(e)return Object.freeze(e)}}(_||(_={}));var C;!function(e){function t(e){return p(e,r)}var r=[{property:"cwd"},{property:"env"},{property:"shell",type:_}],s={cwd:"${workspaceFolder}"};e.from=function(e,r){var s={};return void 0!==e.cwd&&(o.isString(e.cwd)?s.cwd=e.cwd:r.problemReporter.warn(n.localize(0,null,e.cwd))),void 0!==e.env&&(s.env=i.deepClone(e.env)),s.shell=_.from(e.shell,r),t(s)?void 0:s},e.isEmpty=t,e.assignProperties=function(e,n){if(t(n))return e;if(t(e))return n;if(d(e,n,"cwd"),void 0===e.env)e.env=n.env;else if(void 0!==n.env){var i=Object.create(null);Object.keys(e.env).forEach(function(t){return i[t]=e.env[t]}),Object.keys(n.env).forEach(function(e){return i[e]=n.env[e]}),e.env=i}return e.shell=_.assignProperties(e.shell,n.shell),e},e.fillProperties=function(e,t){return g(e,t,r)},e.fillDefaults=function(e,t){
return v(e,s,r,t)},e.freeze=function(e){return m(e,r)}}(C||(C={}));var E;!function(e){function t(e,t){var r={name:void 0,runtime:void 0,presentation:void 0};r.name=l.from(e.command),o.isString(e.type)&&("shell"!==e.type&&"process"!==e.type||(r.runtime=c.RuntimeType.fromString(e.type)));var s=_.is(e.isShellCommand);if(o.isBoolean(e.isShellCommand)||s?r.runtime=c.RuntimeType.Shell:void 0!==e.isShellCommand&&(r.runtime=e.isShellCommand?c.RuntimeType.Shell:c.RuntimeType.Process),void 0!==e.args){r.args=[];for(var u=0,d=e.args;u<d.length;u++){var h=d[u],p=l.from(h);void 0!==p?r.args.push(p):t.problemReporter.error(n.localize(1,null,t.problemReporter.error(n.localize(2,null,h?JSON.stringify(h,void 0,4):"undefined"))))}}void 0!==e.options&&(r.options=C.from(e.options,t),r.options&&void 0===r.options.shell&&s&&(r.options.shell=_.from(e.isShellCommand,t),t.engine!==c.ExecutionEngine.Terminal&&t.problemReporter.warn(n.localize(3,null))));var f=a.from(e,t);return f&&(r.presentation=f),
o.isString(e.taskSelector)&&(r.taskSelector=e.taskSelector),o.isBoolean(e.suppressTaskName)&&(r.suppressTaskName=e.suppressTaskName),i(r)?void 0:r}function i(e){return p(e,u)}function s(e,t){return i(t)?e:i(e)?t:(d(e,t,"name"),d(e,t,"runtime"),d(e,t,"taskSelector"),d(e,t,"suppressTaskName"),void 0!==t.args&&(void 0===e.args?e.args=t.args:e.args=e.args.concat(t.args)),e.presentation=a.assignProperties(e.presentation,t.presentation),e.options=C.assignProperties(e.options,t.options),e)}var a;!function(e){var t=[{property:"echo"},{property:"reveal"},{property:"focus"},{property:"panel"},{property:"showReuseMessage"}];e.from=function(e,t){var n,i,r,s,a;o.isBoolean(e.echoCommand)&&(n=e.echoCommand),o.isString(e.showOutput)&&(i=c.RevealKind.fromString(e.showOutput));var l=e.presentation||e.terminal;if(l&&(o.isBoolean(l.echo)&&(n=l.echo),o.isString(l.reveal)&&(i=c.RevealKind.fromString(l.reveal)),o.isBoolean(l.focus)&&(r=l.focus),o.isString(l.panel)&&(s=c.PanelKind.fromString(l.panel)),
o.isBoolean(l.showReuseMessage)&&(a=l.showReuseMessage)),void 0!==n||void 0!==i||void 0!==r||void 0!==s||void 0!==a)return{echo:n,reveal:i,focus:r,panel:s,showReuseMessage:a}},e.assignProperties=function(e,n){return f(e,n,t)},e.fillProperties=function(e,n){return g(e,n,t)},e.fillDefaults=function(e,n){return v(e,{echo:n.engine===c.ExecutionEngine.Terminal,reveal:c.RevealKind.Always,focus:!1,panel:c.PanelKind.Shared,showReuseMessage:!0},t,n)},e.freeze=function(e){return m(e,t)},e.isEmpty=function(e){return p(e,t)}}(a=e.PresentationOptions||(e.PresentationOptions={}));var l;!function(e){e.from=function(e){if(void 0!==e&&null!==e){if(o.isString(e))return e;if(o.isStringArray(e))return e.join(" ");var t=c.ShellQuoting.from(e.quoting),n=o.isString(e.value)?e.value:o.isStringArray(e.value)?e.value.join(" "):void 0;return n?{value:n,quoting:t}:void 0}}}(l||(l={}));var u=[{property:"runtime"},{property:"name"},{property:"options",type:C},{property:"args"},{property:"taskSelector"},{property:"suppressTaskName"},{
property:"presentation",type:a}];e.from=function(e,n){var o=t(e,n),a=void 0;return e.windows&&n.platform===r.Platform.Windows?a=t(e.windows,n):e.osx&&n.platform===r.Platform.Mac?a=t(e.osx,n):e.linux&&n.platform===r.Platform.Linux&&(a=t(e.linux,n)),a&&(o=s(o,a)),i(o)?void 0:o},e.hasCommand=function(e){return e&&!!e.name},e.isEmpty=i,e.assignProperties=s,e.fillProperties=function(e,t){return g(e,t,u)},e.fillGlobals=function(e,t,n){if(i(t))return e;if(void 0===(e=e||{name:void 0,runtime:void 0,presentation:void 0}).name){h(e,t,"name"),h(e,t,"taskSelector"),h(e,t,"suppressTaskName");var r=t.args?t.args.slice():[];e.suppressTaskName||(void 0!==e.taskSelector?r.push(e.taskSelector+n):r.push(n)),e.args&&(r=r.concat(e.args)),e.args=r}return h(e,t,"runtime"),e.presentation=a.fillProperties(e.presentation,t.presentation),e.options=C.fillProperties(e.options,t.options),e},e.fillDefaults=function(e,t){e&&!Object.isFrozen(e)&&(void 0!==e.name&&void 0===e.runtime&&(e.runtime=c.RuntimeType.Process),
e.presentation=a.fillDefaults(e.presentation,t),i(e)||(e.options=C.fillDefaults(e.options,t)),void 0===e.args&&(e.args=S),void 0===e.suppressTaskName&&(e.suppressTaskName=!1))},e.freeze=function(e){return m(e,u)}}(E||(E={}));var w;!function(e){function t(e,t){var i=[];if(void 0===e)return i;var s=function(e){return o.isString(e)?b.String:o.isArray(e)?b.Array:o.isUndefined(e)?b.Unknown:b.ProblemMatcher}(e);if(s===b.Unknown)return t.problemReporter.warn(n.localize(5,null,JSON.stringify(e,null,4))),i;if(s===b.String||s===b.ProblemMatcher){var a=r(e,t);a&&i.push(a)}else if(s===b.Array){e.forEach(function(e){var n=r(e,t);n&&i.push(n)})}return i}function r(e,t){if(!o.isString(e)){var r=e;return new a.ProblemMatcherParser(t.problemReporter).parse(r)}var s=e;if(s.length>1&&"$"===s[0]){s=s.substring(1);var c=a.ProblemMatcherRegistry.get(s);if(c)return i.deepClone(c);var l=t.namedProblemMatchers[s];if(l)return l=i.deepClone(l),delete l.name,l}t.problemReporter.error(n.localize(6,null,e))}e.namedFrom=function(e,t){
var i=Object.create(null);return o.isArray(e)?(e.forEach(function(e){var r=new a.ProblemMatcherParser(t.problemReporter).parse(e);a.isNamedProblemMatcher(r)?i[r.name]=r:t.problemReporter.error(n.localize(4,null,JSON.stringify(e,void 0,4)))}),i):i},e.from=t}(w||(w={}));var I,T={kind:c.TaskSourceKind.Workspace,label:"Workspace",config:void 0};!function(e){e.from=function(e){if(void 0!==e){if(o.isString(e))return c.TaskGroup.is(e)?[e,c.GroupType.user]:void 0;if(o.isString(e.kind)&&c.TaskGroup.is(e.kind))return[e.kind,e.isDefault?c.GroupType.default:c.GroupType.user]}}}(I||(I={}));var x;!function(e){e.from=function(e,t){return o.isString(e)?{workspaceFolder:t.workspaceFolder,task:e}:y.is(e)?{workspaceFolder:t.workspaceFolder,task:u.TaskDefinition.createTaskIdentifier(e,t.problemReporter)}:void 0}}(x||(x={}));var k;!function(e){function t(e){return p(e,n)}var n=[{property:"name"},{property:"identifier"},{property:"group"},{property:"isBackground"},{property:"promptOnClose"},{property:"dependsOn"},{
property:"presentation",type:E.PresentationOptions},{property:"problemMatchers"}];e.from=function(e,n,i){if(e){var r={};if(o.isString(e.taskName)&&(r.name=e.taskName),o.isString(e.label)&&n.schemaVersion===c.JsonSchemaVersion.V2_0_0&&(r.name=e.label),o.isString(e.identifier)&&(r.identifier=e.identifier),void 0!==e.isBackground&&(r.isBackground=!!e.isBackground),void 0!==e.promptOnClose&&(r.promptOnClose=!!e.promptOnClose),void 0!==e.group)if(o.isString(e.group)&&c.TaskGroup.is(e.group))r.group=e.group,r.groupType=c.GroupType.user;else{var s=I.from(e.group);s&&(r.group=s[0],r.groupType=s[1])}return void 0!==e.dependsOn&&(o.isArray(e.dependsOn)?r.dependsOn=e.dependsOn.map(function(e){return x.from(e,n)}):r.dependsOn=[x.from(e.dependsOn,n)]),!i||void 0===e.presentation&&void 0===e.terminal||(r.presentation=E.PresentationOptions.from(e,n)),i&&void 0!==e.options&&(r.options=C.from(e.options,n)),e.problemMatcher&&(r.problemMatchers=w.from(e.problemMatcher,n)),t(r)?void 0:r}},e.isEmpty=t}(k||(k={}));var D
;!function(e){var t="grunt.",r="jake.",s="gulp.",a="vscode.npm.",c="vscode.typescript.";e.from=function(e,d,h){if(e){var p=e.type,f=e.customize;if(p||f){var g=l.TaskDefinitionRegistry.get(p);if(g){var v;if(o.isString(f)?0===f.indexOf(t)?v={type:"grunt",task:f.substring(t.length)}:0===f.indexOf(r)?v={type:"jake",task:f.substring(r.length)}:0===f.indexOf(s)?v={type:"gulp",task:f.substring(s.length)}:0===f.indexOf(a)?v={type:"npm",script:f.substring(a.length+4)}:0===f.indexOf(c)&&(v={type:"typescript",tsconfig:f.substring(c.length+6)}):o.isString(e.type)&&(v=e),void 0!==v){var m=u.TaskDefinition.createTaskIdentifier(v,d.problemReporter);if(void 0!==m){var y={workspaceFolder:d.workspaceFolder,file:".vscode\\tasks.json",index:h,element:e},b={type:p,configures:m,_id:g.extensionId+"."+m._key,_source:i.assign({},T,{config:y}),_label:void 0},S=k.from(e,d,!0);if(S){if((b=i.assign(b,S)).name)b._label=b.name;else{var _=b.configures.type;if(g.required&&g.required.length>0)for(var C=0,E=g.required;C<E.length;C++){
var w=E[C],I=b.configures[w];if(I){_=_+" "+I;break}}b._label=_}b.identifier||(b.identifier=m._key)}return b}d.problemReporter.error(n.localize(10,null,JSON.stringify(e,void 0,0)))}else d.problemReporter.error(n.localize(9,null,JSON.stringify(e,void 0,0)))}else{var x=n.localize(8,null,p);d.problemReporter.error(x)}}else d.problemReporter.error(n.localize(7,null,JSON.stringify(e,null,4)))}}}(D||(D={}));var A;!function(e){e.from=function(e,t,r){if(e){var s=e.type;if(void 0!==s&&null!==s||(s="custom"),"custom"===s||"shell"===s||"process"===s){var a=e.taskName;if(o.isString(e.label)&&t.schemaVersion===c.JsonSchemaVersion.V2_0_0&&(a=e.label),a){var l={type:"custom",_id:t.uuidMap.getUUID(a),_source:i.assign({},T,{config:{index:r,element:e,file:".vscode\\tasks.json",workspaceFolder:t.workspaceFolder}}),_label:a,name:a,identifier:a,hasDefinedMatchers:!1,command:void 0},u=k.from(e,t,!1);u&&(l=i.assign(l,u));var d=e;void 0===l.isBackground&&void 0!==d.isWatching&&(l.isBackground=!!d.isWatching),
void 0===l.group&&(!0===d.isBuildCommand?l.group=c.TaskGroup.Build:!0===d.isTestCommand&&(l.group=c.TaskGroup.Test));var h=E.from(e,t);return h&&(l.command=h),void 0!==e.command&&(h.suppressTaskName=!0),l}t.problemReporter.error(n.localize(12,null,JSON.stringify(e,null,4)))}else t.problemReporter.error(n.localize(11,null,JSON.stringify(e,null,4)))}},e.fillGlobals=function(e,t){(E.hasCommand(e.command)||void 0===e.dependsOn)&&(e.command=E.fillGlobals(e.command,t.command,e.name)),void 0===e.problemMatchers&&void 0!==t.problemMatcher&&(e.problemMatchers=i.deepClone(t.problemMatcher),e.hasDefinedMatchers=!0),void 0===e.promptOnClose&&void 0===e.isBackground&&void 0!==t.promptOnClose&&(e.promptOnClose=t.promptOnClose)},e.fillDefaults=function(e,t){E.fillDefaults(e.command,t),void 0===e.promptOnClose&&(e.promptOnClose=void 0===e.isBackground||!e.isBackground),void 0===e.isBackground&&(e.isBackground=!1),void 0===e.problemMatchers&&(e.problemMatchers=S),
void 0!==e.group&&void 0===e.groupType&&(e.groupType=c.GroupType.user)},e.createCustomTask=function(e,t){var n={_id:t._id,_source:i.assign({},t._source,{customizes:e.defines}),_label:t.name||e._label,type:"custom",command:e.command,name:t.name||e.name,identifier:t.identifier||e.identifier,hasDefinedMatchers:!1},r=n;d(r,t,"group"),d(r,t,"groupType"),d(r,t,"isBackground"),d(r,t,"dependsOn"),d(r,t,"problemMatchers"),d(r,t,"promptOnClose"),n.command.presentation=E.PresentationOptions.assignProperties(n.command.presentation,t.presentation),n.command.options=C.assignProperties(n.command.options,t.options);var o=e;return h(r,o,"group"),h(r,o,"groupType"),h(r,o,"isBackground"),h(r,o,"dependsOn"),h(r,o,"problemMatchers"),h(r,o,"promptOnClose"),n.command.presentation=E.PresentationOptions.fillProperties(n.command.presentation,o.presentation),n.command.options=C.fillProperties(n.command.options,o.options),!0===e.hasDefinedMatchers&&(n.hasDefinedMatchers=!0),n}}(A||(A={}));var L;!function(e){function t(e){var t=e.type
;return void 0===e.customize&&(void 0===t||null===t||"custom"===t||"shell"===t||"process"===t)}e.from=function(e,i,r){var o={custom:[],configured:[]};if(!e)return o;for(var s={task:void 0,rank:-1},a={task:void 0,rank:-1},l=r.schemaVersion===c.JsonSchemaVersion.V2_0_0,u=0;u<e.length;u++){var d=e[u];if(t(d)){var h=A.from(d,r,u);if(h){if(A.fillGlobals(h,i),A.fillDefaults(h,r),l){if(!(void 0!==h.command&&void 0!==h.command.name||void 0!==h.dependsOn&&0!==h.dependsOn.length)){r.problemReporter.error(n.localize(13,null,h.name,JSON.stringify(d,void 0,4)));continue}}else if(void 0===h.command||void 0===h.command.name){r.problemReporter.warn(n.localize(14,null,h.name,JSON.stringify(d,void 0,4)));continue}h.group===c.TaskGroup.Build&&s.rank<2?(s.task=h,s.rank=2):h.group===c.TaskGroup.Test&&a.rank<2?(a.task=h,a.rank=2):"build"===h.name&&s.rank<1?(s.task=h,s.rank=1):"test"===h.name&&a.rank<1&&(a.task=h,a.rank=1),o.custom.push(h)}}else{var p=D.from(d,r,u);p&&o.configured.push(p)}}
return s.rank>-1&&s.rank<2?(s.task.group=c.TaskGroup.Build,s.task.groupType=c.GroupType.user):a.rank>-1&&a.rank<2&&(a.task.group=c.TaskGroup.Test,a.task.groupType=c.GroupType.user),o},e.assignTasks=function(e,t){if(void 0===t||0===t.length)return e;if(void 0===e||0===e.length)return t;if(t){var n=Object.create(null);e.forEach(function(e){n[e.name]=e}),t.forEach(function(e){n[e.name]=e});var i=[];e.forEach(function(e){i.push(n[e.name]),delete n[e.name]}),Object.keys(n).forEach(function(e){return i.push(n[e])}),e=i}return e}}(L||(L={}));var R;!function(e){function t(e,t){var n={};return void 0!==e.suppressTaskName&&(n.suppressTaskName=!!e.suppressTaskName),void 0!==e.promptOnClose&&(n.promptOnClose=!!e.promptOnClose),e.problemMatcher&&(n.problemMatcher=w.from(e.problemMatcher,t)),n}function n(e){return!e||void 0===e.command&&void 0===e.promptOnClose&&void 0===e.suppressTaskName}e.from=function(n,i){var o=t(n,i),s=void 0
;n.windows&&i.platform===r.Platform.Windows?s=t(n.windows,i):n.osx&&i.platform===r.Platform.Mac?s=t(n.osx,i):n.linux&&i.platform===r.Platform.Linux&&(s=t(n.linux,i)),s&&(o=e.assignProperties(o,s));var a=E.from(n,i);return a&&(o.command=a),e.fillDefaults(o,i),e.freeze(o),o},e.fromBase=t,e.isEmpty=n,e.assignProperties=function(e,t){return n(t)?e:n(e)?t:(d(e,t,"promptOnClose"),d(e,t,"suppressTaskName"),e)},e.fillDefaults=function(e,t){e&&(E.fillDefaults(e.command,t),void 0===e.suppressTaskName&&(e.suppressTaskName=!1),void 0===e.promptOnClose&&(e.promptOnClose=!0))},e.freeze=function(e){Object.freeze(e),e.command&&E.freeze(e.command)}}(R||(R={}));var O;!function(e){e.from=function(e){var t,n=e.runner||e._runner;if(n)switch(n){case"terminal":t=c.ExecutionEngine.Terminal;break;case"process":t=c.ExecutionEngine.Process}var i=M.from(e);if(i===c.JsonSchemaVersion.V0_1_0)return t||c.ExecutionEngine.Process;if(i===c.JsonSchemaVersion.V2_0_0)return c.ExecutionEngine.Terminal;throw new Error("Shouldn't happen.")}
}(O=t.ExecutionEngine||(t.ExecutionEngine={}));var M;!function(e){var t=c.JsonSchemaVersion.V2_0_0;e.from=function(e){var n=e.version;if(!n)return t;switch(n){case"0.1.0":return c.JsonSchemaVersion.V0_1_0;case"2.0.0":return c.JsonSchemaVersion.V2_0_0;default:return t}}}(M=t.JsonSchemaVersion||(t.JsonSchemaVersion={}));var P=function(){function e(e){if(this.current=Object.create(null),e)for(var t=0,n=Object.keys(e.current);t<n.length;t++){var i=n[t],r=e.current[i];Array.isArray(r)?this.current[i]=r.slice():this.current[i]=r}}return e.prototype.start=function(){this.last=this.current,this.current=Object.create(null)},e.prototype.getUUID=function(e){var t,n=this.last[e];void 0!==n&&(Array.isArray(n)?(t=n.shift(),0===n.length&&delete this.last[e]):(t=n,delete this.last[e])),void 0===t&&(t=s.generateUuid());var i=this.current[e];if(void 0===i)this.current[e]=t;else if(Array.isArray(i))i.push(t);else{var r=[i];r.push(t),this.current[e]=r}return t},e.prototype.finish=function(){this.last=void 0},e}(),N=function(){
function e(e,t,n,i){this.workspaceFolder=e,this.platform=t,this.problemReporter=n,this.uuidMap=i}return e.prototype.run=function(e){var t=O.from(e),n=M.from(e),i={workspaceFolder:this.workspaceFolder,problemReporter:this.problemReporter,uuidMap:this.uuidMap,namedProblemMatchers:void 0,engine:t,schemaVersion:n,platform:this.platform},r=this.createTaskRunnerConfiguration(e,i);return{validationStatus:this.problemReporter.status,custom:r.custom,configured:r.configured,engine:t}},e.prototype.createTaskRunnerConfiguration=function(e,t){var o=R.from(e,t);if(this.problemReporter.status.isFatal())return{custom:[],configured:[]};t.namedProblemMatchers=w.namedFrom(e.declares,t);var s,a;if(e.windows&&t.platform===r.Platform.Windows?(s=L.from(e.windows.tasks,o,t).custom,a=e.windows.tasks):e.osx&&t.platform===r.Platform.Mac?(s=L.from(e.osx.tasks,o,t).custom,a=e.osx.tasks):e.linux&&t.platform===r.Platform.Linux&&(s=L.from(e.linux.tasks,o,t).custom,a=e.linux.tasks),
t.schemaVersion===c.JsonSchemaVersion.V2_0_0&&s&&s.length>0&&a&&a.length>0){for(var l=[],u=0,d=a;u<d.length;u++){v=d[u];l.push(JSON.stringify(v,null,4))}t.problemReporter.error(n.localize(15,null,l.join("\n")))}var h={custom:void 0,configured:void 0};if(e.tasks&&(h=L.from(e.tasks,o,t)),s&&(h.custom=L.assignTasks(h.custom,s)),(!h.custom||0===h.custom.length)&&o.command&&o.command.name){var p=w.from(e.problemMatcher,t),f=e.isBackground?!!e.isBackground:e.isWatching?!!e.isWatching:void 0,g=c.CommandString.value(o.command.name),v={_id:t.uuidMap.getUUID(g),_source:i.assign({},T,{config:{index:-1,element:e,workspaceFolder:t.workspaceFolder}}),_label:g,type:"custom",name:g,identifier:g,group:c.TaskGroup.Build,command:{name:void 0,runtime:void 0,presentation:void 0,suppressTaskName:!0},isBackground:f,problemMatchers:p,hasDefinedMatchers:!1},m=I.from(e.group);m?(v.group=m[0],v.groupType=m[1]):"none"===e.group&&(v.group=void 0),A.fillGlobals(v,o),A.fillDefaults(v,t),h.custom=[v]}return h.custom=h.custom||[],
h.configured=h.configured||[],h},e}(),F=new Map;t.parse=function(e,t,n,i){var r=F.get(e.uri.toString());r||(r=new P,F.set(e.uri.toString(),r));try{return r.start(),new N(e,t,i,r).run(n)}finally{r.finish()}},t.createCustomTask=function(e,t){return A.createCustomTask(e,t)}}),define(e[1256],t([1,0,726,24,25,14,361,224,27,154,441]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e){this.regexp=e}return e.prototype.init=function(){},e.prototype.match=function(e,t){var n=this.regexp.exec(t);n&&n.length>0&&e.push(n[1])},e}(),h=function(){function e(){}return e.prototype.init=function(){this.tasksStart=!1,this.tasksEnd=!1,this.descriptionOffset=null},e.prototype.match=function(e,t){if(this.tasksStart||this.tasksEnd){if(this.tasksStart&&!this.tasksEnd)if(0===t.indexOf("Tasks run in the order specified"))this.tasksEnd=!0;else{null===this.descriptionOffset&&(this.descriptionOffset=t.match(/\S  \S/).index+1)
;var n=t.substr(0,this.descriptionOffset).trim();n.length>0&&e.push(n)}}else 0===t.indexOf("Available tasks")&&(this.tasksStart=!0)},e}(),p=function(){function e(e,t,n,i,o){void 0===o&&(o=null),this.fileService=t,this.contextService=n,this.configurationResolverService=i,this.taskConfiguration=o,this._workspaceRoot=e,this._stderr=[],this._stdout=[],this._cwd=this.contextService.getWorkbenchState()!==c.WorkbenchState.EMPTY?r.normalize(this._workspaceRoot.uri.fsPath,!0):""}return e.supports=function(t){return e.SupportedRunners[t]},e.detectorConfig=function(t){return e.TaskMatchers[t]},Object.defineProperty(e.prototype,"stderr",{get:function(){return this._stderr},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stdout",{get:function(){return this._stdout},enumerable:!0,configurable:!0}),e.prototype.detect=function(t,n){var i=this;void 0===t&&(t=!1);var r=u.CommandString.value(this.taskConfiguration.command);if(this.taskConfiguration&&this.taskConfiguration.command&&e.supports(r)){
var o=e.detectorConfig(r),s=(this.taskConfiguration.args||[]).concat(o.arg),c=this.taskConfiguration.options?this.resolveCommandOptions(this._workspaceRoot,this.taskConfiguration.options):{cwd:this._cwd},l=!!this.taskConfiguration.isShellCommand;return this.runDetection(new a.LineProcess(r,this.configurationResolverService.resolve(this._workspaceRoot,s.map(function(e){return u.CommandString.value(e)})),l,c),r,l,o.matcher,e.DefaultProblemMatchers,t)}if(n){var d=void 0;return"gulp"===n?d=this.tryDetectGulp(this._workspaceRoot,t):"jake"===n?d=this.tryDetectJake(this._workspaceRoot,t):"grunt"===n&&(d=this.tryDetectGrunt(this._workspaceRoot,t)),d.then(function(e){return e||{config:null,stdout:i.stdout,stderr:i.stderr}})}return this.tryDetectGulp(this._workspaceRoot,t).then(function(e){return e||i.tryDetectJake(i._workspaceRoot,t).then(function(e){return e||i.tryDetectGrunt(i._workspaceRoot,t).then(function(e){return e||{config:null,stdout:i.stdout,stderr:i.stderr}})})})},
e.prototype.resolveCommandOptions=function(e,t){var n=i.deepClone(t);return n.cwd&&(n.cwd=this.configurationResolverService.resolve(e,n.cwd)),n.env&&(n.env=this.configurationResolverService.resolve(e,n.env)),n},e.prototype.tryDetectGulp=function(t,n){var i=this;return this.fileService.resolveFile(t.toResource("gulpfile.js")).then(function(t){var r=e.detectorConfig("gulp"),o=new a.LineProcess("gulp",[r.arg,"--no-color"],!0,{cwd:i._cwd});return i.runDetection(o,"gulp",!0,r.matcher,e.DefaultProblemMatchers,n)},function(e){return null})},e.prototype.tryDetectGrunt=function(t,n){var i=this;return this.fileService.resolveFile(t.toResource("Gruntfile.js")).then(function(t){var r=e.detectorConfig("grunt"),o=new a.LineProcess("grunt",[r.arg,"--no-color"],!0,{cwd:i._cwd});return i.runDetection(o,"grunt",!0,r.matcher,e.DefaultProblemMatchers,n)},function(e){return null})},e.prototype.tryDetectJake=function(t,n){var i=this,r=function(){var t=e.detectorConfig("jake"),r=new a.LineProcess("jake",[t.arg],!0,{cwd:i._cwd})
;return i.runDetection(r,"jake",!0,t.matcher,e.DefaultProblemMatchers,n)};return this.fileService.resolveFile(t.toResource("Jakefile")).then(function(e){return r()},function(e){return i.fileService.resolveFile(t.toResource("Jakefile.js")).then(function(e){return r()},function(e){return null})})},e.prototype.runDetection=function(t,i,r,a,c,l){var u=this,d=[];return a.init(),t.start().then(function(t){if(0===d.length)return 0!==t.cmdCode&&("gulp"===i?u._stderr.push(n.localize(0,null)):"jake"===i&&u._stderr.push(n.localize(1,null))),{config:null,stdout:u._stdout,stderr:u._stderr};var o={version:e.Version,command:i,isShellCommand:r};return"gulp"===i&&(o.args=["--no-color"]),o.tasks=u.createTaskDescriptions(d,c,l),{config:o,stdout:u._stdout,stderr:u._stderr}},function(e){var t=e.error;return"ENOENT"===t.code?"gulp"===i?u._stderr.push(n.localize(2,null)):"jake"===i?u._stderr.push(n.localize(3,null)):"grunt"===i&&u._stderr.push(n.localize(4,null)):u._stderr.push(n.localize(5,null,i,t.message)),{config:null,
stdout:u._stdout,stderr:u._stderr}},function(e){if(e.source!==s.Source.stderr){var t=o.removeAnsiEscapeCodes(e.line),n=a.match(d,t);n&&n.length>0&&d.push(n[1])}else u._stderr.push(e.line)})},e.prototype.createTaskDescriptions=function(e,t,i){var r=this,o=[];if(i)e.forEach(function(e){o.push({taskName:e,args:[]})});else{var s={build:{index:-1,exact:-1},test:{index:-1,exact:-1}};if(e.forEach(function(e,t){r.testBuild(s.build,e,t),r.testTest(s.test,e,t)}),-1!==s.build.index){var a=e[s.build.index];this._stdout.push(n.localize(6,null,a)),o.push({taskName:a,args:[],group:l.TaskGroup.Build,problemMatcher:t})}if(-1!==s.test.index){var c=e[s.test.index];this._stdout.push(n.localize(7,null,c)),o.push({taskName:c,args:[],group:l.TaskGroup.Test})}}return o},e.prototype.testBuild=function(e,t,n){"build"===t?(e.index=n,e.exact=4):(o.startsWith(t,"build")||o.endsWith(t,"build"))&&e.exact<4?(e.index=n,e.exact=3):-1!==t.indexOf("build")&&e.exact<3?(e.index=n,e.exact=2):"default"===t&&e.exact<2&&(e.index=n,e.exact=1)},
e.prototype.testTest=function(e,t,n){"test"===t?(e.index=n,e.exact=3):(o.startsWith(t,"test")||o.endsWith(t,"test"))&&e.exact<3?(e.index=n,e.exact=2):-1!==t.indexOf("test")&&e.exact<2&&(e.index=n,e.exact=1)},e.Version="0.1.0",e.SupportedRunners={gulp:!0,jake:!0,grunt:!0},e.TaskMatchers={gulp:{matcher:new d(/^(.*)$/),arg:"--tasks-simple"},jake:{matcher:new d(/^jake\s+([^\s]+)\s/),arg:"--tasks"},grunt:{matcher:new h,arg:"--help"}},e.DefaultProblemMatchers=["$lessCompile","$tsc","$jshint"],e}();t.ProcessRunnerDetector=p}),define(e[1257],t([1,0,754,14,70,113,102,15,31]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l;!function(e){function t(e,t){return e?i.isFalsyOrWhitespace(e.command)?(t.error(n.localize(24,null,"command")),!1):!!r(e.title,t,"title")&&(!(e.category&&!r(e.category,t,"category"))&&!!function(e,t){if(void 0===e)return!0;if("string"==typeof e)return!0;if("string"==typeof e.dark&&"string"==typeof e.light)return!0;return t.error(n.localize(25,null)),!1
}(e.icon,t)):(t.error(n.localize(23,null)),!1)}function r(e,t,r){return void 0===e?(t.error(n.localize(26,null,r)),!1):"string"==typeof e&&i.isFalsyOrWhitespace(e)?(t.error(n.localize(27,null,r)),!1):"string"==typeof e||!i.isFalsyOrWhitespace(e.original)&&!i.isFalsyOrWhitespace(e.value)||(t.error(n.localize(28,null,r+".value",r+".original")),!1)}e.parseMenuId=function(e){switch(e){case"commandPalette":return c.MenuId.CommandPalette;case"touchBar":return c.MenuId.TouchBarContext;case"editor/title":return c.MenuId.EditorTitle;case"editor/context":return c.MenuId.EditorContext;case"explorer/context":return c.MenuId.ExplorerContext;case"editor/title/context":return c.MenuId.EditorTitleContext;case"debug/callstack/context":return c.MenuId.DebugCallStackContext;case"scm/title":return c.MenuId.SCMTitle;case"scm/sourceControl":return c.MenuId.SCMSourceControl;case"scm/resourceGroup/context":return c.MenuId.SCMResourceGroupContext;case"scm/resourceState/context":return c.MenuId.SCMResourceContext
;case"scm/change/title":return c.MenuId.SCMChangeContext;case"view/title":return c.MenuId.ViewTitle;case"view/item/context":return c.MenuId.ViewItemContext}},e.isValidMenuItems=function(e,t){if(!Array.isArray(e))return t.error(n.localize(0,null)),!1;for(var i=0,r=e;i<r.length;i++){var o=r[i];if("string"!=typeof o.command)return t.error(n.localize(1,null,"command")),!1;if(o.alt&&"string"!=typeof o.alt)return t.error(n.localize(2,null,"alt")),!1;if(o.when&&"string"!=typeof o.when)return t.error(n.localize(3,null,"when")),!1;if(o.group&&"string"!=typeof o.group)return t.error(n.localize(4,null,"group")),!1}return!0};var o={type:"object",properties:{command:{description:n.localize(5,null),type:"string"},alt:{description:n.localize(6,null),type:"string"},when:{description:n.localize(7,null),type:"string"},group:{description:n.localize(8,null),type:"string"}}};e.menusContribtion={description:n.localize(9,null),type:"object",properties:{commandPalette:{description:n.localize(10,null),type:"array",items:o},touchBar:{
description:n.localize(11,null),type:"array",items:o},"editor/title":{description:n.localize(12,null),type:"array",items:o},"editor/context":{description:n.localize(13,null),type:"array",items:o},"explorer/context":{description:n.localize(14,null),type:"array",items:o},"editor/title/context":{description:n.localize(15,null),type:"array",items:o},"debug/callstack/context":{description:n.localize(16,null),type:"array",items:o},"scm/title":{description:n.localize(17,null),type:"array",items:o},"scm/sourceControl":{description:n.localize(18,null),type:"array",items:o},"scm/resourceGroup/context":{description:n.localize(19,null),type:"array",items:o},"scm/resourceState/context":{description:n.localize(20,null),type:"array",items:o},"view/title":{description:n.localize(21,null),type:"array",items:o},"view/item/context":{description:n.localize(22,null),type:"array",items:o}}},e.isValidCommand=t;var s={type:"object",properties:{command:{description:n.localize(29,null),type:"string"},title:{
description:n.localize(30,null),type:"string"},category:{description:n.localize(31,null),type:"string"},icon:{description:n.localize(32,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:n.localize(33,null),type:"string"},dark:{description:n.localize(34,null),type:"string"}}}]}}};e.commandsContribution={description:n.localize(35,null),oneOf:[s,{type:"array",items:s}]}}(l||(l={})),s.ExtensionsRegistry.registerExtensionPoint("commands",[],l.commandsContribution).setHandler(function(e){function t(e,t){if(l.isValidCommand(e,t.collector)){var i,o=e.icon,s=e.category,a=e.title,u=e.command;o&&(i="string"==typeof o?{dark:r.joinPath(t.description.extensionLocation,o)}:{dark:r.joinPath(t.description.extensionLocation,o.dark),light:r.joinPath(t.description.extensionLocation,o.light)}),c.MenuRegistry.addCommand({id:u,title:a,category:s,iconLocation:i})&&t.collector.info(n.localize(36,null,e.command))}}for(var i=0,o=e;i<o.length;i++){var s=o[i],a=s.value
;if(Array.isArray(a))for(var u=0,d=a;u<d.length;u++){t(d[u],s)}else t(a,s)}}),s.ExtensionsRegistry.registerExtensionPoint("menus",[],l.menusContribtion).setHandler(function(e){for(var t=function(e){var t=e.value,i=e.collector;o.forEach(t,function(e){if(l.isValidMenuItems(e.value,i)){var t=l.parseMenuId(e.key);if(t)for(var r=0,o=e.value;r<o.length;r++){var s=o[r],u=c.MenuRegistry.getCommand(s.command),d=s.alt&&c.MenuRegistry.getCommand(s.alt);if(u){s.alt&&!d&&i.warn(n.localize(39,null,s.alt)),s.command===s.alt&&i.info(n.localize(40,null));var h=void 0,p=void 0;if(s.group){var f=s.group.lastIndexOf("@");f>0?(h=s.group.substr(0,f),p=Number(s.group.substr(f+1))||void 0):h=s.group}c.MenuRegistry.appendMenuItem(t,{command:u,alt:d,group:h,order:p,when:a.ContextKeyExpr.deserialize(s.when)})}else i.error(n.localize(38,null,s.command))}else i.warn(n.localize(37,null,e.key))}})},i=0,r=e;i<r.length;i++){t(r[i])}})}),define(e[1258],t([1,0,756,24,16,102,63,120,95,30]),function(e,t,n,i,r,o,s,a,c,l){"use strict"
;function u(e,t){var i=e.properties;if(i){"object"!=typeof i&&(t.collector.error(n.localize(9,null)),e.properties={});for(var r in i){var o=s.validateProperty(r);if(o)delete i[r],t.collector.warn(o);else{var a=e.properties[r];l.isObject(a)?(a.scope?"application"===a.scope.toString()?a.scope=s.ConfigurationScope.APPLICATION:"resource"===a.scope.toString()?a.scope=s.ConfigurationScope.RESOURCE:a.scope=s.ConfigurationScope.WINDOW:a.scope=s.ConfigurationScope.WINDOW,a.notMultiRootAdopted=!(t.description.isBuiltin||Array.isArray(t.description.keywords)&&-1!==t.description.keywords.indexOf("multi-root ready"))):(delete i[r],t.collector.error(n.localize(10,null)))}}}var c=e.allOf;if(c){t.collector.error(n.localize(11,null));for(var d=0,h=c;d<h.length;d++){u(h[d],t)}}}Object.defineProperty(t,"__esModule",{value:!0});var d=r.Registry.as(s.Extensions.Configuration),h={type:"object",defaultSnippets:[{body:{title:"",properties:{}}}],properties:{title:{description:n.localize(0,null),type:"string"},properties:{
description:n.localize(1,null),type:"object",additionalProperties:{anyOf:[{$ref:"http://json-schema.org/draft-04/schema#"},{type:"object",properties:{isExecutable:{type:"boolean",deprecationMessage:"This property is deprecated. Instead use `scope` property and set it to `application` value."},scope:{type:"string",enum:["application","window","resource"],default:"window",enumDescriptions:[n.localize(2,null),n.localize(3,null),n.localize(4,null)],description:n.localize(5,null)}}}]}}}},p=[],f=o.ExtensionsRegistry.registerExtensionPoint("configurationDefaults",[],{description:n.localize(6,null),type:"object",defaultSnippets:[{body:{}}],patternProperties:{"\\[.*\\]$":{type:"object",default:{},$ref:s.editorConfigurationSchemaId}}});f.setHandler(function(e){p=e.map(function(e){return{id:e.description.id,name:e.description.name,defaults:i.deepClone(e.value)}})});o.ExtensionsRegistry.registerExtensionPoint("configuration",[f],{description:n.localize(7,null),oneOf:[h,{type:"array",items:h}]}).setHandler(function(e){
function t(e,t){var o=i.deepClone(e);o.title&&"string"!=typeof o.title&&t.collector.error(n.localize(8,null)),u(o,t),o.id=e.id||t.description.uuid||t.description.id,o.contributedByExtension=!0,o.title=o.title||t.description.displayName||t.description.id,r.push(o)}for(var r=[],o=function(e){var n=e.value;Array.isArray(n)?n.forEach(function(n){return t(n,e)}):t(n,e)},s=0,a=e;s<a.length;s++){o(a[s])}d.registerConfigurations(r,p,!1)});r.Registry.as(a.Extensions.JSONContribution).registerSchema("vscode://schemas/workspaceConfig",{allowComments:!0,default:{folders:[{path:""}],settings:{}},required:["folders"],properties:{folders:{minItems:0,uniqueItems:!0,description:n.localize(12,null),items:{type:"object",default:{path:""},oneOf:[{properties:{path:{type:"string",description:n.localize(13,null)},name:{type:"string",description:n.localize(14,null)}},required:["path"]},{properties:{uri:{type:"string",description:n.localize(15,null)},name:{type:"string",description:n.localize(16,null)}},required:["uri"]}]}},
settings:{type:"object",default:{},description:n.localize(17,null),$ref:c.workspaceSettingsSchemaId},launch:{type:"object",default:{configurations:[],compounds:[]},description:n.localize(18,null),$ref:c.launchSchemaId},extensions:{type:"object",default:{},description:n.localize(19,null),$ref:"vscode://schemas/extensions"}},additionalProperties:!1,errorMessage:n.localize(20,null)})}),define(e[1259],t([1,0,767,126,24,10,4,11,486,38,42,27,28,156,103,76,36,463,289,7,95,417,263,25,461,5,348,63,77,22]),function(e,t,n,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var O=function(){function t(e,t,n,i,r,o,s,a,c,l,u,d){var h=this;this._extensions=e,this._contextService=t,this._notificationService=n,this._windowsService=i,this._windowService=r,this._broadcastService=o,this._lifecycleService=s,this._environmentService=a,this._configurationService=c,this._telemetryService=l,this._crashReporterService=u,this._logService=d,this._onCrashed=new C.Emitter,
this.onCrashed=this._onCrashed.event,this._isExtensionDevHost=this._environmentService.isExtensionDevelopment,this._isExtensionDevDebug="number"==typeof this._environmentService.debugExtensionHost.port,this._isExtensionDevDebugBrk=!!this._environmentService.debugExtensionHost.break,this._isExtensionDevTestFromCli=this._isExtensionDevHost&&!!this._environmentService.extensionTestsPath&&!this._environmentService.debugExtensionHost.break,this._lastExtensionHostError=null,this._terminating=!1,this._namedPipeServer=null,this._extensionHostProcess=null,this._extensionHostConnection=null,this._messageProtocol=null,this._toDispose=[],this._toDispose.push(this._onCrashed),this._toDispose.push(this._lifecycleService.onWillShutdown(function(e){return h._onWillShutdown(e)})),this._toDispose.push(this._lifecycleService.onShutdown(function(e){return h.terminate()})),this._toDispose.push(this._broadcastService.onBroadcast(function(e){return h._onBroadcast(e)}));var p=function(){return h.terminate()};process.once("exit",p),
this._toDispose.push({dispose:function(){process.removeListener("exit",p)}})}return t.prototype.dispose=function(){this.terminate()},t.prototype._onBroadcast=function(e){var t=this;if(e.channel===x.EXTENSION_CLOSE_EXTHOST_BROADCAST_CHANNEL&&this._isExtensionDevHost){n=e.payload;Array.isArray(n)&&n.some(function(e){return T.isEqual(t._environmentService.extensionDevelopmentPath,e,!u.isLinux)})&&this._windowService.closeWindow()}if(e.channel===x.EXTENSION_RELOAD_BROADCAST_CHANNEL&&this._isExtensionDevHost){var n=e.payload;Array.isArray(n)&&n.some(function(e){return T.isEqual(t._environmentService.extensionDevelopmentPath,e,!u.isLinux)})&&this._windowService.reloadWindow()}},t.prototype.start=function(){var t=this;return this._terminating?null:(this._messageProtocol||(this._messageProtocol=s.TPromise.join([this._tryListenOnPipe(),this._tryFindDebugPort()]).then(function(i){var s=i[0],a=i[1],c={env:r.mixin(r.deepClone(process.env),{AMD_ENTRYPOINT:"vs/workbench/node/extensionHostProcess",PIPE_LOGGING:"true",
VERBOSE_LOGGING:!0,VSCODE_IPC_HOOK_EXTHOST:s,VSCODE_HANDLES_UNCAUGHT_ERRORS:!0,VSCODE_LOG_STACK:!t._isExtensionDevTestFromCli&&(t._isExtensionDevHost||!t._environmentService.isBuilt||"stable"!==y.default.quality||t._environmentService.verbose)}),detached:!!u.isWindows,execArgv:void 0,silent:!0};a.actual&&(c.execArgv=["--nolazy",(t._isExtensionDevDebugBrk?"--inspect-brk=":"--inspect=")+a.actual],a.expected||(c.env.VSCODE_PREVENT_FOREIGN_INSPECT=!0));var l=t._crashReporterService.getChildProcessStartOptions("extensionHost");l&&(c.env.CRASH_REPORTER_START_OPTIONS=JSON.stringify(l)),t._extensionHostProcess=v.fork(o.default.parse(e.toUrl("bootstrap")).fsPath,["--type=extensionHost"],c),t._extensionHostProcess.stdout.setEncoding("utf8"),t._extensionHostProcess.stderr.setEncoding("utf8");var d=C.fromNodeEventEmitter(t._extensionHostProcess.stdout,"data"),h=C.fromNodeEventEmitter(t._extensionHostProcess.stderr,"data"),p=C.anyEvent(C.mapEvent(d,function(e){return{data:"%c"+e,format:[""]}}),C.mapEvent(h,function(e){
return{data:"%c"+e,format:["color: red"]}}));C.debounceEvent(p,function(e,t){return e?{data:e.data+t.data,format:e.format.concat(t.format)}:{data:t.data,format:t.format}},100)(function(e){var n=!t._environmentService.isBuilt&&e.data&&e.data.indexOf("chrome-devtools://");n>=0?console.log("%c[Extension Host] %cdebugger inspector at "+e.data.substr(n),"color: blue","color: black"):(console.group("Extension Host"),console.log.apply(console,[e.data].concat(e.format)),console.groupEnd())}),t._extensionHostProcess.on("message",function(e){e&&"__$console"===e.type&&t._logExtensionHostMessage(e)}),t._extensionHostProcess.on("error",function(e){return t._onExtHostProcessError(e)}),t._extensionHostProcess.on("exit",function(e,n){return t._onExtHostProcessExit(e,n)}),t._isExtensionDevHost&&a.actual&&t._broadcastService.broadcast({channel:x.EXTENSION_ATTACH_BROADCAST_CHANNEL,payload:{debugId:t._environmentService.debugExtensionHost.debugId,port:a.actual}}),t._inspectPort=a.actual;var f
;return t._environmentService.isBuilt&&!t._isExtensionDevHost||(f=setTimeout(function(){var e=t._isExtensionDevDebugBrk?n.localize(0,null):n.localize(1,null);t._notificationService.prompt(R.Severity.Warning,e,[{label:n.localize(2,null),run:function(){return t._windowService.reloadWindow()}}])},1e4)),t._tryExtHostHandshake().then(function(e){return clearTimeout(f),e})})),this._messageProtocol)},t.prototype._tryListenOnPipe=function(){var e=this;return new s.TPromise(function(t,n){var i=S.generateRandomPipeName();e._namedPipeServer=_.createServer(),e._namedPipeServer.on("error",n),e._namedPipeServer.listen(i,function(){e._namedPipeServer.removeListener("error",n),t(i)})})},t.prototype._tryFindDebugPort=function(){var e,t=this,n=9333;return"number"!=typeof this._environmentService.debugExtensionHost.port?s.TPromise.as({expected:void 0,actual:0}):(n=e=this._environmentService.debugExtensionHost.port,new s.TPromise(function(i,r){return d.findFreePort(n,10,5e3).then(function(n){
return n?(e&&n!==e&&console.warn("%c[Extension Host] %cProvided debugging port "+e+" is not free, using "+n+" instead.","color: blue","color: black"),t._isExtensionDevDebugBrk?console.warn("%c[Extension Host] %cSTOPPED on first line for debugging on port "+n,"color: blue","color: black"):console.info("%c[Extension Host] %cdebugger listening on port "+n,"color: blue","color: black")):console.warn("%c[Extension Host] %cCould not find a free port for debugging","color: blue","color: black"),i({expected:e,actual:n})})}))},t.prototype._tryExtHostHandshake=function(){var e=this;return new s.TPromise(function(t,n){var i=setTimeout(function(){e._namedPipeServer.close(),e._namedPipeServer=null,n("timeout")},6e4);e._namedPipeServer.on("connection",function(n){clearTimeout(i),e._namedPipeServer.close(),e._namedPipeServer=null,e._extensionHostConnection=n,t(new S.Protocol(e._extensionHostConnection))})}).then(function(t){return new s.TPromise(function(n,i){var r=setTimeout(function(){i("timeout")
},6e4),o=t.onMessage(function(i){if("ready"!==i)return"initialized"===i?(clearTimeout(r),o.dispose(),void n(t)):void console.error("received unexpected message during handshake phase from the extension host: ",i);e._createExtHostInitData().then(function(e){return t.send(JSON.stringify(e))})})})})},t.prototype._createExtHostInitData=function(){var e=this;return s.TPromise.join([this._telemetryService.getTelemetryInfo(),this._extensions]).then(function(t){var n=t[0],i=t[1],r=c({},e._configurationService.getConfigurationData(),{configurationScopes:{}});return{parentPid:process.pid,environment:{isExtensionDevelopmentDebug:e._isExtensionDevDebug,appRoot:e._environmentService.appRoot,appSettingsHome:e._environmentService.appSettingsHome,disableExtensions:e._environmentService.disableExtensions,extensionDevelopmentPath:e._environmentService.extensionDevelopmentPath,extensionTestsPath:e._environmentService.extensionTestsPath},
workspace:e._contextService.getWorkbenchState()===f.WorkbenchState.EMPTY?null:e._contextService.getWorkspace(),extensions:i,configuration:!e._environmentService.isBuilt||e._environmentService.isExtensionDevelopment?c({},r,{configurationScopes:A.getScopes()}):r,telemetryInfo:n,windowId:e._windowService.getCurrentWindowId(),logLevel:e._logService.getLevel(),logsPath:e._environmentService.logsPath}})},t.prototype._logExtensionHostMessage=function(e){var t;this._isExtensionDevTestFromCli||D.log(e,"Extension Host"),this._isExtensionDevTestFromCli?(t=this._windowsService).log.apply(t,[e.severity].concat(D.parse(e).args)):this._environmentService.isBuilt&&!this._isExtensionDevHost||this._broadcastService.broadcast({channel:x.EXTENSION_LOG_BROADCAST_CHANNEL,payload:{logEntry:e,debugId:this._environmentService.debugExtensionHost.debugId}})},t.prototype._onExtHostProcessError=function(e){var t=i.toErrorMessage(e);t!==this._lastExtensionHostError&&(this._lastExtensionHostError=t,
this._notificationService.error(n.localize(3,null,t)))},t.prototype._onExtHostProcessExit=function(e,t){this._terminating||(this._isExtensionDevHost?this._isExtensionDevTestFromCli?m.ipcRenderer.send("vscode:exit",e):this._windowService.closeWindow():this._onCrashed.fire([e,t]))},t.prototype.getInspectPort=function(){return this._inspectPort},t.prototype.terminate=function(){var e=this;this._terminating||(this._terminating=!0,k.dispose(this._toDispose),this._messageProtocol&&this._messageProtocol.then(function(t){t.send({type:"__$terminate"}),setTimeout(function(){return e._cleanResources()},6e4)},function(t){e._cleanResources()}))},t.prototype._cleanResources=function(){this._namedPipeServer&&(this._namedPipeServer.close(),this._namedPipeServer=null),this._extensionHostConnection&&(this._extensionHostConnection.end(),this._extensionHostConnection=null),this._extensionHostProcess&&(this._extensionHostProcess.kill(),this._extensionHostProcess=null)},t.prototype._onWillShutdown=function(e){
!this._isExtensionDevHost||this._isExtensionDevTestFromCli||this._isExtensionDevDebug||(this._broadcastService.broadcast({channel:x.EXTENSION_TERMINATE_BROADCAST_CHANNEL,payload:{debugId:this._environmentService.debugExtensionHost.debugId}}),e.veto(s.TPromise.timeout(100).then(function(){return!1})))},t=a([l(1,f.IWorkspaceContextService),l(2,R.INotificationService),l(3,p.IWindowsService),l(4,p.IWindowService),l(5,I.IBroadcastService),l(6,h.ILifecycleService),l(7,b.IEnvironmentService),l(8,E.IWorkspaceConfigurationService),l(9,g.ITelemetryService),l(10,w.ICrashReporterService),l(11,L.ILogService)],t)}();t.ExtensionHostProcessWorker=O}),define(e[1260],t([1,0,49,4,50,166]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function t(e,t){this._port=e,this._extensionService=t}return t.prototype.start=function(){var t=this;return i.TPromise.wrap(new Promise(function(t,n){e(["v8-inspect-profiler"],t,n)})).then(function(e){return e.startProfiling({port:t._port
}).then(function(e){return{stop:function(){return i.TPromise.wrap(e.stop()).then(function(e){return t._extensionService.getExtensions().then(function(n){return t.distill(e.profile,n)})})}}})})},t.prototype.distill=function(e,t){function n(e,t){if(t){if("self"===t&&e.callFrame.url){var r=i.findSubstr(e.callFrame.url);r&&(t=r.id)}}else switch(e.callFrame.functionName){case"(root)":break;case"(program)":t="program";break;case"(garbage collector)":t="gc";break;default:t="self"}if(d.set(e.id,t),e.children)for(var o=0,s=e.children;o<s.length;o++){var a=s[o];n(u.get(a),t)}}for(var i=r.TernarySearchTree.forPaths(),s=0,a=t;s<a.length;s++){var c=a[s];i.set(o.realpathSync(c.extensionLocation.fsPath),c)}for(var l=e.nodes,u=new Map,d=new Map,h=0,p=l;h<p.length;h++){var f=p[h];u.set(f.id,f)}n(l[0],null);for(var g=e.samples,v=e.timeDeltas,m=[],y=[],b=0,S=void 0,_=0;_<g.length;_++){var C=g[_],E=d.get(C);E!==S&&(S&&(y.push(S),m.push(b)),S=E,b=0),b+=v[_]}return S&&(y.push(S),m.push(b)),u=null,d=null,i=null,{
startTime:e.startTime,endTime:e.endTime,deltas:m,ids:y,data:e,getAggregatedTimes:function(){for(var e=new Map,t=0;t<y.length;t++){var n=y[t];e.set(n,(e.get(n)||0)+m[t])}return e}}},t=a([l(1,n.IExtensionService)],t)}();t.ExtensionHostProfiler=s}),define(e[1261],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.hasOwnProperty,i=function(){function e(e){this._extensionsMap={},this._extensionsArr=[],this._activationMap={};for(var t=0,i=e.length;t<i;t++){var r=e[t];if(n.call(this._extensionsMap,r.id))console.error("Extension `"+r.id+"` is already registered");else if(this._extensionsMap[r.id]=r,this._extensionsArr.push(r),Array.isArray(r.activationEvents))for(var o=0,s=r.activationEvents.length;o<s;o++){var a=r.activationEvents[o];"onUri"===a&&(a="onUri:"+r.id),this._activationMap[a]=this._activationMap[a]||[],this._activationMap[a].push(r)}}}return e.prototype.containsActivationEvent=function(e){return n.call(this._activationMap,e)},
e.prototype.getExtensionDescriptionsForActivationEvent=function(e){return n.call(this._activationMap,e)?this._activationMap[e].slice(0):[]},e.prototype.getAllExtensionDescriptions=function(){return this._extensionsArr.slice(0)},e.prototype.getExtensionDescription=function(e){return n.call(this._extensionsMap,e)?this._extensionsMap[e]:null},e}();t.ExtensionDescriptionRegistry=i}),define(e[442],t([1,0,10,43]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.extensionManagementServers=[{extensionManagementService:e,location:n.default.from({scheme:i.Schemas.file})}]}return e.prototype.getExtensionManagementServer=function(e){return this.extensionManagementServers[0]},e.prototype.getDefaultExtensionManagementServer=function(){return this.extensionManagementServers[0]},e}();t.ExtensionManagementServerService=r;var o=function(){function e(e){this.extensionManagementServers=[e]}return e.prototype.getExtensionManagementServer=function(e){
return e=e.scheme===i.Schemas.file?n.default.from({scheme:i.Schemas.file}):e,this.extensionManagementServers.filter(function(t){return e.authority===t.location.authority})[0]},e.prototype.getDefaultExtensionManagementServer=function(){return this.extensionManagementServers[0]},e}();t.SingleServerExtensionManagementServerService=o}),define(e[1263],t([1,0,769,87,4,59,89,30,454,236,336,345,123,10]),function(e,t,i,r,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m,y="package.json";!function(e){e.equals=function(e,t){if(e===t)return!0;for(var n=Object.keys(e),i=new Set,r=0,o=Object.keys(t);r<o.length;r++)c=o[r],i.add(c);if(n.length!==i.size)return!1;for(var s=0,a=n;s<a.length;s++){var c;if(e[c=a[s]]!==t[c])return!1;i.delete(c)}return 0===i.size}}(m||(m={}));var b=function(){return function(e,t,n,i,r){this._ourVersion=e,this._log=t,this._absoluteFolderPath=n,this._isBuiltin=i,this._isUnderDevelopment=r,this._absoluteManifestPath=c.join(n,y)}}(),S=function(e){function t(){
return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.parse=function(){var e=this;return r.readFile(this._absoluteManifestPath).then(function(t){try{var n=JSON.parse(t.toString());return n.__metadata&&(n.uuid=n.__metadata.id),delete n.__metadata,n}catch(t){e._log.error(e._absoluteFolderPath,i.localize(0,null,e._absoluteManifestPath,f.getParseErrorMessage(t.message)))}return null},function(t){return"ENOENT"===t.code?null:(e._log.error(e._absoluteFolderPath,i.localize(1,null,e._absoluteManifestPath,t.message)),null)})},t}(b),_=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,i,r,o)||this;return a._nlsConfig=s,a}return n(t,e),t.prototype.replaceNLS=function(e){var n=this,o=function(e,t){t.forEach(function(t){n._log.error(n._absoluteFolderPath,i.localize(2,null,e,f.getParseErrorMessage(t.error)))})},s=c.extname(this._absoluteManifestPath),a=this._absoluteManifestPath.substr(0,this._absoluteManifestPath.length-s.length),u=e.publisher+"."+e.name,d=this._nlsConfig.translations[u]
;return(d?r.readFile(d,"utf8").then(function(e){var t=[],n=l.parse(e,t);if(t.length>0)return o(d,t),{values:void 0,default:a+".nls.json"};return{values:n.contents?n.contents.package:void 0,default:a+".nls.json"}},function(e){return{values:void 0,default:a+".nls.json"}}):r.fileExists(a+".nls"+s).then(function(e){if(e)return t.findMessageBundles(n._nlsConfig,a).then(function(e){return e.localized?r.readFile(e.localized,"utf8").then(function(t){var n=[],i=l.parse(t,n);return n.length>0?(o(e.localized,n),{values:void 0,default:e.original}):{values:i,default:e.original}},function(t){return{values:void 0,default:e.original}}):{values:void 0,default:e.original}},function(e){})})).then(function(i){if(void 0===i)return e;var r=[];return t.resolveOriginalMessageBundle(i.default,r).then(function(s){if(r.length>0)return o(i.default,r),e;var a=i.values||Object.create(null);return t._replaceNLStrings(n._nlsConfig,e,a,s,n._log,n._absoluteFolderPath),e})},function(t){return e})},t.resolveOriginalMessageBundle=function(e,t){
return new a.TPromise(function(n,i,o){e?r.readFile(e).then(function(e){n(l.parse(e.toString(),t))},function(e){n(null)}):n(null)})},t.findMessageBundles=function(e,t){return new a.TPromise(function(n,i,o){function s(e,t){var i=e+".nls."+t+".json";r.fileExists(i).then(function(r){r&&n({localized:i,original:e+".nls.json"});var o=t.lastIndexOf("-");-1===o?n({localized:e+".nls.json",original:null}):(t=t.substring(0,o),s(e,t))})}if(e.devMode||e.pseudo||!e.locale)return n({localized:t+".nls.json",original:null});s(t,e.locale)})},t._replaceNLStrings=function(e,t,n,r,o,s){function a(t,c,l){var d=t[c];if(u.isString(d)){var h=d,p=h.length;if(p>1&&"%"===h[0]&&"%"===h[p-1]){var f=h.substr(1,p-2),g=n[f];void 0===g&&r&&(g=r[f]),g?(e.pseudo&&(g="["+g.replace(/[aouei]/g,"$&$&")+"]"),t[c]=l&&("title"===c||"category"===c)&&r?{value:g,original:r[f]}:g):o.warn(s,i.localize(3,null,f))}
}else if(u.isObject(d))for(var v in d)d.hasOwnProperty(v)&&("commands"===v?a(d,v,!0):a(d,v,l));else if(u.isArray(d))for(var m=0;m<d.length;m++)a(d,m,l)}for(var c in t)t.hasOwnProperty(c)&&a(t,c)},t}(b),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.validate=function(e){var n=this,i=e;i.isBuiltin=this._isBuiltin,i.isUnderDevelopment=this._isUnderDevelopment;var r=[];return t.isValidExtensionDescription(this._ourVersion,this._absoluteFolderPath,i,r)?(r.forEach(function(e){n._log.warn(n._absoluteFolderPath,e)}),i.id=i.publisher+"."+i.name,i.main&&(i.main=c.join(this._absoluteFolderPath,i.main)),i.extensionLocation=v.default.file(this._absoluteFolderPath),i):(r.forEach(function(e){n._log.error(n._absoluteFolderPath,e)}),null)},t.isValidExtensionDescription=function(e,n,r,o){return!!t.baseIsValidExtensionDescription(n,r,o)&&(h.valid(r.version)?d.isValidExtensionVersion(e,r,o):(o.push(i.localize(4,null)),!1))},t.baseIsValidExtensionDescription=function(e,n,r){
if(!n)return r.push(i.localize(5,null)),!1;if("string"!=typeof n.publisher)return r.push(i.localize(6,null,"publisher")),!1;if("string"!=typeof n.name)return r.push(i.localize(7,null,"name")),!1;if("string"!=typeof n.version)return r.push(i.localize(8,null,"version")),!1;if(!n.engines)return r.push(i.localize(9,null,"engines")),!1;if("string"!=typeof n.engines.vscode)return r.push(i.localize(10,null,"engines.vscode")),!1;if(void 0!==n.extensionDependencies&&!t._isStringArray(n.extensionDependencies))return r.push(i.localize(11,null,"extensionDependencies")),!1;if(void 0!==n.activationEvents){if(!t._isStringArray(n.activationEvents))return r.push(i.localize(12,null,"activationEvents")),!1;if(void 0===n.main)return r.push(i.localize(13,null,"activationEvents","main")),!1}if(void 0!==n.main){if("string"!=typeof n.main)return r.push(i.localize(14,null,"main")),!1;var o=c.join(e,n.main);if(o.indexOf(e)&&r.push(i.localize(15,null,o,e)),
void 0===n.activationEvents)return r.push(i.localize(16,null,"activationEvents","main")),!1}return!0},t._isStringArray=function(e){if(!Array.isArray(e))return!1;for(var t=0,n=e.length;t<n;t++)if("string"!=typeof e[t])return!1;return!0},t}(b),E=function(){function e(e,t,n,i,r,o,s,a){this.ourVersion=e,this.commit=t,this.locale=n,this.devMode=i,this.absoluteFolderPath=r,this.isBuiltin=o,this.isUnderDevelopment=s,this.tanslations=a}return e.createNLSConfig=function(e){return{devMode:e.devMode,locale:e.locale,pseudo:"pseudo"===e.locale,translations:e.tanslations}},e.equals=function(e,t){return e.ourVersion===t.ourVersion&&e.commit===t.commit&&e.locale===t.locale&&e.devMode===t.devMode&&e.absoluteFolderPath===t.absoluteFolderPath&&e.isBuiltin===t.isBuiltin&&e.isUnderDevelopment===t.isUnderDevelopment&&e.mtime===t.mtime&&m.equals(e.tanslations,t.tanslations)},e}();t.ExtensionScannerInput=E;var w=function(){function e(e){this.root=e}return e.prototype.resolveExtensions=function(){var e=this
;return r.readDirsInDir(this.root).then(function(t){return t.map(function(t){return{name:t,path:c.join(e.root,t)}})})},e}(),I=function(){function e(){}return e.scanExtension=function(e,t,n,i,r,o){n=c.normalize(n);return new S(e,t,n,i,r).parse().then(function(s){if(null===s)return null;return new _(e,t,n,i,r,o).replaceNLS(s)}).then(function(o){if(null===o)return null;return new C(e,t,n,i,r).validate(o)})},e.scanExtensions=function(e,t,n){return void 0===n&&(n=null),o(this,void 0,a.TPromise,function(){var i,o,l,u,d,f,v,m,y,b,S,_,C,I=this;return s(this,function(s){switch(s.label){case 0:i=e.absoluteFolderPath,o=e.isBuiltin,l=e.isUnderDevelopment,n||(n=new w(i)),s.label=1;case 1:if(s.trys.push([1,8,,9]),u={},o)return[3,5];s.label=2;case 2:return s.trys.push([2,4,,5]),[4,r.readFile(c.join(i,".obsolete"),"utf8")];case 3:return d=s.sent(),u=JSON.parse(d),[3,5];case 4:return f=s.sent(),[3,5];case 5:return[4,n.resolveExtensions()];case 6:return(v=s.sent()).sort(function(e,t){return e.name<t.name?-1:1}),o||(m=[],y=[],
v.forEach(function(e){if(0!==e.name.indexOf(".")){var t=p.getIdAndVersionFromLocalExtensionId(e.name),n=t.id,i=t.version;n&&i?y.push(e):m.push(e)}}),v=m.concat(y)),b=E.createNLSConfig(e),[4,a.TPromise.join(v.map(function(n){return I.scanExtension(e.ourVersion,t,n.path,o,l,b)}))];case 7:return S=s.sent(),S=S.filter(function(e){return null!==e&&!u[g.getLocalExtensionId(g.getGalleryExtensionId(e.publisher,e.name),e.version)]}),o||(_=g.groupByExtension(S,function(e){return{id:e.id,uuid:e.uuid}}),S=_.map(function(e){return e.sort(function(e,t){return h.rcompare(e.version,t.version)})[0]})),S.sort(function(e,t){return e.extensionLocation.fsPath<t.extensionLocation.fsPath?-1:1}),[2,S];case 8:return C=s.sent(),t.error(i,C),[2,[]];case 9:return[2]}})})},e.scanOneOrMultipleExtensions=function(e,t){var n=this,i=e.absoluteFolderPath,o=e.isBuiltin,s=e.isUnderDevelopment;return r.fileExists(c.join(i,y)).then(function(r){if(r){var a=E.createNLSConfig(e);return n.scanExtension(e.ourVersion,t,i,o,s,a).then(function(e){
return null===e?[]:[e]})}return n.scanExtensions(e,t)},function(e){return t.error(i,e),[]})},e}();t.ExtensionScanner=I}),define(e[1264],t([1,0,4,9]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._onCancel=e,this._actual=null,this._actualOk=null,this._actualErr=null,this._hasValue=!1,this._value=null,this._hasErr=!1,this._err=null,this._isCanceled=!1}return e.prototype._ensureActual=function(){var e=this;return this._actual||(this._actual=new n.TPromise(function(t,n){e._actualOk=t,e._actualErr=n},this._onCancel),this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)),this._actual},e.prototype.resolveOk=function(e){this._isCanceled||this._hasErr||(this._hasValue=!0,this._value=e,this._actual&&this._actualOk(e))},e.prototype.resolveErr=function(e){this._isCanceled||this._hasValue||(this._hasErr=!0,this._err=e,this._actual?this._actualErr(e):i.onUnexpectedError(e))},e.prototype.then=function(e,t){
if(!this._isCanceled)return this._ensureActual().then(e,t)},e.prototype.done=function(e,t){this._isCanceled||this._ensureActual().done(e,t)},e.prototype.cancel=function(){this._hasValue||this._hasErr||(this._isCanceled=!0,this._actual?this._actual.cancel():this._onCancel())},e}();t.LazyPromise=r}),define(e[1265],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){this.isMain=e,this.id=t}}();t.ProxyIdentifier=n,t.createMainContextProxyIdentifier=function(e){return new n(!0,"m"+e)},t.createExtHostContextProxyIdentifier=function(e){return new n(!1,"e"+e)}}),define(e[61],t([1,0,1265,10]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Default=0]="Default",e[e.InCenter=1]="InCenter",e[e.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",e[e.AtTop=3]="AtTop"}(t.TextEditorRevealType||(t.TextEditorRevealType={}));!function(e){e.name="$ident",e.mixin=function(t,n){
return Object.defineProperty(t,e.name,{value:n,enumerable:!0}),t},e.of=function(t){return t[e.name]}}(t.ObjectIdentifier||(t.ObjectIdentifier={}));var r=function(){function e(){}return e.mixin=function(t){return t._id=e._n++,t},e._n=0,e}();t.IdObject=r,t.reviveWorkspaceEditDto=function(e){if(e&&e.edits)for(var t=0,n=e.edits;t<n.length;t++){var r=n[t];"object"==typeof r.resource?r.resource=i.default.revive(r.resource):(r.newUri=i.default.revive(r.newUri),r.oldUri=i.default.revive(r.oldUri))}return e},t.MainContext={MainThreadCommands:n.createMainContextProxyIdentifier("MainThreadCommands"),MainThreadComments:n.createMainContextProxyIdentifier("MainThreadComments"),MainThreadConfiguration:n.createMainContextProxyIdentifier("MainThreadConfiguration"),MainThreadDebugService:n.createMainContextProxyIdentifier("MainThreadDebugService"),MainThreadDecorations:n.createMainContextProxyIdentifier("MainThreadDecorations"),MainThreadDiagnostics:n.createMainContextProxyIdentifier("MainThreadDiagnostics"),
MainThreadDialogs:n.createMainContextProxyIdentifier("MainThreadDiaglogs"),MainThreadDocuments:n.createMainContextProxyIdentifier("MainThreadDocuments"),MainThreadDocumentContentProviders:n.createMainContextProxyIdentifier("MainThreadDocumentContentProviders"),MainThreadTextEditors:n.createMainContextProxyIdentifier("MainThreadTextEditors"),MainThreadErrors:n.createMainContextProxyIdentifier("MainThreadErrors"),MainThreadTreeViews:n.createMainContextProxyIdentifier("MainThreadTreeViews"),MainThreadLanguageFeatures:n.createMainContextProxyIdentifier("MainThreadLanguageFeatures"),MainThreadLanguages:n.createMainContextProxyIdentifier("MainThreadLanguages"),MainThreadMessageService:n.createMainContextProxyIdentifier("MainThreadMessageService"),MainThreadOutputService:n.createMainContextProxyIdentifier("MainThreadOutputService"),MainThreadProgress:n.createMainContextProxyIdentifier("MainThreadProgress"),MainThreadQuickOpen:n.createMainContextProxyIdentifier("MainThreadQuickOpen"),
MainThreadStatusBar:n.createMainContextProxyIdentifier("MainThreadStatusBar"),MainThreadStorage:n.createMainContextProxyIdentifier("MainThreadStorage"),MainThreadTelemetry:n.createMainContextProxyIdentifier("MainThreadTelemetry"),MainThreadTerminalService:n.createMainContextProxyIdentifier("MainThreadTerminalService"),MainThreadWebviews:n.createMainContextProxyIdentifier("MainThreadWebviews"),MainThreadUrls:n.createMainContextProxyIdentifier("MainThreadUrls"),MainThreadWorkspace:n.createMainContextProxyIdentifier("MainThreadWorkspace"),MainThreadFileSystem:n.createMainContextProxyIdentifier("MainThreadFileSystem"),MainThreadExtensionService:n.createMainContextProxyIdentifier("MainThreadExtensionService"),MainThreadSCM:n.createMainContextProxyIdentifier("MainThreadSCM"),MainThreadSearch:n.createMainContextProxyIdentifier("MainThreadSearch"),MainThreadTask:n.createMainContextProxyIdentifier("MainThreadTask"),MainThreadWindow:n.createMainContextProxyIdentifier("MainThreadWindow")},t.ExtHostContext={
ExtHostCommands:n.createExtHostContextProxyIdentifier("ExtHostCommands"),ExtHostConfiguration:n.createExtHostContextProxyIdentifier("ExtHostConfiguration"),ExtHostDiagnostics:n.createExtHostContextProxyIdentifier("ExtHostDiagnostics"),ExtHostDebugService:n.createExtHostContextProxyIdentifier("ExtHostDebugService"),ExtHostDecorations:n.createExtHostContextProxyIdentifier("ExtHostDecorations"),ExtHostDocumentsAndEditors:n.createExtHostContextProxyIdentifier("ExtHostDocumentsAndEditors"),ExtHostDocuments:n.createExtHostContextProxyIdentifier("ExtHostDocuments"),ExtHostDocumentContentProviders:n.createExtHostContextProxyIdentifier("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:n.createExtHostContextProxyIdentifier("ExtHostDocumentSaveParticipant"),ExtHostEditors:n.createExtHostContextProxyIdentifier("ExtHostEditors"),ExtHostTreeViews:n.createExtHostContextProxyIdentifier("ExtHostTreeViews"),ExtHostFileSystem:n.createExtHostContextProxyIdentifier("ExtHostFileSystem"),
ExtHostFileSystemEventService:n.createExtHostContextProxyIdentifier("ExtHostFileSystemEventService"),ExtHostHeapService:n.createExtHostContextProxyIdentifier("ExtHostHeapMonitor"),ExtHostLanguageFeatures:n.createExtHostContextProxyIdentifier("ExtHostLanguageFeatures"),ExtHostQuickOpen:n.createExtHostContextProxyIdentifier("ExtHostQuickOpen"),ExtHostExtensionService:n.createExtHostContextProxyIdentifier("ExtHostExtensionService"),ExtHostLogService:n.createExtHostContextProxyIdentifier("ExtHostLogService"),ExtHostTerminalService:n.createExtHostContextProxyIdentifier("ExtHostTerminalService"),ExtHostSCM:n.createExtHostContextProxyIdentifier("ExtHostSCM"),ExtHostSearch:n.createExtHostContextProxyIdentifier("ExtHostSearch"),ExtHostTask:n.createExtHostContextProxyIdentifier("ExtHostTask"),ExtHostWorkspace:n.createExtHostContextProxyIdentifier("ExtHostWorkspace"),ExtHostWindow:n.createExtHostContextProxyIdentifier("ExtHostWindow"),ExtHostWebviews:n.createExtHostContextProxyIdentifier("ExtHostWebviews"),
ExtHostProgress:n.createMainContextProxyIdentifier("ExtHostProgress"),ExtHostComments:n.createMainContextProxyIdentifier("ExtHostComments"),ExtHostUrls:n.createExtHostContextProxyIdentifier("ExtHostUrls")}}),define(e[1267],t([1,0,29,4,61,67,418]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){var i=this;this._commandService=t,this._disposables=new Map,this._proxy=e.getProxy(r.ExtHostContext.ExtHostCommands),this._generateCommandsDocumentationRegistration=n.CommandsRegistry.registerCommand("_generateCommandsDocumentation",function(){return i._generateCommandsDocumentation()})}return e.prototype.dispose=function(){this._disposables.forEach(function(e){return e.dispose()}),this._disposables.clear(),this._generateCommandsDocumentationRegistration.dispose()},e.prototype._generateCommandsDocumentation=function(){return this._proxy.$getContributedCommandHandlerDescriptions().then(function(e){var t=n.CommandsRegistry.getCommands()
;for(var i in t){var r=t[i].description;r&&(e[i]=r)}var o=[];for(var i in e)o.push("`"+i+"` - "+function(e){if("string"==typeof e)return e;var t=[e.description];if(t.push("\n\n"),e.args)for(var n=0,i=e.args;n<i.length;n++){var r=i[n];t.push("* _"+r.name+"_ "+(r.description||"")+"\n")}return e.returns&&t.push("* _(returns)_ "+e.returns),t.push("\n\n"),t.join("")}(e[i]));console.log(o.join("\n"))})},e.prototype.$registerCommand=function(e){var t=this;this._disposables.set(e,n.CommandsRegistry.registerCommand(e,function(n){for(var i,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return(i=t._proxy).$executeContributedCommand.apply(i,[e].concat(r)).then(function(e){return s.revive(e,0)})}))},e.prototype.$unregisterCommand=function(e){this._disposables.has(e)&&(this._disposables.get(e).dispose(),this._disposables.delete(e))},e.prototype.$executeCommand=function(e,t){for(var n,i=0;i<t.length;i++)t[i]=s.revive(t[i],0);return(n=this._commandService).executeCommand.apply(n,[e].concat(t))},
e.prototype.$getCommands=function(){return i.TPromise.as(Object.keys(n.CommandsRegistry.getCommands()))},e=a([o.extHostNamedCustomer(r.MainContext.MainThreadCommands),l(1,n.ICommandService)],e)}();t.MainThreadCommands=c}),define(e[1268],t([1,0,10,16,63,27,95,61,67,17]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,n){var i=this;this._workspaceContextService=t,this.configurationService=n;var r=e.getProxy(c.ExtHostContext.ExtHostConfiguration);this._configurationListener=n.onDidChangeConfiguration(function(e){r.$acceptConfigurationChanged(n.getConfigurationData(),i.toConfigurationChangeEventData(e))})}return e.prototype.dispose=function(){this._configurationListener.dispose()},e.prototype.$updateConfigurationOption=function(e,t,i,r){var o=r?n.default.revive(r):null;return this.writeConfiguration(e,t,i,o)},e.prototype.$removeConfigurationOption=function(e,t,i){var r=i?n.default.revive(i):null
;return this.writeConfiguration(e,t,void 0,r)},e.prototype.writeConfiguration=function(e,t,n,i){return e=null!==e&&void 0!==e?e:this.deriveConfigurationTarget(t,i),this.configurationService.updateValue(t,n,{resource:i},e,!0)},e.prototype.deriveConfigurationTarget=function(e,t){if(t&&this._workspaceContextService.getWorkbenchState()===o.WorkbenchState.WORKSPACE){var n=i.Registry.as(r.Extensions.Configuration).getConfigurationProperties();if(n[e]&&n[e].scope===r.ConfigurationScope.RESOURCE)return d.ConfigurationTarget.WORKSPACE_FOLDER}return d.ConfigurationTarget.WORKSPACE},e.prototype.toConfigurationChangeEventData=function(e){var t=this;return{changedConfiguration:this.toJSONConfiguration(e.changedConfiguration),changedConfigurationByResource:e.changedConfigurationByResource.keys().reduce(function(n,i){return n[i.toString()]=t.toJSONConfiguration(e.changedConfigurationByResource.get(i)),n},Object.create({}))}},e.prototype.toJSONConfiguration=function(e){var t=void 0===e?{contents:{},keys:[],overrides:[]}:e
;return{contents:t.contents,keys:t.keys,overrides:t.overrides}},e=a([u.extHostNamedCustomer(c.MainContext.MainThreadConfiguration),l(1,o.IWorkspaceContextService),l(2,s.IWorkspaceConfigurationService)],e)}();t.MainThreadConfiguration=h}),define(e[1269],t([1,0,5,10,79,4,61,67,83,319,25,318]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t){var n=this;this.debugService=t,this._debugAdaptersHandleCounter=1,this._proxy=e.getProxy(c.ExtHostContext.ExtHostDebugService),this._toDispose=[],this._toDispose.push(t.onDidNewSession(function(e){return n._proxy.$acceptDebugSessionStarted(e.getId(),e.configuration.type,e.getName(!1))})),this._toDispose.push(t.onDidEndSession(function(e){return n._proxy.$acceptDebugSessionTerminated(e.getId(),e.configuration.type,e.getName(!1))})),this._toDispose.push(t.getViewModel().onDidFocusSession(function(e){
e?n._proxy.$acceptDebugSessionActiveChanged(e.getId(),e.configuration.type,e.getName(!1)):n._proxy.$acceptDebugSessionActiveChanged(void 0)})),this._toDispose.push(t.onDidCustomEvent(function(e){if(e&&e.sessionId){var t=n.debugService.getModel().getSessions().filter(function(t){return t.getId()===e.sessionId}).pop();t&&n._proxy.$acceptDebugSessionCustomEvent(e.sessionId,t.configuration.type,t.configuration.name,e)}})),this._debugAdapters=new Map}return e.prototype.$registerDebugTypes=function(e){this._toDispose.push(this.debugService.getConfigurationManager().registerDebugAdapterProvider(e,this))},e.prototype.createDebugAdapter=function(e,t,n){var i=this._debugAdaptersHandleCounter++,r=new v(i,this._proxy,e,t,n);return this._debugAdapters.set(i,r),r},e.prototype.substituteVariables=function(e,t){return this._proxy.$substituteVariables(e?e.uri:void 0,t)},e.prototype.runInTerminal=function(e,t){return this._proxy.$runInTerminal(e,t)},e.prototype.dispose=function(){this._toDispose=i.dispose(this._toDispose)},
e.prototype.$startBreakpointEvents=function(){var e=this;if(!this._breakpointEventsActive){this._breakpointEventsActive=!0,this._toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(function(t){if(t&&!t.sessionOnly){var n={};t.added&&(n.added=e.convertToDto(t.added)),t.removed&&(n.removed=t.removed.map(function(e){return e.getId()})),t.changed&&(n.changed=e.convertToDto(t.changed)),(n.added||n.removed||n.changed)&&e._proxy.$acceptBreakpointsDelta(n)}}));var t=this.debugService.getModel().getBreakpoints(),n=this.debugService.getModel().getFunctionBreakpoints();(t.length>0||n.length>0)&&this._proxy.$acceptBreakpointsDelta({added:this.convertToDto(t).concat(this.convertToDto(n))})}return s.TPromise.wrap(void 0)},e.prototype.$registerBreakpoints=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];if("sourceMulti"===i.type){var o=i.lines.map(function(e){return{id:e.id,enabled:e.enabled,lineNumber:e.line+1,column:e.character>0?e.character+1:void 0,condition:e.condition,hitCondition:e.hitCondition,
logMessage:e.logMessage}});this.debugService.addBreakpoints(r.default.revive(i.uri),o)}else"function"===i.type&&this.debugService.addFunctionBreakpoint(i.functionName,i.id)}},e.prototype.$unregisterBreakpoints=function(e,t){var n=this;e.forEach(function(e){return n.debugService.removeBreakpoints(e)}),t.forEach(function(e){return n.debugService.removeFunctionBreakpoints(e)})},e.prototype.convertToDto=function(e){return e.map(function(e){if("name"in e){var t=e;return{type:"function",id:t.getId(),enabled:t.enabled,condition:t.condition,hitCondition:t.hitCondition,logMessage:t.logMessage,functionName:t.name}}var n=e;return{type:"source",id:n.getId(),enabled:n.enabled,condition:n.condition,hitCondition:n.hitCondition,logMessage:n.logMessage,uri:n.uri,line:n.lineNumber>0?n.lineNumber-1:0,character:"number"==typeof n.column&&n.column>0?n.column-1:0}})},e.prototype.$registerDebugConfigurationProvider=function(e,t,n,i,r){var o=this,a={type:e};return t&&(a.provideDebugConfigurations=function(e){
return o._proxy.$provideDebugConfigurations(r,e)}),n&&(a.resolveDebugConfiguration=function(e,t){return o._proxy.$resolveDebugConfiguration(r,e,t)}),i&&(a.debugAdapterExecutable=function(e){return o._proxy.$debugAdapterExecutable(r,e)}),this.debugService.getConfigurationManager().registerDebugConfigurationProvider(r,a),s.TPromise.wrap(void 0)},e.prototype.$unregisterDebugConfigurationProvider=function(e){return this.debugService.getConfigurationManager().unregisterDebugConfigurationProvider(e),s.TPromise.wrap(void 0)},e.prototype.$startDebugging=function(e,t){var n=e?r.default.revive(e):void 0,i=this.debugService.getConfigurationManager().getLaunch(n);return this.debugService.startDebugging(i,t).then(function(e){return!0},function(e){return s.TPromise.wrapError(e&&e.message?e.message:"cannot start debugging")})},e.prototype.$customDebugAdapterRequest=function(e,t,n){var i=this.debugService.getModel().getSessions().filter(function(t){return t.getId()===e}).pop();return i?i.raw.custom(t,n).then(function(e){
return e&&e.success?e.body:s.TPromise.wrapError(new Error(e?e.message:"custom request failed"))}):s.TPromise.wrapError(new Error("debug session not found"))},e.prototype.$appendDebugConsole=function(e){return this.debugService.logToRepl(e,d.default.Warning),s.TPromise.wrap(void 0)},e.prototype.$acceptDAMessage=function(e,t){f.convertToVSCPaths(t,function(e){"object"==typeof e.path&&(e.path=r.default.revive(e.path).toString())}),this._debugAdapters.get(e).acceptMessage(t)},e.prototype.$acceptDAError=function(e,t,n,i){this._debugAdapters.get(e).fireError(e,new Error(t+": "+n+"\n"+i))},e.prototype.$acceptDAExit=function(e,t,n){this._debugAdapters.get(e).fireExit(e,t,n)},e=a([u.extHostNamedCustomer(c.MainContext.MainThreadDebugService),l(1,o.IDebugService)],e)}();t.MainThreadDebugService=g;var v=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s._handle=t,s._proxy=n,s._debugType=i,s._adapterExecutable=r,s._debugPort=o,s}return n(t,e),t.prototype.fireError=function(e,t){this._onError.fire(t)},
t.prototype.fireExit=function(e,t,n){this._onExit.fire(t)},t.prototype.startSession=function(){return this._proxy.$startDASession(this._handle,this._debugType,this._adapterExecutable,this._debugPort)},t.prototype.sendMessage=function(e){f.convertToDAPaths(e,function(e){p.isAbsolute(e.path)?e.path=r.default.file(e.path):e.path=r.default.parse(e.path)}),this._proxy.$sendDAMessage(this._handle,e)},t.prototype.stopSession=function(){return this._proxy.$stopDASession(this._handle)},t}(h.AbstractDebugAdapter)}),define(e[1270],t([1,0,10,7,5,61,67,240,4,113]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e){this._proxy=e,this._idPool=0,this._requests=Object.create(null),this._resolver=Object.create(null)}return e.prototype.enqueue=function(e,t){var n=this,i=++this._idPool;return new u.TPromise(function(r,o){n._requests[i]={id:i,handle:e,uri:t},n._resolver[i]=r,n._processQueue()},function(){delete n._requests[i],delete n._resolver[i]})},
e.prototype._processQueue=function(){var e=this;"number"!=typeof this._timer&&(this._timer=setTimeout(function(){var t=e._requests,n=e._resolver;e._proxy.$provideDecorations(d.values(t)).then(function(e){for(var t in n)n[t](e[t])}),e._requests=[],e._resolver=[],e._timer=void 0},0))},e}(),p=function(){function e(e,t){this._decorationsService=t,this._provider=new Map,this._proxy=e.getProxy(o.ExtHostContext.ExtHostDecorations),this._requestQueue=new h(this._proxy)}return e.prototype.dispose=function(){this._provider.forEach(function(e){return r.dispose(e)}),this._provider.clear()},e.prototype.$registerDecorationProvider=function(e,t){var n=this,r=new i.Emitter,o=this._decorationsService.registerDecorationsProvider({label:t,onDidChange:r.event,provideDecorations:function(t){return n._requestQueue.enqueue(e,t).then(function(e){if(e){var t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5];return{weight:t||0,bubble:n||!1,color:o&&o.id,tooltip:i,letter:r,source:s}}})}});this._provider.set(e,[r,o])},
e.prototype.$onDidChange=function(e,t){this._provider.get(e)[0].fire(t&&t.map(n.default.revive))},e.prototype.$unregisterDecorationProvider=function(e){this._provider.has(e)&&(r.dispose(this._provider.get(e)),this._provider.delete(e))},e=a([s.extHostNamedCustomer(o.MainContext.MainThreadDecorations),l(1,c.IDecorationsService)],e)}();t.MainThreadDecorations=p}),define(e[1271],t([1,0,90,10,61,67]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){this._activeOwners=new Set,this._markerService=t}return e.prototype.dispose=function(){var e=this;this._activeOwners.forEach(function(t){return e._markerService.changeAll(t,void 0)})},e.prototype.$changeMany=function(e,t){for(var n=0,r=t;n<r.length;n++){var o=r[n],s=o[0],a=o[1];if(a)for(var c=0,l=a;c<l.length;c++){var u=l[c];if(u.relatedInformation)for(var d=0,h=u.relatedInformation;d<h.length;d++){var p=h[d];p.resource=i.default.revive(p.resource)}}this._markerService.changeOne(e,i.default.revive(s),a)
}this._activeOwners.add(e)},e.prototype.$clear=function(e){this._markerService.changeAll(e,void 0),this._activeOwners.delete(e)},e=a([o.extHostNamedCustomer(r.MainContext.MainThreadDiagnostics),l(1,n.IMarkerService)],e)}();t.MainThreadDiagnostics=s}),define(e[1272],t([1,0,10,20,61,67,42,113]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this._windowService=t}t=e,e.prototype.dispose=function(){},e.prototype.$showOpenDialog=function(e){var n=this;return e.defaultUri&&"file"!==e.defaultUri.scheme?Promise.reject(new Error("Not supported - Open-dialogs can only be opened on `file`-uris.")):new Promise(function(r){n._windowService.showOpenDialog(t._convertOpenOptions(e)).then(function(e){return r(i.isFalsyOrEmpty(e)?void 0:e)})})},e.prototype.$showSaveDialog=function(e){var n=this
;return e.defaultUri&&"file"!==e.defaultUri.scheme?Promise.reject(new Error("Not supported - Save-dialogs can only be opened on `file`-uris.")):new Promise(function(i){n._windowService.showSaveDialog(t._convertSaveOptions(e)).then(function(e){return i(e||void 0)})})},e._convertOpenOptions=function(e){var t={properties:["createDirectory"]};return e.openLabel&&(t.buttonLabel=e.openLabel),e.defaultUri&&(t.defaultPath=n.default.revive(e.defaultUri).fsPath),e.canSelectFiles||e.canSelectFolders||(e.canSelectFiles=!0),e.canSelectFiles&&t.properties.push("openFile"),e.canSelectFolders&&t.properties.push("openDirectory"),e.canSelectMany&&t.properties.push("multiSelections"),e.filters&&(t.filters=[],c.forEach(e.filters,function(e){return t.filters.push({name:e.key,extensions:e.value})})),t},e._convertSaveOptions=function(e){var t={};return e.defaultUri&&(t.defaultPath=n.default.revive(e.defaultUri).fsPath),e.saveLabel&&(t.buttonLabel=e.saveLabel),e.filters&&(t.filters=[],c.forEach(e.filters,function(e){
return t.filters.push({name:e.key,extensions:e.value})})),t};var t;return e=t=a([o.extHostNamedCustomer(r.MainContext.MainThreadDialogs),l(1,s.IWindowService)],e)}();t.MainThreadDialogs=u}),define(e[1273],t([1,0,10,57,71,61,66,72,54,47,67]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n,i,r){this._textModelResolverService=t,this._modeService=n,this._modelService=i,this._resourceContentProvider=Object.create(null),this._proxy=e.getProxy(o.ExtHostContext.ExtHostDocumentContentProviders)}return e.prototype.dispose=function(){for(var e in this._resourceContentProvider)this._resourceContentProvider[e].dispose()},e.prototype.$registerTextContentProvider=function(e,t){var n=this;this._resourceContentProvider[e]=this._textModelResolverService.registerTextModelContentProvider(t,{provideTextContent:function(t){return n._proxy.$provideTextDocumentContent(e,t).then(function(e){if("string"==typeof e){
var i=e.substr(0,1+e.search(/\r?\n/)),r=n._modeService.getOrCreateModeByFilenameOrFirstLine(t.fsPath,i);return n._modelService.createModel(e,r,t)}})}})},e.prototype.$unregisterTextContentProvider=function(e){var t=this._resourceContentProvider[e];t&&(t.dispose(),delete this._resourceContentProvider[e])},e.prototype.$onVirtualDocumentChange=function(e,t){var r=this._modelService.getModel(n.default.revive(e));if(r){var o=s.createTextBuffer(t,i.DefaultEndOfLine.CRLF);r.equalsTextBuffer(o)||r.setValueFromTextBuffer(o)}},e=a([h.extHostNamedCustomer(o.MainContext.MainThreadDocumentContentProviders),l(1,c.ITextModelService),l(2,u.IModeService),l(3,d.IModelService),l(4,r.ICodeEditorService)],e)}();t.MainThreadDocumentContentProviders=p}),define(e[444],t([1,0,7,5,19,60,160,375,133,61,57]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t,n){this.selections=e,this.options=t,this.visibleRanges=n}return e.readFromEditor=function(t,n,i){
return new e(e._readSelectionsFromCodeEditor(t,i),e._readOptionsFromCodeEditor(t,n,i),e._readVisibleRangesFromCodeEditor(t,i))},e._readSelectionsFromCodeEditor=function(e,t){var n=null;return t&&(n=t.getSelections()),!n&&e&&(n=e.selections),n||(n=[new o.Selection(1,1,1,1)]),n},e._readOptionsFromCodeEditor=function(e,t,n){if(t.isDisposed())return e.options;var i,r;if(n){var o=n.getConfiguration();switch(i=o.viewInfo.cursorStyle,o.viewInfo.renderLineNumbers){case 0:r=a.TextEditorLineNumbersStyle.Off;break;case 2:r=a.TextEditorLineNumbersStyle.Relative;break;default:r=a.TextEditorLineNumbersStyle.On}}else e?(i=e.options.cursorStyle,r=e.options.lineNumbers):(i=c.TextEditorCursorStyle.Line,r=a.TextEditorLineNumbersStyle.On);var s=t.getOptions();return{insertSpaces:s.insertSpaces,tabSize:s.tabSize,cursorStyle:i,lineNumbers:r}},e._readVisibleRangesFromCodeEditor=function(e,t){return t?t.getVisibleRanges():[]},e.prototype.generateDelta=function(t,n){var i={options:null,selections:null,visibleRanges:null}
;return t&&e._selectionsEqual(t.selections,this.selections)||(i.selections={selections:this.selections,source:n}),t&&e._optionsEqual(t.options,this.options)||(i.options=this.options),t&&e._rangesEqual(t.visibleRanges,this.visibleRanges)||(i.visibleRanges=this.visibleRanges),i.selections||i.options||i.visibleRanges?i:null},e._selectionsEqual=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].equalsSelection(t[n]))return!1;return!0},e._rangesEqual=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].equalsRange(t[n]))return!1;return!0},e._optionsEqual=function(e,t){return!(e&&!t||!e&&t)&&(!e&&!t||e.tabSize===t.tabSize&&e.insertSpaces===t.insertSpaces&&e.cursorStyle===t.cursorStyle&&e.lineNumbers===t.lineNumbers)},e}();t.MainThreadTextEditorProperties=d;var h=function(){function e(e,t,i,r,o){var s=this;this._id=e,this._model=t,this._codeEditor=null,this._focusTracker=r,this._modelService=o,this._codeEditorListeners=[],this._properties=null,
this._onPropertiesChanged=new n.Emitter,this._modelListeners=[],this._modelListeners.push(this._model.onDidChangeOptions(function(e){s._updatePropertiesNow(null)})),this.setCodeEditor(i),this._updatePropertiesNow(null)}return e.prototype.dispose=function(){this._model=null,this._modelListeners=i.dispose(this._modelListeners),this._codeEditor=null,this._codeEditorListeners=i.dispose(this._codeEditorListeners)},e.prototype._updatePropertiesNow=function(e){this._setProperties(d.readFromEditor(this._properties,this._model,this._codeEditor),e)},e.prototype._setProperties=function(e,t){var n=e.generateDelta(this._properties,t);this._properties=e,n&&this._onPropertiesChanged.fire(n)},e.prototype.getId=function(){return this._id},e.prototype.getModel=function(){return this._model},e.prototype.getCodeEditor=function(){return this._codeEditor},e.prototype.hasCodeEditor=function(e){return this._codeEditor===e},e.prototype.setCodeEditor=function(e){var t=this
;this.hasCodeEditor(e)||(this._codeEditorListeners=i.dispose(this._codeEditorListeners),this._codeEditor=e,this._codeEditor&&(this._codeEditorListeners.push(this._codeEditor.onDidChangeModel(function(){t.setCodeEditor(null)})),this._codeEditorListeners.push(this._codeEditor.onDidFocusEditorWidget(function(){t._focusTracker.onGainedFocus()})),this._codeEditorListeners.push(this._codeEditor.onDidBlurEditorWidget(function(){t._focusTracker.onLostFocus()})),this._codeEditorListeners.push(this._codeEditor.onDidChangeCursorSelection(function(e){t._updatePropertiesNow(e.source)})),this._codeEditorListeners.push(this._codeEditor.onDidChangeConfiguration(function(){t._updatePropertiesNow(null)})),this._codeEditorListeners.push(this._codeEditor.onDidLayoutChange(function(){t._updatePropertiesNow(null)})),this._codeEditorListeners.push(this._codeEditor.onDidScrollChange(function(){t._updatePropertiesNow(null)})),this._updatePropertiesNow(null)))},e.prototype.isVisible=function(){return!!this._codeEditor},
e.prototype.getProperties=function(){return this._properties},Object.defineProperty(e.prototype,"onPropertiesChanged",{get:function(){return this._onPropertiesChanged.event},enumerable:!0,configurable:!0}),e.prototype.setSelections=function(e){if(this._codeEditor)this._codeEditor.setSelections(e);else{var t=e.map(o.Selection.liftSelection);this._setProperties(new d(t,this._properties.options,this._properties.visibleRanges),null)}},e.prototype._setIndentConfiguration=function(e){if("auto"===e.tabSize||"auto"===e.insertSpaces){var t=this._modelService.getCreationOptions(this._model.getLanguageIdentifier().language,this._model.uri,this._model.isForSimpleWidget),n=t.insertSpaces,i=t.tabSize;return"auto"!==e.insertSpaces&&void 0!==e.insertSpaces&&(n=e.insertSpaces),"auto"!==e.tabSize&&void 0!==e.tabSize&&(i=e.tabSize),void this._model.detectIndentation(n,i)}var r={};void 0!==e.insertSpaces&&(r.insertSpaces=e.insertSpaces),void 0!==e.tabSize&&(r.tabSize=e.tabSize),this._model.updateOptions(r)},
e.prototype.setConfiguration=function(e){if(this._setIndentConfiguration(e),this._codeEditor){if(e.cursorStyle){var t=c.cursorStyleToString(e.cursorStyle);this._codeEditor.updateOptions({cursorStyle:t})}if(void 0!==e.lineNumbers){var n=void 0;switch(e.lineNumbers){case a.TextEditorLineNumbersStyle.On:n="on";break;case a.TextEditorLineNumbersStyle.Relative:n="relative";break;default:n="off"}this._codeEditor.updateOptions({lineNumbers:n})}}},e.prototype.setDecorations=function(e,t){this._codeEditor&&this._codeEditor.setDecorations(e,t)},e.prototype.setDecorationsFast=function(e,t){if(this._codeEditor){for(var n=[],i=0,o=Math.floor(t.length/4);i<o;i++)n[i]=new r.Range(t[4*i],t[4*i+1],t[4*i+2],t[4*i+3]);this._codeEditor.setDecorationsFast(e,n)}},e.prototype.revealRange=function(e,t){if(this._codeEditor)switch(t){case l.TextEditorRevealType.Default:this._codeEditor.revealRange(e,0);break;case l.TextEditorRevealType.InCenter:this._codeEditor.revealRangeInCenter(e,0);break
;case l.TextEditorRevealType.InCenterIfOutsideViewport:this._codeEditor.revealRangeInCenterIfOutsideViewport(e,0);break;case l.TextEditorRevealType.AtTop:this._codeEditor.revealRangeAtTop(e,0);break;default:console.warn("Unknown revealType: "+t)}},e.prototype.isFocused=function(){return!!this._codeEditor&&this._codeEditor.hasTextFocus()},e.prototype.matches=function(e){return!!e&&e.getControl()===this._codeEditor},e.prototype.applyEdits=function(e,t,n){if(this._model.getVersionId()!==e)return!1;if(!this._codeEditor)return!1;n.setEndOfLine===a.EndOfLine.CRLF?this._model.pushEOL(u.EndOfLineSequence.CRLF):n.setEndOfLine===a.EndOfLine.LF&&this._model.pushEOL(u.EndOfLineSequence.LF);var i=t.map(function(e){return{range:r.Range.lift(e.range),text:e.text,forceMoveMarkers:e.forceMoveMarkers}});return n.undoStopBefore&&this._codeEditor.pushUndoStop(),this._codeEditor.executeEdits("MainThreadTextEditor",i),n.undoStopAfter&&this._codeEditor.pushUndoStop(),!0},e.prototype.insertSnippet=function(e,t,n){
if(!this._codeEditor)return!1;var i=s.SnippetController2.get(this._codeEditor),r=t.map(function(e){return new o.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)});return this._codeEditor.setSelections(r),this._codeEditor.focus(),i.insert(e,0,0,n.undoStopBefore,n.undoStopAfter),!0},e}();t.MainThreadTextEditor=h}),define(e[1275],t([1,0,9,61,67]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.dispose=function(){},e.prototype.$onUnexpectedError=function(e){if(e&&e.$isError){var t=e.name,i=e.message,r=e.stack;(e=new Error).message=i,e.name=t,e.stack=r}n.onUnexpectedError(e)},e=a([r.extHostNamedCustomer(i.MainContext.MainThreadErrors)],e)}();t.MainThreadErrors=o}),define(e[1276],t([1,0,7,5,10,33,67,61]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this._fileService=t,this._fileProvider=new Map,
this._proxy=e.getProxy(c.ExtHostContext.ExtHostFileSystem)}return e.prototype.dispose=function(){this._fileProvider.forEach(function(e){return e.dispose()}),this._fileProvider.clear()},e.prototype.$registerFileSystemProvider=function(e,t,n){this._fileProvider.set(e,new d(this._fileService,t,n,e,this._proxy))},e.prototype.$unregisterProvider=function(e){i.dispose(this._fileProvider.get(e)),this._fileProvider.delete(e)},e.prototype.$onFileSystemChange=function(e,t){this._fileProvider.get(e).$onFileSystemChange(t)},e=a([s.extHostNamedCustomer(c.MainContext.MainThreadFileSystem),l(1,o.IFileService)],e)}();t.MainThreadFileSystem=u;var d=function(){function e(e,t,i,r,o){this._handle=r,this._proxy=o,this._onDidChange=new n.Emitter,this.onDidChangeFile=this._onDidChange.event,this.capabilities=i,this._registrations=[e.registerProvider(t,this)]}return e.prototype.dispose=function(){i.dispose(this._registrations),this._onDidChange.dispose()},e.prototype.watch=function(e,t){var n=this,i=Math.random()
;return this._proxy.$watch(this._handle,i,e,t),{dispose:function(){n._proxy.$unwatch(n._handle,i)}}},e.prototype.$onFileSystemChange=function(t){this._onDidChange.fire(t.map(e._createFileChange))},e._createFileChange=function(e){return{resource:r.default.revive(e.resource),type:e.type}},e.prototype.stat=function(e){return this._proxy.$stat(this._handle,e).then(void 0,function(e){throw e})},e.prototype.readFile=function(e){return this._proxy.$readFile(this._handle,e).then(function(e){return Buffer.from(e,"base64")})},e.prototype.writeFile=function(e,t,n){var i=Buffer.isBuffer(t)?t.toString("base64"):Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("base64");return this._proxy.$writeFile(this._handle,e,i,n)},e.prototype.delete=function(e,t){return this._proxy.$delete(this._handle,e,t)},e.prototype.mkdir=function(e){return this._proxy.$mkdir(this._handle,e)},e.prototype.readdir=function(e){return this._proxy.$readdir(this._handle,e)},e.prototype.rename=function(e,t,n){
return this._proxy.$rename(this._handle,e,t,n)},e.prototype.copy=function(e,t,n){return this._proxy.$copy(this._handle,e,t,n)},e}()}),define(e[445],t([1,0,61,6,107,7,67,18,1595]),function(e,t,n,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeapService=i.createDecorator("heapService");var d=function(){function t(){this._onGarbageCollection=new o.Emitter,this.onGarbageCollection=this._onGarbageCollection.event,this._activeSignals=new WeakMap,this._activeIds=new Set}return t.prototype.dispose=function(){clearInterval(this._consumeHandle)},t.prototype.trackRecursive=function(e){var t=this;return c.isThenable(e)?e.then(function(e){return t.trackRecursive(e)}):this._doTrackRecursive(e)},t.prototype._doTrackRecursive=function(t){var i=this;return u.isNullOrUndefined(t)?Promise.resolve(t):new Promise(function(t,n){e(["gc-signals"],t,n)}).then(function(e){var r=e.GCSignal,o=e.consumeSignals;void 0===i._consumeHandle&&(i._consumeHandle=setInterval(function(){var e=o();if(e.length>0){
for(var t=0,n=e;t<n.length;t++){var r=n[t];i._activeIds.delete(r)}i._onGarbageCollection.fire(e)}},15e3));for(var s=[t];s.length>0;){var a=s.shift();if(a&&"object"==typeof a)for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c)){var l=a[c];"object"==typeof l?s.push(l):c===n.ObjectIdentifier.name&&("number"!=typeof l||i._activeIds.has(l)||(i._activeIds.add(l),i._activeSignals.set(a,new r(l))))}}return t})},t}();t.HeapService=d;var h=function(){function e(e,t){var i=e.getProxy(n.ExtHostContext.ExtHostHeapService);this._toDispose=t.onGarbageCollection(function(e){i.$onGarbageCollection(e)})}return e.prototype.dispose=function(){this._toDispose.dispose()},e=a([s.extHostCustomer,l(1,t.IHeapService)],e)}();t.MainThreadHeapService=h,r.registerSingleton(t.IHeapService,d)}),define(e[1279],t([1,0,4,54,61,67]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){this._modeService=t}return e.prototype.dispose=function(){},
e.prototype.$getLanguages=function(){return n.TPromise.as(this._modeService.getRegisteredModes())},e=a([o.extHostNamedCustomer(r.MainContext.MainThreadLanguages),l(1,i.IModeService)],e)}();t.MainThreadLanguages=s}),define(e[1280],t([1,0,67,77,5,61]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n){var i=e.call(this)||this;return i._register(n.onDidChangeLogLevel(function(e){return t.getProxy(s.ExtHostContext.ExtHostLogService).$setLevel(e)})),i}return n(t,e),t=a([i.extHostCustomer,l(1,r.ILogService)],t)}(o.Disposable);t.MainThreadLogService=c}),define(e[1281],t([1,0,1442,23,61,67,100,22,7,29,5]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n,i){this._notificationService=t,this._commandService=n,this._dialogService=i}return e.prototype.dispose=function(){},e.prototype.$showMessage=function(e,t,n,i){
return n.modal?this._showModalMessage(e,t,i):this._showMessage(e,t,i,n.extension)},e.prototype._showMessage=function(e,t,o,s){var a=this;return new Promise(function(c){var l=[],u=function(e){function t(t,n,i){return e.call(this,t,n,void 0,!0,function(){c(i)})||this}return n(t,e),t}(r.Action),h=function(e){function t(t,n,i){return e.call(this,t,n,void 0,!0,function(){return i.executeCommand("_extensions.manage",t)})||this}return n(t,e),t}(r.Action);o.forEach(function(e){l.push(new u("_extension_message_handle_"+e.handle,e.title,e.handle))});var f;s&&(f=i.localize(0,null,s.displayName||s.name)),f||(f=i.localize(1,null));var g=[];s&&!s.isUnderDevelopment&&g.push(new h(s.id,i.localize(2,null),a._commandService));var v=a._notificationService.notify({severity:e,message:t,actions:{primary:l,secondary:g},source:f});d.once(v.onDidClose)(function(){p.dispose.apply(void 0,l.concat(g)),c(void 0)})})},e.prototype._showModalMessage=function(e,t,n){var r=void 0,o=n.map(function(e,t){return!0===e.isCloseAffordance&&(r=t),
e.title});return void 0===r&&(o.length>0?o.push(i.localize(3,null)):o.push(i.localize(4,null)),r=o.length-1),this._dialogService.show(e,t,o,{cancelId:r}).then(function(e){return e===n.length?void 0:n[e].handle})},e=a([s.extHostNamedCustomer(o.MainContext.MainThreadMessageService),l(1,u.INotificationService),l(2,h.ICommandService),l(3,c.IDialogService)],e)}();t.MainThreadMessageService=f}),define(e[1282],t([1,0,4,18,179,61,67,10]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this._token=0,this.sessions=new Map,this._proxy=e.getProxy(o.ExtHostContext.ExtHostQuickOpen),this._quickInputService=t}return e.prototype.dispose=function(){},e.prototype.$show=function(e){var t=this,r=++this._token;return this._contents=new n.TPromise(function(e,n){t._doSetItems=function(n){r===t._token&&e(n)},t._doSetError=function(e){r===t._token&&n(e)}}),e.canPickMany?i.asWinJsPromise(function(n){return t._quickInputService.pick(t._contents,e,n)
}).then(function(e){if(e)return e.map(function(e){return e.handle})},void 0,function(e){e&&t._proxy.$onItemSelected(e.handle)}):i.asWinJsPromise(function(n){return t._quickInputService.pick(t._contents,e,n)}).then(function(e){if(e)return e.handle},void 0,function(e){e&&t._proxy.$onItemSelected(e.handle)})},e.prototype.$setItems=function(e){this._doSetItems&&this._doSetItems(e)},e.prototype.$setError=function(e){this._doSetError&&this._doSetError(e)},e.prototype.$input=function(e,t){var n=this,r=Object.create(null);return e&&(r.password=e.password,r.placeHolder=e.placeHolder,r.valueSelection=e.valueSelection,r.prompt=e.prompt,r.value=e.value,r.ignoreFocusLost=e.ignoreFocusOut),t&&(r.validateInput=function(e){return n._proxy.$validateInput(e)}),i.asWinJsPromise(function(e){return n._quickInputService.input(r,e)})},e.prototype.$createOrUpdate=function(e){var t=this,i=e.id,r=this.sessions.get(i);if(!r){if("quickPick"===e.type){var o=this._quickInputService.createQuickPick();o.onDidAccept(function(){
t._proxy.$onDidAccept(i)}),o.onDidChangeActive(function(e){t._proxy.$onDidChangeActive(i,e.map(function(e){return e.handle}))}),o.onDidChangeSelection(function(e){t._proxy.$onDidChangeSelection(i,e.map(function(e){return e.handle}))}),o.onDidTriggerButton(function(e){t._proxy.$onDidTriggerButton(i,e.handle)}),o.onDidChangeValue(function(e){t._proxy.$onDidChangeValue(i,e)}),o.onDidHide(function(){t._proxy.$onDidHide(i)}),r={input:o,handlesToItems:new Map}}else{var s=this._quickInputService.createInputBox();s.onDidAccept(function(){t._proxy.$onDidAccept(i)}),s.onDidTriggerButton(function(e){t._proxy.$onDidTriggerButton(i,e.handle)}),s.onDidChangeValue(function(e){t._proxy.$onDidChangeValue(i,e)}),s.onDidHide(function(){t._proxy.$onDidHide(i)}),r={input:s,handlesToItems:new Map}}this.sessions.set(i,r)}var a=r.input,l=r.handlesToItems;for(var u in e)"id"!==u&&"type"!==u&&("visible"===u?e.visible?a.show():a.hide():"items"===u?(l.clear(),e[u].forEach(function(e){l.set(e.handle,e)}),
a[u]=e[u]):a[u]="activeItems"===u||"selectedItems"===u?e[u].filter(function(e){return l.has(e)}).map(function(e){return l.get(e)}):"buttons"===u?e.buttons.map(function(e){if(-1===e.handle)return t._quickInputService.backButton;var n=e.iconPath,i=e.tooltip,r=e.handle;return{iconPath:{dark:c.default.revive(n.dark),light:n.light&&c.default.revive(n.light)},tooltip:i,handle:r}}):e[u]);return n.TPromise.as(void 0)},e.prototype.$dispose=function(e){var t=this.sessions.get(e);return t&&(t.input.dispose(),this.sessions.delete(e)),n.TPromise.as(void 0)},e=a([s.extHostNamedCustomer(o.MainContext.MainThreadQuickOpen),l(1,r.IQuickInputService)],e)}();t.MainThreadQuickOpen=u}),define(e[1283],t([1,0,20,5,50,10,4,140,67,61,28]),function(e,t,n,i,r,o,s,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){this._searchService=t,this._telemetryService=n,this._searchProvider=new Map,this._proxy=e.getProxy(h.ExtHostContext.ExtHostSearch)}return e.prototype.dispose=function(){
this._searchProvider.forEach(function(e){return i.dispose()}),this._searchProvider.clear()},e.prototype.$registerSearchProvider=function(e,t){this._searchProvider.set(e,new v(this._searchService,t,e,this._proxy))},e.prototype.$unregisterProvider=function(e){i.dispose(this._searchProvider.get(e)),this._searchProvider.delete(e)},e.prototype.$handleFindMatch=function(e,t,n){this._searchProvider.get(e).handleFindMatch(t,n)},e.prototype.$handleTelemetry=function(e,t){this._telemetryService.publicLog(e,t)},e=a([d.extHostNamedCustomer(h.MainContext.MainThreadSearch),l(1,u.ISearchService),l(2,p.ITelemetryService)],e)}();t.MainThreadSearch=f;var g=function(){function e(t,n,i){void 0===n&&(n=++e._idPool),void 0===i&&(i=new Map),this.progress=t,this.id=n,this.matches=i}return e.prototype.addMatch=function(e){var t;this.matches.has(e.resource.toString())?(t=this.matches.get(e.resource.toString()).lineMatches).push.apply(t,e.lineMatches):this.matches.set(e.resource.toString(),e),
this.progress(this.matches.get(e.resource.toString()))},e._idPool=0,e}(),v=function(){function e(e,t,n,i){this._scheme=t,this._handle=n,this._proxy=i,this._searches=new Map,this._registrations=[e.registerSearchResultProvider(this._scheme,this)]}return e.prototype.dispose=function(){i.dispose(this._registrations)},e.prototype.search=function(e){var t=this;if(n.isFalsyOrEmpty(e.folderQueries))return s.PPromise.as(void 0);var i=e.folderQueries.filter(function(e){return e.folder.scheme===t._scheme});if(!i.length)return s.TPromise.wrap(null);e=c({},e,{folderQueries:i});var o;return new s.PPromise(function(n,i,s){var a=new g(s);t._searches.set(a.id,a),(o=e.type===u.QueryType.File?t._proxy.$provideFileSearchResults(t._handle,a.id,e):t._proxy.$provideTextSearchResults(t._handle,a.id,e.contentPattern,e)).then(function(e){t._searches.delete(a.id),n({results:r.values(a.matches),stats:e.stats,limitHit:e.limitHit})},function(e){t._searches.delete(a.id),i(e)})},function(){o&&o.cancel()})},
e.prototype.handleFindMatch=function(e,t){if(this._searches.has(e)){var n=this._searches.get(e);Array.isArray(t)?t.forEach(function(e){n.addMatch({resource:o.default.revive(e.resource),lineMatches:e.lineMatches})}):n.addMatch({resource:o.default.revive(t)})}},e}()}),define(e[1284],t([1,0,189,61,67]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._statusbarService=t,this._entries=Object.create(null)}return e.prototype.dispose=function(){for(var e in this._entries)this._entries[e].dispose()},e.prototype.$setEntry=function(e,t,n,i,r,o,s,a){this.$dispose(e);var c=this._statusbarService.addEntry({text:n,tooltip:i,command:r,color:o,extensionId:t},s,a);this._entries[e]=c},e.prototype.$dispose=function(e){var t=this._entries[e];t&&t.dispose(),delete this._entries[e]},e=a([r.extHostNamedCustomer(i.MainContext.MainThreadStatusBar),l(1,n.IStatusbarService)],e)}();t.MainThreadStatusBar=o}),define(e[1285],t([1,0,4,34,61,67]),function(e,t,n,i,r,o){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){this._storageService=t}return e.prototype.dispose=function(){},e.prototype.$getValue=function(e,t){var r=this._storageService.get(t,e?i.StorageScope.GLOBAL:i.StorageScope.WORKSPACE);if(!r)return n.TPromise.as(void 0);var o;try{return o=JSON.parse(r),n.TPromise.as(o)}catch(e){return n.TPromise.wrapError(e)}},e.prototype.$setValue=function(e,t,r){var o;try{o=JSON.stringify(r),this._storageService.store(t,o,e?i.StorageScope.GLOBAL:i.StorageScope.WORKSPACE)}catch(e){return n.TPromise.wrapError(e)}},e=a([o.extHostNamedCustomer(r.MainContext.MainThreadStorage),l(1,i.IStorageService)],e)}();t.MainThreadStorage=s}),define(e[1286],t([1,0,1449,10,24,4,30,11,27,154,320,216,67,61]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v;!function(e){e.from=function(e){return{id:e.id,task:x.from(e.task)}},e.to=function(e,t){return{id:e.id,task:x.to(e.task,t)}}}(v||(v={}));var m
;!function(e){e.from=function(e,t){return{id:e.id,processId:t}}}(m||(m={}));var y;!function(e){e.from=function(e,t){return{id:e.id,exitCode:t}}}(y||(y={}));var b;!function(e){e.from=function(e){var t=r.assign(Object.create(null),e);return delete t._key,t},e.to=function(e){return h.TaskDefinition.createTaskIdentifier(e,console)}}(b||(b={}));var S;!function(e){e.from=function(e){if(void 0!==e&&null!==e)return r.assign(Object.create(null),e)},e.to=function(e){if(void 0!==e&&null!==e)return r.assign(Object.create(null),e)}}(S||(S={}));var _;!function(e){e.from=function(e){if(void 0!==e&&null!==e)return{cwd:e.cwd,env:e.env}},e.to=function(e){if(void 0!==e&&null!==e)return{cwd:e.cwd,env:e.env}}}(_||(_={}));var C;!function(e){e.is=function(e){var t=e;return t&&!!t.process},e.from=function(e){var t={process:s.isString(e.name)?e.name:e.name.value,args:e.args?e.args.map(function(e){return s.isString(e)?e:e.value}):[]};return e.options&&(t.options=_.from(e.options)),t},e.to=function(e){var t={
runtime:d.RuntimeType.Process,name:e.process,args:e.args,presentation:void 0};return e.options&&(t.options=_.to(e.options)),t}}(C||(C={}));var E;!function(e){e.from=function(e){if(void 0!==e&&null!==e){var t={cwd:e.cwd,env:e.env};return e.shell&&(t.executable=e.shell.executable,t.shellArgs=e.shell.args,t.shellQuoting=e.shell.quoting),t}},e.to=function(e){if(void 0!==e&&null!==e){var t={cwd:e.cwd,env:e.env};return e.executable&&(t.shell={executable:e.executable},e.shellArgs&&(t.shell.args=e.shellArgs),e.shellQuoting&&(t.shell.quoting=e.shellQuoting)),t}}}(E||(E={}));var w;!function(e){e.is=function(e){var t=e;return t&&(!!t.commandLine||!!t.command)},e.from=function(e){var t={};return e.name&&s.isString(e.name)&&(void 0===e.args||null===e.args||0===e.args.length)?t.commandLine=e.name:(t.command=e.name,t.args=e.args),e.options&&(t.options=E.from(e.options)),t},e.to=function(e){var t={runtime:d.RuntimeType.Shell,name:e.commandLine?e.commandLine:e.command,args:e.args,presentation:void 0}
;return e.options&&(t.options=E.to(e.options)),t}}(w||(w={}));var I;!function(e){e.from=function(e){var t={label:e.label};return e.kind===d.TaskSourceKind.Extension?(t.extensionId=e.extension,e.workspaceFolder?t.scope=e.workspaceFolder.uri:t.scope=e.scope):e.kind===d.TaskSourceKind.Workspace&&(t.extensionId="$core",t.scope=e.config.workspaceFolder.uri),t},e.to=function(e,t){var n,r;return void 0===e.scope?0===t.getWorkspace().folders.length?(n=d.TaskScope.Global,r=void 0):(n=d.TaskScope.Folder,r=t.getWorkspace().folders[0]):"number"==typeof e.scope?n=e.scope:(n=d.TaskScope.Folder,r=t.getWorkspaceFolder(i.default.revive(e.scope))),{kind:d.TaskSourceKind.Extension,label:e.label,extension:e.extensionId,scope:n,workspaceFolder:r}}}(I||(I={}));var T;!function(e){e.is=function(e){var t=e;return t&&s.isString(t.id)&&!!t.workspaceFolder}}(T||(T={}));var x;!function(e){e.from=function(e){if(void 0!==e&&null!==e&&(d.CustomTask.is(e)||d.ContributedTask.is(e))){var t={_id:e._id,name:e.name,
definition:b.from(d.Task.getTaskDefinition(e)),source:I.from(e._source),execution:void 0,presentationOptions:e.command?S.from(e.command.presentation):void 0,isBackground:e.isBackground,problemMatchers:[],hasDefinedMatchers:!!d.ContributedTask.is(e)&&e.hasDefinedMatchers};if(e.group&&(t.group=e.group),e.command&&(e.command.runtime===d.RuntimeType.Process?t.execution=C.from(e.command):e.command.runtime===d.RuntimeType.Shell&&(t.execution=w.from(e.command))),e.problemMatchers)for(var n=0,i=e.problemMatchers;n<i.length;n++){var r=i[n];s.isString(r)&&t.problemMatchers.push(r)}return t}},e.to=function(e,t){if("string"==typeof e.name){var i;if(w.is(e.execution)?i=w.to(e.execution):C.is(e.execution)&&(i=C.to(e.execution)),i){i.presentation=S.to(e.presentationOptions),i.presentation=r.assign(i.presentation||{},{echo:!0,reveal:d.RevealKind.Always,focus:!1,panel:d.PanelKind.Shared});var o=I.to(e.source,t),s=n.localize(0,null,o.label,e.name),a=b.to(e.definition);return{_id:e.source.extensionId+"."+a._key,_source:o,
_label:s,type:a.type,defines:a,name:e.name,identifier:s,group:e.group,command:i,isBackground:!!e.isBackground,problemMatchers:e.problemMatchers.slice(),hasDefinedMatchers:e.hasDefinedMatchers}}}}}(x||(x={}));var k;!function(e){e.from=function(e){return e},e.to=function(e){return e}}(k||(k={}));var D=function(){function e(e,t,n){var i=this;this._taskService=t,this._workspaceContextServer=n,this._proxy=e.getProxy(g.ExtHostContext.ExtHostTask),this._activeHandles=Object.create(null),this._taskService.onDidStateChange(function(e){var t=e.__task;e.kind===d.TaskEventKind.Start?i._proxy.$onDidStartTask(v.from(d.Task.getTaskExecution(t))):e.kind===d.TaskEventKind.ProcessStarted?i._proxy.$onDidStartTaskProcess(m.from(d.Task.getTaskExecution(t),e.processId)):e.kind===d.TaskEventKind.ProcessEnded?i._proxy.$onDidEndTaskProcess(y.from(d.Task.getTaskExecution(t),e.exitCode)):e.kind===d.TaskEventKind.End&&i._proxy.$OnDidEndTask(v.from(d.Task.getTaskExecution(t)))})}return e.prototype.dispose=function(){var e=this
;Object.keys(this._activeHandles).forEach(function(t){e._taskService.unregisterTaskProvider(parseInt(t,10))}),this._activeHandles=Object.create(null)},e.prototype.$registerTaskProvider=function(e){var t=this;return this._taskService.registerTaskProvider(e,{provideTasks:function(){return t._proxy.$provideTasks(e).then(function(e){for(var n=[],r=0,o=e.tasks;r<o.length;r++){var s=o[r],a=s._source;if(void 0!==a.__workspaceFolder&&void 0!==a.__definition){s._source.workspaceFolder=t._workspaceContextServer.getWorkspaceFolder(i.default.revive(a.__workspaceFolder)),delete a.__workspaceFolder;var c=h.TaskDefinition.createTaskIdentifier(a.__definition,console);delete a.__definition,void 0!==c&&(s.defines=c,s._id=s._id+"."+c._key,n.push(s))}else console.warn("Dropping task "+s.name+". Missing workspace folder and task definition")}return e.tasks=n,e})}}),this._activeHandles[e]=!0,o.TPromise.wrap(void 0)},e.prototype.$unregisterTaskProvider=function(e){return this._taskService.unregisterTaskProvider(e),
delete this._activeHandles[e],o.TPromise.wrap(void 0)},e.prototype.$fetchTasks=function(e){return this._taskService.tasks(k.to(e)).then(function(e){for(var t=[],n=0,i=e;n<i.length;n++){var r=i[n],o=x.from(r);o&&t.push(o)}return t})},e.prototype.$executeTask=function(e){var t=this;return new o.TPromise(function(n,r){if(T.is(e)){var o=t._workspaceContextServer.getWorkspaceFolder(i.default.revive(e.workspaceFolder));t._taskService.getTask(o,e.id,!0).then(function(i){t._taskService.run(i);var r={id:e.id,task:x.from(i)};n(r)},function(e){r(new Error("Task not found"))})}else{var s=x.to(e,t._workspaceContextServer);t._taskService.run(s);var a={id:s._id,task:x.from(s)};n(a)}})},e.prototype.$terminateTask=function(e){var t=this;return new o.TPromise(function(n,i){t._taskService.getActiveTasks().then(function(r){for(var o=0,s=r;o<s.length;o++){var a=s[o];if(e===a._id)return void t._taskService.terminate(a).then(function(e){n(void 0)},function(e){i(void 0)})}i(new Error("Task to terminate not found"))})})},
e.prototype.$registerTaskSystem=function(e,t){var n,r=this;switch(t.platform){case"win32":n=c.Platform.Windows;break;case"darwin":n=c.Platform.Mac;break;case"linux":n=c.Platform.Linux;break;default:n=c.platform}this._taskService.registerTaskSystem(e,{platform:n,uriProvider:function(e){return i.default.parse(t.scheme+"://"+t.host+":"+t.port+e)},context:this._extHostContext,resolveVariables:function(e,t){var n=[];return t.forEach(function(e){return n.push(e)}),r._proxy.$resolveVariables(e.uri,n).then(function(e){var t=new Map;return Object.keys(e).forEach(function(n){return t.set(n,e[n])}),t})}})},e=a([f.extHostNamedCustomer(g.MainContext.MainThreadTask),l(1,p.ITaskService),l(2,u.IWorkspaceContextService)],e)}();t.MainThreadTask=D}),define(e[1287],t([1,0,28,61,67]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._telemetryService=t}t=e,e.prototype.dispose=function(){},e.prototype.$publicLog=function(e,n){void 0===n&&(n=Object.create(null)),
n[t._name]=!0,this._telemetryService.publicLog(e,n)};var t;return e._name="pluginHostTelemetry",e=t=a([r.extHostNamedCustomer(i.MainContext.MainThreadTelemetry),l(1,n.ITelemetryService)],e)}();t.MainThreadTelemetry=o}),define(e[1288],t([1,0,5,94,4,61,67]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){var n=this;this.terminalService=t,this._toDispose=[],this._terminalProcesses={},this._proxy=e.getProxy(o.ExtHostContext.ExtHostTerminalService),this._toDispose.push(t.onInstanceCreated(function(e){setTimeout(function(){return n._onTerminalOpened(e)},i.EXT_HOST_CREATION_DELAY)})),this._toDispose.push(t.onInstanceDisposed(function(e){return n._onTerminalDisposed(e)})),this._toDispose.push(t.onInstanceProcessIdReady(function(e){return n._onTerminalProcessIdReady(e)})),this._toDispose.push(t.onInstanceDimensionsChanged(function(e){return n._onInstanceDimensionsChanged(e)})),this._toDispose.push(t.onInstanceRequestExtHostProcess(function(e){
return n._onTerminalRequestExtHostProcess(e)})),this._toDispose.push(t.onActiveInstanceChanged(function(e){return n._onActiveTerminalChanged(e?e.id:void 0)})),this.terminalService.terminalInstances.forEach(function(e){n._onTerminalOpened(e),e.processReady.then(function(){return n._onTerminalProcessIdReady(e)})});var r=this.terminalService.getActiveInstance();r&&this._proxy.$acceptActiveTerminalChanged(r.id)}return e.prototype.dispose=function(){this._toDispose=n.dispose(this._toDispose)},e.prototype.$createTerminal=function(e,t,n,i,o,s){var a={name:e,executable:t,args:n,cwd:i,waitOnExit:s,ignoreConfigurationCwd:!0,env:o};return r.TPromise.as(this.terminalService.createTerminal(a).id)},e.prototype.$createTerminalRenderer=function(e){var t=this.terminalService.createTerminalRenderer(e);return r.TPromise.as(t.id)},e.prototype.$show=function(e,t){var n=this.terminalService.getInstanceFromId(e);n&&(this.terminalService.setActiveInstance(n),this.terminalService.showPanel(!t))},e.prototype.$hide=function(e){
this.terminalService.getActiveInstance().id===e&&this.terminalService.hidePanel()},e.prototype.$dispose=function(e){var t=this.terminalService.getInstanceFromId(e);t&&t.dispose()},e.prototype.$terminalRendererWrite=function(e,t){var n=this.terminalService.getInstanceFromId(e);n&&n.shellLaunchConfig.isRendererOnly&&n.write(t)},e.prototype.$terminalRendererSetName=function(e,t){var n=this.terminalService.getInstanceFromId(e);n&&n.shellLaunchConfig.isRendererOnly&&n.setTitle(t,!1)},e.prototype.$terminalRendererSetDimensions=function(e,t){var n=this.terminalService.getInstanceFromId(e);n&&n.shellLaunchConfig.isRendererOnly&&n.setDimensions(t)},e.prototype.$terminalRendererRegisterOnInputListener=function(e){var t=this,n=this.terminalService.getInstanceFromId(e);n&&n.addDisposable(n.onRendererInput(function(n){return t._onTerminalRendererInput(e,n)}))},e.prototype.$sendText=function(e,t,n){var i=this.terminalService.getInstanceFromId(e);i&&i.sendText(t,n)},e.prototype.$registerOnDataListener=function(e){
var t=this,n=this.terminalService.getInstanceFromId(e);n&&n.addDisposable(n.onData(function(n){t._onTerminalData(e,n)}))},e.prototype._onActiveTerminalChanged=function(e){this._proxy.$acceptActiveTerminalChanged(e)},e.prototype._onTerminalData=function(e,t){this._proxy.$acceptTerminalProcessData(e,t)},e.prototype._onTerminalRendererInput=function(e,t){this._proxy.$acceptTerminalRendererInput(e,t)},e.prototype._onTerminalDisposed=function(e){this._proxy.$acceptTerminalClosed(e.id)},e.prototype._onTerminalOpened=function(e){this._proxy.$acceptTerminalOpened(e.id,e.title)},e.prototype._onTerminalProcessIdReady=function(e){this._proxy.$acceptTerminalProcessId(e.id,e.processId)},e.prototype._onInstanceDimensionsChanged=function(e){e.shellLaunchConfig.isRendererOnly&&this._proxy.$acceptTerminalRendererDimensions(e.id,e.cols,e.rows)},e.prototype._onTerminalRequestExtHostProcess=function(e){var t=this;this._terminalProcesses[e.proxy.terminalId]=e.proxy;var n={name:e.shellLaunchConfig.name,
executable:e.shellLaunchConfig.executable,args:e.shellLaunchConfig.args,cwd:e.shellLaunchConfig.cwd,env:e.shellLaunchConfig.env};this._proxy.$createProcess(e.proxy.terminalId,n,e.cols,e.rows),e.proxy.onInput(function(n){return t._proxy.$acceptProcessInput(e.proxy.terminalId,n)}),e.proxy.onResize(function(n,i){return t._proxy.$acceptProcessResize(e.proxy.terminalId,n,i)}),e.proxy.onShutdown(function(){return t._proxy.$acceptProcessShutdown(e.proxy.terminalId)})},e.prototype.$sendProcessTitle=function(e,t){this._terminalProcesses[e].emitTitle(t)},e.prototype.$sendProcessData=function(e,t){this._terminalProcesses[e].emitData(t)},e.prototype.$sendProcessPid=function(e,t){this._terminalProcesses[e].emitPid(t)},e.prototype.$sendProcessExit=function(e,t){this._terminalProcesses[e].emitExit(t),delete this._terminalProcesses[e]},e=a([s.extHostNamedCustomer(o.MainContext.MainThreadTerminalService),l(1,i.ITerminalService)],e)}();t.MainThreadTerminalService=c}),
define(e[1289],t([1,0,4,5,61,98,67,20,22]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i){var r=e.call(this)||this;return r.viewsService=n,r.notificationService=i,r._dataProviders=new Map,r._proxy=t.getProxy(o.ExtHostContext.ExtHostTreeViews),r}return n(t,e),t.prototype.$registerTreeViewDataProvider=function(e){var t=new p(e,this._proxy,this.notificationService);this._dataProviders.set(e,t);var n=this.getTreeViewer(e);n?(n.dataProvider=t,this.registerListeners(e,n),this._proxy.$setVisible(e,n.visible)):this.notificationService.error("No view is registered with id: "+e)},t.prototype.$reveal=function(e,t,n,i){var r=this;return this.viewsService.openView(e,i.focus).then(function(){var o=r.getTreeViewer(e);return o?o.reveal(t,n,i):null})},t.prototype.$refresh=function(e,t){var n=this.getTreeViewer(e),r=this._dataProviders.get(e);if(n&&r){var o=r.getItemsToRefresh(t);return n.refresh(o.length?o:void 0)}return i.TPromise.as(null)},
t.prototype.registerListeners=function(e,t){var n=this;this._register(t.onDidExpandItem(function(t){return n._proxy.$setExpanded(e,t.handle,!0)})),this._register(t.onDidCollapseItem(function(t){return n._proxy.$setExpanded(e,t.handle,!1)})),this._register(t.onDidChangeSelection(function(t){return n._proxy.$setSelection(e,t.map(function(e){return e.handle}))})),this._register(t.onDidChangeVisibility(function(t){return n._proxy.$setVisible(e,t)}))},t.prototype.getTreeViewer=function(e){var t=s.ViewsRegistry.getView(e);return t?t.treeViewer:null},t.prototype.dispose=function(){var t=this;this._dataProviders.forEach(function(e,n){var i=t.getTreeViewer(n);i&&(i.dataProvider=null)}),this._dataProviders.clear(),e.prototype.dispose.call(this)},t=a([c.extHostNamedCustomer(o.MainContext.MainThreadTreeViews),l(1,s.IViewsService),l(2,d.INotificationService)],t)}(r.Disposable);t.MainThreadTreeViews=h;var p=function(){function e(e,t,n){this.treeViewId=e,this._proxy=t,this.notificationService=n,this.itemsMap=new Map}
return e.prototype.getChildren=function(e){var t=this;return e&&e.children?i.TPromise.as(e.children):this._proxy.$getChildren(this.treeViewId,e?e.handle:void 0).then(function(e){return t.postGetChildren(e)},function(e){return t.notificationService.error(e),[]})},e.prototype.getItemsToRefresh=function(e){var t=[];if(e)for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n],o=this.itemsMap.get(r);if(o){var s=e[r];if(this.updateTreeItem(o,s),r===s.handle)t.push(o);else{this.itemsMap.delete(r),this.itemsMap.set(o.handle,o);var a=s.parentHandle?this.itemsMap.get(s.parentHandle):null;a&&t.push(a)}}}return t},e.prototype.postGetChildren=function(e){var t=[];if(e)for(var n=0,i=e;n<i.length;n++){var r=i[n];this.itemsMap.set(r.handle,r),t.push(r)}return t},e.prototype.updateTreeItem=function(e,t){if(t.children=t.children?t.children:null,e)for(var n=0,i=u.distinct(Object.keys(e).concat(Object.keys(t)));n<i.length;n++){var r=i[n];e[r]=t[r]}},e}()}),define(e[1290],t([1,0,61,67,4,220,434]),function(e,t,n,i,r,o,s){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t,n){this.proxy=e,this.handle=t,this.extensionId=n}return e.prototype.handleURL=function(e){return e.authority!==this.extensionId?r.TPromise.as(!1):this.proxy.$handleExternalUri(this.handle,e).then(function(){return!0})},e}(),u=function(){function e(e,t,i){this.urlService=t,this.inactiveExtensionUrlHandler=i,this.handlers=new Map,this.proxy=e.getProxy(n.ExtHostContext.ExtHostUrls)}return e.prototype.$registerProtocolHandler=function(e,t){var n=new c(this.proxy,e,t),i=this.urlService.registerHandler(n);return this.handlers.set(e,{extensionId:t,disposable:i}),this.inactiveExtensionUrlHandler.registerExtensionHandler(t,n),r.TPromise.as(null)},e.prototype.$unregisterProtocolHandler=function(e){var t=this.handlers.get(e);if(!t)return r.TPromise.as(null);var n=t.extensionId,i=t.disposable;return this.inactiveExtensionUrlHandler.unregisterExtensionHandler(n),this.handlers.delete(e),i.dispose(),r.TPromise.as(null)},
e.prototype.dispose=function(){this.handlers.forEach(function(e){return e.disposable.dispose()}),this.handlers.clear()},e=a([i.extHostNamedCustomer(n.MainContext.MainThreadUrls),l(1,o.IURLService),l(2,s.IExtensionUrlHandler)],e)}();t.MainThreadUrls=u}),define(e[1291],t([1,0,42,61,5,67,7]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){this.windowService=t,this.disposables=[],this.proxy=e.getProxy(i.ExtHostContext.ExtHostWindow),s.latch(t.onDidChangeFocus)(this.proxy.$onDidChangeWindowFocus,this.proxy,this.disposables)}return e.prototype.$getWindowVisibility=function(){return this.windowService.isFocused()},e.prototype.dispose=function(){this.disposables=r.dispose(this.disposables)},e=a([o.extHostNamedCustomer(i.MainContext.MainThreadWindow),l(1,n.IWindowService)],e)}();t.MainThreadWindow=c}),define(e[1292],t([1,0,4,9,1264,10]),function(e,t,n,i,r,o){"use strict";function s(e,t,n){if(!e||n>200)return null;if("object"==typeof e){
if(e instanceof o.default)return t.transformOutgoing(e);for(var i in e)if(Object.hasOwnProperty.call(e,i)){var r=s(e[i],t,n+1);null!==r&&(e[i]=r)}}return null}function a(e,t){var n=s(e,t,0);return null===n?e:n}function c(e,t,n){if(!e||n>200)return null;if("object"==typeof e){if(1===e.$mid)return t.transformIncoming(e);for(var i in e)if(Object.hasOwnProperty.call(e,i)){var r=c(e[i],t,n+1);null!==r&&(e[i]=r)}}return null}function l(e,t){var n=c(e,t,0);return null===n?e:n}Object.defineProperty(t,"__esModule",{value:!0}),t.transformOutgoingURIs=a;var u=function(){function e(e,t){void 0===t&&(t=null);var n=this;this._uriTransformer=t,this._isDisposed=!1,this._locals=Object.create(null),this._proxies=Object.create(null),this._lastMessageId=0,this._invokedHandlers=Object.create(null),this._pendingRPCReplies={},this._multiplexor=new h(e,function(e){return n._receiveOneMessage(e)})}return e.prototype.dispose=function(){var e=this;this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(function(t){
e._pendingRPCReplies[t].resolveErr(i.canceled())})},e.prototype.transformIncomingURIs=function(e){return this._uriTransformer?l(e,this._uriTransformer):e},e.prototype.getProxy=function(e){return this._proxies[e.id]||(this._proxies[e.id]=this._createProxy(e.id)),this._proxies[e.id]},e.prototype._createProxy=function(e){var t=this,n={get:function(n,i){return n[i]||36!==i.charCodeAt(0)||(n[i]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t._remoteCall(e,i,n)}),n[i]}};return new Proxy(Object.create(null),n)},e.prototype.set=function(e,t){return this._locals[e.id]=t,t},e.prototype.assertRegistered=function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t];if(!this._locals[i.id])throw new Error("Missing actor "+i.id+" (isMain: "+i.isMain+")")}},e.prototype._receiveOneMessage=function(e){if(!this._isDisposed){var t=JSON.parse(e);switch(this._uriTransformer&&(t=l(t,this._uriTransformer)),t.type){case 1:this._receiveRequest(t);break;case 2:this._receiveCancel(t);break;case 3:
this._receiveReply(t);break;case 4:this._receiveReplyErr(t)}}},e.prototype._receiveRequest=function(e){var t=this,n=e.id,i=e.proxyId;this._invokedHandlers[n]=this._invokeHandler(i,e.method,e.args),this._invokedHandlers[n].then(function(e){delete t._invokedHandlers[n],t._uriTransformer&&(e=a(e,t._uriTransformer)),t._multiplexor.send(p.replyOK(n,e))},function(e){delete t._invokedHandlers[n],t._multiplexor.send(p.replyErr(n,e))})},e.prototype._receiveCancel=function(e){var t=e.id;this._invokedHandlers[t]&&this._invokedHandlers[t].cancel()},e.prototype._receiveReply=function(e){var t=e.id;if(this._pendingRPCReplies.hasOwnProperty(t)){var n=this._pendingRPCReplies[t];delete this._pendingRPCReplies[t],n.resolveOk(e.res)}},e.prototype._receiveReplyErr=function(e){var t=e.id;if(this._pendingRPCReplies.hasOwnProperty(t)){var n=this._pendingRPCReplies[t];delete this._pendingRPCReplies[t];var i=null;e.err&&e.err.$isError&&((i=new Error).name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),n.resolveErr(i)}},
e.prototype._invokeHandler=function(e,t,i){try{return n.TPromise.as(this._doInvokeHandler(e,t,i))}catch(e){return n.TPromise.wrapError(e)}},e.prototype._doInvokeHandler=function(e,t,n){if(!this._locals[e])throw new Error("Unknown actor "+e);var i=this._locals[e],r=i[t];if("function"!=typeof r)throw new Error("Unknown method "+t+" on actor "+e);return r.apply(i,n)},e.prototype._remoteCall=function(e,t,o){var s=this;if(this._isDisposed)return n.TPromise.wrapError(i.canceled());var c=String(++this._lastMessageId),l=new r.LazyPromise(function(){s._multiplexor.send(p.cancel(c))});return this._pendingRPCReplies[c]=l,this._uriTransformer&&(o=a(o,this._uriTransformer)),this._multiplexor.send(p.request(c,e,t,o)),l},e}();t.RPCProtocol=u;var d,h=function(){function e(e,t){this._protocol=e,this._sendAccumulatedBound=this._sendAccumulated.bind(this),this._messagesToSend=[],this._protocol.onMessage(function(e){for(var n=0,i=e.length;n<i;n++)t(e[n])})}return e.prototype._sendAccumulated=function(){var e=this._messagesToSend
;this._messagesToSend=[],this._protocol.send(e)},e.prototype.send=function(e){0===this._messagesToSend.length&&process.nextTick(this._sendAccumulatedBound),this._messagesToSend.push(e)},e}(),p=function(){function e(){}return e.cancel=function(e){return'{"type":2,"id":"'+e+'"}'},e.request=function(e,t,n,i){return'{"type":1,"id":"'+e+'","proxyId":"'+t+'","method":"'+n+'","args":'+JSON.stringify(i)+"}"},e.replyOK=function(e,t){return void 0===t?'{"type":3,"id":"'+e+'"}':'{"type":3,"id":"'+e+'","res":'+JSON.stringify(t)+"}"},e.replyErr=function(e,t){return t instanceof Error?'{"type":4,"id":"'+e+'","err":'+JSON.stringify(i.transformErrorForSerialization(t))+"}":'{"type":4,"id":"'+e+'","err":null}'},e}();!function(e){e[e.Request=1]="Request",e[e.Cancel=2]="Cancel",e[e.Reply=3]="Reply",e[e.ReplyErr=4]="ReplyErr"}(d||(d={}))}),
define(e[446],t([1,0,768,9,24,4,139,59,93,87,10,11,1261,49,801,80,123,102,1263,61,28,36,34,6,1259,67,42,5,192,38,18,7,1260,76,14,1292,22,20,43]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K){"use strict";function U(){return j||(j=h.normalize(h.join(g.default.parse(e.toUrl("")).fsPath,"..",".build","builtInExtensions"))),j}Object.defineProperty(t,"__esModule",{value:!0});var G=null,j=null,q=function(){function e(e,t){this.builtInExtensions=e,this.control=t}return e.prototype.resolveExtensions=function(){for(var e=[],t=0,n=this.builtInExtensions;t<n.length;t++){var i=n[t],r=this.control[i.name]||"marketplace";switch(r){case"disabled":break;case"marketplace":e.push({name:i.name,path:h.join(U(),i.name)});break;default:e.push({name:i.name,path:r})}}return u.TPromise.as(e)},e}(),$=Object.hasOwnProperty,Y=u.TPromise.wrap(void 0),X=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o._instantiationService=i,o._environmentService=r,
o._extensionHostProcessFinishedActivateEvents=Object.create(null),o._extensionHostProcessRPCProtocol=null,o._extensionHostProcessCustomers=[],o._extensionHostProcessProxy=null,o._extensionHostProcessWorker=t,o.onDidCrash=o._extensionHostProcessWorker.onCrashed,o._extensionHostProcessProxy=o._extensionHostProcessWorker.start().then(function(e){return{value:o._createExtensionHostCustomers(e)}},function(e){return console.error("Error received from starting extension host"),console.error(e),null}),o._extensionHostProcessProxy.then(function(){n.forEach(function(e){return o.activateByEvent(e)})}),o}return n(t,e),t.prototype.dispose=function(){this._extensionHostProcessWorker&&this._extensionHostProcessWorker.dispose(),this._extensionHostProcessRPCProtocol&&this._extensionHostProcessRPCProtocol.dispose();for(var t=0,n=this._extensionHostProcessCustomers.length;t<n;t++){var i=this._extensionHostProcessCustomers[t];try{i.dispose()}catch(e){r.onUnexpectedError(e)}}e.prototype.dispose.call(this)},
t.prototype.canProfileExtensionHost=function(){return this._extensionHostProcessWorker&&Boolean(this._extensionHostProcessWorker.getInspectPort())},t.prototype._createExtensionHostCustomers=function(e){var t=this;this._environmentService.logExtensionHostCommunication&&(e=function(e){return e.onMessage(function(e){console.log("%c[Extension → Window]%c[len: "+B.pad(e.length,5," ")+"]","color: darkgreen","color: grey",e)}),{onMessage:e.onMessage,send:function(t){e.send(t),console.log("%c[Window → Extension]%c[len: "+B.pad(t.length,5," ")+"]","color: darkgreen","color: grey",t)}}}(e)),this._extensionHostProcessRPCProtocol=new V.RPCProtocol(e);for(var n={getProxy:function(e){return t._extensionHostProcessRPCProtocol.getProxy(e)},set:function(e,n){return t._extensionHostProcessRPCProtocol.set(e,n)},assertRegistered:function(e){return t._extensionHostProcessRPCProtocol.assertRegistered(e)}},i=A.ExtHostCustomersRegistry.getNamedCustomers(),r=0,o=i.length;r<o;r++){
var s=i[r],a=s[0],c=s[1],l=this._instantiationService.createInstance(c,n);this._extensionHostProcessCustomers.push(l),this._extensionHostProcessRPCProtocol.set(a,l)}for(var u=A.ExtHostCustomersRegistry.getCustomers(),r=0,o=u.length;r<o;r++){var c=u[r],l=this._instantiationService.createInstance(c,n);this._extensionHostProcessCustomers.push(l)}var d=Object.keys(w.MainContext).map(function(e){return w.MainContext[e]});return this._extensionHostProcessRPCProtocol.assertRegistered(d),this._extensionHostProcessRPCProtocol.getProxy(w.ExtHostContext.ExtHostExtensionService)},t.prototype.activateByEvent=function(e){var t=this;return this._extensionHostProcessFinishedActivateEvents[e]||!this._extensionHostProcessProxy?Y:this._extensionHostProcessProxy.then(function(t){return t.value.$activateByEvent(e)}).then(function(){t._extensionHostProcessFinishedActivateEvents[e]=!0})},t.prototype.startExtensionHostProfile=function(){if(this._extensionHostProcessWorker){var e=this._extensionHostProcessWorker.getInspectPort()
;if(e)return this._instantiationService.createInstance(F.ExtensionHostProfiler,e).start()}throw new Error("Extension host not running or no inspect port available")},t=a([l(2,k.IInstantiationService),l(3,T.IEnvironmentService)],t)}(R.Disposable);t.ExtensionHostProcessManager=X;var Q=function(t){function w(e,n,r,o,s,a,c,l,u){var d=t.call(this)||this;return d._instantiationService=e,d._notificationService=n,d._environmentService=r,d._telemetryService=o,d._extensionEnablementService=s,d._storageService=a,d._windowService=c,d.extensionManagementService=u,d._onDidChangeExtensionsStatus=d._register(new N.Emitter),d.onDidChangeExtensionsStatus=d._onDidChangeExtensionsStatus.event,d._registry=null,d._installedExtensionsReady=new P.Barrier,d._isDev=!d._environmentService.isBuilt||d._environmentService.isExtensionDevelopment,d._extensionsMessages={},d._allRequestedActivateEvents=Object.create(null),d._onDidRegisterExtensions=new N.Emitter,d._extensionHostProcessManagers=[],
d._extensionHostProcessActivationTimes=Object.create(null),d._extensionHostExtensionRuntimeErrors=Object.create(null),d.startDelayed(l),d._environmentService.disableExtensions&&d._notificationService.prompt(z.Severity.Info,i.localize(0,null),[{label:i.localize(1,null),run:function(){d._windowService.reloadWindow()}}]),d}return n(w,t),w.prototype.startDelayed=function(e){var t=this,n=!1,i=function(){n||(n=!0,t._startExtensionHostProcess([]),t._scanAndHandleExtensions())};e.when(M.LifecyclePhase.Restoring).then(function(){setTimeout(function(){return i()},800)}),e.when(M.LifecyclePhase.Running).then(function(){return i()})},w.prototype.dispose=function(){t.prototype.dispose.call(this)},Object.defineProperty(w.prototype,"onDidRegisterExtensions",{get:function(){return this._onDidRegisterExtensions.event},enumerable:!0,configurable:!0}),w.prototype.restartExtensionHost=function(){this._stopExtensionHostProcess(),this._startExtensionHostProcess(Object.keys(this._allRequestedActivateEvents))},
w.prototype.startExtensionHost=function(){this._startExtensionHostProcess(Object.keys(this._allRequestedActivateEvents))},w.prototype.stopExtensionHost=function(){this._stopExtensionHostProcess()},w.prototype._stopExtensionHostProcess=function(){for(var e=Object.keys(this._extensionHostProcessActivationTimes),t=0;t<this._extensionHostProcessManagers.length;t++)this._extensionHostProcessManagers[t].dispose();this._extensionHostProcessManagers=[],this._extensionHostProcessActivationTimes=Object.create(null),this._extensionHostExtensionRuntimeErrors=Object.create(null),e.length>0&&this._onDidChangeExtensionsStatus.fire(e)},w.prototype._startExtensionHostProcess=function(e){var t=this;this._stopExtensionHostProcess();var n=this._instantiationService.createInstance(D.ExtensionHostProcessWorker,this.getExtensions()),i=this._instantiationService.createInstance(X,n,e);i.onDidCrash(function(e){var n=e[0],i=e[1];return t._onExtensionHostCrashed(n,i)}),this._extensionHostProcessManagers.push(i)},
w.prototype._onExtensionHostCrashed=function(e,t){var n=this;console.error("Extension host terminated unexpectedly. Code: ",e," Signal: ",t),this._stopExtensionHostProcess();var r=i.localize(2,null);87===e&&(r=i.localize(3,null)),this._notificationService.prompt(z.Severity.Error,r,[{label:i.localize(4,null),run:function(){return n._windowService.openDevTools()}},{label:i.localize(5,null),run:function(){return n._startExtensionHostProcess(Object.keys(n._allRequestedActivateEvents))}}])},w.prototype.activateByEvent=function(e){var t=this;return this._installedExtensionsReady.isOpen()?this._registry.containsActivationEvent(e)?(this._allRequestedActivateEvents[e]=!0,this._activateByEvent(e)):Y:(this._allRequestedActivateEvents[e]=!0,this._installedExtensionsReady.wait().then(function(){return t._activateByEvent(e)}))},w.prototype._activateByEvent=function(e){return u.TPromise.join(this._extensionHostProcessManagers.map(function(t){return t.activateByEvent(e)})).then(function(){})},
w.prototype.whenInstalledExtensionsRegistered=function(){return this._installedExtensionsReady.wait()},w.prototype.getExtensions=function(){var e=this;return this._installedExtensionsReady.wait().then(function(){return e._registry.getAllExtensionDescriptions()})},w.prototype.readExtensionPointContributions=function(e){var t=this;return this._installedExtensionsReady.wait().then(function(){for(var n=t._registry.getAllExtensionDescriptions(),i=[],r=0,o=0,s=n.length;o<s;o++){var a=n[o];a.contributes&&$.call(a.contributes,e.name)&&(i[r++]=new y.ExtensionPointContribution(a,a.contributes[e.name]))}return i})},w.prototype.getExtensionsStatus=function(){var e=Object.create(null);if(this._registry)for(var t=this._registry.getAllExtensionDescriptions(),n=0,i=t.length;n<i;n++){var r=t[n].id;e[r]={messages:this._extensionsMessages[r],activationTimes:this._extensionHostProcessActivationTimes[r],runtimeErrors:this._extensionHostExtensionRuntimeErrors[r]}}return e},w.prototype.canProfileExtensionHost=function(){
for(var e=0,t=this._extensionHostProcessManagers.length;e<t;e++){if(this._extensionHostProcessManagers[e].canProfileExtensionHost())return!0}return!1},w.prototype.startExtensionHostProfile=function(){for(var e=0,t=this._extensionHostProcessManagers.length;e<t;e++){var n=this._extensionHostProcessManagers[e];if(n.canProfileExtensionHost())return n.startExtensionHostProfile()}throw new Error("Extension host not running or no inspect port available")},w.prototype._scanAndHandleExtensions=function(){var e=this;this._scanExtensions().then(function(t){return e._getRuntimeExtensions(t)}).then(function(t){e._registry=new m.ExtensionDescriptionRegistry(t);for(var n=e._registry.getAllExtensionDescriptions(),i=C.ExtensionsRegistry.getExtensionPoints(),r=function(t){return e._handleExtensionPointMessage(t)},o=0,s=i.length;o<s;o++)w._handleExtensionPoint(i[o],n,r);O.mark("extensionHostReady"),e._installedExtensionsReady.open(),e._onDidRegisterExtensions.fire(void 0),e._onDidChangeExtensionsStatus.fire(n.map(function(e){
return e.id}))})},w.prototype._scanExtensions=function(){var e=this,t=new Z(function(t,n,i){e._logOrShowMessage(t,e._isDev?function(e,t){return e?"["+e+"]: "+t:t}(n,i):i)});return w._scanInstalledExtensions(this._windowService,this._notificationService,this._environmentService,t).then(function(e){var n=e.system,r=e.user,o=e.development,s={};return n.forEach(function(e){s[e.id]=e}),r.forEach(function(e){s.hasOwnProperty(e.id)&&t.warn(e.extensionLocation.fsPath,i.localize(6,null,s[e.id].extensionLocation.fsPath,e.extensionLocation.fsPath)),s[e.id]=e}),o.forEach(function(e){t.info("",i.localize(7,null,e.extensionLocation.fsPath)),s.hasOwnProperty(e.id)&&t.warn(e.extensionLocation.fsPath,i.localize(8,null,s[e.id].extensionLocation.fsPath,e.extensionLocation.fsPath)),s[e.id]=e}),Object.keys(s).map(function(e){return s[e]})})},w.prototype._getRuntimeExtensions=function(e){var t=this;return this._extensionEnablementService.getDisabledExtensions().then(function(n){for(var i={},r=[],o=[{id:_.BetterMergeId
}],s=!t._environmentService.isBuilt||!!t._environmentService.extensionDevelopmentPath&&W.default.nameLong.indexOf("Insiders")>=0,a=t._environmentService.args["enable-proposed-api"]||[],c=function(e){if(!(t._environmentService.isExtensionDevelopment&&e.extensionLocation.scheme===K.Schemas.file&&0===e.extensionLocation.fsPath.indexOf(t._environmentService.extensionDevelopmentPath))&&n.some(function(t){return _.areSameExtensions(t,e)}))return"continue";if(!e.isBuiltin){var c=o.filter(function(t){return _.areSameExtensions(t,{id:e.id})})[0];if(c)return r.push(c),"continue"}i[e.id]=t._updateEnableProposedApi(e,s,a)},l=0,d=e;l<d.length;l++){c(d[l])}var h=Object.keys(i).map(function(e){return i[e]});return t._telemetryService.publicLog("extensionsScanned",{totalCount:h.length,disabledCount:n.length}),r.length?t.extensionManagementService.getInstalled(S.LocalExtensionType.User).then(function(e){var n=e.filter(function(e){return r.some(function(t){return _.areSameExtensions({id:_.getGalleryExtensionIdFromLocal(e)},t)
})});return u.TPromise.join(n.map(function(e){return t._extensionEnablementService.setEnablement(e,S.EnablementState.Disabled)}))}).then(function(){return t._storageService.store(_.BetterMergeDisabledNowKey,!0),h}):h})},w.prototype._updateEnableProposedApi=function(e,t,n){return!H.isFalsyOrEmpty(W.default.extensionAllowedProposedApi)&&W.default.extensionAllowedProposedApi.indexOf(e.id)>=0?e.enableProposedApi=!0:e.enableProposedApi&&!e.isBuiltin&&(!t&&n.indexOf(e.id)<0?(e.enableProposedApi=!1,console.error("Extension '"+e.id+" cannot use PROPOSED API (must started out of dev or enabled via --enable-proposed-api)")):console.warn("Extension '"+e.id+"' uses PROPOSED API which is subject to change and removal without notice.")),e},w.prototype._handleExtensionPointMessage=function(e){this._extensionsMessages[e.extensionId]||(this._extensionsMessages[e.extensionId]=[]),this._extensionsMessages[e.extensionId].push(e);var t=this._registry.getExtensionDescription(e.extensionId),n="["+e.extensionId+"]: "+e.message
;if(t&&t.isUnderDevelopment?this._showMessageToUser(e.type,n):this._logMessageInConsole(e.type,n),!this._isDev&&e.extensionId){var i=e.type,r=e.extensionId,o=e.extensionPointId,s=e.message;this._telemetryService.publicLog("extensionsMessage",{type:i,extensionId:r,extensionPointId:o,message:s})}},w._validateExtensionsCache=function(e,t,n,a,l){return o(this,void 0,u.TPromise,function(){var o,u,d,p,g,v,m,y,S,_;return s(this,function(s){switch(s.label){case 0:return o=h.join(n.userDataPath,b.MANIFEST_CACHE_FOLDER),u=h.join(o,a),g=(p=JSON).parse,m=(v=JSON).stringify,[4,E.ExtensionScanner.scanExtensions(l,new ee)];case 1:return d=g.apply(p,[m.apply(v,[s.sent()])]),[4,this._readExtensionCache(n,a)];case 2:if(!(y=s.sent()))return[2];if(S=y.result,c.equals(d,S))return[2];s.label=3;case 3:return s.trys.push([3,5,,6]),[4,f.del(u)];case 4:return s.sent(),[3,6];case 5:return _=s.sent(),r.onUnexpectedError(_),console.error(_),[3,6];case 6:return t.prompt(z.Severity.Error,i.localize(9,null),[{label:i.localize(10,null),
run:function(){return e.reloadWindow()}}]),[2]}})})},w._readExtensionCache=function(e,t){return o(this,void 0,u.TPromise,function(){var n,i,r,o;return s(this,function(s){switch(s.label){case 0:n=h.join(e.userDataPath,b.MANIFEST_CACHE_FOLDER),i=h.join(n,t),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,f.readFile(i,"utf8")];case 2:return r=s.sent(),[2,JSON.parse(r)];case 3:return o=s.sent(),[3,4];case 4:return[2,null]}})})},w._writeExtensionCache=function(e,t,n){return o(this,void 0,u.TPromise,function(){var i,r,o,a;return s(this,function(s){switch(s.label){case 0:i=h.join(e.userDataPath,b.MANIFEST_CACHE_FOLDER),r=h.join(i,t),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,f.mkdirp(i)];case 2:return s.sent(),[3,4];case 3:return o=s.sent(),[3,4];case 4:return s.trys.push([4,6,,7]),[4,f.writeFile(r,JSON.stringify(n))];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),[3,7];case 7:return[2]}})})},w._scanExtensionsWithCache=function(e,t,n,i,a,c){return o(this,void 0,u.TPromise,function(){
var l,u,d,h,p,v,m=this;return s(this,function(y){switch(y.label){case 0:if(a.devMode)return[2,E.ExtensionScanner.scanExtensions(a,c)];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,f.stat(a.absoluteFolderPath)];case 2:return l=y.sent(),a.mtime=l.mtime.getTime(),[3,4];case 3:return u=y.sent(),[3,4];case 4:return[4,this._readExtensionCache(n,i)];case 5:return(d=y.sent())&&d.input&&E.ExtensionScannerInput.equals(d.input,a)?(setTimeout(function(){return o(m,void 0,void 0,function(){var o;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this._validateExtensionsCache(e,t,n,i,a)];case 1:return s.sent(),[3,3];case 2:return o=s.sent(),r.onUnexpectedError(o),[3,3];case 3:return[2]}})})},5e3),[2,d.result.map(function(e){return e.extensionLocation=g.default.revive(e.extensionLocation),e})]):(h=new J(c),[4,E.ExtensionScanner.scanExtensions(a,h)]);case 6:return p=y.sent(),0!==h.errorCnt?[3,8]:(v={input:a,result:p},[4,this._writeExtensionCache(n,i,v)]);case 7:y.sent(),y.label=8;case 8:
return[2,p]}})})},w._scanInstalledExtensions=function(t,n,i,r){var o=this;return(v.translationsConfigFile?f.readFile(v.translationsConfigFile,"utf8").then(function(e){try{return JSON.parse(e)}catch(e){return Object.create(null)}},function(e){return Object.create(null)}):u.TPromise.as(Object.create(null))).then(function(s){var a=d.default.version,c=W.default.commit,l=!!process.env.VSCODE_DEV,m=v.locale,y=o._scanExtensionsWithCache(t,n,i,b.BUILTIN_MANIFEST_CACHE_FILE,new E.ExtensionScannerInput(a,c,m,l,(G||(G=h.normalize(h.join(g.default.parse(e.toUrl("")).fsPath,"..","extensions"))),G),!0,!1,s),r),S=y;if(l){var _=h.normalize(h.join(g.default.parse(e.toUrl("")).fsPath,"..","build","builtInExtensions.json")),C=f.readFile(_,"utf8").then(function(e){return JSON.parse(e)}),w=h.join(p.homedir(),".vscode-oss-dev","extensions","control.json"),I=f.readFile(w,"utf8").then(function(e){return JSON.parse(e)},function(){return{}}),T=new E.ExtensionScannerInput(a,c,m,l,U(),!0,!1,s),x=u.TPromise.join([C,I]).then(function(e){
var t=e[0],n=e[1];return new q(t,n)}).then(function(e){return E.ExtensionScanner.scanExtensions(T,r,e)});S=u.TPromise.join([y,x]).then(function(e){for(var t=e[0],n=e[1],i=Object.create(null),r=0,o=t.length;r<o;r++)i[t[r].id]=t[r];for(var r=0,o=n.length;r<o;r++)i[n[r].id]=n[r];var s=Object.keys(i).map(function(e){return i[e]});return s.sort(function(e,t){var n=h.basename(e.extensionLocation.fsPath),i=h.basename(t.extensionLocation.fsPath);return n<i?-1:n>i?1:0}),s})}var k=i.disableExtensions||!i.extensionsPath?u.TPromise.as([]):o._scanExtensionsWithCache(t,n,i,b.USER_MANIFEST_CACHE_FILE,new E.ExtensionScannerInput(a,c,m,l,i.extensionsPath,!1,!1,s),r),D=i.isExtensionDevelopment?E.ExtensionScanner.scanOneOrMultipleExtensions(new E.ExtensionScannerInput(a,c,m,l,i.extensionDevelopmentPath,!1,!0,s),r):u.TPromise.as([]);return u.TPromise.join([S,k,D]).then(function(e){return{system:e[0],user:e[1],development:e[2]}}).then(null,function(e){return r.error("",e),{system:[],user:[],development:[]}})})},
w._handleExtensionPoint=function(e,t,n){for(var i=[],r=0,o=0,s=t.length;o<s;o++){var a=t[o];a.contributes&&$.call(a.contributes,e.name)&&(i[r++]={description:a,value:a.contributes[e.name],collector:new C.ExtensionMessageCollector(n,a,e.name)})}e.acceptUsers(i)},w.prototype._showMessageToUser=function(e,t){e===z.Severity.Error||e===z.Severity.Warning?this._notificationService.notify({severity:e,message:t}):this._logMessageInConsole(e,t)},w.prototype._logMessageInConsole=function(e,t){e===z.Severity.Error?console.error(t):e===z.Severity.Warning?console.warn(t):console.log(t)},w.prototype._logOrShowMessage=function(e,t){this._isDev?this._showMessageToUser(e,t):this._logMessageInConsole(e,t)},w.prototype._onExtensionActivated=function(e,t,n,i,r,o){this._extensionHostProcessActivationTimes[e]=new y.ActivationTimes(t,n,i,r,o),this._onDidChangeExtensionsStatus.fire([e])},w.prototype._onExtensionRuntimeError=function(e,t){this._extensionHostExtensionRuntimeErrors[e]||(this._extensionHostExtensionRuntimeErrors[e]=[]),
this._extensionHostExtensionRuntimeErrors[e].push(t),this._onDidChangeExtensionsStatus.fire([e])},w.prototype._addMessage=function(e,t,n){this._extensionsMessages[e]||(this._extensionsMessages[e]=[]),this._extensionsMessages[e].push({type:t,message:n,extensionId:null,extensionPointId:null}),this._onDidChangeExtensionsStatus.fire([e])},w=a([l(0,k.IInstantiationService),l(1,z.INotificationService),l(2,T.IEnvironmentService),l(3,I.ITelemetryService),l(4,S.IExtensionEnablementService),l(5,x.IStorageService),l(6,L.IWindowService),l(7,M.ILifecycleService),l(8,S.IExtensionManagementService)],w)}(R.Disposable);t.ExtensionService=Q;var Z=function(){function e(e){this._messageHandler=e}return e.prototype.error=function(e,t){this._messageHandler(z.Severity.Error,e,t)},e.prototype.warn=function(e,t){this._messageHandler(z.Severity.Warning,e,t)},e.prototype.info=function(e,t){this._messageHandler(z.Severity.Info,e,t)},e}();t.Logger=Z;var J=function(){function e(e){this._actual=e,this.errorCnt=0,this.warnCnt=0,
this.infoCnt=0}return e.prototype.error=function(e,t){this._actual.error(e,t)},e.prototype.warn=function(e,t){this._actual.warn(e,t)},e.prototype.info=function(e,t){this._actual.info(e,t)},e}(),ee=function(){function e(){}return e.prototype.error=function(e,t){},e.prototype.warn=function(e,t){},e.prototype.info=function(e,t){},e}()}),define(e[1294],t([1,0,49,61,446,67]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){t instanceof r.ExtensionService&&(this._extensionService=t)}return e.prototype.dispose=function(){},e.prototype.$localShowMessage=function(e,t){this._extensionService._logOrShowMessage(e,t)},e.prototype.$onExtensionActivated=function(e,t,n,i,r,o){this._extensionService._onExtensionActivated(e,t,n,i,r,o)},e.prototype.$onExtensionRuntimeError=function(e,t){var n=new Error;n.name=t.name,n.message=t.message,n.stack=t.stack,this._extensionService._onExtensionRuntimeError(e,n),console.error("["+e+"]"+n.message),console.error(n.stack)
},e.prototype.$onExtensionActivationFailed=function(e){},e.prototype.$addMessage=function(e,t,n){this._extensionService._addMessage(e,t,n)},e=a([o.extHostNamedCustomer(i.MainContext.MainThreadExtensionService),l(1,n.IExtensionService)],e)}();t.MainThreadExtensionService=s}),define(e[1295],t([1,0,150,191,10,33,11,59,5]),function(e,t,n,i,r,o,s,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n,i){this.textResourceConfigurationService=e,this.environmentService=t,this.contextService=n,this.encodingOverride=i||this.getEncodingOverrides(),this.toDispose=[],this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(function(){e.encodingOverride=e.getEncodingOverrides()}))},e.prototype.getReadEncoding=function(e,t,n){var r
;return t&&t.encoding?r=n.encoding===i.UTF8&&t.encoding===i.UTF8?i.UTF8_with_bom:t.encoding:n.encoding?r=n.encoding===i.UTF8?i.UTF8_with_bom:n.encoding:this.textResourceConfigurationService.getValue(e,"files.encoding")===i.UTF8_with_bom&&(r=i.UTF8),this.getEncodingForResource(e,r)},e.prototype.getWriteEncoding=function(e,t){return this.getEncodingForResource(e,t)},e.prototype.getEncodingForResource=function(e,t){var n,r=this.getEncodingOverride(e);return(n=r||(t||this.textResourceConfigurationService.getValue(e,"files.encoding")))&&i.encodingExists(n)||(n=i.UTF8),n},e.prototype.getEncodingOverrides=function(){var e=[];return e.push({parent:r.default.file(this.environmentService.appSettingsHome),encoding:i.UTF8}),e.push({extension:n.WORKSPACE_EXTENSION,encoding:i.UTF8}),this.contextService.getWorkspace().folders.forEach(function(t){e.push({parent:r.default.file(a.join(t.uri.fsPath,".vscode")),encoding:i.UTF8})}),e},e.prototype.getEncodingOverride=function(e){
if(e&&this.encodingOverride&&this.encodingOverride.length)for(var t=0;t<this.encodingOverride.length;t++){var n=this.encodingOverride[t];if(n.parent&&o.isParent(e.fsPath,n.parent.fsPath,!s.isLinux))return n.encoding;if(n.extension&&a.extname(e.fsPath)==="."+n.extension)return n.encoding}return null},e.prototype.dispose=function(){this.toDispose=c.dispose(this.toDispose)},e}();t.ResourceEncodings=l}),define(e[447],t([1,0,412,191,33,9]),function(e,t,i,r,a,c){"use strict";function l(e,t,r){if(e.capabilities&a.FileSystemProviderCapabilities.FileOpenReadWriteClose)return function(e,t,r){return new(function(i){function r(e){return i.call(this,e)||this}return n(r,i),r.prototype._write=function(n,i,r){return o(this,void 0,void 0,function(){var i,o,a;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),"number"==typeof this._fd?[3,2]:(i=this,[4,e.open(t)]);case 1:i._fd=s.sent(),s.label=2;case 2:return[4,e.write(this._fd,this._pos,n,0,n.length)];case 3:return o=s.sent(),this._pos+=o,r(),[3,5]
;case 4:return a=s.sent(),r(a),[3,5];case 5:return[2]}})})},r.prototype.end=function(){var t=this;e.close(this._fd).then(function(e){i.prototype.end.call(t)},function(e){t.emit("error",e)})},r}(i.Writable))}(e,t);if(e.capabilities&a.FileSystemProviderCapabilities.FileReadWrite)return function(e,t,r){return new(function(i){function o(e){var t=i.call(this,e)||this;return t._chunks=[],t}return n(o,i),o.prototype._write=function(e,t,n){this._chunks.push(e),n(null)},o.prototype.end=function(){var n=this;e.writeFile(t,Buffer.concat(this._chunks),r).then(function(e){i.prototype.end.call(n)},function(e){n.emit("error",e)})},o}(i.Writable))}(e,t,r);throw c.illegalArgument()}function u(e,t,r){if(e.capabilities&a.FileSystemProviderCapabilities.FileOpenReadWriteClose)return function(e,t,r){return new(function(i){function a(e){var t=i.call(this,e)||this;return t._pos=r,t._reading=!1,t.once("close",function(e){return t._final()}),t}return n(a,i),a.prototype._read=function(n){return o(this,void 0,void 0,function(){
var n,i,r,o;return s(this,function(s){switch(s.label){case 0:if(this._reading)return[2];this._reading=!0,s.label=1;case 1:return s.trys.push([1,7,,8]),"number"==typeof this._fd?[3,3]:(n=this,[4,e.open(t)]);case 2:n._fd=s.sent(),s.label=3;case 3:i=Buffer.allocUnsafe(65536),s.label=4;case 4:return this._reading?[4,e.read(this._fd,this._pos,i,0,i.length)]:[3,6];case 5:return 0===(r=s.sent())?(this._reading=!1,this.push(null)):(this._reading=this.push(i.slice(0,r)),this._pos+=r),[3,4];case 6:return[3,8];case 7:return o=s.sent(),this.emit("error",o),[3,8];case 8:return[2]}})})},a.prototype._final=function(){return o(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return"number"!=typeof this._fd?[3,2]:[4,e.close(this._fd)];case 1:t.sent(),t.label=2;case 2:return[2]}})})},a}(i.Readable))}(e,t,r);if(e.capabilities&a.FileSystemProviderCapabilities.FileReadWrite)return function(e,t,r){return new(function(i){function o(){return null!==i&&i.apply(this,arguments)||this}return n(o,i),
o.prototype._read=function(n){var i=this;this._readOperation||(this._readOperation=e.readFile(t).then(function(e){i.push(e.slice(r)),i.push(null)},function(e){i.emit("error",e),i.push(null)}))},o}(i.Readable))}(e,t,r);throw c.illegalArgument()}Object.defineProperty(t,"__esModule",{value:!0}),t.createWritableOfProvider=l,t.createReadableOfProvider=u,t.createReadableOfSnapshot=function(e){return new i.Readable({read:function(){try{for(var t=void 0,n=!0;n&&"string"==typeof(t=e.read());)n=this.push(t);"string"!=typeof t&&this.push(null)}catch(e){this.emit("error",e)}},encoding:r.UTF8})}}),define(e[275],t([1,0,10,33,11]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toFileChangesEvent=function(e){return new i.FileChangesEvent(e.map(function(e){return{type:e.type,resource:n.default.file(e.path)}}))},t.normalize=function(e){for(var t=new o,n=0;n<e.length;n++){var i=e[n];t.processEvent(i)}return t.normalize()};var o=function(){function e(){this.normalized=[],
this.mapPathToChange=Object.create(null)}return e.prototype.processEvent=function(e){var t=this.mapPathToChange[e.path];if(t){var n=t.type,r=e.type;n===i.FileChangeType.ADDED&&r===i.FileChangeType.DELETED?(delete this.mapPathToChange[e.path],this.normalized.splice(this.normalized.indexOf(t),1)):n===i.FileChangeType.DELETED&&r===i.FileChangeType.ADDED?t.type=i.FileChangeType.UPDATED:n===i.FileChangeType.ADDED&&r===i.FileChangeType.UPDATED||(t.type=r)}else this.normalized.push(e),this.mapPathToChange[e.path]=e},e.prototype.normalize=function(){var e=[],t=[];return this.normalized.filter(function(t){return t.type===i.FileChangeType.DELETED||(e.push(t),!1)}).sort(function(e,t){return e.path.length-t.path.length}).filter(function(e){return!t.some(function(t){return i.isParent(e.path,t,!r.isLinux)})&&(t.push(e.path),!0)}).concat(e)},e}()}),define(e[1298],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.service=e}
return e.prototype.call=function(e,t){switch(e){case"initialize":return this.service.initialize(t);case"setRoots":return this.service.setRoots(t)}},e}();t.WatcherChannel=n;var i=function(){function e(e){this.channel=e}return e.prototype.initialize=function(e){return this.channel.call("initialize",e)},e.prototype.setRoots=function(e){return this.channel.call("setRoots",e)},e}();t.WatcherChannelClient=i}),define(e[1299],t([1,0,4,131,258,10,275,1298,5,43,9]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function t(e,t,n,i,r){this.contextService=e,this.configurationService=t,this.onFileChanges=n,this.errorLogger=i,this.verboseLogging=r,this.isDisposed=!1,this.restartCounter=0,this.toDispose=[]}return t.prototype.startWatching=function(){var s=this,c=new r.Client(o.default.parse(e.toUrl("bootstrap")).fsPath,{serverName:"Watcher",args:["--type=watcherService"],env:{AMD_ENTRYPOINT:"vs/workbench/services/files/node/watcher/nsfw/watcherApp",
PIPE_LOGGING:"true",VERBOSE_LOGGING:this.verboseLogging}});this.toDispose.push(c);var l=i.getNextTickChannel(c.getChannel("watcher"));return this.service=new a.WatcherChannelClient(l),this.service.initialize(this.verboseLogging).then(null,function(e){if(!s.isDisposed&&!u.isPromiseCanceledError(e))return n.TPromise.wrapError(e)},function(e){return s.onRawFileEvents(e)}).done(function(){s.isDisposed||(s.restartCounter<=t.MAX_RESTARTS?(s.errorLogger("[FileWatcher] terminated unexpectedly and is restarted again..."),s.restartCounter++,s.startWatching()):s.errorLogger("[FileWatcher] failed to start after retrying for some time, giving up. Please report this as a bug report!"))},function(e){s.isDisposed||s.errorLogger(e)}),this.updateFolders(),this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(function(){return s.updateFolders()})),this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("files.watcherExclude")&&s.updateFolders()})),function(){
return s.dispose()}},t.prototype.updateFolders=function(){var e=this;this.isDisposed||this.service.setRoots(this.contextService.getWorkspace().folders.filter(function(e){return e.uri.scheme===l.Schemas.file}).map(function(t){var n=e.configurationService.getValue({resource:t.uri}),i=[];return n.files&&n.files.watcherExclude&&(i=Object.keys(n.files.watcherExclude).filter(function(e){return!!n.files.watcherExclude[e]})),{basePath:t.uri.fsPath,ignored:i}}))},t.prototype.onRawFileEvents=function(e){this.isDisposed||e.length>0&&this.onFileChanges(s.toFileChangesEvent(e))},t.prototype.dispose=function(){this.isDisposed=!0,this.toDispose=c.dispose(this.toDispose)},t.MAX_RESTARTS=5,t}();t.FileWatcher=d}),define(e[1300],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"initialize":return this.service.initialize(t);case"setRoots":return this.service.setRoots(t)}},e}();t.WatcherChannel=n
;var i=function(){function e(e){this.channel=e}return e.prototype.initialize=function(e){return this.channel.call("initialize",e)},e.prototype.setRoots=function(e){return this.channel.call("setRoots",e)},e}();t.WatcherChannelClient=i}),define(e[1301],t([1,0,4,131,258,10,275,1300,9,5,43]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function t(e,t,n,i,r){this.contextService=e,this.configurationService=t,this.onFileChanges=n,this.errorLogger=i,this.verboseLogging=r,this.isDisposed=!1,this.restartCounter=0,this.toDispose=[]}return t.prototype.startWatching=function(){var s=this,l=new r.Client(o.default.parse(e.toUrl("bootstrap")).fsPath,{serverName:"Watcher",args:["--type=watcherService"],env:{AMD_ENTRYPOINT:"vs/workbench/services/files/node/watcher/unix/watcherApp",PIPE_LOGGING:"true",VERBOSE_LOGGING:this.verboseLogging}});this.toDispose.push(l);var u=i.getNextTickChannel(l.getChannel("watcher"));this.service=new a.WatcherChannelClient(u);var d={
verboseLogging:this.verboseLogging};return this.service.initialize(d).then(null,function(e){if(!s.isDisposed&&!c.isPromiseCanceledError(e))return n.TPromise.wrapError(e)},function(e){return s.onRawFileEvents(e)}).done(function(){s.isDisposed||(s.restartCounter<=t.MAX_RESTARTS?(s.errorLogger("[FileWatcher] terminated unexpectedly and is restarted again..."),s.restartCounter++,s.startWatching()):s.errorLogger("[FileWatcher] failed to start after retrying for some time, giving up. Please report this as a bug report!"))},function(e){s.isDisposed||s.errorLogger(e)}),this.updateFolders(),this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(function(){return s.updateFolders()})),this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("files.watcherExclude")&&s.updateFolders()})),function(){return s.dispose()}},t.prototype.updateFolders=function(){var e=this
;this.isDisposed||this.service.setRoots(this.contextService.getWorkspace().folders.filter(function(e){return e.uri.scheme===u.Schemas.file}).map(function(t){var n=e.configurationService.getValue({resource:t.uri}),i=[];return n.files&&n.files.watcherExclude&&(i=Object.keys(n.files.watcherExclude).filter(function(e){return!!n.files.watcherExclude[e]})),{basePath:t.uri.fsPath,ignored:i,recursive:!1}}))},t.prototype.onRawFileEvents=function(e){this.isDisposed||e.length>0&&this.onFileChanges(s.toFileChangesEvent(e))},t.prototype.dispose=function(){this.isDisposed=!0,this.toDispose=l.dispose(this.toDispose)},t.MAX_RESTARTS=5,t}();t.FileWatcher=d}),define(e[1302],t([1,0,156,33,479,148,10]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function t(e,t,n,i,r){this.watchedFolder=e,this.ignored=t,this.eventCallback=n,this.errorCallback=i,this.verboseLogging=r,this.restartCounter=0,this.startWatcher()}return t.prototype.startWatcher=function(){
var i=this,a=[this.watchedFolder];this.verboseLogging&&a.push("-verbose"),this.handle=n.spawn(s.default.parse(e.toUrl("vs/workbench/services/files/node/watcher/win32/CodeHelper.exe")).fsPath,a);var c=new r.LineDecoder;this.handle.stdout.on("data",function(e){var n=[];c.write(e).forEach(function(e){var r=e.split("|");if(2===r.length){var s=Number(r[0]),a=r[1];if(s>=0&&s<3){if(i.ignored&&i.ignored.some(function(e){return o.match(e,a)}))return;n.push({type:t.changeTypeMap[s],path:a})}else console.log("%c[File Watcher]","color: darkgreen",r[1])}}),n.length>0&&i.eventCallback(n)}),this.handle.on("error",function(e){return i.onError(e)}),this.handle.stderr.on("data",function(e){return i.onError(e)}),this.handle.on("exit",function(e,t){return i.onExit(e,t)})},t.prototype.onError=function(e){this.errorCallback("[FileWatcher] process error: "+e.toString())},t.prototype.onExit=function(e,n){this.handle&&(this.errorCallback("[FileWatcher] terminated unexpectedly (code: "+e+", signal: "+n+")"),
this.restartCounter<=t.MAX_RESTARTS?(this.errorCallback("[FileWatcher] is restarted again..."),this.restartCounter++,this.startWatcher()):this.errorCallback("[FileWatcher] Watcher failed to start after retrying for some time, giving up. Please report this as a bug report!"))},t.prototype.dispose=function(){this.handle&&(this.handle.kill(),this.handle=null)},t.MAX_RESTARTS=5,t.changeTypeMap=[i.FileChangeType.UPDATED,i.FileChangeType.ADDED,i.FileChangeType.DELETED],t}();t.OutOfProcessWin32FolderWatcher=a}),define(e[1303],t([1,0,275,1302,59,14,25]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t,n,i,r){this.contextService=e,this.ignored=t,this.onFileChanges=n,this.errorLogger=i,this.verboseLogging=r}return e.prototype.startWatching=function(){var e=this,t=r.normalize(this.contextService.getWorkspace().folders[0].uri.fsPath);t&&0===t.indexOf("\\\\")&&o.endsWith(t,s.sep)&&(t=o.rtrim(t,s.sep))
;var n=new i.OutOfProcessWin32FolderWatcher(t,this.ignored,function(t){return e.onRawFileEvents(t)},function(t){return e.onError(t)},this.verboseLogging);return function(){e.isDisposed=!0,n.dispose()}},e.prototype.onRawFileEvents=function(e){this.isDisposed||e.length>0&&this.onFileChanges(n.toFileChangesEvent(e))},e.prototype.onError=function(e){this.isDisposed||this.errorLogger(e)},e}();t.FileWatcher=a}),define(e[1304],t([1,0,59,144,93,163,853,33,802,25,50,20,4,24,166,18,10,770,11,5,27,87,191,480,1301,1303,275,7,1299,145,38,62,43,34,22,9,76,1295,447]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W){"use strict";function B(e,t){var n,i;return"number"==typeof t?(n=e,i=t):(n=e.size,i=e.mtime.getTime()),'"'+o.createHash("sha1").update(String(n)+String(i)).digest("hex")+'"'}Object.defineProperty(t,"__esModule",{value:!0});var V=function(){function e(e,t,n){void 0===n&&(n=[]),this.bufferSize=e,this._capacity=t,this._free=n}return e.prototype.acquire=function(){
return 0===this._free.length?Buffer.allocUnsafe(this.bufferSize):this._free.shift()},e.prototype.release=function(e){this._free.length<=this._capacity&&this._free.push(e)},e._64K=new e(65536,5),e}(),z=function(){function t(e,n,i,r,o,s,a,c){void 0===c&&(c=Object.create(null)),this.contextService=e,this.environmentService=n,this.textResourceConfigurationService=i,this.configurationService=r,this.lifecycleService=o,this.storageService=s,this.notificationService=a,this.options=c,this._onDidChangeFileSystemProviderRegistrations=new x.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this.toDispose=[],this._onFileChanges=new x.Emitter,this.toDispose.push(this._onFileChanges),this._onAfterOperation=new x.Emitter,this.toDispose.push(this._onAfterOperation),this.activeFileChangesWatchers=new u.ResourceMap,this.fileChangesWatchDelayer=new g.ThrottledDelayer(t.FS_EVENT_DELAY),this.undeliveredRawFileChangesEvents=[],
this._encoding=new F.ResourceEncodings(i,n,e,this.options.encodingOverride),this.registerListeners()}return Object.defineProperty(t.prototype,"encoding",{get:function(){return this._encoding},enumerable:!0,configurable:!0}),t.prototype.registerListeners=function(){var e=this;this.lifecycleService.when(A.LifecyclePhase.Running).then(function(){e.setupFileWatching()}),this.toDispose.push(this.contextService.onDidChangeWorkbenchState(function(){e.lifecycleService.phase>=A.LifecyclePhase.Running&&e.setupFileWatching()})),this.lifecycleService.onShutdown(this.dispose,this)},t.prototype.handleError=function(e){var n=this,i=e?e.toString():void 0;i&&(P.onUnexpectedError(i),i.indexOf(t.NET_VERSION_ERROR)>=0&&!this.storageService.getBoolean(t.NET_VERSION_ERROR_IGNORE_KEY,O.StorageScope.WORKSPACE)&&this.notificationService.prompt(M.Severity.Warning,m.localize(0,null),[{label:m.localize(1,null),run:function(){return window.open("https://go.microsoft.com/fwlink/?LinkId=786533")}},{label:m.localize(2,null),isSecondary:!0,
run:function(){return n.storageService.store(t.NET_VERSION_ERROR_IGNORE_KEY,!0,O.StorageScope.WORKSPACE)}}]),i.indexOf(t.ENOSPC_ERROR)>=0&&!this.storageService.getBoolean(t.ENOSPC_ERROR_IGNORE_KEY,O.StorageScope.WORKSPACE)&&this.notificationService.prompt(M.Severity.Warning,m.localize(3,null,N.default.nameLong),[{label:m.localize(4,null),run:function(){return window.open("https://go.microsoft.com/fwlink/?linkid=867693")}},{label:m.localize(5,null),isSecondary:!0,run:function(){return n.storageService.store(t.ENOSPC_ERROR_IGNORE_KEY,!0,O.StorageScope.WORKSPACE)}}]))},Object.defineProperty(t.prototype,"onFileChanges",{get:function(){return this._onFileChanges.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onAfterOperation",{get:function(){return this._onAfterOperation.event},enumerable:!0,configurable:!0}),t.prototype.setupFileWatching=function(){var e=this;this.activeWorkspaceFileChangeWatcher&&this.activeWorkspaceFileChangeWatcher.dispose()
;var t=this.contextService.getWorkbenchState();if(t!==S.WorkbenchState.EMPTY&&!this.options.disableWatcher){var n=this.configurationService.getValue();if(n.files&&n.files.useExperimentalFileWatcher||t===S.WorkbenchState.WORKSPACE){var i=new k.FileWatcher(this.contextService,this.configurationService,function(t){return e._onFileChanges.fire(t)},function(t){return e.handleError(t)},this.environmentService.verbose);this.activeWorkspaceFileChangeWatcher=b.toDisposable(i.startWatching())}else{var r=[];if(n.files&&n.files.watcherExclude&&(r=Object.keys(n.files.watcherExclude).filter(function(e){return!!n.files.watcherExclude[e]})),y.isWindows){var o=new I.FileWatcher(this.contextService,r,function(t){return e._onFileChanges.fire(t)},function(t){return e.handleError(t)},this.environmentService.verbose);this.activeWorkspaceFileChangeWatcher=b.toDisposable(o.startWatching())}else{var s=new w.FileWatcher(this.contextService,this.configurationService,function(t){return e._onFileChanges.fire(t)},function(t){
return e.handleError(t)},this.environmentService.verbose);this.activeWorkspaceFileChangeWatcher=b.toDisposable(s.startWatching())}}}},t.prototype.registerProvider=function(e,t){throw new Error("not implemented")},t.prototype.canHandleResource=function(e){return e.scheme===R.Schemas.file},t.prototype.resolveFile=function(e,t){return this.resolve(e,t)},t.prototype.resolveFiles=function(e){var t=this;return h.TPromise.join(e.map(function(e){return t.resolve(e.resource,e.options).then(function(e){return{stat:e,success:!0}},function(e){return{stat:void 0,success:!1}})}))},t.prototype.existsFile=function(e){return this.resolveFile(e).then(function(){return!0},function(){return!1})},t.prototype.resolveContent=function(e,t){return this.resolveStreamContent(e,t).then(function(e){return new h.TPromise(function(t,n){var i={resource:e.resource,name:e.name,mtime:e.mtime,etag:e.etag,encoding:e.encoding,isReadonly:e.isReadonly,value:""};return e.value.on("data",function(e){return i.value+=e}),e.value.on("error",function(e){
return n(e)}),e.value.on("end",function(e){return t(i)}),i})})},t.prototype.resolveStreamContent=function(e,t){var n=this;if(e.scheme!==R.Schemas.file||!e.fsPath)return h.TPromise.wrapError(new a.FileOperationError(m.localize(6,null,e.toString(!0)),a.FileOperationResult.FILE_INVALID_PATH,t));var i={resource:void 0,name:void 0,mtime:void 0,etag:void 0,encoding:void 0,isReadonly:!1,value:void 0},r=new D.CancellationTokenSource,o=function(e){return r.cancel(),h.TPromise.wrapError(e)},s=this.resolveFile(e).then(function(e){if(i.resource=e.resource,i.name=e.name,i.mtime=e.mtime,i.etag=e.etag,e.isDirectory)return o(new a.FileOperationError(m.localize(7,null),a.FileOperationResult.FILE_IS_DIRECTORY,t));if(t&&t.etag&&t.etag===e.etag)return o(new a.FileOperationError(m.localize(8,null),a.FileOperationResult.FILE_NOT_MODIFIED_SINCE,t));if("number"==typeof e.size){
if(e.size>Math.max(1024*n.environmentService.args["max-memory"]*1024||0,c.MAX_HEAP_SIZE))return o(new a.FileOperationError(m.localize(9,null),a.FileOperationResult.FILE_EXCEED_MEMORY_LIMIT));if(e.size>c.MAX_FILE_SIZE)return o(new a.FileOperationError(m.localize(10,null),a.FileOperationResult.FILE_TOO_LARGE))}},function(n){return o("ENOENT"===n.code?new a.FileOperationError(m.localize(11,null,e.toString(!0)),a.FileOperationResult.FILE_NOT_FOUND,t):n)});return(t&&t.etag?s.then(function(){return n.fillInContents(i,e,t,r.token)}):h.TPromise.join([s,this.fillInContents(i,e,t,r.token)]).then(function(){},function(e){var t=e[0],n=e[1];return a.FileOperationError.isFileOperationError(t)?h.TPromise.wrapError(t):a.FileOperationError.isFileOperationError(n)?h.TPromise.wrapError(n):h.TPromise.wrapError(t||n)})).then(function(){return r.dispose(),i},function(e){return r.dispose(),h.TPromise.wrapError(e)})},t.prototype.fillInContents=function(e,t,n,i){return this.resolveFileData(t,n,i).then(function(t){
e.encoding=t.encoding,e.value=t.stream})},t.prototype.resolveFileData=function(e,t,n){var r=this,o=V._64K.acquire(),s={encoding:void 0,stream:void 0};return new h.TPromise(function(l,u){i.open(r.toAbsolutePath(e),"r",function(d,p){if(d)return"ENOENT"===d.code&&(d=new a.FileOperationError(m.localize(12,null,e.toString(!0)),a.FileOperationResult.FILE_NOT_FOUND,t)),u(d);var f,g=0,v=function(e){e&&("EISDIR"===e.code&&(e=new a.FileOperationError(m.localize(13,null),a.FileOperationResult.FILE_IS_DIRECTORY,t)),f?f.emit("error",e):u(e)),f&&f.end(),V._64K.release(o),p&&i.close(p,function(e){e&&r.handleError("resolveFileData#close(): "+e.toString())})},y=function(e){n.isCancellationRequested?v(new Error("cancelled")):0===e?v():e<o.length?f.write(o.slice(0,e),S):f.write(o,S)},b=t&&t.position||null,S=function(){i.read(p,o,0,o.length,b,function(n,i){if(g+=i,"number"==typeof b&&(b+=i),
g>Math.max(1024*r.environmentService.args["max-memory"]*1024||0,c.MAX_HEAP_SIZE)&&v(new a.FileOperationError(m.localize(14,null),a.FileOperationResult.FILE_EXCEED_MEMORY_LIMIT)),g>c.MAX_FILE_SIZE)v(new a.FileOperationError(m.localize(15,null),a.FileOperationResult.FILE_TOO_LARGE,t));else if(n)v(n);else if(f)y(i);else{var u=t&&t.autoGuessEncoding||r.textResourceConfigurationService.getValue(e,"files.autoGuessEncoding");h.TPromise.as(C.detectEncodingFromBuffer({buffer:o,bytesRead:i},u)).then(function(n){t&&t.acceptTextOnly&&n.seemsBinary?v(new a.FileOperationError(m.localize(16,null),a.FileOperationResult.FILE_IS_BINARY,t)):(s.encoding=r._encoding.getReadEncoding(e,t,n),s.stream=f=C.decodeStream(s.encoding),l(s),y(i))}).then(void 0,function(e){v(e)})}})};S()})})},t.prototype.updateContent=function(e,t,n){return void 0===n&&(n=Object.create(null)),n.writeElevated?this.doUpdateContentElevated(e,t,n):this.doUpdateContent(e,t,n)},t.prototype.doUpdateContent=function(e,t,i){var r=this
;void 0===i&&(i=Object.create(null));var o=this.toAbsolutePath(e);return this.checkFileBeforeWriting(o,i).then(function(s){return(s?h.TPromise.as(null):_.mkdirp(n.dirname(o))).then(function(){var n=r._encoding.getWriteEncoding(e,i.encoding),a=h.TPromise.as(!1);return n===C.UTF16be||n===C.UTF16le||n===C.UTF8_with_bom?a=h.TPromise.as(!0):s&&n===C.UTF8&&(a=i.overwriteEncoding?h.TPromise.as(!1):C.detectEncodingByBOM(o).then(function(e){return e===C.UTF8})),a.then(function(i){return r.doSetContentsAndResolve(e,o,t,i,n).then(void 0,function(a){return s&&"EPERM"===a.code&&y.isWindows?_.truncate(o,0).then(function(){return r.doSetContentsAndResolve(e,o,t,i,n,{flag:"r+"})}):h.TPromise.wrapError(a)})})})}).then(null,function(t){return"EACCES"===t.code||"EPERM"===t.code?h.TPromise.wrapError(new a.FileOperationError(m.localize(17,null,e.toString(!0)),a.FileOperationResult.FILE_PERMISSION_DENIED,i)):h.TPromise.wrapError(t)})},t.prototype.doSetContentsAndResolve=function(e,t,n,i,r,o){var s=this,a=o||Object.create(null)
;return(i||r!==C.UTF8)&&(a.encoding={charset:r,addBOM:i}),("string"==typeof n?_.writeFile(t,n,a):_.writeFile(t,W.createReadableOfSnapshot(n),a)).then(function(){return s.resolve(e)})},t.prototype.doUpdateContentElevated=function(t,i,o){var s=this;void 0===o&&(o=Object.create(null));var c=this.toAbsolutePath(t);return this.checkFileBeforeWriting(c,o,o.overwriteReadonly).then(function(a){var l=p.assign(Object.create(null),o);l.writeElevated=!1,l.encoding=s._encoding.getWriteEncoding(t,o.encoding);var u=n.join(r.tmpdir(),"code-elevated-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,6));return s.updateContent(v.default.file(u),i,l).then(function(){return g.asWinJSImport(new Promise(function(t,n){e(["sudo-prompt"],t,n)})).then(function(e){return new h.TPromise(function(t,i){var r={name:s.environmentService.appNameLong.replace("-",""),icns:y.isMacintosh&&s.environmentService.isBuilt?n.join(n.dirname(s.environmentService.appRoot),N.default.nameShort+".icns"):void 0
},a=['"'+s.environmentService.cliPath+'"'];o.overwriteReadonly&&a.push("--file-chmod"),a.push("--file-write",'"'+u+'"','"'+c+'"'),e.exec(a.join(" "),r,function(e,n,r){e||r?i(e||r):t(void 0)})})}).then(function(){return _.del(u,r.tmpdir()).then(function(){return s.resolve(t)})})})}).then(null,function(e){return s.environmentService.verbose&&s.handleError("Unable to write to file '"+t.toString(!0)+"' as elevated user ("+e+")"),a.FileOperationError.isFileOperationError(e)||(e=new a.FileOperationError(m.localize(18,null,t.toString(!0)),a.FileOperationResult.FILE_PERMISSION_DENIED,o)),h.TPromise.wrapError(e)})},t.prototype.createFile=function(e,t,n){var i=this;void 0===t&&(t=""),void 0===n&&(n=Object.create(null));var r=this.toAbsolutePath(e);return(n.overwrite?h.TPromise.as(!1):_.exists(r)).then(function(r){return r&&!n.overwrite?h.TPromise.wrapError(new a.FileOperationError(m.localize(19,null,e.toString(!0)),a.FileOperationResult.FILE_MODIFIED_SINCE,n)):i.updateContent(e,t).then(function(t){
return i._onAfterOperation.fire(new a.FileOperationEvent(e,a.FileOperation.CREATE,t)),t})})},t.prototype.createFolder=function(e){var t=this,n=this.toAbsolutePath(e);return _.mkdirp(n).then(function(){return t.resolve(e).then(function(n){return t._onAfterOperation.fire(new a.FileOperationEvent(e,a.FileOperation.CREATE,n)),n})})},t.prototype.checkFileBeforeWriting=function(e,t,n){var i=this;return void 0===t&&(t=Object.create(null)),_.exists(e).then(function(r){return r?_.stat(e).then(function(o){if(o.isDirectory())return h.TPromise.wrapError(new Error("Expected file is actually a directory"));if("number"==typeof t.mtime&&"string"==typeof t.etag&&t.mtime<o.mtime.getTime()&&t.etag!==B(o.size,t.mtime))return h.TPromise.wrapError(new a.FileOperationError(m.localize(20,null),a.FileOperationResult.FILE_MODIFIED_SINCE,t));if(!(n||128&o.mode)){if(!t.overwriteReadonly)return i.readOnlyError(t);var s=o.mode;return s|=128,_.chmod(e,s).then(function(){return _.stat(e).then(function(e){
return 128&e.mode?r:i.readOnlyError(t)})})}return h.TPromise.as(r)}):h.TPromise.as(r)})},t.prototype.readOnlyError=function(e){return h.TPromise.wrapError(new a.FileOperationError(m.localize(21,null),a.FileOperationResult.FILE_READ_ONLY,e))},t.prototype.moveFile=function(e,t,n){return this.moveOrCopyFile(e,t,!1,n)},t.prototype.copyFile=function(e,t,n){return this.moveOrCopyFile(e,t,!0,n)},t.prototype.moveOrCopyFile=function(e,t,n,i){var r=this,o=this.toAbsolutePath(e),s=this.toAbsolutePath(t);return this.doMoveOrCopyFile(o,s,n,i).then(function(){return r.resolve(t).then(function(t){return r._onAfterOperation.fire(new a.FileOperationEvent(e,n?a.FileOperation.COPY:a.FileOperation.MOVE,t)),t})})},t.prototype.doMoveOrCopyFile=function(e,t,i,r){var o=this;return a.isParent(t,e,!y.isLinux)?h.TPromise.wrapError(new Error("Unable to move/copy when source path is parent of target path")):_.exists(t).then(function(s){var c=e.toLowerCase()===t.toLowerCase(),u=e===t
;if(s&&!c&&!r)return h.TPromise.wrapError(new a.FileOperationError(m.localize(22,null),a.FileOperationResult.FILE_MOVE_CONFLICT));var d=h.TPromise.wrap(void 0);if(s&&!c){if(l.isEqualOrParent(e,t,!y.isLinux))return h.TPromise.wrapError(new Error(m.localize(23,null)));d=o.del(v.default.file(t),{recursive:!0})}return d.then(function(){return _.mkdirp(n.dirname(t)).then(function(){return u?h.TPromise.wrap(null):i?g.nfcall(f.copy,e,t):g.nfcall(f.mv,e,t)}).then(function(){return s})})})},t.prototype.del=function(e,t){return t&&t.useTrash?this.doMoveItemToTrash(e):this.doDelete(e,t&&t.recursive)},t.prototype.doMoveItemToTrash=function(t){var i=t.fsPath;return e("electron").shell.moveItemToTrash(i)?(this._onAfterOperation.fire(new a.FileOperationEvent(t,a.FileOperation.DELETE)),h.TPromise.as(void 0)):h.TPromise.wrapError(new Error(y.isWindows?m.localize(24,null,n.basename(i)):m.localize(25,null,n.basename(i))))},t.prototype.doDelete=function(e,t){var i=this,o=this.toAbsolutePath(e)
;return(t?h.TPromise.as(void 0):_.stat(o).then(function(e){return e.isDirectory()?_.readdir(o).then(function(e){return 0===e.length?h.TPromise.as(void 0):h.TPromise.wrapError(new Error(m.localize(26,null,n.basename(o))))}):h.TPromise.as(void 0)},function(e){return h.TPromise.as(void 0)})).then(function(){return _.del(o,r.tmpdir()).then(function(){i._onAfterOperation.fire(new a.FileOperationEvent(e,a.FileOperation.DELETE))})})},t.prototype.toAbsolutePath=function(e){var t;return t=e instanceof v.default?e:e.resource,s.ok(t&&t.scheme===R.Schemas.file,"Invalid resource: "+t),n.normalize(t.fsPath)},t.prototype.resolve=function(e,t){return void 0===t&&(t=Object.create(null)),this.toStatResolver(e).then(function(e){return e.resolve(t)})},t.prototype.toStatResolver=function(e){var t=this,n=this.toAbsolutePath(e);return _.statLink(n).then(function(n){var i=n.isSymbolicLink,r=n.stat;return new H(e,i,r.isDirectory(),r.mtime.getTime(),r.size,t.environmentService.verbose?function(e){return t.handleError(e)}:void 0)})},
t.prototype.watchFileChanges=function(e){var i=this;s.ok(e&&e.scheme===R.Schemas.file,"Invalid resource for watching: "+e);var r=this.activeFileChangesWatchers.get(e);if(!r){var o=e.fsPath,c=n.basename(e.fsPath);(r=f.watch(o,function(n,r){(r&&r!==c||"rename"===n)&&(i.unwatchFileChanges(e),setTimeout(function(){i.existsFile(e).done(function(t){t?i.watchFileChanges(e):i.onRawFileChange({type:a.FileChangeType.DELETED,path:o})})},t.FS_REWATCH_DELAY)),i.onRawFileChange({type:a.FileChangeType.UPDATED,path:o})},function(e){return i.handleError(e)}))&&this.activeFileChangesWatchers.set(e,r)}},t.prototype.onRawFileChange=function(e){var t=this;this.undeliveredRawFileChangesEvents.push(e),this.environmentService.verbose&&console.log("%c[node.js Watcher]%c","color: green","color: black",e.type===a.FileChangeType.ADDED?"[ADDED]":e.type===a.FileChangeType.DELETED?"[DELETED]":"[CHANGED]",e.path),this.fileChangesWatchDelayer.trigger(function(){var e=t.undeliveredRawFileChangesEvents;t.undeliveredRawFileChangesEvents=[]
;var n=T.normalize(e);return t.environmentService.verbose&&n.forEach(function(e){console.log("%c[node.js Watcher]%c >> normalized","color: green","color: black",e.type===a.FileChangeType.ADDED?"[ADDED]":e.type===a.FileChangeType.DELETED?"[DELETED]":"[CHANGED]",e.path)}),t._onFileChanges.fire(T.toFileChangesEvent(n)),h.TPromise.as(null)})},t.prototype.unwatchFileChanges=function(e){var t=this.activeFileChangesWatchers.get(e);t&&(t.close(),this.activeFileChangesWatchers.delete(e))},t.prototype.dispose=function(){this.toDispose=b.dispose(this.toDispose),this.activeWorkspaceFileChangeWatcher&&(this.activeWorkspaceFileChangeWatcher.dispose(),this.activeWorkspaceFileChangeWatcher=null),this.activeFileChangesWatchers.forEach(function(e){return e.close()}),this.activeFileChangesWatchers.clear()},t.FS_EVENT_DELAY=50,t.FS_REWATCH_DELAY=300,t.NET_VERSION_ERROR="System.MissingMethodException",t.NET_VERSION_ERROR_IGNORE_KEY="ignoreNetVersionError",t.ENOSPC_ERROR="ENOSPC",t.ENOSPC_ERROR_IGNORE_KEY="ignoreEnospcError",t}()
;t.FileService=z;var H=function(){function e(e,t,n,i,r,o){this.resource=e,this.isSymbolicLink=t,this.isDirectory=n,this.mtime=i,this.size=r,this.errorLogger=o,s.ok(e&&e.scheme===R.Schemas.file,"Invalid resource: "+e),this.name=L.getBaseLabel(e),this.etag=B(r,i)}return e.prototype.resolve=function(e){var t=this,n={resource:this.resource,isDirectory:this.isDirectory,isSymbolicLink:this.isSymbolicLink,isReadonly:!1,name:this.name,etag:this.etag,size:this.size,mtime:this.mtime};if(this.isDirectory){var i=null;return e&&e.resolveTo&&(i=[],e.resolveTo.forEach(function(e){i.push(e.fsPath)})),new h.TPromise(function(r,o){t.resolveChildren(t.resource.fsPath,i,e&&e.resolveSingleChildDescendants,function(e){e=d.coalesce(e),n.children=e||[],r(n)})})}return h.TPromise.as(n)},e.prototype.resolveChildren=function(e,t,i,r){var o=this;f.readdir(e,function(s,a){if(s)return o.errorLogger&&o.errorLogger(s),r(null);E.parallel(a,function(r,s){var c,u=v.default.file(n.resolve(e,r)),h=!1,p=o;E.sequence(function(e){
p.errorLogger&&p.errorLogger(e),s(null,null)},function(){f.statLink(u.fsPath,this)},function(e){var t=this;c=e.stat,h=e.isSymbolicLink,c.isDirectory()?f.readdir(u.fsPath,function(e,n){t(null,n?n.length:0)}):this(null,0)},function(e){var n={resource:u,isDirectory:c.isDirectory(),isSymbolicLink:h,isReadonly:!1,name:r,mtime:c.mtime.getTime(),etag:B(c),size:c.size};if(!c.isDirectory())return s(null,n);var o=!1;1===a.length&&i?o=!0:e>0&&t&&t.some(function(e){return l.isEqualOrParent(e,u.fsPath,!y.isLinux)})&&(o=!0),o?p.resolveChildren(u.fsPath,t,i,function(e){e=d.coalesce(e),n.children=e||[],s(null,n)}):s(null,n)})},function(e,t){r(t)})})},e}();t.StatResolver=H}),define(e[1305],t([1,0,59,20,5,50,43,4,191,127,771,17,36,33,38,22,34,27,49,1304,447]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";function T(e,t,n){var r=t[0],o=t[1],s={resource:r,name:i.posix.basename(r.path),isDirectory:0!=(o.type&y.FileType.Directory),isSymbolicLink:0!=(o.type&y.FileType.SymbolicLink),
isReadonly:!!(e.capabilities&y.FileSystemProviderCapabilities.Readonly),mtime:o.mtime,size:o.size,etag:o.mtime.toString(29)+o.size.toString(31)};return s.isDirectory&&n&&n([r,o])?e.readdir(r).then(function(t){return h.TPromise.join(t.map(function(t){var o=t[0],s=t[1],a=r.with({path:i.posix.join(r.path,o)});return T(e,[a,new k(s)],n)})).then(function(e){return s.children=e,s})}):h.TPromise.as(s)}function x(e,t,n){var i=u.TernarySearchTree.forPaths();return i.set(t[0].toString(),!0),r.isFalsyOrEmpty(n)||n.forEach(function(e){return i.set(e.toString(),!0)}),T(e,t,function(e){return Boolean(i.findSuperstr(e[0].toString())||i.get(e[0].toString()))})}Object.defineProperty(t,"__esModule",{value:!0});var k=function(){return function(e){this.type=e,this.mtime=0,this.ctime=0,this.size=0}}();t.toDeepIFileStat=x;var D=function(){function e(e,t,n){var i=this;this._fileService=e,this._configurationService=t,this._contextService=n,this._disposables=[],this._watches=new Map,this._refresh(),
this._disposables.push(this._contextService.onDidChangeWorkspaceFolders(function(e){for(var t=0,n=e.removed;t<n.length;t++){var r=n[t];i._unwatchWorkspace(r.uri)}for(var o=0,s=e.added;o<s.length;o++){var a=s[o];i._watchWorkspace(a.uri)}})),this._disposables.push(this._contextService.onDidChangeWorkbenchState(function(e){i._refresh()})),this._disposables.push(this._configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("files.watcherExclude")&&i._refresh()}))}return e.prototype.dispose=function(){this._unwatchWorkspaces(),this._disposables=c.dispose(this._disposables)},e.prototype._refresh=function(){this._unwatchWorkspaces();for(var e=0,t=this._contextService.getWorkspace().folders;e<t.length;e++){var n=t[e];n.uri.scheme!==d.Schemas.file&&this._watchWorkspace(n.uri)}},e.prototype._watchWorkspace=function(e){var t=[],n=this._configurationService.getValue({resource:e});if(n.files&&n.files.watcherExclude)for(var i in n.files.watcherExclude)!0===n.files.watcherExclude[i]&&t.push(i)
;this._watches.set(e.toString(),e),this._fileService.watchFileChanges(e,{recursive:!0,excludes:t})},e.prototype._unwatchWorkspace=function(e){this._watches.has(e.toString())&&(this._fileService.unwatchFileChanges(e),this._watches.delete(e.toString()))},e.prototype._unwatchWorkspaces=function(){var e=this;this._watches.forEach(function(t){return e._fileService.unwatchFileChanges(t)}),this._watches.clear()},e=a([l(1,v.IConfigurationService),l(2,C.IWorkspaceContextService)],e)}(),A=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,o,i,c,r,s,n,a)||this;return l._extensionService=t,l._storageService=n,l._environmentService=i,l._activeWatches=new Map,l._provider=new Map,l._lastKnownSchemes=JSON.parse(l._storageService.get("remote_schemes",void 0,"[]")),l.toDispose.push(new D(l,r,o)),l}return n(t,e),t.prototype.registerProvider=function(e,t){var n=this;if(this._provider.has(e))throw new Error("a provider for that scheme is already registered");this._provider.set(e,t),
this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:e,provider:t}),this._storageService.store("remote_schemes",JSON.stringify(u.keys(this._provider)));var i=t.onDidChangeFile(function(e){n._onFileChanges.fire(new y.FileChangesEvent(e))});return{dispose:function(){n._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:e,provider:t}),n._provider.delete(e),i.dispose()}}},t.prototype.canHandleResource=function(e){return!(e.scheme!==d.Schemas.file&&!this._provider.has(e.scheme))||!(this._lastKnownSchemes.indexOf(e.scheme)<0)&&(this._environmentService.isBuilt||console.warn("[remote] cache information required for "+e.toString()),!0)},t.prototype._tryParseFileOperationResult=function(e){if(e instanceof Error){var t=/^(.+) \(FileSystemError\)$/.exec(e.name);if(t){var n;switch(t[1]){case"EntryNotFound":n=y.FileOperationResult.FILE_NOT_FOUND;break;case"EntryIsADirectory":n=y.FileOperationResult.FILE_IS_DIRECTORY;break;case"NoPermissions":n=y.FileOperationResult.FILE_PERMISSION_DENIED
;break;case"EntryExists":n=y.FileOperationResult.FILE_MOVE_CONFLICT;break;case"EntryNotADirectory":default:n=void 0}return n}}},t.prototype._withProvider=function(e){var t=this;if(!i.posix.isAbsolute(e.path))throw new y.FileOperationError(g.localize(0,null,e.toString(!0)),y.FileOperationResult.FILE_INVALID_PATH);return h.TPromise.join([this._extensionService.activateByEvent("onFileSystem:"+e.scheme)]).then(function(){var n=t._provider.get(e.scheme);if(!n){var i=new Error;throw i.name="ENOPRO",i.message="no provider for "+e.toString(),i}return n})},t.prototype.existsFile=function(t){return t.scheme===d.Schemas.file?e.prototype.existsFile.call(this,t):this.resolveFile(t).then(function(e){return!0},function(e){return!1})},t.prototype.resolveFile=function(t,n){return t.scheme===d.Schemas.file?e.prototype.resolveFile.call(this,t,n):this._doResolveFiles([{resource:t,options:n}]).then(function(e){if(1===e.length&&e[0].success)return e[0].stat
;throw new y.FileOperationError(g.localize(1,null,t.toString(!0)),y.FileOperationResult.FILE_NOT_FOUND)})},t.prototype.resolveFiles=function(t){for(var n,i=[],o=0,s=t;o<s.length;o++){var a=s[o];n&&n[0].resource.scheme===a.resource.scheme||(n=[],i.push(n)),n.push(a)}for(var c=[],l=0,u=i;l<u.length;l++){var p=u[l];p[0].resource.scheme===d.Schemas.file?c.push(e.prototype.resolveFiles.call(this,p)):c.push(this._doResolveFiles(p))}return h.TPromise.join(c).then(function(e){return r.flatten(e)})},t.prototype._doResolveFiles=function(e){return this._withProvider(e[0].resource).then(function(t){var n=[],i=e.map(function(e,i){return t.stat(e.resource).then(function(r){return x(t,[e.resource,r],e.options&&e.options.resolveTo).then(function(e){n[i]={stat:e,success:!0}})},function(e){n[i]={stat:void 0,success:!1}})});return h.TPromise.join(i).then(function(){return n})})},t.prototype.resolveContent=function(n,i){
return n.scheme===d.Schemas.file?e.prototype.resolveContent.call(this,n,i):this._readFile(n,i).then(t._asContent)},t.prototype.resolveStreamContent=function(t,n){return t.scheme===d.Schemas.file?e.prototype.resolveStreamContent.call(this,t,n):this._readFile(t,n)},t.prototype._readFile=function(e,t){var n=this;return void 0===t&&(t=Object.create(null)),this._withProvider(e).then(function(i){return n.resolveFile(e).then(function(r){if(r.isDirectory)throw new y.FileOperationError(g.localize(2,null),y.FileOperationResult.FILE_IS_DIRECTORY,t);if(r.etag===t.etag)throw new y.FileOperationError(g.localize(3,null),y.FileOperationResult.FILE_NOT_MODIFIED_SINCE,t);var o={guessEncoding:t.autoGuessEncoding,overwriteEncoding:function(i){return n.encoding.getReadEncoding(e,t,{encoding:i,seemsBinary:!1})}},s=I.createReadableOfProvider(i,e,t.position||0);return p.toDecodeStream(s,o).then(function(e){
return t.acceptTextOnly&&e.detected.seemsBinary?h.TPromise.wrapError(new y.FileOperationError(g.localize(4,null),y.FileOperationResult.FILE_IS_BINARY,t)):{encoding:e.detected.encoding,value:e.stream,resource:r.resource,name:r.name,etag:r.etag,mtime:r.mtime,isReadonly:r.isReadonly}})})})},t._mkdirp=function(e,t){return o(this,void 0,void 0,function(){var n,r,o,a;return s(this,function(s){switch(s.label){case 0:n=[],s.label=1;case 1:if("/"===t.path)return[3,6];s.label=2;case 2:return s.trys.push([2,4,,5]),[4,e.stat(t)];case 3:if(0==((r=s.sent()).type&y.FileType.Directory))throw new Error(t.toString()+" is not a directory");return[3,6];case 4:return o=s.sent(),n.push(i.posix.basename(t.path)),t=t.with({path:i.posix.dirname(t.path)}),[3,5];case 5:return[3,1];case 6:a=n.length-1,s.label=7;case 7:return a>=0?(t=t.with({path:i.posix.join(t.path,n[a])}),[4,e.mkdir(t)]):[3,10];case 8:s.sent(),s.label=9;case 9:return a--,[3,7];case 10:return[2]}})})},t._throwIfFileSystemIsReadonly=function(e){
if(e.capabilities&y.FileSystemProviderCapabilities.Readonly)throw new y.FileOperationError(g.localize(5,null),y.FileOperationResult.FILE_PERMISSION_DENIED);return e},t.prototype.createFile=function(n,r,o){var s=this;return n.scheme===d.Schemas.file?e.prototype.createFile.call(this,n,r,o):this._withProvider(n).then(t._throwIfFileSystemIsReadonly).then(function(e){return t._mkdirp(e,n.with({path:i.posix.dirname(n.path)})).then(function(){var t=s.encoding.getWriteEncoding(n);return s._writeFile(e,n,new y.StringSnapshot(r),t,{create:!0,overwrite:Boolean(o&&o.overwrite)})})}).then(function(e){return s._onAfterOperation.fire(new y.FileOperationEvent(n,y.FileOperation.CREATE,e)),e},function(e){var t=g.localize(6,null,n.toString(!1)),i=s._tryParseFileOperationResult(e);throw new y.FileOperationError(t,i,o)})},t.prototype.updateContent=function(n,r,o){var s=this;return n.scheme===d.Schemas.file?e.prototype.updateContent.call(this,n,r,o):this._withProvider(n).then(t._throwIfFileSystemIsReadonly).then(function(e){
return t._mkdirp(e,n.with({path:i.posix.dirname(n.path)})).then(function(){var t="string"==typeof r?new y.StringSnapshot(r):r;return s._writeFile(e,n,t,o&&o.encoding,{create:!0,overwrite:!0})})})},t.prototype._writeFile=function(e,t,n,i,r){var o=this,s=I.createReadableOfSnapshot(n),a=this.encoding.getWriteEncoding(t,i),c=p.encodeStream(a),l=I.createWritableOfProvider(e,t,r);return new h.TPromise(function(e,t){s.pipe(c).pipe(l),l.once("error",function(e){return t(e)}),l.once("finish",function(t){return e(void 0)})}).then(function(e){return o.resolveFile(t)})},t._asContent=function(e){return new h.TPromise(function(t,n){var i={value:"",encoding:e.encoding,etag:e.etag,mtime:e.mtime,name:e.name,resource:e.resource,isReadonly:e.isReadonly};e.value.on("data",function(e){return i.value+=e}),e.value.on("error",n),e.value.on("end",function(){return t(i)})})},t.prototype.del=function(n,i){var r=this
;return n.scheme===d.Schemas.file?e.prototype.del.call(this,n,i):this._withProvider(n).then(t._throwIfFileSystemIsReadonly).then(function(e){return e.delete(n,{recursive:i&&i.recursive}).then(function(){r._onAfterOperation.fire(new y.FileOperationEvent(n,y.FileOperation.DELETE))})})},t.prototype.createFolder=function(n){var r=this;return n.scheme===d.Schemas.file?e.prototype.createFolder.call(this,n):this._withProvider(n).then(t._throwIfFileSystemIsReadonly).then(function(e){return t._mkdirp(e,n.with({path:i.posix.dirname(n.path)})).then(function(){return e.mkdir(n).then(function(){return r.resolveFile(n)})})}).then(function(e){return r._onAfterOperation.fire(new y.FileOperationEvent(n,y.FileOperation.CREATE,e)),e})},t.prototype.moveFile=function(t,n,i){return t.scheme!==n.scheme?this._doMoveAcrossScheme(t,n):t.scheme===d.Schemas.file?e.prototype.moveFile.call(this,t,n,i):this._doMoveWithInScheme(t,n,i)},t.prototype._doMoveWithInScheme=function(e,n,i){var r=this;return(i?this.del(n,{recursive:!0
}).then(void 0,function(e){}):h.TPromise.as(null)).then(function(){return r._withProvider(e)}).then(t._throwIfFileSystemIsReadonly).then(function(t){return t.rename(e,n,{overwrite:i}).then(function(){return r.resolveFile(n)}).then(function(t){return r._onAfterOperation.fire(new y.FileOperationEvent(e,y.FileOperation.MOVE,t)),t},function(e){var t=r._tryParseFileOperationResult(e);if(t===y.FileOperationResult.FILE_MOVE_CONFLICT)throw new y.FileOperationError(g.localize(7,null),t);throw e})})},t.prototype._doMoveAcrossScheme=function(e,t,n){var i=this;return this.copyFile(e,t,n).then(function(){return i.del(e,{recursive:!0})}).then(function(){return i.resolveFile(t)}).then(function(t){return i._onAfterOperation.fire(new y.FileOperationEvent(e,y.FileOperation.MOVE,t)),t})},t.prototype.copyFile=function(n,i,r){var o=this;return n.scheme===i.scheme&&n.scheme===d.Schemas.file?e.prototype.copyFile.call(this,n,i,r):this._withProvider(i).then(t._throwIfFileSystemIsReadonly).then(function(t){
if(n.scheme===i.scheme&&t.capabilities&y.FileSystemProviderCapabilities.FileFolderCopy)return t.copy(n,i,{overwrite:r}).then(function(){return o.resolveFile(i)}).then(function(e){return o._onAfterOperation.fire(new y.FileOperationEvent(n,y.FileOperation.COPY,e)),e},function(e){var t=o._tryParseFileOperationResult(e);if(t===y.FileOperationResult.FILE_MOVE_CONFLICT)throw new y.FileOperationError(g.localize(8,null),t);throw e});return(r?o.del(i,{recursive:!0}).then(void 0,function(e){}):h.TPromise.as(null)).then(function(){return o.resolveContent(n,{acceptTextOnly:!0}).then(function(t){return o._withProvider(i).then(function(e){return o._writeFile(e,i,new y.StringSnapshot(t.value),t.encoding,{create:!0,overwrite:r}).then(function(e){return o._onAfterOperation.fire(new y.FileOperationEvent(n,y.FileOperation.COPY,e)),e})},function(n){var r=o._tryParseFileOperationResult(n);if(r===y.FileOperationResult.FILE_MOVE_CONFLICT)throw new y.FileOperationError(g.localize(9,null),r)
;return n instanceof Error&&"ENOPRO"===n.name?e.prototype.updateContent.call(o,i,t.value,{encoding:t.encoding}):h.TPromise.wrapError(n)})})})})},t.prototype.watchFileChanges=function(t,n){if(t.scheme===d.Schemas.file)return e.prototype.watchFileChanges.call(this,t);n||(n={recursive:!1,excludes:[]});var i=t.toString(),r=this._activeWatches.get(i);r?r.count+=1:this._activeWatches.set(i,{count:1,unwatch:this._withProvider(t).then(function(e){return e.watch(t,n)},function(e){return{dispose:function(){}}})})},t.prototype.unwatchFileChanges=function(t){if(t.scheme===d.Schemas.file)return e.prototype.unwatchFileChanges.call(this,t);var n=this._activeWatches.get(t.toString());n&&0==--n.count&&(n.unwatch.then(c.dispose),this._activeWatches.delete(t.toString()))},t=a([l(0,E.IExtensionService),l(1,_.IStorageService),l(2,m.IEnvironmentService),l(3,v.IConfigurationService),l(4,C.IWorkspaceContextService),l(5,b.ILifecycleService),l(6,S.INotificationService),l(7,f.ITextResourceConfigurationService)],t)}(w.FileService)
;t.RemoteFileService=A}),define(e[53],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorGroupsService=n.createDecorator("editorGroupsService");var i;!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(i=t.GroupDirection||(t.GroupDirection={})),t.preferredSideBySideGroupDirection=function(e){return"down"===e.getValue("workbench.editor.openSideBySideDirection")?i.DOWN:i.RIGHT};!function(e){e[e.HORIZONTAL=0]="HORIZONTAL",e[e.VERTICAL=1]="VERTICAL"}(t.GroupOrientation||(t.GroupOrientation={}));!function(e){e[e.FIRST=0]="FIRST",e[e.LAST=1]="LAST",e[e.NEXT=2]="NEXT",e[e.PREVIOUS=3]="PREVIOUS"}(t.GroupLocation||(t.GroupLocation={}));!function(e){e[e.MINIMIZE_OTHERS=0]="MINIMIZE_OTHERS",e[e.EVEN=1]="EVEN"}(t.GroupsArrangement||(t.GroupsArrangement={}));!function(e){e[e.COPY_EDITORS=0]="COPY_EDITORS",e[e.MOVE_EDITORS=1]="MOVE_EDITORS"}(t.MergeGroupMode||(t.MergeGroupMode={}));!function(e){e[e.CREATION_TIME=0]="CREATION_TIME",
e[e.MOST_RECENTLY_ACTIVE=1]="MOST_RECENTLY_ACTIVE",e[e.GRID_APPEARANCE=2]="GRID_APPEARANCE"}(t.GroupsOrder||(t.GroupsOrder={}));!function(e){e[e.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",e[e.SEQUENTIAL=1]="SEQUENTIAL"}(t.EditorsOrder||(t.EditorsOrder={}));!function(e){e[e.GROUP_ACTIVE=0]="GROUP_ACTIVE",e[e.GROUP_LABEL=1]="GROUP_LABEL",e[e.EDITOR_OPEN=2]="EDITOR_OPEN",e[e.EDITOR_CLOSE=3]="EDITOR_CLOSE",e[e.EDITOR_MOVE=4]="EDITOR_MOVE",e[e.EDITOR_ACTIVE=5]="EDITOR_ACTIVE",e[e.EDITOR_LABEL=6]="EDITOR_LABEL",e[e.EDITOR_PIN=7]="EDITOR_PIN",e[e.EDITOR_DIRTY=8]="EDITOR_DIRTY"}(t.GroupChangeKind||(t.GroupChangeKind={}))}),define(e[276],t([1,0,53,21]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.viewColumnToEditorGroup=function(e,t){if("number"!=typeof t||t===i.ACTIVE_GROUP)return i.ACTIVE_GROUP;var r=e.getGroups(n.GroupsOrder.GRID_APPEARANCE),o=r[t];if(o)return o.id;var s=r[0];return 1===r.length&&0===s.count?s.id:i.SIDE_GROUP},t.editorGroupToViewColumn=function(e,t){
var i="number"==typeof t?e.getGroup(t):t;return e.getGroups(n.GroupsOrder.GRID_APPEARANCE).indexOf(i)}}),define(e[451],t([1,0,1440,9,5,24,10,4,184,71,276,29,61,21,53,61,88]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(t,n,i,r,o,s){var a=this;this._codeEditorService=i,this._bulkEditService=r,this._editorService=o,this._editorGroupService=s,this._instanceId=String(++e.INSTANCE_COUNT),this._proxy=n.getProxy(m.ExtHostContext.ExtHostEditors),this._documentsAndEditors=t,this._toDispose=[],this._textEditorsListenersMap=Object.create(null),this._editorPositionData=null,this._toDispose.push(t.onTextEditorAdd(function(e){return e.forEach(a._onTextEditorAdd,a)})),this._toDispose.push(t.onTextEditorRemove(function(e){return e.forEach(a._onTextEditorRemove,a)})),this._toDispose.push(this._editorService.onDidVisibleEditorsChange(function(){return a._updateActiveAndVisibleTextEditors()})),
this._toDispose.push(this._editorGroupService.onDidRemoveGroup(function(){return a._updateActiveAndVisibleTextEditors()})),this._toDispose.push(this._editorGroupService.onDidMoveGroup(function(){return a._updateActiveAndVisibleTextEditors()})),this._registeredDecorationTypes=Object.create(null)}return e.prototype.dispose=function(){var e=this;Object.keys(this._textEditorsListenersMap).forEach(function(t){r.dispose(e._textEditorsListenersMap[t])}),this._textEditorsListenersMap=Object.create(null),this._toDispose=r.dispose(this._toDispose);for(var t in this._registeredDecorationTypes)this._codeEditorService.removeDecorationType(t);this._registeredDecorationTypes=Object.create(null)},e.prototype._onTextEditorAdd=function(e){var t=this,n=e.getId(),i=[];i.push(e.onPropertiesChanged(function(e){t._proxy.$acceptEditorPropertiesChanged(n,e)})),this._textEditorsListenersMap[n]=i},e.prototype._onTextEditorRemove=function(e){r.dispose(this._textEditorsListenersMap[e]),delete this._textEditorsListenersMap[e]},
e.prototype._updateActiveAndVisibleTextEditors=function(){var e=this._getTextEditorPositionData();o.equals(this._editorPositionData,e)||(this._editorPositionData=e,this._proxy.$acceptEditorPositionData(this._editorPositionData))},e.prototype._getTextEditorPositionData=function(){for(var e=Object.create(null),t=0,n=this._editorService.visibleControls;t<n.length;t++){var i=n[t],r=this._documentsAndEditors.findTextEditorIdFor(i);r&&(e[r]=h.editorGroupToViewColumn(this._editorGroupService,i.group))}return e},e.prototype.$tryShowTextDocument=function(e,t){var n=this,i={resource:s.default.revive(e),options:{preserveFocus:t.preserveFocus,pinned:t.pinned,selection:t.selection}};return this._editorService.openEditor(i,h.viewColumnToEditorGroup(this._editorGroupService,t.position)).then(function(e){if(e)return n._documentsAndEditors.findTextEditorIdFor(e)})},e.prototype.$tryShowEditor=function(e,t){var n=this._documentsAndEditors.getEditor(e);if(n){var i=n.getModel();return this._editorService.openEditor({
resource:i.uri,options:{preserveFocus:!1}},h.viewColumnToEditorGroup(this._editorGroupService,t)).then(function(){})}},e.prototype.$tryHideEditor=function(e){var t=this._documentsAndEditors.getEditor(e);if(t)for(var n=0,i=this._editorService.visibleControls;n<i.length;n++){var r=i[n];if(t.matches(r))return r.group.closeEditor(r.input).then(function(){})}},e.prototype.$trySetSelections=function(e,t){return this._documentsAndEditors.getEditor(e)?(this._documentsAndEditors.getEditor(e).setSelections(t),c.TPromise.as(null)):c.TPromise.wrapError(i.disposed("TextEditor("+e+")"))},e.prototype.$trySetDecorations=function(e,t,n){return t=this._instanceId+"-"+t,this._documentsAndEditors.getEditor(e)?(this._documentsAndEditors.getEditor(e).setDecorations(t,n),c.TPromise.as(null)):c.TPromise.wrapError(i.disposed("TextEditor("+e+")"))},e.prototype.$trySetDecorationsFast=function(e,t,n){return t=this._instanceId+"-"+t,this._documentsAndEditors.getEditor(e)?(this._documentsAndEditors.getEditor(e).setDecorationsFast(t,n),
c.TPromise.as(null)):c.TPromise.wrapError(i.disposed("TextEditor("+e+")"))},e.prototype.$tryRevealRange=function(e,t,n){if(!this._documentsAndEditors.getEditor(e))return c.TPromise.wrapError(i.disposed("TextEditor("+e+")"));this._documentsAndEditors.getEditor(e).revealRange(t,n)},e.prototype.$trySetOptions=function(e,t){return this._documentsAndEditors.getEditor(e)?(this._documentsAndEditors.getEditor(e).setConfiguration(t),c.TPromise.as(null)):c.TPromise.wrapError(i.disposed("TextEditor("+e+")"))},e.prototype.$tryApplyEdits=function(e,t,n,r){return this._documentsAndEditors.getEditor(e)?c.TPromise.as(this._documentsAndEditors.getEditor(e).applyEdits(t,n,r)):c.TPromise.wrapError(i.disposed("TextEditor("+e+")"))},e.prototype.$tryApplyWorkspaceEdit=function(e){var t=f.reviveWorkspaceEditDto(e).edits;return this._bulkEditService.apply({edits:t},void 0).then(function(){return!0},function(e){return!1})},e.prototype.$tryInsertSnippet=function(e,t,n,r){
return this._documentsAndEditors.getEditor(e)?c.TPromise.as(this._documentsAndEditors.getEditor(e).insertSnippet(t,n,r)):c.TPromise.wrapError(i.disposed("TextEditor("+e+")"))},e.prototype.$registerTextEditorDecorationType=function(e,t){e=this._instanceId+"-"+e,this._registeredDecorationTypes[e]=!0,this._codeEditorService.registerDecorationType(e,t)},e.prototype.$removeTextEditorDecorationType=function(e){e=this._instanceId+"-"+e,delete this._registeredDecorationTypes[e],this._codeEditorService.removeDecorationType(e)},e.prototype.$getDiffInformation=function(e){var t=this._documentsAndEditors.getEditor(e);if(!t)return c.TPromise.wrapError(new Error("No such TextEditor"));var n=t.getCodeEditor().getId(),i=this._codeEditorService.listDiffEditors().filter(function(e){return e.getOriginalEditor().getId()===n||e.getModifiedEditor().getId()===n})[0];return i?c.TPromise.as(i.getLineChanges()):c.TPromise.as([])},e.INSTANCE_COUNT=0,
e=a([l(2,d.ICodeEditorService),l(3,u.IBulkEditService),l(4,g.IEditorService),l(5,v.IEditorGroupsService)],e)}();t.MainThreadTextEditors=b,p.CommandsRegistry.registerCommand("_workbench.open",function(e,t){var n=e.get(g.IEditorService),i=e.get(v.IEditorGroupsService),r=e.get(y.IOpenerService),o=t[0],s=t[1],a=t[2];return s||"number"==typeof a?n.openEditor({resource:o,options:s},h.viewColumnToEditorGroup(i,a)).then(function(e){}):o&&"command"===o.scheme?c.TPromise.as(void 0):r.open(o).then(function(e){})}),p.CommandsRegistry.registerCommand("_workbench.diff",function(e,t){var i=e.get(g.IEditorService),r=e.get(v.IEditorGroupsService),o=t[0],s=t[1],a=t[2],c=t[3],l=t[4],u=t[5];return l&&"object"==typeof l||(l={preserveFocus:!1}),a||(a=n.localize(0,null,o.toString(!0),s.toString(!0))),i.openEditor({leftResource:o,rightResource:s,label:a,description:c,options:l},h.viewColumnToEditorGroup(r,u)).then(function(){})})}),define(e[452],t([1,0,4,1463,16,23,31,56,5,29,53,818]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r.toDispose=[],r.class="flip-editor-layout",r.updateEnablement(),r.registerListeners(),r}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.editorGroupService.onDidAddGroup(function(){return e.updateEnablement()})),this.toDispose.push(this.editorGroupService.onDidRemoveGroup(function(){return e.updateEnablement()}))},t.prototype.updateEnablement=function(){this.enabled=this.editorGroupService.count>1},t.prototype.run=function(){var e=this.editorGroupService.orientation===p.GroupOrientation.VERTICAL?p.GroupOrientation.HORIZONTAL:p.GroupOrientation.VERTICAL;return this.editorGroupService.setGroupOrientation(e),i.TPromise.as(null)},t.prototype.dispose=function(){this.toDispose=d.dispose(this.toDispose),e.prototype.dispose.call(this)},t.ID="workbench.action.toggleEditorGroupLayout",t.LABEL=r.localize(0,null),
t=a([l(2,p.IEditorGroupsService)],t)}(s.Action);t.ToggleEditorLayoutAction=f,h.CommandsRegistry.registerCommand("_workbench.editor.setGroupOrientation",function(e,t){var n=e.get(p.IEditorGroupsService),r=t[0];return n.setGroupOrientation(r),i.TPromise.as(null)});var g=o.Registry.as(u.Extensions.WorkbenchActions),v=r.localize(1,null);g.registerWorkbenchAction(new c.SyncActionDescriptor(f,f.ID,f.LABEL,{primary:1557,mac:{primary:2581}}),"View: Flip Editor Group Layout",v)}),define(e[159],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHashService=n.createDecorator("hashService")}),define(e[161],t([1,0,4,40,178,72,478,159]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.textModelResolverService=r,s.hashService=o,s.name=t,s.description=n,s.resource=i,s}return n(t,e),t.prototype.getResource=function(){return this.resource},t.prototype.getTypeId=function(){
return t.ID},t.prototype.getName=function(){return this.name},t.prototype.setName=function(e){this.name!==e&&(this.name=e,this._onDidChangeLabel.fire())},t.prototype.getDescription=function(){return this.description},t.prototype.setDescription=function(e){this.description!==e&&(this.description=e,this._onDidChangeLabel.fire())},t.prototype.getTelemetryDescriptor=function(){var t=this,n=e.prototype.getTelemetryDescriptor.call(this);return n.resource=o.telemetryURIDescriptor(this.resource,function(e){return t.hashService.createSHA1(e)}),n},t.prototype.resolve=function(e){var t=this;return this.modelReference||(this.modelReference=this.textModelResolverService.createModelReference(this.resource)),this.modelReference.then(function(e){var n=e.object;return n instanceof c.ResourceEditorModel?n:(e.dispose(),t.modelReference=null,i.TPromise.wrapError(new Error("Unexpected model for ResourceInput: "+t.resource)))})},t.prototype.matches=function(n){if(!0===e.prototype.matches.call(this,n))return!0;if(n instanceof t){
return n.resource.toString()===this.resource.toString()}return!1},t.prototype.dispose=function(){this.modelReference&&(this.modelReference.done(function(e){return e.dispose()}),this.modelReference=null),e.prototype.dispose.call(this)},t.ID="workbench.editors.resourceEditorInput",t=a([l(3,s.ITextModelService),l(4,u.IHashService)],t)}(r.EditorInput);t.ResourceEditorInput=d}),define(e[455],t([1,0,161,72,159]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areHtmlInputOptionsEqual=function(e,t){return e.allowScripts===t.allowScripts&&e.allowSvgs===t.allowSvgs};var s=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,i,o,s)||this;return a.options=r,a}return n(t,e),t=a([l(4,r.ITextModelService),l(5,o.IHashService)],t)}(i.ResourceEditorInput);t.HtmlInput=s}),define(e[278],t([1,0,14,4,40,5,178,72,250,43,159]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,n){var i=e.call(this)||this
;return i.mainRef=t,i.snippetRefs=n,i}return n(t,e),Object.defineProperty(t.prototype,"main",{get:function(){return this.mainRef.object},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snippets",{get:function(){return this.snippetRefs.map(function(e){return e.object})},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.snippetRefs.forEach(function(e){return e.dispose()}),this.mainRef.dispose(),e.prototype.dispose.call(this)},t}(o.EditorModel);t.WalkThroughModel=f;var g=function(e){function t(t,n,i){var r=e.call(this)||this;return r.options=t,r.textModelResolverService=n,r.hashService=i,r.disposables=[],r.maxTopScroll=0,r.maxBottomScroll=0,r}return n(t,e),t.prototype.getResource=function(){return this.options.resource},t.prototype.getTypeId=function(){return this.options.typeId},t.prototype.getName=function(){return this.options.name},t.prototype.getDescription=function(){return this.options.description||""},t.prototype.getTelemetryFrom=function(){
return this.options.telemetryFrom},t.prototype.getTelemetryDescriptor=function(){var t=this,n=e.prototype.getTelemetryDescriptor.call(this);return n.target=this.getTelemetryFrom(),n.resource=c.telemetryURIDescriptor(this.options.resource,function(e){return t.hashService.createSHA1(e)}),n},Object.defineProperty(t.prototype,"onReady",{get:function(){return this.options.onReady},enumerable:!0,configurable:!0}),t.prototype.resolve=function(e){var t=this;return this.promise||(this.promise=this.textModelResolverService.createModelReference(this.options.resource).then(function(e){if(i.endsWith(t.getResource().path,".html"))return new f(e,[]);var n=[],o=0,s=new d.marked.Renderer;s.code=function(e,i){var r=t.options.resource.with({scheme:h.Schemas.walkThroughSnippet,fragment:o+++"."+i});return n.push(t.textModelResolverService.createModelReference(r)),""};var a=e.object.textEditorModel.getLinesContent().join("\n");return d.marked(a,{renderer:s}),r.TPromise.join(n).then(function(t){return new f(e,t)})})),this.promise},
t.prototype.matches=function(n){if(!0===e.prototype.matches.call(this,n))return!0;if(n instanceof t){return n.options.resource.toString()===this.options.resource.toString()}return!1},t.prototype.dispose=function(){this.disposables=s.dispose(this.disposables),this.promise&&(this.promise.then(function(e){return e.dispose()}),this.promise=null),e.prototype.dispose.call(this)},t.prototype.relativeScrollPosition=function(e,t){this.maxTopScroll=Math.max(this.maxTopScroll,e),this.maxBottomScroll=Math.max(this.maxBottomScroll,t)},t=a([l(1,u.ITextModelService),l(2,p.IHashService)],t)}(o.EditorInput);t.WalkThroughInput=g}),define(e[1314],t([1,0,10,59,20,278,6,21,9,42,4,27,17,749,23,28,36,43,153,549,80,1186,38,5,62,12,26,405,104,34,150,336,22,936]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";function N(e){var t=e.inspect(W);if(!t.user&&!t.workspace){var n=e.inspect(B);if(void 0!==n.value&&null!==n.value)return n.value}return"welcomePage"===t.value}function F(e){
return M.getIdAndVersionFromLocalExtensionId(e).id}Object.defineProperty(t,"__esModule",{value:!0}),w.used();var W="workbench.startupEditor",B="workbench.welcome.enabled",V="welcomePage",z=function(){function e(e,t,n,i,r,o,s){N(t)&&o.startupKind!==I.StartupKind.ReloadedWindow&&i.hasBackups().then(function(t){if(!n.activeEditor&&!t)return e.createInstance($).openEditor()}).then(null,d.onUnexpectedError)}return e=a([l(0,c.IInstantiationService),l(1,g.IConfigurationService),l(2,u.IEditorService),l(3,_.IBackupFileService),l(4,y.ITelemetryService),l(5,I.ILifecycleService),l(6,R.IStorageService)],e)}();t.WelcomePageContribution=z;var H=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.instantiationService=i,r}return n(t,e),t.prototype.run=function(){return this.instantiationService.createInstance($).openEditor().then(function(){})},t.ID="workbench.action.showWelcomePage",t.LABEL=v.localize(0,null),t=a([l(2,c.IInstantiationService)],t)}(m.Action);t.WelcomePageAction=H;var K=[{
name:v.localize(1,null),id:"dbaeumer.vscode-eslint"},{name:v.localize(2,null),id:"eg2.tslint"},{name:v.localize(3,null),id:"ms-python.python"},{name:v.localize(4,null),id:"felixfbecker.php-pack"},{name:v.localize(5,null),title:v.localize(6,null),id:"workbench.extensions.action.showAzureExtensions",isCommand:!0},{name:v.localize(7,null),id:"peterjausovec.vscode-docker"}],U=[{name:v.localize(8,null),id:"vscodevim.vim",isKeymap:!0},{name:v.localize(9,null),id:"ms-vscode.sublime-keybindings",isKeymap:!0},{name:v.localize(10,null),id:"ms-vscode.atom-keybindings",isKeymap:!0}],G={installEvent:"installExtension",installedEvent:"installedExtension",detailsEvent:"detailsExtension",alreadyInstalled:v.localize(11,null),reloadAfterInstall:v.localize(12,null),installing:v.localize(13,null),extensionNotFound:v.localize(14,null)},j={installEvent:"installKeymap",installedEvent:"installedKeymap",detailsEvent:"detailsKeymap",alreadyInstalled:v.localize(15,null),reloadAfterInstall:v.localize(16,null),
installing:v.localize(17,null),extensionNotFound:v.localize(18,null)},q="workbench.editors.welcomePageInput",$=function(){function t(t,n,r,o,a,c,l,u,d,h,p,f,g,m){var y=this;this.editorService=t,this.instantiationService=n,this.windowService=r,this.contextService=o,this.configurationService=a,this.environmentService=c,this.notificationService=l,this.extensionEnablementService=u,this.extensionGalleryService=d,this.extensionManagementService=h,this.tipsService=p,this.extensionsWorkbenchService=f,this.telemetryService=m,this.disposables=[],this.disposables.push(g.onShutdown(function(){return y.dispose()}));var b=this.windowService.getRecentlyOpened(),_=this.instantiationService.invokeFunction(C.getInstalledExtensions),E=i.default.parse(e.toUrl("./vs_code_welcome_page")).with({scheme:S.Schemas.walkThrough,query:JSON.stringify({moduleId:"vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page"})});this.editorInput=this.instantiationService.createInstance(s.WalkThroughInput,{typeId:q,
name:v.localize(19,null),resource:E,telemetryFrom:V,onReady:function(e){return y.onReady(e,b,_)}})}return t.prototype.openEditor=function(){return this.editorService.openEditor(this.editorInput,{pinned:!1})},t.prototype.onReady=function(e,t,n){var i=this,o=N(this.configurationService),s=e.querySelector("#showOnStartup");o&&s.setAttribute("checked","checked"),s.addEventListener("click",function(e){i.configurationService.updateValue(W,s.checked?"welcomePage":"newUntitledFile",g.ConfigurationTarget.USER)}),t.then(function(t){var n=t.workspaces;if((n=n.filter(function(e){return!i.contextService.isCurrentWorkspace(e)})).length){var o=e.querySelector(".recent ul"),s=o.firstElementChild;n.slice(0,5).forEach(function(e){var t,n,a;O.isSingleFolderWorkspaceIdentifier(e)?(t=x.getBaseLabel(e),n=r.dirname(e),a=e):(t=O.getWorkspaceLabel(e,i.environmentService),n=r.dirname(e.configPath),a=e.configPath);var c=document.createElement("li"),l=document.createElement("a"),u=t,d=n;if(!u&&d){var h=u;u=d,d=h}
var p=x.tildify(d,i.environmentService.userHome);l.innerText=u,l.title=t,l.setAttribute("aria-label",v.localize(20,null,u,p)),l.href="javascript:void(0)",l.addEventListener("click",function(e){i.telemetryService.publicLog("workbenchActionExecuted",{id:"openRecentFolder",from:V}),i.windowService.openWindow([a],{forceNewWindow:e.ctrlKey||e.metaKey}),e.preventDefault(),e.stopPropagation()}),c.appendChild(l);var f=document.createElement("span");f.classList.add("path"),f.classList.add("detail"),f.innerText=p,f.title=t,c.appendChild(f),o.insertBefore(c,s)})}else{e.querySelector(".welcomePage").classList.add("emptyRecent")}}).then(null,d.onUnexpectedError),this.addExtensionList(e,".extensionPackList",K,G),this.addExtensionList(e,".keymapList",U,j),this.updateInstalledExtensions(e,n),this.disposables.push(this.instantiationService.invokeFunction(C.onExtensionChanged)(function(t){for(var n=0,r=t;n<r.length;n++){var o=r[n]
;if(e.querySelector('.installExtension[data-extension="'+F(o.id)+'"], .enabledExtension[data-extension="'+F(o.id)+'"]')){var s=i.instantiationService.invokeFunction(C.getInstalledExtensions);i.updateInstalledExtensions(e,s);break}}}))},t.prototype.addExtensionList=function(e,t,n,i){var r=this,o=e.querySelector(t);o&&n.forEach(function(e,t){t&&o.appendChild(document.createTextNode(v.localize(21,null)));var n=document.createElement("a");if(n.innerText=e.name,n.title=e.title||(e.isKeymap?v.localize(22,null,e.name):v.localize(23,null,e.name)),e.isCommand)n.href="command:"+e.id,o.appendChild(n);else{n.classList.add("installExtension"),n.setAttribute("data-extension",e.id),n.href="javascript:void(0)",n.addEventListener("click",function(t){r.installExtension(e,i),t.preventDefault(),t.stopPropagation()}),o.appendChild(n);var s=document.createElement("span");s.innerText=e.name,s.title=e.isKeymap?v.localize(24,null,e.name):v.localize(25,null,e.name),s.classList.add("enabledExtension"),
s.setAttribute("data-extension",e.id),o.appendChild(s)}})},t.prototype.installExtension=function(e,t){var n=this;this.telemetryService.publicLog(t.installEvent,{from:V,extensionId:e.id}),this.instantiationService.invokeFunction(C.getInstalledExtensions).then(function(i){var r=o.first(i,function(t){return F(t.identifier.id)===e.id});if(r&&r.globallyEnabled)return n.telemetryService.publicLog(t.installedEvent,{from:V,extensionId:e.id,outcome:"already_enabled"}),void n.notificationService.info(t.alreadyInstalled.replace("{0}",e.name));var s=r?p.TPromise.as(r.local):n.extensionGalleryService.query({names:[e.id],source:V}).then(function(e){var t=e.firstPage[0];return t?n.extensionManagementService.installFromGallery(t).then(function(e){return n.extensionEnablementService.setEnablement(e,E.EnablementState.Disabled).then(function(){return e})}):null});n.notificationService.prompt(P.Severity.Info,t.reloadAfterInstall.replace("{0}",e.name),[{label:v.localize(26,null),run:function(){var o=p.TPromise.timeout(300)
;o.then(function(){n.notificationService.info(t.installing.replace("{0}",e.name))}),p.TPromise.join(e.isKeymap?i.filter(function(e){return C.isKeymapExtension(n.tipsService,e)&&e.globallyEnabled}).map(function(e){return n.extensionEnablementService.setEnablement(e.local,E.EnablementState.Disabled)}):[]).then(function(){return s.then(function(i){return o.cancel(),i?n.extensionEnablementService.setEnablement(i,E.EnablementState.Enabled).then(function(){return n.telemetryService.publicLog(t.installedEvent,{from:V,extensionId:e.id,outcome:r?"enabled":"installed"}),n.windowService.reloadWindow()}):(n.telemetryService.publicLog(t.installedEvent,{from:V,extensionId:e.id,outcome:"not_found"}),void n.notificationService.error(t.extensionNotFound.replace("{0}",e.name).replace("{1}",e.id)))})}).then(null,function(i){n.telemetryService.publicLog(t.installedEvent,{from:V,extensionId:e.id,outcome:d.isPromiseCanceledError(i)?"canceled":"error",error:String(i)}),n.notificationService.error(i)})}},{label:v.localize(27,null),
run:function(){n.telemetryService.publicLog(t.detailsEvent,{from:V,extensionId:e.id}),n.extensionsWorkbenchService.queryGallery({names:[e.id]}).then(function(e){return n.extensionsWorkbenchService.open(e.firstPage[0])}).then(null,d.onUnexpectedError)}}])}).then(null,function(i){n.telemetryService.publicLog(t.installedEvent,{from:V,extensionId:e.id,outcome:d.isPromiseCanceledError(i)?"canceled":"error",error:String(i)}),n.notificationService.error(i)})},t.prototype.updateInstalledExtensions=function(e,t){t.then(function(t){for(var n=e.querySelectorAll(".installExtension, .enabledExtension"),i=0;i<n.length;i++)n[i].classList.remove("installed");t.filter(function(e){return e.globallyEnabled}).map(function(e){return F(e.identifier.id)}).forEach(function(t){for(var n=e.querySelectorAll('.installExtension[data-extension="'+t+'"]'),i=0;i<n.length;i++)n[i].classList.add("installed");for(var r=e.querySelectorAll('.enabledExtension[data-extension="'+t+'"]'),i=0;i<r.length;i++)r[i].classList.add("installed")})
}).then(null,d.onUnexpectedError)},t.prototype.dispose=function(){this.disposables=T.dispose(this.disposables)},t=a([l(0,u.IEditorService),l(1,c.IInstantiationService),l(2,h.IWindowService),l(3,f.IWorkspaceContextService),l(4,g.IConfigurationService),l(5,b.IEnvironmentService),l(6,P.INotificationService),l(7,E.IExtensionEnablementService),l(8,E.IExtensionGalleryService),l(9,E.IExtensionManagementService),l(10,E.IExtensionTipsService),l(11,L.IExtensionsWorkbenchService),l(12,I.ILifecycleService),l(13,y.ITelemetryService)],t)}(),Y=function(){function e(){}return e.prototype.serialize=function(e){return"{}"},e.prototype.deserialize=function(e,t){return e.createInstance($).editorInput},e.ID=q,e}();t.WelcomeInputFactory=Y,t.buttonBackground=D.registerColor("welcomePage.buttonBackground",{dark:null,light:null,hc:null},v.localize(28,null)),t.buttonHoverBackground=D.registerColor("welcomePage.buttonHoverBackground",{dark:null,light:null,hc:null},v.localize(29,null)),k.registerThemingParticipant(function(e,n){
var i=e.getColor(D.foreground);i&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage .caption { color: "+i+"; }");var r=e.getColor(D.descriptionForeground);r&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage .detail { color: "+r+"; }");var o=A.getExtraColor(e,t.buttonBackground,{dark:"rgba(0, 0, 0, .2)",extra_dark:"rgba(200, 235, 255, .042)",light:"rgba(0,0,0,.04)",hc:"black"});o&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage .commands li button { background: "+o+"; }");var s=A.getExtraColor(e,t.buttonHoverBackground,{dark:"rgba(200, 235, 255, .072)",extra_dark:"rgba(200, 235, 255, .072)",light:"rgba(0,0,0,.10)",hc:null});s&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { background: "+s+"; }");var a=e.getColor(D.textLinkForeground);a&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage a { color: "+a+"; }");var c=e.getColor(D.textLinkActiveForeground)
;c&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage a:hover,\n\t\t\t.monaco-workbench > .part.editor > .content .welcomePage a:active { color: "+c+"; }");var l=e.getColor(D.focusBorder);l&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage a:focus { outline-color: "+l+"; }");var u=e.getColor(D.contrastBorder);u&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage .commands li button { border-color: "+u+"; }");var d=e.getColor(D.activeContrastBorder);d&&n.addRule(".monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { outline-color: "+d+"; }")})}),define(e[1315],t([1,0,750,75,16,1314,56,31,63,40,38]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.Registry.as(c.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:n.localize(0,null),properties:{"workbench.startupEditor":{type:"string",enum:["none","welcomePage","newUntitledFile"],
enumDescriptions:[n.localize(1,null),n.localize(2,null),n.localize(3,null)],default:"welcomePage",description:n.localize(4,null)}}}),r.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(o.WelcomePageContribution,u.LifecyclePhase.Running),r.Registry.as(s.Extensions.WorkbenchActions).registerWorkbenchAction(new a.SyncActionDescriptor(o.WelcomePageAction,o.WelcomePageAction.ID,o.WelcomePageAction.LABEL),"Help: Welcome",n.localize(5,null)),r.Registry.as(l.Extensions.EditorInputFactories).registerEditorInputFactory(o.WelcomeInputFactory.ID,o.WelcomeInputFactory)}),define(e[1316],t([1,0,751,21,23,6,10,278,43]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h="workbench.editors.walkThroughInput",p={typeId:h,name:i.localize(0,null),resource:c.default.parse(e.toUrl("./vs_code_editor_walkthrough.md")).with({scheme:d.Schemas.walkThrough}),telemetryFrom:"walkThrough"},f=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.editorService=i,
o.instantiationService=r,o}return n(t,e),t.prototype.run=function(){var e=this.instantiationService.createInstance(u.WalkThroughInput,p);return this.editorService.openEditor(e,{pinned:!0}).then(function(){})},t.ID="workbench.action.showInteractivePlayground",t.LABEL=i.localize(1,null),t=a([l(2,r.IEditorService),l(3,s.IInstantiationService)],t)}(o.Action);t.EditorWalkThroughAction=f;var g=function(){function e(){}return e.prototype.serialize=function(e){return"{}"},e.prototype.deserialize=function(e,t){return e.createInstance(u.WalkThroughInput,p)},e.ID=h,e}();t.EditorWalkThroughInputFactory=g}),define(e[457],t([1,0,129,101,14,10,5,124,28,278,88,250,47,157,6,37,753,34,15,17,7,30,29,12,26,405,210,11,24,22,8,53,938]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WALK_THROUGH_FOCUS=new C.RawContextKey("interactivePlaygroundFocus",!1);var N=S.localize(0,null),F="walkThroughEditorViewState",W=function(e){
function d(n,i,r,o,s,a,c,l,u,h,p){var f=e.call(this,d.ID,n,i)||this;return f.instantiationService=o,f.openerService=s,f.keybindingService=a,f.contextKeyService=l,f.configurationService=u,f.notificationService=h,f.disposables=[],f.contentDisposables=[],f.editorFocus=t.WALK_THROUGH_FOCUS.bindTo(f.contextKeyService),f.editorMemento=f.getEditorMemento(c,p,F),f}return n(d,e),d.prototype.createEditor=function(e){var t=this;this.content=document.createElement("div"),this.content.tabIndex=0,this.content.style.outlineStyle="none",this.scrollbar=new i.DomScrollableElement(this.content,{horizontal:r.ScrollbarVisibility.Auto,vertical:r.ScrollbarVisibility.Auto}),this.disposables.push(this.scrollbar),e.appendChild(this.scrollbar.getDomNode()),this.registerFocusHandlers(),this.registerClickHandler(),this.disposables.push(this.scrollbar.onScroll(function(e){return t.updatedScrollPosition()}))},d.prototype.updatedScrollPosition=function(){
var e=this.scrollbar.getScrollDimensions(),t=this.scrollbar.getScrollPosition(),n=e.scrollHeight;if(n&&this.input instanceof p.WalkThroughInput){var i=t.scrollTop,r=e.height;this.input.relativeScrollPosition(i/n,(i+r)/n)}},d.prototype.addEventListener=function(e,t,n,i){return e.addEventListener(t,n,i),{dispose:function(){e.removeEventListener(t,n,i)}}},d.prototype.registerFocusHandlers=function(){var e=this;this.disposables.push(this.addEventListener(this.content,"mousedown",function(t){e.focus()})),this.disposables.push(this.addEventListener(this.content,"focus",function(t){e.editorFocus.set(!0)})),this.disposables.push(this.addEventListener(this.content,"blur",function(t){e.editorFocus.reset()})),this.disposables.push(this.addEventListener(this.content,"focusin",function(t){if(t.target instanceof HTMLElement&&t.target.classList.contains("zone-widget-container")){var n=e.scrollbar.getScrollPosition();e.content.scrollTop=n.scrollTop,e.content.scrollLeft=n.scrollLeft}}))},
d.prototype.registerClickHandler=function(){var e=this;this.content.addEventListener("click",function(t){for(var n=t.target;n;n=n.parentNode){if(n instanceof HTMLAnchorElement&&n.href){var i=window.document.getElementsByTagName("base")[0]||window.location;if(i&&n.href.indexOf(i.href)>=0&&n.hash){var r=e.content.querySelector(n.hash),o=e.content.firstElementChild;if(r&&o){var a=r.getBoundingClientRect().top-20,c=o.getBoundingClientRect().top;e.scrollbar.setScrollPosition({scrollTop:a-c})}}else e.open(s.default.parse(n.href));t.preventDefault();break}if(n instanceof HTMLButtonElement){var l=n.getAttribute("data-href");l&&e.open(s.default.parse(l));break}if(n===t.currentTarget)break}})},d.prototype.open=function(e){"command"!==e.scheme||"git.clone"!==e.path||T.CommandsRegistry.getCommand("git.clone")?this.openerService.open(this.addFrom(e)):this.notificationService.info(S.localize(1,null))},d.prototype.addFrom=function(e){if("command"!==e.scheme||!(this.input instanceof p.WalkThroughInput))return e
;var t=e.query?JSON.parse(e.query):{};return t.from=this.input.getTelemetryFrom(),e.with({query:JSON.stringify(t)})},d.prototype.layout=function(e){this.size=e,M.size(this.content,e.width,e.height),this.updateSizeClasses(),this.contentDisposables.forEach(function(e){e instanceof m.CodeEditorWidget&&e.layout()}),this.scrollbar.scanDomNode()},d.prototype.updateSizeClasses=function(){var e=this.content.firstElementChild;if(this.size&&e){e.classList[this.size.height<=685?"add":"remove"]("max-height-685px")}},d.prototype.focus=function(){for(var e=document.activeElement;e&&e!==this.content;)e=e.parentElement;e||this.content.focus(),this.editorFocus.set(!0)},d.prototype.arrowUp=function(){var e=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:e.scrollTop-this.getArrowScrollHeight()})},d.prototype.arrowDown=function(){var e=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:e.scrollTop+this.getArrowScrollHeight()})},
d.prototype.getArrowScrollHeight=function(){var e=this.configurationService.getValue("editor.fontSize");return("number"!=typeof e||e<1)&&(e=12),3*e},d.prototype.pageUp=function(){var e=this.scrollbar.getScrollDimensions(),t=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:t.scrollTop-e.height})},d.prototype.pageDown=function(){var e=this.scrollbar.getScrollDimensions(),t=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:t.scrollTop+e.height})},d.prototype.setInput=function(t,n,i){var r=this;return this.input instanceof p.WalkThroughInput&&this.saveTextEditorViewState(this.input),this.contentDisposables=u.dispose(this.contentDisposables),this.content.innerHTML="",e.prototype.setInput.call(this,t,n,i).then(function(){return t.resolve(!0)}).then(function(e){if(!i.isCancellationRequested){var n=e.main.textEditorModel.getLinesContent().join("\n");if(!o.endsWith(t.getResource().path,".md"))return r.content.innerHTML=n,r.updateSizeClasses(),
r.decorateContent(),r.contentDisposables.push(r.keybindingService.onDidUpdateKeybindings(function(){return r.decorateContent()})),t.onReady&&t.onReady(r.content.firstElementChild),r.scrollbar.scanDomNode(),r.loadTextEditorViewState(t),void r.updatedScrollPosition();var s=0,a=new g.marked.Renderer;a.code=function(t,n){return'<div id="'+("snippet-"+e.snippets[s++].textEditorModel.uri.fragment)+'" class="walkThroughEditorContainer" ></div>'};var c=document.createElement("div");c.classList.add("walkThroughContent");var l=r.expandMacros(n);c.innerHTML=g.marked(l,{renderer:a}),r.content.appendChild(c),e.snippets.forEach(function(e,t){var n=e.textEditorModel,i="snippet-"+n.uri.fragment,o=c.querySelector("#"+i.replace(/\./g,"\\.")),s=r.getEditorOptions(e.textEditorModel.getModeId()),a={target:r.input instanceof p.WalkThroughInput?r.input.getTelemetryFrom():void 0,snippet:t},l=r.instantiationService.createInstance(m.CodeEditorWidget,o,s,{telemetryData:a});l.setModel(n),r.contentDisposables.push(l);var u=function(e){
var t=l.getConfiguration().lineHeight,i=Math.max(n.getLineCount()+1,4)*t+"px";o.style.height!==i&&(o.style.height=i,l.layout(),e||r.scrollbar.scanDomNode())};u(!0),r.contentDisposables.push(l.onDidChangeModelContent(function(){return u(!1)})),r.contentDisposables.push(l.onDidChangeCursorPosition(function(e){var t=r.content.firstElementChild;if(t){var n=o.getBoundingClientRect().top,i=t.getBoundingClientRect().top,s=l.getConfiguration().lineHeight,a=n+(e.position.lineNumber-1)*s-i,c=a+s,u=r.scrollbar.getScrollDimensions(),d=r.scrollbar.getScrollPosition().scrollTop,h=u.height;d>a?r.scrollbar.setScrollPosition({scrollTop:a}):d<c-h&&r.scrollbar.setScrollPosition({scrollTop:c-h})}})),r.contentDisposables.push(r.configurationService.onDidChangeConfiguration(function(){e.textEditorModel&&l.updateOptions(r.getEditorOptions(e.textEditorModel.getModeId()))})),r.contentDisposables.push(w.once(l.onMouseDown)(function(){r.telemetryService.publicLog("walkThroughSnippetInteraction",{
from:r.input instanceof p.WalkThroughInput?r.input.getTelemetryFrom():void 0,type:"mouseDown",snippet:t})})),r.contentDisposables.push(w.once(l.onKeyDown)(function(){r.telemetryService.publicLog("walkThroughSnippetInteraction",{from:r.input instanceof p.WalkThroughInput?r.input.getTelemetryFrom():void 0,type:"keyDown",snippet:t})})),r.contentDisposables.push(w.once(l.onDidChangeModelContent)(function(){r.telemetryService.publicLog("walkThroughSnippetInteraction",{from:r.input instanceof p.WalkThroughInput?r.input.getTelemetryFrom():void 0,type:"changeModelContent",snippet:t})}))}),r.updateSizeClasses(),r.multiCursorModifier(),r.contentDisposables.push(r.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("editor.multiCursorModifier")&&r.multiCursorModifier()})),t.onReady&&t.onReady(c),r.scrollbar.scanDomNode(),r.loadTextEditorViewState(t),r.updatedScrollPosition()}})},d.prototype.getEditorOptions=function(e){var t=R.deepClone(this.configurationService.getValue("editor",{
overrideIdentifier:e}));return c({},I.isObject(t)?t:Object.create(null),{scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:3,fixedOverflowWidgets:!0,lineNumbersMinChars:1,minimap:{enabled:!1}})},d.prototype.expandMacros=function(e){var t=this;return e.replace(/kb\(([a-z.\d\-]+)\)/gi,function(e,n){var i=t.keybindingService.lookupKeybinding(n),r=i?i.getLabel():N;return'<span class="shortcut">'+o.escape(r)+"</span>"})},d.prototype.decorateContent=function(){var e=this,t=this.content.querySelectorAll(".shortcut[data-command]");Array.prototype.forEach.call(t,function(t){for(var n=t.getAttribute("data-command"),i=n&&e.keybindingService.lookupKeybinding(n),r=i?i.getLabel():N;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))});var n=this.content.querySelectorAll(".if_shortcut[data-command]");Array.prototype.forEach.call(n,function(t){
var n=t.getAttribute("data-command"),i=n&&e.keybindingService.lookupKeybinding(n);t.style.display=i?"":"none"})},d.prototype.multiCursorModifier=function(){var e=A.UILabelProvider.modifierLabels[L.OS]["ctrlCmd"===this.configurationService.getValue("editor.multiCursorModifier")?2===L.OS?"metaKey":"ctrlKey":"altKey"],t=this.content.querySelectorAll(".multi-cursor-modifier");Array.prototype.forEach.call(t,function(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))})},d.prototype.saveTextEditorViewState=function(e){var t=this.scrollbar.getScrollPosition();this.editorMemento.saveState(this.group,e,{viewState:{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}})},d.prototype.loadTextEditorViewState=function(e){var t=this.editorMemento.loadState(this.group,e);t&&this.scrollbar.setScrollPosition(t.viewState)},d.prototype.clearInput=function(){this.input instanceof p.WalkThroughInput&&this.saveTextEditorViewState(this.input),e.prototype.clearInput.call(this)},
d.prototype.shutdown=function(){this.input instanceof p.WalkThroughInput&&this.saveTextEditorViewState(this.input),e.prototype.shutdown.call(this)},d.prototype.dispose=function(){this.editorFocus.reset(),this.contentDisposables=u.dispose(this.contentDisposables),this.disposables=u.dispose(this.disposables),e.prototype.dispose.call(this)},d.ID="workbench.editor.walkThroughPart",d=a([l(0,h.ITelemetryService),l(1,x.IThemeService),l(2,v.IModelService),l(3,y.IInstantiationService),l(4,f.IOpenerService),l(5,b.IKeybindingService),l(6,_.IStorageService),l(7,C.IContextKeyService),l(8,E.IConfigurationService),l(9,O.INotificationService),l(10,P.IEditorGroupsService)],d)}(d.BaseEditor);t.WalkThroughPart=W,t.embeddedEditorBackground=k.registerColor("walkThrough.embeddedEditorBackground",{dark:null,light:null,hc:null},S.localize(2,null)),x.registerThemingParticipant(function(e,n){var i=D.getExtraColor(e,t.embeddedEditorBackground,{dark:"rgba(0, 0, 0, .4)",extra_dark:"rgba(200, 235, 255, .064)",light:"rgba(0,0,0,.08)",
hc:null});i&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background,\n\t\t\t.monaco-workbench > .part.editor > .content .walkThroughContent .margin-view-overlays { background: "+i+"; }");var r=e.getColor(k.textLinkForeground);r&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent a { color: "+r+"; }");var o=e.getColor(k.textLinkActiveForeground);o&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent a:hover,\n\t\t\t.monaco-workbench > .part.editor > .content .walkThroughContent a:active { color: "+o+"; }");var s=e.getColor(k.focusBorder);s&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent a:focus { outline-color: "+s+"; }");var a=e.getColor(k.textPreformatForeground);a&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent code,\n\t\t\t.monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { color: "+a+"; }");var c=e.getColor(k.contrastBorder)
;c&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor { border-color: "+c+"; }");var l=e.getColor(k.textBlockQuoteBackground);l&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent blockquote { background: "+l+"; }");var u=e.getColor(k.textBlockQuoteBorder);u&&n.addRule(".monaco-workbench > .part.editor > .content .walkThroughContent blockquote { border-color: "+u+"; }")})}),define(e[1318],t([1,0,21,457,52,55,15]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkThroughArrowUp={id:"workbench.action.interactivePlayground.arrowUp",weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:s.ContextKeyExpr.and(i.WALK_THROUGH_FOCUS,o.EditorContextKeys.editorTextFocus.toNegated()),primary:16,handler:function(e){var t=e.get(n.IEditorService).activeControl;t instanceof i.WalkThroughPart&&t.arrowUp()}},t.WalkThroughArrowDown={id:"workbench.action.interactivePlayground.arrowDown",
weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:s.ContextKeyExpr.and(i.WALK_THROUGH_FOCUS,o.EditorContextKeys.editorTextFocus.toNegated()),primary:18,handler:function(e){var t=e.get(n.IEditorService).activeControl;t instanceof i.WalkThroughPart&&t.arrowDown()}},t.WalkThroughPageUp={id:"workbench.action.interactivePlayground.pageUp",weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:s.ContextKeyExpr.and(i.WALK_THROUGH_FOCUS,o.EditorContextKeys.editorTextFocus.toNegated()),primary:11,handler:function(e){var t=e.get(n.IEditorService).activeControl;t instanceof i.WalkThroughPart&&t.pageUp()}},t.WalkThroughPageDown={id:"workbench.action.interactivePlayground.pageDown",weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:s.ContextKeyExpr.and(i.WALK_THROUGH_FOCUS,o.EditorContextKeys.editorTextFocus.toNegated()),primary:12,handler:function(e){var t=e.get(n.IEditorService).activeControl;t instanceof i.WalkThroughPart&&t.pageDown()}}}),define(e[1319],t([1,0,163]),function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.createSHA1=function(e){return n.createHash("sha1").update(e).digest("hex")},e}();t.HashService=i}),define(e[162],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHistoryService=n.createDecorator("historyService")}),define(e[1321],t([1,0,620,11,16,17,107,25,531,31,63,94,532,1118,162,165,52,33,58,327,29,43,20,21]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i.isWindows?s.registerSingleton(c.ITerminalService,p.WinTerminalService):i.isMacintosh?s.registerSingleton(c.ITerminalService,p.MacTerminalService):i.isLinux&&s.registerSingleton(c.ITerminalService,p.LinuxTerminalService),h.getDefaultTerminalLinuxReady().then(function(e){r.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"externalTerminal",order:100,title:n.localize(0,null),type:"object",properties:{"terminal.explorerKind":{
type:"string",enum:["integrated","external"],description:n.localize(1,null),default:"integrated"},"terminal.external.windowsExec":{type:"string",description:n.localize(2,null),default:h.getDefaultTerminalWindows(),scope:u.ConfigurationScope.APPLICATION},"terminal.external.osxExec":{type:"string",description:n.localize(3,null),default:h.DEFAULT_TERMINAL_OSX,scope:u.ConfigurationScope.APPLICATION},"terminal.external.linuxExec":{type:"string",description:n.localize(4,null),default:e,scope:u.ConfigurationScope.APPLICATION}}})});S.CommandsRegistry.registerCommand({id:"openInTerminal",handler:function(e,t){var n=e.get(o.IConfigurationService),i=e.get(E.IEditorService),r=e.get(m.IFileService),s=e.get(d.ITerminalService),l=e.get(c.ITerminalService),u=b.getMultiSelectedResources(t,e.get(y.IListService),i);return r.resolveFiles(u.map(function(e){return{resource:e}})).then(function(e){return C.distinct(e.map(function(e){var t=e.stat;return t.isDirectory?t.resource.fsPath:a.dirname(t.resource.fsPath)})).map(function(e){
if("integrated"===n.getValue().terminal.explorerKind){var i=s.createTerminal({cwd:e},!0);!i||1!==u.length&&t&&e!==t.fsPath&&e!==a.dirname(t.fsPath)||(s.setActiveInstance(i),s.showPanel(!0))}else l.openTerminal(e)})})}});v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.terminal.openNativeConsole",primary:3105,when:d.KEYBINDING_CONTEXT_TERMINAL_NOT_FOCUSED,weight:v.KeybindingsRegistry.WEIGHT.workbenchContrib(),handler:function(e){var t=e.get(f.IHistoryService),n=e.get(c.ITerminalService),i=t.getLastActiveWorkspaceRoot(_.Schemas.file);if(i)n.openTerminal(i.fsPath);else{var r=t.getLastActiveFile();r&&n.openTerminal(a.dirname(r.fsPath))}}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:"workbench.action.terminal.openNativeConsole",title:i.isWindows?n.localize(5,null):n.localize(6,null)}});var w={id:"openInTerminal",title:i.isWindows?n.localize(7,null):n.localize(8,null)};l.MenuRegistry.appendMenuItem(l.MenuId.OpenEditorsContext,{group:"navigation",order:30,
command:w,when:g.ResourceContextKey.Scheme.isEqualTo(_.Schemas.file)}),l.MenuRegistry.appendMenuItem(l.MenuId.ExplorerContext,{group:"navigation",order:30,command:w,when:g.ResourceContextKey.Scheme.isEqualTo(_.Schemas.file)})}),define(e[1322],t([1,0,156,11,403,10,94,4,77,7,266,27,162,1177,6]),function(e,t,n,i,r,o,s,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function t(e,t,n,i,r,o,a){var c=this;this._terminalId=e,this._configHelper=t,this._workspaceContextService=n,this._historyService=i,this._configurationResolverService=r,this._instantiationService=o,this._logService=a,this.processState=s.ProcessState.UNINITIALIZED,this._preLaunchInputQueue=[],this._disposables=[],this._onProcessReady=new h.Emitter,this._onProcessData=new h.Emitter,this._onProcessTitle=new h.Emitter,this._onProcessExit=new h.Emitter,this.ptyProcessReady=new u.TPromise(function(e){c.onProcessReady(function(){
c._logService.debug("Terminal process ready (shellProcessId: "+c.shellProcessId+")"),e(void 0)})})}return Object.defineProperty(t.prototype,"onProcessReady",{get:function(){return this._onProcessReady.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onProcessData",{get:function(){return this._onProcessData.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onProcessTitle",{get:function(){return this._onProcessTitle.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onProcessExit",{get:function(){return this._onProcessExit.event},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._process&&(this._process.connected&&(this.processState=s.ProcessState.KILLED_BY_USER,this._process.send({event:"shutdown"})),this._process=null),this._disposables.forEach(function(e){return e.dispose()}),this._disposables.length=0},t.prototype.addDisposable=function(e){this._disposables.push(e)},t.prototype.createProcess=function(t,a,l){var u=this
;if(this._configHelper.config.extHostProcess)this._process=this._instantiationService.createInstance(v.TerminalProcessExtHostProxy,this._terminalId,t,a,l);else{var d=this._configHelper.config.setLocaleVariables?i.locale:void 0;t.executable||this._configHelper.mergeDefaultShellPathAndArgs(t);var h=this._historyService.getLastActiveWorkspaceRoot("file");this.initialCwd=r.getCwd(t,h,this._configHelper);var p=this._workspaceContextService.getWorkspaceFolder(h),f=i.isWindows?"windows":i.isMacintosh?"osx":"linux",g=r.resolveConfigurationVariables(this._configurationResolverService,c({},this._configHelper.config.env[f]),p),m=r.resolveConfigurationVariables(this._configurationResolverService,c({},t.env),p);t.env=m;var y=c({},process.env);r.mergeEnvironments(y,g);var b={env:r.createTerminalEnv(y,t,this.initialCwd,d,a,l),cwd:o.default.parse(e.toUrl("../node")).fsPath};this._logService.debug("Terminal process launching",b),this._process=n.fork(o.default.parse(e.toUrl("bootstrap")).fsPath,["--type=terminal"],b)}
this.processState=s.ProcessState.LAUNCHING,this._process.on("message",function(e){return u._onMessage(e)}),this._process.on("exit",function(e){return u._onExit(e)}),setTimeout(function(){u.processState===s.ProcessState.LAUNCHING&&(u.processState=s.ProcessState.RUNNING)},500)},t.prototype.setDimensions=function(e,t){if(this._process&&this._process.connected)try{this._process.send({event:"resize",cols:e,rows:t})}catch(e){if("EPIPE"!==e.code&&"ERR_IPC_CHANNEL_CLOSED"!==e.code)throw e}},t.prototype.write=function(e){this.shellProcessId?this._process&&this._process.send({event:"input",data:e}):this._preLaunchInputQueue.push(e)},t.prototype._onMessage=function(e){switch(this._logService.trace("terminalProcessManager#_onMessage (shellProcessId: "+this.shellProcessId,e),e.type){case"data":this._onProcessData.fire(e.content);break;case"pid":this.shellProcessId=e.content,this._onProcessReady.fire(),this._preLaunchInputQueue.length>0&&(this._process.send({event:"input",data:this._preLaunchInputQueue.join("")}),
this._preLaunchInputQueue.length=0);break;case"title":this._onProcessTitle.fire(e.content)}},t.prototype._onExit=function(e){this._process=null,this.processState===s.ProcessState.LAUNCHING&&(this.processState=s.ProcessState.KILLED_DURING_LAUNCH),this.processState===s.ProcessState.RUNNING&&(this.processState=s.ProcessState.KILLED_BY_PROCESS),this._onProcessExit.fire(e)},t=a([l(2,f.IWorkspaceContextService),l(3,g.IHistoryService),l(4,p.IConfigurationResolverService),l(5,m.IInstantiationService),l(6,d.ILogService)],t)}();t.TerminalProcessManager=y}),define(e[1323],t([1,0,9,10,40,21,33,60,27,5,34,38,16,7,17,53,42,45,140,6,509,43]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e,t){this._editorInput=e,this._selection=t,this.textEditorSelection=c.Selection.isISelection(t)?{startLineNumber:t.startLineNumber,startColumn:t.startColumn}:void 0}return Object.defineProperty(e.prototype,"editorInput",{get:function(){
return this._editorInput},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){return this.textEditorSelection},enumerable:!0,configurable:!0}),e.prototype.justifiesNewPushState=function(t,n){if(n&&"api"===n.source)return!0;if(!this._editorInput.matches(t._editorInput))return!0;if(!c.Selection.isISelection(this._selection)||!c.Selection.isISelection(t._selection))return!0;var i=Math.min(this._selection.selectionStartLineNumber,this._selection.positionLineNumber),r=Math.min(t._selection.selectionStartLineNumber,t._selection.positionLineNumber);return!(Math.abs(i-r)<e.EDITOR_SELECTION_THRESHOLD)},e.EDITOR_SELECTION_THRESHOLD=10,e}();t.TextEditorState=w;var I=function(){function e(e,t,n,i,o,a,c,l,u){var d=this;this.editorService=e,this.editorGroupService=t,this.contextService=n,this.storageService=i,this.configurationService=o,this.lifecycleService=a,this.fileService=c,this.windowService=l,this.instantiationService=u,this.toUnbind=[],this.activeEditorListeners=[],
this.fileInputFactory=f.Registry.as(r.Extensions.EditorInputFactories).getFileInputFactory(),this.index=-1,this.lastIndex=-1,this.stack=[],this.recentlyClosedFiles=[],this.loaded=!1,this.resourceFilter=u.createInstance(C.ResourceGlobMatcher,function(e){return d.getExcludes(e)},function(e){return e.affectsConfiguration(s.FILES_EXCLUDE_CONFIG)||e.affectsConfiguration("search.exclude")}),this.registerListeners()}return e.prototype.getExcludes=function(e){var t=e?{resource:e}:void 0;return S.getExcludes(this.configurationService.getValue(t))},e.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.editorService.onDidActiveEditorChange(function(){return e.onActiveEditorChanged()})),this.toUnbind.push(this.editorService.onDidOpenEditorFail(function(t){return e.remove(t.editor)})),this.toUnbind.push(this.editorService.onDidCloseEditor(function(t){return e.onEditorClosed(t)})),this.toUnbind.push(this.lifecycleService.onShutdown(function(t){return e.saveHistory()})),
this.toUnbind.push(this.fileService.onFileChanges(function(t){return e.onFileChanges(t)})),this.toUnbind.push(this.resourceFilter.onExpressionChange(function(){return e.handleExcludesChange()}))},e.prototype.onActiveEditorChanged=function(){var e=this,t=this.editorService.activeControl;if(!this.lastActiveEditor||!this.matchesEditor(this.lastActiveEditor,t)){this.lastActiveEditor=t?{editor:t.input,groupId:t.group.id}:void 0,d.dispose(this.activeEditorListeners),this.activeEditorListeners=[],this.handleActiveEditorChange(t);var n=b.getCodeEditor(this.editorService.activeTextEditorWidget);n&&this.activeEditorListeners.push(g.debounceEvent(n.onDidChangeCursorPosition,function(e,t){return t},0)(function(n){e.handleEditorSelectionChangeEvent(t,n)}))}},e.prototype.matchesEditor=function(e,t){return!!t&&(e.groupId===t.group.id&&e.editor.matches(t.input))},e.prototype.onFileChanges=function(e){e.gotDeleted()&&this.remove(e)},e.prototype.onEditorClosed=function(t){if(!t.replaced){
var n=t.editor?t.editor.getResource():void 0;n&&this.fileService.canHandleResource(n)&&(this.removeFromRecentlyClosedFiles(t.editor),this.recentlyClosedFiles.push({resource:n,index:t.index}),this.recentlyClosedFiles.length>e.MAX_RECENTLY_CLOSED_EDITORS&&this.recentlyClosedFiles.shift())}},e.prototype.reopenLastClosedEditor=function(){this.ensureHistoryLoaded();for(var e=this.recentlyClosedFiles.pop();e&&this.isFileOpened(e.resource,this.editorGroupService.activeGroup);)e=this.recentlyClosedFiles.pop();e&&this.editorService.openEditor({resource:e.resource,options:{pinned:!0,index:e.index}})},e.prototype.forward=function(e){this.stack.length>this.index+1&&(e?this.doForwardAcrossEditors():this.doForwardInEditors())},e.prototype.doForwardInEditors=function(){this.setIndex(this.index+1),this.navigate()},e.prototype.setIndex=function(e){this.lastIndex=this.index,this.index=e},e.prototype.doForwardAcrossEditors=function(){for(var e=this.index,t=this.stack[this.index];this.stack.length>e+1;){e++;var n=this.stack[e]
;if(!this.matches(t.input,n.input)){this.setIndex(e),this.navigate(!0);break}}},e.prototype.back=function(e){this.index>0&&(e?this.doBackAcrossEditors():this.doBackInEditors())},e.prototype.last=function(){-1===this.lastIndex?this.back():(this.setIndex(this.lastIndex),this.navigate())},e.prototype.doBackInEditors=function(){this.setIndex(this.index-1),this.navigate()},e.prototype.doBackAcrossEditors=function(){for(var e=this.index,t=this.stack[this.index];e>0;){e--;var n=this.stack[e];if(!this.matches(t.input,n.input)){this.setIndex(e),this.navigate(!0);break}}},e.prototype.clear=function(){this.ensureHistoryLoaded(),this.index=-1,this.lastIndex=-1,this.stack.splice(0),this.history=[],this.recentlyClosedFiles=[]},e.prototype.navigate=function(e){var t=this,i=this.stack[this.index],o={revealIfOpened:!0};i.selection&&!e&&(o.selection=i.selection,o.revealInCenterIfOutsideViewport=!0),this.navigatingInStack=!0
;(i.input instanceof r.EditorInput?this.editorService.openEditor(i.input,o):this.editorService.openEditor({resource:i.input.resource,options:o})).done(function(){t.navigatingInStack=!1},function(e){t.navigatingInStack=!1,n.onUnexpectedError(e)})},e.prototype.handleEditorSelectionChangeEvent=function(e,t){this.handleEditorEventInStack(e,t)},e.prototype.handleActiveEditorChange=function(e){this.handleEditorEventInHistory(e),this.handleEditorEventInStack(e)},e.prototype.handleEditorEventInHistory=function(t){var n=this,i=t?t.input:void 0;if(i&&i.getName()&&this.include(i)){this.ensureHistoryLoaded();var o=this.preferResourceInput(i);this.removeFromHistory(i),this.history.unshift(o),this.history.length>e.MAX_HISTORY_ITEMS&&this.history.pop(),o instanceof r.EditorInput&&g.once(o.onDispose)(function(){return n.removeFromHistory(i)})}},e.prototype.include=function(e){if(e instanceof r.EditorInput)return!0;var t=e;return!this.resourceFilter.matches(t.resource)},e.prototype.handleExcludesChange=function(){
this.removeExcludedFromHistory()},e.prototype.remove=function(e){this.removeFromHistory(e),this.removeFromStack(e),this.removeFromRecentlyClosedFiles(e),this.removeFromRecentlyOpened(e)},e.prototype.removeExcludedFromHistory=function(){var e=this;this.ensureHistoryLoaded(),this.history=this.history.filter(function(t){return e.include(t)})},e.prototype.removeFromHistory=function(e){var t=this;this.ensureHistoryLoaded(),this.history=this.history.filter(function(n){return!t.matches(e,n)})},e.prototype.handleEditorEventInStack=function(e,t){var n=e?b.getCodeEditor(e.getControl()):void 0;this.navigatingInStack?n&&e.input?this.currentTextEditorState=new w(e.input,n.getSelection()):this.currentTextEditorState=null:n&&e.input?this.handleTextEditorEvent(e,n,t):(this.currentTextEditorState=null,e&&e.input&&this.handleNonTextEditorEvent(e))},e.prototype.handleTextEditorEvent=function(e,t,n){var i=new w(e.input,t.getSelection())
;!this.currentTextEditorState||this.currentTextEditorState.justifiesNewPushState(i,n)?this.add(e.input,i.selection):this.replace(e.input,i.selection),this.currentTextEditorState=i},e.prototype.handleNonTextEditorEvent=function(e){var t=this.stack[this.index];t&&this.matches(e.input,t.input)||this.add(e.input)},e.prototype.add=function(e,t){this.navigatingInStack||this.addOrReplaceInStack(e,t)},e.prototype.replace=function(e,t){this.navigatingInStack||this.addOrReplaceInStack(e,t,!0)},e.prototype.addOrReplaceInStack=function(t,n,i){var o=this,s=!1,a=this.stack[this.index];a&&(i?s=!0:this.matches(t,a.input)&&this.sameSelection(a.selection,n)&&(s=!0));var c=this.preferResourceInput(t),l={input:c,selection:n,timestamp:Date.now()};s?this.stack[this.index]=l:(this.stack.length>this.index+1&&(this.stack=this.stack.slice(0,this.index+1)),this.stack.splice(this.index+1,0,l),this.stack.length>e.MAX_STACK_ITEMS?(this.stack.shift(),this.lastIndex>=0&&this.lastIndex--):this.setIndex(this.index+1)),
c instanceof r.EditorInput&&g.once(c.onDispose)(function(){return o.removeFromStack(t)})},e.prototype.preferResourceInput=function(e){return this.fileInputFactory.isFileInput(e)?{resource:e.getResource()}:e},e.prototype.sameSelection=function(e,t){return!e&&!t||!(!e&&t||e&&!t)&&e.startLineNumber===t.startLineNumber},e.prototype.removeFromStack=function(e){var t=this;this.stack=this.stack.filter(function(n){return!t.matches(e,n.input)}),this.index=this.stack.length-1,this.lastIndex=-1},e.prototype.removeFromRecentlyClosedFiles=function(e){var t=this;this.recentlyClosedFiles=this.recentlyClosedFiles.filter(function(n){return!t.matchesFile(n.resource,e)})},e.prototype.removeFromRecentlyOpened=function(e){if(!(e instanceof r.EditorInput||e instanceof s.FileChangesEvent)){var t=e;this.windowService.removeFromRecentlyOpened([t.resource.fsPath])}},e.prototype.isFileOpened=function(e,t){var n=this;return!!t&&(!!this.editorService.isOpen({resource:e},t)&&t.editors.some(function(t){return n.matchesFile(e,t)}))},
e.prototype.matches=function(e,t){if(e instanceof s.FileChangesEvent){if(t instanceof r.EditorInput)return!1;var n=t;return e.contains(n.resource,s.FileChangeType.DELETED)}if(e instanceof r.EditorInput&&t instanceof r.EditorInput)return e.matches(t);if(e instanceof r.EditorInput)return this.matchesFile(t.resource,e);if(t instanceof r.EditorInput)return this.matchesFile(e.resource,t);var i=e,o=t;return i&&o&&i.resource.toString()===o.resource.toString()},e.prototype.matchesFile=function(e,t){if(t instanceof s.FileChangesEvent)return t.contains(e,s.FileChangeType.DELETED);if(t instanceof r.EditorInput){var n=t.getResource();return n&&this.fileService.canHandleResource(n)&&n.toString()===e.toString()}var i=t;return i&&i.resource.toString()===e.toString()},e.prototype.getHistory=function(){return this.ensureHistoryLoaded(),this.history.slice(0)},e.prototype.ensureHistoryLoaded=function(){this.loaded||this.loadHistory(),this.loaded=!0},e.prototype.saveHistory=function(){if(this.history){
var t=f.Registry.as(r.Extensions.EditorInputFactories),n=this.history.map(function(e){if(!(e instanceof r.EditorInput))return{resourceJSON:e.resource.toJSON()};var n=t.getEditorInputFactory(e.getTypeId());if(n){var i=n.serialize(e);if(i)return{editorInputJSON:{typeId:e.getTypeId(),deserialized:i}}}}).filter(function(e){return!!e});this.storageService.store(e.STORAGE_KEY,JSON.stringify(n),h.StorageScope.WORKSPACE)}},e.prototype.loadHistory=function(){var t=this,n=[],o=this.storageService.get(e.STORAGE_KEY,h.StorageScope.WORKSPACE);o&&(n=JSON.parse(o).filter(function(e){return!!e}));var s=f.Registry.as(r.Extensions.EditorInputFactories);this.history=n.map(function(e){var n=e;if(n.resourceJSON)return{resource:i.default.revive(n.resourceJSON)};var r=n.editorInputJSON;if(r&&r.deserialized){var o=s.getEditorInputFactory(r.typeId);if(o){var a=o.deserialize(t.instantiationService,r.deserialized);return a&&g.once(a.onDispose)(function(){return t.removeFromHistory(a)}),a}}}).filter(function(e){return!!e})},
e.prototype.getLastActiveWorkspaceRoot=function(e){var t=this.contextService.getWorkspace().folders;if(0!==t.length)if(1!==t.length){for(var n=this.getHistory(),i=0;i<n.length;i++){var o=n[i];if(!(o instanceof r.EditorInput)){var s=o;if(!e||s.resource.scheme===e){var a=this.contextService.getWorkspaceFolder(s.resource);if(a)return a.uri}}}for(i=0;i<t.length;i++){c=t[i].uri;if(!e||c.scheme===e)return c}}else{var c=t[0].uri;if(!e||c.scheme===e)return c}},e.prototype.getLastActiveFile=function(){for(var e=this.getHistory(),t=0;t<e.length;t++){var n=void 0,i=e[t];if((n=i instanceof r.EditorInput?r.toResource(i,{filter:E.Schemas.file}):i.resource)&&n.scheme===E.Schemas.file)return n}},e.prototype.dispose=function(){this.toUnbind=d.dispose(this.toUnbind)},e.STORAGE_KEY="history.entries",e.MAX_HISTORY_ITEMS=200,e.MAX_STACK_ITEMS=20,e.MAX_RECENTLY_CLOSED_EDITORS=20,
e=a([l(0,o.IEditorService),l(1,m.IEditorGroupsService),l(2,u.IWorkspaceContextService),l(3,h.IStorageService),l(4,v.IConfigurationService),l(5,p.ILifecycleService),l(6,s.IFileService),l(7,y.IWindowsService),l(8,_.IInstantiationService)],e)}();t.HistoryService=I}),define(e[329],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkbenchIssueService=n.createDecorator("workbenchIssueService")}),define(e[1325],t([1,0,295,12,26,69,80,103,24]),function(e,t,n,i,r,o,s,c,u){"use strict";function d(e){return{backgroundColor:e.getColor(o.SIDE_BAR_BACKGROUND)&&e.getColor(o.SIDE_BAR_BACKGROUND).toString(),color:e.getColor(r.foreground).toString(),textLinkColor:e.getColor(r.textLinkForeground)&&e.getColor(r.textLinkForeground).toString(),textLinkActiveForeground:e.getColor(r.textLinkActiveForeground)&&e.getColor(r.textLinkActiveForeground).toString(),inputBackground:e.getColor(r.inputBackground)&&e.getColor(r.inputBackground).toString(),
inputForeground:e.getColor(r.inputForeground)&&e.getColor(r.inputForeground).toString(),inputBorder:e.getColor(r.inputBorder)&&e.getColor(r.inputBorder).toString(),inputActiveBorder:e.getColor(r.inputActiveOptionBorder)&&e.getColor(r.inputActiveOptionBorder).toString(),inputErrorBorder:e.getColor(r.inputValidationErrorBorder)&&e.getColor(r.inputValidationErrorBorder).toString(),buttonBackground:e.getColor(r.buttonBackground)&&e.getColor(r.buttonBackground).toString(),buttonForeground:e.getColor(r.buttonForeground)&&e.getColor(r.buttonForeground).toString(),buttonHoverBackground:e.getColor(r.buttonHoverBackground)&&e.getColor(r.buttonHoverBackground).toString(),sliderActiveColor:e.getColor(r.scrollbarSliderActiveBackground)&&e.getColor(r.scrollbarSliderActiveBackground).toString(),sliderBackgroundColor:e.getColor(r.scrollbarSliderBackground)&&e.getColor(r.scrollbarSliderBackground).toString(),sliderHoverColor:e.getColor(r.scrollbarSliderHoverBackground)&&e.getColor(r.scrollbarSliderHoverBackground).toString()}
}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,n,i){this.issueService=e,this.themeService=t,this.extensionManagementService=n,this.extensionEnablementService=i}return e.prototype.openReporter=function(e){var t=this;return void 0===e&&(e={}),this.extensionManagementService.getInstalled(s.LocalExtensionType.User).then(function(n){var i=n.filter(function(e){return t.extensionEnablementService.isEnabled(e)}),r=t.themeService.getTheme(),o=u.assign({styles:d(r),zoomLevel:c.webFrame.getZoomLevel(),enabledExtensions:i},e);return t.issueService.openReporter(o)})},e.prototype.openProcessExplorer=function(){var e=this.themeService.getTheme(),t={zoomLevel:c.webFrame.getZoomLevel(),styles:{backgroundColor:e.getColor(r.editorBackground)&&e.getColor(r.editorBackground).toString(),color:e.getColor(r.editorForeground).toString(),hoverBackground:e.getColor(r.listHoverBackground)&&e.getColor(r.listHoverBackground).toString(),
hoverForeground:e.getColor(r.listHoverForeground)&&e.getColor(r.listHoverForeground).toString(),highlightForeground:e.getColor(r.listHighlightForeground)&&e.getColor(r.listHighlightForeground).toString()}};return this.issueService.openProcessExplorer(t)},e=a([l(0,n.IIssueService),l(1,i.IThemeService),l(2,s.IExtensionManagementService),l(3,s.IExtensionEnablementService)],e)}();t.WorkbenchIssueService=h,t.getIssueReporterStyles=d}),define(e[1326],t([1,0,772,102,14,70]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i.ExtensionsRegistry.registerExtensionPoint("jsonValidation",[],{description:n.localize(0,null),type:"array",defaultSnippets:[{body:[{fileMatch:"${1:file.json}",url:"${2:url}"}]}],items:{type:"object",defaultSnippets:[{body:{fileMatch:"${1:file.json}",url:"${2:url}"}}],properties:{fileMatch:{type:"string",description:n.localize(1,null)},url:{description:n.localize(2,null),type:"string"}}}}),a=function(){return function(){s.setHandler(function(e){
for(var t=function(t){var i=e[t].value,a=e[t].collector,c=e[t].description.extensionLocation;if(!i||!Array.isArray(i))return a.error(n.localize(3,null)),{value:void 0};i.forEach(function(e){if("string"==typeof e.fileMatch){var t=e.url;if("string"==typeof e.url){if(r.startsWith(t,"./"))try{0!==o.joinPath(c,t).path.indexOf(c.path)&&a.warn(n.localize(6,null,s.name,location,c.path))}catch(e){a.error(n.localize(7,null,e.message))}else if(!r.startsWith(t,"https:/")&&r.startsWith(t,"https:/"))return void a.error(n.localize(8,null))}else a.error(n.localize(5,null))}else a.error(n.localize(4,null))})},i=0;i<e.length;i++){var a=t(i);if("object"==typeof a)return a.value}})}}();t.JSONValidationExtensionPoint=a}),define(e[1327],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._actual=e,this._cache=new Map}return e.prototype.dumpDebugInfo=function(){return this._actual.dumpDebugInfo()},e.prototype.resolveKeybinding=function(e){var t=e.getHashCode()
;if(!this._cache.has(t)){var n=this._actual.resolveKeybinding(e);return this._cache.set(t,n),n}return this._cache.get(t)},e.prototype.resolveKeyboardEvent=function(e){return this._actual.resolveKeyboardEvent(e)},e.prototype.resolveUserBinding=function(e,t){return this._actual.resolveUserBinding(e,t)},e}();t.CachedKeyboardMapper=n}),define(e[244],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Hyper=1]="Hyper",e[e.Super=2]="Super",e[e.Fn=3]="Fn",e[e.FnLock=4]="FnLock",e[e.Suspend=5]="Suspend",e[e.Resume=6]="Resume",e[e.Turbo=7]="Turbo",e[e.Sleep=8]="Sleep",e[e.WakeUp=9]="WakeUp",e[e.KeyA=10]="KeyA",e[e.KeyB=11]="KeyB",e[e.KeyC=12]="KeyC",e[e.KeyD=13]="KeyD",e[e.KeyE=14]="KeyE",e[e.KeyF=15]="KeyF",e[e.KeyG=16]="KeyG",e[e.KeyH=17]="KeyH",e[e.KeyI=18]="KeyI",e[e.KeyJ=19]="KeyJ",e[e.KeyK=20]="KeyK",e[e.KeyL=21]="KeyL",e[e.KeyM=22]="KeyM",e[e.KeyN=23]="KeyN",e[e.KeyO=24]="KeyO",e[e.KeyP=25]="KeyP",e[e.KeyQ=26]="KeyQ",e[e.KeyR=27]="KeyR",
e[e.KeyS=28]="KeyS",e[e.KeyT=29]="KeyT",e[e.KeyU=30]="KeyU",e[e.KeyV=31]="KeyV",e[e.KeyW=32]="KeyW",e[e.KeyX=33]="KeyX",e[e.KeyY=34]="KeyY",e[e.KeyZ=35]="KeyZ",e[e.Digit1=36]="Digit1",e[e.Digit2=37]="Digit2",e[e.Digit3=38]="Digit3",e[e.Digit4=39]="Digit4",e[e.Digit5=40]="Digit5",e[e.Digit6=41]="Digit6",e[e.Digit7=42]="Digit7",e[e.Digit8=43]="Digit8",e[e.Digit9=44]="Digit9",e[e.Digit0=45]="Digit0",e[e.Enter=46]="Enter",e[e.Escape=47]="Escape",e[e.Backspace=48]="Backspace",e[e.Tab=49]="Tab",e[e.Space=50]="Space",e[e.Minus=51]="Minus",e[e.Equal=52]="Equal",e[e.BracketLeft=53]="BracketLeft",e[e.BracketRight=54]="BracketRight",e[e.Backslash=55]="Backslash",e[e.IntlHash=56]="IntlHash",e[e.Semicolon=57]="Semicolon",e[e.Quote=58]="Quote",e[e.Backquote=59]="Backquote",e[e.Comma=60]="Comma",e[e.Period=61]="Period",e[e.Slash=62]="Slash",e[e.CapsLock=63]="CapsLock",e[e.F1=64]="F1",e[e.F2=65]="F2",e[e.F3=66]="F3",e[e.F4=67]="F4",e[e.F5=68]="F5",e[e.F6=69]="F6",e[e.F7=70]="F7",e[e.F8=71]="F8",e[e.F9=72]="F9",
e[e.F10=73]="F10",e[e.F11=74]="F11",e[e.F12=75]="F12",e[e.PrintScreen=76]="PrintScreen",e[e.ScrollLock=77]="ScrollLock",e[e.Pause=78]="Pause",e[e.Insert=79]="Insert",e[e.Home=80]="Home",e[e.PageUp=81]="PageUp",e[e.Delete=82]="Delete",e[e.End=83]="End",e[e.PageDown=84]="PageDown",e[e.ArrowRight=85]="ArrowRight",e[e.ArrowLeft=86]="ArrowLeft",e[e.ArrowDown=87]="ArrowDown",e[e.ArrowUp=88]="ArrowUp",e[e.NumLock=89]="NumLock",e[e.NumpadDivide=90]="NumpadDivide",e[e.NumpadMultiply=91]="NumpadMultiply",e[e.NumpadSubtract=92]="NumpadSubtract",e[e.NumpadAdd=93]="NumpadAdd",e[e.NumpadEnter=94]="NumpadEnter",e[e.Numpad1=95]="Numpad1",e[e.Numpad2=96]="Numpad2",e[e.Numpad3=97]="Numpad3",e[e.Numpad4=98]="Numpad4",e[e.Numpad5=99]="Numpad5",e[e.Numpad6=100]="Numpad6",e[e.Numpad7=101]="Numpad7",e[e.Numpad8=102]="Numpad8",e[e.Numpad9=103]="Numpad9",e[e.Numpad0=104]="Numpad0",e[e.NumpadDecimal=105]="NumpadDecimal",e[e.IntlBackslash=106]="IntlBackslash",e[e.ContextMenu=107]="ContextMenu",e[e.Power=108]="Power",
e[e.NumpadEqual=109]="NumpadEqual",e[e.F13=110]="F13",e[e.F14=111]="F14",e[e.F15=112]="F15",e[e.F16=113]="F16",e[e.F17=114]="F17",e[e.F18=115]="F18",e[e.F19=116]="F19",e[e.F20=117]="F20",e[e.F21=118]="F21",e[e.F22=119]="F22",e[e.F23=120]="F23",e[e.F24=121]="F24",e[e.Open=122]="Open",e[e.Help=123]="Help",e[e.Select=124]="Select",e[e.Again=125]="Again",e[e.Undo=126]="Undo",e[e.Cut=127]="Cut",e[e.Copy=128]="Copy",e[e.Paste=129]="Paste",e[e.Find=130]="Find",e[e.AudioVolumeMute=131]="AudioVolumeMute",e[e.AudioVolumeUp=132]="AudioVolumeUp",e[e.AudioVolumeDown=133]="AudioVolumeDown",e[e.NumpadComma=134]="NumpadComma",e[e.IntlRo=135]="IntlRo",e[e.KanaMode=136]="KanaMode",e[e.IntlYen=137]="IntlYen",e[e.Convert=138]="Convert",e[e.NonConvert=139]="NonConvert",e[e.Lang1=140]="Lang1",e[e.Lang2=141]="Lang2",e[e.Lang3=142]="Lang3",e[e.Lang4=143]="Lang4",e[e.Lang5=144]="Lang5",e[e.Abort=145]="Abort",e[e.Props=146]="Props",e[e.NumpadParenLeft=147]="NumpadParenLeft",e[e.NumpadParenRight=148]="NumpadParenRight",
e[e.NumpadBackspace=149]="NumpadBackspace",e[e.NumpadMemoryStore=150]="NumpadMemoryStore",e[e.NumpadMemoryRecall=151]="NumpadMemoryRecall",e[e.NumpadMemoryClear=152]="NumpadMemoryClear",e[e.NumpadMemoryAdd=153]="NumpadMemoryAdd",e[e.NumpadMemorySubtract=154]="NumpadMemorySubtract",e[e.NumpadClear=155]="NumpadClear",e[e.NumpadClearEntry=156]="NumpadClearEntry",e[e.ControlLeft=157]="ControlLeft",e[e.ShiftLeft=158]="ShiftLeft",e[e.AltLeft=159]="AltLeft",e[e.MetaLeft=160]="MetaLeft",e[e.ControlRight=161]="ControlRight",e[e.ShiftRight=162]="ShiftRight",e[e.AltRight=163]="AltRight",e[e.MetaRight=164]="MetaRight",e[e.BrightnessUp=165]="BrightnessUp",e[e.BrightnessDown=166]="BrightnessDown",e[e.MediaPlay=167]="MediaPlay",e[e.MediaRecord=168]="MediaRecord",e[e.MediaFastForward=169]="MediaFastForward",e[e.MediaRewind=170]="MediaRewind",e[e.MediaTrackNext=171]="MediaTrackNext",e[e.MediaTrackPrevious=172]="MediaTrackPrevious",e[e.MediaStop=173]="MediaStop",e[e.Eject=174]="Eject",e[e.MediaPlayPause=175]="MediaPlayPause",
e[e.MediaSelect=176]="MediaSelect",e[e.LaunchMail=177]="LaunchMail",e[e.LaunchApp2=178]="LaunchApp2",e[e.LaunchApp1=179]="LaunchApp1",e[e.SelectTask=180]="SelectTask",e[e.LaunchScreenSaver=181]="LaunchScreenSaver",e[e.BrowserSearch=182]="BrowserSearch",e[e.BrowserHome=183]="BrowserHome",e[e.BrowserBack=184]="BrowserBack",e[e.BrowserForward=185]="BrowserForward",e[e.BrowserStop=186]="BrowserStop",e[e.BrowserRefresh=187]="BrowserRefresh",e[e.BrowserFavorites=188]="BrowserFavorites",e[e.ZoomToggle=189]="ZoomToggle",e[e.MailReply=190]="MailReply",e[e.MailForward=191]="MailForward",e[e.MailSend=192]="MailSend",e[e.MAX_VALUE=193]="MAX_VALUE"}(t.ScanCode||(t.ScanCode={}));var n=[],i=Object.create(null),r=Object.create(null);t.ScanCodeUtils={lowerCaseToEnum:function(e){return r[e]||0},toEnum:function(e){return i[e]||0},toString:function(e){return n[e]||"None"}},t.IMMUTABLE_CODE_TO_KEY_CODE=[],t.IMMUTABLE_KEY_CODE_TO_CODE=[];var o=function(){function e(e,t,n,i,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,
this.metaKey=i,this.scanCode=r}return e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.scanCode===e.scanCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&(157===this.scanCode||161===this.scanCode)||this.shiftKey&&(158===this.scanCode||162===this.scanCode)||this.altKey&&(159===this.scanCode||163===this.scanCode)||this.metaKey&&(160===this.scanCode||164===this.scanCode)},e}();t.ScanCodeBinding=o,function(){function e(e,t){n[e]=t,i[t]=e,r[t.toLowerCase()]=e}e(0,"None"),e(1,"Hyper"),e(2,"Super"),e(3,"Fn"),e(4,"FnLock"),e(5,"Suspend"),e(6,"Resume"),e(7,"Turbo"),e(8,"Sleep"),e(9,"WakeUp"),e(10,"KeyA"),e(11,"KeyB"),e(12,"KeyC"),e(13,"KeyD"),e(14,"KeyE"),e(15,"KeyF"),e(16,"KeyG"),e(17,"KeyH"),e(18,"KeyI"),e(19,"KeyJ"),e(20,"KeyK"),e(21,"KeyL"),e(22,"KeyM"),e(23,"KeyN"),e(24,"KeyO"),e(25,"KeyP"),e(26,"KeyQ"),e(27,"KeyR"),e(28,"KeyS"),e(29,"KeyT"),e(30,"KeyU"),e(31,"KeyV"),e(32,"KeyW"),e(33,"KeyX"),
e(34,"KeyY"),e(35,"KeyZ"),e(36,"Digit1"),e(37,"Digit2"),e(38,"Digit3"),e(39,"Digit4"),e(40,"Digit5"),e(41,"Digit6"),e(42,"Digit7"),e(43,"Digit8"),e(44,"Digit9"),e(45,"Digit0"),e(46,"Enter"),e(47,"Escape"),e(48,"Backspace"),e(49,"Tab"),e(50,"Space"),e(51,"Minus"),e(52,"Equal"),e(53,"BracketLeft"),e(54,"BracketRight"),e(55,"Backslash"),e(56,"IntlHash"),e(57,"Semicolon"),e(58,"Quote"),e(59,"Backquote"),e(60,"Comma"),e(61,"Period"),e(62,"Slash"),e(63,"CapsLock"),e(64,"F1"),e(65,"F2"),e(66,"F3"),e(67,"F4"),e(68,"F5"),e(69,"F6"),e(70,"F7"),e(71,"F8"),e(72,"F9"),e(73,"F10"),e(74,"F11"),e(75,"F12"),e(76,"PrintScreen"),e(77,"ScrollLock"),e(78,"Pause"),e(79,"Insert"),e(80,"Home"),e(81,"PageUp"),e(82,"Delete"),e(83,"End"),e(84,"PageDown"),e(85,"ArrowRight"),e(86,"ArrowLeft"),e(87,"ArrowDown"),e(88,"ArrowUp"),e(89,"NumLock"),e(90,"NumpadDivide"),e(91,"NumpadMultiply"),e(92,"NumpadSubtract"),e(93,"NumpadAdd"),e(94,"NumpadEnter"),e(95,"Numpad1"),e(96,"Numpad2"),e(97,"Numpad3"),e(98,"Numpad4"),e(99,"Numpad5"),
e(100,"Numpad6"),e(101,"Numpad7"),e(102,"Numpad8"),e(103,"Numpad9"),e(104,"Numpad0"),e(105,"NumpadDecimal"),e(106,"IntlBackslash"),e(107,"ContextMenu"),e(108,"Power"),e(109,"NumpadEqual"),e(110,"F13"),e(111,"F14"),e(112,"F15"),e(113,"F16"),e(114,"F17"),e(115,"F18"),e(116,"F19"),e(117,"F20"),e(118,"F21"),e(119,"F22"),e(120,"F23"),e(121,"F24"),e(122,"Open"),e(123,"Help"),e(124,"Select"),e(125,"Again"),e(126,"Undo"),e(127,"Cut"),e(128,"Copy"),e(129,"Paste"),e(130,"Find"),e(131,"AudioVolumeMute"),e(132,"AudioVolumeUp"),e(133,"AudioVolumeDown"),e(134,"NumpadComma"),e(135,"IntlRo"),e(136,"KanaMode"),e(137,"IntlYen"),e(138,"Convert"),e(139,"NonConvert"),e(140,"Lang1"),e(141,"Lang2"),e(142,"Lang3"),e(143,"Lang4"),e(144,"Lang5"),e(145,"Abort"),e(146,"Props"),e(147,"NumpadParenLeft"),e(148,"NumpadParenRight"),e(149,"NumpadBackspace"),e(150,"NumpadMemoryStore"),e(151,"NumpadMemoryRecall"),e(152,"NumpadMemoryClear"),e(153,"NumpadMemoryAdd"),e(154,"NumpadMemorySubtract"),e(155,"NumpadClear"),e(156,"NumpadClearEntry"),
e(157,"ControlLeft"),e(158,"ShiftLeft"),e(159,"AltLeft"),e(160,"MetaLeft"),e(161,"ControlRight"),e(162,"ShiftRight"),e(163,"AltRight"),e(164,"MetaRight"),e(165,"BrightnessUp"),e(166,"BrightnessDown"),e(167,"MediaPlay"),e(168,"MediaRecord"),e(169,"MediaFastForward"),e(170,"MediaRewind"),e(171,"MediaTrackNext"),e(172,"MediaTrackPrevious"),e(173,"MediaStop"),e(174,"Eject"),e(175,"MediaPlayPause"),e(176,"MediaSelect"),e(177,"LaunchMail"),e(178,"LaunchApp2"),e(179,"LaunchApp1"),e(180,"SelectTask"),e(181,"LaunchScreenSaver"),e(182,"BrowserSearch"),e(183,"BrowserHome"),e(184,"BrowserBack"),e(185,"BrowserForward"),e(186,"BrowserStop"),e(187,"BrowserRefresh"),e(188,"BrowserFavorites"),e(189,"ZoomToggle"),e(190,"MailReply"),e(191,"MailForward"),e(192,"MailSend")}(),function(){function e(e,n){t.IMMUTABLE_CODE_TO_KEY_CODE[e]=n,0!==n&&3!==n&&5!==n&&4!==n&&6!==n&&57!==n&&(t.IMMUTABLE_KEY_CODE_TO_CODE[n]=e)}for(n=0;n<=193;n++)t.IMMUTABLE_CODE_TO_KEY_CODE[n]=-1;for(var n=0;n<=112;n++)t.IMMUTABLE_KEY_CODE_TO_CODE[n]=-1
;t.IMMUTABLE_KEY_CODE_TO_CODE[3]=46,e(0,0),e(1,0),e(2,0),e(3,0),e(4,0),e(5,0),e(6,0),e(7,0),e(8,0),e(9,0),e(46,3),e(47,9),e(48,1),e(49,2),e(50,10),e(63,8),e(64,59),e(65,60),e(66,61),e(67,62),e(68,63),e(69,64),e(70,65),e(71,66),e(72,67),e(73,68),e(74,69),e(75,70),e(76,0),e(77,79),e(78,7),e(79,19),e(80,14),e(81,11),e(82,20),e(83,13),e(84,12),e(85,17),e(86,15),e(87,18),e(88,16),e(89,78),e(90,108),e(91,103),e(92,106),e(93,104),e(94,3),e(95,94),e(96,95),e(97,96),e(98,97),e(99,98),e(100,99),e(101,100),e(102,101),e(103,102),e(104,93),e(105,107),e(107,58),e(108,0),e(109,0),e(110,71),e(111,72),e(112,73),e(113,74),e(114,75),e(115,76),e(116,77),e(117,0),e(118,0),e(119,0),e(120,0),e(121,0),e(122,0),e(123,0),e(124,0),e(125,0),e(126,0),e(127,0),e(128,0),e(129,0),e(130,0),e(131,0),e(132,0),e(133,0),e(134,105),e(136,0),e(138,0),e(139,0),e(140,0),e(141,0),e(142,0),e(143,0),e(144,0),e(145,0),e(146,0),e(147,0),e(148,0),e(149,0),e(150,0),e(151,0),e(152,0),e(153,0),e(154,0),e(155,0),e(156,0),e(157,5),e(158,4),e(159,6),e(160,57),
e(161,5),e(162,4),e(163,6),e(164,57),e(165,0),e(166,0),e(167,0),e(168,0),e(169,0),e(170,0),e(171,0),e(172,0),e(173,0),e(174,0),e(175,0),e(176,0),e(177,0),e(178,0),e(179,0),e(180,0),e(181,0),e(182,0),e(183,0),e(184,0),e(185,0),e(186,0),e(187,0),e(188,0),e(189,0),e(190,0),e(191,0),e(192,0)}()}),define(e[281],t([1,0,73,15,244]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.writeKeybindingItem=function(e,t,n){var i=JSON.stringify(t.resolvedKeybinding.getUserSettingsLabel());e.write('{ "key": '+function(e,t){return e.length<t?e+new Array(t-e.length).join(" "):e}(i+",",25)+' "command": ');var r=t.when?t.when.serialize():"",o=JSON.stringify(t.command);r.length>0?(e.write(o+","),e.writeLine(),e.write('                                     "when": "'+r+'" ')):e.write(o+" "),e.write("}")},e.readUserKeybindingItem=function(e,t){
var n="string"==typeof e.key?this._readUserBinding(e.key):[null,null],r=n[0],o=n[1],s="string"==typeof e.when?i.ContextKeyExpr.deserialize(e.when):null;return{firstPart:r,chordPart:o,command:"string"==typeof e.command?e.command:null,commandArgs:void 0!==e.args?e.args:void 0,when:s}},e._readModifiers=function(e){e=e.toLowerCase().trim();var t,n=!1,i=!1,r=!1,o=!1;do{t=!1,/^ctrl(\+|\-)/.test(e)&&(n=!0,e=e.substr("ctrl-".length),t=!0),/^shift(\+|\-)/.test(e)&&(i=!0,e=e.substr("shift-".length),t=!0),/^alt(\+|\-)/.test(e)&&(r=!0,e=e.substr("alt-".length),t=!0),/^meta(\+|\-)/.test(e)&&(o=!0,e=e.substr("meta-".length),t=!0),/^win(\+|\-)/.test(e)&&(o=!0,e=e.substr("win-".length),t=!0),/^cmd(\+|\-)/.test(e)&&(o=!0,e=e.substr("cmd-".length),t=!0)}while(t);var s,a=e.indexOf(" ");return a>0?(s=e.substring(0,a),e=e.substring(a)):(s=e,e=""),{remains:e,ctrl:n,shift:i,alt:r,meta:o,key:s}},e._readSimpleKeybinding=function(e){var t=this._readModifiers(e),i=n.KeyCodeUtils.fromUserSettings(t.key)
;return[new n.SimpleKeybinding(t.ctrl,t.shift,t.alt,t.meta,i),t.remains]},e.readKeybinding=function(e,t){if(!e)return null;var i=this._readSimpleKeybinding(e),r=i[0],o=i[1],s=null;return o.length>0&&(s=this._readSimpleKeybinding(o)[0]),s?new n.ChordKeybinding(r,s):r},e._readSimpleUserBinding=function(e){var t=this._readModifiers(e),i=t.key.match(/^\[([^\]]+)\]$/);if(i){var o=i[1],s=r.ScanCodeUtils.lowerCaseToEnum(o);return[new r.ScanCodeBinding(t.ctrl,t.shift,t.alt,t.meta,s),t.remains]}var a=n.KeyCodeUtils.fromUserSettings(t.key);return[new n.SimpleKeybinding(t.ctrl,t.shift,t.alt,t.meta,a),t.remains]},e._readUserBinding=function(e){if(!e)return[null,null];var t=this._readSimpleUserBinding(e),n=t[0],i=t[1],r=null;return i.length>0&&(r=this._readSimpleUserBinding(i)[0]),[n,r]},e}();t.KeybindingIO=o;var s=function(){function e(){this._lines=[],this._currentLine=""}return e.prototype.write=function(e){this._currentLine+=e},e.prototype.writeLine=function(e){void 0===e&&(e=""),this._lines.push(this._currentLine+e),
this._currentLine=""},e.prototype.toString=function(){return this.writeLine(),this._lines.join("\n")},e}();t.OutputBuilder=s}),define(e[1330],t([1,0,73,873,244]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._OS=e}return e.prototype.dumpDebugInfo=function(){return"FallbackKeyboardMapper dispatching on keyCode"},e.prototype.resolveKeybinding=function(e){return[new i.USLayoutResolvedKeybinding(e,this._OS)]},e.prototype.resolveKeyboardEvent=function(e){var t=new n.SimpleKeybinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new i.USLayoutResolvedKeybinding(t,this._OS)},e.prototype._scanCodeToKeyCode=function(e){var t=r.IMMUTABLE_CODE_TO_KEY_CODE[e];if(-1!==t)return t;switch(e){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},e.prototype._resolveSimpleUserBinding=function(e){if(!e)return null;if(e instanceof n.SimpleKeybinding)return e;var t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new n.SimpleKeybinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)},e.prototype.resolveUserBinding=function(e,t){var r=this._resolveSimpleUserBinding(e),o=this._resolveSimpleUserBinding(t)
;return r&&o?[new i.USLayoutResolvedKeybinding(new n.ChordKeybinding(r,o),this._OS)]:r?[new i.USLayoutResolvedKeybinding(r,this._OS)]:[]},e}();t.MacLinuxFallbackKeyboardMapper=o}),define(e[1331],t([1,0,73,244,210]),function(e,t,i,r,o){"use strict";function s(e,t){return!e&&!t||!(!e||!t)&&(e.value===t.value&&e.withShift===t.withShift&&e.withAltGr===t.withAltGr&&e.withShiftAltGr===t.withShiftAltGr)}Object.defineProperty(t,"__esModule",{value:!0}),t.macLinuxKeyboardMappingEquals=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(var n=0;n<193;n++){var i=r.ScanCodeUtils.toString(n);if(!s(e[i],t[i]))return!1}return!0};var a=[],c=function(e){function t(t,n,i,r){var o=e.call(this)||this;if(!i)throw new Error("Invalid USLayoutResolvedKeybinding");return o._mapper=t,o._OS=n,o._firstPart=i,o._chordPart=r,o}return n(t,e),t.prototype.getLabel=function(){var e=this._mapper.getUILabelForScanCodeBinding(this._firstPart),t=this._mapper.getUILabelForScanCodeBinding(this._chordPart)
;return o.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._OS)},t.prototype.getAriaLabel=function(){var e=this._mapper.getAriaLabelForScanCodeBinding(this._firstPart),t=this._mapper.getAriaLabelForScanCodeBinding(this._chordPart);return o.AriaLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._OS)},t.prototype.getElectronAccelerator=function(){if(null!==this._chordPart)return null;var e=this._mapper.getElectronAcceleratorLabelForScanCodeBinding(this._firstPart);return o.ElectronAcceleratorLabelProvider.toLabel(this._firstPart,e,null,null,this._OS)},t.prototype.getUserSettingsLabel=function(){var e=this._mapper.getUserSettingsLabelForScanCodeBinding(this._firstPart),t=this._mapper.getUserSettingsLabelForScanCodeBinding(this._chordPart);return o.UserSettingsLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._OS)},t.prototype._isWYSIWYG=function(e){if(!e)return!0;if(-1!==r.IMMUTABLE_CODE_TO_KEY_CODE[e.scanCode])return!0
;var t=this._mapper.getAriaLabelForScanCodeBinding(e),n=this._mapper.getUserSettingsLabelForScanCodeBinding(e);return!t&&!n||!(!t||!n)&&t.toLowerCase()===n.toLowerCase()},t.prototype.isWYSIWYG=function(){return this._isWYSIWYG(this._firstPart)&&this._isWYSIWYG(this._chordPart)},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new i.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._mapper.getUILabelForScanCodeBinding(e),this._mapper.getAriaLabelForScanCodeBinding(e)):null},t.prototype.getDispatchParts=function(){return[this._firstPart?this._mapper.getDispatchStrForScanCodeBinding(this._firstPart):null,this._chordPart?this._mapper.getDispatchStrForScanCodeBinding(this._chordPart):null]},t}(i.ResolvedKeybinding);t.NativeResolvedKeybinding=c;var l=function(){function e(e,t,n,i){this.ctrlKey=e,
this.shiftKey=t,this.altKey=n,this.scanCode=i}return e.prototype.toString=function(){return(this.ctrlKey?"Ctrl+":"")+(this.shiftKey?"Shift+":"")+(this.altKey?"Alt+":"")+r.ScanCodeUtils.toString(this.scanCode)},e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.scanCode===e.scanCode},e.prototype.getProducedCharCode=function(e){return e?this.ctrlKey&&this.shiftKey&&this.altKey?e.withShiftAltGr:this.ctrlKey&&this.altKey?e.withAltGr:this.shiftKey?e.withShift:e.value:""},e.prototype.getProducedChar=function(e){var t=h.getCharCode(this.getProducedCharCode(e));return 0===t?" --- ":t>=768&&t<=879?"U+"+t.toString(16):"  "+String.fromCharCode(t)+"  "},e}(),u=function(){function e(e,t,n,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.keyCode=i}return e.prototype.toString=function(){return(this.ctrlKey?"Ctrl+":"")+(this.shiftKey?"Shift+":"")+(this.altKey?"Alt+":"")+i.KeyCodeUtils.toString(this.keyCode)},e}(),d=function(){function e(){
this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[],this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[]}return e.prototype.registrationComplete=function(){this._moveToEnd(56),this._moveToEnd(106)},e.prototype._moveToEnd=function(e){for(var t=0;t<8;t++){var n=this._scanCodeToKeyCode[(e<<3)+t];if(n)for(var i=0,r=n.length;i<r;i++){var o=this._keyCodeToScanCode[n[i]];if(1!==o.length)for(var s=0,a=o.length;s<a;s++){var c=o[s];if(c>>>3===e){for(var l=s+1;l<a;l++)o[l-1]=o[l];o[a-1]=c}}}}},e.prototype.registerIfUnknown=function(e,t){if(0!==t.keyCode){var n=this._encodeScanCodeCombo(e),i=this._encodeKeyCodeCombo(t),r=t.keyCode>=21&&t.keyCode<=30,o=t.keyCode>=31&&t.keyCode<=56,s=this._scanCodeToKeyCode[n];if(r||o){if(s)for(var a=0,c=s.length;a<c;a++)if(s[a]===i)return}else if(s&&0!==s.length)return;this._scanCodeToKeyCode[n]=this._scanCodeToKeyCode[n]||[],this._scanCodeToKeyCode[n].unshift(i),this._keyCodeToScanCode[i]=this._keyCodeToScanCode[i]||[],this._keyCodeToScanCode[i].unshift(n)}},
e.prototype.lookupKeyCodeCombo=function(e){var t=this._encodeKeyCodeCombo(e),n=this._keyCodeToScanCode[t];if(!n||0===n.length)return[];for(var i=[],r=0,o=n.length;r<o;r++){var s=n[r],a=!!(1&s),c=!!(2&s),u=!!(4&s),d=s>>>3;i[r]=new l(a,c,u,d)}return i},e.prototype.lookupScanCodeCombo=function(e){var t=this._encodeScanCodeCombo(e),n=this._scanCodeToKeyCode[t];if(!n||0===n.length)return[];for(var i=[],r=0,o=n.length;r<o;r++){var s=n[r],a=!!(1&s),c=!!(2&s),l=!!(4&s),d=s>>>3;i[r]=new u(a,c,l,d)}return i},e.prototype.guessStableKeyCode=function(e){if(e>=36&&e<=45)switch(e){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}var t=this.lookupScanCodeCombo(new l(!1,!1,!1,e)),n=this.lookupScanCodeCombo(new l(!1,!0,!1,e));if(1===t.length&&1===n.length){var i=t[0].shiftKey,r=t[0].keyCode,o=n[0].shiftKey;if(r===n[0].keyCode&&i!==o)return r}return-1},e.prototype._encodeScanCodeCombo=function(e){
return this._encode(e.ctrlKey,e.shiftKey,e.altKey,e.scanCode)},e.prototype._encodeKeyCodeCombo=function(e){return this._encode(e.ctrlKey,e.shiftKey,e.altKey,e.keyCode)},e.prototype._encode=function(e,t,n,i){return((e?1:0)<<0|(t?1:0)<<1|(n?1:0)<<2|i<<3)>>>0},e}(),h=function(){function e(t,n,o){var s=this;this._scanCodeToLabel=[],this._scanCodeToDispatch=[],this._isUSStandard=t,this._OS=o,this._codeInfo=[],this._scanCodeKeyCodeMapper=new d,this._scanCodeToLabel=[],this._scanCodeToDispatch=[];for(var a=function(e,t,n,i,r,o,a,c){s._scanCodeKeyCodeMapper.registerIfUnknown(new l(!!e,!!t,!!n,i),new u(!!r,!!o,!!a,c))},c=function(e,t,n,i,r){for(var o=e;o<=1;o++)for(var s=t;s<=1;s++)for(var c=n;c<=1;c++)a(o,s,c,i,o,s,c,r)},h=0;h<193;h++)this._scanCodeToLabel[h]=null;for(h=0;h<193;h++)this._scanCodeToDispatch[h]=null;for(h=0;h<193;h++){-1!==(I=r.IMMUTABLE_CODE_TO_KEY_CODE[h])&&(c(0,0,0,h,I),this._scanCodeToLabel[h]=i.KeyCodeUtils.toString(I),
this._scanCodeToDispatch[h]=0===I||5===I||57===I||6===I||4===I?null:"["+r.ScanCodeUtils.toString(h)+"]")}var p={},f=[];for(var g in n)if(n.hasOwnProperty(g)){if(0===(h=r.ScanCodeUtils.toEnum(g)))continue;if(-1!==r.IMMUTABLE_CODE_TO_KEY_CODE[h])continue;b=n[g];if((S=e.getCharCode(b.value))>=97&&S<=122){f[C=S-97+65]=!0}}var v=function(e,t,n,i){f[e]||(p[r.ScanCodeUtils.toString(t)]={value:n,withShift:i,withAltGr:"",withShiftAltGr:""})};v(65,10,"a","A"),v(66,11,"b","B"),v(67,12,"c","C"),v(68,13,"d","D"),v(69,14,"e","E"),v(70,15,"f","F"),v(71,16,"g","G"),v(72,17,"h","H"),v(73,18,"i","I"),v(74,19,"j","J"),v(75,20,"k","K"),v(76,21,"l","L"),v(77,22,"m","M"),v(78,23,"n","N"),v(79,24,"o","O"),v(80,25,"p","P"),v(81,26,"q","Q"),v(82,27,"r","R"),v(83,28,"s","S"),v(84,29,"t","T"),v(85,30,"u","U"),v(86,31,"v","V"),v(87,32,"w","W"),v(88,33,"x","X"),v(89,34,"y","Y"),v(90,35,"z","Z");var m=[],y=0;for(var g in n)if(n.hasOwnProperty(g)){if(0===(h=r.ScanCodeUtils.toEnum(g)))continue
;if(-1!==r.IMMUTABLE_CODE_TO_KEY_CODE[h])continue;this._codeInfo[h]=n[g];var b=p[g]||n[g],S=e.getCharCode(b.value),_={scanCode:h,value:S,withShift:x=e.getCharCode(b.withShift),withAltGr:T=e.getCharCode(b.withAltGr),withShiftAltGr:E=e.getCharCode(b.withShiftAltGr)};if(m[y++]=_,this._scanCodeToDispatch[h]="["+r.ScanCodeUtils.toString(h)+"]",S>=97&&S<=122){var C=S-97+65;this._scanCodeToLabel[h]=String.fromCharCode(C)}else this._scanCodeToLabel[h]=S>=65&&S<=90?String.fromCharCode(S):S?String.fromCharCode(S):null}for(k=m.length-1;k>=0;k--){var h=(_=m[k]).scanCode,E=_.withShiftAltGr;if(E!==_.withAltGr&&E!==_.withShift&&E!==_.value){if(D=e._charCodeToKb(E)){var w=D.shiftKey,I=D.keyCode;w?a(1,1,1,h,0,1,0,I):a(1,1,1,h,0,0,0,I)}}}for(k=m.length-1;k>=0;k--){var h=(_=m[k]).scanCode,T=_.withAltGr;if(T!==_.withShift&&T!==_.value){if(D=e._charCodeToKb(T)){var w=D.shiftKey,I=D.keyCode;w?a(1,0,1,h,0,1,0,I):a(1,0,1,h,0,0,0,I)}}}for(k=m.length-1;k>=0;k--){var h=(_=m[k]).scanCode,x=_.withShift;if(x!==_.value){
if(D=e._charCodeToKb(x)){var w=D.shiftKey,I=D.keyCode;w?(a(0,1,0,h,0,1,0,I),a(0,1,1,h,0,1,1,I),a(1,1,0,h,1,1,0,I),a(1,1,1,h,1,1,1,I)):(a(0,1,0,h,0,0,0,I),a(0,1,0,h,0,1,0,I),a(0,1,1,h,0,0,1,I),a(0,1,1,h,0,1,1,I),a(1,1,0,h,1,0,0,I),a(1,1,0,h,1,1,0,I),a(1,1,1,h,1,0,1,I),a(1,1,1,h,1,1,1,I))}}}for(var k=m.length-1;k>=0;k--){var h=(_=m[k]).scanCode,D=e._charCodeToKb(_.value);if(D){var w=D.shiftKey,I=D.keyCode;w?(a(0,0,0,h,0,1,0,I),a(0,0,1,h,0,1,1,I),a(1,0,0,h,1,1,0,I),a(1,0,1,h,1,1,1,I)):(a(0,0,0,h,0,0,0,I),a(0,0,1,h,0,0,1,I),a(0,1,0,h,0,1,0,I),a(0,1,1,h,0,1,1,I),a(1,0,0,h,1,0,0,I),a(1,0,1,h,1,0,1,I),a(1,1,0,h,1,1,0,I),a(1,1,1,h,1,1,1,I))}}c(0,0,0,36,22),c(0,0,0,37,23),c(0,0,0,38,24),c(0,0,0,39,25),c(0,0,0,40,26),c(0,0,0,41,27),c(0,0,0,42,28),c(0,0,0,43,29),c(0,0,0,44,30),c(0,0,0,45,21),this._scanCodeKeyCodeMapper.registrationComplete()}return e.prototype.dumpDebugInfo=function(){var e=[],t=[88,104],n=0;e.push("isUSStandard: "+this._isUSStandard),
e.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");for(var i=0;i<193;i++)if(-1===r.IMMUTABLE_CODE_TO_KEY_CODE[i]||-1!==t.indexOf(i)){n%4==0&&(e.push("|       HW Code combination      |  Key  |    KeyCode combination    | Pri |          UI label         |         User settings          |    Electron accelerator   |       Dispatching string       | WYSIWYG |"),e.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")),n++;for(var o=this._codeInfo[i],s=0;s<8;s++){var a=new l(!!(1&s),!!(2&s),!!(4&s),i),c=this.resolveKeyboardEvent({ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey,metaKey:!1,keyCode:-1,code:r.ScanCodeUtils.toString(i)
}),u=a.toString(),d=a.getProducedChar(o),h=c.getAriaLabel(),p=h?h.replace(/Control\+/,"Ctrl+"):null,f=c.getUserSettingsLabel(),g=c.getElectronAccelerator(),v=c.getDispatchParts()[0],m=!!c&&c.isWYSIWYG()?"       ":"   NO  ",y=this._scanCodeKeyCodeMapper.lookupScanCodeCombo(a);if(0===y.length)e.push("| "+this._leftPad(u,30)+" | "+d+" | "+this._leftPad("",25)+" | "+this._leftPad("",3)+" | "+this._leftPad(p,25)+" | "+this._leftPad(f,30)+" | "+this._leftPad(g,25)+" | "+this._leftPad(v,30)+" | "+m+" |");else for(var b=0,S=y.length;b<S;b++){var _=y[b],C="-",E=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(_);if(1===E.length)C="";else{for(var w=-1,I=0;I<E.length;I++)if(E[I].equals(a)){w=I+1;break}C=String(w)}var T=_.toString()
;0===b?e.push("| "+this._leftPad(u,30)+" | "+d+" | "+this._leftPad(T,25)+" | "+this._leftPad(C,3)+" | "+this._leftPad(p,25)+" | "+this._leftPad(f,30)+" | "+this._leftPad(g,25)+" | "+this._leftPad(v,30)+" | "+m+" |"):e.push("| "+this._leftPad("",30)+" |       | "+this._leftPad(T,25)+" | "+this._leftPad(C,3)+" | "+this._leftPad("",25)+" | "+this._leftPad("",30)+" | "+this._leftPad("",25)+" | "+this._leftPad("",30)+" |         |")}}e.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")}return e.join("\n")},e.prototype._leftPad=function(e,t){for(null===e&&(e="null");e.length<t;)e=" "+e;return e},e.prototype.simpleKeybindingToScanCodeBinding=function(e){if(3===e.keyCode)return[new r.ScanCodeBinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,46)]
;for(var t=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(new u(e.ctrlKey,e.shiftKey,e.altKey,e.keyCode)),n=[],i=0,o=t.length;i<o;i++){var s=t[i];n[i]=new r.ScanCodeBinding(s.ctrlKey,s.shiftKey,s.altKey,e.metaKey,s.scanCode)}return n},e.prototype.getUILabelForScanCodeBinding=function(e){if(!e)return null;if(e.isDuplicateModifierCase())return"";if(2===this._OS)switch(e.scanCode){case 86:return"←";case 88:return"↑";case 85:return"→";case 87:return"↓"}return this._scanCodeToLabel[e.scanCode]},e.prototype.getAriaLabelForScanCodeBinding=function(e){return e?e.isDuplicateModifierCase()?"":this._scanCodeToLabel[e.scanCode]:null},e.prototype.getDispatchStrForScanCodeBinding=function(e){var t=this._scanCodeToDispatch[e.scanCode];if(!t)return null;var n="";return e.ctrlKey&&(n+="ctrl+"),e.shiftKey&&(n+="shift+"),e.altKey&&(n+="alt+"),e.metaKey&&(n+="meta+"),n+=t},e.prototype.getUserSettingsLabelForScanCodeBinding=function(e){if(!e)return null;if(e.isDuplicateModifierCase())return""
;var t=r.IMMUTABLE_CODE_TO_KEY_CODE[e.scanCode];if(-1!==t)return i.KeyCodeUtils.toUserSettingsUS(t).toLowerCase();var n=this._scanCodeKeyCodeMapper.guessStableKeyCode(e.scanCode);if(-1!==n)for(var o=this.simpleKeybindingToScanCodeBinding(new i.SimpleKeybinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,n)),s=0,a=o.length;s<a;s++){if(o[s].scanCode===e.scanCode)return i.KeyCodeUtils.toUserSettingsUS(n).toLowerCase()}return this._scanCodeToDispatch[e.scanCode]},e.prototype._getElectronLabelForKeyCode=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return i.KeyCodeUtils.toString(e)},e.prototype.getElectronAcceleratorLabelForScanCodeBinding=function(e){if(!e)return null;if(e.isDuplicateModifierCase())return null;var t=r.IMMUTABLE_CODE_TO_KEY_CODE[e.scanCode];if(-1!==t)return this._getElectronLabelForKeyCode(t);var n=this._scanCodeKeyCodeMapper.guessStableKeyCode(e.scanCode);if(!this._isUSStandard){
if(80===n||81===n||82===n||83===n||84===n||85===n||86===n||87===n||88===n||89===n)return null}return-1!==n?this._getElectronLabelForKeyCode(n):null},e.prototype.resolveKeybinding=function(e){var t=[],n=0;if(2===e.type)for(var i=this.simpleKeybindingToScanCodeBinding(e.firstPart),r=this.simpleKeybindingToScanCodeBinding(e.chordPart),o=0,s=i.length;o<s;o++)for(var a=i[o],l=0,u=r.length;l<u;l++){var d=r[l];t[n++]=new c(this,this._OS,a,d)}else for(var o=0,s=(i=this.simpleKeybindingToScanCodeBinding(e)).length;o<s;o++){a=i[o];t[n++]=new c(this,this._OS,a,null)}return t},e.prototype.resolveKeyboardEvent=function(e){var t=r.ScanCodeUtils.toEnum(e.code);94===t&&(t=46);var n=e.keyCode;if(15===n||16===n||17===n||18===n||20===n||19===n||14===n||13===n||12===n||11===n){-1!==(i=r.IMMUTABLE_KEY_CODE_TO_CODE[n])&&(t=i)}else if((95===t||96===t||97===t||98===t||99===t||100===t||101===t||102===t||103===t||104===t||105===t)&&n>=0){var i=r.IMMUTABLE_KEY_CODE_TO_CODE[n];-1!==i&&(t=i)}
var o=new r.ScanCodeBinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t);return new c(this,this._OS,o,null)},e.prototype._resolveSimpleUserBinding=function(e){return e?e instanceof r.ScanCodeBinding?[e]:this.simpleKeybindingToScanCodeBinding(e):[]},e.prototype.resolveUserBinding=function(e,t){for(var n=this._resolveSimpleUserBinding(e),i=this._resolveSimpleUserBinding(t),r=[],o=0,s=0,a=n.length;s<a;s++){var l=n[s];if(t)for(var u=0,d=i.length;u<d;u++){var h=i[u];r[o++]=new c(this,this._OS,l,h)}else r[o++]=new c(this,this._OS,l,null)}return r},e._charCodeToKb=function(e){return e<a.length?a[e]:null},e.getCharCode=function(e){if(0===e.length)return 0;var t=e.charCodeAt(0);switch(t){case 768:return 96;case 769:return 180;case 770:return 94;case 771:return 732;case 772:return 175;case 773:return 8254;case 774:return 728;case 775:return 729;case 776:return 168;case 778:return 730;case 779:return 733}return t},e}();t.MacLinuxKeyboardMapper=h,function(){function e(e,t,n){for(var i=a.length;i<e;i++)a[i]=null;a[e]={
keyCode:t,shiftKey:n}}for(t=65;t<=90;t++)e(t,t-65+31,!0);for(var t=97;t<=122;t++)e(t,t-97+31,!1);e(59,80,!1),e(58,80,!0),e(61,81,!1),e(43,81,!0),e(44,82,!1),e(60,82,!0),e(45,83,!1),e(95,83,!0),e(46,84,!1),e(62,84,!0),e(47,85,!1),e(63,85,!0),e(96,86,!1),e(126,86,!0),e(91,87,!1),e(123,87,!0),e(92,88,!1),e(124,88,!0),e(93,89,!1),e(125,89,!0),e(39,90,!1),e(34,90,!0)}()}),define(e[462],t([1,0,73,244,210]),function(e,t,i,r,o){"use strict";function s(e,t){return!e&&!t||!(!e||!t)&&(e.vkey===t.vkey&&e.value===t.value&&e.withShift===t.withShift&&e.withAltGr===t.withAltGr&&e.withShiftAltGr===t.withShiftAltGr)}function a(e){c&&console.info(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.windowsKeyboardMappingEquals=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(var n=0;n<193;n++){var i=r.ScanCodeUtils.toString(n);if(!s(e[i],t[i]))return!1}return!0};var c=!1,l={VK_BACK:1,VK_TAB:2,VK_CLEAR:0,VK_RETURN:3,VK_SHIFT:4,VK_CONTROL:5,VK_MENU:6,VK_PAUSE:7,VK_CAPITAL:8,VK_KANA:0,VK_HANGUL:0,VK_JUNJA:0,VK_FINAL:0,
VK_HANJA:0,VK_KANJI:0,VK_ESCAPE:9,VK_CONVERT:0,VK_NONCONVERT:0,VK_ACCEPT:0,VK_MODECHANGE:0,VK_SPACE:10,VK_PRIOR:11,VK_NEXT:12,VK_END:13,VK_HOME:14,VK_LEFT:15,VK_UP:16,VK_RIGHT:17,VK_DOWN:18,VK_SELECT:0,VK_PRINT:0,VK_EXECUTE:0,VK_SNAPSHOT:0,VK_INSERT:19,VK_DELETE:20,VK_HELP:0,VK_0:21,VK_1:22,VK_2:23,VK_3:24,VK_4:25,VK_5:26,VK_6:27,VK_7:28,VK_8:29,VK_9:30,VK_A:31,VK_B:32,VK_C:33,VK_D:34,VK_E:35,VK_F:36,VK_G:37,VK_H:38,VK_I:39,VK_J:40,VK_K:41,VK_L:42,VK_M:43,VK_N:44,VK_O:45,VK_P:46,VK_Q:47,VK_R:48,VK_S:49,VK_T:50,VK_U:51,VK_V:52,VK_W:53,VK_X:54,VK_Y:55,VK_Z:56,VK_LWIN:57,VK_COMMAND:57,VK_RWIN:57,VK_APPS:0,VK_SLEEP:0,VK_NUMPAD0:93,VK_NUMPAD1:94,VK_NUMPAD2:95,VK_NUMPAD3:96,VK_NUMPAD4:97,VK_NUMPAD5:98,VK_NUMPAD6:99,VK_NUMPAD7:100,VK_NUMPAD8:101,VK_NUMPAD9:102,VK_MULTIPLY:103,VK_ADD:104,VK_SEPARATOR:105,VK_SUBTRACT:106,VK_DECIMAL:107,VK_DIVIDE:108,VK_F1:59,VK_F2:60,VK_F3:61,VK_F4:62,VK_F5:63,VK_F6:64,VK_F7:65,VK_F8:66,VK_F9:67,VK_F10:68,VK_F11:69,VK_F12:70,VK_F13:71,VK_F14:72,VK_F15:73,VK_F16:74,VK_F17:75,VK_F18:76,
VK_F19:77,VK_F20:0,VK_F21:0,VK_F22:0,VK_F23:0,VK_F24:0,VK_NUMLOCK:78,VK_SCROLL:79,VK_LSHIFT:4,VK_RSHIFT:4,VK_LCONTROL:5,VK_RCONTROL:5,VK_LMENU:0,VK_RMENU:0,VK_BROWSER_BACK:0,VK_BROWSER_FORWARD:0,VK_BROWSER_REFRESH:0,VK_BROWSER_STOP:0,VK_BROWSER_SEARCH:0,VK_BROWSER_FAVORITES:0,VK_BROWSER_HOME:0,VK_VOLUME_MUTE:0,VK_VOLUME_DOWN:0,VK_VOLUME_UP:0,VK_MEDIA_NEXT_TRACK:0,VK_MEDIA_PREV_TRACK:0,VK_MEDIA_STOP:0,VK_MEDIA_PLAY_PAUSE:0,VK_MEDIA_LAUNCH_MAIL:0,VK_MEDIA_LAUNCH_MEDIA_SELECT:0,VK_MEDIA_LAUNCH_APP1:0,VK_MEDIA_LAUNCH_APP2:0,VK_OEM_1:80,VK_OEM_PLUS:81,VK_OEM_COMMA:82,VK_OEM_MINUS:83,VK_OEM_PERIOD:84,VK_OEM_2:85,VK_OEM_3:86,VK_ABNT_C1:110,VK_ABNT_C2:111,VK_OEM_4:87,VK_OEM_5:88,VK_OEM_6:89,VK_OEM_7:90,VK_OEM_8:91,VK_OEM_102:92,VK_PROCESSKEY:0,VK_PACKET:0,VK_DBE_SBCSCHAR:0,VK_DBE_DBCSCHAR:0,VK_ATTN:0,VK_CRSEL:0,VK_EXSEL:0,VK_EREOF:0,VK_PLAY:0,VK_ZOOM:0,VK_NONAME:0,VK_PA1:0,VK_OEM_CLEAR:0,VK_UNKNOWN:0},u=function(e){function t(t,n,i){var r=e.call(this)||this
;if(!n)throw new Error("Invalid WindowsNativeResolvedKeybinding firstPart");return r._mapper=t,r._firstPart=n,r._chordPart=i,r}return n(t,e),t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._mapper.getUILabelForKeyCode(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return o.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,1)},t.prototype._getUSLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":i.KeyCodeUtils.toString(e.keyCode):null},t.prototype.getUSLabel=function(){var e=this._getUSLabelForKeybinding(this._firstPart),t=this._getUSLabelForKeybinding(this._chordPart);return o.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,1)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._mapper.getAriaLabelForKeyCode(e.keyCode):null},t.prototype.getAriaLabel=function(){
var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return o.AriaLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,1)},t.prototype._keyCodeToElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return i.KeyCodeUtils.toString(e)},t.prototype._getElectronAcceleratorLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode):null},t.prototype.getElectronAccelerator=function(){if(null!==this._chordPart)return null;var e=this._getElectronAcceleratorLabelForKeybinding(this._firstPart);return o.ElectronAcceleratorLabelProvider.toLabel(this._firstPart,e,null,null,1)},t.prototype._getUserSettingsLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._mapper.getUserSettingsLabelForKeyCode(e.keyCode):null},t.prototype.getUserSettingsLabel=function(){
var e=this._getUserSettingsLabelForKeybinding(this._firstPart),t=this._getUserSettingsLabelForKeybinding(this._chordPart),n=o.UserSettingsLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,1);return n?n.toLowerCase():n},t.prototype.isWYSIWYG=function(){return!(this._firstPart&&!this._isWYSIWYG(this._firstPart.keyCode))&&!(this._chordPart&&!this._isWYSIWYG(this._chordPart.keyCode))},t.prototype._isWYSIWYG=function(e){if(15===e||16===e||17===e||18===e)return!0;return this._mapper.getAriaLabelForKeyCode(e)===this._mapper.getUserSettingsLabelForKeyCode(e)},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new i.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null},t.prototype.getDispatchParts=function(){
return[this._firstPart?this._getDispatchStr(this._firstPart):null,this._chordPart?this._getDispatchStr(this._chordPart):null]},t.prototype._getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=i.KeyCodeUtils.toString(e.keyCode)},t.getProducedCharCode=function(e,t){return t?e.ctrlKey&&e.shiftKey&&e.altKey?t.withShiftAltGr:e.ctrlKey&&e.altKey?t.withAltGr:e.shiftKey?t.withShift:t.value:null},t.getProducedChar=function(e,t){var n=this.getProducedCharCode(e,t);return null===n||0===n.length?" --- ":"  "+n+"  "},t}(i.ResolvedKeybinding);t.WindowsNativeResolvedKeybinding=u;var d=function(){function e(e,t){var n=this;this._keyCodeToLabel=[],this.isUSStandard=e,this._scanCodeToKeyCode=[],this._keyCodeToLabel=[],this._keyCodeExists=[],this._keyCodeToLabel[0]=i.KeyCodeUtils.toString(0);for(c=0;c<193;c++){-1!==(d=r.IMMUTABLE_CODE_TO_KEY_CODE[c])&&(this._scanCodeToKeyCode[c]=d,
this._keyCodeToLabel[d]=i.KeyCodeUtils.toString(d),this._keyCodeExists[d]=!0)}var o=[];this._codeInfo=[];for(var s in t)if(t.hasOwnProperty(s)){var c;if(0===(c=r.ScanCodeUtils.toEnum(s))){a("Unknown scanCode "+s+" in mapping.");continue}var u=t[s],d=r.IMMUTABLE_CODE_TO_KEY_CODE[c];if(-1!==d){var h=l[u.vkey]||0;if(0===h||d===h)continue;if(134!==c)continue}var p=u.value,f=u.withShift,g=u.withAltGr,v=u.withShiftAltGr,m=l[u.vkey]||0,y={scanCode:c,keyCode:m,value:p,withShift:f,withAltGr:g,withShiftAltGr:v};if(this._codeInfo[c]=y,this._scanCodeToKeyCode[c]=m,0===m)continue;if(this._keyCodeExists[m]=!0,0===p.length)this._keyCodeToLabel[m]=null;else if(p.length>1)this._keyCodeToLabel[m]=p;else{var b=p.charCodeAt(0);if(b>=97&&b<=122){o[b-97+65]=!0,this._keyCodeToLabel[m]=String.fromCharCode(b-97+65)}else b>=65&&b<=90?(o[b]=!0,this._keyCodeToLabel[m]=p):this._keyCodeToLabel[m]=p}}var S=function(e,t){o[e]||(n._keyCodeToLabel[t]=String.fromCharCode(e))};S(65,31),S(66,32),S(67,33),S(68,34),S(69,35),S(70,36),S(71,37),
S(72,38),S(73,39),S(74,40),S(75,41),S(76,42),S(77,43),S(78,44),S(79,45),S(80,46),S(81,47),S(82,48),S(83,49),S(84,50),S(85,51),S(86,52),S(87,53),S(88,54),S(89,55),S(90,56)}return e.prototype.dumpDebugInfo=function(){var e=[],t=[88,104],n=0;e.push("-----------------------------------------------------------------------------------------------------------------------------------------");for(var o=0;o<193;o++)if(-1===r.IMMUTABLE_CODE_TO_KEY_CODE[o]||-1!==t.indexOf(o)){n%6==0&&(e.push("|       HW Code combination      |  Key  |    KeyCode combination    |          UI label         |        User settings       | WYSIWYG |"),e.push("-----------------------------------------------------------------------------------------------------------------------------------------")),n++;for(var s=this._codeInfo[o],a=r.ScanCodeUtils.toString(o),c=[0,2,5,7],l=0;l<c.length;l++){
var d=c[l],h=!!(1&d),p=!!(2&d),f=!!(4&d),g=new r.ScanCodeBinding(h,p,f,!1,o),v=this._resolveSimpleUserBinding(g),m=v?i.KeyCodeUtils.toString(v.keyCode):null,y=v?new u(this,v,null):null,b=(h?"Ctrl+":"")+(p?"Shift+":"")+(f?"Alt+":"")+a,S=y?y.getAriaLabel():null,_=S?S.replace(/Control\+/,"Ctrl+"):null,C=y?y.getUserSettingsLabel():null,E=u.getProducedChar(g,s),w=m?(h?"Ctrl+":"")+(p?"Shift+":"")+(f?"Alt+":"")+m:null,I=!!y&&y.isWYSIWYG()?"       ":"   NO  ";e.push("| "+this._leftPad(b,30)+" | "+E+" | "+this._leftPad(w,25)+" | "+this._leftPad(_,25)+" |  "+this._leftPad(C,25)+" | "+I+" |")}e.push("-----------------------------------------------------------------------------------------------------------------------------------------")}return e.join("\n")},e.prototype._leftPad=function(e,t){for(null===e&&(e="null");e.length<t;)e=" "+e;return e},e.prototype.getUILabelForKeyCode=function(e){return this._getLabelForKeyCode(e)},e.prototype.getAriaLabelForKeyCode=function(e){return this._getLabelForKeyCode(e)},
e.prototype.getUserSettingsLabelForKeyCode=function(e){return this.isUSStandard?i.KeyCodeUtils.toUserSettingsUS(e):i.KeyCodeUtils.toUserSettingsGeneral(e)},e.prototype._getLabelForKeyCode=function(e){return this._keyCodeToLabel[e]||i.KeyCodeUtils.toString(0)},e.prototype.resolveKeybinding=function(e){if(2===e.type){var t=e.firstPart.keyCode,n=e.chordPart.keyCode;return this._keyCodeExists[t]&&this._keyCodeExists[n]?[new u(this,e.firstPart,e.chordPart)]:[]}return this._keyCodeExists[e.keyCode]?[new u(this,e,null)]:[]},e.prototype.resolveKeyboardEvent=function(e){var t=new i.SimpleKeybinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new u(this,t,null)},e.prototype._resolveSimpleUserBinding=function(e){if(!e)return null;if(e instanceof i.SimpleKeybinding)return this._keyCodeExists[e.keyCode]?e:null;var t=this._scanCodeToKeyCode[e.scanCode]||0;return 0!==t&&this._keyCodeExists[t]?new i.SimpleKeybinding(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t):null},e.prototype.resolveUserBinding=function(e,t){
var n=this._resolveSimpleUserBinding(e),i=this._resolveSimpleUserBinding(t);return n&&i?[new u(this,n,i)]:n?[new u(this,n,null)]:[]},e}();t.WindowsKeyboardMapper=d}),define(e[1333],t([1,0,677,18,134,73,5,37,6,15,19,32,160,1147,383,196,89,281,244,55,462,12,97,57]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T){"use strict";function x(e){var t=e.getModel();if(!t)return!1;var n=t.uri.toString();return A.test(n)}Object.defineProperty(t,"__esModule",{value:!0});var k=i.localize(0,null),D=i.localize(1,null),A=/keybindings\.json$/,L=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._instantiationService=n,i._keybindingWidgetRenderer=null,i._keybindingDecorationRenderer=null,i._register(i._editor.onDidChangeModel(function(e){return i._update()})),i._update(),i}return n(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},Object.defineProperty(t.prototype,"keybindingWidgetRenderer",{get:function(){return this._keybindingWidgetRenderer},
enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._disposeKeybindingWidgetRenderer(),this._disposeKeybindingDecorationRenderer(),e.prototype.dispose.call(this)},t.prototype._update=function(){if(!x(this._editor))return this._disposeKeybindingWidgetRenderer(),void this._disposeKeybindingDecorationRenderer();this._createKeybindingDecorationRenderer(),this._editor.getConfiguration().readOnly?this._disposeKeybindingWidgetRenderer():this._createKeybindingWidgetRenderer()},t.prototype._createKeybindingWidgetRenderer=function(){this._keybindingWidgetRenderer||(this._keybindingWidgetRenderer=this._instantiationService.createInstance(R,this._editor))},t.prototype._disposeKeybindingWidgetRenderer=function(){this._keybindingWidgetRenderer&&(this._keybindingWidgetRenderer.dispose(),this._keybindingWidgetRenderer=null)},t.prototype._createKeybindingDecorationRenderer=function(){
this._keybindingDecorationRenderer||(this._keybindingDecorationRenderer=this._instantiationService.createInstance(O,this._editor))},t.prototype._disposeKeybindingDecorationRenderer=function(){this._keybindingDecorationRenderer&&(this._keybindingDecorationRenderer.dispose(),this._keybindingDecorationRenderer=null)},t.ID="editor.contrib.defineKeybinding",t=a([l(1,d.IInstantiationService)],t)}(c.Disposable);t.DefineKeybindingController=L;var R=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._instantiationService=n,i._launchWidget=i._register(i._instantiationService.createInstance(y.FloatingClickWidget,i._editor,k,M.ID)),i._register(i._launchWidget.onClick(function(){return i.showDefineKeybindingWidget()})),i._defineWidget=i._register(i._instantiationService.createInstance(m.DefineKeybindingOverlayWidget,i._editor)),i._launchWidget.render(),i}return n(t,e),t.prototype.showDefineKeybindingWidget=function(){var e=this;this._defineWidget.start().then(function(t){return e._onAccepted(t)})},
t.prototype._onAccepted=function(e){if(this._editor.focus(),e){new RegExp(/\\/g).test(e)&&(e=e.slice(0,-1)+"\\\\");var t=["{",'\t"key": '+JSON.stringify(e)+",",'\t"command": "${1:commandId}",','\t"when": "${2:editorTextFocus}"',"}$0"].join("\n"),n=v.SmartSnippetInserter.insertSnippet(this._editor.getModel(),this._editor.getPosition());t=n.prepend+t+n.append,this._editor.setPosition(n.position),g.SnippetController2.get(this._editor).insert(t,0,0)}},t=a([l(1,d.IInstantiationService)],t)}(c.Disposable);t.KeybindingWidgetRenderer=R;var O=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._keybindingService=n,i._dec=[],i._updateDecorations=i._register(new r.RunOnceScheduler(function(){return i._updateDecorationsNow()},500));var o=i._editor.getModel();return i._register(o.onDidChangeContent(function(){return i._updateDecorations.schedule()})),i._register(i._keybindingService.onDidUpdateKeybindings(function(e){return i._updateDecorations.schedule()})),i._register({dispose:function(){
i._dec=i._editor.deltaDecorations(i._dec,[]),i._updateDecorations.cancel()}}),i._updateDecorations.schedule(),i}return n(t,e),t.prototype._updateDecorationsNow=function(){var e=this._editor.getModel(),t=[],n=b.parseTree(e.getValue());if(n&&Array.isArray(n.children))for(var i=0,r=n.children.length;i<r;i++){var o=n.children[i],s=this._getDecorationForEntry(e,o);null!==s&&t.push(s)}this._dec=this._editor.deltaDecorations(this._dec,t)},t.prototype._getDecorationForEntry=function(e,n){if(!Array.isArray(n.children))return null;for(var i=0,r=n.children.length;i<r;i++){var o=n.children[i];if("property"===o.type&&(Array.isArray(o.children)&&2===o.children.length)){if("key"===o.children[0].value){var s=o.children[1];if("string"===s.type){var a=this._keybindingService.resolveUserBinding(s.value);if(0===a.length)return this._createDecoration(!0,null,null,e,s);var c=a[0],l=null;if(c instanceof E.WindowsNativeResolvedKeybinding&&(l=c.getUSLabel()),!c.isWYSIWYG())return this._createDecoration(!1,c.getLabel(),l,e,s)
;if(/abnt_|oem_/.test(s.value))return this._createDecoration(!1,c.getLabel(),l,e,s);var u=c.getUserSettingsLabel();return t._userSettingsFuzzyEquals(s.value,u)?null:this._createDecoration(!1,c.getLabel(),l,e,s)}}}}return null},t._userSettingsFuzzyEquals=function(e,t){if(e=e.trim().toLowerCase(),t=t.trim().toLowerCase(),e===t)return!0;var n=S.KeybindingIO._readUserBinding(e),i=n[0],r=n[1],o=S.KeybindingIO._readUserBinding(t),s=o[0],a=o[1];return this._userBindingEquals(i,s)&&this._userBindingEquals(r,a)},t._userBindingEquals=function(e,t){return null===e&&null===t||!(!e||!t)&&(e instanceof s.SimpleKeybinding&&t instanceof s.SimpleKeybinding?e.equals(t):e instanceof _.ScanCodeBinding&&t instanceof _.ScanCodeBinding&&e.equals(t))},t.prototype._createDecoration=function(e,t,n,r,s){var a,c,l,u;e?(a=(new o.MarkdownString).appendText(D),c="keybindingError",l="inlineKeybindingError",
u=w.themeColorFromId(I.overviewRulerError)):(a=n&&t!==n?new o.MarkdownString(i.localize(2,null,t,n)):new o.MarkdownString(i.localize(3,null,t)),c="keybindingInfo",l="inlineKeybindingInfo",u=w.themeColorFromId(I.overviewRulerInfo));var d=r.getPositionAt(s.offset),h=r.getPositionAt(s.offset+s.length);return{range:new p.Range(d.lineNumber,d.column,h.lineNumber,h.column),options:{stickiness:T.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:c,beforeContentClassName:l,hoverMessage:a,overviewRuler:{color:u,darkColor:u,position:T.OverviewRulerLane.Right}}}},t=a([l(1,u.IKeybindingService)],t)}(c.Disposable);t.KeybindingEditorDecorationsRenderer=O;var M=function(e){function t(){return e.call(this,{id:t.ID,precondition:h.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.languageId.isEqualTo("jsonc")),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:s.KeyChord(2089,2089)}})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t){if(x(t)&&!t.getConfiguration().readOnly){
var n=L.get(t);n&&n.keybindingWidgetRenderer&&n.keybindingWidgetRenderer.showDefineKeybindingWidget()}},t.ID="editor.action.defineKeybinding",t}(f.EditorCommand);f.registerEditorContribution(L),f.registerEditorCommand(new M)}),define(e[245],t([1,0,774,11,102,120,869,189,313,29,37,15,52,16,28,178,343,36,8,84,435,281,1594,1327,462,1331,1330,7,63,17,9,93,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";function N(e){var t=e.getValue("keyboard");return"keyCode"===(t?t.dispatch:null)?1:0}Object.defineProperty(t,"__esModule",{value:!0});var F=function(){function e(){this._onDidChangeKeyboardMapper=new A.Emitter,this.onDidChangeKeyboardMapper=this._onDidChangeKeyboardMapper.event,this._layoutInfo=null,this._rawMapping=null,this._keyboardMapper=null,this._initialized=!1}return e.prototype._onKeyboardLayoutChanged=function(){this._initialized&&this._setKeyboardData(I.getCurrentKeyboardLayout(),I.getKeyMap())},e.prototype.getKeyboardMapper=function(e){
return this._initialized||this._setKeyboardData(I.getCurrentKeyboardLayout(),I.getKeyMap()),1===e?new D.MacLinuxFallbackKeyboardMapper(r.OS):this._keyboardMapper},e.prototype.getCurrentKeyboardLayout=function(){return this._initialized||this._setKeyboardData(I.getCurrentKeyboardLayout(),I.getKeyMap()),this._layoutInfo},e._isUSStandard=function(e){if(3===r.OS){return(t=e)&&"us"===t.layout}if(2===r.OS){return(t=e)&&"com.apple.keylayout.US"===t.id}if(1===r.OS){var t=e;return t&&"00000409"===t.name}return!1},e.prototype.getRawKeyboardMapping=function(){return this._initialized||this._setKeyboardData(I.getCurrentKeyboardLayout(),I.getKeyMap()),this._rawMapping},e.prototype._setKeyboardData=function(t,n){this._layoutInfo=t,this._initialized&&e._equals(this._rawMapping,n)||(this._initialized=!0,this._rawMapping=n,this._keyboardMapper=new T.CachedKeyboardMapper(e._createKeyboardMapper(this._layoutInfo,this._rawMapping)),this._onDidChangeKeyboardMapper.fire())},e._createKeyboardMapper=function(t,n){
var i=e._isUSStandard(t);if(1===r.OS)return new x.WindowsKeyboardMapper(i,n);if(0===Object.keys(n).length)return new D.MacLinuxFallbackKeyboardMapper(r.OS);if(2===r.OS){if("com.apple.keylayout.DVORAK-QWERTYCMD"===t.id)return new D.MacLinuxFallbackKeyboardMapper(r.OS)}return new k.MacLinuxKeyboardMapper(i,n,r.OS)},e._equals=function(e,t){return 1===r.OS?x.windowsKeyboardMappingEquals(e,t):k.macLinuxKeyboardMappingEquals(e,t)},e.INSTANCE=new e,e}();t.KeyboardMapperFactory=F;var W={type:"object",default:{command:"",key:""},properties:{command:{description:i.localize(7,null),type:"string"},key:{description:i.localize(8,null),type:"string"},mac:{description:i.localize(9,null),type:"string"},linux:{description:i.localize(10,null),type:"string"},win:{description:i.localize(11,null),type:"string"},when:{description:i.localize(12,null),type:"string"}}},B=o.ExtensionsRegistry.registerExtensionPoint("keybindings",[],{description:i.localize(13,null),oneOf:[W,{type:"array",items:W}]});!function(e){e[e.Code=0]="Code",
e[e.KeyCode=1]="KeyCode"}(t.DispatchConfig||(t.DispatchConfig={}));var V=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,n,i,r,o,a)||this,u=N(c);c.onDidChangeConfiguration(function(e){var t=N(c);u!==t&&(u=t,l._keyboardMapper=F.INSTANCE.getKeyboardMapper(u),l.updateResolver({source:p.KeybindingSource.Default}))}),l._keyboardMapper=F.INSTANCE.getKeyboardMapper(u),F.INSTANCE.onDidChangeKeyboardMapper(function(){l._keyboardMapper=F.INSTANCE.getKeyboardMapper(u),l.updateResolver({source:p.KeybindingSource.Default})}),l._cachedResolver=null,l._firstTimeComputingResolver=!0,l.userKeybindings=l._register(new b.ConfigWatcher(s.appKeybindingsPath,{defaultConfig:[],onError:function(e){return O.onUnexpectedError(e)}})),B.setHandler(function(e){for(var t=!1,n=0,i=e;n<i.length;n++){var r=i[n];t=l._handleKeybindingsExtensionPointUser(r.description.isBuiltin,r.value,r.collector)||t}t&&l.updateResolver({source:p.KeybindingSource.Default})}),l._register(l.userKeybindings.onDidUpdateConfiguration(function(e){
return l.updateResolver({source:p.KeybindingSource.User,keybindings:e.config})})),l._register(_.addDisposableListener(t,_.EventType.KEY_DOWN,function(e){var t=new C.StandardKeyboardEvent(e);l._dispatch(t,t.target)&&t.preventDefault()})),y.keybindingsTelemetry(r,l);var d=F.INSTANCE.getCurrentKeyboardLayout();return r.publicLog("keyboardLayout",{currentKeyboardLayout:d}),l}return n(t,e),t.prototype.dumpDebugInfo=function(){return"Layout info:\n"+JSON.stringify(F.INSTANCE.getCurrentKeyboardLayout(),null,"\t")+"\n"+this._keyboardMapper.dumpDebugInfo()+"\n\nRaw mapping:\n"+JSON.stringify(F.INSTANCE.getRawKeyboardMapping(),null,"\t")},t.prototype._safeGetConfig=function(){var e=this.userKeybindings.getConfig();return Array.isArray(e)?e:[]},t.prototype.customKeybindingsCount=function(){return this._safeGetConfig().length},t.prototype.updateResolver=function(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)},t.prototype._getResolver=function(){if(!this._cachedResolver){
var e=this._resolveKeybindingItems(g.KeybindingsRegistry.getDefaultKeybindings(),!0),t=this._resolveUserKeybindingItems(this._getExtraKeybindings(this._firstTimeComputingResolver),!1);this._cachedResolver=new d.KeybindingResolver(e,t),this._firstTimeComputingResolver=!1}return this._cachedResolver},t.prototype._documentHasFocus=function(){return document.hasFocus()},t.prototype._resolveKeybindingItems=function(e,t){for(var n=[],i=0,r=0,o=e.length;r<o;r++){var s=e[r],a=s.when?s.when.normalize():null,c=s.keybinding;if(c)for(var l=this.resolveKeybinding(c),u=0;u<l.length;u++)n[i++]=new E.ResolvedKeybindingItem(l[u],s.command,s.commandArgs,a,t);else n[i++]=new E.ResolvedKeybindingItem(null,s.command,s.commandArgs,a,t)}return n},t.prototype._resolveUserKeybindingItems=function(e,t){for(var n=[],i=0,r=0,o=e.length;r<o;r++){var s=e[r],a=s.when?s.when.normalize():null,c=s.firstPart,l=s.chordPart
;if(c)for(var u=this._keyboardMapper.resolveUserBinding(c,l),d=0;d<u.length;d++)n[i++]=new E.ResolvedKeybindingItem(u[d],s.command,s.commandArgs,a,t);else n[i++]=new E.ResolvedKeybindingItem(null,s.command,s.commandArgs,a,t)}return n},t.prototype._getExtraKeybindings=function(e){var t=this._safeGetConfig();if(!e){var n=t.length;this._telemetryService.publicLog("customKeybindingsChanged",{keyCount:n})}return t.map(function(e){return w.KeybindingIO.readUserKeybindingItem(e,r.OS)})},t.prototype.resolveKeybinding=function(e){return this._keyboardMapper.resolveKeybinding(e)},t.prototype.resolveKeyboardEvent=function(e){return this._keyboardMapper.resolveKeyboardEvent(e)},t.prototype.resolveUserBinding=function(e){var t=w.KeybindingIO._readUserBinding(e),n=t[0],i=t[1];return this._keyboardMapper.resolveUserBinding(n,i)},t.prototype._handleKeybindingsExtensionPointUser=function(e,t,n){if(function(e){return Array.isArray(e)}(t)){for(var i=!1,r=0,o=t.length;r<o;r++)i=this._handleKeybinding(e,r+1,t[r],n)||i;return i}
return this._handleKeybinding(e,1,t,n)},t.prototype._handleKeybinding=function(e,t,n,r){var o=[],s=!1;if(function(e,t){return e?"string"!=typeof e.command?(t.push(i.localize(1,null,"command")),!1):"string"!=typeof e.key?(t.push(i.localize(2,null,"key")),!1):e.when&&"string"!=typeof e.when?(t.push(i.localize(3,null,"when")),!1):e.mac&&"string"!=typeof e.mac?(t.push(i.localize(4,null,"mac")),!1):e.linux&&"string"!=typeof e.linux?(t.push(i.localize(5,null,"linux")),!1):!e.win||"string"==typeof e.win||(t.push(i.localize(6,null,"win")),!1):(t.push(i.localize(0,null)),!1)}(n,o)){var a=this._asCommandRule(e,t++,n);a&&(g.KeybindingsRegistry.registerKeybindingRule2(a,1),s=!0)}return o.length>0&&r.error(i.localize(14,null,B.name,o.join("\n"))),s},t.prototype._asCommandRule=function(e,t,n){var i,o=n.command,s=n.when,a=n.key,c=n.mac,l=n.linux,u=n.win;i=e?g.KeybindingsRegistry.WEIGHT.builtinExtension(t):g.KeybindingsRegistry.WEIGHT.externalExtension(t);var d={id:o,when:f.ContextKeyExpr.deserialize(s),weight:i,
primary:w.KeybindingIO.readKeybinding(a,r.OS),mac:c&&{primary:w.KeybindingIO.readKeybinding(c,r.OS)},linux:l&&{primary:w.KeybindingIO.readKeybinding(l,r.OS)},win:u&&{primary:w.KeybindingIO.readKeybinding(u,r.OS)}};if(d.primary||d.mac||d.linux||d.win)return d},t.prototype.getDefaultKeybindingsContent=function(){var e=this._getResolver(),n=e.getDefaultKeybindings(),i=e.getDefaultBoundCommands();return t._getDefaultKeybindings(n)+"\n\n"+t._getAllCommandsAsComment(i)},t._getDefaultKeybindings=function(e){var t=new w.OutputBuilder;t.writeLine("[");var n=e.length-1;return e.forEach(function(e,i){w.KeybindingIO.writeKeybindingItem(t,e,r.OS),i!==n?t.writeLine(","):t.writeLine()}),t.writeLine("]"),t.toString()},t._getAllCommandsAsComment=function(e){var t=d.KeybindingResolver.getAllUnboundCommands(e).sort().join("\n// - ");return"// "+i.localize(15,null)+"\n// - "+t},
t=a([l(1,f.IContextKeyService),l(2,h.ICommandService),l(3,m.ITelemetryService),l(4,P.INotificationService),l(5,S.IEnvironmentService),l(6,u.IStatusbarService),l(7,R.IConfigurationService)],t)}(c.AbstractKeybindingService);t.WorkbenchKeybindingService=V;var z="vscode://schemas/keybindings",H={id:z,type:"array",title:i.localize(16,null),items:{required:["key"],type:"object",defaultSnippets:[{body:{key:"$1",command:"$2",when:"$3"}}],properties:{key:{type:"string",description:i.localize(17,null)},command:{description:i.localize(18,null)},when:{type:"string",description:i.localize(19,null)},args:{description:i.localize(20,null)}}}};v.Registry.as(s.Extensions.JSONContribution).registerSchema(z,H);var K=v.Registry.as(L.Extensions.Configuration),U={id:"keyboard",order:15,type:"object",title:i.localize(21,null),overridable:!0,properties:{"keyboard.dispatch":{type:"string",enum:["code","keyCode"],default:"code",description:i.localize(22,null),included:2===r.OS||3===r.OS},"keyboard.touchbar.enabled":{type:"boolean",
default:!0,description:i.localize(23,null),included:2===r.OS&&parseFloat(M.release())>=16}}};K.registerConfiguration(U)}),define(e[1336],t([1,0,573,32,37,245,21]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){return e.call(this,{id:"workbench.action.inspectKeyMappings",label:i.localize(0,null),alias:"Developer: Inspect Key Mappings",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){var n=e.get(o.IKeybindingService),i=e.get(a.IEditorService);n instanceof s.WorkbenchKeybindingService&&i.openEditor({contents:n.dumpDebugInfo(),options:{pinned:!0}})},t}(r.EditorAction);r.registerEditorAction(c)}),define(e[333],t([1,0,775,9,70,151,33,49,102,181,17,904,36]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";function v(e){return void 0===e||!!Array.isArray(e)&&e.every(function(e){return"string"==typeof e})}Object.defineProperty(t,"__esModule",{value:!0}),
t.languagesExtPoint=d.ExtensionsRegistry.registerExtensionPoint("languages",[],{description:i.localize(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:languageId}",aliases:["${2:label}"],extensions:["${3:extension}"],configuration:"./language-configuration.json"}}],properties:{id:{description:i.localize(1,null),type:"string"},aliases:{description:i.localize(2,null),type:"array",items:{type:"string"}},extensions:{description:i.localize(3,null),default:[".foo"],type:"array",items:{type:"string"}},filenames:{description:i.localize(4,null),type:"array",items:{type:"string"}},filenamePatterns:{description:i.localize(5,null),type:"array",items:{type:"string"}},mimetypes:{description:i.localize(6,null),type:"array",items:{type:"string"}},firstLine:{description:i.localize(7,null),type:"string"},configuration:{description:i.localize(8,null),type:"string",default:"./language-configuration.json"}}}});var m=function(e){function d(n,s,a){
var l=e.call(this,a.verbose||a.isExtensionDevelopment||!a.isBuilt)||this;return l._configurationService=s,l._extensionService=n,t.languagesExtPoint.setHandler(function(e){for(var n=[],r=0,s=e.length;r<s;r++){var a=e[r];if(Array.isArray(a.value))for(var c=0,l=a.value.length;c<l;c++){var u=a.value[c];if(function(e,n){return e?"string"!=typeof e.id?(n.error(i.localize(11,null,"id")),!1):v(e.extensions)?v(e.filenames)?void 0!==e.firstLine&&"string"!=typeof e.firstLine?(n.error(i.localize(14,null,"firstLine")),!1):void 0!==e.configuration&&"string"!=typeof e.configuration?(n.error(i.localize(15,null,"configuration")),!1):v(e.aliases)?!!v(e.mimetypes)||(n.error(i.localize(17,null,"mimetypes")),!1):(n.error(i.localize(16,null,"aliases")),!1):(n.error(i.localize(13,null,"filenames")),!1):(n.error(i.localize(12,null,"extensions")),!1):(n.error(i.localize(10,null,t.languagesExtPoint.name)),!1)}(u,a.collector)){var d=void 0;u.configuration&&(d=o.joinPath(a.description.extensionLocation,u.configuration)),n.push({id:u.id,
extensions:u.extensions,filenames:u.filenames,filenamePatterns:u.filenamePatterns,firstLine:u.firstLine,aliases:u.aliases,mimetypes:u.mimetypes,configuration:d})}}else a.collector.error(i.localize(9,null,t.languagesExtPoint.name))}h.ModesRegistry.registerLanguages(n)}),l._configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration(c.FILES_ASSOCIATIONS_CONFIG)&&l.updateMime()}),l.onDidCreateMode(function(e){l._extensionService.activateByEvent("onLanguage:"+e.getId()).done(null,r.onUnexpectedError)}),l}return n(d,e),d.prototype._onReady=function(){var e=this;return this._onReadyPromise||(this._onReadyPromise=this._extensionService.whenInstalledExtensionsRegistered().then(function(){return e.updateMime(),!0})),this._onReadyPromise},d.prototype.updateMime=function(){var e=this,t=this._configurationService.getValue();s.clearTextMimes(!0),t.files&&t.files.associations&&Object.keys(t.files.associations).forEach(function(n){var i=t.files.associations[n],r=e.getMimeForMode(i)||"text/x-"+i
;s.registerTextMime({id:i,mime:r,filepattern:n,userConfigured:!0})})},d=a([l(0,u.IExtensionService),l(1,p.IConfigurationService),l(2,g.IEnvironmentService)],d)}(f.ModeServiceImpl);t.WorkbenchModeServiceImpl=m}),define(e[465],t([1,0,712,107,168,54,39,14,226,36,49,5,59,70,87,166,395,235,102,333,134,38,77,50,10,33]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k;!function(e){e.toValidSnippet=function(e,t,i){if(c.isFalsyOrWhitespace(t.path))return e.collector.error(n.localize(0,null,e.description.name,String(t.path))),null;if(c.isFalsyOrWhitespace(t.language)&&!c.endsWith(t.path,".code-snippets"))return e.collector.error(n.localize(1,null,e.description.name,String(t.path))),null;if(!c.isFalsyOrWhitespace(t.language)&&!i.isRegisteredMode(t.language))return e.collector.error(n.localize(2,null,e.description.name,String(t.language))),null;var r=e.description.extensionLocation,o=g.joinPath(r,t.path)
;return 0!==o.path.indexOf(r.path)?(e.collector.error(n.localize(3,null,e.description.name,o.path,r.path)),null):{language:t.language,location:o}},e.snippetsContribution={description:n.localize(4,null),type:"array",defaultSnippets:[{body:[{language:"",path:""}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",path:"./snippets/${2:id}.json."}}],properties:{language:{description:n.localize(5,null),type:"string"},path:{description:n.localize(6,null),type:"string"}}}}}(k||(k={}));var D=function(){function e(e,t,n,i,o,s){var a=this;this._environmentService=e,this._modeService=t,this._logService=n,this._fileService=s,this._disposables=[],this._files=new Map,this._initExtensionSnippets(),this._initPromise=Promise.resolve(o.when(E.LifecyclePhase.Running).then(function(){return a._initUserSnippets()})),r.setSnippetSuggestSupport(new L(this._modeService,this))}return e.prototype.dispose=function(){p.dispose(this._disposables)},e.prototype.getSnippetFiles=function(){var e=this
;return this._initPromise.then(function(){return I.values(e._files)})},e.prototype.getSnippets=function(e){var t=this;return this._initPromise.then(function(){var n=t._modeService.getLanguageIdentifier(e).language,i=[],r=[];return t._files.forEach(function(e){r.push(e.load().then(function(e){return e.select(n,i)}).catch(function(n){return t._logService.error(n,e.location.toString())}))}),Promise.all(r).then(function(){return i})})},e.prototype.getSnippetsSync=function(e){var t=this._modeService.getLanguageIdentifier(e).language,n=[];return this._files.forEach(function(e){e.load().catch(function(e){}),e.select(t,n)}),n},e.prototype._initExtensionSnippets=function(){var e=this;S.ExtensionsRegistry.registerExtensionPoint("snippets",[_.languagesExtPoint],k.snippetsContribution).setHandler(function(t){for(var i=function(t){for(var i=function(i){var r=k.toValidSnippet(t,i,e._modeService);if(!r)return"continue"
;if(e._files.has(r.location.toString()))e._files.get(r.location.toString()).defaultScopes.push(r.language);else{var o=new y.SnippetFile(r.location,r.language?[r.language]:void 0,t.description,e._fileService);e._files.set(o.location.toString(),o),e._environmentService.isExtensionDevelopment&&o.load().then(function(e){e.data.some(function(e){return e.isBogous})&&t.collector.warn(n.localize(7,null,t.description.name))},function(e){t.collector.warn(n.localize(8,null,o.location))})}},r=0,o=t.value;r<o.length;r++){i(o[r])}},r=0,o=t;r<o.length;r++){i(o[r])}})},e.prototype._initUserSnippets=function(){var e=this,t=function(t){var n=f.extname(t);if(".json"===n){var i=f.basename(t,".json");e._files.set(t,new y.SnippetFile(T.default.file(t),[i],void 0,e._fileService))}else".code-snippets"===n&&e._files.set(t,new y.SnippetFile(T.default.file(t),void 0,void 0,e._fileService))},n=f.join(this._environmentService.appSettingsHome,"snippets");return v.mkdirp(n).then(function(){return v.readdir(n)}).then(function(e){
for(var i=0,r=e;i<r.length;i++){var o=r[i];t(f.join(n,o))}}).then(function(){var i=m.watch(n,function(i,r){if("string"==typeof r){var o=f.join(n,r);v.exists(o).then(function(n){n?e._files.has(o)?e._files.get(o).reset():t(o):e._files.delete(o)})}},function(t){return e._logService.error(t)});e._disposables.push({dispose:function(){i&&(i.removeAllListeners(),i.close())}})}).then(void 0,function(t){e._logService.error("Failed to load user snippets",t)})},e=a([l(0,d.IEnvironmentService),l(1,o.IModeService),l(2,w.ILogService),l(3,h.IExtensionService),l(4,E.ILifecycleService),l(5,x.IFileService)],e)}();i.registerSingleton(b.ISnippetsService,D);var A=function(){function e(e,t){this.snippet=e,this.label=e.prefix,this.detail=n.localize(9,null,e.description||e.name,e.source),this.insertText=e.body,this.overwriteBefore=t,this.sortText=(e.isFromExtension?"z":"a")+"-"+e.prefix,this.noAutoAccept=!0,this.type="snippet",this.snippetType="textmate"}return e.prototype.resolve=function(){
return this.documentation=(new C.MarkdownString).appendCodeblock("",(new u.SnippetParser).text(this.snippet.codeSnippet)),this.insertText=this.snippet.codeSnippet,this},e.compareByLabel=function(e,t){return c.compare(e.label,t.label)},e}();t.SnippetSuggestion=A;var L=function(){function e(e,t){this._modeService=e,this._snippets=t}return e.prototype.provideCompletionItems=function(e,t,i){var r=this._getLanguageIdAtPosition(e,t);return this._snippets.getSnippets(r).then(function(r){for(var o=[],a=e.getWordUntilPosition(t).word.toLowerCase(),l=e.getLineContent(t.lineNumber).substr(Math.max(0,t.column-100),t.column-1).toLowerCase(),u=0,d=r;u<d.length;u++){var h=d[u],p=h.prefix.toLowerCase(),f=0,g=!0;"string"==typeof i.triggerCharacter?(f=i.triggerCharacter.length,g=c.startsWith(p,i.triggerCharacter.toLowerCase())):a.length>0&&c.startsWith(p,a)?(f=a.length,g=!0):l.length>0&&l.match(/[^\s]$/)&&(g=(f=c.overlap(l,h.prefix.toLowerCase()))>0&&!e.getWordAtPosition(new s.Position(t.lineNumber,t.column-f))),
g&&o.push(new A(h,f))}o.sort(A.compareByLabel);for(var v=0;v<o.length;v++){for(var m=o[v],y=v+1;y<o.length&&m.label===o[y].label;y++)o[y].label=n.localize(10,null,o[y].label,o[y].snippet.name);y>v+1&&(o[v].label=n.localize(11,null,o[v].label,o[v].snippet.name),v=y)}return{suggestions:o}})},e.prototype.resolveCompletionItem=function(e,t,n){return n instanceof A?n.resolve():n},e.prototype._getLanguageIdAtPosition=function(e,t){e.tokenizeIfCheap(t.lineNumber);var n=e.getLanguageIdAtPosition(t.lineNumber,t.column),i=this._modeService.getLanguageIdentifier(n).language;return this._modeService.getLanguageName(i)||(n=e.getLanguageIdentifier().id),n},e=a([l(0,o.IModeService),l(1,b.ISnippetsService)],e)}();t.SnippetSuggestProvider=L,t.getNonWhitespacePrefix=function(e,t){for(var n=e.getLineContent(t.lineNumber).substr(0,t.column-1),i=Math.max(0,n.length-100),r=n.length-1;r>=i;r--){var o=n.charAt(r);if(/\s/.test(o))return n.substr(r+1)}return 0===i?n:""}}),
define(e[334],t([1,0,713,15,52,235,465,16,14,5,19,32,160,168,63,55,17]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(t,n,i,r){var o=this;this._editor=t,this._snippetService=n,this._configurationService=i,this._activeSnippets=[],this._hasSnippets=e.ContextKey.bindTo(r),this._configListener=this._configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("editor.tabCompletion")&&o._update()}),this._update()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){d.dispose(this._configListener),d.dispose(this._selectionListener)},e.prototype._update=function(){var e=this;this._configurationService.getValue("editor.tabCompletion")?(this._selectionListener=this._editor.onDidChangeCursorSelection(function(t){return e._updateSnippets()}),this._editor.getModel()&&this._updateSnippets()):d.dispose(this._selectionListener)},
e.prototype._updateSnippets=function(){this._activeSnippets=[];var e=this._editor.getSelection(),t=this._editor.getModel();t.tokenizeIfCheap(e.positionLineNumber);var n=t.getLanguageIdAtPosition(e.positionLineNumber,e.positionColumn),i=this._snippetService.getSnippetsSync(n);if(i){if(h.Range.isEmpty(e)){var r=s.getNonWhitespacePrefix(t,e.getPosition());if(r)for(var o=0,a=i;o<a.length;o++){p=a[o];u.endsWith(r,p.prefix)&&this._activeSnippets.push(p)}}else if(!h.Range.spansMultipleLines(e)&&t.getValueLengthInRange(e)<=100){var c=t.getValueInRange(e);if(c)for(var l=0,d=i;l<d.length;l++){var p;c===(p=d[l]).prefix&&this._activeSnippets.push(p)}}this._hasSnippets.set(this._activeSnippets.length>0)}else this._hasSnippets.set(!1)},e.prototype.performSnippetCompletions=function(){if(1===this._activeSnippets.length){var e=this._activeSnippets[0];f.SnippetController2.get(this._editor).insert(e.codeSnippet,e.prefix.length,0)
}else this._activeSnippets.length>1&&g.showSimpleSuggestions(this._editor,this._activeSnippets.map(function(e){return new s.SnippetSuggestion(e,e.prefix.length)}))},e.ID="editor.tabCompletionController",e.ContextKey=new i.RawContextKey("hasSnippetCompletions",void 0),e=a([l(1,o.ISnippetsService),l(2,y.IConfigurationService),l(3,i.IContextKeyService)],e)}();t.TabCompletionController=b,p.registerEditorContribution(b);var S=p.EditorCommand.bindToContribution(b.get);p.registerEditorCommand(new S({id:"insertSnippet",precondition:b.ContextKey,handler:function(e){return e.performSnippetCompletions()},kbOpts:{weight:r.KeybindingsRegistry.WEIGHT.editorContrib(),kbExpr:i.ContextKeyExpr.and(m.EditorContextKeys.editorTextFocus,m.EditorContextKeys.tabDoesNotMoveFocus,f.SnippetController2.InSnippetMode.toNegated()),primary:2}})),c.Registry.as(v.Extensions.Configuration).registerConfiguration({id:"editor",order:5,type:"object",properties:{"editor.tabCompletion":{type:"boolean",default:!1,description:n.localize(0,null)}}})
}),define(e[1340],t([1,0,32,71,157,15,6,29,309,312,339,284,160,334,12,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(e){function t(t,n,i,r,o,s,a,c){return e.call(this,t,n,{isSimpleWidget:!0},i,r,o,s,a,c)||this}return n(t,e),t.prototype._getContributions=function(){return[d.MenuPreventer,h.SelectionClipboard,p.ContextMenuController,f.SuggestController,g.SnippetController2,v.TabCompletionController]},t.prototype._getActions=function(){return i.EditorExtensionsRegistry.getEditorActions()},t.getEditorOptions=function(){return{wordWrap:"on",glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,scrollbar:{vertical:"visible",verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,lineDecorationsWidth:0,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1}}},
t=a([l(2,c.IInstantiationService),l(3,r.ICodeEditorService),l(4,u.ICommandService),l(5,s.IContextKeyService),l(6,m.IThemeService),l(7,y.INotificationService)],t)}(o.CodeEditorWidget);t.SimpleCommentEditor=b}),define(e[1341],t([1,0,583,74,8,41,155,23,20,51,7,45,44,198,221,68,251,517,1340,10,26,19]),function(e,t,i,r,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMENTEDITOR_DECORATION_KEY="commenteditordecoration";var I=function(){function e(e){this.comment=e,this._domNode=r.$("div.review-comment").getHTMLElement(),this._domNode.tabIndex=0;var t=r.$("div.avatar-container").appendTo(this._domNode).getHTMLElement();r.$("img.avatar").appendTo(t).getHTMLElement().src=e.gravatar;var n=r.$(".review-comment-contents").appendTo(this._domNode).getHTMLElement(),i=r.$("div").appendTo(n).getHTMLElement();r.$("strong.author").appendTo(i).getHTMLElement().innerText=e.userName,this._body=r.$("div.comment-body").appendTo(n).getHTMLElement(),
this._md=b.renderMarkdown(e.body),this._body.appendChild(this._md),this._domNode.setAttribute("aria-label",e.userName+", "+e.body.value),this._domNode.setAttribute("role","treeitem"),this._domNode.title=e.userName+", "+e.body.value,this._clearTimeout=null}return Object.defineProperty(e.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),e.prototype.update=function(e){e.body!==this.comment.body&&(this._body.removeChild(this._md),this._md=b.renderMarkdown(e.body),this._body.appendChild(this._md)),this.comment=e},e.prototype.focus=function(){var e=this;this.domNode.focus(),this._clearTimeout||(a.addClass(this.domNode,"focus"),this._clearTimeout=setTimeout(function(){a.removeClass(e.domNode,"focus")},3e3))},e}();t.CommentNode=I;var T=0,x=function(e){function m(t,n,i,r,o,s,a,c,l){void 0===l&&(l={});var u=e.call(this,s,l)||this;return u.instantiationService=t,u.modeService=n,u.modelService=i,u.themeService=r,u.commentService=o,u._onDidClose=new p.Emitter,u._resizeObserver=null,
u._owner=a,u._commentThread=c,u._isCollapsed=c.collapsibleState!==g.CommentThreadCollapsibleState.Expanded,u._decorationIDs=[],u._localToDispose=[],u.create(),u.themeService.onThemeChange(u._applyTheme,u),u}return n(m,e),Object.defineProperty(m.prototype,"owner",{get:function(){return this._owner},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"commentThread",{get:function(){return this._commentThread},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),m.prototype.revealLine=function(e){},m.prototype.reveal=function(e){if(this._isCollapsed)if(this._decorationIDs&&this._decorationIDs.length){var t=this.editor.getModel().getDecorationRange(this._decorationIDs[0]);this.show(t,2)}else this.show({lineNumber:this._commentThread.range.startLineNumber,column:1},2);if(this._bodyElement.focus(),e){var n=this.editor.getLayoutInfo().height,i=this._commentElements.filter(function(t){
return t.comment.commentId===e});if(i&&i.length){var r=a.getDomNodePagePosition(this._commentElements[0].domNode),o=a.getDomNodePagePosition(i[0].domNode);return this.editor.setScrollTop(this.editor.getTopForLineNumber(this._commentThread.range.startLineNumber)-n/2+o.top-r.top),void i[0].focus()}}this.editor.revealRangeInCenter(this._commentThread.range)},m.prototype._fillContainer=function(e){this.setCssClass("review-widget"),this._headElement=r.$(".head").getHTMLElement(),e.appendChild(this._headElement),this._fillHead(this._headElement),this._bodyElement=r.$(".body").getHTMLElement(),e.appendChild(this._bodyElement)},m.prototype._fillHead=function(e){var t=this,n=r.$(".review-title").appendTo(this._headElement).getHTMLElement();this._primaryHeading=r.$("span.filename").appendTo(n).getHTMLElement(),this._secondaryHeading=r.$("span.dirname").appendTo(n).getHTMLElement(),this._metaHeading=r.$("span.meta").appendTo(n).getHTMLElement();r.$(this._primaryHeading).safeInnerHtml("Participants:"),
this._primaryHeading.setAttribute("aria-label","Participants:");var o=this._commentThread.comments.filter(d.uniqueFilter(function(e){return e.userName})).map(function(e){return"@"+e.userName}).join(", ");r.$(this._secondaryHeading).safeInnerHtml(o),this._secondaryHeading.setAttribute("aria-label",o);var s=r.$(".review-actions").appendTo(this._headElement);this._actionbarWidget=new c.ActionBar(s.getHTMLElement(),{}),this._disposables.push(this._actionbarWidget),this._toggleAction=new u.Action("review.expand",i.localize(0,null),this._isCollapsed?"expand-review-action octicon octicon-chevron-down":"expand-review-action octicon octicon-chevron-up",!0,function(){if(t._isCollapsed)t.show({lineNumber:t._commentThread.range.startLineNumber,column:1},2);else{if(0===t._commentThread.comments.length)return t.dispose(),null;t._isCollapsed=!0,t.hide()}return null}),this._actionbarWidget.push(this._toggleAction,{label:!1,icon:!0})},m.prototype.toggleExpand=function(){this._toggleAction.run()},
m.prototype.update=function(e){for(var t=this,n=this._commentElements.length,i=e.comments.length,o=[],s=[],a=function(t){var n=c._commentElements[t].comment,i=e.comments.filter(function(e){return e.commentId===n.commentId});i.length?c._commentElements[t].update(i[0]):(s.push(t),o.push(c._commentElements[t]))},c=this,l=0;l<n;l++)a(l);for(l=o.length-1;l>=0;l--)this._commentElements.splice(s[l]),this._commentsElement.removeChild(o[l].domNode);if(0===this._commentElements.length)return this._commentThread=e,void e.comments.forEach(function(e){var n=new I(e);t._commentElements.push(n),t._commentsElement.appendChild(n.domNode)});for(var u=null,h=[],p=function(t){var n=e.comments[t],i=f._commentElements.filter(function(e){return e.comment.commentId===n.commentId});if(i.length)u=i[0].domNode,h.unshift(i[0]);else{var r=new I(n);h.unshift(r),u?(f._commentsElement.insertBefore(r.domNode,u),u=r.domNode):(f._commentsElement.appendChild(r.domNode),u=r.domNode)}},f=this,l=i-1;l>=0;l--)p(l);this._commentThread=e,
this._commentElements=h;var g=this._commentThread.comments.filter(d.uniqueFilter(function(e){return e.userName})).map(function(e){return"@"+e.userName}).join(", ");r.$(this._secondaryHeading).safeInnerHtml(g)},m.prototype._doLayout=function(e,t){this._commentEditor.layout({height:18*(this._commentEditor.hasWidgetFocus()?5:1),width:t-20})},m.prototype.display=function(e){var t=this;this._commentGlyph=new S.CommentGlyphWidget("review_"+e,this.editor,e,!1,function(){t.toggleExpand()}),this.editor.layoutContentWidget(this._commentGlyph),this._localToDispose.push(this.editor.onMouseDown(function(e){return t.onEditorMouseDown(e)})),this._localToDispose.push(this.editor.onMouseUp(function(e){return t.onEditorMouseUp(e)})),this._localToDispose.push(this.editor.onDidChangeModelContent(function(e){if(t.position)t.position.lineNumber!==t._commentGlyph.getPosition().position.lineNumber&&(t._commentGlyph.setLineNumber(t.position.lineNumber),t.editor.layoutContentWidget(t._commentGlyph));else{
var n=e.changes.map(function(t){return t.range.startLineNumber<t.range.endLineNumber?t.range.startLineNumber-t.range.endLineNumber:t.text.split(e.eol).length-1}).reduce(function(e,t){return e+t},0);t._commentGlyph.setLineNumber(t._commentGlyph.getPosition().position.lineNumber+n),t.editor.layoutContentWidget(t._commentGlyph)}}));var n=Math.ceil(1.2*this.editor.getConfiguration().lineHeight);this._headElement.style.height=n+"px",this._headElement.style.lineHeight=this._headElement.style.height,this._commentsElement=r.$("div.comments-container").appendTo(this._bodyElement).getHTMLElement(),this._commentsElement.setAttribute("role","presentation"),this._commentElements=[];for(var i=0;i<this._commentThread.comments.length;i++){var c=new I(this._commentThread.comments[i]);this._commentElements.push(c),this._commentsElement.appendChild(c.domNode)}var u=this._commentThread.comments.length>0;this._commentForm=r.$(".comment-form").appendTo(this._bodyElement).getHTMLElement(),
this._commentEditor=this.instantiationService.createInstance(_.SimpleCommentEditor,this._commentForm,_.SimpleCommentEditor.getEditorOptions());var d=u?this._commentThread.threadId:++T,h=C.default.parse("comment:commentinput-"+d+".md"),p=this.modelService.createModel("",this.modeService.getOrCreateModeByFilenameOrFirstLine(h.path),h,!0);this._localToDispose.push(p),this._commentEditor.setModel(p),this._localToDispose.push(this._commentEditor),this._localToDispose.push(this._commentEditor.getModel().onDidChangeContent(function(){return t.setCommentEditorDecorations()})),this.setCommentEditorDecorations(),this.createCommentButton(),this._localToDispose.push(this._commentEditor.onKeyDown(function(e){var n=t._commentThread.comments.length>0;0===t._commentEditor.getModel().getValueLength()&&9===e.keyCode&&n&&a.hasClass(t._commentForm,"expand")&&a.removeClass(t._commentForm,"expand")}));var f=r.$(".form-actions").appendTo(this._commentForm).getHTMLElement(),v=new l.Button(f)
;y.attachButtonStyler(v,this.themeService),v.label="Add comment",v.onDidClick(function(){return o(t,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return this._commentThread.threadId?[4,this.commentService.replyToCommentThread(this._owner,this.editor.getModel().uri,new w.Range(e,1,e,1),this._commentThread,this._commentEditor.getValue())]:[3,2];case 1:return t=n.sent(),[3,4];case 2:return[4,this.commentService.createNewCommentThread(this._owner,this.editor.getModel().uri,new w.Range(e,1,e,1),this._commentEditor.getValue())];case 3:t=n.sent(),n.label=4;case 4:return this._commentEditor.setValue(""),a.hasClass(this._commentForm,"expand")&&a.removeClass(this._commentForm,"expand"),t&&this.update(t),[2]}})})}),this._resizeObserver=new MutationObserver(this._refresh.bind(this)),this._resizeObserver.observe(this._bodyElement,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),this._commentThread.collapsibleState===g.CommentThreadCollapsibleState.Expanded&&this.show({
lineNumber:e,column:1},2),this._commentThread.reply&&!this._commentThread.comments.length&&this._commentEditor.focus()},m.prototype.createCommentButton=function(){var e=this;this._commentThread.comments.length>0?(this._reviewThreadReplyButton=r.$("button.review-thread-reply-button").appendTo(this._commentForm).getHTMLElement(),this._reviewThreadReplyButton.title="Reply...",this._reviewThreadReplyButton.textContent="Reply...",this._reviewThreadReplyButton.onclick=function(){a.hasClass(e._commentForm,"expand")||(a.addClass(e._commentForm,"expand"),e._commentEditor.focus())},this._commentEditor.onDidBlurEditorWidget(function(){0===e._commentEditor.getModel().getValueLength()&&a.hasClass(e._commentForm,"expand")&&a.removeClass(e._commentForm,"expand")})):a.addClass(this._commentForm,"expand")},m.prototype._refresh=function(){if(!this._isCollapsed&&this._bodyElement){
var e=a.getClientArea(this._bodyElement),t=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),n=this.editor.getConfiguration().lineHeight,i=Math.round(n/3),r=2*Math.round(n/9),o=Math.ceil((t+e.height+i+r)/n);this._relayout(o)}},m.prototype.setCommentEditorDecorations=function(){var e=this._commentEditor.getModel().getValueLength(),n=this._commentThread.comments.length>0,i=[{range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:e>0?"":n?"Reply...":"Type a new comment",color:E.transparent(E.editorForeground,.4)(this.themeService.getTheme()).toString()}}}];this._commentEditor.setDecorations(t.COMMENTEDITOR_DECORATION_KEY,i)},m.prototype.onEditorMouseDown=function(e){if(e.event.leftButton){var t=e.target.range;if(t){var n=!1;switch(e.target.type){case f.MouseTargetType.GUTTER_GLYPH_MARGIN:n=!0;break;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}}},m.prototype.onEditorMouseUp=function(e){if(this.mouseDownInfo){
var t=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,i=e.target.range;i&&i.startLineNumber===t&&(this.position&&this.position.lineNumber!==t||(this.position||t===this._commentThread.range.startLineNumber)&&(n&&e.target.type!==f.MouseTargetType.GUTTER_GLYPH_MARGIN||(this._isCollapsed?this.show({lineNumber:t,column:1},2):this.hide())))}},m.prototype._applyTheme=function(e){var t=e.getColor(v.peekViewBorder)||h.Color.transparent;this.style({arrowColor:t,frameColor:t})},m.prototype.show=function(t,n){this._isCollapsed=!1,e.prototype.show.call(this,t,n),this._refresh()},m.prototype.hide=function(){this._isCollapsed=!0,e.prototype.hide.call(this)},m.prototype.dispose=function(){var t=this;e.prototype.dispose.call(this),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this.editor.changeDecorations(function(e){e.deltaDecorations(t._decorationIDs,[])}),this._commentGlyph&&(this.editor.removeContentWidget(this._commentGlyph),this._commentGlyph=null),
this._localToDispose.forEach(function(e){return e.dispose()}),this._onDidClose.fire()},m}(m.ZoneWidget);t.ReviewZoneWidget=x}),define(e[335],t([1,0,74,5,32,71,218,198,15,6,52,22,26,12,375,1104,517,1341,283,47,54,874]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";function E(e){var t=e.get(o.ICodeEditorService).getFocusedCodeEditor();return t instanceof s.EmbeddedCodeEditorWidget?t.getParentEditor():t}Object.defineProperty(t,"__esModule",{value:!0}),t.ctxReviewPanelVisible=new u.RawContextKey("reviewPanelVisible",!1),t.ID="editor.contrib.review";var w=function(){function e(e,t){this.afterLineNumber=e,this.callback=t,this.domNode=n.$(".review-viewzone").getHTMLElement()}return e.prototype.onDomNodeTop=function(e){this.callback(e)},e}();t.ReviewViewZone=w;var I=function(){function e(e,n,i,r,o,s,a,c,l){var u=this;this.themeService=i,this.commentService=r,this.notificationService=o,this.instantiationService=s,this.modeService=a,this.modelService=c,this.codeEditorService=l,this.editor=e,
this.globalToDispose=[],this.localToDispose=[],this._commentInfos=[],this._commentWidgets=[],this._newCommentWidget=null,this._newCommentGlyph=null,this._hasSetComments=!1,this._reviewPanelVisible=t.ctxReviewPanelVisible.bindTo(n),this._reviewModel=new m.ReviewModel,this._reviewModel.onDidChangeStyle(function(e){u._newCommentWidget&&(u._newCommentWidget.dispose(),u._newCommentWidget=null),u._commentWidgets.forEach(function(e){e.dispose()}),u._commentInfos.forEach(function(e){e.threads.forEach(function(t){var n=new b.ReviewZoneWidget(u.instantiationService,u.modeService,u.modelService,u.themeService,u.commentService,u.editor,e.owner,t,{});n.display(t.range.startLineNumber),u._commentWidgets.push(n)})})}),this.globalToDispose.push(this.commentService.onDidDeleteDataProvider(function(e){u._newCommentWidget&&(u._newCommentWidget.dispose(),u._newCommentWidget=null),u._newCommentGlyph&&(u.editor.removeContentWidget(u._newCommentGlyph),u._newCommentGlyph=null),u.getComments()})),
this.globalToDispose.push(this.commentService.onDidSetResourceCommentInfos(function(e){var t=u.editor&&u.editor.getModel()&&u.editor.getModel().uri;t&&t.toString()===e.resource.toString()&&u.setComments(e.commentInfos.filter(function(e){return null!==e}))})),this.globalToDispose.push(this.commentService.onDidSetDataProvider(function(e){return u.getComments()})),this.globalToDispose.push(this.editor.onDidChangeModel(function(){return u.onModelChanged()})),this.codeEditorService.registerDecorationType(b.COMMENTEDITOR_DECORATION_KEY,{})}return e.prototype.getComments=function(){var e=this,t=this.editor&&this.editor.getModel()&&this.editor.getModel().uri;t&&this.commentService.getComments(t).then(function(t){e.setComments(t.filter(function(e){return null!==e}))},function(e){return console.log(e)})},e.get=function(e){return e.getContribution(t.ID)},e.prototype.revealCommentThread=function(e,t){var n=this._commentWidgets.filter(function(t){return t.commentThread.threadId===e});1===n.length&&n[0].reveal(t)},
e.prototype.getId=function(){return t.ID},e.prototype.dispose=function(){this.globalToDispose=i.dispose(this.globalToDispose),this.localToDispose=i.dispose(this.localToDispose),this._commentWidgets.forEach(function(e){return e.dispose()}),this._newCommentWidget&&(this._newCommentWidget.dispose(),this._newCommentWidget=null),this.editor=null},e.prototype.onModelChanged=function(){var e=this;this.localToDispose=i.dispose(this.localToDispose),this._newCommentWidget&&(this._newCommentWidget.dispose(),this._newCommentWidget=null),this._newCommentGlyph&&(this.editor.removeContentWidget(this._newCommentGlyph),this._newCommentGlyph=null),this._commentWidgets.forEach(function(e){e.dispose()}),this._commentWidgets=[],this.localToDispose.push(this.editor.onMouseMove(function(t){return e.onEditorMouseMove(t)})),this.localToDispose.push(this.editor.onDidChangeModelContent(function(){e._newCommentGlyph&&(e.editor.removeContentWidget(e._newCommentGlyph),e._newCommentGlyph=null)})),
this.localToDispose.push(this.commentService.onDidUpdateCommentThreads(function(t){var n=e.editor&&e.editor.getModel()&&e.editor.getModel().uri;if(n){var i=t.added.filter(function(e){return e.resource.toString()===n.toString()}),r=t.removed.filter(function(e){return e.resource.toString()===n.toString()}),o=t.changed.filter(function(e){return e.resource.toString()===n.toString()});r.forEach(function(n){var i=e._commentWidgets.filter(function(e){return e.owner===t.owner&&e.commentThread.threadId===n.threadId});if(i.length){var r=i[0],o=e._commentWidgets.indexOf(r);e._commentWidgets.splice(o,1)}}),o.forEach(function(n){var i=e._commentWidgets.filter(function(e){return e.owner===t.owner&&e.commentThread.threadId===n.threadId});if(i.length){i[0].update(n)}}),i.forEach(function(n){var i=new b.ReviewZoneWidget(e.instantiationService,e.modeService,e.modelService,e.themeService,e.commentService,e.editor,t.owner,n,{});i.display(n.range.startLineNumber),e._commentWidgets.push(i),e._commentInfos.filter(function(e){
return e.owner===t.owner})[0].threads.push(n)})}}))},e.prototype.addComment=function(e){var t=this,n=this.getNewCommentAction(e);if(n){this._reviewPanelVisible.set(!0);var i=n.replyCommand,r=n.ownerId;this._newCommentWidget=new b.ReviewZoneWidget(this.instantiationService,this.modeService,this.modelService,this.themeService,this.commentService,this.editor,r,{threadId:null,resource:null,comments:[],range:{startLineNumber:e,startColumn:0,endLineNumber:e,endColumn:0},reply:i,collapsibleState:v.CommentThreadCollapsibleState.Expanded},{}),this._newCommentWidget.onDidClose(function(e){t._newCommentWidget=null}),this._newCommentWidget.display(e)}},e.prototype.onEditorMouseMove=function(e){var t=this;if(this._hasSetComments){if(this._commentInfos.length&&this._commentInfos.some(function(e){return!!e.commentingRanges.length})&&e.target.position&&void 0!==e.target.position.lineNumber){this._newCommentGlyph&&"comment-hint"!==e.target.element.className&&this.editor.removeContentWidget(this._newCommentGlyph)
;var n=e.target.position.lineNumber;this.isExistingCommentThreadAtLine(n)||(this._newCommentGlyph=this.isLineInCommentingRange(n)?this._newCommentGlyph=new y.CommentGlyphWidget("comment-hint",this.editor,n,!1,function(){t.addComment(n)}):this._newCommentGlyph=new y.CommentGlyphWidget("comment-hint",this.editor,n,!0,function(){t.notificationService.warn("Commenting is not supported outside of diff hunk areas.")}),this.editor.layoutContentWidget(this._newCommentGlyph))}}},e.prototype.getNewCommentAction=function(e){for(var t=0;t<this._commentInfos.length;t++){var n=this._commentInfos[t];if(n.commentingRanges.some(function(t){return t.startLineNumber<=e&&e<=t.endLineNumber}))return{replyCommand:n.reply,ownerId:n.owner}}return null},e.prototype.isLineInCommentingRange=function(e){return this._commentInfos.some(function(t){return t.commentingRanges.some(function(t){return t.startLineNumber<=e&&e<=t.endLineNumber})})},e.prototype.isExistingCommentThreadAtLine=function(e){var t=this._commentInfos.some(function(t){
return t.threads.some(function(t){return t.range.startLineNumber===e})}),n=this._newCommentWidget&&this._newCommentWidget.position&&this._newCommentWidget.position.lineNumber===e;return t||n},e.prototype.setComments=function(e){var t=this;this._commentInfos=e,this._hasSetComments=!0,this._commentWidgets.forEach(function(e){e.dispose()}),this._commentInfos.forEach(function(e){e.threads.forEach(function(n){var i=new b.ReviewZoneWidget(t.instantiationService,t.modeService,t.modelService,t.themeService,t.commentService,t.editor,e.owner,n,{});i.display(n.range.startLineNumber),t._commentWidgets.push(i)})})},e.prototype.closeWidget=function(){this._reviewPanelVisible.reset(),this._newCommentWidget&&(this._newCommentWidget.dispose(),this._newCommentWidget=null),this._commentWidgets&&this._commentWidgets.forEach(function(e){return e.hide()}),this.editor.focus(),this.editor.revealRangeInCenter(this.editor.getSelection())},
e=a([l(1,u.IContextKeyService),l(2,g.IThemeService),l(3,S.ICommentService),l(4,p.INotificationService),l(5,d.IInstantiationService),l(6,C.IModeService),l(7,_.IModelService),l(8,o.ICodeEditorService)],e)}();t.ReviewController=I,r.registerEditorContribution(I),h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReviewPanel",weight:h.KeybindingsRegistry.WEIGHT.editorContrib(),primary:9,secondary:[1033],when:t.ctxReviewPanelVisible,handler:function(e,t){var n=E(e);if(n){var i=I.get(n);i&&i.closeWidget()}}}),t.getOuterEditor=E,g.registerThemingParticipant(function(e,t){var n=e.getColor(c.peekViewResultsBackground);n&&t.addRule(".monaco-editor .review-widget,.monaco-editor .review-widget {\tbackground-color: "+n+";}");var i=e.getColor(c.peekViewEditorBackground);i&&t.addRule(".monaco-editor .review-widget .body .comment-form .review-thread-reply-button {\tbackground-color: "+i+"}");var r=e.getColor(f.editorForeground)
;r&&t.addRule(".monaco-editor .review-widget .body .monaco-editor {\tcolor: "+r+"}.monaco-editor .review-widget .body .comment-form .review-thread-reply-button {\tcolor: "+r+"}");var o=e.getColor(c.peekViewResultsSelectionBackground);o&&t.addRule("@keyframes monaco-review-widget-focus {\t0% { background: "+o+"; }\t100% { background: transparent; }}.monaco-editor .review-widget .body .review-comment.focus {\tanimation: monaco-review-widget-focus 3s ease 0s;}")})}),define(e[468],t([1,0,309,312,339,284,160,334]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(){}return e.getCodeEditorWidgetOptions=function(){return{isSimpleWidget:!0,contributions:[n.MenuPreventer,i.SelectionClipboard,r.ContextMenuController,o.SuggestController,s.SnippetController2,a.TabCompletionController]}},e.getEditorOptions=function(){return{wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,
selectionHighlight:!1,scrollbar:{horizontal:"hidden"},lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1}}},e}();t.SimpleDebugEditor=c}),define(e[1344],t([1,0,1082,9,279,5,8,39,221,35,79,68,12,468,6,15,32,55,47,10,44,18,168,4,71,26,137,157,875]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var L=c.$,R=m.createDecorator("privateBreakopintWidgetService"),O="breakpointwidgetdecoration",M=function(e){function t(t,n,i,r,o,s,a,c,l,u){var d=e.call(this,t,{showFrame:!0,showArrow:!1,frameWidth:1})||this;d.lineNumber=n,d.context=i,d.contextViewService=r,d.debugService=o,d.themeService=s,d.contextKeyService=a,d.instantiationService=c,d.modelService=l,d.codeEditorService=u,d.conditionInput="",d.hitCountInput="",d.logMessageInput="",d.toDispose=[];var h=d.editor.getModel().uri,f=d.debugService.getModel().getBreakpoints({
lineNumber:d.lineNumber,uri:h});return d.breakpoint=f.length?f[0]:void 0,void 0===d.context&&(d.breakpoint&&!d.breakpoint.condition&&!d.breakpoint.hitCondition&&d.breakpoint.logMessage?d.context=p.BreakpointWidgetContext.LOG_MESSAGE:d.breakpoint&&!d.breakpoint.condition&&d.breakpoint.hitCondition?d.context=p.BreakpointWidgetContext.HIT_COUNT:d.context=p.BreakpointWidgetContext.CONDITION),d.toDispose.push(d.debugService.getModel().onDidChangeBreakpoints(function(e){d.breakpoint&&e&&e.removed&&e.removed.indexOf(d.breakpoint)>=0&&d.dispose()})),d.codeEditorService.registerDecorationType(O,{}),d.create(),d}return n(t,e),Object.defineProperty(t.prototype,"placeholder",{get:function(){switch(this.context){case p.BreakpointWidgetContext.LOG_MESSAGE:return i.localize(0,null);case p.BreakpointWidgetContext.HIT_COUNT:return i.localize(1,null);default:return i.localize(2,null)}},enumerable:!0,configurable:!0}),t.prototype.getInputValue=function(e){switch(this.context){case p.BreakpointWidgetContext.LOG_MESSAGE:
return e&&e.logMessage?e.logMessage:this.logMessageInput;case p.BreakpointWidgetContext.HIT_COUNT:return e&&e.hitCondition?e.hitCondition:this.hitCountInput;default:return e&&e.condition?e.condition:this.conditionInput}},t.prototype.rememberInput=function(){var e=this.input.getModel().getValue();switch(this.context){case p.BreakpointWidgetContext.LOG_MESSAGE:this.logMessageInput=e;break;case p.BreakpointWidgetContext.HIT_COUNT:this.hitCountInput=e;break;default:this.conditionInput=e}},t.prototype._fillContainer=function(e){var t=this;this.setCssClass("breakpoint-widget");var n=new o.SelectBox([i.localize(3,null),i.localize(4,null),i.localize(5,null)],this.context,this.contextViewService);this.toDispose.push(f.attachSelectBoxStyler(n,this.themeService)),this.selectContainer=L(".breakpoint-select-container"),n.render(c.append(e,this.selectContainer)),n.onDidSelect(function(e){t.rememberInput(),t.context=e.index;var n=t.getInputValue(t.breakpoint);t.input.getModel().setValue(n)}),
this.createBreakpointInput(c.append(e,L(".inputContainer"))),this.input.getModel().setValue(this.getInputValue(this.breakpoint)),this.input.setPosition({lineNumber:1,column:this.input.getModel().getLineMaxColumn(1)}),setTimeout(function(){return t.input.focus()},100)},t.prototype.close=function(e){var t;if(e){var n=this.breakpoint&&this.breakpoint.condition,i=this.breakpoint&&this.breakpoint.hitCondition,o=this.breakpoint&&this.breakpoint.logMessage;this.rememberInput(),(this.conditionInput||this.context===p.BreakpointWidgetContext.CONDITION)&&(n=this.conditionInput),(this.hitCountInput||this.context===p.BreakpointWidgetContext.HIT_COUNT)&&(i=this.hitCountInput),(this.logMessageInput||this.context===p.BreakpointWidgetContext.LOG_MESSAGE)&&(o=this.logMessageInput),this.breakpoint?this.debugService.updateBreakpoints(this.breakpoint.uri,(t={},t[this.breakpoint.getId()]={condition:n,hitCondition:i,logMessage:o},t),!1):this.debugService.addBreakpoints(this.editor.getModel().uri,[{lineNumber:this.lineNumber,
enabled:!0,condition:n,hitCondition:i,logMessage:o}]).done(null,r.onUnexpectedError)}this.dispose()},t.prototype._doLayout=function(e,t){this.input.layout({height:18,width:t-113})},t.prototype.createBreakpointInput=function(e){var t=this,n=this.contextKeyService.createScoped(e);this.toDispose.push(n);var i=this.instantiationService.createChild(new D.ServiceCollection([y.IContextKeyService,n],[R,this])),r=v.SimpleDebugEditor.getEditorOptions(),o=v.SimpleDebugEditor.getCodeEditorWidgetOptions();this.input=i.createInstance(A.CodeEditorWidget,e,r,o),p.CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(n).set(!0);var s=this.modelService.createModel("",null,C.default.parse(p.DEBUG_SCHEME+":breakpointinput"),!0);this.input.setModel(s),this.toDispose.push(s);var a=function(){var e=t.input.getModel().getValue()?[]:t.createDecorations();t.input.setDecorations(O,e)};this.input.getModel().onDidChangeContent(function(){return a()}),this.themeService.onThemeChange(function(){return a()}),this.toDispose.push(E.SuggestRegistry.register({
scheme:p.DEBUG_SCHEME,hasAccessToAllModels:!0},{provideCompletionItems:function(e,n,i,r){var o;return o=t.context===p.BreakpointWidgetContext.CONDITION||t.context===p.BreakpointWidgetContext.LOG_MESSAGE&&t.isCurlyBracketOpen()?I.provideSuggestionItems(t.editor.getModel(),new u.Position(t.lineNumber,1),"none",void 0,i).then(function(e){var i=0;if(t.context===p.BreakpointWidgetContext.CONDITION)i=n.column-1;else for(var r=t.input.getModel().getValue();n.column-2-i>=0&&"{"!==r[n.column-2-i]&&" "!==r[n.column-2-i];)i++;return{suggestions:e.map(function(e){return e.suggestion.overwriteAfter=0,e.suggestion.overwriteBefore=i,e.suggestion})}}):T.TPromise.as({suggestions:[]}),w.wireCancellationToken(r,o)}}))},t.prototype.createDecorations=function(){return[{range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:this.placeholder,color:k.transparent(k.editorForeground,.4)(this.themeService.getTheme()).toString()}}}]},t.prototype.isCurlyBracketOpen=function(){
for(var e=this.input.getModel().getValue(),t=this.input.getPosition().column-2;t>=0;t--){if("{"===e[t])return!0;if("}"===e[t])return!1}return!1},t.prototype.dispose=function(){var t=this;e.prototype.dispose.call(this),this.input.dispose(),s.dispose(this.toDispose),setTimeout(function(){return t.editor.focus()},0)},t=a([l(3,h.IContextViewService),l(4,p.IDebugService),l(5,g.IThemeService),l(6,y.IContextKeyService),l(7,m.IInstantiationService),l(8,_.IModelService),l(9,x.ICodeEditorService)],t)}(d.ZoneWidget);t.BreakpointWidget=M;var P=function(e){function t(){return e.call(this,{id:"breakpointWidget.action.acceptInput",precondition:p.CONTEXT_BREAKPOINT_WIDGET_VISIBLE,kbOpts:{kbExpr:p.CONTEXT_IN_BREAKPOINT_WIDGET,primary:3}})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t){e.get(R).close(!0)},t}(b.EditorCommand),N=function(e){function t(){return e.call(this,{id:"closeBreakpointWidget",precondition:p.CONTEXT_BREAKPOINT_WIDGET_VISIBLE,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:9,
secondary:[1033]}})||this}return n(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t.getContribution(p.EDITOR_CONTRIBUTION_ID);if(i)return i.closeBreakpointWidget();e.get(R).close(!1)},t}(b.EditorCommand);b.registerEditorCommand(new P),b.registerEditorCommand(new N)}),define(e[1345],t([1,0,22,180,5,4,23,7]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(){this.toDispose=[];var e=new i.NotificationsModel;this.toDispose.push(e),this._model=e}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},enumerable:!0,configurable:!0}),e.prototype.info=function(e){var t=this;Array.isArray(e)?e.forEach(function(e){return t.info(e)}):this.model.notify({severity:n.Severity.Info,message:e})},e.prototype.warn=function(e){var t=this;Array.isArray(e)?e.forEach(function(e){return t.warn(e)}):this.model.notify({severity:n.Severity.Warning,message:e})},e.prototype.error=function(e){var t=this
;Array.isArray(e)?e.forEach(function(e){return t.error(e)}):this.model.notify({severity:n.Severity.Error,message:e})},e.prototype.notify=function(e){return this.model.notify(e)},e.prototype.prompt=function(e,t,n,i){var c,l=!1,u={primary:[],secondary:[]};return n.forEach(function(e,t){var n=new s.Action("workbench.dialog.choice."+t,e.label,null,!0,function(){return l=!0,e.run(),e.keepOpen||c.close(),o.TPromise.as(void 0)});e.isSecondary?u.secondary.push(n):u.primary.push(n)}),c=this.notify({severity:e,message:t,actions:u}),a.once(c.onDidClose)(function(){r.dispose.apply(void 0,u.primary.concat(u.secondary)),l||"function"!=typeof i||i()}),c},e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose)},e}();t.NotificationService=c}),define(e[81],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPanelService=n.createDecorator("panelService")}),
define(e[1347],t([1,0,673,25,14,166,144,4,7,10,5,6,34,16,40,125,81,47,27,1139,72,54,18,105,39,33,161,36,1593,397,42,77,20,43,38,15,145]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var z="output.activechannel",H=!1,K=[],U=new Map,G=function(e){function t(t,n,i,r,o,s){var a=e.call(this)||this;return a.outputChannelIdentifier=t,a.modelUri=n,a.mimeType=i,a.fileService=r,a.modelService=o,a.modeService=s,a.scrollLock=!1,a._onDidAppendedContent=new h.Emitter,a.onDidAppendedContent=a._onDidAppendedContent.event,a._onDispose=new h.Emitter,a.onDispose=a._onDispose.event,a.startOffset=0,a.endOffset=0,a.file=a.outputChannelIdentifier.file,a.modelUpdater=new T.RunOnceScheduler(function(){return a.updateModel()},300),a._register(f.toDisposable(function(){return a.modelUpdater.cancel()})),a}return n(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.outputChannelIdentifier.id},enumerable:!0,
configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this.outputChannelIdentifier.label},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.modelUpdater.isScheduled()&&this.modelUpdater.cancel(),this.model&&this.model.setValue(""),this.startOffset=this.endOffset},t.prototype.createModel=function(e){var t=this;if(this.model)this.model.setValue(e);else{this.model=this.modelService.createModel(e,this.modeService.getOrCreateMode(this.mimeType),this.modelUri),this.onModelCreated(this.model);var n=[];n.push(this.model.onWillDispose(function(){t.onModelWillDispose(t.model),t.model=null,f.dispose(n)}))}return this.model},t.prototype.appendToModel=function(e){if(this.model&&e){var t=this.model.getLineCount(),n=this.model.getLineMaxColumn(t);this.model.applyEdits([x.EditOperation.insert(new k.Position(t,n),e)]),this._onDidAppendedContent.fire()}},t.prototype.onModelCreated=function(e){},t.prototype.onModelWillDispose=function(e){},t.prototype.updateModel=function(){},
t.prototype.dispose=function(){this._onDispose.fire(),e.prototype.dispose.call(this)},t}(f.Disposable),j=function(e){function t(t,n,i,o,a,l,u){var d=e.call(this,c({},t,{file:p.default.file(r.join(n,t.id+".log"))}),i,b.OUTPUT_MIME,o,a,l)||this;return d.appendedMessage="",d.loadingFromFileInProgress=!1,d.outputWriter=new R.RotatingLogger(d.id,d.file.fsPath,31457280,1),d.outputWriter.clearFormatters(),d.rotatingFilePath=t.id+".1.log",d._register(function(e,t,n){if(K.push(n),!H){var i=s.watch(e,function(e,t){for(var n=0,i=K;n<i.length;n++)(0,i[n])(e,t)},function(e){t.error(e)});return H=!0,f.toDisposable(function(){K=[],i&&(i.removeAllListeners(),i.close())})}return f.toDisposable(function(){})}(r.dirname(d.file.fsPath),u,function(e,t){return d.onFileChangedInOutputDirector(e,t)})),d.resettingDelayer=new T.ThrottledDelayer(50),d}return n(t,e),t.prototype.append=function(e){this.endOffset=this.endOffset+Buffer.from(e).byteLength,this.loadingFromFileInProgress?this.appendedMessage+=e:(this.write(e),
this.model&&(this.appendedMessage+=e,this.modelUpdater.isScheduled()||this.modelUpdater.schedule()))},t.prototype.clear=function(){e.prototype.clear.call(this),this.appendedMessage=""},t.prototype.loadModel=function(){var e=this;return this.loadingFromFileInProgress=!0,this.modelUpdater.isScheduled()&&this.modelUpdater.cancel(),this.appendedMessage="",this.loadFile().then(function(t){return e.endOffset!==e.startOffset+Buffer.from(t).byteLength?(e.flush(),e.loadFile()):t}).then(function(t){return e.appendedMessage&&(e.write(e.appendedMessage),e.appendedMessage=""),e.loadingFromFileInProgress=!1,e.createModel(t)})},t.prototype.resetModel=function(){return this.startOffset=0,this.endOffset=0,this.model?this.loadModel():d.TPromise.as(null)},t.prototype.loadFile=function(){var e=this;return this.fileService.resolveContent(this.file,{position:this.startOffset}).then(function(t){return e.appendedMessage?t.value+e.appendedMessage:t.value})},t.prototype.updateModel=function(){
this.model&&this.appendedMessage&&(this.appendToModel(this.appendedMessage),this.appendedMessage="")},t.prototype.onFileChangedInOutputDirector=function(e,t){var n=this;this.rotatingFilePath===t&&this.resettingDelayer.trigger(function(){return n.resetModel()})},t.prototype.write=function(e){this.outputWriter.critical(e)},t.prototype.flush=function(){this.outputWriter.flush()},t=a([l(3,D.IFileService),l(4,_.IModelService),l(5,I.IModeService),l(6,P.ILogService)],t)}(G),q=function(e){function t(t){var n=e.call(this)||this;return n.file=t,n._onDidChange=new h.Emitter,n.onDidContentChange=n._onDidChange.event,n.watching=!1,n.disposables=[],n}return n(t,e),t.prototype.watch=function(){var e=this;this.watching||(this.disposables.push(function(e,t){var n=function(e){for(var t=0,n=U.get(e);t<n.length;t++)(0,n[t])()},i=U.get(e);return i||(i=[],U.set(e,i),u.watchFile(e,{interval:1e3},function(t,i){i&&!t||!i&&!t?n(e):i&&t&&i.mtime!==t.mtime&&n(e)})),i.push(t),f.toDisposable(function(){var n=U.get(e)
;n.splice(n.indexOf(t),1),n.length||(u.unwatchFile(e),U.delete(e))})}(this.file.fsPath,function(){return e._onDidChange.fire()})),this.watching=!0)},t.prototype.unwatch=function(){this.watching&&(this.disposables=f.dispose(this.disposables),this.watching=!1)},t.prototype.dispose=function(){this.unwatch(),e.prototype.dispose.call(this)},t}(f.Disposable),$=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,b.LOG_MIME,i,r,o)||this;return a.updateInProgress=!1,a.fileHandler=a._register(new q(a.file)),a._register(a.fileHandler.onDidContentChange(function(){return a.onDidContentChange()})),a._register(f.toDisposable(function(){return a.fileHandler.unwatch()})),a}return n(t,e),t.prototype.loadModel=function(){var e=this;return this.fileService.resolveContent(this.file,{position:this.startOffset}).then(function(t){return e.endOffset=e.startOffset+Buffer.from(t.value).byteLength,e.createModel(t.value)})},t.prototype.append=function(e){throw new Error("Not supported")},t.prototype.updateModel=function(){
var e=this;this.model?this.fileService.resolveContent(this.file,{position:this.endOffset}).then(function(t){t.value&&(e.endOffset=e.endOffset+Buffer.from(t.value).byteLength,e.appendToModel(t.value)),e.updateInProgress=!1},function(){return e.updateInProgress=!1}):this.updateInProgress=!1},t.prototype.onModelCreated=function(e){this.fileHandler.watch()},t.prototype.onModelWillDispose=function(e){this.fileHandler.unwatch()},t.prototype.onDidContentChange=function(){this.updateInProgress||(this.updateInProgress=!0,this.modelUpdater.schedule())},t=a([l(2,D.IFileService),l(3,_.IModelService),l(4,I.IModeService),l(5,P.ILogService)],t)}(G),Y=function(e){function t(t,n,i,o,s,a,c,l,d,p){var g=e.call(this)||this;g.storageService=t,g.instantiationService=n,g.panelService=i,g.logService=l,g.lifecycleService=d,g.contextKeyService=p,g.channels=new Map,g._onActiveOutputChannel=new h.Emitter,g.onActiveOutputChannel=g._onActiveOutputChannel.event,
g.activeChannelIdInStorage=g.storageService.get(z,v.StorageScope.WORKSPACE,null),g.outputDir=r.join(a.logsPath,"output_"+c.getCurrentWindowId()+"_"+O.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"")),s.registerTextModelContentProvider(b.OUTPUT_SCHEME,g),n.createInstance(E.OutputLinkProvider);for(var y=m.Registry.as(b.Extensions.OutputChannels),S=0,_=y.getChannels();S<_.length;S++){var C=_[S];g.onDidRegisterChannel(C.id)}if(g._register(y.onDidRegisterChannel(g.onDidRegisterChannel,g)),i.onDidPanelOpen(g.onDidPanelOpen,g),i.onDidPanelClose(g.onDidPanelClose,g),g._register(f.toDisposable(function(){return U.forEach(function(e,t){return u.unwatchFile(t)}),void U.clear()})),!g.activeChannel){var w=g.getChannels();g.activeChannel=w&&w.length>0?g.getChannel(w[0].id):null}return g.lifecycleService.onShutdown(function(){return g.onShutdown()}),g}return n(t,e),t.prototype.provideTextContent=function(e){var t=this.getChannel(e.path);return t?t.loadModel():d.TPromise.as(null)},t.prototype.showChannel=function(e,t){
var n=this,i=this.getChannel(e);if(!i||this.isChannelShown(i))return d.TPromise.as(null);this.activeChannel=i;var r=d.TPromise.as(null);return this.isPanelShown()?this.doShowChannel(i,t):r=this.panelService.openPanel(b.OUTPUT_PANEL_ID),r.then(function(){return n._onActiveOutputChannel.fire(e)})},t.prototype.getChannel=function(e){return this.channels.get(e)},t.prototype.getChannels=function(){return m.Registry.as(b.Extensions.OutputChannels).getChannels()},t.prototype.getActiveChannel=function(){return this.activeChannel},t.prototype.onDidRegisterChannel=function(e){var t=this,n=this.createChannel(e);this.channels.set(e,n),this.activeChannelIdInStorage===e&&(this.activeChannel=n,this.onDidPanelOpen(this.panelService.getActivePanel()).then(function(){return t._onActiveOutputChannel.fire(e)}))},t.prototype.onDidPanelOpen=function(e){return e&&e.getId()===b.OUTPUT_PANEL_ID&&(this._outputPanel=this.panelService.getActivePanel(),this.activeChannel)?this.doShowChannel(this.activeChannel,!0):d.TPromise.as(null)},
t.prototype.onDidPanelClose=function(e){this._outputPanel&&e.getId()===b.OUTPUT_PANEL_ID&&(b.CONTEXT_ACTIVE_LOG_OUTPUT.bindTo(this.contextKeyService).set(!1),this._outputPanel.clearInput())},t.prototype.setPrimaryCursorToLastLine=function(){var e=this._outputPanel.getControl(),t=e.getModel();if(t){var n=t.getLineCount();e.setPosition({lineNumber:n,column:t.getLineMaxColumn(n)})}},t.prototype.createChannel=function(e){var t=this,n=[],i=this.instantiateChannel(e);return i.onDidAppendedContent(function(){if(!i.scrollLock){var e=t.panelService.getActivePanel();if(e&&e.getId()===b.OUTPUT_PANEL_ID&&t.isChannelShown(i)){e.revealLastLine(!0)}}},n),i.onDispose(function(){if(m.Registry.as(b.Extensions.OutputChannels).removeChannel(e),t.activeChannel===i){var r=t.getChannels();t.isPanelShown()&&r.length?(t.doShowChannel(t.getChannel(r[0].id),!0),t._onActiveOutputChannel.fire(r[0].id)):t._onActiveOutputChannel.fire(void 0)}f.dispose(n)},n),i},t.prototype.instantiateChannel=function(e){
var t=m.Registry.as(b.Extensions.OutputChannels).getChannel(e);if(!t)throw this.logService.error("Channel '"+e+"' is not registered yet"),new Error("Channel '"+e+"' is not registered yet");var n=p.default.from({scheme:b.OUTPUT_SCHEME,path:e});if(t&&t.file)return this.instantiationService.createInstance($,t,n);try{return this.instantiationService.createInstance(j,{id:e,label:t?t.label:""},this.outputDir,n)}catch(n){return this.logService.error(n),this.instantiationService.createInstance(Q,{id:e,label:t?t.label:""})}},t.prototype.doShowChannel=function(e,t){var n=this;return this._outputPanel?(b.CONTEXT_ACTIVE_LOG_OUTPUT.bindTo(this.contextKeyService).set(e instanceof $),this._outputPanel.setInput(this.createInput(e),y.EditorOptions.create({preserveFocus:t}),V.CancellationToken.None).then(function(){t||n._outputPanel.focus()}).then(function(){return n.setPrimaryCursorToLastLine()})):d.TPromise.as(null)},t.prototype.isChannelShown=function(e){return this.isPanelShown()&&this.activeChannel===e},
t.prototype.isPanelShown=function(){var e=this.panelService.getActivePanel();return e&&e.getId()===b.OUTPUT_PANEL_ID},t.prototype.createInput=function(e){var t=p.default.from({scheme:b.OUTPUT_SCHEME,path:e.id});return this.instantiationService.createInstance(A.ResourceEditorInput,i.localize(0,null,e.label),i.localize(1,null,e.label),t)},t.prototype.onShutdown=function(){this.activeChannel&&this.storageService.store(z,this.activeChannel.id,v.StorageScope.WORKSPACE),this.dispose()},t=a([l(0,v.IStorageService),l(1,g.IInstantiationService),l(2,S.IPanelService),l(3,C.IWorkspaceContextService),l(4,w.ITextModelService),l(5,L.IEnvironmentService),l(6,M.IWindowService),l(7,P.ILogService),l(8,W.ILifecycleService),l(9,B.IContextKeyService)],t)}(f.Disposable);t.OutputService=Y;var X=function(){function e(e){this.instantiationService=e,this.channels=new Map}return e.prototype.provideTextContent=function(e){if(e.scheme===b.LOG_SCHEME){var t=this.getChannel(e);if(t)return t.loadModel()}return d.TPromise.as(null)},
e.prototype.getChannel=function(e){var t=e.path,n=this.channels.get(t);if(!n){var i=[];(n=this.instantiationService.createInstance($,{id:t,label:"",file:e.with({scheme:F.Schemas.file})},e)).onDispose(function(){return f.dispose(i)},i),this.channels.set(t,n)}return n},e=a([l(0,g.IInstantiationService)],e)}();t.LogContentProvider=X;var Q=function(e){function t(t,n,i){var r=e.call(this)||this;return r.outputChannelIdentifier=t,r.modelService=n,r.modeService=i,r.file=null,r.scrollLock=!1,r._onDidAppendedContent=new h.Emitter,r.onDidAppendedContent=r._onDidAppendedContent.event,r._onDispose=new h.Emitter,r.onDispose=r._onDispose.event,r.lastReadId=void 0,r.id=t.id,r.label=t.label,r.modelUpdater=new T.RunOnceScheduler(function(){return r.updateModel()},300),r._register(f.toDisposable(function(){return r.modelUpdater.cancel()})),r.bufferredContent=new Z,r._register(f.toDisposable(function(){return r.bufferredContent.clear()})),r}return n(t,e),t.prototype.append=function(e){this.bufferredContent.append(e),
this.modelUpdater.isScheduled()||this.modelUpdater.schedule()},t.prototype.clear=function(){this.modelUpdater.isScheduled()&&this.modelUpdater.cancel(),this.model&&this.model.setValue(""),this.bufferredContent.clear(),this.lastReadId=void 0},t.prototype.loadModel=function(){var e=this.bufferredContent.getDelta(this.lastReadId),t=e.value,n=e.id;return this.model?this.model.setValue(t):this.model=this.createModel(t),this.lastReadId=n,d.TPromise.as(this.model)},t.prototype.createModel=function(e){var t=this,n=this.modelService.createModel(e,this.modeService.getOrCreateMode(b.OUTPUT_MIME),p.default.from({scheme:b.OUTPUT_SCHEME,path:this.id})),i=[];return i.push(n.onWillDispose(function(){t.model=null,f.dispose(i)})),n},t.prototype.updateModel=function(){if(this.model){var e=this.bufferredContent.getDelta(this.lastReadId),t=e.value,n=e.id;this.lastReadId=n;var i=this.model.getLineCount(),r=this.model.getLineMaxColumn(i);this.model.applyEdits([x.EditOperation.insert(new k.Position(i,r),t)]),
this._onDidAppendedContent.fire()}},t.prototype.dispose=function(){this._onDispose.fire(),e.prototype.dispose.call(this)},t=a([l(1,_.IModelService),l(2,I.IModeService)],t)}(f.Disposable),Z=function(){function e(){this.data=[],this.dataIds=[],this.idPool=0,this.length=0}return e.prototype.append=function(e){this.data.push(e),this.dataIds.push(++this.idPool),this.length+=e.length,this.trim()},e.prototype.clear=function(){this.data.length=0,this.dataIds.length=0,this.length=0},e.prototype.trim=function(){if(!(this.length<1.2*b.MAX_OUTPUT_LENGTH))for(;this.length>b.MAX_OUTPUT_LENGTH;){this.dataIds.shift();var e=this.data.shift();this.length-=e.length}},e.prototype.getDelta=function(e){var t=-1;void 0!==e&&(t=N.binarySearch(this.dataIds,e,function(e,t){return e-t}));var n=this.idPool;if(t>=0){return{value:i=o.removeAnsiEscapeCodes(this.data.slice(t+1).join("")),id:n}}var i=o.removeAnsiEscapeCodes(this.data.join(""));return{value:i,id:n}},e}()}),
define(e[1349],t([1,0,5,735,11,8,25,7,1179,15,37,81,94,6,84,260,1233,1168,12,26,4,135,358,69,17,22,77,1175,1322,34]),function(e,t,n,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var M,P=function(){function t(e,n,i,r,o,s,a,c,l,u,h,p,f,g){var m=this;this._terminalFocusContextKey=e,this._configHelper=n,this._container=i,this._shellLaunchConfig=r,this._contextKeyService=o,this._keybindingService=s,this._notificationService=a,this._panelService=c,this._instantiationService=l,this._clipboardService=u,this._themeService=h,this._configurationService=p,this._logService=f,this._storageService=g,this._onExit=new d.Emitter,this._onDisposed=new d.Emitter,this._onFocused=new d.Emitter,this._onProcessIdReady=new d.Emitter,this._onTitleChanged=new d.Emitter,this._onData=new d.Emitter,this._onLineData=new d.Emitter,this._onRendererInput=new d.Emitter,this._onRequestExtHostProcess=new d.Emitter,this._onDimensionsChanged=new d.Emitter,
this._onFocus=new d.Emitter,this._disposables=[],this._skipTerminalCommands=[],this._isExiting=!1,this._hadFocusOnExit=!1,this._isVisible=!1,this._isDisposed=!1,this._id=t._idCounter++,this._terminalHasTextContextKey=v.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.bindTo(this._contextKeyService),this.disableLayout=!1,this._logService.trace("terminalInstance#ctor (id: "+this.id+")",this._shellLaunchConfig),this._initDimensions(),this.shellLaunchConfig.isRendererOnly?this.setTitle(this._shellLaunchConfig.name,!1):this._createProcess(),this._xtermReadyPromise=this._createXterm(),this._xtermReadyPromise.then(function(){i&&m._attachToElement(i)}),this.addDisposable(this._configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("terminal.integrated")&&m.updateConfig(),e.affectsConfiguration("editor.accessibilitySupport")&&m.updateAccessibilitySupport()}))}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"processId",{get:function(){return this._processManager?this._processManager.shellProcessId:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"processReady",{get:function(){return this._processManager?this._processManager.ptyProcessReady:w.TPromise.as(void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hadFocusOnExit",{get:function(){return this._hadFocusOnExit},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTitleSetByProcess",{get:function(){return!!this._messageTitleDisposable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shellLaunchConfig",{get:function(){
return this._shellLaunchConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"commandTracker",{get:function(){return this._commandTracker},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onExit",{get:function(){return this._onExit.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDisposed",{get:function(){return this._onDisposed.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onFocused",{get:function(){return this._onFocused.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onProcessIdReady",{get:function(){return this._onProcessIdReady.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChanged",{get:function(){return this._onTitleChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onLineData",{get:function(){
return this._onLineData.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRendererInput",{get:function(){return this._onRendererInput.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRequestExtHostProcess",{get:function(){return this._onRequestExtHostProcess.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDimensionsChanged",{get:function(){return this._onDimensionsChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!0,configurable:!0}),t.prototype.addDisposable=function(e){this._disposables.push(e)},t.prototype._initDimensions=function(){if(this._container){var e=window.getComputedStyle(this._container.parentElement),t=parseInt(e.getPropertyValue("width").replace("px",""),10),n=parseInt(e.getPropertyValue("height").replace("px",""),10);this._evaluateColsAndRows(t,n)}},t.prototype._evaluateColsAndRows=function(e,t){if(!e||!t)return null
;var n=this._getDimension(e,t);if(!n)return null;var i=this._configHelper.getFont(this._xterm),r=n.width*window.devicePixelRatio,o=Math.floor(i.charWidth*window.devicePixelRatio)+i.letterSpacing;this._cols=Math.max(Math.floor(r/o),1);var s=n.height*window.devicePixelRatio,a=Math.ceil(i.charHeight*window.devicePixelRatio),c=Math.floor(a*i.lineHeight);return this._rows=Math.max(Math.floor(s/c),1),n.width},t.prototype._getDimension=function(e,n){var i=this._configHelper.getFont(this._xterm);if(!i||!i.charWidth||!i.charHeight)return null;if(!this._isVisible)return t._lastKnownDimensions;if(this._xterm&&this._xterm.emit("scroll",this._xterm._core.buffer.ydisp),!this._wrapperElement)return null;var r=getComputedStyle(this._wrapperElement),o=e-parseInt(r.marginLeft.split("px")[0],10)-parseInt(r.marginRight.split("px")[0],10),s=n-parseInt(r.bottom.split("px")[0],10);return t._lastKnownDimensions=new c.Dimension(o,s),t._lastKnownDimensions},t.prototype._createXterm=function(){
return o(this,void 0,w.TPromise,function(){var t,n,o,a=this;return s(this,function(s){switch(s.label){case 0:return M?[3,2]:[4,new Promise(function(t,n){e(["vscode-xterm"],t,n)})];case 1:(M=s.sent().Terminal).applyAddon(e.__$__nodeRequire("vscode-xterm/lib/addons/search/search")),M.applyAddon(e.__$__nodeRequire("vscode-xterm/lib/addons/webLinks/webLinks")),M.applyAddon(e.__$__nodeRequire("vscode-xterm/lib/addons/winptyCompat/winptyCompat")),M.strings.blankLine=i.localize(0,null),M.strings.promptLabel=i.localize(1,null),M.strings.tooMuchOutput=i.localize(2,null),s.label=2;case 2:return t=this._configurationService.getValue("editor").accessibilitySupport,n=this._configHelper.getFont(void 0,!0),o=this._configHelper.config,this._xterm=new M({scrollback:o.scrollback,theme:this._getXtermTheme(),drawBoldTextInBrightColors:o.drawBoldTextInBrightColors,fontFamily:n.fontFamily,fontWeight:o.fontWeight,fontWeightBold:o.fontWeightBold,fontSize:n.fontSize,letterSpacing:n.letterSpacing,lineHeight:n.lineHeight,
bellStyle:o.enableBell?"sound":"none",screenReaderMode:"on"===t,macOptionIsMeta:o.macOptionIsMeta,rightClickSelectsWord:"selectWord"===o.rightClickBehavior,rendererType:"auto"===o.rendererType?"canvas":o.rendererType,experimentalCharAtlas:o.experimentalTextureCachingStrategy}),this._shellLaunchConfig.initialText&&this._xterm.writeln(this._shellLaunchConfig.initialText),this._xterm.winptyCompatInit(),this._xterm.on("linefeed",function(){return a._onLineFeed()}),this._processManager&&(this._processManager.onProcessData(function(e){return a._onProcessData(e)}),this._xterm.on("data",function(e){return a._processManager.write(e)}),this._linkHandler=this._instantiationService.createInstance(S.TerminalLinkHandler,this._xterm,r.platform,this._processManager.initialCwd)),this._xterm.on("focus",function(){return a._onFocus.fire(a)}),this._shellLaunchConfig.isRendererOnly&&this._xterm.on("data",function(e){return a._sendRendererInput(e)}),this._commandTracker=new L.TerminalCommandTracker(this._xterm),
this._disposables.push(this._themeService.onThemeChange(function(e){return a._updateTheme(e)})),[2]}})})},t.prototype.reattachToElement=function(e){if(!this._wrapperElement)throw new Error("The terminal instance has not been attached to a container yet");this._wrapperElement.parentNode&&this._wrapperElement.parentNode.removeChild(this._wrapperElement),this._container=e,this._container.appendChild(this._wrapperElement)},t.prototype.attachToElement=function(e){this._container!==e&&(this._wrapperElement?(this._container.removeChild(this._wrapperElement),this._container=e,this._container.appendChild(this._wrapperElement)):this._attachToElement(e))},t.prototype._attachToElement=function(e){var t=this;this._xtermReadyPromise.then(function(){if(t._wrapperElement)throw new Error("The terminal instance has already been attached to a container");t._container=e,t._wrapperElement=document.createElement("div"),c.addClass(t._wrapperElement,"terminal-wrapper"),t._xtermElement=document.createElement("div"),
t._wrapperElement.xterm=t._xterm,t._xterm.open(t._xtermElement),t._xterm.attachCustomKeyEventHandler(function(e){if(t._isExiting)return!1;var n=new y.StandardKeyboardEvent(e),i=t._keybindingService.softDispatch(n,n.target);return i&&t._skipTerminalCommands.some(function(e){return e===i.commandId})?(e.preventDefault(),!1):(!b.TabFocus.getTabFocusMode()||9!==e.keyCode)&&(!(r.isWindows&&e.altKey&&"F4"===e.key&&!e.ctrlKey)&&void 0)}),t._disposables.push(c.addDisposableListener(t._xterm.element,"mousedown",function(e){var n=c.addDisposableListener(document,"mouseup",function(e){setTimeout(function(){return t._refreshSelectionContextKey()},0),n.dispose()})})),t._disposables.push(c.addDisposableListener(t._xterm.element,"keyup",function(e){setTimeout(function(){return t._refreshSelectionContextKey()},0)}));var n=t._xterm.element.querySelector(".xterm-helpers"),i=document.createElement("div");i.setAttribute("tabindex","0"),c.addClass(i,"focus-trap"),t._disposables.push(c.addDisposableListener(i,"focus",function(e){
for(var t=i;!c.hasClass(t,"part");)t=t.parentElement;t.querySelector(".hide-panel-action").focus()})),n.insertBefore(i,t._xterm.textarea),t._disposables.push(c.addDisposableListener(t._xterm.textarea,"focus",function(e){t._terminalFocusContextKey.set(!0),t._onFocused.fire(t)})),t._disposables.push(c.addDisposableListener(t._xterm.textarea,"blur",function(e){t._terminalFocusContextKey.reset(),t._refreshSelectionContextKey()})),t._disposables.push(c.addDisposableListener(t._xterm.element,"focus",function(e){t._terminalFocusContextKey.set(!0)})),t._disposables.push(c.addDisposableListener(t._xterm.element,"blur",function(e){t._terminalFocusContextKey.reset(),t._refreshSelectionContextKey()})),t._wrapperElement.appendChild(t._xtermElement),t._container.appendChild(t._wrapperElement),t._processManager&&(t._widgetManager=new _.TerminalWidgetManager(t._wrapperElement),t._linkHandler.setWidgetManager(t._widgetManager))
;var o=window.getComputedStyle(t._container),s=parseInt(o.getPropertyValue("width").replace("px",""),10),a=parseInt(o.getPropertyValue("height").replace("px",""),10);t.layout(new c.Dimension(s,a)),t.setVisible(t._isVisible),t.updateConfig(),t._xterm.getOption("disableStdin")&&t._attachPressAnyKeyToCloseListener();t._storageService.getBoolean(v.NEVER_MEASURE_RENDER_TIME_STORAGE_KEY,O.StorageScope.GLOBAL,!1)||"auto"!==t._configHelper.config.rendererType||t._measureRenderTime()})},t.prototype._measureRenderTime=function(){var e=this,t=[],n=this._xterm._core.renderer._renderLayers[0],r=n.onGridChanged;n.onGridChanged=function(o,s,a){var c=performance.now();r.call(n,o,s,a),t.push(performance.now()-c),20===t.length&&(!function(){t.shift();if(t.reduce(function(e,t){return e+t})/t.length>50){var n=[{label:i.localize(3,null),run:function(){e._configurationService.updateValue("terminal.integrated.rendererType","dom",k.ConfigurationTarget.USER).then(function(){e._notificationService.info(i.localize(4,null))})}},{
label:i.localize(5,null),run:function(){}},{label:i.localize(6,null),isSecondary:!0,run:function(){return e._storageService.store(v.NEVER_MEASURE_RENDER_TIME_STORAGE_KEY,!0)}}];e._notificationService.prompt(D.Severity.Warning,i.localize(7,null),n)}}(),n.onGridChanged=r)}},t.prototype.registerLinkMatcher=function(e,t,n,i){return this._linkHandler.registerCustomLinkHandler(e,t,n,i)},t.prototype.deregisterLinkMatcher=function(e){this._xterm.deregisterLinkMatcher(e)},t.prototype.hasSelection=function(){return this._xterm&&this._xterm.hasSelection()},t.prototype.copySelection=function(){this.hasSelection()?this._clipboardService.writeText(this._xterm.getSelection()):this._notificationService.warn(i.localize(8,null))},Object.defineProperty(t.prototype,"selection",{get:function(){return this.hasSelection()?this._xterm.getSelection():void 0},enumerable:!0,configurable:!0}),t.prototype.clearSelection=function(){this._xterm.clearSelection()},t.prototype.selectAll=function(){this._xterm.focus(),this._xterm.selectAll()},
t.prototype.findNext=function(e){return this._xterm.findNext(e)},t.prototype.findPrevious=function(e){return this._xterm.findPrevious(e)},t.prototype.notifyFindWidgetFocusChanged=function(e){var t=!e&&(document.activeElement===this._xterm.textarea||document.activeElement===this._xterm.element);this._terminalFocusContextKey.set(t)},t.prototype.dispose=function(){if(this._logService.trace("terminalInstance#dispose (id: "+this.id+")"),this._windowsShellHelper=n.dispose(this._windowsShellHelper),this._linkHandler=n.dispose(this._linkHandler),this._commandTracker=n.dispose(this._commandTracker),this._widgetManager=n.dispose(this._widgetManager),this._xterm&&this._xterm.element&&(this._hadFocusOnExit=c.hasClass(this._xterm.element,"focus")),this._wrapperElement&&(this._wrapperElement.xterm&&(this._wrapperElement.xterm=null),this._container.removeChild(this._wrapperElement),this._wrapperElement=null,this._xtermElement=null),this._xterm){var e=this._xterm._core.buffer;this._sendLineData(e,e.ybase+e.y),
this._xterm.dispose(),this._xterm=null}this._processManager=n.dispose(this._processManager),this._isDisposed||(this._isDisposed=!0,this._onDisposed.fire(this)),this._disposables=n.dispose(this._disposables)},t.prototype.focus=function(e){var t=this;this._xtermReadyPromise.then(function(){if(t._xterm){window.getSelection().toString()&&!e||t._xterm.focus()}})},t.prototype.paste=function(){this.focus(),document.execCommand("paste")},t.prototype.write=function(e){var t=this;this._xtermReadyPromise.then(function(){t._xterm&&(t._xterm.write(e),t._shellLaunchConfig.isRendererOnly&&t._onData.fire(e))})},t.prototype.sendText=function(e,n){var i=this;e=e.replace(t.EOL_REGEX,"\r"),n&&"\r"!==e.substr(e.length-1)&&(e+="\r"),this._shellLaunchConfig.isRendererOnly?this._sendRendererInput(e):this._processManager&&this._processManager.ptyProcessReady.then(function(){i._processManager.write(e)})},t.prototype.setVisible=function(e){if(this._isVisible=e,this._wrapperElement&&c.toggleClass(this._wrapperElement,"active",e),
e&&this._xterm&&(this._xterm.emit("scroll",this._xterm._core.buffer.ydisp),this._container&&this._container.parentElement)){var t=window.getComputedStyle(this._container.parentElement),n=parseInt(t.getPropertyValue("width").replace("px",""),10),i=parseInt(t.getPropertyValue("height").replace("px",""),10);this.layout(new c.Dimension(n,i))}},t.prototype.scrollDownLine=function(){this._xterm.scrollLines(1)},t.prototype.scrollDownPage=function(){this._xterm.scrollPages(1)},t.prototype.scrollToBottom=function(){this._xterm.scrollToBottom()},t.prototype.scrollUpLine=function(){this._xterm.scrollLines(-1)},t.prototype.scrollUpPage=function(){this._xterm.scrollPages(-1)},t.prototype.scrollToTop=function(){this._xterm.scrollToTop()},t.prototype.clear=function(){this._xterm.clear()},t.prototype._refreshSelectionContextKey=function(){var e=this._panelService.getActivePanel(),t=e&&e.getId()===v.TERMINAL_PANEL_ID;this._terminalHasTextContextKey.set(t&&this.hasSelection())},t.prototype._createProcess=function(){var e=this
;this._processManager=this._instantiationService.createInstance(R.TerminalProcessManager,this._id,this._configHelper),this._processManager.onProcessReady(function(){return e._onProcessIdReady.fire(e)}),this._processManager.onProcessExit(function(t){return e._onProcessExit(t)}),this._processManager.createProcess(this._shellLaunchConfig,this._cols,this._rows),this._processManager.onProcessData(function(t){return e._onData.fire(t)}),this._shellLaunchConfig.name?this.setTitle(this._shellLaunchConfig.name,!1):(this.setTitle(this._shellLaunchConfig.executable,!0),this._messageTitleDisposable=this._processManager.onProcessTitle(function(t){return e.setTitle(t||"",!0)})),r.isWindows&&this._processManager.ptyProcessReady.then(function(){e._xtermReadyPromise.then(function(){e._isDisposed||(e._windowsShellHelper=new h.WindowsShellHelper(e._processManager.shellProcessId,e,e._xterm))})})},t.prototype._onProcessData=function(e){this._widgetManager&&this._widgetManager.closeMessage(),this._xterm&&this._xterm.write(e)},
t.prototype._onProcessExit=function(e){if(this._logService.debug("Terminal process exit (id: "+this.id+") with code "+e),!this._isExiting){this._isExiting=!0;var t;if(e&&(t=i.localize(9,null,e)),this._logService.debug("Terminal process exit (id: "+this.id+") state "+this._processManager.processState),this._shellLaunchConfig.waitOnExit&&this._processManager.processState!==v.ProcessState.KILLED_BY_USER){e&&this._xterm.writeln(t);var n="string"==typeof this._shellLaunchConfig.waitOnExit?this._shellLaunchConfig.waitOnExit:i.localize(10,null);n="\n"+n+"",this._xterm.writeln(n),this._xterm.setOption("disableStdin",!0),this._xterm.textarea&&this._attachPressAnyKeyToCloseListener()}else if(this.dispose(),e)if(this._processManager.processState===v.ProcessState.KILLED_DURING_LAUNCH){var r="";"string"==typeof this._shellLaunchConfig.args?r=this._shellLaunchConfig.args:this._shellLaunchConfig.args&&this._shellLaunchConfig.args.length&&(r=" "+this._shellLaunchConfig.args.map(function(e){
return"string"==typeof e&&-1!==e.indexOf(" ")?"'"+e+"'":e}).join(" ")),this._shellLaunchConfig.executable?this._notificationService.error(i.localize(11,null,this._shellLaunchConfig.executable,r,e)):this._notificationService.error(i.localize(12,null,e))}else this._configHelper.config.showExitAlert?this._notificationService.error(t):console.warn(t);this._onExit.fire(e)}},t.prototype._attachPressAnyKeyToCloseListener=function(){var e=this;this._processManager.addDisposable(c.addDisposableListener(this._xterm.textarea,"keypress",function(t){e.dispose(),t.preventDefault()}))},t.prototype.reuseTerminal=function(e){var t=this;this._processManager.dispose(),this._xterm.write("\n"),e.initialText&&this._xterm.writeln(e.initialText);var n=this._title;this._shellLaunchConfig=e,this._createProcess(),n!==this._title&&this.setTitle(this._title,!0),this._processManager.onProcessData(function(e){return t._onProcessData(e)}),this._isExiting&&this._shellLaunchConfig.waitOnExit&&(this._xterm.setOption("disableStdin",!1),
this._isExiting=!1),this._shellLaunchConfig=e},t.prototype._sendRendererInput=function(e){if(this._processManager)throw new Error("onRendererInput attempted to be used on a regular terminal");this._onRendererInput.fire(e)},t.prototype._onLineFeed=function(){var e=this._xterm._core.buffer;e.lines.get(e.ybase+e.y).isWrapped||this._sendLineData(e,e.ybase+e.y-1)},t.prototype._sendLineData=function(e,t){for(var n=e.translateBufferLineToString(t,!0);t>=0&&e.lines.get(t--).isWrapped;)n=e.translateBufferLineToString(t,!1)+n;this._onLineData.fire(n)},t.prototype.updateConfig=function(){var e=this._configHelper.config;this._setCursorBlink(e.cursorBlinking),this._setCursorStyle(e.cursorStyle),this._setCommandsToSkipShell(e.commandsToSkipShell),this._setEnableBell(e.enableBell),this._safeSetOption("scrollback",e.scrollback),this._safeSetOption("macOptionIsMeta",e.macOptionIsMeta),this._safeSetOption("rightClickSelectsWord","selectWord"===e.rightClickBehavior)},t.prototype.updateAccessibilitySupport=function(){
var e=this._configurationService.getValue("editor.accessibilitySupport");this._xterm.setOption("screenReaderMode","on"===e)},t.prototype._setCursorBlink=function(e){this._xterm&&this._xterm.getOption("cursorBlink")!==e&&(this._xterm.setOption("cursorBlink",e),this._xterm.refresh(0,this._xterm.rows-1))},t.prototype._setCursorStyle=function(e){if(this._xterm&&this._xterm.getOption("cursorStyle")!==e){var t="line"===e?"bar":e;this._xterm.setOption("cursorStyle",t)}},t.prototype._setCommandsToSkipShell=function(e){this._skipTerminalCommands=e},t.prototype._setEnableBell=function(e){this._xterm&&("sound"===this._xterm.getOption("bellStyle")?this._configHelper.config.enableBell||this._xterm.setOption("bellStyle","none"):this._configHelper.config.enableBell&&this._xterm.setOption("bellStyle","sound"))},t.prototype._safeSetOption=function(e,t){this._xterm&&this._xterm.getOption(e)!==t&&this._xterm.setOption(e,t)},t.prototype.layout=function(e){if(!this.disableLayout){var t=this._evaluateColsAndRows(e.width,e.height)
;t&&(this._xterm&&(this._xterm.element.style.width=t+"px"),this._resize())}},t.prototype._resize=function(){var e=this,t=this._cols,n=this._rows;if(this._dimensionsOverride&&this._dimensionsOverride.cols&&this._dimensionsOverride.rows&&(t=Math.min(Math.max(this._dimensionsOverride.cols,2),this._cols),n=Math.min(Math.max(this._dimensionsOverride.rows,2),this._rows)),this._xterm){var i=this._configHelper.getFont(this._xterm);if(this._isVisible){var r=this._configHelper.config;this._safeSetOption("letterSpacing",i.letterSpacing),this._safeSetOption("lineHeight",i.lineHeight),this._safeSetOption("fontSize",i.fontSize),this._safeSetOption("fontFamily",i.fontFamily),this._safeSetOption("fontWeight",r.fontWeight),this._safeSetOption("fontWeightBold",r.fontWeightBold),this._safeSetOption("drawBoldTextInBrightColors",r.drawBoldTextInBrightColors)}t===this._xterm.cols&&n===this._xterm.rows||this._onDimensionsChanged.fire(),this._xterm.resize(t,n),
this._isVisible&&"canvas"===this._xterm.getOption("rendererType")&&this._xterm._core.renderer.onIntersectionChange({intersectionRatio:1})}this._processManager&&this._processManager.ptyProcessReady.then(function(){return e._processManager.setDimensions(t,n)})},t.prototype.setTitle=function(e,t){if(e){t?(e=u.basename(e),r.isWindows&&(e=e.split(".exe")[0])):this._messageTitleDisposable&&(n.dispose(this._messageTitleDisposable),this._messageTitleDisposable=null);var i=e!==this._title;this._title=e,i&&this._onTitleChanged.fire(e)}},t.prototype.setDimensions=function(e){this._dimensionsOverride=e,this._resize()},t.prototype._getXtermTheme=function(e){e||(e=this._themeService.getTheme());var t=e.getColor(T.TERMINAL_FOREGROUND_COLOR),n=e.getColor(T.TERMINAL_BACKGROUND_COLOR)||e.getColor(x.PANEL_BACKGROUND),i=e.getColor(T.TERMINAL_CURSOR_FOREGROUND_COLOR)||t,r=e.getColor(T.TERMINAL_CURSOR_BACKGROUND_COLOR)||n,o=e.getColor(T.TERMINAL_SELECTION_BACKGROUND_COLOR);return{background:n?n.toString():null,
foreground:t?t.toString():null,cursor:i?i.toString():null,cursorAccent:r?r.toString():null,selection:o?o.toString():null,black:e.getColor(T.ansiColorIdentifiers[0]).toString(),red:e.getColor(T.ansiColorIdentifiers[1]).toString(),green:e.getColor(T.ansiColorIdentifiers[2]).toString(),yellow:e.getColor(T.ansiColorIdentifiers[3]).toString(),blue:e.getColor(T.ansiColorIdentifiers[4]).toString(),magenta:e.getColor(T.ansiColorIdentifiers[5]).toString(),cyan:e.getColor(T.ansiColorIdentifiers[6]).toString(),white:e.getColor(T.ansiColorIdentifiers[7]).toString(),brightBlack:e.getColor(T.ansiColorIdentifiers[8]).toString(),brightRed:e.getColor(T.ansiColorIdentifiers[9]).toString(),brightGreen:e.getColor(T.ansiColorIdentifiers[10]).toString(),brightYellow:e.getColor(T.ansiColorIdentifiers[11]).toString(),brightBlue:e.getColor(T.ansiColorIdentifiers[12]).toString(),brightMagenta:e.getColor(T.ansiColorIdentifiers[13]).toString(),brightCyan:e.getColor(T.ansiColorIdentifiers[14]).toString(),
brightWhite:e.getColor(T.ansiColorIdentifiers[15]).toString()}},t.prototype._updateTheme=function(e){this._xterm.setOption("theme",this._getXtermTheme(e))},t.EOL_REGEX=/\r?\n/g,t._lastKnownDimensions=null,t._idCounter=1,t=a([l(4,p.IContextKeyService),l(5,f.IKeybindingService),l(6,D.INotificationService),l(7,g.IPanelService),l(8,m.IInstantiationService),l(9,I.IClipboardService),l(10,C.IThemeService),l(11,k.IConfigurationService),l(12,A.ILogService),l(13,O.IStorageService)],t)}();t.TerminalInstance=P,C.registerThemingParticipant(function(e,t){var n=e.getColor(E.activeContrastBorder);n&&t.addRule("\n\t\t\t.hc-black .monaco-workbench .panel.integrated-terminal .xterm.focus::before,\n\t\t\t.hc-black .monaco-workbench .panel.integrated-terminal .xterm:focus::before { border-color: "+n+"; }");var i=e.getColor(E.scrollbarSliderBackground)
;i&&t.addRule("\n\t\t\t.monaco-workbench .panel.integrated-terminal .find-focused .xterm .xterm-viewport,\n\t\t\t.monaco-workbench .panel.integrated-terminal .xterm.focus .xterm-viewport,\n\t\t\t.monaco-workbench .panel.integrated-terminal .xterm:focus .xterm-viewport,\n\t\t\t.monaco-workbench .panel.integrated-terminal .xterm:hover .xterm-viewport { background-color: "+i+" !important; }");var r=e.getColor(E.scrollbarSliderHoverBackground);r&&t.addRule(".monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { background-color: "+r+"; }");var o=e.getColor(E.scrollbarSliderActiveBackground);o&&t.addRule(".monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:active { background-color: "+o+"; }")})}),define(e[1350],t([1,0,81]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this.activitybarPart=e,this.panelPart=t,this.panelService=n}
return e.prototype.showActivity=function(e,t,n,i){return this.panelService.getPanels().filter(function(t){return t.id===e}).length?this.panelPart.showActivity(e,t,n):this.activitybarPart.showActivity(e,t,n,i)},e=a([l(2,n.IPanelService)],e)}();t.ActivityService=i}),define(e[46],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.ACTIVITYBAR_PART=0]="ACTIVITYBAR_PART",e[e.SIDEBAR_PART=1]="SIDEBAR_PART",e[e.PANEL_PART=2]="PANEL_PART",e[e.EDITOR_PART=3]="EDITOR_PART",e[e.STATUSBAR_PART=4]="STATUSBAR_PART",e[e.TITLEBAR_PART=5]="TITLEBAR_PART",e[e.MENUBAR_PART=6]="MENUBAR_PART"}(t.Parts||(t.Parts={}));!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.BOTTOM=2]="BOTTOM"}(t.Position||(t.Position={})),t.IPartService=n.createDecorator("partService")}),define(e[1352],t([1,0,16,125,46,81,61,67]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t,n,i){this._outputService=t,this._partService=n,
this._panelService=i}return e.prototype.dispose=function(){},e.prototype.$append=function(e,t,n){this._getChannel(e,t).append(n)},e.prototype.$clear=function(e,t){this._getChannel(e,t).clear()},e.prototype.$reveal=function(e,t,n){var i=this._getChannel(e,t);this._outputService.showChannel(i.id,n)},e.prototype._getChannel=function(e,t){return n.Registry.as(i.Extensions.OutputChannels).getChannel(e)||n.Registry.as(i.Extensions.OutputChannels).registerChannel(e,t),this._outputService.getChannel(e)},e.prototype.$close=function(e){var t=this._panelService.getActivePanel();if(t&&t.getId()===i.OUTPUT_PANEL_ID&&e===this._outputService.getActiveChannel().id)return this._partService.setPanelHidden(!0)},e.prototype.$dispose=function(e,t){this._getChannel(e,t).dispose()},e=a([c.extHostNamedCustomer(s.MainContext.MainThreadOutputService),l(1,i.IOutputService),l(2,r.IPartService),l(3,o.IPanelService)],e)}();t.MainThreadOutputService=u}),define(e[471],t([1,0,1460,16,23,31,56,17,46]),function(e,t,i,r,o,s,c,u,d){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.partService=i,o.configurationService=r,o.enabled=!!o.partService,o}return n(t,e),t.prototype.run=function(){var e=!this.partService.isVisible(d.Parts.ACTIVITYBAR_PART);return this.configurationService.updateValue(t.activityBarVisibleKey,e,u.ConfigurationTarget.USER)},t.ID="workbench.action.toggleActivityBarVisibility",t.LABEL=i.localize(0,null),t.activityBarVisibleKey="workbench.activityBar.visible",t=a([l(2,d.IPartService),l(3,u.IConfigurationService)],t)}(o.Action);t.ToggleActivityBarVisibilityAction=h;r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(h,h.ID,h.LABEL),"View: Toggle Activity Bar Visibility",i.localize(1,null))}),define(e[1354],t([1,0,4,1462,23,16,31,56,46]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i){var r=e.call(this,t,n)||this
;return r.partService=i,r.enabled=!!r.partService,r}return n(t,e),t.prototype.run=function(){return this.partService.centerEditorLayout(!this.partService.isEditorLayoutCentered()),i.TPromise.as(null)},t.ID="workbench.action.toggleCenteredLayout",t.LABEL=r.localize(0,null),t=a([l(2,d.IPartService)],t)}(o.Action);s.Registry.as(u.Extensions.WorkbenchActions).registerWorkbenchAction(new c.SyncActionDescriptor(h,h.ID,h.LABEL),"View: Toggle Centered Layout",r.localize(1,null))}),define(e[1355],t([1,0,1464,16,23,31,56,46,17]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.partService=i,o.configurationService=r,o.enabled=!!o.partService&&!!o.configurationService,o}return n(t,e),t.prototype.run=function(){var e=this.partService.getSideBarPosition()===u.Position.LEFT?"right":"left";return this.configurationService.updateValue(t.sidebarPositionConfigurationKey,e,d.ConfigurationTarget.USER)},
t.ID="workbench.action.toggleSidebarPosition",t.LABEL=i.localize(0,null),t.sidebarPositionConfigurationKey="workbench.sideBar.location",t=a([l(2,u.IPartService),l(3,d.IConfigurationService)],t)}(o.Action);t.ToggleSidebarPositionAction=h;r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(h,h.ID,h.LABEL),"View: Toggle Side Bar Position",i.localize(1,null))}),define(e[472],t([1,0,1466,16,23,31,56,46]),function(e,t,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.partService=i,r.enabled=!!r.partService,r}return n(t,e),t.prototype.run=function(){var e=this.partService.isVisible(u.Parts.SIDEBAR_PART);return this.partService.setSideBarHidden(e)},t.ID="workbench.action.toggleSidebarVisibility",t.LABEL=i.localize(0,null),t=a([l(2,u.IPartService)],t)}(o.Action);t.ToggleSidebarVisibilityAction=d
;r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(d,d.ID,d.LABEL,{primary:2080}),"View: Toggle Side Bar Visibility",i.localize(1,null))}),define(e[1357],t([1,0,1467,16,23,31,56,17,46]),function(e,t,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.partService=i,o.configurationService=r,o.enabled=!!o.partService,o}return n(t,e),t.prototype.run=function(){var e=!this.partService.isVisible(d.Parts.STATUSBAR_PART);return this.configurationService.updateValue(t.statusbarVisibleKey,e,u.ConfigurationTarget.USER)},t.ID="workbench.action.toggleStatusbarVisibility",t.LABEL=i.localize(0,null),t.statusbarVisibleKey="workbench.statusBar.visible",t=a([l(2,d.IPartService),l(3,u.IConfigurationService)],t)}(o.Action);t.ToggleStatusbarVisibilityAction=h
;r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(h,h.ID,h.LABEL),"View: Toggle Status Bar Visibility",i.localize(1,null))}),define(e[1358],t([1,0,4,1472,23,73,16,31,56,46]),function(e,t,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.partService=i,r.enabled=!!r.partService,r}return n(t,e),t.prototype.run=function(){return this.partService.toggleZenMode(),i.TPromise.as(null)},t.ID="workbench.action.toggleZenMode",t.LABEL=r.localize(0,null),t=a([l(2,h.IPartService)],t)}(o.Action);c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(new u.SyncActionDescriptor(p,p.ID,p.LABEL,{primary:s.KeyChord(2089,56)}),"View: Toggle Zen Mode",r.localize(1,null))}),define(e[1359],t([1,0,5,8,16,147,4,46,6,119,18,223,7]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t,n,i,r,o){
var s=e.call(this)||this;return s.parent=t,s.groupView=n,s.partService=i,s.instantiationService=r,s._onDidFocus=s._register(new g.Emitter),s._onDidSizeConstraintsChange=s._register(new g.Emitter),s.controls=[],s.activeControlDisposeables=[],s.editorOperation=s._register(new h.LongRunningOperation(o)),s}return n(t,e),Object.defineProperty(t.prototype,"minimumWidth",{get:function(){return this._activeControl?this._activeControl.minimumWidth:f.DEFAULT_EDITOR_MIN_DIMENSIONS.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minimumHeight",{get:function(){return this._activeControl?this._activeControl.minimumHeight:f.DEFAULT_EDITOR_MIN_DIMENSIONS.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumWidth",{get:function(){return this._activeControl?this._activeControl.maximumWidth:f.DEFAULT_EDITOR_MAX_DIMENSIONS.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumHeight",{get:function(){
return this._activeControl?this._activeControl.maximumHeight:f.DEFAULT_EDITOR_MAX_DIMENSIONS.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidFocus",{get:function(){return this._onDidFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidSizeConstraintsChange",{get:function(){return this._onDidSizeConstraintsChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeControl",{get:function(){return this._activeControl},enumerable:!0,configurable:!0}),t.prototype.openEditor=function(e,t){var n=o.Registry.as(s.Extensions.Editors).getEditor(e),i=this.doShowEditorControl(n,t);return this.doSetInput(i,e,t).then(function(e){return{control:i,editorChanged:e}})},t.prototype.doShowEditorControl=function(e,t){if(this._activeControl&&e.describes(this._activeControl))return this._activeControl;this.doHideActiveEditorControl();var n=this.doCreateEditorControl(e);return this.doSetActiveControl(n),
this.parent.appendChild(n.getContainer()),r.show(n.getContainer()),n.setVisible(!0,this.groupView),this.dimension&&n.layout(this.dimension),n},t.prototype.doCreateEditorControl=function(e){var t=this.doInstantiateEditorControl(e);if(!t.getContainer()){var n=document.createElement("div");r.addClass(n,"editor-instance"),n.id=e.getId(),t.create(n)}return t},t.prototype.doInstantiateEditorControl=function(e){var t=this.controls.filter(function(t){return e.describes(t)})[0];if(t)return t;var n=this._register(e.instantiate(this.instantiationService));return this.controls.push(n),n},t.prototype.doSetActiveControl=function(e){var t=this;this._activeControl=e,this.activeControlDisposeables=i.dispose(this.activeControlDisposeables),e&&(this.activeControlDisposeables.push(e.onDidSizeConstraintsChange(function(e){return t._onDidSizeConstraintsChange.fire(e)})),this.activeControlDisposeables.push(e.onDidFocus(function(){return t._onDidFocus.fire()}))),this._onDidSizeConstraintsChange.fire()},
t.prototype.doSetInput=function(e,t,n){var i=n&&n.forceOpen,r=e.input&&e.input.matches(t);if(r&&!i){e.setOptions(n);return(!n||!n.preserveFocus)&&e.focus(),c.TPromise.as(!1)}var o=this.editorOperation.start(this.partService.isCreated()?800:3200),s=!r;return p.toWinJsPromise(e.setInput(t,n,o.token)).then(function(){if(o.isCurrent()){(!n||!n.preserveFocus)&&e.focus()}return o.stop(),s},function(e){return o.stop(),c.TPromise.wrapError(e)})},t.prototype.doHideActiveEditorControl=function(){if(this._activeControl){this.editorOperation.stop();var e=this._activeControl.getContainer();this.parent.removeChild(e),r.hide(e),this._activeControl.clearInput(),this._activeControl.setVisible(!1,this.groupView),this.doSetActiveControl(null)}},t.prototype.closeEditor=function(e){this._activeControl&&e.matches(this._activeControl.input)&&this.doHideActiveEditorControl()},t.prototype.layout=function(e){this.dimension=e,this._activeControl&&this.dimension&&this._activeControl.layout(this.dimension)},
t.prototype.shutdown=function(){this.controls.forEach(function(e){return e.shutdown()})},t.prototype.dispose=function(){this.activeControlDisposeables=i.dispose(this.activeControlDisposeables),e.prototype.dispose.call(this)},t=a([l(2,u.IPartService),l(3,d.IInstantiationService),l(4,h.IProgressService)],t)}(i.Disposable);t.EditorControl=v}),define(e[1360],t([1,0,69,12,180,46,7,15,206,494,6,8,26,53,1551,41,347,37,849,449]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(t,n,i,r,o,s,a,l){var u=e.call(this,i)||this;return u.container=t,u.model=n,u.instantiationService=r,u.partService=o,u.editorGroupService=a,u.keybindingService=l,u._onDidChangeVisibility=new c.Emitter,u.toUnbind.push(u._onDidChangeVisibility),u.notificationsCenterVisibleContextKey=d.NotificationsCenterVisibleContext.bindTo(s),u.registerListeners(),u}return n(t,e),t.prototype.registerListeners=function(){var e=this
;this.toUnbind.push(this.model.onDidNotificationChange(function(t){return e.onDidNotificationChange(t)}))},Object.defineProperty(t.prototype,"onDidChangeVisibility",{get:function(){return this._onDidChangeVisibility.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},enumerable:!0,configurable:!0}),t.prototype.show=function(){this._isVisible?this.notificationsList.show(!0):(this.notificationsCenterContainer||this.create(),this.updateTitle(),this._isVisible=!0,f.addClass(this.notificationsCenterContainer,"visible"),this.notificationsList.show(),this.layout(this.workbenchDimensions),this.notificationsList.updateNotificationsList(0,0,this.model.notifications),this.notificationsList.focusFirst(),this.updateStyles(),this.notificationsCenterVisibleContextKey.set(!0),this._onDidChangeVisibility.fire())},t.prototype.updateTitle=function(){
0===this.model.notifications.length?this.notificationsCenterTitle.innerText=m.localize(0,null):this.notificationsCenterTitle.innerText=m.localize(1,null)},t.prototype.create=function(){this.notificationsCenterContainer=document.createElement("div"),f.addClass(this.notificationsCenterContainer,"notifications-center"),this.notificationsCenterHeader=document.createElement("div"),f.addClass(this.notificationsCenterHeader,"notifications-center-header"),this.notificationsCenterContainer.appendChild(this.notificationsCenterHeader),this.notificationsCenterTitle=document.createElement("span"),f.addClass(this.notificationsCenterTitle,"notifications-center-header-title"),this.notificationsCenterHeader.appendChild(this.notificationsCenterTitle);var e=document.createElement("div");f.addClass(e,"notifications-center-header-toolbar"),this.notificationsCenterHeader.appendChild(e);var t=this.instantiationService.createInstance(b.NotificationActionRunner);this.toUnbind.push(t);var n=new y.ActionBar(e,{
ariaLabel:m.localize(2,null),actionRunner:t});this.toUnbind.push(n);var i=this.instantiationService.createInstance(b.HideNotificationsCenterAction,b.HideNotificationsCenterAction.ID,b.HideNotificationsCenterAction.LABEL);this.toUnbind.push(i),n.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)});var r=this.instantiationService.createInstance(b.ClearAllNotificationsAction,b.ClearAllNotificationsAction.ID,b.ClearAllNotificationsAction.LABEL);this.toUnbind.push(r),n.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)}),this.notificationsList=this.instantiationService.createInstance(h.NotificationsList,this.notificationsCenterContainer,{ariaLabel:m.localize(3,null)}),this.container.appendChild(this.notificationsCenterContainer)},t.prototype.getKeybindingLabel=function(e){var t=this.keybindingService.lookupKeybinding(e.id);return t?t.getLabel():void 0},t.prototype.onDidNotificationChange=function(e){if(this._isVisible){var t=!1;switch(e.kind){case o.NotificationChangeType.ADD:
this.notificationsList.updateNotificationsList(e.index,0,[e.item]);break;case o.NotificationChangeType.CHANGE:this.notificationsList.updateNotificationsList(e.index,1,[e.item]);break;case o.NotificationChangeType.REMOVE:t=f.isAncestor(document.activeElement,this.notificationsCenterContainer),this.notificationsList.updateNotificationsList(e.index,1)}this.updateTitle(),0===this.model.notifications.length&&(this.hide(),t&&this.editorGroupService.activeGroup.focus())}},t.prototype.hide=function(){if(this._isVisible&&this.notificationsCenterContainer){var e=f.isAncestor(document.activeElement,this.notificationsCenterContainer);this._isVisible=!1,f.removeClass(this.notificationsCenterContainer,"visible"),this.notificationsList.hide(),this.notificationsCenterVisibleContextKey.set(!1),this._onDidChangeVisibility.fire(),e&&this.editorGroupService.activeGroup.focus()}},t.prototype.updateStyles=function(){if(this.notificationsCenterContainer){var e=this.getColor(g.widgetShadow)
;this.notificationsCenterContainer.style.boxShadow=e?"0 0px 8px "+e:null;var t=this.getColor(i.NOTIFICATIONS_CENTER_BORDER);this.notificationsCenterContainer.style.border=t?"1px solid "+t:null;var n=this.getColor(i.NOTIFICATIONS_CENTER_HEADER_FOREGROUND);this.notificationsCenterHeader.style.color=n?n.toString():null;var r=this.getColor(i.NOTIFICATIONS_CENTER_HEADER_BACKGROUND);this.notificationsCenterHeader.style.background=r?r.toString():null}},t.prototype.layout=function(e){if(this.workbenchDimensions=e,this._isVisible&&this.notificationsCenterContainer){var n=t.MAX_DIMENSIONS.width,i=t.MAX_DIMENSIONS.height,r=n,o=i;this.workbenchDimensions&&(r=this.workbenchDimensions.width,r-=16,o=this.workbenchDimensions.height-35,this.partService.isVisible(s.Parts.STATUSBAR_PART)&&(o-=22),this.partService.isVisible(s.Parts.TITLEBAR_PART)&&(o-=22),o-=24),this.notificationsList.layout(Math.min(n,r),Math.min(i,o))}},t.prototype.clearAll=function(){
for(this.hide();this.model.notifications.length;)this.model.notifications[0].close()},t.MAX_DIMENSIONS=new f.Dimension(450,400),t=a([l(2,r.IThemeService),l(3,p.IInstantiationService),l(4,s.IPartService),l(5,u.IContextKeyService),l(6,v.IEditorGroupsService),l(7,S.IKeybindingService)],t)}(i.Themable);t.NotificationsCenter=_,r.registerThemingParticipant(function(e,t){var n=e.getColor(i.NOTIFICATIONS_BORDER);n&&t.addRule('.monaco-workbench > .notifications-center .notifications-list-container .monaco-list-row[data-last-element="false"] > .notification-list-item { border-bottom: 1px solid '+n+"; }")})}),define(e[1361],t([1,0,180,5,8,6,494,7,46,69,12,26,53,206,15,1558,22,101,38,851]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C;!function(e){e[e.HIDDEN_OR_VISIBLE=0]="HIDDEN_OR_VISIBLE",e[e.HIDDEN=1]="HIDDEN",e[e.VISIBLE=2]="VISIBLE"}(C||(C={}));var E=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,o)||this;return l.container=t,
l.model=n,l.instantiationService=i,l.partService=r,l.editorGroupService=s,l.lifecycleService=c,l.mapNotificationToToast=new Map,l.notificationsToastsVisibleContextKey=v.NotificationsToastsVisibleContext.bindTo(a),n.notifications.forEach(function(e){return l.addToast(e)}),l.registerListeners(),l}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.model.onDidNotificationChange(function(t){return e.onDidNotificationChange(t)}))},t.prototype.onDidNotificationChange=function(e){switch(e.kind){case i.NotificationChangeType.ADD:return this.addToast(e.item);case i.NotificationChangeType.REMOVE:return this.removeToast(e.item)}},t.prototype.addToast=function(e){var n=this;if(!this.isNotificationsCenterVisible){this.notificationsToastsContainer||(this.notificationsToastsContainer=document.createElement("div"),o.addClass(this.notificationsToastsContainer,"notifications-toasts"),this.container.appendChild(this.notificationsToastsContainer)),
o.addClass(this.notificationsToastsContainer,"visible");var s=[],a=document.createElement("div");o.addClass(a,"notification-toast-container");var l=this.notificationsToastsContainer.firstChild;l?this.notificationsToastsContainer.insertBefore(a,l):this.notificationsToastsContainer.appendChild(a);var d=document.createElement("div");o.addClass(d,"notification-toast"),a.appendChild(d);var h=this.instantiationService.createInstance(c.NotificationsList,d,{ariaLabel:y.localize(0,null),verticalScrollMode:S.ScrollbarVisibility.Hidden});s.push(h);var p={item:e,list:h,container:a,toast:d,disposeables:s};this.mapNotificationToToast.set(e,p),s.push(r.toDisposable(function(){n.isVisible(p)&&n.notificationsToastsContainer.removeChild(p.container)})),h.show();var f=this.computeMaxDimensions();if(this.layoutLists(f.width),h.updateNotificationsList(0,0,[e]),this.layoutContainer(f.height),s.push(e.onDidExpansionChange(function(){h.updateNotificationsList(0,1,[e])})),s.push(e.onDidLabelChange(function(t){
t.kind!==i.NotificationViewItemLabelKind.ACTIONS&&t.kind!==i.NotificationViewItemLabelKind.MESSAGE||h.updateNotificationsList(0,1,[e])})),u.once(e.onDidClose)(function(){n.removeToast(e)}),!e.expanded){var g=!1;s.push(o.addDisposableListener(a,o.EventType.MOUSE_OVER,function(){return g=!0})),s.push(o.addDisposableListener(a,o.EventType.MOUSE_OUT,function(){return g=!1}));var v,m=function(){v=setTimeout(function(){var t=e.hasProgress()&&!e.progress.state.done;h.hasFocus()||e.expanded||g||t?m():n.removeToast(e)},t.PURGE_TIMEOUT[e.severity])};m(),s.push(r.toDisposable(function(){return clearTimeout(v)}))}this.updateStyles(),this.notificationsToastsVisibleContextKey.set(!0),this.lifecycleService.phase>=_.LifecyclePhase.Running?(o.addClass(d,"notification-fade-in"),s.push(o.addDisposableListener(d,"transitionend",function(){o.removeClass(d,"notification-fade-in"),o.addClass(d,"notification-fade-in-done")}))):o.addClass(d,"notification-fade-in-done")}},t.prototype.removeToast=function(e){
var t=this.mapNotificationToToast.get(e),n=!1;if(t){o.isAncestor(document.activeElement,t.container)&&(n=!(this.focusNext()||this.focusPrevious())),r.dispose(t.disposeables),this.mapNotificationToToast.delete(e)}this.mapNotificationToToast.size>0?this.layout(this.workbenchDimensions):(this.doHide(),n&&this.editorGroupService.activeGroup.focus())},t.prototype.removeToasts=function(){this.mapNotificationToToast.forEach(function(e){return r.dispose(e.disposeables)}),this.mapNotificationToToast.clear(),this.doHide()},t.prototype.doHide=function(){this.notificationsToastsContainer&&o.removeClass(this.notificationsToastsContainer,"visible"),this.notificationsToastsVisibleContextKey.set(!1)},t.prototype.hide=function(){var e=o.isAncestor(document.activeElement,this.notificationsToastsContainer);this.removeToasts(),e&&this.editorGroupService.activeGroup.focus()},t.prototype.focus=function(){var e=this.getToasts(C.VISIBLE);return e.length>0&&(e[0].list.focusFirst(),!0)},t.prototype.focusNext=function(){
for(var e=this.getToasts(C.VISIBLE),t=0;t<e.length;t++){if(e[t].list.hasFocus()){var n=e[t+1];if(n)return n.list.focusFirst(),!0;break}}return!1},t.prototype.focusPrevious=function(){for(var e=this.getToasts(C.VISIBLE),t=0;t<e.length;t++){if(e[t].list.hasFocus()){var n=e[t-1];if(n)return n.list.focusFirst(),!0;break}}return!1},t.prototype.focusFirst=function(){var e=this.getToasts(C.VISIBLE)[0];return!!e&&(e.list.focusFirst(),!0)},t.prototype.focusLast=function(){var e=this.getToasts(C.VISIBLE);return e.length>0&&(e[e.length-1].list.focusFirst(),!0)},t.prototype.update=function(e){this.isNotificationsCenterVisible!==e&&(this.isNotificationsCenterVisible=e,this.isNotificationsCenterVisible&&this.removeToasts())},t.prototype.updateStyles=function(){var e=this;this.mapNotificationToToast.forEach(function(t){var n=e.getColor(f.widgetShadow);t.toast.style.boxShadow=n?"0 0px 8px "+n:null;var i=e.getColor(h.NOTIFICATIONS_TOAST_BORDER);t.toast.style.border=i?"1px solid "+i:null})},t.prototype.getToasts=function(e){
var t=this,n=[];return this.mapNotificationToToast.forEach(function(i){switch(e){case C.HIDDEN_OR_VISIBLE:n.push(i);break;case C.HIDDEN:t.isVisible(i)||n.push(i);break;case C.VISIBLE:t.isVisible(i)&&n.push(i)}}),n.reverse()},t.prototype.layout=function(e){this.workbenchDimensions=e;var t=this.computeMaxDimensions();t.height&&this.layoutContainer(t.height),this.layoutLists(t.width)},t.prototype.computeMaxDimensions=function(){var e,n=t.MAX_WIDTH,i=n;return this.workbenchDimensions&&(i=this.workbenchDimensions.width,i-=16,e=this.workbenchDimensions.height,this.partService.isVisible(d.Parts.STATUSBAR_PART)&&(e-=22),this.partService.isVisible(d.Parts.TITLEBAR_PART)&&(e-=22),e-=24),e=Math.round(.618*e),new o.Dimension(Math.min(n,i),e)},t.prototype.layoutLists=function(e){this.mapNotificationToToast.forEach(function(t){return t.list.layout(e)})},t.prototype.layoutContainer=function(e){var n=this,i=0;this.getToasts(C.HIDDEN_OR_VISIBLE).forEach(function(r){r.container.style.opacity="0",n.setVisibility(r,!0),
e-=r.container.offsetHeight;var o=!1;i===t.MAX_NOTIFICATIONS?o=!1:e>=0&&(o=!0),n.setVisibility(r,o),r.container.style.opacity=null,o&&i++})},t.prototype.setVisibility=function(e,t){this.isVisible(e)!==t&&(t?this.notificationsToastsContainer.appendChild(e.container):this.notificationsToastsContainer.removeChild(e.container))},t.prototype.isVisible=function(e){return!!e.container.parentElement},t.MAX_WIDTH=450,t.MAX_NOTIFICATIONS=3,t.PURGE_TIMEOUT=function(){var e=Object.create(null);return e[b.Severity.Info]=1e4,e[b.Severity.Warning]=12e3,e[b.Severity.Error]=15e3,e}(),t=a([l(2,s.IInstantiationService),l(3,d.IPartService),l(4,p.IThemeService),l(5,g.IEditorGroupsService),l(6,m.IContextKeyService),l(7,_.ILifecycleService)],t)}(h.Themable);t.NotificationsToasts=E}),define(e[473],t([1,0,1561,4,5,23,16,31,56,81,46,238,460]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i){var r=e.call(this,t,n,"hide-panel-action")||this
;return r.partService=i,r}return n(t,e),t.prototype.run=function(){return this.partService.setPanelHidden(!0)},t.ID="workbench.action.closePanel",t.LABEL=i.localize(0,null),t=a([l(2,p.IPartService)],t)}(s.Action);t.ClosePanelAction=g;var v=function(e){function t(t,n,i){var r=e.call(this,t,n,i.isVisible(p.Parts.PANEL_PART)?"panel expanded":"panel")||this;return r.partService=i,r}return n(t,e),t.prototype.run=function(){return this.partService.setPanelHidden(this.partService.isVisible(p.Parts.PANEL_PART))},t.ID="workbench.action.togglePanel",t.LABEL=i.localize(1,null),t=a([l(2,p.IPartService)],t)}(s.Action);t.TogglePanelAction=v;var m=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.panelService=i,o.partService=r,o}return n(t,e),t.prototype.run=function(){if(!this.partService.isVisible(p.Parts.PANEL_PART))return this.partService.setPanelHidden(!1);var e=this.panelService.getActivePanel();return e&&e.focus(),r.TPromise.as(!0)},t.ID="workbench.action.focusPanel",t.LABEL=i.localize(2,null),
t=a([l(2,h.IPanelService),l(3,p.IPartService)],t)}(s.Action),y=function(e){function t(n,i,r){var o=e.call(this,n,i,r.getPanelPosition()===p.Position.RIGHT?"move-panel-to-bottom":"move-panel-to-right")||this;o.partService=r,o.toDispose=[];var s=function(){var e=o.partService.getPanelPosition()===p.Position.RIGHT;o.class=e?"move-panel-to-bottom":"move-panel-to-right",o.label=e?t.MOVE_TO_BOTTOM_LABEL:t.MOVE_TO_RIGHT_LABEL};return o.toDispose.push(r.onEditorLayout(function(){return s()})),s(),o}return n(t,e),t.prototype.run=function(){var e=this.partService.getPanelPosition();return this.partService.setPanelPosition(e===p.Position.BOTTOM?p.Position.RIGHT:p.Position.BOTTOM)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=o.dispose(this.toDispose)},t.ID="workbench.action.togglePanelPosition",t.LABEL=i.localize(3,null),t.MOVE_TO_RIGHT_LABEL=i.localize(4,null),t.MOVE_TO_BOTTOM_LABEL=i.localize(5,null),t=a([l(2,p.IPartService)],t)}(s.Action);t.TogglePanelPositionAction=y
;var b=function(e){function t(n,i,r){var o=e.call(this,n,i,r.isPanelMaximized()?"minimize-panel-action":"maximize-panel-action")||this;return o.partService=r,o.toDispose=[],o.toDispose.push(r.onEditorLayout(function(){var e=o.partService.isPanelMaximized();o.class=e?"minimize-panel-action":"maximize-panel-action",o.label=e?t.RESTORE_LABEL:t.MAXIMIZE_LABEL})),o}return n(t,e),t.prototype.run=function(){var e=this;return(this.partService.isVisible(p.Parts.PANEL_PART)?r.TPromise.as(null):this.partService.setPanelHidden(!1)).then(function(){return e.partService.toggleMaximizedPanel()})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=o.dispose(this.toDispose)},t.ID="workbench.action.toggleMaximizedPanel",t.LABEL=i.localize(6,null),t.MAXIMIZE_LABEL=i.localize(7,null),t.RESTORE_LABEL=i.localize(8,null),t=a([l(2,p.IPartService)],t)}(s.Action);t.ToggleMaximizedPanelAction=b;var S=function(e){function t(t,n){var i=e.call(this,t)||this;return i.panelService=n,i}return n(t,e),
t.prototype.run=function(e){var t=this;return this.panelService.openPanel(this.activity.id,!0).then(function(){return t.activate()})},t=a([l(1,h.IPanelService)],t)}(f.ActivityAction);t.PanelActivityAction=S;var _=c.Registry.as(d.Extensions.WorkbenchActions);_.registerWorkbenchAction(new u.SyncActionDescriptor(v,v.ID,v.LABEL,{primary:2088}),"View: Toggle Panel",i.localize(9,null)),_.registerWorkbenchAction(new u.SyncActionDescriptor(m,m.ID,m.LABEL),"View: Focus into Panel",i.localize(10,null)),_.registerWorkbenchAction(new u.SyncActionDescriptor(b,b.ID,b.LABEL),"View: Toggle Maximized Panel",i.localize(11,null)),_.registerWorkbenchAction(new u.SyncActionDescriptor(g,g.ID,g.LABEL),"View: Close Panel",i.localize(12,null)),_.registerWorkbenchAction(new u.SyncActionDescriptor(y,y.ID,y.LABEL),"View: Toggle Panel Position",i.localize(13,null)),_.registerWorkbenchAction(new u.SyncActionDescriptor(b,b.ID,void 0),"View: Toggle Panel Position",i.localize(14,null))}),
define(e[474],t([1,0,270,179,46,8,6,12,26,69,64,4,145,1055,1054,84,1564,17,86,204,68,36,205,7,155,5,83,53,15,52,164,41,23,10,149,37,20,323]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B){"use strict";function V(e){var t,n=e.dark.toString();return q[n]?t=q[n]:(t=$.nextId(),s.createCSSRule("."+t,'background-image: url("'+(e.light||e.dark).toString()+'")'),s.createCSSRule(".vs-dark ."+t+", .hc-black ."+t,'background-image: url("'+e.dark.toString()+'")'),q[n]=t),t}Object.defineProperty(t,"__esModule",{value:!0});var z=s.$,H={iconPath:{dark:N.default.parse(e.toUrl("vs/workbench/browser/parts/quickinput/media/dark/arrow-left.svg")),light:N.default.parse(e.toUrl("vs/workbench/browser/parts/quickinput/media/light/arrow-left.svg"))},tooltip:b.localize(0,null),handle:-1},K=function(){function e(e){this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=new T.Emitter,
this.onDidHideEmitter=new T.Emitter,this.visibleDisposables=[],this.disposables=[this.onDidTriggerButtonEmitter,this.onDidHideEmitter],this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event}return Object.defineProperty(e.prototype,"title",{get:function(){return this._title},set:function(e){this._title=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._steps},set:function(e){this._steps=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSteps",{get:function(){return this._totalSteps},set:function(e){this._totalSteps=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"busy",{get:function(){return this._busy},set:function(e){this._busy=e,this.update()},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"ignoreFocusOut",{get:function(){return this._ignoreFocusOut},set:function(e){this._ignoreFocusOut=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buttons",{get:function(){return this._buttons},set:function(e){this._buttons=e,this.buttonsUpdated=!0,this.update()},enumerable:!0,configurable:!0}),e.prototype.show=function(){var e=this;this.visible||(this.disposables.push(this.ui.onDidTriggerButton(function(t){-1!==e.buttons.indexOf(t)&&e.onDidTriggerButtonEmitter.fire(t)})),this.ui.show(this),this.visible=!0,this.update())},e.prototype.hide=function(){this.visible&&this.ui.hide()},e.prototype.didHide=function(){this.visible=!1,this.visibleDisposables=k.dispose(this.visibleDisposables),this.onDidHideEmitter.fire()},e.prototype.update=function(){var e=this;if(this.visible){var t=this.getTitle();if(this.ui.title.textContent!==t&&(this.ui.title.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=f.TPromise.timeout(800),
this.busyDelay.then(function(){e.visible&&e.ui.progressBar.infinite()},function(){})),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=null),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();var n=this.buttons.filter(function(e){return e===H});this.ui.leftActionBar.push(n.map(function(t,n){var i=new P.Action("id-"+n,"",V(t.iconPath),!0,function(){return e.onDidTriggerButtonEmitter.fire(t)});return i.tooltip=t.tooltip,i}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();var i=this.buttons.filter(function(e){return e!==H});this.ui.rightActionBar.push(i.map(function(t,n){var i=new P.Action("id-"+n,"",V(t.iconPath),!0,function(){return e.onDidTriggerButtonEmitter.fire(t)});return i.tooltip=t.tooltip,i}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled)}},e.prototype.getTitle=function(){
return this.title&&this.step?this.title+" ("+this.getSteps()+")":this.title?this.title:this.step?this.getSteps():""},e.prototype.getSteps=function(){return this.step&&this.totalSteps?b.localize(1,null,this.step,this.totalSteps):this.step?String(this.step):""},e.prototype.dispose=function(){this.hide(),this.disposables=k.dispose(this.disposables)},e}(),U=function(e){function t(t){var n=e.call(this,t)||this;return n._value="",n.onDidChangeValueEmitter=new T.Emitter,n.onDidAcceptEmitter=new T.Emitter,n._items=[],n.itemsUpdated=!1,n._canSelectMany=!1,n._matchOnDescription=!1,n._matchOnDetail=!1,n._activeItems=[],n.activeItemsUpdated=!1,n.activeItemsToConfirm=[],n.onDidChangeActiveEmitter=new T.Emitter,n._selectedItems=[],n.selectedItemsUpdated=!1,n.selectedItemsToConfirm=[],n.onDidChangeSelectionEmitter=new T.Emitter,n.quickNavigate=!1,n.onDidChangeValue=n.onDidChangeValueEmitter.event,n.onDidAccept=n.onDidAcceptEmitter.event,n.onDidChangeActive=n.onDidChangeActiveEmitter.event,
n.onDidChangeSelection=n.onDidChangeSelectionEmitter.event,n.disposables.push(n.onDidChangeValueEmitter,n.onDidAcceptEmitter,n.onDidChangeActiveEmitter,n.onDidChangeSelectionEmitter),n}return n(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e||"",this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},set:function(e){this._items=e,this.itemsUpdated=!0,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canSelectMany",{get:function(){return this._canSelectMany},set:function(e){this._canSelectMany=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"matchOnDescription",{get:function(){return this._matchOnDescription},set:function(e){
this._matchOnDescription=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"matchOnDetail",{get:function(){return this._matchOnDetail},set:function(e){this._matchOnDetail=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeItems",{get:function(){return this._activeItems},set:function(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItems",{get:function(){return this._selectedItems},set:function(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()},enumerable:!0,configurable:!0}),t.prototype.show=function(){var t=this;this.visible||this.visibleDisposables.push(this.ui.inputBox.onDidChange(function(e){e!==t.value&&(t._value=e,t.ui.list.filter(t.ui.inputBox.value),t.canSelectMany||t.ui.list.focus("First"),t.onDidChangeValueEmitter.fire(e))}),this.ui.inputBox.onKeyDown(function(e){switch(e.keyCode){case 18:t.ui.list.focus("Next"),
t.canSelectMany&&t.ui.list.domFocus();break;case 16:t.ui.list.focus("Previous"),t.canSelectMany&&t.ui.list.domFocus()}}),this.ui.onDidAccept(function(){!t.canSelectMany&&t.activeItems[0]&&(t._selectedItems=[t.activeItems[0]],t.onDidChangeSelectionEmitter.fire(t.selectedItems)),t.onDidAcceptEmitter.fire()}),this.ui.list.onDidChangeFocus(function(e){t.activeItemsUpdated||t.activeItemsToConfirm!==t._activeItems&&B.equals(e,t._activeItems,function(e,t){return e===t})||(t._activeItems=e,t.onDidChangeActiveEmitter.fire(e))}),this.ui.list.onDidChangeSelection(function(e){t.canSelectMany||t.selectedItemsToConfirm!==t._selectedItems&&B.equals(e,t._selectedItems,function(e,t){return e===t})||(t._selectedItems=e,t.onDidChangeSelectionEmitter.fire(e),t.onDidAcceptEmitter.fire())}),this.ui.list.onChangedCheckedElements(function(e){t.canSelectMany&&(t.selectedItemsToConfirm!==t._selectedItems&&B.equals(e,t._selectedItems,function(e,t){return e===t})||(t._selectedItems=e,t.onDidChangeSelectionEmitter.fire(e)))})),
e.prototype.show.call(this)},t.prototype.update=function(){e.prototype.update.call(this),this.visible&&(this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.itemsUpdated&&(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.ui.inputBox.value),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.count.setCount(this.ui.list.getCheckedCount()),this.canSelectMany||this.ui.list.focus("First")),this.ui.container.classList.contains("show-checkboxes")!==this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.ui.list.focus("First")),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.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.setVisibilities(this.canSelectMany?{title:!!this.title||!!this.step,checkAll:!0,inputBox:!0,count:!0,ok:!0,list:!0}:{title:!!this.title||!!this.step,inputBox:!0,list:!0}))},t.prototype.configureQuickNavigate=function(e){var t=this;this.canSelectMany||this.quickNavigate||(this.quickNavigate=!0,this.disposables.push(s.addDisposableListener(this.ui.container,s.EventType.KEY_UP,function(n){var i=new y.StandardKeyboardEvent(n),r=i.keyCode,o=e.keybindings;(3===r||o.some(function(e){var t=e.getParts(),n=t[0];return!t[1]&&(n.shiftKey&&4===r?!(i.ctrlKey||i.altKey||i.metaKey):!(!n.altKey||6!==r)||(!(!n.ctrlKey||5!==r)||!(!n.metaKey||57!==r)))
}))&&t.activeItems[0]&&(t._selectedItems=[t.activeItems[0]],t.onDidChangeSelectionEmitter.fire(t.selectedItems),t.onDidAcceptEmitter.fire())})))},t}(K),G=function(e){function t(n){var i=e.call(this,n)||this;return i._value="",i.valueSelectionUpdated=!0,i._password=!1,i.noValidationMessage=t.noPromptMessage,i.onDidValueChangeEmitter=new T.Emitter,i.onDidAcceptEmitter=new T.Emitter,i.onDidChangeValue=i.onDidValueChangeEmitter.event,i.onDidAccept=i.onDidAcceptEmitter.event,i.disposables.push(i.onDidValueChangeEmitter,i.onDidAcceptEmitter),i}return n(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e||"",this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueSelection",{set:function(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.update()
},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"password",{get:function(){return this._password},set:function(e){this._password=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prompt",{get:function(){return this._prompt},set:function(e){this._prompt=e,this.noValidationMessage=e?b.localize(3,null,e):t.noPromptMessage,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validationMessage",{get:function(){return this._validationMessage},set:function(e){this._validationMessage=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.show=function(){var t=this;this.visible||this.visibleDisposables.push(this.ui.inputBox.onDidChange(function(e){e!==t.value&&(t._value=e,t.onDidValueChangeEmitter.fire(e))}),this.ui.onDidAccept(function(){return t.onDidAcceptEmitter.fire()})),e.prototype.show.call(this)},t.prototype.update=function(){e.prototype.update.call(this),
this.visible&&(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||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password),this.validationMessage||this.ui.message.textContent===this.noValidationMessage||(this.ui.message.textContent=this.noValidationMessage,this.ui.inputBox.showDecoration(D.default.Ignore)),this.validationMessage&&this.ui.message.textContent!==this.validationMessage&&(this.ui.message.textContent=this.validationMessage,this.ui.inputBox.showDecoration(D.default.Error)),this.ui.setVisibilities({title:!!this.title||!!this.step,inputBox:!0,message:!0}))},t.noPromptMessage=b.localize(2,null),t}(K),j=function(e){function t(n,i,r,o,s,a,c,l,u){var d=e.call(this,t.ID,u)||this
;return d.environmentService=n,d.configurationService=i,d.instantiationService=r,d.partService=o,d.quickOpenService=s,d.editorGroupService=a,d.keybindingService=c,d.enabled=!0,d.inQuickOpenWidgets={},d.onDidAcceptEmitter=new T.Emitter,d.onDidTriggerButtonEmitter=new T.Emitter,d.backButton=H,d.inQuickOpenContext=new L.RawContextKey("inQuickOpen",!1).bindTo(l),d.toUnbind.push(d.quickOpenService.onShow(function(){return d.inQuickOpen("quickOpen",!0)}),d.quickOpenService.onHide(function(){return d.inQuickOpen("quickOpen",!1)}),d.onDidAcceptEmitter),d}return n(t,e),t.prototype.inQuickOpen=function(e,t){t?this.inQuickOpenWidgets[e]=!0:delete this.inQuickOpenWidgets[e],Object.keys(this.inQuickOpenWidgets).length?this.inQuickOpenContext.get()||this.inQuickOpenContext.set(!0):this.inQuickOpenContext.get()&&this.inQuickOpenContext.reset()},t.prototype.create=function(){var e=this;if(!this.ui){var t=document.getElementById(this.partService.getWorkbenchElementId()),n=s.append(t,z(".quick-input-widget"));n.tabIndex=-1,
n.style.display="none",this.titleBar=s.append(n,z(".quick-input-titlebar"));var i=new M.ActionBar(this.titleBar);i.domNode.classList.add("quick-input-left-action-bar"),this.toUnbind.push(i);var r=s.append(this.titleBar,z(".quick-input-title")),o=new M.ActionBar(this.titleBar);o.domNode.classList.add("quick-input-right-action-bar"),this.toUnbind.push(o);var a=s.append(n,z(".quick-input-header")),c=s.append(a,z("input.quick-input-check-all"));c.type="checkbox",this.toUnbind.push(s.addStandardDisposableListener(c,s.EventType.CHANGE,function(e){var t=c.checked;p.setAllVisibleChecked(t)})),this.toUnbind.push(s.addDisposableListener(c,s.EventType.CLICK,function(e){(e.x||e.y)&&l.setFocus()})),this.filterContainer=s.append(a,z(".quick-input-filter"));var l=new m.QuickInputBox(this.filterContainer);this.toUnbind.push(l),this.countContainer=s.append(this.filterContainer,z(".quick-input-count"));var u=new C.CountBadge(this.countContainer,{countFormat:b.localize(4,null)})
;this.toUnbind.push(E.attachBadgeStyler(u,this.themeService)),this.okContainer=s.append(a,z(".quick-input-action")),this.ok=new x.Button(this.okContainer),E.attachButtonStyler(this.ok,this.themeService),this.ok.label=b.localize(5,null),this.toUnbind.push(this.ok.onDidClick(function(t){e.onDidAcceptEmitter.fire()}));var d=s.append(n,z(".quick-input-message")),h=new I.ProgressBar(n);s.addClass(h.getContainer(),"quick-input-progress"),this.toUnbind.push(E.attachProgressBarStyler(h,this.themeService));var p=this.instantiationService.createInstance(v.QuickInputList,n);this.toUnbind.push(p),this.toUnbind.push(p.onChangedAllVisibleChecked(function(e){c.checked=e})),this.toUnbind.push(p.onChangedCheckedCount(function(e){u.setCount(e)})),this.toUnbind.push(p.onLeave(function(){setTimeout(function(){l.setFocus(),p.clearFocus()},0)})),this.toUnbind.push(s.addDisposableListener(n,"focusout",function(t){if(t.relatedTarget!==n){for(var i=t.relatedTarget;i;i=i.parentElement)if(i===n)return
;e.ui.ignoreFocusOut||e.environmentService.args["sticky-quickopen"]||!e.configurationService.getValue(_.CLOSE_ON_FOCUS_LOST_CONFIG)||e.hide(!0)}else t.target.focus()})),this.toUnbind.push(s.addDisposableListener(n,s.EventType.KEY_DOWN,function(t){var i=new y.StandardKeyboardEvent(t);switch(i.keyCode){case 3:s.EventHelper.stop(t,!0),e.onDidAcceptEmitter.fire();break;case 9:s.EventHelper.stop(t,!0),e.hide();break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){var r=[].slice.call(n.querySelectorAll(".action-label.icon"));n.classList.contains("show-checkboxes")?r.push.apply(r,[].slice.call(n.querySelectorAll("input"))):r.push.apply(r,[].slice.call(n.querySelectorAll("input[type=text]"))),i.shiftKey&&i.target===r[0]?(s.EventHelper.stop(t,!0),r[r.length-1].focus()):i.shiftKey||i.target!==r[r.length-1]||(s.EventHelper.stop(t,!0),r[0].focus())}}})),this.toUnbind.push(this.quickOpenService.onShow(function(){return e.hide(!0)})),this.ui={container:n,leftActionBar:i,title:r,rightActionBar:o,checkAll:c,inputBox:l,count:u,
message:d,progressBar:h,list:p,onDidAccept:this.onDidAcceptEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,show:function(t){return e.show(t)},hide:function(){return e.hide()},setVisibilities:function(t){return e.setVisibilities(t)},setEnabled:function(t){return e.setEnabled(t)}},this.updateStyles()}},t.prototype.pick=function(e,t,n){var i=this;return void 0===t&&(t={}),void 0===n&&(n=g.CancellationToken.None),new f.TPromise(function(r,o,s){if(n.isCancellationRequested)r(void 0);else{var a=i.createQuickPick(),c=[a,a.onDidAccept(function(){if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{var e=a.activeItems[0];e&&(r(e),a.hide())}}),a.onDidChangeActive(function(e){var t=e[0];t&&s(t)}),a.onDidChangeSelection(function(e){if(!a.canSelectMany){var t=e[0];t&&(r(t),a.hide())}}),n.onCancellationRequested(function(){a.hide()}),a.onDidHide(function(){k.dispose(c),r(void 0)})];a.canSelectMany=t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=t.ignoreFocusLost,
a.matchOnDescription=t.matchOnDescription,a.matchOnDetail=t.matchOnDetail,a.busy=!0,e.then(function(e){a.busy=!1,a.items=e,a.canSelectMany&&(a.selectedItems=e.filter(function(e){return e.picked}))}),a.show(),e.then(null,function(e){o(e),a.hide()})}})},t.prototype.input=function(e,t){var n=this;return void 0===e&&(e={}),void 0===t&&(t=g.CancellationToken.None),new f.TPromise(function(i,r){if(t.isCancellationRequested)i(void 0);else{var o=n.createInputBox(),s=e.validateInput||function(){return f.TPromise.as(void 0)},a=T.debounceEvent(o.onDidChangeValue,function(e,t){return t},100),c=e.value||"",l=f.TPromise.wrap(s(c)),u=[o,a(function(e){e!==c&&(l=f.TPromise.wrap(s(e)),c=e),l.then(function(t){e===c&&(o.validationMessage=t)})}),o.onDidAccept(function(){var e=o.value;e!==c&&(l=f.TPromise.wrap(s(e)),c=e),l.then(function(t){t?e===c&&(o.validationMessage=t):(i(e),o.hide())})}),t.onCancellationRequested(function(){o.hide()}),o.onDidHide(function(){k.dispose(u),i(void 0)})];o.value=e.value,
o.valueSelection=e.valueSelection,o.prompt=e.prompt,o.placeholder=e.placeHolder,o.password=e.password,o.ignoreFocusOut=e.ignoreFocusLost,o.show()}})},t.prototype.createQuickPick=function(){return this.create(),new U(this.ui)},t.prototype.createInputBox=function(){return this.create(),new G(this.ui)},t.prototype.show=function(e){this.create(),this.quickOpenService.close();var t=this.controller;this.controller=e,t&&t.didHide(),this.setEnabled(!0),this.ui.leftActionBar.clear(),this.ui.title.textContent="",this.ui.rightActionBar.clear(),this.ui.checkAll.checked=!1,this.ui.inputBox.placeholder="",this.ui.inputBox.password=!1,this.ui.inputBox.showDecoration(D.default.Ignore),this.ui.count.setCount(0),this.ui.message.textContent="",this.ui.progressBar.stop(),this.ui.list.setElements([]),this.ui.list.matchOnDescription=!1,this.ui.list.matchOnDetail=!1,this.ui.ignoreFocusOut=!1;var n=this.keybindingService.lookupKeybinding(Y.ID);H.tooltip=n?b.localize(6,null,n.getLabel()):b.localize(7,null),
this.inQuickOpen("quickInput",!0),this.ui.container.style.display="",this.updateLayout(),this.ui.inputBox.setFocus()},t.prototype.setVisibilities=function(e){this.ui.title.style.display=e.title?"":"none",this.ui.checkAll.style.display=e.checkAll?"":"none",this.filterContainer.style.display=e.inputBox?"":"none",this.countContainer.style.display=e.count?"":"none",this.okContainer.style.display=e.ok?"":"none",this.ui.message.style.display=e.message?"":"none",this.ui.list.display(e.list),this.ui.container.classList[e.checkAll?"add":"remove"]("show-checkboxes"),this.updateLayout()},t.prototype.setEnabled=function(e){if(e!==this.enabled){this.enabled=e;for(var t=0,n=this.ui.leftActionBar.items;t<n.length;t++){(o=n[t]).getAction().enabled=e}for(var i=0,r=this.ui.rightActionBar.items;i<r.length;i++){var o=r[i];o.getAction().enabled=e}this.ui.checkAll.disabled=!e,this.ok.enabled=e,this.ui.list.enabled=e}},t.prototype.hide=function(e){var t=this.controller;t&&(this.controller=null,this.inQuickOpen("quickInput",!1),
this.ui.container.style.display="none",e||this.editorGroupService.activeGroup.focus(),t.didHide())},t.prototype.focus=function(){this.isDisplayed()&&this.ui.inputBox.setFocus()},t.prototype.toggle=function(){this.isDisplayed()&&this.controller instanceof U&&this.controller.canSelectMany&&this.ui.list.toggleCheckbox()},t.prototype.navigate=function(e,t){this.isDisplayed()&&this.ui.list.isDisplayed()&&(this.ui.list.focus(e?"Next":"Previous"),t&&this.controller instanceof U&&this.controller.configureQuickNavigate(t))},t.prototype.accept=function(){return this.onDidAcceptEmitter.fire(),f.TPromise.as(void 0)},t.prototype.back=function(){return this.onDidTriggerButtonEmitter.fire(this.backButton),f.TPromise.as(void 0)},t.prototype.cancel=function(){return this.hide(),f.TPromise.as(void 0)},t.prototype.layout=function(e){this.layoutDimensions=e,this.updateLayout()},t.prototype.updateLayout=function(){if(this.layoutDimensions&&this.ui){var e=this.partService.getTitleBarOffset();this.ui.container.style.top=e+"px"
;var n=this.ui.container.style,i=Math.min(.62*this.layoutDimensions.width,t.MAX_WIDTH);n.width=i+"px",n.marginLeft="-"+i/2+"px",this.ui.inputBox.layout(),this.ui.list.layout()}},t.prototype.updateStyles=function(){var e=this.themeService.getTheme();if(this.ui){var t={dark:"rgba(255, 255, 255, 0.105)",light:"rgba(0,0,0,.06)",hc:"black"}[e.type];this.titleBar.style.backgroundColor=t?t.toString():void 0,this.ui.inputBox.style(e);var n=e.getColor(h.SIDE_BAR_BACKGROUND);this.ui.container.style.backgroundColor=n?n.toString():void 0;var i=e.getColor(h.SIDE_BAR_FOREGROUND);this.ui.container.style.color=i?i.toString():void 0;var r=e.getColor(d.contrastBorder);this.ui.container.style.border=r?"1px solid "+r:void 0;var o=e.getColor(d.widgetShadow);this.ui.container.style.boxShadow=o?"0 5px 8px "+o:void 0}},t.prototype.isDisplayed=function(){return this.ui&&"none"!==this.ui.container.style.display},t.ID="workbench.component.quickinput",t.MAX_WIDTH=600,
t=a([l(0,w.IEnvironmentService),l(1,S.IConfigurationService),l(2,c.IInstantiationService),l(3,o.IPartService),l(4,p.IQuickOpenService),l(5,A.IEditorGroupsService),l(6,W.IKeybindingService),l(7,L.IContextKeyService),l(8,u.IThemeService)],t)}(i.Component);t.QuickInputService=j;var q={},$=new F.IdGenerator("quick-input-button-icon-");t.QuickPickManyToggle={id:"workbench.action.quickPickManyToggle",weight:R.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:O.inQuickOpenContext,primary:void 0,handler:function(e){e.get(r.IQuickInputService).toggle()}};var Y=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.quickInputService=i,r}return n(t,e),t.prototype.run=function(){return this.quickInputService.back(),f.TPromise.as(null)},t.ID="workbench.action.quickInputBack",t.LABEL=b.localize(8,null),t=a([l(2,r.IQuickInputService)],t)}(P.Action);t.BackAction=Y}),define(e[1364],t([1,0,474,52,16,56,31,164]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
i.KeybindingsRegistry.registerCommandAndKeybindingRule(n.QuickPickManyToggle);r.Registry.as(o.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(n.BackAction,n.BackAction.ID,n.BackAction.LABEL,{primary:null,win:{primary:527},mac:{primary:339},linux:{primary:2643}},a.inQuickOpenContext,i.KeybindingsRegistry.WEIGHT.workbenchContrib(50)),"Back")}),define(e[1365],t([1,0,4,74,25,200,78,42,9,35,82,23,17,21,5,1578,62,40,36,27,12,69,11,51,14,8,46,861]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var A=function(e){function t(t,n,i,r,o,s,a,c,l,u){var d=e.call(this,t,{hasTitle:!1},u)||this;return d.contextMenuService=n,d.windowService=i,d.configurationService=r,d.windowsService=o,d.editorService=s,d.environmentService=a,d.contextService=c,d.partService=l,d.initialSizing=Object.create(null),d.properties={isPure:!0,isAdmin:!1},d.activeEditorListeners=[],d.registerListeners(),d}return n(t,e),
t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(k.addDisposableListener(window,k.EventType.BLUR,function(){return e.onBlur()})),this.toUnbind.push(k.addDisposableListener(window,k.EventType.FOCUS,function(){return e.onFocus()})),this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationChanged(t)})),this.toUnbind.push(this.editorService.onDidActiveEditorChange(function(){return e.onActiveEditorChange()})),this.toUnbind.push(this.contextService.onDidChangeWorkspaceFolders(function(){return e.setTitle(e.getWindowTitle())})),this.toUnbind.push(this.contextService.onDidChangeWorkbenchState(function(){return e.setTitle(e.getWindowTitle())})),this.toUnbind.push(this.contextService.onDidChangeWorkspaceName(function(){return e.setTitle(e.getWindowTitle())})),this.toUnbind.push(this.partService.onMenubarVisibilityChange(this.onMenubarVisibilityChanged,this))},t.prototype.onBlur=function(){this.isInactive=!0,this.updateStyles()},
t.prototype.onFocus=function(){this.isInactive=!1,this.updateStyles()},t.prototype.onConfigurationChanged=function(e){e.affectsConfiguration("window.title")&&this.setTitle(this.getWindowTitle())},t.prototype.onMenubarVisibilityChanged=function(e){this.menubarWidth=e.width,this.updateLayout()},t.prototype.onActiveEditorChange=function(){var e=this;m.dispose(this.activeEditorListeners),this.activeEditorListeners=[],this.setTitle(this.getWindowTitle());var t=this.editorService.activeEditor;t instanceof S.EditorInput&&(this.activeEditorListeners.push(t.onDidChangeDirty(function(){e.setTitle(e.getWindowTitle())})),this.activeEditorListeners.push(t.onDidChangeLabel(function(){e.setTitle(e.getWindowTitle())}))),this.updateRepresentedFilename()},t.prototype.updateRepresentedFilename=function(){var e=S.toResource(this.editorService.activeEditor,{supportSideBySide:!0,filter:"file"}),t=e?e.fsPath:"";this.windowService.setRepresentedFilename(t),this.representedFileName=t},t.prototype.getWindowTitle=function(){
var e=this.doGetWindowTitle();return x.trim(e)||(e=this.environmentService.appNameLong),this.properties.isAdmin&&(e=e+" "+t.NLS_USER_IS_ADMIN),this.properties.isPure||(e=e+" "+t.NLS_UNSUPPORTED),this.environmentService.isExtensionDevelopment&&(e=t.NLS_EXTENSION_HOST+" - "+e),e},t.prototype.updateProperties=function(e){var t="boolean"==typeof e.isAdmin?e.isAdmin:this.properties.isAdmin,n="boolean"==typeof e.isPure?e.isPure:this.properties.isPure;t===this.properties.isAdmin&&n===this.properties.isPure||(this.properties.isAdmin=t,this.properties.isPure=n,this.setTitle(this.getWindowTitle()))},t.prototype.doGetWindowTitle=function(){var e,n=this.editorService.activeEditor,i=this.contextService.getWorkspace();i.configuration?e=i.configuration:i.folders.length&&(e=i.folders[0].uri);var r=this.contextService.getWorkbenchState()===C.WorkbenchState.FOLDER?i.folders[0]:this.contextService.getWorkspaceFolder(S.toResource(n,{supportSideBySide:!0
})),o=n?n.getTitle(S.Verbosity.SHORT):"",s=n?n.getTitle(S.Verbosity.MEDIUM):o,a=n?n.getTitle(S.Verbosity.LONG):s,c=i.name,l=e?b.getPathLabel(e,this.environmentService):"",u=r?r.name:"",d=r?b.getPathLabel(r.uri,this.environmentService):"",h=n&&n.isDirty()?t.TITLE_DIRTY:"",p=this.environmentService.appNameLong,f=t.TITLE_SEPARATOR,g=this.configurationService.getValue("window.title");return b.template(g,{activeEditorShort:o,activeEditorLong:a,activeEditorMedium:s,rootName:c,rootPath:l,folderName:u,folderPath:d,dirty:h,appName:p,separator:{label:f}})},t.prototype.createContentArea=function(e){var t=this;if(this.titleContainer=r.$(e),I.isMacintosh||(this.appIcon=r.$(this.titleContainer).div({class:"window-appicon"}).on(k.EventType.DBLCLICK,function(e){k.EventHelper.stop(e,!0),t.windowService.closeWindow().then(null,d.onUnexpectedError)}),r.$(this.titleContainer).div({class:"resizer"})),this.title=r.$(this.titleContainer).div({class:"window-title"}),
this.pendingTitle?this.title.text(this.pendingTitle):this.setTitle(this.getWindowTitle()),this.titleContainer.on(k.EventType.DBLCLICK,function(e){k.EventHelper.stop(e),t.onTitleDoubleclick()}),this.title.on([k.EventType.CONTEXT_MENU,k.EventType.MOUSE_DOWN],function(e){(e.type===k.EventType.CONTEXT_MENU||e.metaKey)&&(k.EventHelper.stop(e),t.onContextMenu(e))}),!I.isMacintosh){this.windowControls=r.$(this.titleContainer).div({class:"window-controls-container"}),r.$(this.windowControls).div({class:"window-icon window-minimize"}).on(k.EventType.CLICK,function(){t.windowService.minimizeWindow().then(null,d.onUnexpectedError)}),r.$(this.windowControls).div({class:"window-icon window-max-restore"}).on(k.EventType.CLICK,function(){t.windowService.isMaximized().then(function(e){return e?t.windowService.unmaximizeWindow():t.windowService.maximizeWindow()}).then(null,d.onUnexpectedError)}),r.$(this.windowControls).div({class:"window-icon window-close"}).on(k.EventType.CLICK,function(){
t.windowService.closeWindow().then(null,d.onUnexpectedError)});var n=!!this.windowService.getConfiguration().maximized;this.onDidChangeMaximized(n),this.windowService.onDidChangeMaximize(this.onDidChangeMaximized,this)}return this.titleContainer.on([k.EventType.MOUSE_DOWN],function(){var e=document.activeElement;setTimeout(function(){e instanceof HTMLElement&&e.focus()},0)},void 0,!0),this.titleContainer.getHTMLElement()},t.prototype.onDidChangeMaximized=function(e){var t=r.$(this.titleContainer).getHTMLElement().querySelector(".window-max-restore");t&&(e?(k.removeClass(t,"window-maximize"),k.addClass(t,"window-unmaximize")):(k.removeClass(t,"window-unmaximize"),k.addClass(t,"window-maximize")))},t.prototype.updateStyles=function(){if(e.prototype.updateStyles.call(this),this.titleContainer){var t=this.getColor(this.isInactive?w.TITLE_BAR_INACTIVE_BACKGROUND:w.TITLE_BAR_ACTIVE_BACKGROUND);this.titleContainer.style("background-color",t),
T.Color.fromHex(t).isLighter()?this.titleContainer.addClass("light"):this.titleContainer.removeClass("light");var n=this.getColor(this.isInactive?w.TITLE_BAR_INACTIVE_FOREGROUND:w.TITLE_BAR_ACTIVE_FOREGROUND);this.titleContainer.style("color",n);var i=this.getColor(w.TITLE_BAR_BORDER);this.titleContainer.style("border-bottom",i?"1px solid "+i:null)}},t.prototype.onTitleDoubleclick=function(){this.windowService.onWindowTitleDoubleClick().then(null,d.onUnexpectedError)},t.prototype.onContextMenu=function(e){var t=new p.StandardMouseEvent(e),n={x:t.posx,y:t.posy},r=this.getContextMenuActions();r.length&&this.contextMenuService.showContextMenu({getAnchor:function(){return n},getActions:function(){return i.TPromise.as(r)},onHide:function(){return r.forEach(function(e){return e.dispose()})}})},t.prototype.getContextMenuActions=function(){var e=[];if(this.representedFileName)for(var t=this.representedFileName.split(o.sep),n=t.length;n>0;n--){var i=n===t.length,r=n;i||r++;var s=t.slice(0,r).join(o.sep),a=void 0
;a=i?b.getBaseLabel(s):b.getBaseLabel(o.dirname(s)),e.push(new L(s,a||o.sep,this.windowsService))}return e},t.prototype.setTitle=function(e){window.document.title=e,this.title?this.title.text(e):this.pendingTitle=e},t.prototype.updateLayout=function(){"number"!=typeof this.initialSizing.titleFontSize&&(this.initialSizing.titleFontSize=parseInt(this.titleContainer.getComputedStyle().fontSize,10)),"number"!=typeof this.initialSizing.titlebarHeight&&(this.initialSizing.titlebarHeight=parseInt(this.titleContainer.getComputedStyle().height,10));var e=this.initialSizing.titlebarHeight/c.getZoomFactor();if(this.titleContainer.style({fontSize:this.initialSizing.titleFontSize/c.getZoomFactor()+"px","line-height":e+"px"}),I.isWindows||I.isLinux){"number"!=typeof this.initialSizing.controlsWidth&&(this.initialSizing.controlsWidth=parseInt(this.windowControls.getComputedStyle().width,10)),
"number"!=typeof this.initialSizing.appIconWidth&&(this.initialSizing.appIconWidth=parseInt(this.appIcon.getComputedStyle().width,10)),"number"!=typeof this.initialSizing.appIconSize&&(this.initialSizing.appIconSize=parseInt(this.appIcon.getComputedStyle().backgroundSize,10));var t=parseInt(this.appIcon.getComputedStyle().height,10),n=this.initialSizing.controlsWidth/c.getZoomFactor(),i=this.initialSizing.appIconWidth/c.getZoomFactor(),r=this.initialSizing.appIconSize/c.getZoomFactor();this.menubarWidth||(this.menubarWidth=0);var o=i+(parseInt(this.titleContainer.getComputedStyle().width,10)-i-n-parseInt(this.title.getComputedStyle().width,10))/2,s=this.menubarWidth;i+this.menubarWidth<o&&(s=0),this.appIcon.style({width:i+"px","background-size":r+"px","margin-right":n-i+s+"px","padding-top":(e-t)/2+"px","padding-bottom":(e-t)/2+"px"}),this.windowControls.style({width:n+"px"})
;"toggle"===this.configurationService.getValue("window.menuBarVisibility")&&this.menubarWidth?this.title.style("visibility","hidden"):this.title.style("visibility",null)}},t.prototype.layout=function(t){return this.updateLayout(),e.prototype.layout.call(this,t)},t.NLS_UNSUPPORTED=y.localize(0,null),t.NLS_USER_IS_ADMIN=I.isWindows?y.localize(1,null):y.localize(2,null),t.NLS_EXTENSION_HOST=y.localize(3,null),t.TITLE_DIRTY="● ",t.TITLE_SEPARATOR=I.isMacintosh?" — ":" - ",t=a([l(1,h.IContextMenuService),l(2,u.IWindowService),l(3,g.IConfigurationService),l(4,u.IWindowsService),l(5,v.IEditorService),l(6,_.IEnvironmentService),l(7,C.IWorkspaceContextService),l(8,D.IPartService),l(9,E.IThemeService)],t)}(s.Part);t.TitlebarPart=A;var L=function(e){function t(t,n,i){var r=e.call(this,"showItemInFolder.action.id",n)||this;return r.path=t,r.windowsService=i,r}return n(t,e),t.prototype.run=function(){return this.windowsService.showItemInFolder(this.path)},t}(f.Action)}),
define(e[1366],t([1,0,73,52,46,42,169,9,29,58,427,20,15,40]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p){"use strict";function f(e){e&&!e.isDOMFocused()&&e.domFocus()}Object.defineProperty(t,"__esModule",{value:!0}),t.registerCommands=function(){function e(e,t){var n=e.get(l.IListService).lastFocusedList,i="number"==typeof t?t:1;if(f(n),n instanceof s.List||n instanceof u.PagedList){var r=n;r.focusNext(i);var o=r.getFocus();o.length&&r.reveal(o[0])}else if(n){var c=n;c.focusNext(i,{origin:"keyboard"}),c.reveal(c.getFocus()).done(null,a.onUnexpectedError)}}function t(e,t){if(e instanceof s.List||e instanceof u.PagedList){var n=e,i=n.getFocus()?n.getFocus()[0]:void 0;(a=n.getSelection())&&a.indexOf(i)>=0?n.setSelection(a.filter(function(e){return e!==t})):n.setSelection(a.concat(i))}else if(e){var r=e,o=r.getFocus(),a=r.getSelection();a&&a.indexOf(o)>=0?r.setSelection(a.filter(function(e){return e!==t})):r.setSelection(a.concat(o))}}function g(e,t){var n=e.get(l.IListService).lastFocusedList,i="number"==typeof t?t:1
;if(f(n),n instanceof s.List||n instanceof u.PagedList){var r=n;r.focusPrevious(i);var o=r.getFocus();o.length&&r.reveal(o[0])}else if(n){var c=n;c.focusPrevious(i,{origin:"keyboard"}),c.reveal(c.getFocus()).done(null,a.onUnexpectedError)}}function v(e,t){var n=e.get(l.IListService).lastFocusedList;if(f(n),n instanceof s.List||n instanceof u.PagedList){var i=n;i.setFocus([0]),i.reveal(0)}else if(n){var r=n;r.focusFirst({origin:"keyboard"},t&&t.fromFocused?r.getFocus():void 0),r.reveal(r.getFocus()).done(null,a.onUnexpectedError)}}function m(e,t){var n=e.get(l.IListService).lastFocusedList;if(f(n),n instanceof s.List||n instanceof u.PagedList){var i=n;i.setFocus([i.length-1]),i.reveal(i.length-1)}else if(n){var r=n;r.focusLast({origin:"keyboard"},t&&t.fromFocused?r.getFocus():void 0),r.reveal(r.getFocus()).done(null,a.onUnexpectedError)}}i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusDown",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,
primary:18,mac:{primary:18,secondary:[300]},handler:function(t,n){return e(t,n)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionDown",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:1042,handler:function(n,i){var r=n.get(l.IListService).lastFocusedList;if(r instanceof s.List||r instanceof u.PagedList){var o=r,a=o.getFocus()?o.getFocus()[0]:void 0;e(n,i),t(r,a)}else r&&(a=r.getFocus(),e(n,i),t(r,a))}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusUp",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:16,mac:{primary:16,secondary:[302]},handler:function(e,t){return g(e,t)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionUp",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:1040,handler:function(e,n){var i=e.get(l.IListService).lastFocusedList
;if(i instanceof s.List||i instanceof u.PagedList){var r=i,o=r.getFocus()?r.getFocus()[0]:void 0;g(e,n),t(i,o)}else i&&(o=i.getFocus(),g(e,n),t(i,o))}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapse",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:15,mac:{primary:15,secondary:[2064]},handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(t&&!(t instanceof s.List||t instanceof u.PagedList)){var n=t,i=n.getFocus();n.collapse(i).then(function(e){if(i&&!e)return n.focusParent({origin:"keyboard"}),n.reveal(n.getFocus())}).done(null,a.onUnexpectedError)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expand",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:17,handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(t&&!(t instanceof s.List||t instanceof u.PagedList)){var n=t,i=n.getFocus();n.expand(i).then(function(e){
if(i&&!e)return n.focusFirstChild({origin:"keyboard"}),n.reveal(n.getFocus())}).done(null,a.onUnexpectedError)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageUp",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:11,handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(f(t),t instanceof s.List||t instanceof u.PagedList){var n=t;n.focusPreviousPage(),n.reveal(n.getFocus()[0])}else if(t){var i=t;i.focusPreviousPage({origin:"keyboard"}),i.reveal(i.getFocus()).done(null,a.onUnexpectedError)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageDown",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:12,handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(f(t),t instanceof s.List||t instanceof u.PagedList){var n=t;n.focusNextPage(),n.reveal(n.getFocus()[0])}else if(t){var i=t;i.focusNextPage({origin:"keyboard"}),
i.reveal(i.getFocus()).done(null,a.onUnexpectedError)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirst",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:14,handler:function(e){return v(e)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirstChild",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:null,handler:function(e){return v(e,{fromFocused:!0})}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLast",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:13,handler:function(e){return m(e)}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLastChild",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:null,handler:function(e){return m(e,{fromFocused:!0})}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({
id:"list.select",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:3,mac:{primary:3,secondary:[2066]},handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(t instanceof s.List||t instanceof u.PagedList){var n=t;n.setSelection(n.getFocus()),n.open(n.getFocus())}else if(t){var i=t,r=i.getFocus();r&&i.setSelection([r],{origin:"keyboard"})}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAll",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:h.ContextKeyExpr.and(l.WorkbenchListFocusContextKey,l.WorkbenchListSupportsMultiSelectContextKey),primary:2079,handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(t instanceof s.List||t instanceof u.PagedList){var n=t;n.setSelection(d.range(n.length))}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleExpand",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:10,handler:function(e){
var t=e.get(l.IListService).lastFocusedList;if(t&&!(t instanceof s.List||t instanceof u.PagedList)){var n=t,i=n.getFocus();i&&n.toggleExpansion(i)}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.clear",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.WorkbenchListFocusContextKey,primary:9,handler:function(e){var t=e.get(l.IListService).lastFocusedList;if(t&&!(t instanceof s.List||t instanceof u.PagedList)){var n=t;if(n.getSelection().length)return void n.clearSelection({origin:"keyboard"});if(n.getFocus())return void n.clearFocus({origin:"keyboard"})}}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.closeWindow",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:h.ContextKeyExpr.and(p.NoEditorsVisibleContext,p.SingleEditorGroupsContext),primary:2101,handler:function(e){e.get(o.IWindowService).closeWindow()}}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.exitZenMode",
weight:i.KeybindingsRegistry.WEIGHT.editorContrib(-1e3),handler:function(e,t){e.get(r.IPartService).toggleZenMode()},when:p.InEditorZenModeContext,primary:n.KeyChord(9,9)}),i.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quit",weight:i.KeybindingsRegistry.WEIGHT.workbenchContrib(),handler:function(e){e.get(o.IWindowsService).quit()},when:void 0,primary:2095,win:{primary:void 0}}),c.CommandsRegistry.registerCommand("_workbench.removeFromRecentlyOpened",function(e,t){return e.get(o.IWindowsService).removeFromRecentlyOpened([t]).then(function(){})})}}),define(e[475],t([1,0,12,596,26,46,79,27,69,8]),function(e,t,i,r,o,s,c,u,d,h){"use strict";function p(e){if(e.state===c.State.Inactive||e.state===c.State.Initializing)return!1;var t=e.getViewModel().focusedSession;return!(t&&t.configuration&&t.configuration.noDebug)}Object.defineProperty(t,"__esModule",{value:!0}),t.STATUS_BAR_DEBUGGING_BACKGROUND=o.registerColor("statusBar.debuggingBackground",{dark:"#CC6633",light:"#CC6633",
hc:"#CC6633"},r.localize(0,null)),t.STATUS_BAR_DEBUGGING_FOREGROUND=o.registerColor("statusBar.debuggingForeground",{dark:d.STATUS_BAR_FOREGROUND,light:d.STATUS_BAR_FOREGROUND,hc:d.STATUS_BAR_FOREGROUND},r.localize(1,null)),t.STATUS_BAR_DEBUGGING_BORDER=o.registerColor("statusBar.debuggingBorder",{dark:d.STATUS_BAR_BORDER,light:d.STATUS_BAR_BORDER,hc:d.STATUS_BAR_BORDER},r.localize(2,null));var f=function(e){function r(t,n,i,r){var o=e.call(this,t)||this;return o.debugService=n,o.contextService=i,o.partService=r,o.registerListeners(),o.updateStyles(),o}return n(r,e),r.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.debugService.onDidChangeState(function(t){return e.updateStyles()})),this.toUnbind.push(this.contextService.onDidChangeWorkbenchState(function(t){return e.updateStyles()}))},r.prototype.updateStyles=function(){e.prototype.updateStyles.call(this);var n=this.partService.getContainer(s.Parts.STATUSBAR_PART)
;p(this.debugService)?h.addClass(n,"debugging"):h.removeClass(n,"debugging");var i=this.getColor(this.getColorKey(d.STATUS_BAR_NO_FOLDER_BACKGROUND,t.STATUS_BAR_DEBUGGING_BACKGROUND,d.STATUS_BAR_BACKGROUND));n.style.backgroundColor=i,n.style.color=this.getColor(this.getColorKey(d.STATUS_BAR_NO_FOLDER_FOREGROUND,t.STATUS_BAR_DEBUGGING_FOREGROUND,d.STATUS_BAR_FOREGROUND));var r=this.getColor(this.getColorKey(d.STATUS_BAR_NO_FOLDER_BORDER,t.STATUS_BAR_DEBUGGING_BORDER,d.STATUS_BAR_BORDER))||this.getColor(o.contrastBorder);n.style.borderTopWidth=r?"1px":null,n.style.borderTopStyle=r?"solid":null,n.style.borderTopColor=r,this.styleElement||(this.styleElement=h.createStyleSheet(n)),this.styleElement.innerHTML=".monaco-workbench > .part.statusbar > .statusbar-item.has-beak:before { border-bottom-color: "+i+" !important; }"},r.prototype.getColorKey=function(e,t,n){return p(this.debugService)?t:this.contextService.getWorkbenchState()!==u.WorkbenchState.EMPTY?n:e},
r=a([l(0,i.IThemeService),l(1,c.IDebugService),l(2,u.IWorkspaceContextService),l(3,s.IPartService)],r)}(d.Themable);t.StatusBarColorProvider=f,t.isStatusbarInDebugMode=p,i.registerThemingParticipant(function(e,n){var i=e.getColor(t.STATUS_BAR_DEBUGGING_FOREGROUND);i&&n.addRule(".monaco-workbench > .part.statusbar.debugging > .statusbar-item .mask-icon { background-color: "+i+" !important; }")})}),define(e[1368],t([1,0,592,8,9,5,64,12,79,69,17,475]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=r.$,v=function(e){function t(t,n,i,o){var s=e.call(this,i)||this;return s.quickOpenService=t,s.debugService=n,s.toDispose=[],s.toDispose.push(s.debugService.getConfigurationManager().onDidSelectConfiguration(function(e){s.setLabel()})),s.toDispose.push(s.debugService.onDidChangeState(function(e){e!==d.State.Inactive&&"onFirstSessionStart"===s.showInStatusBar&&s.doRender()})),s.showInStatusBar=o.getValue("debug").showInStatusBar,
s.toDispose.push(o.onDidChangeConfiguration(function(e){e.affectsConfiguration("debug.showInStatusBar")&&(s.showInStatusBar=o.getValue("debug").showInStatusBar,"always"===s.showInStatusBar&&s.doRender(),s.statusBarItem&&r.toggleClass(s.statusBarItem,"hidden","never"===s.showInStatusBar))})),s}return n(t,e),t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this),this.icon&&(f.isStatusbarInDebugMode(this.debugService)?this.icon.style.backgroundColor=this.getColor(f.STATUS_BAR_DEBUGGING_FOREGROUND):this.icon.style.backgroundColor=this.getColor(h.STATUS_BAR_FOREGROUND))},t.prototype.render=function(e){return this.container=e,"always"===this.showInStatusBar&&this.doRender(),this},t.prototype.doRender=function(){var e=this;if(!this.statusBarItem&&this.container){this.statusBarItem=r.append(this.container,g(".debug-statusbar-item")),this.toDispose.push(r.addDisposableListener(this.statusBarItem,"click",function(){e.quickOpenService.show("debug ").done(void 0,o.onUnexpectedError)})),
this.statusBarItem.title=i.localize(0,null);var t=r.append(this.statusBarItem,g("a"));this.icon=r.append(t,g(".icon")),this.label=r.append(t,g("span.label")),this.setLabel()}this.updateStyles()},t.prototype.setLabel=function(){if(this.label&&this.statusBarItem){var e=this.debugService.getConfigurationManager(),t=e.selectedConfiguration.name,n=t&&e.selectedConfiguration.launch;r.toggleClass(this.statusBarItem,"hidden","never"===this.showInStatusBar||!n),n&&(this.label.textContent=e.getLaunches().length>1?t+" ("+e.selectedConfiguration.launch.name+")":t)}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=s.dispose(this.toDispose)},t=a([l(0,c.IQuickOpenService),l(1,d.IDebugService),l(2,u.IThemeService),l(3,p.IConfigurationService)],t)}(h.Themable);t.DebugStatus=v}),define(e[476],t([1,0,18,8,23,35,108,228,201,46,81,28,117,12,68,368,7,41,26,666,246,6,185]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var T=function(e){function t(t,n,i,r,o){return e.call(this,t,n,d.default.MARKERS_PANEL_ID,r,i)||this}return n(t,e),t.ID="workbench.actions.view.problems",t.LABEL=u.default.MARKERS_PANEL_TOGGLE_LABEL,t=a([l(2,h.IPartService),l(3,p.IPanelService),l(4,y.IMarkersWorkbenchService)],t)}(c.TogglePanelAction);t.ToggleMarkersPanelAction=T;var x=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.panelService=i,r}return n(t,e),t.prototype.run=function(){return this.panelService.openPanel(d.default.MARKERS_PANEL_ID,!0)},t.ID="workbench.action.problems.focus",t.LABEL=u.default.MARKERS_PANEL_SHOW_LABEL,t=a([l(2,p.IPanelService)],t)}(o.Action);t.ShowProblemsPanelAction=x;var k=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t}(g.CollapseAllAction);t.CollapseAllAction=k;var D=function(e){function t(){return e.call(this,t.ID,u.default.MARKERS_PANEL_ACTION_TOOLTIP_FILTER,"markers-panel-action-filter",!0)||this}return n(t,e),t.ID="workbench.actions.problems.filter",t}(o.Action)
;t.MarkersFilterAction=D;var A=function(e){function t(t,n,r,o,s,a,c){var l=e.call(this,null,n)||this;return l.itemOptions=t,l.instantiationService=r,l.contextViewService=o,l.themeService=s,l.markersWorkbenchService=a,l.telemetryService=c,l._toDispose=[],l._onDidChange=l._register(new b.Emitter),l.onDidChange=l._onDidChange.event,l.delayedFilterUpdate=new i.Delayer(500),l}return n(t,e),t.prototype.render=function(e){this.container=e,r.addClass(this.container,"markers-panel-action-filter"),this.createInput(this.container),this.createControls(this.container),this.adjustInputBox()},t.prototype.clear=function(){this.filterInputBox.value=""},t.prototype.getFilterText=function(){return this.filterInputBox?this.filterInputBox.value:this.itemOptions.filterText},t.prototype.getFilterHistory=function(){return this.filterInputBox.getHistory()},Object.defineProperty(t.prototype,"useFilesExclude",{get:function(){return this.filesExcludeFilter?this.filesExcludeFilter.checked:this.itemOptions.useFilesExclude},
set:function(e){this.filesExcludeFilter&&this.filesExcludeFilter.checked!==e&&(this.filesExcludeFilter.checked=e,this._onDidChange.fire())},enumerable:!0,configurable:!0}),t.prototype.toggleLayout=function(e){this.container&&(r.toggleClass(this.container,"small",e),r.toggleClass(this.filterBadge,"small",e))},t.prototype.createInput=function(e){var t=this;this.filterInputBox=this._register(this.instantiationService.createInstance(I.ContextScopedHistoryInputBox,e,this.contextViewService,{placeholder:u.default.MARKERS_PANEL_FILTER_PLACEHOLDER,ariaLabel:u.default.MARKERS_PANEL_FILTER_ARIA_LABEL,history:this.itemOptions.filterHistory})),this._register(m.attachInputBoxStyler(this.filterInputBox,this.themeService)),this.filterInputBox.value=this.itemOptions.filterText,this._register(this.filterInputBox.onDidChange(function(e){return t.delayedFilterUpdate.trigger(function(){return t.onDidInputChange()})})),this._register(r.addStandardDisposableListener(this.filterInputBox.inputElement,"keydown",function(e){
return t.onInputKeyDown(e,t.filterInputBox)})),this._register(r.addStandardDisposableListener(e,"keydown",this.handleKeyboardEvent)),this._register(r.addStandardDisposableListener(e,"keyup",this.handleKeyboardEvent))},t.prototype.createControls=function(e){this.controlsContainer=r.append(e,r.$(".markers-panel-filter-controls")),this.createBadge(this.controlsContainer),this.createFilesExcludeCheckbox(this.controlsContainer)},t.prototype.createBadge=function(e){var t=this;this.filterBadge=r.append(e,r.$(".markers-panel-filter-badge")),this._register(m.attachStylerCallback(this.themeService,{badgeBackground:_.badgeBackground,contrastBorder:_.contrastBorder},function(e){var n=e.badgeBackground?e.badgeBackground.toString():null,i=e.contrastBorder?e.contrastBorder.toString():null;t.filterBadge.style.backgroundColor=n,t.filterBadge.style.borderWidth=i?"1px":null,t.filterBadge.style.borderStyle=i?"solid":null,t.filterBadge.style.borderColor=i})),this.updateBadge(),
this._register(this.markersWorkbenchService.onDidChange(function(){return t.updateBadge()}))},t.prototype.createFilesExcludeCheckbox=function(e){var t=this;this.filesExcludeFilter=this._register(new E.Checkbox({actionClassName:"markers-panel-filter-filesExclude",title:this.itemOptions.useFilesExclude?u.default.MARKERS_PANEL_ACTION_TOOLTIP_DO_NOT_USE_FILES_EXCLUDE:u.default.MARKERS_PANEL_ACTION_TOOLTIP_USE_FILES_EXCLUDE,isChecked:this.itemOptions.useFilesExclude})),this._register(this.filesExcludeFilter.onChange(function(){t.filesExcludeFilter.domNode.title=t.filesExcludeFilter.checked?u.default.MARKERS_PANEL_ACTION_TOOLTIP_DO_NOT_USE_FILES_EXCLUDE:u.default.MARKERS_PANEL_ACTION_TOOLTIP_USE_FILES_EXCLUDE,t._onDidChange.fire()})),this._register(m.attachCheckboxStyler(this.filesExcludeFilter,this.themeService)),e.appendChild(this.filesExcludeFilter.domNode)},t.prototype.onDidInputChange=function(){this.filterInputBox.addToHistory(),this._onDidChange.fire(),this.reportFilteringUsed()},
t.prototype.updateBadge=function(){var e=this.markersWorkbenchService.markersModel.stats(),t=e.total,n=e.filtered;r.toggleClass(this.filterBadge,"hidden",t===n||0===n),this.filterBadge.textContent=C.localize(0,null,n,t),this.adjustInputBox()},t.prototype.adjustInputBox=function(){this.filterInputBox.inputElement.style.paddingRight=(r.getTotalWidth(this.controlsContainer)||20)+"px"},t.prototype.handleKeyboardEvent=function(e){switch(e.keyCode){case 10:case 15:case 17:case 9:e.stopPropagation()}},t.prototype.onInputKeyDown=function(e,t){var n=!1;switch(e.keyCode){case 9:t.value="",n=!0}n&&(e.stopPropagation(),e.preventDefault())},t.prototype.reportFilteringUsed=function(){var e={};e.errors=this.markersWorkbenchService.markersModel.filterOptions.filterErrors,e.warnings=this.markersWorkbenchService.markersModel.filterOptions.filterWarnings,e.infos=this.markersWorkbenchService.markersModel.filterOptions.filterInfos,this.telemetryService.publicLog("problems.filter",e)},t.prototype._register=function(e){
return this._toDispose.push(e),e},t=a([l(2,w.IInstantiationService),l(3,s.IContextViewService),l(4,v.IThemeService),l(5,y.IMarkersWorkbenchService),l(6,f.ITelemetryService)],t)}(S.BaseActionItem);t.MarkersFilterActionItem=A}),define(e[477],t([1,0,4,670,23,125,41,46,81,108,5,68,12,35,16,20,29]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(t,n,i,r){return e.call(this,t,n,s.OUTPUT_PANEL_ID,r,i)||this}return n(t,e),t.ID="workbench.action.output.toggleOutput",t.LABEL=r.localize(0,null),t=a([l(2,u.IPartService),l(3,d.IPanelService)],t)}(h.TogglePanelAction);t.ToggleOutputAction=S;var _=function(e){function t(t,n,i){var r=e.call(this,t,n,"output-action clear-output")||this;return r.outputService=i,r}return n(t,e),t.prototype.run=function(){return this.outputService.getActiveChannel().clear(),i.TPromise.as(!0)},t.ID="workbench.output.action.clearOutput",t.LABEL=r.localize(1,null),t=a([l(2,s.IOutputService)],t)}(o.Action)
;t.ClearOutputAction=_;var C=function(e){function t(t,n,i){var r=e.call(this,t,n,"output-action output-scroll-unlock")||this;return r.outputService=i,r.toDispose=[],r.toDispose.push(r.outputService.onActiveOutputChannel(function(e){return r.setClass(r.outputService.getActiveChannel().scrollLock)})),r}return n(t,e),t.prototype.run=function(){var e=this.outputService.getActiveChannel();return e&&(e.scrollLock=!e.scrollLock,this.setClass(e.scrollLock)),i.TPromise.as(!0)},t.prototype.setClass=function(e){this.class=e?"output-action output-scroll-lock":"output-action output-scroll-unlock"},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=p.dispose(this.toDispose)},t.ID="workbench.output.action.toggleOutputScrollLock",t.LABEL=r.localize(2,null),t=a([l(2,s.IOutputService)],t)}(o.Action);t.ToggleOutputScrollLockAction=C;var E=function(e){function t(n){var i=e.call(this,t.ID,r.localize(3,null))||this;return i.outputService=n,i.class="output-action switch-to-output",i}return n(t,e),
t.prototype.run=function(e){return this.outputService.showChannel(e)},t.ID="workbench.output.action.switchBetweenOutputs",t=a([l(0,s.IOutputService)],t)}(o.Action);t.SwitchOutputAction=E;var w=function(e){function t(t,n,i,r){var o=e.call(this,null,t,[],0,r)||this;o.outputService=n;var a=m.Registry.as(s.Extensions.OutputChannels);return o.toDispose.push(a.onDidRegisterChannel(function(){return o.updateOtions(o.outputService.getActiveChannel().id)})),o.toDispose.push(a.onDidRemoveChannel(function(){return o.updateOtions(o.outputService.getActiveChannel().id)})),o.toDispose.push(o.outputService.onActiveOutputChannel(function(e){return o.updateOtions(e)})),o.toDispose.push(f.attachSelectBoxStyler(o.selectBox,i)),o.updateOtions(o.outputService.getActiveChannel().id),o}return n(t,e),t.prototype.getActionContext=function(e){var t=this.outputService.getChannels().filter(function(t){return t.label===e}).pop();return t?t.id:e},t.prototype.updateOtions=function(e){
var n=y.groupBy(this.outputService.getChannels(),function(e,t){return!e.file&&t.file?-1:e.file&&!t.file?1:0}),i=n[0]||[],r=n[1]||[],o=i.length&&r.length,s=o?i.length:-1,a=i.map(function(e){return e.label}).concat(o?[t.SEPARATOR]:[],r.map(function(e){return e.label})),c=0;e&&-1===(c=i.map(function(e){return e.id}).indexOf(e))&&(c=s+1+r.map(function(e){return e.id}).indexOf(e)),this.setOptions(a,Math.max(0,c),-1!==s?s:void 0)},t.SEPARATOR="─────────",t=a([l(1,s.IOutputService),l(2,g.IThemeService),l(3,v.IContextViewService)],t)}(c.SelectActionItem);t.SwitchOutputActionItem=w;var I=function(e){function t(n,i){var r=e.call(this,t.ID,t.LABEL,"output-action open-log-file")||this;return r.commandService=n,r.outputService=i,r.disposables=[],r.outputService.onActiveOutputChannel(r.update,r,r.disposables),r.update(),r}return n(t,e),t.prototype.update=function(){var e=this.getActiveLogChannelFile();this.enabled=!!e},t.prototype.run=function(){
return this.commandService.executeCommand(s.COMMAND_OPEN_LOG_VIEWER,this.getActiveLogChannelFile())},t.prototype.getActiveLogChannelFile=function(){var e=this.outputService.getActiveChannel(),t=e?this.outputService.getChannels().filter(function(t){return t.id===e.id})[0]:null;return t?t.file:null},t.ID="workbench.output.action.openLogOutputFile",t.LABEL=r.localize(4,null),t=a([l(0,b.ICommandService),l(1,s.IOutputService)],t)}(o.Action);t.OpenLogOutputFile=I}),define(e[1371],t([1,0,94,7,5,183,46]),function(e,t,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=120,d=function(){function e(e,t){this._container=e,this.orientation=t,this._children=[],this._onDidChange=r.Event.None,this._width=this._container.offsetWidth,this._height=this._container.offsetHeight,this._createSplitView(),this._splitView.layout(this.orientation===s.Orientation.HORIZONTAL?this._width:this._height)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange},enumerable:!0,
configurable:!0}),e.prototype._createSplitView=function(){var e=this;this._splitView=new s.SplitView(this._container,{orientation:this.orientation}),this._splitViewDisposables=[],this._splitViewDisposables.push(this._splitView.onDidSashReset(function(){return e._splitView.distributeViewSizes()}))},e.prototype.split=function(e,t){void 0===t&&(t=this._children.length),this._addChild(e,t)},e.prototype.resizePane=function(e,t,n){var i=0===t||1===t;if(!(i&&this.orientation!==s.Orientation.HORIZONTAL||!i&&this.orientation!==s.Orientation.VERTICAL||this._children.length<=1)){for(var r=[],o=0;o<this._splitView.length;o++)r.push(this._splitView.getViewSize(o));var a=e!==this._children.length-1,c=a?e+1:e-1;a&&0===t?n*=-1:a||1!==t?a&&2===t?n*=-1:a||3!==t||(n*=-1):n*=-1,r[e]+n<u?n=u-r[e]:r[c]-n<u&&(n=r[c]-u),r[e]+=n,r[c]-=n;for(o=0;o<this._splitView.length-1;o++)this._splitView.resizeView(o,r[o])}},e.prototype._addChild=function(e,t){
var n=this,i=new h(e,this.orientation===s.Orientation.HORIZONTAL?this._height:this._width);i.orientation=this.orientation,"number"==typeof t?this._children.splice(t,0,i):this._children.push(i),this._withDisabledLayout(function(){return n._splitView.addView(i,s.Sizing.Distribute,t)}),this._onDidChange=r.anyEvent.apply(void 0,this._children.map(function(e){return e.onDidChange}))},e.prototype.remove=function(e){for(var t=null,n=0;n<this._children.length;n++)this._children[n].instance===e&&(t=n);null!==t&&(this._children.splice(t,1),this._splitView.removeView(t,s.Sizing.Distribute))},e.prototype.layout=function(e,t){this._width=e,this._height=t,this.orientation===s.Orientation.HORIZONTAL?(this._children.forEach(function(e){return e.orthogonalLayout(t)}),this._splitView.layout(e)):(this._children.forEach(function(t){return t.orthogonalLayout(e)}),this._splitView.layout(t))},e.prototype.setOrientation=function(e){var t=this;if(this.orientation!==e){
for(this.orientation=e;this._container.children.length>0;)this._container.removeChild(this._container.children[0]);this._splitViewDisposables.forEach(function(e){return e.dispose()}),this._splitViewDisposables=[],this._splitView.dispose(),this._createSplitView(),this._withDisabledLayout(function(){t._children.forEach(function(n){n.orientation=e,t._splitView.addView(n,1)})})}},e.prototype._withDisabledLayout=function(e){this._children.forEach(function(e){return e.instance.disableLayout=!0}),e(),this._children.forEach(function(e){return e.instance.disableLayout=!1})},e}(),h=function(){function e(e,t){this.instance=e,this.orthogonalSize=t,this.minimumSize=u,this.maximumSize=Number.MAX_VALUE,this._onDidChange=r.Event.None,this.element=document.createElement("div"),this.element.className="terminal-split-pane",this.instance.attachToElement(this.element)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){
this._size=e,this._size&&this.orthogonalSize&&(this.orientation===s.Orientation.VERTICAL?this.instance.layout({width:this.orthogonalSize,height:this._size}):this.instance.layout({width:this._size,height:this.orthogonalSize}))},e.prototype.orthogonalLayout=function(e){this.orthogonalSize=e},e}(),p=function(e){function t(t,n,i,o,s,a){var l=e.call(this)||this;l._container=i,l._terminalService=s,l._partService=a,l._terminalInstances=[],l._panelPosition=c.Position.BOTTOM,l._onDisposed=new r.Emitter,l._onInstancesChanged=new r.Emitter;var u=l._terminalService.createInstance(t,n,void 0,o,!0);return l._terminalInstances.push(u),l._initInstanceListeners(u),l._activeInstanceIndex=0,l._container&&l.attachToElement(l._container),l}return n(t,e),Object.defineProperty(t.prototype,"terminalInstances",{get:function(){return this._terminalInstances},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDisposed",{get:function(){return this._onDisposed.event},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"onInstancesChanged",{get:function(){return this._onInstancesChanged.event},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tabElement&&(this._container.removeChild(this._tabElement),this._tabElement=null),this._terminalInstances=[],this._onInstancesChanged.fire()},Object.defineProperty(t.prototype,"activeInstance",{get:function(){return 0===this._terminalInstances.length?null:this._terminalInstances[this._activeInstanceIndex]},enumerable:!0,configurable:!0}),t.prototype._initInstanceListeners=function(e){var t=this;e.addDisposable(e.onDisposed(function(e){return t._onInstanceDisposed(e)})),e.addDisposable(e.onFocused(function(e){return t._setActiveInstance(e)}))},t.prototype._onInstanceDisposed=function(e){var t=this._terminalInstances.indexOf(e),n=e===this.activeInstance;if(-1!==t&&this._terminalInstances.splice(t,1),n&&this._terminalInstances.length>0){
var i=t<this._terminalInstances.length?t:this._terminalInstances.length-1;this.setActiveInstanceByIndex(i),this.activeInstance.focus(!0)}this._splitPaneContainer&&this._splitPaneContainer.remove(e),this._onInstancesChanged.fire(),0===this._terminalInstances.length&&(this._onDisposed.fire(this),this.dispose())},t.prototype._setActiveInstance=function(e){this.setActiveInstanceByIndex(this._getIndexFromId(e.id))},t.prototype._getIndexFromId=function(e){var t=-1;if(this.terminalInstances.forEach(function(n,i){n.id===e&&(t=i)}),-1===t)throw new Error("Terminal with ID "+e+" does not exist (has it already been disposed?)");return t},t.prototype.setActiveInstanceByIndex=function(e){if(!(e<0||e>=this._terminalInstances.length)){var t=this._activeInstanceIndex!==e;this._activeInstanceIndex=e,t&&this._onInstancesChanged.fire()}},t.prototype.attachToElement=function(e){var t=this;if(this._container=e,this._tabElement=document.createElement("div"),this._tabElement.classList.add("terminal-tab"),
this._container.appendChild(this._tabElement),!this._splitPaneContainer){this._panelPosition=this._partService.getPanelPosition();var n=this._panelPosition===c.Position.BOTTOM?s.Orientation.HORIZONTAL:s.Orientation.VERTICAL;this._splitPaneContainer=new d(this._tabElement,n),this.terminalInstances.forEach(function(e){return t._splitPaneContainer.split(e)})}},Object.defineProperty(t.prototype,"title",{get:function(){for(var e=this.terminalInstances[0].title,t=1;t<this.terminalInstances.length;t++)e+=", "+this.terminalInstances[t].title;return e},enumerable:!0,configurable:!0}),t.prototype.setVisible=function(e){this._tabElement&&(this._tabElement.style.display=e?"":"none"),this.terminalInstances.forEach(function(t){return t.setVisible(e)})},t.prototype.split=function(e,t,n){var i=this._terminalService.createInstance(e,t,void 0,n,!0);return this._terminalInstances.splice(this._activeInstanceIndex+1,0,i),this._initInstanceListeners(i),this._setActiveInstance(i),
this._splitPaneContainer&&this._splitPaneContainer.split(i,this._activeInstanceIndex),i},t.prototype.addDisposable=function(e){this._register(e)},t.prototype.layout=function(e,t){if(this._splitPaneContainer){var n=this._partService.getPanelPosition();if(n!==this._panelPosition){var i=n===c.Position.BOTTOM?s.Orientation.HORIZONTAL:s.Orientation.VERTICAL;this._splitPaneContainer.setOrientation(i),this._panelPosition=n}this._splitPaneContainer.layout(e,t)}},t.prototype.focusPreviousPane=function(){var e=0===this._activeInstanceIndex?this._terminalInstances.length-1:this._activeInstanceIndex-1;this.setActiveInstanceByIndex(e)},t.prototype.focusNextPane=function(){var e=this._activeInstanceIndex===this._terminalInstances.length-1?0:this._activeInstanceIndex+1;this.setActiveInstanceByIndex(e)},t.prototype.resizePane=function(e){if(this._splitPaneContainer){var t=0===e||1===e,n=this._terminalService.configHelper.getFont(),i=t?n.charWidth:n.charHeight
;i&&this._splitPaneContainer.resizePane(this._activeInstanceIndex,e,i)}},t=a([l(4,i.ITerminalService),l(5,c.IPartService)],t)}(o.Disposable);t.TerminalTab=p}),define(e[1372],t([1,0,9,7,15,38,81,46,94,4,34]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n,r,s){var a=this;this._contextKeyService=e,this._panelService=t,this._partService=n,this._storageService=s,this._onActiveTabChanged=new i.Emitter,this._onInstanceCreated=new i.Emitter,this._onInstanceDisposed=new i.Emitter,this._onInstanceProcessIdReady=new i.Emitter,this._onInstanceRequestExtHostProcess=new i.Emitter,this._onInstanceDimensionsChanged=new i.Emitter,this._onInstancesChanged=new i.Emitter,this._onInstanceTitleChanged=new i.Emitter,this._onActiveInstanceChanged=new i.Emitter,this._onTabDisposed=new i.Emitter,this._activeTabIndex=0,this._isShuttingDown=!1,r.onWillShutdown(function(e){return e.veto(a._onWillShutdown())}),r.onShutdown(function(){return a._onShutdown()}),
this._terminalFocusContextKey=u.KEYBINDING_CONTEXT_TERMINAL_FOCUS.bindTo(this._contextKeyService),this._findWidgetVisible=u.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService),this.onTabDisposed(function(e){return a._removeTab(e)}),r.when(o.LifecyclePhase.Restoring).then(function(){return a._restoreTabs()})}return Object.defineProperty(e.prototype,"activeTabIndex",{get:function(){return this._activeTabIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"terminalInstances",{get:function(){return this._terminalInstances},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"terminalTabs",{get:function(){return this._terminalTabs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onActiveTabChanged",{get:function(){return this._onActiveTabChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onInstanceCreated",{get:function(){return this._onInstanceCreated.event},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onInstanceDisposed",{get:function(){return this._onInstanceDisposed.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onInstanceProcessIdReady",{get:function(){return this._onInstanceProcessIdReady.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onInstanceRequestExtHostProcess",{get:function(){return this._onInstanceRequestExtHostProcess.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onInstanceDimensionsChanged",{get:function(){return this._onInstanceDimensionsChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onInstancesChanged",{get:function(){return this._onInstancesChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onInstanceTitleChanged",{get:function(){return this._onInstanceTitleChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onActiveInstanceChanged",{get:function(){
return this._onActiveInstanceChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTabDisposed",{get:function(){return this._onTabDisposed.event},enumerable:!0,configurable:!0}),e.prototype._restoreTabs=function(){var e=this;if(this.configHelper.config.experimentalRestore){var t=this._storageService.get("terminal.state",h.StorageScope.WORKSPACE);if(t){var n=JSON.parse(t);Array.isArray(n)&&n.forEach(function(t){for(var n=e.createTerminal(t.instances[0]),i=1;i<t.instances.length;i++)e.splitInstance(n,t.instances[i])})}}},e.prototype._onWillShutdown=function(){var e=this;return 0!==this.terminalInstances.length&&(this.configHelper.config.confirmOnExit?this._showTerminalCloseConfirmation().then(function(t){return t||(e._isShuttingDown=!0),t}):(this._isShuttingDown=!0,!1))},e.prototype._onShutdown=function(){if(this.configHelper.config.experimentalRestore){var e=this.terminalTabs.map(function(e){return{instances:e.terminalInstances.map(function(e){return e.shellLaunchConfig})}})
;this._storageService.store("terminal.state",JSON.stringify(e),h.StorageScope.WORKSPACE)}this.terminalInstances.forEach(function(e){return e.dispose()})},e.prototype.getTabLabels=function(){return this._terminalTabs.filter(function(e){return e.terminalInstances.length>0}).map(function(e,t){return t+1+": "+e.title})},e.prototype._removeTab=function(e){var t=this._terminalTabs.indexOf(e),n=e===this.getActiveTab();if(-1!==t&&this._terminalTabs.splice(t,1),n&&this._terminalTabs.length>0){var i=t<this._terminalTabs.length?t:this._terminalTabs.length-1;this.setActiveTabByIndex(i),this.getActiveInstance().focus(!0)}0!==this._terminalTabs.length||this._isShuttingDown||(this.hidePanel(),this._onActiveInstanceChanged.fire(void 0)),this._onInstancesChanged.fire(),n&&this._onActiveTabChanged.fire()},e.prototype.getActiveTab=function(){return this._activeTabIndex<0||this._activeTabIndex>=this._terminalTabs.length?null:this._terminalTabs[this._activeTabIndex]},e.prototype.getActiveInstance=function(){
var e=this.getActiveTab();return e?e.activeInstance:null},e.prototype.getInstanceFromId=function(e){return this.terminalInstances[this._getIndexFromId(e)]},e.prototype.getInstanceFromIndex=function(e){return this.terminalInstances[e]},e.prototype.setActiveInstance=function(e){this.setActiveInstanceByIndex(this._getIndexFromId(e.id))},e.prototype.setActiveTabByIndex=function(e){var t=this;if(!(e>=this._terminalTabs.length)){var n=this._activeTabIndex!==e;this._activeTabIndex=e,this._terminalTabs.forEach(function(e,n){return e.setVisible(n===t._activeTabIndex)}),n&&this._onActiveTabChanged.fire()}},e.prototype._getInstanceFromGlobalInstanceIndex=function(e){for(var t=0;e>=0&&t<this._terminalTabs.length;){var n=this._terminalTabs[t],i=n.terminalInstances.length;if(e<i)return{tab:n,tabIndex:t,instance:n.terminalInstances[e],localInstanceIndex:e};e-=i,t++}return null},e.prototype.setActiveInstanceByIndex=function(e){var t=this._getInstanceFromGlobalInstanceIndex(e);if(t){
t.tab.setActiveInstanceByIndex(t.localInstanceIndex);var n=this._activeTabIndex!==t.tabIndex;this._activeTabIndex=t.tabIndex,this._terminalTabs.forEach(function(e,n){return e.setVisible(n===t.tabIndex)}),n&&this._onActiveTabChanged.fire()}},e.prototype.setActiveTabToNext=function(){if(!(this._terminalTabs.length<=1)){var e=this._activeTabIndex+1;e>=this._terminalTabs.length&&(e=0),this.setActiveTabByIndex(e)}},e.prototype.setActiveTabToPrevious=function(){if(!(this._terminalTabs.length<=1)){var e=this._activeTabIndex-1;e<0&&(e=this._terminalTabs.length-1),this.setActiveTabByIndex(e)}},e.prototype.splitInstance=function(e,t){var n=this;void 0===t&&(t={});var i=this._getTabForInstance(e);if(i){var r=i.split(this._terminalFocusContextKey,this.configHelper,t);this._initInstanceListeners(r),this._onInstancesChanged.fire(),this._terminalTabs.forEach(function(e,t){return e.setVisible(t===n._activeTabIndex)})}},e.prototype._initInstanceListeners=function(e){var t=this
;e.addDisposable(e.onDisposed(this._onInstanceDisposed.fire,this._onInstanceDisposed)),e.addDisposable(e.onTitleChanged(this._onInstanceTitleChanged.fire,this._onInstanceTitleChanged)),e.addDisposable(e.onProcessIdReady(this._onInstanceProcessIdReady.fire,this._onInstanceProcessIdReady)),e.addDisposable(e.onDimensionsChanged(function(){return t._onInstanceDimensionsChanged.fire(e)})),e.addDisposable(e.onFocus(this._onActiveInstanceChanged.fire,this._onActiveInstanceChanged))},e.prototype._getTabForInstance=function(e){for(var t=0;t<this._terminalTabs.length;t++){var n=this._terminalTabs[t];if(-1!==n.terminalInstances.indexOf(e))return n}return null},e.prototype.showPanel=function(e){var t=this;return new d.TPromise(function(n){var i=t._panelService.getActivePanel();if(!i||i.getId()!==u.TERMINAL_PANEL_ID)return t._panelService.openPanel(u.TERMINAL_PANEL_ID,e).then(function(){e&&setTimeout(function(){var e=t.getActiveInstance();e&&e.focus(!0)},0),n(void 0)});e&&setTimeout(function(){var e=t.getActiveInstance()
;e&&e.focus(!0)},0),n(void 0)})},e.prototype.hidePanel=function(){var e=this._panelService.getActivePanel();e&&e.getId()===u.TERMINAL_PANEL_ID&&this._partService.setPanelHidden(!0).done(void 0,n.onUnexpectedError)},e.prototype._getIndexFromId=function(e){var t=-1;if(this.terminalInstances.forEach(function(n,i){n.id===e&&(t=i)}),-1===t)throw new Error("Terminal with ID "+e+" does not exist (has it already been disposed?)");return t},e.prototype.setWorkspaceShellAllowed=function(e){this.configHelper.setWorkspaceShellAllowed(e)},e=a([l(0,r.IContextKeyService),l(1,s.IPanelService),l(2,c.IPartService),l(3,o.ILifecycleService),l(4,h.IStorageService)],e)}();t.TerminalService=p}),define(e[1373],t([1,0,738,87,11,93,15,6,38,81,46,17,64,94,1372,413,4,83,34,378,1371,100,22,103,1349,49]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(t,n,i,o,s,a,c,l,u,d,h){var p=e.call(this,t,n,i,s,o)||this
;return p._configurationService=a,p._instantiationService=c,p._quickOpenService=l,p._notificationService=u,p._dialogService=d,p._extensionService=h,p._terminalTabs=[],p._configHelper=p._instantiationService.createInstance(y.TerminalConfigHelper),T.ipcRenderer.on("vscode:openFiles",function(e,t){"vscode"===t.termProgram&&t.filesToWait&&r.whenDeleted(t.filesToWait.waitMarkerFilePath).then(function(){p.terminalInstances.length>0&&p.getActiveInstance().focus()})}),p}return n(t,e),Object.defineProperty(t.prototype,"configHelper",{get:function(){return this._configHelper},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_terminalInstances",{get:function(){return this._terminalTabs.reduce(function(e,t){return e.concat(t.terminalInstances)},[])},enumerable:!0,configurable:!0}),t.prototype.createTerminal=function(e,t){void 0===e&&(e={});var n=this._instantiationService.createInstance(E.TerminalTab,this._terminalFocusContextKey,this._configHelper,this._terminalContainer,e);this._terminalTabs.push(n)
;var i=n.terminalInstances[0];return n.addDisposable(n.onDisposed(this._onTabDisposed.fire,this._onTabDisposed)),n.addDisposable(n.onInstancesChanged(this._onInstancesChanged.fire,this._onInstancesChanged)),this._initInstanceListeners(i),1===this.terminalInstances.length&&this.setActiveInstanceByIndex(0),this._onInstancesChanged.fire(),this._suggestShellChange(t),i},t.prototype.createTerminalRenderer=function(e){return this.createTerminal({name:e,isRendererOnly:!0})},t.prototype.createInstance=function(e,t,n,i,r){var o=this._instantiationService.createInstance(x.TerminalInstance,e,t,n,i);return this._onInstanceCreated.fire(o),o},t.prototype.requestExtHostProcess=function(e,t,n,i){var r=this;this._extensionService.whenInstalledExtensionsRegistered().then(function(){setTimeout(function(){r._onInstanceRequestExtHostProcess.fire({proxy:e,shellLaunchConfig:t,cols:n,rows:i})},500)})},t.prototype.focusFindWidget=function(){var e=this;return this.showPanel(!1).then(function(){
e._panelService.getActivePanel().focusFindWidget(),e._findWidgetVisible.set(!0)})},t.prototype.hideFindWidget=function(){var e=this._panelService.getActivePanel();e&&e.getId()===v.TERMINAL_PANEL_ID&&(e.hideFindWidget(),this._findWidgetVisible.reset(),e.focus())},t.prototype._suggestShellChange=function(e){var t=this;if(o.isWindows&&e){this._storageService.getBoolean(v.NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY,_.StorageScope.GLOBAL,!1)||(this._configHelper.config.shell.windows===C.getTerminalDefaultShellWindows()?this._notificationService.prompt(S.default.Info,i.localize(0,null),[{label:i.localize(1,null),run:function(){t.selectDefaultWindowsShell().then(function(e){if(!e)return b.TPromise.as(null);var n=t.createTerminal({executable:e,args:t._configHelper.config.shellArgs.windows});return n&&t.setActiveInstance(n),b.TPromise.as(null)})}},{label:i.localize(2,null),isSecondary:!0,run:function(){return t._storageService.store(v.NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY,!0)}
}]):this._storageService.store(v.NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY,!0))}},t.prototype.selectDefaultWindowsShell=function(){var e=this;return this._detectWindowsShells().then(function(t){var n={placeHolder:i.localize(3,null)};return e._quickOpenService.pick(t,n).then(function(t){if(!t)return null;var n=t.description;return e._configurationService.updateValue("terminal.integrated.shell.windows",n,f.ConfigurationTarget.USER).then(function(){return n})})})},t.prototype._detectWindowsShells=function(){var e=this,t=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),n=process.env.windir+"\\"+(t?"Sysnative":"System32"),i=/(\d+)\.(\d+)\.(\d+)/g.exec(s.release()),r=!1;if(i&&4===i.length){parseInt(i[3])>=16299&&(r=!0)}var o={"Command Prompt":[n+"\\cmd.exe"],PowerShell:[n+"\\WindowsPowerShell\\v1.0\\powershell.exe"],"WSL Bash":[n+"\\"+(r?"wsl.exe":"bash.exe")],
"Git Bash":[process.env.ProgramW6432+"\\Git\\bin\\bash.exe",process.env.ProgramW6432+"\\Git\\usr\\bin\\bash.exe",process.env.ProgramFiles+"\\Git\\bin\\bash.exe",process.env.ProgramFiles+"\\Git\\usr\\bin\\bash.exe",process.env.LocalAppData+"\\Programs\\Git\\bin\\bash.exe"]},a=[];return Object.keys(o).forEach(function(t){return a.push(e._validateShellPaths(t,o[t]))}),b.TPromise.join(a).then(function(e){return e.filter(function(e){return!!e}).map(function(e){return{label:e[0],description:e[1]}})})},t.prototype._validateShellPaths=function(e,t){var n=this,i=t.shift();return r.fileExists(i).then(function(r){return r?[e,i]:0===t.length?null:n._validateShellPaths(e,t)})},t.prototype.getActiveOrCreateInstance=function(e){var t=this.getActiveInstance();return t||this.createTerminal(void 0,e)},t.prototype._showTerminalCloseConfirmation=function(){var e;return e=1===this.terminalInstances.length?i.localize(4,null):i.localize(5,null,this.terminalInstances.length),this._dialogService.confirm({message:e,type:"warning"
}).then(function(e){return!e.confirmed})},t.prototype.setContainers=function(e,t){var n=this;this._configHelper.panelContainer=e,this._terminalContainer=t,this._terminalTabs.forEach(function(e){return e.attachToElement(n._terminalContainer)})},t=a([l(0,c.IContextKeyService),l(1,h.IPanelService),l(2,p.IPartService),l(3,_.IStorageService),l(4,d.ILifecycleService),l(5,f.IConfigurationService),l(6,u.IInstantiationService),l(7,g.IQuickOpenService),l(8,I.INotificationService),l(9,w.IDialogService),l(10,k.IExtensionService)],t)}(m.TerminalService);t.TerminalService=D}),define(e[247],t([1,0,5,4,40,46]),function(e,t,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this)||this;return l.viewType=t,l.reviver=a,l._partService=c,l._html="",l._currentWebviewHtml="",l._webviewDisposables=[],l._scrollYPercentage=0,l._revived=!1,l._name=n,l._options=i,l._events=o,l._state=r,l.extensionLocation=s,l}return n(t,e),t.prototype.getTypeId=function(){
return t.typeId},t.prototype.dispose=function(){this.disposeWebview(),this._container&&(this._container.remove(),this._container=void 0),this._events&&this._events.onDispose&&this._events.onDispose(),this._events=void 0,this._webview=void 0,e.prototype.dispose.call(this)},t.prototype.getResource=function(){return null},t.prototype.getName=function(){return this._name},t.prototype.getTitle=function(){return this.getName()},t.prototype.getDescription=function(){return null},t.prototype.setName=function(e){this._name=e,this._onDidChangeLabel.fire()},t.prototype.matches=function(e){return e&&e===this},Object.defineProperty(t.prototype,"group",{get:function(){return this._group},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"html",{get:function(){return this._html},set:function(e){e!==this._currentWebviewHtml&&(this._html=e,this._webview&&(this._webview.contents=e,this._currentWebviewHtml=e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){
return this._state},set:function(e){this._state=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webviewState",{get:function(){return this._webviewState},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),t.prototype.setOptions=function(e){this._options=c({},this._options,e),this._webview&&(this._webview.options={allowScripts:this._options.enableScripts,allowSvgs:!0,enableWrappedPostMessage:!0,useSameOriginForRoot:!1,localResourceRoots:this._options.localResourceRoots})},t.prototype.resolve=function(e){return this.reviver&&!this._revived?(this._revived=!0,this.reviver.reviveWebview(this).then(function(){return new o.EditorModel})):r.TPromise.as(new o.EditorModel)},t.prototype.supportsSplitEditor=function(){return!1},Object.defineProperty(t.prototype,"container",{get:function(){if(!this._container){var e=t.handlePool++;this._container=document.createElement("div"),this._container.id="webview-"+e,
this._partService.getContainer(s.Parts.EDITOR_PART).appendChild(this._container)}return this._container},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webview",{get:function(){return this._webview},set:function(e){var t=this;this._webviewDisposables=i.dispose(this._webviewDisposables),this._webview=e,this._webview.onDidClickLink(function(e){t._events&&t._events.onDidClickLink&&t._events.onDidClickLink(e,t._options)},null,this._webviewDisposables),this._webview.onMessage(function(e){t._events&&t._events.onMessage&&t._events.onMessage(e)},null,this._webviewDisposables),this._webview.onDidScroll(function(e){t._scrollYPercentage=e.scrollYPercentage},null,this._webviewDisposables),this._webview.onDidUpdateState(function(e){t._webviewState=e},null,this._webviewDisposables)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollYPercentage",{get:function(){return this._scrollYPercentage},enumerable:!0,configurable:!0}),t.prototype.claimWebview=function(e){this._webviewOwner=e
},t.prototype.releaseWebview=function(e){this._webviewOwner===e&&(this._webviewOwner=void 0,this._options.retainContextWhenHidden&&this._container?this._container.style.visibility="hidden":this.disposeWebview())},t.prototype.disposeWebview=function(){this._webview&&(this._webview.dispose(),this._webview=void 0),this._webviewDisposables=i.dispose(this._webviewDisposables),this._webviewOwner=void 0,this._container&&(this._container.style.visibility="hidden"),this._currentWebviewHtml=""},t.prototype.updateGroup=function(e){this._group=e},t.handlePool=0,t.typeId="workbench.editors.webviewInput",t=a([l(7,s.IPartService)],t)}(o.EditorInput);t.WebviewEditorInput=u}),define(e[248],t([1,0,5,4,6,21,53,247,20]),function(e,t,n,i,r,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWebviewEditorService=r.createDecorator("webviewEditorService"),t.areWebviewInputOptionsEqual=function(e,t){
return e.enableCommandUris===t.enableCommandUris&&e.enableFindWidget===t.enableFindWidget&&e.enableScripts===t.enableScripts&&e.retainContextWhenHidden===t.retainContextWhenHidden&&e.tryRestoreScrollPosition===t.tryRestoreScrollPosition&&(e.localResourceRoots===t.localResourceRoots||Array.isArray(e.localResourceRoots)&&Array.isArray(t.localResourceRoots)&&h.equals(e.localResourceRoots,t.localResourceRoots,function(e,t){return e.toString()===t.toString()}))};var p=function(){function e(e,t,n){this._editorService=e,this._instantiationService=t,this._editorGroupService=n,this._revivers=new Map,this._awaitingRevival=[]}return e.prototype.createWebview=function(e,t,n,i,r,o){var s=this._instantiationService.createInstance(d.WebviewEditorInput,e,t,i,{},o,r,void 0);return this._editorService.openEditor(s,{pinned:!0,preserveFocus:n.preserveFocus},n.group),s},e.prototype.revealWebview=function(e,t,n){e.group===t.id?this._editorService.openEditor(e,{preserveFocus:n
},e.group):this._editorGroupService.getGroup(e.group).moveEditor(e,t,{preserveFocus:n})},e.prototype.reviveWebview=function(e,t,n,r,a){var c=this;return this._instantiationService.createInstance(d.WebviewEditorInput,e,t,r,n,{},a,{canRevive:function(e){return!0},reviveWebview:function(e){return o(c,void 0,i.TPromise,function(){var t,n,r;return s(this,function(o){switch(o.label){case 0:return[4,this.tryRevive(e)];case 1:return(t=o.sent())?[2]:(r=new i.TPromise(function(e){n=e}),this._awaitingRevival.push({input:e,resolve:n}),[2,r])}})})}})},e.prototype.registerReviver=function(e,t){var i=this;this._revivers.has(e)?this._revivers.get(e).push(t):this._revivers.set(e,[t]);var r=this._awaitingRevival.filter(function(t){return t.input.viewType===e});this._awaitingRevival=this._awaitingRevival.filter(function(t){return t.input.viewType!==e});for(var o=function(e){t.reviveWebview(e.input).then(function(){return e.resolve(void 0)})},s=0,a=r;s<a.length;s++){o(a[s])}return n.toDisposable(function(){i._revivers.delete(e)
})},e.prototype.canRevive=function(e){var t=e.viewType;return this._revivers.has(t)&&this._revivers.get(t).some(function(t){return t.canRevive(e)})},e.prototype.tryRevive=function(e){return o(this,void 0,i.TPromise,function(){var t,n,i,r;return s(this,function(o){switch(o.label){case 0:if(!(t=this._revivers.get(e.viewType)))return[2,!1];n=0,i=t,o.label=1;case 1:return n<i.length?(r=i[n]).canRevive(e)?[4,r.reviveWebview(e)]:[3,3]:[3,4];case 2:return o.sent(),[2,!0];case 3:return n++,[3,1];case 4:return[2,!1]}})})},e=a([l(0,c.IEditorService),l(1,r.IInstantiationService),l(2,u.IEditorGroupsService)],e)}();t.WebviewEditorService=p}),define(e[1376],t([1,0,247,248,10]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._webviewService=e}return e.prototype.serialize=function(e){if(!e.state)return null;if(!this._webviewService.canRevive(e)&&!e.reviver)return null;var t={viewType:e.viewType,title:e.getName(),options:e.options,
extensionLocation:e.extensionLocation.toString(),state:e.state};return JSON.stringify(t)},e.prototype.deserialize=function(e,t){var n,i=JSON.parse(t);return"string"==typeof i.extensionLocation&&(n=r.default.parse(i.extensionLocation)),"string"==typeof i.extensionFolderPath&&(n=r.default.file(i.extensionFolderPath)),this._webviewService.reviveWebview(i.viewType,i.title,i.state,i.options,n)},e.ID=n.WebviewEditorInput.typeId,e=a([l(0,i.IWebviewEditorService)],e)}();t.WebviewEditorInputFactory=o}),define(e[340],t([1,0,8,7,5,151,25,14,10,36,33,6,26,12,1182,248]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b){"use strict";function S(e,t,n,i){e.session.protocol.registerBufferProtocol(t,function(e,t){for(var r=h.default.parse(e.url).path,o=h.default.file(r),a=0,c=i();a<c.length;a++){var l=c[a];if(d.startsWith(o.fsPath,l.fsPath+u.nativeSep))return void n.resolveContent(o,{encoding:"binary"}).then(function(e){var n=function(e){var t=u.extname(e.fsPath).toLowerCase()
;return E[t]||s.getMediaMime(e.fsPath)||s.guessMimeTypes(e.fsPath)[0]}(o);t({data:Buffer.from(e.value,e.encoding),mimeType:n})},function(){t({error:-2})})}console.error("Webview: Cannot load resource outside of protocol root"),t({error:-10})},function(e){e&&console.error("Failed to register protocol "+t)})}Object.defineProperty(t,"__esModule",{value:!0});var _=function(t){function o(n,o,s,a,c,l,u,d){var p=t.call(this)||this;if(p._styleElement=n,p._contextKey=o,p._findInputContextKey=s,p._options=a,p._themeService=l,p._environmentService=u,p._fileService=d,p._findStarted=!1,p._contents="",p._state=void 0,p._onDidClickLink=p._register(new r.Emitter),p.onDidClickLink=p._onDidClickLink.event,p._onDidScroll=p._register(new r.Emitter),p.onDidScroll=p._onDidScroll.event,p._onDidUpdateState=p._register(new r.Emitter),p.onDidUpdateState=p._onDidUpdateState.event,p._onMessage=p._register(new r.Emitter),p.onMessage=p._onMessage.event,p._webview=document.createElement("webview"),
p._webview.setAttribute("partition",p._options.allowSvgs?"webview":"webview"+Date.now()),p._webview.setAttribute("disableblinkfeatures","Auxclick"),p._webview.setAttribute("disableguestresize",""),p._webview.setAttribute("webpreferences","contextIsolation=yes"),p._webview.style.flex="0 1",p._webview.style.width="0",p._webview.style.height="0",p._webview.style.outline="0",p._webview.preload=e.toUrl("./webview-pre.js"),p._webview.src=p._options.useSameOriginForRoot?e.toUrl("./webview.html"):"data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVirtual%20Document%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%20style%3D%22margin%3A%200%3B%20overflow%3A%20hidden%3B%20width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E",p._ready=new Promise(function(e){var t=p._register(i.addDisposableListener(p._webview,"ipc-message",function(n){
"webview-ready"===n.channel&&(i.addClass(p._webview,"ready"),t.dispose(),e(p))}))}),!p._options.useSameOriginForRoot){var f=!1;p._register(i.addDisposableListener(p._webview,"did-start-loading",function(){if(!f){f=!0;var e=p._webview.getWebContents();p.registerFileProtocols(e)}}))}if(!p._options.allowSvgs){var g=!1;p._register(i.addDisposableListener(p._webview,"did-start-loading",function(){if(!g){g=!0;var e=p._webview.getWebContents();e&&(e.session.webRequest.onBeforeRequest(function(e,t){if(e.url.indexOf(".svg")>0){var n=h.default.parse(e.url);if(n&&!n.scheme.match(/file/i)&&n.path.endsWith(".svg")&&!p.isAllowedSvg(n))return p.onDidBlockSvg(),t({cancel:!0})}return t({})}),e.session.webRequest.onHeadersReceived(function(e,t){var n=e.responseHeaders["content-type"]||e.responseHeaders["Content-Type"];if(n&&Array.isArray(n)&&n.some(function(e){return e.toLowerCase().indexOf("image/svg")>=0})){var i=h.default.parse(e.url);if(i&&!p.isAllowedSvg(i))return p.onDidBlockSvg(),t({cancel:!0})}return t({cancel:!1,
responseHeaders:e.responseHeaders})}))}}))}return p._toDispose.push(i.addDisposableListener(p._webview,"console-message",function(e){console.log("[Embedded Page] "+e.message)}),i.addDisposableListener(p._webview,"dom-ready",function(){p.layout()}),i.addDisposableListener(p._webview,"crashed",function(){console.error("embedded page crashed")}),i.addDisposableListener(p._webview,"ipc-message",function(e){switch(e.channel){case"onmessage":return void(p._options.enableWrappedPostMessage&&e.args&&e.args.length&&p._onMessage.fire(e.args[0]));case"did-click-link":var t=e.args[0];return void p._onDidClickLink.fire(h.default.parse(t));case"did-set-content":return p._webview.style.flex="",p._webview.style.width="100%",p._webview.style.height="100%",void p.layout();case"did-scroll":return void(e.args&&"number"==typeof e.args[0]&&p._onDidScroll.fire({scrollYPercentage:e.args[0]}));case"do-reload":return void p.reload();case"do-update-state":return p._state=e.args[0],void p._onDidUpdateState.fire(p._state)}
}),i.addDisposableListener(p._webview,"focus",function(){p._contextKey&&p._contextKey.set(!0)}),i.addDisposableListener(p._webview,"blur",function(){p._contextKey&&p._contextKey.reset()}),i.addDisposableListener(p._webview,"devtools-opened",function(){p._send("devtools-opened")})),p._webviewFindWidget=p._register(c.createInstance(y.WebviewFindWidget,p)),p.style(p._themeService.getTheme()),p._themeService.onThemeChange(p.style,p,p._toDispose),p}return n(o,t),o.prototype.mountTo=function(e){e.appendChild(this._webviewFindWidget.getDomNode()),e.appendChild(this._webview)},o.prototype.notifyFindWidgetFocusChanged=function(e){this._contextKey.set(e||document.activeElement===this._webview)},o.prototype.notifyFindWidgetInputFocusChanged=function(e){this._findInputContextKey.set(e)},o.prototype.dispose=function(){this._contextKey&&this._contextKey.reset(),this._webview&&(this._webview.guestinstance="none",this._webview.parentElement&&this._webview.parentElement.removeChild(this._webview)),this._webview=void 0,
this._webviewFindWidget=void 0,t.prototype.dispose.call(this)},o.prototype._send=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this._ready.then(function(){var i;return(i=t._webview).send.apply(i,[e].concat(n))}).catch(function(e){return console.error(e)})},Object.defineProperty(o.prototype,"initialScrollProgress",{set:function(e){this._send("initial-scroll-position",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"state",{set:function(e){this._state=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"options",{set:function(e){this._options&&b.areWebviewInputOptionsEqual(e,this._options)||(this._options=e,this._send("content",{contents:this._contents,options:this._options,state:this._state}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"contents",{set:function(e){this._contents=e,this._send("content",{contents:e,options:this._options,state:this._state})},enumerable:!0,configurable:!0}),
Object.defineProperty(o.prototype,"baseUrl",{set:function(e){this._send("baseUrl",e)},enumerable:!0,configurable:!0}),o.prototype.focus=function(){this._webview.focus(),this._send("focus")},o.prototype.sendMessage=function(e){this._send("message",e)},o.prototype.onDidBlockSvg=function(){this.sendMessage({name:"vscode-did-block-svg"})},o.prototype.style=function(e){var t=window.getComputedStyle(this._styleElement),n=t.fontFamily,i=t.fontWeight,r=t.fontSize,o=v.getColorRegistry().getColors().reduce(function(t,n){var i=e.getColor(n.id);return i&&(t["vscode-"+n.id.replace(".","-")]=i.toString()),t},{}),s=c({"font-family":n,"font-weight":i,"font-size":r,"background-color":e.getColor(v.editorBackground).toString(),color:e.getColor(v.editorForeground).toString(),"link-color":e.getColor(v.textLinkForeground).toString(),"link-active-color":e.getColor(v.textLinkActiveForeground).toString(),"vscode-editor-font-family":n,"vscode-editor-font-weight":i,"vscode-editor-font-size":r},o),a=C.fromTheme(e)
;this._send("styles",s,a),this._webviewFindWidget.updateTheme(e)},o.prototype.layout=function(){var e=this,t=this._webview.getWebContents();if(t&&!t.isDestroyed()){var n=t.getOwnerBrowserWindow();n&&n.webContents&&!n.webContents.isDestroyed()&&n.webContents.getZoomFactor(function(n){if(!t.isDestroyed()&&(t.setZoomFactor(n),e._webview&&e._webview.parentElement)){var i=e._webview.parentElement.clientWidth,r=e._webview.parentElement.clientHeight;t.setSize({normal:{width:Math.floor(i*n),height:Math.floor(r*n)}})}})}},o.prototype.isAllowedSvg=function(e){return!!this._options.allowSvgs||!!this._options.svgWhiteList&&this._options.svgWhiteList.indexOf(e.authority.toLowerCase())>=0},o.prototype.registerFileProtocols=function(e){var t=this;if(e&&!e.isDestroyed()){var n=h.default.file(this._environmentService.appRoot);S(e,"vscode-core-resource",this._fileService,function(){return[n]}),S(e,"vscode-resource",this._fileService,function(){return t._options.localResourceRoots||[]})}},o.prototype.startFind=function(e,t){
if(e){var n={forward:(t=t||{}).forward,findNext:!1,matchCase:t.matchCase,medialCapitalAsWordStart:t.medialCapitalAsWordStart};this._findStarted=!0,this._webview.findInPage(e,n)}},o.prototype.find=function(e,t){e&&(this._findStarted?this._webview.findInPage(e,t):this.startFind(e,t))},o.prototype.stopFind=function(e){this._findStarted=!1,this._webview.stopFindInPage(e?"keepSelection":"clearSelection")},o.prototype.showFind=function(){this._webviewFindWidget.reveal()},o.prototype.hideFind=function(){this._webviewFindWidget.hide()},o.prototype.reload=function(){this.contents=this._contents},o=a([l(4,g.IInstantiationService),l(5,m.IThemeService),l(6,p.IEnvironmentService),l(7,f.IFileService)],o)}(o.Disposable);t.WebviewElement=_;var C;!function(e){e.light="vscode-light",e.dark="vscode-dark",e.highContrast="vscode-high-contrast"}(C||(C={})),function(e){e.fromTheme=function(t){return t.type===m.LIGHT?e.light:t.type===m.DARK?e.dark:e.highContrast}}(C||(C={}));var E={".svg":"image/svg+xml"}}),
define(e[1378],t([1,0,657,4,5,28,213,455,12,88,72,46,15,34,362,340,6,53]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(e){function t(n,i,r,s,a,c,l,u,d){var h=e.call(this,t.ID,n,i,r)||this;return h._openerService=s,h._partService=a,h._storageService=c,h._textModelResolverService=l,h._instantiationService=u,h.editorGroupService=d,h._modelChangeSubscription=o.empty,h._themeChangeSubscription=o.empty,h._scrollYPercentage=0,h.editorMemento=h.getEditorMemento(c,d,h.viewStateStorageKey),h}return n(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this._modelRef&&this._modelRef.object.textEditorModel},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._webviewDisposables=o.dispose(this._webviewDisposables),this._themeChangeSubscription.dispose(),this._modelChangeSubscription.dispose(),o.dispose(this._modelRef),e.prototype.dispose.call(this)},t.prototype.createEditor=function(e){
this._content=document.createElement("div"),this._content.style.position="absolute",this._content.classList.add(t.class),e.appendChild(this._content)},Object.defineProperty(t.prototype,"webview",{get:function(){var e=this;if(!this._webview){var t={};if(this.input&&this.input instanceof d.HtmlInput&&(t=this.input.options),this._webview=this._instantiationService.createInstance(b.WebviewElement,this._partService.getContainer(g.Parts.EDITOR_PART),this.contextKey,this.findInputFocusContextKey,c({},t,{useSameOriginForRoot:!0})),this._webview.mountTo(this._content),this.input&&this.input instanceof d.HtmlInput){var n=this.loadHTMLPreviewViewState(this.input);this._scrollYPercentage=n?n.scrollYPercentage:0,this.webview.initialScrollProgress=this._scrollYPercentage;var i=this.input.getResource();this.webview.baseUrl=i.toString(!0)}this._webviewDisposables=[this._webview,this._webview.onDidClickLink(function(t){return e._openerService.open(t)}),this._webview.onDidScroll(function(t){
e._scrollYPercentage=t.scrollYPercentage})]}return this._webview},enumerable:!0,configurable:!0}),t.prototype.setEditorVisible=function(t,n){this._doSetVisible(t),e.prototype.setEditorVisible.call(this,t,n)},t.prototype._doSetVisible=function(e){var t=this;e?(this._themeChangeSubscription=this.themeService.onThemeChange(this.onThemeChange.bind(this)),this._hasValidModel()&&(this._modelChangeSubscription=this.model.onDidChangeContent(function(){return t.webview.contents=t.model.getLinesContent().join("\n")}),this.webview.contents=this.model.getLinesContent().join("\n"))):(this._themeChangeSubscription.dispose(),this._modelChangeSubscription.dispose(),this._webviewDisposables=o.dispose(this._webviewDisposables),this._webview=void 0)},t.prototype._hasValidModel=function(){return this._modelRef&&this.model&&!this.model.isDisposed()},t.prototype.layout=function(t){var n=t.width,i=t.height;this._content.style.width=n+"px",this._content.style.height=i+"px",e.prototype.layout.call(this,t)},
t.prototype.clearInput=function(){this.input instanceof d.HtmlInput&&this.saveHTMLPreviewViewState(this.input,{scrollYPercentage:this._scrollYPercentage}),o.dispose(this._modelRef),this._modelRef=void 0,e.prototype.clearInput.call(this)},t.prototype.shutdown=function(){this.input instanceof d.HtmlInput&&this.saveHTMLPreviewViewState(this.input,{scrollYPercentage:this._scrollYPercentage}),e.prototype.shutdown.call(this)},t.prototype.sendMessage=function(e){this.webview.sendMessage(e)},t.prototype.setInput=function(t,n,o){var s=this;if(this.input&&this.input.matches(t)&&this._hasValidModel()&&this.input instanceof d.HtmlInput&&t instanceof d.HtmlInput&&d.areHtmlInputOptionsEqual(this.input.options,t.options))return r.TPromise.as(void 0);var a=void 0;return this.input instanceof d.HtmlInput&&(a=this.input.options,this.saveHTMLPreviewViewState(this.input,{scrollYPercentage:this._scrollYPercentage})),this._modelRef&&this._modelRef.dispose(),this._modelChangeSubscription.dispose(),
t instanceof d.HtmlInput?e.prototype.setInput.call(this,t,n,o).then(function(){var e=t.getResource();return s._textModelResolverService.createModelReference(e).then(function(n){if(!o.isCancellationRequested){if(n.object instanceof u.BaseTextEditorModel&&(s._modelRef=n),!s.model)return r.TPromise.wrapError(new Error(i.localize(0,null)));a&&!d.areHtmlInputOptionsEqual(a,t.options)&&s._doSetVisible(!1),s._modelChangeSubscription=s.model.onDidChangeContent(function(){s.model&&(s._scrollYPercentage=0,s.webview.contents=s.model.getLinesContent().join("\n"))});var c=s.loadHTMLPreviewViewState(t);s._scrollYPercentage=c?c.scrollYPercentage:0,s.webview.baseUrl=e.toString(!0),s.webview.options=t.options,s.webview.contents=s.model.getLinesContent().join("\n"),s.webview.initialScrollProgress=s._scrollYPercentage}})}):r.TPromise.wrapError(new Error("Invalid input"))},Object.defineProperty(t.prototype,"viewStateStorageKey",{get:function(){return this.getId()+".editorViewState"},enumerable:!0,configurable:!0}),
t.prototype.saveHTMLPreviewViewState=function(e,t){this.editorMemento.saveState(this.group,e,t)},t.prototype.loadHTMLPreviewViewState=function(e){return this.editorMemento.loadState(this.group,e)},t.ID="workbench.editor.htmlPreviewPart",t.class="htmlPreviewPart",t=a([l(0,s.ITelemetryService),l(1,h.IThemeService),l(2,v.IContextKeyService),l(3,p.IOpenerService),l(4,g.IPartService),l(5,m.IStorageService),l(6,f.ITextModelService),l(7,S.IInstantiationService),l(8,_.IEditorGroupsService)],t)}(y.BaseWebviewEditor);t.HtmlPreviewPart=C}),define(e[1379],t([1,0,10,656,29,6,21,276,455,1378,16,112,53,104,147]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),u.Registry.as(f.Extensions.Editors).registerEditor(new f.EditorDescriptor(l.HtmlPreviewPart,l.HtmlPreviewPart.ID,i.localize(0,null)),[new d.SyncDescriptor(c.HtmlInput)]),r.CommandsRegistry.registerCommand("_workbench.previewHtml",function(e,t,i,r){var l=t instanceof n.default?t:n.default.parse(t);r=r||l.fsPath
;var u,d=e.get(h.IEditorGroupsService),f=d.getGroup(a.viewColumnToEditorGroup(d,i));if(f||(f=d.activeGroup),f)for(var g=f.editors,v=0;v<g.length;v++){var m=g[v],y=m.getResource();if(m instanceof c.HtmlInput&&y&&y.toString()===t.toString()){u=m;break}}var b={allowScripts:!0,allowSvgs:!0,svgWhiteList:e.get(p.IExtensionsWorkbenchService).allowedBadgeProviders};return u?u.setName(r):u=e.get(o.IInstantiationService).createInstance(c.HtmlInput,r,"",l,b),e.get(s.IEditorService).openEditor(u,{pinned:!0},a.viewColumnToEditorGroup(d,i)).then(function(e){return!0})}),r.CommandsRegistry.registerCommand("_workbench.htmlPreview.postMessage",function(e,t,i){for(var r=function(e,t){var i=t instanceof n.default?t:n.default.parse(t);return e.get(s.IEditorService).visibleControls.filter(function(e){return e instanceof l.HtmlPreviewPart&&e.model}).map(function(e){return e}).filter(function(e){return e.model.uri.scheme===i.scheme&&e.model.uri.toString()===i.toString()})}(e,t),o=0,a=r;o<a.length;o++){a[o].sendMessage(i)}
return r.length>0})}),define(e[481],t([1,0,8,106,7,4,15,6,28,12,27,247,21,46,362,340]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(n,i,r,o,s,a,l){var u=e.call(this,t.ID,n,i,r)||this;return u._contextKeyService=r,u._partService=o,u._contextService=s,u._instantiationService=a,u._editorService=l,u._onDidFocusWebview=new c.Emitter,u}return n(t,e),t.prototype.createEditor=function(e){this._editorFrame=e,this._content=document.createElement("div"),e.appendChild(this._content)},t.prototype.doUpdateContainer=function(){var e=this.input&&this.input.container;if(e&&e.parentElement){var t=this._editorFrame.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect();e.style.position="absolute",e.style.top=t.top-n.top+"px",e.style.left=t.left-n.left+"px",e.style.width=t.width+"px",e.style.height=t.height+"px"}},t.prototype.layout=function(t){this._webview&&this.doUpdateContainer(),e.prototype.layout.call(this,t)},
t.prototype.focus=function(){var t=this;e.prototype.focus.call(this),this._onFocusWindowHandler||(this._onFocusWindowHandler=r.domEvent(window,"focus")(function(){t._editorService.activeControl===t&&t.focus()}))},t.prototype.dispose=function(){this._webview=void 0,this._webviewContent=void 0,this._content&&this._content.parentElement&&(this._content.parentElement.removeChild(this._content),this._content=void 0),this._onDidFocusWebview.dispose(),this._webviewFocusTracker&&(this._webviewFocusTracker.dispose(),this._webviewFocusTracker=void 0),this._webviewFocusListenerDisposable&&(this._webviewFocusListenerDisposable.dispose(),this._webviewFocusListenerDisposable=void 0),this._onFocusWindowHandler&&this._onFocusWindowHandler.dispose(),e.prototype.dispose.call(this)},t.prototype.sendMessage=function(e){this._webview&&this._webview.sendMessage(e)},Object.defineProperty(t.prototype,"onDidFocus",{get:function(){return this._onDidFocusWebview.event},enumerable:!0,configurable:!0}),
t.prototype.setEditorVisible=function(t,n){this.input&&this.input instanceof v.WebviewEditorInput&&(t?this.input.claimWebview(this):this.input.releaseWebview(this),this.updateWebview(this.input)),this._webviewContent&&(t?(this._webviewContent.style.visibility="visible",this.doUpdateContainer()):this._webviewContent.style.visibility="hidden"),e.prototype.setEditorVisible.call(this,t,n)},t.prototype.clearInput=function(){this.input&&this.input instanceof v.WebviewEditorInput&&this.input.releaseWebview(this),this._webview=void 0,this._webviewContent=void 0,e.prototype.clearInput.call(this)},t.prototype.setInput=function(t,n,i){return o(this,void 0,u.TPromise,function(){return s(this,function(r){switch(r.label){case 0:return this.input&&(this.input.releaseWebview(this),this._webview=void 0,this._webviewContent=void 0),[4,e.prototype.setInput.call(this,t,n,i)];case 1:return r.sent(),[4,t.resolve()];case 2:return r.sent(),i.isCancellationRequested?[2]:(t.updateGroup(this.group.id),this.updateWebview(t),[2])}})})},
t.prototype.updateWebview=function(e){var t=this.getWebview(e);e.claimWebview(this),t.options={allowScripts:e.options.enableScripts,allowSvgs:!0,enableWrappedPostMessage:!0,useSameOriginForRoot:!1,localResourceRoots:e.options.localResourceRoots||this.getDefaultLocalResourceRoots()},e.html=e.html,this._webviewContent&&(this._webviewContent.style.visibility="visible"),this.doUpdateContainer()},t.prototype.getDefaultLocalResourceRoots=function(){var e=this._contextService.getWorkspace().folders.map(function(e){return e.uri});return this.input.extensionLocation&&e.push(this.input.extensionLocation),e},t.prototype.getWebview=function(e){if(this._webview)return this._webview;this._webviewContent=e.container,this.trackFocus();var t=e.webview;return t?(this._webview=t,t):(e.options.enableFindWidget&&(this._contextKeyService=this._register(this._contextKeyService.createScoped(this._webviewContent)),this.contextKey=b.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FOCUS.bindTo(this._contextKeyService),
this.findInputFocusContextKey=b.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FIND_WIDGET_INPUT_FOCUSED.bindTo(this._contextKeyService),this.findWidgetVisible=b.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService)),this._webview=this._instantiationService.createInstance(S.WebviewElement,this._partService.getContainer(y.Parts.EDITOR_PART),this.contextKey,this.findInputFocusContextKey,{enableWrappedPostMessage:!0,useSameOriginForRoot:!1}),this._webview.mountTo(this._webviewContent),e.webview=this._webview,e.options.tryRestoreScrollPosition&&(this._webview.initialScrollProgress=e.scrollYPercentage),this._webview.state=e.state.state,this._content.setAttribute("aria-flowto",this._webviewContent.id),this.doUpdateContainer(),this._webview)},t.prototype.trackFocus=function(){var e=this;this._webviewFocusTracker&&this._webviewFocusTracker.dispose(),this._webviewFocusListenerDisposable&&this._webviewFocusListenerDisposable.dispose(),this._webviewFocusTracker=i.trackFocus(this._webviewContent),
this._webviewFocusListenerDisposable=this._webviewFocusTracker.onDidFocus(function(){e._onDidFocusWebview.fire()})},t.ID="WebviewEditor",t=a([l(0,p.ITelemetryService),l(1,f.IThemeService),l(2,d.IContextKeyService),l(3,y.IPartService),l(4,g.IWorkspaceContextService),l(5,h.IInstantiationService),l(6,m.IEditorService)],t)}(b.BaseWebviewEditor);t.WebviewEditor=_}),define(e[1381],t([1,0,5,50,10,4,1454,276,38,88,61,481,247,248,21,49,53,67]),function(e,t,n,i,r,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";function E(e){return c({},e,{localResourceRoots:Array.isArray(e.localResourceRoots)?e.localResourceRoots.map(r.default.revive):void 0})}Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e,n,i,r,o,s,a){var c=this;this._editorGroupService=i,this._editorService=r,this._webviewService=o,this._openerService=s,this._extensionService=a,this._toDispose=[],this._webviews=new Map,this._revivers=new Set,this._activeWebview=void 0,this._proxy=e.getProxy(g.ExtHostContext.ExtHostWebviews),
r.onDidActiveEditorChange(this.onActiveEditorChanged,this,this._toDispose),r.onDidVisibleEditorsChange(this.onVisibleEditorsChanged,this,this._toDispose),this._toDispose.push(o.registerReviver(t.viewType,this)),n.onWillShutdown(function(e){e.veto(c._onWillShutdown())},this,this._toDispose)}t=e,e.prototype.dispose=function(){this._toDispose=n.dispose(this._toDispose)},e.prototype.$createWebviewPanel=function(e,n,i,o,s,a){var c=Object.create(null);o&&(c.preserveFocus=o.preserveFocus,c.group=h.viewColumnToEditorGroup(this._editorGroupService,o.viewColumn));var l=this._webviewService.createWebview(t.viewType,i,c,E(s),r.default.revive(a),this.createWebviewEventDelegate(e));l.state={viewType:n,state:void 0},this._webviews.set(e,l),this._activeWebview=e},e.prototype.$disposeWebview=function(e){this.getWebview(e).dispose()},e.prototype.$setTitle=function(e,t){this.getWebview(e).setName(t)},e.prototype.$setHtml=function(e,t){this.getWebview(e).html=t},e.prototype.$setOptions=function(e,t){
this.getWebview(e).setOptions(E(t))},e.prototype.$reveal=function(e,t,n){var i=this.getWebview(e);if(!i.isDisposed()){var r=this._editorGroupService.getGroup(h.viewColumnToEditorGroup(this._editorGroupService,t));this._webviewService.revealWebview(i,r||this._editorGroupService.activeGroup,n)}},e.prototype.$postMessage=function(e,t){return o(this,void 0,u.TPromise,function(){var n,i,r,o,a;return s(this,function(s){for(n=this.getWebview(e),i=this._editorService.visibleControls.filter(function(e){return e instanceof v.WebviewEditor}).map(function(e){return e}).filter(function(e){return e.input.matches(n)}),r=0,o=i;r<o.length;r++)(a=o[r]).sendMessage(t);return[2,i.length>0]})})},e.prototype.$registerSerializer=function(e){this._revivers.add(e)},e.prototype.$unregisterSerializer=function(e){this._revivers.delete(e)},e.prototype.reviveWebview=function(e){var n=this,i=e.state.viewType;return this._extensionService.activateByEvent("onWebviewPanel:"+i).then(function(){var r="revival-"+t.revivalPool++
;n._webviews.set(r,e),e._events=n.createWebviewEventDelegate(r);var o=void 0;if(e.state.state)try{o=JSON.parse(e.state.state)}catch(e){}return n._proxy.$deserializeWebviewPanel(r,e.state.viewType,e.getTitle(),o,h.editorGroupToViewColumn(n._editorGroupService,e.group),e.options).then(void 0,function(){e.html=t.getDeserializationFailedContents(i)})})},e.prototype.canRevive=function(e){return!(e.isDisposed()||!e.state)&&(this._revivers.has(e.state.viewType)||!!e.reviver)},e.prototype._onWillShutdown=function(){var e=this;return this._webviews.forEach(function(t){e.canRevive(t)&&(t.state.state=t.webviewState)}),u.TPromise.as(!1)},e.prototype.createWebviewEventDelegate=function(e){var t=this;return{onDidClickLink:function(n){return t.onDidClickLink(e,n)},onMessage:function(n){return t._proxy.$onMessage(e,n)},onDispose:function(){t._proxy.$onDidDisposeWebviewPanel(e).then(function(){return t._webviews.delete(e)},function(){return t._webviews.delete(e)})}}},e.prototype.onActiveEditorChanged=function(){
var e=this._editorService.activeControl,t=void 0;if(e&&e.input instanceof m.WebviewEditorInput)for(var n=0,r=i.keys(this._webviews);n<r.length;n++){var o=r[n],s=this._webviews.get(o);if(s.matches(e.input)){t={input:s,handle:o};break}}if(t&&t.handle===this._activeWebview)this._proxy.$onDidChangeWebviewPanelViewState(t.handle,{active:!0,visible:!0,position:h.editorGroupToViewColumn(this._editorGroupService,t.input.group)});else{if(void 0!==this._activeWebview){var a=this._webviews.get(this._activeWebview);a&&this._proxy.$onDidChangeWebviewPanelViewState(this._activeWebview,{active:!1,visible:this._editorService.visibleControls.some(function(e){return e.input&&e.input.matches(a)}),position:h.editorGroupToViewColumn(this._editorGroupService,a.group)})}t?(this._proxy.$onDidChangeWebviewPanelViewState(t.handle,{active:!0,visible:!0,position:h.editorGroupToViewColumn(this._editorGroupService,e.group)}),this._activeWebview=t.handle):this._activeWebview=void 0}},e.prototype.onVisibleEditorsChanged=function(){
var e=this;this._webviews.forEach(function(t,n){for(var i=0,r=e._editorService.visibleControls;i<r.length;i++){var o=r[i];if(o.input&&o.input.matches(t)){var s=h.editorGroupToViewColumn(e._editorGroupService,o.group);t.updateGroup(o.group.id),e._proxy.$onDidChangeWebviewPanelViewState(n,{active:n===e._activeWebview,visible:!0,position:s});break}}})},e.prototype.onDidClickLink=function(e,n){if(n){var i=this.getWebview(e).options.enableCommandUris;(t.standardSupportedLinkSchemes.indexOf(n.scheme)>=0||i&&"command"===n.scheme)&&this._openerService.open(n)}},e.prototype.getWebview=function(e){var t=this._webviews.get(e);if(!t)throw new Error("Unknown webview handle:"+e);return t},e.getDeserializationFailedContents=function(e){
return"<!DOCTYPE html>\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<base href=\"https://code.visualstudio.com/raw/\">\n\t\t\t\t<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\">\n\t\t\t\t<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource: https: 'unsafe-inline'; child-src 'none'; frame-src 'none';\">\n\t\t\t</head>\n\t\t\t<body>"+d.localize(0,null,e)+"</body>\n\t\t</html>"};var t;return e.viewType="mainThreadWebview",e.standardSupportedLinkSchemes=["http","https","mailto"],e.revivalPool=0,e=t=a([C.extHostNamedCustomer(g.MainContext.MainThreadWebviews),l(1,p.ILifecycleService),l(2,_.IEditorGroupsService),l(3,b.IEditorService),l(4,y.IWebviewEditorService),l(5,f.IOpenerService),l(6,S.IExtensionService)],e)}();t.MainThreadWebviews=w}),define(e[1382],t([1,0,744,31,15,112,107,52,16,147,56,40,1376,362,1234,481,247,248]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),c.Registry.as(l.Extensions.Editors).registerEditor(new l.EditorDescriptor(g.WebviewEditor,g.WebviewEditor.ID,n.localize(0,null)),[new o.SyncDescriptor(v.WebviewEditorInput)]),c.Registry.as(d.Extensions.EditorInputFactories).registerEditorInputFactory(h.WebviewEditorInputFactory.ID,h.WebviewEditorInputFactory),s.registerSingleton(m.IWebviewEditorService,m.WebviewEditorService);var y=n.localize(1,null),b=c.Registry.as(u.Extensions.WorkbenchActions),S=new f.ShowWebViewEditorFindWidgetCommand({id:f.ShowWebViewEditorFindWidgetCommand.ID,precondition:p.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FOCUS,kbOpts:{primary:2084}});a.KeybindingsRegistry.registerCommandAndKeybindingRule(S.toCommandAndKeybindingRule(a.KeybindingsRegistry.WEIGHT.editorContrib()));var _=new f.HideWebViewEditorFindCommand({id:f.HideWebViewEditorFindCommand.ID,precondition:r.ContextKeyExpr.and(p.KEYBINDING_CONTEXT_WEBVIEWEDITOR_FOCUS,p.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE),kbOpts:{primary:9}})
;a.KeybindingsRegistry.registerCommandAndKeybindingRule(_.toCommandAndKeybindingRule(a.KeybindingsRegistry.WEIGHT.editorContrib())),b.registerWorkbenchAction(new i.SyncActionDescriptor(f.OpenWebviewDeveloperToolsAction,f.OpenWebviewDeveloperToolsAction.ID,f.OpenWebviewDeveloperToolsAction.LABEL),"Webview Tools",y),b.registerWorkbenchAction(new i.SyncActionDescriptor(f.ReloadWebviewAction,f.ReloadWebviewAction.ID,f.ReloadWebviewAction.LABEL),"Reload Webview",y)}),define(e[1383],t([1,0,74,8,16,37,272,21,46,747,23,56,31,29,5,15,6,12,26,51,935]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E,w=[{id:"explorer",arrow:"&larr;",label:h.localize(0,null),command:"workbench.view.explorer"},{id:"search",arrow:"&larr;",label:h.localize(1,null),command:"workbench.view.search"},{id:"git",arrow:"&larr;",label:h.localize(2,null),command:"workbench.view.scm"},{id:"debug",arrow:"&larr;",label:h.localize(3,null),command:"workbench.view.debug"},{
id:"extensions",arrow:"&larr;",label:h.localize(4,null),command:"workbench.view.extensions"},{id:"problems",arrow:"&larrpl;",label:h.localize(5,null),command:"workbench.actions.view.problems"},{id:"commandPalette",arrow:"&nwarr;",label:h.localize(6,null),command:c.ShowAllCommandsAction.ID},{id:"notifications",arrow:"&cudarrr;",arrowLast:!0,label:h.localize(7,null),command:"notifications.showList"}],I=new y.RawContextKey("interfaceOverviewVisible",!1),T=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.instantiationService=i,r}return n(t,e),t.prototype.run=function(){return E||(E=this.instantiationService.createInstance(k)),E.show(),null},t.ID="workbench.action.showInterfaceOverview",t.LABEL=h.localize(8,null),t=a([l(2,b.IInstantiationService)],t)}(p.Action);t.WelcomeOverlayAction=T;var x=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){return E&&E.hide(),null},t.ID="workbench.action.hideInterfaceOverview",t.LABEL=h.localize(9,null),t
}(p.Action);t.HideWelcomeOverlayAction=x;var k=function(){function e(e,t,n,i,r){this.partService=e,this.editorService=t,this.commandService=n,this._contextKeyService=i,this.keybindingService=r,this._toDispose=[],this._overlayVisible=I.bindTo(this._contextKeyService),this.create()}return e.prototype.create=function(){var e=this,t=this.partService.getContainer(d.Parts.EDITOR_PART),n=this.partService.getTitleBarOffset();this._overlay=i.$(t.parentElement).div({class:"welcomeOverlay"}).style({top:n+"px"}).style({height:"calc(100% - "+n+"px)"}).display("none"),this._overlay.on("click",function(){return e.hide()},this._toDispose),this.commandService.onWillExecuteCommand(function(){return e.hide()}),i.$(this._overlay).div({class:"commandPalettePlaceholder"});var r=!!this.editorService.visibleEditors.length;w.filter(function(e){return!("withEditor"in e)||e.withEditor===r}).forEach(function(t){var n=t.id,r=t.arrow,o=t.label,s=t.command,a=t.arrowLast,c=i.$(e._overlay).div({class:["key",n]});if(a||i.$(c).span({
class:"arrow"}).innerHtml(r),i.$(c).span({class:"label"}).text(o),s){var l=e.keybindingService.lookupKeybinding(s);l&&i.$(c).span({class:"shortcut"}).text(l.getLabel())}a&&i.$(c).span({class:"arrow"}).innerHtml(r)})},e.prototype.show=function(){if("block"!==this._overlay.style("display")){this._overlay.display("block");var e=document.querySelector(".monaco-workbench");r.addClass(e,"blur-background"),this._overlayVisible.set(!0),this.updateProblemsKey()}},e.prototype.updateProblemsKey=function(){var e=document.querySelector(".task-statusbar-item"),t=this._overlay.getHTMLElement().querySelector(".key.problems");if(e instanceof HTMLElement){var n=e.getBoundingClientRect(),i=this._overlay.getHTMLElement().getBoundingClientRect(),r=i.bottom-n.top+3,o=(n.left+n.right)/2-i.left;t.style.bottom=r+"px",t.style.left=o+"px"}else t.style.bottom=null,t.style.left=null},e.prototype.hide=function(){if("none"!==this._overlay.style("display")){this._overlay.display("none");var e=document.querySelector(".monaco-workbench")
;r.removeClass(e,"blur-background"),this._overlayVisible.reset()}},e.prototype.dispose=function(){this._toDispose=m.dispose(this._toDispose)},e=a([l(0,d.IPartService),l(1,u.IEditorService),l(2,v.ICommandService),l(3,y.IContextKeyService),l(4,s.IKeybindingService)],e)}();o.Registry.as(f.Extensions.WorkbenchActions).registerWorkbenchAction(new g.SyncActionDescriptor(T,T.ID,T.LABEL),"Help: User Interface Overview",h.localize(10,null)),o.Registry.as(f.Extensions.WorkbenchActions).registerWorkbenchAction(new g.SyncActionDescriptor(x,x.ID,x.LABEL,{primary:9},I),"Help: Hide Interface Overview",h.localize(11,null)),S.registerThemingParticipant(function(e,t){var n=e.getColor(_.foreground);n&&t.addRule(".monaco-workbench > .welcomeOverlay > .key { color: "+n+"; }");var i=C.Color.fromHex("light"===e.type?"#FFFFFF85":"#00000085");i&&t.addRule(".monaco-workbench > .welcomeOverlay { background: "+i+"; }");var r=e.getColor(_.textPreformatForeground)
;r&&t.addRule(".monaco-workbench > .welcomeOverlay > .key > .shortcut { color: "+r+"; }")})}),define(e[482],t([1,0,777,20,14,11,110,16,210,31,56,40,49,37,435,313]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYBINDING_ENTRY_TEMPLATE_ID="keybinding.entry.template",t.KEYBINDING_HEADER_TEMPLATE_ID="keybinding.header.template";var b=i.localize(0,null),S=i.localize(1,null),_=c.or(c.matchesPrefix,c.matchesWords,c.matchesContiguousSubString),C=function(e){function i(t,n,i){var r=e.call(this)||this;return r.keybindingsService=n,r.extensionService=i,r.modifierLabels={ui:d.UILabelProvider.modifierLabels[t],aria:d.AriaLabelProvider.modifierLabels[t],user:d.UserSettingsLabelProvider.modifierLabels[t]},r}return n(i,e),i.prototype.fetch=function(e,n){void 0===n&&(n=!1);var r=n?this._keybindingItemsSortedByPrecedence:this._keybindingItems;return/@source:\s*(user|default)/i.test(e)&&(r=this.filterBySource(r,e),e=e.replace(/@source:\s*(user|default)/i,"")),
(e=e.trim())?this.filterByText(r,e):r.map(function(e){return{id:i.getId(e),keybindingItem:e,templateId:t.KEYBINDING_ENTRY_TEMPLATE_ID}})},i.prototype.filterBySource=function(e,t){return/@source:\s*default/i.test(t)?e.filter(function(e){return e.source===b}):/@source:\s*user/i.test(t)?e.filter(function(e){return e.source===S}):e},i.prototype.filterByText=function(e,n){var r='"'===n.charAt(0),o='"'===n.charAt(n.length-1),s=r&&o;r&&(n=n.substring(1)),o&&(n=n.substring(0,n.length-1));for(var a=[],c=(n=n.trim()).split(" "),l=this.splitKeybindingWords(c),u=0,d=e;u<d.length;u++){var h=d[u],p=new E(this.modifierLabels,h,n,c,l,s);(p.commandIdMatches||p.commandLabelMatches||p.commandDefaultLabelMatches||p.sourceMatches||p.whenMatches||p.keybindingMatches)&&a.push({id:i.getId(h),templateId:t.KEYBINDING_ENTRY_TEMPLATE_ID,commandLabelMatches:p.commandLabelMatches,commandDefaultLabelMatches:p.commandDefaultLabelMatches,keybindingItem:h,keybindingMatches:p.keybindingMatches,commandIdMatches:p.commandIdMatches,
sourceMatches:p.sourceMatches,whenMatches:p.whenMatches})}return a},i.prototype.splitKeybindingWords=function(e){for(var t=[],n=0,i=e;n<i.length;n++){var r=i[n];t.push.apply(t,r.split("+").filter(function(e){return!!e}))}return t},i.prototype.resolve=function(e){var t=this;return this.extensionService.whenInstalledExtensionsRegistered().then(function(){var n=u.Registry.as(p.Extensions.WorkbenchActions);t._keybindingItemsSortedByPrecedence=[];for(var r=new Map,o=0,s=t.keybindingsService.getKeybindings();o<s.length;o++){var a=s[o];a.command&&(t._keybindingItemsSortedByPrecedence.push(i.toKeybindingEntry(a.command,a,n,e)),r.set(a.command,!0))}for(var c=t.keybindingsService.getDefaultKeybindings().map(function(e){return e.command}),l=0,d=y.KeybindingResolver.getAllUnboundCommands(r);l<d.length;l++){var h=d[l],f=new m.ResolvedKeybindingItem(null,h,null,null,-1===c.indexOf(h));t._keybindingItemsSortedByPrecedence.push(i.toKeybindingEntry(h,f,n,e))}
return t._keybindingItems=t._keybindingItemsSortedByPrecedence.slice(0).sort(function(e,t){return i.compareKeybindingData(e,t)}),t})},i.getId=function(e){return e.command+(e.keybinding?e.keybinding.getAriaLabel():"")+e.source+e.when},i.compareKeybindingData=function(e,t){return e.keybinding&&!t.keybinding?-1:t.keybinding&&!e.keybinding?1:e.commandLabel&&!t.commandLabel?-1:t.commandLabel&&!e.commandLabel?1:e.commandLabel&&t.commandLabel&&e.commandLabel!==t.commandLabel?e.commandLabel.localeCompare(t.commandLabel):e.command===t.command?e.keybindingItem.isDefault?1:-1:e.command.localeCompare(t.command)},i.toKeybindingEntry=function(e,t,n,r){var o=h.MenuRegistry.getCommand(e),s=r[e];return{keybinding:t.resolvedKeybinding,keybindingItem:t,command:e,commandLabel:i.getCommandLabel(o,s),commandDefaultLabel:i.getCommandDefaultLabel(o,n),when:t.when?t.when.serialize():"",source:t.isDefault?b:S}},i.getCommandDefaultLabel=function(e,t){
return s.language!==s.LANGUAGE_DEFAULT&&e&&e.title&&e.title.original?e.title.original:null},i.getCommandLabel=function(e,t){return e?"string"==typeof e.title?e.title:e.title.value:t||""},i=a([l(1,v.IKeybindingService),l(2,g.IExtensionService)],i)}(f.EditorModel);t.KeybindingsEditorModel=C;var E=function(){function e(e,t,n,i,r,o){this.modifierLabels=e,this.commandIdMatches=null,this.commandLabelMatches=null,this.commandDefaultLabelMatches=null,this.sourceMatches=null,this.whenMatches=null,this.keybindingMatches=null,o||(this.commandIdMatches=this.matches(n,t.command,c.or(c.matchesWords,c.matchesCamelCase),i),this.commandLabelMatches=t.commandLabel?this.matches(n,t.commandLabel,function(e,n){return c.matchesWords(e,t.commandLabel,!0)},i):null,this.commandDefaultLabelMatches=t.commandDefaultLabel?this.matches(n,t.commandDefaultLabel,function(e,n){return c.matchesWords(e,t.commandDefaultLabel,!0)},i):null,this.sourceMatches=this.matches(n,t.source,function(e,n){return c.matchesWords(e,t.source,!0)},i),
this.whenMatches=t.when?this.matches(n,t.when,c.or(c.matchesWords,c.matchesCamelCase),i):null),this.keybindingMatches=t.keybinding?this.matchesKeybinding(t.keybinding,n,r,o):null}return e.prototype.matches=function(e,t,n,i){var r=_(e,t);return r||(r=this.matchesWords(i,t,n)),r&&(r=this.filterAndSort(r)),r},e.prototype.matchesWords=function(e,t,n){for(var i=[],r=0,o=e;r<o.length;r++){var s=n(o[r],t);if(!s){i=null;break}i=(i||[]).concat(s)}return i},e.prototype.filterAndSort=function(e){return r.distinct(e,function(e){return e.start+"."+e.end}).filter(function(t){return!e.some(function(e){return!(e.start===t.start&&e.end===t.end)&&e.start<=t.start&&e.end>=t.end})}).sort(function(e,t){return e.start-t.start})},e.prototype.matchesKeybinding=function(e,t,n,i){var r=e.getParts(),s=r[0],a=r[1];if(0===o.compareIgnoreCase(t,e.getAriaLabel())||0===o.compareIgnoreCase(t,e.getLabel()))return{firstPart:this.createCompleteMatch(s),chordPart:this.createCompleteMatch(a)}
;for(var c={},l={},u=[],d=[],h=[],p=!0,f=0;f<n.length;f++){var g=n[f],v=!1,m=!1;p=p&&!c.keyCode;var y=!l.keyCode;if(p&&(v=this.matchPart(s,c,g,i),c.keyCode)){for(var b=0,S=h;b<S.length;b++){var _=S[b];-1===d.indexOf(_)&&u.splice(u.indexOf(_),1)}l={},h=[],y=!1}y&&(m=this.matchPart(a,l,g,i)),v&&d.push(f),m&&h.push(f),(v||m)&&u.push(f),p=p&&this.isModifier(g)}return u.length!==n.length?null:(!i||this.isCompleteMatch(s,c)&&this.isCompleteMatch(a,l))&&(this.hasAnyMatch(c)||this.hasAnyMatch(l))?{firstPart:c,chordPart:l}:null},e.prototype.matchPart=function(e,t,n,i){var r=!1;return this.matchesMetaModifier(e,n)&&(r=!0,t.metaKey=!0),this.matchesCtrlModifier(e,n)&&(r=!0,t.ctrlKey=!0),this.matchesShiftModifier(e,n)&&(r=!0,t.shiftKey=!0),this.matchesAltModifier(e,n)&&(r=!0,t.altKey=!0),this.matchesKeyCode(e,n,i)&&(t.keyCode=!0,r=!0),r},e.prototype.matchesKeyCode=function(e,t,n){if(!e)return!1;var i=e.keyAriaLabel;if(n||1===i.length||1===t.length){if(0===o.compareIgnoreCase(i,t))return!0
}else if(c.matchesContiguousSubString(t,i))return!0;return!1},e.prototype.matchesMetaModifier=function(e,t){return!!e&&(!!e.metaKey&&this.wordMatchesMetaModifier(t))},e.prototype.wordMatchesMetaModifier=function(e){return!!c.matchesPrefix(this.modifierLabels.ui.metaKey,e)||(!!c.matchesPrefix(this.modifierLabels.aria.metaKey,e)||(!!c.matchesPrefix(this.modifierLabels.user.metaKey,e)||!!c.matchesPrefix(i.localize(2,null),e)))},e.prototype.matchesCtrlModifier=function(e,t){return!!e&&(!!e.ctrlKey&&this.wordMatchesCtrlModifier(t))},e.prototype.wordMatchesCtrlModifier=function(e){return!!c.matchesPrefix(this.modifierLabels.ui.ctrlKey,e)||(!!c.matchesPrefix(this.modifierLabels.aria.ctrlKey,e)||!!c.matchesPrefix(this.modifierLabels.user.ctrlKey,e))},e.prototype.matchesShiftModifier=function(e,t){return!!e&&(!!e.shiftKey&&this.wordMatchesShiftModifier(t))},e.prototype.wordMatchesShiftModifier=function(e){
return!!c.matchesPrefix(this.modifierLabels.ui.shiftKey,e)||(!!c.matchesPrefix(this.modifierLabels.aria.shiftKey,e)||!!c.matchesPrefix(this.modifierLabels.user.shiftKey,e))},e.prototype.matchesAltModifier=function(e,t){return!!e&&(!!e.altKey&&this.wordMatchesAltModifier(t))},e.prototype.wordMatchesAltModifier=function(e){return!!c.matchesPrefix(this.modifierLabels.ui.altKey,e)||(!!c.matchesPrefix(this.modifierLabels.aria.altKey,e)||(!!c.matchesPrefix(this.modifierLabels.user.altKey,e)||!!c.matchesPrefix(i.localize(3,null),e)))},e.prototype.hasAnyMatch=function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.keyCode},e.prototype.isCompleteMatch=function(e,t){return!e||!!t.keyCode&&(!(e.metaKey&&!t.metaKey)&&(!(e.altKey&&!t.altKey)&&(!(e.ctrlKey&&!t.ctrlKey)&&!(e.shiftKey&&!t.shiftKey))))},e.prototype.createCompleteMatch=function(e){var t={};return e&&(t.keyCode=!0,e.metaKey&&(t.metaKey=!0),e.altKey&&(t.altKey=!0),e.ctrlKey&&(t.ctrlKey=!0),e.shiftKey&&(t.shiftKey=!0)),t},
e.prototype.isModifier=function(e){return!!this.wordMatchesAltModifier(e)||(!!this.wordMatchesCtrlModifier(e)||(!!this.wordMatchesMetaModifier(e)||!!this.wordMatchesShiftModifier(e)))},e}()}),define(e[115],t([1,0,6,25,17,778]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPreferencesService=n.createDecorator("preferencesService"),t.getSettingsTargetName=function(e,t,n){switch(e){case r.ConfigurationTarget.USER:return o.localize(0,null);case r.ConfigurationTarget.WORKSPACE:return o.localize(1,null);case r.ConfigurationTarget.WORKSPACE_FOLDER:var i=n.getWorkspaceFolder(t);return i?i.name:""}return""},t.FOLDER_SETTINGS_PATH=i.join(".vscode","settings.json"),t.DEFAULT_SETTINGS_EDITOR_SETTING="workbench.settings.openDefaultSettings"}),define(e[1386],t([1,0,22,37,34,568,115]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t,n,i){this.notificationService=e,this.keybindingService=t,this.preferencesService=n,
this.storageService=i,this.previousCommands=["search.history.showNextIncludePattern","search.history.showPreviousIncludePattern","search.history.showNextExcludePattern","search.history.showPreviousExcludePattern","search.history.showNext","search.history.showPrevious","search.replaceHistory.showNext","search.replaceHistory.showPrevious","find.history.showPrevious","find.history.showNext","workbench.action.terminal.findWidget.history.showNext","workbench.action.terminal.findWidget.history.showPrevious","editor.action.extensioneditor.showNextFindTerm","editor.action.extensioneditor.showPreviousFindTerm","editor.action.webvieweditor.showNextFindTerm","editor.action.webvieweditor.showPreviousFindTerm","repl.action.historyNext","repl.action.historyPrevious"],this.showRemovedWarning()}return e.prototype.showRemovedWarning=function(){var e=this,t="donotshow.historyNavigation.warning";if(!this.storageService.getBoolean(t,r.StorageScope.GLOBAL,!1)){if(this.keybindingService.getKeybindings().filter(function(t){
return!t.isDefault&&-1!==e.previousCommands.indexOf(t.command)}).length){var i=o.localize(0,null);this.notificationService.prompt(n.Severity.Warning,i,[{label:o.localize(1,null),run:function(){return e.preferencesService.openGlobalKeybindingSettings(!0)}},{label:o.localize(2,null),run:function(){return null}},{label:o.localize(3,null),isSecondary:!0,run:function(){return e.storageService.store(t,!0,r.StorageScope.GLOBAL)}}])}}},e=a([l(0,n.INotificationService),l(1,i.IKeybindingService),l(2,s.IPreferencesService),l(3,r.IStorageService)],e)}();t.HistoryNavigationKeybindingsChangedContribution=c}),define(e[1387],t([1,0,604,5,7,4,14,24,10,25,38,34,49,17,33,27,6,29,1248,21,64,45,95,115,1170,16,120,1244]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var L=k.Registry.as(D.Extensions.JSONContribution);L.registerSchema(I.launchSchemaId,A.launchSchema);var R="debug.selectedconfigname",O="debug.selectedroot",M=function(){
function e(e,t,n,i,r,s,a,c,l){this.contextService=e,this.editorService=t,this.configurationService=n,this.quickOpenService=i,this.instantiationService=r,this.commandService=s,this.storageService=a,this.extensionService=l,this.breakpointModeIdsSet=new Set,this._onDidSelectConfigurationName=new o.Emitter,this.providers=[],this.debuggers=[],this.toDispose=[],this.registerListeners(c),this.initLaunches();var u=this.storageService.get(O,f.StorageScope.WORKSPACE),d=this.launches.filter(function(e){return e.uri.toString()===u}).pop();d&&this.selectConfiguration(d,this.storageService.get(R,f.StorageScope.WORKSPACE)),this.debugAdapterProviders=new Map}return e.prototype.registerDebugConfigurationProvider=function(e,t){if(t){t.handle=e,this.providers=this.providers.filter(function(t){return t.handle!==e}),this.providers.push(t);var n=this.getDebugger(t.type);n&&t.provideDebugConfigurations&&(n.hasConfigurationProvider=!0)}},e.prototype.unregisterDebugConfigurationProvider=function(e){
this.providers=this.providers.filter(function(t){return t.handle!==e})},e.prototype.resolveConfigurationByProviders=function(e,t,n){var i=this;return this.extensionService.activateByEvent("onDebugResolve:"+t).then(function(){return i.providers.filter(function(e){return e.type===t&&e.resolveDebugConfiguration}).concat(i.providers.filter(function(e){return"*"===e.type&&e.resolveDebugConfiguration})).reduce(function(t,n){return t.then(function(t){return t?n.resolveDebugConfiguration(e,t):Promise.resolve(t)})},s.TPromise.as(n))})},e.prototype.provideDebugConfigurations=function(e,t){return s.TPromise.join(this.providers.filter(function(e){return e.type===t&&e.provideDebugConfigurations}).map(function(t){return t.provideDebugConfigurations(e)})).then(function(e){return e.reduce(function(e,t){return e.concat(t)},[])})},e.prototype.debugAdapterExecutable=function(e,t){var n=this.providers.filter(function(e){return e.type===t&&e.debugAdapterExecutable})
;return 1===n.length?n[0].debugAdapterExecutable(e):s.TPromise.as(void 0)},e.prototype.registerDebugAdapterProvider=function(e,t){var n=this;return e.forEach(function(e){return n.debugAdapterProviders.set(e,t)}),{dispose:function(){e.forEach(function(e){return n.debugAdapterProviders.delete(e)})}}},e.prototype.getDebugAdapterProvider=function(e){return this.debugAdapterProviders.get(e)},e.prototype.createDebugAdapter=function(e,t,n){var i=this.getDebugAdapterProvider(e);if(i)return i.createDebugAdapter(e,t,n)},e.prototype.substituteVariables=function(e,t,n){var i=this.getDebugAdapterProvider(e);return i?i.substituteVariables(t,n):s.TPromise.as(n)},e.prototype.runInTerminal=function(e,t,n){var i=this.getDebugAdapterProvider(e);return i||(this.terminalLauncher||(this.terminalLauncher=this.instantiationService.createInstance(x.TerminalLauncher)),i=this.terminalLauncher),i.runInTerminal(t,n)},e.prototype.registerListeners=function(e){var t=this;A.debuggersExtPoint.setHandler(function(e){e.forEach(function(e){
e.value.forEach(function(n){n.type&&"string"==typeof n.type||e.collector.error(i.localize(0,null)),n.enableBreakpointsFor&&n.enableBreakpointsFor.languageIds.forEach(function(e){t.breakpointModeIdsSet.add(e)});var r=t.getDebugger(n.type);r?r.merge(n,e.description):t.debuggers.push(t.instantiationService.createInstance(_.Debugger,t,n,e.description))})}),t.debuggers.forEach(function(e){var t,n,i=A.launchSchema.properties.configurations.items,r=e.getSchemaAttributes();r&&(t=i.oneOf).push.apply(t,r);var o=e.configurationSnippets;o&&(n=i.defaultSnippets).push.apply(n,o)}),t.setCompoundSchemaValues()}),A.breakpointsExtPoint.setHandler(function(e){e.forEach(function(e){e.value.forEach(function(e){t.breakpointModeIdsSet.add(e.language)})})}),this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(function(){t.initLaunches(),t.selectConfiguration(t.selectedLaunch),t.setCompoundSchemaValues()})),this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(e){
e.affectsConfiguration("launch")&&(t.selectConfiguration(t.selectedLaunch),t.setCompoundSchemaValues())})),this.toDispose.push(e.onShutdown(this.store,this))},e.prototype.initLaunches=function(){var e=this;this.launches=this.contextService.getWorkspace().folders.map(function(t){return e.instantiationService.createInstance(P,e,t)}),this.contextService.getWorkbenchState()===y.WorkbenchState.WORKSPACE&&this.launches.push(this.instantiationService.createInstance(N,this)),this.launches.push(this.instantiationService.createInstance(F,this)),-1===this.launches.indexOf(this.selectedLaunch)&&(this.selectedLaunch=void 0)},e.prototype.setCompoundSchemaValues=function(){var e=A.launchSchema.properties.compounds.items.properties.configurations,t=this.launches.map(function(e){return e.getConfigurationNames(!1)}).reduce(function(e,t){return e.concat(t)},[]);e.items.oneOf[0].enum=t,e.items.oneOf[1].properties.name.enum=t;var n=this.contextService.getWorkspace().folders.map(function(e){return e.name})
;e.items.oneOf[1].properties.folder.enum=n,L.registerSchema(I.launchSchemaId,A.launchSchema)},e.prototype.getLaunches=function(){return this.launches},e.prototype.getLaunch=function(e){if(d.default.isUri(e))return this.launches.filter(function(t){return t.workspace&&t.workspace.uri.toString()===e.toString()}).pop()},Object.defineProperty(e.prototype,"selectedConfiguration",{get:function(){return{launch:this.selectedLaunch,name:this.selectedName}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidSelectConfiguration",{get:function(){return this._onDidSelectConfigurationName.event},enumerable:!0,configurable:!0}),e.prototype.getWorkspaceLaunch=function(){if(this.contextService.getWorkbenchState()===y.WorkbenchState.WORKSPACE)return this.launches[this.launches.length-1]},e.prototype.selectConfiguration=function(e,t){var n=this.selectedLaunch,i=this.selectedName;this.selectedLaunch=e;var r=e?e.getConfigurationNames():[];t&&r.indexOf(t)>=0&&(this.selectedName=t),
-1===r.indexOf(this.selectedName)&&(this.selectedName=r.length?r[0]:void 0),this.selectedLaunch===n&&this.selectedName===i||this._onDidSelectConfigurationName.fire()},e.prototype.canSetBreakpointsIn=function(e){var t=e?e.getLanguageIdentifier().language:null;return!(!t||"jsonc"===t||"log"===t)&&(!!this.configurationService.getValue("debug").allowBreakpointsEverywhere||this.breakpointModeIdsSet.has(t))},e.prototype.getDebugger=function(e){return this.debuggers.filter(function(t){return c.equalsIgnoreCase(t.type,e)}).pop()},e.prototype.guessDebugger=function(e){var t=this;return this.activateDebuggers().then(function(){if(e){var n=t.getDebugger(e);return s.TPromise.as(n)}var r,o=t.editorService.activeTextEditorWidget;if(w.isCodeEditor(o)){var a=o.getModel(),c=a?a.getLanguageIdentifier().language:void 0,l=t.debuggers.filter(function(e){return e.languages&&e.languages.indexOf(c)>=0});if(1===l.length)return s.TPromise.as(l[0]);l.length>1&&(r=l)}return r||(r=t.debuggers.filter(function(e){
return e.hasInitialConfiguration()||e.hasConfigurationProvider})),r=r.sort(function(e,t){return e.label.localeCompare(t.label)}),t.quickOpenService.pick(r.concat([{label:"More...",separator:{border:!0}}]),{placeHolder:i.localize(1,null)}).then(function(e){if(e instanceof _.Debugger)return e;e&&t.commandService.executeCommand("debug.installAdditionalDebuggers")})})},e.prototype.activateDebuggers=function(){var e=this;return this.extensionService.activateByEvent("onDebugInitialConfigurations").then(function(){return e.extensionService.activateByEvent("onDebug")})},e.prototype.store=function(){this.storageService.store(R,this.selectedName,f.StorageScope.WORKSPACE),this.selectedLaunch&&this.storageService.store(O,this.selectedLaunch.uri.toString(),f.StorageScope.WORKSPACE)},e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose)},
e=a([l(0,y.IWorkspaceContextService),l(1,C.IEditorService),l(2,v.IConfigurationService),l(3,E.IQuickOpenService),l(4,b.IInstantiationService),l(5,S.ICommandService),l(6,f.IStorageService),l(7,p.ILifecycleService),l(8,g.IExtensionService)],e)}();t.ConfigurationManager=M;var P=function(){function e(e,t,n,i,r,o){this.configurationManager=e,this.workspace=t,this.fileService=n,this.editorService=i,this.configurationService=r,this.contextService=o}return Object.defineProperty(e.prototype,"uri",{get:function(){return this.workspace.uri.with({path:h.join(this.workspace.uri.path,"/.vscode/launch.json")})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.workspace.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype.getConfig=function(){return this.configurationService.inspect("launch",{resource:this.workspace.uri}).workspaceFolder},e.prototype.getCompound=function(e){
var t=this.getConfig();return t&&t.compounds?t.compounds.filter(function(t){return t.name===e}).pop():null},e.prototype.getConfigurationNames=function(e){void 0===e&&(e=!0);var t=this.getConfig();if(t&&t.configurations&&Array.isArray(t.configurations)){var n=t.configurations.filter(function(e){return e&&"string"==typeof e.name}).map(function(e){return e.name});return e&&t.compounds&&t.compounds&&n.push.apply(n,t.compounds.filter(function(e){return"string"==typeof e.name&&e.configurations&&e.configurations.length}).map(function(e){return e.name})),n}return[]},e.prototype.getConfiguration=function(e){var t=u.deepClone(this.getConfig());return t&&t.configurations?t.configurations.filter(function(t){return t&&t.name===e}).shift():null},e.prototype.openConfigFile=function(e,t){var n=this;return this.configurationManager.activateDebuggers().then(function(){var r=n.uri,o=!1;return n.fileService.resolveContent(r).then(function(e){return e.value},function(e){
return n.configurationManager.guessDebugger(t).then(function(e){return e?n.configurationManager.provideDebugConfigurations(n.workspace.uri,e.type).then(function(t){return e.getInitialConfigurationContent(t)}):void 0}).then(function(e){if(e)return o=!0,n.fileService.updateContent(r,e).then(function(){return e})})}).then(function(t){if(!t)return{editor:void 0,created:!1};for(var i=t.indexOf('"'+n.configurationManager.selectedConfiguration.name+'"'),s=1,a=0;a<i;a++)"\n"===t.charAt(a)&&s++;var c=s>1?{startLineNumber:s,startColumn:4}:void 0;return n.editorService.openEditor({resource:r,options:{forceOpen:!0,selection:c,pinned:o,revealIfVisible:!0}},e?C.SIDE_GROUP:C.ACTIVE_GROUP).then(function(e){return{editor:e,created:o}})},function(e){throw new Error(i.localize(2,null,e))})})},e=a([l(2,m.IFileService),l(3,C.IEditorService),l(4,v.IConfigurationService),l(5,y.IWorkspaceContextService)],e)}(),N=function(e){function t(t,n,i,r,o){return e.call(this,t,void 0,n,i,r,o)||this}return n(t,e),
Object.defineProperty(t.prototype,"uri",{get:function(){return this.contextService.getWorkspace().configuration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return i.localize(3,null)},enumerable:!0,configurable:!0}),t.prototype.getConfig=function(){return this.configurationService.inspect("launch").workspace},t.prototype.openConfigFile=function(e,t){return this.editorService.openEditor({resource:this.contextService.getWorkspace().configuration}).then(function(e){return{editor:e,created:!1}})},t=a([l(1,m.IFileService),l(2,C.IEditorService),l(3,v.IConfigurationService),l(4,y.IWorkspaceContextService)],t)}(P),F=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,void 0,n,i,r,s)||this;return a.preferencesService=o,a}return n(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this.preferencesService.userSettingsResource},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return i.localize(4,null)},enumerable:!0,
configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.getConfig=function(){return this.configurationService.inspect("launch").user},t.prototype.openConfigFile=function(e,t){return this.preferencesService.openGlobalSettings().then(function(e){return{editor:e,created:!1}})},t=a([l(1,m.IFileService),l(2,C.IEditorService),l(3,v.IConfigurationService),l(4,T.IPreferencesService),l(5,y.IWorkspaceContextService)],t)}(P)}),define(e[1388],t([1,0,8,155,20,18,113,51,9,10,4,117,682,17,15,36,6,58,77,28,26,68,12,124,196,1143,385,1145,297,115,907]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var O=i.$,M=function(e){function t(n,i,r,o,a,c,l,u,d){var h=e.call(this,t.ID,n,r)||this;return h.configurationService=i,h.preferencesService=o,h.instantiationService=a,h.preferencesSearchService=c,h.logService=l,h.environmentService=u,
h.delayedFilterLogging=new s.Delayer(1e3),h.localSearchDelayer=new s.Delayer(100),h.remoteSearchThrottle=new s.ThrottledDelayer(200),h.viewState={settingsTarget:v.ConfigurationTarget.USER},h.settingUpdateDelayer=new s.Delayer(500),h.inSettingsEditorContextKey=L.CONTEXT_SETTINGS_EDITOR.bindTo(d),h.searchFocusContextKey=L.CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(d),h.firstRowFocused=L.CONTEXT_SETTINGS_FIRST_ROW_FOCUS.bindTo(d),h.rowFocused=L.CONTEXT_SETTINGS_ROW_FOCUS.bindTo(d),h.tocRowFocused=L.CONTEXT_TOC_ROW_FOCUS.bindTo(d),h._register(i.onDidChangeConfiguration(function(e){h.onConfigUpdate(),e.affectsConfiguration("workbench.settings.tocVisible")&&h.updateTOCVisible()})),h}return n(t,e),t.prototype.createEditor=function(e){e.setAttribute("tabindex","-1"),this.rootElement=i.append(e,O(".settings-editor")),this.createHeader(this.rootElement),this.createBody(this.rootElement)},t.prototype.setInput=function(t,n,i){var r=this;return this.inSettingsEditorContextKey.set(!0),
e.prototype.setInput.call(this,t,n,i).then(function(){r.render(i)})},t.prototype.clearInput=function(){this.inSettingsEditorContextKey.set(!1),e.prototype.clearInput.call(this)},t.prototype.layout=function(e){this.searchWidget.layout(e),this.layoutTrees(e),i.toggleClass(this.rootElement,"narrow",e.width<600)},t.prototype.focus=function(){this.focusSearch()},t.prototype.focusSettings=function(){var e=this.settingsTree.getSelection();e&&e[0]?this.settingsTree.setFocus(e[0]):this.settingsTree.focusFirst(),this.settingsTree.domFocus()},t.prototype.focusSearch=function(){this.searchWidget.focus()},t.prototype.editSelectedSetting=function(){var e=this.settingsTree.getFocus();if(e instanceof D.SettingsTreeSettingElement){var t=e.id.replace(/\./g,"_");this.focusEditControlForRow(t)}},t.prototype.clearSearchResults=function(){this.searchWidget.clear()},t.prototype.createHeader=function(e){var t=this;this.headerContainer=i.append(e,O(".settings-header"))
;var n=i.append(this.headerContainer,O(".settings-preview-header"));i.append(n,O("span.settings-preview-warning")).textContent=g.localize(0,null);i.append(n,O("span.settings-preview-label")).textContent=g.localize(1,null);var o=i.append(this.headerContainer,O(".search-container"));this.searchWidget=this._register(this.instantiationService.createInstance(x.SearchWidget,o,{ariaLabel:g.localize(2,null),placeholder:g.localize(3,null),focusKey:this.searchFocusContextKey})),this._register(this.searchWidget.onDidChange(function(){return t.onSearchInputChanged()}));var s=i.append(this.headerContainer,O(".settings-advanced-customization"));i.append(s,O("span.settings-advanced-customization-label")).textContent=g.localize(4,null)+" ";var a=this._register(new r.Button(s,{title:!0,buttonBackground:null,buttonHoverBackground:null}));this._register(w.attachButtonStyler(a,this.themeService,{buttonBackground:u.Color.transparent.toString(),buttonHoverBackground:u.Color.transparent.toString(),buttonForeground:E.foreground})),
a.label=g.localize(5,null),a.element.classList.add("open-settings-button"),this._register(a.onDidClick(function(){return t.openSettingsFile()}));var c=i.append(this.headerContainer,O(".settings-header-controls")),l=i.append(c,O(".settings-target-container"));this.settingsTargetsWidget=this._register(this.instantiationService.createInstance(x.SettingsTargetsWidget,l)),this.settingsTargetsWidget.settingsTarget=v.ConfigurationTarget.USER,this.settingsTargetsWidget.onDidTargetChange(function(){t.viewState.settingsTarget=t.settingsTargetsWidget.settingsTarget,t.settingsTreeModel.update(),t.refreshTreeAndMaintainFocus()}),this.createHeaderControls(c)},t.prototype.createHeaderControls=function(e){var t=this,n=i.append(e,O(".settings-header-controls-right"));this.showConfiguredSettingsOnlyCheckbox=i.append(n,O("input#configured-only-checkbox")),this.showConfiguredSettingsOnlyCheckbox.type="checkbox";var r=i.append(n,O("label.configured-only-label"));r.textContent=g.localize(6,null),
r.htmlFor="configured-only-checkbox",this._register(i.addDisposableListener(this.showConfiguredSettingsOnlyCheckbox,"change",function(e){return t.onShowConfiguredOnlyClicked()}))},t.prototype.openSettingsFile=function(){var e=this.settingsTargetsWidget.settingsTarget;return e===v.ConfigurationTarget.USER?this.preferencesService.openGlobalSettings():e===v.ConfigurationTarget.WORKSPACE?this.preferencesService.openWorkspaceSettings():this.preferencesService.openFolderSettings(e)},t.prototype.createBody=function(e){var t=i.append(e,O(".settings-body"));this.createTOC(t),this.createSettingsTree(t),"stable"!==this.environmentService.appQuality&&this.createFeedbackButton(t)},t.prototype.createTOC=function(e){var t=this;this.tocTreeContainer=i.append(e,O(".settings-toc-container"));var n=this.instantiationService.createInstance(A.TOCDataSource),r=this.instantiationService.createInstance(A.TOCRenderer);this.tocTreeModel=new A.TOCTreeModel,
this.tocTree=this.instantiationService.createInstance(S.WorkbenchTree,this.tocTreeContainer,{dataSource:n,renderer:r,controller:this.instantiationService.createInstance(S.WorkbenchTreeController,{openMode:f.OpenMode.DOUBLE_CLICK}),filter:this.instantiationService.createInstance(D.SettingsTreeFilter,this.viewState)},{showLoading:!1,twistiePixels:15}),this._register(this.tocTree.onDidChangeFocus(function(e){var n=e.focus;t.searchResultModel?(t.viewState.filterToCategory=n,t.refreshTreeAndMaintainFocus()):t.settingsTreeModel&&n&&!e.payload.fromScroll&&(t.settingsTree.reveal(n,0),t.settingsTree.setSelection([n]),t.settingsTree.setFocus(n))})),this._register(this.tocTree.onDidFocus(function(){t.tocRowFocused.set(!0)})),this._register(this.tocTree.onDidBlur(function(){t.tocRowFocused.set(!1)})),this.updateTOCVisible()},t.prototype.updateTOCVisible=function(){var e=!!this.configurationService.getValue("workbench.settings.tocVisible");i.toggleClass(this.tocTreeContainer,"hidden",!e)},
t.prototype.createSettingsTree=function(e){var t=this;this.settingsTreeContainer=i.append(e,O(".settings-tree-container")),this.treeDataSource=this.instantiationService.createInstance(D.SettingsDataSource,this.viewState);var n=this.instantiationService.createInstance(D.SettingsRenderer,this.settingsTreeContainer);this._register(n.onDidChangeSetting(function(e){return t.onDidChangeSetting(e.key,e.value)})),this._register(n.onDidOpenSettings(function(){return t.openSettingsFile()}));this.settingsTree=this.instantiationService.createInstance(D.NonExpandableTree,this.settingsTreeContainer,{dataSource:this.treeDataSource,renderer:n,controller:this.instantiationService.createInstance(D.SettingsTreeController),accessibilityProvider:this.instantiationService.createInstance(D.SettingsAccessibilityProvider),filter:this.instantiationService.createInstance(D.SettingsTreeFilter,this.viewState),styler:new f.DefaultTreestyler(i.createStyleSheet(),"settings-editor-tree")},{ariaLabel:g.localize(7,null),showLoading:!1,
indentPixels:0,twistiePixels:0}),this._register(I.registerThemingParticipant(function(e,t){var n=e.getColor(E.listActiveSelectionBackground);n&&t.addRule(".settings-editor > .settings-body > .settings-tree-container .monaco-tree:focus .monaco-tree-row.focused {outline: solid 1px "+n+"; outline-offset: -1px; }");var i=e.getColor(E.listInactiveSelectionBackground);i&&t.addRule(".settings-editor > .settings-body > .settings-tree-container .monaco-tree .monaco-tree-row.focused {outline: solid 1px "+i+"; outline-offset: -1px; }")})),this.settingsTree.getHTMLElement().classList.add("settings-editor-tree"),this._register(w.attachStyler(this.themeService,{listActiveSelectionBackground:E.editorBackground,listActiveSelectionForeground:E.foreground,listFocusAndSelectionBackground:E.editorBackground,listFocusAndSelectionForeground:E.foreground,listFocusBackground:E.editorBackground,listFocusForeground:E.foreground,listHoverForeground:E.foreground,listHoverBackground:E.editorBackground,
listInactiveSelectionBackground:E.editorBackground,listInactiveSelectionForeground:E.foreground},function(e){t.settingsTree.style(e)})),this._register(this.settingsTree.onDidChangeFocus(function(e){t.settingsTree.setSelection([e.focus]),t.selectedElement&&t.settingsTree.refresh(t.selectedElement),e.focus&&t.settingsTree.refresh(e.focus),t.selectedElement=e.focus})),this._register(this.settingsTree.onDidBlur(function(){t.rowFocused.set(!1),t.firstRowFocused.set(!1)})),this._register(this.settingsTree.onDidChangeSelection(function(e){t.updateTreeScrollSync();var n=!1,i=!1,r=e.selection[0];if(r)if(i=!0,t.searchResultModel)n=r.id===t.searchResultModel.getChildren()[0].id;else{var o=t.settingsTreeModel.root.children[0]&&t.settingsTreeModel.root.children[0].id;n=r.id===o}t.rowFocused.set(i),t.firstRowFocused.set(n)})),this._register(this.settingsTree.onDidScroll(function(){t.updateTreeScrollSync()}))},t.prototype.createFeedbackButton=function(e){var t=this._register(new r.Button(e));t.label=g.localize(8,null),
t.element.classList.add("settings-feedback-button"),this._register(w.attachButtonStyler(t,this.themeService)),this._register(t.onDidClick(function(){window.open("https://go.microsoft.com/fwlink/?linkid=2000807")}))},t.prototype.onShowConfiguredOnlyClicked=function(){this.viewState.showConfiguredOnly=this.showConfiguredSettingsOnlyCheckbox.checked,this.refreshTreeAndMaintainFocus(),this.tocTree.refresh(),this.settingsTree.setScrollPosition(0),this.expandAll(this.settingsTree)},t.prototype.onDidChangeSetting=function(e,t){var n=this;this.pendingSettingUpdate&&this.pendingSettingUpdate.key!==e&&this.updateChangedSetting(e,t),this.pendingSettingUpdate={key:e,value:t},this.settingUpdateDelayer.trigger(function(){return n.updateChangedSetting(e,t)})},t.prototype.updateTreeScrollSync=function(){if(!this.searchResultModel&&this.tocTree.getInput()){var e=this.settingsTree.getFirstVisibleElement(),t=this.settingsTree.getSelection()[0];if(t){var n=this.settingsTree.getRelativeTop(t);n>=0&&n<=1&&(e=t)}
var i=e instanceof D.SettingsTreeSettingElement?e.parent:e instanceof D.SettingsTreeGroupElement?e:null;if(i&&this.tocTree.getSelection()[0]!==i){var r=this.tocTree.getRelativeTop(i);r<0?this.tocTree.reveal(i,0):r>1&&this.tocTree.reveal(i,1),this.tocTree.setSelection([i]),this.tocTree.setFocus(i,{fromScroll:!0})}}},t.prototype.updateChangedSetting=function(e,t){var n=this,i=this.settingsTargetsWidget.settingsTarget,r=h.default.isUri(i)?i:void 0,o=r?void 0:i,s={resource:r};return this.configurationService.inspect(e,s).default===t&&(t=void 0),this.configurationService.updateValue(e,t,s,o).then(function(){return n.refreshTreeAndMaintainFocus()}).then(function(){var i={key:e,query:n.searchWidget.getValue(),searchResults:n.searchResultModel&&n.searchResultModel.getUniqueResults(),rawResults:n.searchResultModel&&n.searchResultModel.getRawResults(),showConfiguredOnly:n.viewState.showConfiguredOnly,isReset:void 0===t,settingsTarget:n.settingsTargetsWidget.settingsTarget};return n.reportModifiedSetting(i)})},
t.prototype.reportModifiedSetting=function(e){this.pendingSettingUpdate=null;var t=e.searchResults&&e.searchResults[D.SearchResultIdx.Remote],n=e.searchResults&&e.searchResults[D.SearchResultIdx.Local],i=void 0,r=void 0,s=void 0;if(e.searchResults){var a=o.firstIndex(n.filterMatches,function(t){return t.setting.key===e.key});if(i=a>=0?"local":"remote",s=a>=0?a:t&&o.firstIndex(t.filterMatches,function(t){return t.setting.key===e.key})+n.filterMatches.length,this.searchResultModel){var c=this.searchResultModel.getRawResults();if(c[D.SearchResultIdx.Remote]){var l=o.firstIndex(c[D.SearchResultIdx.Remote].filterMatches,function(t){return t.setting.key===e.key});r=l>=0?l:void 0}}}var u=e.settingsTarget===v.ConfigurationTarget.USER?"user":e.settingsTarget===v.ConfigurationTarget.WORKSPACE?"workspace":"folder",d={key:e.key,query:e.query,groupId:i,nlpIndex:r,displayIndex:s,showConfiguredOnly:e.showConfiguredOnly,isReset:e.isReset,target:u};this.telemetryService.publicLog("settingsEditor.settingModified",d)},
t.prototype.render=function(e){var t=this;return this.input?this.input.resolve().then(function(n){e.isCancellationRequested||(t.defaultSettingsEditorModel=n,t.onConfigUpdate())}):p.TPromise.as(null)},t.prototype.toggleSearchMode=function(){i.removeClass(this.rootElement,"search-mode"),"hide"===this.configurationService.getValue("workbench.settings.settingsSearchTocBehavior")&&i.toggleClass(this.rootElement,"search-mode",!!this.searchResultModel)},t.prototype.onConfigUpdate=function(){var e=this.defaultSettingsEditorModel.settingsGroups.slice(1),t=c.groupBy(e,function(e){return e.contributedByExtension?"extension":"core"}),n=D.resolveSettingsTree(k.tocData,t.core),i=D.resolveSettingsTree(k.commonlyUsedData,t.core);return n.children.unshift(i),n.children.push(D.resolveExtensionsSettings(t.extension||[])),this.searchResultModel&&this.searchResultModel.updateChildren(),
this.settingsTreeModel?this.settingsTreeModel.update(n):(this.settingsTreeModel=this.instantiationService.createInstance(D.SettingsTreeModel,this.viewState,n),this.settingsTree.setInput(this.settingsTreeModel.root),this.tocTreeModel.settingsTreeRoot=this.settingsTreeModel.root,this.tocTree.getInput()?this.tocTree.refresh():this.tocTree.setInput(this.tocTreeModel)),this.refreshTreeAndMaintainFocus()},t.prototype.refreshTreeAndMaintainFocus=function(){var e=this,t=i.findParentWithClass(document.activeElement,"setting-item"),n=t&&t.id,r=n&&"input"===document.activeElement.tagName.toLowerCase()?document.activeElement.selectionStart:null;return this.settingsTree.refresh().then(function(){n&&e.focusEditControlForRow(n,r)}).then(function(){return e.tocTree.refresh()})},t.prototype.focusEditControlForRow=function(e,t){var n=".setting-item#"+e,i=this.settingsTreeContainer.querySelector(n+" input, "+n+" select, "+n+" a, "+n+" .monaco-custom-checkbox");i&&(i.focus(),"number"==typeof t&&i.setSelectionRange(t,t))},
t.prototype.onSearchInputChanged=function(){var e=this,t=this.searchWidget.getValue().trim();this.delayedFilterLogging.cancel(),this.triggerSearch(t).then(function(){t&&e.searchResultModel&&e.delayedFilterLogging.trigger(function(){return e.reportFilteringUsed(t,e.searchResultModel.getUniqueResults())})})},t.prototype.triggerSearch=function(e){var t=this;return e?this.searchInProgress=p.TPromise.join([this.localSearchDelayer.trigger(function(){return t.localFilterPreferences(e)}),this.remoteSearchThrottle.trigger(function(){return t.remoteSearchPreferences(e)},500)]).then(function(){t.searchInProgress=null}):(this.localSearchDelayer.cancel(),this.remoteSearchThrottle.cancel(),this.searchInProgress&&this.searchInProgress.cancel&&this.searchInProgress.cancel(),this.searchResultModel=null,this.tocTreeModel.currentSearchModel=null,this.viewState.filterToCategory=null,this.tocTree.refresh(),this.toggleSearchMode(),this.settingsTree.setInput(this.settingsTreeModel.root),p.TPromise.wrap(null))},
t.prototype.expandAll=function(e){for(var t,n=e.getNavigator();t=n.next();)e.expand(t)},t.prototype.reportFilteringUsed=function(e,t){var n=t[D.SearchResultIdx.Remote],i=n&&n.metadata,r={};r.nlpResult=i&&i.duration;var o={},s=t[D.SearchResultIdx.Local];o.filterResult=s.filterMatches.length,n&&(o.nlpResult=n.filterMatches.length);var a={query:e,durations:r,counts:o,requestCount:i&&i.requestCount};this.telemetryService.publicLog("settingsEditor.filter",a)},t.prototype.localFilterPreferences=function(e){var t=this.preferencesSearchService.getLocalSearchProvider(e);return this.filterOrSearchPreferences(e,D.SearchResultIdx.Local,t)},t.prototype.remoteSearchPreferences=function(e){var t=this.preferencesSearchService.getRemoteSearchProvider(e);return this.filterOrSearchPreferences(e,D.SearchResultIdx.Remote,t)},t.prototype.filterOrSearchPreferences=function(e,t,n){var i=this,r=[this._filterOrSearchPreferencesModel(e,this.defaultSettingsEditorModel,n)],o=!1;return new p.TPromise(function(e){
return p.TPromise.join(r).then(function(n){if(o)return null;var r=n[0];i.searchResultModel?i.searchResultModel.setResult(t,r):(i.searchResultModel=i.instantiationService.createInstance(D.SearchResultModel,i.viewState),i.searchResultModel.setResult(t,r),i.tocTreeModel.currentSearchModel=i.searchResultModel,i.toggleSearchMode(),i.settingsTree.setInput(i.searchResultModel)),i.tocTreeModel.update(),e(i.refreshTreeAndMaintainFocus())})},function(){o=!0})},t.prototype._filterOrSearchPreferencesModel=function(e,t,n){var i=this;return(n?n.searchModel(t):p.TPromise.wrap(null)).then(null,function(t){if(d.isPromiseCanceledError(t))return p.TPromise.wrapError(t);var n=d.getErrorMessage(t).trim();return n&&"Error"!==n&&(i.telemetryService.publicLog("settingsEditor.searchError",{message:n,filter:e}),i.logService.info("Setting search error: "+n)),null})},t.prototype.layoutTrees=function(e){var t=e.height-(i.getDomNodePagePosition(this.headerContainer).height+12);this.settingsTreeContainer.style.height=t+"px",
this.settingsTree.layout(t,800);var n=this.settingsTree.getSelection()[0];n&&this.settingsTree.refresh(n);var r=t-5;this.tocTreeContainer.style.height=r+"px",this.tocTree.layout(r,175)},t.ID="workbench.editor.settings2",t=a([l(0,C.ITelemetryService),l(1,v.IConfigurationService),l(2,I.IThemeService),l(3,R.IPreferencesService),l(4,b.IInstantiationService),l(5,L.IPreferencesSearchService),l(6,_.ILogService),l(7,y.IEnvironmentService),l(8,m.IContextKeyService)],t)}(T.BaseEditor);t.SettingsEditor2=M}),define(e[1389],t([1,0,47,54,4,120,16,72,115,5,21,14,36,27,17,25,11]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=s.Registry.as(o.Extensions.JSONContribution),S=function(){function e(e,t,n,i,r,o,s,a){var c=this;this.modelService=e,this.textModelResolverService=t,this.preferencesService=n,this.modeService=i,this.editorService=r,this.environmentService=o,this.workspaceService=s,this.configurationService=a,
this.settingsListener=this.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration(u.DEFAULT_SETTINGS_EDITOR_SETTING)&&c.handleSettingsEditorOverride()}),this.handleSettingsEditorOverride(),this.start()}return e.prototype.handleSettingsEditorOverride=function(){var e=this;this.editorOpeningListener=d.dispose(this.editorOpeningListener),this.configurationService.getValue(u.DEFAULT_SETTINGS_EDITOR_SETTING)&&(this.editorOpeningListener=this.editorService.overrideOpenEditor(function(t,n,i){return e.onEditorOpening(t,n,i)}))},e.prototype.onEditorOpening=function(e,t,n){var i=e.getResource();if(i&&"file"===i.scheme&&p.endsWith(i.fsPath,"settings.json")&&this.configurationService.getValue(u.DEFAULT_SETTINGS_EDITOR_SETTING)&&!n.isOpened(e)){if(m.isEqual(i.fsPath,this.environmentService.appSettingsPath,!y.isLinux))return{override:this.preferencesService.openGlobalSettings(t,n)};var r=this.workspaceService.getWorkbenchState();if(r===g.WorkbenchState.FOLDER){
o=this.workspaceService.getWorkspace().folders;if(i.fsPath===o[0].toResource(u.FOLDER_SETTINGS_PATH).fsPath)return{override:this.preferencesService.openWorkspaceSettings(t,n)}}else if(r===g.WorkbenchState.WORKSPACE)for(var o=this.workspaceService.getWorkspace().folders,s=0;s<o.length;s++)if(i.fsPath===o[s].toResource(u.FOLDER_SETTINGS_PATH).fsPath)return{override:this.preferencesService.openFolderSettings(o[s].uri,t,n)}}},e.prototype.start=function(){var e=this;this.textModelResolverService.registerTextModelContentProvider("vscode",{provideTextContent:function(t){if("vscode"!==t.scheme)return null;if("schemas"===t.authority){var n=e.getSchemaModel(t);if(n)return r.TPromise.as(n)}return e.preferencesService.resolveModel(t)}})},e.prototype.getSchemaModel=function(e){var t=b.getSchemaContributions().schemas[e.toString()];if(t){var n=JSON.stringify(t),i=this.modeService.getOrCreateMode("jsonc"),r=this.modelService.createModel(n,i,e),o=[];return o.push(b.onDidChangeSchema(function(n){
n===e.toString()&&(t=b.getSchemaContributions().schemas[e.toString()],r.setValue(JSON.stringify(t)))})),o.push(r.onWillDispose(function(){return d.dispose(o)})),r}return null},e.prototype.dispose=function(){this.editorOpeningListener=d.dispose(this.editorOpeningListener),this.settingsListener=d.dispose(this.settingsListener)},e=a([l(0,n.IModelService),l(1,c.ITextModelService),l(2,u.IPreferencesService),l(3,i.IModeService),l(4,h.IEditorService),l(5,f.IEnvironmentService),l(6,g.IWorkspaceContextService),l(7,v.IConfigurationService)],e)}();t.PreferencesContribution=S}),define(e[484],t([1,0,11,10,4,72,779,6,40,161,159,482,115]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getTypeId=function(){return t.ID},t.prototype.getTitle=function(e){return this.master.getTitle(e)},t.ID="workbench.editorinputs.preferencesEditorInput",t}(d.SideBySideEditorInput)
;t.PreferencesEditorInput=v;var m=function(e){function t(t,n,i){return e.call(this,c.localize(0,null),"",t,n,i)||this}return n(t,e),t.prototype.getTypeId=function(){return t.ID},t.prototype.matches=function(n){return n instanceof t||!!e.prototype.matches.call(this,n)},t.ID="workbench.editorinputs.defaultpreferences",t=a([l(1,s.ITextModelService),l(2,p.IHashService)],t)}(h.ResourceEditorInput);t.DefaultPreferencesEditorInput=m;var y=function(e){function t(t){var n=e.call(this)||this;return n.keybindingsModel=t.createInstance(f.KeybindingsEditorModel,i.OS),n}return n(t,e),t.prototype.getTypeId=function(){return t.ID},t.prototype.getName=function(){return c.localize(1,null)},t.prototype.resolve=function(e){return o.TPromise.as(this.keybindingsModel)},t.prototype.matches=function(e){return e instanceof t},t.ID="workbench.input.keybindings",t=a([l(0,u.IInstantiationService)],t)}(d.EditorInput);t.KeybindingsEditorInput=y;var b=function(e){function t(t){var n=e.call(this)||this;return n.preferencesService=t,n}
return n(t,e),t.prototype.getTypeId=function(){return t.ID},t.prototype.getName=function(){return c.localize(2,null)},t.prototype.resolve=function(e){return this.preferencesService.createPreferencesEditorModel(r.default.parse("vscode://defaultsettings/0/settings.json"))},t.prototype.matches=function(e){return e instanceof t},t.ID="workbench.input.settings2",t=a([l(0,g.IPreferencesService)],t)}(d.EditorInput);t.SettingsEditor2Input=b}),define(e[342],t([1,0,20,7,89,5,50,24,19,60,780,17,63,37,16,40]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";function b(e,t){function n(t,n,o){if(Array.isArray(a)?a.push(t):s&&(a[s]=t),c.length===l+1||c.length===l+2&&null!==r){var d=c.length===l+1?i[i.length-1]:r.overrides[r.overrides.length-1];if(d){var h=e.getPositionAt(n),p=e.getPositionAt(n+o);d.value=t,d.valueRange={startLineNumber:h.lineNumber,startColumn:h.column,endLineNumber:p.lineNumber,endColumn:p.column},d.range=u.assign(d.range,{endLineNumber:p.lineNumber,endColumn:p.column})}}}
var i=[],r=null,s=null,a=[],c=[],l=-1,d={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0},h={onObjectBegin:function(i,r){if(t(s,c)){l=c.length;var o=e.getPositionAt(i);d.startLineNumber=o.lineNumber,d.startColumn=o.column}var u={};n(u,i,r),a=u,s=null,c.push(a)},onObjectProperty:function(t,n,o){if(s=t,c.length===l+1||c.length===l+2&&null!==r){var a=e.getPositionAt(n),u={description:[],key:t,keyRange:{startLineNumber:a.lineNumber,startColumn:a.column+1,endLineNumber:a.lineNumber,endColumn:a.column+o},range:{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:0,endColumn:0},value:null,valueRange:null,descriptionRanges:null,overrides:[],overrideOf:r};c.length===l+1?(i.push(u),g.OVERRIDE_PROPERTY_PATTERN.test(t)&&(r=u)):r.overrides.push(u)}},onObjectEnd:function(t,n){if(a=c.pop(),c.length===l+1||c.length===l+2&&null!==r){var o=c.length===l+1?i[i.length-1]:r.overrides[r.overrides.length-1];if(o){var s=e.getPositionAt(t+n);o.valueRange=u.assign(o.valueRange,{endLineNumber:s.lineNumber,
endColumn:s.column}),o.range=u.assign(o.range,{endLineNumber:s.lineNumber,endColumn:s.column})}c.length===l+1&&(r=null)}if(c.length===l){var h=e.getPositionAt(t);d.endLineNumber=h.lineNumber,d.endColumn=h.column}},onArrayBegin:function(e,t){var i=[];n(i,e,t),c.push(a),a=i,s=null},onArrayEnd:function(t,n){if(a=c.pop(),c.length===l+1||c.length===l+2&&null!==r){var o=c.length===l+1?i[i.length-1]:r.overrides[r.overrides.length-1];if(o){var s=e.getPositionAt(t+n);o.valueRange=u.assign(o.valueRange,{endLineNumber:s.lineNumber,endColumn:s.column}),o.range=u.assign(o.range,{endLineNumber:s.lineNumber,endColumn:s.column})}}},onLiteralValue:n,onError:function(e){var t=i[i.length-1];!t||t.range&&t.keyRange&&t.valueRange||i.pop()}};return e.isDisposed()||o.visit(e.getValue(),h),i.length>0?[{sections:[{settings:i}],title:null,titleRange:null,range:d}]:[]}function S(e){return"// "+p.localize(1,null)+"\n"+e.getDefaultKeybindingsContent()}Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(){
var t=null!==e&&e.apply(this,arguments)||this;return t._currentResultGroups=new Map,t}return n(t,e),t.prototype.updateResultGroup=function(e,t){return t?this._currentResultGroups.set(e,t):this._currentResultGroups.delete(e),this.removeDuplicateResults(),this.update()},t.prototype.removeDuplicateResults=function(){var e=this,t=new Set;c.keys(this._currentResultGroups).sort(function(t,n){return e._currentResultGroups.get(t).order-e._currentResultGroups.get(n).order}).forEach(function(n){var i=e._currentResultGroups.get(n);i.result.filterMatches=i.result.filterMatches.filter(function(e){return!t.has(e.setting.key)}),i.result.filterMatches.forEach(function(e){return t.add(e.setting.key)})})},t.prototype.filterSettings=function(e,t,n){for(var i=[],r=0,o=this.filterGroups;r<o.length;r++)for(var s=o[r],a=t(s),c=0,l=s.sections;c<l.length;c++)for(var u=0,d=l[c].settings;u<d.length;u++){var h=d[u],p=n(h,s);(a||p)&&i.push({setting:h,matches:p&&p.matches,score:p?p.score:0})}return i.sort(function(e,t){
return t.score-e.score})},t.prototype.getPreference=function(e){for(var t=0,n=this.settingsGroups;t<n.length;t++)for(var i=0,r=n[t].sections;i<r.length;i++)for(var o=0,s=r[i].settings;o<s.length;o++){var a=s[o];if(e===a.key)return a}return null},t.prototype.collectMetadata=function(e){var t=Object.create(null),n=!1;return e.forEach(function(e){e.result.metadata&&(t[e.id]=e.result.metadata,n=!0)}),n?t:null},Object.defineProperty(t.prototype,"filterGroups",{get:function(){return this.settingsGroups},enumerable:!0,configurable:!0}),t}(y.EditorModel);t.AbstractSettingsModel=_;var C=function(e){function t(t,n){var i=e.call(this)||this;return i._configurationTarget=n,i._onDidChangeGroups=i._register(new r.Emitter),i.onDidChangeGroups=i._onDidChangeGroups.event,i.settingsModel=t.object.textEditorModel,i._register(i.onDispose(function(){return t.dispose()})),i._register(i.settingsModel.onDidChangeContent(function(){i._settingsGroups=null,i._onDidChangeGroups.fire()})),i}return n(t,e),
Object.defineProperty(t.prototype,"uri",{get:function(){return this.settingsModel.uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"configurationTarget",{get:function(){return this._configurationTarget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsGroups",{get:function(){return this._settingsGroups||this.parse(),this._settingsGroups},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content",{get:function(){return this.settingsModel.getValue()},enumerable:!0,configurable:!0}),t.prototype.findValueMatches=function(e,t){return this.settingsModel.findMatches(e,t.valueRange,!1,!1,null,!1).map(function(e){return e.range})},t.prototype.isSettingsProperty=function(e,t){return 0===t.length},t.prototype.parse=function(){var e=this;this._settingsGroups=b(this.settingsModel,function(t,n){return e.isSettingsProperty(t,n)})},t.prototype.update=function(){var e=c.values(this._currentResultGroups);if(!e.length)return null;var t=[],n=[]
;e.forEach(function(e){e.result.filterMatches.forEach(function(e){t.push(e.setting),n.push.apply(n,e.matches)})});var i,r=this.settingsGroups[0];r&&(i={id:r.id,range:r.range,sections:[{settings:t}],title:r.title,titleRange:r.titleRange,contributedByExtension:!!r.contributedByExtension});var o=this.collectMetadata(e);return{allGroups:this.settingsGroups,filteredGroups:i?[i]:[],matches:n,metadata:o}},t}(_);t.SettingsEditorModel=C;var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"configurationGroups",{get:function(){return this._configurationGroups},enumerable:!0,configurable:!0}),t.prototype.parse=function(){e.prototype.parse.call(this),this._configurationGroups=b(this.settingsModel,function(e,t){return 0===t.length})},t.prototype.isSettingsProperty=function(e,t){return"settings"===e&&1===t.length},t}(C);t.WorkspaceConfigurationEditorModel=E;var w=function(e){function t(t,n){var i=e.call(this)||this
;return i._mostCommonlyUsedSettingsKeys=t,i.target=n,i._onDidChange=i._register(new r.Emitter),i.onDidChange=i._onDidChange.event,i}return n(t,e),Object.defineProperty(t.prototype,"content",{get:function(){return this._content||this.parse(),this._content},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsGroups",{get:function(){return this._allSettingsGroups||this.parse(),this._allSettingsGroups},enumerable:!0,configurable:!0}),t.prototype.parse=function(){var e=this.getRegisteredGroups();this.initAllSettingsMap(e);var t=this.getMostCommonlyUsedSettings(e);return this._allSettingsGroups=[t].concat(e),this._content=this.toContent(!0,this._allSettingsGroups),this._content},Object.defineProperty(t.prototype,"raw",{get:function(){return t._RAW||(t._RAW=this.toContent(!1,this.getRegisteredGroups())),t._RAW},enumerable:!0,configurable:!0}),t.prototype.getSettingByName=function(e){return this._settingsByName&&this._settingsByName.get(e)},t.prototype.getRegisteredGroups=function(){
var e=this,t=m.Registry.as(g.Extensions.Configuration).getConfigurations().slice();return this.removeEmptySettingsGroups(t.sort(this.compareConfigurationNodes).reduce(function(t,n,i,r){return e.parseConfig(n,t,r)},[]))},t.prototype.initAllSettingsMap=function(e){this._settingsByName=new Map;for(var t=0,n=e;t<n.length;t++)for(var i=0,r=n[t].sections;i<r.length;i++)for(var o=0,s=r[i].settings;o<s.length;o++){var a=s[o];this._settingsByName.set(a.key,a)}},t.prototype.getMostCommonlyUsedSettings=function(e){var t=this,n=this._mostCommonlyUsedSettingsKeys.map(function(e){var n=t._settingsByName.get(e);return n?{description:n.description,key:n.key,value:n.value,range:null,valueRange:null,overrides:[],type:n.type,enum:n.enum}:null}).filter(function(e){return!!e});return{id:"mostCommonlyUsed",range:null,title:p.localize(0,null),titleRange:null,sections:[{settings:n}]}},t.prototype.parseConfig=function(e,t,n,i){var r=this,o=e.title;if(!o){var s=n.filter(function(t){return t.id===e.id&&t.title})[0];s&&(o=s.title)}
if(o&&(i?i.sections[i.sections.length-1].title=o:(i=t.filter(function(e){return e.title===o})[0])||(i={sections:[{settings:[]}],id:e.id,title:o,titleRange:null,range:null,contributedByExtension:!!e.contributedByExtension},t.push(i))),e.properties){i||(i={sections:[{settings:[]}],id:e.id,title:e.id,titleRange:null,range:null,contributedByExtension:!!e.contributedByExtension},t.push(i));var a=i.sections[i.sections.length-1].settings.concat(this.parseSettings(e.properties));a.length&&(a.sort(function(e,t){return e.key.localeCompare(t.key)}),i.sections[i.sections.length-1].settings=a)}return e.allOf&&e.allOf.forEach(function(e){return r.parseConfig(e,t,n,i)}),t},t.prototype.removeEmptySettingsGroups=function(e){for(var t=[],n=0,i=e;n<i.length;n++){var r=i[n];r.sections=r.sections.filter(function(e){return e.settings.length>0}),r.sections.length&&t.push(r)}return t},t.prototype.parseSettings=function(e){var t=[];for(var n in e){var i=e[n];if(!i.deprecationMessage&&this.matchesScope(i)){
var r=i.default,o=(i.description||"").split("\n"),s=g.OVERRIDE_PROPERTY_PATTERN.test(n)?this.parseOverrideSettings(i.default):[];t.push({key:n,value:r,description:o,range:null,keyRange:null,valueRange:null,descriptionRanges:[],overrides:s,type:i.type,enum:i.enum})}}return t},t.prototype.parseOverrideSettings=function(e){return Object.keys(e).map(function(t){return{key:t,value:e[t],description:[],range:null,keyRange:null,valueRange:null,descriptionRanges:[],overrides:[]}})},t.prototype.matchesScope=function(e){return this.target===f.ConfigurationTarget.WORKSPACE_FOLDER?e.scope===g.ConfigurationScope.RESOURCE:this.target!==f.ConfigurationTarget.WORKSPACE||(e.scope===g.ConfigurationScope.WINDOW||e.scope===g.ConfigurationScope.RESOURCE)},t.prototype.compareConfigurationNodes=function(e,t){if("number"!=typeof e.order)return 1;if("number"!=typeof t.order)return-1;if(e.order===t.order){var n=e.title||"",i=t.title||"";return n.localeCompare(i)}return e.order-t.order},t.prototype.toContent=function(e,t){var n=new T
;return e&&n.pushLine("["),t.forEach(function(e,t){n.pushGroup(e),n.pushLine(",")}),e&&n.pushLine("]"),n.getContent()},t}(s.Disposable);t.DefaultSettings=w;var I=function(e){function t(t,n,i){var o=e.call(this)||this;return o._uri=t,o.defaultSettings=i,o._onDidChangeGroups=o._register(new r.Emitter),o.onDidChangeGroups=o._onDidChangeGroups.event,o._register(i.onDidChange(function(){return o._onDidChangeGroups.fire()})),o._model=n.object.textEditorModel,o._register(o.onDispose(function(){return n.dispose()})),o}return n(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this.defaultSettings.target},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsGroups",{get:function(){return this.defaultSettings.settingsGroups},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filterGroups",{get:function(){return this.settingsGroups.slice(1)},enumerable:!0,
configurable:!0}),t.prototype.update=function(){var e=c.values(this._currentResultGroups).sort(function(e,t){return e.order-t.order}),t=e.filter(function(e){return e.result.filterMatches.length}),n=i.tail(this.settingsGroups).range.endLineNumber+2,r=this.writeResultGroups(t,n),o=r.settingsGroups,s=r.matches,a=this.collectMetadata(e);return e.length?{allGroups:this.settingsGroups,filteredGroups:o,matches:s,metadata:a}:null},t.prototype.writeResultGroups=function(e,t){var n=this,i=new T(t-1),r=[],o=[];i.pushLine(","),e.forEach(function(e){var t=n.getGroup(e);r.push(t),o.push.apply(o,n.writeSettingsGroupToBuilder(i,t,e.result.filterMatches))});var s=i.getContent()+"\n",a=this._model.getLineCount(),c=new h.Selection(t,1,t,1),l={text:s,forceMoveMarkers:!0,range:new d.Range(t,1,a,1),identifier:{major:1,minor:0}};this._model.pushEditOperations([c],[l],function(){return[c]});var u=Math.min(t+60,this._model.getLineCount());return this._model.forceTokenization(u),{matches:o,settingsGroups:r}},
t.prototype.writeSettingsGroupToBuilder=function(e,t,n){n=n.map(function(e){return{setting:e.setting,score:e.score,matches:e.matches&&e.matches.map(function(t){return new d.Range(t.startLineNumber-e.setting.range.startLineNumber,t.startColumn,t.endLineNumber-e.setting.range.startLineNumber,t.endColumn)})}}),e.pushGroup(t),e.pushLine(",");return i.flatten(n.map(function(e){return e.matches||[]}).map(function(e,n){var i=t.sections[0].settings[n];return e.map(function(e){return new d.Range(e.startLineNumber+i.range.startLineNumber,e.startColumn,e.endLineNumber+i.range.startLineNumber,e.endColumn)})}))},t.prototype.copySetting=function(e){return{description:e.description,key:e.key,value:e.value,range:e.range,overrides:[],overrideOf:e.overrideOf}},t.prototype.findValueMatches=function(e,t){return[]},t.prototype.getPreference=function(e){for(var t=0,n=this.settingsGroups;t<n.length;t++)for(var i=0,r=n[t].sections;i<r.length;i++)for(var o=0,s=r[i].settings;o<s.length;o++){var a=s[o];if(a.key===e)return a}return null
},t.prototype.getGroup=function(e){var t=this;return{id:e.id,range:null,title:e.label,titleRange:null,sections:[{settings:e.result.filterMatches.map(function(e){return t.copySetting(e.setting)})}]}},t}(_);t.DefaultSettingsEditorModel=I;var T=function(){function e(e){void 0===e&&(e=0),this._rangeOffset=e,this._contentByLines=[]}return Object.defineProperty(e.prototype,"lineCountWithOffset",{get:function(){return this._contentByLines.length+this._rangeOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastLine",{get:function(){return this._contentByLines[this._contentByLines.length-1]||""},enumerable:!0,configurable:!0}),e.prototype.offsetIndexToIndex=function(e){return e-this._rangeOffset},e.prototype.pushLine=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this._contentByLines).push.apply(e,t)},e.prototype.pushGroup=function(e){this._contentByLines.push("{"),this._contentByLines.push(""),this._contentByLines.push("");var t=this._pushGroup(e);if(t){
var n=this.offsetIndexToIndex(t.range.endLineNumber),i=this._contentByLines[n-2];this._contentByLines[n-2]=i.substring(0,i.length-1)}this._contentByLines.push("}")},e.prototype._pushGroup=function(e){for(var t=null,n=this.lineCountWithOffset+1,i=0,r=e.sections;i<r.length;i++){var o=r[i];if(o.title){var s=this.lineCountWithOffset+1;this.addDescription([o.title],"  ",this._contentByLines),o.titleRange={startLineNumber:s,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}if(o.settings.length)for(var a=0,c=o.settings;a<c.length;a++){var l=c[a];this.pushSetting(l,"  "),t=l}}return e.range={startLineNumber:n,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length},t},e.prototype.getContent=function(){return this._contentByLines.join("\n")},e.prototype.pushSetting=function(e,t){var n=this.lineCountWithOffset+1;e.descriptionRanges=[];for(var i=t+"// ",r=0,o=e.description;r<o.length;r++){var s=o[r];this._contentByLines.push(i+s),e.descriptionRanges.push({
startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(s)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length})}var a=t;a+=JSON.stringify(e.key),e.keyRange={startLineNumber:this.lineCountWithOffset+1,startColumn:a.indexOf(e.key)+1,endLineNumber:this.lineCountWithOffset+1,endColumn:e.key.length},a+=": ";var c=this.lineCountWithOffset+1;this.pushValue(e,a,t),e.valueRange={startLineNumber:c,startColumn:a.length+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length+1},this._contentByLines[this._contentByLines.length-1]+=",",this._contentByLines.push(""),e.range={startLineNumber:n,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}},e.prototype.pushValue=function(e,t,n){var i=JSON.stringify(e.value,null,n);if(i&&"object"==typeof e.value)if(e.overrides.length){this._contentByLines.push(t+" {");for(var r=0,o=e.overrides;r<o.length;r++){var s=o[r];this.pushSetting(s,n+n),this._contentByLines.pop()}
var a=e.overrides[e.overrides.length-1],c=this._contentByLines[a.range.endLineNumber-2];this._contentByLines[a.range.endLineNumber-2]=c.substring(0,c.length-1),this._contentByLines.push(n+"}")}else{var l=i.split("\n");this._contentByLines.push(t+l[0]);for(var u=1;u<l.length;u++)this._contentByLines.push(n+l[u])}else this._contentByLines.push(t+i)},e.prototype.addDescription=function(e,t,n){for(var i=0,r=e;i<r.length;i++){var o=r[i];n.push(t+"// "+o)}},e}();t.defaultKeybindingsContents=S;var x=function(){function e(e,t){this._uri=e,this.keybindingService=t}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"content",{get:function(){return this._content||(this._content=S(this.keybindingService)),this._content},enumerable:!0,configurable:!0}),e.prototype.getPreference=function(){return null},e.prototype.dispose=function(){},e=a([l(1,v.IKeybindingService)],e)}();t.DefaultKeybindingsEditorModel=x}),
define(e[1392],t([1,0,4,680,18,20,5,39,7,16,19,63,6,115,342,45,35,196,28,420,66,27,17,36,57,44,8,295,329,21,22,267]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var N=function(e){function t(t,n,i,r,s){var a=e.call(this)||this;return a.editor=t,a.preferencesModel=n,a.preferencesService=i,a.configurationService=r,a.instantiationService=s,a.modelChangeDelayer=new o.Delayer(200),a._onFocusPreference=new h.Emitter,a.onFocusPreference=a._onFocusPreference.event,a._onClearFocusPreference=new h.Emitter,a.onClearFocusPreference=a._onClearFocusPreference.event,a._onUpdatePreference=new h.Emitter,a.onUpdatePreference=a._onUpdatePreference.event,a.settingHighlighter=a._register(s.createInstance(X,t,a._onFocusPreference,a._onClearFocusPreference)),a.highlightMatchesRenderer=a._register(s.createInstance(q,t)),
a.editSettingActionRenderer=a._register(a.instantiationService.createInstance(Y,a.editor,a.preferencesModel,a.settingHighlighter)),a._register(a.editSettingActionRenderer.onUpdateSetting(function(e){var t=e.key,n=e.value,i=e.source;return a._updatePreference(t,n,i)})),a._register(a.editor.getModel().onDidChangeContent(function(){return a.modelChangeDelayer.trigger(function(){return a.onModelChanged()})})),a.createHeader(),a}return n(t,e),t.prototype.getAssociatedPreferencesModel=function(){return this.associatedPreferencesModel},t.prototype.setAssociatedPreferencesModel=function(e){this.associatedPreferencesModel=e,this.editSettingActionRenderer.associatedPreferencesModel=e},t.prototype.createHeader=function(){this._register(new _.SettingsHeaderWidget(this.editor,"")).setMessage(r.localize(0,null))},t.prototype.render=function(){this.editSettingActionRenderer.render(this.preferencesModel.settingsGroups,this.associatedPreferencesModel),this.filterResult&&this.filterPreferences(this.filterResult)},
t.prototype._updatePreference=function(e,t,n){this._onUpdatePreference.fire({key:e,value:t,source:n}),this.updatePreference(e,t,n)},t.prototype.updatePreference=function(e,t,n){var i=this,r=n.overrideOf?T.overrideIdentifierFromKey(n.overrideOf.key):null,o=this.preferencesModel.uri;this.configurationService.updateValue(e,t,{overrideIdentifier:r,resource:o},this.preferencesModel.configurationTarget).then(function(){return i.onSettingUpdated(n)})},t.prototype.onModelChanged=function(){this.editor.getModel()&&this.render()},t.prototype.onSettingUpdated=function(e){this.editor.focus(),(e=this.getSetting(e))&&(this.editor.setSelection(e.valueRange),this.settingHighlighter.highlight(e,!0))},t.prototype.getSetting=function(e){var t=e.key,n=e.overrideOf;if(n){for(var i=0,r=this.getSetting(n).overrides;i<r.length;i++){var o=r[i];if(o.key===t)return o}return null}return this.preferencesModel.getPreference(t)},t.prototype.filterPreferences=function(e){this.filterResult=e,this.settingHighlighter.clear(!0),
this.highlightMatchesRenderer.render(e?e.matches:[])},t.prototype.focusPreference=function(e){var t=this.getSetting(e);t?(this.settingHighlighter.highlight(t,!0),this.editor.setPosition({lineNumber:t.keyRange.startLineNumber,column:t.keyRange.startColumn})):this.settingHighlighter.clear(!0)},t.prototype.clearFocus=function(e){this.settingHighlighter.clear(!0)},t.prototype.editPreference=function(e){var t=this.getSetting(e);return t&&this.editSettingActionRenderer.activateOnSetting(t)},t=a([l(2,m.IPreferencesService),l(3,T.IConfigurationService),l(4,v.IInstantiationService)],t)}(u.Disposable);t.UserSettingsRenderer=N;var F=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,i,o,s)||this;return a.workspaceConfigurationRenderer=a._register(s.createInstance(Q,t,n)),a}return n(t,e),t.prototype.createHeader=function(){this._register(new _.SettingsHeaderWidget(this.editor,"")).setMessage(r.localize(1,null))},t.prototype.setAssociatedPreferencesModel=function(t){
e.prototype.setAssociatedPreferencesModel.call(this,t),this.workspaceConfigurationRenderer.render(this.getAssociatedPreferencesModel())},t.prototype.render=function(){e.prototype.render.call(this),this.workspaceConfigurationRenderer.render(this.getAssociatedPreferencesModel())},t=a([l(2,m.IPreferencesService),l(3,C.ITelemetryService),l(4,T.IConfigurationService),l(5,v.IInstantiationService)],t)}(N);t.WorkspaceSettingsRenderer=F;var W=function(e){function t(t,n,i,r,o,s){return e.call(this,t,n,i,o,s)||this}return n(t,e),t.prototype.createHeader=function(){this._register(new _.SettingsHeaderWidget(this.editor,"")).setMessage(r.localize(2,null))},t=a([l(2,m.IPreferencesService),l(3,C.ITelemetryService),l(4,T.IConfigurationService),l(5,v.IInstantiationService)],t)}(N);t.FolderSettingsRenderer=W;var B=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.editor=t,s.preferencesModel=n,s.preferencesService=i,s.instantiationService=r,s.configurationService=o,s._onUpdatePreference=new h.Emitter,
s.onUpdatePreference=s._onUpdatePreference.event,s._onFocusPreference=new h.Emitter,s.onFocusPreference=s._onFocusPreference.event,s._onClearFocusPreference=new h.Emitter,s.onClearFocusPreference=s._onClearFocusPreference.event,s.settingHighlighter=s._register(r.createInstance(X,t,s._onFocusPreference,s._onClearFocusPreference)),s.settingsHeaderRenderer=s._register(r.createInstance(z,t)),s.settingsGroupTitleRenderer=s._register(r.createInstance(H,t)),s.filteredMatchesRenderer=s._register(r.createInstance(j,t)),s.editSettingActionRenderer=s._register(r.createInstance(Y,t,n,s.settingHighlighter)),s.issueWidgetRenderer=s._register(r.createInstance(G,t)),s.feedbackWidgetRenderer=s._register(r.createInstance(U,t)),s.bracesHidingRenderer=s._register(r.createInstance(V,t,n)),s.hiddenAreasRenderer=s._register(r.createInstance(K,t,[s.settingsGroupTitleRenderer,s.filteredMatchesRenderer,s.bracesHidingRenderer])),s.extensionCodelensRenderer=s._register(r.createInstance($,t)),
s._register(s.editSettingActionRenderer.onUpdateSetting(function(e){return s._onUpdatePreference.fire(e)})),s._register(s.settingsGroupTitleRenderer.onHiddenAreasChanged(function(){return s.hiddenAreasRenderer.render()})),s._register(n.onDidChangeGroups(function(){return s.render()})),s}return n(t,e),t.prototype.getAssociatedPreferencesModel=function(){return this._associatedPreferencesModel},t.prototype.setAssociatedPreferencesModel=function(e){this._associatedPreferencesModel=e,this.editSettingActionRenderer.associatedPreferencesModel=e},t.prototype.render=function(){this.settingsGroupTitleRenderer.render(this.preferencesModel.settingsGroups),this.editSettingActionRenderer.render(this.preferencesModel.settingsGroups,this._associatedPreferencesModel),this.issueWidgetRenderer.render(null),this.feedbackWidgetRenderer.render(null),this.settingHighlighter.clear(!0),this.bracesHidingRenderer.render(null,this.preferencesModel.settingsGroups),this.settingsGroupTitleRenderer.showGroup(0),
this.hiddenAreasRenderer.render()},t.prototype.filterPreferences=function(e){this.filterResult=e,e?(this.filteredMatchesRenderer.render(e,this.preferencesModel.settingsGroups),this.settingsGroupTitleRenderer.render(null),this.renderIssueWidget(e),this.settingsHeaderRenderer.render(e),this.settingHighlighter.clear(!0),this.bracesHidingRenderer.render(e,this.preferencesModel.settingsGroups),this.editSettingActionRenderer.render(e.filteredGroups,this._associatedPreferencesModel),this.extensionCodelensRenderer.render(e)):(this.settingHighlighter.clear(!0),this.filteredMatchesRenderer.render(null,this.preferencesModel.settingsGroups),this.renderIssueWidget(null),this.settingsHeaderRenderer.render(null),this.settingsGroupTitleRenderer.render(this.preferencesModel.settingsGroups),this.settingsGroupTitleRenderer.showGroup(0),this.bracesHidingRenderer.render(null,this.preferencesModel.settingsGroups),this.editSettingActionRenderer.render(this.preferencesModel.settingsGroups,this._associatedPreferencesModel),
this.extensionCodelensRenderer.render(null)),this.hiddenAreasRenderer.render()},t.prototype.renderIssueWidget=function(e){this.configurationService.getValue().workbench.settings.enableNaturalLanguageSearchFeedback?(this.issueWidgetRenderer.render(null),this.feedbackWidgetRenderer.render(e)):(this.feedbackWidgetRenderer.render(null),this.issueWidgetRenderer.render(e))},t.prototype.focusPreference=function(e){var t=this.getSetting(e);t?(this.settingsGroupTitleRenderer.showSetting(t),this.settingHighlighter.highlight(t,!0)):this.settingHighlighter.clear(!0)},t.prototype.getSetting=function(e){var t=e.key,n=e.overrideOf;if(n){for(var i=0,r=this.getSetting(n).overrides;i<r.length;i++){var o=r[i];if(o.key===t)return o}return null}var s=this.filterResult?this.filterResult.filteredGroups:this.preferencesModel.settingsGroups;return this.getPreference(t,s)},t.prototype.getPreference=function(e,t){for(var n=0,i=t;n<i.length;n++)for(var r=0,o=i[n].sections;r<o.length;r++)for(var s=0,a=o[r].settings;s<a.length;s++){
var c=a[s];if(c.key===e)return c}return null},t.prototype.clearFocus=function(e){this.settingHighlighter.clear(!0)},t.prototype.updatePreference=function(e,t,n){},t.prototype.editPreference=function(e){return this.editSettingActionRenderer.activateOnSetting(e)},t=a([l(2,m.IPreferencesService),l(3,v.IInstantiationService),l(4,T.IConfigurationService)],t)}(u.Disposable);t.DefaultSettingsRenderer=B;var V=function(e){function t(t){var n=e.call(this)||this;return n.editor=t,n}return n(t,e),t.prototype.render=function(e,t){this._result=e,this._settingsGroups=t},Object.defineProperty(t.prototype,"hiddenAreas",{get:function(){var e=[{startLineNumber:1,startColumn:1,endLineNumber:2,endColumn:1}],t=function(t,n){e.push({startLineNumber:t.range.startLineNumber-3,startColumn:1,endLineNumber:t.range.startLineNumber-(n?1:3),endColumn:1}),e.push({startLineNumber:t.range.endLineNumber+1,startColumn:1,endLineNumber:t.range.endLineNumber+4,endColumn:1})};this._settingsGroups.forEach(function(e){return t(e)}),
this._result&&this._result.filteredGroups.forEach(function(e,n){return t(e,!0)});var n=this.editor.getModel().getLineCount();return e.push({startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:1}),e},enumerable:!0,configurable:!0}),t}(u.Disposable);t.BracesHidingRenderer=V;var z=function(e){function t(t){var n=e.call(this)||this;return n.settingsHeaderWidget=n._register(new _.DefaultSettingsHeaderWidget(t,"")),n.onClick=n.settingsHeaderWidget.onClick,n}return n(t,e),t.prototype.render=function(e){var t=!e||e.filteredGroups.length>0;this.settingsHeaderWidget.toggleMessage(t)},t}(u.Disposable),H=function(e){function t(t,n){var i=e.call(this)||this;return i.editor=t,i.instantiationService=n,i._onHiddenAreasChanged=new h.Emitter,i.hiddenGroups=[],i.disposables=[],i}return n(t,e),Object.defineProperty(t.prototype,"onHiddenAreasChanged",{get:function(){return this._onHiddenAreasChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hiddenAreas",{get:function(){
for(var e=[],t=0,n=this.hiddenGroups;t<n.length;t++){var i=n[t];e.push(i.range)}return e},enumerable:!0,configurable:!0}),t.prototype.render=function(e){var t=this;if(this.disposeWidgets(),e){this.settingsGroups=e.slice(),this.settingsGroupTitleWidgets=[];for(var n=function(e){if(e.sections.every(function(e){return 0===e.settings.length}))return"continue";var n=i.instantiationService.createInstance(_.SettingsGroupTitleWidget,i.editor,e);n.render(),i.settingsGroupTitleWidgets.push(n),i.disposables.push(n),i.disposables.push(n.onToggled(function(e){return t.onToggled(e,n.settingsGroup)}))},i=this,r=0,o=this.settingsGroups.slice().reverse();r<o.length;r++){n(o[r])}this.settingsGroupTitleWidgets.reverse()}},t.prototype.showGroup=function(e){var t=this.settingsGroupTitleWidgets[e].settingsGroup;this.hiddenGroups=this.settingsGroups.filter(function(e){return e!==t});for(var n=0,i=this.settingsGroupTitleWidgets.filter(function(e){return e.settingsGroup!==t});n<i.length;n++){i[n].toggleCollapse(!0)}
this._onHiddenAreasChanged.fire()},t.prototype.showSetting=function(e){var t=this.settingsGroupTitleWidgets.filter(function(t){return f.Range.containsRange(t.settingsGroup.range,e.range)})[0];t&&t.isCollapsed()&&(t.toggleCollapse(!1),this.hiddenGroups.splice(this.hiddenGroups.indexOf(t.settingsGroup),1),this._onHiddenAreasChanged.fire())},t.prototype.onToggled=function(e,t){var n=this.hiddenGroups.indexOf(t);if(e){var i=this.editor.getPosition();t.range.startLineNumber<=i.lineNumber&&t.range.endLineNumber>=i.lineNumber&&this.editor.setPosition({lineNumber:t.range.startLineNumber-1,column:1}),this.hiddenGroups.push(t)}else this.hiddenGroups.splice(n,1);this._onHiddenAreasChanged.fire()},t.prototype.disposeWidgets=function(){this.hiddenGroups=[],this.disposables=u.dispose(this.disposables)},t.prototype.dispose=function(){this.disposeWidgets(),e.prototype.dispose.call(this)},t=a([l(1,v.IInstantiationService)],t)}(u.Disposable);t.SettingsGroupTitleRenderer=H;var K=function(e){function t(t,n){
var i=e.call(this)||this;return i.editor=t,i.hiddenAreasProviders=n,i}return n(t,e),t.prototype.render=function(){for(var e=[],t=0,n=this.hiddenAreasProviders;t<n.length;t++){var i=n[t];e.push.apply(e,i.hiddenAreas)}this.editor.setHiddenAreas(e)},t.prototype.dispose=function(){this.editor.setHiddenAreas([]),e.prototype.dispose.call(this)},t}(u.Disposable);t.HiddenAreasRenderer=K;var U=function(e){function t(t,n,i,r,o,s){var a=e.call(this)||this;return a.editor=t,a.instantiationService=n,a.editorService=i,a.telemetryService=r,a.notificationService=o,a.environmentService=s,a}return n(t,e),t.prototype.render=function(e){this._currentResult=e,e&&e.metadata?this.showWidget():this._feedbackWidget&&this.disposeWidget()},t.prototype.showWidget=function(){var e=this;this._feedbackWidget||(this._feedbackWidget=this._register(this.instantiationService.createInstance(_.FloatingClickWidget,this.editor,"Provide feedback",null)),this._register(this._feedbackWidget.onClick(function(){return e.getFeedback()})),
this._feedbackWidget.render())},t.prototype.getFeedback=function(){var e=this;if(this.telemetryService.isOptedIn||!this.environmentService.appQuality){var n=this._currentResult,i=n.metadata.nlpResult,r=i?i.scoredResults:{},o=Object.keys(r),s={};s.comment=t.DEFAULT_COMMENT_TEXT,s.queryString=n.query,s.duration=i?i.duration:-1,s.resultScores=[],o.forEach(function(e){s.resultScores.push({packageID:r[e].packageId,key:r[e].key,score:10})}),s.alts=[];var a=n.filteredGroups.map(function(e){return"// "+e.id+": "+e.sections[0].settings.length}).join("\n"),c=t.INSTRUCTION_TEXT+"\n"+JSON.stringify(s,void 0,"    ")+"\n\n"+this.getScoreText(r)+"\n\n"+a+"\n";this.editorService.openEditor({contents:c,language:"jsonc"},O.SIDE_GROUP).then(function(t){var i=e._register(e.instantiationService.createInstance(_.FloatingClickWidget,t.getControl(),"Send feedback",null));i.render(),e._register(i.onClick(function(){e.sendFeedback(t.getControl(),n,r).then(function(){i.dispose(),e.notificationService.info("Feedback sent successfully")
},function(t){e.notificationService.error("Error sending feedback: "+t.message)})}))})}else this.notificationService.error("Can't send feedback, user is opted out of telemetry")},t.prototype.getScoreText=function(e){return e?Object.keys(e).map(function(t){return"// "+e[t].key+": "+e[t].score}).join("\n"):""},t.prototype.sendFeedback=function(e,t,n){return i.TPromise.wrap(null)},t.prototype.disposeWidget=function(){this._feedbackWidget&&(this._feedbackWidget.dispose(),this._feedbackWidget=null)},t.prototype.dispose=function(){this.disposeWidget(),e.prototype.dispose.call(this)},t.DEFAULT_COMMENT_TEXT="Replace this comment with any text feedback.",
t.INSTRUCTION_TEXT=['// Modify the "resultScores" section to contain only your expected results. Assign scores to indicate their relevance.','// Results present in "resultScores" will be automatically "boosted" for this query, if they are not already at the top of the result set.','// Add phrase pairs to the "alts" section to have them considered to be synonyms in queries.'].join("\n"),t=a([l(1,v.IInstantiationService),l(2,O.IEditorService),l(3,C.ITelemetryService),l(4,M.INotificationService),l(5,x.IEnvironmentService)],t)}(u.Disposable);t.FeedbackWidgetRenderer=U;var G=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.editor=t,o.instantiationService=n,o.issueService=i,o.environmentService=r,o}return n(t,e),t.prototype.render=function(e){this._currentResult=e,e&&e.metadata&&"stable"!==this.environmentService.appQuality?this.showWidget():this._issueWidget&&this.disposeWidget()},t.prototype.showWidget=function(){var e=this
;this._issueWidget||(this._issueWidget=this._register(this.instantiationService.createInstance(_.FloatingClickWidget,this.editor,r.localize(3,null),null)),this._register(this._issueWidget.onClick(function(){return e.showIssueReporter()})),this._issueWidget.render())},t.prototype.showIssueReporter=function(){var e=this,t=this._currentResult.metadata.nlpResult,n=t.scoredResults,i=t.extensions,r=Object.keys(n).map(function(t){return{key:t.split("##")[1],extensionId:"core"===n[t].packageId?"core":e.getExtensionIdByGuid(i,n[t].packageId),score:n[t].score}}).slice(0,20),o={enabledExtensions:i,issueType:L.IssueType.SettingsSearchIssue,actualSearchResults:r,filterResultCount:this.getFilterResultCount(),query:this._currentResult.query};return this.issueService.openReporter(o)},t.prototype.getFilterResultCount=function(){var e=s.first(this._currentResult.filteredGroups,function(e){return"filterResult"===e.id});return e?e.sections[0].settings.length:0},t.prototype.getExtensionIdByGuid=function(e,t){
var n=s.first(e,function(e){return e.identifier.uuid===t});return n&&n.manifest.publisher+"."+n.manifest.name},t.prototype.disposeWidget=function(){this._issueWidget&&(this._issueWidget.dispose(),this._issueWidget=null)},t.prototype.dispose=function(){this.disposeWidget(),e.prototype.dispose.call(this)},t=a([l(1,v.IInstantiationService),l(2,R.IWorkbenchIssueService),l(3,x.IEnvironmentService)],t)}(u.Disposable);t.IssueWidgetRenderer=G;var j=function(e){function t(t){var n=e.call(this)||this;return n.editor=t,n.decorationIds=[],n.hiddenAreas=[],n}return n(t,e),t.prototype.render=function(e,t){var n=this,i=this.editor.getModel();this.hiddenAreas=[],e?(this.hiddenAreas=this.computeHiddenRanges(e.filteredGroups,e.allGroups,i),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,e.matches.map(function(e){return n.createDecoration(e,i)}))):(this.hiddenAreas=this.computeHiddenRanges(null,t,i),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]))},
t.prototype.createDecoration=function(e,n){return{range:e,options:t._FIND_MATCH}},t.prototype.computeHiddenRanges=function(e,t,n){var i=[];return e&&t.forEach(function(e,t){i.push({startLineNumber:e.range.startLineNumber-1,startColumn:e.range.startColumn,endLineNumber:e.range.endLineNumber,endColumn:e.range.endColumn})}),i},t.prototype.dispose=function(){this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]),e.prototype.dispose.call(this)},t._FIND_MATCH=w.ModelDecorationOptions.register({stickiness:k.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"findMatch"}),t}(u.Disposable);t.FilteredMatchesRenderer=j;var q=function(e){function t(t){var n=e.call(this)||this;return n.editor=t,n.decorationIds=[],n}return n(t,e),t.prototype.render=function(e){var t=this,n=this.editor.getModel();this.decorationIds=this.editor.deltaDecorations(this.decorationIds,e.map(function(e){return t.createDecoration(e,n)}))},t.prototype.createDecoration=function(e,n){return{range:e,options:t._FIND_MATCH}},
t.prototype.dispose=function(){this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]),e.prototype.dispose.call(this)},t._FIND_MATCH=w.ModelDecorationOptions.register({stickiness:k.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"findMatch"}),t}(u.Disposable);t.HighlightMatchesRenderer=q;var $=function(e){function t(){var t=e.call(this)||this;return t._register(D.CodeLensProviderRegistry.register({pattern:"**/settings.json"},t)),t}return n(t,e),t.prototype.render=function(e){this.filterResult=e},t.prototype.provideCodeLenses=function(e,t){if(!this.filterResult||!this.filterResult.filteredGroups)return[];var n=s.first(this.filterResult.filteredGroups,function(e){return"newExtensionsResult"===e.id});return n?n.sections[0].settings.filter(function(e){return e.extensionName&&e.extensionPublisher}).map(function(e){var t=e.extensionPublisher+"."+e.extensionName;return{command:{title:r.localize(4,null,t),id:"workbench.extensions.action.showExtensionsWithId",arguments:[t.toLowerCase()]},
range:new f.Range(e.keyRange.startLineNumber,1,e.keyRange.startLineNumber,1)}}):[]},t.prototype.resolveCodeLens=function(e,t,n){return t},t}(u.Disposable);t.ExtensionCodelensRenderer=$;var Y=function(e){function t(t,n,i,r,s){var a=e.call(this)||this;return a.editor=t,a.masterSettingsModel=n,a.settingHighlighter=i,a.instantiationService=r,a.contextMenuService=s,a._onUpdateSetting=new h.Emitter,a.onUpdateSetting=a._onUpdateSetting.event,a.editPreferenceWidgetForCursorPosition=a._register(a.instantiationService.createInstance(_.EditPreferenceWidget,t)),a.editPreferenceWidgetForMouseMove=a._register(a.instantiationService.createInstance(_.EditPreferenceWidget,t)),a.toggleEditPreferencesForMouseMoveDelayer=new o.Delayer(75),a._register(a.editPreferenceWidgetForCursorPosition.onClick(function(e){return a.onEditSettingClicked(a.editPreferenceWidgetForCursorPosition,e)})),a._register(a.editPreferenceWidgetForMouseMove.onClick(function(e){return a.onEditSettingClicked(a.editPreferenceWidgetForMouseMove,e)})),
a._register(a.editor.onDidChangeCursorPosition(function(e){return a.onPositionChanged(e)})),a._register(a.editor.onMouseMove(function(e){return a.onMouseMoved(e)})),a._register(a.editor.onDidChangeConfiguration(function(){return a.onConfigurationChanged()})),a}return n(t,e),t.prototype.render=function(e,t){this.editPreferenceWidgetForCursorPosition.hide(),this.editPreferenceWidgetForMouseMove.hide(),this.settingsGroups=e,this.associatedPreferencesModel=t;var n=this.getSettings(this.editor.getPosition().lineNumber);n.length&&this.showEditPreferencesWidget(this.editPreferenceWidgetForCursorPosition,n)},t.prototype.isDefaultSettings=function(){return this.masterSettingsModel instanceof y.DefaultSettingsEditorModel},t.prototype.onConfigurationChanged=function(){this.editor.getConfiguration().viewInfo.glyphMargin||(this.editPreferenceWidgetForCursorPosition.hide(),this.editPreferenceWidgetForMouseMove.hide())},t.prototype.onPositionChanged=function(e){this.editPreferenceWidgetForMouseMove.hide()
;var t=this.getSettings(e.position.lineNumber);t.length?this.showEditPreferencesWidget(this.editPreferenceWidgetForCursorPosition,t):this.editPreferenceWidgetForCursorPosition.hide()},t.prototype.onMouseMoved=function(e){var t=this,n=this.getEditPreferenceWidgetUnderMouse(e);n?this.onMouseOver(n):(this.settingHighlighter.clear(),this.toggleEditPreferencesForMouseMoveDelayer.trigger(function(){return t.toggleEditPreferenceWidgetForMouseMove(e)}))},t.prototype.getEditPreferenceWidgetUnderMouse=function(e){if(e.target.type===b.MouseTargetType.GUTTER_GLYPH_MARGIN){var t=e.target.position.lineNumber;if(this.editPreferenceWidgetForMouseMove.getLine()===t&&this.editPreferenceWidgetForMouseMove.isVisible())return this.editPreferenceWidgetForMouseMove;if(this.editPreferenceWidgetForCursorPosition.getLine()===t&&this.editPreferenceWidgetForCursorPosition.isVisible())return this.editPreferenceWidgetForCursorPosition}return null},t.prototype.toggleEditPreferenceWidgetForMouseMove=function(e){
var t=e.target.position?this.getSettings(e.target.position.lineNumber):null;t&&t.length?this.showEditPreferencesWidget(this.editPreferenceWidgetForMouseMove,t):this.editPreferenceWidgetForMouseMove.hide()},t.prototype.showEditPreferencesWidget=function(e,t){var n=t[0].valueRange.startLineNumber;if(this.editor.getConfiguration().viewInfo.glyphMargin&&this.marginFreeFromOtherDecorations(n)){e.show(n,r.localize(5,null),t);(e===this.editPreferenceWidgetForCursorPosition?this.editPreferenceWidgetForMouseMove:this.editPreferenceWidgetForCursorPosition).hide()}},t.prototype.marginFreeFromOtherDecorations=function(e){var t=this.editor.getLineDecorations(e);if(t)for(var n=0,i=t;n<i.length;n++){var r=i[n].options;if(r.glyphMarginClassName&&-1===r.glyphMarginClassName.indexOf(_.EditPreferenceWidget.GLYPH_MARGIN_CLASS_NAME))return!1}return!0},t.prototype.getSettings=function(e){var t=this,n=this.getConfigurationsMap();return this.getSettingsAtLineNumber(e).filter(function(e){var i=n[e.key];if(i){
if(t.isDefaultSettings())return"launch"!==e.key;if("boolean"===i.type||i.enum){if(t.masterSettingsModel.configurationTarget!==T.ConfigurationTarget.WORKSPACE_FOLDER)return!0;if(i.scope===g.ConfigurationScope.RESOURCE)return!0}}return!1})},t.prototype.getSettingsAtLineNumber=function(e){for(var t=0,n=[],i=0,r=this.settingsGroups;i<r.length;i++){var o=r[i];if(o.range.startLineNumber>e)break;if(e>=o.range.startLineNumber&&e<=o.range.endLineNumber)for(var s=0,a=o.sections;s<a.length;s++)for(var l=0,u=a[s].settings;l<u.length;l++){var d=u[l];if(d.range.startLineNumber>e)break;if(e>=d.range.startLineNumber&&e<=d.range.endLineNumber)if(!this.isDefaultSettings()&&d.overrides.length)for(var h=0,p=d.overrides;h<p.length;h++){var f=p[h];e>=f.range.startLineNumber&&e<=f.range.endLineNumber&&n.push(c({},f,{index:t,groupId:o.id}))}else n.push(c({},d,{index:t,groupId:o.id}));t++}}return n},t.prototype.onMouseOver=function(e){this.settingHighlighter.highlight(e.preferences[0])},t.prototype.onEditSettingClicked=function(e,t){
var n=this,r={x:t.event.posx,y:t.event.posy+10},o=1===this.getSettings(e.getLine()).length?this.getActions(e.preferences[0],this.getConfigurationsMap()[e.preferences[0].key]):e.preferences.map(function(e){return new P.ContextSubMenu(e.key,n.getActions(e,n.getConfigurationsMap()[e.key]))});this.contextMenuService.showContextMenu({getAnchor:function(){return r},getActions:function(){return i.TPromise.wrap(o)}})},t.prototype.activateOnSetting=function(e){var t=this,n=e.keyRange.startLineNumber,r=this.getSettings(n);if(!r.length)return!1;this.editPreferenceWidgetForMouseMove.show(n,"",r);var o=this.getActions(this.editPreferenceWidgetForMouseMove.preferences[0],this.getConfigurationsMap()[this.editPreferenceWidgetForMouseMove.preferences[0].key]);return this.contextMenuService.showContextMenu({getAnchor:function(){return t.toAbsoluteCoords(new d.Position(n,1))},getActions:function(){return i.TPromise.wrap(o)}}),!0},t.prototype.toAbsoluteCoords=function(e){
var t=this.editor.getScrolledVisiblePosition(e),n=A.getDomNodePagePosition(this.editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height+10}},t.prototype.getConfigurationsMap=function(){return p.Registry.as(g.Extensions.Configuration).getConfigurationProperties()},t.prototype.getActions=function(e,t){var n=this;return"boolean"===t.type?[{id:"truthyValue",label:"true",enabled:!0,run:function(){return n.updateSetting(e.key,!0,e)}},{id:"falsyValue",label:"false",enabled:!0,run:function(){return n.updateSetting(e.key,!1,e)}}]:t.enum?t.enum.map(function(t){return{id:t,label:JSON.stringify(t),enabled:!0,run:function(){return n.updateSetting(e.key,t,e)}}}):this.getDefaultActions(e)},t.prototype.getDefaultActions=function(e){var t=this;if(this.isDefaultSettings()){return[{id:"setDefaultValue",label:this.associatedPreferencesModel.getPreference(e.key)?r.localize(6,null):r.localize(7,null),enabled:!0,run:function(){return t.updateSetting(e.key,e.value,e)}}]}return[]},t.prototype.updateSetting=function(e,t,n){
this._onUpdateSetting.fire({key:e,value:t,source:n})},t=a([l(3,v.IInstantiationService),l(4,S.IContextMenuService)],t)}(u.Disposable),X=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.editor=t,o.focusEventEmitter=n,o.clearFocusEventEmitter=i,o.fixedHighlighter=o._register(r.createInstance(E.RangeHighlightDecorations)),o.volatileHighlighter=o._register(r.createInstance(E.RangeHighlightDecorations)),o.fixedHighlighter.onHighlghtRemoved(function(){return o.clearFocusEventEmitter.fire(o.highlightedSetting)}),o.volatileHighlighter.onHighlghtRemoved(function(){return o.clearFocusEventEmitter.fire(o.highlightedSetting)}),o}return n(t,e),t.prototype.highlight=function(e,t){void 0===t&&(t=!1),this.highlightedSetting=e,this.volatileHighlighter.removeHighlightRange(),this.fixedHighlighter.removeHighlightRange();(t?this.fixedHighlighter:this.volatileHighlighter).highlightRange({range:e.valueRange,resource:this.editor.getModel().uri},this.editor),
this.editor.revealLineInCenterIfOutsideViewport(e.valueRange.startLineNumber,0),this.focusEventEmitter.fire(e)},t.prototype.clear=function(e){void 0===e&&(e=!1),this.volatileHighlighter.removeHighlightRange(),e&&this.fixedHighlighter.removeHighlightRange(),this.clearFocusEventEmitter.fire(this.highlightedSetting)},t=a([l(3,v.IInstantiationService)],t)}(u.Disposable),Q=function(e){function t(t,n,i){var r=e.call(this)||this;return r.editor=t,r.workspaceSettingsEditorModel=n,r.workspaceContextService=i,r.decorationIds=[],r.renderingDelayer=new o.Delayer(200),r._register(r.editor.getModel().onDidChangeContent(function(){return r.renderingDelayer.trigger(function(){return r.render(r.associatedSettingsEditorModel)})})),r}return n(t,e),t.prototype.render=function(e){var t=this;if(this.associatedSettingsEditorModel=e,this.associatedSettingsEditorModel&&this.workspaceContextService.getWorkbenchState()===I.WorkbenchState.WORKSPACE&&this.workspaceSettingsEditorModel instanceof y.WorkspaceConfigurationEditorModel){
for(var n=[],i=0,r=this.workspaceSettingsEditorModel.configurationGroups;i<r.length;i++)for(var o=0,s=r[i].sections;o<s.length;o++)for(var a=0,c=s[o].settings;a<c.length;a++){var l=c[a];"settings"!==l.key&&n.push({startLineNumber:l.keyRange.startLineNumber,startColumn:l.keyRange.startColumn-1,endLineNumber:l.valueRange.endLineNumber,endColumn:l.valueRange.endColumn})}this.decorationIds=this.editor.deltaDecorations(this.decorationIds,n.map(function(e){return t.createDecoration(e,t.editor.getModel())}))}},t.prototype.createDecoration=function(e,n){return{range:e,options:t._DIM_CONFIGURATION_}},t.prototype.dispose=function(){this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]),e.prototype.dispose.call(this)},t._DIM_CONFIGURATION_=w.ModelDecorationOptions.register({stickiness:k.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"dim-configuration"}),t=a([l(2,I.IWorkspaceContextService)],t)}(u.Disposable)}),
define(e[1393],t([1,0,43,4,776,10,62,14,5,7,27,95,33,6,36,115,342,28,484,72,105,39,37,47,212,17,54,89,45,22,24,21,53]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var N=function(e){function t(t,n,r,o,a,c,l,u,d,p,f,g,v,m){var y=e.call(this)||this;return y.editorService=t,y.editorGroupService=n,y.fileService=r,y.configurationService=o,y.notificationService=a,y.contextService=c,y.instantiationService=l,y.environmentService=u,y.telemetryService=d,y.textModelResolverService=p,y.modelService=g,y.jsonEditingService=v,y.modeService=m,y.lastOpenedSettingsInput=null,y._onDispose=new h.Emitter,y._defaultUserSettingsUriCounter=0,y._defaultWorkspaceSettingsUriCounter=0,y._defaultFolderSettingsUriCounter=0,y.defaultKeybindingsResource=s.default.from({scheme:i.Schemas.vscode,authority:"defaultsettings",path:"/keybindings.json"}),y.defaultSettingsRawResource=s.default.from({scheme:i.Schemas.vscode,authority:"defaultsettings",
path:"/defaultSettings.json"}),f.onDidUpdateKeybindings(function(){var e=g.getModel(y.defaultKeybindingsResource);e&&g.updateModel(e,b.defaultKeybindingsContents(f))}),y}return n(t,e),Object.defineProperty(t.prototype,"userSettingsResource",{get:function(){return this.getEditableSettingsURI(k.ConfigurationTarget.USER)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workspaceSettingsResource",{get:function(){return this.getEditableSettingsURI(k.ConfigurationTarget.WORKSPACE)},enumerable:!0,configurable:!0}),t.prototype.getFolderSettingsResource=function(e){return this.getEditableSettingsURI(k.ConfigurationTarget.WORKSPACE_FOLDER,e)},t.prototype.resolveModel=function(e){var t=this;if(this.isDefaultSettingsResource(e)){var n,i=this.getConfigurationTargetFromDefaultSettingsResource(e),o=this.modeService.getOrCreateMode("jsonc"),s=this._register(this.modelService.createModel("",o,e));return this.configurationService.onDidChangeConfiguration(function(r){
if(r.source===k.ConfigurationTarget.DEFAULT){var o=t.modelService.getModel(e);if(!o)return;n=t.getDefaultSettings(i),t.modelService.updateModel(o,n.parse()),n._onDidChange.fire()}}),n||(n=this.getDefaultSettings(i),this.modelService.updateModel(s,n.parse())),r.TPromise.as(s)}if(this.defaultSettingsRawResource.toString()===e.toString()){var a=this.getDefaultSettings(k.ConfigurationTarget.USER),o=this.modeService.getOrCreateMode("jsonc"),s=this._register(this.modelService.createModel(a.raw,o,e));return r.TPromise.as(s)}if(this.defaultKeybindingsResource.toString()===e.toString()){var c=this.instantiationService.createInstance(b.DefaultKeybindingsEditorModel,e),o=this.modeService.getOrCreateMode("jsonc"),s=this._register(this.modelService.createModel(c.content,o,e));return r.TPromise.as(s)}return r.TPromise.as(null)},t.prototype.createPreferencesEditorModel=function(e){if(this.isDefaultSettingsResource(e))return this.createDefaultSettingsEditorModel(e)
;if(this.getEditableSettingsURI(k.ConfigurationTarget.USER).toString()===e.toString())return this.createEditableSettingsEditorModel(k.ConfigurationTarget.USER,e);var t=this.getEditableSettingsURI(k.ConfigurationTarget.WORKSPACE);return t&&t.toString()===e.toString()?this.createEditableSettingsEditorModel(k.ConfigurationTarget.WORKSPACE,t):this.contextService.getWorkbenchState()===p.WorkbenchState.WORKSPACE?this.createEditableSettingsEditorModel(k.ConfigurationTarget.WORKSPACE_FOLDER,e):r.TPromise.wrap(null)},t.prototype.openRawDefaultSettings=function(){return this.editorService.openEditor({resource:this.defaultSettingsRawResource})},t.prototype.openRawUserSettings=function(){return this.editorService.openEditor({resource:this.userSettingsResource})},t.prototype.openSettings=function(){var e=this.getActiveSettingsEditorInput()||this.lastOpenedSettingsInput,t=e?e.master.getResource():this.userSettingsResource,n=this.getConfigurationTargetFromSettingsResource(t);return this.openOrSwitchSettings(n,t)},
t.prototype.openGlobalSettings=function(e,t){return this.openOrSwitchSettings(k.ConfigurationTarget.USER,this.userSettingsResource,e,t)},t.prototype.openSettings2=function(){return this.editorService.openEditor(this.instantiationService.createInstance(_.SettingsEditor2Input),{pinned:!0}).then(function(){return null})},t.prototype.openWorkspaceSettings=function(e,t){return this.contextService.getWorkbenchState()===p.WorkbenchState.EMPTY?(this.notificationService.info(o.localize(0,null)),r.TPromise.as(null)):this.openOrSwitchSettings(k.ConfigurationTarget.WORKSPACE,this.workspaceSettingsResource,e,t)},t.prototype.openFolderSettings=function(e,t,n){return this.openOrSwitchSettings(k.ConfigurationTarget.WORKSPACE_FOLDER,this.getEditableSettingsURI(k.ConfigurationTarget.WORKSPACE_FOLDER,e),t,n)},t.prototype.switchSettings=function(e,t){var n=this.editorService.activeControl;return n&&n.input instanceof _.PreferencesEditorInput?this.doSwitchSettings(e,t,n.input,n.group).then(function(){return null
}):this.doOpenSettings(e,t).then(function(){return null})},t.prototype.openGlobalKeybindingSettings=function(e){var t=this;if(this.telemetryService.publicLog("openKeybindings",{textual:e}),e){var n="// "+o.localize(1,null)+"\n[\n]",i=s.default.file(this.environmentService.appKeybindingsPath);return this.createIfNotExists(i,n).then(function(){var e=t.editorGroupService.activeGroup,n=t.editorGroupService.addGroup(e.id,P.GroupDirection.RIGHT);return r.TPromise.join([t.editorService.openEditor({resource:t.defaultKeybindingsResource,options:{pinned:!0,preserveFocus:!0},label:o.localize(2,null),description:""}),t.editorService.openEditor({resource:i,options:{pinned:!0}},n.id)]).then(function(e){})})}return this.editorService.openEditor(this.instantiationService.createInstance(_.KeybindingsEditorInput),{pinned:!0}).then(function(){return null})},t.prototype.configureSettingsForLanguage=function(e){var t=this;this.openGlobalSettings().then(function(n){
return t.createPreferencesEditorModel(t.userSettingsResource).then(function(i){var r=L.getCodeEditor(n.getControl());r&&t.getPosition(e,i,r).then(function(e){r&&(r.setPosition(e),r.focus())})})})},t.prototype.openOrSwitchSettings=function(e,t,n,i){void 0===i&&(i=this.editorGroupService.activeGroup);var r=this.getActiveSettingsEditorInput(i);return r&&r.master.getResource().fsPath!==t.fsPath?this.doSwitchSettings(e,t,r,i):this.doOpenSettings(e,t,n,i)},t.prototype.doOpenSettings=function(e,t,n,i){var r=this,o=!!this.configurationService.getValue(y.DEFAULT_SETTINGS_EDITOR_SETTING);return this.getOrCreateEditableSettingsEditorInput(e,t).then(function(s){if(n=n?O.assign(n,{pinned:!0}):{pinned:!0},o){var a=r.instantiationService.createInstance(_.DefaultPreferencesEditorInput,r.getDefaultSettingsResource(e)),c=new _.PreferencesEditorInput(r.getPreferencesEditorInputName(e,t),s.getDescription(),a,s);return r.lastOpenedSettingsInput=c,r.editorService.openEditor(c,n,i)}return r.editorService.openEditor(s,n,i)})},
t.prototype.doSwitchSettings=function(e,t,n,i){var r=this;return this.getOrCreateEditableSettingsEditorInput(e,this.getEditableSettingsURI(e,t)).then(function(o){return i.openEditor(n).then(function(){var s=new _.PreferencesEditorInput(r.getPreferencesEditorInputName(e,t),o.getDescription(),r.instantiationService.createInstance(_.DefaultPreferencesEditorInput,r.getDefaultSettingsResource(e)),o);return i.replaceEditors([{editor:n,replacement:s}]).then(function(){return r.lastOpenedSettingsInput=s,i.activeControl})})})},t.prototype.getActiveSettingsEditorInput=function(e){return void 0===e&&(e=this.editorGroupService.activeGroup),e.editors.filter(function(e){return e instanceof _.PreferencesEditorInput})[0]},t.prototype.getConfigurationTargetFromSettingsResource=function(e){if(this.userSettingsResource.toString()===e.toString())return k.ConfigurationTarget.USER;var t=this.workspaceSettingsResource;if(t&&t.toString()===e.toString())return k.ConfigurationTarget.WORKSPACE
;return this.contextService.getWorkspaceFolder(e)?k.ConfigurationTarget.WORKSPACE_FOLDER:k.ConfigurationTarget.USER},t.prototype.getConfigurationTargetFromDefaultSettingsResource=function(e){return this.isDefaultWorkspaceSettingsResource(e)?k.ConfigurationTarget.WORKSPACE:this.isDefaultFolderSettingsResource(e)?k.ConfigurationTarget.WORKSPACE_FOLDER:k.ConfigurationTarget.USER},t.prototype.isDefaultSettingsResource=function(e){return this.isDefaultUserSettingsResource(e)||this.isDefaultWorkspaceSettingsResource(e)||this.isDefaultFolderSettingsResource(e)},t.prototype.isDefaultUserSettingsResource=function(e){return"defaultsettings"===e.authority&&e.scheme===i.Schemas.vscode&&!!e.path.match(/\/(\d+\/)?settings\.json$/)},t.prototype.isDefaultWorkspaceSettingsResource=function(e){return"defaultsettings"===e.authority&&e.scheme===i.Schemas.vscode&&!!e.path.match(/\/(\d+\/)?workspaceSettings\.json$/)},t.prototype.isDefaultFolderSettingsResource=function(e){
return"defaultsettings"===e.authority&&e.scheme===i.Schemas.vscode&&!!e.path.match(/\/(\d+\/)?resourceSettings\.json$/)},t.prototype.getDefaultSettingsResource=function(e){switch(e){case k.ConfigurationTarget.WORKSPACE:return s.default.from({scheme:i.Schemas.vscode,authority:"defaultsettings",path:"/"+this._defaultWorkspaceSettingsUriCounter+++"/workspaceSettings.json"});case k.ConfigurationTarget.WORKSPACE_FOLDER:return s.default.from({scheme:i.Schemas.vscode,authority:"defaultsettings",path:"/"+this._defaultFolderSettingsUriCounter+++"/resourceSettings.json"})}return s.default.from({scheme:i.Schemas.vscode,authority:"defaultsettings",path:"/"+this._defaultUserSettingsUriCounter+++"/settings.json"})},t.prototype.getPreferencesEditorInputName=function(e,t){var n=y.getSettingsTargetName(e,t,this.contextService);return e===k.ConfigurationTarget.WORKSPACE_FOLDER?o.localize(3,null,n):n},t.prototype.getOrCreateEditableSettingsEditorInput=function(e,t){var n=this
;return this.createSettingsIfNotExists(e,t).then(function(){return n.editorService.createInput({resource:t})})},t.prototype.createEditableSettingsEditorModel=function(e,t){var n=this,i=this.getEditableSettingsURI(e,t);if(i){var o=this.contextService.getWorkspace();return o.configuration&&o.configuration.toString()===i.toString()?this.textModelResolverService.createModelReference(i).then(function(t){return n.instantiationService.createInstance(b.WorkspaceConfigurationEditorModel,t,e)}):this.textModelResolverService.createModelReference(i).then(function(t){return n.instantiationService.createInstance(b.SettingsEditorModel,t,e)})}return r.TPromise.wrap(null)},t.prototype.createDefaultSettingsEditorModel=function(e){var t=this;return this.textModelResolverService.createModelReference(e).then(function(n){var i=t.getConfigurationTargetFromDefaultSettingsResource(e);return t.instantiationService.createInstance(b.DefaultSettingsEditorModel,e,n,t.getDefaultSettings(i))})},t.prototype.getDefaultSettings=function(e){
return e===k.ConfigurationTarget.WORKSPACE?(this._defaultWorkspaceSettingsContentModel||(this._defaultWorkspaceSettingsContentModel=new b.DefaultSettings(this.getMostCommonlyUsedSettings(),e)),this._defaultWorkspaceSettingsContentModel):e===k.ConfigurationTarget.WORKSPACE_FOLDER?(this._defaultFolderSettingsContentModel||(this._defaultFolderSettingsContentModel=new b.DefaultSettings(this.getMostCommonlyUsedSettings(),e)),this._defaultFolderSettingsContentModel):(this._defaultUserSettingsContentModel||(this._defaultUserSettingsContentModel=new b.DefaultSettings(this.getMostCommonlyUsedSettings(),e)),this._defaultUserSettingsContentModel)},t.prototype.getEditableSettingsURI=function(e,t){switch(e){case k.ConfigurationTarget.USER:return s.default.file(this.environmentService.appSettingsPath);case k.ConfigurationTarget.WORKSPACE:if(this.contextService.getWorkbenchState()===p.WorkbenchState.EMPTY)return null;var n=this.contextService.getWorkspace()
;return n.configuration||n.folders[0].toResource(y.FOLDER_SETTINGS_PATH);case k.ConfigurationTarget.WORKSPACE_FOLDER:var i=this.contextService.getWorkspaceFolder(t);return i?i.toResource(y.FOLDER_SETTINGS_PATH):null}return null},t.prototype.createSettingsIfNotExists=function(e,t){var n=this;return this.contextService.getWorkbenchState()===p.WorkbenchState.WORKSPACE&&e===k.ConfigurationTarget.WORKSPACE?this.fileService.resolveContent(this.contextService.getWorkspace().configuration).then(function(e){return-1===Object.keys(A.parse(e.value)).indexOf("settings")?n.jsonEditingService.write(t,{key:"settings",value:{}},!0).then(null,function(){}):null}):this.createIfNotExists(t,"{\n}").then(function(){})},t.prototype.createIfNotExists=function(e,t){var n=this;return this.fileService.resolveContent(e,{acceptTextOnly:!0}).then(null,function(i){return i.fileOperationResult===g.FileOperationResult.FILE_NOT_FOUND?n.fileService.updateContent(e,t).then(null,function(t){
return r.TPromise.wrapError(new Error(o.localize(4,null,c.getPathLabel(e,n.environmentService,n.contextService),t)))}):r.TPromise.wrapError(i)})},t.prototype.getMostCommonlyUsedSettings=function(){return["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations"]},t.prototype.getPosition=function(e,t,n){var i=this,o="["+e+"]",s=t.getPreference(o),a=n.getModel(),c=this.configurationService.getValue(),l=c.files&&c.files.eol;if(s){if(s.overrides.length){var u=s.overrides[s.overrides.length-1],d=void 0;d=u.valueRange.endLineNumber===s.range.endLineNumber?","+l+this.spaces(2,c.editor)+l+this.spaces(1,c.editor):","+l+this.spaces(2,c.editor);var h=E.EditOperation.insert(new w.Position(u.valueRange.endLineNumber,u.valueRange.endColumn),d);return a.pushEditOperations([],[h],function(){return[]}),r.TPromise.as({lineNumber:u.valueRange.endLineNumber+1,
column:a.getLineMaxColumn(u.valueRange.endLineNumber+1)})}return r.TPromise.as({lineNumber:s.valueRange.startLineNumber,column:s.valueRange.startColumn+1})}return this.configurationService.updateValue(o,{},k.ConfigurationTarget.USER).then(function(){s=t.getPreference(o);var e=l+i.spaces(2,c.editor)+l+i.spaces(1,c.editor),n=E.EditOperation.insert(new w.Position(s.valueRange.endLineNumber,s.valueRange.endColumn-1),e);a.pushEditOperations([],[n],function(){return[]});var r=s.valueRange.endLineNumber+1;return t.dispose(),{lineNumber:r,column:a.getLineMaxColumn(r)}})},t.prototype.spaces=function(e,t){var n=t.tabSize;return t.insertSpaces?u.repeat(" ",n*e):u.repeat("\t",e)},t.prototype.dispose=function(){this._onDispose.fire(),e.prototype.dispose.call(this)},
t=a([l(0,M.IEditorService),l(1,P.IEditorGroupsService),l(2,g.IFileService),l(3,f.IWorkspaceConfigurationService),l(4,R.INotificationService),l(5,p.IWorkspaceContextService),l(6,v.IInstantiationService),l(7,m.IEnvironmentService),l(8,S.ITelemetryService),l(9,C.ITextModelService),l(10,I.IKeybindingService),l(11,T.IModelService),l(12,x.IJSONEditingService),l(13,D.IModeService)],t)}(d.Disposable);t.PreferencesService=N}),define(e[174],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Explorer=1]="Explorer",e[e.Scm=3]="Scm",e[e.Extensions=5]="Extensions",e[e.Window=10]="Window",e[e.Notification=15]="Notification"}(t.ProgressLocation||(t.ProgressLocation={})),t.IProgressService2=n.createDecorator("progressService2")}),define(e[1395],t([1,0,61,67,174]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._progress=new Map,this._proxy=e.getProxy(n.ExtHostContext.ExtHostProgress),
this._progressService=t}return e.prototype.dispose=function(){this._progress.forEach(function(e){return e.resolve()}),this._progress.clear()},e.prototype.$startProgress=function(e,t){var n=this,i=this._createTask(e);this._progressService.withProgress(t,i,function(){return n._proxy.$acceptProgressCanceled(e)})},e.prototype.$progressReport=function(e,t){this._progress.has(e)&&this._progress.get(e).progress.report(t)},e.prototype.$progressEnd=function(e){this._progress.has(e)&&(this._progress.get(e).resolve(),this._progress.delete(e))},e.prototype._createTask=function(e){var t=this;return function(n){return new Promise(function(i){t._progress.set(e,{resolve:i,progress:n})})}},e=a([i.extHostNamedCustomer(n.MainContext.MainThreadProgress),l(1,r.IProgressService2)],e)}();t.MainThreadProgress=o}),define(e[487],t([1,0,637,87,236,7,20,18,9,4,5,352,28,80,123,6,17,42,83,10,104,21,220,285,76,77,174,100,22,49,113,43,59]),function(e,t,n,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var F=function(){function t(e,t,n,i,r){this.galleryService=e,this.stateProvider=t,this.locals=n,this.gallery=i,this.telemetryService=r,this.enablementState=m.EnablementState.Enabled,this.isMalicious=!1}return Object.defineProperty(t.prototype,"local",{get:function(){return this.locals[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.local?this.local.type:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.gallery?this.gallery.name:this.local.manifest.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.gallery?this.gallery.displayName||this.gallery.name:this.local.manifest.displayName||this.local.manifest.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.gallery?this.gallery.identifier.id:y.getGalleryExtensionIdFromLocal(this.local)},
enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uuid",{get:function(){return this.gallery?this.gallery.identifier.uuid:this.local.identifier.uuid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"publisher",{get:function(){return this.gallery?this.gallery.publisher:this.local.manifest.publisher},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"publisherDisplayName",{get:function(){return this.gallery?this.gallery.publisherDisplayName||this.gallery.publisher:this.local.metadata&&this.local.metadata.publisherDisplayName?this.local.metadata.publisherDisplayName:this.local.manifest.publisher},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.local?this.local.manifest.version:this.gallery.version},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"latestVersion",{get:function(){return this.gallery?this.gallery.version:this.local.manifest.version},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"description",{get:function(){return this.gallery?this.gallery.description:this.local.manifest.description},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return k.default.extensionsGallery&&this.gallery?k.default.extensionsGallery.itemUrl+"?itemName="+this.publisher+"."+this.name:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconUrl",{get:function(){return this.galleryIconUrl||this.localIconUrl||this.defaultIconUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconUrlFallback",{get:function(){return this.galleryIconUrlFallback||this.localIconUrl||this.defaultIconUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localIconUrl",{get:function(){return this.local&&this.local.manifest.icon?this.local.location.with({path:N.posix.join(this.local.location.path,this.local.manifest.icon)}).toString():null},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"galleryIconUrl",{get:function(){return this.gallery&&this.gallery.assets.icon.uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"galleryIconUrlFallback",{get:function(){return this.gallery&&this.gallery.assets.icon.fallbackUri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultIconUrl",{get:function(){if(this.type===m.LocalExtensionType.System&&this.local.manifest&&this.local.manifest.contributes){if(Array.isArray(this.local.manifest.contributes.themes)&&this.local.manifest.contributes.themes.length)return e.toUrl("../electron-browser/media/theme-icon.png");if(Array.isArray(this.local.manifest.contributes.languages)&&this.local.manifest.contributes.languages.length)return e.toUrl("../electron-browser/media/language-icon.png")}return e.toUrl("../electron-browser/media/defaultIcon.png")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"repository",{get:function(){
return this.gallery&&this.gallery.assets.repository.uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"licenseUrl",{get:function(){return this.gallery&&this.gallery.assets.license&&this.gallery.assets.license.uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this.stateProvider(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"installCount",{get:function(){return this.gallery?this.gallery.installCount:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rating",{get:function(){return this.gallery?this.gallery.rating:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ratingCount",{get:function(){return this.gallery?this.gallery.ratingCount:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outdated",{get:function(){return!!this.gallery&&this.type===m.LocalExtensionType.User&&r.gt(this.latestVersion,this.version)},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"telemetryData",{get:function(){var e=this.local,t=this.gallery;return t?y.getGalleryExtensionTelemetryData(t):y.getLocalExtensionTelemetryData(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preview",{get:function(){return!!this.gallery&&this.gallery.preview},enumerable:!0,configurable:!0}),t.prototype.isGalleryOutdated=function(){return this.local&&this.gallery&&r.gt(this.local.manifest.version,this.gallery.version)},t.prototype.getManifest=function(){return this.gallery&&!this.isGalleryOutdated()?this.gallery.assets.manifest?this.galleryService.getManifest(this.gallery):(this.telemetryService.publicLog("extensions:NotFoundManifest",this.telemetryData),p.TPromise.wrapError(new Error("not available"))):p.TPromise.as(this.local.manifest)},t.prototype.getReadme=function(){if(this.gallery&&!this.isGalleryOutdated()){if(this.gallery.assets.readme)return this.galleryService.getReadme(this.gallery)
;this.telemetryService.publicLog("extensions:NotFoundReadMe",this.telemetryData)}if(this.local&&this.local.readmeUrl){var e=E.default.parse(this.local.readmeUrl);return i.readFile(e.fsPath,"utf8")}return this.type===m.LocalExtensionType.System?p.TPromise.as("# "+(this.displayName||this.name)+"\n**Notice** This is a an extension that is bundled with Visual Studio Code.\n"+this.description+"\n"):p.TPromise.wrapError(new Error("not available"))},t.prototype.getChangelog=function(){if(this.gallery&&this.gallery.assets.changelog&&!this.isGalleryOutdated())return this.galleryService.getChangelog(this.gallery);var e=this.local&&this.local.changelogUrl;if(!e)return p.TPromise.wrapError(new Error("not available"));var t=E.default.parse(e);return"file"===t.scheme?i.readFile(t.fsPath,"utf8"):p.TPromise.wrapError(new Error("not available"))},Object.defineProperty(t.prototype,"dependencies",{get:function(){var e=this.local,t=this.gallery
;return t&&!this.isGalleryOutdated()?t.properties.dependencies:e&&e.manifest.extensionDependencies?e.manifest.extensionDependencies:[]},enumerable:!0,configurable:!0}),t}(),W=function(){function e(e,t,n,i){void 0===i&&(i=null),this._extension=e,this._identifier=t,this._map=n,this._dependent=i,this._hasDependencies=null}return Object.defineProperty(e.prototype,"hasDependencies",{get:function(){return null===this._hasDependencies&&(this._hasDependencies=this.computeHasDependencies()),this._hasDependencies},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extension",{get:function(){return this._extension},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dependent",{get:function(){return this._dependent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dependencies",{get:function(){var t=this
;return this.hasDependencies?this._extension.dependencies.map(function(n){return new e(t._map.get(n),n,t._map,t)}):[]},enumerable:!0,configurable:!0}),e.prototype.computeHasDependencies=function(){if(this._extension&&this._extension.dependencies.length>0){for(var e=this._dependent;null!==e;){if(e.identifier===this.identifier)return!1;e=e.dependent}return!0}return!1},e}(),B=function(){function e(t,n,i,r,o,s,a,l,u,h,p,f,g,v,m,y){var b=this;this.instantiationService=t,this.editorService=n,this.extensionService=i,this.galleryService=r,this.configurationService=o,this.telemetryService=s,this.dialogService=a,this.notificationService=l,this.extensionEnablementService=h,this.windowService=p,this.logService=f,this.progressService=g,this.runtimeExtensionService=v,this.extensionTipsService=m,this.extensionManagementServerService=y,this.installing=[],this.uninstalling=[],this.installed=[],this.disposables=[],this._onChange=new c.Emitter,this.stateProvider=function(e){return b.getExtensionState(e)},
i.onInstallExtension(this.onInstallExtension,this,this.disposables),i.onDidInstallExtension(this.onDidInstallExtension,this,this.disposables),i.onUninstallExtension(this.onUninstallExtension,this,this.disposables),i.onDidUninstallExtension(this.onDidUninstallExtension,this,this.disposables),h.onEnablementChanged(this.onEnablementChanged,this,this.disposables),this.syncDelayer=new d.ThrottledDelayer(e.SyncPeriod),this.autoUpdateDelayer=new d.ThrottledDelayer(1e3),u.registerHandler(this),this.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration(w.AutoUpdateConfigurationKey)&&b.isAutoUpdateEnabled()&&b.checkForUpdates()},this,this.disposables),this.queryLocal().done(function(){return b.eventuallySyncWithGallery(!0)})}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"local",{get:function(){var e=this,t=this.installing.filter(function(t){return!e.installed.some(function(e){
return e.id===t.id})}).map(function(e){return e});return this.installed.concat(t)},enumerable:!0,configurable:!0}),e.prototype.queryLocal=function(){var e=this;return p.TPromise.join([this.extensionService.getInstalled(),this.extensionTipsService.getAllRecommendations()]).then(function(t){var n=t[0],i=t[1];return e.getDistinctInstalledExtensions(n).then(function(t){var r=u.index(e.installed,function(e){return e.local.identifier.id}),o=M.groupBy(n,function(e){return y.getGalleryExtensionIdFromLocal(e)});return e.installed=t.map(function(t){var n=o[y.getGalleryExtensionIdFromLocal(t)];n.splice(n.indexOf(t),1),n.splice(0,0,t);var s=r[t.identifier.id]||new F(e.galleryService,e.stateProvider,n,null,e.telemetryService);s.locals=n,s.enablementState=e.extensionEnablementService.getEnablementState(t);var a=i.filter(function(e){return y.areSameExtensions({id:e.extensionId},{id:s.id})})[0];return a&&(s.recommendationSources=a.sources||[]),s}),e._onChange.fire(),e.local})})},e.prototype.queryGallery=function(e){
var t=this;return void 0===e&&(e={}),p.TPromise.join([this.extensionTipsService.getAllRecommendations(),this.extensionService.getExtensionsReport()]).then(function(n){var i=n[0],r=n[1],o=y.getMaliciousExtensionsSet(r);return t.galleryService.query(e).then(function(e){return g.mapPager(e,function(e){return t.fromGallery(e,o,i)})}).then(null,function(e){return/No extension gallery service configured/.test(e.message)?p.TPromise.as(g.singlePagePager([])):p.TPromise.wrapError(e)})})},e.prototype.loadDependencies=function(e){var t=this;return e.dependencies.length?p.TPromise.join([this.extensionTipsService.getAllRecommendations(),this.extensionService.getExtensionsReport()]).then(function(n){var i=n[0],r=n[1],o=y.getMaliciousExtensionsSet(r);return t.galleryService.loadAllDependencies(e.dependencies.map(function(e){return{id:e}})).then(function(e){return e.map(function(e){return t.fromGallery(e,o,i)})}).then(function(e){return t.local.concat(e)}).then(function(t){for(var n=new Map,i=0,r=t;i<r.length;i++){var o=r[i]
;n.set(o.id,o)}return new W(e,e.id,n)})}):p.TPromise.wrap(null)},e.prototype.open=function(e,t){return void 0===t&&(t=!1),this.editorService.openEditor(this.instantiationService.createInstance(x.ExtensionsInput,e),null,t?I.SIDE_GROUP:I.ACTIVE_GROUP)},e.prototype.getDistinctInstalledExtensions=function(e){return this.hasDuplicates(e)?p.TPromise.join([this.runtimeExtensionService.getExtensions(),this.extensionEnablementService.getDisabledExtensions()]).then(function(t){for(var n=t[0],i=t[1],r=M.groupBy(e,function(e){return i.some(function(t){return y.areSameExtensions(t,{id:y.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid})})?e.location.scheme===P.Schemas.file?"disabled:primary":"disabled:secondary":"enabled"}),o=[],s=[],a=Object.create({}),c=function(e){n.some(function(t){return t.extensionLocation.toString()===e.location.toString()})?(o.push(e),a[y.getGalleryExtensionIdFromLocal(e)]=!0):s.push(e)},l=0,u=r.enabled||[];l<u.length;l++){c(p=u[l])}for(var d=0,h=s;d<h.length;d++){var p=h[d]
;a[y.getGalleryExtensionIdFromLocal(p)]||(o.push(p),a[y.getGalleryExtensionIdFromLocal(p)]=!0)}var f=r["disabled:primary"]||[],g=(r["disabled:secondary"]||[]).filter(function(e){var t={id:y.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid};return f.every(function(e){return!y.areSameExtensions({id:y.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid},t)})});return o.concat(f,g)}):p.TPromise.as(e)},e.prototype.hasDuplicates=function(e){for(var t=Object.create(null),n=0,i=e;n<i.length;n++){var r=i[n],o=y.getGalleryExtensionIdFromLocal(r);if(t[o])return!0;t[o]=!0}return!1},e.prototype.fromGallery=function(e,t,n){var i=this,r=this.getInstalledExtensionMatchingGallery(e);r?e.properties.engine?this.galleryService.loadCompatibleVersion(e).then(function(e){return e?i.syncLocalWithGalleryExtension(r,e):null}):this.syncLocalWithGalleryExtension(r,e):r=new F(this.galleryService,this.stateProvider,[],e,this.telemetryService),t.has(r.id)&&(r.isMalicious=!0);var o=n.filter(function(e){
return y.areSameExtensions({id:e.extensionId},{id:r.id})})[0];return o&&(r.recommendationSources=o.sources||[]),r},e.prototype.getInstalledExtensionMatchingGallery=function(e){for(var t=0,n=this.installed;t<n.length;t++){var i=n[t];if(i.uuid){if(i.uuid===e.identifier.uuid)return i}else if(i.id===e.identifier.id)return i}return null},e.prototype.syncLocalWithGalleryExtension=function(e,t){var n=this;p.TPromise.join(e.locals.map(function(e){return e.metadata?p.TPromise.as(e):n.extensionService.updateMetadata(e,{id:t.identifier.uuid,publisherDisplayName:t.publisherDisplayName,publisherId:t.publisherId})})).then(function(i){e.locals=i,e.gallery=t,n._onChange.fire(),n.eventuallyAutoUpdateExtensions()})},e.prototype.checkForUpdates=function(){var e=this;return this.syncDelayer.trigger(function(){return e.syncWithGallery()},0)},e.prototype.isAutoUpdateEnabled=function(){return this.configurationService.getValue(w.AutoUpdateConfigurationKey)},e.prototype.eventuallySyncWithGallery=function(t){var n=this
;void 0===t&&(t=!1);var i=t?0:e.SyncPeriod;this.syncDelayer.trigger(function(){return n.syncWithGallery().then(function(){return n.eventuallySyncWithGallery()})},i).done(null,function(e){return null})},e.prototype.syncWithGallery=function(){for(var e=[],t=[],n=0,i=this.installed;n<i.length;n++){var r=i[n];r.type===m.LocalExtensionType.User&&(r.uuid?e.push(r.uuid):t.push(r.id))}var o=[];return e.length&&o.push(this.queryGallery({ids:e,pageSize:e.length})),t.length&&o.push(this.queryGallery({names:t,pageSize:t.length})),p.TPromise.join(o)},e.prototype.eventuallyAutoUpdateExtensions=function(){var e=this;this.autoUpdateDelayer.trigger(function(){return e.autoUpdateExtensions()}).done(null,function(e){return null})},e.prototype.autoUpdateExtensions=function(){var e=this;if(!this.isAutoUpdateEnabled())return p.TPromise.as(null);var t=this.local.filter(function(e){return e.outdated&&e.state!==w.ExtensionState.Installing});return p.TPromise.join(t.map(function(t){return e.install(t)}))},
e.prototype.canInstall=function(e){return e instanceof F&&(!e.isMalicious&&!!e.gallery)},e.prototype.install=function(e){var t=this;if("string"==typeof e)return this.progressService.withProgress({location:A.ProgressLocation.Extensions,title:n.localize(0,null),source:""+e},function(){return t.extensionService.install(e).then(function(){return null})});if(e instanceof F){if(e.isMalicious)return p.TPromise.wrapError(new Error(n.localize(1,null)));var i=e.gallery;return i?this.progressService.withProgress({location:A.ProgressLocation.Extensions,title:n.localize(2,null),source:""+e.id},function(){return t.extensionService.installFromGallery(i).then(function(){return null})}):p.TPromise.wrapError(new Error("Missing gallery"))}},e.prototype.setEnablement=function(e,t){return e=Array.isArray(e)?e:[e],this.promptAndSetEnablement(e,t)},e.prototype.uninstall=function(e){var t=this;if(e instanceof F){var i=e,r=i.locals.length?i.locals:this.installed.filter(function(t){return t.id===e.id})[0].locals
;return r.length?(this.logService.info("Requested uninstalling the extension "+e.id+" from window "+this.windowService.getCurrentWindowId()),this.progressService.withProgress({location:A.ProgressLocation.Extensions,title:n.localize(3,null),source:""+r[0].identifier.id},function(){return p.TPromise.join(r.map(function(e){return t.extensionService.uninstall(e)})).then(function(){return null})})):p.TPromise.wrapError(new Error("Missing local"))}},e.prototype.reinstall=function(e){var t=this;if(e instanceof F){var n=e,i=n.locals.length?n.locals:this.installed.filter(function(t){return t.id===e.id})[0].locals;return i.length?this.progressService.withProgress({location:A.ProgressLocation.Extensions,source:""+i[0].identifier.id},function(){return p.TPromise.join(i.map(function(e){return t.extensionService.reinstallFromGallery(e)})).then(function(){return null})}):p.TPromise.wrapError(new Error("Missing local"))}},e.prototype.promptAndSetEnablement=function(e,t){
var n=this.getDependenciesRecursively(e,this.local,t,[]);return n.length>0?t===m.EnablementState.Enabled||t===m.EnablementState.WorkspaceEnabled?this.promptForDependenciesAndEnable(e,n,t):this.promptForDependenciesAndDisable(e,n,t):this.checkAndSetEnablement(e,[],t)},e.prototype.promptForDependenciesAndEnable=function(e,t,i){var r=this,o=n.localize(4,null),s=[n.localize(5,null),n.localize(6,null)];return this.dialogService.show(C.default.Info,o,s,{cancelId:1}).then(function(n){return 0===n?r.checkAndSetEnablement(e,t,i):p.TPromise.as(null)})},e.prototype.promptForDependenciesAndDisable=function(e,t,i){var r=this,o=n.localize(7,null),s=[n.localize(8,null),n.localize(9,null),n.localize(10,null)];return this.dialogService.show(C.default.Info,o,s,{cancelId:2}).then(function(n){return 0===n?r.checkAndSetEnablement(e,t,i):1===n?r.checkAndSetEnablement(e,[],i):p.TPromise.as(null)})},e.prototype.checkAndSetEnablement=function(e,t,n){var i=this,r=e.concat(t)
;if(!(n===m.EnablementState.Enabled||n===m.EnablementState.WorkspaceEnabled))for(var o=0,s=e;o<s.length;o++){var a=s[o],c=this.getDependentsAfterDisablement(a,r,this.local,n);if(c.length)return p.TPromise.wrapError(new Error(this.getDependentsErrorMessage(a,c)))}return p.TPromise.join(r.map(function(e){return i.doSetEnablement(e,n)}))},e.prototype.getDependenciesRecursively=function(e,t,n,i){var r=e.filter(function(e){return-1===i.indexOf(e)});if(r.length){for(var o=0,s=r;o<s.length;o++){var a=s[o];i.push(a)}var c=t.filter(function(t){return-1===i.indexOf(t)&&(t.enablementState!==n&&(t.type===m.LocalExtensionType.User&&e.some(function(e){return-1!==e.dependencies.indexOf(t.id)})))});if(c.length){var l=this.getDependenciesRecursively(c,t,n,i);return c.concat(l)}}return[]},e.prototype.getDependentsAfterDisablement=function(e,t,n,i){return n.filter(function(n){
return 0!==n.dependencies.length&&(n!==e&&(n.enablementState!==m.EnablementState.WorkspaceDisabled&&n.enablementState!==m.EnablementState.Disabled&&(-1===t.indexOf(n)&&n.dependencies.some(function(n){return e.id===n||t.some(function(e){return e.id===n})}))))})},e.prototype.getDependentsErrorMessage=function(e,t){return 1===t.length?n.localize(11,null,e.displayName,t[0].displayName):2===t.length?n.localize(12,null,e.displayName,t[0].displayName,t[1].displayName):n.localize(13,null,e.displayName,t[0].displayName,t[1].displayName)},e.prototype.doSetEnablement=function(e,t){var n=this;return this.extensionEnablementService.setEnablement(e.local,t).then(function(i){return i&&n.telemetryService.publicLog(t===m.EnablementState.Enabled||t===m.EnablementState.WorkspaceEnabled?"extension:enable":"extension:disable",e.telemetryData),i})},Object.defineProperty(e.prototype,"allowedBadgeProviders",{get:function(){
return this._extensionAllowedBadgeProviders||(this._extensionAllowedBadgeProviders=(k.default.extensionAllowedBadgeProviders||[]).map(function(e){return e.toLowerCase()})),this._extensionAllowedBadgeProviders},enumerable:!0,configurable:!0}),e.prototype.onInstallExtension=function(e){var t=e.gallery;if(t){var n=this.installed.filter(function(e){return y.areSameExtensions(e,t.identifier)})[0];n||(n=new F(this.galleryService,this.stateProvider,[],t,this.telemetryService)),n.gallery=t,this.installing.push(n),this._onChange.fire()}},e.prototype.onDidInstallExtension=function(e){var t=this,n=e.local,i=e.zipPath,r=e.error,o=e.gallery,s=o?this.installing.filter(function(e){return y.areSameExtensions(e,o.identifier)})[0]:null,a=s||(i?new F(this.galleryService,this.stateProvider,[n],null,this.telemetryService):null);if(a&&(this.installing=s?this.installing.filter(function(e){return e!==s}):this.installing,!r)){var c=this.installed.filter(function(e){return e.id===a.id})[0];if(c){
var l=this.extensionManagementServerService.getExtensionManagementServer(n.location),u=c.locals.filter(function(e){return t.extensionManagementServerService.getExtensionManagementServer(e.location).location.toString()===l.location.toString()})[0];if(u){var d=c.locals.slice();d.splice(c.locals.indexOf(u),1,n),c.locals=d}else c.locals=c.locals.concat([n])}else a.locals=[n],this.installed.push(a)}this._onChange.fire()},e.prototype.onUninstallExtension=function(e){var t=e.id;this.logService.info("Uninstalling the extension "+t+" from window "+this.windowService.getCurrentWindowId());var n=this.installed.filter(function(e){return e.local.identifier.id===t})[0];if(this.installed.filter(function(e){return e.local.identifier.id!==t}).length!==this.installed.length){var i=this.uninstalling.filter(function(e){return e.local.identifier.id===t})[0]||n;this.uninstalling=[i].concat(this.uninstalling.filter(function(e){return e.local.identifier.id!==t})),this._onChange.fire()}},
e.prototype.onDidUninstallExtension=function(e){var t=e.identifier,n=e.error,i=t.id;n||(this.installed=this.installed.filter(function(e){return e.local.identifier.id!==i}));var r=this.uninstalling.filter(function(e){return e.local.identifier.id===i})[0];this.uninstalling=this.uninstalling.filter(function(e){return e.local.identifier.id!==i}),r&&this._onChange.fire()},e.prototype.onEnablementChanged=function(e){var t=this.local.filter(function(t){return y.areSameExtensions(t,e)})[0];if(t){var n=this.extensionEnablementService.getEnablementState(t.local);n!==t.enablementState&&(t.enablementState=n,this._onChange.fire())}},e.prototype.getExtensionState=function(e){if(e.gallery&&this.installing.some(function(t){return t.gallery&&y.areSameExtensions(t.gallery.identifier,e.gallery.identifier)}))return w.ExtensionState.Installing;if(this.uninstalling.some(function(t){return t.id===e.id}))return w.ExtensionState.Uninstalling;return this.installed.filter(function(t){
return t===e||t.gallery&&e.gallery&&y.areSameExtensions(t.gallery.identifier,e.gallery.identifier)})[0]?w.ExtensionState.Installed:w.ExtensionState.Uninstalled},e.prototype.onError=function(e){if(!h.isPromiseCanceledError(e)){var t=e&&e.message||"";/getaddrinfo ENOTFOUND|getaddrinfo ENOENT|connect EACCES|connect ECONNREFUSED/.test(t)||this.notificationService.error(e)}},e.prototype.handleURL=function(e){return o(this,void 0,p.TPromise,function(){return s(this,function(t){return/^extension/.test(e.path)?(this.onOpenExtensionUrl(e),[2,!0]):[2,!1]})})},e.prototype.onOpenExtensionUrl=function(e){var t=this,i=/^extension\/([^/]+)$/.exec(e.path);if(i){var r=i[1];this.queryLocal().then(function(e){var i=e.filter(function(e){return y.areSameExtensions({id:e.id},{id:r})})[0];return i?t.windowService.show().then(function(){return t.open(i)}):t.queryGallery({names:[r],source:"uri"}).then(function(e){if(e.total<1)return p.TPromise.as(null);var i=e.firstPage[0];return t.windowService.show().then(function(){
return t.open(i).then(function(){t.notificationService.prompt(C.default.Info,n.localize(14,null,i.displayName,i.publisher),[{label:n.localize(15,null),run:function(){return t.install(i).done(void 0,function(e){return t.onError(e)})}}])})})})}).done(void 0,function(e){return t.onError(e)})}},e.prototype.dispose=function(){this.syncDelayer.cancel(),this.disposables=f.dispose(this.disposables)},e.SyncPeriod=432e5,e=a([l(0,b.IInstantiationService),l(1,I.IEditorService),l(2,m.IExtensionManagementService),l(3,m.IExtensionGalleryService),l(4,S.IConfigurationService),l(5,v.ITelemetryService),l(6,L.IDialogService),l(7,R.INotificationService),l(8,T.IURLService),l(9,m.IExtensionEnablementService),l(10,_.IWindowService),l(11,D.ILogService),l(12,A.IProgressService2),l(13,O.IExtensionService),l(14,m.IExtensionTipsService),l(15,m.IExtensionManagementServerService)],e)}();t.ExtensionsWorkbenchService=B}),define(e[249],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.ISCMService=n.createDecorator("scm");!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information"}(t.InputValidationType||(t.InputValidationType={}))}),define(e[1398],t([1,0,4,10,7,24,5,249,61,67,1070]),function(e,t,n,i,r,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n,i,o,s){this.sourceControlHandle=e,this.handle=t,this.provider=n,this.features=i,this.label=o,this.id=s,this.elements=[],this._onDidSplice=new r.Emitter,this.onDidSplice=this._onDidSplice.event,this._onDidChange=new r.Emitter}return Object.defineProperty(e.prototype,"hideWhenEmpty",{get:function(){return this.features.hideWhenEmpty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){return{$mid:4,sourceControlHandle:this.sourceControlHandle,groupHandle:this.handle}},e.prototype.splice=function(e,t,n){var i
;(i=this.elements).splice.apply(i,[e,t].concat(n)),this._onDidSplice.fire({start:e,deleteCount:t,toInsert:n})},e.prototype.$updateGroup=function(e){this.features=c.assign(this.features,e),this._onDidChange.fire()},e.prototype.$updateGroupLabel=function(e){this.label=e,this._onDidChange.fire()},e}(),v=function(){function e(e,t,n,i,r,o,s){this.proxy=e,this.sourceControlHandle=t,this.groupHandle=n,this.handle=i,this.sourceUri=r,this.resourceGroup=o,this.decorations=s}return e.prototype.open=function(){return this.proxy.$executeResourceCommand(this.sourceControlHandle,this.groupHandle,this.handle)},e.prototype.toJSON=function(){return{$mid:3,sourceControlHandle:this.sourceControlHandle,groupHandle:this.groupHandle,handle:this.handle}},e}(),m=function(){function e(t,n,i,o,s,a){this.proxy=t,this._handle=n,this._contextValue=i,this._label=o,this._rootUri=s,this._id="scm"+e.ID_HANDLE++,this.groups=new f.Sequence,this._groupsByHandle=Object.create(null),this._onDidChangeResources=new r.Emitter,this.features={},
this._onDidChangeCommitTemplate=new r.Emitter,this._onDidChange=new r.Emitter}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeResources",{get:function(){return this._onDidChangeResources.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handle",{get:function(){return this._handle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootUri",{get:function(){return this._rootUri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contextValue",{get:function(){return this._contextValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"commitTemplate",{get:function(){return this.features.commitTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"acceptInputCommand",{get:function(){
return this.features.acceptInputCommand},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusBarCommands",{get:function(){return this.features.statusBarCommands},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this.features.count},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeCommitTemplate",{get:function(){return this._onDidChangeCommitTemplate.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.$updateSourceControl=function(e){this.features=c.assign(this.features,e),this._onDidChange.fire(),void 0!==e.commitTemplate&&this._onDidChangeCommitTemplate.fire(this.commitTemplate)},e.prototype.$registerGroup=function(e,t,n){var i=new g(this.handle,e,this,{},n,t);this._groupsByHandle[e]=i,this.groups.splice(this.groups.elements.length,0,[i])},e.prototype.$updateGroup=function(e,t){
var n=this._groupsByHandle[e];n&&n.$updateGroup(t)},e.prototype.$updateGroupLabel=function(e,t){var n=this._groupsByHandle[e];n&&n.$updateGroupLabel(t)},e.prototype.$spliceGroupResourceStates=function(e){for(var t=this,n=function(e,n){var o=r._groupsByHandle[e];if(!o)return console.warn("SCM group "+e+" not found in provider "+r.label),"continue";n.reverse();for(var s=0,a=n;s<a.length;s++){var c=a[s],l=c[0],u=c[1],d=c[2].map(function(n){var r=n[0],s=n[1],a=n[2],c=n[3],l=n[4],u=n[5],d=n[6],h=n[7],p=n[8],f=a[0],g=a[1]||f,m={icon:f&&i.default.parse(f),iconDark:g&&i.default.parse(g),tooltip:c,strikeThrough:l,faded:u,source:d,letter:h,color:p&&p.id};return new v(t.proxy,t.handle,e,r,i.default.revive(s),o,m)});o.splice(l,u,d)}},r=this,o=0,s=e;o<s.length;o++){var a=s[o];n(a[0],a[1])}this._onDidChangeResources.fire()},e.prototype.$unregisterGroup=function(e){var t=this._groupsByHandle[e];t&&(delete this._groupsByHandle[e],this.groups.splice(this.groups.elements.indexOf(t),1))},
e.prototype.getOriginalResource=function(e){return this.features.hasQuickDiffProvider?this.proxy.$provideOriginalResource(this.handle,e).then(function(e){return e&&i.default.revive(e)}):n.TPromise.as(null)},e.prototype.toJSON=function(){return{$mid:5,handle:this.handle}},e.prototype.dispose=function(){},e.ID_HANDLE=0,e=a([l(5,d.ISCMService)],e)}(),y=function(){function e(e,t){this.scmService=t,this._repositories=Object.create(null),this._inputDisposables=Object.create(null),this._disposables=[],this._proxy=e.getProxy(h.ExtHostContext.ExtHostSCM)}return e.prototype.dispose=function(){var e=this;Object.keys(this._repositories).forEach(function(t){return e._repositories[t].dispose()}),this._repositories=Object.create(null),Object.keys(this._inputDisposables).forEach(function(t){return e._inputDisposables[t].dispose()}),this._inputDisposables=Object.create(null),this._disposables=u.dispose(this._disposables)},e.prototype.$registerSourceControl=function(e,t,n,r){
var o=this,s=new m(this._proxy,e,t,n,r&&i.default.revive(r),this.scmService),a=this.scmService.registerSCMProvider(s);this._repositories[e]=a;var c=a.input.onDidChange(function(t){return o._proxy.$onInputBoxValueChange(e,t)});this._inputDisposables[e]=c},e.prototype.$updateSourceControl=function(e,t){var n=this._repositories[e];if(n){n.provider.$updateSourceControl(t)}},e.prototype.$unregisterSourceControl=function(e){var t=this._repositories[e];t&&(this._inputDisposables[e].dispose(),delete this._inputDisposables[e],t.dispose(),delete this._repositories[e])},e.prototype.$registerGroup=function(e,t,n,i){var r=this._repositories[e];if(r){r.provider.$registerGroup(t,n,i)}},e.prototype.$updateGroup=function(e,t,n){var i=this._repositories[e];if(i){i.provider.$updateGroup(t,n)}},e.prototype.$updateGroupLabel=function(e,t,n){var i=this._repositories[e];if(i){i.provider.$updateGroupLabel(t,n)}},e.prototype.$spliceResourceStates=function(e,t){var n=this._repositories[e];if(n){n.provider.$spliceGroupResourceStates(t)
}},e.prototype.$unregisterGroup=function(e,t){var n=this._repositories[e];if(n){n.provider.$unregisterGroup(t)}},e.prototype.$setInputBoxValue=function(e,t){var n=this._repositories[e];n&&(n.input.value=t)},e.prototype.$setInputBoxPlaceholder=function(e,t){var n=this._repositories[e];n&&(n.input.placeholder=t)},e.prototype.$setValidationProviderIsEnabled=function(e,t){var i=this,r=this._repositories[e];r&&(r.input.validateInput=t?function(t,r){return o(i,void 0,n.TPromise,function(){var n;return s(this,function(i){switch(i.label){case 0:return[4,this._proxy.$validateInput(e,t,r)];case 1:return(n=i.sent())?[2,{message:n[0],type:n[1]}]:[2,void 0]}})})}:function(){return n.TPromise.as(void 0)})},e=a([p.extHostNamedCustomer(h.MainContext.MainThreadSCM),l(1,d.ISCMService)],e)}();t.MainThreadSCM=y}),
define(e[1399],t([1,0,693,18,5,4,7,157,6,72,21,195,17,249,66,12,26,51,45,32,280,15,55,39,298,52,198,218,23,41,37,25,31,143,57,20,71,35,22,8,911]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U){"use strict";function G(e){return 0===e.modifiedEndLineNumber?0===e.modifiedStartLineNumber?1:e.modifiedStartLineNumber:e.modifiedEndLineNumber}function j(e){return 0===e.originalEndLineNumber?Q.Add:0===e.modifiedEndLineNumber?Q.Delete:Q.Modify}function q(e){for(var t=0,n=e.get(z.ICodeEditorService).listDiffEditors();t<n.length;t++){var i=n[t];if(i.hasTextFocus()&&i instanceof R.EmbeddedDiffEditorWidget)return i.getParentEditor()}return I.getOuterEditor(e)}function $(e,t){var n=e.modifiedStartLineNumber-t.modifiedStartLineNumber;return 0!==n?n:0!=(n=e.modifiedEndLineNumber-t.modifiedEndLineNumber)?n:0!=(n=e.originalStartLineNumber-t.originalStartLineNumber)?n:e.originalEndLineNumber-t.originalEndLineNumber}Object.defineProperty(t,"__esModule",{value:!0});var Y=function(e){
function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.onClick=function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.actionRunner.run(this._commandAction,this._context).done(void 0,function(e){return t._notificationService.error(e)})},t}(W.MenuItemActionItem),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runAction=function(t,n){return t instanceof F.MenuItemAction?t.run.apply(t,n):e.prototype.runAction.call(this,t,n)},t}(O.ActionRunner);t.isDirtyDiffVisible=new T.RawContextKey("dirtyDiffVisible",!1);var Q,Z=function(e){function t(t,n,i,r,o){var s=this,a=r.lookupKeybinding(n.id),c=n.label+(a?" ("+a.getLabel()+")":"");return s=e.call(this,n.id,c,i)||this,s.instantiationService=o,s.action=n,s.editor=t,s}return n(t,e),t.prototype.run=function(){var e=this;return u.TPromise.wrap(this.instantiationService.invokeFunction(function(t){return e.action.run(t,e.editor,null)}))},
t=a([l(3,P.IKeybindingService),l(4,p.IInstantiationService)],t)}(O.Action);!function(e){e[e.Modify=0]="Modify",e[e.Add=1]="Add",e[e.Delete=2]="Delete"}(Q||(Q={}));var J=function(e){function r(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,{isResizeable:!0,frameWidth:1,keepEditorSelection:!0})||this;return u.model=n,u.themeService=i,u.instantiationService=r,u.keybindingService=s,u.notificationService=a,u.contextMenuService=l,u.height=void 0,i.onThemeChange(u._applyTheme,u,u._disposables),u._applyTheme(i.getTheme()),u.contextKeyService=c.createScoped(),u.contextKeyService.createKey("originalResourceScheme",u.model.original.uri.scheme),u.menu=o.createMenu(F.MenuId.SCMChangeContext,u.contextKeyService),u.create(),u.title=N.basename(t.getModel().uri.fsPath),u.setTitle(u.title),n.onDidChange(u.renderTitle,u,u._disposables),u}return n(r,e),r.prototype.showChange=function(e){var n=this,i=this.model.changes[e];this.index=e,this.change=i;if(this.model.original){d.once(this.diffEditor.onDidUpdateDiff)(function(){
return setTimeout(function(){return n.revealChange(i)},0)}),this.diffEditor.setModel(this.model);var r=new k.Position(G(i),1),o=this.editor.getConfiguration().lineHeight,s=this.editor.getLayoutInfo().height,a=Math.floor(s/o),c=Math.min(function(e){var t=e.modifiedEndLineNumber-e.modifiedStartLineNumber+1,n=e.originalEndLineNumber-e.originalStartLineNumber+1;return 0===e.originalEndLineNumber?t:0===e.modifiedEndLineNumber?n:t+n}(i)+8,Math.floor(a/3));this.renderTitle();var l=j(i),u=function(e,n){switch(n){case Q.Modify:return e.getColor(t.editorGutterModifiedBackground);case Q.Add:return e.getColor(t.editorGutterAddedBackground);case Q.Delete:return e.getColor(t.editorGutterDeletedBackground)}}(this.themeService.getTheme(),l);this.style({frameColor:u,arrowColor:u}),this._actionbarWidget.context=[this.model.modified.uri,this.model.changes,e],this.show(r,c),this.editor.focus()}},r.prototype.renderTitle=function(){
var e=this.model.changes.length>1?i.localize(0,null,this.index+1,this.model.changes.length):i.localize(1,null,this.index+1,this.model.changes.length);this.setTitle(this.title,e)},r.prototype._fillHead=function(t){e.prototype._fillHead.call(this,t);var n=this.instantiationService.createInstance(Z,this.editor,new ee,"show-previous-change octicon octicon-chevron-up"),i=this.instantiationService.createInstance(Z,this.editor,new te,"show-next-change octicon octicon-chevron-down");this._disposables.push(n),this._disposables.push(i),this._actionbarWidget.push([n,i],{label:!1,icon:!0});var r=[];W.fillInActionBarActions(this.menu,{shouldForwardArgs:!0},r),this._actionbarWidget.push(r,{label:!1,icon:!0})},r.prototype._getActionBarOptions=function(){var e=this;return{actionRunner:new X,actionItemProvider:function(t){return e.getActionItem(t)},orientation:M.ActionsOrientation.HORIZONTAL_REVERSE}},r.prototype.getActionItem=function(e){
if(e instanceof F.MenuItemAction)return new Y(e,this.keybindingService,this.notificationService,this.contextMenuService)},r.prototype._fillBody=function(e){this.diffEditor=this.instantiationService.createInstance(R.EmbeddedDiffEditorWidget,e,{scrollBeyondLastLine:!0,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderSideBySide:!1,readOnly:!0},this.editor)},r.prototype._onWidth=function(e){void 0!==this.height&&this.diffEditor.layout({height:this.height,width:e})},r.prototype._doLayoutBody=function(t,n){e.prototype._doLayoutBody.call(this,t,n),this.diffEditor.layout({height:t,width:n}),void 0===this.height&&this.revealChange(this.change),this.height=t},r.prototype.revealChange=function(e){var t,n;0===e.modifiedEndLineNumber?(t=e.modifiedStartLineNumber,n=e.modifiedStartLineNumber+1):e.originalEndLineNumber>0?(t=e.modifiedStartLineNumber-1,
n=e.modifiedEndLineNumber+1):(t=e.modifiedStartLineNumber,n=e.modifiedEndLineNumber),this.diffEditor.revealLinesInCenter(t,n,1)},r.prototype._applyTheme=function(e){var t=e.getColor(L.peekViewBorder)||C.Color.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(L.peekViewTitleBackground)||C.Color.transparent,primaryHeadingColor:e.getColor(L.peekViewTitleForeground),secondaryHeadingColor:e.getColor(L.peekViewTitleInfoForeground)})},r.prototype.revealLine=function(e){this.editor.revealLineInCenterIfOutsideViewport(e,0)},r=a([l(2,S.IThemeService),l(3,p.IInstantiationService),l(4,F.IMenuService),l(5,P.IKeybindingService),l(6,K.INotificationService),l(7,T.IContextKeyService),l(8,H.IContextMenuService)],r)}(I.PeekViewWidget),ee=function(e){function t(){return e.call(this,{id:"editor.action.dirtydiff.previous",label:i.localize(2,null),alias:"Show Previous Change",precondition:null,kbOpts:{kbExpr:x.EditorContextKeys.editorTextFocus,primary:1597}})||this}return n(t,e),
t.prototype.run=function(e,t){var n=q(e);if(n){var i=re.get(n);i&&i.canNavigate()&&i.previous()}},t}(w.EditorAction);t.ShowPreviousChangeAction=ee,w.registerEditorAction(ee);var te=function(e){function t(){return e.call(this,{id:"editor.action.dirtydiff.next",label:i.localize(3,null),alias:"Show Next Change",precondition:null,kbOpts:{kbExpr:x.EditorContextKeys.editorTextFocus,primary:573}})||this}return n(t,e),t.prototype.run=function(e,t){var n=q(e);if(n){var i=re.get(n);i&&i.canNavigate()&&i.next()}},t}(w.EditorAction);t.ShowNextChangeAction=te,w.registerEditorAction(te);var ne=function(e){function t(){return e.call(this,{id:"workbench.action.editor.previousChange",label:i.localize(4,null),alias:"Move to Previous Change",precondition:null,kbOpts:{kbExpr:x.EditorContextKeys.editorTextFocus,primary:1599}})||this}return n(t,e),t.prototype.run=function(e,t){var n=q(e);if(n){var i=re.get(n);if(i&&i.modelRegistry){var r=n.getPosition().lineNumber,o=i.modelRegistry.getModel(n.getModel());if(0!==o.changes.length){
var s=o.findPreviousClosestChange(r,!1),a=o.changes[s],c=new k.Position(a.modifiedStartLineNumber,1);n.setPosition(c),n.revealPosition(c)}}}},t}(w.EditorAction);t.MoveToPreviousChangeAction=ne,w.registerEditorAction(ne);var ie=function(e){function t(){return e.call(this,{id:"workbench.action.editor.nextChange",label:i.localize(5,null),alias:"Move to Next Change",precondition:null,kbOpts:{kbExpr:x.EditorContextKeys.editorTextFocus,primary:575}})||this}return n(t,e),t.prototype.run=function(e,t){var n=q(e);if(n){var i=re.get(n);if(i&&i.modelRegistry){var r=n.getPosition().lineNumber,o=i.modelRegistry.getModel(n.getModel());if(0!==o.changes.length){var s=o.findNextClosestChange(r,!1),a=o.changes[s],c=new k.Position(a.modifiedStartLineNumber,1);n.setPosition(c),n.revealPosition(c)}}}},t}(w.EditorAction);t.MoveToNextChangeAction=ie,w.registerEditorAction(ie),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeDirtyDiff",weight:A.KeybindingsRegistry.WEIGHT.editorContrib(50),primary:9,secondary:[1033],
when:T.ContextKeyExpr.and(t.isDirtyDiffVisible),handler:function(e){var t=q(e);if(t){var n=re.get(t);n&&n.close()}}});var re=function(){function e(e,n,i){var r=this;this.editor=e,this.instantiationService=i,this.modelRegistry=null,this.model=null,this.widget=null,this.currentIndex=-1,this.session=c.empty,this.mouseDownInfo=null,this.enabled=!1,this.disposables=[],this.enabled=!n.getContextKeyValue("isInDiffEditor"),this.enabled&&(this.isDirtyDiffVisible=t.isDirtyDiffVisible.bindTo(n),this.disposables.push(e.onMouseDown(function(e){return r.onEditorMouseDown(e)})),this.disposables.push(e.onMouseUp(function(e){return r.onEditorMouseUp(e)})),this.disposables.push(e.onDidChangeModel(function(){return r.close()})))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.canNavigate=function(){return-1===this.currentIndex||this.model.changes.length>1},e.prototype.next=function(e){
this.assertWidget()&&("number"==typeof e||-1===this.currentIndex?this.currentIndex=this.model.findNextClosestChange("number"==typeof e?e:this.editor.getPosition().lineNumber):this.currentIndex=D.rot(this.currentIndex+1,this.model.changes.length),this.widget.showChange(this.currentIndex))},e.prototype.previous=function(e){this.assertWidget()&&("number"==typeof e||-1===this.currentIndex?this.currentIndex=this.model.findPreviousClosestChange("number"==typeof e?e:this.editor.getPosition().lineNumber):this.currentIndex=D.rot(this.currentIndex-1,this.model.changes.length),this.widget.showChange(this.currentIndex))},e.prototype.close=function(){this.session.dispose(),this.session=c.empty},e.prototype.assertWidget=function(){var e=this;if(!this.enabled)return!1;if(this.widget)return 0!==this.model.changes.length||(this.close(),!1);if(!this.modelRegistry)return!1;var t=this.editor.getModel();if(!t)return!1;var n=this.modelRegistry.getModel(t);if(!n)return!1;if(0===n.changes.length)return!1;this.currentIndex=-1,
this.model=n,this.widget=this.instantiationService.createInstance(J,this.editor,n),this.isDirtyDiffVisible.set(!0);var i=[];return d.once(this.widget.onDidClose)(this.close,this,i),n.onDidChange(this.onDidModelChange,this,i),i.push(this.widget,c.toDisposable(function(){e.model=null,e.widget=null,e.currentIndex=-1,e.isDirtyDiffVisible.set(!1),e.editor.focus()})),this.session=c.combinedDisposable(i),!0},e.prototype.onDidModelChange=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];i.start<=this.currentIndex&&(this.currentIndex<i.start+i.deleteCount?(this.currentIndex=-1,this.next()):(this.currentIndex=D.rot(this.currentIndex+i.toInsert.length-i.deleteCount-1,this.model.changes.length),this.next()))}},e.prototype.onEditorMouseDown=function(e){this.mouseDownInfo=null;var t=e.target.range;if(t&&e.event.leftButton&&e.target.type===E.MouseTargetType.GUTTER_LINE_DECORATIONS){var n=e.target.detail;n.offsetX-n.glyphMarginWidth-n.lineNumbersWidth-n.glyphMarginLeft>10||(this.mouseDownInfo={
lineNumber:t.startLineNumber})}},e.prototype.onEditorMouseUp=function(e){if(this.mouseDownInfo){var t=this.mouseDownInfo.lineNumber;this.mouseDownInfo=null;var n=e.target.range;if(n&&n.startLineNumber===t&&e.target.type===E.MouseTargetType.GUTTER_LINE_DECORATIONS&&this.modelRegistry){var i=this.editor.getModel();if(i){var r=this.modelRegistry.getModel(i);if(r){var o=V.firstIndex(r.changes,function(e){return function(e,t){return 1===e&&0===t.modifiedStartLineNumber&&0===t.modifiedEndLineNumber||e>=t.modifiedStartLineNumber&&e<=(t.modifiedEndLineNumber||t.modifiedStartLineNumber)}(t,e)});o<0||(o===this.currentIndex?this.close():this.next(t))}}}}},e.prototype.dispose=function(){this.disposables=c.dispose(this.disposables)},e.ID="editor.contrib.dirtydiff",e=a([l(1,T.IContextKeyService),l(2,p.IInstantiationService)],e)}();t.DirtyDiffController=re,t.editorGutterModifiedBackground=_.registerColor("editorGutter.modifiedBackground",{dark:new C.Color(new C.RGBA(12,125,157)),light:new C.Color(new C.RGBA(102,175,224)),
hc:new C.Color(new C.RGBA(0,73,122))},i.localize(6,null)),t.editorGutterAddedBackground=_.registerColor("editorGutter.addedBackground",{dark:new C.Color(new C.RGBA(88,124,12)),light:new C.Color(new C.RGBA(129,184,139)),hc:new C.Color(new C.RGBA(27,82,37))},i.localize(7,null)),t.editorGutterDeletedBackground=_.registerColor("editorGutter.deletedBackground",{dark:new C.Color(new C.RGBA(148,21,27)),light:new C.Color(new C.RGBA(202,75,81)),hc:new C.Color(new C.RGBA(141,14,20))},i.localize(8,null));var oe=new C.Color(new C.RGBA(0,122,204,.6));t.overviewRulerModifiedForeground=_.registerColor("editorOverviewRuler.modifiedForeground",{dark:oe,light:oe,hc:oe},i.localize(9,null)),t.overviewRulerAddedForeground=_.registerColor("editorOverviewRuler.addedForeground",{dark:oe,light:oe,hc:oe},i.localize(10,null)),t.overviewRulerDeletedForeground=_.registerColor("editorOverviewRuler.deletedForeground",{dark:oe,light:oe,hc:oe},i.localize(11,null));var se=function(){function e(n,i,r){this.editorModel=n,this.model=i,
this.decorations=[],this.disposables=[];var o=r.getValue("scm.diffDecorations"),s={gutter:"all"===o||"gutter"===o,overview:"all"===o||"overview"===o};this.modifiedOptions=e.createDecoration("dirty-diff-modified",t.overviewRulerModifiedForeground,s),this.addedOptions=e.createDecoration("dirty-diff-added",t.overviewRulerAddedForeground,s),this.deletedOptions=e.createDecoration("dirty-diff-deleted",t.overviewRulerDeletedForeground,s),i.onDidChange(this.onDidChange,this,this.disposables)}return e.createDecoration=function(e,t,n){var i={isWholeLine:!0};return n.gutter&&(i.linesDecorationsClassName="dirty-diff-glyph "+e),n.overview&&(i.overviewRuler={color:S.themeColorFromId(t),darkColor:S.themeColorFromId(t),position:B.OverviewRulerLane.Left}),b.ModelDecorationOptions.createDynamic(i)},e.prototype.onDidChange=function(){var e=this,t=this.model.changes.map(function(t){var n=j(t),i=t.modifiedStartLineNumber,r=t.modifiedEndLineNumber||i;switch(n){case Q.Add:return{range:{startLineNumber:i,startColumn:1,
endLineNumber:r,endColumn:1},options:e.addedOptions};case Q.Delete:return{range:{startLineNumber:i,startColumn:1,endLineNumber:i,endColumn:1},options:e.deletedOptions};case Q.Modify:return{range:{startLineNumber:i,startColumn:1,endLineNumber:r,endColumn:1},options:e.modifiedOptions}}});this.decorations=this.editorModel.deltaDecorations(this.decorations,t)},e.prototype.dispose=function(){this.disposables=c.dispose(this.disposables),this.editorModel&&!this.editorModel.isDisposed()&&this.editorModel.deltaDecorations(this.decorations,[]),this.editorModel=null,this.decorations=[]},e=a([l(2,m.IConfigurationService)],e)}(),ae=function(){function e(e,t,n,i,o){var s=this;this._editorModel=e,this.scmService=t,this.editorWorkerService=n,this.textModelResolverService=i,this.configurationService=o,this.repositoryDisposables=new Set,this.disposables=[],this._onDidChange=new d.Emitter,this.onDidChange=this._onDidChange.event,this._changes=[],this.diffDelayer=new r.ThrottledDelayer(200),
this.disposables.push(e.onDidChangeContent(function(){return s.triggerDiff()})),t.onDidAddRepository(this.onDidAddRepository,this,this.disposables),t.repositories.forEach(function(e){return s.onDidAddRepository(e)}),this.triggerDiff()}return Object.defineProperty(e.prototype,"original",{get:function(){return this._originalModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modified",{get:function(){return this._editorModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),e.prototype.onDidAddRepository=function(e){var t=this,n=[];this.repositoryDisposables.add(n),n.push(c.toDisposable(function(){return t.repositoryDisposables.delete(n)}));d.anyEvent(e.provider.onDidChange,e.provider.onDidChangeResources)(this.triggerDiff,this,n);d.filterEvent(this.scmService.onDidRemoveRepository,function(t){return t===e})(function(){return c.dispose(n)},null,n),this.triggerDiff()},
e.prototype.triggerDiff=function(){var e=this;return this.diffDelayer?this.diffDelayer.trigger(function(){return e.diff()}).then(function(t){if(e._editorModel&&!e._editorModel.isDisposed()&&e._originalModel&&!e._originalModel.isDisposed()){0===e._originalModel.getValueLength()&&(t=[]);var n=V.sortedDiff(e._changes,t,$);e._changes=t,n.length>0&&e._onDidChange.fire(n)}}):u.TPromise.as(null)},e.prototype.diff=function(){var e=this;return this.getOriginalURIPromise().then(function(t){if(!e._editorModel||e._editorModel.isDisposed()||!t)return u.TPromise.as([]);if(!e.editorWorkerService.canComputeDirtyDiff(t,e._editorModel.uri))return u.TPromise.as([]);var n=e.configurationService.getValue("diffEditor.ignoreTrimWhitespace");return e.editorWorkerService.computeDirtyDiff(t,e._editorModel.uri,n)})},e.prototype.getOriginalURIPromise=function(){var e=this;return this._originalURIPromise?this._originalURIPromise:(this._originalURIPromise=this.getOriginalResource().then(function(t){
return e._editorModel?t?e.textModelResolverService.createModelReference(t).then(function(n){return e._editorModel?(e._originalModel=n.object.textEditorModel,e.disposables.push(n),e.disposables.push(n.object.textEditorModel.onDidChangeContent(function(){return e.triggerDiff()})),t):null}):(e._originalModel=null,null):null}),r.always(this._originalURIPromise,function(){e._originalURIPromise=null}))},e.prototype.getOriginalResource=function(){return o(this,void 0,u.TPromise,function(){var e,t,n,i;return s(this,function(r){if(!this._editorModel)return[2,null];for(e=0,t=this.scmService.repositories;e<t.length;e++)if(n=t[e],i=n.provider.getOriginalResource(this._editorModel.uri))return[2,i];return[2,null]})})},e.prototype.findNextClosestChange=function(e,t){void 0===t&&(t=!0);for(var n=0;n<this.changes.length;n++){var i=this.changes[n];if(t){if(G(i)>=e)return n}else if(i.modifiedStartLineNumber>e)return n}return 0},e.prototype.findPreviousClosestChange=function(e,t){void 0===t&&(t=!0)
;for(var n=this.changes.length-1;n>=0;n--){var i=this.changes[n];if(t){if(i.modifiedStartLineNumber<=e)return n}else if(G(i)<e)return n}return this.changes.length-1},e.prototype.dispose=function(){this.disposables=c.dispose(this.disposables),this._editorModel=null,this._originalModel=null,this.diffDelayer&&(this.diffDelayer.cancel(),this.diffDelayer=null),this.repositoryDisposables.forEach(function(e){return c.dispose(e)}),this.repositoryDisposables.clear()},e=a([l(1,y.ISCMService),l(2,v.IEditorWorkerService),l(3,f.ITextModelService),l(4,m.IConfigurationService)],e)}();t.DirtyDiffModel=ae;var ce=function(){function e(e,t){this.model=e,this.decorator=t}return e.prototype.dispose=function(){this.decorator.dispose(),this.model.dispose()},e}(),le=function(){function e(e,t,n){var i=this;this.editorService=e,this.instantiationService=t,this.configurationService=n,this.enabled=!1,this.models=[],this.items=Object.create(null),this.transientDisposables=[],this.disposables=[],this.stylesheet=U.createStyleSheet(),
this.disposables.push(c.toDisposable(function(){return i.stylesheet.parentElement.removeChild(i.stylesheet)}));d.filterEvent(n.onDidChangeConfiguration,function(e){return e.affectsConfiguration("scm.diffDecorations")})(this.onDidChangeConfiguration,this,this.disposables),this.onDidChangeConfiguration();d.filterEvent(n.onDidChangeConfiguration,function(e){return e.affectsConfiguration("scm.diffDecorationsGutterWidth")})(this.onDidChangeDiffWidthConfiguration,this),this.onDidChangeDiffWidthConfiguration()}return e.prototype.onDidChangeConfiguration=function(){"none"!==this.configurationService.getValue("scm.diffDecorations")?this.enable():this.disable()},e.prototype.onDidChangeDiffWidthConfiguration=function(){var e=this.configurationService.getValue("scm.diffDecorationsGutterWidth");(isNaN(e)||e<=0||e>5)&&(e=3),this.stylesheet.innerHTML=".monaco-editor .dirty-diff-modified,.monaco-editor .dirty-diff-added{border-left-width:"+e+"px;}"},e.prototype.enable=function(){var e=this;this.enabled&&this.disable(),
this.transientDisposables.push(this.editorService.onDidVisibleEditorsChange(function(){return e.onEditorsChanged()})),this.onEditorsChanged(),this.enabled=!0},e.prototype.disable=function(){var e=this;this.enabled&&(this.transientDisposables=c.dispose(this.transientDisposables),this.models.forEach(function(t){return e.items[t.id].dispose()}),this.models=[],this.items=Object.create(null),this.enabled=!1)},e.prototype.onEditorsChanged=function(){var e=this,t=this.editorService.visibleTextEditorWidgets.filter(function(e){return e instanceof h.CodeEditorWidget}).map(function(t){var n=t;return re.get(n).modelRegistry=e,n.getModel()}).filter(function(e,t,n){return!!e&&!!e.uri&&-1===n.indexOf(e,t+1)}),n=t.filter(function(t){return e.models.every(function(e){return t!==e})});this.models.filter(function(e){return t.every(function(t){return t!==e})}).forEach(function(t){return e.onModelInvisible(t)}),n.forEach(function(t){return e.onModelVisible(t)}),this.models=t},e.prototype.onModelVisible=function(e){
var t=this.instantiationService.createInstance(ae,e),n=new se(e,t,this.configurationService);this.items[e.id]=new ce(t,n)},e.prototype.onModelInvisible=function(e){this.items[e.id].dispose(),delete this.items[e.id]},e.prototype.getModel=function(e){var t=this.items[e.id];return t?t.model:null},e.prototype.dispose=function(){this.disable(),this.disposables=c.dispose(this.disposables)},e=a([l(0,g.IEditorService),l(1,p.IInstantiationService),l(2,m.IConfigurationService)],e)}();t.DirtyDiffWorkbenchController=le,w.registerEditorContribution(re),S.registerThemingParticipant(function(e,n){var i=e.getColor(t.editorGutterModifiedBackground);i&&n.addRule("\n\t\t\t.monaco-editor .dirty-diff-modified {\n\t\t\t\tborder-left: 3px solid "+i+";\n\t\t\t}\n\t\t\t.monaco-editor .dirty-diff-modified:before {\n\t\t\t\tbackground: "+i+";\n\t\t\t}\n\t\t");var r=e.getColor(t.editorGutterAddedBackground)
;r&&n.addRule("\n\t\t\t.monaco-editor .dirty-diff-added {\n\t\t\t\tborder-left: 3px solid "+r+";\n\t\t\t}\n\t\t\t.monaco-editor .dirty-diff-added:before {\n\t\t\t\tbackground: "+r+";\n\t\t\t}\n\t\t");var o=e.getColor(t.editorGutterDeletedBackground);o&&n.addRule("\n\t\t\t.monaco-editor .dirty-diff-deleted:after {\n\t\t\t\tborder-left: 4px solid "+o+";\n\t\t\t}\n\t\t\t.monaco-editor .dirty-diff-deleted:before {\n\t\t\t\tbackground: "+o+";\n\t\t\t}\n\t\t")})}),define(e[1400],t([1,0,695,25,5,7,299,249,175,15,189]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){this.scmService=e,this.activityService=t,this.badgeDisposable=r.empty,this.disposables=[],this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables),this.render()}return e.prototype.onDidAddRepository=function(e){var t=this,n=e.provider,i=o.anyEvent(n.onDidChange,n.onDidChangeResources)(function(){return t.render()
}),s=o.filterEvent(this.scmService.onDidRemoveRepository,function(t){return t===e})(function(){a.dispose(),t.disposables=t.disposables.filter(function(e){return e!==s}),t.render()}),a=r.combinedDisposable([i,s]);this.disposables.push(a)},e.prototype.render=function(){this.badgeDisposable.dispose();var e=this.scmService.repositories.reduce(function(e,t){return"number"==typeof t.provider.count?e+t.provider.count:e+t.provider.groups.elements.reduce(function(e,t){return e+t.elements.length},0)},0);if(e>0){var t=new u.NumberBadge(e,function(e){return n.localize(0,null,e)});this.badgeDisposable=this.activityService.showActivity(s.VIEWLET_ID,t,"scm-viewlet-label")}else this.badgeDisposable=r.empty},e.prototype.dispose=function(){this.badgeDisposable.dispose(),this.disposables=r.dispose(this.disposables)},e=a([l(0,c.ISCMService),l(1,u.IActivityService)],e)}();t.StatusUpdater=p;var f=function(){function e(e,t,n){this.scmService=e,this.statusbarService=t,this.statusBarDisposable=r.empty,this.focusDisposable=r.empty,
this.focusedRepository=void 0,this.disposables=[],this.focusedProviderContextKey=n.createKey("scmProvider",void 0),this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables),this.scmService.repositories.length>0&&this.onDidFocusRepository(this.scmService.repositories[0])}return e.prototype.onDidAddRepository=function(e){var t=this,n=e.onDidFocus(function(){return t.onDidFocusRepository(e)}),i=o.filterEvent(this.scmService.onDidRemoveRepository,function(t){return t===e})(function(){s.dispose(),t.disposables=t.disposables.filter(function(e){return e!==i}),0===t.scmService.repositories.length?t.focusedProviderContextKey.set(void 0):t.focusedRepository===e&&t.scmService.repositories[0].focus()}),s=r.combinedDisposable([n,i]);this.disposables.push(s),1===this.scmService.repositories.length&&this.onDidFocusRepository(e)},e.prototype.onDidFocusRepository=function(e){var t=this;this.focusedRepository!==e&&(this.focusedRepository=e,this.focusedProviderContextKey.set(e.provider.id)),
this.focusDisposable.dispose(),this.focusDisposable=e.provider.onDidChange(function(){return t.render(e)}),this.render(e)},e.prototype.render=function(e){var t=this;this.statusBarDisposable.dispose();var n=e.provider.statusBarCommands||[],o=e.provider.rootUri?i.basename(e.provider.rootUri.fsPath)+" ("+e.provider.label+")":e.provider.label,s=n.map(function(e){return t.statusbarService.addEntry({text:e.title,tooltip:o+" - "+e.tooltip,command:e.id,arguments:e.arguments},h.StatusbarAlignment.LEFT,1e4)});this.statusBarDisposable=r.combinedDisposable(s)},e.prototype.dispose=function(){this.focusDisposable.dispose(),this.statusBarDisposable.dispose(),this.disposables=r.dispose(this.disposables)},e=a([l(0,c.ISCMService),l(1,h.IStatusbarService),l(2,d.IContextKeyService)],e)}();t.StatusBarController=f}),define(e[1401],t([1,0,5,7,77,4]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){this._value="",this._onDidChange=new i.Emitter,this._placeholder="",
this._onDidChangePlaceholder=new i.Emitter,this._validateInput=function(){return o.TPromise.as(void 0)},this._onDidChangeValidateInput=new i.Emitter}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this._onDidChange.fire(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this._onDidChangePlaceholder.fire(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangePlaceholder",{get:function(){return this._onDidChangePlaceholder.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validateInput",{get:function(){return this._validateInput},set:function(e){this._validateInput=e,this._onDidChangeValidateInput.fire()},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onDidChangeValidateInput",{get:function(){return this._onDidChangeValidateInput.event},enumerable:!0,configurable:!0}),e}(),c=function(){function e(e,t){this.provider=e,this.disposable=t,this._onDidFocus=new i.Emitter,this.onDidFocus=this._onDidFocus.event,this.input=new s}return e.prototype.focus=function(){this._onDidFocus.fire()},e.prototype.dispose=function(){this.disposable.dispose(),this.provider.dispose()},e}(),u=function(){function e(e){this.logService=e,this._providerIds=new Set,this._repositories=[],this._onDidAddProvider=new i.Emitter,this._onDidRemoveProvider=new i.Emitter}return Object.defineProperty(e.prototype,"repositories",{get:function(){return this._repositories.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidAddRepository",{get:function(){return this._onDidAddProvider.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidRemoveRepository",{get:function(){return this._onDidRemoveProvider.event},
enumerable:!0,configurable:!0}),e.prototype.registerSCMProvider=function(e){var t=this;if(this.logService.trace("SCMService#registerSCMProvider"),this._providerIds.has(e.id))throw new Error("SCM Provider "+e.id+" already exists.");this._providerIds.add(e.id);var i=n.toDisposable(function(){var n=t._repositories.indexOf(r);n<0||(t._providerIds.delete(e.id),t._repositories.splice(n,1),t._onDidRemoveProvider.fire(r))}),r=new c(e,i);return this._repositories.push(r),this._onDidAddProvider.fire(r),r},e=a([l(0,r.ILogService)],e)}();t.SCMService=u}),define(e[1402],t([1,0,7,34]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.storageService=e,this._onDidClearHistory=new n.Emitter,this.onDidClearHistory=this._onDidClearHistory.event}return e.prototype.clearHistory=function(){this.storageService.remove(e.SEARCH_HISTORY_KEY,i.StorageScope.WORKSPACE),this._onDidClearHistory.fire()},e.prototype.load=function(){
var t,n=this.storageService.get(e.SEARCH_HISTORY_KEY,i.StorageScope.WORKSPACE);if(n)try{t=JSON.parse(n)}catch(e){}return t||{}},e.prototype.save=function(t){this.storageService.store(e.SEARCH_HISTORY_KEY,JSON.stringify(t),i.StorageScope.WORKSPACE)},e.SEARCH_HISTORY_KEY="workbench.search.history",e=a([l(0,i.IStorageService)],e)}();t.SearchHistoryService=r}),define(e[1403],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.service=e}return e.prototype.call=function(e,t){switch(e){case"fileSearch":return this.service.fileSearch(t);case"textSearch":return this.service.textSearch(t);case"clearCache":return this.service.clearCache(t);case"fetchTelemetry":return this.service.fetchTelemetry()}},e}();t.SearchChannel=n;var i=function(){function e(e){this.channel=e}return e.prototype.fileSearch=function(e){return this.channel.call("fileSearch",e)},e.prototype.textSearch=function(e){return this.channel.call("textSearch",e)},
e.prototype.clearCache=function(e){return this.channel.call("clearCache",e)},e.prototype.fetchTelemetry=function(){return this.channel.call("fetchTelemetry")},e}();t.SearchChannelClient=i}),define(e[489],t([1,0,782,102,333]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.grammarsExtPoint=i.ExtensionsRegistry.registerExtensionPoint("grammars",[r.languagesExtPoint],{description:n.localize(0,null),type:"array",defaultSnippets:[{body:[{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}}],properties:{language:{description:n.localize(1,null),type:"string"},scopeName:{description:n.localize(2,null),type:"string"},path:{description:n.localize(3,null),type:"string"},embeddedLanguages:{description:n.localize(4,null),type:"object"},tokenTypes:{description:n.localize(5,null),type:"object",additionalProperties:{
enum:["string","comment","other"]}},injectTo:{description:n.localize(6,null),type:"array",items:{type:"string"}}},required:["scopeName","path"]}})}),define(e[1405],t([1,0,32,489,54,49,29]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(t){null===e._grammars&&this.fillModeScopeMap(t)}return e.prototype.fillModeScopeMap=function(t){e._grammars={},t.forEach(function(t){t.value.forEach(function(t){t.language&&t.scopeName&&(e._grammars[t.language]=t.scopeName)})})},e.prototype.getGrammar=function(t){return e._grammars[t]},e._grammars=null,e}(),l=function(e){function t(t){var n=e.call(this,t)||this;return n._lastGrammarContributions=null,n._lastExtensionService=null,n.emmetActionName=t.actionName,n}return n(t,e),t.prototype._withGrammarContributions=function(e){return this._lastExtensionService!==e&&(this._lastExtensionService=e,this._lastGrammarContributions=e.readExtensionPointContributions(r.grammarsExtPoint).then(function(e){return new c(e)})),
this._lastGrammarContributions},t.prototype.run=function(e,n){var i=this,r=e.get(s.IExtensionService),c=e.get(o.IModeService),l=e.get(a.ICommandService);return this._withGrammarContributions(r).then(function(e){if("editor.emmet.action.expandAbbreviation"===i.id)return l.executeCommand("emmet.expandAbbreviation",t.getLanguage(c,n,e))})},t.getLanguage=function(e,t,n){var i=this,r=t.getSelection().getStartPosition();t.getModel().tokenizeIfCheap(r.lineNumber);var o=t.getModel().getLanguageIdAtPosition(r.lineNumber,r.column),s=e.getLanguageIdentifier(o).language.split(".").pop();return{language:s,parentMode:function(){var e=n.getGrammar(s);if(!e)return s;var t=e.split(".");if(t.length<2)return s;for(var r=1;r<t.length;r++){var o=t[t.length-r];if(-1!==i.emmetSupportedModes.indexOf(o))return o}return s}()}},t.emmetSupportedModes=["html","css","xml","xsl","haml","jade","jsx","slim","scss","sass","less","stylus","styl","svg"],t}(i.EditorAction);t.EmmetEditorAction=l}),
define(e[1406],t([1,0,619,1405,32,55,15]),function(e,t,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){return e.call(this,{id:"editor.emmet.action.expandAbbreviation",label:i.localize(0,null),alias:"Emmet: Expand Abbreviation",precondition:s.EditorContextKeys.writable,actionName:"expand_abbreviation",kbOpts:{primary:2,kbExpr:a.ContextKeyExpr.and(s.EditorContextKeys.editorTextFocus,s.EditorContextKeys.tabDoesNotMoveFocus,a.ContextKeyExpr.has("config.emmet.triggerExpansionOnTab"))}})||this}return n(t,e),t}(r.EmmetEditorAction);o.registerEditorAction(c)}),define(e[1407],t([1,0,1406]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(e[490],t([1,0]),function(e,t){"use strict";function n(e,t,n){void 0===n&&(n=!0);for(var r=t.length-1;r>=0;r--){var o=t.slice(0,r),s=function(e,t,n,r){for(var o=null,s=e.tokenColors.length-1;s>=0;s--){var a=e.tokenColors[s];if(!r||a.settings.foreground){var c=void 0
;if("string"==typeof a.scope)c=a.scope.split(/,/).map(function(e){return e.trim()});else{if(!Array.isArray(a.scope))continue;c=a.scope}for(var l=0,u=c.length;l<u;l++){var d=c[l],h=new i(d,a.settings);h.matches(t,n)&&h.isMoreSpecific(o)&&(o=h)}}}return o}(e,t[r],o,n);if(s)return s}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingThemeRule=n;var i=function(){function e(e,t){this.rawSelector=e,this.settings=t;var n=this.rawSelector.split(/ /);this.scope=n[n.length-1],this.parentScopes=n.slice(0,n.length-1)}return e.prototype.matches=function(t,n){return e._matches(this.scope,this.parentScopes,t,n)},e._cmp=function(e,t){if(null===e&&null===t)return 0;if(null===e)return-1;if(null===t)return 1;if(e.scope.length!==t.scope.length)return e.scope.length-t.scope.length;var n=e.parentScopes.length,i=t.parentScopes.length;if(n!==i)return n-i;for(var r=0;r<n;r++){var o=e.parentScopes[r].length,s=t.parentScopes[r].length;if(o!==s)return o-s}return 0},e.prototype.isMoreSpecific=function(t){
return e._cmp(this,t)>0},e._matchesOne=function(e,t){var n=e+".";return e===t||t.substring(0,n.length)===n},e._matches=function(e,t,n,i){if(!this._matchesOne(e,n))return!1;for(var r=t.length-1,o=i.length-1;r>=0&&o>=0;)this._matchesOne(t[r],i[o])&&r--,o--;return-1===r},e}();t.ThemeRule=i}),define(e[288],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITextMateService=n.createDecorator("textMateService")}),define(e[1410],t([1,0,574,30,89,54,114,120,16,288,33]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";function p(e){if(!Array.isArray(e))return!1;for(var t=0,n=e.length;t<n;t++)if("string"!=typeof e[t])return!1;return!0}function f(e){return p(e)&&2===e.length}Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n){var i=this;this._modeService=t,this._fileService=n,this._done=[],this._modeService.onDidCreateMode(function(e){return i._loadConfigurationsForMode(e.getLanguageIdentifier())}),e.onDidEncounterLanguage(function(e){
i._loadConfigurationsForMode(i._modeService.getLanguageIdentifier(e))})}return e.prototype._loadConfigurationsForMode=function(e){var t=this;if(!this._done[e.id]){this._done[e.id]=!0;this._modeService.getConfigurationFiles(e.language).forEach(function(n){return t._handleConfigFile(e,n)})}},e.prototype._handleConfigFile=function(e,t){var i=this;this._fileService.resolveContent(t).then(function(o){var s=[],a=r.parse(o.value.toString(),s);s.length&&console.error(n.localize(0,null,t,s.join("\n"))),i._handleConfig(e,a)},function(e){console.error(e)})},e.prototype._extractValidCommentRule=function(e,t){var n=t.comments;if(void 0===n)return null;if(!i.isObject(n))return console.warn("["+e.language+"]: language configuration: expected `comments` to be an object."),null;var r=null;return void 0!==n.lineComment&&("string"!=typeof n.lineComment?console.warn("["+e.language+"]: language configuration: expected `comments.lineComment` to be a string."):(r=r||{}).lineComment=n.lineComment),
void 0!==n.blockComment&&(f(n.blockComment)?(r=r||{}).blockComment=n.blockComment:console.warn("["+e.language+"]: language configuration: expected `comments.blockComment` to be an array of two strings.")),r},e.prototype._extractValidBrackets=function(e,t){var n=t.brackets;if(void 0===n)return null;if(!Array.isArray(n))return console.warn("["+e.language+"]: language configuration: expected `brackets` to be an array."),null;for(var i=null,r=0,o=n.length;r<o;r++){var s=n[r];f(s)?(i=i||[]).push(s):console.warn("["+e.language+"]: language configuration: expected `brackets["+r+"]` to be an array of two strings.")}return i},e.prototype._extractValidAutoClosingPairs=function(e,t){var n=t.autoClosingPairs;if(void 0===n)return null;if(!Array.isArray(n))return console.warn("["+e.language+"]: language configuration: expected `autoClosingPairs` to be an array."),null;for(var r=null,o=0,s=n.length;o<s;o++){var a=n[o];if(Array.isArray(a)){if(!f(a)){
console.warn("["+e.language+"]: language configuration: expected `autoClosingPairs["+o+"]` to be an array of two strings or an object.");continue}(r=r||[]).push({open:a[0],close:a[1]})}else{if(!i.isObject(a)){console.warn("["+e.language+"]: language configuration: expected `autoClosingPairs["+o+"]` to be an array of two strings or an object.");continue}if("string"!=typeof a.open){console.warn("["+e.language+"]: language configuration: expected `autoClosingPairs["+o+"].open` to be a string.");continue}if("string"!=typeof a.close){console.warn("["+e.language+"]: language configuration: expected `autoClosingPairs["+o+"].close` to be a string.");continue}if(void 0!==a.notIn&&!p(a.notIn)){console.warn("["+e.language+"]: language configuration: expected `autoClosingPairs["+o+"].notIn` to be a string array.");continue}(r=r||[]).push({open:a.open,close:a.close,notIn:a.notIn})}}return r},e.prototype._extractValidSurroundingPairs=function(e,t){var n=t.surroundingPairs;if(void 0===n)return null
;if(!Array.isArray(n))return console.warn("["+e.language+"]: language configuration: expected `surroundingPairs` to be an array."),null;for(var r=null,o=0,s=n.length;o<s;o++){var a=n[o];if(Array.isArray(a)){if(!f(a)){console.warn("["+e.language+"]: language configuration: expected `surroundingPairs["+o+"]` to be an array of two strings or an object.");continue}(r=r||[]).push({open:a[0],close:a[1]})}else{if(!i.isObject(a)){console.warn("["+e.language+"]: language configuration: expected `surroundingPairs["+o+"]` to be an array of two strings or an object.");continue}if("string"!=typeof a.open){console.warn("["+e.language+"]: language configuration: expected `surroundingPairs["+o+"].open` to be a string.");continue}if("string"!=typeof a.close){console.warn("["+e.language+"]: language configuration: expected `surroundingPairs["+o+"].close` to be a string.");continue}(r=r||[]).push({open:a.open,close:a.close})}}return r},e.prototype._handleConfig=function(e,t){var n={},i=this._extractValidCommentRule(e,t)
;i&&(n.comments=i);var r=this._extractValidBrackets(e,t);r&&(n.brackets=r);var o=this._extractValidAutoClosingPairs(e,t);o&&(n.autoClosingPairs=o);var a=this._extractValidSurroundingPairs(e,t);if(a&&(n.surroundingPairs=a),t.wordPattern)try{var c=this._parseRegex(t.wordPattern);c&&(n.wordPattern=c)}catch(e){}if(t.indentationRules){var l=this._mapIndentationRules(t.indentationRules);l&&(n.indentationRules=l)}if(t.folding){var u=t.folding.markers;n.folding={offSide:t.folding.offSide,markers:u?{start:new RegExp(u.start),end:new RegExp(u.end)}:void 0}}s.LanguageConfigurationRegistry.register(e,n)},e.prototype._parseRegex=function(e){return"string"==typeof e?new RegExp(e,""):"object"==typeof e?new RegExp(e.pattern,e.flags):null},e.prototype._mapIndentationRules=function(e){try{var t=this._parseRegex(e.increaseIndentPattern),n=this._parseRegex(e.decreaseIndentPattern);if(t&&n){var i={increaseIndentPattern:t,decreaseIndentPattern:n}
;return e.indentNextLinePattern&&(i.indentNextLinePattern=this._parseRegex(e.indentNextLinePattern)),e.unIndentedLinePattern&&(i.unIndentedLinePattern=this._parseRegex(e.unIndentedLinePattern)),i}}catch(e){}return null},e=a([l(0,d.ITextMateService),l(1,o.IModeService),l(2,h.IFileService)],e)}();t.LanguageConfigurationFileHandler=g;var v={allowComments:!0,default:{comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[["(",")"],["[","]"],["{","}"]]},definitions:{openBracket:{type:"string",description:n.localize(1,null)},closeBracket:{type:"string",description:n.localize(2,null)},bracketPair:{type:"array",items:[{$ref:"#definitions/openBracket"},{$ref:"#definitions/closeBracket"}]}},properties:{comments:{default:{blockComment:["/*","*/"],lineComment:"//"},description:n.localize(3,null),type:"object",properties:{blockComment:{type:"array",description:n.localize(4,null),items:[{type:"string",
description:n.localize(5,null)},{type:"string",description:n.localize(6,null)}]},lineComment:{type:"string",description:n.localize(7,null)}}},brackets:{default:[["(",")"],["[","]"],["{","}"]],description:n.localize(8,null),type:"array",items:{$ref:"#definitions/bracketPair"}},autoClosingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:n.localize(9,null),type:"array",items:{oneOf:[{$ref:"#definitions/bracketPair"},{type:"object",properties:{open:{$ref:"#definitions/openBracket"},close:{$ref:"#definitions/closeBracket"},notIn:{type:"array",description:n.localize(10,null),items:{enum:["string","comment"]}}}}]}},surroundingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:n.localize(11,null),type:"array",items:{oneOf:[{$ref:"#definitions/bracketPair"},{type:"object",properties:{open:{$ref:"#definitions/openBracket"},close:{$ref:"#definitions/closeBracket"}}}]}},wordPattern:{default:"",description:n.localize(12,null),type:["string","object"],properties:{pattern:{type:"string",
description:n.localize(13,null),default:""},flags:{type:"string",description:n.localize(14,null),default:"g",pattern:"^([gimuy]+)$",patternErrorMessage:n.localize(15,null)}}},indentationRules:{default:{increaseIndentPattern:"",decreaseIndentPattern:""},description:n.localize(16,null),type:"object",properties:{increaseIndentPattern:{type:["string","object"],description:n.localize(17,null),properties:{pattern:{type:"string",description:n.localize(18,null),default:""},flags:{type:"string",description:n.localize(19,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:n.localize(20,null)}}},decreaseIndentPattern:{type:["string","object"],description:n.localize(21,null),properties:{pattern:{type:"string",description:n.localize(22,null),default:""},flags:{type:"string",description:n.localize(23,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:n.localize(24,null)}}},indentNextLinePattern:{type:["string","object"],description:n.localize(25,null),properties:{pattern:{type:"string",
description:n.localize(26,null),default:""},flags:{type:"string",description:n.localize(27,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:n.localize(28,null)}}},unIndentedLinePattern:{type:["string","object"],description:n.localize(29,null),properties:{pattern:{type:"string",description:n.localize(30,null),default:""},flags:{type:"string",description:n.localize(31,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:n.localize(32,null)}}}}},folding:{type:"object",description:n.localize(33,null),properties:{offSide:{type:"boolean",description:n.localize(34,null)},markers:{type:"object",description:n.localize(35,null),properties:{start:{type:"string",description:n.localize(36,null)},end:{type:"string",description:n.localize(37,null)}}}}}}};u.Registry.as(c.Extensions.JSONContribution).registerSchema("vscode://schemas/language-configuration",v)}),define(e[48],t([1,0,6,15]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.SAVED=0]="SAVED",
e[e.DIRTY=1]="DIRTY",e[e.PENDING_SAVE=2]="PENDING_SAVE",e[e.CONFLICT=3]="CONFLICT",e[e.ORPHAN=4]="ORPHAN",e[e.ERROR=5]="ERROR"}(t.ModelState||(t.ModelState={}));!function(e){e[e.DIRTY=0]="DIRTY",e[e.SAVING=1]="SAVING",e[e.SAVE_ERROR=2]="SAVE_ERROR",e[e.SAVED=3]="SAVED",e[e.REVERTED=4]="REVERTED",e[e.ENCODING=5]="ENCODING",e[e.CONTENT_CHANGE=6]="CONTENT_CHANGE",e[e.ORPHANED_CHANGE=7]="ORPHANED_CHANGE"}(t.StateChange||(t.StateChange={}));var r=function(){function e(e,t){this._resource=e.getResource(),this._kind=t}return Object.defineProperty(e.prototype,"resource",{get:function(){return this._resource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return this._kind},enumerable:!0,configurable:!0}),e}();t.TextFileModelChangeEvent=r,t.TEXT_FILE_SERVICE_ID="textFileService",t.AutoSaveContext=new i.RawContextKey("config.files.autoSave",void 0);!function(e){e[e.OFF=0]="OFF",e[e.AFTER_SHORT_DELAY=1]="AFTER_SHORT_DELAY",e[e.AFTER_LONG_DELAY=2]="AFTER_LONG_DELAY",
e[e.ON_FOCUS_CHANGE=3]="ON_FOCUS_CHANGE",e[e.ON_WINDOW_CHANGE=4]="ON_WINDOW_CHANGE"}(t.AutoSaveMode||(t.AutoSaveMode={}));!function(e){e[e.EXPLICIT=1]="EXPLICIT",e[e.AUTO=2]="AUTO",e[e.FOCUS_CHANGE=3]="FOCUS_CHANGE",e[e.WINDOW_CHANGE=4]="WINDOW_CHANGE"}(t.SaveReason||(t.SaveReason={})),t.ITextFileService=n.createDecorator(t.TEXT_FILE_SERVICE_ID)}),define(e[1412],t([1,0,5,33,67,61,48]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t,n){this._listener=new Array;var r=e.getProxy(o.ExtHostContext.ExtHostFileSystemEventService),s={created:[],changed:[],deleted:[]};t.onFileChanges(function(e){for(var t=0,n=e.changes;t<n.length;t++){var o=n[t];switch(o.type){case i.FileChangeType.ADDED:s.created.push(o.resource);break;case i.FileChangeType.UPDATED:s.changed.push(o.resource);break;case i.FileChangeType.DELETED:s.deleted.push(o.resource)}}r.$onFileEvent(s),s.created.length=0,s.changed.length=0,s.deleted.length=0},void 0,this._listener),
t.onAfterOperation(function(e){e.operation===i.FileOperation.MOVE&&r.$onFileRename(e.resource,e.target.resource)},void 0,this._listener),n.onWillMove(function(e){var t=r.$onWillRename(e.oldResource,e.newResource);e.waitUntil(t)},void 0,this._listener)}return e.prototype.dispose=function(){n.dispose(this._listener)},e=a([r.extHostCustomer,l(1,i.IFileService),l(2,s.ITextFileService)],e)}();t.MainThreadFileSystemEventService=c}),define(e[493],t([1,0,44,375,57,10,174,48,134,90,21]),function(e,t,n,i,r,o,s,a,l,u,d){"use strict";function h(e){return 0===e.length||!!function(e){return void 0!==e.range}(e[0])}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.to=function(e){var t=e.selectionStartLineNumber,n=e.selectionStartColumn,r=e.positionLineNumber,o=e.positionColumn,s=new i.Position(t-1,n-1),a=new i.Position(r-1,o-1);return new i.Selection(s,a)},e.from=function(e){var t=e.anchor,n=e.active;return{selectionStartLineNumber:t.line+1,selectionStartColumn:t.character+1,positionLineNumber:n.line+1,
positionColumn:n.character+1}}}(t.Selection||(t.Selection={}));var p;!function(e){e.from=function(e){if(e){var t=e.start,n=e.end;return{startLineNumber:t.line+1,startColumn:t.character+1,endLineNumber:n.line+1,endColumn:n.character+1}}},e.to=function(e){if(e){var t=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,o=e.endColumn;return new i.Range(t-1,n-1,r-1,o-1)}}}(p=t.Range||(t.Range={}));!function(e){e.to=function(e){return new i.Position(e.lineNumber-1,e.column-1)},e.from=function(e){return{lineNumber:e.line+1,column:e.character+1}}}(t.Position||(t.Position={}));var f;!function(e){e.from=function(e){switch(e){case i.DiagnosticTag.Unnecessary:return u.MarkerTag.Unnecessary}}}(f=t.DiagnosticTag||(t.DiagnosticTag={}));!function(e){e.from=function(e){return c({},p.from(e.range),{message:e.message,source:e.source,code:String(e.code),severity:v.from(e.severity),relatedInformation:e.relatedInformation&&e.relatedInformation.map(g.from),tags:Array.isArray(e.tags)?e.tags.map(f.from):void 0})}
}(t.Diagnostic||(t.Diagnostic={}));var g;!function(e){e.from=function(e){return c({},p.from(e.location.range),{message:e.message,resource:e.location.uri})},e.to=function(e){return new i.DiagnosticRelatedInformation(new i.Location(e.resource,p.to(e)),e.message)}}(g=t.DiagnosticRelatedInformation||(t.DiagnosticRelatedInformation={}));var v;!function(e){e.from=function(e){switch(e){case i.DiagnosticSeverity.Error:return u.MarkerSeverity.Error;case i.DiagnosticSeverity.Warning:return u.MarkerSeverity.Warning;case i.DiagnosticSeverity.Information:return u.MarkerSeverity.Info;case i.DiagnosticSeverity.Hint:return u.MarkerSeverity.Hint}return u.MarkerSeverity.Error},e.to=function(e){switch(e){case u.MarkerSeverity.Info:return i.DiagnosticSeverity.Information;case u.MarkerSeverity.Warning:return i.DiagnosticSeverity.Warning;case u.MarkerSeverity.Error:return i.DiagnosticSeverity.Error;case u.MarkerSeverity.Hint:return i.DiagnosticSeverity.Hint}return i.DiagnosticSeverity.Error}
}(v=t.DiagnosticSeverity||(t.DiagnosticSeverity={}));!function(e){e.from=function(e){return"number"==typeof e&&e>=i.ViewColumn.One?e-1:e===i.ViewColumn.Beside?d.SIDE_GROUP:d.ACTIVE_GROUP},e.to=function(e){if("number"==typeof e&&e>=0)return e+1}}(t.ViewColumn||(t.ViewColumn={})),t.isDecorationOptionsArr=h;var m;!function(e){e.fromMany=function(t){return t.map(e.from)},e.from=function(e){if(function(e){return e&&"object"==typeof e&&"string"==typeof e.language&&"string"==typeof e.value}(e))return{value:"```"+e.language+"\n"+e.value+"\n```\n"};return l.isMarkdownString(e)?e:"string"==typeof e?{value:e}:{value:""}},e.to=function(e){var t=new l.MarkdownString(e.value);return t.isTrusted=e.isTrusted,t},e.fromStrict=function(t){if(t)return"string"==typeof t?t:e.from(t)}}(m=t.MarkdownString||(t.MarkdownString={})),t.fromRangeOrRangeWithMessage=function(e){return h(e)?e.map(function(e){return{range:p.from(e.range),
hoverMessage:Array.isArray(e.hoverMessage)?m.fromMany(e.hoverMessage):e.hoverMessage&&m.from(e.hoverMessage),renderOptions:e.renderOptions}}):e.map(function(e){return{range:p.from(e)}})},t.TextEdit={from:function(e){return{text:e.newText,eol:C.from(e.newEol),range:p.from(e.range)}},to:function(e){var t=new i.TextEdit(p.to(e.range),e.text);return t.newEol=C.to(e.eol),t}};!function(e){e.from=function(e,n){for(var i={edits:[]},r=0,o=e._allEntries();r<o.length;r++){var s=o[r],a=s[0],c=s[1];if(Array.isArray(c)){var l=n?n.getDocument(a.toString()):void 0;i.edits.push({resource:a,modelVersionId:l&&l.version,edits:c.map(t.TextEdit.from)})}else i.edits.push({oldUri:a,newUri:c,options:s[2]})}return i},e.to=function(e){for(var n=new i.WorkspaceEdit,r=0,s=e.edits;r<s.length;r++){var a=s[r];Array.isArray(a.edits)?n.set(o.default.revive(a.resource),a.edits.map(t.TextEdit.to)):n.renameFile(o.default.revive(a.oldUri),o.default.revive(a.newUri),a.options)}return n}}(t.WorkspaceEdit||(t.WorkspaceEdit={}));var y;!function(e){
var t=Object.create(null);t[i.SymbolKind.File]=n.SymbolKind.File,t[i.SymbolKind.Module]=n.SymbolKind.Module,t[i.SymbolKind.Namespace]=n.SymbolKind.Namespace,t[i.SymbolKind.Package]=n.SymbolKind.Package,t[i.SymbolKind.Class]=n.SymbolKind.Class,t[i.SymbolKind.Method]=n.SymbolKind.Method,t[i.SymbolKind.Property]=n.SymbolKind.Property,t[i.SymbolKind.Field]=n.SymbolKind.Field,t[i.SymbolKind.Constructor]=n.SymbolKind.Constructor,t[i.SymbolKind.Enum]=n.SymbolKind.Enum,t[i.SymbolKind.Interface]=n.SymbolKind.Interface,t[i.SymbolKind.Function]=n.SymbolKind.Function,t[i.SymbolKind.Variable]=n.SymbolKind.Variable,t[i.SymbolKind.Constant]=n.SymbolKind.Constant,t[i.SymbolKind.String]=n.SymbolKind.String,t[i.SymbolKind.Number]=n.SymbolKind.Number,t[i.SymbolKind.Boolean]=n.SymbolKind.Boolean,t[i.SymbolKind.Array]=n.SymbolKind.Array,t[i.SymbolKind.Object]=n.SymbolKind.Object,t[i.SymbolKind.Key]=n.SymbolKind.Key,t[i.SymbolKind.Null]=n.SymbolKind.Null,t[i.SymbolKind.EnumMember]=n.SymbolKind.EnumMember,
t[i.SymbolKind.Struct]=n.SymbolKind.Struct,t[i.SymbolKind.Event]=n.SymbolKind.Event,t[i.SymbolKind.Operator]=n.SymbolKind.Operator,t[i.SymbolKind.TypeParameter]=n.SymbolKind.TypeParameter,e.from=function(e){return t[e]||n.SymbolKind.Property},e.to=function(e){for(var n in t)if(t[n]===e)return Number(n);return i.SymbolKind.Property}}(y=t.SymbolKind||(t.SymbolKind={}));!function(e){e.from=function(e){return{name:e.name,kind:y.from(e.kind),containerName:e.containerName,location:t.location.from(e.location)}},e.to=function(e){return new i.SymbolInformation(e.name,y.to(e.kind),e.containerName,t.location.to(e.location))}}(t.WorkspaceSymbol||(t.WorkspaceSymbol={}));!function(e){function t(e){var n={name:e.name,detail:e.detail,range:p.from(e.range),selectionRange:p.from(e.selectionRange),kind:y.from(e.kind)};return e.children&&(n.children=e.children.map(t)),n}function n(e){var t=new i.DocumentSymbol(e.name,e.detail,y.to(e.kind),p.to(e.range),p.to(e.selectionRange));return e.children&&(t.children=e.children.map(n)),t}
e.from=t,e.to=n}(t.DocumentSymbol||(t.DocumentSymbol={})),t.location={from:function(e){return{range:e.range&&p.from(e.range),uri:e.uri}},to:function(e){return new i.Location(e.uri,p.to(e.range))}};!function(e){e.from=function(e){return{range:p.from(e.range),contents:m.fromMany(e.contents)}},e.to=function(e){return new i.Hover(e.contents.map(m.to),p.to(e.range))}}(t.Hover||(t.Hover={}));!function(e){e.from=function(e){return{range:p.from(e.range),kind:e.kind}},e.to=function(e){return new i.DocumentHighlight(p.to(e.range),e.kind)}}(t.DocumentHighlight||(t.DocumentHighlight={}));var b;!function(e){e.from=function(e){switch(e){case n.SuggestTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case n.SuggestTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;case n.SuggestTriggerKind.Invoke:default:return i.CompletionTriggerKind.Invoke}}}(b=t.CompletionTriggerKind||(t.CompletionTriggerKind={}));!function(e){e.from=function(e){return{
triggerKind:b.from(e.triggerKind),triggerCharacter:e.triggerCharacter}}}(t.CompletionContext||(t.CompletionContext={})),t.CompletionItemKind={from:function(e){switch(e){case i.CompletionItemKind.Method:return"method";case i.CompletionItemKind.Function:return"function";case i.CompletionItemKind.Constructor:return"constructor";case i.CompletionItemKind.Field:return"field";case i.CompletionItemKind.Variable:return"variable";case i.CompletionItemKind.Class:return"class";case i.CompletionItemKind.Interface:return"interface";case i.CompletionItemKind.Struct:return"struct";case i.CompletionItemKind.Module:return"module";case i.CompletionItemKind.Property:return"property";case i.CompletionItemKind.Unit:return"unit";case i.CompletionItemKind.Value:return"value";case i.CompletionItemKind.Constant:return"constant";case i.CompletionItemKind.Enum:return"enum";case i.CompletionItemKind.EnumMember:return"enum-member";case i.CompletionItemKind.Keyword:return"keyword";case i.CompletionItemKind.Snippet:return"snippet"
;case i.CompletionItemKind.Text:return"text";case i.CompletionItemKind.Color:return"color";case i.CompletionItemKind.File:return"file";case i.CompletionItemKind.Reference:return"reference";case i.CompletionItemKind.Folder:return"folder";case i.CompletionItemKind.Event:return"event";case i.CompletionItemKind.Operator:return"operator";case i.CompletionItemKind.TypeParameter:return"type-parameter"}return"property"},to:function(e){return e?i.CompletionItemKind[e.charAt(0).toUpperCase()+e.substr(1)]:i.CompletionItemKind.Property}};!function(e){e.to=function(e,n){var r=new i.CompletionItem(n.label);r.insertText=n.insertText,r.kind=t.CompletionItemKind.to(n.type),r.detail=n.detail,r.documentation=l.isMarkdownString(n.documentation)?m.to(n.documentation):n.documentation,r.sortText=n.sortText,r.filterText=n.filterText;var o="number"==typeof n.overwriteBefore?n.overwriteBefore:0,s=new i.Position(e.line,Math.max(0,e.character-o)),a=e
;return"number"==typeof n.overwriteAfter&&(a=new i.Position(e.line,e.character+n.overwriteAfter)),r.range=new i.Range(s,a),"textmate"===n.snippetType?r.insertText=new i.SnippetString(n.insertText):(r.insertText=n.insertText,r.textEdit=new i.TextEdit(r.range,r.insertText)),r}}(t.Suggest||(t.Suggest={}));var S;!function(e){e.from=function(e){return{label:e.label,documentation:m.fromStrict(e.documentation)}},e.to=function(e){return{label:e.label,documentation:l.isMarkdownString(e.documentation)?m.to(e.documentation):e.documentation}}}(S=t.ParameterInformation||(t.ParameterInformation={}));var _;!function(e){e.from=function(e){return{label:e.label,documentation:m.fromStrict(e.documentation),parameters:e.parameters&&e.parameters.map(S.from)}},e.to=function(e){return{label:e.label,documentation:l.isMarkdownString(e.documentation)?m.to(e.documentation):e.documentation,parameters:e.parameters&&e.parameters.map(S.to)}}}(_=t.SignatureInformation||(t.SignatureInformation={}));!function(e){e.from=function(e){return{
activeSignature:e.activeSignature,activeParameter:e.activeParameter,signatures:e.signatures&&e.signatures.map(_.from)}},e.to=function(e){return{activeSignature:e.activeSignature,activeParameter:e.activeParameter,signatures:e.signatures&&e.signatures.map(_.to)}}}(t.SignatureHelp||(t.SignatureHelp={}));!function(e){e.from=function(e){return{range:p.from(e.range),url:e.target&&e.target.toString()}},e.to=function(e){return new i.DocumentLink(p.to(e.range),e.url&&o.default.parse(e.url))}}(t.DocumentLink||(t.DocumentLink={}));!function(e){e.to=function(e){var n=new i.ColorPresentation(e.label);return e.textEdit&&(n.textEdit=t.TextEdit.to(e.textEdit)),e.additionalTextEdits&&(n.additionalTextEdits=e.additionalTextEdits.map(function(e){return t.TextEdit.to(e)})),n},e.from=function(e){return{label:e.label,textEdit:e.textEdit?t.TextEdit.from(e.textEdit):void 0,additionalTextEdits:e.additionalTextEdits?e.additionalTextEdits.map(function(e){return t.TextEdit.from(e)}):void 0}}
}(t.ColorPresentation||(t.ColorPresentation={}));!function(e){e.to=function(e){return new i.Color(e[0],e[1],e[2],e[3])},e.from=function(e){return[e.red,e.green,e.blue,e.alpha]}}(t.Color||(t.Color={}));!function(e){e.to=function(e){switch(e){case a.SaveReason.AUTO:return i.TextDocumentSaveReason.AfterDelay;case a.SaveReason.EXPLICIT:return i.TextDocumentSaveReason.Manual;case a.SaveReason.FOCUS_CHANGE:case a.SaveReason.WINDOW_CHANGE:return i.TextDocumentSaveReason.FocusOut}}}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={}));var C;!function(e){e.from=function(e){return e===i.EndOfLine.CRLF?r.EndOfLineSequence.CRLF:e===i.EndOfLine.LF?r.EndOfLineSequence.LF:void 0},e.to=function(e){return e===r.EndOfLineSequence.CRLF?i.EndOfLine.CRLF:e===r.EndOfLineSequence.LF?i.EndOfLine.LF:void 0}}(C=t.EndOfLine||(t.EndOfLine={}));!function(e){e.from=function(e){switch(e){case i.ProgressLocation.SourceControl:return s.ProgressLocation.Scm;case i.ProgressLocation.Window:return s.ProgressLocation.Window
;case i.ProgressLocation.Notification:return s.ProgressLocation.Notification}}}(t.ProgressLocation||(t.ProgressLocation={}));!function(e){e.from=function(e){var t={start:e.start+1,end:e.end+1};return e.kind&&(t.kind=E.from(e.kind)),t}}(t.FoldingRange||(t.FoldingRange={}));var E;!function(e){e.from=function(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return n.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return n.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return n.FoldingRangeKind.Region}}}(E=t.FoldingRangeKind||(t.FoldingRangeKind={}));!function(e){e.from=function(e){if(e)return{pinned:"boolean"==typeof e.preview?!e.preview:void 0,preserveFocus:e.preserveFocus,selection:"object"==typeof e.selection?p.from(e.selection):void 0}}}(t.TextEditorOptions||(t.TextEditorOptions={}));var w;!function(e){e.from=function(e){return"string"==typeof e?e:function(t){var n=e;return n&&"string"==typeof n.base&&"string"==typeof n.pattern}()?new i.RelativePattern(e.base,e.pattern):e}
}(w=t.GlobPattern||(t.GlobPattern={}));!function(e){function t(e){return e?Array.isArray(e)?e.map(t):"string"==typeof e?e:{language:e.language,scheme:e.scheme,pattern:w.from(e.pattern),exclusive:e.exclusive}:void 0}e.from=t}(t.LanguageSelector||(t.LanguageSelector={}))}),define(e[1414],t([1,0,7,44,233,18,61,114,445,54,67,493,10]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n){this._registrations=Object.create(null),this._proxy=e.getProxy(s.ExtHostContext.ExtHostLanguageFeatures),this._heapService=t,this._modeService=n}t=e,e.prototype.dispose=function(){for(var e in this._registrations)this._registrations[e].dispose()},e.prototype.$unregister=function(e){var t=this._registrations[e];t&&(t.dispose(),delete this._registrations[e])},e._reviveLocationDto=function(e){return e?Array.isArray(e)?(e.forEach(function(e){return t._reviveLocationDto(e)}),e):(e.uri=f.default.revive(e.uri),e):e},e._reviveDefinitionLinkDto=function(e){
return e?Array.isArray(e)?(e.forEach(function(e){return t._reviveDefinitionLinkDto(e)}),e):(e.uri=f.default.revive(e.uri),e):e},e._reviveWorkspaceSymbolDto=function(e){return e?Array.isArray(e)?(e.forEach(t._reviveWorkspaceSymbolDto),e):(e.location=t._reviveLocationDto(e.location),e):e},e._reviveCodeActionDto=function(e){return e&&e.forEach(function(e){return s.reviveWorkspaceEditDto(e.edit)}),e},e.prototype.$registerOutlineSupport=function(e,t,n){var r=this;this._registrations[e]=i.DocumentSymbolProviderRegistry.register(p.LanguageSelector.from(t),{displayName:n,provideDocumentSymbols:function(t,n){return o.wireCancellationToken(n,r._proxy.$provideDocumentSymbols(e,t.uri))}})},e.prototype.$registerCodeLensSupport=function(e,t,r){var s=this,a={provideCodeLenses:function(t,n){return s._heapService.trackRecursive(o.wireCancellationToken(n,s._proxy.$provideCodeLenses(e,t.uri)))},resolveCodeLens:function(t,n,i){return s._heapService.trackRecursive(o.wireCancellationToken(i,s._proxy.$resolveCodeLens(e,t.uri,n)))}}
;if("number"==typeof r){var c=new n.Emitter;this._registrations[r]=c,a.onDidChange=c.event}this._registrations[e]=i.CodeLensProviderRegistry.register(p.LanguageSelector.from(t),a)},e.prototype.$emitCodeLensEvent=function(e,t){var i=this._registrations[e];i instanceof n.Emitter&&i.fire(t)},e.prototype.$registerDeclaractionSupport=function(e,n){var r=this;this._registrations[e]=i.DefinitionProviderRegistry.register(p.LanguageSelector.from(n),{provideDefinition:function(n,i,s){return o.wireCancellationToken(s,r._proxy.$provideDefinition(e,n.uri,i)).then(t._reviveDefinitionLinkDto)}})},e.prototype.$registerImplementationSupport=function(e,n){var r=this;this._registrations[e]=i.ImplementationProviderRegistry.register(p.LanguageSelector.from(n),{provideImplementation:function(n,i,s){return o.wireCancellationToken(s,r._proxy.$provideImplementation(e,n.uri,i)).then(t._reviveLocationDto)}})},e.prototype.$registerTypeDefinitionSupport=function(e,n){var r=this
;this._registrations[e]=i.TypeDefinitionProviderRegistry.register(p.LanguageSelector.from(n),{provideTypeDefinition:function(n,i,s){return o.wireCancellationToken(s,r._proxy.$provideTypeDefinition(e,n.uri,i)).then(t._reviveLocationDto)}})},e.prototype.$registerHoverProvider=function(e,t){var n=this;this._registrations[e]=i.HoverProviderRegistry.register(p.LanguageSelector.from(t),{provideHover:function(t,i,r){return o.wireCancellationToken(r,n._proxy.$provideHover(e,t.uri,i))}})},e.prototype.$registerDocumentHighlightProvider=function(e,t){var n=this;this._registrations[e]=i.DocumentHighlightProviderRegistry.register(p.LanguageSelector.from(t),{provideDocumentHighlights:function(t,i,r){return o.wireCancellationToken(r,n._proxy.$provideDocumentHighlights(e,t.uri,i))}})},e.prototype.$registerReferenceSupport=function(e,n){var r=this;this._registrations[e]=i.ReferenceProviderRegistry.register(p.LanguageSelector.from(n),{provideReferences:function(n,i,s,a){
return o.wireCancellationToken(a,r._proxy.$provideReferences(e,n.uri,i,s)).then(t._reviveLocationDto)}})},e.prototype.$registerQuickFixSupport=function(e,n,r){var s=this;this._registrations[e]=i.CodeActionProviderRegistry.register(p.LanguageSelector.from(n),{provideCodeActions:function(n,i,r,a){return s._heapService.trackRecursive(o.wireCancellationToken(a,s._proxy.$provideCodeActions(e,n.uri,i,r))).then(t._reviveCodeActionDto)},providedCodeActionKinds:r})},e.prototype.$registerDocumentFormattingSupport=function(e,t){var n=this;this._registrations[e]=i.DocumentFormattingEditProviderRegistry.register(p.LanguageSelector.from(t),{provideDocumentFormattingEdits:function(t,i,r){return o.wireCancellationToken(r,n._proxy.$provideDocumentFormattingEdits(e,t.uri,i))}})},e.prototype.$registerRangeFormattingSupport=function(e,t){var n=this;this._registrations[e]=i.DocumentRangeFormattingEditProviderRegistry.register(p.LanguageSelector.from(t),{provideDocumentRangeFormattingEdits:function(t,i,r,s){
return o.wireCancellationToken(s,n._proxy.$provideDocumentRangeFormattingEdits(e,t.uri,i,r))}})},e.prototype.$registerOnTypeFormattingSupport=function(e,t,n){var r=this;this._registrations[e]=i.OnTypeFormattingEditProviderRegistry.register(p.LanguageSelector.from(t),{autoFormatTriggerCharacters:n,provideOnTypeFormattingEdits:function(t,n,i,s,a){return o.wireCancellationToken(a,r._proxy.$provideOnTypeFormattingEdits(e,t.uri,n,i,s))}})},e.prototype.$registerNavigateTypeSupport=function(e){var n,i=this;this._registrations[e]=r.WorkspaceSymbolProviderRegistry.register({provideWorkspaceSymbols:function(r){return i._proxy.$provideWorkspaceSymbols(e,r).then(function(r){return void 0!==n&&i._proxy.$releaseWorkspaceSymbols(e,n),n=r._id,t._reviveWorkspaceSymbolDto(r.symbols)})},resolveWorkspaceSymbol:function(n){return i._proxy.$resolveWorkspaceSymbol(e,n).then(function(e){return t._reviveWorkspaceSymbolDto(e)})}})},e.prototype.$registerRenameSupport=function(e,t,n){var r=this
;this._registrations[e]=i.RenameProviderRegistry.register(p.LanguageSelector.from(t),{provideRenameEdits:function(t,n,i,a){return o.wireCancellationToken(a,r._proxy.$provideRenameEdits(e,t.uri,n,i)).then(s.reviveWorkspaceEditDto)},resolveRenameLocation:n?function(t,n,i){return o.wireCancellationToken(i,r._proxy.$resolveRenameLocation(e,t.uri,n))}:void 0})},e.prototype.$registerSuggestSupport=function(e,t,n,r){var s=this;this._registrations[e]=i.SuggestRegistry.register(p.LanguageSelector.from(t),{triggerCharacters:n,provideCompletionItems:function(t,n,i,r){return o.wireCancellationToken(r,s._proxy.$provideCompletionItems(e,t.uri,n,i)).then(function(t){return t?{suggestions:t.suggestions,incomplete:t.incomplete,dispose:function(){return s._proxy.$releaseCompletionItems(e,t._id)}}:t})},resolveCompletionItem:r?function(t,n,i,r){return o.wireCancellationToken(r,s._proxy.$resolveCompletionItem(e,t.uri,n,i))}:void 0})},e.prototype.$registerSignatureHelpProvider=function(e,t,n){var r=this
;this._registrations[e]=i.SignatureHelpProviderRegistry.register(p.LanguageSelector.from(t),{signatureHelpTriggerCharacters:n,provideSignatureHelp:function(t,n,i){return o.wireCancellationToken(i,r._proxy.$provideSignatureHelp(e,t.uri,n))}})},e.prototype.$registerDocumentLinkProvider=function(e,t){var n=this;this._registrations[e]=i.LinkProviderRegistry.register(p.LanguageSelector.from(t),{provideLinks:function(t,i){return n._heapService.trackRecursive(o.wireCancellationToken(i,n._proxy.$provideDocumentLinks(e,t.uri)))},resolveLink:function(t,i){return o.wireCancellationToken(i,n._proxy.$resolveDocumentLink(e,t))}})},e.prototype.$registerDocumentColorProvider=function(e,t){var n=this._proxy;this._registrations[e]=i.ColorProviderRegistry.register(p.LanguageSelector.from(t),{provideDocumentColors:function(t,i){return o.wireCancellationToken(i,n.$provideDocumentColors(e,t.uri)).then(function(e){return e.map(function(e){var t=e.color;return{color:{red:t[0],green:t[1],blue:t[2],alpha:t[3]},range:e.range}})})},
provideColorPresentations:function(t,i,r){return o.wireCancellationToken(r,n.$provideColorPresentations(e,t.uri,{color:[i.color.red,i.color.green,i.color.blue,i.color.alpha],range:i.range}))}})},e.prototype.$registerFoldingRangeProvider=function(e,t){var n=this._proxy;this._registrations[e]=i.FoldingRangeProviderRegistry.register(p.LanguageSelector.from(t),{provideFoldingRanges:function(t,i,r){return o.wireCancellationToken(r,n.$provideFoldingRanges(e,t.uri,i))}})},e._reviveRegExp=function(e){if(void 0!==e)return null===e?null:new RegExp(e.pattern,e.flags)},e._reviveIndentationRule=function(e){if(void 0!==e)return null===e?null:{decreaseIndentPattern:t._reviveRegExp(e.decreaseIndentPattern),increaseIndentPattern:t._reviveRegExp(e.increaseIndentPattern),indentNextLinePattern:t._reviveRegExp(e.indentNextLinePattern),unIndentedLinePattern:t._reviveRegExp(e.unIndentedLinePattern)}},e._reviveOnEnterRule=function(e){return{beforeText:t._reviveRegExp(e.beforeText),afterText:t._reviveRegExp(e.afterText),
action:e.action}},e._reviveOnEnterRules=function(e){if(void 0!==e)return null===e?null:e.map(t._reviveOnEnterRule)},e.prototype.$setLanguageConfiguration=function(e,n,i){var r={comments:i.comments,brackets:i.brackets,wordPattern:t._reviveRegExp(i.wordPattern),indentationRules:t._reviveIndentationRule(i.indentationRules),onEnterRules:t._reviveOnEnterRules(i.onEnterRules),autoClosingPairs:null,surroundingPairs:null,__electricCharacterSupport:null};i.__characterPairSupport&&(r.autoClosingPairs=i.__characterPairSupport.autoClosingPairs),i.__electricCharacterSupport&&i.__electricCharacterSupport.docComment&&(r.__electricCharacterSupport={docComment:{open:i.__electricCharacterSupport.docComment.open,close:i.__electricCharacterSupport.docComment.close}});var o=this._modeService.getLanguageIdentifier(n);o&&(this._registrations[e]=c.LanguageConfigurationRegistry.register(o,r))};var t;return e=t=a([h.extHostNamedCustomer(s.MainContext.MainThreadLanguageFeatures),l(1,u.IHeapService),l(2,d.IModeService)],e)}()
;t.MainThreadLanguageFeatures=g}),define(e[1415],t([1,0,493,29]),function(e,t,n,i){"use strict";function r(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(void 0,[t.get(i.ICommandService)].concat(n))}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.execute=function(e,t,i,r,o){return e.executeCommand("_workbench.previewHtml",t,"number"==typeof i&&n.ViewColumn.from(i),r,o)},e.ID="vscode.previewHtml",e}();t.PreviewHTMLAPICommand=o,i.CommandsRegistry.registerCommand(o.ID,r(o.execute));var s=function(){function e(){}return e.execute=function(e,t,n){return t?e.executeCommand("_files.windowOpen",[t.fsPath],n):e.executeCommand("_files.pickFolderAndOpen",n)},e.ID="vscode.openFolder",e}();t.OpenFolderAPICommand=s,i.CommandsRegistry.registerCommand(s.ID,r(s.execute));var a=function(){function e(){}return e.execute=function(e,t,i,r,o){
return e.executeCommand("_workbench.diff",[t,i,r,void 0,n.TextEditorOptions.from(o),o?n.ViewColumn.from(o.viewColumn):void 0])},e.ID="vscode.diff",e}();t.DiffAPICommand=a,i.CommandsRegistry.registerCommand(a.ID,r(a.execute));var c=function(){function e(){}return e.execute=function(e,t,i){var r,o;return i&&("number"==typeof i?o=n.ViewColumn.from(i):(r=n.TextEditorOptions.from(i),o=n.ViewColumn.from(i.viewColumn))),e.executeCommand("_workbench.open",[t,r,o])},e.ID="vscode.open",e}();t.OpenAPICommand=c,i.CommandsRegistry.registerCommand(c.ID,r(c.execute));var l=function(){function e(){}return e.execute=function(e,t){return e.executeCommand("_workbench.removeFromRecentlyOpened",t)},e.ID="vscode.removeFromRecentlyOpened",e}();t.RemoveFromRecentlyOpenedAPICommand=l,i.CommandsRegistry.registerCommand(l.ID,r(l.execute));var u=function(){function e(){}return e.execute=function(e,t){return e.executeCommand("layoutEditorGroups",t)},e.ID="vscode.setEditorLayout",e}();t.SetEditorLayoutAPICommand=u,
i.CommandsRegistry.registerCommand(u.ID,r(u.execute))}),define(e[290],t([1,0,1523,24,30,9,8,157,124,34,6,28,12,48,127,45,53,21]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _="textEditorViewState",C=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,n,s)||this;return u._instantiationService=i,u._configurationService=o,u.themeService=s,u._textFileService=a,u.editorService=c,u.editorGroupService=l,u.editorMemento=u.getEditorMemento(r,l,_,100),u.toUnbind.push(u.configurationService.onDidChangeConfiguration(function(e){return u.handleConfigurationChangeEvent(u.configurationService.getValue(u.getResource()))})),u}return n(t,e),Object.defineProperty(t.prototype,"instantiationService",{get:function(){return this._instantiationService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"configurationService",{get:function(){return this._configurationService},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"textFileService",{get:function(){return this._textFileService},enumerable:!0,configurable:!0}),t.prototype.handleConfigurationChangeEvent=function(e){this.isVisible()?this.updateEditorConfiguration(e):this.hasPendingConfigurationChange=!0},t.prototype.consumePendingConfigurationChangeEvent=function(){this.hasPendingConfigurationChange&&(this.updateEditorConfiguration(),this.hasPendingConfigurationChange=!1)},t.prototype.computeConfiguration=function(e){var t=o.isObject(e.editor)?r.deepClone(e.editor):Object.create(null);return r.assign(t,this.getConfigurationOverrides()),t.ariaLabel=this.computeAriaLabel(),t},t.prototype.computeAriaLabel=function(){var e=this.getAriaLabel();return e&&this.group&&(e=i.localize(0,null,e,this.group.label)),e},t.prototype.getConfigurationOverrides=function(){var e={};return r.assign(e,{overviewRulerLanes:3,lineNumbersMinChars:3,fixedOverflowWidgets:!0}),e},t.prototype.createEditor=function(e){var t=this;this._editorContainer=e,
this.editorControl=this.createEditorControl(e,this.computeConfiguration(this.configurationService.getValue(this.getResource())));var n=y.getCodeEditor(this.editorControl);n&&(this.toUnbind.push(n.onDidChangeModelLanguage(function(e){return t.updateEditorConfiguration()})),this.toUnbind.push(n.onDidChangeModel(function(e){return t.updateEditorConfiguration()}))),y.isCodeEditor(this.editorControl)?this.toUnbind.push(this.editorControl.onDidBlurEditorWidget(function(){return t.onEditorFocusLost()})):y.isDiffEditor(this.editorControl)&&(this.toUnbind.push(this.editorControl.getOriginalEditor().onDidBlurEditorWidget(function(){return t.onEditorFocusLost()})),this.toUnbind.push(this.editorControl.getModifiedEditor().onDidBlurEditorWidget(function(){return t.onEditorFocusLost()}))),this.toUnbind.push(this.editorService.onDidActiveEditorChange(function(){return t.onEditorFocusLost()})),this.toUnbind.push(c.addDisposableListener(window,c.EventType.BLUR,function(){return t.onWindowFocusLost()}))},
t.prototype.onEditorFocusLost=function(){this.maybeTriggerSaveAll(v.SaveReason.FOCUS_CHANGE)},t.prototype.onWindowFocusLost=function(){this.maybeTriggerSaveAll(v.SaveReason.WINDOW_CHANGE)},t.prototype.maybeTriggerSaveAll=function(e){var t=this.textFileService.getAutoSaveMode();(e===v.SaveReason.WINDOW_CHANGE&&(t===v.AutoSaveMode.ON_FOCUS_CHANGE||t===v.AutoSaveMode.ON_WINDOW_CHANGE)||e===v.SaveReason.FOCUS_CHANGE&&t===v.AutoSaveMode.ON_FOCUS_CHANGE)&&this.textFileService.isDirty()&&this.textFileService.saveAll(void 0,{reason:e}).done(null,s.onUnexpectedError)},t.prototype.createEditorControl=function(e,t){return this.instantiationService.createInstance(u.CodeEditorWidget,e,t,{})},t.prototype.setInput=function(t,n,i){var r=this;return e.prototype.setInput.call(this,t,n,i).then(function(){r.updateEditorConfiguration(),r._editorContainer.setAttribute("aria-label",r.computeAriaLabel())})},t.prototype.setEditorVisible=function(t,n){t?(this.consumePendingConfigurationChangeEvent(),
this.editorControl.onVisible()):this.editorControl.onHide(),e.prototype.setEditorVisible.call(this,t,n)},t.prototype.focus=function(){this.editorControl.focus()},t.prototype.layout=function(e){this.editorControl.layout(e)},t.prototype.getControl=function(){return this.editorControl},t.prototype.saveTextEditorViewState=function(e){var t=this.retrieveTextEditorViewState(e);t&&this.editorMemento.saveState(this.group,e,t)},t.prototype.retrieveTextEditorViewState=function(e){var t=this.getControl(),n=t.getModel();if(!n)return null;var i=n.uri;return i?i.toString()!==e.toString()?null:t.saveViewState():null},t.prototype.clearTextEditorViewState=function(e){var t=this;e.forEach(function(e){t.editorMemento.clearState(e)})},t.prototype.loadTextEditorViewState=function(e){return this.editorMemento.loadState(this.group,e)},t.prototype.updateEditorConfiguration=function(e){if(void 0===e&&(e=this.configurationService.getValue(this.getResource())),this.editorControl){var t=this.computeConfiguration(e),n=t
;this.lastAppliedEditorOptions&&(n=r.distinct(this.lastAppliedEditorOptions,n)),Object.keys(n).length>0&&(this.lastAppliedEditorOptions=t,this.editorControl.updateOptions(n))}},t.prototype.getResource=function(){var e=y.getCodeEditor(this.editorControl);if(e){var t=e.getModel();if(t)return t.uri}return this.input?this.input.getResource():null},t.prototype.dispose=function(){this.lastAppliedEditorOptions=void 0,this.editorControl.dispose(),e.prototype.dispose.call(this)},t=a([l(1,f.ITelemetryService),l(2,p.IInstantiationService),l(3,h.IStorageService),l(4,m.ITextResourceConfigurationService),l(5,g.IThemeService),l(6,v.ITextFileService),l(7,S.IEditorService),l(8,b.IEditorGroupsService)],t)}(d.BaseEditor);t.BaseTextEditor=C}),define(e[495],t([1,0,4,1518,24,23,30,290,40,161,211,496,341,467,33,28,34,127,6,12,48,17,5,16,10,7,53,21,124,835]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var R=function(e){
function t(n,i,r,o,s,a,c,l,u){var d=e.call(this,t.ID,n,i,r,o,c,u,a,l)||this;return d._actualConfigurationService=s,d.diffNavigatorDisposables=[],d.toUnbind.push(d._actualConfigurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("diffEditor.ignoreTrimWhitespace")&&d.updateIgnoreTrimWhitespaceAction()})),d}return n(t,e),t.prototype.getEditorMemento=function(e,t,n,i){return void 0===i&&(i=10),new L.EditorMemento(this.getId(),n,Object.create(null),i,t)},t.prototype.getTitle=function(){return this.input?this.input.getName():r.localize(0,null)},t.prototype.createEditorControl=function(e,t){return this.nextDiffAction=new O(this,!0),this.previousDiffAction=new O(this,!1),this.toggleIgnoreTrimWhitespaceAction=new M(this._actualConfigurationService),this.updateIgnoreTrimWhitespaceAction(),this.instantiationService.createInstance(g.DiffEditorWidget,e,t)},t.prototype.setInput=function(t,n,r){var o=this;return this.diffNavigatorDisposables=I.dispose(this.diffNavigatorDisposables),
this.saveTextDiffEditorViewState(this.input),e.prototype.setInput.call(this,t,n,r).then(function(){return t.resolve(!0).then(function(e){if(!r.isCancellationRequested&&(e instanceof v.TextDiffEditorModel||!o.openAsBinary(t,n))){var i=o.getControl(),s=e;i.setModel(s.textDiffEditorModel);var a=!1;n&&c.isFunction(n.apply)&&(a=n.apply(i,1));var l=!1;a||(l=o.restoreTextDiffEditorViewState(t)),o.diffNavigator=new f.DiffNavigator(i,{alwaysRevealFirst:!a&&!l}),o.diffNavigatorDisposables.push(o.diffNavigator),o.diffNavigatorDisposables.push(o.diffNavigator.onDidUpdate(function(){o.nextDiffAction.updateEnablement(),o.previousDiffAction.updateEnablement()})),o.updateIgnoreTrimWhitespaceAction(),i.updateOptions({readOnly:s.isReadonly()})}},function(e){return o.isFileBinaryError(e)&&o.openAsBinary(t,n)?null:i.TPromise.wrapError(e)})})},t.prototype.setOptions=function(e){var t=e;t&&c.isFunction(t.apply)&&t.apply(this.getControl(),0)},t.prototype.restoreTextDiffEditorViewState=function(e){if(e instanceof p.DiffEditorInput){
var t=this.toDiffEditorViewStateResource(e);if(t){var n=this.loadTextEditorViewState(t);if(n)return this.getControl().restoreViewState(n),!0}}return!1},t.prototype.updateIgnoreTrimWhitespaceAction=function(){var e=this.configurationService.getValue(this.getResource(),"diffEditor.ignoreTrimWhitespace");this.toggleIgnoreTrimWhitespaceAction&&this.toggleIgnoreTrimWhitespaceAction.updateClassName(e)},t.prototype.openAsBinary=function(e,t){if(e instanceof p.DiffEditorInput){var n=e.originalInput,i=e.modifiedInput,r=new p.DiffEditorInput(e.getName(),e.getDescription(),n,i,!0),o=T.Registry.as(d.Extensions.EditorInputFactories).getFileInputFactory();return o.isFileInput(n)&&n.setForceOpenAsBinary(),o.isFileInput(i)&&i.setForceOpenAsBinary(),this.editorService.openEditor(r,t,this.group),!0}return!1},t.prototype.computeConfiguration=function(t){var n=e.prototype.computeConfiguration.call(this,t);return c.isObject(t.diffEditor)&&o.mixin(n,t.diffEditor),n},t.prototype.getConfigurationOverrides=function(){
var t=e.prototype.getConfigurationOverrides.call(this);return t.readOnly=this.isReadOnly(),t},t.prototype.getAriaLabel=function(){var e=this.input&&this.input.getName();return this.isReadOnly()?e?r.localize(1,null,e):r.localize(2,null):e?r.localize(3,null,e):r.localize(4,null)},t.prototype.isReadOnly=function(){var e=this.input;if(e instanceof p.DiffEditorInput){return e.modifiedInput instanceof h.ResourceEditorInput}return!1},t.prototype.isFileBinaryError=function(e){var t=this;if(c.isArray(e)){return e.some(function(e){return t.isFileBinaryError(e)})}return e.fileOperationResult===m.FileOperationResult.FILE_IS_BINARY},t.prototype.clearInput=function(){this.diffNavigatorDisposables=I.dispose(this.diffNavigatorDisposables),this.saveTextDiffEditorViewState(this.input),this.getControl().setModel(null),e.prototype.clearInput.call(this)},t.prototype.getDiffNavigator=function(){return this.diffNavigator},t.prototype.getActions=function(){
return[this.toggleIgnoreTrimWhitespaceAction,this.previousDiffAction,this.nextDiffAction]},t.prototype.getControl=function(){return e.prototype.getControl.call(this)},t.prototype.loadTextEditorViewState=function(t){return e.prototype.loadTextEditorViewState.call(this,t)},t.prototype.saveTextDiffEditorViewState=function(t){var n=this;if(t instanceof p.DiffEditorInput){var i=this.toDiffEditorViewStateResource(t);i&&(t.isDisposed()?e.prototype.clearTextEditorViewState.call(this,[i]):(e.prototype.saveTextEditorViewState.call(this,i),k.once(t.onDispose)(function(){e.prototype.clearTextEditorViewState.call(n,[i])})))}},t.prototype.retrieveTextEditorViewState=function(e){return this.retrieveTextDiffEditorViewState(e)},t.prototype.retrieveTextDiffEditorViewState=function(e){var t=this.getControl(),n=t.getModel();if(!n||!n.modified||!n.original)return null;var i=this.toDiffEditorViewStateResource(n);return i?i.toString()!==e.toString()?null:t.saveViewState():null},t.prototype.toDiffEditorViewStateResource=function(e){
var t,n;return e instanceof p.DiffEditorInput?(t=e.originalInput.getResource(),n=e.modifiedInput.getResource()):(t=e.original.uri,n=e.modified.uri),t&&n?x.default.from({scheme:"diff",path:""+btoa(t.toString())+btoa(n.toString())}):null},t.prototype.dispose=function(){this.diffNavigatorDisposables=I.dispose(this.diffNavigatorDisposables),e.prototype.dispose.call(this)},t.ID=d.TEXT_DIFF_EDITOR_ID,t=a([l(0,y.ITelemetryService),l(1,_.IInstantiationService),l(2,b.IStorageService),l(3,S.ITextResourceConfigurationService),l(4,w.IConfigurationService),l(5,A.IEditorService),l(6,C.IThemeService),l(7,D.IEditorGroupsService),l(8,E.ITextFileService)],t)}(u.BaseTextEditor);t.TextDiffEditor=R;var O=function(e){function t(n,i){var o=e.call(this,i?t.ID_NEXT:t.ID_PREV)||this;return o.editor=n,o.next=i,o.label=o.next?r.localize(5,null):r.localize(6,null),o.class=o.next?"textdiff-editor-action next":"textdiff-editor-action previous",o.enabled=!1,o}return n(t,e),t.prototype.run=function(){
return this.next?this.editor.getDiffNavigator().next():this.editor.getDiffNavigator().previous(),null},t.prototype.updateEnablement=function(){this.enabled=this.editor.getDiffNavigator().canNavigate()},t.ID_NEXT="workbench.action.compareEditor.nextChange",t.ID_PREV="workbench.action.compareEditor.previousChange",t}(s.Action),M=function(e){function t(n){var i=e.call(this,t.ID)||this;return i._configurationService=n,i.label=r.localize(7,null),i}return n(t,e),t.prototype.updateClassName=function(e){this._isChecked=e,this.class="textdiff-editor-action toggleIgnoreTrimWhitespace"+(this._isChecked?" is-checked":"")},t.prototype.run=function(){return this._configurationService.updateValue("diffEditor.ignoreTrimWhitespace",!this._isChecked),null},t.ID="workbench.action.compareEditor.toggleIgnoreTrimWhitespace",t=a([l(0,w.IConfigurationService)],t)}(s.Action)}),define(e[187],t([1,0,1505,30,52,40,21,55,495,73,4,10,64,58,169,20,53,15,17,29]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b){"use strict";function S(){
r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.MOVE_ACTIVE_EDITOR_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:a.EditorContextKeys.editorTextFocus,primary:null,handler:function(e,t){return function(e,t){void 0===e&&(e=Object.create(null));e.to=e.to||"right",e.by=e.by||"tab",e.value="number"==typeof e.value?e.value:1;var n=t.get(s.IEditorService).activeControl;if(n)switch(e.by){case"tab":return function(e,t,n){var i=t.group,r=i.getIndexOfEditor(t.input);switch(e.to){case"first":r=0;break;case"last":r=i.count-1;break;case"left":r-=e.value;break;case"right":r+=e.value;break;case"center":r=Math.round(i.count/2)-1;break;case"position":r=e.value-1}r=r<0?0:r>=i.count?i.count-1:r,i.moveEditor(t.input,i,{index:r})}(e,n);case"group":return function(e,t,n){var i,r=n.get(v.IEditorGroupsService),o=n.get(y.IConfigurationService),s=t.group;switch(e.to){case"left":(i=r.findGroup({direction:v.GroupDirection.LEFT},s))||(i=r.addGroup(s,v.GroupDirection.LEFT));break;case"right":
(i=r.findGroup({direction:v.GroupDirection.RIGHT},s))||(i=r.addGroup(s,v.GroupDirection.RIGHT));break;case"up":(i=r.findGroup({direction:v.GroupDirection.UP},s))||(i=r.addGroup(s,v.GroupDirection.UP));break;case"down":(i=r.findGroup({direction:v.GroupDirection.DOWN},s))||(i=r.addGroup(s,v.GroupDirection.DOWN));break;case"first":i=r.findGroup({location:v.GroupLocation.FIRST},s);break;case"last":i=r.findGroup({location:v.GroupLocation.LAST},s);break;case"previous":i=r.findGroup({location:v.GroupLocation.PREVIOUS},s);break;case"next":(i=r.findGroup({location:v.GroupLocation.NEXT},s))||(i=r.addGroup(s,v.preferredSideBySideGroupDirection(o)));break;case"center":i=r.getGroups(v.GroupsOrder.GRID_APPEARANCE)[r.count/2-1];break;case"position":i=r.getGroups(v.GroupsOrder.GRID_APPEARANCE)[e.value-1]}i&&(s.moveEditor(t.input,i),i.focus())}(e,n,t)}}(t,e)},description:{description:n.localize(0,null),args:[{name:n.localize(1,null),description:n.localize(2,null),constraint:x}]}})}function _(e,t,n){var i
;i=n&&"number"==typeof n.groupId?e.getGroup(n.groupId):e.activeGroup;var r,o=e.addGroup(i,t);(r=n&&"number"==typeof n.editorIndex?i.getEditor(n.editorIndex):i.activeEditor)&&r.supportsSplitEditor()&&i.copyEditor(r,o),o.focus()}function C(e,t){return d.default.isUri(e)?t:e&&"number"==typeof e.groupId?e:t&&"number"==typeof t.groupId?t:void 0}function E(e,t){var n=t&&"number"==typeof t.groupId?e.getGroup(t.groupId):void 0,i=n&&"number"==typeof t.editorIndex?n.getEditor(t.editorIndex):void 0,r=n?n.activeControl:void 0;return n||(i=(n=e.activeGroup).activeEditor,r=n.activeControl),{group:n,editor:i,control:r}}function w(e,t,n){var i=t.lastFocusedList;if(i instanceof f.List&&i.isDOMFocused()){var r=function(e){return I(e)?{groupId:e.id,editorIndex:void 0}:{groupId:e.groupId,editorIndex:n.getGroup(e.groupId).getIndexOfEditor(e.editor)}},o=function(e){return I(e)||function(e){var t=e;return t&&"number"==typeof t.groupId}(e)},s=i.getFocusedElements().filter(o),a=e||(s.length?s.map(r)[0]:void 0);if(a){
var c=i.getSelectedElements().filter(o);return c&&c.some(function(e){return I(e)?e.id===a.groupId:e.groupId===a.groupId&&n.getGroup(e.groupId).getIndexOfEditor(e.editor)===a.editorIndex})?c.map(r):[a]}}return e?[e]:[]}function I(e){var t=e;return t&&"number"==typeof t.id&&Array.isArray(t.editors)}function T(){S(),b.CommandsRegistry.registerCommand(t.LAYOUT_EDITOR_GROUPS_COMMAND_ID,function(e,t){t&&"object"==typeof t&&e.get(v.IEditorGroupsService).applyLayout(t)}),function(){function e(e,t){var n=e.get(s.IEditorService),i=[n.activeControl].concat(n.visibleControls).filter(function(e){return e instanceof c.TextDiffEditor});i.length>0&&(t?i[0].getDiffNavigator().next():i[0].getDiffNavigator().previous())}r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.compareEditor.nextChange",weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:o.TextCompareEditorVisibleContext,primary:null,handler:function(t){return e(t,!0)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({
id:"workbench.action.compareEditor.previousChange",weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:o.TextCompareEditorVisibleContext,primary:null,handler:function(t){return e(t,!1)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.TOGGLE_DIFF_INLINE_MODE,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,handler:function(e,t,n){var i=E(e.get(v.IEditorGroupsService),C(t,n)).control;if(i instanceof c.TextDiffEditor){var r=i.getControl(),o=!r.renderSideBySide;r.updateOptions({renderSideBySide:o})}}})}(),function(){function e(e){switch(e){case 0:return 21;case 1:return 22;case 2:return 23;case 3:return 24;case 4:return 25;case 5:return 26;case 6:return 27;case 7:return 28;case 8:return 29;case 9:return 30}}for(var t=function(t){var n=t,i=t+1;r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.openEditorAtIndex"+i,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:512|e(i),mac:{primary:256|e(i)},
handler:function(e){var t=e.get(s.IEditorService),i=t.activeControl;if(i){var r=i.group.getEditor(n);if(r)return t.openEditor(r).then(function(){})}}})},n=0;n<9;n++)t(n)}(),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLOSE_SAVED_EDITORS_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:l.KeyChord(2089,51),handler:function(e,t,n){var i=e.get(v.IEditorGroupsService),r=w(C(t,n),e.get(p.IListService),i),o=i.activeGroup;return 0===r.length&&r.push({groupId:o.id}),u.TPromise.join(g.distinct(r.map(function(e){return e.groupId})).map(function(e){return i.getGroup(e).closeEditors({savedOnly:!0})}))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:l.KeyChord(2089,53),handler:function(e,t,n){var i=e.get(v.IEditorGroupsService),r=w(C(t,n),e.get(p.IListService),i),o=g.distinct(r.map(function(e){return e.groupId}))
;return 0===o.length&&o.push(i.activeGroup.id),u.TPromise.join(o.map(function(e){return i.getGroup(e).closeAllEditors()}))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLOSE_EDITOR_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:2101,win:{primary:2110,secondary:[2101]},handler:function(e,t,n){var i=e.get(v.IEditorGroupsService),r=w(C(t,n),e.get(p.IListService),i),o=i.activeGroup;0===r.length&&o.activeEditor&&r.push({groupId:o.id,editorIndex:o.getIndexOfEditor(o.activeEditor)});var s=g.distinct(r.map(function(e){return e.groupId}));return u.TPromise.join(s.map(function(e){var t=i.getGroup(e),n=r.filter(function(t){return t.groupId===e}).map(function(e){return"number"==typeof e.editorIndex?t.getEditor(e.editorIndex):t.activeEditor});return t.closeEditors(n)}))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLOSE_EDITOR_GROUP_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),
when:m.ContextKeyExpr.and(o.ActiveEditorGroupEmptyContext,o.MultipleEditorGroupsContext),primary:2101,win:{primary:2110,secondary:[2101]},handler:function(e,t,n){var i,r=e.get(v.IEditorGroupsService),o=C(t,n);i=o&&"number"==typeof o.groupId?r.getGroup(o.groupId):r.activeGroup,r.removeGroup(i)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,mac:{primary:2610},handler:function(e,t,n){var i=e.get(v.IEditorGroupsService),r=w(C(t,n),e.get(p.IListService),i),o=i.activeGroup;0===r.length&&o.activeEditor&&r.push({groupId:o.id,editorIndex:o.getIndexOfEditor(o.activeEditor)});var s=g.distinct(r.map(function(e){return e.groupId}));return u.TPromise.join(s.map(function(e){var t=i.getGroup(e),n=r.filter(function(t){return t.groupId===e}).map(function(e){return"number"==typeof e.editorIndex?t.getEditor(e.editorIndex):t.activeEditor}),o=t.editors.filter(function(e){return-1===n.indexOf(e)
});return t.closeEditors(o)}))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,handler:function(e,t,n){var i=E(e.get(v.IEditorGroupsService),C(t,n)),r=i.group,s=i.editor;return r&&s?r.closeEditors({direction:o.CloseDirection.RIGHT,except:s}):u.TPromise.as(!1)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.KEEP_EDITOR_COMMAND_ID,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:l.KeyChord(2089,3),handler:function(e,t,n){var i=E(e.get(v.IEditorGroupsService),C(t,n)),r=i.group,o=i.editor;return r&&o?r.pinEditor(o):u.TPromise.as(!1)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.SHOW_EDITORS_IN_GROUP,weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,handler:function(e,n,i){var r=e.get(v.IEditorGroupsService),o=e.get(h.IQuickOpenService)
;if(r.count<=1)return o.show(t.NAVIGATE_ALL_EDITORS_GROUP_PREFIX);var s=C(n,i);return s&&"number"==typeof s.groupId&&r.activateGroup(r.getGroup(s.groupId)),o.show(t.NAVIGATE_IN_ACTIVE_GROUP_PREFIX)}}),b.CommandsRegistry.registerCommand(t.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,function(e,t,n){var i=e.get(v.IEditorGroupsService),r=E(i,C(t,n)).group;if(r)return r.closeAllEditors().then(function(){0===r.count&&i.getGroup(r.id)&&i.removeGroup(r)})}),function(){for(var e=function(e){r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:function(t){switch(e){case 1:return"workbench.action.focusSecondEditorGroup";case 2:return"workbench.action.focusThirdEditorGroup";case 3:return"workbench.action.focusFourthEditorGroup";case 4:return"workbench.action.focusFifthEditorGroup";case 5:return"workbench.action.focusSixthEditorGroup";case 6:return"workbench.action.focusSeventhEditorGroup";case 7:return"workbench.action.focusEighthEditorGroup"}}(),weight:r.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,
primary:2048|function(t){switch(e){case 1:return 23;case 2:return 24;case 3:return 25;case 4:return 26;case 5:return 27;case 6:return 28;case 7:return 29}}(),handler:function(t){var n=t.get(v.IEditorGroupsService),i=t.get(y.IConfigurationService);if(!(e>n.count)){var r=n.getGroups(v.GroupsOrder.GRID_APPEARANCE);if(r[e])return r[e].focus();var o=v.preferredSideBySideGroupDirection(i),s=n.findGroup({location:v.GroupLocation.LAST});n.addGroup(s,o).focus()}}})},t=1;t<8;t++)e(t)}(),[{id:t.SPLIT_EDITOR_UP,direction:v.GroupDirection.UP},{id:t.SPLIT_EDITOR_DOWN,direction:v.GroupDirection.DOWN},{id:t.SPLIT_EDITOR_LEFT,direction:v.GroupDirection.LEFT},{id:t.SPLIT_EDITOR_RIGHT,direction:v.GroupDirection.RIGHT}].forEach(function(e){var t=e.id,n=e.direction;b.CommandsRegistry.registerCommand(t,function(e,t,i){_(e.get(v.IEditorGroupsService),n,C(t,i))})})}Object.defineProperty(t,"__esModule",{value:!0}),t.CLOSE_SAVED_EDITORS_COMMAND_ID="workbench.action.closeUnmodifiedEditors",
t.CLOSE_EDITORS_IN_GROUP_COMMAND_ID="workbench.action.closeEditorsInGroup",t.CLOSE_EDITORS_AND_GROUP_COMMAND_ID="workbench.action.closeEditorsAndGroup",t.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID="workbench.action.closeEditorsToTheRight",t.CLOSE_EDITOR_COMMAND_ID="workbench.action.closeActiveEditor",t.CLOSE_EDITOR_GROUP_COMMAND_ID="workbench.action.closeGroup",t.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID="workbench.action.closeOtherEditors",t.MOVE_ACTIVE_EDITOR_COMMAND_ID="moveActiveEditor",t.LAYOUT_EDITOR_GROUPS_COMMAND_ID="layoutEditorGroups",t.KEEP_EDITOR_COMMAND_ID="workbench.action.keepEditor",t.SHOW_EDITORS_IN_GROUP="workbench.action.showEditorsInGroup",t.TOGGLE_DIFF_INLINE_MODE="toggle.diff.editorMode",t.SPLIT_EDITOR_UP="workbench.action.splitEditorUp",t.SPLIT_EDITOR_DOWN="workbench.action.splitEditorDown",t.SPLIT_EDITOR_LEFT="workbench.action.splitEditorLeft",t.SPLIT_EDITOR_RIGHT="workbench.action.splitEditorRight",t.NAVIGATE_ALL_EDITORS_GROUP_PREFIX="edt ",t.NAVIGATE_IN_ACTIVE_GROUP_PREFIX="edt active "
;var x=function(e){return!!i.isObject(e)&&(!!i.isString(e.to)&&(!(!i.isUndefined(e.by)&&!i.isString(e.by))&&!(!i.isUndefined(e.value)&&!i.isNumber(e.value))))};t.mergeAllGroups=function(e){var t=e.activeGroup;e.getGroups(v.GroupsOrder.MOST_RECENTLY_ACTIVE).forEach(function(n){n!==t&&e.mergeGroup(n,t)})},t.splitEditor=_,t.getMultiSelectedEditorContexts=w,t.setup=T}),define(e[291],t([1,0,4,1502,23,24,40,109,86,64,46,162,37,29,48,42,187,53,21,17,5]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";function w(e){if(e instanceof u.QuickOpenEntryGroup){var t=e;t.getEntry()&&(e=t.getEntry())}return e instanceof d.EditorQuickOpenEntry||e instanceof d.EditorQuickOpenEntryGroup?e:null}Object.defineProperty(t,"__esModule",{value:!0});var I=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.commandId=i,s.commandService=r,s.commandArgs=o,s}return n(t,e),t.prototype.run=function(){return this.commandService.executeCommand(this.commandId,this.commandArgs)},t}(o.Action)
;t.ExecuteCommandAction=I;var T=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.editorGroupService=i,o.configurationService=r,o.toDispose=[],o.direction=o.getDirection(),o.registerListeners(),o}return n(t,e),t.prototype.getDirection=function(){return S.preferredSideBySideGroupDirection(this.configurationService)},t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){t.affectsConfiguration("workbench.editor.openSideBySideDirection")&&(e.direction=S.preferredSideBySideGroupDirection(e.configurationService))}))},t.prototype.run=function(e){return b.splitEditor(this.editorGroupService,this.direction,e),i.TPromise.as(!0)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=E.dispose(this.toDispose)},t}(o.Action);t.BaseSplitEditorAction=T;var x=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.ID="workbench.action.splitEditor",t.LABEL=r.localize(0,null),
t=a([l(2,S.IEditorGroupsService),l(3,C.IConfigurationService)],t)}(T);t.SplitEditorAction=x;var k=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.getDirection=function(){return S.preferredSideBySideGroupDirection(this.configurationService)===S.GroupDirection.RIGHT?S.GroupDirection.DOWN:S.GroupDirection.RIGHT},t.ID="workbench.action.splitEditorOrthogonal",t.LABEL=r.localize(1,null),t=a([l(2,S.IEditorGroupsService),l(3,C.IConfigurationService)],t)}(T);t.SplitEditorOrthogonalAction=k;var D=function(e){function t(t,n,i){return e.call(this,t,n,b.SPLIT_EDITOR_LEFT,i)||this}return n(t,e),t.ID=b.SPLIT_EDITOR_LEFT,t.LABEL=r.localize(2,null),t=a([l(2,v.ICommandService)],t)}(I);t.SplitEditorLeftAction=D;var A=function(e){function t(t,n,i){return e.call(this,t,n,b.SPLIT_EDITOR_RIGHT,i)||this}return n(t,e),t.ID=b.SPLIT_EDITOR_RIGHT,t.LABEL=r.localize(3,null),t=a([l(2,v.ICommandService)],t)}(I);t.SplitEditorRightAction=A;var L=function(e){function t(t,n,i){
return e.call(this,t,n,b.SPLIT_EDITOR_UP,i)||this}return n(t,e),t.ID=b.SPLIT_EDITOR_UP,t.LABEL=r.localize(4,null),t=a([l(2,v.ICommandService)],t)}(I);t.SplitEditorUpAction=L;var R=function(e){function t(t,n,i){return e.call(this,t,n,b.SPLIT_EDITOR_DOWN,i)||this}return n(t,e),t.ID=b.SPLIT_EDITOR_DOWN,t.LABEL=r.localize(5,null),t=a([l(2,v.ICommandService)],t)}(I);t.SplitEditorDownAction=R;var O=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(e){var t;t=e&&"number"==typeof e.groupId?this.editorGroupService.getGroup(e.groupId):this.editorGroupService.activeGroup;for(var n=[S.GroupDirection.RIGHT,S.GroupDirection.DOWN,S.GroupDirection.LEFT,S.GroupDirection.UP],r=0;r<n.length;r++){var o=this.editorGroupService.findGroup({direction:n[r]},t);if(o&&t!==o)return this.editorGroupService.mergeGroup(t,o),i.TPromise.as(!0)}return i.TPromise.as(!0)},t.ID="workbench.action.joinTwoGroups",t.LABEL=r.localize(6,null),
t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.JoinTwoGroupsAction=O;var M=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(e){return b.mergeAllGroups(this.editorGroupService),i.TPromise.as(!0)},t.ID="workbench.action.joinAllGroups",t.LABEL=r.localize(7,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.JoinAllGroupsAction=M;var P=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(){return this.editorGroupService.findGroup({location:S.GroupLocation.NEXT},this.editorGroupService.activeGroup,!0).focus(),i.TPromise.as(!0)},t.ID="workbench.action.navigateEditorGroups",t.LABEL=r.localize(8,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.NavigateBetweenGroupsAction=P;var N=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(){
return this.editorGroupService.activeGroup.focus(),i.TPromise.as(!0)},t.ID="workbench.action.focusActiveEditorGroup",t.LABEL=r.localize(9,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.FocusActiveGroupAction=N;var F=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.scope=i,o.editorGroupService=r,o}return n(t,e),t.prototype.run=function(){var e=this.editorGroupService.findGroup(this.scope,this.editorGroupService.activeGroup,!0);return e&&e.focus(),i.TPromise.as(!0)},t=a([l(3,S.IEditorGroupsService)],t)}(o.Action);t.BaseFocusGroupAction=F;var W=function(e){function t(t,n,i){return e.call(this,t,n,{location:S.GroupLocation.FIRST},i)||this}return n(t,e),t.ID="workbench.action.focusFirstEditorGroup",t.LABEL=r.localize(10,null),t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusFirstGroupAction=W;var B=function(e){function t(t,n,i){return e.call(this,t,n,{location:S.GroupLocation.LAST},i)||this}return n(t,e),t.ID="workbench.action.focusLastEditorGroup",t.LABEL=r.localize(11,null),
t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusLastGroupAction=B;var V=function(e){function t(t,n,i){return e.call(this,t,n,{location:S.GroupLocation.NEXT},i)||this}return n(t,e),t.ID="workbench.action.focusNextGroup",t.LABEL=r.localize(12,null),t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusNextGroup=V;var z=function(e){function t(t,n,i){return e.call(this,t,n,{location:S.GroupLocation.PREVIOUS},i)||this}return n(t,e),t.ID="workbench.action.focusPreviousGroup",t.LABEL=r.localize(13,null),t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusPreviousGroup=z;var H=function(e){function t(t,n,i){return e.call(this,t,n,{direction:S.GroupDirection.LEFT},i)||this}return n(t,e),t.ID="workbench.action.focusLeftGroup",t.LABEL=r.localize(14,null),t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusLeftGroup=H;var K=function(e){function t(t,n,i){return e.call(this,t,n,{direction:S.GroupDirection.RIGHT},i)||this}return n(t,e),t.ID="workbench.action.focusRightGroup",t.LABEL=r.localize(15,null),t=a([l(2,S.IEditorGroupsService)],t)
}(F);t.FocusRightGroup=K;var U=function(e){function t(t,n,i){return e.call(this,t,n,{direction:S.GroupDirection.UP},i)||this}return n(t,e),t.ID="workbench.action.focusAboveGroup",t.LABEL=r.localize(16,null),t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusAboveGroup=U;var G=function(e){function t(t,n,i){return e.call(this,t,n,{direction:S.GroupDirection.DOWN},i)||this}return n(t,e),t.ID="workbench.action.focusBelowGroup",t.LABEL=r.localize(17,null),t=a([l(2,S.IEditorGroupsService)],t)}(F);t.FocusBelowGroup=G;var j=function(e){function t(n,i){var r=e.call(this,t.OPEN_TO_SIDE_ID,t.OPEN_TO_SIDE_LABEL)||this;return r.editorService=n,r.configurationService=i,r.updateClass(),r}return n(t,e),t.prototype.updateClass=function(){var e=S.preferredSideBySideGroupDirection(this.configurationService);this.class=e===S.GroupDirection.RIGHT?"quick-open-sidebyside-vertical":"quick-open-sidebyside-horizontal"},t.prototype.run=function(e){var t=w(e);if(t){var n=t.getInput()
;if(n instanceof c.EditorInput)return this.editorService.openEditor(n,t.getOptions(),_.SIDE_GROUP);var r=n;return r.options=s.mixin(r.options,t.getOptions()),this.editorService.openEditor(r,_.SIDE_GROUP)}return i.TPromise.as(!1)},t.OPEN_TO_SIDE_ID="workbench.action.openToSide",t.OPEN_TO_SIDE_LABEL=r.localize(18,null),t=a([l(0,_.IEditorService),l(1,C.IConfigurationService)],t)}(o.Action);t.OpenToSideFromQuickOpenAction=j,t.toEditorQuickOpenEntry=w;var q=function(e){function t(t,n,i){var r=e.call(this,t,n,"close-editor-action")||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(b.CLOSE_EDITOR_COMMAND_ID,void 0,e)},t.ID="workbench.action.closeActiveEditor",t.LABEL=r.localize(19,null),t=a([l(2,v.ICommandService)],t)}(o.Action);t.CloseEditorAction=q;var $=function(e){function t(t,n,i){var r=e.call(this,t,n,"close-editor-action")||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(e){var t,n
;if(e&&(t=this.editorGroupService.getGroup(e.groupId))&&(n=e.editorIndex),t||(t=this.editorGroupService.activeGroup),"number"==typeof n){var r=t.getEditor(n);if(r)return t.closeEditor(r)}return t.activeEditor?t.closeEditor(t.activeEditor):i.TPromise.as(!1)},t.ID="workbench.action.closeActiveEditor",t.LABEL=r.localize(20,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.CloseOneEditorAction=$;var Y=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorService=i,r}return n(t,e),t.prototype.run=function(){var e=this.editorService.activeControl;if(e){var t=e.input,n=e.group;return t.revert().then(function(){return n.closeEditor(t)},function(e){return t.revert({soft:!0}).then(function(){return n.closeEditor(t)})})}return i.TPromise.as(!1)},t.ID="workbench.action.revertAndCloseActiveEditor",t.LABEL=r.localize(21,null),t=a([l(2,_.IEditorService)],t)}(o.Action);t.RevertAndCloseEditorAction=Y;var X=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.editorService=i,
o.editorGroupService=r,o}return n(t,e),t.prototype.run=function(e){var t=function(e,t,n){return n?{editor:n.editor,group:t.getGroup(n.groupId)}:{group:t.activeGroup,editor:t.activeGroup.activeEditor}}(this.editorService,this.editorGroupService,e),n=t.group,r=t.editor;return n&&r?n.closeEditors({direction:c.CloseDirection.LEFT,except:r}):i.TPromise.as(!1)},t.ID="workbench.action.closeEditorsToTheLeft",t.LABEL=r.localize(22,null),t=a([l(2,_.IEditorService),l(3,S.IEditorGroupsService)],t)}(o.Action);t.CloseLeftEditorsInGroupAction=X;var Q=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,i)||this;return s.textFileService=r,s.editorGroupService=o,s}return n(t,e),Object.defineProperty(t.prototype,"groupsToClose",{get:function(){for(var e=[],t=this.editorGroupService.getGroups(S.GroupsOrder.GRID_APPEARANCE),n=t.length-1;n>=0;n--)e.push(t[n]);return e},enumerable:!0,configurable:!0}),t.prototype.run=function(){var e=this
;return this.textFileService.getDirty().length<2?this.doCloseAll():this.textFileService.confirmSave().then(function(t){if(t!==c.ConfirmResult.CANCEL){return(t===c.ConfirmResult.DONT_SAVE?e.textFileService.revertAll(null,{soft:!0}).then(function(){return!0}):e.textFileService.saveAll(!0).then(function(e){return e.results.every(function(e){return e.success})})).then(function(t){if(t)return e.doCloseAll()})}})},t}(o.Action);t.BaseCloseAllAction=Q;var Z=function(e){function t(t,n,i,r){return e.call(this,t,n,"action-close-all-files",i,r)||this}return n(t,e),t.prototype.doCloseAll=function(){return i.TPromise.join(this.groupsToClose.map(function(e){return e.closeAllEditors()}))},t.ID="workbench.action.closeAllEditors",t.LABEL=r.localize(23,null),t=a([l(2,m.ITextFileService),l(3,S.IEditorGroupsService)],t)}(Q);t.CloseAllEditorsAction=Z;var J=function(e){function t(t,n,i,r){return e.call(this,t,n,void 0,i,r)||this}return n(t,e),t.prototype.doCloseAll=function(){var e=this
;return i.TPromise.join(this.groupsToClose.map(function(e){return e.closeAllEditors()})).then(function(){e.groupsToClose.forEach(function(t){return e.editorGroupService.removeGroup(t)})})},t.ID="workbench.action.closeAllGroups",t.LABEL=r.localize(24,null),t=a([l(2,m.ITextFileService),l(3,S.IEditorGroupsService)],t)}(Q);t.CloseAllEditorGroupsAction=J;var ee=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(e){var t=e?this.editorGroupService.getGroup(e.groupId):this.editorGroupService.activeGroup;return i.TPromise.join(this.editorGroupService.getGroups(S.GroupsOrder.MOST_RECENTLY_ACTIVE).map(function(e){return e.id===t.id?i.TPromise.as(null):e.closeAllEditors()}))},t.ID="workbench.action.closeEditorsInOtherGroups",t.LABEL=r.localize(25,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.CloseEditorsInOtherGroupsAction=ee;var te=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.direction=i,
o.editorGroupService=r,o}return n(t,e),t.prototype.run=function(e){var t;t=e&&"number"==typeof e.groupId?this.editorGroupService.getGroup(e.groupId):this.editorGroupService.activeGroup;var n=this.findTargetGroup(t);return n&&this.editorGroupService.moveGroup(t,n,this.direction),i.TPromise.as(!0)},t.prototype.findTargetGroup=function(e){var t=[this.direction];switch(this.direction){case S.GroupDirection.LEFT:case S.GroupDirection.RIGHT:t.push(S.GroupDirection.UP,S.GroupDirection.DOWN);break;case S.GroupDirection.UP:case S.GroupDirection.DOWN:t.push(S.GroupDirection.LEFT,S.GroupDirection.RIGHT)}for(var n=0;n<t.length;n++){var i=this.editorGroupService.findGroup({direction:t[n]},e);if(i)return i}},t}(o.Action);t.BaseMoveGroupAction=te;var ne=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.LEFT,i)||this}return n(t,e),t.ID="workbench.action.moveActiveEditorGroupLeft",t.LABEL=r.localize(26,null),t=a([l(2,S.IEditorGroupsService)],t)}(te);t.MoveGroupLeftAction=ne;var ie=function(e){
function t(t,n,i){return e.call(this,t,n,S.GroupDirection.RIGHT,i)||this}return n(t,e),t.ID="workbench.action.moveActiveEditorGroupRight",t.LABEL=r.localize(27,null),t=a([l(2,S.IEditorGroupsService)],t)}(te);t.MoveGroupRightAction=ie;var re=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.UP,i)||this}return n(t,e),t.ID="workbench.action.moveActiveEditorGroupUp",t.LABEL=r.localize(28,null),t=a([l(2,S.IEditorGroupsService)],t)}(te);t.MoveGroupUpAction=re;var oe=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.DOWN,i)||this}return n(t,e),t.ID="workbench.action.moveActiveEditorGroupDown",t.LABEL=r.localize(29,null),t=a([l(2,S.IEditorGroupsService)],t)}(te);t.MoveGroupDownAction=oe;var se=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(){return this.editorGroupService.arrangeGroups(S.GroupsArrangement.MINIMIZE_OTHERS),i.TPromise.as(!1)},t.ID="workbench.action.minimizeOtherEditors",
t.LABEL=r.localize(30,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.MinimizeOtherGroupsAction=se;var ae=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorGroupService=i,r}return n(t,e),t.prototype.run=function(){return this.editorGroupService.arrangeGroups(S.GroupsArrangement.EVEN),i.TPromise.as(!1)},t.ID="workbench.action.evenEditorWidths",t.LABEL=r.localize(31,null),t=a([l(2,S.IEditorGroupsService)],t)}(o.Action);t.ResetGroupSizesAction=ae;var ce=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.editorService=i,s.editorGroupService=r,s.partService=o,s}return n(t,e),t.prototype.run=function(){return this.editorService.activeEditor?(this.editorGroupService.arrangeGroups(S.GroupsArrangement.MINIMIZE_OTHERS),this.partService.setSideBarHidden(!0)):i.TPromise.as(!1)},t.ID="workbench.action.maximizeEditor",t.LABEL=r.localize(32,null),t=a([l(2,_.IEditorService),l(3,S.IEditorGroupsService),l(4,p.IPartService)],t)}(o.Action);t.MaximizeGroupAction=ce
;var le=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.editorGroupService=i,o.editorService=r,o}return n(t,e),t.prototype.run=function(){var e=this.navigate();if(!e)return i.TPromise.as(!1);var t=e.groupId,n=e.editor;if(!n)return i.TPromise.as(!1);return this.editorGroupService.getGroup(t).openEditor(n)},t}(o.Action);t.BaseNavigateEditorAction=le;var ue=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.navigate=function(){var e=this.editorGroupService.activeGroup,t=e.getEditors(S.EditorsOrder.SEQUENTIAL),n=t.indexOf(e.activeEditor);if(n+1<t.length)return{editor:t[n+1],groupId:e.id};var i=this.editorGroupService.findGroup({location:S.GroupLocation.NEXT},this.editorGroupService.activeGroup,!0);if(i){return{editor:i.getEditors(S.EditorsOrder.SEQUENTIAL)[0],groupId:i.id}}},t.ID="workbench.action.nextEditor",t.LABEL=r.localize(33,null),t=a([l(2,S.IEditorGroupsService),l(3,_.IEditorService)],t)}(le);t.OpenNextEditor=ue;var de=function(e){
function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.navigate=function(){var e=this.editorGroupService.activeGroup,t=e.getEditors(S.EditorsOrder.SEQUENTIAL),n=t.indexOf(e.activeEditor);if(n>0)return{editor:t[n-1],groupId:e.id};var i=this.editorGroupService.findGroup({location:S.GroupLocation.PREVIOUS},this.editorGroupService.activeGroup,!0);if(i){var r=i.getEditors(S.EditorsOrder.SEQUENTIAL);return{editor:r[r.length-1],groupId:i.id}}},t.ID="workbench.action.previousEditor",t.LABEL=r.localize(34,null),t=a([l(2,S.IEditorGroupsService),l(3,_.IEditorService)],t)}(le);t.OpenPreviousEditor=de;var he=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.navigate=function(){var e=this.editorGroupService.activeGroup,t=e.getEditors(S.EditorsOrder.SEQUENTIAL),n=t.indexOf(e.activeEditor);return{editor:n+1<t.length?t[n+1]:t[0],groupId:e.id}},t.ID="workbench.action.nextEditorInGroup",t.LABEL=r.localize(35,null),
t=a([l(2,S.IEditorGroupsService),l(3,_.IEditorService)],t)}(le);t.OpenNextEditorInGroup=he;var pe=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.navigate=function(){var e=this.editorGroupService.activeGroup,t=e.getEditors(S.EditorsOrder.SEQUENTIAL),n=t.indexOf(e.activeEditor);return{editor:n>0?t[n-1]:t[t.length-1],groupId:e.id}},t.ID="workbench.action.previousEditorInGroup",t.LABEL=r.localize(36,null),t=a([l(2,S.IEditorGroupsService),l(3,_.IEditorService)],t)}(le);t.OpenPreviousEditorInGroup=pe;var fe=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.prototype.navigate=function(){var e=this.editorGroupService.activeGroup;return{editor:e.getEditors(S.EditorsOrder.SEQUENTIAL)[0],groupId:e.id}},t.ID="workbench.action.firstEditorInGroup",t.LABEL=r.localize(37,null),t=a([l(2,S.IEditorGroupsService),l(3,_.IEditorService)],t)}(le);t.OpenFirstEditorInGroup=fe;var ge=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}
return n(t,e),t.prototype.navigate=function(){var e=this.editorGroupService.activeGroup,t=e.getEditors(S.EditorsOrder.SEQUENTIAL);return{editor:t[t.length-1],groupId:e.id}},t.ID="workbench.action.lastEditorInGroup",t.LABEL=r.localize(38,null),t=a([l(2,S.IEditorGroupsService),l(3,_.IEditorService)],t)}(le);t.OpenLastEditorInGroup=ge;var ve=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.forward(),i.TPromise.as(null)},t.ID="workbench.action.navigateForward",t.LABEL=r.localize(39,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.NavigateForwardAction=ve;var me=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.back(),i.TPromise.as(null)},t.ID="workbench.action.navigateBack",t.LABEL=r.localize(40,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.NavigateBackwardsAction=me;var ye=function(e){
function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.last(),i.TPromise.as(null)},t.ID="workbench.action.navigateLast",t.LABEL=r.localize(41,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.NavigateLastAction=ye;var be=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.reopenLastClosedEditor(),i.TPromise.as(!1)},t.ID="workbench.action.reopenClosedEditor",t.LABEL=r.localize(42,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.ReopenClosedEditorAction=be;var Se=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowsService=i,r}return n(t,e),t.prototype.run=function(){return this.windowsService.clearRecentlyOpened(),i.TPromise.as(!1)},t.ID="workbench.action.clearRecentFiles",t.LABEL=r.localize(43,null),t=a([l(2,y.IWindowsService)],t)}(o.Action);t.ClearRecentFilesAction=Se;var _e=function(e){
function t(t,n,i){return e.call(this,t,n,b.NAVIGATE_IN_ACTIVE_GROUP_PREFIX,i)||this}return n(t,e),t.ID="workbench.action.showEditorsInActiveGroup",t.LABEL=r.localize(44,null),t=a([l(2,h.IQuickOpenService)],t)}(d.QuickOpenAction);t.ShowEditorsInActiveGroupAction=_e;var Ce=function(e){function t(t,n,i){return e.call(this,t,n,b.NAVIGATE_ALL_EDITORS_GROUP_PREFIX,i)||this}return n(t,e),t.ID="workbench.action.showAllEditors",t.LABEL=r.localize(45,null),t=a([l(2,h.IQuickOpenService)],t)}(d.QuickOpenAction);t.ShowAllEditorsAction=Ce;var Ee=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=i,o.keybindingService=r,o}return n(t,e),t.prototype.run=function(){var e=this.keybindingService.lookupKeybindings(this.id);return this.quickOpenService.show(b.NAVIGATE_IN_ACTIVE_GROUP_PREFIX,{quickNavigateConfiguration:{keybindings:e}}),i.TPromise.as(!0)},t=a([l(2,h.IQuickOpenService),l(3,g.IKeybindingService)],t)}(o.Action);t.BaseQuickOpenEditorInGroupAction=Ee;var we=function(e){
function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.ID="workbench.action.openPreviousRecentlyUsedEditorInGroup",t.LABEL=r.localize(46,null),t=a([l(2,h.IQuickOpenService),l(3,g.IKeybindingService)],t)}(Ee);t.OpenPreviousRecentlyUsedEditorInGroupAction=we;var Ie=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return n(t,e),t.ID="workbench.action.openNextRecentlyUsedEditorInGroup",t.LABEL=r.localize(47,null),t=a([l(2,h.IQuickOpenService),l(3,g.IKeybindingService)],t)}(Ee);t.OpenNextRecentlyUsedEditorInGroupAction=Ie;var Te=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=i,o.keybindingService=r,o}return n(t,e),t.prototype.run=function(){var e=this.keybindingService.lookupKeybindings(this.id);return this.quickOpenService.show(null,{quickNavigateConfiguration:{keybindings:e}}),i.TPromise.as(!0)},t.ID="workbench.action.openPreviousEditorFromHistory",t.LABEL=r.localize(48,null),t=a([l(2,h.IQuickOpenService),l(3,g.IKeybindingService)],t)
}(o.Action);t.OpenPreviousEditorFromHistoryAction=Te;var xe=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.forward(!0),i.TPromise.as(null)},t.ID="workbench.action.openNextRecentlyUsedEditor",t.LABEL=r.localize(49,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.OpenNextRecentlyUsedEditorAction=xe;var ke=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.back(!0),i.TPromise.as(null)},t.ID="workbench.action.openPreviousRecentlyUsedEditor",t.LABEL=r.localize(50,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.OpenPreviousRecentlyUsedEditorAction=ke;var De=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.historyService=i,r}return n(t,e),t.prototype.run=function(){return this.historyService.clear(),i.TPromise.as(!0)},t.ID="workbench.action.clearEditorHistory",
t.LABEL=r.localize(51,null),t=a([l(2,f.IHistoryService)],t)}(o.Action);t.ClearEditorHistoryAction=De;var Ae=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"left"})||this}return n(t,e),t.ID="workbench.action.moveEditorLeftInGroup",t.LABEL=r.localize(52,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorLeftInGroupAction=Ae;var Le=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"right"})||this}return n(t,e),t.ID="workbench.action.moveEditorRightInGroup",t.LABEL=r.localize(53,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorRightInGroupAction=Le;var Re=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"previous",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToPreviousGroup",t.LABEL=r.localize(54,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToPreviousGroupAction=Re;var Oe=function(e){function t(t,n,i){
return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"next",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToNextGroup",t.LABEL=r.localize(55,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToNextGroupAction=Oe;var Me=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"up",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToAboveGroup",t.LABEL=r.localize(56,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToAboveGroupAction=Me;var Pe=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"down",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToBelowGroup",t.LABEL=r.localize(57,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToBelowGroupAction=Pe;var Ne=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"left",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToLeftGroup",t.LABEL=r.localize(58,null),
t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToLeftGroupAction=Ne;var Fe=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"right",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToRightGroup",t.LABEL=r.localize(59,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToRightGroupAction=Fe;var We=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"first",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToFirstGroup",t.LABEL=r.localize(60,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToFirstGroupAction=We;var Be=function(e){function t(t,n,i){return e.call(this,t,n,b.MOVE_ACTIVE_EDITOR_COMMAND_ID,i,{to:"last",by:"group"})||this}return n(t,e),t.ID="workbench.action.moveEditorToLastGroup",t.LABEL=r.localize(61,null),t=a([l(2,v.ICommandService)],t)}(I);t.MoveEditorToLastGroupAction=Be;var Ve=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{
groups:[{}]})||this}return n(t,e),t.ID="workbench.action.editorLayoutSingle",t.LABEL=r.localize(62,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutSingleAction=Ve;var ze=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{},{}],orientation:S.GroupOrientation.HORIZONTAL})||this}return n(t,e),t.ID="workbench.action.editorLayoutTwoColumns",t.LABEL=r.localize(63,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutTwoColumnsAction=ze;var He=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{},{},{}],orientation:S.GroupOrientation.HORIZONTAL})||this}return n(t,e),t.ID="workbench.action.editorLayoutThreeColumns",t.LABEL=r.localize(64,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutThreeColumnsAction=He;var Ke=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{},{}],orientation:S.GroupOrientation.VERTICAL})||this}return n(t,e),
t.ID="workbench.action.editorLayoutTwoRows",t.LABEL=r.localize(65,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutTwoRowsAction=Ke;var Ue=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{},{},{}],orientation:S.GroupOrientation.VERTICAL})||this}return n(t,e),t.ID="workbench.action.editorLayoutThreeRows",t.LABEL=r.localize(66,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutThreeRowsAction=Ue;var Ge=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{groups:[{},{}]},{groups:[{},{}]}]})||this}return n(t,e),t.ID="workbench.action.editorLayoutTwoByTwoGrid",t.LABEL=r.localize(67,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutTwoByTwoGridAction=Ge;var je=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{},{groups:[{},{}]}],orientation:S.GroupOrientation.VERTICAL})||this}return n(t,e),t.ID="workbench.action.editorLayoutTwoColumnsBottom",
t.LABEL=r.localize(68,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutTwoColumnsBottomAction=je;var qe=function(e){function t(t,n,i){return e.call(this,t,n,b.LAYOUT_EDITOR_GROUPS_COMMAND_ID,i,{groups:[{},{groups:[{},{}]}],orientation:S.GroupOrientation.HORIZONTAL})||this}return n(t,e),t.ID="workbench.action.editorLayoutTwoColumnsRight",t.LABEL=r.localize(69,null),t=a([l(2,v.ICommandService)],t)}(I);t.EditorLayoutTwoColumnsRightAction=qe;var $e=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.direction=i,o.editorGroupService=r,o}return n(t,e),t.prototype.run=function(){return this.editorGroupService.addGroup(this.editorGroupService.activeGroup,this.direction,{activate:!0}),i.TPromise.as(!0)},t}(o.Action);t.BaseCreateEditorGroupAction=$e;var Ye=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.LEFT,i)||this}return n(t,e),t.ID="workbench.action.newGroupLeft",t.LABEL=r.localize(70,null),t=a([l(2,S.IEditorGroupsService)],t)}($e);t.NewEditorGroupLeftAction=Ye
;var Xe=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.RIGHT,i)||this}return n(t,e),t.ID="workbench.action.newGroupRight",t.LABEL=r.localize(71,null),t=a([l(2,S.IEditorGroupsService)],t)}($e);t.NewEditorGroupRightAction=Xe;var Qe=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.UP,i)||this}return n(t,e),t.ID="workbench.action.newGroupAbove",t.LABEL=r.localize(72,null),t=a([l(2,S.IEditorGroupsService)],t)}($e);t.NewEditorGroupAboveAction=Qe;var Ze=function(e){function t(t,n,i){return e.call(this,t,n,S.GroupDirection.DOWN,i)||this}return n(t,e),t.ID="workbench.action.newGroupBelow",t.LABEL=r.localize(73,null),t=a([l(2,S.IEditorGroupsService)],t)}($e);t.NewEditorGroupBelowAction=Ze}),define(e[292],t([1,0,4,151,111,62,181,25,70,40,1193,6,27,5,7,48,178,36,159]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(e){function t(t,n,i,r,o,s,a,c,l,u){var d=e.call(this)||this;return d.resource=t,
d.modeId=i,d.initialValue=r,d.preferredEncoding=o,d.instantiationService=s,d.contextService=a,d.textFileService=c,d.environmentService=l,d.hashService=u,d._hasAssociatedFilePath=n,d.toUnbind=[],d._onDidModelChangeContent=new m.Emitter,d._onDidModelChangeEncoding=new m.Emitter,d}return n(t,e),Object.defineProperty(t.prototype,"hasAssociatedFilePath",{get:function(){return this._hasAssociatedFilePath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidModelChangeContent",{get:function(){return this._onDidModelChangeContent.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidModelChangeEncoding",{get:function(){return this._onDidModelChangeEncoding.event},enumerable:!0,configurable:!0}),t.prototype.getTypeId=function(){return t.ID},t.prototype.getResource=function(){return this.resource},t.prototype.getModeId=function(){return this.cachedModel?this.cachedModel.getModeId():this.modeId},t.prototype.getName=function(){
return this.hasAssociatedFilePath?d.basenameOrAuthority(this.resource):this.resource.path},Object.defineProperty(t.prototype,"shortDescription",{get:function(){return u.basename(s.getPathLabel(d.dirname(this.resource),this.environmentService))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediumDescription",{get:function(){return s.getPathLabel(d.dirname(this.resource),this.environmentService,this.contextService)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longDescription",{get:function(){return s.getPathLabel(d.dirname(this.resource),this.environmentService)},enumerable:!0,configurable:!0}),t.prototype.getDescription=function(e){if(void 0===e&&(e=h.Verbosity.MEDIUM),!this.hasAssociatedFilePath)return null;var t;switch(e){case h.Verbosity.SHORT:t=this.shortDescription;break;case h.Verbosity.LONG:t=this.longDescription;break;case h.Verbosity.MEDIUM:default:t=this.mediumDescription}return t},Object.defineProperty(t.prototype,"shortTitle",{get:function(){
return this.getName()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediumTitle",{get:function(){return s.getPathLabel(this.resource,this.environmentService,this.contextService)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longTitle",{get:function(){return s.getPathLabel(this.resource,this.environmentService)},enumerable:!0,configurable:!0}),t.prototype.getTitle=function(e){if(!this.hasAssociatedFilePath)return this.getName();var t;switch(e){case h.Verbosity.SHORT:t=this.shortTitle;break;case h.Verbosity.MEDIUM:t=this.mediumTitle;break;case h.Verbosity.LONG:t=this.longTitle}return t},t.prototype.isDirty=function(){return this.cachedModel?this.cachedModel.isDirty():!this.isDisposed()&&this.hasAssociatedFilePath},t.prototype.confirmSave=function(){return this.textFileService.confirmSave([this.resource])},t.prototype.save=function(){return this.textFileService.save(this.resource)},t.prototype.revert=function(){return this.cachedModel&&this.cachedModel.revert(),
this.dispose(),i.TPromise.as(!0)},t.prototype.suggestFileName=function(){if(!this.hasAssociatedFilePath&&this.cachedModel){var e=this.cachedModel.getModeId();if(e!==c.PLAINTEXT_MODE_ID)return r.suggestFilename(e,this.getName())}return this.getName()},t.prototype.getEncoding=function(){return this.cachedModel?this.cachedModel.getEncoding():this.preferredEncoding},t.prototype.setEncoding=function(e,t){this.preferredEncoding=e,this.cachedModel&&this.cachedModel.setEncoding(e)},t.prototype.resolve=function(){return this.modelResolve?this.modelResolve:(this.cachedModel=this.createModel(),this.modelResolve=this.cachedModel.load(),this.modelResolve)},t.prototype.createModel=function(){var e=this,t=this.instantiationService.createInstance(p.UntitledEditorModel,this.modeId,this.resource,this.hasAssociatedFilePath,this.initialValue,this.preferredEncoding);return this.toUnbind.push(t.onDidChangeContent(function(){return e._onDidModelChangeContent.fire()})),this.toUnbind.push(t.onDidChangeDirty(function(){
return e._onDidChangeDirty.fire()})),this.toUnbind.push(t.onDidChangeEncoding(function(){return e._onDidModelChangeEncoding.fire()})),t},t.prototype.getTelemetryDescriptor=function(){var t=this,n=e.prototype.getTelemetryDescriptor.call(this);return n.resource=b.telemetryURIDescriptor(this.getResource(),function(e){return t.hashService.createSHA1(e)}),n},t.prototype.matches=function(n){if(!0===e.prototype.matches.call(this,n))return!0;if(n instanceof t){return n.resource.toString()===this.resource.toString()}return!1},t.prototype.dispose=function(){this._onDidModelChangeContent.dispose(),this._onDidModelChangeEncoding.dispose(),v.dispose(this.toUnbind),this.cachedModel&&(this.cachedModel.dispose(),this.cachedModel=null),this.modelResolve=void 0,e.prototype.dispose.call(this)},t.ID="workbench.editors.untitledEditorInput",a([o.memoize],t.prototype,"shortDescription",null),a([o.memoize],t.prototype,"mediumDescription",null),a([o.memoize],t.prototype,"longDescription",null),
a([o.memoize],t.prototype,"shortTitle",null),a([o.memoize],t.prototype,"mediumTitle",null),a([o.memoize],t.prototype,"longTitle",null),t=a([l(5,f.IInstantiationService),l(6,g.IWorkspaceContextService),l(7,y.ITextFileService),l(8,S.IEnvironmentService),l(9,_.IHashService)],t)}(h.EditorInput);t.UntitledEditorInput=C}),define(e[351],t([1,0,4,1533,30,161,213,292,290,28,34,127,6,12,48,7,53,21]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(t,n,i,r,o,s,a,c,l){return e.call(this,t,n,i,r,o,s,c,l,a)||this}return n(t,e),t.prototype.getTitle=function(){return this.input?this.input.getName():r.localize(0,null)},t.prototype.setInput=function(t,n,r){var s=this;return this.saveTextResourceEditorViewState(this.input),e.prototype.setInput.call(this,t,n,r).then(function(){return t.resolve(!0).then(function(e){if(!r.isCancellationRequested){
if(!(e instanceof c.BaseTextEditorModel))return i.TPromise.wrapError(new Error("Unable to open file as text"));var a=s.getControl(),l=e.textEditorModel;a.setModel(l);var u=!1,d=n;d&&o.isFunction(d.apply)&&(u=d.apply(a,1)),u||s.restoreTextResourceEditorViewState(t)}})})},t.prototype.restoreTextResourceEditorViewState=function(e){if(e instanceof u.UntitledEditorInput||e instanceof s.ResourceEditorInput){var t=this.loadTextEditorViewState(e.getResource());t&&this.getControl().restoreViewState(t)}},t.prototype.setOptions=function(e){var t=e;t&&o.isFunction(t.apply)&&t.apply(this.getControl(),0)},t.prototype.getConfigurationOverrides=function(){var t=e.prototype.getConfigurationOverrides.call(this);return t.readOnly=!(this.input instanceof u.UntitledEditorInput),t},t.prototype.getAriaLabel=function(){var e=this.input,t=!(this.input instanceof u.UntitledEditorInput),n=e&&e.getName();return t?n?r.localize(1,null,n):r.localize(2,null):n?r.localize(3,null,n):r.localize(4,null)},t.prototype.revealLastLine=function(e){
var t=this.getControl(),n=t.getModel();if(n){var i=n.getLineCount();e&&t.getPosition().lineNumber!==i||t.revealPosition({lineNumber:i,column:n.getLineMaxColumn(i)},0)}},t.prototype.clearInput=function(){this.saveTextResourceEditorViewState(this.input),this.getControl().setModel(null),e.prototype.clearInput.call(this)},t.prototype.shutdown=function(){this.input instanceof u.UntitledEditorInput&&this.saveTextResourceEditorViewState(this.input),e.prototype.shutdown.call(this)},t.prototype.saveTextResourceEditorViewState=function(t){var n=this;if(t instanceof u.UntitledEditorInput||t instanceof s.ResourceEditorInput){var i=t.getResource();t.isDisposed()?e.prototype.clearTextEditorViewState.call(this,[i]):(e.prototype.saveTextEditorViewState.call(this,i),y.once(t.onDispose)(function(){e.prototype.clearTextEditorViewState.call(n,[i])}))}},
t=a([l(1,h.ITelemetryService),l(2,g.IInstantiationService),l(3,p.IStorageService),l(4,f.ITextResourceConfigurationService),l(5,v.IThemeService),l(6,b.IEditorGroupsService),l(7,m.ITextFileService),l(8,S.IEditorService)],t)}(d.BaseTextEditor);t.AbstractTextResourceEditor=_;var C=function(e){function t(n,i,r,o,s,a,c,l){return e.call(this,t.ID,n,i,r,o,s,l,a,c)||this}return n(t,e),t.ID="workbench.editors.textResourceEditor",t=a([l(0,h.ITelemetryService),l(1,g.IInstantiationService),l(2,p.IStorageService),l(3,f.ITextResourceConfigurationService),l(4,v.IThemeService),l(5,m.ITextFileService),l(6,S.IEditorService),l(7,b.IEditorGroupsService)],t)}(_);t.TextResourceEditor=C}),define(e[96],t([1,0,10,33,202,15,5,9,47,54,48,304,16,98]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWLET_ID="workbench.view.explorer",t.VIEW_CONTAINER=f.Registry.as(g.Extensions.ViewContainersRegistry).registerViewContainer(t.VIEWLET_ID)
;t.ExplorerViewletVisibleContext=new o.RawContextKey("explorerViewletVisible",!0),t.ExplorerFolderContext=new o.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerResourceReadonlyContext=new o.RawContextKey("explorerResourceReadonly",!1),t.ExplorerResourceNotReadonlyContext=t.ExplorerResourceReadonlyContext.toNegated(),t.ExplorerRootContext=new o.RawContextKey("explorerResourceIsRoot",!1),t.FilesExplorerFocusedContext=new o.RawContextKey("filesExplorerFocus",!0),t.OpenEditorsVisibleContext=new o.RawContextKey("openEditorsVisible",!1),t.OpenEditorsFocusedContext=new o.RawContextKey("openEditorsFocus",!0),t.ExplorerFocusedContext=new o.RawContextKey("explorerViewletFocus",!0),t.OpenEditorsVisibleCondition=o.ContextKeyExpr.has("openEditorsVisible"),t.FilesExplorerFocusCondition=o.ContextKeyExpr.and(o.ContextKeyExpr.has("explorerViewletVisible"),o.ContextKeyExpr.has("filesExplorerFocus"),o.ContextKeyExpr.not(p.InputFocusedContextKey)),
t.ExplorerFocusCondition=o.ContextKeyExpr.and(o.ContextKeyExpr.has("explorerViewletVisible"),o.ContextKeyExpr.has("explorerViewletFocus"),o.ContextKeyExpr.not(p.InputFocusedContextKey)),t.PREFERENCES_EDITOR_ID="workbench.editor.preferencesEditor",t.TEXT_FILE_EDITOR_ID="workbench.editors.files.textFileEditor",t.FILE_EDITOR_INPUT_ID="workbench.editors.files.fileEditorInput",t.BINARY_FILE_EDITOR_ID="workbench.editors.files.binaryFileEditor",t.explorerItemToFileResource=function(e){if(e instanceof r.ExplorerItem){var t=e;return{resource:t.resource,isDirectory:t.isDirectory}}if(e instanceof r.OpenEditor){var n=e.getResource();if(n)return{resource:n}}return null},t.SortOrderConfiguration={DEFAULT:"default",MIXED:"mixed",FILES_FIRST:"filesFirst",TYPE:"type",MODIFIED:"modified"};var v=function(){function e(e,t,n,i){this.textFileService=e,this.fileService=t,this.modeService=n,this.modelService=i}return e.prototype.provideTextContent=function(e){var t=this,r=n.default.file(e.fsPath)
;return this.resolveEditorModel(e).then(function(n){if(!t.fileWatcher){t.fileWatcher=t.fileService.onFileChanges(function(n){n.contains(r,i.FileChangeType.UPDATED)&&t.resolveEditorModel(e,!1).done(null,c.onUnexpectedError)});var o=n.onWillDispose(function(){o.dispose(),t.fileWatcher=s.dispose(t.fileWatcher)})}return n})},e.prototype.resolveEditorModel=function(e,t){var i=this;void 0===t&&(t=!0);var r=n.default.file(e.fsPath);return this.textFileService.resolveTextContent(r).then(function(n){var o=i.modelService.getModel(e);if(o)i.modelService.updateModel(o,n.value);else if(t){var s=i.modelService.getModel(r),a=void 0;a=s?i.modeService.getOrCreateMode(s.getModeId()):i.modeService.getOrCreateModeByFilenameOrFirstLine(r.fsPath),o=i.modelService.createModel(n.value,a,e)}return o})},e.prototype.dispose=function(){this.fileWatcher=s.dispose(this.fileWatcher)},e=a([l(0,h.ITextFileService),l(1,i.IFileService),l(2,d.IModeService),l(3,u.IModelService)],e)}();t.FileOnDiskContentProvider=v}),
define(e[293],t([1,0,644,4,111,25,70,62,40,268,33,48,27,6,5,178,36,72,159,96,43]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var w=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this)||this;return l.resource=t,l.instantiationService=i,l.contextService=r,l.textFileService=o,l.environmentService=s,l.textModelResolverService=a,l.hashService=c,l.toUnbind=[],l.setPreferredEncoding(n),l.registerListeners(),l}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.textFileService.models.onModelDirty(function(t){return e.onDirtyStateChange(t)})),this.toUnbind.push(this.textFileService.models.onModelSaveError(function(t){return e.onDirtyStateChange(t)})),this.toUnbind.push(this.textFileService.models.onModelSaved(function(t){return e.onDirtyStateChange(t)})),this.toUnbind.push(this.textFileService.models.onModelReverted(function(t){return e.onDirtyStateChange(t)})),
this.toUnbind.push(this.textFileService.models.onModelOrphanedChanged(function(t){return e.onModelOrphanedChanged(t)}))},t.prototype.onDirtyStateChange=function(e){e.resource.toString()===this.resource.toString()&&this._onDidChangeDirty.fire()},t.prototype.onModelOrphanedChanged=function(e){e.resource.toString()===this.resource.toString()&&this._onDidChangeLabel.fire()},t.prototype.getResource=function(){return this.resource},t.prototype.setPreferredEncoding=function(e){this.preferredEncoding=e,e&&(this.forceOpenAsText=!0)},t.prototype.getEncoding=function(){var e=this.textFileService.models.get(this.resource);return e?e.getEncoding():this.preferredEncoding},t.prototype.getPreferredEncoding=function(){return this.preferredEncoding},t.prototype.setEncoding=function(e,t){this.preferredEncoding=e;var n=this.textFileService.models.get(this.resource);n&&n.setEncoding(e,t)},t.prototype.setForceOpenAsText=function(){this.forceOpenAsText=!0,this.forceOpenAsBinary=!1},t.prototype.setForceOpenAsBinary=function(){
this.forceOpenAsBinary=!0,this.forceOpenAsText=!1},t.prototype.getTypeId=function(){return C.FILE_EDITOR_INPUT_ID},t.prototype.getName=function(){return this.name||(this.name=c.basenameOrAuthority(this.resource)),this.decorateOrphanedFiles(this.name)},Object.defineProperty(t.prototype,"shortDescription",{get:function(){return s.basename(u.getPathLabel(c.dirname(this.resource),this.environmentService))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediumDescription",{get:function(){return u.getPathLabel(c.dirname(this.resource),this.environmentService,this.contextService)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longDescription",{get:function(){var e=this.resource.scheme!==E.Schemas.file?this.contextService:void 0;return u.getPathLabel(c.dirname(this.resource),this.environmentService,e)},enumerable:!0,configurable:!0}),t.prototype.getDescription=function(e){void 0===e&&(e=d.Verbosity.MEDIUM);var t;switch(e){case d.Verbosity.SHORT:t=this.shortDescription;break
;case d.Verbosity.LONG:t=this.longDescription;break;case d.Verbosity.MEDIUM:default:t=this.mediumDescription}return t},Object.defineProperty(t.prototype,"shortTitle",{get:function(){return this.getName()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediumTitle",{get:function(){return u.getPathLabel(this.resource,this.environmentService,this.contextService)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longTitle",{get:function(){var e=this.resource.scheme!==E.Schemas.file?this.contextService:void 0;return u.getPathLabel(this.resource,this.environmentService,e)},enumerable:!0,configurable:!0}),t.prototype.getTitle=function(e){var t;switch(e){case d.Verbosity.SHORT:t=this.shortTitle;break;case d.Verbosity.MEDIUM:t=this.mediumTitle;break;case d.Verbosity.LONG:t=this.longTitle}return this.decorateOrphanedFiles(t)},t.prototype.decorateOrphanedFiles=function(e){var t=this.textFileService.models.get(this.resource)
;return t&&t.hasState(f.ModelState.ORPHAN)?i.localize(0,null,e):e},t.prototype.isDirty=function(){var e=this.textFileService.models.get(this.resource);return!!e&&(!(!e.hasState(f.ModelState.CONFLICT)&&!e.hasState(f.ModelState.ERROR))||this.textFileService.getAutoSaveMode()!==f.AutoSaveMode.AFTER_SHORT_DELAY&&e.isDirty())},t.prototype.confirmSave=function(){return this.textFileService.confirmSave([this.resource])},t.prototype.save=function(){return this.textFileService.save(this.resource)},t.prototype.revert=function(e){return this.textFileService.revert(this.resource,e)},t.prototype.getPreferredEditorId=function(e){return this.forceOpenAsBinary?C.BINARY_FILE_EDITOR_ID:C.TEXT_FILE_EDITOR_ID},t.prototype.resolve=function(e){return this.forceOpenAsBinary?this.doResolveAsBinary():this.doResolveAsText(e)},t.prototype.doResolveAsText=function(e){var t=this;return this.textFileService.models.loadOrCreate(this.resource,{encoding:this.preferredEncoding,reload:e,allowBinary:this.forceOpenAsText}).then(function(e){
return t.textModelReference||(t.textModelReference=t.textModelResolverService.createModelReference(t.resource)),t.textModelReference.then(function(e){return e.object})},function(e){return e.fileOperationResult===p.FileOperationResult.FILE_IS_BINARY||e.fileOperationResult===p.FileOperationResult.FILE_TOO_LARGE?t.doResolveAsBinary():r.TPromise.wrapError(e)})},t.prototype.doResolveAsBinary=function(){return this.instantiationService.createInstance(h.BinaryEditorModel,this.resource,this.getName()).load().then(function(e){return e})},t.prototype.isResolved=function(){return!!this.textFileService.models.get(this.resource)},t.prototype.getTelemetryDescriptor=function(){var t=this,n=e.prototype.getTelemetryDescriptor.call(this);return n.resource=y.telemetryURIDescriptor(this.getResource(),function(e){return t.hashService.createSHA1(e)}),n},t.prototype.dispose=function(){this.textModelReference&&(this.textModelReference.done(function(e){return e.dispose()}),this.textModelReference=null),
this.toUnbind=m.dispose(this.toUnbind),e.prototype.dispose.call(this)},t.prototype.matches=function(n){return!0===e.prototype.matches.call(this,n)||!!n&&(n instanceof t&&n.resource.toString()===this.resource.toString())},a([o.memoize],t.prototype,"shortDescription",null),a([o.memoize],t.prototype,"mediumDescription",null),a([o.memoize],t.prototype,"longDescription",null),a([o.memoize],t.prototype,"shortTitle",null),a([o.memoize],t.prototype,"mediumTitle",null),a([o.memoize],t.prototype,"longTitle",null),t=a([l(2,v.IInstantiationService),l(3,g.IWorkspaceContextService),l(4,f.ITextFileService),l(5,b.IEnvironmentService),l(6,S.ITextModelService),l(7,_.IHashService)],t)}(d.EditorInput);t.FileEditorInput=w}),define(e[1424],t([1,0,641,376,28,12,42,293,96,33,21]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(n,i,r,o,s){var a=e.call(this,t.ID,{openInternal:function(e,t){return a.openInternal(e,t)},openExternal:function(e){
return a.openExternal(e)}},n,i,r)||this;return a.windowsService=o,a.editorService=s,a}return n(t,e),t.prototype.openInternal=function(e,t){e instanceof u.FileEditorInput&&(e.setForceOpenAsText(),this.editorService.openEditor(e,t,this.group))},t.prototype.openExternal=function(e){var t=this;this.windowsService.openExternal(e.toString()).then(function(n){if(!n)return t.windowsService.showItemInFolder(e.fsPath)})},t.prototype.getTitle=function(){return this.input?this.input.getName():i.localize(0,null)},t.ID=d.BINARY_FILE_EDITOR_ID,t=a([l(0,o.ITelemetryService),l(1,s.IThemeService),l(2,h.IFileService),l(3,c.IWindowsService),l(4,p.IEditorService)],t)}(r.BaseBinaryResourceEditor);t.BinaryFileEditor=f}),define(e[1425],t([1,0,4,9,25,40,48,33,293,38,5,20,36,17,11,18,50,27,45,374,42,96,21,53]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var T=function(){function e(e,t,n,i,r,o,s,a,c){this.editorService=e,this.textFileService=t,
this.lifecycleService=n,this.editorGroupService=i,this.fileService=r,this.environmentService=o,this.configurationService=s,this.contextService=a,this.windowService=c,this.toUnbind=[],this.modelLoadQueue=new m.ResourceQueue,this.activeOutOfWorkspaceWatchers=new y.ResourceMap,this.onConfigurationUpdated(s.getValue()),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.fileService.onAfterOperation(function(t){return e.onFileOperation(t)})),this.toUnbind.push(this.fileService.onFileChanges(function(t){return e.onFileChanges(t)})),this.toUnbind.push(this.editorService.onDidVisibleEditorsChange(function(){return e.handleOutOfWorkspaceWatchers()})),this.toUnbind.push(this.windowService.onDidChangeFocus(function(t){return e.onWindowFocusChange(t)})),this.lifecycleService.onShutdown(this.dispose,this),this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated(e.configurationService.getValue())}))},
e.prototype.onConfigurationUpdated=function(e){e.workbench&&e.workbench.editor&&"boolean"==typeof e.workbench.editor.closeOnFileDelete?this.closeOnFileDelete=e.workbench.editor.closeOnFileDelete:this.closeOnFileDelete=!0},e.prototype.onWindowFocusChange=function(e){var t=this;e&&p.distinct(this.editorService.visibleEditors.map(function(e){var n=o.toResource(e,{supportSideBySide:!0});return n?t.textFileService.models.get(n):void 0}).filter(function(e){return e&&!e.isDirty()}),function(e){return e.getResource().toString()}).forEach(function(e){return t.queueModelLoad(e)})},e.prototype.onFileOperation=function(e){e.operation===c.FileOperation.MOVE&&this.handleMovedFileInOpenedEditors(e.resource,e.target.resource),e.operation!==c.FileOperation.DELETE&&e.operation!==c.FileOperation.MOVE||this.handleDeletes(e.resource,!1,e.target?e.target.resource:void 0)},e.prototype.onFileChanges=function(e){this.handleUpdates(e),e.gotDeleted()&&this.handleDeletes(e,!0)},e.prototype.handleDeletes=function(e,t,i){var o=this
;this.getOpenedFileEditors(!1).forEach(function(s){var a=s.getResource();if(o.closeOnFileDelete||!t||!s.isResolved()){if(i&&r.isEqualOrParent(a.fsPath,i.fsPath,!v.isLinux)&&0===a.fsPath.indexOf(i.fsPath))return;if(!(e instanceof c.FileChangesEvent?e.contains(a,c.FileChangeType.DELETED):r.isEqualOrParent(a.fsPath,e.fsPath,!v.isLinux)))return;(t?n.TPromise.timeout(100).then(function(){return o.fileService.existsFile(a)}):n.TPromise.as(!1)).done(function(e){e||s.isDisposed()?o.environmentService.verbose&&console.warn("File exists even though we received a delete event: "+a.toString()):s.dispose()})}})},e.prototype.getOpenedFileEditors=function(e){var t=[];return this.editorService.editors.forEach(function(n){if(n instanceof u.FileEditorInput)!!n.isDirty()===e&&t.push(n);else if(n instanceof o.SideBySideEditorInput){var i=n.master,r=n.details;i instanceof u.FileEditorInput&&!!i.isDirty()===e&&t.push(i),r instanceof u.FileEditorInput&&!!r.isDirty()===e&&t.push(r)}}),t},
e.prototype.handleMovedFileInOpenedEditors=function(e,t){var n=this;this.editorGroupService.groups.forEach(function(i){i.editors.forEach(function(o){if(o instanceof u.FileEditorInput){var s=o.getResource();if(r.isEqualOrParent(s.fsPath,e.fsPath,!v.isLinux)){var a=void 0;if(e.toString()===s.toString())a=t;else{var c=n.getIndexOfPath(s.path,e.path);a=t.with({path:r.join(t.path,s.path.substr(c+e.path.length+1))})}n.editorService.openEditor({resource:a,options:{preserveFocus:!0,pinned:i.isPinned(o),index:i.getIndexOfEditor(o),inactive:!i.isActive(o),viewState:n.getViewStateFor(e,i)}},i)}}})})},e.prototype.getIndexOfPath=function(e,t){return t.length>e.length?-1:e===t?0:(v.isLinux||(e=e.toLowerCase(),t=t.toLowerCase()),e.indexOf(t))},e.prototype.getViewStateFor=function(e,t){for(var n=this.editorService.visibleControls,i=0;i<n.length;i++){var r=n[i];if(r&&r.input&&r.group===t){var o=r.input.getResource();if(o&&e.toString()===o.toString()){var s=r.getControl();if(S.isCodeEditor(s))return s.saveViewState()}}}},
e.prototype.handleUpdates=function(e){this.handleUpdatesToVisibleBinaryEditors(e),this.handleUpdatesToTextModels(e)},e.prototype.handleUpdatesToVisibleBinaryEditors=function(e){var t=this;this.editorService.visibleControls.forEach(function(n){var i=o.toResource(n.input,{supportSideBySide:!0}),r=!1;r=n instanceof _.SideBySideEditor?n.getMasterEditor().getId()===E.BINARY_FILE_EDITOR_ID:n.getId()===E.BINARY_FILE_EDITOR_ID,i&&r&&(e.contains(i,c.FileChangeType.UPDATED)||e.contains(i,c.FileChangeType.ADDED))&&t.editorService.openEditor(n.input,{forceOpen:!0,preserveFocus:!0},n.group)})},e.prototype.handleUpdatesToTextModels=function(e){var t=this;p.distinct(e.getUpdated().concat(e.getAdded()).map(function(e){return t.textFileService.models.get(e.resource)}).filter(function(e){return e&&!e.isDirty()}),function(e){return e.getResource().toString()}).forEach(function(e){return t.queueModelLoad(e)})},e.prototype.queueModelLoad=function(e){var t=this.modelLoadQueue.queueFor(e.getResource())
;t.size<=1&&t.queue(function(){return e.load().then(null,i.onUnexpectedError)})},e.prototype.handleOutOfWorkspaceWatchers=function(){var e=this,t=new y.ResourceMap;this.editorService.visibleEditors.map(function(e){return o.toResource(e,{supportSideBySide:!0})}).filter(function(t){return!!t&&e.fileService.canHandleResource(t)&&!e.contextService.isInsideWorkspace(t)}).forEach(function(e){t.set(e,e)}),this.activeOutOfWorkspaceWatchers.forEach(function(n){t.get(n)||(e.fileService.unwatchFileChanges(n),e.activeOutOfWorkspaceWatchers.delete(n))}),t.forEach(function(t){e.activeOutOfWorkspaceWatchers.get(t)||(e.fileService.watchFileChanges(t),e.activeOutOfWorkspaceWatchers.set(t,t))})},e.prototype.dispose=function(){var e=this;this.toUnbind=h.dispose(this.toUnbind),this.activeOutOfWorkspaceWatchers.forEach(function(t){return e.fileService.unwatchFileChanges(t)}),this.activeOutOfWorkspaceWatchers.clear()},
e=a([l(0,w.IEditorService),l(1,s.ITextFileService),l(2,d.ILifecycleService),l(3,I.IEditorGroupsService),l(4,c.IFileService),l(5,f.IEnvironmentService),l(6,g.IConfigurationService),l(7,b.IWorkspaceContextService),l(8,C.IWindowService)],e)}();t.FileEditorTracker=T}),define(e[1426],t([1,0,25,28,34,127,6,351,12,48,17,161,72,159,125,53,21]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(t,n,r){var o=e.call(this,i.basename(t.fsPath),i.dirname(t.fsPath),t.with({scheme:m.LOG_SCHEME}),n,r)||this;return o.file=t,o}return n(t,e),t.prototype.getTypeId=function(){return t.ID},t.prototype.getResource=function(){return this.file},t.ID="workbench.editorinputs.output",t=a([l(1,g.ITextModelService),l(2,v.IHashService)],t)}(f.ResourceEditorInput);t.LogViewerInput=S;var _=function(e){function t(n,i,r,o,s,a,c,l,u){return e.call(this,t.LOG_VIEWER_EDITOR_ID,n,i,r,s,a,c,l,u)||this}return n(t,e),t.prototype.getConfigurationOverrides=function(){
var t=e.prototype.getConfigurationOverrides.call(this);return t.wordWrap="off",t.folding=!1,t.scrollBeyondLastLine=!1,t},t.LOG_VIEWER_EDITOR_ID="workbench.editors.logViewer",t=a([l(0,r.ITelemetryService),l(1,c.IInstantiationService),l(2,o.IStorageService),l(3,p.IConfigurationService),l(4,s.ITextResourceConfigurationService),l(5,d.IThemeService),l(6,y.IEditorGroupsService),l(7,h.ITextFileService),l(8,b.IEditorService)],t)}(u.AbstractTextResourceEditor);t.LogViewer=_}),define(e[502],t([1,0,671,4,28,34,127,6,137,15,351,125,477,12,48,17,53,21,900]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(t,n,i,r,o,s,a,c,l,u,d){var h=e.call(this,f.OUTPUT_PANEL_ID,t,n,i,o,s,l,u,d)||this;return h.baseConfigurationService=r,h.outputService=a,h.contextKeyService=c,h.scopedInstantiationService=n,h}return n(t,e),t.prototype.getId=function(){return f.OUTPUT_PANEL_ID},t.prototype.getTitle=function(){return i.localize(0,null)},
t.prototype.getActions=function(){var e=this;return this.actions||(this.actions=[this.instantiationService.createInstance(g.SwitchOutputAction),this.instantiationService.createInstance(g.ClearOutputAction,g.ClearOutputAction.ID,g.ClearOutputAction.LABEL),this.instantiationService.createInstance(g.ToggleOutputScrollLockAction,g.ToggleOutputScrollLockAction.ID,g.ToggleOutputScrollLockAction.LABEL),this.instantiationService.createInstance(g.OpenLogOutputFile)],this.actions.forEach(function(t){e.toUnbind.push(t)})),this.actions},t.prototype.getActionItem=function(t){return t.id===g.SwitchOutputAction.ID?this.instantiationService.createInstance(g.SwitchOutputActionItem,t):e.prototype.getActionItem.call(this,t)},t.prototype.getConfigurationOverrides=function(){var t=e.prototype.getConfigurationOverrides.call(this);t.wordWrap="on",t.lineNumbers="off",t.glyphMargin=!1,t.lineDecorationsWidth=20,t.rulers=[],t.folding=!1,t.scrollBeyondLastLine=!1,t.renderLineHighlight="none",t.minimap={enabled:!1}
;var n=this.baseConfigurationService.getValue("[Log]");return n&&(n["editor.minimap.enabled"]&&(t.minimap={enabled:!0}),"editor.wordWrap"in n&&(t.wordWrap=n["editor.wordWrap"])),t},t.prototype.getAriaLabel=function(){var e=this.outputService.getActiveChannel();return e?i.localize(1,null,e.label):i.localize(2,null)},t.prototype.setInput=function(t,n,i){var o=this;return t.matches(this.input)?r.TPromise.as(null):(this.input&&this.input.dispose(),e.prototype.setInput.call(this,t,n,i).then(function(){return o.revealLastLine(!1)}))},t.prototype.clearInput=function(){this.input&&this.input.dispose(),e.prototype.clearInput.call(this)},t.prototype.createEditor=function(t){var n=this.contextKeyService.createScoped(t);this.toUnbind.push(n),this.scopedInstantiationService=this.instantiationService.createChild(new d.ServiceCollection([h.IContextKeyService,n])),e.prototype.createEditor.call(this,t),f.CONTEXT_IN_OUTPUT.bindTo(n).set(!0)},Object.defineProperty(t.prototype,"instantiationService",{get:function(){
return this.scopedInstantiationService},enumerable:!0,configurable:!0}),t=a([l(0,o.ITelemetryService),l(1,u.IInstantiationService),l(2,s.IStorageService),l(3,y.IConfigurationService),l(4,c.ITextResourceConfigurationService),l(5,v.IThemeService),l(6,f.IOutputService),l(7,h.IContextKeyService),l(8,b.IEditorGroupsService),l(9,m.ITextFileService),l(10,S.IEditorService)],t)}(p.AbstractTextResourceEditor);t.OutputPanel=_}),define(e[1428],t([1,0,672,73,181,16,31,52,107,56,1347,477,125,108,29,502,147,1426,112,75,38,6,72,21]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";function T(e){var t=e.id,n=e.handler,i=e.title,r=e.category,o=e.f1,a=e.menu,l=e.keybinding;v.CommandsRegistry.registerCommand(t,n);var u={id:t,title:i,category:r};if(o&&s.MenuRegistry.addCommand(u),a){var d=a.menuId,h=a.when,p=a.group;s.MenuRegistry.appendMenuItem(d,{command:u,when:h,group:p})}if(l){var h=l.when,f=l.weight,g=l.keys;c.KeybindingsRegistry.registerKeybindingRule({id:t,when:h,weight:f,primary:g.primary,
secondary:g.secondary,linux:g.linux,mac:g.mac,win:g.win})}}Object.defineProperty(t,"__esModule",{value:!0}),u.registerSingleton(f.IOutputService,h.OutputService),r.ModesRegistry.registerLanguage({id:f.OUTPUT_MODE_ID,extensions:[],aliases:[null],mimetypes:[f.OUTPUT_MIME]}),r.ModesRegistry.registerLanguage({id:f.LOG_MODE_ID,extensions:[],aliases:[null],mimetypes:[f.LOG_MIME]}),o.Registry.as(g.Extensions.Panels).registerPanel(new g.PanelDescriptor(m.OutputPanel,f.OUTPUT_PANEL_ID,n.localize(0,null),"output",20,p.ToggleOutputAction.ID)),o.Registry.as(y.Extensions.Editors).registerEditor(new y.EditorDescriptor(b.LogViewer,b.LogViewer.LOG_VIEWER_EDITOR_ID,n.localize(1,null)),[new S.SyncDescriptor(b.LogViewerInput)]);var x=function(){function e(e,t){t.registerTextModelContentProvider(f.LOG_SCHEME,e.createInstance(h.LogContentProvider))}return e=a([l(0,E.IInstantiationService),l(1,w.ITextModelService)],e)}();o.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(x,C.LifecyclePhase.Running)
;var k=o.Registry.as(d.Extensions.WorkbenchActions);k.registerWorkbenchAction(new s.SyncActionDescriptor(p.ToggleOutputAction,p.ToggleOutputAction.ID,p.ToggleOutputAction.LABEL,{primary:3123,linux:{primary:i.KeyChord(2089,2086)}}),"View: Toggle Output",n.localize(2,null)),k.registerWorkbenchAction(new s.SyncActionDescriptor(p.ClearOutputAction,p.ClearOutputAction.ID,p.ClearOutputAction.LABEL),"View: Clear Output",n.localize(3,null)),T({id:"editor.action.clearoutput",title:n.localize(4,null),menu:{menuId:s.MenuId.EditorContext,when:f.CONTEXT_IN_OUTPUT},handler:function(e){e.get(f.IOutputService).getActiveChannel().clear()}}),T({id:"workbench.action.openActiveLogOutputFile",title:n.localize(5,null),menu:{menuId:s.MenuId.CommandPalette,when:f.CONTEXT_ACTIVE_LOG_OUTPUT},handler:function(e){e.get(E.IInstantiationService).createInstance(p.OpenLogOutputFile).run()}}),v.CommandsRegistry.registerCommand(f.COMMAND_OPEN_LOG_VIEWER,function(e,t){if(t){
return e.get(I.IEditorService).openEditor(e.get(E.IInstantiationService).createInstance(b.LogViewerInput,t))}return null})}),define(e[354],t([1,0,8,155,92,20,18,9,7,254,5,14,10,4,32,157,127,296,559,265,429,679,17,15,6,77,119,16,34,28,26,68,12,27,147,124,290,96,1392,196,297,21,53,115,342,48,183]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var Z=function(e){function t(n,i,r,o,s,a,c){var l=e.call(this,t.ID,i,a)||this;return l.preferencesService=n,l.editorService=r,l.contextKeyService=o,l.instantiationService=s,l.progressService=c,l.lastFocusedWidget=null,l.minimumHeight=260,l._onDidCreateWidget=new p.Emitter,l.onDidSizeConstraintsChange=l._onDidCreateWidget.event,l.defaultSettingsEditorContextKey=G.CONTEXT_SETTINGS_EDITOR.bindTo(l.contextKeyService),l.searchFocusContextKey=G.CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(l.contextKeyService),l.delayedFilterLogging=new d.Delayer(1e3),
l.localSearchDelayer=new d.Delayer(100),l.remoteSearchThrottle=new d.ThrottledDelayer(200),l}return n(t,e),Object.defineProperty(t.prototype,"minimumWidth",{get:function(){return this.sideBySidePreferencesWidget?this.sideBySidePreferencesWidget.minimumWidth:0},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumWidth",{get:function(){return this.sideBySidePreferencesWidget?this.sideBySidePreferencesWidget.maximumWidth:Number.POSITIVE_INFINITY},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.createEditor=function(e){var t=this;i.addClass(e,"preferences-editor"),this.headerContainer=i.append(e,i.$(".preferences-header"));var n=i.append(this.headerContainer,i.$(".new-settings-ad"));i.append(n,i.$("span.new-settings-ad-label")).textContent=T.localize(0,null)+" ";var o=this._register(new r.Button(n,{title:!0,buttonBackground:null,buttonHoverBackground:null}));o.style({buttonBackground:null,buttonForeground:null,buttonBorder:null,buttonHoverBackground:null}),
o.label=T.localize(1,null),o.element.classList.add("open-settings2-button"),this._register(o.onDidClick(function(){return t.preferencesService.openSettings2()})),this.searchWidget=this._register(this.instantiationService.createInstance(U.SearchWidget,this.headerContainer,{ariaLabel:T.localize(2,null),placeholder:T.localize(3,null),focusKey:this.searchFocusContextKey,showResultCount:!0})),this._register(this.searchWidget.onDidChange(function(e){return t.onInputChanged()})),this._register(this.searchWidget.onFocus(function(){return t.lastFocusedWidget=t.searchWidget})),this.lastFocusedWidget=this.searchWidget;var s=i.append(e,i.$(".preferences-editors-container"));this.sideBySidePreferencesWidget=this._register(this.instantiationService.createInstance(te,s)),this._onDidCreateWidget.fire(),this._register(this.sideBySidePreferencesWidget.onFocus(function(){return t.lastFocusedWidget=t.sideBySidePreferencesWidget})),this._register(this.sideBySidePreferencesWidget.onDidSettingsTargetChange(function(e){
return t.switchSettings(e)})),this.preferencesRenderers=this._register(this.instantiationService.createInstance(ee)),this._register(this.preferencesRenderers.onDidFilterResultsCountChange(function(e){return t.showSearchResultsMessage(e)}))},t.prototype.clearSearchResults=function(){this.searchWidget&&this.searchWidget.clear()},t.prototype.focusNextResult=function(){this.preferencesRenderers&&this.preferencesRenderers.focusNextPreference(!0)},t.prototype.focusPreviousResult=function(){this.preferencesRenderers&&this.preferencesRenderers.focusNextPreference(!1)},t.prototype.editFocusedPreference=function(){this.preferencesRenderers.editFocusedPreference()},t.prototype.setInput=function(t,n,i){var r=this;return this.defaultSettingsEditorContextKey.set(!0),e.prototype.setInput.call(this,t,n,i).then(function(){return r.updateInput(t,n,i)})},t.prototype.layout=function(e){this.searchWidget.layout(e);var t=i.getTotalHeight(this.headerContainer)
;this.sideBySidePreferencesWidget.layout(new i.Dimension(e.width,e.height-t))},t.prototype.getControl=function(){return this.sideBySidePreferencesWidget.getControl()},t.prototype.focus=function(){this.lastFocusedWidget&&this.lastFocusedWidget.focus()},t.prototype.focusSearch=function(e){e&&this.searchWidget.setValue(e),this.searchWidget.focus()},t.prototype.focusSettingsFileEditor=function(){this.sideBySidePreferencesWidget&&this.sideBySidePreferencesWidget.focus()},t.prototype.clearInput=function(){this.defaultSettingsEditorContextKey.set(!1),this.sideBySidePreferencesWidget.clearInput(),this.preferencesRenderers.onHidden(),e.prototype.clearInput.call(this)},t.prototype.setEditorVisible=function(t,n){this.sideBySidePreferencesWidget.setEditorVisible(t,n),e.prototype.setEditorVisible.call(this,t,n)},t.prototype.updateInput=function(e,t,n){var i=this;return this.sideBySidePreferencesWidget.setInput(e.details,e.master,t,n).then(function(e){var t=e.defaultPreferencesRenderer,r=e.editablePreferencesRenderer
;n.isCancellationRequested||(i.preferencesRenderers.defaultPreferencesRenderer=t,i.preferencesRenderers.editablePreferencesRenderer=r,i.onInputChanged())})},t.prototype.onInputChanged=function(){var e=this,t=this.searchWidget.getValue().trim();this.delayedFilterLogging.cancel(),this.triggerSearch(t).then(function(){e.preferencesRenderers.lastFilterResult&&e.delayedFilterLogging.trigger(function(){return e.reportFilteringUsed(t,e.preferencesRenderers.lastFilterResult)})})},t.prototype.triggerSearch=function(e){var t=this;return e?y.TPromise.join([this.localSearchDelayer.trigger(function(){return t.preferencesRenderers.localFilterPreferences(e)}),this.remoteSearchThrottle.trigger(function(){return t.progressService.showWhile(t.preferencesRenderers.remoteSearchPreferences(e),500)})]):(this.localSearchDelayer.cancel(),this.preferencesRenderers.localFilterPreferences(e),this.remoteSearchThrottle.cancel(),this.preferencesRenderers.remoteSearchPreferences(e))},t.prototype.switchSettings=function(e){var t=this
;this.editorService.activeControl!==this&&this.focus();(this.input&&this.input.isDirty()?this.input.save():y.TPromise.as(!0)).done(function(n){e===x.ConfigurationTarget.USER?t.preferencesService.switchSettings(x.ConfigurationTarget.USER,t.preferencesService.userSettingsResource):e===x.ConfigurationTarget.WORKSPACE?t.preferencesService.switchSettings(x.ConfigurationTarget.WORKSPACE,t.preferencesService.workspaceSettingsResource):e instanceof m.default&&t.preferencesService.switchSettings(x.ConfigurationTarget.WORKSPACE_FOLDER,e)})},t.prototype.showSearchResultsMessage=function(e){var t=e.count;e.target?this.sideBySidePreferencesWidget.setResultCount(e.target,e.count):this.searchWidget.getValue()?0===t?this.searchWidget.showMessage(T.localize(4,null),t):1===t?this.searchWidget.showMessage(T.localize(5,null),t):this.searchWidget.showMessage(T.localize(6,null,t),t):this.searchWidget.showMessage(T.localize(7,null,t),t)},t.prototype._countById=function(e){for(var t={},n=0,i=e;n<i.length;n++){
for(var r=i[n],o=0,s=0,a=r.sections;s<a.length;s++){o+=a[s].settings.length}t[r.id]=o}return t},t.prototype.reportFilteringUsed=function(e,t){if(e&&e!==this._lastReportedFilter){var n,i=t&&t.metadata,r=t&&this._countById(t.filteredGroups);i&&(n=Object.create(null),Object.keys(i).forEach(function(e){return n[e]=i[e].duration}));var o={filter:e,durations:n,counts:r,requestCount:i&&i.nlpResult&&i.nlpResult.requestCount};this.telemetryService.publicLog("defaultSettings.filter",o),this._lastReportedFilter=e}},t.prototype.dispose=function(){this._onDidCreateWidget.dispose(),e.prototype.dispose.call(this)},t.ID=H.PREFERENCES_EDITOR_ID,t=a([l(0,$.IPreferencesService),l(1,M.ITelemetryService),l(2,j.IEditorService),l(3,k.IContextKeyService),l(4,D.IInstantiationService),l(5,F.IThemeService),l(6,L.IProgressService)],t)}(V.BaseEditor);t.PreferencesEditor=Z;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.next=function(){
return e.prototype.next.call(this)||e.prototype.first.call(this)},t.prototype.previous=function(){return e.prototype.previous.call(this)||e.prototype.last.call(this)},t.prototype.reset=function(){this.index=this.start-1},t}(f.ArrayNavigator),ee=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.preferencesSearchService=t,s.telemetryService=n,s.preferencesService=i,s.workspaceContextService=r,s.logService=o,s._defaultPreferencesRendererDisposables=[],s._editablePreferencesRendererDisposables=[],s._prefsModelsForSearch=new Map,s._onDidFilterResultsCountChange=s._register(new p.Emitter),s.onDidFilterResultsCountChange=s._onDidFilterResultsCountChange.event,s}return n(t,e),Object.defineProperty(t.prototype,"lastFilterResult",{get:function(){return this._lastFilterResult},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultPreferencesRenderer",{get:function(){return this._defaultPreferencesRenderer},set:function(e){var t=this
;this._defaultPreferencesRenderer!==e&&(this._defaultPreferencesRenderer=e,this._defaultPreferencesRendererDisposables=g.dispose(this._defaultPreferencesRendererDisposables),this._defaultPreferencesRenderer&&(this._defaultPreferencesRenderer.onUpdatePreference(function(e){var n=e.key,i=e.value,r=e.source;t._editablePreferencesRenderer.updatePreference(n,i,r),t._updatePreference(n,i,r)},this,this._defaultPreferencesRendererDisposables),this._defaultPreferencesRenderer.onFocusPreference(function(e){return t._focusPreference(e,t._editablePreferencesRenderer)},this,this._defaultPreferencesRendererDisposables),this._defaultPreferencesRenderer.onClearFocusPreference(function(e){return t._clearFocus(e,t._editablePreferencesRenderer)},this,this._defaultPreferencesRendererDisposables)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"editablePreferencesRenderer",{get:function(){return this._editablePreferencesRenderer},set:function(e){var t=this
;this._editablePreferencesRenderer!==e&&(this._editablePreferencesRenderer=e,this._editablePreferencesRendererDisposables=g.dispose(this._editablePreferencesRendererDisposables),this._editablePreferencesRenderer&&(this._editablePreferencesRenderer.preferencesModel.onDidChangeGroups(this._onEditableContentDidChange,this,this._editablePreferencesRendererDisposables),this._editablePreferencesRenderer.onUpdatePreference(function(e){var n=e.key,i=e.value,r=e.source;return t._updatePreference(n,i,r,!0)},this,this._defaultPreferencesRendererDisposables)))},enumerable:!0,configurable:!0}),t.prototype._onEditableContentDidChange=function(){return o(this,void 0,y.TPromise,function(){return s(this,function(e){switch(e.label){case 0:return[4,this.localFilterPreferences(this._lastQuery,!0)];case 1:return e.sent(),[4,this.remoteSearchPreferences(this._lastQuery,!0)];case 2:return e.sent(),[2]}})})},t.prototype.onHidden=function(){this._prefsModelsForSearch.forEach(function(e){return e.dispose()}),
this._prefsModelsForSearch=new Map},t.prototype.remoteSearchPreferences=function(e,t){var n=this;return this._remoteFilterInProgress&&this._remoteFilterInProgress.cancel&&this._remoteFilterInProgress.cancel(),this._currentRemoteSearchProvider=t&&this._currentRemoteSearchProvider||this.preferencesSearchService.getRemoteSearchProvider(e),this._remoteFilterInProgress=this.filterOrSearchPreferences(e,this._currentRemoteSearchProvider,"nlpResult",T.localize(8,null),1,t),this._remoteFilterInProgress.then(function(){n._remoteFilterInProgress=null},function(e){if(h.isPromiseCanceledError(e))return null;h.onUnexpectedError(e)})},t.prototype.localFilterPreferences=function(e,t){return this._settingsNavigator&&this._settingsNavigator.reset(),this._currentLocalSearchProvider=t&&this._currentLocalSearchProvider||this.preferencesSearchService.getLocalSearchProvider(e),this.filterOrSearchPreferences(e,this._currentLocalSearchProvider,"filterResult",T.localize(9,null),0,t)},
t.prototype.filterOrSearchPreferences=function(e,t,n,i,r,o){var s=this;this._lastQuery=e;var a=[this._filterOrSearchPreferences(e,this.editablePreferencesRenderer,t,n,i,r)];return o||(a.push(this._filterOrSearchPreferences(e,this.defaultPreferencesRenderer,t,n,i,r)),a.push(this.searchAllSettingsTargets(e,t,n,i,r))),y.TPromise.join(a).then(function(e){var t=e[0],n=e[1];!n&&o&&(n=s.lastFilterResult),s.consolidateAndUpdate(n,t),s._lastFilterResult=n})},t.prototype.searchAllSettingsTargets=function(e,t,n,i,r){for(var o=[this.searchSettingsTarget(e,t,x.ConfigurationTarget.WORKSPACE,n,i,r),this.searchSettingsTarget(e,t,x.ConfigurationTarget.USER,n,i,r)],s=0,a=this.workspaceContextService.getWorkspace().folders;s<a.length;s++){var c=a[s],l=this.preferencesService.getFolderSettingsResource(c.uri);o.push(this.searchSettingsTarget(e,t,l,n,i,r))}return y.TPromise.join(o).then(function(){})},t.prototype.searchSettingsTarget=function(e,t,n,i,r,o){var s=this;return e?this.getPreferencesEditorModel(n).then(function(e){
return e&&s._filterOrSearchPreferencesModel("",e,t,i,r,o)}).then(function(e){var t=e?s._flatten(e.filteredGroups).length:0;s._onDidFilterResultsCountChange.fire({target:n,count:t})},function(e){return h.isPromiseCanceledError(e)?null:y.TPromise.wrapError(e)}):(this._onDidFilterResultsCountChange.fire({target:n,count:0}),y.TPromise.wrap(null))},t.prototype.getPreferencesEditorModel=function(e){return o(this,void 0,y.TPromise,function(){var t,n,i,r,o;return s(this,function(s){switch(s.label){case 0:if(!(t=e===x.ConfigurationTarget.USER?this.preferencesService.userSettingsResource:e===x.ConfigurationTarget.WORKSPACE?this.preferencesService.workspaceSettingsResource:e))return[2,null];if(n=t.toString(),this._prefsModelsForSearch.has(n))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),r=this._register,[4,this.preferencesService.createPreferencesEditorModel(t)];case 2:return i=r.apply(this,[s.sent()]),this._prefsModelsForSearch.set(n,i),[3,4];case 3:return o=s.sent(),[2,null];case 4:
return[2,this._prefsModelsForSearch.get(n)]}})})},t.prototype.focusNextPreference=function(e){if(void 0===e&&(e=!0),this._settingsNavigator){var t=e?this._settingsNavigator.next():this._settingsNavigator.previous();this._focusPreference(t,this._defaultPreferencesRenderer),this._focusPreference(t,this._editablePreferencesRenderer)}},t.prototype.editFocusedPreference=function(){if(this._settingsNavigator&&this._settingsNavigator.current()){var e=this._settingsNavigator.current();this._editablePreferencesRenderer.editPreference(e)||this.defaultPreferencesRenderer.editPreference(e)}},t.prototype._filterOrSearchPreferences=function(e,t,n,i,r,o){if(!t)return y.TPromise.wrap(null);var s=t.preferencesModel;return this._filterOrSearchPreferencesModel(e,s,n,i,r,o).then(function(e){return t.filterPreferences(e),e})},t.prototype._filterOrSearchPreferencesModel=function(e,t,n,i,r,o){var s=this;return(n?n.searchModel(t):y.TPromise.wrap(null)).then(null,function(t){
if(h.isPromiseCanceledError(t))return y.TPromise.wrapError(t);var n=h.getErrorMessage(t).trim();return n&&"Error"!==n&&(s.telemetryService.publicLog("defaultSettings.searchError",{message:n,filter:e}),s.logService.info("Setting search error: "+n)),null}).then(function(n){var s=n?t.updateResultGroup(i,{id:i,label:r,result:n,order:o}):t.updateResultGroup(i,null);return s&&(s.query=e),s})},t.prototype.consolidateAndUpdate=function(e,t){var n=e?e.filteredGroups:this._getAllPreferences(this._defaultPreferencesRenderer),i=t?t.filteredGroups:this._getAllPreferences(this._editablePreferencesRenderer),r=this._consolidateSettings(i,n),o=this._settingsNavigator&&this._settingsNavigator.current(),s=this._lastQuery?r:[],a=o?u.firstIndex(s,function(e){return e.key===o.key}):-1;if(this._settingsNavigator=new J(s,Math.max(a,0)),a>=0){this._settingsNavigator.next();var c=this._settingsNavigator.current();this._focusPreference(c,this._defaultPreferencesRenderer),this._focusPreference(c,this._editablePreferencesRenderer)}
var l=r.length;this._onDidFilterResultsCountChange.fire({count:l})},t.prototype._getAllPreferences=function(e){return e?e.preferencesModel.settingsGroups:[]},t.prototype._focusPreference=function(e,t){e&&t&&t.focusPreference(e)},t.prototype._clearFocus=function(e,t){e&&t&&t.clearFocus(e)},t.prototype._updatePreference=function(e,t,n,i){var r={userConfigurationKeys:[e]};if(this.lastFilterResult){r.query=this.lastFilterResult.query,r.editableSide=!!i;var o=this.lastFilterResult.metadata&&this.lastFilterResult.metadata.nlpResult;if(o){var s=Object.keys(o.scoredResults).sort(function(e,t){return o.scoredResults[t].score-o.scoredResults[e].score}),a="##"+e;r.nlpIndex=u.firstIndex(s,function(e){return v.endsWith(e,a)})}var c=this._findSetting(this.lastFilterResult,e);c&&(r.groupId=this.lastFilterResult.filteredGroups[c.groupIdx].id,r.displayIdx=c.overallSettingIdx)}this.telemetryService.publicLog("defaultSettingsActions.copySetting",r)},t.prototype._findSetting=function(e,t){
for(var n=0,i=0;i<e.filteredGroups.length;i++)for(var r=e.filteredGroups[i],o=0;o<r.sections[0].settings.length;o++){if(t===r.sections[0].settings[o].key)return{groupIdx:i,settingIdx:o,overallSettingIdx:n};n++}return null},t.prototype._consolidateSettings=function(e,t){var n=this._flatten(t),i=this._flatten(e).filter(function(e){return n.every(function(t){return t.key!==e.key})});return n.concat(i)},t.prototype._flatten=function(e){for(var t=[],n=0,i=e;n<i.length;n++)for(var r=0,o=i[n].sections;r<o.length;r++){var s=o[r];t.push.apply(t,s.settings)}return t},t.prototype.dispose=function(){g.dispose(this._defaultPreferencesRendererDisposables),g.dispose(this._editablePreferencesRendererDisposables),e.prototype.dispose.call(this)},t=a([l(0,G.IPreferencesSearchService),l(1,M.ITelemetryService),l(2,$.IPreferencesService),l(3,W.IWorkspaceContextService),l(4,A.ILogService)],t)}(g.Disposable),te=function(e){function t(t,n,r,o,s){var a=e.call(this)||this;a.instantiationService=n,a.themeService=r,
a.workspaceContextService=o,a.preferencesService=s,a.dimension=new i.Dimension(0,0),a._onFocus=new p.Emitter,a.onFocus=a._onFocus.event,a._onDidSettingsTargetChange=new p.Emitter,a.onDidSettingsTargetChange=a._onDidSettingsTargetChange.event,i.addClass(t,"side-by-side-preferences-editor"),a.splitview=new Q.SplitView(t,{orientation:Q.Orientation.HORIZONTAL}),a._register(a.splitview),a._register(a.splitview.onDidSashReset(function(){return a.splitview.distributeViewSizes()})),a.defaultPreferencesEditorContainer=i.$(".default-preferences-editor-container");var c=i.append(a.defaultPreferencesEditorContainer,i.$(".preferences-header-container"));a.defaultPreferencesHeader=i.append(c,i.$("div.default-preferences-header")),a.defaultPreferencesHeader.textContent=T.localize(10,null),a.defaultPreferencesEditor=a._register(a.instantiationService.createInstance(ne)),a.defaultPreferencesEditor.create(a.defaultPreferencesEditorContainer),a.defaultPreferencesEditor.getControl().onDidFocusEditorWidget(function(){
return a.lastFocusedEditor=a.defaultPreferencesEditor}),a.splitview.addView({element:a.defaultPreferencesEditorContainer,layout:function(e){return a.defaultPreferencesEditor.layout(new i.Dimension(e,a.dimension.height-34))},minimumSize:220,maximumSize:Number.POSITIVE_INFINITY,onDidChange:p.Event.None},Q.Sizing.Distribute),a.editablePreferencesEditorContainer=i.$(".editable-preferences-editor-container");var l=i.append(a.editablePreferencesEditorContainer,i.$(".preferences-header-container"));a.settingsTargetsWidget=a._register(a.instantiationService.createInstance(U.SettingsTargetsWidget,l)),a._register(a.settingsTargetsWidget.onDidTargetChange(function(e){return a._onDidSettingsTargetChange.fire(e)})),a._register(N.attachStylerCallback(a.themeService,{scrollbarShadow:P.scrollbarShadow},function(e){var t=e.scrollbarShadow?e.scrollbarShadow.toString():null;a.editablePreferencesEditorContainer.style.boxShadow=t?"-6px 0 5px -5px "+t:null})),a.splitview.addView({element:a.editablePreferencesEditorContainer,
layout:function(e){return a.editablePreferencesEditor&&a.editablePreferencesEditor.layout(new i.Dimension(e,a.dimension.height-34))},minimumSize:220,maximumSize:Number.POSITIVE_INFINITY,onDidChange:p.Event.None},Q.Sizing.Distribute);var u=a._register(i.trackFocus(t));return a._register(u.onDidFocus(function(){return a._onFocus.fire()})),a}return n(t,e),Object.defineProperty(t.prototype,"minimumWidth",{get:function(){return this.splitview.minimumSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumWidth",{get:function(){return this.splitview.maximumSize},enumerable:!0,configurable:!0}),t.prototype.setInput=function(e,t,n,i){var r=this;return this.getOrCreateEditablePreferencesEditor(t),this.settingsTargetsWidget.settingsTarget=this.getSettingsTarget(t.getResource()),y.TPromise.join([this.updateInput(this.defaultPreferencesEditor,e,re.ID,t.getResource(),n,i),this.updateInput(this.editablePreferencesEditor,t,oe.ID,e.getResource(),n,i)]).then(function(e){var t=e[0],n=e[1]
;return i.isCancellationRequested?{}:(r.defaultPreferencesHeader.textContent=t&&r.getDefaultPreferencesHeaderText(t.preferencesModel.target),{defaultPreferencesRenderer:t,editablePreferencesRenderer:n})})},t.prototype.getDefaultPreferencesHeaderText=function(e){switch(e){case x.ConfigurationTarget.USER:return T.localize(11,null);case x.ConfigurationTarget.WORKSPACE:return T.localize(12,null);case x.ConfigurationTarget.WORKSPACE_FOLDER:return T.localize(13,null)}return""},t.prototype.setResultCount=function(e,t){this.settingsTargetsWidget.setResultCount(e,t)},t.prototype.layout=function(e){void 0===e&&(e=this.dimension),this.dimension=e,this.splitview.layout(e.width)},t.prototype.focus=function(){this.lastFocusedEditor&&this.lastFocusedEditor.focus()},t.prototype.getControl=function(){return this.editablePreferencesEditor?this.editablePreferencesEditor.getControl():null},t.prototype.clearInput=function(){this.defaultPreferencesEditor&&this.defaultPreferencesEditor.clearInput(),
this.editablePreferencesEditor&&this.editablePreferencesEditor.clearInput()},t.prototype.setEditorVisible=function(e,t){this.defaultPreferencesEditor&&this.defaultPreferencesEditor.setVisible(e,t),this.editablePreferencesEditor&&this.editablePreferencesEditor.setVisible(e,t)},t.prototype.getOrCreateEditablePreferencesEditor=function(e){var t=this;if(this.editablePreferencesEditor)return this.editablePreferencesEditor;var n=R.Registry.as(B.Extensions.Editors).getEditor(e).instantiate(this.instantiationService);return this.editablePreferencesEditor=n,this.editablePreferencesEditor.create(this.editablePreferencesEditorContainer),this.editablePreferencesEditor.getControl().onDidFocusEditorWidget(function(){return t.lastFocusedEditor=t.editablePreferencesEditor}),this.lastFocusedEditor=this.editablePreferencesEditor,this.layout(),n},t.prototype.updateInput=function(e,t,n,i,r,o){return e.setInput(t,r,o).then(function(){
if(!o.isCancellationRequested)return e.getControl().getContribution(n).updatePreferencesRenderer(i)})},t.prototype.getSettingsTarget=function(e){if(this.preferencesService.userSettingsResource.toString()===e.toString())return x.ConfigurationTarget.USER;var t=this.preferencesService.workspaceSettingsResource;if(t&&t.toString()===e.toString())return x.ConfigurationTarget.WORKSPACE;var n=this.workspaceContextService.getWorkspaceFolder(e);return n?n.uri:x.ConfigurationTarget.USER},t.prototype.disposeEditors=function(){this.defaultPreferencesEditor&&(this.defaultPreferencesEditor.dispose(),this.defaultPreferencesEditor=null),this.editablePreferencesEditor&&(this.editablePreferencesEditor.dispose(),this.editablePreferencesEditor=null)},t.prototype.dispose=function(){this.disposeEditors(),e.prototype.dispose.call(this)},t=a([l(1,D.IInstantiationService),l(2,F.IThemeService),l(3,W.IWorkspaceContextService),l(4,$.IPreferencesService)],t)}(c.Widget),ne=function(e){function t(n,i,r,o,s,a,c,l){
return e.call(this,t.ID,n,i,r,o,s,a,l,c)||this}return n(t,e),t._getContributions=function(){var e=[E.FoldingController.prototype,I.SelectionHighlighter.prototype,C.FindController.prototype],t=b.EditorExtensionsRegistry.getEditorContributions().filter(function(t){return-1===e.indexOf(t.prototype)});return t.push(re),t},t.prototype.createEditorControl=function(e,n){var i=this,r=this.instantiationService.createInstance(S.CodeEditorWidget,e,n,{contributions:t._getContributions()});return this.toUnbind.push(r.onDidType(function(){return i.showReadonlyHint(r)})),this.toUnbind.push(r.onDidPaste(function(){return i.showReadonlyHint(r)})),r},t.prototype.showReadonlyHint=function(e){var t=w.MessageController.get(e);t.isVisible()||t.showMessage(T.localize(14,null),e.getSelection().getPosition())},t.prototype.getConfigurationOverrides=function(){var t=e.prototype.getConfigurationOverrides.call(this);return t.readOnly=!0,this.input&&(t.lineNumbers="off",t.renderLineHighlight="none",t.scrollBeyondLastLine=!1,t.folding=!1,
t.renderWhitespace="none",t.wordWrap="on",t.renderIndentGuides=!1,t.rulers=[],t.glyphMargin=!0,t.minimap={enabled:!1}),t},t.prototype.setInput=function(t,n,i){var r=this;return e.prototype.setInput.call(this,t,n,i).then(function(){return r.input.resolve().then(function(e){if(!i.isCancellationRequested)return e.load()}).then(function(e){i.isCancellationRequested||r.getControl().setModel(e.textEditorModel)})})},t.prototype.clearInput=function(){this.getControl().setModel(null),e.prototype.clearInput.call(this)},t.prototype.layout=function(e){this.getControl().layout(e)},t.prototype.getAriaLabel=function(){return T.localize(15,null)},t.ID="workbench.editor.defaultPreferences",t=a([l(0,M.ITelemetryService),l(1,D.IInstantiationService),l(2,O.IStorageService),l(3,_.ITextResourceConfigurationService),l(4,F.IThemeService),l(5,X.ITextFileService),l(6,q.IEditorGroupsService),l(7,j.IEditorService)],t)}(z.BaseTextEditor);t.DefaultPreferencesEditor=ne;var ie=function(e){function t(t,n,i,r){var o=e.call(this)||this
;return o.editor=t,o.instantiationService=n,o.preferencesService=i,o.workspaceContextService=r,o._register(o.editor.onDidChangeModel(function(){return o._onModelChanged()})),o}return n(t,e),t.prototype.updatePreferencesRenderer=function(e){var t=this;return this.preferencesRendererCreationPromise||(this.preferencesRendererCreationPromise=this._createPreferencesRenderer()),this.preferencesRendererCreationPromise?this._hasAssociatedPreferencesModelChanged(e).then(function(n){return n?t._updatePreferencesRenderer(e):t.preferencesRendererCreationPromise}):y.TPromise.as(null)},t.prototype._onModelChanged=function(){var e=this.editor.getModel();this.disposePreferencesRenderer(),e&&(this.preferencesRendererCreationPromise=this._createPreferencesRenderer())},t.prototype._hasAssociatedPreferencesModelChanged=function(e){return this.preferencesRendererCreationPromise.then(function(t){return!(t&&t.getAssociatedPreferencesModel()&&t.getAssociatedPreferencesModel().uri.toString()===e.toString())})},
t.prototype._updatePreferencesRenderer=function(e){var t=this;return this.preferencesService.createPreferencesEditorModel(e).then(function(e){return t.preferencesRendererCreationPromise.then(function(t){if(t){var n=t.getAssociatedPreferencesModel();n&&n.dispose(),t.setAssociatedPreferencesModel(e)}return t})})},t.prototype.disposePreferencesRenderer=function(){this.preferencesRendererCreationPromise&&(this.preferencesRendererCreationPromise.then(function(e){if(e){var t=e.getAssociatedPreferencesModel();t&&t.dispose(),e.preferencesModel.dispose(),e.dispose()}}),this.preferencesRendererCreationPromise=y.TPromise.as(null))},t.prototype.dispose=function(){this.disposePreferencesRenderer(),e.prototype.dispose.call(this)},t=a([l(1,D.IInstantiationService),l(2,$.IPreferencesService),l(3,W.IWorkspaceContextService)],t)}(g.Disposable),re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getId=function(){return t.ID},t.prototype._createPreferencesRenderer=function(){
var e=this;return this.preferencesService.createPreferencesEditorModel(this.editor.getModel().uri).then(function(t){if(t instanceof Y.DefaultSettingsEditorModel&&e.editor.getModel()){var n=e.instantiationService.createInstance(K.DefaultSettingsRenderer,e.editor,t);return n.render(),n}return null})},t.ID="editor.contrib.defaultsettings",t}(ie),oe=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i,r)||this;return o._register(o.workspaceContextService.onDidChangeWorkbenchState(function(){return o._onModelChanged()})),o}return n(t,e),t.prototype.getId=function(){return t.ID},t.prototype._createPreferencesRenderer=function(){var e=this;return this.isSettingsModel()?this.preferencesService.createPreferencesEditorModel(this.editor.getModel().uri).then(function(t){if(t instanceof Y.SettingsEditorModel&&e.editor.getModel())switch(t.configurationTarget){case x.ConfigurationTarget.USER:return e.instantiationService.createInstance(K.UserSettingsRenderer,e.editor,t);case x.ConfigurationTarget.WORKSPACE:
return e.instantiationService.createInstance(K.WorkspaceSettingsRenderer,e.editor,t);case x.ConfigurationTarget.WORKSPACE_FOLDER:return e.instantiationService.createInstance(K.FolderSettingsRenderer,e.editor,t)}return null}).then(function(e){return e&&e.render(),e}):null},t.prototype.isSettingsModel=function(){var e=this.editor.getModel();if(!e)return!1;if(this.preferencesService.userSettingsResource&&this.preferencesService.userSettingsResource.toString()===e.uri.toString())return!0;if(this.preferencesService.workspaceSettingsResource&&this.preferencesService.workspaceSettingsResource.toString()===e.uri.toString())return!0;for(var t=0,n=this.workspaceContextService.getWorkspace().folders;t<n.length;t++){var i=n[t],r=this.preferencesService.getFolderSettingsResource(i.uri);if(r&&r.toString()===e.uri.toString())return!0}return!1},t.ID="editor.contrib.settings",t=a([l(1,D.IInstantiationService),l(2,$.IPreferencesService),l(3,W.IWorkspaceContextService)],t)}(ie);b.registerEditorContribution(oe)}),
define(e[1430],t([1,0,701,9,4,43,5,232,21,47,54,234,72,6,66,48,184]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){return e.with({scheme:s.Schemas.internal,fragment:"replacePreview",query:JSON.stringify({scheme:e.scheme})})},_=function(){function e(e,t){this.instantiationService=e,this.textModelResolverService=t,this.textModelResolverService.registerTextModelContentProvider(s.Schemas.internal,this)}return e.prototype.provideTextContent=function(e){return"replacePreview"===e.fragment?this.instantiationService.createInstance(C).resolve(e):null},e=a([l(0,v.IInstantiationService),l(1,g.ITextModelService)],e)}();t.ReplacePreviewContentProvider=_;var C=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.modelService=t,s.modeService=n,s.textModelResolverService=i,s.replaceService=r,s.searchWorkbenchService=o,s}return n(t,e),t.prototype.resolve=function(e){var t=this,n=function(e){return e.with({
scheme:JSON.parse(e.query).scheme,fragment:"",query:""})}(e),i=this.searchWorkbenchService.searchModel.searchResult.matches().filter(function(e){return e.resource().toString()===n.toString()})[0];return this.textModelResolverService.createModelReference(n).then(function(n){var r=(n=t._register(n)).object.textEditorModel,o=r.getLanguageIdentifier().language,s=t.modelService.createModel(m.createTextBufferFactoryFromSnapshot(r.createSnapshot()),t.modeService.getOrCreateMode(o),e);return t._register(i.onChange(function(e){return t.update(r,s,i,e)})),t._register(t.searchWorkbenchService.searchModel.onReplaceTermChanged(function(){return t.update(r,s,i)})),t._register(i.onDispose(function(){return s.dispose()})),t._register(s.onWillDispose(function(){return t.dispose()})),t._register(r.onWillDispose(function(){return t.dispose()})),s})},t.prototype.update=function(e,t,n,i){void 0===i&&(i=!1),e.isDisposed()||t.isDisposed()||this.replaceService.updateReplacePreview(n,i)},
t=a([l(0,h.IModelService),l(1,p.IModeService),l(2,g.ITextModelService),l(3,u.IReplaceService),l(4,f.ISearchWorkbenchService)],t)}(c.Disposable),E=function(){function e(e,t,n,i){this.textFileService=e,this.editorService=t,this.textModelResolverService=n,this.bulkEditorService=i}return e.prototype.replace=function(e,t,n){var i=this;void 0===t&&(t=null),void 0===n&&(n=null);var r=[];if(e instanceof f.Match){var o=e;r.push(this.createEdit(o,o.replaceString,n))}return e instanceof f.FileMatch&&(e=[e]),e instanceof Array&&e.forEach(function(e){var t=e;t.count()>0&&r.push.apply(r,t.matches().map(function(e){return i.createEdit(e,e.replaceString,n)}))}),this.bulkEditorService.apply({edits:r},{progress:t}).then(function(){return i.textFileService.saveAll(r.map(function(e){return e.resource}))})},e.prototype.openReplacePreview=function(e,t,n,o){var s=this,a=e instanceof f.Match?e.parent():e;return this.editorService.openEditor({leftResource:a.resource(),rightResource:S(a.resource()),
label:i.localize(0,null,a.name(),a.name()),options:{preserveFocus:t,pinned:o,revealIfVisible:!0}}).then(function(t){s.updateReplacePreview(a).then(function(){var n=t.getControl();e instanceof f.Match&&n.revealLineInCenter(e.range().startLineNumber,1)})},r.onUnexpectedError)},e.prototype.updateReplacePreview=function(e,t){var n=this;void 0===t&&(t=!1);var i=S(e.resource());return o.TPromise.join([this.textModelResolverService.createModelReference(e.resource()),this.textModelResolverService.createModelReference(i)]).then(function(r){var s=r[0],a=r[1],c=s.object.textEditorModel,l=a.object.textEditorModel,u=o.TPromise.wrap(null);return c&&l&&(t?l.setValue(c.getValue()):l.undo(),u=n.replace(e,null,i)),u.then(function(){s.dispose(),a.dispose()})})},e.prototype.createEdit=function(e,t,n){void 0===n&&(n=null);var i=e.parent();return{resource:null!==n?n:i.resource(),edits:[{range:e.range(),text:t}]}},e=a([l(0,y.ITextFileService),l(1,d.IEditorService),l(2,g.ITextModelService),l(3,b.IBulkEditService)],e)}()
;t.ReplaceService=E}),define(e[1431],t([1,0,107,232,1430,16,75,38]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerContributions=function(){n.registerSingleton(i.IReplaceService,r.ReplaceService),o.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(r.ReplacePreviewContentProvider,a.LifecyclePhase.Starting)}}),define(e[1432],t([1,0,714,11,47,75,16,6,28,34,139,76,38,22,48]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){return function(e,t,i,r,o,s,a){var c=e.surveyId+".sessionCount",l=e.surveyId+".lastSessionDate",u=e.surveyId+".skipVersion",p=e.surveyId+".isCandidate",f=e.surveyId+".editedCount",m=e.surveyId+".editedDate";if(!i.get(u,d.StorageScope.GLOBAL,"")){var y=(new Date).toDateString();i.getInteger(f,d.StorageScope.GLOBAL,0)<e.editCount&&a.models.onModelsSaved(function(t){t.forEach(function(t){if(t.kind===v.StateChange.SAVED){var n=s.getModel(t.resource)
;if(n&&n.getModeId()===e.languageId&&y!==i.get(m,d.StorageScope.GLOBAL)){var r=i.getInteger(f,d.StorageScope.GLOBAL,0)+1;i.store(f,r,d.StorageScope.GLOBAL),i.store(m,y,d.StorageScope.GLOBAL)}}})});var b=i.get(l,d.StorageScope.GLOBAL,new Date(0).toDateString());if(y!==b){var S=i.getInteger(c,d.StorageScope.GLOBAL,0)+1;if(i.store(l,y,d.StorageScope.GLOBAL),i.store(c,S,d.StorageScope.GLOBAL),!(S<9||i.getInteger(f,d.StorageScope.GLOBAL,0)<e.editCount)){var _=i.getBoolean(p,d.StorageScope.GLOBAL,!1)||Math.random()<e.userProbability;i.store(p,_,d.StorageScope.GLOBAL),_?(o.publicLog(e.surveyId+".survey/userAsked"),r.prompt(g.Severity.Info,n.localize(0,null,e.languageId),[{label:n.localize(1,null),run:function(){o.publicLog(e.surveyId+".survey/takeShortSurvey"),o.getTelemetryInfo().then(function(t){window.open(e.surveyUrl+"?o="+encodeURIComponent(process.platform)+"&v="+encodeURIComponent(h.default.version)+"&m="+encodeURIComponent(t.machineId)),i.store(p,!1,d.StorageScope.GLOBAL),
i.store(u,h.default.version,d.StorageScope.GLOBAL)})}},{label:n.localize(2,null),run:function(){o.publicLog(e.surveyId+".survey/remindMeLater"),i.store(c,S-3,d.StorageScope.GLOBAL)}},{label:n.localize(3,null),isSecondary:!0,run:function(){o.publicLog(e.surveyId+".survey/dontShowAgain"),i.store(p,!1,d.StorageScope.GLOBAL),i.store(u,h.default.version,d.StorageScope.GLOBAL)}}])):i.store(u,h.default.version,d.StorageScope.GLOBAL)}}}}}(),y=function(){function e(e,t,n,i,r,o){p.default.surveys.filter(function(e){return e.surveyId&&e.editCount&&e.languageId&&e.surveyUrl&&e.userProbability}).map(function(s){return new m(s,e,t,n,i,r,o)})}return e=a([l(0,c.IInstantiationService),l(1,d.IStorageService),l(2,g.INotificationService),l(3,u.ITelemetryService),l(4,r.IModelService),l(5,v.ITextFileService)],e)}();if("en"===i.language&&p.default.surveys&&p.default.surveys.length){s.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(y,f.LifecyclePhase.Running)}}),
define(e[1433],t([1,0,724,236,1240,4,83,24,10,23,8,5,7,30,361,14,391,136,11,50,243,16,38,31,107,90,28,17,33,49,29,52,177,34,174,88,42,22,100,47,120,172,86,64,81,201,46,21,266,27,48,125,146,94,350,154,216,1165,320,441,1253,1252,1256,431,69,12,1250,1251,916]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z,J,ee,te,ne,ie,re,oe,se,ae,ce,le,ue,de,he,pe,fe,ge,ve,me){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var ye,be=i.localize(0,null);!function(e){e.ID="workbench.action.tasks.configureTaskRunner",e.TEXT=i.localize(1,null)}(ye||(ye={}));var Se=function(e){function t(t,n,i,r,o,s){var a=e.call(this,o)||this;return a.panelService=t,a.markerService=n,a.taskService=i,a.partService=r,a.contextService=s,a.activeCount=0,a.icons=[],a.registerListeners(),a}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.contextService.onDidChangeWorkbenchState(function(){return e.updateStyles()}))},
t.prototype.updateStyles=function(){var t=this;e.prototype.updateStyles.call(this),this.icons.forEach(function(e){e.style.backgroundColor=t.getColor(t.contextService.getWorkbenchState()!==J.WorkbenchState.EMPTY?fe.STATUS_BAR_FOREGROUND:fe.STATUS_BAR_NO_FOLDER_FOREGROUND)})},t.prototype.render=function(e){var t=this,n=[],r=document.createElement("div"),o=document.createElement("a"),s=document.createElement("div"),a=document.createElement("div"),c=document.createElement("div"),l=document.createElement("div"),u=document.createElement("div"),d=document.createElement("div"),h=document.createElement("div"),p=function(e){return i.localize(2,null,e)},v=function(e){return i.localize(3,null,e)};f.addClass(r,"task-statusbar-item"),r.title=i.localize(5,null),f.addClass(o,"task-statusbar-item-label"),r.appendChild(o),f.addClass(s,"task-statusbar-item-label-error"),f.addClass(s,"mask-icon"),o.appendChild(s),this.icons.push(s),f.addClass(l,"task-statusbar-item-label-counter"),l.innerHTML="0",l.title=s.title=p(0),
o.appendChild(l),f.addClass(a,"task-statusbar-item-label-warning"),f.addClass(a,"mask-icon"),o.appendChild(a),this.icons.push(a),f.addClass(u,"task-statusbar-item-label-counter"),u.innerHTML="0",u.title=a.title=v(0),o.appendChild(u),f.addClass(c,"task-statusbar-item-label-info"),f.addClass(c,"mask-icon"),o.appendChild(c),this.icons.push(c),f.hide(c),f.addClass(d,"task-statusbar-item-label-counter"),o.appendChild(d),f.hide(d),f.addClass(h,"task-statusbar-item-building"),r.appendChild(h),h.innerHTML=i.localize(6,null),f.hide(h),n.push(f.addDisposableListener(o,"click",function(e){var n=t.panelService.getActivePanel();n&&n.getId()===Y.default.MARKERS_PANEL_ID?t.partService.setPanelHidden(!0):t.panelService.openPanel(Y.default.MARKERS_PANEL_ID,!0)}));var m=i.localize(7,null),y=function(e){return e>9999?m:e>999?e.toString().charAt(0)+"K":e.toString()};return this.markerService.onMarkerChanged(function(e){!function(e){l.innerHTML=y(e.errors),l.title=s.title=p(e.errors),u.innerHTML=y(e.warnings),
u.title=a.title=v(e.warnings),e.infos>0?(d.innerHTML=y(e.infos),d.title=c.title=function(e){return i.localize(4,null,e)}(e.infos),f.show(d),f.show(c)):(f.hide(d),f.hide(c))}(t.markerService.getStatistics())}),n.push(this.taskService.onDidStateChange(function(e){if(!t.ignoreEvent(e))switch(e.kind){case oe.TaskEventKind.Active:t.activeCount++,1===t.activeCount&&f.show(h);break;case oe.TaskEventKind.Inactive:t.activeCount>0&&(t.activeCount--,0===t.activeCount&&f.hide(h));break;case oe.TaskEventKind.Terminated:0!==t.activeCount&&(f.hide(h),t.activeCount=0)}})),e.appendChild(r),this.updateStyles(),{dispose:function(){n=g.dispose(n)}}},t.prototype.ignoreEvent=function(e){return!!this.taskService.inTerminal()&&(e.group!==oe.TaskGroup.Build||!!e.__task&&(void 0===e.__task.problemMatchers||0===e.__task.problemMatchers.length))},t=a([l(0,$.IPanelService),l(1,D.IMarkerService),l(2,se.ITaskService),l(3,X.IPartService),l(4,ge.IThemeService),l(5,J.IWorkspaceContextService)],t)}(fe.Themable),_e=function(e){function t(t,n){
var i=e.call(this,n)||this;return i.taskService=t,i}return n(t,e),t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this)},t.prototype.render=function(e){var t=this,n=[],r=document.createElement("a");f.addClass(r,"task-statusbar-runningItem");var o=document.createElement("div");f.addClass(o,"task-statusbar-runningItem-label"),r.appendChild(o);var s=new w.OcticonLabel(o);s.title=i.localize(8,null),f.hide(r),n.push(f.addDisposableListener(o,"click",function(e){t.taskService.runShowTasks()}));var a=function(){t.taskService.getActiveTasks().then(function(e){0===e.length?f.hide(r):(s.text="$(tools) "+e.length,f.show(r))})};return n.push(this.taskService.onDidStateChange(function(e){e.kind===oe.TaskEventKind.Changed&&a()})),e.appendChild(r),this.updateStyles(),a(),{dispose:function(){n=g.dispose(n)}}},t=a([l(0,se.ITaskService),l(1,ge.IThemeService)],t)}(fe.Themable),Ce=function(){function e(e){this._outputChannel=e,this._validationStatus=new S.ValidationStatus}return e.prototype.info=function(e){
this._validationStatus.state=S.ValidationState.Info,this._outputChannel.append(e+"\n")},e.prototype.warn=function(e){this._validationStatus.state=S.ValidationState.Warning,this._outputChannel.append(e+"\n")},e.prototype.error=function(e){this._validationStatus.state=S.ValidationState.Error,this._outputChannel.append(e+"\n")},e.prototype.fatal=function(e){this._validationStatus.state=S.ValidationState.Fatal,this._outputChannel.append(e+"\n")},Object.defineProperty(e.prototype,"status",{get:function(){return this._validationStatus},enumerable:!0,configurable:!0}),e}(),Ee=function(){function e(){this._store=new Map}return e.prototype.forEach=function(e){this._store.forEach(e)},e.prototype.get=function(e){var t=m.isString(e)?this._store.get(e):this._store.get(e.uri.toString());return t||(t=[],m.isString(e)?this._store.set(e,t):this._store.set(e.uri.toString(),t)),t},e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;var i=m.isString(e)?this._store.get(e):this._store.get(e.uri.toString());i||(i=[],m.isString(e)?this._store.set(e,i):this._store.set(e.uri.toString(),i)),i.push.apply(i,t)},e.prototype.all=function(){var e=[];return this._store.forEach(function(t){return e.push.apply(e,t)}),e},e}(),we=function(){function e(t,n,r,o,s,a,c,l,d,h,p,f,g,m,y,b,S,_,C,E){var w=this;this.configurationService=t,this.markerService=n,this.outputService=r,this.editorService=o,this.fileService=s,this.contextService=a,this.telemetryService=c,this.textFileService=l,this.modelService=h,this.extensionService=p,this.quickOpenService=f,this.configurationResolverService=g,this.terminalService=m,this.storageService=y,this.progressService=b,this.openerService=S,this._windowService=_,this.dialogService=C,this.notificationService=E,this._configHasErrors=!1,this._workspaceTasksPromise=void 0,this._taskSystem=void 0,this._taskSystemListener=void 0,this._outputChannel=this.outputService.getChannel(e.OutputChannelId),this._providers=new Map,
this._taskSystemInfos=new Map,this.configurationService.onDidChangeConfiguration(function(){if(w._taskSystem||w._workspaceTasksPromise){(!w._taskSystem||w._taskSystem instanceof de.TerminalTaskSystem)&&w._outputChannel.clear();var e=w.computeWorkspaceFolderSetup();if(w.executionEngine!==e[2]){if(w._taskSystem&&w._taskSystem.getActiveTasks().length>0)return void w.notificationService.prompt(u.default.Info,i.localize(10,null),[{label:i.localize(11,null),run:function(){return w._windowService.reloadWindow()}}]);w.disposeTaskSystemListeners(),w._taskSystem=void 0}w.updateSetup(e),w.updateWorkspaceTasks()}}),d.onWillShutdown(function(e){return e.veto(w.beforeShutdown())}),this._onDidStateChange=new v.Emitter,this.registerCommands()}return Object.defineProperty(e.prototype,"onDidStateChange",{get:function(){return this._onDidStateChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"supportsMultipleTaskExecutions",{get:function(){return this.inTerminal()},enumerable:!0,configurable:!0}),
e.prototype.registerCommands=function(){var e=this;M.CommandsRegistry.registerCommand("workbench.action.tasks.runTask",function(t,n){e.runTaskCommand(n)}),M.CommandsRegistry.registerCommand("workbench.action.tasks.restartTask",function(t,n){e.runRestartTaskCommand(n)}),M.CommandsRegistry.registerCommand("workbench.action.tasks.terminate",function(t,n){e.runTerminateCommand(n)}),M.CommandsRegistry.registerCommand("workbench.action.tasks.showLog",function(){e.canRunCommand()&&e.showOutput()}),M.CommandsRegistry.registerCommand("workbench.action.tasks.build",function(){e.canRunCommand()&&e.runBuildCommand()}),P.KeybindingsRegistry.registerKeybindingRule({id:"workbench.action.tasks.build",weight:P.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:3104}),M.CommandsRegistry.registerCommand("workbench.action.tasks.test",function(){e.canRunCommand()&&e.runTestCommand()}),M.CommandsRegistry.registerCommand("workbench.action.tasks.configureTaskRunner",function(){e.runConfigureTasks()}),
M.CommandsRegistry.registerCommand("workbench.action.tasks.configureDefaultBuildTask",function(){e.runConfigureDefaultBuildTask()}),M.CommandsRegistry.registerCommand("workbench.action.tasks.configureDefaultTestTask",function(){e.runConfigureDefaultTestTask()}),M.CommandsRegistry.registerCommand("workbench.action.tasks.showTasks",function(){e.runShowTasks()})},Object.defineProperty(e.prototype,"workspaceFolders",{get:function(){return this._workspaceFolders||this.updateSetup(),this._workspaceFolders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ignoredWorkspaceFolders",{get:function(){return this._ignoredWorkspaceFolders||this.updateSetup(),this._ignoredWorkspaceFolders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"executionEngine",{get:function(){return void 0===this._executionEngine&&this.updateSetup(),this._executionEngine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schemaVersion",{get:function(){
return void 0===this._schemaVersion&&this.updateSetup(),this._schemaVersion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showIgnoreMessage",{get:function(){return void 0===this._showIgnoreMessage&&(this._showIgnoreMessage=!this.storageService.getBoolean(e.IgnoreTask010DonotShowAgain_key,F.StorageScope.WORKSPACE,!1)),this._showIgnoreMessage},enumerable:!0,configurable:!0}),e.prototype.updateSetup=function(e){if(e||(e=this.computeWorkspaceFolderSetup()),this._workspaceFolders=e[0],this._ignoredWorkspaceFolders)if(this._ignoredWorkspaceFolders.length!==e[1].length)this._showIgnoreMessage=void 0;else{var t=new Set;this._ignoredWorkspaceFolders.forEach(function(e){return t.add(e.uri.toString())});for(var n=0,i=e[1];n<i.length;n++){var r=i[n];if(!t.has(r.uri.toString())){this._showIgnoreMessage=void 0;break}}}this._ignoredWorkspaceFolders=e[1],this._executionEngine=e[2],this._schemaVersion=e[3]},e.prototype.showOutput=function(){this.outputService.showChannel(this._outputChannel.id,!0)},
e.prototype.disposeTaskSystemListeners=function(){this._taskSystemListener&&this._taskSystemListener.dispose()},e.prototype.registerTaskProvider=function(e,t){t&&this._providers.set(e,t)},e.prototype.unregisterTaskProvider=function(e){return this._providers.delete(e)},e.prototype.registerTaskSystem=function(e,t){this._taskSystemInfos.set(e,t)},e.prototype.getTask=function(e,t,n){void 0===n&&(n=!1);var r=m.isString(e)?e:e.name;if(this.ignoredWorkspaceFolders.some(function(e){return e.name===r}))return s.TPromise.wrapError(new Error(i.localize(12,null,r)));var o;return void 0===(o=m.isString(t)?t:ce.TaskDefinition.createTaskIdentifier(t,console))?s.TPromise.as(void 0):this.getGroupedTasks().then(function(t){var i=t.get(e);if(i)for(var r=0,s=i;r<s.length;r++){var a=s[r];if(oe.Task.matches(a,o,n))return a}})},e.prototype.tasks=function(e){var t=e&&e.version?e.version:void 0,n=this.executionEngine
;return t&&(r.satisfies("0.1.0",t)&&n===oe.ExecutionEngine.Terminal||r.satisfies("2.0.0",t)&&n===oe.ExecutionEngine.Process)?s.TPromise.as([]):this.getGroupedTasks().then(function(t){if(!e||!e.type)return t.all();var n=[];return t.forEach(function(t){for(var i=0,r=t;i<r.length;i++){var o=r[i];if(oe.ContributedTask.is(o)&&o.defines.type===e.type)n.push(o);else if(oe.CustomTask.is(o))if(o.type===e.type)n.push(o);else{var s=oe.CustomTask.customizes(o);s&&s.type===e.type&&n.push(o)}}}),n})},e.prototype.createSorter=function(){return new oe.TaskSorter(this.contextService.getWorkspace()?this.contextService.getWorkspace().folders:[])},e.prototype.isActive=function(){return this._taskSystem?this._taskSystem.isActive():s.TPromise.as(!1)},e.prototype.getActiveTasks=function(){return this._taskSystem?s.TPromise.as(this._taskSystem.getActiveTasks()):s.TPromise.as([])},e.prototype.getRecentlyUsedTasks=function(){if(this._recentlyUsedTasks)return this._recentlyUsedTasks;this._recentlyUsedTasks=new E.LinkedMap
;var t=this.storageService.get(e.RecentlyUsedTasks_Key,F.StorageScope.WORKSPACE);if(t)try{var n=JSON.parse(t);if(Array.isArray(n))for(var i=0,r=n;i<r.length;i++){var o=r[i];this._recentlyUsedTasks.set(o,o)}}catch(e){}return this._recentlyUsedTasks},e.prototype.saveRecentlyUsedTasks=function(){if(this._recentlyUsedTasks){var t=this._recentlyUsedTasks.values();t.length>30&&(t=t.slice(0,30)),this.storageService.store(e.RecentlyUsedTasks_Key,JSON.stringify(t),F.StorageScope.WORKSPACE)}},e.prototype.openDocumentation=function(){this.openerService.open(h.default.parse("https://go.microsoft.com/fwlink/?LinkId=733558"))},e.prototype.build=function(){var e=this;return this.getGroupedTasks().then(function(t){var n=e.createRunnableTask(t,oe.TaskGroup.Build);if(!n||!n.task)throw e.schemaVersion===oe.JsonSchemaVersion.V0_1_0?new re.TaskError(u.default.Info,i.localize(13,null),re.TaskErrors.NoBuildTask):new re.TaskError(u.default.Info,i.localize(14,null),re.TaskErrors.NoBuildTask);return e.executeTask(n.task,n.resolver)
}).then(function(e){return e},function(t){return e.handleError(t),s.TPromise.wrapError(t)})},e.prototype.runTest=function(){var e=this;return this.getGroupedTasks().then(function(t){var n=e.createRunnableTask(t,oe.TaskGroup.Test);if(!n||!n.task)throw e.schemaVersion===oe.JsonSchemaVersion.V0_1_0?new re.TaskError(u.default.Info,i.localize(15,null),re.TaskErrors.NoTestTask):new re.TaskError(u.default.Info,i.localize(16,null),re.TaskErrors.NoTestTask);return e.executeTask(n.task,n.resolver)}).then(function(e){return e},function(t){return e.handleError(t),s.TPromise.wrapError(t)})},e.prototype.run=function(e,t){var n=this;return this.getGroupedTasks().then(function(r){if(e){var o=n.createResolver(r);return t&&t.attachProblemMatcher&&n.shouldAttachProblemMatcher(e)&&!oe.InMemoryTask.is(e)?n.attachProblemMatcher(e).then(function(e){return e?n.executeTask(e,o):s.TPromise.as(void 0)}):n.executeTask(e,o)}throw new re.TaskError(u.default.Info,i.localize(17,null,e.name),re.TaskErrors.TaskNotFound)}).then(function(e){
return e},function(e){return n.handleError(e),s.TPromise.wrapError(e)})},e.prototype.shouldAttachProblemMatcher=function(e){if(!this.canCustomize(e))return!1;if(void 0!==e.group&&e.group!==oe.TaskGroup.Build)return!1;if(void 0!==e.problemMatchers&&e.problemMatchers.length>0)return!1;if(oe.ContributedTask.is(e))return!e.hasDefinedMatchers&&0===e.problemMatchers.length;if(oe.CustomTask.is(e)){return void 0===e._source.config.element.problemMatcher&&!e.hasDefinedMatchers}return!1},e.prototype.attachProblemMatcher=function(e){for(var t=this,n=[],r=0,o=N.ProblemMatcherRegistry.keys();r<o.length;r++){var a=o[r],c=N.ProblemMatcherRegistry.get(a);c.deprecated||(c.name===c.label?n.push({label:c.name,matcher:c}):n.push({label:c.label,description:"$"+c.name,matcher:c}))}return n.length>0?(n=n.sort(function(e,t){return e.label.localeCompare(t.label)}),n[0].separator={border:!0,label:i.localize(18,null)},n.unshift({label:i.localize(19,null),matcher:void 0},{label:i.localize(20,null),matcher:void 0,never:!0},{
label:i.localize(21,null),matcher:void 0,learnMore:!0}),this.quickOpenService.pick(n,{placeHolder:i.localize(22,null),autoFocus:{autoFocusFirstEntry:!0}}).then(function(n){if(n){if(n.learnMore)return void t.openDocumentation();if(n.never)return t.customize(e,{problemMatcher:[]},!0),e;if(n.matcher){var i=oe.Task.clone(e),r="$"+n.matcher.name,o={problemMatcher:[r]};i.problemMatchers=[r];var s=N.ProblemMatcherRegistry.get(n.matcher.name);return s&&void 0!==s.watching&&(o.isBackground=!0,i.isBackground=!0),t.customize(e,o,!0),i}return e}})):s.TPromise.as(e)},e.prototype.getTasksForGroup=function(e){return this.getGroupedTasks().then(function(t){var n=[];return t.forEach(function(t){for(var i=0,r=t;i<r.length;i++){var o=r[i];o.group===e&&n.push(o)}}),n})},e.prototype.needsFolderQualification=function(){return this.contextService.getWorkbenchState()===J.WorkbenchState.WORKSPACE},e.prototype.canCustomize=function(e){
return this.schemaVersion===oe.JsonSchemaVersion.V2_0_0&&(!!oe.CustomTask.is(e)||!!oe.ContributedTask.is(e)&&!!oe.Task.getWorkspaceFolder(e))},e.prototype.customize=function(t,n,r){var o=this,a=oe.Task.getWorkspaceFolder(t);if(!a)return s.TPromise.wrap(void 0);var c=this.getConfiguration(a);if(c.hasParseErrors)return this.notificationService.warn(i.localize(23,null)),s.TPromise.wrap(void 0);var l,u,h=c.config,p=oe.CustomTask.is(t)?t._source.config:void 0;if(p&&p.element)l=p.index,u=p.element;else if(oe.ContributedTask.is(t)){u={};var f=d.assign(Object.create(null),t.defines);delete f._key,Object.keys(f).forEach(function(e){return u[e]=f[e]}),t.problemMatchers&&t.problemMatchers.length>0&&m.isStringArray(t.problemMatchers)&&(u.problemMatcher=t.problemMatchers)}if(!u)return s.TPromise.as(void 0);if(n)for(var g=0,v=Object.getOwnPropertyNames(n);g<v.length;g++){var y=v[g];void 0!==(_=n[y])&&null!==_&&(u[y]=_)
}else(void 0===u.problemMatcher&&void 0===t.problemMatchers||0===t.problemMatchers.length)&&(u.problemMatcher=[]);var S;if(h)-1===l?void 0!==n.problemMatcher?(h.problemMatcher=n.problemMatcher,S=this.writeConfiguration(a,"tasks.problemMatchers",h.problemMatcher)):void 0!==n.group&&(h.group=n.group,S=this.writeConfiguration(a,"tasks.group",h.group)):(Array.isArray(h.tasks)||(h.tasks=[]),void 0===l?h.tasks.push(u):h.tasks[l]=u,S=this.writeConfiguration(a,"tasks.tasks",h.tasks));else{var _={version:"2.0.0",tasks:[u]},C=["{","\t// See https://go.microsoft.com/fwlink/?LinkId=733558","\t// for the documentation about the tasks.json format"].join("\n")+JSON.stringify(_,null,"\t").substr(1),E=this.configurationService.getValue();E.editor.insertSpaces&&(C=C.replace(/(\n)(\t+)/g,function(e,t,n){return t+b.repeat(" ",n.length*E.editor.tabSize)})),S=this.fileService.createFile(a.toResource(".vscode/tasks.json"),C).then(function(){})}return S?S.then(function(){var t={properties:n?Object.getOwnPropertyNames(n):[]}
;if(o.telemetryService.publicLog(e.CustomizationTelemetryEventName,t),r){var i=a.toResource(".vscode/tasks.json");o.editorService.openEditor({resource:i,options:{forceOpen:!0,pinned:!1}})}}):s.TPromise.as(void 0)},e.prototype.writeConfiguration=function(e,t,n){return this.contextService.getWorkbenchState()===J.WorkbenchState.FOLDER?this.configurationService.updateValue(t,n,{resource:e.uri},L.ConfigurationTarget.WORKSPACE):this.contextService.getWorkbenchState()===J.WorkbenchState.WORKSPACE?this.configurationService.updateValue(t,n,{resource:e.uri},L.ConfigurationTarget.WORKSPACE_FOLDER):void 0},e.prototype.openConfig=function(e){var t=oe.Task.getWorkspaceFolder(e).toResource(e._source.config.file);return this.editorService.openEditor({resource:t,options:{forceOpen:!0,pinned:!1}}).then(function(){})},e.prototype.createRunnableTask=function(e,t){var n=new Map,r=[],o=[];e.forEach(function(e,i){var s=n.get(i);s||(s={id:new Map,label:new Map,identifier:new Map},n.set(i,s));for(var a=0,c=e;a<c.length;a++){
var l=c[a];s.id.set(l._id,l),s.label.set(l._label,l),s.identifier.set(l.identifier,l),t&&l.group===t&&(l._source.kind===oe.TaskSourceKind.Workspace?r.push(l):o.push(l))}});var s={resolve:function(e,t){var i=n.get(e.uri.toString());if(i)return i.id.get(t)||i.label.get(t)||i.identifier.get(t)}};if(r.length>0)return r.length>1&&this._outputChannel.append(i.localize(24,null)),{task:r[0],resolver:s};if(0!==o.length){if(1===o.length)return{task:o[0],resolver:s};var a=_.generateUuid();return{task:{_id:a,_source:{kind:oe.TaskSourceKind.InMemory,label:"inMemory"},_label:a,type:"inMemory",name:a,identifier:a,dependsOn:o.map(function(e){return{workspaceFolder:oe.Task.getWorkspaceFolder(e),task:e._id}})},resolver:s}}},e.prototype.createResolver=function(e){var t=new Map;return e.forEach(function(e,n){var i=t.get(n);i||(i={label:new Map,identifier:new Map,taskIdentifier:new Map},t.set(n,i));for(var r=0,o=e;r<o.length;r++){var s=o[r];i.label.set(s._label,s),i.identifier.set(s.identifier,s)
;var a=oe.Task.getTaskDefinition(s,!0);void 0!==a&&i.taskIdentifier.set(a._key,s)}}),{resolve:function(e,n){var i=t.get(e.uri.toString());if(i){if(m.isString(n))return i.label.get(n)||i.identifier.get(n);var r=ce.TaskDefinition.createTaskIdentifier(n,console);return void 0!==r?i.taskIdentifier.get(r._key):void 0}}}},e.prototype.executeTask=function(t,n){var r=this;return this.storageService.get(e.RanTaskBefore_Key,F.StorageScope.GLOBAL)||this.storageService.store(e.RanTaskBefore_Key,!0,F.StorageScope.GLOBAL),N.ProblemMatcherRegistry.onReady().then(function(){return r.textFileService.saveAll().then(function(e){var o=r.getTaskSystem().run(t,n),s=oe.Task.getRecentlyUsedKey(t);if(s&&r.getRecentlyUsedTasks().set(s,s,E.Touch.AsOld),o.kind===re.TaskExecuteKind.Active){var a=o.active;if(!a.same)throw new re.TaskError(u.default.Warning,i.localize(29,null),re.TaskErrors.RunningTask);var c=void 0;c=a.background?i.localize(25,null,oe.Task.getQualifiedLabel(t)):i.localize(26,null,oe.Task.getQualifiedLabel(t)),
r.notificationService.prompt(u.default.Info,c,[{label:i.localize(27,null),run:function(){return r.terminate(t)}},{label:i.localize(28,null),run:function(){return r.restart(t)}}])}return o.promise})})},e.prototype.restart=function(e){var t=this;this._taskSystem&&this._taskSystem.terminate(e).then(function(n){return n.success?t.run(e):t.notificationService.warn(i.localize(30,null,m.isString(e)?e:e.name)),n})},e.prototype.terminate=function(e){return this._taskSystem?this._taskSystem.terminate(e):s.TPromise.as({success:!0,task:void 0})},e.prototype.terminateAll=function(){return this._taskSystem?this._taskSystem.terminateAll():s.TPromise.as([])},e.prototype.getTaskSystem=function(){var t=this;if(this._taskSystem)return this._taskSystem;if(this.executionEngine===oe.ExecutionEngine.Terminal)this._taskSystem=new de.TerminalTaskSystem(this.terminalService,this.outputService,this.markerService,this.modelService,this.configurationResolverService,this.telemetryService,this.contextService,e.OutputChannelId,function(e){
if(e)return t._taskSystemInfos.get(e.uri.scheme)});else{var n=new ue.ProcessTaskSystem(this.markerService,this.modelService,this.telemetryService,this.outputService,this.configurationResolverService,e.OutputChannelId);n.hasErrors(this._configHasErrors),this._taskSystem=n}return this._taskSystemListener=this._taskSystem.onDidStateChange(function(e){t._onDidStateChange.fire(e)}),this._taskSystem},e.prototype.getGroupedTasks=function(){var e=this;return this.extensionService.activateByEvent("onCommand:workbench.action.tasks.runTask").then(function(){return new s.TPromise(function(t,n){var i=[],r=0,o=function(e){e&&i.push(e),0==--r&&t(i)},s=function(n){try{m.isString(n.message)&&(e._outputChannel.append("Error: "),e._outputChannel.append(n.message),e._outputChannel.append("\n"),e.outputService.showChannel(e._outputChannel.id,!0))}finally{0==--r&&t(i)}};e.schemaVersion===oe.JsonSchemaVersion.V2_0_0&&e._providers.size>0?e._providers.forEach(function(e){r++,e.provideTasks().done(o,s)}):t(i)})}).then(function(t){
for(var n=new Ee,r=new Ee,o=0,s=t;o<s.length;o++)for(var a=0,c=s[o].tasks;a<c.length;a++){var l=c[a],u=oe.Task.getWorkspaceFolder(l);u&&r.add(u,l)}return e.getWorkspaceTasks().then(function(t){return t.forEach(function(t,o){var s=r.get(o);if(t.set)if(s){var a=t.configurations,c=t.set?e.getLegacyTaskConfigurations(t.set):void 0,l=[];if(a||c){var u=new Set;a&&Object.keys(a.byIdentifier).forEach(function(e){return u.add(e)});for(var d=0,h=s;d<h.length;d++){m=h[d];if(oe.ContributedTask.is(m))if(a){(p=a.byIdentifier[m.defines._key])?(u.delete(m.defines._key),n.add(o,le.createCustomTask(m,p))):n.add(o,m)}else if(c){var p=c[m.defines._key];p?(n.add(o,le.createCustomTask(m,p)),l.push(p)):n.add(o,m)}else n.add(o,m)}if(l.length>0)for(var f=l.reduce(function(e,t){return e[t._id]=!0,e},Object.create(null)),g=0,v=t.set.tasks;g<v.length;g++){var m;f[(m=v[g])._id]||n.add(o,m)}else n.add.apply(n,[o].concat(t.set.tasks));u.forEach(function(t){var n=a.byIdentifier[t]
;e._outputChannel.append(i.localize(31,null,n.configures.type,JSON.stringify(n._source.config.element,void 0,4))),e.showOutput()})}else n.add.apply(n,[o].concat(t.set.tasks)),n.add.apply(n,[o].concat(s))}else n.add.apply(n,[o].concat(t.set.tasks));else s&&n.add.apply(n,[o].concat(s))}),n},function(){for(var e=new Ee,n=0,i=t;n<i.length;n++)for(var r=0,o=i[n].tasks;r<o.length;r++){var s=o[r];e.add(oe.Task.getWorkspaceFolder(s),s)}return e})})},e.prototype.getLegacyTaskConfigurations=function(e){function t(){return n||(n=Object.create(null))}for(var n,i=0,r=e.tasks;i<r.length;i++){var o=r[i];if(oe.CustomTask.is(o)){var s=o.command&&o.command.name;if("gulp"===s||"grunt"===s||"jake"===s){var a=ce.KeyedTaskIdentifier.create({type:s,task:o.name});t()[a._key]=o}}}return n},e.prototype.getWorkspaceTasks=function(){return this._workspaceTasksPromise?this._workspaceTasksPromise:(this.updateWorkspaceTasks(),this._workspaceTasksPromise)},e.prototype.updateWorkspaceTasks=function(){var e=this
;this._workspaceTasksPromise=this.computeWorkspaceTasks().then(function(t){return e.executionEngine===oe.ExecutionEngine.Process&&e._taskSystem instanceof ue.ProcessTaskSystem&&t.forEach(function(t){e._configHasErrors=t.hasErrors,e._taskSystem.hasErrors(e._configHasErrors)}),t})},e.prototype.computeWorkspaceTasks=function(){if(0===this.workspaceFolders.length)return s.TPromise.as(new Map);for(var e=[],t=0,n=this.workspaceFolders;t<n.length;t++){var i=n[t];e.push(this.computeWorkspaceFolderTasks(i).then(function(e){return e},function(){}))}return s.TPromise.join(e).then(function(e){for(var t=new Map,n=0,i=e;n<i.length;n++){var r=i[n];r&&t.set(r.workspaceFolder.uri.toString(),r)}return t})},e.prototype.computeWorkspaceFolderTasks=function(e){var t=this;return(this.executionEngine===oe.ExecutionEngine.Process?this.computeLegacyConfiguration(e):this.computeConfiguration(e)).then(function(n){return n&&n.config&&!n.hasErrors?N.ProblemMatcherRegistry.onReady().then(function(){
var r=t._taskSystemInfos.get(e.uri.scheme),o=new Ce(t._outputChannel),s=le.parse(e,r?r.platform:C.platform,n.config,o),a=!1;if(s.validationStatus.isOK()||(a=!0,t.showOutput()),o.status.isFatal())return o.fatal(i.localize(32,null)),{workspaceFolder:e,set:void 0,configurations:void 0,hasErrors:a};var c;if(s.configured&&s.configured.length>0){c={byIdentifier:Object.create(null)};for(var l=0,u=s.configured;l<u.length;l++){var d=u[l];c.byIdentifier[d.configures._key]=d}}return{workspaceFolder:e,set:{tasks:s.custom},configurations:c,hasErrors:a}}):s.TPromise.as({workspaceFolder:e,set:void 0,configurations:void 0,hasErrors:!!n&&n.hasErrors})})},e.prototype.computeConfiguration=function(e){var t=this.getConfiguration(e),n=t.config,i=t.hasParseErrors;return s.TPromise.as({workspaceFolder:e,config:n,hasErrors:i})},e.prototype.computeLegacyConfiguration=function(e){var t=this,n=this.getConfiguration(e),i=n.config;return n.hasParseErrors?s.TPromise.as({workspaceFolder:e,hasErrors:!0,config:void 0
}):i?this.hasDetectorSupport(i)?new he.ProcessRunnerDetector(e,this.fileService,this.contextService,this.configurationResolverService,i).detect(!0).then(function(n){var r=t.printStderr(n.stderr),o=n.config;if(!o)return{workspaceFolder:e,config:i,hasErrors:r};var s=d.deepClone(i),a=Object.create(null);return s.tasks?(s.tasks.forEach(function(e){return a[e.taskName]=e}),o.tasks.forEach(function(e){a[e.taskName]||s.tasks.push(e)})):o.tasks&&(s.tasks=o.tasks),{workspaceFolder:e,config:s,hasErrors:r}}):s.TPromise.as({workspaceFolder:e,config:i,hasErrors:!1}):new he.ProcessRunnerDetector(e,this.fileService,this.contextService,this.configurationResolverService).detect(!0).then(function(n){var i=t.printStderr(n.stderr);return{workspaceFolder:e,config:n.config,hasErrors:i}})},e.prototype.computeWorkspaceFolderSetup=function(){var e=[],t=[],n=oe.ExecutionEngine.Terminal,r=oe.JsonSchemaVersion.V2_0_0;if(this.contextService.getWorkbenchState()===J.WorkbenchState.FOLDER){a=this.contextService.getWorkspace().folders[0]
;e.push(a),n=this.computeExecutionEngine(a),r=this.computeJsonSchemaVersion(a)}else if(this.contextService.getWorkbenchState()===J.WorkbenchState.WORKSPACE)for(var o=0,s=this.contextService.getWorkspace().folders;o<s.length;o++){var a=s[o];r===this.computeJsonSchemaVersion(a)?e.push(a):(t.push(a),this._outputChannel.append(i.localize(33,null,a.uri.fsPath)))}return[e,t,n,r]},e.prototype.computeExecutionEngine=function(e){var t=this.getConfiguration(e).config;return t?le.ExecutionEngine.from(t):oe.ExecutionEngine._default},e.prototype.computeJsonSchemaVersion=function(e){var t=this.getConfiguration(e).config;return t?le.JsonSchemaVersion.from(t):oe.JsonSchemaVersion.V2_0_0},e.prototype.getConfiguration=function(e){var t=this.contextService.getWorkbenchState()!==J.WorkbenchState.EMPTY?d.deepClone(this.configurationService.getValue("tasks",{resource:e.uri})):void 0;if(!t)return{config:void 0,hasParseErrors:!1};var n=t.$parseErrors;if(n){for(var r=!1,o=0;o<n.length;o++)if(/tasks\.json$/.test(n[o])){r=!0;break}
if(r)return this._outputChannel.append(i.localize(34,null)),this.showOutput(),{config:void 0,hasParseErrors:!0}}return{config:t,hasParseErrors:!1}},e.prototype.printStderr=function(e){var t=this,n=!1;return e&&e.length>0&&(e.forEach(function(e){n=!0,t._outputChannel.append(e+"\n")}),this.outputService.showChannel(this._outputChannel.id,!0)),n},e.prototype.inTerminal=function(){return this._taskSystem?this._taskSystem instanceof de.TerminalTaskSystem:this.executionEngine===oe.ExecutionEngine.Terminal},e.prototype.hasDetectorSupport=function(e){return!(!e.command||this.contextService.getWorkbenchState()===J.WorkbenchState.EMPTY)&&he.ProcessRunnerDetector.supports(le.CommandString.value(e.command))},e.prototype.configureAction=function(){var e=this,t=function(){return e.runConfigureTasks(),s.TPromise.as(void 0)};return new(function(e){function i(){return e.call(this,ye.ID,ye.TEXT,void 0,!0,t)||this}return n(i,e),i}(p.Action))},e.prototype.beforeShutdown=function(){var e=this;if(!this._taskSystem)return!1
;if(this.saveRecentlyUsedTasks(),!this._taskSystem.isActiveSync())return!1;if(this._taskSystem instanceof de.TerminalTaskSystem)return!1;return(this._taskSystem.canAutoTerminate()?s.TPromise.wrap({confirmed:!0}):this.dialogService.confirm({message:i.localize(35,null),primaryButton:i.localize(36,null),type:"question"})).then(function(t){return!t.confirmed||e._taskSystem.terminateAll().then(function(t){for(var n=!0,r=void 0,o=0,s=t;o<s.length;o++){var a=s[o];n=n&&a.success,void 0===r&&void 0!==a.code&&(r=a.code)}return n?(e._taskSystem=null,e.disposeTaskSystemListeners(),!1):!r||r!==y.TerminateResponseCode.ProcessNotFound||e.dialogService.confirm({message:i.localize(37,null),primaryButton:i.localize(38,null),type:"info"}).then(function(e){return!e.confirmed})},function(e){return!0})})},e.prototype.handleError=function(e){var t=this;if(e instanceof re.TaskError){
var n=e,r=n.code===re.TaskErrors.NotConfigured||n.code===re.TaskErrors.NoBuildTask||n.code===re.TaskErrors.NoTestTask,o=n.code===re.TaskErrors.RunningTask;r||o?this.notificationService.prompt(n.severity,n.message,[{label:r?ye.TEXT:i.localize(39,null),run:function(){r?t.runConfigureTasks():t.runTerminateCommand()}}]):this.notificationService.notify({severity:n.severity,message:n.message})}else if(e instanceof Error){var s=e;this.notificationService.error(s.message)}else m.isString(e)?this.notificationService.error(e):this.notificationService.error(i.localize(40,null));this.outputService.showChannel(this._outputChannel.id,!0)},e.prototype.canRunCommand=function(){return this.contextService.getWorkbenchState()!==J.WorkbenchState.EMPTY||(this.notificationService.info(i.localize(41,null)),!1)},e.prototype.createTaskQuickPickEntries=function(e,t,r){function o(e,t,n,i){void 0===i&&(i=!1);for(var r=!0,o=0,s=t;o<s.length;o++){var a=s[o],c=l(a);r&&(r=!1,c.separator={label:n,border:i}),c.action=d,c.payload=a,e.push(c)}}
var a=this;if(void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===e||null===e||0===e.length)return[];var c,l=function(e){var t;if(a.needsFolderQualification()){var n=oe.Task.getWorkspaceFolder(e);n&&(t=n.name)}return{label:e._label,description:t,task:e}},u=this,d=new(function(e){function t(){return e.call(this,"configureAction","Configure Task","quick-open-task-configure",!0)||this}return n(t,e),t.prototype.run=function(e){var t=e.getPayload();return u.quickOpenService.close(),oe.ContributedTask.is(t)?u.customize(t,void 0,!0):oe.CustomTask.is(t)&&u.openConfig(t),s.TPromise.as(!1)},t}(p.Action));if(t)if(c=[],1===e.length)c.push(l(e[0]));else{var h=this.getRecentlyUsedTasks(),f=[],g=[],v=[],m=Object.create(null);e.forEach(function(e){var t=oe.Task.getRecentlyUsedKey(e);t&&(m[t]=e)}),h.keys().forEach(function(e){var t=m[e];t&&f.push(t)});for(var y=0,b=e;y<b.length;y++){var S=b[y],_=oe.Task.getRecentlyUsedKey(S);_&&h.has(_)||(S._source.kind===oe.TaskSourceKind.Workspace?g.push(S):v.push(S))}
var C=this.createSorter(),E=f.length>0;o(c,f,i.localize(42,null));var w=(g=g.sort(function(e,t){return C.compare(e,t)})).length>0;o(c,g,i.localize(43,null),E),o(c,v=v.sort(function(e,t){return C.compare(e,t)}),i.localize(44,null),E||w)}else{if(r){var I=this.createSorter();e=e.sort(function(e,t){return I.compare(e,t)})}c=e.map(function(e){return l(e)})}return c},e.prototype.showQuickPick=function(e,t,n,i,r){var o=this;void 0===i&&(i=!1),void 0===r&&(r=!1);return this.quickOpenService.pick((Array.isArray(e)?s.TPromise.as(o.createTaskQuickPickEntries(e,i,r)):e.then(function(e){return o.createTaskQuickPickEntries(e,i,r)})).then(function(e){return 0===e.length&&n&&e.push(n),e}),{placeHolder:t,autoFocus:{autoFocusFirstEntry:!0},matchOnDescription:!0}).then(function(e){return e?e.task:void 0})},e.prototype.showIgnoredFoldersMessage=function(){var t=this
;return 0!==this.ignoredWorkspaceFolders.length&&this.showIgnoreMessage?(this.notificationService.prompt(u.default.Info,i.localize(45,null,this.ignoredWorkspaceFolders.map(function(e){return e.name}).join(", ")),[{label:i.localize(46,null),isSecondary:!0,run:function(){t.storageService.store(e.IgnoreTask010DonotShowAgain_key,!0,F.StorageScope.WORKSPACE),t._showIgnoreMessage=!1}}]),s.TPromise.as(void 0)):s.TPromise.as(void 0)},e.prototype.runTaskCommand=function(e){var t=this;if(this.canRunCommand()){var n=this.getTaskIdentifier(e);void 0!==n?this.getGroupedTasks().then(function(e){for(var i=t.createResolver(e),r=0,o=t.contextService.getWorkspace().folders;r<o.length;r++){var s=o[r],a=i.resolve(s,n);if(a)return void t.run(a)}t.doRunTaskCommand(e.all())},function(){t.doRunTaskCommand()}):this.doRunTaskCommand()}},e.prototype.doRunTaskCommand=function(e){var t=this;this.showIgnoredFoldersMessage().then(function(){t.showQuickPick(e||t.tasks(),i.localize(47,null),{label:i.localize(48,null),task:null
},!0).then(function(e){void 0!==e&&(null===e?t.runConfigureTasks():t.run(e,{attachProblemMatcher:!0}))})})},e.prototype.splitPerGroupType=function(e){for(var t=[],n=[],i=[],r=0,o=e;r<o.length;r++){var s=o[r];s.groupType===oe.GroupType.default?n.push(s):s.groupType===oe.GroupType.user?i.push(s):t.push(s)}return{none:t,defaults:n,users:i}},e.prototype.runBuildCommand=function(){var e=this;if(this.canRunCommand())if(this.schemaVersion!==oe.JsonSchemaVersion.V0_1_0){var t={location:W.ProgressLocation.Window,title:i.localize(49,null)},n=this.getTasksForGroup(oe.TaskGroup.Build).then(function(t){if(t.length>0){var n=e.splitPerGroupType(t),r=n.defaults,o=n.users;if(1===r.length)return void e.run(r[0]);r.length+o.length>0&&(t=r.concat(o))}e.showIgnoredFoldersMessage().then(function(){e.showQuickPick(t,i.localize(50,null),{label:i.localize(51,null),task:null},!0).then(function(t){void 0!==t&&(null!==t?e.run(t,{attachProblemMatcher:!0}):e.runConfigureDefaultBuildTask())})})})
;this.progressService.withProgress(t,function(){return n})}else this.build()},e.prototype.runTestCommand=function(){var e=this;if(this.canRunCommand())if(this.schemaVersion!==oe.JsonSchemaVersion.V0_1_0){var t={location:W.ProgressLocation.Window,title:i.localize(52,null)},n=this.getTasksForGroup(oe.TaskGroup.Test).then(function(t){if(t.length>0){var n=e.splitPerGroupType(t),r=n.defaults,o=n.users;if(1===r.length)return void e.run(r[0]);r.length+o.length>0&&(t=r.concat(o))}e.showIgnoredFoldersMessage().then(function(){e.showQuickPick(t,i.localize(53,null),{label:i.localize(54,null),task:null},!0).then(function(t){void 0!==t&&(null!==t?e.run(t):e.runConfigureTasks())})})});this.progressService.withProgress(t,function(){return n})}else this.runTest()},e.prototype.runTerminateCommand=function(e){var t=this;if(this.canRunCommand()){var n=function(e){t.showQuickPick(e||t.getActiveTasks(),i.localize(55,null),{label:i.localize(56,null),task:null},!1,!0).then(function(e){void 0!==e&&null!==e&&t.terminate(e)})}
;if(this.inTerminal()){var r,o=this.getTaskIdentifier(e);void 0!==o?(r=this.getActiveTasks()).then(function(e){for(var i=0,s=e;i<s.length;i++){var a=s[i];if(oe.Task.matches(a,o))return void t.terminate(a)}n(r)}):n()}else this.isActive().then(function(e){e&&t.terminateAll().then(function(e){var n=e[0];n.success||(n.code&&n.code===y.TerminateResponseCode.ProcessNotFound?t.notificationService.error(i.localize(57,null)):t.notificationService.error(i.localize(58,null)))})})}},e.prototype.runRestartTaskCommand=function(e){var t=this;if(this.canRunCommand()){var n=function(e){t.showQuickPick(e||t.getActiveTasks(),i.localize(59,null),{label:i.localize(60,null),task:null},!1,!0).then(function(e){void 0!==e&&null!==e&&t.restart(e)})};if(this.inTerminal()){var r,o=this.getTaskIdentifier(e);void 0!==o?(r=this.getActiveTasks()).then(function(e){for(var i=0,s=e;i<s.length;i++){var a=s[i];if(oe.Task.matches(a,o))return void t.restart(a)}n(r)}):n()}else this.getActiveTasks().then(function(e){if(0!==e.length){var n=e[0]
;t.restart(n)}})}},e.prototype.getTaskIdentifier=function(e){var t=void 0;return m.isString(e)?t=e:e&&m.isString(e.type)&&(t=ce.TaskDefinition.createTaskIdentifier(e,console)),t},e.prototype.runConfigureTasks=function(){var t=this;if(this.canRunCommand()){var n;n=this.schemaVersion===oe.JsonSchemaVersion.V2_0_0?this.getGroupedTasks():s.TPromise.as(new Ee);var r=this.contextService.getWorkspace().folders.map(function(e){return t.fileService.resolveFile(e.toResource(".vscode/tasks.json")).then(function(e){return e},function(){})}),o=i.localize(62,null),a=i.localize(63,null),c=s.TPromise.join(r).then(function(e){return n.then(function(n){var i=[];if(t.contextService.getWorkbenchState()===J.WorkbenchState.FOLDER){var r=!0;if((f=n.all()).length>0)for(var s=0,c=f=f.sort(function(e,t){return e._label.localeCompare(t._label)});s<c.length;s++){var l=c[s];i.push({label:l._label,task:l}),oe.ContributedTask.is(l)||(r=!1)}if(r){v=void 0!==e[0]?a:o;i.push({label:v,folder:t.contextService.getWorkspace().folders[0],
separator:i.length>0?{border:!0}:void 0})}}else for(var u=0,d=0,h=t.contextService.getWorkspace().folders;d<h.length;d++){var p=h[d],f=n.get(p);if(f.length>0){f=f.slice().sort(function(e,t){return e._label.localeCompare(t._label)});for(var g=0;g<f.length;g++){m={label:f[g]._label,task:f[g],description:p.name};0===g&&(m.separator={label:p.name,border:u>0}),i.push(m)}}else{var v,m;(m={label:v=void 0!==e[u]?a:o,folder:p}).separator={label:p.name,border:u>0},i.push(m)}u++}return i})});this.quickOpenService.pick(c,{placeHolder:i.localize(64,null),autoFocus:{autoFocusFirstEntry:!0}}).then(function(n){n&&(function(e){var t=e;return t&&!!t.task}(n)?function(e){oe.ContributedTask.is(e)?t.customize(e,void 0,!0):oe.CustomTask.is(e)?t.openConfig(e):oe.ConfiguringTask.is(e)}(n.task):function(n){var r=n.toResource(".vscode/tasks.json"),o=!1;t.fileService.resolveFile(r).then(function(e){return e},function(){}).then(function(n){return n?n.resource:t.quickOpenService.pick(ae.getTemplates(),{placeHolder:i.localize(61,null)
}).then(function(n){if(n){var i=n.content,s=t.configurationService.getValue();return s.editor.insertSpaces&&(i=i.replace(/(\n)(\t+)/g,function(e,t,n){return t+b.repeat(" ",n.length*s.editor.tabSize)})),o=!0,t.fileService.createFile(r,i).then(function(i){return t.telemetryService.publicLog(e.TemplateTelemetryEventName,{templateId:n.id,autoDetect:n.autoDetect}),i.resource})}})}).then(function(e){e&&t.editorService.openEditor({resource:e,options:{forceOpen:!0,pinned:o}})})}(n.folder))})}},e.prototype.runConfigureDefaultBuildTask=function(){var e=this;this.canRunCommand()&&(this.schemaVersion===oe.JsonSchemaVersion.V2_0_0?this.tasks().then(function(t){if(0!==t.length){for(var n,r,o=0,s=t;o<s.length;o++){var a=s[o];if(a.group===oe.TaskGroup.Build&&a.groupType===oe.GroupType.default){n=a;break}}n&&(t=[],r={label:i.localize(65,null,oe.Task.getQualifiedLabel(n)),task:n}),e.showIgnoredFoldersMessage().then(function(){e.showQuickPick(t,i.localize(66,null),r,!0).then(function(t){
void 0!==t&&(t===n&&oe.CustomTask.is(t)&&e.openConfig(t),oe.InMemoryTask.is(t)||e.customize(t,{group:{kind:"build",isDefault:!0}},!0))})})}else e.runConfigureTasks()}):this.runConfigureTasks())},e.prototype.runConfigureDefaultTestTask=function(){var e=this;this.canRunCommand()&&(this.schemaVersion===oe.JsonSchemaVersion.V2_0_0?this.tasks().then(function(t){0===t.length&&e.runConfigureTasks();for(var n,r=0,o=t;r<o.length;r++){var s=o[r];if(s.group===oe.TaskGroup.Test&&s.groupType===oe.GroupType.default){n=s;break}}n?e.notificationService.info(i.localize(67,null,oe.Task.getQualifiedLabel(n))):e.showIgnoredFoldersMessage().then(function(){e.showQuickPick(t,i.localize(68,null),void 0,!0).then(function(t){t&&(oe.InMemoryTask.is(t)||e.customize(t,{group:{kind:"test",isDefault:!0}},!0))})})}):this.runConfigureTasks())},e.prototype.runShowTasks=function(){var e=this;this.canRunCommand()&&this.showQuickPick(this.getActiveTasks(),i.localize(69,null),{label:i.localize(70,null),task:null},!1,!0).then(function(t){
void 0!==t&&null!==t&&e._taskSystem.revealTask(t)})},e.RecentlyUsedTasks_Key="workbench.tasks.recentlyUsedTasks",e.RanTaskBefore_Key="workbench.tasks.ranTaskBefore",e.IgnoreTask010DonotShowAgain_key="workbench.tasks.ignoreTask010Shown",e.CustomizationTelemetryEventName="taskService.customize",e.TemplateTelemetryEventName="taskService.template",e.OutputChannelId="tasks",e.OutputChannelLabel=i.localize(9,null),e=a([l(0,L.IConfigurationService),l(1,D.IMarkerService),l(2,te.IOutputService),l(3,Q.IEditorService),l(4,R.IFileService),l(5,J.IWorkspaceContextService),l(6,A.ITelemetryService),l(7,ee.ITextFileService),l(8,T.ILifecycleService),l(9,K.IModelService),l(10,O.IExtensionService),l(11,q.IQuickOpenService),l(12,Z.IConfigurationResolverService),l(13,ie.ITerminalService),l(14,F.IStorageService),l(15,W.IProgressService2),l(16,B.IOpenerService),l(17,V.IWindowService),l(18,H.IDialogService),l(19,z.INotificationService)],e)}();x.MenuRegistry.addCommand({id:ye.ID,title:{value:ye.TEXT,original:"Configure Task"},
category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.showLog",title:{value:i.localize(71,null),original:"Show Task Log"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.runTask",title:{value:i.localize(72,null),original:"Run Task"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.restartTask",title:{value:i.localize(73,null),original:"Restart Running Task"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.showTasks",title:{value:i.localize(74,null),original:"Show Running Tasks"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.terminate",title:{value:i.localize(75,null),original:"Terminate Task"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.build",title:{value:i.localize(76,null),original:"Run Build Task"},category:{value:be,original:"Tasks"}}),
x.MenuRegistry.addCommand({id:"workbench.action.tasks.test",title:{value:i.localize(77,null),original:"Run Test Task"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.configureDefaultBuildTask",title:{value:i.localize(78,null),original:"Configure Default Build Task"},category:{value:be,original:"Tasks"}}),x.MenuRegistry.addCommand({id:"workbench.action.tasks.configureDefaultTestTask",title:{value:i.localize(79,null),original:"Configure Default Test Task"},category:{value:be,original:"Tasks"}});I.Registry.as(te.Extensions.OutputChannels).registerChannel(we.OutputChannelId,we.OutputChannelLabel),k.registerSingleton(se.ITaskService,we);I.Registry.as(j.Extensions.Quickopen).registerQuickOpenHandler(new j.QuickOpenHandlerDescriptor(o.QuickOpenHandler,o.QuickOpenHandler.ID,"task ","inTasksPicker",i.localize(80,null)));I.Registry.as(ne.Extensions.Actionbar).registerActionBarContributor(ne.Scope.VIEWER,pe.QuickOpenActionContributor)
;var Ie=I.Registry.as(G.Extensions.Statusbar);Ie.registerStatusbarItem(new G.StatusbarItemDescriptor(Se,G.StatusbarAlignment.LEFT,50)),Ie.registerStatusbarItem(new G.StatusbarItemDescriptor(_e,G.StatusbarAlignment.LEFT,50));var Te={id:"vscode://schemas/tasks",description:"Task definition file",type:"object",default:{version:"0.1.0",command:"myCommand",isShellCommand:!1,args:[],showOutput:"always",tasks:[{taskName:"build",showOutput:"silent",isBuildCommand:!0,problemMatcher:["$tsc","$lessCompile"]}]}};Te.definitions=c({},ve.default.definitions,me.default.definitions),Te.oneOf=me.default.oneOf.concat(ve.default.oneOf);I.Registry.as(U.Extensions.JSONContribution).registerSchema("vscode://schemas/tasks",Te)}),define(e[1434],t([1,0,4,10,72,47,48,57,54,250,43,19]),function(e,t,n,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function t(e,t,n,i){this.textModelResolverService=e,this.textFileService=t,this.modeService=n,this.modelService=i,
this.textModelResolverService.registerTextModelContentProvider(h.Schemas.walkThrough,this)}return t.prototype.provideTextContent=function(t){var r=this,o=t.query?JSON.parse(t.query):{};return(o.moduleId?new n.TPromise(function(t,n){e([o.moduleId],function(e){try{t(e.default())}catch(e){n(e)}})}):this.textFileService.resolveTextContent(i.default.file(t.fsPath)).then(function(e){return e.value})).then(function(e){var n=r.modelService.getModel(t);return n?r.modelService.updateModel(n,e):n=r.modelService.createModel(e,r.modeService.getOrCreateModeByFilenameOrFirstLine(t.fsPath),t),n})},t=a([l(0,r.ITextModelService),l(1,s.ITextFileService),l(2,u.IModeService),l(3,o.IModelService)],t)}();t.WalkThroughContentProvider=f;var g=function(){function e(e,t,n,i){this.textModelResolverService=e,this.textFileService=t,this.modeService=n,this.modelService=i,this.textModelResolverService.registerTextModelContentProvider(h.Schemas.walkThroughSnippet,this)}return e.prototype.provideTextContent=function(e){var t=this
;return this.textFileService.resolveTextContent(i.default.file(e.fsPath)).then(function(n){var i=t.modelService.getModel(e);if(i)t.modelService.updateModel(i,n.value);else{var r=parseInt(e.fragment),o="",s="",a=0,l=new d.marked.Renderer;l.code=function(e,t){return a++===r&&(o=e,s=t),""};var u=n.value.create(c.DefaultEndOfLine.LF),h=u.getLineCount(),f=new p.Range(1,1,h,u.getLineLength(h)+1),g=u.getValueInRange(f,c.EndOfLinePreference.TextDefined);d.marked(g,{renderer:l});var v=t.modeService.getModeIdForLanguageName(s),m=t.modeService.getOrCreateMode(v);i=t.modelService.createModel(o,m,e)}return i})},e=a([l(0,r.ITextModelService),l(1,s.ITextFileService),l(2,u.IModeService),l(3,o.IModelService)],e)}();t.WalkThroughSnippetContentProvider=g}),define(e[1435],t([1,0,752,278,457,1318,1434,1316,16,40,112,56,31,75,147,38,52]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
c.Registry.as(f.Extensions.Editors).registerEditor(new f.EditorDescriptor(r.WalkThroughPart,r.WalkThroughPart.ID,n.localize(0,null)),[new u.SyncDescriptor(i.WalkThroughInput)]),c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(new h.SyncActionDescriptor(a.EditorWalkThroughAction,a.EditorWalkThroughAction.ID,a.EditorWalkThroughAction.LABEL),"Help: Interactive Playground",n.localize(1,null)),c.Registry.as(l.Extensions.EditorInputFactories).registerEditorInputFactory(a.EditorWalkThroughInputFactory.ID,a.EditorWalkThroughInputFactory),c.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(s.WalkThroughContentProvider,g.LifecyclePhase.Starting),c.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(s.WalkThroughSnippetContentProvider,g.LifecyclePhase.Starting),v.KeybindingsRegistry.registerCommandAndKeybindingRule(o.WalkThroughArrowUp),v.KeybindingsRegistry.registerCommandAndKeybindingRule(o.WalkThroughArrowDown),
v.KeybindingsRegistry.registerCommandAndKeybindingRule(o.WalkThroughPageUp),v.KeybindingsRegistry.registerCommandAndKeybindingRule(o.WalkThroughPageDown)}),define(e[1436],t([1,0,20,62,5,10,4,45,184,105,19,60,44,47,72,755,36,33,107,77,119,27,21,48]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(){function e(){}return e.start=function(e){var t=new Set,n=e.onAfterOperation(function(e){t.add(e.resource.toString())});return{stop:function(){return n.dispose()},hasChanged:function(e){return t.has(e.toString())}}},e}(),A=function(){function e(e){this._endCursorSelection=null,this._modelReference=e,this._edits=[]}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._model&&(this._modelReference.dispose(),this._modelReference=null)},e.prototype.addEdit=function(e){
for(var t=0,n=e.edits;t<n.length;t++){var i=n[t];if("number"==typeof i.eol&&(this._newEol=i.eol),i.range||i.text){var r=void 0;r=i.range?g.Range.lift(i.range):this._model.getFullModelRange(),this._edits.push(f.EditOperation.replaceMove(r,i.text))}}},e.prototype.apply=function(){var e=this;this._edits.length>0&&(this._edits=i.mergeSort(this._edits,function(e,t){return g.Range.compareRangesUsingStarts(e.range,t.range)}),this._initialSelections=this._getInitialSelections(),this._model.pushStackElement(),this._model.pushEditOperations(this._initialSelections,this._edits,function(t){return e._getEndCursorSelections(t)}),this._model.pushStackElement()),void 0!==this._newEol&&(this._model.pushStackElement(),this._model.pushEOL(this._newEol),this._model.pushStackElement())},e.prototype._getInitialSelections=function(){var e=this._edits[0].range;return[new v.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)]},e.prototype._getEndCursorSelections=function(e){
for(var t=0,n=0;n<e.length;n++)for(var i=e[n].range,r=0;r<this._initialSelections.length;r++){var o=this._initialSelections[r];if(g.Range.areIntersectingOrTouching(i,o)){t=n;break}}var s=e[t].range;return this._endCursorSelection=new v.Selection(s.endLineNumber,s.endColumn,s.endLineNumber,s.endColumn),[this._endCursorSelection]},e.prototype.getEndCursorSelection=function(){return this._endCursorSelection},e}(),L=function(e){function t(t,n){var i=e.call(this,t)||this;return i._knownInitialSelections=n,i}return n(t,e),t.prototype._getInitialSelections=function(){return this._knownInitialSelections},t}(A),R=function(){function e(e,t,n,i){this._edits=new Map,this._textModelResolverService=e,this._sourceModel=t?t.getModel().uri:void 0,this._sourceSelections=t?t.getSelections():void 0,this._sourceModelTask=void 0,this._progress=i,n.forEach(this.addEdit,this)}return e.prototype.dispose=function(){this._tasks=c.dispose(this._tasks)},e.prototype.addEdit=function(e){var t=this._edits.get(e.resource.toString())
;t||(t=[],this._edits.set(e.resource.toString(),t)),t.push(e)},e.prototype.prepare=function(){return o(this,void 0,d.TPromise,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:if(this._tasks)throw new Error("illegal state - already prepared");return this._tasks=[],e=[],this._edits.forEach(function(n,i){var r=t._textModelResolverService.createModelReference(u.default.parse(i)).then(function(e){var r=e.object;if(!r||!r.textEditorModel)throw new Error("Cannot load file "+i);var o;t._sourceModel&&r.textEditorModel.uri.toString()===t._sourceModel.toString()?(t._sourceModelTask=new L(e,t._sourceSelections),o=t._sourceModelTask):o=new A(e),n.forEach(function(e){return o.addEdit(e)}),t._tasks.push(o),t._progress.report(void 0)});e.push(r)}),[4,d.TPromise.join(e)];case 1:return n.sent(),[2,this]}})})},e.prototype.apply=function(){for(var e=0,t=this._tasks;e<t.length;e++){t[e].apply(),this._progress.report(void 0)}return this._sourceModelTask?this._sourceModelTask.getEndCursorSelection():void 0},
e}(),O=function(){function e(e,t,n,i,r,o,s,a){this._logService=n,this._textModelService=i,this._fileService=r,this._textFileService=o,this._environmentService=s,this._contextService=a,this._edits=[],this._editor=e,this._progress=t||I.emptyProgressRunner}return e.prototype.add=function(e){var t;Array.isArray(e)?(t=this._edits).push.apply(t,e):this._edits.push(e)},e.prototype.ariaMessage=function(){var e=this._edits.reduce(function(e,t){return m.isResourceFileEdit(t)?e:e+t.edits.length},0),t=this._edits.length;return 0===e?S.localize(0,null):e>1&&t>1?S.localize(1,null,e,t):S.localize(2,null,e,t)},e.prototype.perform=function(){return o(this,void 0,d.TPromise,function(){var e,t,n,i,r,o,a,c,l,u,d,h,p=this;return s(this,function(s){switch(s.label){case 0:for(e=new Set,t=0,n=[],r=0,o=this._edits;r<o.length;r++)a=o[r],(!i||m.isResourceFileEdit(i[0])&&!m.isResourceFileEdit(a)||m.isResourceTextEdit(i[0])&&!m.isResourceTextEdit(a))&&(i=[],n.push(i)),i.push(a),
m.isResourceFileEdit(a)?t+=1:e.has(a.resource.toString())||(e.add(a.resource.toString()),t+=2);this._progress.total(t),c={report:function(e){return p._progress.worked(1)}},l=void 0,u=0,d=n,s.label=1;case 1:return u<d.length?(h=d[u],m.isResourceFileEdit(h[0])?[4,this._performFileEdits(h,c)]:[3,3]):[3,6];case 2:return s.sent(),[3,5];case 3:return[4,this._performTextEdits(h,c)];case 4:l=s.sent()||l,s.label=5;case 5:return u++,[3,1];case 6:return[2,l]}})})},e.prototype._performFileEdits=function(e,t){return o(this,void 0,void 0,function(){var n,i,r,o,a,c;return s(this,function(s){switch(s.label){case 0:this._logService.debug("_performFileEdits",JSON.stringify(e)),n=0,i=e,s.label=1;case 1:return n<i.length?(r=i[n],t.report(void 0),o=r.options&&r.options.overwrite,r.newUri&&r.oldUri?[4,this._textFileService.move(r.oldUri,r.newUri,o)]:[3,3]):[3,10];case 2:return s.sent(),[3,9];case 3:return r.newUri||!r.oldUri?[3,5]:[4,this._textFileService.delete(r.oldUri,{useTrash:!0,recursive:r.options&&r.options.recursive})]
;case 4:return s.sent(),[3,9];case 5:return!r.newUri||r.oldUri?[3,9]:(a=r.options&&r.options.ignoreIfExists,(c=!a)?[3,7]:[4,this._fileService.existsFile(r.newUri)]);case 6:c=!s.sent(),s.label=7;case 7:return c?[4,this._fileService.createFile(r.newUri,void 0,{overwrite:o})]:[3,9];case 8:s.sent(),s.label=9;case 9:return n++,[3,1];case 10:return[2]}})})},e.prototype._performTextEdits=function(e,t){return o(this,void 0,d.TPromise,function(){var n,i,o,a,c=this;return s(this,function(s){switch(s.label){case 0:return this._logService.debug("_performTextEdits",JSON.stringify(e)),n=D.start(this._fileService),i=new R(this._textModelService,this._editor,e,t),[4,i.prepare()];case 1:if(s.sent(),o=e.filter(function(e){return n.hasChanged(e.resource)}).map(function(e){return r.getPathLabel(e.resource,c._environmentService,c._contextService)}),n.stop(),o.length>0)throw i.dispose(),new Error(S.localize(3,null,o.join(", ")));return[4,i.apply()];case 2:return a=s.sent(),i.dispose(),[2,a]}})})},
e=a([l(2,w.ILogService),l(3,b.ITextModelService),l(4,C.IFileService),l(5,k.ITextFileService),l(6,_.IEnvironmentService),l(7,T.IWorkspaceContextService)],e)}();t.BulkEdit=O;var M=function(){function e(e,t,n,i,r,o,s,a){this._logService=e,this._modelService=t,this._editorService=n,this._textModelService=i,this._fileService=r,this._textFileService=o,this._environmentService=s,this._contextService=a}return e.prototype.apply=function(e,t){var n=this;void 0===t&&(t={});for(var i=e.edits,r=t.editor,o=0,s=i.length;o<s;o++){var a=i[o];if(!m.isResourceFileEdit(a)&&"number"==typeof a.modelVersionId){var c=this._modelService.getModel(a.resource);if(c&&c.getVersionId()!==a.modelVersionId)return d.TPromise.wrapError(new Error(c.uri.toString()+" has changed in the meantime"))}}if(!r){var l=this._editorService.activeTextEditorWidget;h.isCodeEditor(l)&&(r=l)}var u=new O(t.editor,t.progress,this._logService,this._textModelService,this._fileService,this._textFileService,this._environmentService,this._contextService)
;return u.add(i),u.perform().then(function(e){return{selection:e,ariaSummary:u.ariaMessage()}},function(e){throw n._logService.error(e),e})},e=a([l(0,w.ILogService),l(1,y.IModelService),l(2,x.IEditorService),l(3,b.ITextModelService),l(4,C.IFileService),l(5,k.ITextFileService),l(6,_.IEnvironmentService),l(7,T.IWorkspaceContextService)],e)}();t.BulkEditService=M,E.registerSingleton(p.IBulkEditService,M)}),define(e[1437],t([1,0,757,4,10,89,191,14,365,18,105,16,19,60,27,36,48,17,95,33,72,63,29,21,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k;!function(e){e[e.ERROR_UNKNOWN_KEY=0]="ERROR_UNKNOWN_KEY",e[e.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION=1]="ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION",e[e.ERROR_INVALID_FOLDER_CONFIGURATION=2]="ERROR_INVALID_FOLDER_CONFIGURATION",e[e.ERROR_INVALID_USER_TARGET=3]="ERROR_INVALID_USER_TARGET",e[e.ERROR_INVALID_WORKSPACE_TARGET=4]="ERROR_INVALID_WORKSPACE_TARGET",
e[e.ERROR_INVALID_FOLDER_TARGET=5]="ERROR_INVALID_FOLDER_TARGET",e[e.ERROR_NO_WORKSPACE_OPENED=6]="ERROR_NO_WORKSPACE_OPENED",e[e.ERROR_CONFIGURATION_FILE_DIRTY=7]="ERROR_CONFIGURATION_FILE_DIRTY",e[e.ERROR_INVALID_CONFIGURATION=8]="ERROR_INVALID_CONFIGURATION"}(k=t.ConfigurationEditingErrorCode||(t.ConfigurationEditingErrorCode={}));var D=function(e){function t(t,n){var i=e.call(this,t)||this;return i.code=n,i}return n(t,e),t}(Error);t.ConfigurationEditingError=D;var A=function(){function e(e,t,n,i,r,o,s,a,c){this.configurationService=e,this.contextService=t,this.environmentService=n,this.fileService=i,this.textModelResolverService=r,this.textFileService=o,this.notificationService=s,this.commandService=a,this.editorService=c,this.queue=new h.Queue}return e.prototype.writeConfiguration=function(e,t,n){var i=this;void 0===n&&(n={});var o=this.getConfigurationEditOperation(e,t,n.scopes||{});return this.queue.queue(function(){return i.doWriteConfiguration(o,n).then(function(){return null},function(e){
return n.donotNotifyError||i.onError(e,o,n.scopes),r.TPromise.wrapError(e)})})},e.prototype.doWriteConfiguration=function(e,t){var n=this,i=!(t.force||t.donotSave),r=t.force||!t.donotSave;return this.resolveAndValidate(e.target,e,i,t.scopes||{}).then(function(t){return n.writeToBuffer(t.object.textEditorModel,e,r).then(function(){return t.dispose()})})},e.prototype.writeToBuffer=function(e,t,n){var i=this.getEdits(e,t)[0];return i&&this.applyEditsToBuffer(i,e)&&n?this.textFileService.save(t.resource,{skipSaveParticipants:!0}):r.TPromise.as(null)},e.prototype.applyEditsToBuffer=function(e,t){var n=t.getPositionAt(e.offset),i=t.getPositionAt(e.offset+e.length),r=new g.Range(n.lineNumber,n.column,i.lineNumber,i.column),o=t.getValueInRange(r);if(e.content!==o){var s=o?p.EditOperation.replace(r,e.content):p.EditOperation.insert(n,e.content);return t.pushEditOperations([new v.Selection(n.lineNumber,n.column,n.lineNumber,n.column)],[s],function(){return[]}),!0}return!1},e.prototype.onError=function(e,t,n){
switch(e.code){case k.ERROR_INVALID_CONFIGURATION:this.onInvalidConfigurationError(e,t);break;case k.ERROR_CONFIGURATION_FILE_DIRTY:this.onConfigurationFileDirtyError(e,t,n);break;default:this.notificationService.error(e.message)}},e.prototype.onInvalidConfigurationError=function(e,t){var n=this,r=t.workspaceStandAloneConfigurationKey===_.TASKS_CONFIGURATION_KEY?i.localize(0,null):t.workspaceStandAloneConfigurationKey===_.LAUNCH_CONFIGURATION_KEY?i.localize(1,null):null;r?this.notificationService.prompt(x.Severity.Error,e.message,[{label:r,run:function(){return n.openFile(t.resource)}}]):this.notificationService.prompt(x.Severity.Error,e.message,[{label:i.localize(2,null),run:function(){return n.openSettings(t)}}])},e.prototype.onConfigurationFileDirtyError=function(e,t,n){var r=this,o=t.workspaceStandAloneConfigurationKey===_.TASKS_CONFIGURATION_KEY?i.localize(3,null):t.workspaceStandAloneConfigurationKey===_.LAUNCH_CONFIGURATION_KEY?i.localize(4,null):null
;o?this.notificationService.prompt(x.Severity.Error,e.message,[{label:i.localize(5,null),run:function(){var e=t.key?t.workspaceStandAloneConfigurationKey+"."+t.key:t.workspaceStandAloneConfigurationKey;r.writeConfiguration(t.target,{key:e,value:t.value},{force:!0,scopes:n})}},{label:o,run:function(){return r.openFile(t.resource)}}]):this.notificationService.prompt(x.Severity.Error,e.message,[{label:i.localize(6,null),run:function(){return r.writeConfiguration(t.target,{key:t.key,value:t.value},{force:!0,scopes:n})}},{label:i.localize(7,null),run:function(){return r.openSettings(t)}}])},e.prototype.openSettings=function(e){switch(e.target){case S.ConfigurationTarget.USER:this.commandService.executeCommand("workbench.action.openGlobalSettings");break;case S.ConfigurationTarget.WORKSPACE:this.commandService.executeCommand("workbench.action.openWorkspaceSettings");break;case S.ConfigurationTarget.WORKSPACE_FOLDER:if(e.resource){var t=this.contextService.getWorkspaceFolder(e.resource)
;t&&this.commandService.executeCommand("_workbench.action.openFolderSettings",t)}}},e.prototype.openFile=function(e){this.editorService.openEditor({resource:e})},e.prototype.wrapError=function(e,t,n){var i=this.toErrorMessage(e,t,n);return r.TPromise.wrapError(new D(i,e))},e.prototype.toErrorMessage=function(e,t,n){switch(e){case k.ERROR_UNKNOWN_KEY:return i.localize(8,null,this.stringifyTarget(t),n.key);case k.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION:return i.localize(9,null,n.key);case k.ERROR_INVALID_FOLDER_CONFIGURATION:return i.localize(10,null,n.key);case k.ERROR_INVALID_USER_TARGET:return i.localize(11,null,n.key);case k.ERROR_INVALID_WORKSPACE_TARGET:return i.localize(12,null,n.key);case k.ERROR_INVALID_FOLDER_TARGET:return i.localize(13,null);case k.ERROR_NO_WORKSPACE_OPENED:return i.localize(14,null,this.stringifyTarget(t));case k.ERROR_INVALID_CONFIGURATION:if(n.workspaceStandAloneConfigurationKey===_.TASKS_CONFIGURATION_KEY)return i.localize(15,null)
;if(n.workspaceStandAloneConfigurationKey===_.LAUNCH_CONFIGURATION_KEY)return i.localize(16,null);switch(t){case S.ConfigurationTarget.USER:return i.localize(17,null);case S.ConfigurationTarget.WORKSPACE:return i.localize(18,null);case S.ConfigurationTarget.WORKSPACE_FOLDER:r=this.contextService.getWorkspaceFolder(n.resource).name;return i.localize(19,null,r)}return"";case k.ERROR_CONFIGURATION_FILE_DIRTY:if(n.workspaceStandAloneConfigurationKey===_.TASKS_CONFIGURATION_KEY)return i.localize(20,null);if(n.workspaceStandAloneConfigurationKey===_.LAUNCH_CONFIGURATION_KEY)return i.localize(21,null);switch(t){case S.ConfigurationTarget.USER:return i.localize(22,null);case S.ConfigurationTarget.WORKSPACE:return i.localize(23,null);case S.ConfigurationTarget.WORKSPACE_FOLDER:var r=this.contextService.getWorkspaceFolder(n.resource).name;return i.localize(24,null,r)}return""}},e.prototype.stringifyTarget=function(e){switch(e){case S.ConfigurationTarget.USER:return i.localize(25,null)
;case S.ConfigurationTarget.WORKSPACE:return i.localize(26,null);case S.ConfigurationTarget.WORKSPACE_FOLDER:return i.localize(27,null)}return""},e.prototype.getEdits=function(e,t){var n=e.getOptions(),i=n.tabSize,r=n.insertSpaces,o=e.getEOL(),s=t.value,a=t.jsonPath;if(!a.length){return[{content:JSON.stringify(s,null,r?u.repeat(" ",i):"\t"),length:e.getValue().length,offset:0}]}return d.setProperty(e.getValue(),a,s,{tabSize:i,insertSpaces:r,eol:o})},e.prototype.resolveModelReference=function(e){var t=this;return this.fileService.existsFile(e).then(function(n){return(n?r.TPromise.as(null):t.fileService.updateContent(e,"{}",{encoding:c.UTF8})).then(function(){return t.textModelResolverService.createModelReference(e)})})},e.prototype.hasParseErrors=function(e,t){if(t.workspaceStandAloneConfigurationKey&&!t.key)return!1;var n=[];return s.parse(e.getValue(),n),n.length>0},e.prototype.resolveAndValidate=function(e,t,n,i){var r=this;if(!t.workspaceStandAloneConfigurationKey){
if(this.configurationService.keys().default.indexOf(t.key)<0&&!w.OVERRIDE_PROPERTY_PATTERN.test(t.key))return this.wrapError(k.ERROR_UNKNOWN_KEY,e,t)}if(t.workspaceStandAloneConfigurationKey){if(e===S.ConfigurationTarget.USER)return this.wrapError(k.ERROR_INVALID_USER_TARGET,e,t);if(t.workspaceStandAloneConfigurationKey===_.TASKS_CONFIGURATION_KEY&&this.contextService.getWorkbenchState()===m.WorkbenchState.WORKSPACE&&t.target===S.ConfigurationTarget.WORKSPACE)return this.wrapError(k.ERROR_INVALID_WORKSPACE_TARGET,e,t)}if((e===S.ConfigurationTarget.WORKSPACE||e===S.ConfigurationTarget.WORKSPACE_FOLDER)&&this.contextService.getWorkbenchState()===m.WorkbenchState.EMPTY)return this.wrapError(k.ERROR_NO_WORKSPACE_OPENED,e,t);if(e===S.ConfigurationTarget.WORKSPACE&&!t.workspaceStandAloneConfigurationKey){if((o=f.Registry.as(w.Extensions.Configuration).getConfigurationProperties())[t.key].scope===w.ConfigurationScope.APPLICATION)return this.wrapError(k.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION,e,t)}
if(e===S.ConfigurationTarget.WORKSPACE_FOLDER){if(!t.resource)return this.wrapError(k.ERROR_INVALID_FOLDER_TARGET,e,t);if(!t.workspaceStandAloneConfigurationKey){var o=f.Registry.as(w.Extensions.Configuration).getConfigurationProperties();if(o[t.key].scope!==w.ConfigurationScope.RESOURCE)return this.wrapError(k.ERROR_INVALID_FOLDER_CONFIGURATION,e,t)}}return this.resolveModelReference(t.resource).then(function(i){var o=i.object.textEditorModel;return r.hasParseErrors(o,t)?r.wrapError(k.ERROR_INVALID_CONFIGURATION,e,t):n&&r.textFileService.isDirty(t.resource)?r.wrapError(k.ERROR_CONFIGURATION_FILE_DIRTY,e,t):i})},e.prototype.getConfigurationEditOperation=function(e,t,n){if(t.key)for(var i=Object.keys(_.WORKSPACE_STANDALONE_CONFIGURATIONS),r=0;r<i.length;r++){var s=i[r],a=this.getConfigurationFileResource(e,_.WORKSPACE_STANDALONE_CONFIGURATIONS[s],n.resource);if(t.key===s){var c=this.isWorkspaceConfigurationResource(a)?[s]:[];return{key:c[c.length-1],jsonPath:c,value:t.value,resource:a,
workspaceStandAloneConfigurationKey:s,target:e}}var l=s+".";if(0===t.key.indexOf(l)){var u=this.isWorkspaceConfigurationResource(a)?[s,t.key.substr(l.length)]:[t.key.substr(l.length)];return{key:u[u.length-1],jsonPath:u,value:t.value,resource:a,workspaceStandAloneConfigurationKey:s,target:e}}}var d=t.key,h=n.overrideIdentifier?[S.keyFromOverrideIdentifier(n.overrideIdentifier),d]:[d];if(e===S.ConfigurationTarget.USER)return{key:d,jsonPath:h,value:t.value,resource:o.default.file(this.environmentService.appSettingsPath),target:e};var p=this.getConfigurationFileResource(e,_.FOLDER_SETTINGS_PATH,n.resource);return this.isWorkspaceConfigurationResource(p)&&(h=["settings"].concat(h)),{key:d,jsonPath:h,value:t.value,resource:p,target:e}},e.prototype.isWorkspaceConfigurationResource=function(e){var t=this.contextService.getWorkspace();return t.configuration&&e&&t.configuration.fsPath===e.fsPath},e.prototype.getConfigurationFileResource=function(e,t,n){
if(e===S.ConfigurationTarget.USER)return o.default.file(this.environmentService.appSettingsPath);var i=this.contextService.getWorkbenchState();if(i!==m.WorkbenchState.EMPTY){var r=this.contextService.getWorkspace();if(e===S.ConfigurationTarget.WORKSPACE){if(i===m.WorkbenchState.WORKSPACE)return r.configuration;if(i===m.WorkbenchState.FOLDER)return r.folders[0].toResource(t)}if(e===S.ConfigurationTarget.WORKSPACE_FOLDER&&n){var s=this.contextService.getWorkspaceFolder(n);if(s)return s.toResource(t)}}return null},e=a([l(0,S.IConfigurationService),l(1,m.IWorkspaceContextService),l(2,y.IEnvironmentService),l(3,C.IFileService),l(4,E.ITextModelService),l(5,b.ITextFileService),l(6,x.INotificationService),l(7,I.ICommandService),l(8,T.IEditorService)],e)}();t.ConfigurationEditingService=A}),define(e[504],t([1,0,759,4,89,191,14,365,18,105,19,60,48,33,72,212]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e,t,n){this.fileService=e,
this.textModelResolverService=t,this.textFileService=n,this.queue=new u.Queue}return e.prototype.write=function(e,t,n){var i=this;return this.queue.queue(function(){return i.doWriteConfiguration(e,t,n)})},e.prototype.doWriteConfiguration=function(e,t,n){var i=this;return this.resolveAndValidate(e,n).then(function(e){return i.writeToBuffer(e.object.textEditorModel,t).then(function(){return e.dispose()})})},e.prototype.writeToBuffer=function(e,t){var n=this.getEdits(e,t)[0];return this.applyEditsToBuffer(n,e)?this.textFileService.save(e.uri):i.TPromise.as(null)},e.prototype.applyEditsToBuffer=function(e,t){var n=t.getPositionAt(e.offset),i=t.getPositionAt(e.offset+e.length),r=new h.Range(n.lineNumber,n.column,i.lineNumber,i.column),o=t.getValueInRange(r);if(e.content!==o){var s=o?d.EditOperation.replace(r,e.content):d.EditOperation.insert(n,e.content);return t.pushEditOperations([new p.Selection(n.lineNumber,n.column,n.lineNumber,n.column)],[s],function(){return[]}),!0}return!1},
e.prototype.getEdits=function(e,t){var n=e.getOptions(),i=n.tabSize,r=n.insertSpaces,o=e.getEOL(),a=t.key,l=t.value;if(!a){var u=JSON.stringify(l,null,r?s.repeat(" ",i):"\t");return[{content:u,length:u.length,offset:0}]}return c.setProperty(e.getValue(),[a],l,{tabSize:i,insertSpaces:r,eol:o})},e.prototype.resolveModelReference=function(e){var t=this;return this.fileService.existsFile(e).then(function(n){return(n?i.TPromise.as(null):t.fileService.updateContent(e,"{}",{encoding:o.UTF8})).then(function(){return t.textModelResolverService.createModelReference(e)})})},e.prototype.hasParseErrors=function(e){var t=[];return r.parse(e.getValue(),t),t.length>0},e.prototype.resolveAndValidate=function(e,t){var n=this;return this.resolveModelReference(e).then(function(i){var r=i.object.textEditorModel;return n.hasParseErrors(r)?n.wrapError(m.JSONEditingErrorCode.ERROR_INVALID_FILE):t&&n.textFileService.isDirty(e)?n.wrapError(m.JSONEditingErrorCode.ERROR_FILE_DIRTY):i})},e.prototype.wrapError=function(e){
var t=this.toErrorMessage(e);return i.TPromise.wrapError(new m.JSONEditingError(t,e))},e.prototype.toErrorMessage=function(e){switch(e){case m.JSONEditingErrorCode.ERROR_INVALID_FILE:return n.localize(0,null);case m.JSONEditingErrorCode.ERROR_FILE_DIRTY:return n.localize(1,null)}},e=a([l(0,g.IFileService),l(1,v.ITextModelService),l(2,f.ITextFileService)],e)}();t.JSONEditingService=y}),define(e[505],t([1,0,10,4,59,170,7,50,24,5,18,87,120,27,11,36,262,17,414,95,16,63,163,150,49,29,76,1437,1202,504,43,1049,908,62,758]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var B=function(e){function t(t,n){void 0===n&&(n=E.FOLDER_CONFIG_FOLDER_NAME);var i=e.call(this)||this;return i.environmentService=t,i.workspaceSettingsRootFolder=n,i._onDidChangeConfiguration=i._register(new u.Emitter),i.onDidChangeConfiguration=i._onDidChangeConfiguration.event,i._onDidChangeWorkspaceFolders=i._register(new u.Emitter),
i.onDidChangeWorkspaceFolders=i._onDidChangeWorkspaceFolders.event,i._onDidChangeWorkspaceName=i._register(new u.Emitter),i.onDidChangeWorkspaceName=i._onDidChangeWorkspaceName.event,i._onDidChangeWorkbenchState=i._register(new u.Emitter),i.onDidChangeWorkbenchState=i._onDidChangeWorkbenchState.event,i.defaultConfiguration=new S.DefaultConfigurationModel,i.userConfiguration=i._register(new N.UserConfiguration(t.appSettingsPath)),i.workspaceConfiguration=i._register(new R.WorkspaceConfiguration),i._register(i.userConfiguration.onDidChangeConfiguration(function(){return i.onUserConfigurationChanged()})),i._register(i.workspaceConfiguration.onDidUpdateConfiguration(function(){return i.onWorkspaceConfigurationChanged()})),i._register(w.Registry.as(I.Extensions.Configuration).onDidRegisterConfiguration(function(e){return i.registerConfigurationSchemas()})),i._register(w.Registry.as(I.Extensions.Configuration).onDidRegisterConfiguration(function(e){return i.onDefaultConfigurationChanged(e)})),
i.workspaceEditingQueue=new f.Queue,i}return n(t,e),t.prototype.getWorkspace=function(){return this.workspace},t.prototype.getWorkbenchState=function(){return this.workspace.configuration?m.WorkbenchState.WORKSPACE:1===this.workspace.folders.length?m.WorkbenchState.FOLDER:m.WorkbenchState.EMPTY},t.prototype.getWorkspaceFolder=function(e){return this.workspace.getFolder(e)},t.prototype.addFolders=function(e,t){return this.updateFolders(e,[],t)},t.prototype.removeFolders=function(e){return this.updateFolders([],e)},t.prototype.updateFolders=function(e,t,n){var i=this;return s.ok(this.jsonEditingService,"Workbench is not initialized yet"),this.workspaceEditingQueue.queue(function(){return i.doUpdateFolders(e,t,n)})},t.prototype.isInsideWorkspace=function(e){return!!this.getWorkspaceFolder(e)},t.prototype.isCurrentWorkspace=function(e){switch(this.getWorkbenchState()){case m.WorkbenchState.FOLDER:return x.isSingleFolderWorkspaceIdentifier(e)&&this.pathEquals(this.workspace.folders[0].uri.fsPath,e)
;case m.WorkbenchState.WORKSPACE:return x.isWorkspaceIdentifier(e)&&this.workspace.id===e.id}return!1},t.prototype.doUpdateFolders=function(e,t,n){var s=this;if(this.getWorkbenchState()!==m.WorkbenchState.WORKSPACE)return r.TPromise.as(void 0);if(e.length+t.length===0)return r.TPromise.as(void 0);var a=!1,c=this.getWorkspace().folders,l=c.map(function(e){return e.raw}).filter(function(e,n){return!x.isStoredWorkspaceFolder(e)||!s.contains(t,c[n].uri)});if(a=c.length!==l.length,e.length){var u=o.dirname(this.getWorkspace().configuration.fsPath),d=(c=m.toWorkspaceFolders(l,i.default.file(u))).map(function(e){return e.uri}),h=[];e.forEach(function(e){if(!s.contains(d,e.uri)){var t;t=e.uri.scheme===M.Schemas.file?{path:P.massageFolderPathForWorkspace(e.uri.fsPath,u,l)}:{uri:e.uri.toString(!0)},e.name&&(t.name=e.name),h.push(t)}}),h.length>0&&(a=!0,"number"==typeof n&&n>=0&&n<l.length?(l=l.slice(0)).splice.apply(l,[n,0].concat(h)):l=l.concat(h))}return a?this.setFolders(l):r.TPromise.as(void 0)},
t.prototype.setFolders=function(e){var t=this;return this.workspaceConfiguration.setFolders(e,this.jsonEditingService).then(function(){return t.onWorkspaceConfigurationChanged()})},t.prototype.contains=function(e,t){return e.some(function(e){return y.isLinux?e.toString()===t.toString():e.toString().toLowerCase()===t.toString().toLowerCase()})},t.prototype.getConfigurationData=function(){var e=this._configuration.toData();return e.isComplete=this.cachedFolderConfigs.values().every(function(e){return e.loaded}),e},t.prototype.getValue=function(e,t){var n="string"==typeof e?e:void 0,i=_.isConfigurationOverrides(e)?e:_.isConfigurationOverrides(t)?t:void 0;return this._configuration.getValue(n,i)},t.prototype.updateValue=function(e,t,n,i,o){s.ok(this.configurationEditingService,"Workbench is not initialized yet");var a=_.isConfigurationOverrides(n)?n:void 0,c=this.deriveConfigurationTarget(e,t,a,a?i:n);return c?this.writeConfigurationValue(e,t,c,a,o):r.TPromise.as(null)},
t.prototype.reloadConfiguration=function(e,t){var n=this;return e?this.reloadWorkspaceFolderConfiguration(e,t):this.reloadUserConfiguration().then(function(){return n.reloadWorkspaceConfiguration()}).then(function(){return n.loadConfiguration()})},t.prototype.inspect=function(e,t){return this._configuration.inspect(e,t)},t.prototype.keys=function(){return this._configuration.keys()},t.prototype.initialize=function(e){var t=this;return this.createWorkspace(e).then(function(e){return t.updateWorkspaceAndInitializeConfiguration(e)})},t.prototype.acquireFileService=function(e){var t=this;this.fileService=e;var n=[];r.TPromise.join(this.cachedFolderConfigs.values().map(function(t){return t.adopt(e).then(function(e){e&&n.push(t.workspaceFolder)})})).then(function(){for(var e=0,i=n;e<i.length;e++){var r=i[e];t.onWorkspaceFolderConfigurationChanged(r)}})},t.prototype.acquireInstantiationService=function(e){this.configurationEditingService=e.createInstance(L.ConfigurationEditingService),
this.jsonEditingService=e.createInstance(O.JSONEditingService)},t.prototype.createWorkspace=function(e){return x.isWorkspaceIdentifier(e)?this.createMulitFolderWorkspace(e):x.isSingleFolderWorkspaceIdentifier(e)?this.createSingleFolderWorkspace(e):this.createEmptyWorkspace(e)},t.prototype.createMulitFolderWorkspace=function(e){var t=this,n=i.default.file(e.configPath);return this.workspaceConfiguration.load(n).then(function(){var r=m.toWorkspaceFolders(t.workspaceConfiguration.getFolders(),i.default.file(o.dirname(n.fsPath))),s=e.id,a=x.getWorkspaceLabel({id:s,configPath:n.fsPath},t.environmentService);return new m.Workspace(s,a,r,n)})},t.prototype.createSingleFolderWorkspace=function(e){var t=i.default.file(e);return g.stat(t.fsPath).then(function(e){var n=y.isLinux?e.ino:e.birthtime.getTime(),r=T.createHash("md5").update(t.fsPath).update(n?String(n):"").digest("hex"),o=i.default.file(t.fsPath);return new m.Workspace(r,F.getBaseLabel(o),m.toWorkspaceFolders([{path:o.fsPath}]),null,n)})},
t.prototype.createEmptyWorkspace=function(e){var t=e.backupPath?i.default.from({path:o.basename(e.backupPath),scheme:"empty"}).toString():"";return r.TPromise.as(new m.Workspace(t))},t.prototype.updateWorkspaceAndInitializeConfiguration=function(e){var t,n,i,r=this,o=!!this.workspace;return o?(t=this.getWorkbenchState(),n=this.workspace.configuration?this.workspace.configuration.fsPath:void 0,i=this.workspace.folders,this.workspace.update(e)):this.workspace=e,this.initializeConfiguration().then(function(){if(o){var e=r.getWorkbenchState();t&&e!==t&&r._onDidChangeWorkbenchState.fire(e);var s=r.workspace.configuration?r.workspace.configuration.fsPath:void 0;(n&&s!==n||e!==t)&&r._onDidChangeWorkspaceName.fire();var a=r.compareFolders(i,r.workspace.folders);a&&(a.added.length||a.removed.length||a.changed.length)&&r._onDidChangeWorkspaceFolders.fire(a)}})},t.prototype.compareFolders=function(e,t){var n={added:[],removed:[],changed:[]};n.added=t.filter(function(t){return!e.some(function(e){
return t.uri.toString()===e.uri.toString()})});for(var i=0;i<e.length;i++){var r=e[i],o=0;for(o=0;o<t.length&&r.uri.toString()!==t[o].uri.toString();o++);o<t.length?i===o&&r.name===t[o].name||n.changed.push(r):n.removed.push(r)}return n},t.prototype.initializeConfiguration=function(){return this.registerConfigurationSchemas(),this.loadConfiguration()},t.prototype.reloadUserConfiguration=function(e){return this.userConfiguration.reload()},t.prototype.reloadWorkspaceConfiguration=function(e){var t=this,n=this.getWorkbenchState();return n===m.WorkbenchState.FOLDER?this.onWorkspaceFolderConfigurationChanged(this.workspace.folders[0],e):n===m.WorkbenchState.WORKSPACE?this.workspaceConfiguration.reload().then(function(){return t.onWorkspaceConfigurationChanged()}):r.TPromise.as(null)},t.prototype.reloadWorkspaceFolderConfiguration=function(e,t){return this.onWorkspaceFolderConfigurationChanged(e,t)},t.prototype.loadConfiguration=function(){var e=this;this.cachedFolderConfigs=new d.ResourceMap
;var t=this.workspace.folders;return this.loadFolderConfigurations(t).then(function(n){var i=e.getWorkspaceConfigurationModel(n),r=new d.ResourceMap;n.forEach(function(e,n){return r.set(t[n].uri,e)});var o=e._configuration;if(e._configuration=new C.Configuration(e.defaultConfiguration,e.userConfiguration.configurationModel,i,r,new S.ConfigurationModel,new d.ResourceMap,e.getWorkbenchState()!==m.WorkbenchState.EMPTY?e.workspace:null),o){var s=e._configuration.compare(o);e.triggerConfigurationChange((new S.ConfigurationChangeEvent).change(s),_.ConfigurationTarget.WORKSPACE)}else e._onDidChangeConfiguration.fire(new C.AllKeysConfigurationChangeEvent(e._configuration,_.ConfigurationTarget.WORKSPACE,e.getTargetConfiguration(_.ConfigurationTarget.WORKSPACE)))})},t.prototype.getWorkspaceConfigurationModel=function(e){switch(this.getWorkbenchState()){case m.WorkbenchState.FOLDER:return e[0];case m.WorkbenchState.WORKSPACE:return this.workspaceConfiguration.getConfiguration();default:return new S.ConfigurationModel}},
t.prototype.onDefaultConfigurationChanged=function(e){var t=this;this.defaultConfiguration=new S.DefaultConfigurationModel,this.registerConfigurationSchemas(),this.workspace&&this._configuration&&(this._configuration.updateDefaultConfiguration(this.defaultConfiguration),this.getWorkbenchState()===m.WorkbenchState.FOLDER?this._configuration.updateWorkspaceConfiguration(this.cachedFolderConfigs.get(this.workspace.folders[0].uri).reprocess()):(this._configuration.updateWorkspaceConfiguration(this.workspaceConfiguration.reprocessWorkspaceSettings()),this.workspace.folders.forEach(function(e){return t._configuration.updateFolderConfiguration(e.uri,t.cachedFolderConfigs.get(e.uri).reprocess())})),this.triggerConfigurationChange((new S.ConfigurationChangeEvent).change(e),_.ConfigurationTarget.DEFAULT))},t.prototype.registerConfigurationSchemas=function(){if(this.workspace){var e=w.Registry.as(v.Extensions.JSONContribution),t=function(e,t){return Object.keys(e).reduce(function(n,i){return n[i]=h.deepClone(e[i]),
n[i].deprecationMessage=t,n},{})},n={properties:I.allSettings.properties,patternProperties:I.allSettings.patternProperties,additionalProperties:!1,errorMessage:"Unknown configuration setting"},i=t(I.applicationSettings.properties,W.localize(0,null)),r={properties:c({},i,I.windowSettings.properties,I.resourceSettings.properties),patternProperties:I.allSettings.patternProperties,additionalProperties:!1,errorMessage:"Unknown configuration setting"};if(e.registerSchema(E.defaultSettingsSchemaId,n),e.registerSchema(E.userSettingsSchemaId,n),m.WorkbenchState.WORKSPACE===this.getWorkbenchState()){var o=t(I.windowSettings.properties,W.localize(1,null)),s={properties:c({},i,o,I.resourceSettings.properties),patternProperties:I.allSettings.patternProperties,additionalProperties:!1,errorMessage:"Unknown configuration setting"};e.registerSchema(E.workspaceSettingsSchemaId,r),e.registerSchema(E.folderSettingsSchemaId,s)}else e.registerSchema(E.workspaceSettingsSchemaId,r),e.registerSchema(E.folderSettingsSchemaId,r)}},
t.prototype.onUserConfigurationChanged=function(){var e=this._configuration.compareAndUpdateUserConfiguration(this.userConfiguration.configurationModel);this.triggerConfigurationChange(e,_.ConfigurationTarget.USER)},t.prototype.onWorkspaceConfigurationChanged=function(){var e=this;if(this.workspace&&this.workspace.configuration&&this._configuration){var t=this._configuration.compareAndUpdateWorkspaceConfiguration(this.workspaceConfiguration.getConfiguration()),n=m.toWorkspaceFolders(this.workspaceConfiguration.getFolders(),i.default.file(o.dirname(this.workspace.configuration.fsPath))),s=this.compareFolders(this.workspace.folders,n);if(s.added.length||s.removed.length||s.changed.length)return this.workspace.folders=n,this.onFoldersChanged().then(function(n){e.triggerConfigurationChange(n.change(t),_.ConfigurationTarget.WORKSPACE_FOLDER),e._onDidChangeWorkspaceFolders.fire(s)});this.triggerConfigurationChange(t,_.ConfigurationTarget.WORKSPACE)}return r.TPromise.as(null)},
t.prototype.onWorkspaceFolderConfigurationChanged=function(e,t){var n=this;return this.loadFolderConfigurations([e]).then(function(t){var i=t[0],r=n._configuration.compareAndUpdateFolderConfiguration(e.uri,i);if(n.getWorkbenchState()===m.WorkbenchState.FOLDER){var o=n._configuration.compareAndUpdateWorkspaceConfiguration(i);n.triggerConfigurationChange(o,_.ConfigurationTarget.WORKSPACE)}else n.triggerConfigurationChange(r,_.ConfigurationTarget.WORKSPACE_FOLDER)})},t.prototype.onFoldersChanged=function(){for(var e=this,t=new S.ConfigurationChangeEvent,n=function(e){if(!i.workspace.folders.filter(function(t){return t.uri.toString()===e.toString()})[0]){i.cachedFolderConfigs.get(e).dispose(),i.cachedFolderConfigs.delete(e),t=t.change(i._configuration.compareAndDeleteFolderConfiguration(e))}},i=this,o=0,s=this.cachedFolderConfigs.keys();o<s.length;o++){n(s[o])}var a=this.workspace.folders.filter(function(t){return!e.cachedFolderConfigs.has(t.uri)})
;return a.length?this.loadFolderConfigurations(a).then(function(n){return n.forEach(function(n,i){t=t.change(e._configuration.compareAndUpdateFolderConfiguration(a[i].uri,n))}),t}):r.TPromise.as(t)},t.prototype.loadFolderConfigurations=function(e){var t=this;return r.TPromise.join(e.map(function(e){var n=t.cachedFolderConfigs.get(e.uri);return n||(n=new R.FolderConfiguration(e,t.workspaceSettingsRootFolder,t.getWorkbenchState(),t.environmentService,t.fileService),t._register(n.onDidChange(function(){return t.onWorkspaceFolderConfigurationChanged(e)})),t.cachedFolderConfigs.set(e.uri,t._register(n))),n.loadConfiguration()}).slice())},t.prototype.writeConfigurationValue=function(e,t,n,i,o){var s=this;return n===_.ConfigurationTarget.DEFAULT?r.TPromise.wrapError(new Error("Invalid configuration target")):n===_.ConfigurationTarget.MEMORY?(this._configuration.updateValue(e,t,i),
this.triggerConfigurationChange((new S.ConfigurationChangeEvent).change(i.overrideIdentifier?[_.keyFromOverrideIdentifier(i.overrideIdentifier)]:[e],i.resource),n),r.TPromise.as(null)):this.configurationEditingService.writeConfiguration(n,{key:e,value:t},{scopes:i,donotNotifyError:o}).then(function(){switch(n){case _.ConfigurationTarget.USER:return s.reloadUserConfiguration();case _.ConfigurationTarget.WORKSPACE:return s.reloadWorkspaceConfiguration();case _.ConfigurationTarget.WORKSPACE_FOLDER:if(i&&i.resource?s.workspace.getFolder(i.resource):null)return s.reloadWorkspaceFolderConfiguration(s.workspace.getFolder(i.resource),e)}return null})},t.prototype.deriveConfigurationTarget=function(e,t,n,i){if(i)return i;if(void 0!==t){var r=this.inspect(e,n);if(!h.equals(t,r.value))return void 0!==r.workspaceFolder?_.ConfigurationTarget.WORKSPACE_FOLDER:void 0!==r.workspace?_.ConfigurationTarget.WORKSPACE:_.ConfigurationTarget.USER}},t.prototype.triggerConfigurationChange=function(e,t){
e.affectedKeys.length&&(e.telemetryData(t,this.getTargetConfiguration(t)),this._onDidChangeConfiguration.fire(new C.WorkspaceConfigurationChangeEvent(e,this.workspace)))},t.prototype.getTargetConfiguration=function(e){switch(e){case _.ConfigurationTarget.DEFAULT:return this._configuration.defaults.contents;case _.ConfigurationTarget.USER:return this._configuration.user.contents;case _.ConfigurationTarget.WORKSPACE:return this._configuration.workspace.contents}return{}},t.prototype.pathEquals=function(e,t){return y.isLinux||(e=e.toLowerCase(),t=t.toLowerCase()),e===t},t}(p.Disposable);t.WorkspaceService=B;var V=function(){function e(e,t,n){this.extensionService=t,this.commandService=n,e.args["export-default-configuration"]&&this.writeConfigModelAndQuit(e.args["export-default-configuration"])}return e.prototype.writeConfigModelAndQuit=function(e){var t=this;return this.extensionService.whenInstalledExtensionsRegistered().then(function(){return t.writeConfigModel(e)}).then(function(){
return t.commandService.executeCommand("workbench.action.quit")}).then(function(){})},e.prototype.writeConfigModel=function(e){var t=this.getConfigModel(),n=JSON.stringify(t,void 0,"  ");return g.writeFile(e,n)},e.prototype.getConfigModel=function(){var e=w.Registry.as(I.Extensions.Configuration),t=[],n=function(e,n){var i={name:e,description:n.description,default:n.default,type:n.type};n.enum&&(i.enum=n.enum),n.enumDescriptions&&(i.enumDescriptions=n.enumDescriptions),t.push(i)},i=function(e){if(e.properties)for(var t in e.properties)n(t,e.properties[t]);e.allOf&&e.allOf.forEach(i)};e.getConfigurations().slice().forEach(i);var r=e.getExcludedConfigurationProperties();for(var o in r)n(o,r[o]);return{settings:t.sort(function(e,t){return e.name.localeCompare(t.name)}),buildTime:Date.now(),commit:A.default.commit,buildNumber:A.default.settingsSearchBuildId}},e=a([l(0,b.IEnvironmentService),l(1,k.IExtensionService),l(2,D.ICommandService)],e)}();t.DefaultConfigurationExportHelper=V}),
define(e[506],t([1,0,773,10,4,30,18,5,89,365,15,17,105,19,60,36,72,48,33,6]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeybindingEditingService=C.createDecorator("keybindingEditingService");var E=function(e){function t(t,n,i,o,s){var a=e.call(this)||this;return a.textModelResolverService=t,a.textFileService=n,a.fileService=i,a.configurationService=o,a.environmentService=s,a.resource=r.default.file(a.environmentService.appKeybindingsPath),a.queue=new c.Queue,a}return n(t,e),t.prototype.editKeybinding=function(e,t){var n=this;return this.queue.queue(function(){return n.doEditKeybinding(e,t)})},t.prototype.resetKeybinding=function(e){var t=this;return this.queue.queue(function(){return t.doResetKeybinding(e)})},t.prototype.removeKeybinding=function(e){var t=this;return this.queue.queue(function(){return t.doRemoveKeybinding(e)})},t.prototype.doEditKeybinding=function(e,t){var n=this;return this.resolveAndValidate().then(function(i){
var r=i.object.textEditorModel,o=d.parse(r.getValue()),s=n.findUserKeybindingEntryIndex(t,o);return n.updateKeybinding(e,t,r,s),t.isDefault&&t.resolvedKeybinding&&n.removeDefaultKeybinding(t,r),n.save().then(function(){return i.dispose()})})},t.prototype.doRemoveKeybinding=function(e){var t=this;return this.resolveAndValidate().then(function(n){var i=n.object.textEditorModel;return e.isDefault?t.removeDefaultKeybinding(e,i):t.removeUserKeybinding(e,i),t.save().then(function(){return n.dispose()})})},t.prototype.doResetKeybinding=function(e){var t=this;return this.resolveAndValidate().then(function(n){var i=n.object.textEditorModel;return e.isDefault||(t.removeUserKeybinding(e,i),t.removeUnassignedDefaultKeybinding(e,i)),t.save().then(function(){return n.dispose()})})},t.prototype.save=function(){return this.textFileService.save(this.resource)},t.prototype.updateKeybinding=function(e,t,n,i){var r=n.getOptions(),o=r.tabSize,s=r.insertSpaces,a=n.getEOL()
;-1!==i?this.applyEditsToBuffer(h.setProperty(n.getValue(),[i,"key"],e,{tabSize:o,insertSpaces:s,eol:a})[0],n):this.applyEditsToBuffer(h.setProperty(n.getValue(),[-1],this.asObject(e,t.command,t.when,!1),{tabSize:o,insertSpaces:s,eol:a})[0],n)},t.prototype.removeUserKeybinding=function(e,t){var n=t.getOptions(),i=n.tabSize,r=n.insertSpaces,o=t.getEOL(),s=d.parse(t.getValue()),a=this.findUserKeybindingEntryIndex(e,s);-1!==a&&this.applyEditsToBuffer(h.setProperty(t.getValue(),[a],void 0,{tabSize:i,insertSpaces:r,eol:o})[0],t)},t.prototype.removeDefaultKeybinding=function(e,t){var n=t.getOptions(),i=n.tabSize,r=n.insertSpaces,o=t.getEOL();this.applyEditsToBuffer(h.setProperty(t.getValue(),[-1],this.asObject(e.resolvedKeybinding.getUserSettingsLabel(),e.command,e.when,!0),{tabSize:i,insertSpaces:r,eol:o})[0],t)},t.prototype.removeUnassignedDefaultKeybinding=function(e,t){
for(var n=t.getOptions(),i=n.tabSize,r=n.insertSpaces,o=t.getEOL(),s=d.parse(t.getValue()),a=0,c=this.findUnassignedDefaultKeybindingEntryIndex(e,s).reverse();a<c.length;a++){var l=c[a];this.applyEditsToBuffer(h.setProperty(t.getValue(),[l],void 0,{tabSize:i,insertSpaces:r,eol:o})[0],t)}},t.prototype.findUserKeybindingEntryIndex=function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if(i.command===e.command){if(!i.when&&!e.when)return n;if(i.when&&e.when&&p.ContextKeyExpr.deserialize(i.when).serialize()===e.when.serialize())return n}}return-1},t.prototype.findUnassignedDefaultKeybindingEntryIndex=function(e,t){for(var n=[],i=0;i<t.length;i++)t[i].command==="-"+e.command&&n.push(i);return n},t.prototype.asObject=function(e,t,n,i){var r={key:e};return r.command=i?"-"+t:t,n&&(r.when=n.serialize()),r},t.prototype.applyEditsToBuffer=function(e,t){
var n=t.getPositionAt(e.offset),i=t.getPositionAt(e.offset+e.length),r=new v.Range(n.lineNumber,n.column,i.lineNumber,i.column),o=t.getValueInRange(r)?g.EditOperation.replace(r,e.content):g.EditOperation.insert(n,e.content);t.pushEditOperations([new m.Selection(n.lineNumber,n.column,n.lineNumber,n.column)],[o],function(){return[]})},t.prototype.resolveModelReference=function(){var e=this;return this.fileService.existsFile(this.resource).then(function(t){var n=e.configurationService.getValue("files",{overrideIdentifier:"json"}).eol;return(t?o.TPromise.as(null):e.fileService.updateContent(e.resource,e.getEmptyContent(n),{encoding:"utf8"})).then(function(){return e.textModelResolverService.createModelReference(e.resource)})})},t.prototype.resolveAndValidate=function(){var e=this;return this.textFileService.isDirty(this.resource)?o.TPromise.wrapError(new Error(i.localize(0,null))):this.resolveModelReference().then(function(t){var n=t.object.textEditorModel,r=n.getEOL();if(n.getValue()){var a=e.parse(n)
;if(a.parseErrors.length)return o.TPromise.wrapError(new Error(i.localize(1,null)));if(a.result){if(!s.isArray(a.result))return o.TPromise.wrapError(new Error(i.localize(2,null)))}else{c=r+"[]";e.applyEditsToBuffer({content:c,length:c.length,offset:n.getValue().length},n)}}else{var c=e.getEmptyContent(r);e.applyEditsToBuffer({content:c,length:c.length,offset:0},n)}return t})},t.prototype.parse=function(e){var t=[];return{result:d.parse(e.getValue(),t),parseErrors:t}},t.prototype.getEmptyContent=function(e){return"// "+i.localize(3,null)+e+"[]"},t=a([l(0,b.ITextModelService),l(1,S.ITextFileService),l(2,_.IFileService),l(3,f.IConfigurationService),l(4,y.IEnvironmentService)],t)}(u.Disposable);t.KeybindingsEditingService=E}),define(e[1441],t([1,0,676,4,18,8,11,5,246,194,264,41,124,28,135,482,6,37,196,383,297,35,506,12,15,84,26,21,32,58,22,115,145,902]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var N=s.$,F=function(e){
function t(n,i,r,s,a,c,l,u,d,h,p){var f=e.call(this,t.ID,n,i)||this;return f.keybindingsService=r,f.contextMenuService=s,f.preferencesService=a,f.keybindingEditingService=c,f.contextKeyService=l,f.notificationService=u,f.clipboardService=d,f.instantiationService=h,f.editorService=p,f.latestEmptyFilters=[],f.delayedFiltering=new o.Delayer(300),f._register(r.onDidUpdateKeybindings(function(){return f.render(!1,P.CancellationToken.None)})),f.keybindingsEditorContextKey=E.CONTEXT_KEYBINDINGS_EDITOR.bindTo(f.contextKeyService),f.searchFocusContextKey=E.CONTEXT_KEYBINDINGS_SEARCH_FOCUS.bindTo(f.contextKeyService),f.keybindingFocusContextKey=E.CONTEXT_KEYBINDING_FOCUS.bindTo(f.contextKeyService),f.delayedFilterLogging=new o.Delayer(1e3),f}return n(t,e),t.prototype.createEditor=function(e){var t=this,n=s.append(e,N("div",{class:"keybindings-editor"}));this.createOverlayContainer(n),this.createHeader(n),this.createBody(n);var i=this._register(s.trackFocus(e));this._register(i.onDidFocus(function(){
return t.keybindingsEditorContextKey.set(!0)})),this._register(i.onDidBlur(function(){return t.keybindingsEditorContextKey.reset()}))},t.prototype.setInput=function(t,n,i){var r=this;return e.prototype.setInput.call(this,t,n,i).then(function(){return r.render(n&&n.preserveFocus,i)})},t.prototype.clearInput=function(){e.prototype.clearInput.call(this),this.keybindingsEditorContextKey.reset(),this.keybindingFocusContextKey.reset()},t.prototype.layout=function(e){this.dimension=e,this.searchWidget.layout(e),this.overlayContainer.style.width=e.width+"px",this.overlayContainer.style.height=e.height+"px",this.defineKeybindingWidget.layout(this.dimension),this.layoutKebindingsList()},t.prototype.focus=function(){var e=this.activeKeybindingEntry;e?this.selectEntry(e):this.searchWidget.focus()},Object.defineProperty(t.prototype,"activeKeybindingEntry",{get:function(){var e=this.keybindingsList.getFocusedElements()[0];return e&&e.templateId===y.KEYBINDING_ENTRY_TEMPLATE_ID?e:null},enumerable:!0,configurable:!0}),
t.prototype.getSecondaryActions=function(){var e=this;return[{label:i.localize(0,null),enabled:!0,id:E.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS,run:function(){return e.searchWidget.setValue("@source:default"),r.TPromise.as(null)}},{label:i.localize(1,null),enabled:!0,id:E.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS,run:function(){return e.searchWidget.setValue("@source:user"),r.TPromise.as(null)}}]},t.prototype.defineKeybinding=function(e){var t=this;return this.selectEntry(e),this.showOverlayContainer(),this.defineKeybindingWidget.define().then(function(n){if(n){if((e.keybindingItem.keybinding?e.keybindingItem.keybinding.getUserSettingsLabel():"")!==n)return t.reportKeybindingAction(E.KEYBINDINGS_EDITOR_COMMAND_DEFINE,e.keybindingItem.command,n),t.keybindingEditingService.editKeybinding(n,e.keybindingItem.keybindingItem).then(function(){e.keybindingItem.keybinding||(t.unAssignedKeybindingItemToRevealAndFocus=e)})}return null}).then(function(){t.hideOverlayContainer(),t.selectEntry(e)},function(n){
return t.hideOverlayContainer(),t.onKeybindingEditingError(n),t.selectEntry(e),n})},t.prototype.removeKeybinding=function(e){var t=this;return this.selectEntry(e),e.keybindingItem.keybinding?(this.reportKeybindingAction(E.KEYBINDINGS_EDITOR_COMMAND_REMOVE,e.keybindingItem.command,e.keybindingItem.keybinding),this.keybindingEditingService.removeKeybinding(e.keybindingItem.keybindingItem).then(function(){return t.focus()},function(n){t.onKeybindingEditingError(n),t.selectEntry(e)})):r.TPromise.as(null)},t.prototype.resetKeybinding=function(e){var t=this;return this.selectEntry(e),this.reportKeybindingAction(E.KEYBINDINGS_EDITOR_COMMAND_RESET,e.keybindingItem.command,e.keybindingItem.keybinding),this.keybindingEditingService.resetKeybinding(e.keybindingItem.keybindingItem).then(function(){e.keybindingItem.keybinding||(t.unAssignedKeybindingItemToRevealAndFocus=e),t.selectEntry(e)},function(n){t.onKeybindingEditingError(n),t.selectEntry(e)})},t.prototype.copyKeybinding=function(e){this.selectEntry(e),
this.reportKeybindingAction(E.KEYBINDINGS_EDITOR_COMMAND_COPY,e.keybindingItem.command,e.keybindingItem.keybinding);var t={key:e.keybindingItem.keybinding?e.keybindingItem.keybinding.getUserSettingsLabel():"",command:e.keybindingItem.command};return e.keybindingItem.when&&(t.when=e.keybindingItem.when),this.clipboardService.writeText(JSON.stringify(t,null,"  ")),r.TPromise.as(null)},t.prototype.copyKeybindingCommand=function(e){return this.selectEntry(e),this.reportKeybindingAction(E.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,e.keybindingItem.command,e.keybindingItem.keybinding),this.clipboardService.writeText(e.keybindingItem.command),r.TPromise.as(null)},t.prototype.focusSearch=function(){this.searchWidget.focus()},t.prototype.search=function(e){this.focusSearch(),this.searchWidget.setValue(e)},t.prototype.clearSearchResults=function(){this.searchWidget.clear()},t.prototype.showSimilarKeybindings=function(e){var t='"'+e.keybindingItem.keybinding.getAriaLabel()+'"'
;return t!==this.searchWidget.getValue()&&this.searchWidget.setValue(t),r.TPromise.as(null)},t.prototype.createOverlayContainer=function(e){var t=this;this.overlayContainer=s.append(e,N(".overlay-container")),this.overlayContainer.style.position="absolute",this.overlayContainer.style.zIndex="10",this.defineKeybindingWidget=this._register(this.instantiationService.createInstance(C.DefineKeybindingWidget,this.overlayContainer)),this._register(this.defineKeybindingWidget.onDidChange(function(e){return t.defineKeybindingWidget.printExisting(t.keybindingsEditorModel.fetch('"'+e+'"').length)})),this._register(this.defineKeybindingWidget.onShowExistingKeybidings(function(e){return t.searchWidget.setValue('"'+e+'"')})),this.hideOverlayContainer()},t.prototype.showOverlayContainer=function(){this.overlayContainer.style.display="block"},t.prototype.hideOverlayContainer=function(){this.overlayContainer.style.display="none"},t.prototype.createHeader=function(e){var t=this
;this.headerContainer=s.append(e,N(".keybindings-header"));var n=s.append(this.headerContainer,N(".search-container"));this.searchWidget=this._register(this.instantiationService.createInstance(_.SearchWidget,n,{ariaLabel:i.localize(2,null),placeholder:i.localize(3,null),focusKey:this.searchFocusContextKey})),this._register(this.searchWidget.onDidChange(function(e){return t.delayedFiltering.trigger(function(){return t.filterKeybindings()})})),this.sortByPrecedence=this._register(new d.Checkbox({actionClassName:"sort-by-precedence",isChecked:!1,title:i.localize(4,null)})),this._register(this.sortByPrecedence.onChange(function(){return t.renderKeybindingsEntries(!1)})),n.appendChild(this.sortByPrecedence.domNode),this.createOpenKeybindingsElement(this.headerContainer)},t.prototype.createOpenKeybindingsElement=function(e){var t=this,n=s.append(e,N(".open-keybindings-container"));s.append(n,N("",null,i.localize(5,null)));var r=s.append(n,N(".file-name",null,i.localize(6,null)));r.tabIndex=0,
this._register(s.addDisposableListener(r,s.EventType.CLICK,function(){return t.preferencesService.openGlobalKeybindingSettings(!0)})),this._register(s.addDisposableListener(r,s.EventType.KEY_UP,function(e){var n=new k.StandardKeyboardEvent(e);switch(n.keyCode){case 3:return t.preferencesService.openGlobalKeybindingSettings(!0),n.preventDefault(),void n.stopPropagation()}}))},t.prototype.createBody=function(e){var t=s.append(e,N(".keybindings-body"));this.createList(t)},t.prototype.createList=function(e){var t=this;this.keybindingsListContainer=s.append(e,N(".keybindings-list-container")),this.keybindingsList=this._register(this.instantiationService.createInstance(R.WorkbenchList,this.keybindingsListContainer,new W,[new B,new V(this,this.keybindingsService)],{identityProvider:function(e){return e.id},mouseSupport:!0,ariaLabel:i.localize(7,null)})),this._register(this.keybindingsList.onContextMenu(function(e){return t.onContextMenu(e)})),this._register(this.keybindingsList.onFocusChange(function(e){
return t.onFocusChange(e)})),this._register(this.keybindingsList.onDidFocus(function(){s.addClass(t.keybindingsList.getHTMLElement(),"focused")})),this._register(this.keybindingsList.onDidBlur(function(){s.removeClass(t.keybindingsList.getHTMLElement(),"focused"),t.keybindingFocusContextKey.reset()})),this._register(this.keybindingsList.onMouseDblClick(function(){return t.defineKeybinding(t.activeKeybindingEntry)})),this._register(this.keybindingsList.onKeyDown(function(e){if(3===new k.StandardKeyboardEvent(e).keyCode){t.activeKeybindingEntry&&t.defineKeybinding(t.activeKeybindingEntry),e.stopPropagation()}}))},t.prototype.render=function(e,t){var n=this;return this.input?this.input.resolve().then(function(e){if(!t.isCancellationRequested){n.keybindingsEditorModel=e;var i=L.EditorExtensionsRegistry.getEditorActions().reduce(function(e,t){return e[t.id]=t.label,e},{});return n.keybindingsEditorModel.resolve(i)}}).then(function(){t.isCancellationRequested||n.renderKeybindingsEntries(!1,e)}):r.TPromise.as(null)
},t.prototype.filterKeybindings=function(){var e=this;this.renderKeybindingsEntries(this.searchWidget.hasFocus()),this.delayedFilterLogging.trigger(function(){return e.reportFilteringUsed(e.searchWidget.getValue())})},t.prototype.renderKeybindingsEntries=function(e,t){if(this.keybindingsEditorModel){var n=this.searchWidget.getValue(),i=this.keybindingsEditorModel.fetch(n,this.sortByPrecedence.checked);0===i.length&&this.latestEmptyFilters.push(n);var r=this.keybindingsList.getSelection()[0];if(this.listEntries=[{id:"keybinding-header-entry",templateId:y.KEYBINDING_HEADER_TEMPLATE_ID}].concat(i),this.keybindingsList.splice(0,this.keybindingsList.length,this.listEntries),this.layoutKebindingsList(),e)this.keybindingsList.setSelection([]),this.keybindingsList.setFocus([]);else if(this.unAssignedKeybindingItemToRevealAndFocus){var o=this.getNewIndexOfUnassignedKeybinding(this.unAssignedKeybindingItemToRevealAndFocus);-1!==o&&(this.keybindingsList.reveal(o,.2),this.selectEntry(o)),
this.unAssignedKeybindingItemToRevealAndFocus=null}else-1!==r&&r<this.listEntries.length?this.selectEntry(r):this.editorService.activeControl!==this||t||this.focus()}},t.prototype.layoutKebindingsList=function(){var e=this.dimension.height-(s.getDomNodePagePosition(this.headerContainer).height+12);this.keybindingsListContainer.style.height=e+"px",this.keybindingsList.layout(e)},t.prototype.getIndexOf=function(e){var t=this.listEntries.indexOf(e);if(-1===t)for(var n=0;n<this.listEntries.length;n++)if(this.listEntries[n].id===e.id)return n;return t},t.prototype.getNewIndexOfUnassignedKeybinding=function(e){for(var t=0;t<this.listEntries.length;t++){var n=this.listEntries[t];if(n.templateId===y.KEYBINDING_ENTRY_TEMPLATE_ID){if(n.keybindingItem.command===e.keybindingItem.command)return t}}return-1},t.prototype.selectEntry=function(e){var t="number"==typeof e?e:this.getIndexOf(e);-1!==t&&(this.keybindingsList.getHTMLElement().focus(),this.keybindingsList.setFocus([t]),this.keybindingsList.setSelection([t]))},
t.prototype.focusKeybindings=function(){this.keybindingsList.getHTMLElement().focus();var e=this.keybindingsList.getFocus();this.keybindingsList.setFocus([e.length?e[0]:0])},t.prototype.onContextMenu=function(e){var t=this;e.element.templateId===y.KEYBINDING_ENTRY_TEMPLATE_ID&&(this.selectEntry(e.element),this.contextMenuService.showContextMenu({getAnchor:function(){return e.anchor},getActions:function(){return r.TPromise.as([t.createCopyAction(e.element),t.createCopyCommandAction(e.element),new f.Separator,t.createDefineAction(e.element),t.createRemoveAction(e.element),t.createResetAction(e.element),new f.Separator,t.createShowConflictsAction(e.element)])}}))},t.prototype.onFocusChange=function(e){this.keybindingFocusContextKey.reset();var t=e.elements[0];t&&(t.templateId!==y.KEYBINDING_HEADER_TEMPLATE_ID?t.templateId===y.KEYBINDING_ENTRY_TEMPLATE_ID&&this.keybindingFocusContextKey.set(!0):this.keybindingsList.focusNext())},t.prototype.createDefineAction=function(e){var t=this;return{
label:e.keybindingItem.keybinding?i.localize(8,null):i.localize(9,null),enabled:!0,id:E.KEYBINDINGS_EDITOR_COMMAND_DEFINE,run:function(){return t.defineKeybinding(e)}}},t.prototype.createRemoveAction=function(e){var t=this;return{label:i.localize(10,null),enabled:!!e.keybindingItem.keybinding,id:E.KEYBINDINGS_EDITOR_COMMAND_REMOVE,run:function(){return t.removeKeybinding(e)}}},t.prototype.createResetAction=function(e){var t=this;return{label:i.localize(11,null),enabled:!e.keybindingItem.keybindingItem.isDefault,id:E.KEYBINDINGS_EDITOR_COMMAND_RESET,run:function(){return t.resetKeybinding(e)}}},t.prototype.createShowConflictsAction=function(e){var t=this;return{label:i.localize(12,null),enabled:!!e.keybindingItem.keybinding,id:E.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR,run:function(){return t.showSimilarKeybindings(e)}}},t.prototype.createCopyAction=function(e){var t=this;return{label:i.localize(13,null),enabled:!0,id:E.KEYBINDINGS_EDITOR_COMMAND_COPY,run:function(){return t.copyKeybinding(e)}}},
t.prototype.createCopyCommandAction=function(e){var t=this;return{label:i.localize(14,null),enabled:!0,id:E.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,run:function(){return t.copyKeybindingCommand(e)}}},t.prototype.reportFilteringUsed=function(e){if(e){var t={filter:e,emptyFilters:this.getLatestEmptyFiltersForTelemetry()};this.latestEmptyFilters=[],this.telemetryService.publicLog("keybindings.filter",t)}},t.prototype.getLatestEmptyFiltersForTelemetry=function(){var e=0;return this.latestEmptyFilters.filter(function(t){return(e+=t.length)<=8192})},t.prototype.reportKeybindingAction=function(e,t,n){this.telemetryService.publicLog(e,{command:t,keybinding:n?"string"==typeof n?n:n.getUserSettingsLabel():""})},t.prototype.onKeybindingEditingError=function(e){this.notificationService.error("string"==typeof e?e:i.localize(15,null,""+e))},t.ID="workbench.editor.keybindings",
t=a([l(0,v.ITelemetryService),l(1,T.IThemeService),l(2,S.IKeybindingService),l(3,w.IContextMenuService),l(4,M.IPreferencesService),l(5,I.IKeybindingEditingService),l(6,x.IContextKeyService),l(7,O.INotificationService),l(8,m.IClipboardService),l(9,b.IInstantiationService),l(10,A.IEditorService)],t)}(g.BaseEditor);t.KeybindingsEditor=F;var W=function(){function e(){}return e.prototype.getHeight=function(e){if(e.templateId===y.KEYBINDING_ENTRY_TEMPLATE_ID){var t=e.keybindingItem.commandLabel&&e.commandIdMatches,n=!!e.commandDefaultLabelMatches;if(t&&n)return 60;if(t||n)return 40}return e.templateId===y.KEYBINDING_HEADER_TEMPLATE_ID?30:24},e.prototype.getTemplateId=function(e){return e.templateId},e}(),B=function(){function e(){}return Object.defineProperty(e.prototype,"templateId",{get:function(){return y.KEYBINDING_HEADER_TEMPLATE_ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return s.addClass(e,"keybindings-list-header"),
s.append(e,N(".header.actions"),N(".header.command",null,i.localize(16,null)),N(".header.keybinding",null,i.localize(17,null)),N(".header.source",null,i.localize(18,null)),N(".header.when",null,i.localize(19,null))),{}},e.prototype.renderElement=function(e,t,n){},e.prototype.disposeTemplate=function(e){},e}(),V=function(){function e(e,t){this.keybindingsEditor=e,this.keybindingsService=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return y.KEYBINDING_ENTRY_TEMPLATE_ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){s.addClass(e,"keybinding-item");var t=new H(e,this.keybindingsEditor,this.keybindingsService),n=new K(e,this.keybindingsEditor),i=new U(e,this.keybindingsEditor),r=new G(e,this.keybindingsEditor),o=new j(e,this.keybindingsEditor);return e.setAttribute("aria-labelledby",[n.id,i.id,r.id,o.id].join(" ")),{parent:e,actions:t,command:n,keybinding:i,source:r,when:o}},e.prototype.renderElement=function(e,t,n){s.toggleClass(n.parent,"odd",t%2==1),
n.actions.render(e),n.command.render(e),n.keybinding.render(e),n.source.render(e),n.when.render(e)},e.prototype.disposeTemplate=function(e){e.actions.dispose()},e}(),z=function(){function e(e,t){this.parent=e,this.keybindingsEditor=t,this.element=this.create(e),this.id=this.element.getAttribute("id")}return e.COUNTER=0,e}(),H=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.keybindingsService=i,r}return n(t,e),t.prototype.create=function(e){var t=s.append(e,N(".column.actions",{id:"actions_"+ ++z.COUNTER}));return this.actionBar=new f.ActionBar(t,{animated:!1}),t},t.prototype.render=function(e){this.actionBar.clear();var t=[];e.keybindingItem.keybinding?t.push(this.createEditAction(e)):t.push(this.createAddAction(e)),this.actionBar.push(t,{icon:!0})},t.prototype.createEditAction=function(e){var t=this,n=this.keybindingsService.lookupKeybinding(E.KEYBINDINGS_EDITOR_COMMAND_DEFINE);return{class:"edit",enabled:!0,id:"editKeybinding",
tooltip:n?i.localize(20,null,"("+n.getLabel()+")"):i.localize(21,null),run:function(){return t.keybindingsEditor.defineKeybinding(e)}}},t.prototype.createAddAction=function(e){var t=this,n=this.keybindingsService.lookupKeybinding(E.KEYBINDINGS_EDITOR_COMMAND_DEFINE);return{class:"add",enabled:!0,id:"addKeybinding",tooltip:n?i.localize(22,null,"("+n.getLabel()+")"):i.localize(23,null),run:function(){return t.keybindingsEditor.defineKeybinding(e)}}},t.prototype.dispose=function(){this.actionBar=u.dispose(this.actionBar)},t}(z),K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.create=function(e){return this.commandColumn=s.append(e,N(".column.command",{id:"command_"+ ++z.COUNTER})),this.commandColumn},t.prototype.render=function(e){s.clearNode(this.commandColumn);var t=e.keybindingItem,n=!(!t.commandLabel||!e.commandIdMatches),r=!!e.commandDefaultLabelMatches;s.toggleClass(this.commandColumn,"vertical-align-column",n||r),
this.commandColumn.setAttribute("aria-label",this.getAriaLabel(e));var o;t.commandLabel&&(o=new h.HighlightedLabel(this.commandColumn)).set(t.commandLabel,e.commandLabelMatches),e.commandDefaultLabelMatches&&(o=new h.HighlightedLabel(s.append(this.commandColumn,N(".command-default-label")))).set(t.commandDefaultLabel,e.commandDefaultLabelMatches),!e.commandIdMatches&&t.commandLabel||(o=new h.HighlightedLabel(s.append(this.commandColumn,N(".code")))).set(t.command,e.commandIdMatches),o&&(o.element.title=t.commandLabel?i.localize(24,null,t.commandLabel,t.command):t.command)},t.prototype.getAriaLabel=function(e){return i.localize(25,null,e.keybindingItem.commandLabel?e.keybindingItem.commandLabel:e.keybindingItem.command)},t}(z),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.create=function(e){return this.keybindingColumn=s.append(e,N(".column.keybinding",{id:"keybinding_"+ ++z.COUNTER})),this.keybindingColumn},t.prototype.render=function(e){
s.clearNode(this.keybindingColumn),this.keybindingColumn.setAttribute("aria-label",this.getAriaLabel(e)),e.keybindingItem.keybinding&&new p.KeybindingLabel(this.keybindingColumn,c.OS).set(e.keybindingItem.keybinding,e.keybindingMatches)},t.prototype.getAriaLabel=function(e){return e.keybindingItem.keybinding?i.localize(26,null,e.keybindingItem.keybinding.getAriaLabel()):i.localize(27,null)},t}(z),G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.create=function(e){return this.sourceColumn=s.append(e,N(".column.source",{id:"source_"+ ++z.COUNTER})),this.sourceColumn},t.prototype.render=function(e){s.clearNode(this.sourceColumn),this.sourceColumn.setAttribute("aria-label",this.getAriaLabel(e)),new h.HighlightedLabel(this.sourceColumn).set(e.keybindingItem.source,e.sourceMatches)},t.prototype.getAriaLabel=function(e){return i.localize(28,null,e.keybindingItem.source)},t}(z),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),
t.prototype.create=function(e){var t=s.append(e,N(".column.when"));return this.whenColumn=s.append(t,N("div",{id:"when_"+ ++z.COUNTER})),this.whenColumn},t.prototype.render=function(e){s.clearNode(this.whenColumn),this.whenColumn.setAttribute("aria-label",this.getAriaLabel(e)),s.toggleClass(this.whenColumn,"code",!!e.keybindingItem.when),s.toggleClass(this.whenColumn,"empty",!e.keybindingItem.when),e.keybindingItem.when?(new h.HighlightedLabel(this.whenColumn).set(e.keybindingItem.when,e.whenMatches),this.whenColumn.title=e.keybindingItem.when):this.whenColumn.textContent="—"},t.prototype.getAriaLabel=function(e){return e.keybindingItem.when?i.localize(29,null,e.keybindingItem.when):i.localize(30,null)},t}(z);T.registerThemingParticipant(function(e,t){var n=e.getColor(D.listHighlightForeground);n&&t.addRule(".keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { color: "+n+"; }")})}),
define(e[294],t([1,0,25,784,7,4,9,151,126,5,416,30,27,36,48,40,213,153,33,6,54,47,28,18,159,66,22,11]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var L=function(e){function t(n,i,r,s,a,c,l,u,d,h,p,f,g){var v=e.call(this,a,s)||this;return v.notificationService=r,v.fileService=c,v.instantiationService=l,v.telemetryService=u,v.textFileService=d,v.backupFileService=h,v.environmentService=p,v.contextService=f,v.hashService=g,v.resource=n,v.toDispose=[],v._onDidContentChange=new o.Emitter,v._onDidStateChange=new o.Emitter,v.toDispose.push(v._onDidContentChange),v.toDispose.push(v._onDidStateChange),v.preferredEncoding=i,v.inOrphanMode=!1,v.dirty=!1,v.versionId=0,v.lastSaveAttemptTime=0,v.saveSequentializer=new R,v.contentChangeEventScheduler=new T.RunOnceScheduler(function(){return v._onDidContentChange.fire(m.StateChange.CONTENT_CHANGE)},t.DEFAULT_CONTENT_CHANGE_BUFFER_DELAY),v.toDispose.push(v.contentChangeEventScheduler),
v.orphanedChangeEventScheduler=new T.RunOnceScheduler(function(){return v._onDidStateChange.fire(m.StateChange.ORPHANED_CHANGE)},t.DEFAULT_ORPHANED_CHANGE_BUFFER_DELAY),v.toDispose.push(v.orphanedChangeEventScheduler),v.updateAutoSaveConfiguration(d.getAutoSaveConfiguration()),v.registerListeners(),v}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.fileService.onFileChanges(function(t){return e.onFileChanges(t)})),this.toDispose.push(this.textFileService.onAutoSaveConfigurationChange(function(t){return e.updateAutoSaveConfiguration(t)})),this.toDispose.push(this.textFileService.onFilesAssociationChange(function(t){return e.onFilesAssociationChange()})),this.toDispose.push(this.onDidStateChange(function(t){return e.onStateChange(t)}))},t.prototype.onStateChange=function(e){e===m.StateChange.REVERTED&&(this.contentChangeEventScheduler.cancel(),this._onDidContentChange.fire(m.StateChange.REVERTED))},t.prototype.onFileChanges=function(e){var t,n=this,i=!1
;if(this.inOrphanMode){e.contains(this.resource,_.FileChangeType.ADDED)&&(t=!1,i=!0)}else{e.contains(this.resource,_.FileChangeType.DELETED)&&(t=!0,i=!0)}if(i&&this.inOrphanMode!==t){(t?s.TPromise.timeout(100).then(function(){return!!n.disposed||n.fileService.existsFile(n.resource).then(function(e){return!e})}):s.TPromise.as(!1)).done(function(e){n.inOrphanMode===e||n.disposed||n.setOrphaned(e)})}},t.prototype.setOrphaned=function(e){this.inOrphanMode!==e&&(this.inOrphanMode=e,this.orphanedChangeEventScheduler.schedule())},t.prototype.updateAutoSaveConfiguration=function(e){"number"==typeof e.autoSaveDelay&&e.autoSaveDelay>0?(this.autoSaveAfterMillies=e.autoSaveDelay,this.autoSaveAfterMilliesEnabled=!0):(this.autoSaveAfterMillies=void 0,this.autoSaveAfterMilliesEnabled=!1)},t.prototype.onFilesAssociationChange=function(){this.updateTextEditorModelMode()},t.prototype.updateTextEditorModelMode=function(e){if(this.textEditorModel){
var t=this.getFirstLineText(this.textEditorModel),n=this.getOrCreateMode(this.modeService,e,t);this.modelService.setMode(this.textEditorModel,n)}},Object.defineProperty(t.prototype,"onDidContentChange",{get:function(){return this._onDidContentChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidStateChange",{get:function(){return this._onDidStateChange.event},enumerable:!0,configurable:!0}),t.prototype.getVersionId=function(){return this.versionId},t.setSaveErrorHandler=function(e){t.saveErrorHandler=e},t.setSaveParticipant=function(e){t.saveParticipant=e},t.prototype.revert=function(e){var t=this;if(!this.isResolved())return s.TPromise.wrap(null);this.cancelAutoSavePromise();var n=this.setDirty(!1);return(e?s.TPromise.as(this):this.load({forceReadFromDisk:!0})).then(function(){t._onDidStateChange.fire(m.StateChange.REVERTED)},function(e){return n(),s.TPromise.wrapError(e)})},t.prototype.load=function(e){return O("load() - enter",this.resource,new Date),
this.dirty||this.saveSequentializer.hasPendingSave()?(O("load() - exit - without loading because model is dirty or being saved",this.resource,new Date),s.TPromise.as(this)):this.textEditorModel||this.createTextEditorModelPromise?this.loadFromFile(e):this.loadWithBackup(e)},t.prototype.loadWithBackup=function(e){var t=this;return this.backupFileService.loadBackupResource(this.resource).then(function(n){if(t.createTextEditorModelPromise||t.textEditorModel)return t.createTextEditorModelPromise||s.TPromise.as(t);if(n){var r={resource:t.resource,name:i.basename(t.resource.fsPath),mtime:Date.now(),etag:void 0,value:k.createTextBufferFactory(""),encoding:t.fileService.encoding.getWriteEncoding(t.resource,t.preferredEncoding),isReadonly:!1};return t.loadWithContent(r,n)}return t.loadFromFile(e)})},t.prototype.loadFromFile=function(e){var t,n=this,i=e&&e.forceReadFromDisk,r=this.isResolved()||e&&e.allowBinary;return i?t=void 0:this.lastResolvedDiskStat&&(t=this.lastResolvedDiskStat.etag),
this.textFileService.resolveTextContent(this.resource,{acceptTextOnly:!r,etag:t,encoding:this.preferredEncoding}).then(function(e){return n.handleLoadSuccess(e)},function(e){return n.handleLoadError(e)})},t.prototype.handleLoadSuccess=function(e){return this.setOrphaned(!1),this.loadWithContent(e)},t.prototype.handleLoadError=function(e){var t=e.fileOperationResult;return this.setOrphaned(t===_.FileOperationResult.FILE_NOT_FOUND),t===_.FileOperationResult.FILE_NOT_MODIFIED_SINCE?(this.setDirty(!1),s.TPromise.as(this)):this.isResolved()&&t===_.FileOperationResult.FILE_NOT_FOUND?s.TPromise.as(this):s.TPromise.wrapError(e)},t.prototype.loadWithContent=function(e,t){var n=this;return this.doLoadWithContent(e,t).then(function(e){return n.isSettingsFile()?n.telemetryService.publicLog("settingsRead"):n.telemetryService.publicLog("fileGet",{mimeType:u.guessMimeTypes(n.resource.fsPath).join(", "),ext:i.extname(n.resource.fsPath),path:n.hashService.createSHA1(n.resource.fsPath)}),e})},
t.prototype.doLoadWithContent=function(e,t){O("load() - resolved content",this.resource,new Date);var n={resource:this.resource,name:e.name,mtime:e.mtime,etag:e.etag,isDirectory:!1,isSymbolicLink:!1,children:void 0,isReadonly:e.isReadonly};this.updateLastResolvedDiskStat(n);var i=this.contentEncoding;return this.contentEncoding=e.encoding,this.preferredEncoding?this.updatePreferredEncoding(this.contentEncoding):i!==this.contentEncoding&&this._onDidStateChange.fire(m.StateChange.ENCODING),this.textEditorModel?this.doUpdateTextModel(e.value):this.createTextEditorModelPromise?(O("load() - join existing text editor model promise",this.resource,new Date),this.createTextEditorModelPromise):this.doCreateTextModel(e.resource,e.value,t)},t.prototype.doUpdateTextModel=function(e){O("load() - updated text editor model",this.resource,new Date),this.setDirty(!1),this.blockModelContentChange=!0;try{this.updateTextEditorModel(e)}finally{this.blockModelContentChange=!1}return this.updateSavedVersionId(),s.TPromise.as(this)},
t.prototype.doCreateTextModel=function(e,t,n){var i=this;return O("load() - created text editor model",this.resource,new Date),this.createTextEditorModelPromise=this.doLoadBackup(n).then(function(n){var r=!!n;return i.createTextEditorModel(r?n:t,e).then(function(){return i.createTextEditorModelPromise=null,r?(i.makeDirty(),i.autoSaveAfterMilliesEnabled&&i.doAutoSave(i.versionId)):i.setDirty(!1),i.installModelListeners(),i},function(e){return i.createTextEditorModelPromise=null,s.TPromise.wrapError(e)})}),this.createTextEditorModelPromise},t.prototype.installModelListeners=function(){var e=this;this.toDispose.push(this.textEditorModel.onDidChangeContent(function(){return e.onModelContentChanged()}))},t.prototype.doLoadBackup=function(e){return e?this.backupFileService.resolveBackupContent(e).then(function(e){return e},function(e){return null}):s.TPromise.as(null)},t.prototype.getOrCreateMode=function(e,t,n){return e.getOrCreateModeByFilenameOrFirstLine(this.resource.fsPath,n)},
t.prototype.onModelContentChanged=function(){if(O("onModelContentChanged() - enter",this.resource,new Date),this.versionId++,O("onModelContentChanged() - new versionId "+this.versionId,this.resource,new Date),!this.blockModelContentChange){if(!this.autoSaveAfterMilliesEnabled&&this.textEditorModel.getAlternativeVersionId()===this.bufferSavedVersionId){O("onModelContentChanged() - model content changed back to last saved version",this.resource,new Date);var e=this.dirty;return this.setDirty(!1),void(e&&this._onDidStateChange.fire(m.StateChange.REVERTED))}O("onModelContentChanged() - model content changed and marked as dirty",this.resource,new Date),this.makeDirty(),this.autoSaveAfterMilliesEnabled&&(this.inConflictMode?O("makeDirty() - prevented save because we are in conflict resolution mode",this.resource,new Date):this.doAutoSave(this.versionId)),this.contentChangeEventScheduler.schedule()}},t.prototype.makeDirty=function(){var e=this.dirty;this.setDirty(!0),
e||this._onDidStateChange.fire(m.StateChange.DIRTY)},t.prototype.doAutoSave=function(e){var t=this;return O("doAutoSave() - enter for versionId "+e,this.resource,new Date),this.cancelAutoSavePromise(),this.autoSavePromise=s.TPromise.timeout(this.autoSaveAfterMillies).then(function(){e===t.versionId&&t.doSave(e,{reason:m.SaveReason.AUTO}).done(null,c.onUnexpectedError)}),this.autoSavePromise},t.prototype.cancelAutoSavePromise=function(){this.autoSavePromise&&(this.autoSavePromise.cancel(),this.autoSavePromise=void 0)},t.prototype.save=function(e){return void 0===e&&(e=Object.create(null)),this.isResolved()?(O("save() - enter",this.resource,new Date),this.cancelAutoSavePromise(),this.doSave(this.versionId,e)):s.TPromise.wrap(null)},t.prototype.doSave=function(e,n){var r=this;if(f.isUndefinedOrNull(n.reason)&&(n.reason=m.SaveReason.EXPLICIT),O("doSave("+e+") - enter with versionId ' + versionId",this.resource,new Date),
this.saveSequentializer.hasPendingSave(e))return O("doSave("+e+") - exit - found a pending save for versionId "+e,this.resource,new Date),this.saveSequentializer.pendingSave;if(!n.force&&!this.dirty||e!==this.versionId)return O("doSave("+e+") - exit - because not dirty and/or versionId is different (this.isDirty: "+this.dirty+", this.versionId: "+this.versionId+")",this.resource,new Date),s.TPromise.wrap(null);if(this.saveSequentializer.hasPendingSave())return O("doSave("+e+") - exit - because busy saving",this.resource,new Date),this.saveSequentializer.setNext(function(){return r.doSave(r.versionId,n)});this.autoSaveAfterMilliesEnabled||this.textEditorModel.pushStackElement();var o=s.TPromise.as(e);if(t.saveParticipant&&!n.skipSaveParticipants){var a=function(){return r.blockModelContentChange=!1,r.versionId};o=s.TPromise.as(void 0).then(function(){return r.blockModelContentChange=!0,t.saveParticipant.participate(r,{reason:n.reason})}).then(a,a)}return this.saveSequentializer.setPending(e,o.then(function(t){
if(!r.disposed)return!n.force||r.dirty||r.inOrphanMode||n.reason!==m.SaveReason.EXPLICIT||e!==t?(e=t,r.inErrorMode=!1,r.lastSaveAttemptTime=Date.now(),O("doSave("+e+") - before updateContent()",r.resource,new Date),r.saveSequentializer.setPending(t,r.fileService.updateContent(r.lastResolvedDiskStat.resource,r.createSnapshot(),{overwriteReadonly:n.overwriteReadonly,overwriteEncoding:n.overwriteEncoding,mtime:r.lastResolvedDiskStat.mtime,encoding:r.getEncoding(),etag:r.lastResolvedDiskStat.etag,writeElevated:n.writeElevated}).then(function(t){O("doSave("+e+") - after updateContent()",r.resource,new Date),r.isSettingsFile()?r.telemetryService.publicLog("settingsWritten"):r.telemetryService.publicLog("filePUT",{mimeType:u.guessMimeTypes(r.resource.fsPath).join(", "),ext:i.extname(r.lastResolvedDiskStat.resource.fsPath)}),e===r.versionId?(O("doSave("+e+") - setting dirty to false because versionId did not change",r.resource,new Date),
r.setDirty(!1)):O("doSave("+e+") - not setting dirty to false because versionId did change meanwhile",r.resource,new Date),r.updateLastResolvedDiskStat(t),r.contentChangeEventScheduler.cancel(),r._onDidStateChange.fire(m.StateChange.SAVED)},function(t){O("doSave("+e+") - exit - resulted in a save error: "+t.toString(),r.resource,new Date),r.inErrorMode=!0,t.fileOperationResult===_.FileOperationResult.FILE_MODIFIED_SINCE&&(r.inConflictMode=!0),r.onSaveError(t),r._onDidStateChange.fire(m.StateChange.SAVE_ERROR)}))):r.doTouch(t)}))},t.prototype.isSettingsFile=function(){var e=this;return!!i.isEqual(this.resource.fsPath,this.environmentService.appSettingsPath,!A.isLinux)||this.contextService.getWorkspace().folders.some(function(t){return i.isEqualOrParent(e.resource.fsPath,i.join(t.uri.fsPath,".vscode"))})},t.prototype.doTouch=function(e){var t=this;return this.saveSequentializer.setPending(e,this.fileService.updateContent(this.lastResolvedDiskStat.resource,this.createSnapshot(),{
mtime:this.lastResolvedDiskStat.mtime,encoding:this.getEncoding(),etag:this.lastResolvedDiskStat.etag}).then(function(e){t.updateLastResolvedDiskStat(e)},function(){}))},t.prototype.setDirty=function(e){var t=this,n=this.dirty,i=this.inConflictMode,r=this.inErrorMode,o=this.bufferSavedVersionId;return e?this.dirty=!0:(this.dirty=!1,this.inConflictMode=!1,this.inErrorMode=!1,this.updateSavedVersionId()),function(){t.dirty=n,t.inConflictMode=i,t.inErrorMode=r,t.bufferSavedVersionId=o}},t.prototype.updateSavedVersionId=function(){this.textEditorModel&&(this.bufferSavedVersionId=this.textEditorModel.getAlternativeVersionId())},t.prototype.updateLastResolvedDiskStat=function(e){this.lastResolvedDiskStat?this.lastResolvedDiskStat.mtime<=e.mtime&&(this.lastResolvedDiskStat=e):this.lastResolvedDiskStat=e},t.prototype.onSaveError=function(e){t.saveErrorHandler||t.setSaveErrorHandler(this.instantiationService.createInstance(M)),t.saveErrorHandler.onSaveError(e,this)},t.prototype.isDirty=function(){return this.dirty},
t.prototype.getLastSaveAttemptTime=function(){return this.lastSaveAttemptTime},t.prototype.getETag=function(){return this.lastResolvedDiskStat?this.lastResolvedDiskStat.etag:null},t.prototype.hasState=function(e){switch(e){case m.ModelState.CONFLICT:return this.inConflictMode;case m.ModelState.DIRTY:return this.dirty;case m.ModelState.ERROR:return this.inErrorMode;case m.ModelState.ORPHAN:return this.inOrphanMode;case m.ModelState.PENDING_SAVE:return this.saveSequentializer.hasPendingSave();case m.ModelState.SAVED:return!this.dirty}},t.prototype.getEncoding=function(){return this.preferredEncoding||this.contentEncoding},t.prototype.setEncoding=function(e,t){if(this.isNewEncoding(e))if(t===y.EncodingMode.Encode)this.updatePreferredEncoding(e),this.isDirty()||(this.versionId++,this.makeDirty()),this.inConflictMode||this.save({overwriteEncoding:!0}).done(null,c.onUnexpectedError);else{if(this.isDirty())return void this.notificationService.info(r.localize(0,null));this.updatePreferredEncoding(e),this.load({
forceReadFromDisk:!0}).done(null,c.onUnexpectedError)}},t.prototype.updatePreferredEncoding=function(e){this.isNewEncoding(e)&&(this.preferredEncoding=e,this._onDidStateChange.fire(m.StateChange.ENCODING))},t.prototype.isNewEncoding=function(e){return this.preferredEncoding!==e&&!(!this.preferredEncoding&&this.contentEncoding===e)},t.prototype.isResolved=function(){return!f.isUndefinedOrNull(this.lastResolvedDiskStat)},t.prototype.isReadonly=function(){return this.lastResolvedDiskStat&&this.lastResolvedDiskStat.isReadonly},t.prototype.isDisposed=function(){return this.disposed},t.prototype.getResource=function(){return this.resource},t.prototype.getStat=function(){return this.lastResolvedDiskStat},t.prototype.dispose=function(){this.disposed=!0,this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,this.toDispose=h.dispose(this.toDispose),this.createTextEditorModelPromise=null,this.cancelAutoSavePromise(),e.prototype.dispose.call(this)},
t.DEFAULT_CONTENT_CHANGE_BUFFER_DELAY=_.CONTENT_CHANGE_EVENT_BUFFER_DELAY,t.DEFAULT_ORPHANED_CHANGE_BUFFER_DELAY=100,t=a([l(2,D.INotificationService),l(3,E.IModeService),l(4,w.IModelService),l(5,_.IFileService),l(6,C.IInstantiationService),l(7,I.ITelemetryService),l(8,m.ITextFileService),l(9,S.IBackupFileService),l(10,v.IEnvironmentService),l(11,g.IWorkspaceContextService),l(12,x.IHashService)],t)}(b.BaseTextEditorModel);t.TextFileEditorModel=L;var R=function(){function e(){}return e.prototype.hasPendingSave=function(e){return!!this._pendingSave&&("number"==typeof e?this._pendingSave.versionId===e:!!this._pendingSave)},Object.defineProperty(e.prototype,"pendingSave",{get:function(){return this._pendingSave?this._pendingSave.promise:void 0},enumerable:!0,configurable:!0}),e.prototype.setPending=function(e,t){var n=this;return this._pendingSave={versionId:e,promise:t},t.done(function(){return n.donePending(e)},function(){return n.donePending(e)}),t},e.prototype.donePending=function(e){
this._pendingSave&&e===this._pendingSave.versionId&&(this._pendingSave=void 0,this.triggerNextSave())},e.prototype.triggerNextSave=function(){if(this._nextSave){var e=this._nextSave;this._nextSave=void 0,e.run().done(e.promiseValue,e.promiseError)}},e.prototype.setNext=function(e){if(this._nextSave)this._nextSave.run=e;else{var t,n,i=new s.TPromise(function(e,i){t=e,n=i});this._nextSave={run:e,promise:i,promiseValue:t,promiseError:n}}return this._nextSave.promise},e}();t.SaveSequentializer=R;var O,M=function(){function e(e){this.notificationService=e}return e.prototype.onSaveError=function(e,t){this.notificationService.error(r.localize(1,null,i.basename(t.getResource().fsPath),d.toErrorMessage(e,!1)))},e=a([l(0,D.INotificationService)],e)}();O||(O=p.register("TextFileEditorModelDiagnostics",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.log(e[1]+" - "+e[0]+" (time: "+e[2].getTime()+" ["+e[2].toUTCString()+"])")}))}),
define(e[1443],t([1,0,18,14,71,48,6,19,60,39,380,379,507,17,294,61,105,67,195,174,1447,20,77,47,160,29,282,415,544,184]),function(e,t,n,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O){"use strict";function M(e,t){var n=null;if(e.isAttachedToEditor())for(var i=0,r=t.listCodeEditors();i<r.length;i++){var o=r[i];if(o.getModel()===e){if(o.hasTextFocus())return o;n=o}}return n}Object.defineProperty(t,"__esModule",{value:!0});var P=function(){function e(e,t){this.configurationService=e,this.codeEditorService=t}return e.prototype.participate=function(e,t){this.configurationService.getValue("files.trimTrailingWhitespace",{overrideIdentifier:e.textEditorModel.getLanguageIdentifier().language,resource:e.getResource()})&&this.doTrimTrailingWhitespace(e.textEditorModel,t.reason===c.SaveReason.AUTO)},e.prototype.doTrimTrailingWhitespace=function(e,t){var n=[],i=[],r=M(e,this.codeEditorService);if(r&&(n=r.getSelections(),t)){i.push.apply(i,n.map(function(e){
return new p.Position(e.positionLineNumber,e.positionColumn)}));var o=k.SnippetController2.get(r).getSessionEnclosingRange();if(o)for(var s=o.startLineNumber;s<=o.endLineNumber;s++)i.push(new p.Position(s,e.getLineMaxColumn(s)))}var a=f.trimTrailingWhitespace(e,i);a.length&&e.pushEditOperations(n,a,function(e){return n})},e=a([l(0,m.IConfigurationService),l(1,r.ICodeEditorService)],e)}(),N=function(){function e(e,t){this.configurationService=e,this.codeEditorService=t}return e.prototype.participate=function(e,t){this.configurationService.getValue("files.insertFinalNewline",{overrideIdentifier:e.textEditorModel.getLanguageIdentifier().language,resource:e.getResource()})&&this.doInsertFinalNewLine(e.textEditorModel)},e.prototype.doInsertFinalNewLine=function(e){var t=e.getLineCount(),n=e.getLineContent(t),r=-1===i.lastNonWhitespaceIndex(n);if(t&&!r){var o=[],s=M(e,this.codeEditorService);s&&(o=s.getSelections()),
e.pushEditOperations(o,[S.EditOperation.insert(new p.Position(t,e.getLineMaxColumn(t)),e.getEOL())],function(e){return o}),s&&s.setSelections(o)}},e=a([l(0,m.IConfigurationService),l(1,r.ICodeEditorService)],e)}();t.FinalNewLineParticipant=N;var F=function(){function e(e,t){this.configurationService=e,this.codeEditorService=t}return e.prototype.participate=function(e,t){this.configurationService.getValue("files.trimFinalNewlines",{overrideIdentifier:e.textEditorModel.getLanguageIdentifier().language,resource:e.getResource()})&&this.doTrimFinalNewLines(e.textEditorModel)},e.prototype.doTrimFinalNewLines=function(e){var t=e.getLineCount();if(1!==t){var n=[],r=M(e,this.codeEditorService);r&&(n=r.getSelections());for(var o=e.getLineCount(),s=e.getLineContent(o),a=-1===i.lastNonWhitespaceIndex(s);a;)o--,s=e.getLineContent(o),a=-1===i.lastNonWhitespaceIndex(s);var c=e.validateRange(new d.Range(o+1,1,t+1,1));c.isEmpty()||e.pushEditOperations(n,[S.EditOperation.delete(c)],function(e){return n}),r&&r.setSelections(n)}
},e=a([l(0,m.IConfigurationService),l(1,r.ICodeEditorService)],e)}();t.TrimFinalNewLinesParticipant=F;var W=function(){function e(e,t,n){this._editorService=e,this._editorWorkerService=t,this._configurationService=n}return e.prototype.participate=function(e,t){var n=this,i=e.textEditorModel;if(t.reason!==c.SaveReason.AUTO&&this._configurationService.getValue("editor.formatOnSave",{overrideIdentifier:i.getLanguageIdentifier().language,resource:e.getResource()})){var r=i.getVersionId(),o=i.getOptions(),s=o.tabSize,a=o.insertSpaces,l=this._configurationService.getValue("editor.formatOnSaveTimeout",{overrideIdentifier:i.getLanguageIdentifier().language,resource:e.getResource()});return new Promise(function(e,t){setTimeout(function(){return t(w.localize(0,null,l))},l),g.getDocumentFormattingEdits(i,{tabSize:s,insertSpaces:a}).then(function(e){return n._editorWorkerService.computeMoreMinimalEdits(i.uri,e)}).then(e,function(n){n instanceof Error&&n.name===g.NoProviderError.Name?e():t(n)})}).then(function(e){
if(!I.isFalsyOrEmpty(e)&&r===i.getVersionId()){var t=M(i,n._editorService);t?n._editsWithEditor(t,e):n._editWithModel(i,e)}})}},e.prototype._editsWithEditor=function(e,t){v.FormattingEdit.execute(e,t)},e.prototype._editWithModel=function(t,n){var i=n[0].range,r=new h.Selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);t.pushEditOperations([r],n.map(e._asIdentEdit),function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t].range;if(d.Range.areIntersectingOrTouching(i,r))return[new h.Selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)]}})},e._asIdentEdit=function(e){var t=e.text,n=e.range;return{text:t,range:d.Range.lift(n),forceMoveMarkers:!0}},e=a([l(0,r.ICodeEditorService),l(1,C.IEditorWorkerService),l(2,m.IConfigurationService)],e)}(),B=function(){function e(e,t,n){this._bulkEditService=e,this._commandService=t,this._configurationService=n}return e.prototype.participate=function(e,t){return o(this,void 0,void 0,function(){var n,i,r,o,a,l=this;return s(this,function(s){
return t.reason===c.SaveReason.AUTO?[2,void 0]:(n=e.textEditorModel,i={overrideIdentifier:n.getLanguageIdentifier().language,resource:e.getResource()},(r=this._configurationService.getValue("editor.codeActionsOnSave",i))&&(o=Object.keys(r).filter(function(e){return r[e]}).map(function(e){return new A.CodeActionKind(e)})).length?(a=this._configurationService.getValue("editor.codeActionsOnSaveTimeout",i),[2,new Promise(function(e,t){setTimeout(function(){return t(w.localize(1,null,a))},a),l.getActionsToRun(n,o).then(e)}).then(function(e){return l.applyCodeActions(e)})]):[2,void 0])})})},e.prototype.applyCodeActions=function(e){return o(this,void 0,void 0,function(){var t,n,i;return s(this,function(r){switch(r.label){case 0:t=0,n=e,r.label=1;case 1:return t<n.length?(i=n[t],[4,L.applyCodeAction(i,this._bulkEditService,this._commandService)]):[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}})})},e.prototype.getActionsToRun=function(e,t){return o(this,void 0,void 0,function(){var n,i
;return s(this,function(r){switch(r.label){case 0:return[4,R.getCodeActions(e,e.getFullModelRange(),{type:"auto",filter:{kind:A.CodeActionKind.Source,includeSourceActions:!0}})];case 1:return n=r.sent(),i=n.filter(function(e){return e.kind&&t.some(function(t){return t.contains(e.kind)})}),[2,i]}})})},e=a([l(0,O.IBulkEditService),l(1,D.ICommandService),l(2,m.IConfigurationService)],e)}(),V=function(){function e(e){this._proxy=e.getProxy(b.ExtHostContext.ExtHostDocumentSaveParticipant)}return e.prototype.participate=function(e,t){var n=this;if(x.shouldSynchronizeModel(e.textEditorModel))return new Promise(function(i,r){setTimeout(function(){return r(w.localize(2,null))},1750),n._proxy.$participateInSave(e.getResource(),t.reason).then(function(e){for(var t=0,n=e;t<n.length;t++){if(!n[t])return Promise.reject(new Error("listener failed"))}}).then(i,r)})},e}(),z=function(){function e(e,t,n,i){this._progressService=n,this._logService=i,
this._saveParticipants=[t.createInstance(P),t.createInstance(B),t.createInstance(W),t.createInstance(N),t.createInstance(F),t.createInstance(V,e)],y.TextFileEditorModel.setSaveParticipant(this)}return e.prototype.dispose=function(){y.TextFileEditorModel.setSaveParticipant(void 0)},e.prototype.participate=function(e,t){var i=this;return this._progressService.withProgress({location:E.ProgressLocation.Window},function(r){r.report({message:w.localize(3,null)});var o=i._saveParticipants.map(function(n){return function(){return Promise.resolve(n.participate(e,t))}});return n.sequence(o).then(function(){},function(e){return i._logService.warn(e)})})},e=a([_.extHostCustomer,l(1,u.IInstantiationService),l(2,E.IProgressService2),l(3,T.ILogService)],e)}();t.SaveParticipant=z}),define(e[1444],t([1,0,7,4,294,5,48,38,6,50]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){this.lifecycleService=e,this.instantiationService=t,this.toUnbind=[],
this._onModelDisposed=new n.Emitter,this._onModelContentChanged=new n.Emitter,this._onModelDirty=new n.Emitter,this._onModelSaveError=new n.Emitter,this._onModelSaved=new n.Emitter,this._onModelReverted=new n.Emitter,this._onModelEncodingChanged=new n.Emitter,this._onModelOrphanedChanged=new n.Emitter,this.toUnbind.push(this._onModelDisposed),this.toUnbind.push(this._onModelContentChanged),this.toUnbind.push(this._onModelDirty),this.toUnbind.push(this._onModelSaveError),this.toUnbind.push(this._onModelSaved),this.toUnbind.push(this._onModelReverted),this.toUnbind.push(this._onModelEncodingChanged),this.toUnbind.push(this._onModelOrphanedChanged),this.mapResourceToModel=new d.ResourceMap,this.mapResourceToDisposeListener=new d.ResourceMap,this.mapResourceToStateChangeListener=new d.ResourceMap,this.mapResourceToModelContentChangeListener=new d.ResourceMap,this.mapResourceToPendingModelLoaders=new d.ResourceMap,this.registerListeners()}return e.prototype.registerListeners=function(){
this.lifecycleService.onShutdown(this.dispose,this)},Object.defineProperty(e.prototype,"onModelDisposed",{get:function(){return this._onModelDisposed.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelContentChanged",{get:function(){return this._onModelContentChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelDirty",{get:function(){return this._onModelDirty.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelSaveError",{get:function(){return this._onModelSaveError.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelSaved",{get:function(){return this._onModelSaved.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelReverted",{get:function(){return this._onModelReverted.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelEncodingChanged",{get:function(){return this._onModelEncodingChanged.event},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"onModelOrphanedChanged",{get:function(){return this._onModelOrphanedChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelsDirty",{get:function(){return this._onModelsDirtyEvent||(this._onModelsDirtyEvent=this.debounce(this.onModelDirty)),this._onModelsDirtyEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelsSaveError",{get:function(){return this._onModelsSaveError||(this._onModelsSaveError=this.debounce(this.onModelSaveError)),this._onModelsSaveError},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelsSaved",{get:function(){return this._onModelsSaved||(this._onModelsSaved=this.debounce(this.onModelSaved)),this._onModelsSaved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelsReverted",{get:function(){return this._onModelsReverted||(this._onModelsReverted=this.debounce(this.onModelReverted)),this._onModelsReverted},enumerable:!0,configurable:!0}),
e.prototype.debounce=function(e){return n.debounceEvent(e,function(e,t){return e?e.push(t):e=[t],e},this.debounceDelay())},e.prototype.debounceDelay=function(){return 250},e.prototype.get=function(e){return this.mapResourceToModel.get(e)},e.prototype.loadOrCreate=function(e,t){var n=this,o=this.mapResourceToPendingModelLoaders.get(e);if(o)return o;var a;t&&t.allowBinary&&(a={allowBinary:!0});var c,l=this.get(e);return l?c=t&&t.reload?l.load(a):i.TPromise.as(l):(c=(l=this.instantiationService.createInstance(r.TextFileEditorModel,e,t?t.encoding:void 0)).load(a),this.mapResourceToStateChangeListener.set(e,l.onDidStateChange(function(e){var t=new s.TextFileModelChangeEvent(l,e);switch(e){case s.StateChange.DIRTY:n._onModelDirty.fire(t);break;case s.StateChange.SAVE_ERROR:n._onModelSaveError.fire(t);break;case s.StateChange.SAVED:n._onModelSaved.fire(t);break;case s.StateChange.REVERTED:n._onModelReverted.fire(t);break;case s.StateChange.ENCODING:n._onModelEncodingChanged.fire(t);break
;case s.StateChange.ORPHANED_CHANGE:n._onModelOrphanedChanged.fire(t)}})),this.mapResourceToModelContentChangeListener.set(e,l.onDidContentChange(function(e){n._onModelContentChanged.fire(new s.TextFileModelChangeEvent(l,e))}))),this.mapResourceToPendingModelLoaders.set(e,c),c.then(function(t){return n.add(e,t),t.isDirty()&&n._onModelDirty.fire(new s.TextFileModelChangeEvent(t,s.StateChange.DIRTY)),n.mapResourceToPendingModelLoaders.delete(e),t},function(t){return l.dispose(),n.mapResourceToPendingModelLoaders.delete(e),i.TPromise.wrapError(t)})},e.prototype.getAll=function(e,t){if(e){var n=this.mapResourceToModel.get(e);return n?[n]:[]}var i=[];return this.mapResourceToModel.forEach(function(e){t&&!t(e)||i.push(e)}),i},e.prototype.add=function(e,t){var n=this;if(this.mapResourceToModel.get(e)!==t){var i=this.mapResourceToDisposeListener.get(e);i&&i.dispose(),this.mapResourceToModel.set(e,t),this.mapResourceToDisposeListener.set(e,t.onDispose(function(){n.remove(e),n._onModelDisposed.fire(e)}))}},
e.prototype.remove=function(e){this.mapResourceToModel.delete(e);var t=this.mapResourceToDisposeListener.get(e);t&&(o.dispose(t),this.mapResourceToDisposeListener.delete(e));var n=this.mapResourceToStateChangeListener.get(e);n&&(o.dispose(n),this.mapResourceToStateChangeListener.delete(e));var i=this.mapResourceToModelContentChangeListener.get(e);i&&(o.dispose(i),this.mapResourceToModelContentChangeListener.delete(e))},e.prototype.clear=function(){this.mapResourceToModel.clear(),this.mapResourceToPendingModelLoaders.clear(),this.mapResourceToDisposeListener.forEach(function(e){return e.dispose()}),this.mapResourceToDisposeListener.clear(),this.mapResourceToStateChangeListener.forEach(function(e){return e.dispose()}),this.mapResourceToStateChangeListener.clear(),this.mapResourceToModelContentChangeListener.forEach(function(e){return e.dispose()}),this.mapResourceToModelContentChangeListener.clear()},e.prototype.disposeModel=function(e){
e&&(e.isDisposed()||this.mapResourceToPendingModelLoaders.has(e.getResource())||e.isDirty()||e.dispose())},e.prototype.dispose=function(){this.toUnbind=o.dispose(this.toUnbind)},e=a([l(0,c.ILifecycleService),l(1,u.IInstantiationService)],e)}();t.TextFileEditorModelManager=h}),define(e[1445],t([1,0,785,4,10,25,9,24,7,11,48,40,38,27,33,5,1444,50,43,66,70]),function(e,t,n,i,r,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e,t,n,i,r,o,s,a,c,l,d,p,f){this.lifecycleService=e,this.contextService=t,this.configurationService=n,this.fileService=i,this.untitledEditorService=r,this.instantiationService=o,this.notificationService=s,this.environmentService=a,this.backupFileService=c,this.windowsService=l,this.historyService=d,this.modelService=f,this._onWillMove=new u.Emitter,this.onWillMove=this._onWillMove.event,this.toUnbind=[],this._onAutoSaveConfigurationChange=new u.Emitter,this.toUnbind.push(this._onAutoSaveConfigurationChange),
this._onFilesAssociationChange=new u.Emitter,this.toUnbind.push(this._onFilesAssociationChange),this._models=this.instantiationService.createInstance(y.TextFileEditorModelManager),this.autoSaveContext=h.AutoSaveContext.bindTo(p);var g=this.configurationService.getValue();this.currentFilesAssociationConfig=g&&g.files&&g.files.associations,this.onFilesConfigurationChange(g),this.registerListeners()}return Object.defineProperty(e.prototype,"models",{get:function(){return this._models},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onAutoSaveConfigurationChange",{get:function(){return this._onAutoSaveConfigurationChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onFilesAssociationChange",{get:function(){return this._onFilesAssociationChange.event},enumerable:!0,configurable:!0}),e.prototype.registerListeners=function(){var e=this;this.lifecycleService.onWillShutdown(function(t){return t.veto(e.beforeShutdown(t.reason))}),
this.lifecycleService.onShutdown(this.dispose,this),this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){t.affectsConfiguration("files")&&e.onFilesConfigurationChange(e.configurationService.getValue())}))},e.prototype.beforeShutdown=function(e){var t=this,r=this.getDirty();if(r.length){return(this.getAutoSaveMode()!==h.AutoSaveMode.OFF?this.saveAll(!1,{skipSaveParticipants:!0}).then(function(){return t.getDirty()}):i.TPromise.as(r)).then(function(i){if(i.length)return t.isHotExitEnabled?t.backupBeforeShutdown(i,t.models,e).then(function(e){return e.didBackup?t.noVeto({cleanUpBackups:!1}):t.confirmBeforeShutdown()},function(e){var i=e[0];return t.notificationService.error(n.localize(0,null,i.message)),!0}):t.confirmBeforeShutdown()})}return this.noVeto({cleanUpBackups:!0})},e.prototype.backupBeforeShutdown=function(e,t,n){var r=this;return this.windowsService.getWindowCount().then(function(o){var s;switch(n){case f.ShutdownReason.CLOSE:
s=r.contextService.getWorkbenchState()!==g.WorkbenchState.EMPTY&&r.configuredHotExit===v.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE||!(o>1||d.isMacintosh);break;case f.ShutdownReason.QUIT:case f.ShutdownReason.RELOAD:s=!0;break;case f.ShutdownReason.LOAD:s=r.contextService.getWorkbenchState()!==g.WorkbenchState.EMPTY&&r.configuredHotExit===v.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE}return s?r.backupAll(e,t).then(function(){return{didBackup:!0}}):i.TPromise.as({didBackup:!1})})},e.prototype.backupAll=function(e,t){var n=this,i=[],r=[];return e.forEach(function(e){n.fileService.canHandleResource(e)?i.push(t.get(e)):e.scheme===S.Schemas.untitled&&r.push(e)}),this.doBackupAll(i,r)},e.prototype.doBackupAll=function(e,t){var n=this;return i.TPromise.join(e.map(function(e){return n.backupFileService.backupResource(e.getResource(),e.createSnapshot(),e.getVersionId())})).then(function(e){var r=t.filter(function(e){return n.untitledEditorService.exists(e)}).map(function(e){
return n.untitledEditorService.loadOrCreate({resource:e})});return i.TPromise.join(r).then(function(e){var t=e.map(function(e){return n.backupFileService.backupResource(e.getResource(),e.createSnapshot(),e.getVersionId())});return i.TPromise.join(t).then(function(){})})})},e.prototype.confirmBeforeShutdown=function(){var e=this;return this.confirmSave().then(function(t){return t===p.ConfirmResult.SAVE?e.saveAll(!0,{skipSaveParticipants:!0}).then(function(t){return!!t.results.some(function(e){return!e.success})||e.noVeto({cleanUpBackups:!0})}):t===p.ConfirmResult.DONT_SAVE?(e.untitledEditorService.revertAll(),e.noVeto({cleanUpBackups:!0})):t===p.ConfirmResult.CANCEL||void 0})},e.prototype.noVeto=function(e){return!!e.cleanUpBackups&&this.cleanupBackupsBeforeShutdown().then(function(){return!1},function(){return!1})},e.prototype.cleanupBackupsBeforeShutdown=function(){return this.environmentService.isExtensionDevelopment?i.TPromise.as(void 0):this.backupFileService.discardAllWorkspaceBackups()},
e.prototype.onFilesConfigurationChange=function(e){var t=this.getAutoSaveMode()!==h.AutoSaveMode.OFF,n=e&&e.files&&e.files.autoSave||v.AutoSaveConfiguration.OFF;switch(this.autoSaveContext.set(n),n){case v.AutoSaveConfiguration.AFTER_DELAY:this.configuredAutoSaveDelay=e&&e.files&&e.files.autoSaveDelay,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!1;break;case v.AutoSaveConfiguration.ON_FOCUS_CHANGE:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!0,this.configuredAutoSaveOnWindowChange=!1;break;case v.AutoSaveConfiguration.ON_WINDOW_CHANGE:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!0;break;default:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!1}this._onAutoSaveConfigurationChange.fire(this.getAutoSaveConfiguration()),t||this.getAutoSaveMode()===h.AutoSaveMode.OFF||this.saveAll().done(null,c.onUnexpectedError)
;var i=e&&e.files&&e.files.associations;l.equals(this.currentFilesAssociationConfig,i)||(this.currentFilesAssociationConfig=i,this._onFilesAssociationChange.fire());var r=e&&e.files&&e.files.hotExit;r===v.HotExitConfiguration.OFF||r===v.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?this.configuredHotExit=r:this.configuredHotExit=v.HotExitConfiguration.ON_EXIT},e.prototype.getDirty=function(e){var t=this.getDirtyFileModels(e).map(function(e){return e.getResource()});return t.push.apply(t,this.untitledEditorService.getDirty(e)),t},e.prototype.isDirty=function(e){return!!this._models.getAll(e).some(function(e){return e.isDirty()})||this.untitledEditorService.getDirty().some(function(t){return!e||t.toString()===e.toString()})},e.prototype.save=function(e,t){if(t&&t.force&&this.fileService.canHandleResource(e)&&!this.isDirty(e)){var n=this._models.get(e);n&&n.save({force:!0,reason:h.SaveReason.EXPLICIT}).then(function(){return!n.isDirty()})}return this.saveAll([e],t).then(function(e){
return 1===e.results.length&&e.results[0].success})},e.prototype.saveAll=function(e,t){var n=[],i=[];return(Array.isArray(e)?this.getDirty(e):this.getDirty()).forEach(function(t){!Array.isArray(e)&&!0!==e||t.scheme!==S.Schemas.untitled?n.push(t):i.push(t)}),this.doSaveAll(n,i,t)},e.prototype.doSaveAll=function(e,t,n){var a=this;return this.doSaveAllFiles(e,n).then(function(n){return o(a,void 0,void 0,function(){var o,a,c,l,u,d,h=this;return s(this,function(s){switch(s.label){case 0:o=[],a=0,s.label=1;case 1:return a<t.length?(c=t[a],this.untitledEditorService.exists(c)?(l=void 0,this.untitledEditorService.hasAssociatedFilePath(c)?(l=c.with({scheme:S.Schemas.file}),[3,4]):[3,2]):[3,5]):[3,6];case 2:return[4,this.promptForPath(this.suggestFileName(c))];case 3:if(!(u=s.sent()))return[2,i.TPromise.as({results:e.concat(t).map(function(e){return{source:e}})})];l=r.default.file(u),s.label=4;case 4:o.push(l),s.label=5;case 5:return a++,[3,1];case 6:return d=[],o.forEach(function(e,i){
var r=h.saveAs(t[i],e).then(function(e){n.results.push({source:t[i],target:e,success:!!e})});d.push(r)}),[2,i.TPromise.join(d).then(function(){return n})]}})})})},e.prototype.doSaveAllFiles=function(e,t){void 0===t&&(t=Object.create(null));var n=this.getDirtyFileModels(Array.isArray(e)?e:void 0).filter(function(e){return!e.hasState(h.ModelState.CONFLICT)&&!e.hasState(h.ModelState.ERROR)||t.reason!==h.SaveReason.AUTO&&t.reason!==h.SaveReason.FOCUS_CHANGE&&t.reason!==h.SaveReason.WINDOW_CHANGE}),r=new b.ResourceMap;return n.forEach(function(e){r.set(e.getResource(),{source:e.getResource()})}),i.TPromise.join(n.map(function(e){return e.save(t).then(function(){e.isDirty()||(r.get(e.getResource()).success=!0)})})).then(function(e){return{results:r.values()}})},e.prototype.getFileModels=function(e){var t=this;if(Array.isArray(e)){var n=[];return e.forEach(function(e){n.push.apply(n,t.getFileModels(e))}),n}return this._models.getAll(e)},e.prototype.getDirtyFileModels=function(e){
return this.getFileModels(e).filter(function(e){return e.isDirty()})},e.prototype.saveAs=function(e,t,n){var o,s=this;if(t)o=i.TPromise.wrap(t);else{var a=e.fsPath;e.scheme===S.Schemas.untitled&&(a=this.suggestFileName(e)),o=this.promptForPath(a).then(function(e){if(e)return r.default.file(e)})}return o.then(function(t){return t?e.toString()===t.toString()?s.save(e,n).then(function(){return e}):s.doSaveAs(e,t,n):i.TPromise.as(null)})},e.prototype.doSaveAs=function(e,t,n){var r=this,o=i.TPromise.as(null);return this.fileService.canHandleResource(e)?o=i.TPromise.as(this._models.get(e)):e.scheme===S.Schemas.untitled&&this.untitledEditorService.exists(e)&&(o=this.untitledEditorService.loadOrCreate({resource:e})),o.then(function(i){return i?r.doSaveTextFileAs(i,e,t,n):r.fileService.copyFile(e,t)}).then(function(){return r.revert(e).then(function(){return t})})},e.prototype.doSaveTextFileAs=function(e,t,n,r){var o=this,s=this.models.get(n)
;return(s&&s.isResolved()?i.TPromise.as(s):this.fileService.resolveFile(n).then(function(e){return e},function(){return null}).then(function(e){return e||o.fileService.updateContent(n,"")}).then(function(e){return o.models.loadOrCreate(n)})).then(function(t){return t.updatePreferredEncoding(e.getEncoding()),o.modelService.updateModel(t.textEditorModel,_.createTextBufferFactoryFromSnapshot(e.createSnapshot())),t.save(r)},function(s){return s.fileOperationResult===v.FileOperationResult.FILE_IS_BINARY||s.fileOperationResult===v.FileOperationResult.FILE_TOO_LARGE?o.fileService.del(n).then(function(){return o.doSaveTextFileAs(e,t,n,r)}):i.TPromise.wrapError(s)})},e.prototype.suggestFileName=function(e){var t=this.untitledEditorService.suggestFileName(e),n=this.historyService.getLastActiveFile();if(n)return r.default.file(a.join(a.dirname(n.fsPath),t)).fsPath;var i=this.historyService.getLastActiveWorkspaceRoot("file");return i?r.default.file(a.join(i.fsPath,t)).fsPath:t},e.prototype.revert=function(e,t){
return this.revertAll([e],t).then(function(e){return 1===e.results.length&&e.results[0].success})},e.prototype.revertAll=function(e,t){var n=this;return this.doRevertAllFiles(e,t).then(function(t){return n.untitledEditorService.revertAll(e).forEach(function(e){return t.results.push({source:e,success:!0})}),t})},e.prototype.doRevertAllFiles=function(e,t){var n=t&&t.force?this.getFileModels(e):this.getDirtyFileModels(e),r=new b.ResourceMap;return n.forEach(function(e){r.set(e.getResource(),{source:e.getResource()})}),i.TPromise.join(n.map(function(e){return e.revert(t&&t.soft).then(function(){e.isDirty()||(r.get(e.getResource()).success=!0)},function(t){if(t.fileOperationResult!==v.FileOperationResult.FILE_NOT_FOUND)return i.TPromise.wrapError(t);r.get(e.getResource()).success=!0})})).then(function(e){return{results:r.values()}})},e.prototype.delete=function(e,t){var n=this,i=this.getDirty().filter(function(t){return C.isEqualOrParent(t,e,!d.isLinux)});return this.revertAll(i,{soft:!0}).then(function(){
return n.fileService.del(e,t)})},e.prototype.move=function(e,t,n){var r=this,o=[];return this._onWillMove.fire({oldResource:e,newResource:t,waitUntil:function(e){o.push(i.TPromise.wrap(e).then(void 0,c.onUnexpectedError))}}),Object.freeze(o),i.TPromise.join(o).then(function(){var o=i.TPromise.as(void 0),s=r.getDirtyFileModels().filter(function(e){return C.isEqualOrParent(e.getResource(),t,!d.isLinux)});return s.length&&(o=r.revertAll(s.map(function(e){return e.getResource()}),{soft:!0})),o.then(function(){var o=r.getDirtyFileModels().filter(function(t){return C.isEqualOrParent(t.getResource(),e,!d.isLinux)}),s=[];return(o.length?i.TPromise.join(o.map(function(n){var i,o=n.getResource();return i=C.isEqual(o,e,!d.isLinux)?t:o.with({path:a.join(t.path,o.path.substr(e.path.length+1))}),s.push(i),r.backupFileService.backupResource(i,n.createSnapshot(),n.getVersionId())})):i.TPromise.as(void 0)).then(function(){return r.revertAll(o.map(function(e){return e.getResource()}),{soft:!0}).then(function(){
return r.fileService.moveFile(e,t,n).then(function(){return i.TPromise.join(s.map(function(e){return r.models.loadOrCreate(e)})).then(function(){})},function(e){return i.TPromise.join(s.map(function(e){return r.backupFileService.discardResourceBackup(e)})).then(function(){return i.TPromise.wrapError(e)})})})})})})},e.prototype.getAutoSaveMode=function(){return this.configuredAutoSaveOnFocusChange?h.AutoSaveMode.ON_FOCUS_CHANGE:this.configuredAutoSaveOnWindowChange?h.AutoSaveMode.ON_WINDOW_CHANGE:this.configuredAutoSaveDelay&&this.configuredAutoSaveDelay>0?this.configuredAutoSaveDelay<=1e3?h.AutoSaveMode.AFTER_SHORT_DELAY:h.AutoSaveMode.AFTER_LONG_DELAY:h.AutoSaveMode.OFF},e.prototype.getAutoSaveConfiguration=function(){return{autoSaveDelay:this.configuredAutoSaveDelay&&this.configuredAutoSaveDelay>0?this.configuredAutoSaveDelay:void 0,autoSaveFocusChange:this.configuredAutoSaveOnFocusChange,autoSaveApplicationChange:this.configuredAutoSaveOnWindowChange}},Object.defineProperty(e.prototype,"isHotExitEnabled",{
get:function(){return!this.environmentService.isExtensionDevelopment&&this.configuredHotExit!==v.HotExitConfiguration.OFF},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.toUnbind=m.dispose(this.toUnbind),this._models.clear()},e}();t.TextFileService=E}),define(e[1446],t([1,0,787,102,26,51]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=r.getColorRegistry().getColorReferenceSchema(),a="^\\w+[.\\w+]*$",c=i.ExtensionsRegistry.registerExtensionPoint("colors",[],{description:n.localize(0,null),type:"array",items:{type:"object",properties:{id:{type:"string",description:n.localize(1,null),pattern:a,patternErrorMessage:n.localize(2,null)},description:{type:"string",description:n.localize(3,null)},defaults:{type:"object",properties:{light:{description:n.localize(4,null),type:"string",anyOf:[s,{type:"string",format:"color-hex"}]},dark:{description:n.localize(5,null),type:"string",anyOf:[s,{type:"string",format:"color-hex"}]},highContrast:{
description:n.localize(6,null),type:"string",anyOf:[s,{type:"string",format:"color-hex"}]}}}}}}),l=function(){return function(){c.setHandler(function(e){for(var t=function(t){var i=e[t].value,s=e[t].collector;if(!i||!Array.isArray(i))return s.error(n.localize(7,null)),{value:void 0};var c=function(e,t){return e.length>0?"#"===e[0]?o.Color.Format.CSS.parseHex(e):e:(s.error(n.localize(8,null,t)),o.Color.red)};i.forEach(function(e){if("string"==typeof e.id&&0!==e.id.length)if(e.id.match(a))if("string"==typeof e.description&&0!==e.id.length){var t=e.defaults;t&&"object"==typeof t&&"string"==typeof t.light&&"string"==typeof t.dark&&"string"==typeof t.highContrast?r.registerColor(e.id,{light:c(t.light,"configuration.colors.defaults.light"),dark:c(t.dark,"configuration.colors.defaults.dark"),hc:c(t.highContrast,"configuration.colors.defaults.highContrast")},e.description):s.error(n.localize(12,null))}else s.error(n.localize(11,null));else s.error(n.localize(10,null));else s.error(n.localize(9,null))})
},i=0;i<e.length;i++){var s=t(i);if("object"==typeof s)return s.value}})}}();t.ColorExtensionPoint=l}),define(e[508],t([1,0,788,16,120,26]),function(e,t,n,i,r,o){"use strict";function s(e){return{type:"array",description:e,items:{type:"object",defaultSnippets:[{body:{scope:"${1:keyword.operator}",settings:{foreground:"${2:#FF0000}"}}}],properties:{name:{type:"string",description:n.localize(6,null)},scope:{description:n.localize(7,null),anyOf:[{enum:c},{type:"string"},{type:"array",items:{enum:c}},{type:"array",items:{type:"string"}}]},settings:t.tokenColorizationSettingSchema},required:["settings","scope"],additionalProperties:!1}}}Object.defineProperty(t,"__esModule",{value:!0})
;var a=i.Registry.as(o.Extensions.ColorContribution),c=["comment","comment.block","comment.block.documentation","comment.line","constant","constant.character","constant.character.escape","constant.numeric","constant.numeric.integer","constant.numeric.float","constant.numeric.hex","constant.numeric.octal","constant.other","constant.regexp","constant.rgb-value","emphasis","entity","entity.name","entity.name.class","entity.name.function","entity.name.method","entity.name.section","entity.name.selector","entity.name.tag","entity.name.type","entity.other","entity.other.attribute-name","entity.other.inherited-class","invalid","invalid.deprecated","invalid.illegal","keyword","keyword.control","keyword.operator","keyword.operator.new","keyword.operator.assignment","keyword.operator.arithmetic","keyword.operator.logical","keyword.other","markup","markup.bold","markup.changed","markup.deleted","markup.heading","markup.inline.raw","markup.inserted","markup.italic","markup.list","markup.list.numbered","markup.list.unnumbered","markup.other","markup.quote","markup.raw","markup.underline","markup.underline.link","meta","meta.block","meta.cast","meta.class","meta.function","meta.function-call","meta.preprocessor","meta.return-type","meta.selector","meta.tag","meta.type.annotation","meta.type","punctuation.definition.string.begin","punctuation.definition.string.end","punctuation.separator","punctuation.separator.continuation","punctuation.terminator","storage","storage.modifier","storage.type","string","string.interpolated","string.other","string.quoted","string.quoted.double","string.quoted.other","string.quoted.single","string.quoted.triple","string.regexp","string.unquoted","strong","support","support.class","support.constant","support.function","support.other","support.type","support.type.property-name","support.variable","variable","variable.language","variable.name","variable.other","variable.other.readwrite","variable.parameter"]
;t.tokenColorizationSettingSchema={type:"object",description:n.localize(0,null),properties:{foreground:{type:"string",description:n.localize(1,null),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:n.localize(2,null)},fontStyle:{type:"string",description:n.localize(3,null),pattern:"^(\\s*\\b(italic|bold|underline))*\\s*$",patternErrorMessage:n.localize(4,null),defaultSnippets:[{label:n.localize(5,null),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"italic bold"},{body:"italic underline"},{body:"bold underline"},{body:"italic bold underline"}]}},additionalProperties:!1,defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]},t.colorsSchema=a.getColorSchema(),t.tokenColorsSchema=s,t.schemaId="vscode://schemas/color-theme";var l={type:"object",allowComments:!0,properties:{colors:t.colorsSchema,tokenColors:{anyOf:[{type:"string",description:n.localize(8,null)},s(n.localize(9,null))]}}};t.register=function(){
i.Registry.as(r.Extensions.JSONContribution).registerSchema(t.schemaId,l)}}),define(e[1448],t([1,0,789,16,120]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="vscode://schemas/icon-theme",s={type:"object",allowComments:!0,definitions:{folderExpanded:{type:"string",description:n.localize(0,null)},folder:{type:"string",description:n.localize(1,null)},file:{type:"string",description:n.localize(2,null)},folderNames:{type:"object",description:n.localize(3,null),additionalProperties:{type:"string",description:n.localize(4,null)}},folderNamesExpanded:{type:"object",description:n.localize(5,null),additionalProperties:{type:"string",description:n.localize(6,null)}},fileExtensions:{type:"object",description:n.localize(7,null),additionalProperties:{type:"string",description:n.localize(8,null)}},fileNames:{type:"object",description:n.localize(9,null),additionalProperties:{type:"string",description:n.localize(10,null)}},languageIds:{type:"object",description:n.localize(11,null),
additionalProperties:{type:"string",description:n.localize(12,null)}},associations:{type:"object",properties:{folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"}}}},properties:{fonts:{type:"array",description:n.localize(13,null),items:{type:"object",properties:{id:{type:"string",description:n.localize(14,null)},src:{type:"array",description:n.localize(15,null),items:{type:"object",properties:{path:{type:"string",description:n.localize(16,null)},format:{type:"string",description:n.localize(17,null)}},required:["path","format"]}},weight:{type:"string",description:n.localize(18,null)},style:{type:"string",description:n.localize(19,null)},size:{type:"string",description:n.localize(20,null)}},
required:["id","src"]}},iconDefinitions:{type:"object",description:n.localize(21,null),additionalProperties:{type:"object",description:n.localize(22,null),properties:{iconPath:{type:"string",description:n.localize(23,null)},fontCharacter:{type:"string",description:n.localize(24,null)},fontColor:{type:"string",format:"color-hex",description:n.localize(25,null)},fontSize:{type:"string",description:n.localize(26,null)},fontId:{type:"string",description:n.localize(27,null)}}}},folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"},light:{$ref:"#/definitions/associations",description:n.localize(28,null)},highContrast:{$ref:"#/definitions/associations",description:n.localize(29,null)},hidesExplorerArrows:{type:"boolean",description:n.localize(30,null)}}}
;t.register=function(){i.Registry.as(r.Extensions.JSONContribution).registerSchema(o,s)}}),define(e[141],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkbenchThemeService=n.createDecorator("themeService"),t.VS_LIGHT_THEME="vs",t.VS_DARK_THEME="vs-dark",t.VS_HC_THEME="hc-black",t.HC_THEME_ID="Default High Contrast",t.COLOR_THEME_SETTING="workbench.colorTheme",t.DETECT_HC_SETTING="window.autoDetectHighContrast",t.ICON_THEME_SETTING="workbench.iconTheme",t.CUSTOM_WORKBENCH_COLORS_SETTING="workbench.colorCustomizations",t.CUSTOM_EDITOR_COLORS_SETTING="editor.tokenColorCustomizations",t.CUSTOM_EDITOR_SCOPE_COLORS_SETTING="textMateRules"}),define(e[1450],t([1,0,576,8,5,14,32,45,288,54,44,490,141,51,12,26,22,871]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s._editor=t,s._textMateService=n,s._themeService=r,s._modeService=i,
s._notificationService=o,s._widget=null,s._register(s._editor.onDidChangeModel(function(e){return s.stop()})),s._register(s._editor.onDidChangeModelLanguage(function(e){return s.stop()})),s._register(s._editor.onKeyUp(function(e){return 9===e.keyCode&&s.stop()})),s}return n(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new C(this._editor,this._textMateService,this._modeService,this._themeService,this._notificationService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.prototype.toggle=function(){this._widget?this.stop():this.launch()},t.ID="editor.contrib.inspectTMScopes",t=a([l(1,d.ITextMateService),l(2,h.IModeService),l(3,g.IWorkbenchThemeService),l(4,b.INotificationService)],t)}(o.Disposable),_=function(e){function t(){return e.call(this,{
id:"editor.action.inspectTMScopes",label:i.localize(0,null),alias:"Developer: Inspect TM Scopes",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){var n=S.get(t);n&&n.toggle()},t}(c.EditorAction),C=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.allowEditorOverflow=!0,s._isDisposed=!1,s._editor=t,s._modeService=i,s._themeService=r,s._notificationService=o,s._model=s._editor.getModel(),s._domNode=document.createElement("div"),s._domNode.className="tm-inspect-widget",s._grammar=n.createGrammar(s._model.getLanguageIdentifier().language),s._beginCompute(s._editor.getPosition()),s._register(s._editor.onDidChangeCursorPosition(function(e){return s._beginCompute(s._editor.getPosition())})),s._editor.addContentWidget(s),s}return n(t,e),t.prototype.dispose=function(){this._isDisposed=!0,this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._beginCompute=function(e){var t=this;r.clearNode(this._domNode),
this._domNode.appendChild(document.createTextNode(i.localize(1,null))),this._grammar.then(function(n){return t._compute(n,e)},function(e){t._notificationService.warn(e),setTimeout(function(){S.get(t._editor).stop()})})},t.prototype._compute=function(e,t){if(!this._isDisposed){for(var n=this._getTokensAtLine(e,t.lineNumber),i=0,r=n.tokens1.length-1;r>=0;r--){var o=n.tokens1[r];if(t.column-1>=o.startIndex){i=r;break}}for(var a=0,r=n.tokens2.length>>>1;r>=0;r--)if(t.column-1>=n.tokens2[r<<1]){a=r;break}var c="",l=n.tokens1[i].startIndex,u=n.tokens1[i].endIndex,d=this._model.getLineContent(t.lineNumber).substring(l,u);c+='<h2 class="tm-token">'+function(e){e.length>40&&(e=e.substr(0,20)+"…"+e.substr(e.length-20));for(var t="",n=0,i=e.length;n<i;n++){var r=e.charCodeAt(n);switch(r){case 9:t+="&rarr;";break;case 32:t+="&middot;";break;case 60:t+="&lt;";break;case 62:t+="&gt;";break;case 38:t+="&amp;";break;default:t+=String.fromCharCode(r)}}return t
}(d)+'<span class="tm-token-length">('+d.length+" "+(1===d.length?"char":"chars")+")</span></h2>",c+='<hr class="tm-metadata-separator" style="clear:both"/>';var h=this._decodeMetadata(n.tokens2[1+(a<<1)]);c+='<table class="tm-metadata-table"><tbody>',c+='<tr><td class="tm-metadata-key">language</td><td class="tm-metadata-value">'+s.escape(h.languageIdentifier.language)+"</td>",c+='<tr><td class="tm-metadata-key">token type</td><td class="tm-metadata-value">'+this._tokenTypeToString(h.tokenType)+"</td>",c+='<tr><td class="tm-metadata-key">font style</td><td class="tm-metadata-value">'+this._fontStyleToString(h.fontStyle)+"</td>",c+='<tr><td class="tm-metadata-key">foreground</td><td class="tm-metadata-value">'+v.Color.Format.CSS.formatHexA(h.foreground)+"</td>",c+='<tr><td class="tm-metadata-key">background</td><td class="tm-metadata-value">'+v.Color.Format.CSS.formatHexA(h.background)+"</td>",c+="</tbody></table>";var p=this._themeService.getColorTheme();c+='<hr class="tm-metadata-separator"/>'
;var g=f.findMatchingThemeRule(p,n.tokens1[i].scopes,!1);c+=g?'<code class="tm-theme-selector">'+g.rawSelector+"\n"+JSON.stringify(g.settings,null,"\t")+"</code>":'<span class="tm-theme-selector">No theme selector.</span>',c+='<hr class="tm-metadata-separator"/>',c+="<ul>";for(r=n.tokens1[i].scopes.length-1;r>=0;r--)c+="<li>"+s.escape(n.tokens1[i].scopes[r])+"</li>";c+="</ul>",this._domNode.innerHTML=c,this._editor.layoutContentWidget(this)}},t.prototype._decodeMetadata=function(e){var t=p.TokenizationRegistry.getColorMap(),n=p.TokenMetadata.getLanguageId(e),i=p.TokenMetadata.getTokenType(e),r=p.TokenMetadata.getFontStyle(e),o=p.TokenMetadata.getForeground(e),s=p.TokenMetadata.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(n),tokenType:i,fontStyle:r,foreground:t[o],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},
t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e,t){var n=this._getStateBeforeLine(e,t),i=e.tokenizeLine(this._model.getLineContent(t),n),r=e.tokenizeLine2(this._model.getLineContent(t),n);return{startState:n,tokens1:i.tokens,tokens2:r.tokens,endState:i.ruleStack}},t.prototype._getStateBeforeLine=function(e,t){for(var n=null,i=1;i<t;i++){n=e.tokenizeLine(this._model.getLineContent(i),n).ruleStack}return n},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{position:this._editor.getPosition(),preference:[u.ContentWidgetPositionPreference.BELOW,u.ContentWidgetPositionPreference.ABOVE]}},t._ID="editor.contrib.inspectTMScopesWidget",t}(o.Disposable);c.registerEditorContribution(S),c.registerEditorAction(_),m.registerThemingParticipant(function(e,t){var n=e.getColor(y.editorHoverBorder);if(n){var i=e.type===m.HIGH_CONTRAST?2:1
;t.addRule(".monaco-editor .tm-inspect-widget { border: "+i+"px solid "+n+"; }"),t.addRule(".monaco-editor .tm-inspect-widget .tm-metadata-separator { background-color: "+n+"; }")}var r=e.getColor(y.editorHoverBackground);r&&t.addRule(".monaco-editor .tm-inspect-widget { background-color: "+r+"; }")})}),define(e[1451],t([1,0,1093,1336,1094,309,312,1450,1097,1098,1099,1100,1101,1102]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(e[1452],t([1,0,4,25,54,87,29,6,141,21,40,288,44,490,51]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){function e(e){this._theme=e,this._cache=Object.create(null),this._defaultColor="#000000";for(var t=0,n=this._theme.tokenColors.length;t<n;t++){var i=this._theme.tokenColors[t];i.scope||(this._defaultColor=i.settings.foreground)}}return e.prototype._generateExplanation=function(e,t){return e+": "+v.Color.Format.CSS.formatHexA(t,!0).toUpperCase()},
e.prototype.explainTokenColor=function(e,t){var n=this._findMatchingThemeRule(e);if(!n){var i=v.Color.fromHex(this._defaultColor);if(!t.equals(i))throw new Error("["+this._theme.label+"]: Unexpected color "+v.Color.Format.CSS.formatHexA(t)+" for "+e+". Expected default "+v.Color.Format.CSS.formatHexA(i));return this._generateExplanation("default",t)}var r=v.Color.fromHex(n.settings.foreground);if(!t.equals(r))throw new Error("["+this._theme.label+"]: Unexpected color "+v.Color.Format.CSS.formatHexA(t)+" for "+e+". Expected "+v.Color.Format.CSS.formatHexA(r)+" coming in from "+n.rawSelector);return this._generateExplanation(n.rawSelector,t)},e.prototype._findMatchingThemeRule=function(e){return this._cache[e]||(this._cache[e]=g.findMatchingThemeRule(this._theme,e.split(" "))),this._cache[e]},e}(),y=function(){function e(e,t,n){this.modeService=e,this.themeService=t,this.textMateService=n}return e.prototype._themedTokenize=function(e,t){
for(var n=f.TokenizationRegistry.getColorMap(),i=null,r=[],o=0,s=0,a=t.length;s<a;s++){for(var c=t[s],l=e.tokenizeLine2(c,i),u=0,d=l.tokens.length>>>1;u<d;u++){var h=l.tokens[u<<1],p=l.tokens[1+(u<<1)],g=u+1<d?l.tokens[u+1<<1]:c.length,v=c.substring(h,g),m=f.TokenMetadata.getForeground(p);r[o++]={text:v,color:n[m]}}i=l.ruleStack}return r},e.prototype._tokenize=function(e,t){for(var n=null,i=[],r=0,o=0,s=t.length;o<s;o++){for(var a=t[o],c=e.tokenizeLine(a,n),l=null,u=0,d=c.tokens.length;u<d;u++){var h=c.tokens[u],p=a.substring(h.startIndex,h.endIndex),f=h.scopes.join(" ");l===f?i[r-1].c+=p:(l=f,i[r++]={c:p,t:f,r:{dark_plus:null,light_plus:null,dark_vs:null,light_vs:null,hc_black:null}})}n=c.ruleStack}return i},e.prototype._getThemesResult=function(e,t){var i=this,r=this.themeService.getColorTheme(),o=function(e){var t="vscode-theme-defaults-themes-",n=e.indexOf(t);if(-1!==n)return e.substring(n+t.length,e.length-5)},s={};return this.themeService.getColorThemes().then(function(r){var a=r.filter(function(e){
return!!o(e.id)});return n.TPromise.join(a.map(function(n){var r=n.id;return i.themeService.setColorTheme(r,null).then(function(n){if(n){var a=o(r);s[a]={document:new m(i.themeService.getColorTheme()),tokens:i._themedTokenize(e,t)}}})}))}).then(function(e){return i.themeService.setColorTheme(r.id,null).then(function(e){return s})})},e.prototype._enrichResult=function(e,t){for(var n={},i=Object.keys(t),r=0;r<i.length;r++){n[c=i[r]]=0}for(var o=0,s=e.length;o<s;o++)for(var a=e[o],r=0;r<i.length;r++){var c=i[r],l=t[c].tokens[n[c]];l.text=l.text.substr(a.c.length),a.r[c]=t[c].document.explainTokenColor(a.t,l.color),0===l.text.length&&n[c]++}},e.prototype.captureSyntaxTokens=function(e,t){var n=this;return this.modeService.getOrCreateModeByFilenameOrFirstLine(e).then(function(e){return n.textMateService.createGrammar(e.getId()).then(function(e){var i=t.split(/\r\n|\r|\n/),r=n._tokenize(e,i);return n._getThemesResult(e,i).then(function(e){return n._enrichResult(r,e),r.filter(function(e){return e.c.length>0})})})})
},e=a([l(0,r.IModeService),l(1,u.IWorkbenchThemeService),l(2,p.ITextMateService)],e)}();s.CommandsRegistry.registerCommand("_workbench.captureSyntaxTokens",function(e,t){var n=function(t){var n=t.fsPath,r=i.basename(n),s=e.get(c.IInstantiationService).createInstance(y);return o.readFile(n).then(function(e){return s.captureSyntaxTokens(r,e.toString())})};if(t)return n(t);var r=e.get(d.IEditorService),s=h.toResource(r.activeEditor,{filter:"file"});s?n(s).then(function(e){console.log(e)}):console.log("No file editor active")})}),define(e[1453],t([1,0,783,8,30,70,7,4,9,44,54,141,489,311,222,453,51,22,33,77]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(){function e(){this._onDidEncounterLanguage=new s.Emitter,this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._scopeNameToLanguageRegistration=Object.create(null),this._encounteredLanguages=[]}return e.prototype.register=function(e,t,n,i){
if(this._scopeNameToLanguageRegistration[e]){var r=this._scopeNameToLanguageRegistration[e];o.isEqual(r.grammarLocation,t)||console.warn("Overwriting grammar scope name to file mapping for scope "+e+".\nOld grammar file: "+r.grammarLocation.toString()+".\nNew grammar file: "+t.toString())}this._scopeNameToLanguageRegistration[e]=new E(e,t,n,i)},e.prototype.getLanguageRegistration=function(e){return this._scopeNameToLanguageRegistration[e]||null},e.prototype.getGrammarLocation=function(e){var t=this.getLanguageRegistration(e);return t?t.grammarLocation:null},e.prototype.onEncounteredLanguage=function(e){this._encounteredLanguages[e]||(this._encounteredLanguages[e]=!0,this._onDidEncounterLanguage.fire(e))},e}();t.TMScopeRegistry=C;var E=function(){return function(e,t,n,i){if(this.scopeName=e,this.grammarLocation=t,this.embeddedLanguages=Object.create(null),n)for(var r=0,o=(a=Object.keys(n)).length;r<o;r++){var s=n[c=a[r]];"string"==typeof s&&(this.embeddedLanguages[c]=s)}if(this.tokenTypes=Object.create(null),
i)for(var a=Object.keys(i),r=0,o=a.length;r<o;r++){var c=a[r];switch(i[c]){case"string":this.tokenTypes[c]=2;break;case"other":this.tokenTypes[c]=0;break;case"comment":this.tokenTypes[c]=1}}}}();t.TMLanguageRegistration=E;var w=function(){function t(e,t,n,r,o){var s=this;this._styleElement=i.createStyleSheet(),this._styleElement.className="vscode-tokens-styles",this._modeService=e,this._themeService=t,this._fileService=n,this._logService=o,this._scopeRegistry=new C,this.onDidEncounterLanguage=this._scopeRegistry.onDidEncounterLanguage,this._injections={},this._injectedEmbeddedLanguages={},this._languageToScope=new Map,this._notificationService=r,this._grammarRegistry=null,f.grammarsExtPoint.setHandler(function(e){for(var t=0;t<e.length;t++)for(var n=e[t].value,i=0;i<n.length;i++)s._handleGrammarExtensionPointUser(e[t].description.extensionLocation,n[i],e[t].collector)});for(var a=this._themeService.getColorTheme(),c=y.Color.transparent,l=y.Color.transparent,u=0,h=a.tokenColors.length;u<h;u++){
var p=a.tokenColors[u];!p.scope&&p.settings&&(p.settings.foreground&&(c=y.Color.fromHex(p.settings.foreground)),p.settings.background&&(l=y.Color.fromHex(p.settings.background)))}d.TokenizationRegistry.setColorMap([null,c,l]),this._modeService.onDidCreateMode(function(e){var t=e.getId();s._languageToScope.has(t)&&s.registerDefinition(t)})}return t.prototype._getOrCreateGrammarRegistry=function(){var t=this;return this._grammarRegistry||(this._grammarRegistry=c.TPromise.wrap(new Promise(function(t,n){e(["vscode-textmate"],t,n)})).then(function(e){var n=e.Registry,i=e.INITIAL,r=e.parseRawGrammar,o=new n({loadGrammar:function(e){var n=t._scopeRegistry.getGrammarLocation(e);return n?t._fileService.resolveContent(n).then(function(e){return r(e.value,n.path)},function(i){return t._logService.error("Unable to load and parse grammar for scope "+e+" from "+n,i),null}):(t._logService.info("No grammar found for scope "+e),null)},getInjections:function(e){return t._injections[e]}});return t._updateTheme(o),
t._themeService.onDidColorThemeChange(function(e){return t._updateTheme(o)}),[o,i]})),this._grammarRegistry},t._toColorMap=function(e){for(var t=[null],n=1,i=e.length;n<i;n++)t[n]=y.Color.fromHex(e[n]);return t},t.prototype._updateTheme=function(e){var n=this._themeService.getColorTheme();if(this.compareTokenRules(n.tokenColors)){e.setTheme({name:n.label,settings:n.tokenColors});var i=t._toColorMap(e.getColorMap()),r=m.generateTokensCSSForColorMap(i);this._styleElement.innerHTML=r,d.TokenizationRegistry.setColorMap(i)}},t.prototype.compareTokenRules=function(e){var t=this._currentTokenColors;if(this._currentTokenColors=e,!e||!t||e.length!==t.length)return!0;for(var n=e.length-1;n>=0;n--){var i=e[n],r=t[n];if(i.scope!==r.scope)return!0;var o=i.settings,s=r.settings;if(o&&s){if(o.fontStyle!==s.fontStyle||o.foreground!==s.foreground||o.background!==s.background)return!0}else if(!o||!s)return!0}return!1},t.prototype._handleGrammarExtensionPointUser=function(e,t,i){
if(!t.language||"string"==typeof t.language&&this._modeService.isRegisteredMode(t.language))if(t.scopeName&&"string"==typeof t.scopeName)if(t.path&&"string"==typeof t.path)if(!t.injectTo||Array.isArray(t.injectTo)&&!t.injectTo.some(function(e){return"string"!=typeof e}))if(!t.embeddedLanguages||r.isObject(t.embeddedLanguages))if(!t.tokenTypes||r.isObject(t.tokenTypes)){var s=o.joinPath(e,t.path);if(0!==s.path.indexOf(e.path)&&i.warn(n.localize(6,null,f.grammarsExtPoint.name,s.path,e.path)),this._scopeRegistry.register(t.scopeName,s,t.embeddedLanguages,t.tokenTypes),t.injectTo){for(var a=0,c=t.injectTo;a<c.length;a++){var l=c[a],u=this._injections[l];u||(this._injections[l]=u=[]),u.push(t.scopeName)}if(t.embeddedLanguages)for(var d=0,h=t.injectTo;d<h.length;d++){var l=h[d],p=this._injectedEmbeddedLanguages[l];p||(this._injectedEmbeddedLanguages[l]=p=[]),p.push(t.embeddedLanguages)}}var g=t.language;g&&this._languageToScope.set(g,t.scopeName)
}else i.error(n.localize(5,null,f.grammarsExtPoint.name,JSON.stringify(t.tokenTypes)));else i.error(n.localize(4,null,f.grammarsExtPoint.name,JSON.stringify(t.embeddedLanguages)));else i.error(n.localize(3,null,f.grammarsExtPoint.name,JSON.stringify(t.injectTo)));else i.error(n.localize(2,null,f.grammarsExtPoint.name,String(t.path)));else i.error(n.localize(1,null,f.grammarsExtPoint.name,String(t.scopeName)));else i.error(n.localize(0,null,f.grammarsExtPoint.name,String(t.language)))},t.prototype._resolveEmbeddedLanguages=function(e){for(var t=Object.keys(e),n=Object.create(null),i=0,r=t.length;i<r;i++){var o=t[i],s=e[o],a=this._modeService.getLanguageIdentifier(s);a&&(n[o]=a.id)}return n},t.prototype.createGrammar=function(e){return this._createGrammar(e).then(function(e){return e.grammar})},t.prototype._createGrammar=function(e){var t=this._languageToScope.get(e),i=this._scopeRegistry.getLanguageRegistration(t);if(!i)return c.TPromise.wrapError(new Error(n.localize(7,null)))
;var r=this._resolveEmbeddedLanguages(i.embeddedLanguages),o=this._injectedEmbeddedLanguages[t];if(o)for(var s=0,a=o.map(this._resolveEmbeddedLanguages.bind(this));s<a.length;s++)for(var l=a[s],u=0,d=Object.keys(l);u<d.length;u++){var h=d[u];r[h]=l[h]}var p=this._modeService.getLanguageIdentifier(e).id,f=Object.keys(r).length>0;return this._getOrCreateGrammarRegistry().then(function(e){var n=e[0],o=e[1];return n.loadGrammarWithConfiguration(t,p,{embeddedLanguages:r,tokenTypes:i.tokenTypes}).then(function(e){return{languageId:p,grammar:e,initialState:o,containsEmbeddedLanguages:f}})})},t.prototype.registerDefinition=function(e){var t=this;this._createGrammar(e).then(function(n){d.TokenizationRegistry.register(e,new I(t._scopeRegistry,n.languageId,n.grammar,n.initialState,n.containsEmbeddedLanguages,t._notificationService))},u.onUnexpectedError)},t=a([l(0,h.IModeService),l(1,p.IWorkbenchThemeService),l(2,S.IFileService),l(3,b.INotificationService),l(4,_.ILogService)],t)}();t.TextMateService=w;var I=function(){
function e(e,t,n,i,r,o){this.notificationService=o,this._scopeRegistry=e,this._languageId=t,this._grammar=n,this._initialState=i,this._containsEmbeddedLanguages=r,this._seenLanguages=[]}return e.prototype.getInitialState=function(){return this._initialState},e.prototype.tokenize=function(e,t,n){throw new Error("Not supported!")},e.prototype.tokenize2=function(e,t,i){if(0!==i)throw new Error("Unexpected: offsetDelta should be 0.");if(e.length>=2e4)return this._tokenizationWarningAlreadyShown||(this._tokenizationWarningAlreadyShown=!0,this.notificationService.warn(n.localize(8,null))),console.log("Line ("+e.substr(0,15)+"...): longer than 20k characters, tokenization skipped."),v.nullTokenize2(this._languageId,e,t,i);var r=this._grammar.tokenizeLine2(e,t);if(this._containsEmbeddedLanguages)for(var o=this._seenLanguages,s=r.tokens,a=0,c=s.length>>>1;a<c;a++){var l=s[1+(a<<1)],u=d.TokenMetadata.getLanguageId(l);o[u]||(o[u]=!0,this._scopeRegistry.onEncounteredLanguage(u))}var h
;return h=t.equals(r.ruleStack)?t:r.ruleStack,new g.TokenizationResult2(r.tokens,h)},e=a([l(5,b.INotificationService)],e)}()}),define(e[510],t([1,0,10,792,59,70,89,4,345]),function(e,t,n,i,r,o,s,a,c){"use strict";function l(e){return window.CSS.escape(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(){}return e.prototype.ensureLoaded=function(e){var t=this;return!this.isLoaded&&this.location?function(e,t){return e.resolveContent(t).then(function(e){var t=[],n=s.parse(e.value.toString(),t);return t.length>0||!n?a.TPromise.wrapError(new Error(i.localize(0,null,t.map(function(e){return c.getParseErrorMessage(e.error)}).join(", ")))):a.TPromise.as(n)})}(e,this.location).then(function(e){var n=function(e,t,n){function i(e){return o.joinPath(c,e)}function r(e,t){function n(e,t){if(t){var n=a[t];n||(n=a[t]=[]),n.push(e)}}if(e){var i=".show-file-icons";t&&(i=t+" "+i);var r=".monaco-tree-row.expanded";e.folder&&(n(i+" .folder-icon::before",e.folder),s.hasFolderIcons=!0),
e.folderExpanded&&(n(i+" "+r+" .folder-icon::before",e.folderExpanded),s.hasFolderIcons=!0);var o=e.rootFolder||e.folder,c=e.rootFolderExpanded||e.folderExpanded;o&&(n(i+" .rootfolder-icon::before",o),s.hasFolderIcons=!0),c&&(n(i+" "+r+" .rootfolder-icon::before",c),s.hasFolderIcons=!0),e.file&&(n(i+" .file-icon::before",e.file),s.hasFileIcons=!0);var u=e.folderNames;if(u)for(var d in u)n(i+" ."+l(d.toLowerCase())+"-name-folder-icon.folder-icon::before",u[d]),s.hasFolderIcons=!0;var h=e.folderNamesExpanded;if(h)for(var d in h)n(i+" "+r+" ."+l(d.toLowerCase())+"-name-folder-icon.folder-icon::before",h[d]),s.hasFolderIcons=!0;var p=e.languageIds;if(p){!p.jsonc&&p.json&&(p.jsonc=p.json);for(var f in p)n(i+" ."+l(f)+"-lang-file-icon.file-icon::before",p[f]),s.hasFileIcons=!0}var g=e.fileExtensions;if(g)for(var v in g){if(b=[],(S=v.toLowerCase().split(".")).length){for(_=0;_<S.length;_++)b.push("."+l(S.slice(_).join("."))+"-ext-file-icon");b.push(".ext-file-icon")}n(i+" "+b.join("")+".file-icon::before",g[v]),
s.hasFileIcons=!0}var m=e.fileNames;if(m)for(var y in m){var b=[];y=y.toLowerCase(),b.push("."+l(y)+"-name-file-icon");var S=y.split(".");if(S.length){for(var _=1;_<S.length;_++)b.push("."+l(S.slice(_).join("."))+"-ext-file-icon");b.push(".ext-file-icon")}n(i+" "+b.join("")+".file-icon::before",m[y]),s.hasFileIcons=!0}}}var s={content:"",hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:n.hidesExplorerArrows};if(!n.iconDefinitions)return s;var a={},c=o.dirname(t);if(r(n),r(n.light,".vs"),r(n.highContrast,".hc-black"),!s.hasFileIcons&&!s.hasFolderIcons)return s;var u=[],d=n.fonts;Array.isArray(d)&&(d.forEach(function(e){var t=e.src.map(function(e){return"url('"+i(e.path)+"') format('"+e.format+"')"}).join(", ");u.push("@font-face { src: "+t+"; font-family: '"+e.id+"'; font-weight: "+e.weight+"; font-style: "+e.style+"; }")}),
u.push(".show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: '"+d[0].id+"'; font-size: "+(d[0].size||"150%")+"}"));for(var h in a){var p=a[h],f=n.iconDefinitions[h];if(f&&(f.iconPath&&u.push(p.join(", ")+" { content: ' '; background-image: url(\""+i(f.iconPath)+'"); }'),f.fontCharacter||f.fontColor)){var g="";f.fontColor&&(g+=" color: "+f.fontColor+";"),f.fontCharacter&&(g+=" content: '"+f.fontCharacter+"';"),f.fontSize&&(g+=" font-size: "+f.fontSize+";"),f.fontId&&(g+=" font-family: "+f.fontId+";"),u.push(p.join(", ")+" { "+g+" }")}}return s.content=u.join("\n"),s}(t.id,t.location,e);return t.styleSheetContent=n.content,t.hasFileIcons=n.hasFileIcons,t.hasFolderIcons=n.hasFolderIcons,t.hidesExplorerArrows=n.hidesExplorerArrows,t.isLoaded=!0,t.styleSheetContent}):a.TPromise.as(this.styleSheetContent)},e.fromExtensionTheme=function(t,n,i){var o=new e;return o.id=i.extensionId+"-"+t.id,o.label=t.label||r.basename(t.path),
o.settingsId=t.id,o.description=t.description,o.location=n,o.extensionData=i,o.isLoaded=!1,o},e.noIconTheme=function(){var t=e._noIconTheme;return t||((t=e._noIconTheme=new e).id="",t.label="",t.settingsId=null,t.hasFileIcons=!1,t.hasFolderIcons=!1,t.hidesExplorerArrows=!1,t.isLoaded=!0,t.extensionData=null),t},e.fromStorageData=function(t){try{var i=JSON.parse(t),r=new e;for(var o in i)switch(o){case"id":case"label":case"description":case"settingsId":case"extensionData":case"styleSheetContent":case"hasFileIcons":case"hidesExplorerArrows":case"hasFolderIcons":r[o]=i[o];break;case"location":r.location=n.default.revive(i.location)}return r}catch(e){return null}},e.prototype.toStorageData=function(){return JSON.stringify({id:this.id,label:this.label,description:this.description,settingsId:this.settingsId,location:this.location,styleSheetContent:this.styleSheetContent,hasFileIcons:this.hasFileIcons,hasFolderIcons:this.hasFolderIcons,hidesExplorerArrows:this.hidesExplorerArrows})},e._noIconTheme=null,e}()
;t.FileIconThemeData=u}),define(e[1455],t([1,0,793,30,70,102,49,7,510]),function(e,t,n,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=o.ExtensionsRegistry.registerExtensionPoint("iconThemes",[],{description:n.localize(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:id}",label:"${2:label}",path:"./fileicons/${3:id}-icon-theme.json"}}],properties:{id:{description:n.localize(1,null),type:"string"},label:{description:n.localize(2,null),type:"string"},path:{description:n.localize(3,null),type:"string"}},required:["path","id"]}}),h=function(){function e(e){this.extensionService=e,this.knownIconThemes=[],this.onDidChangeEmitter=new c.Emitter,this.initialize()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this.onDidChangeEmitter.event},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){var e=this;d.setHandler(function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n],o={extensionId:r.description.id,
extensionPublisher:r.description.publisher,extensionName:r.description.name,extensionIsBuiltin:r.description.isBuiltin};e.onIconThemes(r.description.extensionLocation,o,r.value,r.collector)}e.onDidChangeEmitter.fire(e.knownIconThemes)})},e.prototype.onIconThemes=function(e,t,o,s){var a=this;Array.isArray(o)?o.forEach(function(o){if(o.path&&i.isString(o.path))if(o.id&&i.isString(o.id)){var c=r.joinPath(e,o.path);0!==c.path.indexOf(e.path)&&s.warn(n.localize(7,null,d.name,c.path,e.path));var l=u.FileIconThemeData.fromExtensionTheme(o,c,t);a.knownIconThemes.push(l)}else s.error(n.localize(6,null,d.name,String(o.path)));else s.error(n.localize(5,null,d.name,String(o.path)))}):s.error(n.localize(4,null,d.name))},e.prototype.findThemeData=function(e){return this.getFileIconThemes().then(function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(r.id===e)return r}return null})},e.prototype.findThemeBySettingsId=function(e){return this.getFileIconThemes().then(function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n]
;if(r.settingsId===e)return r}return null})},e.prototype.getFileIconThemes=function(){var e=this;return this.extensionService.whenInstalledExtensionsRegistered().then(function(t){return e.knownIconThemes})},e=a([l(0,s.IExtensionService)],e)}();t.FileIconThemeStore=h}),define(e[1456],t([1,0,51,26,97,419,198]),function(e,t,n,i,r,o,s){"use strict";function a(e,t){var n=c[e];n||(c[e]=n=[]),n.push(t)}Object.defineProperty(t,"__esModule",{value:!0});var c={};t.convertSettings=function(e,t,i){for(var r=0,o=e;r<o.length;r++){var s=o[r];if(t.push(s),!s.scope){var a=s.settings;if(a)for(var l in a){var u=c[l];if(u){var d=a[l];if("string"==typeof d)for(var h=n.Color.fromHex(d),p=0,f=u;p<f.length;p++)i[f[p]]=h}"foreground"!==l&&"background"!==l&&"fontStyle"!==l&&delete a[l]}else s.settings={}}}},a("background",i.editorBackground),a("foreground",i.editorForeground),a("selection",i.editorSelectionBackground),a("inactiveSelection",i.editorInactiveSelection),a("selectionHighlightColor",i.editorSelectionHighlight),
a("findMatchHighlight",i.editorFindMatchHighlight),a("currentFindMatchHighlight",i.editorFindMatch),a("hoverHighlight",i.editorHoverHighlight),a("wordHighlight",o.editorWordHighlight),a("wordHighlightStrong",o.editorWordHighlightStrong),a("findRangeHighlight",i.editorFindRangeHighlight),a("findMatchHighlight",s.peekViewResultsMatchHighlight),a("referenceHighlight",s.peekViewEditorMatchHighlight),a("lineHighlight",r.editorLineHighlight),a("rangeHighlight",r.editorRangeHighlight),a("caret",r.editorCursorForeground),a("invisibles",r.editorWhitespaces),a("guide",r.editorIndentGuides),a("activeGuide",r.editorActiveIndentGuides);for(var l=["ansiBlack","ansiRed","ansiGreen","ansiYellow","ansiBlue","ansiMagenta","ansiCyan","ansiWhite","ansiBrightBlack","ansiBrightRed","ansiBrightGreen","ansiBrightYellow","ansiBrightBlue","ansiBrightMagenta","ansiBrightCyan","ansiBrightWhite"],u=0;u<l.length;u++)a(l[u],"terminal."+l[u])}),
define(e[511],t([1,0,25,89,51,141,1456,4,790,30,24,70,26,16,345]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";function g(e,t,o,l){return".json"===n.extname(t.path)?e.resolveContent(t).then(function(n){var u=[],h=i.parse(n.value.toString(),u);if(u.length>0)return a.TPromise.wrapError(new Error(c.localize(0,null,u.map(function(e){return f.getParseErrorMessage(e.error)}).join(", "))));var p=a.TPromise.as(null);return h.include&&(p=g(e,d.joinPath(d.dirname(t),h.include),o,l)),p.then(function(n){if(Array.isArray(h.settings))return s.convertSettings(h.settings,o,l),null;var i=h.colors;if(i){if("object"!=typeof i)return a.TPromise.wrapError(new Error(c.localize(1,null,t)));for(var u in i){"string"==typeof i[u]&&(l[u]=r.Color.fromHex(i[u]))}}var p=h.tokenColors;return p?Array.isArray(p)?(o.push.apply(o,p),null):"string"==typeof p?v(e,d.joinPath(d.dirname(t),p),o,{}):a.TPromise.wrapError(new Error(c.localize(2,null,t))):null})}):v(e,t,o,l)}function v(t,n,i,r){return t.resolveContent(n).then(function(t){
return(_||new Promise(function(t,n){e(["fast-plist"],t,n)})).then(function(e){try{var n=e.parse(t.value.toString()).settings;return Array.isArray(n)?(s.convertSettings(n,i,r),a.TPromise.as(null)):a.TPromise.wrapError(new Error(c.localize(3,null)))}catch(e){return a.TPromise.wrapError(new Error(c.localize(4,null,e.message)))}})},function(e){return a.TPromise.wrapError(new Error(c.localize(5,null,n,e.message)))})}function m(e,t){var n=t.getColor(h.editorForeground)||t.getDefault(h.editorForeground),i=t.getColor(h.editorBackground)||t.getDefault(h.editorBackground);return e.settings.foreground=r.Color.Format.CSS.formatHexA(n),e.settings.background=r.Color.Format.CSS.formatHexA(i),e}Object.defineProperty(t,"__esModule",{value:!0});var y=p.Registry.as(h.Extensions.ColorContribution),b={comments:["comment"],strings:["string"],keywords:["keyword - keyword.operator","keyword.control","storage","storage.type"],numbers:["constant.numeric"],types:["entity.name.type","entity.name.class","support.type","support.class"],
functions:["entity.name.function","support.function"],variables:["variable","entity.name.variable"]},S=function(){function e(){this.themeTokenColors=[],this.customTokenColors=[],this.colorMap={},this.customColorMap={}}return Object.defineProperty(e.prototype,"tokenColors",{get:function(){return this.themeTokenColors.concat(this.customTokenColors)},enumerable:!0,configurable:!0}),e.prototype.getColor=function(e,t){var n=this.customColorMap[e];return n||(n=this.colorMap[e],!1!==t&&l.isUndefined(n)&&(n=this.getDefault(e)),n)},e.prototype.getDefault=function(e){return y.resolveDefaultColor(e,this)},e.prototype.defines=function(e){return this.customColorMap.hasOwnProperty(e)||this.colorMap.hasOwnProperty(e)},e.prototype.setCustomColors=function(e){this.customColorMap={},this.overwriteCustomColors(e);var t=e["["+this.settingsId+"]"];l.isObject(t)&&this.overwriteCustomColors(t),this.themeTokenColors&&this.themeTokenColors.length&&m(this.themeTokenColors[0],this)},e.prototype.overwriteCustomColors=function(e){
for(var t in e){var n=e[t];"string"==typeof n&&(this.customColorMap[t]=r.Color.fromHex(n))}},e.prototype.setCustomTokenColors=function(e){this.customTokenColors=[],this.addCustomTokenColors(e);var t=e["["+this.settingsId+"]"];l.isObject(t)&&this.addCustomTokenColors(t)},e.prototype.addCustomTokenColors=function(e){for(var t in b){var n=e[t];if(n)for(var i="string"==typeof n?{foreground:n}:n,r=0,o=b[t];r<o.length;r++){var s=o[r];this.customTokenColors.push({scope:s,settings:i})}}if(Array.isArray(e.textMateRules))for(var a=0,c=e.textMateRules;a<c.length;a++){var l=c[a];l.scope&&l.settings&&this.customTokenColors.push(l)}},e.prototype.ensureLoaded=function(e){var t=this;return!this.isLoaded&&this.location?g(e,this.location,this.themeTokenColors,this.colorMap).then(function(e){t.isLoaded=!0,t.sanitizeTokenColors()}):a.TPromise.as(null)},e.prototype.sanitizeTokenColors=function(){var e=!1,t=[m({settings:{}},this)];this.themeTokenColors.forEach(function(n){n.scope&&n.settings&&("token.info-token"===n.scope&&(e=!0),
t.push(n))}),e||t.push.apply(t,C[this.type]),this.themeTokenColors=t},e.prototype.toStorageData=function(){var e={};for(var t in this.colorMap)e[t]=r.Color.Format.CSS.formatHexA(this.colorMap[t],!0);return JSON.stringify({id:this.id,label:this.label,settingsId:this.settingsId,selector:this.id.split(" ").join("."),themeTokenColors:this.themeTokenColors,extensionData:this.extensionData,colorMap:e})},e.prototype.hasEqualData=function(e){return u.equals(this.colorMap,e.colorMap)&&u.equals(this.tokenColors,e.tokenColors)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.id.split(" ")[0]){case o.VS_LIGHT_THEME:return"light";case o.VS_HC_THEME:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),e.createUnloadedTheme=function(t){var n=new e;return n.id=t,n.label="",n.settingsId=null,n.isLoaded=!1,n.themeTokenColors=[{settings:{}}],n},e.createLoadedEmptyTheme=function(t,n){var i=new e;return i.id=t,i.label="",i.settingsId=n,i.isLoaded=!0,i.themeTokenColors=[{settings:{}}],i},
e.fromStorageData=function(t){try{var n=JSON.parse(t),i=new e;for(var o in n)switch(o){case"colorMap":var s=n[o];for(var a in s)i.colorMap[a]=r.Color.fromHex(s[a]);break;case"themeTokenColors":case"id":case"label":case"settingsId":case"extensionData":i[o]=n[o]}return i}catch(e){return null}},e.fromExtensionTheme=function(t,i,r){var o=t.uiTheme||"vs-dark",s=function(e){return(e=e.replace(/[^_\-a-zA-Z0-9]/g,"-")).charAt(0).match(/[0-9\-]/)&&(e="_"+e),e}(r.extensionId+"-"+n.normalize(t.path)),a=new e;return a.id=o+" "+s,a.label=t.label||n.basename(t.path),a.settingsId=t.id||a.label,a.description=t.description,a.location=i,a.extensionData=r,a.isLoaded=!1,a},e}();t.ColorThemeData=S;var _,C={light:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],dark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{
scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#f44747"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}],hc:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#008000"}},{scope:"token.error-token",settings:{foreground:"#FF0000"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}]}}),define(e[1458],t([1,0,791,30,70,102,141,511,49,7]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=o.ExtensionsRegistry.registerExtensionPoint("themes",[],{description:n.localize(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{label:"${1:label}",id:"${2:id}",uiTheme:s.VS_DARK_THEME,path:"./themes/${3:id}.tmTheme."}}],properties:{id:{description:n.localize(1,null),type:"string"},label:{description:n.localize(2,null),type:"string"},uiTheme:{description:n.localize(3,null),enum:[s.VS_LIGHT_THEME,s.VS_DARK_THEME,s.VS_HC_THEME]},
path:{description:n.localize(4,null),type:"string"}},required:["path","uiTheme"]}}),p=function(){function e(e,t){this.extensionService=e,this.extensionsColorThemes=[t],this.onDidChangeEmitter=new d.Emitter,this.initialize()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this.onDidChangeEmitter.event},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){var e=this;h.setHandler(function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n],o={extensionId:r.description.id,extensionPublisher:r.description.publisher,extensionName:r.description.name,extensionIsBuiltin:r.description.isBuiltin};e.onThemes(r.description.extensionLocation,o,r.value,r.collector)}e.onDidChangeEmitter.fire(e.extensionsColorThemes)})},e.prototype.onThemes=function(e,t,o,s){var a=this;Array.isArray(o)?o.forEach(function(o){if(o.path&&i.isString(o.path)){var l=r.joinPath(e,o.path);0!==l.path.indexOf(e.path)&&s.warn(n.localize(7,null,h.name,l.path,e.path));var u=c.ColorThemeData.fromExtensionTheme(o,l,t)
;u.id===a.extensionsColorThemes[0].id?a.extensionsColorThemes[0]=u:a.extensionsColorThemes.push(u)}else s.error(n.localize(6,null,h.name,String(o.path)))}):s.error(n.localize(5,null,h.name))},e.prototype.findThemeData=function(e,t){return this.getColorThemes().then(function(n){for(var i=void 0,r=0,o=n;r<o.length;r++){var s=o[r];if(s.id===e)return s;s.id===t&&(i=s)}return i})},e.prototype.findThemeDataBySettingsId=function(e,t){return this.getColorThemes().then(function(n){for(var i=void 0,r=0,o=n;r<o.length;r++){var s=o[r];if(s.settingsId===e)return s;s.id===t&&(i=s)}return i})},e.prototype.getColorThemes=function(){var e=this;return this.extensionService.whenInstalledExtensionsRegistered().then(function(t){return e.extensionsColorThemes})},e=a([l(0,u.IExtensionService)],e)}();t.ColorThemeStore=p}),define(e[1459],t([1,0,4,794,30,49,141,34,28,16,9,17,63,6,511,12,26,51,7,508,1448,263,1458,1455,510,42,8,36]),function(e,t,n,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";function L(e,t){
return R(e.styleSheetContent,K),t(e)}function R(e,t){var n=document.head.getElementsByClassName(t);if(0===n.length){var i=document.createElement("style");i.type="text/css",i.className=t,i.innerHTML=e,document.head.appendChild(i)}else n[0].innerHTML=e}function O(e){return{description:e,default:"#FF0000",anyOf:[{type:"string",format:"color-hex"},C.tokenColorizationSettingSchema]}}Object.defineProperty(t,"__esModule",{value:!0});var M,P,N,F="vs-dark vscode-theme-defaults-themes-dark_plus-json",W="Default Dark+",B="colorThemeData",V="iconThemeData",z="vscode-theme-defaults",H="vscode-theme-colorful-defaults",K="contributedIconTheme",U=h.Registry.as(y.Extensions.ThemingContribution),G=function(){function e(e,t,i,r,o,a,l,u,d){var h=this;this.storageService=i,this.broadcastService=r,this.configurationService=o,this.telemetryService=a,this.windowService=l,this.instantiationService=u,this.environmentService=d,this.themeExtensionsActivated=new Map,this.container=e,
this.colorThemeStore=new I.ColorThemeStore(t,m.ColorThemeData.createLoadedEmptyTheme(F,W)),this.onFileIconThemeChange=new _.Emitter,this.iconThemeStore=new T.FileIconThemeStore(t),this.onColorThemeChange=new _.Emitter,this.currentIconTheme={id:"",label:"",settingsId:null,isLoaded:!1,hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1,extensionData:null};var f=null,g=this.storageService.get(B);if(g&&(f=m.ColorThemeData.fromStorageData(g)),!f){var v=Array.prototype.indexOf.call(document.body.classList,"vs")>=0;f=m.ColorThemeData.createUnloadedTheme(v?s.VS_LIGHT_THEME:s.VS_DARK_THEME)}f.setCustomColors(this.colorCustomizations),f.setCustomTokenColors(this.tokenColorCustomizations),this.updateDynamicCSSRules(f),this.applyTheme(f,null,!0);var y=null,b=this.storageService.get(V);b&&(y=x.FileIconThemeData.fromStorageData(b))&&L(y,function(){return h.doSetFileIconTheme(y),n.TPromise.wrap(y)}),this.initialize().then(null,p.onUnexpectedError).then(function(e){h.installConfigurationListener()}),
this.colorThemeStore.onDidChange(function(e){var t=f.description||"";X.properties=C.colorsSchema.properties;var n=c({},X);n.properties=c({},C.colorsSchema.properties),J.properties=Z;var i=c({},J);i.properties=c({},Z),e.forEach(function(e){$.enum.push(e.settingsId),$.enumDescriptions.push(t);var r="["+e.settingsId+"]";X.properties[r]=n,J.properties[r]=i}),q.notifyConfigurationSchemaUpdated(Q),q.notifyConfigurationSchemaUpdated(ee)}),this.iconThemeStore.onDidChange(function(e){Y.enum=[null].concat(e.map(function(e){return e.settingsId})),Y.enumDescriptions=[Y.enumDescriptions[0]].concat(e.map(function(e){return f.description||""})),q.notifyConfigurationSchemaUpdated(Q)})}return Object.defineProperty(e.prototype,"colorCustomizations",{get:function(){return this.configurationService.getValue(s.CUSTOM_WORKBENCH_COLORS_SETTING)||{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenColorCustomizations",{get:function(){
return this.configurationService.getValue(s.CUSTOM_EDITOR_COLORS_SETTING)||{}},enumerable:!0,configurable:!0}),e.prototype.acquireFileService=function(e){this.fileService=e},Object.defineProperty(e.prototype,"onDidColorThemeChange",{get:function(){return this.onColorThemeChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidFileIconThemeChange",{get:function(){return this.onFileIconThemeChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this.onColorThemeChange.event},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){var e,t=this,i=this.configurationService.getValue(s.DETECT_HC_SETTING);e=this.windowService.getConfiguration().highContrast&&i?s.HC_THEME_ID:this.configurationService.getValue(s.COLOR_THEME_SETTING);var r=this.configurationService.getValue(s.ICON_THEME_SETTING)||"";return n.Promise.join([this.colorThemeStore.findThemeDataBySettingsId(e,F).then(function(e){
return t.setColorTheme(e&&e.id,null)}),this.iconThemeStore.findThemeBySettingsId(r).then(function(e){return t.setFileIconTheme(e&&e.id,null)})])},e.prototype.installConfigurationListener=function(){var e=this;this.configurationService.onDidChangeConfiguration(function(t){if(t.affectsConfiguration(s.COLOR_THEME_SETTING)){var n=e.configurationService.getValue(s.COLOR_THEME_SETTING);n!==e.currentColorTheme.settingsId&&e.colorThemeStore.findThemeDataBySettingsId(n,null).then(function(t){t&&e.setColorTheme(t.id,null)})}if(t.affectsConfiguration(s.ICON_THEME_SETTING)){var i=e.configurationService.getValue(s.ICON_THEME_SETTING)||"";i!==e.currentIconTheme.settingsId&&e.iconThemeStore.findThemeBySettingsId(i).then(function(t){e.setFileIconTheme(t&&t.id,null)})}if(e.currentColorTheme){var r=!1;t.affectsConfiguration(s.CUSTOM_WORKBENCH_COLORS_SETTING)&&(e.currentColorTheme.setCustomColors(e.colorCustomizations),r=!0),
t.affectsConfiguration(s.CUSTOM_EDITOR_COLORS_SETTING)&&(e.currentColorTheme.setCustomTokenColors(e.tokenColorCustomizations),r=!0),r&&(e.updateDynamicCSSRules(e.currentColorTheme),e.onColorThemeChange.fire(e.currentColorTheme))}})},e.prototype.getColorTheme=function(){return this.currentColorTheme},e.prototype.getColorThemes=function(){return this.colorThemeStore.getColorThemes()},e.prototype.getTheme=function(){return this.getColorTheme()},e.prototype.setColorTheme=function(e,t){var r=this;return e?e===this.currentColorTheme.id&&this.currentColorTheme.isLoaded?this.writeColorThemeConfiguration(t):(e=function(e){switch(e){case s.VS_LIGHT_THEME:return"vs "+z+"-themes-light_vs-json";case s.VS_DARK_THEME:return"vs-dark "+z+"-themes-dark_vs-json";case s.VS_HC_THEME:return"hc-black "+z+"-themes-hc_black-json";case"vs "+H+"-themes-light_plus-tmTheme":return"vs "+z+"-themes-light_plus-json";case"vs-dark "+H+"-themes-dark_plus-tmTheme":return"vs-dark "+z+"-themes-dark_plus-json"}return e}(e),
this.colorThemeStore.findThemeData(e,F).then(function(o){return o?o.ensureLoaded(r.fileService).then(function(i){return e===r.currentColorTheme.id&&!r.currentColorTheme.isLoaded&&r.currentColorTheme.hasEqualData(o)?(r.currentColorTheme=o,o.setCustomColors(r.colorCustomizations),o.setCustomTokenColors(r.tokenColorCustomizations),n.TPromise.as(o)):(o.setCustomColors(r.colorCustomizations),o.setCustomTokenColors(r.tokenColorCustomizations),r.updateDynamicCSSRules(o),r.applyTheme(o,t))},function(e){return n.TPromise.wrapError(new Error(i.localize(0,null,o.location,e.message)))}):null})):n.TPromise.as(null)},e.prototype.updateDynamicCSSRules=function(e){var t=this,n=[],i={},r={addRule:function(e){i[e]||(n.push(e),i[e]=!0)}};U.getThemingParticipants().forEach(function(n){return n(e,r,t.environmentService)}),R(n.join("\n"),"contributedColorTheme")},e.prototype.applyTheme=function(e,t,i){var r=this;if(void 0===i&&(i=!1),
this.container&&(this.currentColorTheme?D.removeClasses(this.container,this.currentColorTheme.id):D.removeClasses(this.container,s.VS_DARK_THEME,s.VS_LIGHT_THEME,s.VS_HC_THEME),D.addClasses(this.container,e.id)),this.currentColorTheme=e,this.themingParticipantChangeListener||(this.themingParticipantChangeListener=U.onThemingParticipantAdded(function(e){return r.updateDynamicCSSRules(r.currentColorTheme)})),this.sendTelemetry(e.id,e.extensionData,"color"),i)return n.TPromise.as(null);if(this.onColorThemeChange.fire(this.currentColorTheme),t!==f.ConfigurationTarget.WORKSPACE){var o=S.Color.Format.CSS.formatHex(e.getColor(b.editorBackground)),a={id:e.id,background:o};this.broadcastService.broadcast({channel:"vscode:changeColorTheme",payload:JSON.stringify(a)})}return this.storageService.store(B,e.toStorageData()),this.writeColorThemeConfiguration(t)},e.prototype.writeColorThemeConfiguration=function(e){var t=this
;return r.isUndefinedOrNull(e)?n.TPromise.as(this.currentColorTheme):this.configurationWriter.writeConfiguration(s.COLOR_THEME_SETTING,this.currentColorTheme.settingsId,e).then(function(e){return t.currentColorTheme})},e.prototype.sendTelemetry=function(e,t,n){if(t){var i=n+t.extensionId;this.themeExtensionsActivated.get(i)||(this.telemetryService.publicLog("activatePlugin",{id:t.extensionId,name:t.extensionName,isBuiltin:t.extensionIsBuiltin,publisherDisplayName:t.extensionPublisher,themeId:e}),this.themeExtensionsActivated.set(i,!0))}},e.prototype.getFileIconThemes=function(){return this.iconThemeStore.getFileIconThemes()},e.prototype.getFileIconTheme=function(){return this.currentIconTheme},e.prototype.setFileIconTheme=function(e,t){var n=this;if((e=e||"")===this.currentIconTheme.id&&this.currentIconTheme.isLoaded)return this.writeFileIconConfiguration(t);var i=function(e){return n.doSetFileIconTheme(e),n.storageService.store(V,e.toStorageData()),n.writeFileIconConfiguration(t)}
;return this.iconThemeStore.findThemeData(e).then(function(e){return e||(e=x.FileIconThemeData.noIconTheme()),e.ensureLoaded(n.fileService).then(function(t){return L(e,i)})})},e.prototype.doSetFileIconTheme=function(e){this.currentIconTheme=e,this.container&&(e.id?D.addClasses(this.container,"file-icons-enabled"):D.removeClasses(this.container,"file-icons-enabled")),e.id&&this.sendTelemetry(e.id,e.extensionData,"fileIcon"),this.onFileIconThemeChange.fire(this.currentIconTheme)},e.prototype.writeFileIconConfiguration=function(e){var t=this;return r.isUndefinedOrNull(e)?n.TPromise.wrap(this.currentIconTheme):this.configurationWriter.writeConfiguration(s.ICON_THEME_SETTING,this.currentIconTheme.settingsId,e).then(function(e){return t.currentIconTheme})},Object.defineProperty(e.prototype,"configurationWriter",{get:function(){return this._configurationWriter||(this._configurationWriter=this.instantiationService.createInstance(j)),this._configurationWriter},enumerable:!0,configurable:!0}),
e=a([l(1,o.IExtensionService),l(2,u.IStorageService),l(3,w.IBroadcastService),l(4,f.IConfigurationService),l(5,d.ITelemetryService),l(6,k.IWindowService),l(7,v.IInstantiationService),l(8,A.IEnvironmentService)],e)}();t.WorkbenchThemeService=G,C.register(),E.register();var j=function(){function e(e){this.configurationService=e}return e.prototype.writeConfiguration=function(e,t,i){var o=this.configurationService.inspect(e);if(i===f.ConfigurationTarget.USER){if(t===o.user)return n.TPromise.as(null);if(t===o.default){if(r.isUndefined(o.user))return n.TPromise.as(null);t=void 0}}else if(i===f.ConfigurationTarget.WORKSPACE&&t===o.value)return n.TPromise.as(null);return this.configurationService.updateValue(e,t,i)},e=a([l(0,f.IConfigurationService)],e)}(),q=h.Registry.as(g.Extensions.Configuration),$={type:"string",description:i.localize(1,null),default:W,enum:[],enumDescriptions:[],errorMessage:i.localize(2,null)},Y={type:["string","null"],default:"vs-seti",description:i.localize(3,null),enum:[null],
enumDescriptions:[i.localize(4,null)],errorMessage:i.localize(5,null)},X={type:"object",description:i.localize(6,null),properties:{},additionalProperties:!1,default:{},defaultSnippets:[{body:{"statusBar.background":"#666666","panel.background":"#555555","sideBar.background":"#444444"}}]},Q={id:"workbench",order:7.1,type:"object",properties:(M={},M[s.COLOR_THEME_SETTING]=$,M[s.ICON_THEME_SETTING]=Y,M[s.CUSTOM_WORKBENCH_COLORS_SETTING]=X,M)};q.registerConfiguration(Q);var Z=(P={comments:O(i.localize(7,null)),strings:O(i.localize(8,null)),keywords:O(i.localize(9,null)),numbers:O(i.localize(10,null)),types:O(i.localize(11,null)),functions:O(i.localize(12,null)),variables:O(i.localize(13,null))},P[s.CUSTOM_EDITOR_SCOPE_COLORS_SETTING]=C.tokenColorsSchema(i.localize(14,null)),P),J={description:i.localize(15,null),default:{},additionalProperties:!1,properties:{}},ee={id:"editor",order:7.2,type:"object",properties:(N={},N[s.CUSTOM_EDITOR_COLORS_SETTING]=J,N)};q.registerConfiguration(ee)}),
define(e[357],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITimerService=n.createDecorator("timerService")}),define(e[1461],t([1,0,854,192,93]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.isEmptyWorkbench=t,this.start=e.start,this.windowLoad=e.windowLoad,this.isInitialStartup=e.isInitialStartup,this.hasAccessibilitySupport=e.hasAccessibilitySupport}return Object.defineProperty(e.prototype,"startupMetrics",{get:function(){return this._startupMetrics||this._computeStartupMetrics(),this._startupMetrics},enumerable:!0,configurable:!0}),e.prototype._computeStartupMetrics=function(){var e,t,o,s,a,c,l,u,d,h=Date.now(),p=!!this.isInitialStartup,f=p?this.start:this.windowLoad;try{e=r.totalmem(),t=r.freemem(),s=r.platform(),a=r.release(),c=r.arch(),l=r.loadavg(),u=process.getProcessMemoryInfo(),d=Math.round(100*n.virtualMachineHint.value());var g=r.cpus();g&&g.length>0&&(o={count:g.length,
speed:g[0].speed,model:g[0].model})}catch(e){}var v=i.getEntry("mark","nlsGeneration:start"),m=i.getEntry("mark","nlsGeneration:end"),y=v&&m?m.startTime-v.startTime:0;this._startupMetrics={version:1,ellapsed:i.getEntry("mark","didStartWorkbench").startTime-f,timers:{ellapsedExtensions:i.getDuration("willLoadExtensions","didLoadExtensions"),ellapsedExtensionsReady:i.getEntry("mark","didLoadExtensions").startTime-f,ellapsedRequire:i.getDuration("willLoadWorkbenchMain","didLoadWorkbenchMain"),ellapsedEditorRestore:i.getDuration("willRestoreEditors","didRestoreEditors"),ellapsedViewletRestore:i.getDuration("willRestoreViewlet","didRestoreViewlet"),ellapsedWorkbench:i.getDuration("willStartWorkbench","didStartWorkbench"),ellapsedWindowLoadToRequire:i.getEntry("mark","willLoadWorkbenchMain").startTime-this.windowLoad,ellapsedTimersToTimersComputed:Date.now()-h,ellapsedNlsGeneration:y},platform:s,release:a,arch:c,totalmem:e,freemem:t,meminfo:u,cpus:o,loadavg:l,initialStartup:p,isVMLikelyhood:d,
hasAccessibilitySupport:!!this.hasAccessibilitySupport,emptyWorkbench:this.isEmptyWorkbench},p&&(this._startupMetrics.timers.ellapsedAppReady=i.getDuration("main:started","main:appReady"),this._startupMetrics.timers.ellapsedWindowLoad=this.windowLoad-i.getEntry("mark","main:appReady").startTime)},e}();t.TimerService=o}),define(e[513],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITitleService=n.createDecorator("titleService")}),define(e[91],t([1,0,10,6,20,292,17,7,50,43]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IUntitledEditorService=i.createDecorator("untitledEditorService");var h=function(){function e(e,t){this.instantiationService=e,this.configurationService=t,this.mapResourceToInput=new u.ResourceMap,this.mapResourceToAssociatedFilePath=new u.ResourceMap,this._onDidChangeContent=new c.Emitter,this._onDidChangeDirty=new c.Emitter,this._onDidChangeEncoding=new c.Emitter,this._onDidDisposeModel=new c.Emitter}
return Object.defineProperty(e.prototype,"onDidDisposeModel",{get:function(){return this._onDidDisposeModel.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeContent",{get:function(){return this._onDidChangeContent.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeDirty",{get:function(){return this._onDidChangeDirty.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeEncoding",{get:function(){return this._onDidChangeEncoding.event},enumerable:!0,configurable:!0}),e.prototype.get=function(e){return this.mapResourceToInput.get(e)},e.prototype.getAll=function(e){var t=this;return e?r.coalesce(e.map(function(e){return t.get(e)})):this.mapResourceToInput.values()},e.prototype.exists=function(e){return this.mapResourceToInput.has(e)},e.prototype.revertAll=function(e,t){var n=[];return this.getAll(e).forEach(function(e){e&&(e.revert(),e.dispose(),n.push(e.getResource()))}),n},e.prototype.isDirty=function(e){
var t=this.get(e);return t&&t.isDirty()},e.prototype.getDirty=function(e){var t=this;return(e?e.map(function(e){return t.get(e)}).filter(function(e){return!!e}):this.mapResourceToInput.values()).filter(function(e){return e.isDirty()}).map(function(e){return e.getResource()})},e.prototype.loadOrCreate=function(e){return void 0===e&&(e=Object.create(null)),this.createOrGet(e.resource,e.modeId,e.initialValue,e.encoding,e.useResourcePath).resolve()},e.prototype.createOrGet=function(e,t,n,i,r){return void 0===r&&(r=!1),e&&(e.scheme===d.Schemas.file&&(r=!0,e=e.with({scheme:d.Schemas.untitled})),r&&this.mapResourceToAssociatedFilePath.set(e,!0)),e&&this.mapResourceToInput.has(e)?this.mapResourceToInput.get(e):this.doCreate(e,r,t,n,i)},e.prototype.doCreate=function(e,t,i,r,s){var a=this;if(!e){var l=this.mapResourceToInput.size+1;do{e=n.default.from({scheme:d.Schemas.untitled,path:"Untitled-"+l}),l++}while(this.mapResourceToInput.has(e))}if(!i&&!t){var u=this.configurationService.getValue()
;u.files&&u.files.defaultLanguage&&(i=u.files.defaultLanguage)}var h=this.instantiationService.createInstance(o.UntitledEditorInput,e,t,i,r,s),p=h.onDidModelChangeContent(function(){a._onDidChangeContent.fire(e)}),f=h.onDidChangeDirty(function(){a._onDidChangeDirty.fire(e)}),g=h.onDidModelChangeEncoding(function(){a._onDidChangeEncoding.fire(e)}),v=h.onDispose(function(){a._onDidDisposeModel.fire(e)});return c.once(h.onDispose)(function(){a.mapResourceToInput.delete(h.getResource()),a.mapResourceToAssociatedFilePath.delete(h.getResource()),p.dispose(),f.dispose(),g.dispose(),v.dispose()}),this.mapResourceToInput.set(e,h),h},e.prototype.hasAssociatedFilePath=function(e){return this.mapResourceToAssociatedFilePath.has(e)},e.prototype.suggestFileName=function(e){var t=this.get(e);return t?t.suggestFileName():void 0},e.prototype.getEncoding=function(e){var t=this.get(e);return t?t.getEncoding():void 0},e.prototype.dispose=function(){this._onDidChangeContent.dispose(),this._onDidChangeDirty.dispose(),
this._onDidChangeEncoding.dispose(),this._onDidDisposeModel.dispose()},e=a([l(0,i.IInstantiationService),l(1,s.IConfigurationService)],e)}();t.UntitledEditorService=h}),define(e[515],t([1,0,10,126,47,5,48,4,33,54,91,61,72,43]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(){function e(e,t){void 0===e&&(e=18e4),void 0===t&&(t=83886080),this._maxAge=e,this._maxLength=t,this._data=new Array,this._length=0}return e.prototype.dispose=function(){this._data=o.dispose(this._data)},e.prototype.add=function(e){var t,n,i=this,r=e.object.textEditorModel.getValueLength(),o=function(){var o=i._data.indexOf(n);o>=0&&(i._length-=r,e.dispose(),clearTimeout(t),i._data.splice(o,1))};t=setTimeout(o,this._maxAge),n={length:r,dispose:o},this._data.push(n),this._length+=r,this._cleanup()},e.prototype._cleanup=function(){for(;this._length>this._maxLength;)this._data[0].dispose()},e}();t.BoundModelReferenceCollection=v;var m=function(){function e(e,t,n,i,r,o,s,a){
var c=this;this._modelReferenceCollection=new v,this._modelService=n,this._textModelResolverService=s,this._textFileService=r,this._fileService=o,this._untitledEditorService=a,this._proxy=t.getProxy(p.ExtHostContext.ExtHostDocuments),this._modelIsSynced={},this._toDispose=[],this._toDispose.push(e.onDocumentAdd(function(e){return e.forEach(c._onModelAdded,c)})),this._toDispose.push(e.onDocumentRemove(function(e){return e.forEach(c._onModelRemoved,c)})),this._toDispose.push(this._modelReferenceCollection),this._toDispose.push(n.onModelModeChanged(this._onModelModeChanged,this)),this._toDispose.push(r.models.onModelSaved(function(e){c._shouldHandleFileEvent(e)&&c._proxy.$acceptModelSaved(e.resource)})),this._toDispose.push(r.models.onModelReverted(function(e){c._shouldHandleFileEvent(e)&&c._proxy.$acceptDirtyStateChanged(e.resource,!1)})),this._toDispose.push(r.models.onModelDirty(function(e){c._shouldHandleFileEvent(e)&&c._proxy.$acceptDirtyStateChanged(e.resource,!0)})),
this._modelToDisposeMap=Object.create(null)}return e.prototype.dispose=function(){var e=this;Object.keys(this._modelToDisposeMap).forEach(function(t){e._modelToDisposeMap[t].dispose()}),this._modelToDisposeMap=Object.create(null),this._toDispose=o.dispose(this._toDispose)},e.prototype._shouldHandleFileEvent=function(e){var t=this._modelService.getModel(e.resource);return t&&r.shouldSynchronizeModel(t)},e.prototype._onModelAdded=function(e){var t=this;if(!r.shouldSynchronizeModel(e))return null;var n=e.uri;this._modelIsSynced[n.toString()]=!0,this._modelToDisposeMap[n.toString()]=e.onDidChangeContent(function(e){t._proxy.$acceptModelChanged(n,e,t._textFileService.isDirty(n))})},e.prototype._onModelModeChanged=function(e){var t=e.model,n=e.oldModeId,i=t.uri;this._modelIsSynced[i.toString()]&&this._proxy.$acceptModelModeChanged(t.uri,n,t.getLanguageIdentifier().language)},e.prototype._onModelRemoved=function(e){var t=e.toString();this._modelIsSynced[t]&&(delete this._modelIsSynced[t],
this._modelToDisposeMap[t].dispose(),delete this._modelToDisposeMap[t])},e.prototype.$trySaveDocument=function(e){return this._textFileService.save(n.default.revive(e))},e.prototype.$tryOpenDocument=function(e){var t=this,r=n.default.revive(e);if(!r.scheme||!r.fsPath&&!r.authority)return c.TPromise.wrapError(new Error("Invalid uri. Scheme and authority or path must be set."));var o;switch(r.scheme){case g.Schemas.untitled:o=this._handleUnititledScheme(r);break;case g.Schemas.file:default:o=this._handleAsResourceInput(r)}return o.then(function(e){return e?t._modelIsSynced[r.toString()]?void 0:c.TPromise.wrapError(new Error("cannot open "+r.toString()+". Detail: Files above 50MB cannot be synchronized with extensions.")):c.TPromise.wrapError(new Error("cannot open "+r.toString()))},function(e){return c.TPromise.wrapError(new Error("cannot open "+r.toString()+". Detail: "+i.toErrorMessage(e)))})},e.prototype.$tryCreateDocument=function(e){
return this._doCreateUntitled(void 0,e?e.language:void 0,e?e.content:void 0)},e.prototype._handleAsResourceInput=function(e){var t=this;return this._textModelResolverService.createModelReference(e).then(function(e){t._modelReferenceCollection.add(e);return!!e.object})},e.prototype._handleUnititledScheme=function(e){var t=this,n=e.with({scheme:g.Schemas.file});return this._fileService.resolveFile(n).then(function(e){return c.TPromise.wrapError(new Error("file already exists on disk"))},function(n){return t._doCreateUntitled(e).then(function(e){return!!e})})},e.prototype._doCreateUntitled=function(e,t,n){var i=this;return this._untitledEditorService.loadOrCreate({resource:e,modeId:t,initialValue:n,useResourcePath:Boolean(e&&e.path)}).then(function(e){var t=e.getResource();if(!i._modelIsSynced[t.toString()])throw new Error("expected URI "+t.toString()+" to have come to LIFE");return i._proxy.$acceptDirtyStateChanged(t,!0),t})},
e=a([l(2,r.IModelService),l(3,d.IModeService),l(4,s.ITextFileService),l(5,u.IFileService),l(6,f.ITextModelService),l(7,h.IUntitledEditorService)],e)}();t.MainThreadDocuments=m}),define(e[1465],t([1,0,47,5,71,7,61,444,48,53,276,67,515,451,54,33,72,91,21,45,184]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E;!function(e){e.setValues=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},e.mapValues=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}}(E||(E={}));var w;!function(e){e.ofSets=function(e,t){var n=[],i=[];return e.forEach(function(e){t.has(e)||n.push(e)}),t.forEach(function(t){e.has(t)||i.push(t)}),{removed:n,added:i}},e.ofMaps=function(e,t){var n=[],i=[];return e.forEach(function(e,i){t.has(i)||n.push(e)}),t.forEach(function(t,n){e.has(n)||i.push(t)}),{removed:n,added:i}}}(w||(w={}));var I=function(){return function(e){this.editor=e,this.id=e.getId()+","+e.getModel().id}}(),T=function(){
function e(e,t,n,i,r,o){this.removedDocuments=e,this.addedDocuments=t,this.removedEditors=n,this.addedEditors=i,this.oldActiveEditor=r,this.newActiveEditor=o,this.isEmpty=0===this.removedDocuments.length&&0===this.addedDocuments.length&&0===this.removedEditors.length&&0===this.addedEditors.length&&r===o}return e.prototype.toString=function(){var e="DocumentAndEditorStateDelta\n";return e+="\tRemoved Documents: ["+this.removedDocuments.map(function(e){return e.uri.toString(!0)}).join(", ")+"]\n",e+="\tAdded Documents: ["+this.addedDocuments.map(function(e){return e.uri.toString(!0)}).join(", ")+"]\n",e+="\tRemoved Editors: ["+this.removedEditors.map(function(e){return e.id}).join(", ")+"]\n",e+="\tAdded Editors: ["+this.addedEditors.map(function(e){return e.id}).join(", ")+"]\n",e+="\tNew Active Editor: "+this.newActiveEditor+"\n"},e}(),x=function(){function e(e,t,n){this.documents=e,this.textEditors=t,this.activeEditor=n}return e.compute=function(e,t){
if(!e)return new T([],E.setValues(t.documents),[],E.mapValues(t.textEditors),void 0,t.activeEditor);var n=w.ofSets(e.documents,t.documents),i=w.ofMaps(e.textEditors,t.textEditors),r=e.activeEditor!==t.activeEditor?e.activeEditor:void 0,o=e.activeEditor!==t.activeEditor?t.activeEditor:void 0;return new T(n.removed,n.added,i.removed,i.added,r,o)},e}(),k=function(){function e(e,t,n,i){this._onDidChangeState=e,this._modelService=t,this._codeEditorService=n,this._editorService=i,this._toDispose=[],this._toDisposeOnEditorRemove=new Map,this._modelService.onModelAdded(this._updateStateOnModelAdd,this,this._toDispose),this._modelService.onModelRemoved(this._updateState,this,this._toDispose),this._codeEditorService.onCodeEditorAdd(this._onDidAddEditor,this,this._toDispose),this._codeEditorService.onCodeEditorRemove(this._onDidRemoveEditor,this,this._toDispose),this._codeEditorService.listCodeEditors().forEach(this._onDidAddEditor,this),this._updateState()}return e.prototype.dispose=function(){
this._toDispose=i.dispose(this._toDispose)},e.prototype._onDidAddEditor=function(e){var t=this;this._toDisposeOnEditorRemove.set(e.getId(),e.onDidChangeModel(function(){return t._updateState()})),this._toDisposeOnEditorRemove.set(e.getId(),e.onDidFocusEditorText(function(){return t._updateState()})),this._toDisposeOnEditorRemove.set(e.getId(),e.onDidBlurEditorText(function(){return t._updateState()})),this._updateState()},e.prototype._onDidRemoveEditor=function(e){var t=this._toDisposeOnEditorRemove.get(e.getId());t&&(this._toDisposeOnEditorRemove.delete(e.getId()),t.dispose(),this._updateState())},e.prototype._updateStateOnModelAdd=function(e){n.shouldSynchronizeModel(e)&&(this._currentState?(this._currentState=new x(this._currentState.documents.add(e),this._currentState.textEditors,this._currentState.activeEditor),this._onDidChangeState(new T([],[e],[],[],void 0,void 0))):this._updateState())},e.prototype._updateState=function(){for(var e=new Set,t=0,i=this._modelService.getModels();t<i.length;t++){l=i[t]
;n.shouldSynchronizeModel(l)&&e.add(l)}for(var r=new Map,o=null,s=0,a=this._codeEditorService.listCodeEditors();s<a.length;s++){var c=a[s];if(!c.isSimpleWidget){var l;if((l=c.getModel())&&n.shouldSynchronizeModel(l)&&!l.isDisposed()&&Boolean(this._modelService.getModel(l.uri))){var u=new I(c);r.set(u.id,u),c.hasTextFocus()&&(o=u.id)}}}if(!o){var d=this._editorService.activeTextEditorWidget;_.isDiffEditor(d)&&(d=d.getModifiedEditor()),d&&r.forEach(function(e){d===e.editor&&(o=e.id)})}var h=new x(e,r,o),p=x.compute(this._currentState,h);p.isEmpty||(this._currentState=h,this._onDidChangeState(p))},e=a([l(1,n.IModelService),l(2,r.ICodeEditorService),l(3,S.IEditorService)],e)}(),D=function(){function e(e,t,n,i,r,a,c,l,u,d,h){var p=this;this._modelService=t,this._textFileService=n,this._editorService=i,this._editorGroupService=d,this._textEditors=Object.create(null),this._onTextEditorAdd=new o.Emitter,this._onTextEditorRemove=new o.Emitter,this._onDocumentAdd=new o.Emitter,this._onDocumentRemove=new o.Emitter,
this.onTextEditorAdd=this._onTextEditorAdd.event,this.onTextEditorRemove=this._onTextEditorRemove.event,this.onDocumentAdd=this._onDocumentAdd.event,this.onDocumentRemove=this._onDocumentRemove.event,this._proxy=e.getProxy(s.ExtHostContext.ExtHostDocumentsAndEditors);var v=new f.MainThreadDocuments(this,e,this._modelService,a,this._textFileService,c,l,u);e.set(s.MainContext.MainThreadDocuments,v);var m=new g.MainThreadTextEditors(this,e,r,h,this._editorService,this._editorGroupService);e.set(s.MainContext.MainThreadTextEditors,m),this._stateComputer=new k(function(e){return p._onDelta(e)},t,r,this._editorService),this._toDispose=[v,m,this._stateComputer,this._onTextEditorAdd,this._onTextEditorRemove,this._onDocumentAdd,this._onDocumentRemove]}return e.prototype.dispose=function(){this._toDispose=i.dispose(this._toDispose)},e.prototype._onDelta=function(e){var t,n=this,i=[],r=[];t=e.removedDocuments.map(function(e){return e.uri});for(var o=0,s=e.addedEditors;o<s.length;o++){
var a=s[o],l=new c.MainThreadTextEditor(a.id,a.editor.getModel(),a.editor,{onGainedFocus:function(){},onLostFocus:function(){}},this._modelService);this._textEditors[a.id]=l,r.push(l)}for(var u=0,d=e.removedEditors;u<d.length;u++){var h=d[u].id;(l=this._textEditors[h])&&(l.dispose(),delete this._textEditors[h],i.push(h))}var p=Object.create(null),f=!0;void 0!==e.newActiveEditor&&(f=!1,p.newActiveEditor=e.newActiveEditor),t.length>0&&(f=!1,p.removedDocuments=t),i.length>0&&(f=!1,p.removedEditors=i),e.addedDocuments.length>0&&(f=!1,p.addedDocuments=e.addedDocuments.map(function(e){return n._toModelAddData(e)})),e.addedEditors.length>0&&(f=!1,p.addedEditors=r.map(function(e){return n._toTextEditorAddData(e)})),f||(this._proxy.$acceptDocumentsAndEditorsDelta(p),this._onDocumentRemove.fire(t),this._onDocumentAdd.fire(e.addedDocuments),this._onTextEditorRemove.fire(i),this._onTextEditorAdd.fire(r))},e.prototype._toModelAddData=function(e){return{uri:e.uri,versionId:e.getVersionId(),lines:e.getLinesContent(),
EOL:e.getEOL(),modeId:e.getLanguageIdentifier().language,isDirty:this._textFileService.isDirty(e.uri)}},e.prototype._toTextEditorAddData=function(e){var t=e.getProperties();return{id:e.getId(),documentUri:e.getModel().uri,options:t.options,selections:t.selections,visibleRanges:t.visibleRanges,editorPosition:this._findEditorPosition(e)}},e.prototype._findEditorPosition=function(e){for(var t=0,n=this._editorService.visibleControls;t<n.length;t++){var i=n[t];if(e.matches(i))return h.editorGroupToViewColumn(this._editorGroupService,i.group)}},e.prototype.findTextEditorIdFor=function(e){for(var t in this._textEditors)if(this._textEditors[t].matches(e))return t},e.prototype.getEditor=function(e){return this._textEditors[e]},e=a([p.extHostCustomer,l(1,n.IModelService),l(2,u.ITextFileService),l(3,S.IEditorService),l(4,r.ICodeEditorService),l(5,v.IModeService),l(6,m.IFileService),l(7,y.ITextModelService),l(8,b.IUntitledEditorService),l(9,d.IEditorGroupsService),l(10,C.IBulkEditService)],e)}()
;t.MainThreadDocumentsAndEditors=D}),define(e[176],t([1,0,150,25,33,42,10,48,153,4,43,91,9,57,17,182,117,62,151,11,20,6,45,70,21,5,8]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";function A(e,n){var i=[];if(e.dataTransfer.types.length>0){if(!n){var r=e.dataTransfer.getData(t.CodeDataTransfers.EDITORS);if(r)try{JSON.parse(r).forEach(function(e){i.push({resource:c.default.parse(e.resource),backupResource:e.backupResource?c.default.parse(e.backupResource):void 0,viewState:e.viewState,isExternal:!1})})}catch(e){}else try{var o=e.dataTransfer.getData(y.DataTransfers.RESOURCES);if(o){var s=JSON.parse(o);i.push.apply(i,s.map(function(e){return{resource:c.default.parse(e),isExternal:!1}}))}}catch(e){}}if(e.dataTransfer&&e.dataTransfer.files)for(var a=function(t){var n=e.dataTransfer.files[t];if(n&&n.path&&!i.some(function(e){return e.resource.fsPath===n.path}))try{i.push({resource:c.default.file(n.path),isExternal:!0})}catch(e){}},l=0;l<e.dataTransfer.files.length;l++)a(l)
;var u=e.dataTransfer.getData(t.CodeDataTransfers.FILES);if(u)try{JSON.parse(u).forEach(function(e){i.some(function(t){return t.resource.fsPath===e})||i.push({resource:c.default.file(e),isExternal:!0})})}catch(e){}}return i}function L(e,n,i){if(0!==n.length){var o=n.map(function(e){return c.default.isUri(e)?{resource:e,isDirectory:!1}:e}),s=o[0],a=C.isWindows?"\r\n":"\n";i.dataTransfer.setData(y.DataTransfers.TEXT,o.map(function(e){return e.resource.scheme===p.Schemas.file?r.normalize(S.normalizeDriveLetter(e.resource.fsPath),!0):e.resource.toString()}).join(a)),s.resource.scheme===p.Schemas.file&&i.dataTransfer.setData(y.DataTransfers.DOWNLOAD_URL,[_.MIME_BINARY,r.basename(s.resource.fsPath),s.resource.toString()].join(":"));var l=o.filter(function(e){return!e.isDirectory});l.length&&i.dataTransfer.setData(y.DataTransfers.RESOURCES,JSON.stringify(l.map(function(e){return e.resource.toString()})));var h=e.get(u.ITextFileService),f=e.get(d.IBackupFileService),g=e.get(x.IEditorService),v=[]
;l.forEach(function(e){for(var t,n=g.visibleTextEditorWidgets,i=0;i<n.length;i++){var r=n[i];if(I.isCodeEditor(r)){var o=r.getModel();if(o&&o.uri&&o.uri.toString()===e.resource.toString()){t=r.saveViewState();break}}}v.push({resource:e.resource.toString(),backupResource:h.isDirty(e.resource)?f.toBackupResource(e.resource).toString():void 0,viewState:t})}),v.length&&i.dataTransfer.setData(t.CodeDataTransfers.EDITORS,JSON.stringify(v))}}Object.defineProperty(t,"__esModule",{value:!0});var R=function(){function e(e){this._identifier=e}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!0,configurable:!0}),e}();t.DraggedEditorIdentifier=R;var O=function(){function e(e){this._identifier=e}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!0,configurable:!0}),e}();t.DraggedEditorGroupIdentifier=O,t.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"},t.extractResources=A;var M=function(){
function e(e,t,n,i,r,o,s,a,c,l){this.options=e,this.fileService=t,this.windowsService=n,this.windowService=i,this.workspacesService=r,this.textFileService=o,this.backupFileService=s,this.untitledEditorService=a,this.editorService=c,this.configurationService=l}return e.prototype.handleDrop=function(e,t,n,i){var r=this,o=A(e).filter(function(e){return r.fileService.canHandleResource(e.resource)||e.resource.scheme===p.Schemas.untitled});if(o.length)return this.windowService.focusWindow().then(function(){return r.doHandleDrop(o).then(function(e){if(!e){var s=o.filter(function(e){return e.isExternal&&e.resource.scheme===p.Schemas.file}).map(function(e){return e.resource});s.length&&r.windowsService.addRecentlyOpened(s.map(function(e){return e.fsPath}));var a=o.map(function(e){return{resource:e.resource,options:{pinned:!0,index:i,viewState:e.viewState}}}),c=t();return r.editorService.openEditors(a,c).then(function(){n(c)})}})}).done(null,g.onUnexpectedError)},e.prototype.doHandleDrop=function(e){
var t=this,n=e.filter(function(e){return!e.isExternal&&!!e.backupResource});if(n.length>0)return h.TPromise.join(n.map(function(e){return t.handleDirtyEditorDrop(e)})).then(function(){return!1});if(this.options.allowWorkspaceOpen){var i=e.filter(function(e){return e.isExternal&&e.resource.scheme===p.Schemas.file}).map(function(e){return e.resource});if(i.length>0)return this.handleWorkspaceFileDrop(i)}return h.TPromise.as(!1)},e.prototype.handleDirtyEditorDrop=function(e){var t=this;return e.resource.scheme===p.Schemas.untitled&&(e.resource=this.untitledEditorService.createOrGet().getResource()),this.textFileService.isDirty(e.resource)||this.editorService.isOpen({resource:e.resource})?h.TPromise.as(!1):this.backupFileService.resolveBackupContent(e.backupResource).then(function(n){return t.backupFileService.backupResource(e.resource,n.create(t.getDefaultEOL()).createSnapshot(!0))}).then(function(){return!1},function(){return!1})},e.prototype.getDefaultEOL=function(){
return"\r\n"===this.configurationService.getValue("files.eol")?v.DefaultEndOfLine.CRLF:v.DefaultEndOfLine.LF},e.prototype.handleWorkspaceFileDrop=function(e){var t=this,n={workspaces:[],folders:[]};return h.TPromise.join(e.map(function(e){if(r.extname(e.fsPath)!=="."+i.WORKSPACE_EXTENSION)return t.fileService.resolveFile(e).then(function(e){e.isDirectory&&n.folders.push(e.resource)},function(e){});n.workspaces.push(e)})).then(function(e){var i=n.workspaces,r=n.folders;if(0===i.length&&0===r.length)return!1;t.windowService.focusWindow();var o;return i.length>0||1===r.length?o=h.TPromise.as(i.concat(r).map(function(e){return e.fsPath})):r.length>1&&(o=t.workspacesService.createWorkspace(r.map(function(e){return{uri:e}})).then(function(e){return[e.configPath]})),o.then(function(e){t.windowService.openWindow(e,{forceReuseWindow:!0})}),!0})},
e=a([l(1,o.IFileService),l(2,s.IWindowsService),l(3,s.IWindowService),l(4,i.IWorkspacesService),l(5,u.ITextFileService),l(6,d.IBackupFileService),l(7,f.IUntitledEditorService),l(8,x.IEditorService),l(9,m.IConfigurationService)],e)}();t.ResourcesDropHandler=M;var P=function(e){function t(t,n){var i=e.call(this)||this;return i.toResource=t,i.instantiationService=n,i}return n(t,e),t.prototype.getDragURI=function(e,t){var n=this.toResource(t);if(n)return n.toString()},t.prototype.getDragLabel=function(e,t){if(t.length>1)return String(t.length);var n=this.toResource(t[0]);return n?T.basenameOrAuthority(n):void 0},t.prototype.onDragStart=function(e,t,n){var i=this,r=t.getData().map(function(e){return i.toResource(e)});r&&this.instantiationService.invokeFunction(L,E.coalesce(r),n)},t=a([l(1,w.IInstantiationService)],t)}(b.DefaultDragAndDrop);t.SimpleFileResourceDragAndDrop=P,t.fillResourceDataTransfers=L;var N=function(){function e(){}return e.getInstance=function(){return e.INSTANCE},
e.prototype.hasData=function(e){return e&&e===this.proto},e.prototype.clearData=function(e){this.hasData(e)&&(this.proto=void 0,this.data=void 0)},e.prototype.getData=function(e){if(this.hasData(e))return this.data},e.prototype.setData=function(e,t){t&&(this.data=e,this.proto=t)},e.INSTANCE=new e,e}();t.LocalSelectionTransfer=N;var F=function(e){function t(t,n){var i=e.call(this)||this;return i.element=t,i.callbacks=n,i.counter=0,i.registerListeners(),i}return n(t,e),t.prototype.registerListeners=function(){var e=this;this._register(D.addDisposableListener(this.element,D.EventType.DRAG_ENTER,function(t){e.counter++,e.callbacks.onDragEnter(t)})),this._register(D.addDisposableListener(this.element,D.EventType.DRAG_OVER,function(t){e.callbacks.onDragOver&&e.callbacks.onDragOver(t)})),this._register(D.addDisposableListener(this.element,D.EventType.DRAG_LEAVE,function(t){e.counter--,0===e.counter&&e.callbacks.onDragLeave(t)})),this._register(D.addDisposableListener(this.element,D.EventType.DRAG_END,function(t){
e.counter=0,e.callbacks.onDragEnd(t)})),this._register(D.addDisposableListener(this.element,D.EventType.DROP,function(t){e.counter=0,e.callbacks.onDrop(t)}))},t}(k.Disposable);t.DragAndDropObserver=F}),define(e[138],t([1,0,70,277,49,54,40,62,181,27,17,5,47,36,91,240,43,33,12,7,165]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";function w(e,t,n,r){var o=r===S.FileKind.ROOT_FOLDER?["rootfolder-icon"]:r===S.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(n){var s;if(n.scheme===b.Schemas.data){s=E.DataUri.parseMetaData(n).get(E.DataUri.META_DATA_LABEL)}else s=T(i.basenameOrAuthority(n).toLowerCase());if(r===S.FileKind.FOLDER)o.push(s+"-name-folder-icon");else{o.push(s+"-name-file-icon");for(var a=s.split("."),c=1;c<a.length;c++)o.push(a.slice(c).join(".")+"-ext-file-icon");o.push("ext-file-icon");var l=I(e,n);(l=l||t.getModeIdByFilenameOrFirstLine(s))&&o.push(T(l)+"-lang-file-icon")}}return o}function I(e,t){var n;if(t){var i=e.getModel(t);if(i){var r=i.getLanguageIdentifier().language
;r&&r!==d.PLAINTEXT_MODE_ID&&(n=r)}}return n}function T(e){return e.replace(/\s/g,"\\$&")}Object.defineProperty(t,"__esModule",{value:!0});var x=function(e){function t(t,n,i,r,o,s,a,c,l,u){var d=e.call(this,t,n)||this;return d.extensionService=i,d.contextService=r,d.configurationService=o,d.modeService=s,d.modelService=a,d.environmentService=c,d.decorationsService=l,d.themeService=u,d._onDidRender=new C.Emitter,d.onDidRender=d._onDidRender.event,d.toDispose=[],d.registerListeners(),d}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.extensionService.onDidRegisterExtensions(function(){return e.render(!0)})),this.toDispose.push(this.modelService.onModelModeChanged(function(t){return e.onModelModeChanged(t)})),this.toDispose.push(this.decorationsService.onDidChangeDecorations(this.onFileDecorationsChanges,this)),this.toDispose.push(this.themeService.onThemeChange(function(){return e.render(!1)})),
this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){t.affectsConfiguration(S.FILES_ASSOCIATIONS_CONFIG)&&e.render(!0)}))},t.prototype.onModelModeChanged=function(e){this.label&&this.label.resource&&e.model.uri&&(e.model.uri.scheme===b.Schemas.file&&e.oldModeId===d.PLAINTEXT_MODE_ID||e.model.uri.toString()===this.label.resource.toString()&&this.lastKnownConfiguredLangId!==e.model.getLanguageIdentifier().language&&this.render(!0))},t.prototype.onFileDecorationsChanges=function(e){this.options&&this.label&&this.label.resource&&this.options.fileDecorations&&e.affectsResource(this.label.resource)&&this.render(!1)},t.prototype.setLabel=function(e,t){var n=this.hasResourceChanged(e,t);this.label=e,this.options=t,n&&(this.computedPathLabel=void 0),this.render(n)},t.prototype.hasResourceChanged=function(e,t){var n=e?e.resource:void 0,i=this.label?this.label.resource:void 0
;return(t?t.fileKind:void 0)!==(this.options?this.options.fileKind:void 0)||(n&&i?n.toString()!==i.toString():!(!n&&!i))},t.prototype.clear=function(){this.label=void 0,this.options=void 0,this.lastKnownConfiguredLangId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0,this.setValue()},t.prototype.render=function(e){var t;if(this.label){var n=I(this.modelService,this.label.resource);this.lastKnownConfiguredLangId!==n&&(e=!0,this.lastKnownConfiguredLangId=n)}if(e&&(this.computedIconClasses=void 0),this.label){var i={title:"",italic:this.options&&this.options.italic,matches:this.options&&this.options.matches},r=this.label.resource,o=this.label.name;if(this.options&&"string"==typeof this.options.title)i.title=this.options.title;else if(r&&r.scheme!==b.Schemas.data){if(!this.computedPathLabel){var s=r.scheme!==b.Schemas.file?this.contextService:void 0;this.computedPathLabel=u.getPathLabel(r,this.environmentService,s)}i.title=this.computedPathLabel}
if(this.computedIconClasses||(this.computedIconClasses=w(this.modelService,this.modeService,r,this.options&&this.options.fileKind)),i.extraClasses=this.computedIconClasses.slice(0),this.options&&this.options.extraClasses&&(t=i.extraClasses).push.apply(t,this.options.extraClasses),this.options&&this.options.fileDecorations&&r){var a=this.decorationsService.getDecoration(r,this.options.fileKind!==S.FileKind.FILE,this.options.fileDecorations.data);a&&(a.tooltip&&(i.title=i.title+" • "+a.tooltip),this.options.fileDecorations.colors&&i.extraClasses.push(a.labelClassName),this.options.fileDecorations.badges&&i.extraClasses.push(a.badgeClassName))}this.setValue(o,this.label.description,i),this._onDidRender.fire()}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=f.dispose(this.toDispose),this.label=void 0,this.options=void 0,this.lastKnownConfiguredLangId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0},
t=a([l(2,o.IExtensionService),l(3,h.IWorkspaceContextService),l(4,p.IConfigurationService),l(5,s.IModeService),l(6,g.IModelService),l(7,v.IEnvironmentService),l(8,y.IDecorationsService),l(9,_.IThemeService)],t)}(r.IconLabel);t.ResourceLabel=x;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.setEditor=function(e,t){this.setLabel({resource:c.toResource(e,{supportSideBySide:!0}),name:e.getName(),description:e.getDescription()},t)},t}(x);t.EditorLabel=k;var D=function(e){function t(t,n,i,r,o,s,a,c,l,u,d){var h=e.call(this,t,n,i,r,o,s,a,c,l,u)||this;return h.untitledEditorService=d,h}return n(t,e),t.prototype.setFile=function(e,t){var n;if(!(t&&t.hideLabel)){if(t&&t.fileKind===S.FileKind.ROOT_FOLDER){var r=this.contextService.getWorkspaceFolder(e);r&&(n=r.name)}n||(n=i.basenameOrAuthority(e))}var o;if(!(t&&t.hidePath||e.scheme===b.Schemas.untitled&&!this.untitledEditorService.hasAssociatedFilePath(e))){var s=void 0;s=t&&t.root?{getWorkspaceFolder:function(){
return{uri:t.root}},getWorkspace:function(){return{folders:[{uri:t.root}]}}}:this.contextService,o=u.getPathLabel(i.dirname(e),this.environmentService,s)}this.setLabel({resource:e,name:n,description:o},t)},t=a([l(2,o.IExtensionService),l(3,h.IWorkspaceContextService),l(4,p.IConfigurationService),l(5,s.IModeService),l(6,g.IModelService),l(7,v.IEnvironmentService),l(8,y.IDecorationsService),l(9,_.IThemeService),l(10,m.IUntitledEditorService)],t)}(x);t.FileLabel=D,t.getIconClasses=w}),define(e[1468],t([1,0,176,8,223,69,12,26,40,11,53,5,6,823]),function(e,t,i,r,o,s,c,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t,n,r,o){var s=e.call(this,r)||this;return s.accessor=t,s.groupView=n,s.instantiationService=o,s.editorTransfer=i.LocalSelectionTransfer.getInstance(),s.groupTransfer=i.LocalSelectionTransfer.getInstance(),s.create(),s}return n(t,e),Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),
t.prototype.create=function(){var e=this,n=this.getOverlayOffsetHeight();this.container=document.createElement("div"),this.container.id=t.OVERLAY_ID,this.container.style.top=n+"px",this.groupView.element.appendChild(this.container),r.addClass(this.groupView.element,"dragged-over"),this._register(f.toDisposable(function(){e.groupView.element.removeChild(e.container),r.removeClass(e.groupView.element,"dragged-over")})),this.overlay=document.createElement("div"),r.addClass(this.overlay,"editor-group-overlay-indicator"),this.container.appendChild(this.overlay),this.registerListeners(),this.updateStyles()},t.prototype.updateStyles=function(){this.overlay.style.backgroundColor=this.getColor(s.EDITOR_DRAG_AND_DROP_BACKGROUND);var e=this.getColor(u.activeContrastBorder);this.overlay.style.outlineColor=e,this.overlay.style.outlineOffset=e?"-2px":null,this.overlay.style.outlineStyle=e?"dashed":null,this.overlay.style.outlineWidth=e?"2px":null},t.prototype.registerListeners=function(){var e=this
;this._register(new i.DragAndDropObserver(this.container,{onDragEnter:function(e){},onDragOver:function(t){var n=e.groupTransfer.hasData(i.DraggedEditorGroupIdentifier.prototype),r=e.editorTransfer.hasData(i.DraggedEditorIdentifier.prototype);r||n||(t.dataTransfer.dropEffect="copy");if(!(n?e.isCopyOperation(t):!r||e.isCopyOperation(t,e.editorTransfer.getData(i.DraggedEditorIdentifier.prototype)[0].identifier))){var o=e.findSourceGroupView();if(o===e.groupView&&(n||r&&o.count<2))return void e.hideOverlay()}e.positionOverlay(t.offsetX,t.offsetY,n)},onDragLeave:function(t){return e.dispose()},onDragEnd:function(t){return e.dispose()},onDrop:function(t){r.EventHelper.stop(t,!0),e.dispose(),e.currentDropOperation&&e.handleDrop(t,e.currentDropOperation.splitDirection)}})),this._register(r.addDisposableListener(this.container,r.EventType.MOUSE_OVER,function(){setTimeout(function(){e.dispose()},300)}))},t.prototype.findSourceGroupView=function(){
return this.groupTransfer.hasData(i.DraggedEditorGroupIdentifier.prototype)?this.accessor.getGroup(this.groupTransfer.getData(i.DraggedEditorGroupIdentifier.prototype)[0].identifier):this.editorTransfer.hasData(i.DraggedEditorIdentifier.prototype)?this.accessor.getGroup(this.editorTransfer.getData(i.DraggedEditorIdentifier.prototype)[0].identifier.groupId):void 0},t.prototype.handleDrop=function(e,t){var n=this,r=function(){return"number"==typeof t?n.accessor.addGroup(n.groupView,t):n.groupView};if(this.groupTransfer.hasData(i.DraggedEditorGroupIdentifier.prototype)){var s=this.groupTransfer.getData(i.DraggedEditorGroupIdentifier.prototype)[0].identifier,a=this.accessor.getGroup(s);if("number"!=typeof t&&a===this.groupView)return;l=void 0;l="number"==typeof t?this.isCopyOperation(e)?this.accessor.copyGroup(a,this.groupView,t):this.accessor.moveGroup(a,this.groupView,t):this.isCopyOperation(e)?this.accessor.mergeGroup(a,this.groupView,{mode:p.MergeGroupMode.COPY_EDITORS
}):this.accessor.mergeGroup(a,this.groupView),this.accessor.activateGroup(l),this.groupTransfer.clearData(i.DraggedEditorGroupIdentifier.prototype)}else if(this.editorTransfer.hasData(i.DraggedEditorIdentifier.prototype)){var c=this.editorTransfer.getData(i.DraggedEditorIdentifier.prototype)[0].identifier,l=r();if((a=this.accessor.getGroup(c.groupId))===l)return;var u=o.getActiveTextEditorOptions(a,c.editor,d.EditorOptions.create({pinned:!0}));l.openEditor(c.editor,u),l.focus();this.isCopyOperation(e,c)||a.closeEditor(c.editor),this.editorTransfer.clearData(i.DraggedEditorIdentifier.prototype)}else{this.instantiationService.createInstance(i.ResourcesDropHandler,{allowWorkspaceOpen:!0}).handleDrop(e,function(){return r()},function(e){return e.focus()})}},t.prototype.isCopyOperation=function(e,t){return!(t&&!t.editor.supportsSplitEditor())&&(e.ctrlKey&&!h.isMacintosh||e.altKey&&h.isMacintosh)},t.prototype.positionOverlay=function(e,t,n){
var i,o,s,a=this,c="right"===this.accessor.partOptions.openSideBySideDirection,l=this.groupView.element.clientWidth,u=this.groupView.element.clientHeight-this.getOverlayOffsetHeight(),d=l*(i=n&&c?.3:.1),h=u*(o=n?c?.1:.3:.1),f=l/3,g=u/3;switch(s=e>d&&e<l-d&&t>h&&t<u-h?void 0:c?e<f?p.GroupDirection.LEFT:e>2*f?p.GroupDirection.RIGHT:t<u/2?p.GroupDirection.UP:p.GroupDirection.DOWN:t<g?p.GroupDirection.UP:t>2*g?p.GroupDirection.DOWN:e<l/2?p.GroupDirection.LEFT:p.GroupDirection.RIGHT){case p.GroupDirection.UP:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"50%"});break;case p.GroupDirection.DOWN:this.doPositionOverlay({top:"50%",left:"0",width:"100%",height:"50%"});break;case p.GroupDirection.LEFT:this.doPositionOverlay({top:"0",left:"0",width:"50%",height:"100%"});break;case p.GroupDirection.RIGHT:this.doPositionOverlay({top:"0",left:"50%",width:"50%",height:"100%"});break;default:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"100%"})}this.overlay.style.opacity="1",
setTimeout(function(){return r.addClass(a.overlay,"overlay-move-transition")},0),this.currentDropOperation={splitDirection:s}},t.prototype.doPositionOverlay=function(e){var t=this.getOverlayOffsetHeight();this.container.style.height=t?"calc(100% - "+t+"px)":"100%",this.overlay.style.top=e.top,this.overlay.style.left=e.left,this.overlay.style.width=e.width,this.overlay.style.height=e.height},t.prototype.getOverlayOffsetHeight=function(){return!this.groupView.isEmpty()&&this.accessor.partOptions.showTabs?o.EDITOR_TITLE_HEIGHT:0},t.prototype.hideOverlay=function(){this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"100%"}),this.overlay.style.opacity="0",r.removeClass(this.overlay,"overlay-move-transition"),this.currentDropOperation=void 0},t.prototype.contains=function(e){return e===this.container||e===this.overlay},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._disposed=!0},t.OVERLAY_ID="monaco-workbench-editor-drop-overlay",t}(s.Themable),m=function(e){function t(t,n,r,o){
var s=e.call(this,r)||this;return s.accessor=t,s.container=n,s.instantiationService=o,s.counter=0,s.editorTransfer=i.LocalSelectionTransfer.getInstance(),s.groupTransfer=i.LocalSelectionTransfer.getInstance(),s.registerListeners(),s}return n(t,e),Object.defineProperty(t.prototype,"overlay",{get:function(){if(this._overlay&&!this._overlay.disposed)return this._overlay},enumerable:!0,configurable:!0}),t.prototype.registerListeners=function(){var e=this;this._register(r.addDisposableListener(this.container,r.EventType.DRAG_ENTER,function(t){return e.onDragEnter(t)})),this._register(r.addDisposableListener(this.container,r.EventType.DRAG_LEAVE,function(){return e.onDragLeave()})),[this.container,window].forEach(function(t){return e._register(r.addDisposableListener(t,r.EventType.DRAG_END,function(){return e.onDragEnd()}))})},t.prototype.onDragEnter=function(e){if(this.counter++,
this.editorTransfer.hasData(i.DraggedEditorIdentifier.prototype)||this.groupTransfer.hasData(i.DraggedEditorGroupIdentifier.prototype)||e.dataTransfer.types.length){this.updateContainer(!0);var t=e.target;if(t&&(this.overlay&&!this.overlay.contains(t)&&this.disposeOverlay(),!this.overlay)){var n=this.findTargetGroupView(t);n&&(this._overlay=new v(this.accessor,n,this.themeService,this.instantiationService))}}else e.dataTransfer.dropEffect="none"},t.prototype.onDragLeave=function(){this.counter--,0===this.counter&&this.updateContainer(!1)},t.prototype.onDragEnd=function(){this.counter=0,this.updateContainer(!1),this.disposeOverlay()},t.prototype.findTargetGroupView=function(e){for(var t=this.accessor.groups,n=0;n<t.length;n++){var i=t[n];if(r.isAncestor(e,i.element))return i}},t.prototype.updateContainer=function(e){r.toggleClass(this.container,"dragged-over",e)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposeOverlay()},t.prototype.disposeOverlay=function(){
this.overlay&&(this.overlay.dispose(),this._overlay=void 0)},t=a([l(2,c.IThemeService),l(3,g.IInstantiationService)],t)}(s.Themable);t.EditorDropTarget=m}),define(e[518],t([1,0,4,1508,122,109,54,138,47,86,21,53,6,40,286,828]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.editor=t,o._group=n,o.modeService=i,o.modelService=r,o}return n(t,e),t.prototype.getLabelOptions=function(){return{extraClasses:u.getIconClasses(this.modelService,this.modeService,this.getResource()),italic:!this._group.isPinned(this.editor)}},t.prototype.getLabel=function(){return this.editor.getName()},t.prototype.getIcon=function(){return this.editor.isDirty()?"dirty":""},Object.defineProperty(t.prototype,"group",{get:function(){return this._group},enumerable:!0,configurable:!0}),t.prototype.getResource=function(){return v.toResource(this.editor,{supportSideBySide:!0})},t.prototype.getAriaLabel=function(){
return r.localize(0,null,this.getLabel())},t.prototype.getDescription=function(){return this.editor.getDescription()},t.prototype.run=function(t,n){return t===o.Mode.OPEN?this.runOpen(n):e.prototype.run.call(this,t,n)},t.prototype.runOpen=function(e){return this._group.openEditor(this.editor),!0},t=a([l(2,c.IModeService),l(3,d.IModelService)],t)}(s.QuickOpenEntryGroup);t.EditorPickerEntry=y;var b=function(e){function t(t,n,i){var r=e.call(this)||this;return r.instantiationService=t,r.editorService=n,r.editorGroupService=i,r.scorerCache=Object.create(null),r}return n(t,e),t.prototype.getResults=function(e){var t=this,n=this.getEditorEntries();if(!n.length)return i.TPromise.as(null);var r=m.prepareQuery(e),o=n.filter(function(e){if(!r.value)return!0;var n=m.scoreItem(e,r,!0,s.QuickOpenItemAccessor,t.scorerCache);return!!n.score&&(e.setHighlights(n.labelMatch,n.descriptionMatch),!0)});if(r.value){var a=this.editorGroupService.getGroups(f.GroupsOrder.CREATION_TIME);o.sort(function(e,n){
return e.group!==n.group?a.indexOf(e.group)-a.indexOf(n.group):m.compareItemsByScore(e,n,r,!0,s.QuickOpenItemAccessor,t.scorerCache)})}if(this.editorGroupService.count>1){var c;o.forEach(function(e){c&&c===e.group||(e.setGroupLabel(e.group.label),e.setShowBorder(!!c),c=e.group)})}return i.TPromise.as(new s.QuickOpenModel(o))},t.prototype.onClose=function(e){this.scorerCache=Object.create(null)},t=a([l(0,g.IInstantiationService),l(1,p.IEditorService),l(2,f.IEditorGroupsService)],t)}(h.QuickOpenHandler);t.BaseEditorPicker=b;var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getEditorEntries=function(){var e=this;return this.group.getEditors(f.EditorsOrder.MOST_RECENTLY_ACTIVE).map(function(t,n){return e.instantiationService.createInstance(y,t,e.group)})},Object.defineProperty(t.prototype,"group",{get:function(){return this.editorGroupService.activeGroup},enumerable:!0,configurable:!0}),t.prototype.getEmptyLabel=function(e){
return e?r.localize(1,null):r.localize(2,null)},t.prototype.getAutoFocus=function(e,t){if(e||!t.quickNavigateConfiguration)return{autoFocusFirstEntry:!0};if(t.quickNavigateConfiguration&&t.quickNavigateConfiguration.keybindings.some(function(e){var t=e.getParts(),n=t[0];return!t[1]&&n.shiftKey}))return{autoFocusLastEntry:!0};var n=this.group.count;return{autoFocusFirstEntry:1===n,autoFocusSecondEntry:n>1}},t.ID="workbench.picker.activeEditors",t}(b);t.ActiveEditorGroupPicker=S;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getEditorEntries=function(){var e=this,t=[];return this.editorGroupService.getGroups(f.GroupsOrder.CREATION_TIME).forEach(function(n){n.editors.forEach(function(i){t.push(e.instantiationService.createInstance(y,i,n))})}),t},t.prototype.getEmptyLabel=function(e){return e?r.localize(3,null):r.localize(4,null)},t.prototype.getAutoFocus=function(t,n){return t?{autoFocusFirstEntry:!0}:e.prototype.getAutoFocus.call(this,t,n)},
t.ID="workbench.picker.editors",t}(b);t.AllEditorsPicker=_}),define(e[1470],t([1,0,1512,4,8,14,25,30,10,9,23,11,78,292,40,5,91,57,384,947,376,422,21,64,95,33,6,54,47,19,60,260,29,80,48,127,12,35,68,26,17,24,45,155,43,69,115,829]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y){"use strict";function X(e){if(e instanceof v.UntitledEditorInput)return e;if(e instanceof m.SideBySideEditorInput){var t=X(e.master),n=X(e.details);return t&&n?new te(t,n):t}var i=e;return u.areFunctions(i.setEncoding,i.getEncoding)?i:null}function Q(e,t){e.style.display!==t&&(e.style.display=t)}function Z(e){Q(e,"")}function J(e){Q(e,"none")}function ee(e){if(!e)return!1;return!e.getConfiguration().readOnly}Object.defineProperty(t,"__esModule",{value:!0});var te=function(){function e(e,t){this.master=e,this.details=t}return e.prototype.getEncoding=function(){return this.master.getEncoding()},e.prototype.setEncoding=function(e,t){[this.master,this.details].forEach(function(n){
return n.setEncoding(e,t)})},e}(),ne=function(){function e(){this.indentation=!1,this.selectionStatus=!1,this.mode=!1,this.encoding=!1,this.EOL=!1,this.tabFocusMode=!1,this.screenReaderMode=!1,this.metadata=!1}return e.prototype.combine=function(e){this.indentation=this.indentation||e.indentation,this.selectionStatus=this.selectionStatus||e.selectionStatus,this.mode=this.mode||e.mode,this.encoding=this.encoding||e.encoding,this.EOL=this.EOL||e.EOL,this.tabFocusMode=this.tabFocusMode||e.tabFocusMode,this.screenReaderMode=this.screenReaderMode||e.screenReaderMode,this.metadata=this.metadata||e.metadata},e}(),ie=function(){function e(){this._selectionStatus=null,this._mode=null,this._encoding=null,this._EOL=null,this._tabFocusMode=!1,this._screenReaderMode=!1,this._metadata=null}return Object.defineProperty(e.prototype,"selectionStatus",{get:function(){return this._selectionStatus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"encoding",{get:function(){return this._encoding},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"EOL",{get:function(){return this._EOL},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indentation",{get:function(){return this._indentation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabFocusMode",{get:function(){return this._tabFocusMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"screenReaderMode",{get:function(){return this._screenReaderMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._metadata},enumerable:!0,configurable:!0}),e.prototype.update=function(e){var t=new ne,n=!1;return void 0!==e.selectionStatus&&this._selectionStatus!==e.selectionStatus&&(this._selectionStatus=e.selectionStatus,n=!0,t.selectionStatus=!0),void 0!==e.indentation&&this._indentation!==e.indentation&&(this._indentation=e.indentation,
n=!0,t.indentation=!0),void 0!==e.mode&&this._mode!==e.mode&&(this._mode=e.mode,n=!0,t.mode=!0),void 0!==e.encoding&&this._encoding!==e.encoding&&(this._encoding=e.encoding,n=!0,t.encoding=!0),void 0!==e.EOL&&this._EOL!==e.EOL&&(this._EOL=e.EOL,n=!0,t.EOL=!0),void 0!==e.tabFocusMode&&this._tabFocusMode!==e.tabFocusMode&&(this._tabFocusMode=e.tabFocusMode,n=!0,t.tabFocusMode=!0),void 0!==e.screenReaderMode&&this._screenReaderMode!==e.screenReaderMode&&(this._screenReaderMode=e.screenReaderMode,n=!0,t.screenReaderMode=!0),void 0!==e.metadata&&this._metadata!==e.metadata&&(this._metadata=e.metadata,n=!0,t.metadata=!0),n?t:null},e}(),re=i.localize(0,null),oe=i.localize(1,null),se=i.localize(2,null),ae=i.localize(3,null),ce=i.localize(4,null),le=i.localize(5,null),ue=i.localize(6,null),de=i.localize(7,null),he=i.localize(8,null),pe=function(){function e(e,t,n,i,r,o,s){this.editorService=e,this.quickOpenService=t,this.instantiationService=n,this.untitledEditorService=i,this.modeService=r,this.textFileService=o,
this.configurationService=s,this._promptedScreenReader=!1,this.toDispose=[],this.activeEditorListeners=[],this.state=new ie}return e.prototype.render=function(e){var t=this;return this.element=o.append(e,o.$(".editor-statusbar-item")),this.tabFocusModeElement=o.append(this.element,o.$("a.editor-status-tabfocusmode.status-bar-info")),this.tabFocusModeElement.title=i.localize(9,null),this.tabFocusModeElement.onclick=function(){return t.onTabFocusModeClick()},this.tabFocusModeElement.textContent=ue,J(this.tabFocusModeElement),this.screenRedearModeElement=o.append(this.element,o.$("a.editor-status-screenreadermode.status-bar-info")),this.screenRedearModeElement.textContent=de,this.screenRedearModeElement.title=he,this.screenRedearModeElement.onclick=function(){return t.onScreenReaderModeClick()},J(this.screenRedearModeElement),this.selectionElement=o.append(this.element,o.$("a.editor-status-selection")),this.selectionElement.title=i.localize(10,null),this.selectionElement.onclick=function(){
return t.onSelectionClick()},J(this.selectionElement),this.indentationElement=o.append(this.element,o.$("a.editor-status-indentation")),this.indentationElement.title=i.localize(11,null),this.indentationElement.onclick=function(){return t.onIndentationClick()},J(this.indentationElement),this.encodingElement=o.append(this.element,o.$("a.editor-status-encoding")),this.encodingElement.title=i.localize(12,null),this.encodingElement.onclick=function(){return t.onEncodingClick()},J(this.encodingElement),this.eolElement=o.append(this.element,o.$("a.editor-status-eol")),this.eolElement.title=i.localize(13,null),this.eolElement.onclick=function(){return t.onEOLClick()},J(this.eolElement),this.modeElement=o.append(this.element,o.$("a.editor-status-mode")),this.modeElement.title=i.localize(14,null),this.modeElement.onclick=function(){return t.onModeClick()},J(this.modeElement),this.metadataElement=o.append(this.element,o.$("span.editor-status-metadata")),this.metadataElement.title=i.localize(15,null),
J(this.metadataElement),this.delayedRender=null,this.toRender=null,this.toDispose.push({dispose:function(){t.delayedRender&&(t.delayedRender.dispose(),t.delayedRender=null)}},this.editorService.onDidActiveEditorChange(function(){return t.updateStatusBar()}),this.untitledEditorService.onDidChangeEncoding(function(e){return t.onResourceEncodingChange(e)}),this.textFileService.models.onModelEncodingChanged(function(e){return t.onResourceEncodingChange(e.resource)}),M.TabFocus.onDidChangeTabFocus(function(e){return t.onTabFocusModeChange()})),y.combinedDisposable(this.toDispose)},e.prototype.updateState=function(e){var t=this,n=this.state.update(e);n&&(this.toRender?this.toRender.combine(n):(this.toRender=n,this.delayedRender=o.runAtThisOrScheduleAtNextAnimationFrame(function(){t.delayedRender=null;var e=t.toRender;t.toRender=null,t._renderNow(e)})))},e.prototype._renderNow=function(e){e.tabFocusMode&&(this.state.tabFocusMode&&!0===this.state.tabFocusMode?Z(this.tabFocusModeElement):J(this.tabFocusModeElement)),
e.screenReaderMode&&(this.state.screenReaderMode&&!0===this.state.screenReaderMode?Z(this.screenRedearModeElement):J(this.screenRedearModeElement)),e.indentation&&(this.state.indentation?(this.indentationElement.textContent=this.state.indentation,Z(this.indentationElement)):J(this.indentationElement)),e.selectionStatus&&(this.state.selectionStatus&&!this.state.screenReaderMode?(this.selectionElement.textContent=this.state.selectionStatus,Z(this.selectionElement)):J(this.selectionElement)),e.encoding&&(this.state.encoding?(this.encodingElement.textContent=this.state.encoding,Z(this.encodingElement)):J(this.encodingElement)),e.EOL&&(this.state.EOL?(this.eolElement.textContent="\r\n"===this.state.EOL?le:ce,Z(this.eolElement)):J(this.eolElement)),e.mode&&(this.state.mode?(this.modeElement.textContent=this.state.mode,Z(this.modeElement)):J(this.modeElement)),e.metadata&&(this.state.metadata?(this.metadataElement.textContent=this.state.metadata,Z(this.metadataElement)):J(this.metadataElement))},
e.prototype.getSelectionLabel=function(e){return e&&e.selections?1===e.selections.length?e.charactersSelected?s.format(re,e.selections[0].positionLineNumber,e.selections[0].positionColumn,e.charactersSelected):s.format(oe,e.selections[0].positionLineNumber,e.selections[0].positionColumn):e.charactersSelected?s.format(se,e.selections.length,e.charactersSelected):e.selections.length>0?s.format(ae,e.selections.length):null:null},e.prototype.onModeClick=function(){var e=this.instantiationService.createInstance(ge,ge.ID,ge.LABEL);e.run().done(null,h.onUnexpectedError),e.dispose()},e.prototype.onIndentationClick=function(){var e=this.instantiationService.createInstance(ve,ve.ID,ve.LABEL);e.run().done(null,h.onUnexpectedError),e.dispose()},e.prototype.onScreenReaderModeClick=function(){var e=!this.screenReaderExplanation||!this.screenReaderExplanation.visible;this.screenReaderExplanation||(this.screenReaderExplanation=this.instantiationService.createInstance(be),this.toDispose.push(this.screenReaderExplanation)),
e?this.screenReaderExplanation.show(this.screenRedearModeElement):this.screenReaderExplanation.hide()},e.prototype.onSelectionClick=function(){this.quickOpenService.show(":")},e.prototype.onEOLClick=function(){var e=this.instantiationService.createInstance(me,me.ID,me.LABEL);e.run().done(null,h.onUnexpectedError),e.dispose()},e.prototype.onEncodingClick=function(){var e=this.instantiationService.createInstance(ye,ye.ID,ye.LABEL);e.run().done(null,h.onUnexpectedError),e.dispose()},e.prototype.onTabFocusModeClick=function(){M.TabFocus.setTabFocusMode(!1)},e.prototype.updateStatusBar=function(){var e=this,t=this.editorService.activeControl,n=t?G.getCodeEditor(t.getControl()):void 0;if(this.onScreenReaderModeChange(n),this.onSelectionChange(n),this.onModeChange(n),this.onEOLChange(n),this.onEncodingChange(t),this.onIndentationChange(n),this.onMetadataChange(t),y.dispose(this.activeEditorListeners),n)this.activeEditorListeners.push(n.onDidChangeConfiguration(function(t){
t.accessibilitySupport&&e.onScreenReaderModeChange(n)})),this.activeEditorListeners.push(n.onDidChangeCursorPosition(function(t){e.onSelectionChange(n)})),this.activeEditorListeners.push(n.onDidChangeModelLanguage(function(t){e.onModeChange(n)})),this.activeEditorListeners.push(n.onDidChangeModelContent(function(t){e.onEOLChange(n);for(var i=n.getSelections(),r=function(r){if(i.some(function(e){return R.Range.areIntersecting(e,t.changes[r].range)}))return e.onSelectionChange(n),"break"},o=0;o<t.changes.length;o++){if("break"===r(o))break}})),this.activeEditorListeners.push(n.onDidChangeModelOptions(function(t){e.onIndentationChange(n)}));else if(t instanceof E.BaseBinaryResourceEditor||t instanceof w.BinaryResourceDiffEditor){var i=[];if(t instanceof w.BinaryResourceDiffEditor){var r=t.getDetailsEditor();r instanceof E.BaseBinaryResourceEditor&&i.push(r);var o=t.getMasterEditor();o instanceof E.BaseBinaryResourceEditor&&i.push(o)}else i.push(t);i.forEach(function(n){
e.activeEditorListeners.push(n.onMetadataChanged(function(n){e.onMetadataChange(t)}))})}},e.prototype.onModeChange=function(e){var t={mode:null};if(e){var n=e.getModel();if(n){var i=n.getLanguageIdentifier().language;t={mode:this.modeService.getLanguageName(i)}}}this.updateState(t)},e.prototype.onIndentationChange=function(e){var t={indentation:null};if(e){var n=e.getModel();if(n){var r=n.getOptions();t.indentation=r.insertSpaces?i.localize(16,null,r.tabSize):i.localize(17,null,r.tabSize)}}this.updateState(t)},e.prototype.onMetadataChange=function(e){var t={metadata:null};(e instanceof E.BaseBinaryResourceEditor||e instanceof w.BinaryResourceDiffEditor)&&(t.metadata=e.getMetadata()),this.updateState(t)},e.prototype.onScreenReaderModeChange=function(e){var t=this,n=!1;if(e){if(2===g.getAccessibilitySupport()){"auto"===this.configurationService.getValue("editor").accessibilitySupport&&(this._promptedScreenReader||(this._promptedScreenReader=!0,setTimeout(function(){t.onScreenReaderModeClick()},100)))}
n=2===e.getConfiguration().accessibilitySupport}!1===n&&this.screenReaderExplanation&&this.screenReaderExplanation.visible&&this.screenReaderExplanation.hide(),this.updateState({screenReaderMode:n})},e.prototype.onSelectionChange=function(e){var t={};if(e){t.selections=e.getSelections()||[],t.charactersSelected=0;var n=e.getModel();if(n&&t.selections.forEach(function(e){t.charactersSelected+=n.getValueLengthInRange(e)}),1===t.selections.length){var i=e.getVisibleColumnFromPosition(e.getPosition()),r=t.selections[0].clone();r=new O.Selection(r.selectionStartLineNumber,r.selectionStartColumn,r.positionLineNumber,i),t.selections[0]=r}}this.updateState({selectionStatus:this.getSelectionLabel(t)})},e.prototype.onEOLChange=function(e){var t={EOL:null};if(e&&!e.getConfiguration().readOnly){var n=e.getModel();n&&(t.EOL=n.getEOL())}this.updateState(t)},e.prototype.onEncodingChange=function(e){if(!e||this.isActiveEditor(e)){var t={encoding:null};if(e&&(G.isCodeEditor(e.getControl())||G.isDiffEditor(e.getControl()))){
var n=X(e.input);if(n){var i=n.getEncoding(),r=k.SUPPORTED_ENCODINGS[i];t.encoding=r?r.labelShort:i}}this.updateState(t)}},e.prototype.onResourceEncodingChange=function(e){var t=this.editorService.activeControl;if(t){var n=m.toResource(t.input,{supportSideBySide:!0});if(n&&n.toString()===e.toString())return this.onEncodingChange(t)}},e.prototype.onTabFocusModeChange=function(){var e={tabFocusMode:M.TabFocus.getTabFocusMode()};this.updateState(e)},e.prototype.isActiveEditor=function(e){var t=this.editorService.activeControl;return t&&t===e},e=a([l(0,I.IEditorService),l(1,T.IQuickOpenService),l(2,D.IInstantiationService),l(3,b.IUntitledEditorService),l(4,A.IModeService),l(5,F.ITextFileService),l(6,x.IWorkspaceConfigurationService)],e)}();t.EditorStatus=pe;var fe=function(e){function t(n,r,o){var s=e.call(this,t.ID,i.localize(18,null,n))||this;return s.fileExtension=n,s.commandService=r,s.enabled=o.isEnabled(),s}return n(t,e),t.prototype.run=function(){
return this.commandService.executeCommand("workbench.extensions.action.showExtensionsForLanguage",this.fileExtension).then(function(){})},t.ID="workbench.action.showLanguageExtensions",t=a([l(1,P.ICommandService),l(2,N.IExtensionGalleryService)],t)}(p.Action);t.ShowLanguageExtensionsAction=fe;var ge=function(e){function t(t,n,i,r,o,s,a,c,l,u){var d=e.call(this,t,n)||this;return d.modeService=i,d.modelService=r,d.editorService=o,d.configurationService=s,d.quickOpenService=a,d.preferencesService=c,d.instantiationService=l,d.untitledEditorService=u,d}return n(t,e),t.prototype.run=function(){var e=this,t=G.getCodeEditor(this.editorService.activeTextEditorWidget);if(!t)return this.quickOpenService.pick([{label:i.localize(20,null)}]);var n=t.getModel(),r=m.toResource(this.editorService.activeEditor,{supportSideBySide:!0}),o=!!r;r.scheme!==q.Schemas.untitled||this.untitledEditorService.hasAssociatedFilePath(r)||(o=!1);var s,a;n&&(a=n.getLanguageIdentifier().language,s=this.modeService.getLanguageName(a))
;var l=this.modeService.getRegisteredLanguageNames().sort().map(function(t,n){var r;r=s===t?i.localize(21,null,e.modeService.getModeIdForLanguageName(t.toLowerCase())):i.localize(22,null,e.modeService.getModeIdForLanguageName(t.toLowerCase()));var o,a=e.modeService.getExtensions(t);if(a&&a.length)o=d.default.file(a[0]);else{var c=e.modeService.getFilenames(t);c&&c.length&&(o=d.default.file(c[0]))}return{label:t,resource:o,description:r}});o&&(l[0].separator={border:!0,label:i.localize(23,null)});var u,h,p;if(o){var f=c.extname(r.fsPath)||c.basename(r.fsPath);(p=this.instantiationService.createInstance(fe,f)).enabled&&l.unshift(p),h={label:i.localize(24,null,s)},l.unshift(h),u={label:i.localize(25,null,f)},l.unshift(u)}var g={label:i.localize(26,null)};return o&&l.unshift(g),this.quickOpenService.pick(l,{placeHolder:i.localize(27,null),matchOnDescription:!0}).then(function(t){if(t)if(t!==p)if(t!==u)if(t!==h){var i=e.editorService.activeEditor,o=e.editorService.activeTextEditorWidget,s=[];if(G.isCodeEditor(o)){
var c=o.getModel();c&&s.push(c)}else if(G.isDiffEditor(o)){var l=o.getModel();l&&(l.original&&s.push(l.original),l.modified&&s.push(l.modified))}var d;d=t===g?e.modeService.getOrCreateModeByFilenameOrFirstLine(m.toResource(i,{supportSideBySide:!0}).fsPath,n.getLineContent(1)):e.modeService.getOrCreateModeByLanguageName(t.label),s.forEach(function(t){e.modelService.setMode(t,d)})}else e.preferencesService.configureSettingsForLanguage(a);else e.configureFileAssociation(r);else p.run()})},t.prototype.configureFileAssociation=function(e){var t=this,n=c.extname(e.fsPath),o=c.basename(e.fsPath),s=this.modeService.getModeIdByFilenameOrFirstLine(o),a=this.modeService.getRegisteredLanguageNames().sort().map(function(e,n){var r=t.modeService.getModeIdForLanguageName(e.toLowerCase());return{id:r,label:e,description:r===s?i.localize(28,null):void 0}});r.TPromise.timeout(50).done(function(){t.quickOpenService.pick(a,{placeHolder:i.localize(29,null,n||o)}).done(function(e){if(e){
var i=t.configurationService.inspect(k.FILES_ASSOCIATIONS_CONFIG),r=void 0;r=n&&"."!==o[0]?"*"+n:o;var s=K.ConfigurationTarget.USER;i.workspace&&i.workspace[r]&&(s=K.ConfigurationTarget.WORKSPACE);var a=U.deepClone(s===K.ConfigurationTarget.WORKSPACE?i.workspace:i.user);a||(a=Object.create(null)),a[r]=e.id,t.configurationService.updateValue(k.FILES_ASSOCIATIONS_CONFIG,a,s)}})})},t.ID="workbench.action.editor.changeLanguageMode",t.LABEL=i.localize(19,null),t=a([l(2,A.IModeService),l(3,L.IModelService),l(4,I.IEditorService),l(5,x.IWorkspaceConfigurationService),l(6,T.IQuickOpenService),l(7,Y.IPreferencesService),l(8,D.IInstantiationService),l(9,b.IUntitledEditorService)],t)}(p.Action);t.ChangeModeAction=ge;var ve=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.editorService=i,o.quickOpenService=r,o}return n(t,e),t.prototype.run=function(){var e=G.getCodeEditor(this.editorService.activeTextEditorWidget);if(!e)return this.quickOpenService.pick([{label:i.localize(31,null)}])
;if(!ee(e))return this.quickOpenService.pick([{label:i.localize(32,null)}]);var t=[e.getAction(C.IndentUsingSpaces.ID),e.getAction(C.IndentUsingTabs.ID),e.getAction(C.DetectIndentation.ID),e.getAction(C.IndentationToSpacesAction.ID),e.getAction(C.IndentationToTabsAction.ID),e.getAction(_.TrimTrailingWhitespaceAction.ID)].map(function(t){return{id:t.id,label:t.label,detail:f.language===f.LANGUAGE_DEFAULT?null:t.alias,run:function(){e.focus(),t.run()}}});return t[0].separator={label:i.localize(33,null)},t[3].separator={label:i.localize(34,null),border:!0},this.quickOpenService.pick(t,{placeHolder:i.localize(35,null),matchOnDetail:!0}).then(function(e){return e&&e.run()})},t.ID="workbench.action.editor.changeIndentation",t.LABEL=i.localize(30,null),t=a([l(2,I.IEditorService),l(3,T.IQuickOpenService)],t)}(p.Action),me=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.editorService=i,o.quickOpenService=r,o}return n(t,e),t.prototype.run=function(){
var e=this,t=G.getCodeEditor(this.editorService.activeTextEditorWidget);if(!t)return this.quickOpenService.pick([{label:i.localize(37,null)}]);if(!ee(t))return this.quickOpenService.pick([{label:i.localize(38,null)}]);var n=t.getModel(),r=[{label:ce,eol:S.EndOfLineSequence.LF},{label:le,eol:S.EndOfLineSequence.CRLF}],o=n&&"\n"===n.getEOL()?0:1;return this.quickOpenService.pick(r,{placeHolder:i.localize(39,null),autoFocus:{autoFocusIndex:o}}).then(function(t){if(t){var n=G.getCodeEditor(e.editorService.activeTextEditorWidget);if(n&&ee(n)){n.getModel().pushEOL(t.eol)}}})},t.ID="workbench.action.editor.changeEOL",t.LABEL=i.localize(36,null),t=a([l(2,I.IEditorService),l(3,T.IQuickOpenService)],t)}(p.Action);t.ChangeEOLAction=me;var ye=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n)||this;return a.editorService=i,a.quickOpenService=r,a.textResourceConfigurationService=o,a.fileService=s,a}return n(t,e),t.prototype.run=function(){var e=this
;if(!G.getCodeEditor(this.editorService.activeTextEditorWidget))return this.quickOpenService.pick([{label:i.localize(41,null)}]);var t=this.editorService.activeControl,n=X(t.input);if(!n)return this.quickOpenService.pick([{label:i.localize(42,null)}]);var o,s;return f.language===f.LANGUAGE_DEFAULT?(o={label:i.localize(43,null)},s={label:i.localize(44,null)}):(o={label:i.localize(45,null),detail:"Save with Encoding"},s={label:i.localize(46,null),detail:"Reopen with Encoding"}),(n instanceof v.UntitledEditorInput?r.TPromise.as(o):function(e){return e&&ee(G.getCodeEditor(e.getControl()))}(t)?this.quickOpenService.pick([s,o],{placeHolder:i.localize(47,null),matchOnDetail:!0}):r.TPromise.as(s)).then(function(o){if(o){var a=m.toResource(t.input,{supportSideBySide:!0});return r.TPromise.timeout(50).then(function(){return a&&e.fileService.canHandleResource(a)?e.fileService.resolveContent(a,{autoGuessEncoding:!0,acceptTextOnly:!0}).then(function(e){return e.encoding},function(e){return null}):r.TPromise.as(null)
}).then(function(r){var c,l,u=o===s,d=e.textResourceConfigurationService.getValue(a,"files.encoding"),h=Object.keys(k.SUPPORTED_ENCODINGS).sort(function(e,t){return e===d?-1:t===d?1:k.SUPPORTED_ENCODINGS[e].order-k.SUPPORTED_ENCODINGS[t].order}).filter(function(e){return(e!==r||r===d)&&(!u||!k.SUPPORTED_ENCODINGS[e].encodeOnly)}).map(function(e,t){return e===n.getEncoding()?c=t:k.SUPPORTED_ENCODINGS[e].alias===n.getEncoding()&&(l=t),{id:e,label:k.SUPPORTED_ENCODINGS[e].labelLong,description:e}});return r&&d!==r&&k.SUPPORTED_ENCODINGS[r]&&(h[0].separator={border:!0},h.unshift({id:r,label:k.SUPPORTED_ENCODINGS[r].labelLong,description:i.localize(48,null)})),e.quickOpenService.pick(h,{placeHolder:u?i.localize(49,null):i.localize(50,null),autoFocus:{autoFocusIndex:"number"==typeof c?c:"number"==typeof l?l:void 0}}).then(function(i){i&&(t=e.editorService.activeControl,(n=X(t.input))&&n.getEncoding()!==i.id&&n.setEncoding(i.id,u?m.EncodingMode.Decode:m.EncodingMode.Encode))})})}})},
t.ID="workbench.action.editor.changeEncoding",t.LABEL=i.localize(40,null),t=a([l(2,I.IEditorService),l(3,T.IQuickOpenService),l(4,W.ITextResourceConfigurationService),l(5,k.IFileService)],t)}(p.Action);t.ChangeEncodingAction=ye;var be=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.contextViewService=n,r.configurationService=i,r}return n(t,e),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},enumerable:!0,configurable:!0}),t.prototype.updateStyles=function(){if(this.container){var e=this.getColor(H.editorWidgetBackground);this.container.style.backgroundColor=e?e.toString():null;var t=this.getColor(H.widgetShadow);this.container.style.boxShadow=t?"0 0px 8px "+t:null;var n=this.getColor(H.contrastBorder);this.container.style.border=n?"1px solid "+n:null;var i=this.getColor(H.foreground);this.hrElement.style.backgroundColor=i?i.toString():null}},t.prototype.show=function(e){var t=this;this._visible=!0,this.contextViewService.showContextView({getAnchor:function(){
var t=o.getDomNodePagePosition(e);return{x:t.left,y:t.top-9,width:t.width,height:t.height}},render:function(e){return t.renderContents(e)},onDOMEvent:function(e,t){},onHide:function(){t._visible=!1}})},t.prototype.hide=function(){this.contextViewService.hideContextView()},t.prototype.renderContents=function(e){var t=this,n=[];this.container=o.$("div.screen-reader-detected-explanation",{"aria-hidden":"true"});var r=o.$("h2.title",{},i.localize(51,null));this.container.appendChild(r);var s=o.$("div.cancel");n.push(o.addDisposableListener(s,"click",function(){t.contextViewService.hideContextView()})),n.push(o.addDisposableListener(s,"mouseover",function(){var e;switch(t.themeService.getTheme().type){case"light":e=.1;break;case"dark":e=.2}e&&(s.style.backgroundColor=t.getColor(H.editorWidgetBackground,function(t,n){return H.darken(t,e)(n)}))})),n.push(o.addDisposableListener(s,"mouseout",function(){s.style.backgroundColor=null})),this.container.appendChild(s);var a=o.$("p.question",{},i.localize(52,null))
;this.container.appendChild(a);var c=o.$("div.buttons");this.container.appendChild(c);var l=new j.Button(c);l.label=i.localize(53,null),n.push(z.attachButtonStyler(l,this.themeService)),n.push(l.onDidClick(function(e){t.configurationService.updateValue("editor.accessibilitySupport","on",K.ConfigurationTarget.USER),t.contextViewService.hideContextView()}));var u=new j.Button(c);u.label=i.localize(54,null),n.push(z.attachButtonStyler(u,this.themeService)),n.push(u.onDidClick(function(e){t.configurationService.updateValue("editor.accessibilitySupport","off",K.ConfigurationTarget.USER),t.contextViewService.hideContextView()}));var d=o.$("div");d.style.clear="both",this.container.appendChild(d);var h=o.$("br");this.container.appendChild(h),this.hrElement=o.$("hr"),this.container.appendChild(this.hrElement);var p=o.$("p.body1",{},i.localize(55,null));this.container.appendChild(p);var f=o.$("p.body2",{},i.localize(56,null));return this.container.appendChild(f),e.appendChild(this.container),this.updateStyles(),{
dispose:function(){return y.dispose(n)}}},t=a([l(0,B.IThemeService),l(1,V.IContextViewService),l(2,x.IWorkspaceConfigurationService)],t)}($.Themable)}),define(e[1471],t([1,0,16,1501,10,86,172,147,40,351,374,211,292,161,6,495,48,422,1470,56,146,31,112,73,291,187,21,164,52,15,11,518,43]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";function N(t,n,i,r){w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:t.id,title:t.title,iconLocation:{dark:o.default.parse(e.toUrl("vs/workbench/browser/parts/editor/media/"+t.iconDark)),light:o.default.parse(e.toUrl("vs/workbench/browser/parts/editor/media/"+t.iconLight))}},alt:{id:n.id,title:n.title,iconLocation:{dark:o.default.parse(e.toUrl("vs/workbench/browser/parts/editor/media/"+n.iconDark)),light:o.default.parse(e.toUrl("vs/workbench/browser/parts/editor/media/"+n.iconLight))}},group:"navigation",when:i,order:r})}Object.defineProperty(t,"__esModule",{value:!0}),
i.Registry.as(u.Extensions.Editors).registerEditor(new u.EditorDescriptor(h.TextResourceEditor,h.TextResourceEditor.ID,r.localize(0,null)),[new I.SyncDescriptor(g.UntitledEditorInput),new I.SyncDescriptor(v.ResourceEditorInput)]),i.Registry.as(u.Extensions.Editors).registerEditor(new u.EditorDescriptor(y.TextDiffEditor,y.TextDiffEditor.ID,r.localize(1,null)),[new I.SyncDescriptor(f.DiffEditorInput)]),i.Registry.as(u.Extensions.Editors).registerEditor(new u.EditorDescriptor(S.BinaryResourceDiffEditor,S.BinaryResourceDiffEditor.ID,r.localize(2,null)),[new I.SyncDescriptor(f.DiffEditorInput)]),i.Registry.as(u.Extensions.Editors).registerEditor(new u.EditorDescriptor(p.SideBySideEditor,p.SideBySideEditor.ID,r.localize(3,null)),[new I.SyncDescriptor(d.SideBySideEditorInput)]);var F=function(){function e(e){this.textFileService=e}return e.prototype.serialize=function(e){if(!this.textFileService.isHotExitEnabled)return null;var t=e,n=t.getResource();t.hasAssociatedFilePath&&(n=n.with({scheme:P.Schemas.file}))
;var i={resource:n.toString(),resourceJSON:n.toJSON(),modeId:t.getModeId(),encoding:t.getEncoding()};return JSON.stringify(i)},e.prototype.deserialize=function(e,t){return e.invokeFunction(function(e){var n=JSON.parse(t),i=n.resourceJSON?o.default.revive(n.resourceJSON):o.default.parse(n.resource),r=i.scheme===P.Schemas.file?i.fsPath:void 0,s=n.modeId,a=n.encoding;return e.get(D.IEditorService).createInput({resource:i,filePath:r,language:s,encoding:a})})},e=a([l(0,b.ITextFileService)],e)}();i.Registry.as(d.Extensions.EditorInputFactories).registerEditorInputFactory(g.UntitledEditorInput.ID,F);var W=function(){function e(){}return e.prototype.serialize=function(e){var t=e;if(t.details&&t.master){var n=i.Registry.as(d.Extensions.EditorInputFactories),r=n.getEditorInputFactory(t.details.getTypeId()),o=n.getEditorInputFactory(t.master.getTypeId());if(r&&o){var s=r.serialize(t.details),a=o.serialize(t.master);if(s&&a)return JSON.stringify({name:t.getName(),description:t.getDescription(),detailsSerialized:s,
masterSerialized:a,detailsTypeId:t.details.getTypeId(),masterTypeId:t.master.getTypeId()})}}return null},e.prototype.deserialize=function(e,t){var n=JSON.parse(t),r=i.Registry.as(d.Extensions.EditorInputFactories),o=r.getEditorInputFactory(n.detailsTypeId),s=r.getEditorInputFactory(n.masterTypeId);if(o&&s){var a=o.deserialize(e,n.detailsSerialized),c=s.deserialize(e,n.masterSerialized);if(a&&c)return new d.SideBySideEditorInput(n.name,n.description,a,c)}return null},e}();i.Registry.as(d.Extensions.EditorInputFactories).registerEditorInputFactory(d.SideBySideEditorInput.ID,W);i.Registry.as(c.Extensions.Statusbar).registerStatusbarItem(new c.StatusbarItemDescriptor(_.EditorStatus,c.StatusbarAlignment.RIGHT,100));var B=i.Registry.as(C.Extensions.WorkbenchActions);B.registerWorkbenchAction(new w.SyncActionDescriptor(_.ChangeModeAction,_.ChangeModeAction.ID,_.ChangeModeAction.LABEL,{primary:T.KeyChord(2089,43)}),"Change Language Mode"),
B.registerWorkbenchAction(new w.SyncActionDescriptor(_.ChangeEOLAction,_.ChangeEOLAction.ID,_.ChangeEOLAction.LABEL),"Change End of Line Sequence"),B.registerWorkbenchAction(new w.SyncActionDescriptor(_.ChangeEncodingAction,_.ChangeEncodingAction.ID,_.ChangeEncodingAction.LABEL),"Change File Encoding");var V=function(e){function t(t){var n=e.call(this)||this;return n.instantiationService=t,n}return n(t,e),t.prototype.hasActions=function(e){return!!this.getEntry(e)},t.prototype.getActions=function(e){var t=[];return this.getEntry(e)&&(this.openToSideActionInstance?this.openToSideActionInstance.updateClass():this.openToSideActionInstance=this.instantiationService.createInstance(x.OpenToSideFromQuickOpenAction),t.push(this.openToSideActionInstance)),t},t.prototype.getEntry=function(e){return e&&e.element?x.toEditorQuickOpenEntry(e.element):null},t=a([l(0,m.IInstantiationService)],t)}(E.ActionBarContributor);t.QuickOpenActionContributor=V
;i.Registry.as(E.Extensions.Actionbar).registerActionBarContributor(E.Scope.VIEWER,V);var z=R.ContextKeyExpr.and(A.inQuickOpenContext,R.ContextKeyExpr.has("inEditorsPicker"));i.Registry.as(s.Extensions.Quickopen).registerQuickOpenHandler(new s.QuickOpenHandlerDescriptor(M.ActiveEditorGroupPicker,M.ActiveEditorGroupPicker.ID,k.NAVIGATE_IN_ACTIVE_GROUP_PREFIX,"inEditorsPicker",[{prefix:k.NAVIGATE_IN_ACTIVE_GROUP_PREFIX,needsEditor:!1,description:r.localize(4,null)}])),i.Registry.as(s.Extensions.Quickopen).registerQuickOpenHandler(new s.QuickOpenHandlerDescriptor(M.AllEditorsPicker,M.AllEditorsPicker.ID,k.NAVIGATE_ALL_EDITORS_GROUP_PREFIX,"inEditorsPicker",[{prefix:k.NAVIGATE_ALL_EDITORS_GROUP_PREFIX,needsEditor:!1,description:r.localize(5,null)}]));var H=r.localize(6,null);B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenNextEditorInGroup,x.OpenNextEditorInGroup.ID,x.OpenNextEditorInGroup.LABEL),"View: Open Next Editor in Group",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenPreviousEditorInGroup,x.OpenPreviousEditorInGroup.ID,x.OpenPreviousEditorInGroup.LABEL),"View: Open Previous Editor in Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenLastEditorInGroup,x.OpenLastEditorInGroup.ID,x.OpenLastEditorInGroup.LABEL,{primary:533,secondary:[2078],mac:{primary:277,secondary:[2078]}}),"View: Open Last Editor in Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenFirstEditorInGroup,x.OpenFirstEditorInGroup.ID,x.OpenFirstEditorInGroup.LABEL),"View: Open First Editor in Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenNextRecentlyUsedEditorAction,x.OpenNextRecentlyUsedEditorAction.ID,x.OpenNextRecentlyUsedEditorAction.LABEL),"View: Open Next Recently Used Editor",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenPreviousRecentlyUsedEditorAction,x.OpenPreviousRecentlyUsedEditorAction.ID,x.OpenPreviousRecentlyUsedEditorAction.LABEL),"View: Open Previous Recently Used Editor",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.ShowAllEditorsAction,x.ShowAllEditorsAction.ID,x.ShowAllEditorsAction.LABEL,{primary:T.KeyChord(2089,2094),mac:{primary:2562}}),"View: Show All Editors",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.ShowEditorsInActiveGroupAction,x.ShowEditorsInActiveGroupAction.ID,x.ShowEditorsInActiveGroupAction.LABEL),"View: Show Editors in Active Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenNextEditor,x.OpenNextEditor.ID,x.OpenNextEditor.LABEL,{primary:2060,mac:{primary:2577,secondary:[3161]}}),"View: Open Next Editor",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenPreviousEditor,x.OpenPreviousEditor.ID,x.OpenPreviousEditor.LABEL,{primary:2059,mac:{primary:2575,secondary:[3159]}
}),"View: Open Previous Editor",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.ReopenClosedEditorAction,x.ReopenClosedEditorAction.ID,x.ReopenClosedEditorAction.LABEL,{primary:3122}),"View: Reopen Closed Editor",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.ClearRecentFilesAction,x.ClearRecentFilesAction.ID,x.ClearRecentFilesAction.LABEL),"File: Clear Recently Opened",r.localize(7,null)),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.CloseAllEditorsAction,x.CloseAllEditorsAction.ID,x.CloseAllEditorsAction.LABEL,{primary:T.KeyChord(2089,2101)}),"View: Close All Editors",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.CloseAllEditorGroupsAction,x.CloseAllEditorGroupsAction.ID,x.CloseAllEditorGroupsAction.LABEL,{primary:T.KeyChord(2089,3125)}),"View: Close All Editor Groups",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.CloseLeftEditorsInGroupAction,x.CloseLeftEditorsInGroupAction.ID,x.CloseLeftEditorsInGroupAction.LABEL),"View: Close Editors in Group to the Left",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.CloseEditorsInOtherGroupsAction,x.CloseEditorsInOtherGroupsAction.ID,x.CloseEditorsInOtherGroupsAction.LABEL),"View: Close Editors in Other Groups",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.SplitEditorAction,x.SplitEditorAction.ID,x.SplitEditorAction.LABEL,{primary:2136}),"View: Split Editor",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.SplitEditorOrthogonalAction,x.SplitEditorOrthogonalAction.ID,x.SplitEditorOrthogonalAction.LABEL,{primary:T.KeyChord(2089,2136)}),"View: Split Editor Orthogonal",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.SplitEditorLeftAction,x.SplitEditorLeftAction.ID,x.SplitEditorLeftAction.LABEL),"View: Split Editor Left",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.SplitEditorRightAction,x.SplitEditorRightAction.ID,x.SplitEditorRightAction.LABEL),"View: Split Editor Right",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.SplitEditorUpAction,x.SplitEditorUpAction.ID,x.SplitEditorUpAction.LABEL),"Split Editor Up",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.SplitEditorDownAction,x.SplitEditorDownAction.ID,x.SplitEditorDownAction.LABEL),"View: Split Editor Down",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.JoinTwoGroupsAction,x.JoinTwoGroupsAction.ID,x.JoinTwoGroupsAction.LABEL),"View: Join Editors of Two Groups",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.JoinAllGroupsAction,x.JoinAllGroupsAction.ID,x.JoinAllGroupsAction.LABEL),"View: Join Editors of All Groups",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NavigateBetweenGroupsAction,x.NavigateBetweenGroupsAction.ID,x.NavigateBetweenGroupsAction.LABEL),"View: Navigate Between Editor Groups",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.ResetGroupSizesAction,x.ResetGroupSizesAction.ID,x.ResetGroupSizesAction.LABEL),"View: Reset Editor Group Sizes",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MaximizeGroupAction,x.MaximizeGroupAction.ID,x.MaximizeGroupAction.LABEL),"View: Maximize Editor Group and Hide Sidebar",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MinimizeOtherGroupsAction,x.MinimizeOtherGroupsAction.ID,x.MinimizeOtherGroupsAction.LABEL),"View: Maximize Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorLeftInGroupAction,x.MoveEditorLeftInGroupAction.ID,x.MoveEditorLeftInGroupAction.LABEL,{primary:3083,mac:{primary:T.KeyChord(2089,3087)}}),"View: Move Editor Left",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorRightInGroupAction,x.MoveEditorRightInGroupAction.ID,x.MoveEditorRightInGroupAction.LABEL,{primary:3084,mac:{primary:T.KeyChord(2089,3089)}}),"View: Move Editor Right",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveGroupLeftAction,x.MoveGroupLeftAction.ID,x.MoveGroupLeftAction.LABEL,{primary:T.KeyChord(2089,15)}),"View: Move Editor Group Left",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveGroupRightAction,x.MoveGroupRightAction.ID,x.MoveGroupRightAction.LABEL,{primary:T.KeyChord(2089,17)}),"View: Move Editor Group Right",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveGroupUpAction,x.MoveGroupUpAction.ID,x.MoveGroupUpAction.LABEL,{primary:T.KeyChord(2089,16)}),"View: Move Editor Group Up",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveGroupDownAction,x.MoveGroupDownAction.ID,x.MoveGroupDownAction.LABEL,{primary:T.KeyChord(2089,18)}),"View: Move Editor Group Down",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToPreviousGroupAction,x.MoveEditorToPreviousGroupAction.ID,x.MoveEditorToPreviousGroupAction.LABEL,{primary:2575,mac:{primary:2319}}),"View: Move Editor into Previous Group",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToNextGroupAction,x.MoveEditorToNextGroupAction.ID,x.MoveEditorToNextGroupAction.LABEL,{primary:2577,mac:{primary:2321}}),"View: Move Editor into Next Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToFirstGroupAction,x.MoveEditorToFirstGroupAction.ID,x.MoveEditorToFirstGroupAction.LABEL,{primary:1558,mac:{primary:2326}}),"View: Move Editor into First Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToLastGroupAction,x.MoveEditorToLastGroupAction.ID,x.MoveEditorToLastGroupAction.LABEL,{primary:1566,mac:{primary:2334}}),"View: Move Editor into Last Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToLeftGroupAction,x.MoveEditorToLeftGroupAction.ID,x.MoveEditorToLeftGroupAction.LABEL),"View: Move Editor into Left Group",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToRightGroupAction,x.MoveEditorToRightGroupAction.ID,x.MoveEditorToRightGroupAction.LABEL),"View: Move Editor into Right Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToAboveGroupAction,x.MoveEditorToAboveGroupAction.ID,x.MoveEditorToAboveGroupAction.LABEL),"View: Move Editor into Above Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.MoveEditorToBelowGroupAction,x.MoveEditorToBelowGroupAction.ID,x.MoveEditorToBelowGroupAction.LABEL),"View: Move Editor into Below Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusActiveGroupAction,x.FocusActiveGroupAction.ID,x.FocusActiveGroupAction.LABEL),"View: Focus Active Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusFirstGroupAction,x.FocusFirstGroupAction.ID,x.FocusFirstGroupAction.LABEL,{primary:2070}),"View: Focus First Editor Group",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusLastGroupAction,x.FocusLastGroupAction.ID,x.FocusLastGroupAction.LABEL),"View: Focus Last Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusPreviousGroup,x.FocusPreviousGroup.ID,x.FocusPreviousGroup.LABEL),"View: Focus Previous Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusNextGroup,x.FocusNextGroup.ID,x.FocusNextGroup.LABEL),"View: Focus Next Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusLeftGroup,x.FocusLeftGroup.ID,x.FocusLeftGroup.LABEL,{primary:T.KeyChord(2089,2063)}),"View: Focus Left Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusRightGroup,x.FocusRightGroup.ID,x.FocusRightGroup.LABEL,{primary:T.KeyChord(2089,2065)}),"View: Focus Right Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusAboveGroup,x.FocusAboveGroup.ID,x.FocusAboveGroup.LABEL,{primary:T.KeyChord(2089,2064)
}),"View: Focus Above Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.FocusBelowGroup,x.FocusBelowGroup.ID,x.FocusBelowGroup.LABEL,{primary:T.KeyChord(2089,2066)}),"View: Focus Below Editor Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NewEditorGroupLeftAction,x.NewEditorGroupLeftAction.ID,x.NewEditorGroupLeftAction.LABEL),"View: New Editor Group to the Left",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NewEditorGroupRightAction,x.NewEditorGroupRightAction.ID,x.NewEditorGroupRightAction.LABEL),"View: New Editor Group to the Right",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NewEditorGroupAboveAction,x.NewEditorGroupAboveAction.ID,x.NewEditorGroupAboveAction.LABEL),"View: New Editor Group Above",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NewEditorGroupBelowAction,x.NewEditorGroupBelowAction.ID,x.NewEditorGroupBelowAction.LABEL),"View: New Editor Group Below",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NavigateForwardAction,x.NavigateForwardAction.ID,x.NavigateForwardAction.LABEL,{primary:null,win:{primary:529},mac:{primary:1363},linux:{primary:3155}}),"Go Forward"),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NavigateBackwardsAction,x.NavigateBackwardsAction.ID,x.NavigateBackwardsAction.LABEL,{primary:null,win:{primary:527},mac:{primary:339},linux:{primary:2643}}),"Go Back"),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.NavigateLastAction,x.NavigateLastAction.ID,x.NavigateLastAction.LABEL),"Go Last"),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenPreviousEditorFromHistoryAction,x.OpenPreviousEditorFromHistoryAction.ID,x.OpenPreviousEditorFromHistoryAction.LABEL),"Open Previous Editor from History"),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.ClearEditorHistoryAction,x.ClearEditorHistoryAction.ID,x.ClearEditorHistoryAction.LABEL),"Clear Editor History"),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.RevertAndCloseEditorAction,x.RevertAndCloseEditorAction.ID,x.RevertAndCloseEditorAction.LABEL),"View: Revert and Close Editor",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutSingleAction,x.EditorLayoutSingleAction.ID,x.EditorLayoutSingleAction.LABEL),"View: Single Column Editor Layout",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutTwoColumnsAction,x.EditorLayoutTwoColumnsAction.ID,x.EditorLayoutTwoColumnsAction.LABEL),"View: Two Columns Editor Layout",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutThreeColumnsAction,x.EditorLayoutThreeColumnsAction.ID,x.EditorLayoutThreeColumnsAction.LABEL),"View: Three Columns Editor Layout",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutTwoRowsAction,x.EditorLayoutTwoRowsAction.ID,x.EditorLayoutTwoRowsAction.LABEL),"View: Two Rows Editor Layout",H),
B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutThreeRowsAction,x.EditorLayoutThreeRowsAction.ID,x.EditorLayoutThreeRowsAction.LABEL),"View: Three Rows Editor Layout",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutTwoByTwoGridAction,x.EditorLayoutTwoByTwoGridAction.ID,x.EditorLayoutTwoByTwoGridAction.LABEL),"View: Grid Editor Layout (2x2)",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutTwoColumnsRightAction,x.EditorLayoutTwoColumnsRightAction.ID,x.EditorLayoutTwoColumnsRightAction.LABEL),"View: Two Columns Right Editor Layout",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.EditorLayoutTwoColumnsBottomAction,x.EditorLayoutTwoColumnsBottomAction.ID,x.EditorLayoutTwoColumnsBottomAction.LABEL),"View: Two Columns Bottom Editor Layout",H);var K={primary:2050,mac:{primary:258}},U={primary:3074,mac:{primary:1282}}
;B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenNextRecentlyUsedEditorInGroupAction,x.OpenNextRecentlyUsedEditorInGroupAction.ID,x.OpenNextRecentlyUsedEditorInGroupAction.LABEL,K),"View: Open Next Recently Used Editor in Group",H),B.registerWorkbenchAction(new w.SyncActionDescriptor(x.OpenPreviousRecentlyUsedEditorInGroupAction,x.OpenPreviousRecentlyUsedEditorInGroupAction.ID,x.OpenPreviousRecentlyUsedEditorInGroupAction.LABEL,U),"View: Open Previous Recently Used Editor in Group",H);L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigateNextInEditorPicker",weight:L.KeybindingsRegistry.WEIGHT.workbenchContrib(50),handler:A.getQuickNavigateHandler("workbench.action.quickOpenNavigateNextInEditorPicker",!0),when:z,primary:K.primary,mac:K.mac});L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigatePreviousInEditorPicker",weight:L.KeybindingsRegistry.WEIGHT.workbenchContrib(50),
handler:A.getQuickNavigateHandler("workbench.action.quickOpenNavigatePreviousInEditorPicker",!1),when:z,primary:U.primary,mac:U.mac}),k.setup(),O.isMacintosh&&(w.MenuRegistry.appendMenuItem(w.MenuId.TouchBarContext,{command:{id:x.NavigateBackwardsAction.ID,title:x.NavigateBackwardsAction.LABEL,iconLocation:{dark:o.default.parse(e.toUrl("vs/workbench/browser/parts/editor/media/back-tb.png"))}},group:"navigation"}),w.MenuRegistry.appendMenuItem(w.MenuId.TouchBarContext,{command:{id:x.NavigateForwardAction.ID,title:x.NavigateForwardAction.LABEL,iconLocation:{dark:o.default.parse(e.toUrl("vs/workbench/browser/parts/editor/media/forward-tb.png"))}},group:"navigation"})),w.MenuRegistry.appendMenuItem(w.MenuId.EmptyEditorGroupContext,{command:{id:k.SPLIT_EDITOR_UP,title:r.localize(8,null)},group:"2_split",order:10}),w.MenuRegistry.appendMenuItem(w.MenuId.EmptyEditorGroupContext,{command:{id:k.SPLIT_EDITOR_DOWN,title:r.localize(9,null)},group:"2_split",order:20}),
w.MenuRegistry.appendMenuItem(w.MenuId.EmptyEditorGroupContext,{command:{id:k.SPLIT_EDITOR_LEFT,title:r.localize(10,null)},group:"2_split",order:30}),w.MenuRegistry.appendMenuItem(w.MenuId.EmptyEditorGroupContext,{command:{id:k.SPLIT_EDITOR_RIGHT,title:r.localize(11,null)},group:"2_split",order:40}),w.MenuRegistry.appendMenuItem(w.MenuId.EmptyEditorGroupContext,{command:{id:k.CLOSE_EDITOR_GROUP_COMMAND_ID,title:r.localize(12,null)},group:"3_close",order:10,when:R.ContextKeyExpr.has("multipleEditorGroups")}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.CLOSE_EDITOR_COMMAND_ID,title:r.localize(13,null)},group:"1_close",order:10}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(14,null)},group:"1_close",order:20}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,title:r.localize(15,null)},group:"1_close",order:30,
when:R.ContextKeyExpr.has("config.workbench.editor.showTabs")}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.CLOSE_SAVED_EDITORS_COMMAND_ID,title:r.localize(16,null)},group:"1_close",order:40}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(17,null)},group:"1_close",order:50}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.KEEP_EDITOR_COMMAND_ID,title:r.localize(18,null)},group:"3_preview",order:10,when:R.ContextKeyExpr.has("config.workbench.editor.enablePreview")}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.SPLIT_EDITOR_UP,title:r.localize(19,null)},group:"5_split",order:10}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.SPLIT_EDITOR_DOWN,title:r.localize(20,null)},group:"5_split",order:20}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.SPLIT_EDITOR_LEFT,title:r.localize(21,null)},group:"5_split",
order:30}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitleContext,{command:{id:k.SPLIT_EDITOR_RIGHT,title:r.localize(22,null)},group:"5_split",order:40}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:k.TOGGLE_DIFF_INLINE_MODE,title:r.localize(23,null)},group:"1_diff",order:10,when:R.ContextKeyExpr.has("isInDiffEditor")}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:k.SHOW_EDITORS_IN_GROUP,title:r.localize(24,null)},group:"3_open",order:10,when:R.ContextKeyExpr.has("config.workbench.editor.showTabs")}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:k.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(25,null)},group:"5_close",order:10,when:R.ContextKeyExpr.has("config.workbench.editor.showTabs")}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:k.CLOSE_SAVED_EDITORS_COMMAND_ID,title:r.localize(26,null)},group:"5_close",order:20,when:R.ContextKeyExpr.has("config.workbench.editor.showTabs")}),N({id:x.SplitEditorAction.ID,
title:r.localize(27,null),iconDark:"split-editor-horizontal-inverse.svg",iconLight:"split-editor-horizontal.svg"},{id:k.SPLIT_EDITOR_DOWN,title:r.localize(28,null),iconDark:"split-editor-vertical-inverse.svg",iconLight:"split-editor-vertical.svg"},R.ContextKeyExpr.not("splitEditorsVertically"),1e5),N({id:x.SplitEditorAction.ID,title:r.localize(29,null),iconDark:"split-editor-vertical-inverse.svg",iconLight:"split-editor-vertical.svg"},{id:k.SPLIT_EDITOR_RIGHT,title:r.localize(30,null),iconDark:"split-editor-horizontal-inverse.svg",iconLight:"split-editor-horizontal.svg"},R.ContextKeyExpr.has("splitEditorsVertically"),1e5),N({id:k.CLOSE_EDITOR_COMMAND_ID,title:r.localize(31,null),iconDark:"close-big-inverse-alt.svg",iconLight:"close-big-alt.svg"},{id:k.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(32,null),iconDark:"closeall-editors-inverse.svg",iconLight:"closeall-editors.svg"
},R.ContextKeyExpr.and(R.ContextKeyExpr.not("config.workbench.editor.showTabs"),R.ContextKeyExpr.not("groupActiveEditorDirty")),1e6),N({id:k.CLOSE_EDITOR_COMMAND_ID,title:r.localize(33,null),iconDark:"close-dirty-inverse-alt.svg",iconLight:"close-dirty-alt.svg"},{id:k.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(34,null),iconDark:"closeall-editors-inverse.svg",iconLight:"closeall-editors.svg"},R.ContextKeyExpr.and(R.ContextKeyExpr.not("config.workbench.editor.showTabs"),R.ContextKeyExpr.has("groupActiveEditorDirty")),1e6),w.MenuRegistry.appendMenuItem(w.MenuId.CommandPalette,{command:{id:k.KEEP_EDITOR_COMMAND_ID,title:r.localize(35,null),category:H},when:R.ContextKeyExpr.has("config.workbench.editor.enablePreview")}),w.MenuRegistry.appendMenuItem(w.MenuId.CommandPalette,{command:{id:k.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(36,null),category:H}}),w.MenuRegistry.appendMenuItem(w.MenuId.CommandPalette,{command:{id:k.CLOSE_SAVED_EDITORS_COMMAND_ID,title:r.localize(37,null),category:H}}),
w.MenuRegistry.appendMenuItem(w.MenuId.CommandPalette,{command:{id:k.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:r.localize(38,null),category:H}}),w.MenuRegistry.appendMenuItem(w.MenuId.CommandPalette,{command:{id:k.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,title:r.localize(39,null),category:H}})}),define(e[519],t([1,0,1535,146,4,124,20,40,41,346,35,82,28,6,64,37,15,5,143,31,165,12,69,45,22,8,49,26,176,182,839]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var O=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,h,p){var f=e.call(this,h)||this;return f.accessor=n,f.group=i,f.contextMenuService=r,f.instantiationService=o,f.contextKeyService=s,f.keybindingService=a,f.telemetryService=c,f.notificationService=l,f.menuService=u,f.quickOpenService=d,f.extensionService=p,f.groupTransfer=L.LocalSelectionTransfer.getInstance(),f.editorTransfer=L.LocalSelectionTransfer.getInstance(),f.currentPrimaryEditorActionIds=[],
f.currentSecondaryEditorActionIds=[],f.mapEditorToActions=new Map,f.editorToolBarMenuDisposables=[],f.resourceContext=o.createInstance(E.ResourceContextKey),f.contextMenu=f._register(f.menuService.createMenu(C.MenuId.EditorTitleContext,f.contextKeyService)),f.create(t),f.registerListeners(),f}return n(t,e),t.prototype.registerListeners=function(){var e=this;this._register(this.extensionService.onDidRegisterExtensions(function(){return e.updateEditorActionsToolbar()}))},t.prototype.createEditorActionsToolBar=function(e){var t=this,n={groupId:this.group.id};this.editorActionsToolbar=this._register(new h.ToolBar(e,this.contextMenuService,{actionItemProvider:function(e){return t.actionItemProvider(e)},orientation:d.ActionsOrientation.HORIZONTAL,ariaLabel:i.localize(0,null),getKeyBinding:function(e){return t.getKeybinding(e)},actionRunner:this._register(new u.EditorCommandsContextActionRunner(n))})),this.editorActionsToolbar.context=n,this._register(this.editorActionsToolbar.actionRunner.onDidRun(function(e){
t.notificationService.error(e.error),t.telemetryService&&t.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"editorPart"})}))},t.prototype.actionItemProvider=function(e){var t,n=this.group.activeControl;return n instanceof s.BaseEditor&&(t=n.getActionItem(e)),t||(t=_.createActionItem(e,this.keybindingService,this.notificationService,this.contextMenuService)),t},t.prototype.updateEditorActionsToolbar=function(){var e=this.prepareEditorActions(this.getEditorActions()),t=e.primaryEditorActions,n=e.secondaryEditorActions,i=t.map(function(e){return e.id}),r=n.map(function(e){return e.id});c.equals(i,this.currentPrimaryEditorActionIds)&&c.equals(r,this.currentSecondaryEditorActionIds)&&!t.some(function(e){return e instanceof C.ExecuteCommandAction})&&!n.some(function(e){return e instanceof C.ExecuteCommandAction})||(this.editorActionsToolbar.setActions(t,n)(),this.currentPrimaryEditorActionIds=i,this.currentSecondaryEditorActionIds=r)},t.prototype.prepareEditorActions=function(e){var t,n
;return t=this.accessor.activeGroup===this.group?r.prepareActions(e.primary):[],n=r.prepareActions(e.secondary),{primaryEditorActions:t,secondaryEditorActions:n}},t.prototype.getEditorActions=function(){var e=this,t=[],n=[];this.editorToolBarMenuDisposables=S.dispose(this.editorToolBarMenuDisposables),this.resourceContext.set(u.toResource(this.group.activeEditor,{supportSideBySide:!0}));var i=this.group.activeControl;if(i instanceof s.BaseEditor){var r=this.mapEditorToActions.get(i.getId());r||(r={primary:i.getActions(),secondary:i.getSecondaryActions()},this.mapEditorToActions.set(i.getId(),r)),t.push.apply(t,r.primary),n.push.apply(n,r.secondary);var o=T.getCodeEditor(i.getControl()),a=o&&o.invokeWithinContext(function(e){return e.get(b.IContextKeyService)})||this.contextKeyService,c=this.menuService.createMenu(C.MenuId.EditorTitle,a);this.editorToolBarMenuDisposables.push(c),this.editorToolBarMenuDisposables.push(c.onDidChange(function(){e.updateEditorActionsToolbar()})),_.fillInActionBarActions(c,{
arg:this.resourceContext.get(),shouldForwardArgs:!0},{primary:t,secondary:n})}return{primary:t,secondary:n}},t.prototype.clearEditorActionsToolbar=function(){this.editorActionsToolbar.setActions([],[])(),this.currentPrimaryEditorActionIds=[],this.currentSecondaryEditorActionIds=[]},t.prototype.enableGroupDragging=function(e){var t=this;this._register(k.addDisposableListener(e,k.EventType.DRAG_START,function(n){if(n.target===e){if(t.groupTransfer.setData([new L.DraggedEditorGroupIdentifier(t.group.id)],L.DraggedEditorGroupIdentifier.prototype),n.dataTransfer.effectAllowed="copyMove",!t.accessor.partOptions.showTabs){var r=u.toResource(t.group.activeEditor,{supportSideBySide:!0});r&&t.instantiationService.invokeFunction(L.fillResourceDataTransfers,[r],n)}var o=t.group.activeEditor.getName();t.accessor.partOptions.showTabs&&t.group.count>1&&(o=i.localize(1,null,o,t.group.count-1)),R.applyDragImage(n,o,"monaco-editor-group-drag-image")}})),this._register(k.addDisposableListener(e,k.EventType.DRAG_END,function(){
t.groupTransfer.clearData(L.DraggedEditorGroupIdentifier.prototype)}))},t.prototype.onContextMenu=function(e,t,n){var i=this,r=this.resourceContext.get();this.resourceContext.set(u.toResource(e,{supportSideBySide:!0}));var s=n;if(t instanceof MouseEvent){var a=new f.StandardMouseEvent(t);s={x:a.posx,y:a.posy}}var c=[];_.fillInContextMenuActions(this.contextMenu,{shouldForwardArgs:!0,arg:this.resourceContext.get()},c,this.contextMenuService),this.contextMenuService.showContextMenu({getAnchor:function(){return s},getActions:function(){return o.TPromise.as(c)},getActionsContext:function(){return{groupId:i.group.id,editorIndex:i.group.getIndexOfEditor(e)}},getKeyBinding:function(e){return i.getKeybinding(e)},onHide:function(){i.resourceContext.set(r),i.accessor.activeGroup.focus()}})},t.prototype.getKeybinding=function(e){return this.keybindingService.lookupKeybinding(e.id)},t.prototype.getKeybindingLabel=function(e){var t=this.getKeybinding(e);return t?t.getLabel():void 0},t.prototype.layout=function(e){},
t.prototype.dispose=function(){this.editorToolBarMenuDisposables=S.dispose(this.editorToolBarMenuDisposables),e.prototype.dispose.call(this)},t=a([l(3,p.IContextMenuService),l(4,v.IInstantiationService),l(5,b.IContextKeyService),l(6,y.IKeybindingService),l(7,g.ITelemetryService),l(8,x.INotificationService),l(9,C.IMenuService),l(10,m.IQuickOpenService),l(11,w.IThemeService),l(12,D.IExtensionService)],t)}(I.Themable);t.TitleControl=O,w.registerThemingParticipant(function(e,t){var n=e.getColor(A.listActiveSelectionBackground),i=e.getColor(A.listActiveSelectionForeground);t.addRule("\n\t\t.monaco-editor-group-drag-image {\n\t\t\tbackground: "+n+";\n\t\t\tcolor: "+i+";\n\t\t}\n\t")})}),define(e[1473],t([1,0,40,519,138,69,132,8,187,830]),function(e,t,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.create=function(e){var t=this;this.titleContainer=e,this.titleContainer.draggable=!0,
this.registerContainerListeners(),a.Gesture.addTarget(this.titleContainer),this.editorLabel=this._register(this.instantiationService.createInstance(o.ResourceLabel,this.titleContainer,void 0)),this._register(this.editorLabel.onClick(function(e){return t.onTitleLabelClick(e)}));var n=document.createElement("div");c.addClass(n,"title-actions"),this.titleContainer.appendChild(n),this.createEditorActionsToolBar(n)},t.prototype.registerContainerListeners=function(){var e=this;this.enableGroupDragging(this.titleContainer),this._register(c.addDisposableListener(this.titleContainer,c.EventType.DBLCLICK,function(t){return e.onTitleDoubleClick(t)})),this._register(c.addDisposableListener(this.titleContainer,c.EventType.CLICK,function(t){return e.onTitleClick(t)})),this._register(c.addDisposableListener(this.titleContainer,a.EventType.Tap,function(t){return e.onTitleClick(t)})),this._register(c.addDisposableListener(this.titleContainer,c.EventType.CONTEXT_MENU,function(t){
return e.onContextMenu(e.group.activeEditor,t,e.titleContainer)})),this._register(c.addDisposableListener(this.titleContainer,a.EventType.Contextmenu,function(t){return e.onContextMenu(e.group.activeEditor,t,e.titleContainer)}))},t.prototype.onTitleLabelClick=function(e){var t=this;c.EventHelper.stop(e,!1),setTimeout(function(){return t.quickOpenService.show()})},t.prototype.onTitleDoubleClick=function(e){c.EventHelper.stop(e),this.group.pinEditor()},t.prototype.onTitleClick=function(e){e instanceof MouseEvent&&1===e.button&&this.group.closeEditor(this.group.activeEditor)},t.prototype.openEditor=function(e){var t=this;this.ifActiveEditorChanged(function(){return t.redraw()})},t.prototype.closeEditor=function(e){var t=this;this.ifActiveEditorChanged(function(){return t.redraw()})},t.prototype.closeEditors=function(e){var t=this;this.ifActiveEditorChanged(function(){return t.redraw()})},t.prototype.closeAllEditors=function(){this.redraw()},t.prototype.moveEditor=function(e,t,n){var i=this
;this.ifActiveEditorChanged(function(){return i.redraw()})},t.prototype.pinEditor=function(e){var t=this;this.ifEditorIsActive(e,function(){return t.redraw()})},t.prototype.setActive=function(e){this.redraw()},t.prototype.updateEditorLabel=function(e){var t=this;this.ifEditorIsActive(e,function(){return t.redraw()})},t.prototype.updateEditorDirty=function(e){var t=this;this.ifEditorIsActive(e,function(){e.isDirty()?c.addClass(t.titleContainer,"dirty"):c.removeClass(t.titleContainer,"dirty")})},t.prototype.updateOptions=function(e,t){e.labelFormat!==t.labelFormat&&this.redraw()},t.prototype.updateStyles=function(){this.redraw()},t.prototype.ifActiveEditorChanged=function(e){(!this.lastRenderedActiveEditor&&this.group.activeEditor||this.lastRenderedActiveEditor&&!this.group.activeEditor||!this.group.isActive(this.lastRenderedActiveEditor))&&e()},t.prototype.ifEditorIsActive=function(e,t){this.group.isActive(e)&&t()},t.prototype.redraw=function(){var e=this.group.activeEditor;if(this.lastRenderedActiveEditor=e,
e){var t=this.group.isPinned(this.group.activeEditor),n=this.accessor.activeGroup===this.group;this.updateEditorDirty(e);var r=i.toResource(e,{supportSideBySide:!0}),o=e.getName()||"",a=this.accessor.partOptions.labelFormat,l=void 0;l="default"!==a||n?e.getDescription(this.getVerbosity(a))||"":"";var u=e.getTitle(i.Verbosity.LONG);l===u&&(u=""),this.editorLabel.setLabel({name:o,description:l,resource:r},{title:u,italic:!t,extraClasses:["title-label"]}),this.editorLabel.element.style.color=n?this.getColor(s.TAB_ACTIVE_FOREGROUND):this.getColor(s.TAB_UNFOCUSED_ACTIVE_FOREGROUND),this.updateEditorActionsToolbar()}else c.removeClass(this.titleContainer,"dirty"),this.editorLabel.clear(),this.clearEditorActionsToolbar()},t.prototype.getVerbosity=function(e){switch(e){case"short":return i.Verbosity.SHORT;case"long":return i.Verbosity.LONG;default:return i.Verbosity.MEDIUM}},t.prototype.prepareEditorActions=function(t){return this.accessor.activeGroup===this.group?e.prototype.prepareEditorActions.call(this,t):{
primaryEditorActions:t.primary.filter(function(e){return e.id===l.CLOSE_EDITOR_COMMAND_ID}),secondaryEditorActions:[]}},t}(r.TitleControl);t.NoTabsTitleControl=u}),define(e[1474],t([1,0,11,62,40,84,132,138,41,35,28,6,37,15,31,519,64,5,129,101,50,12,69,26,176,22,49,53,91,8,1517,291,833]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var P=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,h,p,f){var g=e.call(this,t,n,i,r,o,a,c,l,u,d,h,p,f)||this;return g.untitledEditorService=s,g.tabLabelWidgets=[],g.tabLabels=[],g.tabDisposeables=[],g}return n(t,e),t.prototype.create=function(e){this.titleContainer=e,this.tabsContainer=document.createElement("div"),this.tabsContainer.setAttribute("role","tablist"),this.tabsContainer.draggable=!0,R.addClass(this.tabsContainer,"tabs-container"),this.registerContainerListeners(),this.createScrollbar(),this.editorToolbarContainer=document.createElement("div"),
R.addClass(this.editorToolbarContainer,"editor-actions"),this.titleContainer.appendChild(this.editorToolbarContainer),this.createEditorActionsToolBar(this.editorToolbarContainer),this.closeOneEditorAction=this._register(this.instantiationService.createInstance(M.CloseOneEditorAction,M.CloseOneEditorAction.ID,M.CloseOneEditorAction.LABEL))},t.prototype.createScrollbar=function(){var e=this;this.scrollbar=new _.ScrollableElement(this.tabsContainer,{horizontal:C.ScrollbarVisibility.Auto,vertical:C.ScrollbarVisibility.Hidden,scrollYToX:!0,useShadows:!1,horizontalScrollbarSize:3}),this.scrollbar.onScroll(function(t){e.tabsContainer.scrollLeft=t.scrollLeft}),this.titleContainer.appendChild(this.scrollbar.getDomNode())},t.prototype.registerContainerListeners=function(){var e=this;this.enableGroupDragging(this.tabsContainer),this._register(R.addDisposableListener(this.tabsContainer,R.EventType.SCROLL,function(){R.hasClass(e.tabsContainer,"scroll")&&e.scrollbar.setScrollPosition({scrollLeft:e.tabsContainer.scrollLeft
})})),this._register(R.addDisposableListener(this.tabsContainer,R.EventType.DBLCLICK,function(t){t.target===e.tabsContainer&&(R.EventHelper.stop(t),e.group.openEditor(e.untitledEditorService.createOrGet(),{pinned:!0,index:e.group.count}))})),this._register(R.addDisposableListener(this.tabsContainer,R.EventType.MOUSE_DOWN,function(e){1===e.button&&e.preventDefault()})),this._register(new x.DragAndDropObserver(this.tabsContainer,{onDragEnter:function(t){if(R.addClass(e.tabsContainer,"scroll"),t.target===e.tabsContainer)if(e.isSupportedDropTransfer(t)){var n=!1;if(e.editorTransfer.hasData(x.DraggedEditorIdentifier.prototype)){n=!0;var i=e.editorTransfer.getData(x.DraggedEditorIdentifier.prototype)[0].identifier;if(e.group.id===i.groupId&&e.group.getIndexOfEditor(i.editor)===e.group.count-1)return void(t.dataTransfer.dropEffect="none")}n||(t.dataTransfer.dropEffect="copy"),e.updateDropFeedback(e.tabsContainer,!0)}else t.dataTransfer.dropEffect="none";else e.updateDropFeedback(e.tabsContainer,!1)},
onDragLeave:function(t){e.updateDropFeedback(e.tabsContainer,!1),R.removeClass(e.tabsContainer,"scroll")},onDragEnd:function(t){e.updateDropFeedback(e.tabsContainer,!1),R.removeClass(e.tabsContainer,"scroll")},onDrop:function(t){e.updateDropFeedback(e.tabsContainer,!1),R.removeClass(e.tabsContainer,"scroll"),t.target===e.tabsContainer&&e.onDrop(t,e.group.count)}}))},t.prototype.updateEditorActionsToolbar=function(){e.prototype.updateEditorActionsToolbar.call(this),this.layout(this.dimension)},t.prototype.openEditor=function(e){for(var t=this.tabsContainer.children.length;t<this.group.count;t++)this.tabsContainer.appendChild(this.createTab(t));this.computeTabLabels(),this.redraw()},t.prototype.closeEditor=function(e){this.handleClosedEditors()},t.prototype.closeEditors=function(e){this.handleClosedEditors()},t.prototype.closeAllEditors=function(){this.handleClosedEditors()},t.prototype.handleClosedEditors=function(){if(this.group.activeEditor){
for(;this.tabsContainer.children.length>this.group.count;)this.tabsContainer.lastChild.remove(),this.tabLabelWidgets.pop(),this.tabDisposeables.pop().dispose();this.computeTabLabels(),this.redraw()}else R.clearNode(this.tabsContainer),this.tabDisposeables=S.dispose(this.tabDisposeables),this.tabLabelWidgets=[],this.tabLabels=[],this.clearEditorActionsToolbar()},t.prototype.moveEditor=function(e,t,n){var i=this,r=this.tabLabels[t];this.tabLabels.splice(t,1),this.tabLabels.splice(n,0,r),this.forEachTab(function(e,t,n,r,o){i.redrawTab(e,t,n,r,o)}),this.layout(this.dimension)},t.prototype.pinEditor=function(e){var t=this;this.withTab(e,function(n,i,r){return t.redrawLabel(e,n,i,r)})},t.prototype.setActive=function(e){var t=this;this.forEachTab(function(n,i,r,o,s){t.redrawEditorActive(e,n,r,o)}),this.updateEditorActionsToolbar(),this.layout(this.dimension)},t.prototype.updateEditorLabel=function(e){var t=this;this.computeTabLabels(),this.forEachTab(function(e,n,i,r,o){t.redrawLabel(e,i,r,o)}),
this.layout(this.dimension)},t.prototype.updateEditorDirty=function(e){var t=this;this.withTab(e,function(n){return t.redrawEditorDirty(e,n)})},t.prototype.updateOptions=function(e,t){e.labelFormat!==t.labelFormat&&this.computeTabLabels(),e.labelFormat===t.labelFormat&&e.tabCloseButton===t.tabCloseButton&&e.tabSizing===t.tabSizing&&e.showIcons===t.showIcons&&e.iconTheme===t.iconTheme||this.redraw()},t.prototype.updateStyles=function(){this.redraw()},t.prototype.withTab=function(e,t){var n=this.group.getIndexOfEditor(e),i=this.tabsContainer.children[n];i&&t(i,this.tabLabelWidgets[n],this.tabLabels[n])},t.prototype.createTab=function(e){var t=this,n=document.createElement("div");n.draggable=!0,n.tabIndex=0,n.setAttribute("role","presentation"),R.addClass(n,"tab"),c.Gesture.addTarget(n);var i=document.createElement("div");R.addClass(i,"tab-border-top-container"),n.appendChild(i);var r=this.instantiationService.createInstance(u.ResourceLabel,n,void 0);this.tabLabelWidgets.push(r)
;var s=document.createElement("div");R.addClass(s,"tab-close"),n.appendChild(s);var a=document.createElement("div");R.addClass(a,"tab-border-bottom-container"),n.appendChild(a);var l=new o.EditorCommandsContextActionRunner({groupId:this.group.id,editorIndex:e}),h=new d.ActionBar(s,{ariaLabel:O.localize(0,null),actionRunner:l});h.push(this.closeOneEditorAction,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(this.closeOneEditorAction)}),h.onDidBeforeRun(function(){return t.blockRevealActiveTabOnce()});var p=this.registerTabListeners(n,e);return this.tabDisposeables.push(S.combinedDisposable([p,h,l,r])),n},t.prototype.registerTabListeners=function(e,t){var n=this,i=[],r=function(i){e.blur(),i instanceof MouseEvent&&0!==i.button?1===i.button&&i.preventDefault():n.originatesFromTabActionBar(i)||n.group.openEditor(n.group.getEditor(t))},a=function(i){R.EventHelper.stop(i),n.onContextMenu(n.group.getEditor(t),i,e)};return i.push(R.addDisposableListener(e,R.EventType.MOUSE_DOWN,function(e){return r(e)})),
i.push(R.addDisposableListener(e,c.EventType.Tap,function(e){return r(e)})),i.push(R.addDisposableListener(e,c.EventType.Change,function(e){n.scrollbar.setScrollPosition({scrollLeft:n.scrollbar.getScrollPosition().scrollLeft-e.translationX})})),i.push(R.addDisposableListener(e,R.EventType.MOUSE_UP,function(i){R.EventHelper.stop(i),e.blur(),1!==i.button||n.originatesFromTabActionBar(i)||(n.blockRevealActiveTabOnce(),n.closeOneEditorAction.run({groupId:n.group.id,editorIndex:t}))})),i.push(R.addDisposableListener(e,R.EventType.KEY_DOWN,function(e){var t=new s.StandardKeyboardEvent(e);t.shiftKey&&68===t.keyCode&&a(e)})),i.push(R.addDisposableListener(e,c.EventType.Contextmenu,function(e){a(e)})),i.push(R.addDisposableListener(e,R.EventType.KEY_UP,function(e){var i=new s.StandardKeyboardEvent(e),r=!1;if(i.equals(3)||i.equals(10))r=!0,n.group.openEditor(n.group.getEditor(t));else if([15,17,16,18,14,13].some(function(e){return i.equals(e)})){var o=void 0
;o=i.equals(15)||i.equals(16)?t-1:i.equals(17)||i.equals(18)?t+1:i.equals(14)?0:n.group.count-1;var a=n.group.getEditor(o);a&&(r=!0,n.group.openEditor(a,{preserveFocus:!0}),n.tabsContainer.childNodes[o].focus())}r&&R.EventHelper.stop(e,!0),n.scrollbar.setScrollPosition({scrollLeft:n.tabsContainer.scrollLeft})})),i.push(R.addDisposableListener(e,R.EventType.DBLCLICK,function(e){R.EventHelper.stop(e),n.group.pinEditor(n.group.getEditor(t))})),i.push(R.addDisposableListener(e,R.EventType.CONTEXT_MENU,function(i){R.EventHelper.stop(i,!0),n.onContextMenu(n.group.getEditor(t),i,e)},!0)),i.push(R.addDisposableListener(e,R.EventType.DRAG_START,function(i){var r=n.group.getEditor(t);n.editorTransfer.setData([new x.DraggedEditorIdentifier({editor:r,groupId:n.group.id})],x.DraggedEditorIdentifier.prototype),i.dataTransfer.effectAllowed="copyMove";var s=o.toResource(r,{supportSideBySide:!0});s&&n.instantiationService.invokeFunction(x.fillResourceDataTransfers,[s],i),R.addClass(e,"dragged"),
R.scheduleAtNextAnimationFrame(function(){return R.removeClass(e,"dragged")})})),i.push(new x.DragAndDropObserver(e,{onDragEnter:function(i){if(R.addClass(e,"dragged-over"),n.isSupportedDropTransfer(i)){var r=!1;if(n.editorTransfer.hasData(x.DraggedEditorIdentifier.prototype)){r=!0;var o=n.editorTransfer.getData(x.DraggedEditorIdentifier.prototype)[0].identifier;if(o.editor===n.group.getEditor(t)&&o.groupId===n.group.id)return void(i.dataTransfer.dropEffect="none")}r||(i.dataTransfer.dropEffect="copy"),n.updateDropFeedback(e,!0,t)}else i.dataTransfer.dropEffect="none"},onDragLeave:function(i){R.removeClass(e,"dragged-over"),n.updateDropFeedback(e,!1,t)},onDragEnd:function(i){R.removeClass(e,"dragged-over"),n.updateDropFeedback(e,!1,t),n.editorTransfer.clearData(x.DraggedEditorIdentifier.prototype)},onDrop:function(i){R.removeClass(e,"dragged-over"),n.updateDropFeedback(e,!1,t),n.onDrop(i,t)}})),S.combinedDisposable(i)},t.prototype.isSupportedDropTransfer=function(e){
if(this.groupTransfer.hasData(x.DraggedEditorGroupIdentifier.prototype)){return this.groupTransfer.getData(x.DraggedEditorGroupIdentifier.prototype)[0].identifier!==this.group.id}return!!this.editorTransfer.hasData(x.DraggedEditorIdentifier.prototype)||e.dataTransfer.types.length>0},t.prototype.updateDropFeedback=function(e,t,n){var i="number"==typeof n,r=i&&this.group.isActive(this.group.getEditor(n)),o=i?this.getColor(r?I.TAB_ACTIVE_BACKGROUND:I.TAB_INACTIVE_BACKGROUND):null;e.style.backgroundColor=t?this.getColor(I.EDITOR_DRAG_AND_DROP_BACKGROUND):o;var s=this.getColor(T.activeContrastBorder);s&&t?(e.style.outlineWidth="2px",e.style.outlineStyle="dashed",e.style.outlineColor=s,e.style.outlineOffset=i?"-5px":"-3px"):(e.style.outlineWidth=null,e.style.outlineStyle=null,e.style.outlineColor=s,e.style.outlineOffset=null)},t.prototype.computeTabLabels=function(){var e=this.accessor.partOptions.labelFormat,t=this.getLabelConfigFlags(e),n=t.verbosity,i=t.shortenDuplicates,r=this.group.editors.map(function(e){
return{editor:e,name:e.getName(),description:e.getDescription(n),title:e.getTitle(o.Verbosity.LONG)}});i&&this.shortenTabLabels(r),this.tabLabels=r},t.prototype.shortenTabLabels=function(e){for(var t=new Map,n=0,i=e;n<i.length;n++){var s=i[n];"string"==typeof s.description?E.getOrSet(t,s.name,[]).push(s):s.description=""}t.forEach(function(e){if(1!==e.length){for(var t=new Map,n=0,i=e;n<i.length;n++){d=i[n];E.getOrSet(t,d.description,[]).push(d)}var s=!1;t.forEach(function(e,t){if(!s&&e.length>1){var n=e.map(function(e){return e.editor.getDescription(o.Verbosity.LONG)}),i=n[0],r=n.slice(1);s=r.some(function(e){return e!==i})}}),s&&(t.clear(),e.forEach(function(e){e.description=e.editor.getDescription(o.Verbosity.LONG),E.getOrSet(t,e.description,[]).push(e)}));var a=[];if(t.forEach(function(e,t){return a.push(t)}),1!==a.length){var c=r.shorten(a);a.forEach(function(e,n){for(var i=0,r=t.get(e);i<r.length;i++){r[i].description=c[n]}})}else for(var l=0,u=t.get(a[0]);l<u.length;l++){var d;(d=u[l]).description=""}
}else e[0].description=""})},t.prototype.getLabelConfigFlags=function(e){switch(e){case"short":return{verbosity:o.Verbosity.SHORT,shortenDuplicates:!1};case"medium":return{verbosity:o.Verbosity.MEDIUM,shortenDuplicates:!1};case"long":return{verbosity:o.Verbosity.LONG,shortenDuplicates:!1};default:return{verbosity:o.Verbosity.MEDIUM,shortenDuplicates:!0}}},t.prototype.redraw=function(){var e=this;this.forEachTab(function(t,n,i,r,o){e.redrawTab(t,n,i,r,o)}),this.updateEditorActionsToolbar(),this.layout(this.dimension)},t.prototype.forEachTab=function(e){var t=this;this.group.editors.forEach(function(n,i){var r=t.tabsContainer.children[i];r&&e(n,i,r,t.tabLabelWidgets[i],t.tabLabels[i])})},t.prototype.redrawTab=function(e,t,n,i,r){this.redrawLabel(e,n,i,r);var o=0!==t?this.getColor(I.TAB_BORDER)||this.getColor(T.contrastBorder):null,s=t===this.group.count-1?this.getColor(I.TAB_BORDER)||this.getColor(T.contrastBorder):null;n.style.borderLeft=o?"1px solid "+o:null,n.style.borderRight=s?"1px solid "+s:null,
n.style.outlineColor=this.getColor(T.activeContrastBorder);var a=this.accessor.partOptions;["off","left","right"].forEach(function(e){(a.tabCloseButton===e?R.addClass:R.removeClass)(n,"close-button-"+e)}),["fit","shrink"].forEach(function(e){(a.tabSizing===e?R.addClass:R.removeClass)(n,"sizing-"+e)}),a.showIcons&&a.iconTheme?R.addClass(n,"has-icon-theme"):R.removeClass(n,"has-icon-theme"),this.redrawEditorActive(this.accessor.activeGroup===this.group,e,n,i),this.redrawEditorDirty(e,n)},t.prototype.redrawLabel=function(e,t,n,i){var r=i.name,s=i.description||"",a=i.title||"";t.setAttribute("aria-label",r+", tab"),t.title=a,n.setLabel({name:r,description:s,resource:o.toResource(e,{supportSideBySide:!0})},{extraClasses:["tab-label"],italic:!this.group.isPinned(e)})},t.prototype.redrawEditorActive=function(e,t,n,i){if(this.group.isActive(t)){R.addClass(n,"active"),n.setAttribute("aria-selected","true"),n.style.backgroundColor=this.getColor(I.TAB_ACTIVE_BACKGROUND)
;var r=this.getColor(e?I.TAB_ACTIVE_BORDER:I.TAB_UNFOCUSED_ACTIVE_BORDER);r?(R.addClass(n,"tab-border-bottom"),n.style.setProperty("--tab-border-bottom-color",r.toString())):(R.removeClass(n,"tab-border-bottom"),n.style.removeProperty("--tab-border-bottom-color"));var o=this.getColor(e?I.TAB_ACTIVE_BORDER_TOP:I.TAB_UNFOCUSED_ACTIVE_BORDER_TOP);o?(R.addClass(n,"tab-border-top"),n.style.setProperty("--tab-border-top-color",o.toString())):(R.removeClass(n,"tab-border-top"),n.style.removeProperty("--tab-border-top-color")),i.element.style.color=this.getColor(e?I.TAB_ACTIVE_FOREGROUND:I.TAB_UNFOCUSED_ACTIVE_FOREGROUND)}else R.removeClass(n,"active"),n.setAttribute("aria-selected","false"),n.style.backgroundColor=this.getColor(I.TAB_INACTIVE_BACKGROUND),n.style.boxShadow=null,i.element.style.color=this.getColor(e?I.TAB_INACTIVE_FOREGROUND:I.TAB_UNFOCUSED_INACTIVE_FOREGROUND)},t.prototype.redrawEditorDirty=function(e,t){e.isDirty()?R.addClass(t,"dirty"):R.removeClass(t,"dirty")},t.prototype.layout=function(e){
var t=this;this.getTab(this.group.activeEditor)&&e&&(this.dimension=e,this.layoutScheduled||(this.layoutScheduled=R.scheduleAtNextAnimationFrame(function(){t.doLayout(t.dimension),t.layoutScheduled=void 0})))},t.prototype.doLayout=function(e){var t=this.getTab(this.group.activeEditor);if(t){var n,i,r=this.tabsContainer.offsetWidth,o=this.tabsContainer.scrollWidth;if(this.blockRevealActiveTab||(n=t.offsetLeft,i=t.offsetWidth),this.scrollbar.setScrollDimensions({width:r,scrollWidth:o}),this.blockRevealActiveTab)this.blockRevealActiveTab=!1;else{var s=this.scrollbar.getScrollPosition().scrollLeft,a=i<=r;a&&s+r<n+i?this.scrollbar.setScrollPosition({scrollLeft:s+(n+i-(s+r))}):(s>n||!a)&&this.scrollbar.setScrollPosition({scrollLeft:n})}}},t.prototype.getTab=function(e){var t=this.group.getIndexOfEditor(e);if(t>=0)return this.tabsContainer.children[t]},t.prototype.blockRevealActiveTabOnce=function(){this.blockRevealActiveTab=!0},t.prototype.originatesFromTabActionBar=function(e){var t
;return t=e instanceof MouseEvent?e.target||e.srcElement:e.initialTarget,!!R.findParentWithClass(t,"monaco-action-bar","tab")},t.prototype.onDrop=function(e,t){var n=this;if(R.EventHelper.stop(e,!0),this.updateDropFeedback(this.tabsContainer,!1),R.removeClass(this.tabsContainer,"scroll"),this.editorTransfer.hasData(x.DraggedEditorIdentifier.prototype)){var i=this.editorTransfer.getData(x.DraggedEditorIdentifier.prototype)[0].identifier,r=this.accessor.getGroup(i.groupId);this.isMoveOperation(e,i.groupId)?r.moveEditor(i.editor,this.group,{index:t}):r.copyEditor(i.editor,this.group,{index:t}),this.group.focus(),this.editorTransfer.clearData(x.DraggedEditorIdentifier.prototype)}else if(this.groupTransfer.hasData(x.DraggedEditorGroupIdentifier.prototype)){var r=this.accessor.getGroup(this.groupTransfer.getData(x.DraggedEditorGroupIdentifier.prototype)[0].identifier),o={index:t};this.isMoveOperation(e,r.id)||(o.mode=A.MergeGroupMode.COPY_EDITORS),this.accessor.mergeGroup(r,this.group,o),this.group.focus(),
this.groupTransfer.clearData(x.DraggedEditorGroupIdentifier.prototype)}else{this.instantiationService.createInstance(x.ResourcesDropHandler,{allowWorkspaceOpen:!1}).handleDrop(e,function(){return n.group},function(){return n.group.focus()},t)}},t.prototype.isMoveOperation=function(e,t){return!(e.ctrlKey&&!i.isMacintosh||e.altKey&&i.isMacintosh)||t===this.group.id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.layoutScheduled=S.dispose(this.layoutScheduled)},t=a([l(3,h.IContextMenuService),l(4,f.IInstantiationService),l(5,L.IUntitledEditorService),l(6,v.IContextKeyService),l(7,g.IKeybindingService),l(8,p.ITelemetryService),l(9,k.INotificationService),l(10,m.IMenuService),l(11,b.IQuickOpenService),l(12,w.IThemeService),l(13,D.IExtensionService)],t)}(y.TitleControl);t.TabsTitleControl=P,w.registerThemingParticipant(function(e,t){
e.getColor(T.activeContrastBorder)&&t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active,\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover  {\n\t\t\t\toutline: 1px solid;\n\t\t\t\toutline-offset: -5px;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover  {\n\t\t\t\toutline: 1px dashed;\n\t\t\t\toutline-offset: -5px;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active > .tab-close .action-label,\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover > .tab-close .action-label,\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-close .action-label,\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover > .tab-close .action-label {\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t")
;var n=e.getColor(I.TAB_HOVER_BACKGROUND);n&&t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover  {\n\t\t\t\tbackground-color: "+n+" !important;\n\t\t\t}\n\t\t");var i=e.getColor(I.TAB_UNFOCUSED_HOVER_BACKGROUND);i&&t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover  {\n\t\t\t\tbackground-color: "+i+" !important;\n\t\t\t}\n\t\t");var r=e.getColor(I.TAB_HOVER_BORDER);r&&t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover  {\n\t\t\t\tbox-shadow: "+r+" 0 -1px inset !important;\n\t\t\t}\n\t\t");var o=e.getColor(I.TAB_UNFOCUSED_HOVER_BORDER);if(o&&t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover  {\n\t\t\t\tbox-shadow: "+o+" 0 -1px inset !important;\n\t\t\t}\n\t\t"),"hc"!==e.type){
var s=I.WORKBENCH_BACKGROUND(e),a=e.getColor(T.editorBackground),c=e.getColor(I.EDITOR_GROUP_HEADER_TABS_BACKGROUND),l=e.getColor(I.EDITOR_DRAG_AND_DROP_BACKGROUND),u=void 0;c&&a&&(u=c.flatten(a,a,s));var d=void 0;if(c&&a&&l&&a&&(d=c.flatten(a,l,a,s)),n&&u&&d){var h=n.flatten(u),p=n.flatten(d);t.addRule("\n\t\t\t\t.monaco-workbench > .part.editor > .content:not(.dragged-over) .editor-group-container.active > .title .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after {\n\t\t\t\t\tbackground: linear-gradient(to left, "+h+", transparent) !important;\n\t\t\t\t}\n\n\n\t\t\t\t.monaco-workbench > .part.editor > .content.dragged-over .editor-group-container.active > .title .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after {\n\t\t\t\t\tbackground: linear-gradient(to left, "+p+", transparent) !important;\n\t\t\t\t}\n\t\t\t")}if(i&&u&&d){var h=i.flatten(u),p=i.flatten(d)
;t.addRule("\n\t\t\t\t.monaco-workbench > .part.editor > .content:not(.dragged-over) .editor-group-container > .title .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after {\n\t\t\t\t\tbackground: linear-gradient(to left, "+h+", transparent) !important;\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench > .part.editor > .content.dragged-over .editor-group-container > .title .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after {\n\t\t\t\t\tbackground: linear-gradient(to left, "+p+", transparent) !important;\n\t\t\t\t}\n\t\t\t")}if(l&&d){p=l.flatten(d)
;t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content.dragged-over .editor-group-container.active > .title .tabs-container > .tab.sizing-shrink.dragged-over:not(.active):not(.dragged) > .tab-label::after,\n\t\t\t.monaco-workbench > .part.editor > .content.dragged-over .editor-group-container > .title .tabs-container > .tab.sizing-shrink.dragged-over:not(.dragged) > .tab-label::after {\n\t\t\t\tbackground: linear-gradient(to left, "+p+", transparent) !important;\n\t\t\t}\n\t\t")}var f=e.getColor(I.TAB_ACTIVE_BACKGROUND);if(f&&u&&d){var h=f.flatten(u),p=f.flatten(d)
;t.addRule("\n\t\t\t\t.monaco-workbench > .part.editor > .content:not(.dragged-over) .editor-group-container > .title .tabs-container > .tab.sizing-shrink.active:not(.dragged) > .tab-label::after {\n\t\t\t\t\tbackground: linear-gradient(to left, "+h+", transparent);\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench > .part.editor > .content.dragged-over .editor-group-container > .title .tabs-container > .tab.sizing-shrink.active:not(.dragged) > .tab-label::after {\n\t\t\t\t\tbackground: linear-gradient(to left, "+p+", transparent);\n\t\t\t\t}\n\t\t\t")}var g=e.getColor(I.TAB_INACTIVE_BACKGROUND);if(g&&u&&d){var h=g.flatten(u),p=g.flatten(d)
;t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content:not(.dragged-over) .editor-group-container > .title .tabs-container > .tab.sizing-shrink:not(.dragged) > .tab-label::after {\n\t\t\t\tbackground: linear-gradient(to left, "+h+", transparent);\n\t\t\t}\n\n\t\t\t.monaco-workbench > .part.editor > .content.dragged-over .editor-group-container > .title .tabs-container > .tab.sizing-shrink:not(.dragged) > .tab-label::after {\n\t\t\t\tbackground: linear-gradient(to left, "+p+", transparent);\n\t\t\t}\n\t\t")}}})}),define(e[520],t([1,0,4,1569,78,14,70,149,30,23,145,122,109,1230,146,62,48,16,54,138,47,40,270,7,46,86,9,64,17,6,27,15,162,12,69,68,36,33,286,58,436,43,22,8,21,53,857]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$){"use strict";function Y(e,t){var n=e?e.getResource():void 0;if(n&&(t.canHandleResource(n)||n.scheme===U.Schemas.untitled))return n}Object.defineProperty(t,"__esModule",{value:!0});var X=function(e){function t(n,i,r,o,s,a,c,l){
var u=e.call(this,t.ID,l)||this;return u.editorGroupService=n,u.notificationService=i,u.contextKeyService=r,u.configurationService=o,u.instantiationService=s,u.partService=a,u.environmentService=c,u.actionProvider=new m.ContributableActionProvider,u.mapResolvedHandlersToPrefix={},u.handlerOnOpenCalled={},u.mapContextKeyToContext={},u.promisesToCompleteOnHide=[],u.editorHistoryHandler=u.instantiationService.createInstance(ee),u._onShow=new T.Emitter,u._onHide=new T.Emitter,u.updateConfiguration(),u.registerListeners(),u}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){return e.updateConfiguration()})),this.toUnbind.push(this.partService.onTitleBarVisibilityChange(function(){return e.positionQuickOpenWidget()})),this.toUnbind.push(o.onDidChangeZoomLevel(function(){return e.positionQuickOpenWidget()}))},t.prototype.updateConfiguration=function(){
this.environmentService.args["sticky-quickopen"]?this.closeOnFocusLost=!1:this.closeOnFocusLost=this.configurationService.getValue(k.CLOSE_ON_FOCUS_LOST_CONFIG)},Object.defineProperty(t.prototype,"onShow",{get:function(){return this._onShow.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onHide",{get:function(){return this._onHide.event},enumerable:!0,configurable:!0}),t.prototype.navigate=function(e,t){this.quickOpenWidget&&this.quickOpenWidget.navigate(e,t),this.pickOpenWidget&&this.pickOpenWidget.navigate(e,t)},t.prototype.pick=function(e,t,n){var r=this;t||(t=Object.create(null));var o;if(Array.isArray(e))o=i.TPromise.as(e);else{if(!i.TPromise.is(e))throw new Error("illegal input");o=e}var s=!1,a=o.then(function(e){return e.map(function(e){return"string"==typeof e?(s=!0,{label:e}):e})});return this.pickOpenWidget&&this.pickOpenWidget.isVisible()&&this.pickOpenWidget.hide(v.HideReason.CANCELED),new i.TPromise(function(e,i,o){function c(e){return e&&s?e.label:e}
r.doPick(a,t,n).then(function(t){return e(c(t))},function(e){return i(e)},function(e){return o(c(e))})})},t.prototype.doPick=function(e,t,n){var o=this;void 0===n&&(n=p.CancellationToken.None);var a=t.autoFocus,c=u.defaultGenerator.nextId();if(this.currentPickerToken=c,this.setQuickOpenContextKey(t.contextKey),this.pickOpenWidget)this.pickOpenWidget.setPlaceHolder(t.placeHolder||"");else{this.pickOpenWidget=new v.QuickOpenWidget(document.getElementById(this.partService.getWorkbenchElementId()),{onOk:function(){},onCancel:function(){},onType:function(e){},onShow:function(){return o.handleOnShow(!0)},onHide:function(e){return o.handleOnHide(!0,e)}},{inputPlaceHolder:t.placeHolder||"",keyboardSupport:!1,treeCreator:function(e,t,n){return o.instantiationService.createInstance(H.WorkbenchTree,e,t,n)}}),this.toUnbind.push(W.attachQuickOpenStyler(this.pickOpenWidget,this.themeService,{background:F.SIDE_BAR_BACKGROUND,foreground:F.SIDE_BAR_FOREGROUND}));var l=this.pickOpenWidget.create()
;j.addClass(l,"show-file-icons"),this.positionQuickOpenWidget()}return t.value&&this.pickOpenWidget.setValue(t.value,t.valueSelection),this.pickOpenWidget.setPassword(t.password),d.isUndefinedOrNull(t.inputDecoration)?this.pickOpenWidget.clearInputDecoration():this.pickOpenWidget.showInputDecoration(t.inputDecoration),this.layoutDimensions&&this.pickOpenWidget.layout(this.layoutDimensions),new i.TPromise(function(l,u,d){o.pickOpenWidget.setCallbacks({onCancel:function(){l(void 0)},onOk:function(){},onType:function(e){}}),n.onCancellationRequested(function(e){o.currentPickerToken===c&&o.pickOpenWidget.hide(v.HideReason.CANCELED)});var h=!1;e.then(function(e){if(o.currentPickerToken!==c)return l(void 0);h=!0,o.pickOpenWidget.getProgressBar().stop().hide();var n=new g.QuickOpenModel([],new J),i=e.map(function(e,t){return o.instantiationService.createInstance(Z,e,t,function(){return d(e)},function(){return o.pickOpenWidget.refresh()})});0===e.length&&i.push(o.instantiationService.createInstance(Z,{
label:r.localize(0,null)},0,null,null)),n.setEntries(i);var u={onOk:function(){if(0===e.length)return l(null);var t,n=-1;i.forEach(function(e){e.shouldRunWithContext&&(n=e.index,t=e.shouldRunWithContext)});var r=e[n];r&&"function"==typeof r.run&&r.run(t),l(r||null)},onCancel:function(){return l(void 0)},onFocusLost:function(){return!o.closeOnFocusLost||t.ignoreFocusLost},onType:function(r){if(t.onDidType)t.onDidType(r);else if(0!==e.length){(r=r?s.trim(r):r)?i.forEach(function(e){var n=e.matchesFuzzy(r,t),i=n.labelHighlights,o=n.descriptionHighlights,s=n.detailHighlights;e.shouldAlwaysShow()||i||o||s?(e.setHighlights(i,o,s),e.setHidden(!1)):(e.setHighlights(null,null,null),e.setHidden(!0))}):i.forEach(function(e){e.setHighlights(null),e.setHidden(!1)});var c=r?s.stripWildcards(r.toLowerCase()):r;n.entries.sort(function(e,t){return r?g.compareEntries(e,t,c):e.index-t.index}),o.pickOpenWidget.refresh(n,r?{autoFocusFirstEntry:!0}:a)}},onShow:function(){return o.handleOnShow(!0)},onHide:function(e){
return o.handleOnHide(!0,e)}};o.pickOpenWidget.setCallbacks(u),o.pickOpenWidget.isVisible()?o.pickOpenWidget.setInput(n,a):o.pickOpenWidget.show(n,{autoFocus:a,quickNavigateConfiguration:t.quickNavigateConfiguration});var p=o.pickOpenWidget.getInputBox().value;p&&u.onType(p)},function(e){o.pickOpenWidget.hide(),u(e)}),i.TPromise.timeout(800).then(function(){h||o.currentPickerToken!==c||o.pickOpenWidget.getProgressBar().infinite().show()}),h||o.pickOpenWidget.show(new g.QuickOpenModel)})},t.prototype.accept=function(){[this.quickOpenWidget,this.pickOpenWidget].forEach(function(e){e&&e.isVisible()&&e.accept()})},t.prototype.focus=function(){[this.quickOpenWidget,this.pickOpenWidget].forEach(function(e){e&&e.isVisible()&&e.focus()})},t.prototype.close=function(){[this.quickOpenWidget,this.pickOpenWidget].forEach(function(e){e&&e.isVisible()&&e.hide(v.HideReason.CANCELED)})},t.prototype.emitQuickOpenVisibilityChange=function(e){e?this._onShow.fire():this._onHide.fire()},t.prototype.show=function(e,t){
var n=this,o=t?t.quickNavigateConfiguration:void 0,s=t?t.inputSelection:void 0,a=t?t.autoFocus:void 0,c=new i.TPromise(function(e){n.promisesToCompleteOnHide.push(e)}),l=S.Registry.as(k.Extensions.Quickopen),u=l.getQuickOpenHandler(e)||l.getDefaultQuickOpenHandler();if(this.resolveHandler(u).done(null,D.onUnexpectedError),!this.quickOpenWidget){this.quickOpenWidget=new v.QuickOpenWidget(document.getElementById(this.partService.getWorkbenchElementId()),{onOk:function(){},onCancel:function(){},onType:function(e){return n.onType(e||"")},onShow:function(){return n.handleOnShow(!1)},onHide:function(e){return n.handleOnHide(!1,e)},onFocusLost:function(){return!n.closeOnFocusLost}},{inputPlaceHolder:this.hasHandler("?")?r.localize(1,null):"",keyboardSupport:!1,treeCreator:function(e,t,i){return n.instantiationService.createInstance(H.WorkbenchTree,e,t,i)}}),this.toUnbind.push(W.attachQuickOpenStyler(this.quickOpenWidget,this.themeService,{background:F.SIDE_BAR_BACKGROUND,foreground:F.SIDE_BAR_FOREGROUND}))
;var d=this.quickOpenWidget.create();j.addClass(d,"show-file-icons"),this.positionQuickOpenWidget()}if(this.layoutDimensions&&this.quickOpenWidget.layout(this.layoutDimensions),!this.quickOpenWidget.isVisible()||o)if(e)this.quickOpenWidget.show(e,{quickNavigateConfiguration:o,inputSelection:s,autoFocus:a});else{var h=this.getEditorHistoryWithGroupLabel();if(h.getEntries().length<2&&(o=null),!a)if(o){var p=0===this.editorGroupService.activeGroup.count;a={autoFocusFirstEntry:p,autoFocusSecondEntry:!p}}else a={autoFocusFirstEntry:!0};var f=S.Registry.as(k.Extensions.Quickopen);this.setQuickOpenContextKey(f.getDefaultQuickOpenHandler().contextKey),this.quickOpenWidget.show(h,{quickNavigateConfiguration:o,autoFocus:a,inputSelection:s})}else this.quickOpenWidget.show(e||"",{inputSelection:s});return c},t.prototype.positionQuickOpenWidget=function(){var e=this.partService.getTitleBarOffset();this.quickOpenWidget&&(this.quickOpenWidget.getElement().style.top=e+"px"),
this.pickOpenWidget&&(this.pickOpenWidget.getElement().style.top=e+"px")},t.prototype.handleOnShow=function(e){e&&this.quickOpenWidget?this.quickOpenWidget.hide(v.HideReason.FOCUS_LOST):!e&&this.pickOpenWidget&&this.pickOpenWidget.hide(v.HideReason.FOCUS_LOST),this.emitQuickOpenVisibilityChange(!0)},t.prototype.handleOnHide=function(e,t){var n=this;if(!e){this.previousActiveHandlerDescriptor=null;var i=function(e){if(r.mapResolvedHandlersToPrefix.hasOwnProperty(e)){r.mapResolvedHandlersToPrefix[e].then(function(i){n.handlerOnOpenCalled[e]=!1,i.onClose(t===v.HideReason.CANCELED)})}},r=this;for(var o in this.mapResolvedHandlersToPrefix)i(o);for(;this.promisesToCompleteOnHide.length;)this.promisesToCompleteOnHide.pop()(!0)}t!==v.HideReason.FOCUS_LOST&&this.editorGroupService.activeGroup.focus(),this.resetQuickOpenContextKeys(),this.emitQuickOpenVisibilityChange(!1)},t.prototype.resetQuickOpenContextKeys=function(){var e=this;Object.keys(this.mapContextKeyToContext).forEach(function(t){
return e.mapContextKeyToContext[t].reset()})},t.prototype.setQuickOpenContextKey=function(e){var t;e&&((t=this.mapContextKeyToContext[e])||(t=new M.RawContextKey(e,!1).bindTo(this.contextKeyService),this.mapContextKeyToContext[e]=t)),t&&t.get()||(this.resetQuickOpenContextKeys(),t&&t.set(!0))},t.prototype.hasHandler=function(e){return!!S.Registry.as(k.Extensions.Quickopen).getQuickOpenHandler(e)},t.prototype.getEditorHistoryWithGroupLabel=function(){var e=this.editorHistoryHandler.getResults();return e.length>0&&(e[0]=new re(e[0],r.localize(2,null),!1)),new g.QuickOpenModel(e,this.actionProvider)},t.prototype.onType=function(e){var t=this,n=S.Registry.as(k.Extensions.Quickopen),r=n.getQuickOpenHandler(e),o=n.getDefaultQuickOpenHandler(),a=r&&r.instantProgress,c=r?r.contextKey:o.contextKey,l=u.defaultGenerator.nextId();this.currentResultToken=l,a||this.quickOpenWidget.getProgressBar().stop().hide(),this.quickOpenWidget.setExtraClass(null),this.setQuickOpenContextKey(c)
;if(!s.trim(e))return this.resolveHandler(r||o).done(null,D.onUnexpectedError),void this.quickOpenWidget.setInput(this.getEditorHistoryWithGroupLabel(),{autoFocusFirstEntry:!0});var h,p=!1;h=r?this.handleSpecificHandler(r,e,l):this.handleDefaultHandler(o,e,l),this.previousActiveHandlerDescriptor=r,i.TPromise.timeout(a?0:800).then(function(){p||l!==t.currentResultToken||t.quickOpenWidget.getProgressBar().infinite().show()}),h.done(function(){p=!0,l===t.currentResultToken&&t.quickOpenWidget.getProgressBar().hide()},function(e){p=!0,D.onUnexpectedError(e),t.notificationService.error(d.isString(e)?new Error(e):e)})},t.prototype.handleDefaultHandler=function(e,n,o){var s=this,a=this.editorHistoryHandler.getResults(n);return a.length>0&&(a[0]=new re(a[0],r.localize(3,null),!1)),this.resolveHandler(e).then(function(e){var r=new g.QuickOpenModel(a,s.actionProvider),c=!1,l=s.quickOpenWidget.getInput();return(l&&l.entries&&l.entries.some(function(e){return e instanceof oe||e instanceof re
})||a.length>0)&&(e.hasShortResponseTime()?i.TPromise.timeout(t.MAX_SHORT_RESPONSE_TIME):i.TPromise.as(void 0)).then(function(){s.currentResultToken!==o||c||(s.quickOpenWidget.setInput(r,{autoFocusFirstEntry:!0}),c=!0)}),e.getResults(n).then(function(t){if(s.currentResultToken===o){c||(s.quickOpenWidget.setInput(r,{autoFocusFirstEntry:!0}),c=!0);var n=t&&t.entries||[];s.mergeResults(r,n,e.getGroupLabel())}})})},t.prototype.mergeResults=function(e,t,n){for(var i=this.mapEntriesToResource(e),o=[],s=0;s<t.length;s++){var a=t[s],c=a.getResource();a.mergeWithEditorHistory()&&c&&i[c.toString()]||o.push(a)}if(o.length>0){var l=0===e.getEntries().length,u=e.getEntries().length>0;o[0]=new g.QuickOpenEntryGroup(o[0],n,u),e.addEntries(o),this.quickOpenWidget.refresh(e,{autoFocusFirstEntry:l})}else 0===e.getEntries().length&&(e.addEntries([new Q(r.localize(4,null))]),this.quickOpenWidget.refresh(e,{autoFocusFirstEntry:!0}))},t.prototype.handleSpecificHandler=function(e,t,n){var o=this
;return this.resolveHandler(e).then(function(s){t=t.substr(e.prefix.length);var a=s.canRun();if(d.isUndefinedOrNull(a)||"boolean"==typeof a&&!a||"string"==typeof a){var c="string"==typeof a?a:r.localize(5,null),l=new g.QuickOpenModel([new Q(c)],o.actionProvider);return o.showModel(l,s.getAutoFocus(t,{model:l,quickNavigateConfiguration:o.quickOpenWidget.getQuickNavigateConfiguration()}),s.getAriaLabel()),i.TPromise.as(null)}var u=s.getClass();return u&&o.quickOpenWidget.setExtraClass(u),o.previousActiveHandlerDescriptor!==e&&o.clearModel(),s.getResults(t).then(function(e){if(o.currentResultToken===n)if(e&&e.entries.length)o.showModel(e,s.getAutoFocus(t,{model:e,quickNavigateConfiguration:o.quickOpenWidget.getQuickNavigateConfiguration()}),s.getAriaLabel());else{var i=new g.QuickOpenModel([new Q(s.getEmptyLabel(t))]);o.showModel(i,s.getAutoFocus(t,{model:i,quickNavigateConfiguration:o.quickOpenWidget.getQuickNavigateConfiguration()}),s.getAriaLabel())}})})},t.prototype.showModel=function(e,t,n){
this.quickOpenWidget.getInput()!==e?this.quickOpenWidget.setInput(e,t,n):this.quickOpenWidget.refresh(e,t)},t.prototype.clearModel=function(){this.showModel(new g.QuickOpenModel,null)},t.prototype.mapEntriesToResource=function(e){var t={};return e.getEntries().forEach(function(e){e.getResource()&&(t[e.getResource().toString()]=e)}),t},t.prototype.resolveHandler=function(e){var t=this,n=this._resolveHandler(e),r=e.getId();if(!this.handlerOnOpenCalled[r]){var o=n;this.handlerOnOpenCalled[r]=!0,n=this.mapResolvedHandlersToPrefix[r]=o.then(function(e){return t.mapResolvedHandlersToPrefix[r]=o,e.onOpen(),e})}return n.then(null,function(n){return delete t.mapResolvedHandlersToPrefix[r],i.TPromise.wrapError(new Error("Unable to instantiate quick open handler "+e.getId()+": "+JSON.stringify(n)))})},t.prototype._resolveHandler=function(e){var t=e.getId()
;return this.mapResolvedHandlersToPrefix[t]?this.mapResolvedHandlersToPrefix[t]:this.mapResolvedHandlersToPrefix[t]=i.TPromise.as(e.instantiate(this.instantiationService))},t.prototype.layout=function(e){this.layoutDimensions=e,this.quickOpenWidget&&this.quickOpenWidget.layout(this.layoutDimensions),this.pickOpenWidget&&this.pickOpenWidget.layout(this.layoutDimensions)},t.prototype.dispose=function(){this.quickOpenWidget&&this.quickOpenWidget.dispose(),this.pickOpenWidget&&this.pickOpenWidget.dispose(),e.prototype.dispose.call(this)},t.MAX_SHORT_RESPONSE_TIME=500,t.ID="workbench.component.quickopen",t=a([l(0,$.IEditorGroupsService),l(1,G.INotificationService),l(2,M.IContextKeyService),l(3,L.IConfigurationService),l(4,R.IInstantiationService),l(5,x.IPartService),l(6,B.IEnvironmentService),l(7,N.IThemeService)],t)}(I.Component);t.QuickOpenController=X;var Q=function(e){function t(t){var n=e.call(this)||this;return n.placeHolderLabel=t,n}return n(t,e),t.prototype.getLabel=function(){return this.placeHolderLabel
},t}(g.QuickOpenEntryGroup),Z=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t.label)||this;a._index=n,a.onPreview=i,a.onRemove=r,a.modeService=o,a.modelService=s,a.description=t.description,a.detail=t.detail,a.tooltip=t.tooltip,a.descriptionOcticons=t.description?K.parseOcticons(t.description):void 0,a.descriptionTooltip=a.descriptionOcticons?a.descriptionOcticons.text:void 0,a.hasSeparator=t.separator&&t.separator.border,a.separatorLabel=t.separator&&t.separator.label,a.alwaysShow=t.alwaysShow,a._action=t.action,a.payload=t.payload;var c=t;return a.resource=c.resource,a.fileKind=c.fileKind,a}return n(t,e),t.prototype.matchesFuzzy=function(e,t){this.labelOcticons||(this.labelOcticons=K.parseOcticons(this.getLabel()));var n=this.getDetail();return n&&t.matchOnDetail&&!this.detailOcticons&&(this.detailOcticons=K.parseOcticons(n)),{labelHighlights:K.matchesFuzzyOcticonAware(e,this.labelOcticons),
descriptionHighlights:t.matchOnDescription&&this.descriptionOcticons?K.matchesFuzzyOcticonAware(e,this.descriptionOcticons):void 0,detailHighlights:t.matchOnDetail&&this.detailOcticons?K.matchesFuzzyOcticonAware(e,this.detailOcticons):void 0}},t.prototype.getPayload=function(){return this.payload},t.prototype.remove=function(){e.prototype.setHidden.call(this,!0),this.removed=!0,this.onRemove()},t.prototype.isHidden=function(){return this.removed||e.prototype.isHidden.call(this)},Object.defineProperty(t.prototype,"action",{get:function(){return this._action},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),t.prototype.getLabelOptions=function(){return{extraClasses:this.resource?C.getIconClasses(this.modelService,this.modeService,this.resource,this.fileKind):[]}},Object.defineProperty(t.prototype,"shouldRunWithContext",{get:function(){return this._shouldRunWithContext},enumerable:!0,configurable:!0}),
t.prototype.getDescription=function(){return this.description},t.prototype.getDetail=function(){return this.detail},t.prototype.getTooltip=function(){return this.tooltip},t.prototype.getDescriptionTooltip=function(){return this.descriptionTooltip},t.prototype.showBorder=function(){return this.hasSeparator},t.prototype.getGroupLabel=function(){return this.separatorLabel},t.prototype.shouldAlwaysShow=function(){return this.alwaysShow},t.prototype.getResource=function(){return this.resource},t.prototype.run=function(e,t){return e===f.Mode.OPEN?(this._shouldRunWithContext=t,!0):(e===f.Mode.PREVIEW&&this.onPreview&&this.onPreview(),!1)},t=a([l(4,_.IModeService),l(5,E.IModelService)],t)}(Q),J=function(){function e(){}return e.prototype.hasActions=function(e,t){return!!t.action},e.prototype.getActions=function(e,t){return i.TPromise.as(t.action?[t.action]:[])},e.prototype.hasSecondaryActions=function(e,t){return!1},e.prototype.getSecondaryActions=function(e,t){return i.TPromise.as([])},
e.prototype.getActionItem=function(e,t,n){return null},e}(),ee=function(){function e(e,t,n){this.historyService=e,this.instantiationService=t,this.fileService=n,this.scorerCache=Object.create(null)}return e.prototype.getResults=function(e){var t=this,n=z.prepareQuery(e),i=this.historyService.getHistory();if(!n.value)return i.map(function(e){return t.instantiationService.createInstance(oe,e)});var r=n.containsPathSeparator?ne:ie;return i.filter(function(e){return!!(e instanceof w.EditorInput?Y(e,t.fileService):e.resource)}).map(function(e){return t.instantiationService.createInstance(oe,e)}).filter(function(e){var i=z.scoreItem(e,n,!1,r,t.scorerCache);return!!i.score&&(e.setHighlights(i.labelMatch,i.descriptionMatch),!0)}).sort(function(e,i){return z.compareItemsByScore(e,i,n,!1,r,t.scorerCache,function(e,t,n,i){return-1})})},e=a([l(0,P.IHistoryService),l(1,R.IInstantiationService),l(2,V.IFileService)],e)}(),te=function(e){function t(t){var n=e.call(this)||this;return n.allowMatchOnDescription=t,n}
return n(t,e),t.prototype.getItemDescription=function(e){return this.allowMatchOnDescription?e.getDescription():void 0},t}(g.QuickOpenItemAccessorClass),ne=new te(!0),ie=new te(!1),re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(g.QuickOpenEntryGroup);t.EditorHistoryEntryGroup=re;var oe=function(e){function t(t,n,i,r,o,s,a,l,u){var d=e.call(this,n)||this;if(d.modeService=i,d.modelService=r,d.textFileService=o,d.configurationService=a,d.input=t,t instanceof w.EditorInput)d.resource=Y(t,u),d.label=t.getName(),d.description=t.getDescription(),d.dirty=t.isDirty();else{var h=t;d.resource=h.resource,d.label=y.getBaseLabel(h.resource),d.description=y.getPathLabel(c.dirname(d.resource),l,s),d.dirty=d.resource&&d.textFileService.isDirty(d.resource),d.dirty&&d.textFileService.getAutoSaveMode()===b.AutoSaveMode.AFTER_SHORT_DELAY&&(d.dirty=!1)}return d}return n(t,e),t.prototype.getIcon=function(){return this.dirty?"dirty":""},t.prototype.getLabel=function(){return this.label},
t.prototype.getLabelOptions=function(){return{extraClasses:C.getIconClasses(this.modelService,this.modeService,this.resource)}},t.prototype.getAriaLabel=function(){return r.localize(6,null,this.getLabel())},t.prototype.getDescription=function(){return this.description},t.prototype.getResource=function(){return this.resource},t.prototype.getInput=function(){return this.input},t.prototype.run=function(t,n){if(t===f.Mode.OPEN){var i=!n.quickNavigateConfiguration&&(n.keymods.alt||n.keymods.ctrlCmd),r=!this.configurationService.getValue().workbench.editor.enablePreviewFromQuickOpen||n.keymods.alt;return this.input instanceof w.EditorInput?this.editorService.openEditor(this.input,{pinned:r},i?q.SIDE_GROUP:q.ACTIVE_GROUP):this.editorService.openEditor({resource:this.input.resource,options:{pinned:r}},i?q.SIDE_GROUP:q.ACTIVE_GROUP),!0}return e.prototype.run.call(this,t,n)},
t=a([l(1,q.IEditorService),l(2,_.IModeService),l(3,E.IModelService),l(4,b.ITextFileService),l(5,O.IWorkspaceContextService),l(6,L.IConfigurationService),l(7,B.IEnvironmentService),l(8,V.IFileService)],t)}(k.EditorQuickOpenEntry);t.EditorHistoryEntry=oe;var se=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.quickOpenService=i,s.instantiationService=r,s.historyService=o,s}return n(t,e),t.prototype.run=function(){var e=this,t=this.historyService.getHistory().map(function(t){var n=e.instantiationService.createInstance(oe,t);return{input:t,resource:n.getResource(),label:n.getLabel(),description:n.getDescription()}});return this.quickOpenService.pick(t,{placeHolder:r.localize(8,null),autoFocus:{autoFocusFirstEntry:!0},matchOnDescription:!0}).then(function(t){t&&e.historyService.remove(t.input)})},t.ID="workbench.action.removeFromEditorHistory",t.LABEL=r.localize(7,null),t=a([l(2,A.IQuickOpenService),l(3,R.IInstantiationService),l(4,P.IHistoryService)],t)}(h.Action)
;t.RemoveFromEditorHistoryAction=se}),define(e[1476],t([1,0,16,64,31,56,52,520,164,179]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.closeQuickOpen",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:c.inQuickOpenContext,primary:9,secondary:[1033],handler:function(e){e.get(i.IQuickOpenService).close();return e.get(l.IQuickInputService).cancel()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.acceptSelectedQuickOpenItem",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:c.inQuickOpenContext,primary:null,handler:function(e){e.get(i.IQuickOpenService).accept();return e.get(l.IQuickInputService).accept()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.focusQuickOpen",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:c.inQuickOpenContext,primary:null,handler:function(e){
e.get(i.IQuickOpenService).focus();e.get(l.IQuickInputService).focus()}});var u=n.Registry.as(o.Extensions.WorkbenchActions),d={primary:2094,secondary:[2083],mac:{primary:2094,secondary:null}};s.KeybindingsRegistry.registerKeybindingRule({id:c.QUICKOPEN_ACTION_ID,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:d.primary,secondary:d.secondary,mac:d.mac}),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:c.QUICKOPEN_ACTION_ID,title:c.QUICKOPEN_ACION_LABEL}}),u.registerWorkbenchAction(new r.SyncActionDescriptor(c.QuickOpenSelectNextAction,c.QuickOpenSelectNextAction.ID,c.QuickOpenSelectNextAction.LABEL,{primary:null,mac:{primary:300}},c.inQuickOpenContext,s.KeybindingsRegistry.WEIGHT.workbenchContrib(50)),"Select Next in Quick Open"),u.registerWorkbenchAction(new r.SyncActionDescriptor(c.QuickOpenSelectPreviousAction,c.QuickOpenSelectPreviousAction.ID,c.QuickOpenSelectPreviousAction.LABEL,{primary:null,mac:{primary:302}
},c.inQuickOpenContext,s.KeybindingsRegistry.WEIGHT.workbenchContrib(50)),"Select Previous in Quick Open"),u.registerWorkbenchAction(new r.SyncActionDescriptor(c.QuickOpenNavigateNextAction,c.QuickOpenNavigateNextAction.ID,c.QuickOpenNavigateNextAction.LABEL),"Navigate Next in Quick Open"),u.registerWorkbenchAction(new r.SyncActionDescriptor(c.QuickOpenNavigatePreviousAction,c.QuickOpenNavigatePreviousAction.ID,c.QuickOpenNavigatePreviousAction.LABEL),"Navigate Previous in Quick Open"),u.registerWorkbenchAction(new r.SyncActionDescriptor(a.RemoveFromEditorHistoryAction,a.RemoveFromEditorHistoryAction.ID,a.RemoveFromEditorHistoryAction.LABEL),"Remove From History");s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigateNextInFilePicker",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(50),handler:c.getQuickNavigateHandler("workbench.action.quickOpenNavigateNextInFilePicker",!0),when:c.defaultQuickOpenContext,primary:d.primary,secondary:d.secondary,mac:d.mac})
;s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigatePreviousInFilePicker",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(50),handler:c.getQuickNavigateHandler("workbench.action.quickOpenNavigatePreviousInFilePicker",!1),when:c.defaultQuickOpenContext,primary:1024|d.primary,secondary:[1024|d.secondary[0]],mac:{primary:1024|d.mac.primary,secondary:null}})}),define(e[1477],t([1,0,9,153,5,48,91,17,33]),function(e,t,n,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=u.CONTENT_CHANGE_EVENT_BUFFER_DELAY+500,h=function(){function e(e,t,n,i){this.backupFileService=e,this.textFileService=t,this.untitledEditorService=n,this.configurationService=i,this.toDispose=[],this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.textFileService.models.onModelContentChanged(function(t){return e.onTextFileModelChanged(t)})),this.toDispose.push(this.textFileService.models.onModelSaved(function(t){
return e.discardBackup(t.resource)})),this.toDispose.push(this.textFileService.models.onModelDisposed(function(t){return e.discardBackup(t)})),this.toDispose.push(this.untitledEditorService.onDidChangeContent(function(t){return e.onUntitledModelChanged(t)})),this.toDispose.push(this.untitledEditorService.onDidDisposeModel(function(t){return e.discardBackup(t)})),this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationChange(e.configurationService.getValue())}))},e.prototype.onConfigurationChange=function(e){e&&e.files?this.configuredAutoSaveAfterDelay=e.files.autoSave===u.AutoSaveConfiguration.AFTER_DELAY&&e.files.autoSaveDelay<=d:this.configuredAutoSaveAfterDelay=!1},e.prototype.onTextFileModelChanged=function(e){if(e.kind===o.StateChange.REVERTED)this.discardBackup(e.resource);else if(e.kind===o.StateChange.CONTENT_CHANGE&&!this.configuredAutoSaveAfterDelay){var t=this.textFileService.models.get(e.resource)
;this.backupFileService.backupResource(t.getResource(),t.createSnapshot(),t.getVersionId()).done(null,n.onUnexpectedError)}},e.prototype.onUntitledModelChanged=function(e){var t=this;this.untitledEditorService.isDirty(e)?this.untitledEditorService.loadOrCreate({resource:e}).then(function(n){return t.backupFileService.backupResource(e,n.createSnapshot(),n.getVersionId())}).done(null,n.onUnexpectedError):this.discardBackup(e)},e.prototype.discardBackup=function(e){this.backupFileService.discardResourceBackup(e).done(null,n.onUnexpectedError)},e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose)},e=a([l(0,i.IBackupFileService),l(1,o.ITextFileService),l(2,s.IUntitledEditorService),l(3,c.IConfigurationService)],e)}();t.BackupModelTracker=h}),define(e[1478],t([1,0,4,91,9,153,21,48,43,38,33]),function(e,t,n,i,r,o,s,c,u,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n,i,r,o){this.untitledEditorService=e,this.editorService=t,
this.backupFileService=n,this.textFileService=i,this.lifecycleService=r,this.fileService=o,this.restoreBackups()}return e.prototype.restoreBackups=function(){var e=this;this.lifecycleService.when(d.LifecyclePhase.Running).then(function(){e.doRestoreBackups().done(null,r.onUnexpectedError)})},e.prototype.doRestoreBackups=function(){var e=this;return this.backupFileService.getWorkspaceFileBackups().then(function(t){return e.doResolveOpenedBackups(t).then(function(t){if(t.length>0)return e.doOpenEditors(t).then(function(){return e.doResolveOpenedBackups(t)})})})},e.prototype.doResolveOpenedBackups=function(e){var t=this,i=[],r=[];return e.forEach(function(e){t.editorService.isOpen({resource:e})?t.fileService.canHandleResource(e)?i.push(t.textFileService.models.loadOrCreate(e).then(null,function(){return r.push(e)})):e.scheme===u.Schemas.untitled&&i.push(t.untitledEditorService.loadOrCreate({resource:e}).then(null,function(){return r.push(e)})):r.push(e)}),n.TPromise.join(i).then(function(){return r},function(){
return r})},e.prototype.doOpenEditors=function(e){var t=this,n=this.editorService.visibleEditors.length>0,i=e.map(function(e,i){return t.resolveInput(e,i,n)});return this.editorService.openEditors(i).then(function(){})},e.prototype.resolveInput=function(t,n,i){var r={pinned:!0,preserveFocus:!0,inactive:n>0||i};return t.scheme!==u.Schemas.untitled||e.UNTITLED_REGEX.test(t.fsPath)?{resource:t,options:r}:{filePath:t.fsPath,options:r}},e.UNTITLED_REGEX=/Untitled-\d+/,e=a([l(0,i.IUntitledEditorService),l(1,s.IEditorService),l(2,o.IBackupFileService),l(3,c.ITextFileService),l(4,d.ILifecycleService),l(5,h.IFileService)],e)}();t.BackupRestorer=p}),define(e[1479],t([1,0,16,75,1477,1478,38]),function(e,t,n,i,r,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(r.BackupModelTracker,s.LifecyclePhase.Starting),n.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(o.BackupRestorer,s.LifecyclePhase.Starting)}),
define(e[1480],t([1,0,8,251,4,6,138,516]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(){}return e.prototype.getId=function(e,t){return t instanceof c.CommentsModel?"root":t instanceof c.ResourceWithCommentThreads?t.id:t instanceof c.CommentNode?t.comment.commentId:""},e.prototype.hasChildren=function(e,t){return t instanceof c.CommentsModel||t instanceof c.ResourceWithCommentThreads||t instanceof c.CommentNode&&!!t.replies.length},e.prototype.getChildren=function(e,t){return t instanceof c.CommentsModel?r.Promise.as(t.resourceCommentThreads):t instanceof c.ResourceWithCommentThreads?r.Promise.as(t.commentThreads):t instanceof c.CommentNode?r.Promise.as(t.replies):null},e.prototype.getParent=function(e,t){return r.TPromise.as(null)},e.prototype.shouldAutoexpand=function(e,t){return!0},e}();t.CommentsDataSource=u;var d=function(){function e(e){this.instantiationService=e}return e.prototype.getHeight=function(e,t){return 22},
e.prototype.getTemplateId=function(t,n){return n instanceof c.ResourceWithCommentThreads?e.RESOURCE_ID:n instanceof c.CommentNode?e.COMMENT_ID:""},e.prototype.renderTemplate=function(t,n,i){switch(n){case e.RESOURCE_ID:return this.renderResourceTemplate(i);case e.COMMENT_ID:return this.renderCommentTemplate(i)}},e.prototype.disposeTemplate=function(t,n,i){switch(n){case e.RESOURCE_ID:i.resourceLabel.dispose()}},e.prototype.renderElement=function(t,n,i,r){switch(i){case e.RESOURCE_ID:return this.renderResourceElement(t,n,r);case e.COMMENT_ID:return this.renderCommentElement(t,n,r)}},e.prototype.renderResourceTemplate=function(e){var t=Object.create(null),i=n.append(e,n.$(".resource-container"));return t.resourceLabel=this.instantiationService.createInstance(s.FileLabel,i,{}),t},e.prototype.renderCommentTemplate=function(e){var t=Object.create(null),i=n.append(e,n.$(".comment-container"));return t.userName=n.append(i,n.$(".user")),t.commentText=n.append(i,n.$(".text")),t},
e.prototype.renderResourceElement=function(e,t,n){n.resourceLabel.setFile(t.resource)},e.prototype.renderCommentElement=function(e,t,n){n.userName.textContent=t.comment.userName,n.commentText.innerHTML=i.renderMarkdown(t.comment.body,{inline:!0}).innerHTML},e.RESOURCE_ID="resource-with-comments",e.COMMENT_ID="comment-node",e=a([l(0,o.IInstantiationService)],e)}();t.CommentsModelRenderer=d;var h=function(){function e(){}return e.prototype.isVisible=function(e,t){return t instanceof c.CommentsModel?t.resourceCommentThreads.length>0:!(t instanceof c.ResourceWithCommentThreads)||t.commentThreads.length>0},e}();t.CommentsDataFilter=h}),define(e[521],t([1,0,8,7,117,45,6,58,28,12,108,516,335,1480,283,21,29,872]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMENTS_PANEL_ID="workbench.panel.comments",t.COMMENTS_PANEL_TITLE="Comments";var S=function(e){function p(n,i,r,o,s,a){var c=e.call(this,t.COMMENTS_PANEL_ID,s,a)||this
;return c.instantiationService=n,c.commentService=i,c.editorService=r,c.commandService=o,c}return n(p,e),p.prototype.create=function(t){e.prototype.create.call(this,t),i.addClass(t,"comments-panel");var n=i.append(t,i.$(".comments-panel-container"));return this.treeContainer=i.append(n,i.$(".tree-container")),this.commentsModel=new f.CommentsModel,this.createTree(),this.createMessageBox(n),this.commentService.onDidSetAllCommentThreads(this.onAllCommentsChanged,this),this.commentService.onDidUpdateCommentThreads(this.onCommentsUpdated,this),this.render()},p.prototype.render=function(){var e=this;return i.toggleClass(this.treeContainer,"hidden",!this.commentsModel.hasCommentThreads()),this.tree.setInput(this.commentsModel).then(function(){e.renderMessage()})},p.prototype.getActions=function(){return this.collapseAllAction||(this.collapseAllAction=this.instantiationService.createInstance(o.CollapseAllAction,this.tree,this.commentsModel.hasCommentThreads()),this.toUnbind.push(this.collapseAllAction)),
[this.collapseAllAction]},p.prototype.layout=function(e){this.tree.layout(e.height,e.width)},p.prototype.getTitle=function(){return t.COMMENTS_PANEL_TITLE},p.prototype.createMessageBox=function(e){this.messageBoxContainer=i.append(e,i.$(".message-box-container")),this.messageBox=i.append(this.messageBoxContainer,i.$("span")),this.messageBox.setAttribute("tabindex","0")},p.prototype.renderMessage=function(){this.messageBox.textContent=this.commentsModel.getMessage(),i.toggleClass(this.messageBoxContainer,"hidden",this.commentsModel.hasCommentThreads())},p.prototype.createTree=function(){var e=this;this.tree=this.instantiationService.createInstance(u.WorkbenchTree,this.treeContainer,{dataSource:new v.CommentsDataSource,renderer:new v.CommentsModelRenderer(this.instantiationService),accessibilityProvider:new o.DefaultAccessibilityProvider,controller:new o.DefaultController,dnd:new o.DefaultDragAndDrop,filter:new v.CommentsDataFilter},{twistiePixels:20,ariaLabel:t.COMMENTS_PANEL_TITLE})
;var n=this._register(new u.TreeResourceNavigator(this.tree,{openOnFocus:!0}));this._register(r.debounceEvent(n.openResource,function(e,t){return t},100,!0)(function(t){e.openFile(t.element,t.editorOptions.pinned,t.editorOptions.preserveFocus,t.sideBySide)}))},p.prototype.openFile=function(e,t,n,i){var r,o=this;if(!e)return!1;if(!(e instanceof f.ResourceWithCommentThreads||e instanceof f.CommentNode))return!1;var a=e instanceof f.ResourceWithCommentThreads?e.commentThreads[0].range:e.range,c=this.editorService.activeEditor,l=c?c.getResource():void 0;if(l&&l.toString()===e.resource.toString()){var u=e instanceof f.ResourceWithCommentThreads?e.commentThreads[0].threadId:e.threadId,d=e instanceof f.ResourceWithCommentThreads?e.commentThreads[0].comment.commentId:e.comment.commentId,h=this.editorService.activeTextEditorWidget;if(u&&s.isCodeEditor(h)){g.ReviewController.get(h).revealCommentThread(u,d)}return!0}var p=new Promise(function(t,n){o.commentService.onDidSetResourceCommentInfos(function(n){
n.resource.toString()===e.resource.toString()&&t()})}),v=e instanceof f.ResourceWithCommentThreads?e.commentThreads[0].threadId:e.threadId,m=e instanceof f.ResourceWithCommentThreads?e.commentThreads[0].comment:e.comment;return m.command?Promise.all([(r=this.commandService).executeCommand.apply(r,[m.command.id].concat(m.command.arguments)),p]).then(function(t){var n=o.editorService.activeTextEditorWidget;if(s.isDiffEditor(n)){var i=n.getOriginalEditor(),r=n.getModifiedEditor(),a=void 0;i.getModel().uri.toString()===e.resource.toString()?a=g.ReviewController.get(i):r.getModel().uri.toString()===e.resource.toString()&&(a=g.ReviewController.get(r)),a&&a.revealCommentThread(v,m.commentId)}else{var c=o.editorService.activeEditor,l=c?c.getResource():void 0;if(l&&l.toString()===e.resource.toString()){var u=o.editorService.activeTextEditorWidget;if(v&&s.isCodeEditor(u)){(a=g.ReviewController.get(u)).revealCommentThread(v,m.commentId)}}}return!0}):Promise.all([this.editorService.openEditor({resource:e.resource,
options:{pinned:t,preserveFocus:n,selection:a}},i?y.SIDE_GROUP:y.ACTIVE_GROUP),p]).then(function(e){var t=e[0].getControl();if(v&&s.isCodeEditor(t)){var n=g.ReviewController.get(t);console.log(m.command),n.revealCommentThread(v,m.commentId)}p=null}),!0},p.prototype.refresh=function(){var e=this;this.isVisible()&&(this.collapseAllAction.enabled=this.commentsModel.hasCommentThreads(),i.toggleClass(this.treeContainer,"hidden",!this.commentsModel.hasCommentThreads()),this.tree.refresh().then(function(){e.renderMessage()},function(e){console.log(e)}))},p.prototype.onAllCommentsChanged=function(e){this.commentsModel.setCommentThreads(e.ownerId,e.commentThreads),this.refresh()},p.prototype.onCommentsUpdated=function(e){this.commentsModel.updateCommentThreads(e),this.refresh()},p=a([l(0,c.IInstantiationService),l(1,m.ICommentService),l(2,y.IEditorService),l(3,b.ICommandService),l(4,d.ITelemetryService),l(5,h.IThemeService)],p)}(p.Panel);t.CommentsPanel=S}),
define(e[1482],t([1,0,5,45,71,67,50,21,61,283,521,81,335]),function(e,t,i,r,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s._editorService=n,s._commentService=i,s._panelService=r,s._codeEditorService=o,s._documentProviders=new Map,s._workspaceProviders=new Map,s._disposables=[],s._proxy=t.getProxy(p.ExtHostContext.ExtHostComments),s._disposables.push(s._editorService.onDidActiveEditorChange(function(e){var t=s.getFocusedEditors();t&&t.length&&t.forEach(function(e){if(m.ReviewController.get(e)&&e.getModel()){var t=e.getModel().uri;s.provideDocumentComments(t).then(function(e){s._commentService.setDocumentComments(t,e.filter(function(e){return null!==e}))})}})})),s}return n(t,e),t.prototype.$registerDocumentCommentProvider=function(e){var t=this;this._documentProviders.set(e,void 0),this._commentService.registerDataProvider(e,{provideDocumentComments:function(n,i){return o(t,void 0,void 0,function(){
return s(this,function(t){return[2,this._proxy.$provideDocumentComments(e,n)]})})},onDidChangeCommentThreads:null,createNewCommentThread:function(n,i,r,a){return o(t,void 0,void 0,function(){return s(this,function(t){return[2,this._proxy.$createNewCommentThread(e,n,i,r)]})})},replyToCommentThread:function(n,i,r,a,c){return o(t,void 0,void 0,function(){return s(this,function(t){return[2,this._proxy.$replyToCommentThread(e,n,i,r,a)]})})}})},t.prototype.$registerWorkspaceCommentProvider=function(e){var t=this;this._workspaceProviders.set(e,void 0),this._panelService.setPanelEnablement(g.COMMENTS_PANEL_ID,!0),this._panelService.openPanel(g.COMMENTS_PANEL_ID),this._proxy.$provideWorkspaceComments(e).then(function(n){n&&t._commentService.setWorkspaceComments(e,n)})},t.prototype.$unregisterDocumentCommentProvider=function(e){this._documentProviders.delete(e),this._commentService.unregisterDataProvider(e)},t.prototype.$unregisterWorkspaceCommentProvider=function(e){this._workspaceProviders.delete(e),
0===this._workspaceProviders.size&&this._panelService.setPanelEnablement(g.COMMENTS_PANEL_ID,!1),this._commentService.removeWorkspaceComments(e)},t.prototype.$onDidCommentThreadsChange=function(e,t){this._commentService.updateComments(t)},t.prototype.dispose=function(){this._disposables=i.dispose(this._disposables),this._workspaceProviders.forEach(function(e){return i.dispose(e)}),this._workspaceProviders.clear(),this._documentProviders.forEach(function(e){return i.dispose(e)}),this._documentProviders.clear()},t.prototype.getFocusedEditors=function(){var e=this._editorService.activeControl;if(e){if(r.isCodeEditor(e.getControl()))return[this._editorService.activeControl.getControl()];if(r.isDiffEditor(e.getControl())){var t=e.getControl();return[t.getOriginalEditor(),t.getModifiedEditor()]}}var n=this._codeEditorService.getFocusedCodeEditor();return n?[n]:[]},t.prototype.provideWorkspaceComments=function(){return o(this,void 0,void 0,function(){var e,t,n,i,r,o,a;return s(this,function(s){switch(s.label){
case 0:e=[],t=0,n=d.keys(this._workspaceProviders),s.label=1;case 1:return t<n.length?(i=n[t],o=(r=e.push).apply,a=[e],[4,this._proxy.$provideWorkspaceComments(i)]):[3,4];case 2:o.apply(r,a.concat([s.sent()])),s.label=3;case 3:return t++,[3,1];case 4:return[2,e]}})})},t.prototype.provideDocumentComments=function(e){return o(this,void 0,void 0,function(){var t,n,i,r,o,a;return s(this,function(s){switch(s.label){case 0:t=[],n=0,i=d.keys(this._documentProviders),s.label=1;case 1:return n<i.length?(r=i[n],a=(o=t).push,[4,this._proxy.$provideDocumentComments(r,e)]):[3,4];case 2:a.apply(o,[s.sent()]),s.label=3;case 3:return n++,[3,1];case 4:return[2,t]}})})},t=a([u.extHostNamedCustomer(p.MainContext.MainThreadComments),l(1,h.IEditorService),l(2,f.ICommentService),l(3,v.IPanelService),l(4,c.ICodeEditorService)],t)}(i.Disposable);t.MainThreadComments=y}),define(e[1483],t([1,0,38,107,16,108,75,81,521,283,335]),function(e,t,n,i,r,o,s,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){
function e(e){e.setPanelEnablement(u.COMMENTS_PANEL_ID,!1)}return e=a([l(0,c.IPanelService)],e)}();t.CommentPanelVisibilityUpdater=h,r.Registry.as(o.Extensions.Panels).registerPanel(new o.PanelDescriptor(u.CommentsPanel,u.COMMENTS_PANEL_ID,u.COMMENTS_PANEL_TITLE,"commentsPanel",10)),r.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(h,n.LifecyclePhase.Restoring),i.registerSingleton(d.ICommentService,d.CommentService)}),define(e[1484],t([1,0,643,96,48,11,42,38,5,175,91,20,21]),function(e,t,n,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(e,t,n,i,r,o){this.textFileService=e,this.lifecycleService=t,this.editorService=n,this.activityService=i,this.windowService=r,this.untitledEditorService=o,this.toUnbind=[],this.isDocumentedEdited=!1,this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.untitledEditorService.onDidChangeDirty(function(t){return e.onUntitledDidChangeDirty(t)})),
this.toUnbind.push(this.textFileService.models.onModelsDirty(function(t){return e.onTextFilesDirty(t)})),this.toUnbind.push(this.textFileService.models.onModelsSaved(function(t){return e.onTextFilesSaved(t)})),this.toUnbind.push(this.textFileService.models.onModelsSaveError(function(t){return e.onTextFilesSaveError(t)})),this.toUnbind.push(this.textFileService.models.onModelsReverted(function(t){return e.onTextFilesReverted(t)})),this.lifecycleService.onShutdown(this.dispose,this)},e.prototype.onUntitledDidChangeDirty=function(e){var t=this.untitledEditorService.isDirty(e);(!this.isDocumentedEdited&&t||this.isDocumentedEdited&&!t)&&this.updateDocumentEdited(),(t||this.lastDirtyCount>0)&&this.updateActivityBadge()},e.prototype.onTextFilesDirty=function(e){var t=this;this.textFileService.getAutoSaveMode()===r.AutoSaveMode.AFTER_SHORT_DELAY||this.isDocumentedEdited||this.updateDocumentEdited(),this.textFileService.getAutoSaveMode()!==r.AutoSaveMode.AFTER_SHORT_DELAY&&this.updateActivityBadge(),
this.doOpenDirtyResources(p.distinct(e.filter(function(e){var n=t.textFileService.models.get(e.resource);return n&&n.isDirty()&&!n.hasState(r.ModelState.PENDING_SAVE)&&!t.editorService.isOpen({resource:e.resource})}).map(function(e){return e.resource}),function(e){return e.toString()}))},e.prototype.doOpenDirtyResources=function(e){var t=this.editorService.activeControl;this.editorService.openEditors(e.map(function(e){return{resource:e,options:{inactive:!0,pinned:!0,preserveFocus:!0}}}),t?t.group:f.ACTIVE_GROUP)},e.prototype.onTextFilesSaved=function(e){this.isDocumentedEdited&&this.updateDocumentEdited(),this.lastDirtyCount>0&&this.updateActivityBadge()},e.prototype.onTextFilesSaveError=function(e){this.isDocumentedEdited||this.updateDocumentEdited(),this.updateActivityBadge()},e.prototype.onTextFilesReverted=function(e){this.isDocumentedEdited&&this.updateDocumentEdited(),this.lastDirtyCount>0&&this.updateActivityBadge()},e.prototype.updateActivityBadge=function(){
var e=this.textFileService.getDirty().length;this.lastDirtyCount=e,u.dispose(this.badgeHandle),e>0&&(this.badgeHandle=this.activityService.showActivity(i.VIEWLET_ID,new d.NumberBadge(e,function(t){return 1===t?n.localize(0,null):n.localize(1,null,e)}),"explorer-viewlet-label"))},e.prototype.updateDocumentEdited=function(){if(o.platform===o.Platform.Mac){var e=this.textFileService.isDirty();this.isDocumentedEdited=e,this.windowService.setDocumentEdited(e)}},e.prototype.dispose=function(){this.toUnbind=u.dispose(this.toUnbind)},e=a([l(0,r.ITextFileService),l(1,c.ILifecycleService),l(2,f.IEditorService),l(3,d.IActivityService),l(4,s.IWindowService),l(5,h.IUntitledEditorService)],e)}();t.DirtyFilesTracker=g}),define(e[1485],t([1,0,4,8,43,25,204,138,194,90,229,228,6,68,12,62,36]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(){}return e.prototype.getId=function(e,t){
return t instanceof h.MarkersModel?"root":t instanceof h.NodeWithId?t.id:""},e.prototype.hasChildren=function(e,t){return t instanceof h.MarkersModel||t instanceof h.ResourceMarkers||t instanceof h.Marker&&t.resourceRelatedInformation.length>0},e.prototype.getChildren=function(e,t){return t instanceof h.MarkersModel?n.Promise.as(t.resources):t instanceof h.ResourceMarkers?n.Promise.as(t.markers):t instanceof h.Marker&&t.resourceRelatedInformation.length>0?n.Promise.as(t.resourceRelatedInformation):null},e.prototype.getParent=function(e,t){return n.TPromise.as(null)},e}();t.DataSource=b;var S=function(){function e(){}return e.prototype.isVisible=function(e,t){return t instanceof h.ResourceMarkers?t.filteredCount>0:!(t instanceof h.Marker)||t.isSelected},e}();t.DataFilter=S;var _=function(){function e(e,t,n){this.instantiationService=e,this.themeService=t,this.environmentService=n}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(t,n){
return n instanceof h.ResourceMarkers?n.uri.scheme===r.Schemas.file||n.uri.scheme===r.Schemas.untitled?e.FILE_RESOURCE_MARKERS_TEMPLATE_ID:e.RESOURCE_MARKERS_TEMPLATE_ID:n instanceof h.Marker?e.MARKER_TEMPLATE_ID:n instanceof h.RelatedInformation?e.RELATED_INFO_TEMPLATE_ID:""},e.prototype.renderTemplate=function(t,n,r){switch(i.addClass(r,"markers-panel-tree-entry"),n){case e.FILE_RESOURCE_MARKERS_TEMPLATE_ID:return this.renderFileResourceMarkersTemplate(r);case e.RESOURCE_MARKERS_TEMPLATE_ID:return this.renderResourceMarkersTemplate(r);case e.MARKER_TEMPLATE_ID:return this.renderMarkerTemplate(r);case e.RELATED_INFO_TEMPLATE_ID:return this.renderRelatedInfoTemplate(r)}},e.prototype.renderFileResourceMarkersTemplate=function(e){var t=Object.create(null),n=i.append(e,i.$(".resource-label-container"));t.resourceLabel=this.instantiationService.createInstance(c.FileLabel,n,{supportHighlights:!0});var r=i.append(e,i.$(".count-badge-wrapper"));return t.count=new s.CountBadge(r),
t.styler=g.attachBadgeStyler(t.count,this.themeService),t},e.prototype.renderResourceMarkersTemplate=function(e){var t=Object.create(null),n=i.append(e,i.$(".resource-label-container"));t.resourceLabel=this.instantiationService.createInstance(c.ResourceLabel,n,{supportHighlights:!0});var r=i.append(e,i.$(".count-badge-wrapper"));return t.count=new s.CountBadge(r),t.styler=g.attachBadgeStyler(t.count,this.themeService),t},e.prototype.renderRelatedInfoTemplate=function(e){var t=Object.create(null);t.resourceLabel=new u.HighlightedLabel(i.append(e,i.$(".related-info-resource"))),t.lnCol=i.append(e,i.$("span.marker-line"));var n=i.append(e,i.$("span.related-info-resource-separator"));return n.textContent=":",n.style.paddingRight="4px",t.description=new u.HighlightedLabel(i.append(e,i.$(".marker-description"))),t},e.prototype.renderMarkerTemplate=function(e){var t=Object.create(null);return t.icon=i.append(e,i.$(".marker-icon")),t.source=new u.HighlightedLabel(i.append(e,i.$(""))),
t.description=new u.HighlightedLabel(i.append(e,i.$(".marker-description"))),t.lnCol=i.append(e,i.$("span.marker-line")),t},e.prototype.renderElement=function(t,n,i,r){switch(i){case e.FILE_RESOURCE_MARKERS_TEMPLATE_ID:case e.RESOURCE_MARKERS_TEMPLATE_ID:return this.renderResourceMarkersElement(t,n,r);case e.MARKER_TEMPLATE_ID:return this.renderMarkerElement(t,n,r);case e.RELATED_INFO_TEMPLATE_ID:return this.renderRelatedInfoElement(t,n,r)}},e.prototype.renderResourceMarkersElement=function(e,t,n){n.resourceLabel instanceof c.FileLabel?n.resourceLabel.setFile(t.uri,{matches:t.uriMatches}):n.resourceLabel.setLabel({name:t.name,description:m.getPathLabel(t.uri,this.environmentService),resource:t.uri},{matches:t.uriMatches}),n.count.setCount(t.filteredCount)},e.prototype.renderMarkerElement=function(t,n,r){var o=n.raw;r.icon.className="icon "+e.iconClassNameFor(o),r.source.set(o.source,n.sourceMatches),i.toggleClass(r.source.element,"marker-source",!!o.source),r.description.set(o.message,n.messageMatches),
r.description.element.title=o.message,r.lnCol.textContent=p.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(o.startLineNumber,o.startColumn)},e.prototype.renderRelatedInfoElement=function(e,t,n){n.resourceLabel.set(o.basename(t.raw.resource.fsPath),t.uriMatches),n.resourceLabel.element.title=m.getPathLabel(t.raw.resource,this.environmentService),n.lnCol.textContent=p.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(t.raw.startLineNumber,t.raw.startColumn),n.description.set(t.raw.message,t.messageMatches),n.description.element.title=t.raw.message},e.iconClassNameFor=function(e){switch(e.severity){case d.MarkerSeverity.Hint:case d.MarkerSeverity.Info:return"info";case d.MarkerSeverity.Warning:return"warning";case d.MarkerSeverity.Error:return"error"}return""},e.prototype.disposeTemplate=function(t,n,i){n===e.RESOURCE_MARKERS_TEMPLATE_ID||n===e.FILE_RESOURCE_MARKERS_TEMPLATE_ID?(i.resourceLabel.dispose(),i.styler.dispose()):n===e.MARKER_TEMPLATE_ID?(i.description.dispose(),
i.source.dispose()):n===e.RELATED_INFO_TEMPLATE_ID&&(i.description.dispose(),i.resourceLabel.dispose())},e.RESOURCE_MARKERS_TEMPLATE_ID="resource-markers-template",e.FILE_RESOURCE_MARKERS_TEMPLATE_ID="file-resource-markers-template",e.MARKER_TEMPLATE_ID="marker-template",e.RELATED_INFO_TEMPLATE_ID="related-info-template",e=a([l(0,f.IInstantiationService),l(1,v.IThemeService),l(2,y.IEnvironmentService)],e)}();t.Renderer=_;var C=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof h.ResourceMarkers?p.default.MARKERS_TREE_ARIA_LABEL_RESOURCE(t.name,t.filteredCount):t instanceof h.Marker?p.default.MARKERS_TREE_ARIA_LABEL_MARKER(t):t instanceof h.RelatedInformation?p.default.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION(t.raw):null},e}();t.MarkersTreeAccessibilityProvider=C}),define(e[1486],t([1,0,9,4,18,8,28,108,21,201,229,1133,1485,6,476,17,228,420,12,7,58,368,176,34,225,665,898]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(t,n,i,r,s,a,c){var l=e.call(this,h.default.MARKERS_PANEL_ID,r,s)||this;return l.instantiationService=t,l.editorService=n,l.configurationService=i,l.markersWorkbenchService=a,l.lastSelectedRelativeTop=0,l.currentActiveResource=null,l.currentResourceGotAddedToMarkersData=!1,l.delayedRefresh=new o.Delayer(500),l.autoExpanded=new Set,l.panelSettings=l.getMemento(c,x.Scope.WORKSPACE),l}return n(t,e),t.prototype.create=function(t){e.prototype.create.call(this,t),this.rangeHighlightDecorations=this.instantiationService.createInstance(S.RangeHighlightDecorations),this.toUnbind.push(this.rangeHighlightDecorations),s.addClass(t,"markers-panel");var n=s.append(t,s.$(".markers-panel-container"));return this.createMessageBox(n),this.createTree(n),this.createActions(),this.createListeners(),this.updateFilter(),this.render()},t.prototype.getTitle=function(){return b.default.MARKERS_PANEL_TITLE_PROBLEMS},t.prototype.layout=function(e){
this.treeContainer.style.height=e.height+"px",this.tree.layout(e.height,e.width),this.filterInputActionItem.toggleLayout(e.width<1200)},t.prototype.focus=function(){this.tree.isDOMFocused()||(this.markersWorkbenchService.markersModel.hasFilteredResources()?(this.tree.domFocus(),0===this.tree.getSelection().length&&this.tree.focusFirst(),this.highlightCurrentSelectedMarkerRange(),this.autoReveal(!0)):this.messageBoxContainer.focus())},t.prototype.setVisible=function(t){var n=this,i=this.isVisible();return e.prototype.setVisible.call(this,t).then(function(){n.isVisible()?i||n.refreshPanel():n.rangeHighlightDecorations.removeHighlightRange()})},t.prototype.getActions=function(){return this.actions||this.createActions(),this.actions},t.prototype.openFileAtElement=function(e,t,n,r){var o=this,s=e instanceof p.Marker?{resource:e.resource,selection:e.range}:e instanceof p.RelatedInformation?{resource:e.raw.resource,selection:e.raw}:{resource:null,selection:null},a=s.resource,c=s.selection
;return a&&c?(this.editorService.openEditor({resource:a,options:{selection:c,preserveFocus:t,pinned:r,revealIfVisible:!0}},n?d.SIDE_GROUP:d.ACTIVE_GROUP).done(function(e){e&&t?o.rangeHighlightDecorations.highlightRange({resource:a,range:c},e.getControl()):o.rangeHighlightDecorations.removeHighlightRange()},i.onUnexpectedError),!0):(this.rangeHighlightDecorations.removeHighlightRange(),!1)},t.prototype.refreshPanel=function(){var e=this;return this.isVisible()&&(this.collapseAllAction.enabled=this.markersWorkbenchService.markersModel.hasFilteredResources(),s.toggleClass(this.treeContainer,"hidden",!this.markersWorkbenchService.markersModel.hasFilteredResources()),this.renderMessage(),this.markersWorkbenchService.markersModel.hasFilteredResources())?this.tree.refresh().then(function(){e.autoExpand()}):r.TPromise.as(null)},t.prototype.updateFilter=function(){this.autoExpanded=new Set,this.markersWorkbenchService.filter({filterText:this.filterInputActionItem.getFilterText(),
useFilesExclude:this.filterInputActionItem.useFilesExclude})},t.prototype.createMessageBox=function(e){this.messageBoxContainer=s.append(e,s.$(".message-box-container"))},t.prototype.createTree=function(e){var t=this;this.treeContainer=s.append(e,s.$(".tree-container")),s.addClass(this.treeContainer,"show-file-icons");var n=this.instantiationService.createInstance(g.Renderer),i=this.instantiationService.createInstance(I.SimpleFileResourceDragAndDrop,function(e){return e instanceof p.ResourceMarkers?e.uri:void 0}),r=this.instantiationService.createInstance(f.Controller);this.tree=this.instantiationService.createInstance(E.WorkbenchTree,this.treeContainer,{dataSource:new g.DataSource,filter:new g.DataFilter,renderer:n,controller:r,accessibilityProvider:new g.MarkersTreeAccessibilityProvider,dnd:i},{twistiePixels:20,ariaLabel:b.default.MARKERS_PANEL_ARIA_LABEL_PROBLEMS_TREE})
;var o=h.default.MarkerFocusContextKey.bindTo(this.tree.contextKeyService),a=h.default.RelatedInformationFocusContextKey.bindTo(this.tree.contextKeyService);this._register(this.tree.onDidChangeFocus(function(e){o.set(e.focus instanceof p.Marker),a.set(e.focus instanceof p.RelatedInformation)}));var c=this._register(s.trackFocus(this.tree.getHTMLElement()));this._register(c.onDidBlur(function(){o.set(!1),a.set(!1)}));var l=this._register(new E.TreeResourceNavigator(this.tree,{openOnFocus:!0}));this._register(C.debounceEvent(l.openResource,function(e,t){return t},75,!0)(function(e){t.openFileAtElement(e.element,e.editorOptions.preserveFocus,e.sideBySide,e.editorOptions.pinned)}))},t.prototype.createActions=function(){this.collapseAllAction=this.instantiationService.createInstance(m.CollapseAllAction,this.tree,!0);var e=this.instantiationService.createInstance(m.MarkersFilterAction);this.filterInputActionItem=this.instantiationService.createInstance(m.MarkersFilterActionItem,{
filterText:this.panelSettings.filter||"",filterHistory:this.panelSettings.filterHistory||[],useFilesExclude:!!this.panelSettings.useFilesExclude},e),this.actions=[e,this.collapseAllAction]},t.prototype.createListeners=function(){var e=this;this.toUnbind.push(this.markersWorkbenchService.onDidChange(function(t){return e.onDidChange(t)})),this.toUnbind.push(this.editorService.onDidActiveEditorChange(this.onActiveEditorChanged,this)),this.toUnbind.push(this.tree.onDidChangeSelection(function(){return e.onSelected()})),this.toUnbind.push(this.filterInputActionItem.onDidChange(function(){return e.updateFilter()})),this.actions.forEach(function(t){return e.toUnbind.push(t)})},t.prototype.onDidChange=function(e){var t=this;this.currentResourceGotAddedToMarkersData=this.currentResourceGotAddedToMarkersData||this.isCurrentResourceGotAddedToMarkersData(e),this.updateResources(e),this.delayedRefresh.trigger(function(){t.refreshPanel(),t.updateRangeHighlights(),t.currentResourceGotAddedToMarkersData&&(t.autoReveal(),
t.currentResourceGotAddedToMarkersData=!1)})},t.prototype.isCurrentResourceGotAddedToMarkersData=function(e){var t=this;if(!this.currentActiveResource)return!1;return!this.getResourceForCurrentActiveResource()&&e.some(function(e){return e.toString()===t.currentActiveResource.toString()})},t.prototype.onActiveEditorChanged=function(){var e=this.editorService.activeEditor;this.currentActiveResource=e?e.getResource():void 0,this.autoReveal()},t.prototype.onSelected=function(){var e=this.tree.getSelection();e&&e.length>0&&(this.lastSelectedRelativeTop=this.tree.getRelativeTop(e[0]))},t.prototype.updateResources=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];this.markersWorkbenchService.markersModel.hasResource(i)||this.autoExpanded.delete(i.toString())}},t.prototype.render=function(){var e=this;return s.toggleClass(this.treeContainer,"hidden",!this.markersWorkbenchService.markersModel.hasFilteredResources()),this.tree.setInput(this.markersWorkbenchService.markersModel).then(function(){e.renderMessage(),
e.autoExpand()})},t.prototype.renderMessage=function(){var e=this.markersWorkbenchService.markersModel,t=e.hasFilteredResources();s.clearNode(this.messageBoxContainer),s.toggleClass(this.messageBoxContainer,"hidden",t),t||(e.hasResources()?e.filterOptions.filter?this.renderFilteredByFilterMessage(this.messageBoxContainer):this.renderFilteredByFilesExcludeMessage(this.messageBoxContainer):this.renderNoProblemsMessage(this.messageBoxContainer))},t.prototype.renderFilteredByFilesExcludeMessage=function(e){var t=this;s.append(e,s.$("span")).textContent=b.default.MARKERS_PANEL_NO_PROBLEMS_FILE_EXCLUSIONS_FILTER;var n=s.append(e,s.$("a.messageAction"));n.textContent=k.localize(0,null),n.setAttribute("tabIndex","0"),s.addDisposableListener(n,s.EventType.CLICK,function(){return t.filterInputActionItem.useFilesExclude=!1})},t.prototype.renderFilteredByFilterMessage=function(e){var t=this;s.append(e,s.$("span")).textContent=b.default.MARKERS_PANEL_NO_PROBLEMS_FILTERS;var n=s.append(e,s.$("a.messageAction"))
;n.textContent=k.localize(1,null),n.setAttribute("tabIndex","0"),s.addDisposableListener(n,s.EventType.CLICK,function(){return t.filterInputActionItem.clear()})},t.prototype.renderNoProblemsMessage=function(e){s.append(e,s.$("span")).textContent=b.default.MARKERS_PANEL_NO_PROBLEMS_BUILT},t.prototype.autoExpand=function(){var e=this;this.markersWorkbenchService.markersModel.forEachFilteredResource(function(t){e.autoExpanded.has(t.uri.toString())||(e.tree.expand(t).done(null,i.onUnexpectedError),e.autoExpanded.add(t.uri.toString()))})},t.prototype.autoReveal=function(e){void 0===e&&(e=!1);var t=this.configurationService.getValue("problems.autoReveal");"boolean"==typeof t&&t&&this.revealMarkersForCurrentActiveEditor(e)},t.prototype.revealMarkersForCurrentActiveEditor=function(e){void 0===e&&(e=!1);var t=this.getResourceForCurrentActiveResource();t?this.tree.isExpanded(t)&&this.hasSelectedMarkerFor(t)?(this.tree.reveal(this.tree.getSelection()[0],this.lastSelectedRelativeTop),
e&&this.tree.setFocus(this.tree.getSelection()[0])):(this.tree.reveal(t,0),e&&(this.tree.setFocus(t),this.tree.setSelection([t]))):e&&(this.tree.setSelection([]),this.tree.focusFirst())},t.prototype.getResourceForCurrentActiveResource=function(){var e=this,t=null;return this.currentActiveResource&&this.markersWorkbenchService.markersModel.forEachFilteredResource(function(n){t||n.uri.toString()!==e.currentActiveResource.toString()||(t=n)}),t},t.prototype.hasSelectedMarkerFor=function(e){var t=this.tree.getSelection();return!!(t&&t.length>0&&t[0]instanceof p.Marker&&e.uri.toString()===t[0].raw.resource.toString())},t.prototype.updateRangeHighlights=function(){this.rangeHighlightDecorations.removeHighlightRange(),this.tree.isDOMFocused()&&this.highlightCurrentSelectedMarkerRange()},t.prototype.highlightCurrentSelectedMarkerRange=function(){var e=this.tree.getSelection();if(e&&1===e.length&&e[0]instanceof p.Marker){var t=e[0];this.rangeHighlightDecorations.highlightRange(t)}},
t.prototype.getFocusElement=function(){return this.tree.getFocus()},t.prototype.getActionItem=function(t){return t.id===m.MarkersFilterAction.ID?this.filterInputActionItem:e.prototype.getActionItem.call(this,t)},t.prototype.shutdown=function(){this.panelSettings.filter=this.filterInputActionItem.getFilterText(),this.panelSettings.filterHistory=this.filterInputActionItem.getFilterHistory(),this.panelSettings.useFilesExclude=this.filterInputActionItem.useFilesExclude,e.prototype.shutdown.call(this)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.delayedRefresh.cancel(),this.tree.dispose()},t=a([l(0,v.IInstantiationService),l(1,d.IEditorService),l(2,y.IConfigurationService),l(3,c.ITelemetryService),l(4,_.IThemeService),l(5,w.IMarkersWorkbenchService),l(6,T.IStorageService)],t)}(u.Panel);t.MarkersPanel=D}),define(e[1487],t([1,0,103,29,15,63,81,56,52,663,229,1486,31,108,16,476,201,228,368,1208]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m){"use strict";function y(e){
var t=e.id,n=e.handler,r=e.title,o=e.category,s=e.menu,a=e.keybinding;i.CommandsRegistry.registerCommand(t,n);var l={id:t,title:r,category:o};if(s){var u=s.menuId,d=s.when,p=s.group;h.MenuRegistry.appendMenuItem(u,{command:l,when:d,group:p})}if(a){var d=a.when,f=a.weight,g=a.keys;c.KeybindingsRegistry.registerKeybindingRule({id:t,when:d,weight:f,primary:g.primary,secondary:g.secondary,linux:g.linux,mac:g.mac,win:g.win})}}Object.defineProperty(t,"__esModule",{value:!0}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:v.default.MARKER_OPEN_SIDE_ACTION_ID,weight:c.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:r.ContextKeyExpr.and(v.default.MarkerFocusContextKey),primary:2051,mac:{primary:259},handler:function(e,t){var n=e.get(s.IPanelService).getActivePanel();n.openFileAtElement(n.getFocusElement(),!1,!0,!0)}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:v.default.MARKER_SHOW_PANEL_ID,weight:c.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,
handler:function(e,t){e.get(s.IPanelService).openPanel(v.default.MARKERS_PANEL_ID)}}),f.Registry.as(o.Extensions.Configuration).registerConfiguration({id:"problems",order:101,title:m.default.PROBLEMS_PANEL_CONFIGURATION_TITLE,type:"object",properties:{"problems.autoReveal":{description:m.default.PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL,type:"boolean",default:!0}}}),f.Registry.as(p.Extensions.Panels).registerPanel(new p.PanelDescriptor(d.MarkersPanel,v.default.MARKERS_PANEL_ID,m.default.MARKERS_PANEL_TITLE_PROBLEMS,"markersPanel",10,g.ToggleMarkersPanelAction.ID));var b=f.Registry.as(a.Extensions.WorkbenchActions);b.registerWorkbenchAction(new h.SyncActionDescriptor(g.ToggleMarkersPanelAction,g.ToggleMarkersPanelAction.ID,g.ToggleMarkersPanelAction.LABEL,{primary:3115}),"View: Toggle Problems (Errors, Warnings, Infos)",m.default.MARKERS_PANEL_VIEW_CATEGORY),
b.registerWorkbenchAction(new h.SyncActionDescriptor(g.ShowProblemsPanelAction,g.ShowProblemsPanelAction.ID,g.ShowProblemsPanelAction.LABEL),"View: Focus Problems (Errors, Warnings, Infos)",m.default.MARKERS_PANEL_VIEW_CATEGORY),y({id:v.default.MARKER_COPY_ACTION_ID,title:l.localize(0,null),handler:function(e){!function(e){var t=e.getActivePanel();if(t instanceof d.MarkersPanel){var i=t.getFocusElement();i instanceof u.Marker&&n.clipboard.writeText(""+i)}}(e.get(s.IPanelService))},menu:{menuId:h.MenuId.ProblemsPanelContext,when:v.default.MarkerFocusContextKey,group:"navigation"},keybinding:{keys:{primary:2081},when:v.default.MarkerFocusContextKey}}),y({id:v.default.MARKER_COPY_MESSAGE_ACTION_ID,title:l.localize(1,null),handler:function(e){!function(e){var t=e.getActivePanel();if(t instanceof d.MarkersPanel){var i=t.getFocusElement();i instanceof u.Marker&&n.clipboard.writeText(i.raw.message)}}(e.get(s.IPanelService))},menu:{menuId:h.MenuId.ProblemsPanelContext,when:v.default.MarkerFocusContextKey,
group:"navigation"}}),y({id:v.default.RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID,title:l.localize(2,null),handler:function(e){!function(e){var t=e.getActivePanel();if(t instanceof d.MarkersPanel){var i=t.getFocusElement();i instanceof u.RelatedInformation&&n.clipboard.writeText(i.raw.message)}}(e.get(s.IPanelService))},menu:{menuId:h.MenuId.ProblemsPanelContext,when:v.default.RelatedInformationFocusContextKey,group:"navigation"}})}),define(e[1488],t([1,0,4,9,698,25,62,24,149,10,70,54,138,47,141,109,86,390,17,6,140,27,36,233,21,286,33]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var A=function(e){function t(t,n){var i=e.call(this,t)||this;return i.stats=n,i}return n(t,e),t}(y.QuickOpenModel);t.FileQuickOpenModel=A;var L=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,o)||this;return u.resource=t,u.name=n,u.description=i,u.icon=r,u.modeService=s,u.modelService=a,u.configurationService=c,u}return n(t,e),
t.prototype.getLabel=function(){return this.name},t.prototype.getLabelOptions=function(){return{extraClasses:g.getIconClasses(this.modelService,this.modeService,this.resource)}},t.prototype.getAriaLabel=function(){return o.localize(0,null,this.getLabel())},t.prototype.getDescription=function(){return this.description},t.prototype.getIcon=function(){return this.icon},t.prototype.getResource=function(){return this.resource},t.prototype.setRange=function(e){this.range=e},t.prototype.mergeWithEditorHistory=function(){return!0},t.prototype.getInput=function(){var e={resource:this.resource,options:{pinned:!this.configurationService.getValue().workbench.editor.enablePreviewFromQuickOpen}};return this.range&&(e.options.selection=this.range),e},t=a([l(4,x.IEditorService),l(5,f.IModeService),l(6,v.IModelService),l(7,_.IConfigurationService),l(8,w.IWorkspaceContextService)],t)}(b.EditorQuickOpenEntry);t.FileEntry=L;var R=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this)||this;return c.editorService=t,
c.instantiationService=n,c.themeService=i,c.contextService=r,c.searchService=o,c.environmentService=s,c.fileService=a,c.queryBuilder=c.instantiationService.createInstance(S.QueryBuilder),c}return n(t,e),t.prototype.setOptions=function(e){this.options=e},t.prototype.getResults=function(e,t){var n=k.prepareQuery(e);return n.value?(n.value=c.untildify(n.value,this.environmentService.userHome),this.doFindResults(n,this.cacheState.cacheKey,t)):i.TPromise.as(new A([]))},t.prototype.doFindResults=function(e,t,n){var r,o=this,a=this.doResolveQueryOptions(e,t,n);return this.options&&this.options.forceUseIcons&&!this.themeService.getFileIconTheme()&&(r="file"),this.getAbsolutePathResult(e).then(function(e){return e?i.TPromise.wrap({results:[{resource:e}]}):o.searchService.search(o.queryBuilder.file(o.contextService.getWorkspace().folders.map(function(e){return e.uri}),a))}).then(function(e){for(var t=[],n=0;n<e.results.length;n++){
var i=e.results[n],a=s.basename(i.resource.fsPath),l=c.getPathLabel(p.dirname(i.resource),o.environmentService,o.contextService);t.push(o.instantiationService.createInstance(L,i.resource,a,l,r))}return new A(t,e.stats)})},t.prototype.getAbsolutePathResult=function(e){if(s.isAbsolute(e.original)){var t=h.default.file(e.original);return this.fileService.resolveFile(t).then(function(e){return e.isDirectory?void 0:t},function(e){})}return i.TPromise.as(null)},t.prototype.doResolveQueryOptions=function(e,t,n){var i={extraFileResources:T.getOutOfWorkspaceEditorResources(this.editorService,this.contextService),filePattern:e.value,cacheKey:t};return"number"==typeof n&&(i.maxResults=n,i.sortByScore=!0),i},t.prototype.hasShortResponseTime=function(){return this.isCacheLoaded},t.prototype.onOpen=function(){var e=this;this.cacheState=new M(function(t){return e.cacheQuery(t)},function(t){return e.searchService.search(t)},function(t){return e.searchService.clearCache(t)},this.cacheState),this.cacheState.load()},
t.prototype.cacheQuery=function(e){var t={extraFileResources:T.getOutOfWorkspaceEditorResources(this.editorService,this.contextService),filePattern:"",cacheKey:e,maxResults:0,sortByScore:!0},n=this.contextService.getWorkspace().folders.map(function(e){return e.uri});return this.queryBuilder.file(n,t)},Object.defineProperty(t.prototype,"isCacheLoaded",{get:function(){return this.cacheState&&this.cacheState.isLoaded},enumerable:!0,configurable:!0}),t.prototype.getGroupLabel=function(){return o.localize(1,null)},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!0}},t=a([l(0,x.IEditorService),l(1,C.IInstantiationService),l(2,m.IWorkbenchThemeService),l(3,w.IWorkspaceContextService),l(4,E.ISearchService),l(5,I.IEnvironmentService),l(6,D.IFileService)],t)}(b.QuickOpenHandler);t.OpenFileHandler=R;var O;!function(e){e[e.Created=1]="Created",e[e.Loading=2]="Loading",e[e.Loaded=3]="Loaded",e[e.Errored=4]="Errored",e[e.Disposed=5]="Disposed"}(O||(O={}));var M=function(){function e(e,t,n,i){
if(this.doLoad=t,this.doDispose=n,this.previous=i,this._cacheKey=d.defaultGenerator.nextId(),this.loadingPhase=O.Created,this.query=e(this._cacheKey),this.previous){var r=u.assign({},this.query,{cacheKey:null}),o=u.assign({},this.previous.query,{cacheKey:null});u.equals(r,o)||(this.previous.dispose(),this.previous=null)}}return Object.defineProperty(e.prototype,"cacheKey",{get:function(){return this.loadingPhase!==O.Loaded&&this.previous?this.previous.cacheKey:this._cacheKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoaded",{get:function(){var e=this.loadingPhase===O.Loaded;return e||!this.previous?e:this.previous.isLoaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUpdating",{get:function(){var e=this.loadingPhase===O.Loading;return e||!this.previous?e:this.previous.isUpdating},enumerable:!0,configurable:!0}),e.prototype.load=function(){var e=this;this.isUpdating||(this.loadingPhase=O.Loading,this.promise=this.doLoad(this.query).then(function(){
e.loadingPhase=O.Loaded,e.previous&&(e.previous.dispose(),e.previous=null)},function(t){e.loadingPhase=O.Errored,r.onUnexpectedError(t)}))},e.prototype.dispose=function(){var e=this;this.promise?this.promise.then(null,function(){}).then(function(){return e.loadingPhase=O.Disposed,e.doDispose(e._cacheKey)}).then(null,function(e){r.onUnexpectedError(e)}):this.loadingPhase=O.Disposed,this.previous&&(this.previous.dispose(),this.previous=null)},e}();t.CacheState=M}),define(e[522],t([1,0,20,4,697,18,30,109,86,1488,430,6,17,286,22,9]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenSymbolHandler=p.OpenSymbolHandler;var b=function(e){function d(n,i,r){var o=e.call(this)||this;return o.notificationService=n,o.configurationService=r,o.scorerCache=Object.create(null),o.searchDelayer=new s.ThrottledDelayer(d.FILE_SEARCH_DELAY),o.openSymbolHandler=i.createInstance(t.OpenSymbolHandler),o.openFileHandler=i.createInstance(h.OpenFileHandler),
o.updateHandlers(o.configurationService.getValue()),o.registerListeners(),o}return n(d,e),d.prototype.registerListeners=function(){var e=this;this.configurationService.onDidChangeConfiguration(function(t){return e.updateHandlers(e.configurationService.getValue())})},d.prototype.updateHandlers=function(e){this.includeSymbols=e&&e.search&&e.search.quickOpen&&e.search.quickOpen.includeSymbols,this.openFileHandler.setOptions({forceUseIcons:this.includeSymbols}),this.openSymbolHandler.setOptions({skipDelay:!0,skipLocalSymbols:!0,skipSorting:!0})},d.prototype.getResults=function(e){var t=this;this.cancelPendingSearch(),this.isClosed=!1;var n=this.extractRange(e);n&&(e=n.search);var o=v.prepareQuery(e);if(!o.value)return r.TPromise.as(new u.QuickOpenModel);var s=function(){var e=[],s=t.openFileHandler.getResults(o.original,d.MAX_DISPLAYED_RESULTS);return e.push(s),t.includeSymbols&&!n&&e.push(t.openSymbolHandler.getResults(o.original)),t.pendingSearch=r.TPromise.join(e).then(function(e){if(t.pendingSearch=null,
t.isClosed)return r.TPromise.as(new u.QuickOpenModel);var s=[].concat.apply([],e.map(function(e){return e.entries})),a=i.top(s,function(e,n){return v.compareItemsByScore(e,n,o,!0,u.QuickOpenItemAccessor,t.scorerCache)},d.MAX_DISPLAYED_RESULTS);return a.forEach(function(e){if(e instanceof h.FileEntry){e.setRange(n?n.range:null);var i=v.scoreItem(e,o,!0,u.QuickOpenItemAccessor,t.scorerCache);e.setHighlights(i.labelMatch,i.descriptionMatch)}}),r.TPromise.as(new u.QuickOpenModel(a))},function(e){return t.pendingSearch=null,y.isPromiseCanceledError(e)||(e&&e[0]&&e[0].message?t.notificationService.error(e[0].message.replace(/[\*_\[\]]/g,"\\$&")):t.notificationService.error(e)),null}),t.pendingSearch};return this.hasShortResponseTime()?s():this.searchDelayer.trigger(s,this.includeSymbols?d.SYMBOL_SEARCH_DELAY:d.FILE_SEARCH_DELAY)},d.prototype.hasShortResponseTime=function(){
return this.includeSymbols?this.openFileHandler.hasShortResponseTime()&&this.openSymbolHandler.hasShortResponseTime():this.openFileHandler.hasShortResponseTime()},d.prototype.extractRange=function(e){if(!e)return null;var t=null,n=d.LINE_COLON_PATTERN.exec(e);if(n&&n.length>1){var i=parseInt(n[1],10);if(c.isNumber(i)){if(t={startLineNumber:i,startColumn:1,endLineNumber:i,endColumn:1},n.length>3){var r=parseInt(n[3],10);c.isNumber(r)&&(t={startLineNumber:t.startLineNumber,startColumn:r,endLineNumber:t.endLineNumber,endColumn:r})}}else""===n[1]&&(t={startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1})}return t?{search:e.substr(0,n.index),range:t}:null},d.prototype.getGroupLabel=function(){return this.includeSymbols?o.localize(0,null):o.localize(1,null)},d.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!0}},d.prototype.onOpen=function(){this.openSymbolHandler.onOpen(),this.openFileHandler.onOpen()},d.prototype.onClose=function(e){this.isClosed=!0,this.cancelPendingSearch(),
this.scorerCache=Object.create(null),this.openSymbolHandler.onClose(e),this.openFileHandler.onClose(e)},d.prototype.cancelPendingSearch=function(){this.pendingSearch&&(this.pendingSearch.cancel(),this.pendingSearch=null)},d.ID="workbench.picker.anything",d.LINE_COLON_PATTERN=/[#|:|\(](\d*)([#|:|,](\d*))?\)?$/,d.FILE_SEARCH_DELAY=300,d.SYMBOL_SEARCH_DELAY=500,d.MAX_DISPLAYED_RESULTS=512,d=a([l(0,m.INotificationService),l(1,f.IInstantiationService),l(2,g.IConfigurationService)],d)}(d.QuickOpenHandler);t.OpenAnythingHandler=b}),define(e[523],t([1,0,6,40,161,491,16,50,91,27,36,33,43,62,7,10,25,211,765,4,53,21,17,5,20,45]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(t,n,i,o,s,a,l){var u=e.call(this)||this;return u.editorGroupService=t,u.untitledEditorService=n,u.workspaceContextService=i,u.instantiationService=o,u.environmentService=s,u.fileService=a,u.configurationService=l,
u._onDidActiveEditorChange=u._register(new m.Emitter),u._onDidVisibleEditorsChange=u._register(new m.Emitter),u._onDidCloseEditor=u._register(new m.Emitter),u._onDidOpenEditorFail=u._register(new m.Emitter),u.openEditorHandlers=[],u.fileInputFactory=c.Registry.as(r.Extensions.EditorInputFactories).getFileInputFactory(),u.registerListeners(),u}return n(t,e),Object.defineProperty(t.prototype,"onDidActiveEditorChange",{get:function(){return this._onDidActiveEditorChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidVisibleEditorsChange",{get:function(){return this._onDidVisibleEditorsChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidCloseEditor",{get:function(){return this._onDidCloseEditor.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidOpenEditorFail",{get:function(){return this._onDidOpenEditorFail.event},enumerable:!0,configurable:!0}),t.prototype.registerListeners=function(){var e=this
;this.editorGroupService.whenRestored.then(function(){return e.onEditorsRestored()}),this.editorGroupService.onDidActiveGroupChange(function(t){return e.handleActiveEditorChange(t)}),this.editorGroupService.onDidAddGroup(function(t){return e.registerGroupListeners(t)})},t.prototype.onEditorsRestored=function(){var e=this;this.editorGroupService.groups.forEach(function(t){return e.registerGroupListeners(t)}),this.activeEditor&&(this.doEmitActiveEditorChangeEvent(),this._onDidVisibleEditorsChange.fire())},t.prototype.handleActiveEditorChange=function(e){e===this.editorGroupService.activeGroup&&(this.lastActiveEditor||e.activeEditor)&&(this.lastActiveGroupId===e.id&&this.lastActiveEditor===e.activeEditor||this.doEmitActiveEditorChangeEvent())},t.prototype.doEmitActiveEditorChangeEvent=function(){var e=this.editorGroupService.activeGroup;this.lastActiveGroupId=e.id,this.lastActiveEditor=e.activeEditor,this._onDidActiveEditorChange.fire()},t.prototype.registerGroupListeners=function(e){var t=this,n=[]
;n.push(e.onDidGroupChange(function(n){n.kind===E.GroupChangeKind.EDITOR_ACTIVE&&(t.handleActiveEditorChange(e),t._onDidVisibleEditorsChange.fire())})),n.push(e.onDidCloseEditor(function(e){t._onDidCloseEditor.fire(e)})),n.push(e.onWillOpenEditor(function(n){t.onGroupWillOpenEditor(e,n)})),n.push(e.onDidOpenEditorFail(function(n){t._onDidOpenEditorFail.fire({editor:n,groupId:e.id})})),m.once(e.onWillDispose)(function(){T.dispose(n)})},t.prototype.onGroupWillOpenEditor=function(e,t){for(var n=function(n){var r=(0,i.openEditorHandlers[n])(t.editor,t.options,e);if(r&&r.override)return t.prevent(function(){return r.override}),"break"},i=this,r=0;r<this.openEditorHandlers.length;r++){if("break"===n(r))break}},Object.defineProperty(t.prototype,"activeControl",{get:function(){var e=this.editorGroupService.activeGroup;return e?e.activeControl:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeTextEditorWidget",{get:function(){var e=this.activeControl;if(e){var t=e.getControl()
;if(k.isCodeEditor(t)||k.isDiffEditor(t))return t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"editors",{get:function(){var e=[];return this.editorGroupService.groups.forEach(function(t){e.push.apply(e,t.editors)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeEditor",{get:function(){var e=this.editorGroupService.activeGroup;return e?e.activeEditor:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleControls",{get:function(){return x.coalesce(this.editorGroupService.groups.map(function(e){return e.activeControl}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleTextEditorWidgets",{get:function(){return this.visibleControls.map(function(e){return e.getControl()}).filter(function(e){return k.isCodeEditor(e)||k.isDiffEditor(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleEditors",{get:function(){return x.coalesce(this.editorGroupService.groups.map(function(e){
return e.activeEditor}))},enumerable:!0,configurable:!0}),t.prototype.overrideOpenEditor=function(e){var t=this;return this.openEditorHandlers.push(e),T.toDisposable(function(){var n=t.openEditorHandlers.indexOf(e);n>=0&&t.openEditorHandlers.splice(n,1)})},t.prototype.openEditor=function(e,t,n){if(e instanceof r.EditorInput){var i=this.toOptions(t),o=this.findTargetGroup(e,i,n);return this.doOpenEditor(o,e,i)}var s=e,a=this.createInput(s);if(a){var i=r.TextEditorOptions.from(s),o=this.findTargetGroup(a,i,t);return this.doOpenEditor(o,a,i)}return C.TPromise.wrap(null)},t.prototype.doOpenEditor=function(e,t,n){return e.openEditor(t,n).then(function(){return e.activeControl})},t.prototype.findTargetGroup=function(e,t,n){var i;if(n&&"number"!=typeof n)return n;if(n===w.SIDE_GROUP)i=this.findSideBySideGroup();else if("number"==typeof n&&n>=0)i=this.editorGroupService.getGroup(n);else if(!t||"number"!=typeof t.index){var r=this.editorGroupService.getGroups(E.GroupsOrder.MOST_RECENTLY_ACTIVE)
;if(t&&t.revealIfVisible)for(s=0;s<r.length;s++){var o=r[s];if(e.matches(o.activeEditor)){i=o;break}}if(t&&t.revealIfOpened||this.configurationService.getValue("workbench.editor.revealIfOpen"))for(var s=0;s<r.length;s++){var a=r[s];if(a.isOpened(e)){i=a;break}}}return i||(i=this.editorGroupService.activeGroup),i},t.prototype.findSideBySideGroup=function(){var e=E.preferredSideBySideGroupDirection(this.configurationService),t=this.editorGroupService.findGroup({direction:e});return t||(t=this.editorGroupService.addGroup(this.editorGroupService.activeGroup,e)),t},t.prototype.toOptions=function(e){if(!e||e instanceof r.EditorOptions)return e;return e.selection?r.TextEditorOptions.create(e):r.EditorOptions.create(e)},t.prototype.openEditors=function(e,t){var n=this,i=[];e.forEach(function(e){r.isEditorInputWithOptions(e)?i.push(e):i.push({editor:n.createInput(e),options:r.TextEditorOptions.from(e)})});var o=new Map;t===w.SIDE_GROUP?o.set(this.findSideBySideGroup(),i):i.forEach(function(e){
var i=n.findTargetGroup(e.editor,e.options,t),r=o.get(i);r||(r=[],o.set(i,r)),r.push(e)});var s=[];return o.forEach(function(e,t){s.push(t.openEditors(e).then(function(){return t.activeControl}))}),C.TPromise.join(s)},t.prototype.isOpen=function(e,t){var n=[];return"number"==typeof t?n.push(this.editorGroupService.getGroup(t)):t?n.push(t):n=this.editorGroupService.groups.slice(),n.some(function(t){if(e instanceof r.EditorInput)return t.isOpened(e);var n=e;return!!n.resource&&t.editors.some(function(e){var t=r.toResource(e,{supportSideBySide:!0});return t&&t.toString()===n.resource.toString()})})},t.prototype.replaceEditors=function(e,t){var n=this,i=[];e.forEach(function(e){if(e.editor instanceof r.EditorInput)i.push(e);else{var t=e.editor,o=n.createInput(t),s=n.createInput(e.replacement);i.push({editor:o,replacement:s,options:n.toOptions(t.options)})}});return("number"==typeof t?this.editorGroupService.getGroup(t):t).replaceEditors(i)},t.prototype.invokeWithinEditorContext=function(e){
var t=this.activeTextEditorWidget;if(k.isCodeEditor(t))return t.invokeWithinContext(e);var n=this.editorGroupService.activeGroup;return n?n.invokeWithinContext(e):this.instantiationService.invokeFunction(e)},t.prototype.createInput=function(e){if(e instanceof r.EditorInput)return e;var t=e;if(t.editor instanceof r.EditorInput)return t.editor;var n=e;if(n.masterResource&&n.detailResource){var i=this.createInput({resource:n.masterResource}),o=this.createInput({resource:n.detailResource});return new r.SideBySideEditorInput(n.label||i.getName(),"string"==typeof n.description?n.description:i.getDescription(),o,i)}var s=e;if(s.leftResource&&s.rightResource){var a=this.createInput({resource:s.leftResource}),c=this.createInput({resource:s.rightResource}),l=s.label||_.localize(0,null,this.toDiffLabel(a,this.workspaceContextService,this.environmentService),this.toDiffLabel(c,this.workspaceContextService,this.environmentService));return new S.DiffEditorInput(l,s.description,a,c)}var u=e
;if(!u.resource||"string"==typeof u.filePath||u.resource instanceof y.default&&u.resource.scheme===g.Schemas.untitled)return this.untitledEditorService.createOrGet(u.filePath?y.default.file(u.filePath):u.resource,u.language,u.contents,u.encoding);var d=e;if(d.resource instanceof y.default){return(l=d.label)||d.resource.scheme===g.Schemas.data||(l=b.basename(d.resource.fsPath)),this.createOrGet(d.resource,this.instantiationService,l,d.description,d.encoding)}return null},t.prototype.createOrGet=function(e,n,i,r,a){if(t.CACHE.has(e)){var c=t.CACHE.get(e);return c instanceof o.ResourceEditorInput?(c.setName(i),c.setDescription(r)):c instanceof s.DataUriEditorInput||c.setPreferredEncoding(a),c}var l;return l=this.fileService.canHandleResource(e)?this.fileInputFactory.createFileInput(e,a,n):e.scheme===g.Schemas.data?n.createInstance(s.DataUriEditorInput,i,r,e):n.createInstance(o.ResourceEditorInput,i,r,e),t.CACHE.set(e,l),m.once(l.onDispose)(function(){t.CACHE.delete(e)}),l},
t.prototype.toDiffLabel=function(e,t,n){var i=e.getResource();return i.scheme!==g.Schemas.untitled||this.untitledEditorService.hasAssociatedFilePath(i)?v.getPathLabel(i.fsPath,n,t):e.getName()},t.CACHE=new u.ResourceMap,t=a([l(0,E.IEditorGroupsService),l(1,d.IUntitledEditorService),l(2,h.IWorkspaceContextService),l(3,i.IInstantiationService),l(4,p.IEnvironmentService),l(5,f.IFileService),l(6,I.IConfigurationService)],t)}(T.Disposable);t.EditorService=D;var A=function(e){function t(t,n,i,r,o,s,a){return e.call(this,t,n,i,r,o,s,a)||this}return n(t,e),t.prototype.setEditorOpenHandler=function(e){this.editorOpenHandler=e},t.prototype.doOpenEditor=function(t,n,i){var r=this;return(this.editorOpenHandler?this.editorOpenHandler(t,n,i):C.TPromise.as(void 0)).then(function(o){return o?C.TPromise.as(o):e.prototype.doOpenEditor.call(r,t,n,i)})},
t=a([l(0,E.IEditorGroupsService),l(1,d.IUntitledEditorService),l(2,h.IWorkspaceContextService),l(3,i.IInstantiationService),l(4,p.IEnvironmentService),l(5,f.IFileService),l(6,I.IConfigurationService)],t)}(D);t.DelegatingEditorService=A}),define(e[1491],t([1,0,4,10,20,24,14,131,258,140,91,47,17,1403,36,50,28,9,43,87,77,49]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e,t,n,i,r,o,s){this.modelService=e,this.untitledEditorService=t,this.telemetryService=i,this.configurationService=r,this.logService=o,this.extensionService=s,this.searchProviders=[],this.diskSearch=new I(!n.isBuilt||n.verbose,void 0,n.debugSearch)}return e.prototype.registerSearchResultProvider=function(e,t){var n=this;return"file"===e?this.fileSearchProvider=t:this.searchProviders.push(t),{dispose:function(){if("file"===e)n.fileSearchProvider=null;else{var i=n.searchProviders.indexOf(t);i>=0&&n.searchProviders.splice(i,1)}}}},
e.prototype.extendQuery=function(e){var t=this.configurationService.getValue();if(!e.fileEncoding){var n=t&&t.files&&t.files.encoding;e.fileEncoding=n}if(!e.disregardExcludeSettings){var i=o.deepClone(t&&t.files&&t.files.exclude);i&&(e.excludePattern?o.mixin(e.excludePattern,i,!1):e.excludePattern=i)}},e.prototype.search=function(e){var t=this;this.forwardTelemetry();var i;return new n.PPromise(function(o,s,a){var c=t.getLocalResults(e);process.nextTick(function(){return c.values().filter(function(e){return!!e}).forEach(a)}),t.logService.trace("SearchService#search",JSON.stringify(e));var l=Date.now(),u=t.extensionService.whenInstalledExtensionsRegistered().then(function(){var i=[t.fileSearchProvider||t.diskSearch].concat(t.searchProviders);return n.TPromise.join(i.map(function(i){return function(i){return n.TPromise.wrap(i.search(e)).then(function(e){return e},null,function(e){e.resource?c.has(e.resource)||a(e):a(e),e.message&&t.logService.debug("SearchService#search",e.message)})}(i)})).then(function(e){
return(e=e.filter(function(e){return!!e})).length?{limitHit:e[0]&&e[0].limitHit,stats:e[0].stats,results:r.flatten(e.map(function(e){return e.results}))}:null},function(e){return Array.isArray(e)||(e=[e]),e=e.filter(function(e){return!!e}),n.TPromise.wrapError(e[0])})});i=u.then(function(e){t.logService.debug("SearchService#search: "+(Date.now()-l)+"ms");for(var n={limitHit:!1,results:[],stats:void 0},i=0,r=[e];i<r.length;i++){var o=r[i];if(o){n.stats=o.stats||n.stats,n.limitHit=o.limitHit||n.limitHit;for(var s=0,a=o.results;s<a.length;s++){var u=a[s];c.has(u.resource)||n.results.push(u)}}}return n}).then(o,s)},function(){return i&&i.cancel()})},e.prototype.getLocalResults=function(e){var t=this,n=new m.ResourceMap;if(e.type===d.QueryType.Text){this.modelService.getModels().forEach(function(i){var r=i.uri;if(r){if(r.scheme===S.Schemas.untitled){if(!t.untitledEditorService.exists(r))return}else if(r.scheme!==S.Schemas.file)return;if(t.matches(r,e)){
var o=i.findMatches(e.contentPattern.pattern,!1,e.contentPattern.isRegExp,e.contentPattern.isCaseSensitive,e.contentPattern.isWordMatch?e.contentPattern.wordSeparators:null,!1,e.maxResults);if(o.length){var s=new d.FileMatch(r);n.set(r,s),o.forEach(function(e){s.lineMatches.push(new d.LineMatch(i.getLineContent(e.range.startLineNumber),e.range.startLineNumber-1,[[e.range.startColumn-1,e.range.endColumn-e.range.startColumn]]))})}else n.set(r,null)}}})}return n},e.prototype.matches=function(e,t){if(t.filePattern){if(e.scheme!==S.Schemas.file)return!1;if(!s.fuzzyContains(e.fsPath,s.stripWildcards(t.filePattern).toLowerCase()))return!1}return(!t.includePattern||e.scheme===S.Schemas.file)&&d.pathIncludedInQuery(t,e.fsPath)},e.prototype.clearCache=function(e){return this.diskSearch.clearCache(e)},e.prototype.forwardTelemetry=function(){var e=this;this.forwardingTelemetry||(this.forwardingTelemetry=this.diskSearch.fetchTelemetry().then(null,b.onUnexpectedError,function(t){
e.telemetryService.publicLog(t.eventName,t.data)}))},e=a([l(0,p.IModelService),l(1,h.IUntitledEditorService),l(2,v.IEnvironmentService),l(3,y.ITelemetryService),l(4,f.IConfigurationService),l(5,C.ILogService),l(6,E.IExtensionService)],e)}();t.SearchService=w;var I=function(){function t(t,n,r){void 0===n&&(n=36e5);var o={serverName:"Search",timeout:n,args:["--type=searchService"],freshExecArgv:!0,env:{AMD_ENTRYPOINT:"vs/workbench/services/search/node/searchApp",PIPE_LOGGING:"true",VERBOSE_LOGGING:t}};r&&(r.break&&r.port?o.debugBrk=r.port:!r.break&&r.port&&(o.debug=r.port));var s=new u.Client(i.default.parse(e.toUrl("bootstrap")).fsPath,o),a=c.getNextTickChannel(s.getChannel("search"));this.raw=new g.SearchChannelClient(a)}return t.prototype.search=function(e){var i=this,r=e.folderQueries||[];return n.TPromise.join(r.map(function(e){return e.folder.scheme===S.Schemas.file&&_.exists(e.folder.fsPath)})).then(function(n){var o,s=r.filter(function(e,t){return n[t]}),a=i.rawSearchQuery(e,s)
;return o=e.type===d.QueryType.File?i.raw.fileSearch(a):i.raw.textSearch(a),t.collectResults(o)})},t.prototype.rawSearchQuery=function(e,t){for(var n={folderQueries:[],extraFiles:[],filePattern:e.filePattern,excludePattern:e.excludePattern,includePattern:e.includePattern,maxResults:e.maxResults,exists:e.exists,sortByScore:e.sortByScore,cacheKey:e.cacheKey,useRipgrep:e.useRipgrep,disregardIgnoreFiles:e.disregardIgnoreFiles,ignoreSymlinks:e.ignoreSymlinks},i=0,r=t;i<r.length;i++){var o=r[i];n.folderQueries.push({excludePattern:o.excludePattern,includePattern:o.includePattern,fileEncoding:o.fileEncoding,disregardIgnoreFiles:o.disregardIgnoreFiles,folder:o.folder.fsPath})}if(e.extraFileResources)for(var s=0,a=e.extraFileResources;s<a.length;s++){var c=a[s];c.scheme===S.Schemas.file&&n.extraFiles.push(c.fsPath)}return e.type===d.QueryType.Text&&(n.contentPattern=e.contentPattern),n},t.collectResults=function(e){var t=this,i=[];return new n.PPromise(function(n,r,o){e.done(function(e){n({limitHit:e.limitHit,
results:i,stats:e.stats})},r,function(e){if(Array.isArray(e)){var n=e.map(function(e){return t.createFileMatch(e)});i=i.concat(n),n.forEach(o)}else if(e.path){var r=t.createFileMatch(e);i.push(r),o(r)}else o(e)})},function(){return e.cancel()})},t.createFileMatch=function(e){var t=new d.FileMatch(i.default.file(e.path));if(e.lineMatches)for(var n=0;n<e.lineMatches.length;n++)t.lineMatches.push(new d.LineMatch(e.lineMatches[n].preview,e.lineMatches[n].lineNumber,e.lineMatches[n].offsetAndLengths));return t},t.prototype.clearCache=function(e){return this.raw.clearCache(e)},t.prototype.fetchTelemetry=function(){return this.raw.fetchTelemetry()},t}();t.DiskSearch=I}),define(e[1492],t([1,0,786,4,25,14,11,40,1445,91,33,27,38,17,54,66,36,6,153,42,162,15,47,22,100]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v){var m=e.call(this,r,t,s,n,i,o,d,u,h,p,f,g,c)||this
;return m.modeService=a,m.windowService=l,m.dialogService=v,m}return n(t,e),t.prototype.resolveTextContent=function(e,t){return this.fileService.resolveStreamContent(e,t).then(function(e){return y.createTextBufferFactoryFromStream(e.value).then(function(t){return{resource:e.resource,name:e.name,mtime:e.mtime,etag:e.etag,encoding:e.encoding,isReadonly:e.isReadonly,value:t}})})},t.prototype.confirmSave=function(e){if(this.environmentService.isExtensionDevelopment)return r.TPromise.wrap(u.ConfirmResult.DONT_SAVE);var t=this.getDirty(e);if(0===t.length)return r.TPromise.wrap(u.ConfirmResult.DONT_SAVE);var n=1===t.length?i.localize(0,null,o.basename(t[0].fsPath)):x.getConfirmMessage(i.localize(1,null,t.length),t),s=[t.length>1?i.localize(2,null):i.localize(3,null),i.localize(4,null),i.localize(5,null)];return this.dialogService.show(T.Severity.Warning,n,s,{cancelId:2,detail:i.localize(6,null)}).then(function(e){switch(e){case 0:return u.ConfirmResult.SAVE;case 1:return u.ConfirmResult.DONT_SAVE;default:
return u.ConfirmResult.CANCEL}})},t.prototype.promptForPath=function(e){return this.windowService.showSaveDialog(this.getSaveDialogOptions(e))},t.prototype.getSaveDialogOptions=function(e){var t=this,n={defaultPath:e};if(!c.isWindows)return n;var r,a=e?o.extname(e):void 0,l=this.modeService.getRegisteredLanguageNames().map(function(e){var n=t.modeService.getExtensions(e);if(!n||!n.length)return null;var i={name:e,extensions:n.slice(0,10).map(function(e){return s.trim(e,".")})};return a&&n.indexOf(a)>=0?(r=i,null):i}).filter(function(e){return!!e}),u={name:i.localize(7,null),extensions:["*"]};return r?(l.unshift(r),l.unshift(u)):l.unshift(u),l.push({name:i.localize(8,null),extensions:[""]}),n.filters=l,n},
t=a([l(0,f.IWorkspaceContextService),l(1,p.IFileService),l(2,h.IUntitledEditorService),l(3,g.ILifecycleService),l(4,S.IInstantiationService),l(5,v.IConfigurationService),l(6,m.IModeService),l(7,I.IModelService),l(8,C.IWindowService),l(9,b.IEnvironmentService),l(10,T.INotificationService),l(11,_.IBackupFileService),l(12,C.IWindowsService),l(13,E.IHistoryService),l(14,w.IContextKeyService),l(15,x.IDialogService)],t)}(d.TextFileService);t.TextFileService=k}),define(e[1493],t([1,0,4,10,18,6,5,47,478,48,43,91,294,33]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(t,n,i){var r=e.call(this)||this;return r.instantiationService=t,r.textFileService=n,r.fileService=i,r.providers=Object.create(null),r}return n(t,e),t.prototype.createReferencedObject=function(e){var t=this,n=r.default.parse(e);return this.fileService.canHandleResource(n)?this.textFileService.models.loadOrCreate(n):this.resolveTextModelContent(e).then(function(){
return t.instantiationService.createInstance(d.ResourceEditorModel,n)})},t.prototype.destroyReferencedObject=function(e){var t=this;e.done(function(e){e instanceof g.TextFileEditorModel?t.textFileService.models.disposeModel(e):e.dispose()},function(e){})},t.prototype.registerTextModelContentProvider=function(e,t){var n=this.providers;return(n[e]||(n[e]=[])).unshift(t),c.toDisposable(function(){var i=n[e];if(i){var r=i.indexOf(t);-1!==r&&(i.splice(r,1),0===i.length&&delete n[e])}})},t.prototype.resolveTextModelContent=function(e){var t=r.default.parse(e),n=(this.providers[t.scheme]||[]).map(function(e){return function(){return e.provideTextContent(t)}});return o.first(n).then(function(e){return e||(console.error("Unable to open '"+t+"' resource is not available."),i.TPromise.wrapError(new Error("resource is not available")))})},t=a([l(0,s.IInstantiationService),l(1,h.ITextFileService),l(2,v.IFileService)],t)}(c.ReferenceCollection),y=function(){function e(e,t,n){this.untitledEditorService=e,
this.instantiationService=t,this.modelService=n,this.resourceModelCollection=t.createInstance(m)}return e.prototype.createModelReference=function(e){return this._createModelReference(e)},e.prototype._createModelReference=function(e){if(e.scheme===p.Schemas.untitled)return this.untitledEditorService.loadOrCreate({resource:e}).then(function(e){return new c.ImmortalReference(e)});if("inmemory"===e.scheme){return this.modelService.getModel(e)?i.TPromise.as(new c.ImmortalReference(this.instantiationService.createInstance(d.ResourceEditorModel,e))):i.TPromise.wrapError(new Error("Cant resolve inmemory resource"))}var t=this.resourceModelCollection.acquire(e.toString());return t.object.then(function(e){return{object:e,dispose:function(){return t.dispose()}}},function(e){return t.dispose(),i.TPromise.wrapError(e)})},e.prototype.registerTextModelContentProvider=function(e,t){return this.resourceModelCollection.registerTextModelContentProvider(e,t)},
e=a([l(0,f.IUntitledEditorService),l(1,s.IInstantiationService),l(2,u.IModelService)],e)}();t.TextModelResolverService=y}),define(e[65],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IViewletService=n.createDecorator("viewletService")}),define(e[1495],t([1,0,4,9,152,46,65,34,35,5,78,12,11,111,8,53]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=g.isMacintosh?22:30,S=function(e){function t(t,n,i,r,s,a,c,l,u,d,h,p,f){var g=e.call(this)||this;return g.parent=t,g.workbenchContainer=n,g.parts=i,g.quickopen=r,g.quickInput=s,g.notificationsCenter=a,g.notificationsToasts=c,g.storageService=l,g.contextViewService=u,g.partService=d,g.viewletService=h,g.themeService=p,g.editorGroupService=f,g.restorePreviousState(),g.sashXOne=new o.Sash(g.workbenchContainer,g),g.sashXTwo=new o.Sash(g.workbenchContainer,g),g.sashY=new o.Sash(g.workbenchContainer,g,{orientation:o.Orientation.HORIZONTAL}),g.registerListeners(),g}
return n(t,e),t.prototype.restorePreviousState=function(){this._sidebarWidth=Math.max(this.partLayoutInfo.sidebar.minWidth,this.storageService.getInteger(t.sashXOneWidthSettingsKey,u.StorageScope.GLOBAL,300)),this._panelWidth=Math.max(this.partLayoutInfo.panel.minWidth,this.storageService.getInteger(t.sashXTwoWidthSettingsKey,u.StorageScope.GLOBAL,350)),this._panelHeight=Math.max(this.partLayoutInfo.panel.minHeight,this.storageService.getInteger(t.sashYHeightSettingsKey,u.StorageScope.GLOBAL,350)),this.panelMaximized=!1,this.panelSizeBeforeMaximized=this.storageService.getInteger(t.panelSizeBeforeMaximizedKey,u.StorageScope.GLOBAL,0)},t.prototype.registerListeners=function(){var e=this;this._register(this.themeService.onThemeChange(function(t){return e.layout()})),this._register(this.parts.editor.onDidSizeConstraintsChange(function(){return e.onDidEditorSizeConstraintsChange()})),this.registerSashListeners()},t.prototype.onDidEditorSizeConstraintsChange=function(){
if(this.workbenchSize&&(this.sidebarWidth||this.panelHeight)&&this.editorGroupService.count>1){var e=new m.Dimension(this.parts.editor.minimumWidth,this.parts.editor.minimumHeight),t=this.workbenchSize.width-this.sidebarWidth<e.width,n=!1;n=this.partService.getPanelPosition()===s.Position.RIGHT?this.workbenchSize.width-this.panelWidth-this.sidebarWidth<e.width:this.workbenchSize.height-this.panelHeight<e.height,(t||n)&&this.layout()}},Object.defineProperty(t.prototype,"activitybarWidth",{get:function(){return this.partService.isVisible(s.Parts.ACTIVITYBAR_PART)?this.partLayoutInfo.activitybar.width:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panelHeight",{get:function(){return this.partService.getPanelPosition()===s.Position.RIGHT?this.sidebarHeight:this._panelHeight},set:function(e){this._panelHeight=Math.min(this.computeMaxPanelHeight(),Math.max(this.partLayoutInfo.panel.minHeight,e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panelWidth",{get:function(){
return this.partService.getPanelPosition()===s.Position.BOTTOM?this.workbenchSize.width-this.activitybarWidth-this.sidebarWidth:this._panelWidth},set:function(e){this._panelWidth=Math.min(this.computeMaxPanelWidth(),Math.max(this.partLayoutInfo.panel.minWidth,e))},enumerable:!0,configurable:!0}),t.prototype.computeMaxPanelWidth=function(){var e;return e=this.partService.isVisible(s.Parts.SIDEBAR_PART)?this.partService.getSideBarPosition()===s.Position.LEFT?this.partLayoutInfo.sidebar.minWidth:this.sidebarWidth:0,Math.max(this.partLayoutInfo.panel.minWidth,this.workbenchSize.width-this.parts.editor.minimumWidth-e-this.activitybarWidth)},t.prototype.computeMaxPanelHeight=function(){return Math.max(this.partLayoutInfo.panel.minHeight,this.sidebarHeight-this.parts.editor.minimumHeight)},Object.defineProperty(t.prototype,"sidebarWidth",{get:function(){return this.partService.isVisible(s.Parts.SIDEBAR_PART)?this._sidebarWidth:0},set:function(e){
var t=this.partService.getPanelPosition()===s.Position.RIGHT&&this.partService.isVisible(s.Parts.PANEL_PART)?this.partLayoutInfo.panel.minWidth:0,n=this.workbenchSize.width-this.activitybarWidth-this.parts.editor.minimumWidth-t;this._sidebarWidth=Math.max(this.partLayoutInfo.sidebar.minWidth,Math.min(n,e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"partLayoutInfo",{get:function(){return{titlebar:{height:b},menubar:{height:b},activitybar:{width:50},sidebar:{minWidth:170},panel:{minHeight:77,minWidth:300},statusbar:{height:22}}},enumerable:!0,configurable:!0}),t.prototype.registerSashListeners=function(){var e,n,o,a=this,c=0,l=0,d=0;this._register(this.sashXOne.onDidStart(function(t){e=a.sidebarWidth,c=t.startX})),this._register(this.sashY.onDidStart(function(e){n=a.panelHeight,l=e.startY})),this._register(this.sashXTwo.onDidStart(function(e){o=a.panelWidth,d=e.startX})),this._register(this.sashXOne.onDidChange(function(t){
var n=!1,o=a.partService.getSideBarPosition(),l=a.partService.isVisible(s.Parts.SIDEBAR_PART),u=o===s.Position.LEFT?e+t.currentX-c:e-t.currentX+c,d=i.TPromise.wrap(null);if(l)if(u+50<a.partLayoutInfo.sidebar.minWidth){var h=a.partLayoutInfo.sidebar.minWidth-50;d=a.partService.setSideBarHidden(!0),c=o===s.Position.LEFT?Math.max(a.activitybarWidth,t.currentX-h):Math.min(t.currentX+h,a.workbenchSize.width-a.activitybarWidth),a.sidebarWidth=e}else a.sidebarWidth=Math.max(a.partLayoutInfo.sidebar.minWidth,u),n=u>=a.partLayoutInfo.sidebar.minWidth;else(o===s.Position.LEFT&&t.currentX-c>=a.partLayoutInfo.sidebar.minWidth||o===s.Position.RIGHT&&c-t.currentX>=a.partLayoutInfo.sidebar.minWidth)&&(e=a.partLayoutInfo.sidebar.minWidth-(o===s.Position.LEFT?t.currentX-c:c-t.currentX),a.sidebarWidth=a.partLayoutInfo.sidebar.minWidth,d=a.partService.setSideBarHidden(!1));n&&d.done(function(){return a.layout({source:s.Parts.SIDEBAR_PART})},r.onUnexpectedError)})),this._register(this.sashY.onDidChange(function(e){
var t=!1,o=a.partService.isVisible(s.Parts.PANEL_PART),c=n-(e.currentY-l),u=i.TPromise.wrap(null);if(o)if(c+50<a.partLayoutInfo.panel.minHeight){var d=a.partLayoutInfo.panel.minHeight-50;u=a.partService.setPanelHidden(!0),l=Math.min(a.sidebarHeight-a.statusbarHeight-a.headingHeight,e.currentY+d),a.panelHeight=n}else a.panelHeight=Math.max(a.partLayoutInfo.panel.minHeight,c),t=c>=a.partLayoutInfo.panel.minHeight;else l-e.currentY>=a.partLayoutInfo.panel.minHeight&&(n=0,a.panelHeight=a.partLayoutInfo.panel.minHeight,u=a.partService.setPanelHidden(!1));t&&u.done(function(){return a.layout({source:s.Parts.PANEL_PART})},r.onUnexpectedError)})),this._register(this.sashXTwo.onDidChange(function(e){var t=!1,n=a.partService.isVisible(s.Parts.PANEL_PART),c=o-(e.currentX-d),l=i.TPromise.wrap(null);if(n)if(c+100<a.partLayoutInfo.panel.minWidth){var u=a.partLayoutInfo.panel.minWidth-100;l=a.partService.setPanelHidden(!0),d=Math.min(a.workbenchSize.width-a.activitybarWidth,e.currentX+u),a.panelWidth=o}else a.panelWidth=c,
t=c>=a.partLayoutInfo.panel.minWidth;else d-e.currentX>=a.partLayoutInfo.panel.minWidth&&(o=0,a.panelWidth=a.partLayoutInfo.panel.minWidth,l=a.partService.setPanelHidden(!1));t&&l.done(function(){return a.layout({source:s.Parts.PANEL_PART})},r.onUnexpectedError)})),this._register(this.sashXOne.onDidEnd(function(){a.storageService.store(t.sashXOneWidthSettingsKey,a.sidebarWidth,u.StorageScope.GLOBAL)})),this._register(this.sashY.onDidEnd(function(){a.storageService.store(t.sashYHeightSettingsKey,a.panelHeight,u.StorageScope.GLOBAL)})),this._register(this.sashXTwo.onDidEnd(function(){a.storageService.store(t.sashXTwoWidthSettingsKey,a.panelWidth,u.StorageScope.GLOBAL)})),this._register(this.sashY.onDidReset(function(){a.panelHeight=.4*a.sidebarHeight,a.storageService.store(t.sashYHeightSettingsKey,a.panelHeight,u.StorageScope.GLOBAL),a.layout()})),this._register(this.sashXOne.onDidReset(function(){var e=a.viewletService.getActiveViewlet(),n=e&&e.getOptimalWidth();a.sidebarWidth=Math.max(n,300),
a.storageService.store(t.sashXOneWidthSettingsKey,a.sidebarWidth,u.StorageScope.GLOBAL),a.partService.setSideBarHidden(!1).done(function(){return a.layout()},r.onUnexpectedError)})),this._register(this.sashXTwo.onDidReset(function(){a.panelWidth=.4*(a.workbenchSize.width-a.sidebarWidth-a.activitybarWidth),a.storageService.store(t.sashXTwoWidthSettingsKey,a.panelWidth,u.StorageScope.GLOBAL),a.layout()}))},t.prototype.layout=function(e){this.workbenchSize=m.getClientArea(this.parent);var n=!this.partService.isVisible(s.Parts.ACTIVITYBAR_PART),i=!this.partService.isVisible(s.Parts.TITLEBAR_PART),r=!this.partService.isVisible(s.Parts.MENUBAR_PART),o=!this.partService.isVisible(s.Parts.PANEL_PART),a=!this.partService.isVisible(s.Parts.STATUSBAR_PART),c=!this.partService.isVisible(s.Parts.SIDEBAR_PART),l=this.partService.getSideBarPosition(),d=this.partService.getPanelPosition();-1===this.sidebarWidth&&(this.sidebarWidth=this.workbenchSize.width/5),this.statusbarHeight=a?0:this.partLayoutInfo.statusbar.height,
this.titlebarHeight=i?0:this.partLayoutInfo.titlebar.height/p.getZoomFactor(),this.menubarHeight=r?0:this.partLayoutInfo.menubar.height/p.getZoomFactor(),this.headingHeight=Math.max(this.menubarHeight,this.titlebarHeight),this.sidebarHeight=this.workbenchSize.height-this.statusbarHeight-this.headingHeight;var h,f,g=new m.Dimension(this.sidebarWidth,this.sidebarHeight),v=new m.Dimension(this.activitybarWidth,g.height),y=this.computeMaxPanelHeight(),b=this.computeMaxPanelWidth();o?(h=0,f=0):d===s.Position.BOTTOM?(h=this.panelHeight>0?Math.min(y,Math.max(this.partLayoutInfo.panel.minHeight,this.panelHeight)):.4*g.height,f=this.workbenchSize.width-g.width-v.width,e&&e.toggleMaximizedPanel&&(h=this.panelMaximized?Math.max(this.partLayoutInfo.panel.minHeight,Math.min(this.panelSizeBeforeMaximized,y)):y),this.panelMaximized=h===y,h/y<.7&&(this.panelSizeBeforeMaximized=h)):(h=g.height,
f=this.panelWidth>0?Math.min(b,Math.max(this.partLayoutInfo.panel.minWidth,this.panelWidth)):.4*(this.workbenchSize.width-v.width-g.width),e&&e.toggleMaximizedPanel&&(f=this.panelMaximized?Math.max(this.partLayoutInfo.panel.minWidth,Math.min(this.panelSizeBeforeMaximized,b)):b),this.panelMaximized=f===b,f/b<.7&&(this.panelSizeBeforeMaximized=f)),this.storageService.store(t.panelSizeBeforeMaximizedKey,this.panelSizeBeforeMaximized,u.StorageScope.GLOBAL);var S=new m.Dimension(f,h),_={width:0,height:0};_.width=this.workbenchSize.width-g.width-v.width-(d===s.Position.RIGHT?S.width:0),_.height=g.height-(d===s.Position.BOTTOM?S.height:0);var C=new m.Dimension(this.parts.editor.minimumWidth,this.parts.editor.minimumHeight);if(_.width<C.width){var E=C.width-_.width,w=E;if(!(o||d!==s.Position.RIGHT||e&&e.source===s.Parts.PANEL_PART)){var I=S.width;S.width=Math.max(this.partLayoutInfo.panel.minWidth,S.width-w),w-=I-S.width}if(!c&&w>0){var T=g.width;g.width=Math.max(this.partLayoutInfo.sidebar.minWidth,g.width-w),
w-=T-g.width}_.width+=E-w,o||d!==s.Position.BOTTOM||(S.width=_.width)}if(_.height<C.height){var x=C.height-_.height,k=x;if(!o&&d===s.Position.BOTTOM){var D=S.height;S.height=Math.max(this.partLayoutInfo.panel.minHeight,S.height-k),k-=D-S.height}_.height+=x-k}c||(this.sidebarWidth=g.width,this.storageService.store(t.sashXOneWidthSettingsKey,this.sidebarWidth,u.StorageScope.GLOBAL)),o||(d===s.Position.BOTTOM?(this.panelHeight=S.height,this.storageService.store(t.sashYHeightSettingsKey,this.panelHeight,u.StorageScope.GLOBAL)):(this.panelWidth=S.width,this.storageService.store(t.sashXTwoWidthSettingsKey,this.panelWidth,u.StorageScope.GLOBAL))),m.position(this.workbenchContainer,0,0,0,0,"relative"),m.size(this.workbenchContainer,this.workbenchSize.width,this.workbenchSize.height);var A=this.workbenchContainer;A.scrollTop>0&&(A.scrollTop=0),A.scrollLeft>0&&(A.scrollLeft=0);var L=this.parts.titlebar.getContainer();i?m.hide(L):m.show(L);var R=this.parts.menubar.getContainer();r?m.hide(R):m.show(R)
;var O=this.parts.editor.getContainer(),M=this.parts.panel.getContainer();m.size(O,_.width,_.height),m.size(M,S.width,S.height),d===s.Position.BOTTOM?l===s.Position.LEFT?(m.position(O,this.headingHeight,0,this.statusbarHeight+S.height,g.width+v.width),m.position(M,_.height+this.headingHeight,0,this.statusbarHeight,g.width+v.width)):(m.position(O,this.headingHeight,g.width,this.statusbarHeight+S.height,0),m.position(M,_.height+this.headingHeight,g.width,this.statusbarHeight,0)):l===s.Position.LEFT?(m.position(O,this.headingHeight,S.width,this.statusbarHeight,g.width+v.width),m.position(M,this.headingHeight,0,this.statusbarHeight,g.width+v.width+_.width)):(m.position(O,this.headingHeight,g.width+v.width+f,this.statusbarHeight,0),m.position(M,this.headingHeight,g.width+v.width,this.statusbarHeight,_.width));var P=this.parts.activitybar.getContainer();m.size(P,null,v.height),l===s.Position.LEFT?(this.parts.activitybar.getContainer().style.right="",
m.position(P,this.headingHeight,null,0,0)):(this.parts.activitybar.getContainer().style.left="",m.position(P,this.headingHeight,0,0,null)),n?m.hide(P):m.show(P);var N=this.parts.sidebar.getContainer();m.size(N,g.width,g.height);var F=_.width+(d===s.Position.RIGHT?f:0);l===s.Position.LEFT?m.position(N,this.headingHeight,F,this.statusbarHeight,v.width):m.position(N,this.headingHeight,v.width,this.statusbarHeight,F);var W=this.parts.statusbar.getContainer();m.position(W,this.workbenchSize.height-this.statusbarHeight),a?m.hide(W):m.show(W),this.quickopen.layout(this.workbenchSize),this.quickInput.layout(this.workbenchSize),this.notificationsCenter.layout(this.workbenchSize),this.notificationsToasts.layout(this.workbenchSize),this.sashXOne.layout(),d===s.Position.BOTTOM?(this.sashXTwo.hide(),this.sashY.layout(),this.sashY.show()):(this.sashY.hide(),this.sashXTwo.layout(),this.sashXTwo.show()),this.parts.titlebar.layout(new m.Dimension(this.workbenchSize.width,this.titlebarHeight)),
this.parts.menubar.layout(new m.Dimension(this.workbenchSize.width,this.menubarHeight)),this.parts.editor.layout(new m.Dimension(_.width,_.height)),this.parts.sidebar.layout(g),this.parts.panel.layout(S),this.parts.activitybar.layout(v),this.contextViewService.layout()},t.prototype.getVerticalSashTop=function(e){return this.headingHeight},t.prototype.getVerticalSashLeft=function(e){var t=this.partService.getSideBarPosition();return e===this.sashXOne?t===s.Position.LEFT?this.sidebarWidth+this.activitybarWidth:this.workbenchSize.width-this.sidebarWidth-this.activitybarWidth:this.workbenchSize.width-this.panelWidth-(t===s.Position.RIGHT?this.sidebarWidth+this.activitybarWidth:0)},t.prototype.getVerticalSashHeight=function(e){return e!==this.sashXTwo||this.partService.isVisible(s.Parts.PANEL_PART)?this.sidebarHeight:0},t.prototype.getHorizontalSashTop=function(e){return 2+(this.partService.isVisible(s.Parts.PANEL_PART)?this.sidebarHeight-this.panelHeight+this.headingHeight:this.sidebarHeight+this.headingHeight)},
t.prototype.getHorizontalSashLeft=function(e){return this.partService.getSideBarPosition()===s.Position.RIGHT?0:this.sidebarWidth+this.activitybarWidth},t.prototype.getHorizontalSashWidth=function(e){return this.panelWidth},t.prototype.isPanelMaximized=function(){return this.panelMaximized},t.prototype.resizePart=function(e,t){var n=this.partService.getPanelPosition(),i=this.workbenchSize.width*(t/100),r=this.workbenchSize.height*(t/100),o=!1;switch(e){case s.Parts.SIDEBAR_PART:this.sidebarWidth=this.sidebarWidth+i,this.workbenchSize.width-this.sidebarWidth<this.parts.editor.minimumWidth&&(this.sidebarWidth=this.workbenchSize.width-this.parts.editor.minimumWidth),o=!0;break;case s.Parts.PANEL_PART:n===s.Position.BOTTOM?this.panelHeight=this.panelHeight+r:n===s.Position.RIGHT&&(this.panelWidth=this.panelWidth+i),o=!0;break;case s.Parts.EDITOR_PART:if(1===this.editorGroupService.count)this.partService.isVisible(s.Parts.SIDEBAR_PART)?(this.sidebarWidth=this.sidebarWidth-i,
o=!0):this.partService.isVisible(s.Parts.PANEL_PART)&&(n===s.Position.BOTTOM?this.panelHeight=this.panelHeight-r:n===s.Position.RIGHT&&(this.panelWidth=this.panelWidth-i),o=!0);else{var a=this.editorGroupService.activeGroup,c=this.editorGroupService.getSize(a);this.editorGroupService.setSize(a,c+i)}}o&&this.layout()},t.sashXOneWidthSettingsKey="workbench.sidebar.width",t.sashXTwoWidthSettingsKey="workbench.panel.width",t.sashYHeightSettingsKey="workbench.panel.height",t.panelSizeBeforeMaximizedKey="workbench.panel.sizeBeforeMaximized",a([v.memoize],t.prototype,"partLayoutInfo",null),t=a([l(7,u.IStorageService),l(8,d.IContextViewService),l(9,s.IPartService),l(10,c.IViewletService),l(11,f.IThemeService),l(12,y.IEditorGroupsService)],t)}(h.Disposable);t.WorkbenchLayout=S}),define(e[1496],t([1,0,8,132,4,23,35,5,65,46,12,26,82,84,238,28,821]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(e){function t(t,n,i,r){var o=e.call(this,t)||this
;return o.viewletService=n,o.partService=i,o.telemetryService=r,o.lastRun=0,o}return n(t,e),t.prototype.run=function(e){var n=this;if(e instanceof MouseEvent&&2===e.button)return o.TPromise.as(!1);var i=Date.now();if(i>this.lastRun&&i-this.lastRun<t.preventDoubleClickDelay)return o.TPromise.as(!0);this.lastRun=i;var r=this.partService.isVisible(h.Parts.SIDEBAR_PART),s=this.viewletService.getActiveViewlet();return r&&s&&s.getId()===this.activity.id?(this.logAction("hide"),this.partService.setSideBarHidden(!0)):(this.logAction("show"),this.viewletService.openViewlet(this.activity.id,!0).then(function(){return n.activate()}))},t.prototype.logAction=function(e){this.telemetryService.publicLog("activityBarAction",{viewletId:this.activity.id,action:e})},t.preventDoubleClickDelay=300,t=a([l(1,d.IViewletService),l(2,h.IPartService),l(3,y.ITelemetryService)],t)}(m.ActivityAction);t.ViewletActivityAction=b;var S=function(e){function t(t,n,i){var r=e.call(this,t.id,t.name)||this;return r._viewlet=t,r.partService=n,
r.viewletService=i,r}return n(t,e),t.prototype.run=function(){var e=this.partService.isVisible(h.Parts.SIDEBAR_PART),t=this.viewletService.getActiveViewlet();return e&&t&&t.getId()===this._viewlet.id?this.partService.setSideBarHidden(!0):this.viewletService.openViewlet(this._viewlet.id,!0)},t=a([l(1,h.IPartService),l(2,d.IViewletService)],t)}(s.Action);t.ToggleViewletAction=S;var _=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t}(m.ActivityAction);t.GlobalActivityAction=_;var C=function(e){function t(t,n,i,r){var o=e.call(this,t,{draggable:!1,colors:n,icon:!0},i)||this;return o.contextMenuService=r,o}return n(t,e),t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.$container.on(i.EventType.MOUSE_DOWN,function(e){i.EventHelper.stop(e,!0);var t=new g.StandardMouseEvent(e);n.showContextMenu({x:t.posx,y:t.posy})}),this.$container.on(i.EventType.KEY_UP,function(e){var t=new v.StandardKeyboardEvent(e);(t.equals(3)||t.equals(10))&&(i.EventHelper.stop(e,!0),
n.showContextMenu(n.$container.getHTMLElement()))}),this.$container.on(r.EventType.Tap,function(e){i.EventHelper.stop(e,!0);var t=new g.StandardMouseEvent(e);n.showContextMenu({x:t.posx,y:t.posy})})},t.prototype.showContextMenu=function(e){var t=this._action.activity.getActions();this.contextMenuService.showContextMenu({getAnchor:function(){return e},getActions:function(){return o.TPromise.as(t)},onHide:function(){return u.dispose(t)}})},t=a([l(2,p.IThemeService),l(3,c.IContextMenuService)],t)}(m.ActivityActionItem);t.GlobalActivityActionItem=C,p.registerThemingParticipant(function(e,t){var n=e.getColor(f.activeContrastBorder)
;if(n)t.addRule('\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:before {\n\t\t\t\tcontent: "";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 9px;\n\t\t\t\tleft: 9px;\n\t\t\t\theight: 32px;\n\t\t\t\twidth: 32px;\n\t\t\t\topacity: 0.6;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:hover:before {\n\t\t\t\toutline: 1px solid;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before {\n\t\t\t\toutline: 1px dashed;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before {\n\t\t\t\tborder-left-color: '+n+";\n\t\t\t}\n\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:hover:before,\n\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before {\n\t\t\t\toutline-color: "+n+";\n\t\t\t}\n\t\t");else{
var i=e.getColor(f.focusBorder);i&&t.addRule("\n\t\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label,\n\t\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked .action-label,\n\t\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label,\n\t\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label {\n\t\t\t\t\topacity: 0.6;\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before {\n\t\t\t\t\tborder-left-color: "+i+";\n\t\t\t\t}\n\t\t\t")}})}),define(e[1497],t([1,0,1489,9,74,41,459,16,200,1496,65,46,6,5,471,12,69,26,408,238,8,34,49,28,10,822]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var k=function(e){function t(n,r,o,a,c,l,u){var d=e.call(this,n,{hasTitle:!1},c)||this;d.viewletService=r,d.instantiationService=o,d.partService=a,d.storageService=l,d.placeholderComposites=[],d.globalActivityIdToActions=Object.create(null),d.compositeActions=Object.create(null),d.compositeBar=d.instantiationService.createInstance(_.CompositeBar,{icon:!0,storageId:t.PINNED_VIEWLETS,orientation:s.ActionsOrientation.VERTICAL,openComposite:function(e){return d.viewletService.openViewlet(e,!0)},getActivityAction:function(e){return d.getCompositeActions(e).activityAction},getCompositePinnedAction:function(e){return d.getCompositeActions(e).pinnedAction},getOnCompositeClickAction:function(e){return d.instantiationService.createInstance(h.ToggleViewletAction,d.viewletService.getViewlet(e))},getContextMenuActions:function(){return[d.instantiationService.createInstance(m.ToggleActivityBarVisibilityAction,m.ToggleActivityBarVisibilityAction.ID,i.localize(0,null))]},
getDefaultCompositeId:function(){return d.viewletService.getDefaultViewletId()},hidePart:function(){return d.partService.setSideBarHidden(!0)},compositeSize:50,colors:t.COLORS,overflowActionSize:t.ACTION_HEIGHT});var p=d.storageService.get(t.PLACEHOLDER_VIEWLETS,w.StorageScope.GLOBAL,void 0);if(p){var f=JSON.parse(p);f.forEach(function(e){"object"==typeof e.iconUrl?e.iconUrl=x.default.revive(e.iconUrl):e.iconUrl=void 0}),d.placeholderComposites=f}else d.placeholderComposites=d.compositeBar.getCompositesFromStorage().map(function(e){return{id:e,iconUrl:void 0}});return d.registerListeners(),d.updateCompositebar(),d.updatePlaceholderComposites(),u.onDidRegisterExtensions(function(){return d.onDidRegisterExtensions()}),d}return n(t,e),t.prototype.onDidRegisterExtensions=function(){this.removeNotExistingPlaceholderComposites(),this.updateCompositebar()},t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.viewletService.onDidViewletRegister(function(){return e.updateCompositebar()})),
this.toUnbind.push(this.viewletService.onDidViewletOpen(function(t){return e.compositeBar.activateComposite(t.getId())})),this.toUnbind.push(this.viewletService.onDidViewletClose(function(t){return e.compositeBar.deactivateComposite(t.getId())})),this.toUnbind.push(this.viewletService.onDidViewletEnablementChange(function(t){var n=t.id;t.enabled?e.compositeBar.addComposite(e.viewletService.getViewlet(n)):e.removeComposite(n)}))},t.prototype.showActivity=function(e,t,n,i){return this.viewletService.getViewlet(e)?this.compositeBar.showActivity(e,t,n,i):this.showGlobalActivity(e,t,n)},t.prototype.showGlobalActivity=function(e,t,n){if(!t)throw r.illegalArgument("badge");var i=this.globalActivityIdToActions[e];if(!i)throw r.illegalArgument("globalActivityId");return i.setBadge(t,n),v.toDisposable(function(){return i.setBadge(void 0)})},t.prototype.createContentArea=function(e){var t=o.$(e),n=o.$(".content").appendTo(t);return this.compositeBar.create(n.getHTMLElement()),
this.createGlobalActivityActionBar(o.$(".global-activity").appendTo(n).getHTMLElement()),n.getHTMLElement()},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this);var t=o.$(this.getContainer()),n=this.getColor(b.ACTIVITY_BAR_BACKGROUND);t.style("background-color",n);var i=this.getColor(b.ACTIVITY_BAR_BORDER)||this.getColor(S.contrastBorder),r=this.partService.getSideBarPosition()===f.Position.LEFT;t.style("box-sizing",i&&r?"border-box":null),t.style("border-right-width",i&&r?"1px":null),t.style("border-right-style",i&&r?"solid":null),t.style("border-right-color",r?i:null),t.style("border-left-width",i&&!r?"1px":null),t.style("border-left-style",i&&!r?"solid":null),t.style("border-left-color",r?null:i)},t.prototype.createGlobalActivityActionBar=function(e){var n=this,r=u.Registry.as(c.GlobalActivityExtensions).getActivities().map(function(e){return n.instantiationService.createInstance(e)}).map(function(e){return new h.GlobalActivityAction(e)});this.globalActionBar=new s.ActionBar(e,{
actionItemProvider:function(e){return n.instantiationService.createInstance(h.GlobalActivityActionItem,e,t.COLORS)},orientation:s.ActionsOrientation.VERTICAL,ariaLabel:i.localize(1,null),animated:!1}),this.toUnbind.push(this.globalActionBar),r.forEach(function(e){n.globalActivityIdToActions[e.id]=e,n.globalActionBar.push(e)})},t.prototype.getCompositeActions=function(e){var t=this.compositeActions[e];if(!t){var n=this.viewletService.getViewlet(e);if(n)t={activityAction:this.instantiationService.createInstance(h.ViewletActivityAction,n),pinnedAction:new C.ToggleCompositePinnedAction(n,this.compositeBar)};else{var i=this.placeholderComposites.filter(function(t){return t.id===e})[0];t={activityAction:this.instantiationService.createInstance(D,e,i.iconUrl),pinnedAction:new A(e,this.compositeBar)}}this.compositeActions[e]=t}return t},t.prototype.updateCompositebar=function(){for(var e=function(e){t.compositeBar.addComposite(e),t.placeholderComposites.every(function(t){return t.id!==e.id
})&&t.compositeBar.pin(e.id),t.enableCompositeActions(e);var n=t.viewletService.getActiveViewlet();n&&n.getId()===e.id&&(t.compositeBar.pin(e.id),t.compositeBar.activateComposite(e.id))},t=this,n=0,i=this.viewletService.getViewlets();n<i.length;n++){e(i[n])}},t.prototype.updatePlaceholderComposites=function(){for(var e=this.viewletService.getViewlets(),t=function(t){e.every(function(e){return e.id!==t})&&n.compositeBar.addComposite({id:t,name:t,order:void 0})},n=this,i=0,r=this.placeholderComposites;i<r.length;i++){t(r[i].id)}},t.prototype.removeNotExistingPlaceholderComposites=function(){for(var e=this.viewletService.getViewlets(),t=function(t){e.every(function(e){return e.id!==t})&&n.removeComposite(t)},n=this,i=0,r=this.placeholderComposites;i<r.length;i++){t(r[i].id)}},t.prototype.removeComposite=function(e){this.compositeBar.removeComposite(e);var t=this.compositeActions[e];t&&(t.activityAction.dispose(),t.pinnedAction.dispose(),delete this.compositeActions[e])},
t.prototype.enableCompositeActions=function(e){var t=this.getCompositeActions(e.id),n=t.activityAction,i=t.pinnedAction;n instanceof D&&n.setActivity(e),i instanceof A&&i.setActivity(e)},t.prototype.getPinned=function(){var e=this;return this.viewletService.getViewlets().map(function(e){return e.id}).filter(function(t){return e.compositeBar.isPinned(t)})},t.prototype.layout=function(n){if(!this.partService.isVisible(f.Parts.ACTIVITYBAR_PART))return[n];var i=e.prototype.layout.call(this,n);this.dimension=i[1];var r=this.dimension.height;return this.globalActionBar&&(r-=this.globalActionBar.items.length*t.ACTION_HEIGHT),this.compositeBar.layout(new E.Dimension(n.width,r)),i},t.prototype.shutdown=function(){var n=this.viewletService.getViewlets().map(function(e){return{id:e.id,iconUrl:e.iconUrl}});this.storageService.store(t.PLACEHOLDER_VIEWLETS,JSON.stringify(n),w.StorageScope.GLOBAL),e.prototype.shutdown.call(this)},t.prototype.dispose=function(){this.compositeBar&&(this.compositeBar.dispose(),
this.compositeBar=null),this.globalActionBar&&(this.globalActionBar.dispose(),this.globalActionBar=null),e.prototype.dispose.call(this)},t.PINNED_VIEWLETS="workbench.activity.pinnedViewlets",t.PLACEHOLDER_VIEWLETS="workbench.activity.placeholderViewlets",t.COLORS={backgroundColor:b.ACTIVITY_BAR_FOREGROUND,badgeBackground:b.ACTIVITY_BAR_BADGE_BACKGROUND,badgeForeground:b.ACTIVITY_BAR_BADGE_FOREGROUND,dragAndDropBackground:b.ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND},t.ACTION_HEIGHT=50,t=a([l(1,p.IViewletService),l(2,g.IInstantiationService),l(3,f.IPartService),l(4,y.IThemeService),l(5,w.IStorageService),l(6,I.IExtensionService)],t)}(d.Part);t.ActivitybarPart=k;var D=function(e){function t(t,n,i,r,o){var s=e.call(this,{id:t,name:t,cssClass:"extensionViewlet-placeholder-"+t.replace(/\./g,"-")},i,r,o)||this,a=".monaco-workbench > .activitybar .monaco-action-bar .action-label."+s.class;return E.createCSSRule(a,"-webkit-mask: url('"+(n||"")+"') no-repeat 50% 50%"),s.enabled=!1,s}return n(t,e),
t.prototype.setActivity=function(e){this.activity=e,this.enabled=!0},t=a([l(2,p.IViewletService),l(3,f.IPartService),l(4,T.ITelemetryService)],t)}(h.ViewletActivityAction),A=function(e){function t(t,n){var i=e.call(this,{id:t,name:t,cssClass:void 0},n)||this;return i.enabled=!1,i}return n(t,e),t.prototype.setActivity=function(e){this.label=e.name,this.enabled=!0},t}(C.ToggleCompositePinnedAction)}),define(e[99],t([1,0,562,4,8,16,23,65,497,472,53]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,n,i,r){var o=e.call(this,t,i,r)||this;return o.partService=n,o}return n(t,e),t.prototype.getOptimalWidth=function(){return null},t.prototype.getContextMenuActions=function(){var e=this;return[{id:h.ToggleSidebarVisibilityAction.ID,label:i.localize(0,null),enabled:!0,run:function(){return e.partService.setSideBarHidden(!0)}}]},t}(d.Composite);t.Viewlet=f;var g=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,i,r,o,n)||this
;return a._iconUrl=s,a}return n(t,e),Object.defineProperty(t.prototype,"iconUrl",{get:function(){return this._iconUrl},enumerable:!0,configurable:!0}),t}(d.CompositeDescriptor);t.ViewletDescriptor=g,t.Extensions={Viewlets:"workbench.contributions.viewlets"};var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.registerViewlet=function(t){e.prototype.registerComposite.call(this,t)},t.prototype.getViewlet=function(e){return this.getComposite(e)},t.prototype.getViewlets=function(){return this.getComposites()},t.prototype.setDefaultViewletId=function(e){this.defaultViewletId=e},t.prototype.getDefaultViewletId=function(){return this.defaultViewletId},t}(d.CompositeRegistry);t.ViewletRegistry=v,s.Registry.add(t.Extensions.Viewlets,new v);var m=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.viewletService=r,s.editorGroupService=o,s.viewletId=i,s.enabled=!!s.viewletService&&!!s.editorGroupService,s}return n(t,e),t.prototype.run=function(){
return this.otherViewletShowing()||!this.sidebarHasFocus()?this.viewletService.openViewlet(this.viewletId,!0):(this.editorGroupService.activeGroup.focus(),r.TPromise.as(!0))},t.prototype.otherViewletShowing=function(){var e=this.viewletService.getActiveViewlet();return!e||e.getId()!==this.viewletId},t.prototype.sidebarHasFocus=function(){var e=this.viewletService.getActiveViewlet(),t=document.activeElement;return e&&t&&o.isAncestor(t,e.getContainer())},t=a([l(3,u.IViewletService),l(4,p.IEditorGroupsService)],t)}(c.Action);t.ToggleViewletAction=m;var y=function(e){function t(t,n,o){return e.call(this,"workbench.action.collapse",i.localize(1,null),o,n,function(e){return t.getHighlight()?r.TPromise.as(null):(t.collapseAll(),t.clearSelection(),t.clearFocus(),t.domFocus(),t.focusFirst(),r.TPromise.as(null))})||this}return n(t,e),t}(c.Action);t.CollapseAction=y}),define(e[173],t([1,0,1579,4,7,26,68,69,8,5,20,41,16,146,99,346,37,35,28,12,440,17,46,82,862]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(t,n,i,r){var o=e.call(this,t)||this;return o.keybindingService=n,o.contextMenuService=i,o.configurationService=r,o._onDidFocus=new c.Emitter,o.onDidFocus=o._onDidFocus.event,o._onDidBlur=new c.Emitter,o.onDidBlur=o._onDidBlur.event,o._onDidChangeTitleArea=new c.Emitter,o.onDidChangeTitleArea=o._onDidChangeTitleArea.event,o.id=t.id,o.title=t.title,o.actionRunner=t.actionRunner,o}return n(t,e),t.prototype.setVisible=function(e){return this._isVisible!==e&&(this._isVisible=e),r.TPromise.wrap(null)},t.prototype.isVisible=function(){return this._isVisible},t.prototype.render=function(){var t=this;e.prototype.render.call(this);var n=p.trackFocus(this.element);this.disposables.push(n),this.disposables.push(n.onDidFocus(function(){return t._onDidFocus.fire()})),this.disposables.push(n.onDidBlur(function(){return t._onDidBlur.fire()}))},t.prototype.renderHeader=function(e){var n=this;this.headerContainer=e,
this.renderHeaderTitle(e);var r=p.append(e,p.$(".actions"));this.toolbar=new S.ToolBar(r,this.contextMenuService,{orientation:v.ActionsOrientation.HORIZONTAL,actionItemProvider:function(e){return n.getActionItem(e)},ariaLabel:i.localize(0,null,this.title),getKeyBinding:function(e){return n.keybindingService.lookupKeybinding(e.id)},actionRunner:this.actionRunner}),this.disposables.push(this.toolbar),this.setActions();c.filterEvent(this.configurationService.onDidChangeConfiguration,function(e){return e.affectsConfiguration(t.AlwaysShowActionsConfig)})(this.updateActionsVisibility,this,this.disposables),this.updateActionsVisibility()},t.prototype.renderHeaderTitle=function(e){p.append(e,p.$(".title",null,this.title))},t.prototype.focus=function(){this.element&&(this.element.focus(),this._onDidFocus.fire())},t.prototype.setActions=function(){this.toolbar.setActions(y.prepareActions(this.getActions()),y.prepareActions(this.getSecondaryActions()))(),this.toolbar.context=this.getActionsContext()},
t.prototype.updateActionsVisibility=function(){var e=this.configurationService.getValue("workbench.view.alwaysShowHeaderActions");p.toggleClass(this.headerContainer,"actions-always-visible",e)},t.prototype.updateActions=function(){this.setActions(),this._onDidChangeTitleArea.fire()},t.prototype.getActions=function(){return[]},t.prototype.getSecondaryActions=function(){return[]},t.prototype.getActionItem=function(e){return null},t.prototype.getActionsContext=function(){},t.prototype.getOptimalWidth=function(){return 0},t.prototype.shutdown=function(){},t.AlwaysShowActionsConfig="workbench.view.alwaysShowHeaderActions",t=a([l(1,_.IKeybindingService),l(2,C.IContextMenuService),l(3,T.IConfigurationService)],t)}(I.Panel);t.ViewletPanel=D;var A=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,i,o,s)||this;return a.options=n,a.contextMenuService=r,a.panelItems=[],a}return n(t,e),Object.defineProperty(t.prototype,"onDidSashChange",{get:function(){return this.panelview.onDidSashChange},enumerable:!0,
configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panelItems.map(function(e){return e.panel})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.panelItems.length},enumerable:!0,configurable:!0}),t.prototype.create=function(t){return o(this,void 0,r.TPromise,function(){var n=this;return s(this,function(i){return e.prototype.create.call(this,t),this.panelview=this._register(new I.PanelView(t,this.options)),this._register(this.panelview.onDidDrop(function(e){var t=e.from,i=e.to;return n.movePanel(t,i)})),this._register(p.addDisposableListener(t,p.EventType.CONTEXT_MENU,function(e){return n.showContextMenu(new k.StandardMouseEvent(e))})),[2]})})},t.prototype.showContextMenu=function(e){for(var t=this,n=0,i=this.panelItems;n<i.length;n++){var o=i[n];if(p.isAncestor(e.target,o.panel.element))return}e.stopPropagation(),e.preventDefault();var s={x:e.posx,y:e.posy};this.contextMenuService.showContextMenu({getAnchor:function(){
return s},getActions:function(){return r.TPromise.as(t.getContextMenuActions())}})},t.prototype.getTitle=function(){var e=m.Registry.as(b.Extensions.Viewlets).getViewlet(this.getId()).name;return this.isSingleView()&&(e+=": "+this.panelItems[0].panel.title),e},t.prototype.getActions=function(){return this.isSingleView()?this.panelItems[0].panel.getActions():[]},t.prototype.getSecondaryActions=function(){return this.isSingleView()?this.panelItems[0].panel.getSecondaryActions():[]},t.prototype.getActionItem=function(t){return this.isSingleView()?this.panelItems[0].panel.getActionItem(t):e.prototype.getActionItem.call(this,t)},t.prototype.focus=function(){if(e.prototype.focus.call(this),this.lastFocusedPanel)this.lastFocusedPanel.focus();else if(this.panelItems.length>0)for(var t=0,n=this.panelItems;t<n.length;t++){var i=n[t].panel;if(i.isExpanded())return void i.focus()}},t.prototype.layout=function(e){this.panelview.layout(e.height)},t.prototype.getOptimalWidth=function(){var e=this.panelItems.map(function(e){
return e.panel.getOptimalWidth()||0});return Math.max.apply(Math,e)},t.prototype.addPanels=function(e){for(var t=this.isSingleView(),n=0,i=e;n<i.length;n++){var r=i[n],o=r.panel,s=r.size,a=r.index;this.addPanel(o,s,a)}this.updateViewHeaders(),this.isSingleView()!==t&&this.updateTitleArea()},t.prototype.addPanel=function(e,t,n){var i=this;void 0===n&&(n=this.panelItems.length-1);var r=[],o=e.onDidFocus(function(){return i.lastFocusedPanel=e},null,r),s=e.onDidChangeTitleArea(function(){i.isSingleView()&&i.updateTitleArea()},null,r),a=e.onDidChange(function(){e!==i.lastFocusedPanel||e.isExpanded()||(i.lastFocusedPanel=void 0)},null,r),c=d.attachStyler(this.themeService,{headerForeground:h.SIDE_BAR_SECTION_HEADER_FOREGROUND,headerBackground:h.SIDE_BAR_SECTION_HEADER_BACKGROUND,headerHighContrastBorder:0===n?null:u.contrastBorder,dropBackground:h.SIDE_BAR_DRAG_AND_DROP_BACKGROUND},e),l=f.combinedDisposable([o,s,c,a]),p={panel:e,disposable:l};this.panelItems.splice(n,0,p),this.panelview.addPanel(e,t,n)},
t.prototype.removePanels=function(e){var t=this,n=this.isSingleView();e.forEach(function(e){return t.removePanel(e)}),this.updateViewHeaders(),n!==this.isSingleView()&&this.updateTitleArea()},t.prototype.removePanel=function(e){var t=g.firstIndex(this.panelItems,function(t){return t.panel===e});if(-1!==t){this.lastFocusedPanel===e&&(this.lastFocusedPanel=void 0),this.panelview.removePanel(e);this.panelItems.splice(t,1)[0].disposable.dispose()}},t.prototype.movePanel=function(e,t){var n=g.firstIndex(this.panelItems,function(t){return t.panel===e}),i=g.firstIndex(this.panelItems,function(e){return e.panel===t});if(!(n<0||n>=this.panelItems.length||i<0||i>=this.panelItems.length)){var r=this.panelItems.splice(n,1)[0];this.panelItems.splice(i,0,r),this.panelview.movePanel(e,t)}},t.prototype.resizePanel=function(e,t){this.panelview.resizePanel(e,t)},t.prototype.getPanelSize=function(e){return this.panelview.getPanelSize(e)},t.prototype.updateViewHeaders=function(){
this.isSingleView()?(this.panelItems[0].panel.setExpanded(!0),this.panelItems[0].panel.headerVisible=!1):this.panelItems.forEach(function(e){return e.panel.headerVisible=!0})},t.prototype.isSingleView=function(){return this.options.showHeaderInTitleWhenSingleView&&1===this.panelItems.length},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.panelItems.forEach(function(e){return e.disposable.dispose()}),this.panelview.dispose()},t=a([l(2,x.IPartService),l(3,C.IContextMenuService),l(4,E.ITelemetryService),l(5,w.IThemeService)],t)}(b.Viewlet);t.PanelViewlet=A}),define(e[364],t([1,0,5,6,4,98,16,99,34,38,65,15,7,20,27,30,469]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b){"use strict";function S(e,t){return v.chain(t).map(function(t){return t.filter(function(t){return t.container===e})}).filter(function(e){return e.length>0}).event}Object.defineProperty(t,"__esModule",{value:!0});var _=function(){function e(){this.map=new Map}return e.prototype.add=function(e){
return this.map.set(e,(this.map.get(e)||0)+1),this},e.prototype.delete=function(e){var t=this.map.get(e)||0;return 0!==t&&(0===--t?this.map.delete(e):this.map.set(e,t),!0)},e.prototype.has=function(e){return this.map.has(e)},e}(),C=function(e){function t(t,n){var i=e.call(this)||this;i.contextKeyService=n,i.contextKeys=new _,i.items=[],i._onDidChange=i._register(new v.Emitter),i.onDidChange=i._onDidChange.event;var r=S(t,s.ViewsRegistry.onViewsRegistered);i._register(r(i.onViewsRegistered,i));var o=S(t,s.ViewsRegistry.onViewsDeregistered);i._register(o(i.onViewsDeregistered,i));var a=v.filterEvent(n.onDidChangeContext,function(e){return e.affectsSome(i.contextKeys)});return i._register(a(i.onContextChanged,i)),i.onViewsRegistered(s.ViewsRegistry.getViews(t)),i}return n(t,e),Object.defineProperty(t.prototype,"viewDescriptors",{get:function(){return this.items.filter(function(e){return e.active}).map(function(e){return e.viewDescriptor})},enumerable:!0,configurable:!0}),
t.prototype.onViewsRegistered=function(e){for(var t=!1,n=0,i=e;n<i.length;n++){var r=i[n],o={viewDescriptor:r,active:this.isViewDescriptorActive(r)};if(this.items.push(o),r.when)for(var s=0,a=r.when.keys();s<a.length;s++){var c=a[s];this.contextKeys.add(c)}o.active&&(t=!0)}t&&this._onDidChange.fire()},t.prototype.onViewsDeregistered=function(e){for(var t=!1,n=function(e){var n=m.firstIndex(i.items,function(t){return t.viewDescriptor.id===e.id});if(-1===n)return"continue";var r=i.items[n];if(i.items.splice(n,1),e.when)for(var o=0,s=e.when.keys();o<s.length;o++){var a=s[o];i.contextKeys.delete(a)}r.active&&(t=!0)},i=this,r=0,o=e;r<o.length;r++){n(o[r])}t&&this._onDidChange.fire()},t.prototype.onContextChanged=function(e){for(var t=!1,n=0,i=this.items;n<i.length;n++){var r=i[n],o=this.isViewDescriptorActive(r.viewDescriptor);r.active!==o&&(t=!0),r.active=o}t&&this._onDidChange.fire()},t.prototype.isViewDescriptorActive=function(e){return!e.when||this.contextKeyService.contextMatchesRules(e.when)},
t=a([l(1,g.IContextKeyService)],t)}(i.Disposable),E=function(e){function t(t,n,i){void 0===i&&(i=new Map);var r=e.call(this)||this;r.viewStates=i,r.viewDescriptors=[],r._onDidAdd=r._register(new v.Emitter),r.onDidAdd=r._onDidAdd.event,r._onDidRemove=r._register(new v.Emitter),r.onDidRemove=r._onDidRemove.event,r._onDidMove=r._register(new v.Emitter),r.onDidMove=r._onDidMove.event;var o=r._register(new C(t,n));return r._register(o.onDidChange(function(){return r.onDidChangeViewDescriptors(o.viewDescriptors)})),r.onDidChangeViewDescriptors(o.viewDescriptors),r}return n(t,e),Object.defineProperty(t.prototype,"visibleViewDescriptors",{get:function(){var e=this;return this.viewDescriptors.filter(function(t){return e.viewStates.get(t.id).visible})},enumerable:!0,configurable:!0}),t.prototype.isVisible=function(e){var t=this.viewStates.get(e);if(!t)throw new Error("Unknown view "+e);return t.visible},t.prototype.setVisible=function(e,t){var n=this.find(e),i=n.visibleIndex,r=n.viewDescriptor,o=n.state
;if(!r.canToggleVisibility)throw new Error("Can't toggle this view's visibility");o.visible!==t&&(o.visible=t,t?this._onDidAdd.fire([{index:i,viewDescriptor:r,size:o.size,collapsed:o.collapsed}]):this._onDidRemove.fire([{index:i,viewDescriptor:r}]))},t.prototype.isCollapsed=function(e){var t=this.viewStates.get(e);if(!t)throw new Error("Unknown view "+e);return t.collapsed},t.prototype.setCollapsed=function(e,t){this.find(e).state.collapsed=t},t.prototype.getSize=function(e){var t=this.viewStates.get(e);if(!t)throw new Error("Unknown view "+e);return t.size},t.prototype.setSize=function(e,t){this.find(e).state.size=t},t.prototype.move=function(e,t){var n=m.firstIndex(this.viewDescriptors,function(t){return t.id===e}),i=m.firstIndex(this.viewDescriptors,function(e){return e.id===t}),r=this.viewDescriptors[n],o=this.viewDescriptors[i];m.move(this.viewDescriptors,n,i);for(var s=0;s<this.viewDescriptors.length;s++){this.viewStates.get(this.viewDescriptors[s].id).order=s}this._onDidMove.fire({from:{index:n,
viewDescriptor:r},to:{index:i,viewDescriptor:o}})},t.prototype.find=function(e){for(var t=0,n=0;t<this.viewDescriptors.length;t++){var i=this.viewDescriptors[t],r=this.viewStates.get(i.id);if(i.id===e)return{index:t,visibleIndex:n,viewDescriptor:i,state:r};r.visible&&n++}throw new Error("view descriptor "+e+" not found")},t.prototype.compareViewDescriptors=function(e,t){return e.id===t.id?0:this.getViewOrder(e)-this.getViewOrder(t)||(e.id<t.id?-1:1)},t.prototype.getViewOrder=function(e){var t=this.viewStates.get(e.id),n=t&&"number"==typeof t.order?t.order:e.order;return"number"==typeof n?n:Number.MAX_VALUE},t.prototype.onDidChangeViewDescriptors=function(e){for(var t,n=new Set,i=0,r=this.viewDescriptors;i<r.length;i++){a=r[i];n.add(a.id)}for(var o=0,s=e=e.sort(this.compareViewDescriptors.bind(this));o<s.length;o++){var a=s[o],c=this.viewStates.get(a.id);c?(c.visible=b.isUndefinedOrNull(c.visible)?!a.hideByDefault:c.visible,
c.collapsed=b.isUndefinedOrNull(c.collapsed)?!!a.collapsed:c.collapsed):this.viewStates.set(a.id,{visible:!a.hideByDefault,collapsed:a.collapsed})}for(var l=[],u=[],d=0,h=m.sortedDiff(this.viewDescriptors,e,this.compareViewDescriptors.bind(this)).reverse();d<h.length;d++){for(var p=h[d],f=this.viewDescriptors[p.start],g=f?this.find(f.id).visibleIndex:this.viewDescriptors.length,v=0;v<p.deleteCount;v++){a=this.viewDescriptors[p.start+v];(y=this.find(a.id).state).visible&&l.push({index:g++,viewDescriptor:a})}for(v=0;v<p.toInsert.length;v++){var a=p.toInsert[v],y=this.viewStates.get(a.id);y.visible&&u.push({index:g++,viewDescriptor:a,size:y.size,collapsed:y.collapsed})}}(t=this.viewDescriptors).splice.apply(t,[0,this.viewDescriptors.length].concat(e)),l.length&&this._onDidRemove.fire(l),u.length&&this._onDidAdd.fire(u)},t}(i.Disposable);t.ContributableViewsModel=E;var w=function(e){function t(n,i,r,o,s){var a=this,c=i+".hidden",l=t.loadViewsStates(i,c,o,s);return a=e.call(this,n,r,l)||this,
a.viewletStateStorageId=i,a.hiddenViewsStorageId=c,a.storageService=o,a.contextService=s,a._register(a.onDidAdd(function(){return a.saveVisibilityStates()})),a._register(a.onDidRemove(function(){return a.saveVisibilityStates()})),a}return n(t,e),t.prototype.saveViewsStates=function(){for(var e={},t=0,n=this.viewDescriptors;t<n.length;t++){var i=n[t],r=this.viewStates.get(i.id);r&&(e[i.id]={collapsed:r.collapsed,size:r.size,order:r.order})}this.storageService.store(this.viewletStateStorageId,JSON.stringify(e),this.contextService.getWorkbenchState()!==y.WorkbenchState.EMPTY?h.StorageScope.WORKSPACE:h.StorageScope.GLOBAL)},t.prototype.saveVisibilityStates=function(){for(var e=[],t=0,n=this.viewDescriptors;t<n.length;t++){var i=n[t];if(i.canToggleVisibility){var r=this.viewStates.get(i.id);e.push({id:i.id,isHidden:r?!r.visible:void 0})}}this.storageService.store(this.hiddenViewsStorageId,JSON.stringify(e),h.StorageScope.GLOBAL)},t.loadViewsStates=function(e,t,n,i){
for(var r=new Map,o=JSON.parse(n.get(e,i.getWorkbenchState()!==y.WorkbenchState.EMPTY?h.StorageScope.WORKSPACE:h.StorageScope.GLOBAL,"{}")),s=0,a=JSON.parse(n.get(t,h.StorageScope.GLOBAL,"[]")).map(function(e){return"string"==typeof e?{id:e,isHidden:!0}:e});s<a.length;s++){var l=a[s],u=l.id,d=l.isHidden,p=o[u];p?r.set(u,c({},p,{visible:!d})):r.set(u,c({visible:!d}))}for(var f=0,g=Object.keys(o);f<g.length;f++){u=g[f];r.has(u)||r.set(u,c({},o[u]))}return r},t.prototype.dispose=function(){this.saveViewsStates(),e.prototype.dispose.call(this)},t=a([l(2,g.IContextKeyService),l(3,h.IStorageService),l(4,y.IWorkspaceContextService)],t)}(E);t.PersistentContributableViewsModel=w;var I=function(e){function t(t,n,i,r){var o=e.call(this)||this;o.instantiationService=t,o.lifecycleService=n,o.viewletService=i,o.storageService=r;var a=u.Registry.as(s.Extensions.ViewContainersRegistry);return a.all.forEach(function(e){return o.onDidRegisterViewContainer(e)}),o._register(a.onDidRegister(function(e){
return o.onDidRegisterViewContainer(e)})),o._register(u.Registry.as(d.Extensions.Viewlets).onDidRegister(function(e){return o.viewletService.setViewletEnablement(e.id,o.storageService.getBoolean("viewservice."+e.id+".enablement",h.StorageScope.GLOBAL,e.id!==s.TEST_VIEW_CONTAINER_ID))})),o}return n(t,e),t.prototype.openView=function(e,t){var n=s.ViewsRegistry.getView(e);if(n){var i=this.viewletService.getViewlet(n.container.id);if(i)return this.viewletService.openViewlet(i.id).then(function(n){return n&&n.openView?n.openView(e,t):null})}return o.TPromise.as(null)},t.prototype.onDidRegisterViewContainer=function(e){var t=this;if("workbench.view.scm"!==e.id){var n=this._register(this.instantiationService.createInstance(C,e));this._register(n.onDidChange(function(){return t.updateViewletEnablement(e,n)})),this.lifecycleService.when(p.LifecyclePhase.Eventually).then(function(){return t.updateViewletEnablement(e,n)})}},t.prototype.updateViewletEnablement=function(e,t){var n=t.viewDescriptors.length>0
;this.viewletService.setViewletEnablement(e.id,n),this.storageService.store("viewservice."+e.id+".enablement",n,h.StorageScope.GLOBAL)},t=a([l(0,r.IInstantiationService),l(1,p.ILifecycleService),l(2,f.IViewletService),l(3,h.IStorageService)],t)}(i.Disposable);t.ViewsService=I}),define(e[158],t([1,0,4,9,8,225,5,41,20,49,35,98,28,12,6,34,27,15,82,173,440,58,7,17,46,1580,364,16]),function(e,t,i,r,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.setExpanded=function(t){this.isExpanded()!==t&&(this.updateTreeVisibility(this.tree,t),e.prototype.setExpanded.call(this,t))},t.prototype.setVisible=function(t){var n=this;return this.isVisible()!==t?e.prototype.setVisible.call(this,t).then(function(){return n.updateTreeVisibility(n.tree,t&&n.isExpanded())}):i.TPromise.wrap(null)},t.prototype.focus=function(){e.prototype.focus.call(this),this.focusTree()},
t.prototype.layoutBody=function(e){this.tree&&this.tree.layout(e)},t.prototype.updateTreeVisibility=function(e,t){e&&(t?u.show(e.getHTMLElement()):u.hide(e.getHTMLElement()),t?e.onVisible():e.onHidden())},t.prototype.focusTree=function(){if(this.tree){var e=this.tree.getSelection()[0];e&&this.tree.reveal(e,.5).done(null,r.onUnexpectedError),this.tree.domFocus()}},t.prototype.dispose=function(){this.tree&&this.tree.dispose(),e.prototype.dispose.call(this)},t}(I.ViewletPanel);t.TreeViewsViewletPanel=M;var P=function(e){function t(t,n,i,r,o,s,a,c,l,u,p){var f=e.call(this,t,{showHeaderInTitleWhenSingleView:i,dnd:new T.DefaultPanelDndController},r,l,o,c)||this;f.storageService=s,f.instantiationService=a,f.contextMenuService=l,f.extensionService=u,f.contextService=p,f.didLayout=!1,f.areExtensionsReady=!1,f.viewDisposables=[];var g=O.Registry.as(m.Extensions.ViewContainersRegistry).get(t);return f.viewsModel=f._register(f.instantiationService.createInstance(R.PersistentContributableViewsModel,g,n)),
f.viewletSettings=f.getMemento(s,d.Scope.WORKSPACE),f.visibleViewsStorageId=t+".numberOfVisibleViews",f.visibleViewsCountFromCache=f.storageService.getInteger(f.visibleViewsStorageId,f.contextService.getWorkbenchState()===C.WorkbenchState.EMPTY?_.StorageScope.GLOBAL:_.StorageScope.WORKSPACE,0),f._register(h.toDisposable(function(){return f.viewDisposables=h.dispose(f.viewDisposables)})),f}return n(t,e),t.prototype.create=function(t){return o(this,void 0,i.TPromise,function(){var n,i=this;return s(this,function(r){switch(r.label){case 0:return[4,e.prototype.create.call(this,t)];case 1:return r.sent(),this._register(this.onDidSashChange(function(){return i.saveViewSizes()})),this.viewsModel.onDidAdd(function(e){return i.onDidAddViews(e)}),this.viewsModel.onDidRemove(function(e){return i.onDidRemoveViews(e)}),(n=this.viewsModel.visibleViewDescriptors.map(function(e,t){return{viewDescriptor:e,index:t,size:i.viewsModel.getSize(e.id),collapsed:i.viewsModel.isCollapsed(e.id)}})).length&&this.onDidAddViews(n),
this.extensionService.whenInstalledExtensionsRegistered().then(function(){i.areExtensionsReady=!0,i.panels.length&&(i.updateTitleArea(),i.updateViewHeaders())}),this.focus(),[2]}})})},t.prototype.getContextMenuActions=function(){var t=this,n=[],i=this.viewsModel.viewDescriptors.map(function(e){return{id:e.id+".toggleVisibility",label:e.name,checked:t.viewsModel.isVisible(e.id),enabled:e.canToggleVisibility,run:function(){return t.toggleViewVisibility(e.id)}}});n.push.apply(n,i);var r=e.prototype.getContextMenuActions.call(this);return i.length&&r.length&&n.push(new p.Separator),n.push.apply(n,r),n},t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){return i.TPromise.join(n.panels.filter(function(e){return e.isVisible()!==t}).map(function(e){return e.setVisible(t)}))}).then(function(){})},t.prototype.openView=function(e,t){t&&this.focus();var n=this.getView(e);return n||this.toggleViewVisibility(e),(n=this.getView(e)).setExpanded(!0),t&&n.focus(),
i.TPromise.as(n)},t.prototype.movePanel=function(t,n){var i=f.firstIndex(this.panels,function(e){return e===t}),r=f.firstIndex(this.panels,function(e){return e===n}),o=this.viewsModel.visibleViewDescriptors[i],s=this.viewsModel.visibleViewDescriptors[r];e.prototype.movePanel.call(this,t,n),this.viewsModel.move(o.id,s.id)},t.prototype.layout=function(t){e.prototype.layout.call(this,t),this.dimension=t,this.didLayout?this.saveViewSizes():(this.didLayout=!0,this.restoreViewSizes())},t.prototype.getOptimalWidth=function(){return Math.max.apply(Math,this.panels.map(function(e){return e.getOptimalWidth()||0}))+16},t.prototype.shutdown=function(){this.panels.forEach(function(e){return e.shutdown()}),this.storageService.store(this.visibleViewsStorageId,this.length,this.contextService.getWorkbenchState()!==C.WorkbenchState.EMPTY?_.StorageScope.WORKSPACE:_.StorageScope.GLOBAL),this.viewsModel.saveViewsStates(),e.prototype.shutdown.call(this)},t.prototype.isSingleView=function(){
return!!e.prototype.isSingleView.call(this)&&(!!this.areExtensionsReady||1===this.visibleViewsCountFromCache)},t.prototype.createView=function(e,t){return this.instantiationService.createInstance(e.ctor,t)},t.prototype.getView=function(e){return this.panels.filter(function(t){return t.id===e})[0]},t.prototype.onDidAddViews=function(e){for(var t=this,n=[],i=function(e,i,o,s){var a=r.createView(e,{id:e.id,title:e.name,actionRunner:r.getActionRunner(),expanded:!i,viewletSettings:r.viewletSettings});a.render(),a.setVisible(!0);var c=u.addDisposableListener(a.draggableElement,"contextmenu",function(n){n.stopPropagation(),n.preventDefault(),t.onContextMenu(new w.StandardMouseEvent(n),e)}),l=k.latch(k.mapEvent(a.onDidChange,function(){return!a.isExpanded()}))(function(n){t.viewsModel.setCollapsed(e.id,n)});r.viewDisposables.splice(o,0,h.combinedDisposable([c,l])),n.push({panel:a,size:s||a.minimumSize,index:o})},r=this,o=0,s=e;o<s.length;o++){var a=s[o];i(a.viewDescriptor,a.collapsed,a.index,a.size)}
return this.addPanels(n),this.restoreViewSizes(),n.map(function(e){return e.panel})},t.prototype.onDidRemoveViews=function(e){for(var t=[],n=0,i=e=e.sort(function(e,t){return t.index-e.index});n<i.length;n++){var r=i[n].index;this.viewDisposables.splice(r,1)[0].dispose(),t.push(this.panels[r])}this.removePanels(t),h.dispose(t)},t.prototype.onContextMenu=function(e,t){var n=this;e.stopPropagation(),e.preventDefault();var r=[];r.push({id:t.id+".removeView",label:L.localize(0,null),enabled:t.canToggleVisibility,run:function(){return n.toggleViewVisibility(t.id)}});var o=this.getContextMenuActions();o.length&&r.push.apply(r,[new p.Separator].concat(o));var s={x:e.posx,y:e.posy};this.contextMenuService.showContextMenu({getAnchor:function(){return s},getActions:function(){return i.TPromise.as(r)}})},t.prototype.toggleViewVisibility=function(e){this.viewsModel.setVisible(e,!this.viewsModel.isVisible(e))},t.prototype.saveViewSizes=function(){if(this.didLayout)for(var e=0,t=this.panels;e<t.length;e++){var n=t[e]
;this.viewsModel.setSize(n.id,this.getPanelSize(n))}},t.prototype.restoreViewSizes=function(){if(this.didLayout)for(var e=void 0,t=0;t<this.viewsModel.visibleViewDescriptors.length;t++){var n=this.panels[t],i=this.viewsModel.visibleViewDescriptors[t],r=this.viewsModel.getSize(i.id);"number"==typeof r?this.resizePanel(n,r):(e=e||this.computeInitialSizes(),this.resizePanel(n,e[n.id]||200))}},t.prototype.computeInitialSizes=function(){var e={};if(this.dimension)for(var t=0,n=this.viewsModel.visibleViewDescriptors;t<n.length;t++){var i=n[t];e[i.id]=this.dimension.height*(i.weight||20)/0}return e},t=a([l(3,A.IPartService),l(4,y.ITelemetryService),l(5,_.IStorageService),l(6,S.IInstantiationService),l(7,b.IThemeService),l(8,v.IContextMenuService),l(9,g.IExtensionService),l(10,C.IWorkspaceContextService)],t)}(I.PanelViewlet);t.ViewContainerViewlet=P;var N=function(e){function t(t,n,i,r,o,s,a,l){var d=e.call(this,t,n,c({},i,{showTwistie:!1,twistiePixels:12}),r,o,s,l,a)||this;u.addClass(t,"file-icon-themable-tree"),
u.addClass(t,"show-file-icons");var h=function(e){u.toggleClass(t,"align-icons-and-twisties",e.hasFileIcons&&!e.hasFolderIcons),u.toggleClass(t,"hide-arrows",!0===e.hidesExplorerArrows)};return d.disposables.push(s.onDidFileIconThemeChange(h)),h(s.getFileIconTheme()),d}return n(t,e),t=a([l(3,E.IContextKeyService),l(4,x.IListService),l(5,b.IThemeService),l(6,D.IConfigurationService),l(7,S.IInstantiationService)],t)}(x.WorkbenchTree);t.FileIconThemableWorkbenchTree=N}),define(e[529],t([1,0,1438,102,70,8,16,31,99,6,46,28,27,34,12,35,49,98,158,56,65,113,75,38,21,53,10]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var A={type:"object",properties:{id:{description:i.localize(0,null),type:"string",pattern:"^[a-zA-Z0-9_-]+$"},title:{description:i.localize(1,null),type:"string"},icon:{description:i.localize(2,null),type:"string"}}};t.viewsContainersContribution={description:i.localize(3,null),type:"object",properties:{activitybar:{
description:i.localize(4,null),type:"array",items:A}}},t.viewsContainersExtensionPoint=r.ExtensionsRegistry.registerExtensionPoint("viewsContainers",[],t.viewsContainersContribution);var L=function(){function r(){this.registerTestViewContainer(),this.handleAndRegisterCustomViewContainers()}return r.prototype.registerTestViewContainer=function(){var t=i.localize(5,null),n=D.default.parse(e.toUrl("./media/test.svg"));this.registerCustomViewlet({id:S.TEST_VIEW_CONTAINER_ID,title:t,icon:n},6,"extensionViewlet-test")},r.prototype.handleAndRegisterCustomViewContainers=function(){var e=this;t.viewsContainersExtensionPoint.setHandler(function(t){for(var n=function(t){var n=t.value,i=t.collector;w.forEach(n,function(n){if(e.isValidViewsContainer(n.value,i))switch(n.key){case"activitybar":e.registerCustomViewContainers(n.value,t.description)}})},i=0,r=t;i<r.length;i++){n(r[i])}})},r.prototype.isValidViewsContainer=function(e,t){if(!Array.isArray(e))return t.error(i.localize(6,null)),!1;for(var n=0,r=e;n<r.length;n++){
var o=r[n];if("string"!=typeof o.id)return t.error(i.localize(7,null,"id")),!1;if(!/^[a-z0-9_-]+$/i.test(o.id))return t.error(i.localize(8,null,"id")),!1;if("string"!=typeof o.title)return t.error(i.localize(9,null,"title")),!1;if("string"!=typeof o.icon)return t.error(i.localize(10,null,"icon")),!1}return!0},r.prototype.registerCustomViewContainers=function(e,t){var n=this;e.forEach(function(e,i){var r="extensionViewlet-"+e.id,s=o.joinPath(t.extensionLocation,e.icon);n.registerCustomViewlet({id:"workbench.view.extension."+e.id,title:e.title,icon:s},6+i+1,r)})},r.prototype.registerCustomViewlet=function(e,t,r){var o=c.Registry.as(S.Extensions.ViewContainersRegistry),w=c.Registry.as(d.Extensions.Viewlets),I=e.id;if(!w.getViewlet(I)){o.registerViewContainer(I);var T=function(e){function t(t,n,i,r,o,s,a,c,l){return e.call(this,I,I+".state",!0,t,n,r,s,a,c,l,i)||this}return n(t,e),
t=a([l(0,p.IPartService),l(1,f.ITelemetryService),l(2,g.IWorkspaceContextService),l(3,v.IStorageService),l(4,x.IEditorService),l(5,h.IInstantiationService),l(6,m.IThemeService),l(7,y.IContextMenuService),l(8,b.IExtensionService)],t)}(_.ViewContainerViewlet),D=new d.ViewletDescriptor(T,I,e.title,r,t,e.icon);w.registerViewlet(D);var A=function(e){function t(t,n,i,r){return e.call(this,t,n,t,i,r)||this}return n(t,e),t=a([l(2,E.IViewletService),l(3,k.IEditorGroupsService)],t)}(d.ToggleViewletAction);c.Registry.as(C.Extensions.WorkbenchActions).registerWorkbenchAction(new u.SyncActionDescriptor(A,I,i.localize(11,null,e.title)),"View: Show {0}",i.localize(12,null));var L=".monaco-workbench > .activitybar .monaco-action-bar .action-label."+r;s.createCSSRule(L,"-webkit-mask: url('"+e.icon+"') no-repeat 50% 50%")}},r}();c.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(L,T.LifecyclePhase.Starting)}),
define(e[1503],t([1,0,7,5,6,4,23,37,35,31,143,15,98,158,17,22,174,49,141,29,8,9,30,138,41,10,25,12,33,58,173,469]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var P=function(e){function t(t,n,i,o,s,a,l){var u=e.call(this,c({},t,{ariaHeaderLabel:t.title}),i,o,a)||this;return u.notificationService=n,u.instantiationService=s,u.treeViewer=v.ViewsRegistry.getView(t.id).treeViewer,u.disposables.push(r.toDisposable(function(){return u.treeViewer.setVisibility(!1)})),u.menus=u.instantiationService.createInstance(N,u.id),u.menus.onDidChangeTitle(function(){return u.updateActions()},u,u.disposables),u.updateTreeVisibility(),u}return n(t,e),t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){return n.updateTreeVisibility()})},t.prototype.focus=function(){e.prototype.focus.call(this),this.treeViewer.focus()},t.prototype.renderBody=function(e){this.treeViewer.show(e)},
t.prototype.setExpanded=function(t){this.treeViewer.setVisibility(this.isVisible()&&t),e.prototype.setExpanded.call(this,t)},t.prototype.layoutBody=function(e){this.treeViewer.layout(e)},t.prototype.getActions=function(){return this.menus.getTitleActions().slice()},t.prototype.getSecondaryActions=function(){return this.menus.getTitleSecondaryActions()},t.prototype.getActionItem=function(e){return e instanceof p.MenuItemAction?new f.ContextAwareMenuItemActionItem(e,this.keybindingService,this.notificationService,this.contextMenuService):void 0},t.prototype.getOptimalWidth=function(){return this.treeViewer.getOptimalWidth()},t.prototype.updateTreeVisibility=function(){this.treeViewer.setVisibility(this.isVisible()&&this.isExpanded())},t.prototype.dispose=function(){r.dispose(this.disposables),e.prototype.dispose.call(this)},t=a([l(1,b.INotificationService),l(2,d.IKeybindingService),l(3,h.IContextMenuService),l(4,o.IInstantiationService),l(5,y.IConfigurationService),l(6,v.IViewsService)],t)}(M.ViewletPanel)
;t.CustomTreeViewPanel=P;var N=function(){function e(e,t,n){var o=this;this.contextKeyService=t,this.menuService=n,this.disposables=[],this.titleDisposable=r.empty,this.titleActions=[],this.titleSecondaryActions=[],this._onDidChangeTitle=new i.Emitter,this.titleDisposable&&(this.titleDisposable.dispose(),this.titleDisposable=r.empty);var s=this.contextKeyService.createScoped();s.createKey("view",e);var a=this.menuService.createMenu(p.MenuId.ViewTitle,s),c=function(){o.titleActions=[],o.titleSecondaryActions=[],f.fillInActionBarActions(a,void 0,{primary:o.titleActions,secondary:o.titleSecondaryActions}),o._onDidChangeTitle.fire()},l=a.onDidChange(c);c(),this.titleDisposable=r.toDisposable(function(){l.dispose(),a.dispose(),s.dispose(),o.titleActions=[],o.titleSecondaryActions=[]})}return Object.defineProperty(e.prototype,"onDidChangeTitle",{get:function(){return this._onDidChangeTitle.event},enumerable:!0,configurable:!0}),e.prototype.getTitleActions=function(){return this.titleActions},
e.prototype.getTitleSecondaryActions=function(){return this.titleSecondaryActions},e.prototype.dispose=function(){this.disposables=r.dispose(this.disposables)},e=a([l(1,g.IContextKeyService),l(2,p.IMenuService)],e)}(),F=function(){return function(){this.label="root",this.handle="0",this.parentHandle=null,this.collapsibleState=v.TreeItemCollapsibleState.Expanded,this.children=void 0}}(),W=function(e){function t(t,n,r,o,s,a){var c=e.call(this)||this;return c.id=t,c.container=n,c.extensionService=r,c.themeService=o,c.instantiationService=s,c.commandService=a,c.isVisible=!1,c.activated=!1,c._hasIconForParentNode=!1,c._hasIconForLeafNode=!1,c.elementsToRefresh=[],c._onDidExpandItem=c._register(new i.Emitter),c.onDidExpandItem=c._onDidExpandItem.event,c._onDidCollapseItem=c._register(new i.Emitter),c.onDidCollapseItem=c._onDidCollapseItem.event,c._onDidChangeSelection=c._register(new i.Emitter),c.onDidChangeSelection=c._onDidChangeSelection.event,c._onDidChangeVisibility=c._register(new i.Emitter),
c.onDidChangeVisibility=c._onDidChangeVisibility.event,c.root=new F,c._register(c.themeService.onDidFileIconThemeChange(function(){return c.doRefresh([c.root])})),c._register(c.themeService.onThemeChange(function(){return c.doRefresh([c.root])})),c}return n(t,e),Object.defineProperty(t.prototype,"dataProvider",{get:function(){return this._dataProvider},set:function(e){this._dataProvider=e?new(function(){function t(){}return t.prototype.getChildren=function(t){if(t&&t.children)return s.TPromise.as(t.children);return(t instanceof F?e.getChildren():e.getChildren(t)).then(function(e){return t.children=e,e})},t}()):null,this.refresh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasIconForParentNode",{get:function(){return this._hasIconForParentNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasIconForLeafNode",{get:function(){return this._hasIconForLeafNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){
return this.isVisible},enumerable:!0,configurable:!0}),t.prototype.setVisibility=function(e){e=!!e,this.isVisible!==e&&(this.isVisible=e,this.isVisible&&this.activate(),this.tree&&(this.isVisible?w.show(this.tree.getHTMLElement()):w.hide(this.tree.getHTMLElement()),this.isVisible?this.tree.onVisible():this.tree.onHidden(),this.isVisible&&this.elementsToRefresh.length&&(this.doRefresh(this.elementsToRefresh),this.elementsToRefresh=[])),this._onDidChangeVisibility.fire(this.isVisible))},t.prototype.focus=function(){if(this.tree){var e=this.tree.getSelection()[0];e&&this.tree.reveal(e,.5).done(null,I.onUnexpectedError),this.tree.domFocus()}},t.prototype.show=function(e){this.tree||this.createTree(),w.append(e,this.treeContainer)},t.prototype.createTree=function(){var e=this;this.treeContainer=w.$(".tree-explorer-viewlet-tree-view")
;var t=this.instantiationService.createInstance(U,this.id),n=this.instantiationService.createInstance(B,this,this.container),i=this.instantiationService.createInstance(V,this.id,t,function(t){return t instanceof p.MenuItemAction?e.instantiationService.createInstance(f.ContextAwareMenuItemActionItem,t):void 0}),r=this.instantiationService.createInstance(H,this.id,t);this.tree=this.instantiationService.createInstance(m.FileIconThemableWorkbenchTree,this.treeContainer,{dataSource:n,renderer:i,controller:r},{}),this.tree.contextKeyService.createKey(this.id,!0),this._register(this.tree),this._register(this.tree.onDidChangeSelection(function(t){return e.onSelection(t)})),this._register(this.tree.onDidExpandItem(function(t){return e._onDidExpandItem.fire(t.item.getElement())})),this._register(this.tree.onDidCollapseItem(function(t){return e._onDidCollapseItem.fire(t.item.getElement())})),this._register(this.tree.onDidChangeSelection(function(t){return e._onDidChangeSelection.fire(t.selection)})),
this.tree.setInput(this.root)},t.prototype.layout=function(e){this.tree&&(this.treeContainer.style.height=e+"px",this.tree.layout(e))},t.prototype.getOptimalWidth=function(){if(this.tree){var e=this.tree.getHTMLElement(),t=[].slice.call(e.querySelectorAll(".outline-item-label > a"));return w.getLargestChildWidth(e,t)}return 0},t.prototype.refresh=function(e){var t;if(this.tree){for(var n=0,i=e=e||[this.root];n<i.length;n++){i[n].children=null}if(this.isVisible)return this.doRefresh(e);(t=this.elementsToRefresh).push.apply(t,e)}return s.TPromise.as(null)},t.prototype.reveal=function(e,t,n){var i=this;if(this.tree&&this.isVisible){n=n||{select:!1,focus:!1};var r=!T.isUndefinedOrNull(n.select)&&n.select,o=!T.isUndefinedOrNull(n.focus)&&n.focus;return(this.tree.getInput().children?s.TPromise.as(null):this.refresh()).then(function(){var n=s.TPromise.as(null);return t.forEach(function(e){n=n.then(function(){return i.tree.expand(e)})}),n.then(function(){return i.tree.reveal(e)}).then(function(){
r&&i.tree.setSelection([e],{source:"api"}),o&&(i.focus(),i.tree.setFocus(e))})})}return s.TPromise.as(null)},t.prototype.activate=function(){this.activated||(this.extensionService.activateByEvent("onView:"+this.id),this.activated=!0)},t.prototype.doRefresh=function(e){var t=this;return this.tree?s.TPromise.join(e.map(function(e){return t.tree.refresh(e)})).then(function(){return null}):s.TPromise.as(null)},t.prototype.onSelection=function(e){var t,n=e.payload;if(!n||!n.didClickOnTwistie&&"api"!==n.source){var i=this.tree.getSelection()[0];if(i&&i.command){var r=n&&n.originalEvent,o=n&&"mouse"===n.origin,s=o&&r&&2===r.detail;(!o||this.tree.openOnSingleClick||s)&&(t=this.commandService).executeCommand.apply(t,[i.command.id].concat(i.command.arguments||[]))}}},t=a([l(2,_.IExtensionService),l(3,C.IWorkbenchThemeService),l(4,o.IInstantiationService),l(5,E.ICommandService)],t)}(r.Disposable);t.CustomTreeViewer=W;var B=function(){function e(e,t,n){this.treeView=e,this.container=t,this.progressService=n}
return e.prototype.getId=function(e,t){return t.handle},e.prototype.hasChildren=function(e,t){return this.treeView.dataProvider&&t.collapsibleState!==v.TreeItemCollapsibleState.None},e.prototype.getChildren=function(e,t){var n=this;return this.treeView.dataProvider?this.progressService.withProgress({location:this.container},function(){return n.treeView.dataProvider.getChildren(t)}):s.TPromise.as([])},e.prototype.shouldAutoexpand=function(e,t){return t.collapsibleState===v.TreeItemCollapsibleState.Expanded},e.prototype.getParent=function(e,t){return s.TPromise.as(null)},e=a([l(2,S.IProgressService2)],e)}(),V=function(){function e(e,t,n,i,r){this.treeViewId=e,this.menus=t,this.actionItemProvider=n,this.instantiationService=i,this.themeService=r}return e.prototype.getHeight=function(t,n){return e.ITEM_HEIGHT},e.prototype.getTemplateId=function(t,n){return e.TREE_TEMPLATE_ID},e.prototype.renderTemplate=function(e,t,n){w.addClass(n,"custom-view-tree-node-item")
;var i=w.append(n,w.$(".custom-view-tree-node-item-icon")),r=w.append(n,w.$(".custom-view-tree-node-item-label")),o=this.instantiationService.createInstance(x.ResourceLabel,n,{}),s=w.append(n,w.$(".actions"));return{label:r,resourceLabel:o,icon:i,actionBar:new k.ActionBar(s,{actionItemProvider:this.actionItemProvider,actionRunner:new K(function(){return e.getSelection()})}),aligner:new z(n,e,this.themeService)}},e.prototype.renderElement=function(e,t,n,i){var r=t.resourceUri?D.default.revive(t.resourceUri):null,o=t.label?t.label:r?A.basename(r.path):"",s=this.themeService.getTheme().type===L.LIGHT?t.icon:t.iconDark;if(i.resourceLabel.clear(),i.actionBar.clear(),i.label.textContent="",w.removeClass(i.label,"custom-view-tree-node-item-label"),w.removeClass(i.resourceLabel.element,"custom-view-tree-node-item-resourceLabel"),!r&&!t.themeIcon||s)i.label.textContent=o,w.addClass(i.label,"custom-view-tree-node-item-label"),i.label.title="string"==typeof t.tooltip?t.tooltip:o;else{var a=t.tooltip?t.tooltip:r?void 0:o
;i.resourceLabel.setLabel({name:o,resource:r||D.default.parse("_icon_resource")},{fileKind:this.getFileKind(t),title:a}),w.addClass(i.resourceLabel.element,"custom-view-tree-node-item-resourceLabel")}i.icon.style.backgroundImage=s?"url('"+s+"')":"",w.toggleClass(i.icon,"custom-view-tree-node-item-icon",!!s),i.actionBar.context={$treeViewId:this.treeViewId,$treeItemHandle:t.handle},i.actionBar.push(this.menus.getResourceActions(t),{icon:!0,label:!1}),i.aligner.treeItem=t},e.prototype.getFileKind=function(e){if(e.themeIcon)switch(e.themeIcon.id){case L.FileThemeIcon.id:return R.FileKind.FILE;case L.FolderThemeIcon.id:return R.FileKind.FOLDER}return e.collapsibleState===v.TreeItemCollapsibleState.Collapsed||e.collapsibleState===v.TreeItemCollapsibleState.Expanded?R.FileKind.FOLDER:R.FileKind.FILE},e.prototype.disposeTemplate=function(e,t,n){n.resourceLabel.dispose(),n.actionBar.dispose(),n.aligner.dispose()},e.ITEM_HEIGHT=22,e.TREE_TEMPLATE_ID="treeExplorer",
e=a([l(3,o.IInstantiationService),l(4,C.IWorkbenchThemeService)],e)}(),z=function(e){function t(t,n,i){var r=e.call(this)||this;return r.container=t,r.tree=n,r.themeService=i,r._register(r.themeService.onDidFileIconThemeChange(function(){return r.render()})),r}return n(t,e),Object.defineProperty(t.prototype,"treeItem",{set:function(e){this._treeItem=e,this.render()},enumerable:!0,configurable:!0}),t.prototype.render=function(){this._treeItem&&w.toggleClass(this.container,"align-icon-with-twisty",this.hasToAlignIconWithTwisty())},t.prototype.hasToAlignIconWithTwisty=function(){var e=this;if(this._treeItem.collapsibleState!==v.TreeItemCollapsibleState.None)return!1;if(!this.hasIcon(this._treeItem))return!1;var t=this.tree.getNavigator(this._treeItem).parent()||this.tree.getInput();return!this.hasIcon(t)&&(t.children&&t.children.every(function(t){return t.collapsibleState===v.TreeItemCollapsibleState.None||!e.hasIcon(t)}))},t.prototype.hasIcon=function(e){
if(this.themeService.getTheme().type===L.LIGHT?e.icon:e.iconDark)return!0;if(e.resourceUri||e.themeIcon){var t=this.themeService.getFileIconTheme();return(e.themeIcon?e.themeIcon.id===L.FolderThemeIcon.id:e.collapsibleState!==v.TreeItemCollapsibleState.None)?t.hasFileIcons&&t.hasFolderIcons:t.hasFileIcons}return!1},t}(r.Disposable),H=function(e){function t(t,n,i,r,o){var s=e.call(this,{},o)||this;return s.treeViewId=t,s.menus=n,s.contextMenuService=i,s._keybindingService=r,s}return n(t,e),t.prototype.shouldToggleExpansion=function(t,n,i){return t.command?this.isClickOnTwistie(n):e.prototype.shouldToggleExpansion.call(this,t,n,i)},t.prototype.onContextMenu=function(e,t,n){var i=this;n.preventDefault(),n.stopPropagation(),e.setFocus(t);var r=this.menus.getResourceContextActions(t);if(!r.length)return!0;var o={x:n.posx,y:n.posy};return this.contextMenuService.showContextMenu({getAnchor:function(){return o},getActions:function(){return s.TPromise.as(r)},getActionItem:function(e){
var t=i._keybindingService.lookupKeybinding(e.id);return t?new k.ActionItem(e,e,{label:!0,keybinding:t.getLabel()}):null},onHide:function(t){t&&e.domFocus()},getActionsContext:function(){return{$treeViewId:i.treeViewId,$treeItemHandle:t.handle}},actionRunner:new K(function(){return e.getSelection()})}),!0},t=a([l(2,h.IContextMenuService),l(3,d.IKeybindingService),l(4,y.IConfigurationService)],t)}(O.WorkbenchTreeController),K=function(e){function t(t){var n=e.call(this)||this;return n.getSelectedResources=t,n}return n(t,e),t.prototype.runAction=function(t,n){if(t instanceof p.MenuItemAction){var i=this.getSelectedResources(),r=i.filter(function(e){return e!==n});return i.length===r.length||1===i.length?t.run(n):t.run.apply(t,[n].concat(r))}return e.prototype.runAction.call(this,t,n)},t}(u.ActionRunner),U=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.id=t,o.contextKeyService=n,o.menuService=i,o.contextMenuService=r,o}return n(t,e),t.prototype.getResourceActions=function(e){
return this.getActions(p.MenuId.ViewItemContext,{key:"viewItem",value:e.contextValue}).primary},t.prototype.getResourceContextActions=function(e){return this.getActions(p.MenuId.ViewItemContext,{key:"viewItem",value:e.contextValue}).secondary},t.prototype.getActions=function(e,t){var n=this.contextKeyService.createScoped();n.createKey("view",this.id),n.createKey(t.key,t.value);var i=this.menuService.createMenu(e,n),r={primary:[],secondary:[]};return f.fillInContextMenuActions(i,{shouldForwardArgs:!0},r,this.contextMenuService,function(e){return/^inline/.test(e)}),i.dispose(),n.dispose(),r},t=a([l(1,g.IContextKeyService),l(2,p.IMenuService),l(3,h.IContextMenuService)],t)}(r.Disposable)}),define(e[1504],t([1,0,1439,113,102,98,1503,15,20,529,75,38,16,6,96,299,79]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b={type:"object",properties:{id:{description:n.localize(0,null),type:"string"},name:{description:n.localize(1,null),type:"string"},when:{
description:n.localize(2,null),type:"string"}}},S={description:n.localize(3,null),type:"object",properties:{explorer:{description:n.localize(4,null),type:"array",items:b,default:[]},debug:{description:n.localize(5,null),type:"array",items:b,default:[]},scm:{description:n.localize(6,null),type:"array",items:b,default:[]},test:{description:n.localize(7,null),type:"array",items:b,default:[]}},additionalProperties:{description:n.localize(8,null),type:"array",items:b,default:[]}},_=r.ExtensionsRegistry.registerExtensionPoint("views",[d.viewsContainersExtensionPoint],S),C=function(){function e(e){this.instantiationService=e,this.viewContainersRegistry=f.Registry.as(o.Extensions.ViewContainersRegistry),this.handleAndRegisterCustomViews()}return e.prototype.handleAndRegisterCustomViews=function(){var e=this;_.setHandler(function(t){for(var r=function(t){var r=t.value,a=t.collector;i.forEach(r,function(t){if(e.isValidViewDescriptors(t.value,a)){var i=e.getViewContainer(t.key);i||(a.warn(n.localize(9,null,t.key)),
i=e.viewContainersRegistry.get(v.VIEWLET_ID));var r=o.ViewsRegistry.getViews(i),l=[],d=u.coalesce(t.value.map(function(t){if(-1!==l.indexOf(t.id))return a.error(n.localize(10,null,t.id,i.id)),null;if(r.some(function(e){return e.id===t.id}))return a.error(n.localize(11,null,t.id,i.id)),null;var o={id:t.id,name:t.name,ctor:s.CustomTreeViewPanel,container:i,when:c.ContextKeyExpr.deserialize(t.when),canToggleVisibility:!0,collapsed:e.showCollapsed(i),treeViewer:e.instantiationService.createInstance(s.CustomTreeViewer,t.id,i)};return l.push(o.id),o}));o.ViewsRegistry.registerViews(d)}})},a=0,l=t;a<l.length;a++){r(l[a])}})},e.prototype.isValidViewDescriptors=function(e,t){if(!Array.isArray(e))return t.error(n.localize(12,null)),!1;for(var i=0,r=e;i<r.length;i++){var o=r[i];if("string"!=typeof o.id)return t.error(n.localize(13,null,"id")),!1;if("string"!=typeof o.name)return t.error(n.localize(14,null,"name")),!1;if(o.when&&"string"!=typeof o.when)return t.error(n.localize(15,null,"when")),!1}return!0},
e.prototype.getViewContainer=function(e){switch(e){case"explorer":return this.viewContainersRegistry.get(v.VIEWLET_ID);case"debug":return this.viewContainersRegistry.get(y.VIEWLET_ID);case"scm":return this.viewContainersRegistry.get(m.VIEWLET_ID);default:return this.viewContainersRegistry.get("workbench.view.extension."+e)}},e.prototype.showCollapsed=function(e){switch(e.id){case v.VIEWLET_ID:case m.VIEWLET_ID:case y.VIEWLET_ID:return!0}return!1},e=a([l(0,g.IInstantiationService)],e)}();f.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(C,p.LifecyclePhase.Starting)}),define(e[253],t([1,0,10,4,23,42,565,76,139,9,27,36,17,95,25,11,64,78,300,357,53,81,46,65,37,93,103,62,150,33,6,49,192,295,106,7,5,8,15,329,22,864]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var U=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowService=i,r}return n(t,e),
t.prototype.run=function(){return this.windowService.closeWindow(),r.TPromise.as(!0)},t.ID="workbench.action.closeWindow",t.LABEL=c.localize(0,null),t=a([l(2,s.IWindowService)],t)}(o.Action);t.CloseCurrentWindowAction=U;var G=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.contextService=i,s.notificationService=r,s.windowService=o,s}return n(t,e),t.prototype.run=function(){return this.contextService.getWorkbenchState()===p.WorkbenchState.EMPTY?(this.notificationService.info(c.localize(2,null)),r.TPromise.as(null)):this.windowService.closeWorkspace()},t.ID="workbench.action.closeFolder",t.LABEL=c.localize(1,null),t=a([l(2,p.IWorkspaceContextService),l(3,K.INotificationService),l(4,s.IWindowService)],t)}(o.Action);t.CloseWorkspaceAction=G;var j=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowsService=i,r}return n(t,e),t.prototype.run=function(){return this.windowsService.openNewWindow()},t.ID="workbench.action.newWindow",t.LABEL=c.localize(3,null),
t=a([l(2,s.IWindowsService)],t)}(o.Action);t.NewWindowAction=j;var q=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowService=i,r}return n(t,e),t.prototype.run=function(){return this.windowService.toggleFullScreen()},t.ID="workbench.action.toggleFullScreen",t.LABEL=c.localize(4,null),t=a([l(2,s.IWindowService)],t)}(o.Action);t.ToggleFullScreenAction=q;var $=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.configurationService=i,r}return n(t,e),t.prototype.run=function(){var e=this.configurationService.getValue(t.menuBarVisibilityKey);"string"!=typeof e&&(e="default");var n;return n="visible"===e||"default"===e?"toggle":"default",this.configurationService.updateValue(t.menuBarVisibilityKey,n,g.ConfigurationTarget.USER),r.TPromise.as(null)},t.ID="workbench.action.toggleMenuBar",t.LABEL=c.localize(5,null),t.menuBarVisibilityKey="window.menuBarVisibility",t=a([l(2,g.IConfigurationService)],t)}(o.Action);t.ToggleMenuBarAction=$;var Y=function(e){function t(t,n,i){
var r=e.call(this,t,n)||this;return r.windowsService=i,r}return n(t,e),t.prototype.run=function(){return this.windowsService.toggleDevTools()},t.ID="workbench.action.toggleDevTools",t.LABEL=c.localize(6,null),t=a([l(2,s.IWindowService)],t)}(o.Action);t.ToggleDevToolsAction=Y;var X=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.configurationService=i,r}return n(t,e),t.prototype.setConfiguredZoomLevel=function(e){e=Math.round(e);this.configurationService.updateValue(t.SETTING_KEY,e).done(function(){return D.webFrame.setZoomLevel(e),S.setZoomFactor(D.webFrame.getZoomFactor()),void S.setZoomLevel(D.webFrame.getZoomLevel(),!1)})},t.SETTING_KEY="window.zoomLevel",t=a([l(2,v.IWorkspaceConfigurationService)],t)}(o.Action);t.BaseZoomAction=X;var Q=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype.run=function(){return this.setConfiguredZoomLevel(D.webFrame.getZoomLevel()+1),r.TPromise.as(!0)},t.ID="workbench.action.zoomIn",t.LABEL=c.localize(7,null),
t=a([l(2,v.IWorkspaceConfigurationService)],t)}(X);t.ZoomInAction=Q;var Z=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype.run=function(){return this.setConfiguredZoomLevel(D.webFrame.getZoomLevel()-1),r.TPromise.as(!0)},t.ID="workbench.action.zoomOut",t.LABEL=c.localize(8,null),t=a([l(2,v.IWorkspaceConfigurationService)],t)}(X);t.ZoomOutAction=Z;var J=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype.run=function(){return this.setConfiguredZoomLevel(0),r.TPromise.as(!0)},t.ID="workbench.action.zoomReset",t.LABEL=c.localize(9,null),t=a([l(2,v.IWorkspaceConfigurationService)],t)}(X);t.ZoomResetAction=J;var ee;!function(e){e[e.LoaderAvailable=1]="LoaderAvailable",e[e.BeginLoadingScript=10]="BeginLoadingScript",e[e.EndLoadingScriptOK=11]="EndLoadingScriptOK",e[e.EndLoadingScriptError=12]="EndLoadingScriptError",e[e.BeginInvokeFactory=21]="BeginInvokeFactory",e[e.EndInvokeFactory=22]="EndInvokeFactory",
e[e.NodeBeginEvaluatingScript=31]="NodeBeginEvaluatingScript",e[e.NodeEndEvaluatingScript=32]="NodeEndEvaluatingScript",e[e.NodeBeginNativeRequire=33]="NodeBeginNativeRequire",e[e.NodeEndNativeRequire=34]="NodeEndNativeRequire"}(ee||(ee={}));var te=function(t){function i(e,n,i,r,o,s){var a=t.call(this,e,n)||this;return a.windowService=i,a.timerService=r,a.environmentService=o,a.extensionService=s,a}return n(i,t),i.prototype.run=function(){var e=this;return this.windowService.openDevTools(),setTimeout(function(){console.group("Startup Performance Measurement");var t=e.timerService.startupMetrics;console.log("OS: "+t.platform+" ("+t.release+")"),console.log("CPUs: "+t.cpus.model+" ("+t.cpus.count+" x "+t.cpus.speed+")"),console.log("Memory (System): "+(t.totalmem/1073741824).toFixed(2)+"GB ("+(t.freemem/1073741824).toFixed(2)+"GB free)"),
console.log("Memory (Process): "+(t.meminfo.workingSetSize/1024).toFixed(2)+"MB working set ("+(t.meminfo.peakWorkingSetSize/1024).toFixed(2)+"MB peak, "+(t.meminfo.privateBytes/1024).toFixed(2)+"MB private, "+(t.meminfo.sharedBytes/1024).toFixed(2)+"MB shared)"),console.log("VM (likelyhood): "+t.isVMLikelyhood+"%"),console.log("Initial Startup: "+t.initialStartup),console.log("Screen Reader Active: "+t.hasAccessibilitySupport),console.log("Empty Workspace: "+t.emptyWorkbench);var n;if(e.environmentService.performance){n=e.analyzeNodeModulesLoadTimes().duration}if(console.table(e.getStartupMetricsTable(n)),e.environmentService.performance){var i=e.analyzeLoaderStats();for(var r in i)console.groupCollapsed("Loader: "+r),console.table(i[r]),console.groupEnd()}console.groupEnd(),console.group("Extension Activation Stats");var o={},s=e.extensionService.getExtensionsStatus();for(var a in s){var c=s[a];c.activationTimes&&(o[a]=c.activationTimes)}console.table(o),console.groupEnd(),
console.group("Raw Startup Timers (CSV)");for(var l="Name\tStart\n",u=0,d=P.getEntries("mark").slice(0).sort(function(e,t){return e.startTime-t.startTime});u<d.length;u++){var h=d[u];l+=h.name+"\t"+h.startTime+"\n"}console.log(l),console.groupEnd()},1e3),r.TPromise.as(!0)},i.prototype.getStartupMetricsTable=function(e){var t=[],n=this.timerService.startupMetrics;return n.initialStartup&&(t.push({Topic:"[main] start => app.isReady","Took (ms)":n.timers.ellapsedAppReady}),t.push({Topic:"[main] nls:start => nls:end","Took (ms)":n.timers.ellapsedNlsGeneration}),t.push({Topic:"[main] app.isReady => window.loadUrl()","Took (ms)":n.timers.ellapsedWindowLoad})),t.push({Topic:"[renderer] window.loadUrl() => begin to require(workbench.main.js)","Took (ms)":n.timers.ellapsedWindowLoadToRequire}),t.push({Topic:"[renderer] require(workbench.main.js)","Took (ms)":n.timers.ellapsedRequire}),e&&t.push({Topic:"[renderer] -> of which require() node_modules","Took (ms)":e}),t.push({
Topic:"[renderer] create extension host => extensions onReady()","Took (ms)":n.timers.ellapsedExtensions}),t.push({Topic:"[renderer] restore viewlet","Took (ms)":n.timers.ellapsedViewletRestore}),t.push({Topic:"[renderer] restore editor view state","Took (ms)":n.timers.ellapsedEditorRestore}),t.push({Topic:"[renderer] overall workbench load","Took (ms)":n.timers.ellapsedWorkbench}),t.push({Topic:"------------------------------------------------------"}),t.push({Topic:"[main, renderer] start => extensions ready","Took (ms)":n.timers.ellapsedExtensionsReady}),t.push({Topic:"[main, renderer] start => workbench ready","Took (ms)":n.ellapsed}),t},i.prototype.analyzeNodeModulesLoadTimes=function(){for(var t=e.getStats(),n=[],i=0,r=0,o=t.length;r<o;r++)if(t[r].type===ee.NodeEndNativeRequire&&t[r-1].type===ee.NodeBeginNativeRequire&&t[r-1].detail===t[r].detail){var s={},a=t[r].timestamp-t[r-1].timestamp;s.Event="nodeRequire "+t[r].detail,s["Took (ms)"]=a.toFixed(2),i+=a,
s["Start (ms)"]="**"+t[r-1].timestamp.toFixed(2),s["End (ms)"]="**"+t[r-1].timestamp.toFixed(2),n.push(s)}if(i>0){n.push({Event:"------------------------------------------------------"});(s={}).Event="[renderer] total require() node_modules",s["Took (ms)"]=i.toFixed(2),s["Start (ms)"]="**",s["End (ms)"]="**",n.push(s)}return{table:n,duration:Math.round(i)}},i.prototype.analyzeLoaderStats=function(){function t(e){for(var t=0,n=0,i=e;n<i.length;n++){t+=i[n].duration}return t}for(var n,i,r,o,s,a=e.getStats().slice(0).sort(function(e,t){return e.detail<t.detail?-1:e.detail>t.detail?1:e.type<t.type?-1:e.type>t.type?1:0}),c=function(){function e(e,t){this.start=e,this.end=t,console.assert(e.detail===t.detail),this.duration=this.end.timestamp-this.start.timestamp,this.detail=e.detail}return e.prototype.toTableObject=function(){var e;return e={},e.Path=this.start.detail,e["Took (ms)"]=this.duration.toFixed(2),e},e.compareUsingStartTimestamp=function(e,t){
return e.start.timestamp<t.start.timestamp?-1:e.start.timestamp>t.start.timestamp?1:0},e}(),l=(n={},n[ee.BeginLoadingScript]=[],n[ee.BeginInvokeFactory]=[],n[ee.NodeBeginEvaluatingScript]=[],n[ee.NodeBeginNativeRequire]=[],n),u=1;u<a.length-1;u++){var d=a[u],h=a[u+1];if(h.type-d.type>2)break;u+=1,l[d.type].push(new c(d,h))}l[ee.BeginInvokeFactory].sort(c.compareUsingStartTimestamp),l[ee.BeginInvokeFactory].sort(c.compareUsingStartTimestamp),l[ee.NodeBeginEvaluatingScript].sort(c.compareUsingStartTimestamp),l[ee.NodeBeginNativeRequire].sort(c.compareUsingStartTimestamp);var p={"Load Script":l[ee.BeginLoadingScript].map(function(e){return e.toTableObject()}),"(Node) Load Script":l[ee.NodeBeginNativeRequire].map(function(e){return e.toTableObject()}),"Eval Script":l[ee.BeginInvokeFactory].map(function(e){return e.toTableObject()}),"(Node) Eval Script":l[ee.NodeBeginEvaluatingScript].map(function(e){return e.toTableObject()})};return p["Load Script"].push((i={},i.Path="TOTAL TIME",
i["Took (ms)"]=t(l[ee.BeginLoadingScript]).toFixed(2),i)),p["Eval Script"].push((r={},r.Path="TOTAL TIME",r["Took (ms)"]=t(l[ee.BeginInvokeFactory]).toFixed(2),r)),p["(Node) Load Script"].push((o={},o.Path="TOTAL TIME",o["Took (ms)"]=t(l[ee.NodeBeginNativeRequire]).toFixed(2),o)),p["(Node) Eval Script"].push((s={},s.Path="TOTAL TIME",s["Took (ms)"]=t(l[ee.NodeBeginEvaluatingScript]).toFixed(2),s)),p},i.ID="workbench.action.appPerf",i.LABEL=c.localize(10,null),i=a([l(2,s.IWindowService),l(3,C.ITimerService),l(4,f.IEnvironmentService),l(5,M.IExtensionService)],i)}(o.Action);t.ShowStartupPerformance=te;var ne=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowService=i,r}return n(t,e),t.prototype.run=function(){return this.windowService.reloadWindow().then(function(){return!0})},t.ID="workbench.action.reloadWindow",t.LABEL=c.localize(11,null),t=a([l(2,s.IWindowService)],t)}(o.Action);t.ReloadWindowAction=ne;var ie=function(e){function t(t,n,i){var r=e.call(this,t,n)||this
;return r.windowService=i,r}return n(t,e),t.prototype.run=function(){return this.windowService.reloadWindow({_:[],"disable-extensions":!0}).then(function(){return!0})},t.ID="workbench.action.reloadWindowWithExtensionsDisabled",t.LABEL=c.localize(12,null),t=a([l(2,s.IWindowService)],t)}(o.Action);t.ReloadWindowWithExtensionsDisabledAction=ie;var re=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.windowsService=i,c.windowService=r,c.quickOpenService=o,c.keybindingService=s,c.instantiationService=a,c.closeWindowAction=c.instantiationService.createInstance(oe),c}return n(t,e),t.prototype.run=function(){var e=this,t=this.windowService.getCurrentWindowId();return this.windowsService.getWindows().then(function(n){var r=c.localize(13,null),o=n.map(function(n){return{payload:n.id,resource:n.filename?i.default.file(n.filename):n.folderPath?i.default.file(n.folderPath):n.workspace?i.default.file(n.workspace.configPath):void 0,
fileKind:n.filename?R.FileKind.FILE:n.workspace?R.FileKind.ROOT_FOLDER:n.folderPath?R.FileKind.FOLDER:R.FileKind.FILE,label:n.title,description:t===n.id?c.localize(14,null):void 0,run:function(){setTimeout(function(){e.windowsService.showWindow(n.id).done(null,h.onUnexpectedError)})},action:e.isQuickNavigate()||t===n.id?void 0:e.closeWindowAction}});e.quickOpenService.pick(o,{contextKey:"inWindowsPicker",autoFocus:{autoFocusFirstEntry:!0},placeHolder:r,quickNavigateConfiguration:e.isQuickNavigate()?{keybindings:e.keybindingService.lookupKeybindings(e.id)}:void 0})})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.closeWindowAction.dispose()},t}(o.Action);t.BaseSwitchWindow=re;var oe=function(e){function t(n){var i=e.call(this,t.ID,t.LABEL)||this;return i.windowsService=n,i.class="action-remove-from-recently-opened",i}return n(t,e),t.prototype.run=function(e){return this.windowsService.closeWindow(e.getPayload()).then(function(){return e.remove(),!0})},t.ID="workbench.action.closeWindow",
t.LABEL=c.localize(15,null),t=a([l(0,s.IWindowsService)],t)}(o.Action),se=function(e){function t(t,n,i,r,o,s,a){return e.call(this,t,n,i,r,o,s,a)||this}return n(t,e),t.prototype.isQuickNavigate=function(){return!1},t.ID="workbench.action.switchWindow",t.LABEL=c.localize(16,null),t=a([l(2,s.IWindowsService),l(3,s.IWindowService),l(4,b.IQuickOpenService),l(5,x.IKeybindingService),l(6,O.IInstantiationService)],t)}(re);t.SwitchWindow=se;var ae=function(e){function t(t,n,i,r,o,s,a){return e.call(this,t,n,i,r,o,s,a)||this}return n(t,e),t.prototype.isQuickNavigate=function(){return!0},t.ID="workbench.action.quickSwitchWindow",t.LABEL=c.localize(17,null),t=a([l(2,s.IWindowsService),l(3,s.IWindowService),l(4,b.IQuickOpenService),l(5,x.IKeybindingService),l(6,O.IInstantiationService)],t)}(re);t.QuickSwitchWindow=ae,t.inRecentFilesPickerContextKey="inRecentFilesPicker";var ce=function(e){function r(t,n,i,r,o,s,a,c){var l=e.call(this,t,n)||this;return l.windowService=i,l.quickOpenService=r,l.contextService=o,
l.environmentService=s,l.keybindingService=a,l.removeAction=c.createInstance(le),l}return n(r,e),r.prototype.run=function(){var e=this;return this.windowService.getRecentlyOpened().then(function(t){var n=t.workspaces,i=t.files;return e.openRecent(n,i)})},r.prototype.openRecent=function(e,n){function r(e,t,n,r,o){var a,c,l;return L.isSingleFolderWorkspaceIdentifier(e)?(a=e,c=A.getBaseLabel(a),l=A.getPathLabel(m.dirname(a),r)):(a=e.configPath,c=L.getWorkspaceLabel(e,r),l=A.getPathLabel(m.dirname(e.configPath),r)),{resource:i.default.file(a),fileKind:n,label:c,description:l,separator:t,run:function(e){setTimeout(function(){s(a,n===R.FileKind.FILE,e)})},action:o}}var o=this,s=function(e,t,n){var i=n.keymods.ctrlCmd;o.windowService.openWindow([e],{forceNewWindow:i,forceOpenWorkspaceAsFile:t})},a=e.map(function(e,t){return r(e,0===t?{label:c.localize(18,null)}:void 0,L.isSingleFolderWorkspaceIdentifier(e)?R.FileKind.FOLDER:R.FileKind.ROOT_FOLDER,o.environmentService,o.isQuickNavigate()?void 0:o.removeAction)
}),l=n.map(function(e,t){return r(e,0===t?{label:c.localize(19,null),border:!0}:void 0,R.FileKind.FILE,o.environmentService,o.isQuickNavigate()?void 0:o.removeAction)}),u=e[0]&&this.contextService.isCurrentWorkspace(e[0]);this.quickOpenService.pick(a.concat(l),{contextKey:t.inRecentFilesPickerContextKey,autoFocus:{autoFocusFirstEntry:!u,autoFocusSecondEntry:u},placeHolder:y.isMacintosh?c.localize(20,null):c.localize(21,null),matchOnDescription:!0,quickNavigateConfiguration:this.isQuickNavigate()?{keybindings:this.keybindingService.lookupKeybindings(this.id)}:void 0}).done(null,h.onUnexpectedError)},r.prototype.dispose=function(){e.prototype.dispose.call(this),this.removeAction.dispose()},r}(o.Action);t.BaseOpenRecentAction=ce;var le=function(e){function t(n){var i=e.call(this,t.ID,t.LABEL)||this;return i.windowsService=n,i.class="action-remove-from-recently-opened",i}return n(t,e),t.prototype.run=function(e){return this.windowsService.removeFromRecentlyOpened([e.getResource().fsPath]).then(function(){
return e.remove(),!0})},t.ID="workbench.action.removeFromRecentlyOpened",t.LABEL=c.localize(22,null),t=a([l(0,s.IWindowsService)],t)}(o.Action),ue=function(e){function t(t,n,i,r,o,s,a,c){return e.call(this,t,n,i,r,o,s,a,c)||this}return n(t,e),t.prototype.isQuickNavigate=function(){return!1},t.ID="workbench.action.openRecent",t.LABEL=c.localize(23,null),t=a([l(2,s.IWindowService),l(3,b.IQuickOpenService),l(4,p.IWorkspaceContextService),l(5,f.IEnvironmentService),l(6,x.IKeybindingService),l(7,O.IInstantiationService)],t)}(ce);t.OpenRecentAction=ue;var de=function(e){function t(t,n,i,r,o,s,a,c){return e.call(this,t,n,i,r,o,s,a,c)||this}return n(t,e),t.prototype.isQuickNavigate=function(){return!0},t.ID="workbench.action.quickOpenRecent",t.LABEL=c.localize(24,null),t=a([l(2,s.IWindowService),l(3,b.IQuickOpenService),l(4,p.IWorkspaceContextService),l(5,f.IEnvironmentService),l(6,x.IKeybindingService),l(7,O.IInstantiationService)],t)}(ce);t.QuickOpenRecentAction=de;var he=function(e){function t(t,n,i){
var r=e.call(this,t,n)||this;return r.issueService=i,r}return n(t,e),t.prototype.run=function(){return this.issueService.openReporter().then(function(){return!0})},t.ID="workbench.action.openIssueReporter",t.LABEL=c.localize(25,null),t=a([l(2,H.IWorkbenchIssueService)],t)}(o.Action);t.OpenIssueReporterAction=he;var pe=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.issueService=i,r}return n(t,e),t.prototype.run=function(){return this.issueService.openProcessExplorer().then(function(){return!0})},t.ID="workbench.action.openProcessExplorer",t.LABEL=c.localize(26,null),t=a([l(2,H.IWorkbenchIssueService)],t)}(o.Action);t.OpenProcessExplorer=pe;var fe=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.issueService=i,r}return n(t,e),t.prototype.run=function(){return this.issueService.openReporter({issueType:N.IssueType.PerformanceIssue}).then(function(){return!0})},t.ID="workbench.action.reportPerformanceIssueUsingReporter",t.LABEL=c.localize(27,null),
t=a([l(2,H.IWorkbenchIssueService)],t)}(o.Action);t.ReportPerformanceIssueUsingReporterAction=fe;var ge=function(t){function i(e,n,i,r,o){var s=t.call(this,e,n)||this;return s.integrityService=i,s.environmentService=r,s.timerService=o,s}return n(i,t),i.prototype.run=function(e){var t=this;return this.integrityService.isPure().then(function(n){var i=t.generatePerformanceIssueUrl(u.default.reportIssueUrl,d.default.name,d.default.version,u.default.commit,u.default.date,n.isPure,e);window.open(i)}),r.TPromise.wrap(!0)},i.prototype.generatePerformanceIssueUrl=function(e,t,n,i,r,o,s){s||(s="Additional Steps to Reproduce (if any):\n\n1.\n2.");var a;this.environmentService.performance&&(a=this.computeNodeModulesLoadTime());var c=this.timerService.startupMetrics,l=k.type()+" "+k.arch()+" "+k.release()
;return""+e+(-1===e.indexOf("?")?"?":"&")+"body="+encodeURIComponent("- VSCode Version: <code>"+t+" "+n+(o?"":" **[Unsupported]**")+" ("+(u.default.commit||"Commit unknown")+", "+(u.default.date||"Date unknown")+")</code>\n- OS Version: <code>"+l+"</code>\n- CPUs: <code>"+c.cpus.model+" ("+c.cpus.count+" x "+c.cpus.speed+")</code>\n- Memory (System): <code>"+(c.totalmem/1073741824).toFixed(2)+"GB ("+(c.freemem/1073741824).toFixed(2)+"GB free)</code>\n- Memory (Process): <code>"+(c.meminfo.workingSetSize/1024).toFixed(2)+"MB working set ("+(c.meminfo.peakWorkingSetSize/1024).toFixed(2)+"MB peak, "+(c.meminfo.privateBytes/1024).toFixed(2)+"MB private, "+(c.meminfo.sharedBytes/1024).toFixed(2)+"MB shared)</code>\n- Load (avg): <code>"+c.loadavg.map(function(e){return Math.round(e)
}).join(", ")+"</code>\n- VM: <code>"+c.isVMLikelyhood+"%</code>\n- Initial Startup: <code>"+(c.initialStartup?"yes":"no")+"</code>\n- Screen Reader: <code>"+(c.hasAccessibilitySupport?"yes":"no")+"</code>\n- Empty Workspace: <code>"+(c.emptyWorkbench?"yes":"no")+"</code>\n- Timings:\n\n"+this.generatePerformanceTable(a)+"\n\n---\n\n"+s)},i.prototype.computeNodeModulesLoadTime=function(){for(var t=e.getStats(),n=0,i=0,r=t.length;i<r;i++)if(t[i].type===ee.NodeEndNativeRequire&&t[i-1].type===ee.NodeBeginNativeRequire&&t[i-1].detail===t[i].detail){n+=t[i].timestamp-t[i-1].timestamp}return Math.round(n)},i.prototype.generatePerformanceTable=function(e){return"|Component|Task|Time (ms)|\n|---|---|---|\n"+this.getStartupMetricsTable(e).map(function(e){return"|"+e.component+"|"+e.task+"|"+e.time+"|"}).join("\n")},i.prototype.getStartupMetricsTable=function(e){var t=[],n=this.timerService.startupMetrics;return n.initialStartup&&(t.push({component:"main",task:"start => app.isReady",time:n.timers.ellapsedAppReady}),
t.push({component:"main",task:"app.isReady => window.loadUrl()",time:n.timers.ellapsedWindowLoad})),t.push({component:"renderer",task:"window.loadUrl() => begin to require(workbench.main.js)",time:n.timers.ellapsedWindowLoadToRequire}),t.push({component:"renderer",task:"require(workbench.main.js)",time:n.timers.ellapsedRequire}),e&&t.push({component:"renderer",task:"-> of which require() node_modules",time:e}),t.push({component:"renderer",task:"create extension host => extensions onReady()",time:n.timers.ellapsedExtensions}),t.push({component:"renderer",task:"restore viewlet",time:n.timers.ellapsedViewletRestore}),t.push({component:"renderer",task:"restore editor view state",time:n.timers.ellapsedEditorRestore}),t.push({component:"renderer",task:"overall workbench load",time:n.timers.ellapsedWorkbench}),t.push({component:"main + renderer",task:"start => extensions ready",time:n.timers.ellapsedExtensionsReady}),t.push({component:"main + renderer",task:"start => workbench ready",time:n.ellapsed}),t},
i.ID="workbench.action.reportPerformanceIssue",i.LABEL=c.localize(28,null),i=a([l(2,_.IIntegrityService),l(3,f.IEnvironmentService),l(4,C.ITimerService)],i)}(o.Action);t.ReportPerformanceIssueAction=ge;var ve=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){return window.open(t.URL),null},t.ID="workbench.action.keybindingsReference",t.LABEL=c.localize(29,null),t.URL=y.isLinux?u.default.keyboardShortcutsUrlLinux:y.isMacintosh?u.default.keyboardShortcutsUrlMac:u.default.keyboardShortcutsUrlWin,t.AVAILABLE=!!t.URL,t}(o.Action);t.KeybindingsReferenceAction=ve;var me=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){return window.open(t.URL),null},t.ID="workbench.action.openDocumentationUrl",t.LABEL=c.localize(30,null),t.URL=u.default.documentationUrl,t.AVAILABLE=!!t.URL,t}(o.Action);t.OpenDocumentationUrlAction=me;var ye=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),
t.prototype.run=function(){return window.open(t.URL),null},t.ID="workbench.action.openIntroductoryVideosUrl",t.LABEL=c.localize(31,null),t.URL=u.default.introductoryVideosUrl,t.AVAILABLE=!!t.URL,t}(o.Action);t.OpenIntroductoryVideosUrlAction=ye;var be=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){return window.open(t.URL),null},t.ID="workbench.action.openTipsAndTricksUrl",t.LABEL=c.localize(32,null),t.URL=u.default.tipsAndTricksUrl,t.AVAILABLE=!!t.URL,t}(o.Action);t.OpenTipsAndTricksUrlAction=be;var Se=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowsService=i,r}return n(t,e),t.prototype.run=function(){return this.windowsService.toggleSharedProcess()},t.ID="workbench.action.toggleSharedProcess",t.LABEL=c.localize(33,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.ToggleSharedProcessAction=Se;!function(e){e[e.Next=0]="Next",e[e.Previous=1]="Previous"}(t.Direction||(t.Direction={}));var _e=function(e){function t(t,n,i,r,o,s){
var a=e.call(this,t,n)||this;return a.editorGroupService=i,a.panelService=r,a.partService=o,a.viewletService=s,a}return n(t,e),t.prototype.run=function(){var e=this.partService.hasFocus(I.Parts.EDITOR_PART),t=this.partService.hasFocus(I.Parts.PANEL_PART),n=this.partService.hasFocus(I.Parts.SIDEBAR_PART),i=this.partService.getSideBarPosition()===I.Position.LEFT,o=this.partService.getPanelPosition()===I.Position.BOTTOM;return e?this.navigateOnEditorFocus(i,o):t?this.navigateOnPanelFocus(i,o):n?this.navigateOnSidebarFocus(i,o):r.TPromise.as(!1)},t.prototype.navigateOnEditorFocus=function(e,t){return r.TPromise.as(!0)},t.prototype.navigateOnPanelFocus=function(e,t){return r.TPromise.as(!0)},t.prototype.navigateOnSidebarFocus=function(e,t){return r.TPromise.as(!0)},t.prototype.navigateToPanel=function(){if(!this.partService.isVisible(I.Parts.PANEL_PART))return r.TPromise.as(!1);var e=this.panelService.getActivePanel().getId();return this.panelService.openPanel(e,!0)},t.prototype.navigateToSidebar=function(){
if(!this.partService.isVisible(I.Parts.SIDEBAR_PART))return r.TPromise.as(!1);var e=this.viewletService.getActiveViewlet().getId();return this.viewletService.openViewlet(e,!0)},t.prototype.navigateAcrossEditorGroup=function(e){return this.doNavigateToEditorGroup({direction:e})},t.prototype.navigateToEditorGroup=function(e){return this.doNavigateToEditorGroup({location:e})},t.prototype.doNavigateToEditorGroup=function(e){var t=this.editorGroupService.findGroup(e,this.editorGroupService.activeGroup);return t?(t.focus(),r.TPromise.as(!0)):r.TPromise.as(!1)},t=a([l(2,E.IEditorGroupsService),l(3,w.IPanelService),l(4,I.IPartService),l(5,T.IViewletService)],t)}(o.Action);t.BaseNavigationAction=_e;var Ce=function(e){function t(t,n,i,r,o,s){return e.call(this,t,n,i,r,o,s)||this}return n(t,e),t.prototype.navigateOnEditorFocus=function(e,t){var n=this;return this.navigateAcrossEditorGroup(E.GroupDirection.LEFT).then(function(t){return t?r.TPromise.as(!0):e?n.navigateToSidebar():r.TPromise.as(!1)})},
t.prototype.navigateOnPanelFocus=function(e,t){return t&&e?this.navigateToSidebar():t?r.TPromise.as(!1):this.navigateToEditorGroup(E.GroupLocation.LAST)},t.prototype.navigateOnSidebarFocus=function(e,t){return e?r.TPromise.as(!1):this.navigateToEditorGroup(E.GroupLocation.LAST)},t.ID="workbench.action.navigateLeft",t.LABEL=c.localize(34,null),t=a([l(2,E.IEditorGroupsService),l(3,w.IPanelService),l(4,I.IPartService),l(5,T.IViewletService)],t)}(_e);t.NavigateLeftAction=Ce;var Ee=function(e){function t(t,n,i,r,o,s){return e.call(this,t,n,i,r,o,s)||this}return n(t,e),t.prototype.navigateOnEditorFocus=function(e,t){var n=this;return this.navigateAcrossEditorGroup(E.GroupDirection.RIGHT).then(function(i){return i?r.TPromise.as(!0):t?e?r.TPromise.as(!1):n.navigateToSidebar():n.navigateToPanel()})},t.prototype.navigateOnPanelFocus=function(e,t){return e?r.TPromise.as(!1):this.navigateToSidebar()},t.prototype.navigateOnSidebarFocus=function(e,t){
return e?this.navigateToEditorGroup(E.GroupLocation.FIRST):r.TPromise.as(!1)},t.ID="workbench.action.navigateRight",t.LABEL=c.localize(35,null),t=a([l(2,E.IEditorGroupsService),l(3,w.IPanelService),l(4,I.IPartService),l(5,T.IViewletService)],t)}(_e);t.NavigateRightAction=Ee;var we=function(e){function t(t,n,i,r,o,s){return e.call(this,t,n,i,r,o,s)||this}return n(t,e),t.prototype.navigateOnEditorFocus=function(e,t){return this.navigateAcrossEditorGroup(E.GroupDirection.UP)},t.prototype.navigateOnPanelFocus=function(e,t){return t?this.navigateToEditorGroup(E.GroupLocation.LAST):r.TPromise.as(!1)},t.ID="workbench.action.navigateUp",t.LABEL=c.localize(36,null),t=a([l(2,E.IEditorGroupsService),l(3,w.IPanelService),l(4,I.IPartService),l(5,T.IViewletService)],t)}(_e);t.NavigateUpAction=we;var Ie=function(e){function t(t,n,i,r,o,s){return e.call(this,t,n,i,r,o,s)||this}return n(t,e),t.prototype.navigateOnEditorFocus=function(e,t){var n=this
;return this.navigateAcrossEditorGroup(E.GroupDirection.DOWN).then(function(e){return e?r.TPromise.as(!0):t?n.navigateToPanel():r.TPromise.as(!1)})},t.ID="workbench.action.navigateDown",t.LABEL=c.localize(37,null),t=a([l(2,E.IEditorGroupsService),l(3,w.IPanelService),l(4,I.IPartService),l(5,T.IViewletService)],t)}(_e);t.NavigateDownAction=Ie;var Te=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.partService=i,r}return n(t,e),t.prototype.resizePart=function(e){var t,n=this.partService.hasFocus(I.Parts.EDITOR_PART),i=this.partService.hasFocus(I.Parts.SIDEBAR_PART),r=this.partService.hasFocus(I.Parts.PANEL_PART);i?t=I.Parts.SIDEBAR_PART:r?t=I.Parts.PANEL_PART:n&&(t=I.Parts.EDITOR_PART),t&&this.partService.resizePart(t,e)},t.RESIZE_INCREMENT=6.5,t=a([l(2,I.IPartService)],t)}(o.Action);t.BaseResizeViewAction=Te;var xe=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype.run=function(){return this.resizePart(Te.RESIZE_INCREMENT),r.TPromise.as(!0)},
t.ID="workbench.action.increaseViewSize",t.LABEL=c.localize(38,null),t=a([l(2,I.IPartService)],t)}(Te);t.IncreaseViewSizeAction=xe;var ke=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return n(t,e),t.prototype.run=function(){return this.resizePart(-Te.RESIZE_INCREMENT),r.TPromise.as(!0)},t.ID="workbench.action.decreaseViewSize",t.LABEL=c.localize(39,null),t=a([l(2,I.IPartService)],t)}(Te);t.DecreaseViewSizeAction=ke;var De=function(e){function t(n,i,r){var o=e.call(this,t.ID,t.LABEL)||this;return o.windowsService=r,o}return n(t,e),t.prototype.run=function(){return this.windowsService.showPreviousWindowTab().then(function(){return!0})},t.ID="workbench.action.showPreviousWindowTab",t.LABEL=c.localize(40,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.ShowPreviousWindowTab=De;var Ae=function(e){function t(n,i,r){var o=e.call(this,t.ID,t.LABEL)||this;return o.windowsService=r,o}return n(t,e),t.prototype.run=function(){return this.windowsService.showNextWindowTab().then(function(){return!0})},
t.ID="workbench.action.showNextWindowTab",t.LABEL=c.localize(41,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.ShowNextWindowTab=Ae;var Le=function(e){function t(n,i,r){var o=e.call(this,t.ID,t.LABEL)||this;return o.windowsService=r,o}return n(t,e),t.prototype.run=function(){return this.windowsService.moveWindowTabToNewWindow().then(function(){return!0})},t.ID="workbench.action.moveWindowTabToNewWindow",t.LABEL=c.localize(42,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.MoveWindowTabToNewWindow=Le;var Re=function(e){function t(n,i,r){var o=e.call(this,t.ID,t.LABEL)||this;return o.windowsService=r,o}return n(t,e),t.prototype.run=function(){return this.windowsService.mergeAllWindowTabs().then(function(){return!0})},t.ID="workbench.action.mergeAllWindowTabs",t.LABEL=c.localize(43,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.MergeAllWindowTabs=Re;var Oe=function(e){function t(n,i,r){var o=e.call(this,t.ID,t.LABEL)||this;return o.windowsService=r,o}return n(t,e),t.prototype.run=function(){
return this.windowsService.toggleWindowTabsBar().then(function(){return!0})},t.ID="workbench.action.toggleWindowTabsBar",t.LABEL=c.localize(44,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.ToggleWindowTabsBar=Oe;var Me=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){return u.default.twitterUrl?r.TPromise.as(D.shell.openExternal(u.default.twitterUrl)):r.TPromise.as(!1)},t.ID="workbench.action.openTwitterUrl",t.LABEL=c.localize(45,null,u.default.applicationName),t}(o.Action);t.OpenTwitterUrlAction=Me;var Pe=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){return u.default.requestFeatureUrl?r.TPromise.as(D.shell.openExternal(u.default.requestFeatureUrl)):r.TPromise.as(!1)},t.ID="workbench.action.openRequestFeatureUrl",t.LABEL=c.localize(46,null),t}(o.Action);t.OpenRequestFeatureUrlAction=Pe;var Ne=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){
if(u.default.licenseUrl){if(y.language){var e=u.default.licenseUrl.indexOf("?")>0?"&":"?";return r.TPromise.as(D.shell.openExternal(""+u.default.licenseUrl+e+"lang="+y.language))}return r.TPromise.as(D.shell.openExternal(u.default.licenseUrl))}return r.TPromise.as(!1)},t.ID="workbench.action.openLicenseUrl",t.LABEL=c.localize(47,null),t}(o.Action);t.OpenLicenseUrlAction=Ne;var Fe=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.run=function(){if(u.default.privacyStatementUrl){if(y.language){var e=u.default.privacyStatementUrl.indexOf("?")>0?"&":"?";return r.TPromise.as(D.shell.openExternal(""+u.default.privacyStatementUrl+e+"lang="+y.language))}return r.TPromise.as(D.shell.openExternal(u.default.privacyStatementUrl))}return r.TPromise.as(!1)},t.ID="workbench.action.openPrivacyStatementUrl",t.LABEL=c.localize(48,null),t}(o.Action);t.OpenPrivacyStatementUrlAction=Fe;var We=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowsService=i,r}return n(t,e),
t.prototype.run=function(){return this.windowsService.openAccessibilityOptions()},t.ID="workbench.action.showAccessibilityOptions",t.LABEL=c.localize(49,null),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.ShowAccessibilityOptionsAction=We;var Be=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.windowsService=i,r}return n(t,e),t.prototype.run=function(){return this.windowsService.openAboutDialog()},t.ID="workbench.action.showAboutDialog",t.LABEL=c.localize(50,null,u.default.applicationName),t=a([l(2,s.IWindowsService)],t)}(o.Action);t.ShowAboutDialogAction=Be;var Ve=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.contextKeyService=i,o.windowService=r,o}return n(t,e),t.prototype.run=function(){var e=this,t=[],n=V.createStyleSheet();t.push(B.toDisposable(function(){return n.parentNode.removeChild(n)})),V.createCSSRule("*","cursor: crosshair !important;",n);var i=document.createElement("div");document.body.appendChild(i),t.push(B.toDisposable(function(){
return document.body.removeChild(i)})),i.style.position="absolute",i.style.pointerEvents="none",i.style.backgroundColor="rgba(255, 0, 0, 0.5)",i.style.zIndex="1000";var o=F.domEvent(document.body,"mousemove",!0);t.push(o(function(e){var t=e.target,n=V.getDomNodePagePosition(t);i.style.top=n.top+"px",i.style.left=n.left+"px",i.style.width=n.width+"px",i.style.height=n.height+"px"}));W.once(F.domEvent(document.body,"mousedown",!0))(function(e){e.preventDefault(),e.stopPropagation()},null,t);return W.once(F.domEvent(document.body,"mouseup",!0))(function(n){n.preventDefault(),n.stopPropagation();var i=e.contextKeyService.getContext(n.target);console.log(i.collectAllValues()),e.windowService.openDevTools(),B.dispose(t)},null,t),r.TPromise.as(null)},t.ID="workbench.action.inspectContextKeys",t.LABEL=c.localize(51,null),t=a([l(2,z.IContextKeyService),l(3,s.IWindowService)],t)}(o.Action);t.InspectContextKeysAction=Ve}),
define(e[121],t([1,0,586,23,5,4,37,29,27,33,79,142,46,81,21,108,64,22,99,20,162,111]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var I=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,i,!1)||this;return a.debugService=r,a.keybindingService=o,a.weight=s,a.toDispose=[],a.toDispose.push(a.debugService.onDidChangeState(function(e){return a.updateEnablement(e)})),a.updateLabel(n),a.updateEnablement(),a}return n(t,e),t.prototype.run=function(e){throw new Error("implement me")},Object.defineProperty(t.prototype,"tooltip",{get:function(){var e=this.keybindingService.lookupKeybinding(this.id),t=e&&e.getLabel();return t?this.label+" ("+t+")":this.label},enumerable:!0,configurable:!0}),t.prototype.updateLabel=function(e){this.label=e},t.prototype.updateEnablement=function(e){void 0===e&&(e=this.debugService.state),this.enabled=this.isEnabled(e)},t.prototype.isEnabled=function(e){return!0},t.prototype.dispose=function(){
e.prototype.dispose.call(this),this.toDispose=o.dispose(this.toDispose)},t=a([l(3,p.IDebugService),l(4,c.IKeybindingService)],t)}(r.Action);t.AbstractDebugAction=I;var T=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,"debug-action configure",i,r)||this;return a.notificationService=o,a.contextService=s,a.toDispose.push(i.getConfigurationManager().onDidSelectConfiguration(function(){return a.updateClass()})),a.updateClass(),a}return n(t,e),Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.debugService.getConfigurationManager().selectedConfiguration.name?t.LABEL:i.localize(1,null)},enumerable:!0,configurable:!0}),t.prototype.updateClass=function(){this.class=this.debugService.getConfigurationManager().selectedConfiguration.name?"debug-action configure":"debug-action configure notification"},t.prototype.run=function(e){if(this.contextService.getWorkbenchState()===d.WorkbenchState.EMPTY)return this.notificationService.info(i.localize(2,null)),s.TPromise.as(null)
;var t=!(!e||!e.ctrlKey&&!e.metaKey),n=this.debugService.getConfigurationManager();return n.selectedConfiguration.launch||n.selectConfiguration(n.getLaunches()[0]),n.selectedConfiguration.launch.openConfigFile(t)},t.ID="workbench.action.debug.configure",t.LABEL=i.localize(0,null,"launch.json"),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService),l(4,S.INotificationService),l(5,d.IWorkspaceContextService)],t)}(I);t.ConfigureAction=T;var x=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,"debug-action start",i,r)||this;return a.contextService=o,a.historyService=s,a.toDispose.push(a.debugService.getConfigurationManager().onDidSelectConfiguration(function(){return a.updateEnablement()})),a.toDispose.push(a.debugService.getModel().onDidChangeCallStack(function(){return a.updateEnablement()})),a.toDispose.push(a.contextService.onDidChangeWorkbenchState(function(){return a.updateEnablement()})),a}return n(t,e),t.prototype.run=function(){
var e=this.debugService.getConfigurationManager(),t=e.selectedConfiguration.launch;if(!t||0===t.getConfigurationNames().length){var n=this.historyService.getLastActiveWorkspaceRoot();if(!(t=e.getLaunch(n))||0===t.getConfigurationNames().length){var i=e.getLaunches();t=C.first(i,function(e){return!!e.getConfigurationNames().length},t)}e.selectConfiguration(t)}return this.debugService.startDebugging(t,void 0,this.isNoDebug())},t.prototype.isNoDebug=function(){return!1},t.isEnabled=function(e,t,n){var i=e.getModel().getSessions();return e.state!==p.State.Initializing&&!(t&&t.getWorkbenchState()===d.WorkbenchState.EMPTY&&i.length>0)},t.prototype.isEnabled=function(e){return t.isEnabled(this.debugService,this.contextService,this.debugService.getConfigurationManager().selectedConfiguration.name)},t.ID="workbench.action.debug.start",t.LABEL=i.localize(3,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService),l(4,d.IWorkspaceContextService),l(5,E.IHistoryService)],t)}(I);t.StartAction=x;var k=function(e){
function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.isNoDebug=function(){return!0},t.ID="workbench.action.debug.run",t.LABEL=i.localize(4,null),t}(x);t.RunAction=k;var D=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,t,n,void 0,i,r)||this;return l.quickOpenService=c,l.quickOpenService=c,l}return n(t,e),t.prototype.run=function(){return this.quickOpenService.show("debug ")},t.ID="workbench.action.debug.selectandstart",t.LABEL=i.localize(5,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService),l(4,u.ICommandService),l(5,d.IWorkspaceContextService),l(6,h.IFileService),l(7,b.IQuickOpenService)],t)}(I);t.SelectAndStartAction=D;var A=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,"debug-action restart",i,r,70)||this;return a.contextService=o,a.historyService=s,a.setLabel(a.debugService.getViewModel().focusedSession),a.toDispose.push(a.debugService.getViewModel().onDidFocusStackFrame(function(){return a.setLabel(a.debugService.getViewModel().focusedSession)
})),a}return n(t,e),Object.defineProperty(t.prototype,"startAction",{get:function(){return new x(x.ID,x.LABEL,this.debugService,this.keybindingService,this.contextService,this.historyService)},enumerable:!0,configurable:!0}),t.prototype.setLabel=function(e){this.updateLabel(e&&e.state===p.SessionState.ATTACH?t.RECONNECT_LABEL:t.LABEL)},t.prototype.run=function(e){return e instanceof f.Session||(e=this.debugService.getViewModel().focusedSession),e?(this.debugService.getModel().getSessions().length<=1&&this.debugService.removeReplExpressions(),this.debugService.restartSession(e)):this.startAction.run()},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&(t===p.State.Running||t===p.State.Stopped||x.isEnabled(this.debugService,this.contextService,this.debugService.getConfigurationManager().selectedConfiguration.name))},t.ID="workbench.action.debug.restart",t.LABEL=i.localize(6,null),t.RECONNECT_LABEL=i.localize(7,null),a([w.memoize],t.prototype,"startAction",null),
t=a([l(2,p.IDebugService),l(3,c.IKeybindingService),l(4,d.IWorkspaceContextService),l(5,E.IHistoryService)],t)}(I);t.RestartAction=A;var L=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action step-over",i,r,20)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.next():s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped},t.ID="workbench.action.debug.stepOver",t.LABEL=i.localize(8,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.StepOverAction=L;var R=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action step-into",i,r,30)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.stepIn():s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped},
t.ID="workbench.action.debug.stepInto",t.LABEL=i.localize(9,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.StepIntoAction=R;var O=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action step-out",i,r,40)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.stepOut():s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped},t.ID="workbench.action.debug.stepOut",t.LABEL=i.localize(10,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.StepOutAction=O;var M=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action stop",i,r,80)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Session||(e=this.debugService.getViewModel().focusedSession),this.debugService.stopSession(e)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&t!==p.State.Inactive},
t.ID="workbench.action.debug.stop",t.LABEL=i.localize(11,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.StopAction=M;var P=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action disconnect",i,r,80)||this}return n(t,e),t.prototype.run=function(){var e=this.debugService.getViewModel().focusedSession;return this.debugService.stopSession(e)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&(t===p.State.Running||t===p.State.Stopped)},t.ID="workbench.action.debug.disconnect",t.LABEL=i.localize(12,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.DisconnectAction=P;var N=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action continue",i,r,10)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.continue():s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped},
t.ID="workbench.action.debug.continue",t.LABEL=i.localize(13,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.ContinueAction=N;var F=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action pause",i,r,10)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.pause():s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&t===p.State.Running},t.ID="workbench.action.debug.pause",t.LABEL=i.localize(14,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.PauseAction=F;var W=function(e){function t(t,n,i,r){return e.call(this,t,n,void 0,i,r)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.terminate():s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&(t===p.State.Running||t===p.State.Stopped)},
t.ID="workbench.action.debug.terminateThread",t.LABEL=i.localize(15,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.TerminateThreadAction=W;var B=function(e){function t(t,n,i,r){return e.call(this,t,n,void 0,i,r)||this}return n(t,e),t.prototype.run=function(e){return e||(e=this.debugService.getViewModel().focusedStackFrame),e.restart()},t.ID="workbench.action.debug.restartFrame",t.LABEL=i.localize(16,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.RestartFrameAction=B;var V=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action remove",i,r)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Breakpoint?this.debugService.removeBreakpoints(e.getId()):this.debugService.removeFunctionBreakpoints(e.getId())},t.ID="workbench.debug.viewlet.action.removeBreakpoint",t.LABEL=i.localize(17,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.RemoveBreakpointAction=V;var z=function(e){function t(t,n,i,r){
var o=e.call(this,t,n,"debug-action remove-all",i,r)||this;return o.toDispose.push(o.debugService.getModel().onDidChangeBreakpoints(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return s.TPromise.join([this.debugService.removeBreakpoints(),this.debugService.removeFunctionBreakpoints()])},t.prototype.isEnabled=function(t){var n=this.debugService.getModel();return e.prototype.isEnabled.call(this,t)&&(n.getBreakpoints().length>0||n.getFunctionBreakpoints().length>0)},t.ID="workbench.debug.viewlet.action.removeAllBreakpoints",t.LABEL=i.localize(18,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.RemoveAllBreakpointsAction=z;var H=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"debug-action enable-all-breakpoints",i,r)||this;return o.toDispose.push(o.debugService.getModel().onDidChangeBreakpoints(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return this.debugService.enableOrDisableBreakpoints(!0)},
t.prototype.isEnabled=function(t){var n=this.debugService.getModel();return e.prototype.isEnabled.call(this,t)&&n.getBreakpoints().concat(n.getFunctionBreakpoints()).concat(n.getExceptionBreakpoints()).some(function(e){return!e.enabled})},t.ID="workbench.debug.viewlet.action.enableAllBreakpoints",t.LABEL=i.localize(19,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.EnableAllBreakpointsAction=H;var K=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"debug-action disable-all-breakpoints",i,r)||this;return o.toDispose.push(o.debugService.getModel().onDidChangeBreakpoints(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return this.debugService.enableOrDisableBreakpoints(!1)},t.prototype.isEnabled=function(t){var n=this.debugService.getModel();return e.prototype.isEnabled.call(this,t)&&n.getBreakpoints().concat(n.getFunctionBreakpoints()).concat(n.getExceptionBreakpoints()).some(function(e){return e.enabled})},
t.ID="workbench.debug.viewlet.action.disableAllBreakpoints",t.LABEL=i.localize(20,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.DisableAllBreakpointsAction=K;var U=function(e){function t(n,i,r,o){var s=e.call(this,n,i,"debug-action breakpoints-activate",r,o)||this;return s.updateLabel(s.debugService.getModel().areBreakpointsActivated()?t.DEACTIVATE_LABEL:t.ACTIVATE_LABEL),s.toDispose.push(s.debugService.getModel().onDidChangeBreakpoints(function(){s.updateLabel(s.debugService.getModel().areBreakpointsActivated()?t.DEACTIVATE_LABEL:t.ACTIVATE_LABEL),s.updateEnablement()})),s}return n(t,e),t.prototype.run=function(){return this.debugService.setBreakpointsActivated(!this.debugService.getModel().areBreakpointsActivated())},t.prototype.isEnabled=function(e){return this.debugService.getModel().getFunctionBreakpoints().length+this.debugService.getModel().getBreakpoints().length>0},t.ID="workbench.debug.viewlet.action.toggleBreakpointsActivatedAction",t.ACTIVATE_LABEL=i.localize(21,null),
t.DEACTIVATE_LABEL=i.localize(22,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.ToggleBreakpointsActivatedAction=U;var G=function(e){function t(t,n,i,r){var o=e.call(this,t,n,null,i,r)||this;return o.toDispose.push(o.debugService.getModel().onDidChangeBreakpoints(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return this.debugService.setBreakpointsActivated(!0)},t.prototype.isEnabled=function(t){var n=this.debugService.getModel();return e.prototype.isEnabled.call(this,t)&&(t===p.State.Running||t===p.State.Stopped)&&n.getFunctionBreakpoints().length+n.getBreakpoints().length+n.getExceptionBreakpoints().length>0},t.ID="workbench.debug.viewlet.action.reapplyBreakpointsAction",t.LABEL=i.localize(23,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.ReapplyBreakpointsAction=G;var j=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"debug-action add-function-breakpoint",i,r)||this
;return o.toDispose.push(o.debugService.getModel().onDidChangeBreakpoints(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return this.debugService.addFunctionBreakpoint(),s.TPromise.as(null)},t.prototype.isEnabled=function(e){return!this.debugService.getViewModel().getSelectedFunctionBreakpoint()&&this.debugService.getModel().getFunctionBreakpoints().every(function(e){return!!e.name})},t.ID="workbench.debug.viewlet.action.addFunctionBreakpointAction",t.LABEL=i.localize(24,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.AddFunctionBreakpointAction=j;var q=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,null,r,o)||this;return s.variable=i,s}return n(t,e),t.prototype.run=function(){return this.variable instanceof f.Variable&&this.debugService.getViewModel().setSelectedExpression(this.variable),s.TPromise.as(null)},t.prototype.isEnabled=function(t){var n=this.debugService.getViewModel().focusedSession
;return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped&&n&&n.raw.capabilities.supportsSetVariable},t.ID="workbench.debug.viewlet.action.setValue",t.LABEL=i.localize(25,null),t=a([l(3,p.IDebugService),l(4,c.IKeybindingService)],t)}(I);t.SetValueAction=q;var $=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"debug-action add-watch-expression",i,r)||this;return o.toDispose.push(o.debugService.getModel().onDidChangeWatchExpressions(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return this.debugService.addWatchExpression(),s.TPromise.as(void 0)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&this.debugService.getModel().getWatchExpressions().every(function(e){return!!e.name})},t.ID="workbench.debug.viewlet.action.addWatchExpression",t.LABEL=i.localize(26,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.AddWatchExpressionAction=$;var Y=function(e){function t(t,n,i,r){return e.call(this,t,n,void 0,i,r)||this}
return n(t,e),t.prototype.run=function(e){return this.debugService.getViewModel().setSelectedExpression(e),s.TPromise.as(null)},t.ID="workbench.debug.viewlet.action.editWatchExpression",t.LABEL=i.localize(27,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.EditWatchExpressionAction=Y;var X=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,"debug-action add-to-watch",r,o)||this;return s.variable=i,s.updateEnablement(),s}return n(t,e),t.prototype.run=function(){return this.debugService.addWatchExpression(this.variable.evaluateName),s.TPromise.as(void 0)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&this.variable&&!!this.variable.evaluateName},t.ID="workbench.debug.viewlet.action.addToWatchExpressions",t.LABEL=i.localize(28,null),t=a([l(3,p.IDebugService),l(4,c.IKeybindingService)],t)}(I);t.AddToWatchExpressionsAction=X;var Q=function(e){function t(t,n,i,r){return e.call(this,t,n,void 0,i,r)||this}return n(t,e),t.prototype.run=function(e){
return this.debugService.removeWatchExpressions(e.getId()),s.TPromise.as(null)},t.ID="workbench.debug.viewlet.action.removeWatchExpression",t.LABEL=i.localize(29,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.RemoveWatchExpressionAction=Q;var Z=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"debug-action remove-all",i,r)||this;return o.toDispose.push(o.debugService.getModel().onDidChangeWatchExpressions(function(){return o.updateEnablement()})),o}return n(t,e),t.prototype.run=function(){return this.debugService.removeWatchExpressions(),s.TPromise.as(null)},t.prototype.isEnabled=function(t){return e.prototype.isEnabled.call(this,t)&&this.debugService.getModel().getWatchExpressions().length>0},t.ID="workbench.debug.viewlet.action.removeAllWatchExpressions",t.LABEL=i.localize(30,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.RemoveAllWatchExpressionsAction=Z;var J=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,"debug-action clear-repl",i,r)||this
;return s.panelService=o,s}return n(t,e),t.prototype.run=function(){return this.debugService.removeReplExpressions(),this.panelService.openPanel(p.REPL_ID,!0)},t.ID="workbench.debug.panel.action.clearReplAction",t.LABEL=i.localize(31,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService),l(4,v.IPanelService)],t)}(I);t.ClearReplAction=J;var ee=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,p.REPL_ID,o,r,"debug-action toggle-repl")||this;return s.debugService=i,s.toDispose=[],s.registerListeners(),s}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.debugService.getModel().onDidChangeReplElements(function(){e.isReplVisible()||(e.class="debug-action toggle-repl notification",e.tooltip=i.localize(33,null))})),this.toDispose.push(this.panelService.onDidPanelOpen(function(n){n.getId()===p.REPL_ID&&(e.class="debug-action toggle-repl",e.tooltip=t.LABEL)}))},t.prototype.isReplVisible=function(){var e=this.panelService.getActivePanel();return e&&e.getId()===p.REPL_ID
},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.toDispose=o.dispose(this.toDispose)},t.ID="workbench.debug.action.toggleRepl",t.LABEL=i.localize(32,null),t=a([l(2,p.IDebugService),l(3,g.IPartService),l(4,v.IPanelService)],t)}(y.TogglePanelAction);t.ToggleReplAction=ee;var te=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.panelService=i,r}return n(t,e),t.prototype.run=function(){return this.panelService.openPanel(p.REPL_ID,!0)},t.ID="workbench.debug.action.focusRepl",t.LABEL=i.localize(34,null),t=a([l(2,v.IPanelService)],t)}(r.Action);t.FocusReplAction=te;var ne=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,null,i,r,100)||this;return s.editorService=o,s}return n(t,e),t.prototype.run=function(e){var t=this.debugService.getConfigurationManager().getLaunches().length>1,n=this.debugService.getModel().getSessions().filter(function(n){return n.getName(t)===e}).pop();this.debugService.focusStackFrame(void 0,void 0,n,!0)
;var i=this.debugService.getViewModel().focusedStackFrame;return i?i.openInEditor(this.editorService,!0):s.TPromise.as(void 0)},t.ID="workbench.action.debug.focusProcess",t.LABEL=i.localize(35,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService),l(4,m.IEditorService)],t)}(I);t.FocusSessionAction=ne;var ie=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action step-back",i,r,50)||this}return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.stepBack():s.TPromise.as(null)},t.prototype.isEnabled=function(t){var n=this.debugService.getViewModel().focusedSession;return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped&&n&&n.raw.capabilities.supportsStepBack},t.ID="workbench.action.debug.stepBack",t.LABEL=i.localize(36,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.StepBackAction=ie;var re=function(e){function t(t,n,i,r){return e.call(this,t,n,"debug-action reverse-continue",i,r,60)||this}
return n(t,e),t.prototype.run=function(e){return e instanceof f.Thread||(e=this.debugService.getViewModel().focusedThread),e?e.reverseContinue():s.TPromise.as(null)},t.prototype.isEnabled=function(t){var n=this.debugService.getViewModel().focusedSession;return e.prototype.isEnabled.call(this,t)&&t===p.State.Stopped&&n&&n.raw.capabilities.supportsStepBack},t.ID="workbench.action.debug.reverseContinue",t.LABEL=i.localize(37,null),t=a([l(2,p.IDebugService),l(3,c.IKeybindingService)],t)}(I);t.ReverseContinueAction=re;var oe=function(e){function t(t,n){var i=e.call(this,t,!0,void 0)||this;return i.toFocus=n,i}return n(t,e),t.prototype.run=function(t){var n=this;return e.prototype.run.call(this,t).then(function(){n.toFocus.focus()})},t}(_.CollapseAction);t.ReplCollapseAllAction=oe}),define(e[301],t([1,0,584,70,8,9,23,79,142,121,35,6,37,12,27,62,5,25,36,4,41,118,58,68,45,17,48,21,173]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L){"use strict";function R(e,t,n,i,r){
if(e.uri.scheme===u.DEBUG_SCHEME&&i.state===u.State.Inactive)return C.TPromise.as(null);var o=e.endLineNumber?{startLineNumber:e.lineNumber,endLineNumber:e.endLineNumber,startColumn:e.column,endColumn:e.endColumn}:{startLineNumber:e.lineNumber,startColumn:e.column||1,endLineNumber:e.lineNumber,endColumn:e.column||1073741824};return r.openEditor({resource:e.uri,options:{preserveFocus:n,selection:o,revealIfVisible:!0,revealInCenterIfOutsideViewport:!0,pinned:!n}},t?A.SIDE_GROUP:A.ACTIVE_GROUP)}function O(e,t,n){var r=e.state,o=r===u.State.Running||r===u.State.Stopped;if(!n.enabled||!e.getModel().areBreakpointsActivated())return{className:n instanceof d.FunctionBreakpoint?"debug-function-breakpoint-disabled":n.logMessage?"debug-breakpoint-log-disabled":"debug-breakpoint-disabled",message:n.logMessage?i.localize(7,null):i.localize(8,null)};var s=function(e){return n instanceof d.FunctionBreakpoint||!n.message?e:e.concat(", "+n.message)};if(o&&!n.verified)return{
className:n instanceof d.FunctionBreakpoint?"debug-function-breakpoint-unverified":n.logMessage?"debug-breakpoint-log-unverified":"debug-breakpoint-unverified",message:n.logMessage?i.localize(9,null):i.localize(10,null)};var a=e.getViewModel().focusedSession;if(n instanceof d.FunctionBreakpoint)return a&&!a.raw.capabilities.supportsFunctionBreakpoints?{className:"debug-function-breakpoint-unverified",message:i.localize(11,null)}:{className:"debug-function-breakpoint"};if(o&&t.isDirty(n.uri))return{className:"debug-breakpoint-unverified",message:s(i.localize(12,null))};if(n.logMessage||n.condition||n.hitCondition){var c=[];if(n.logMessage){if(a&&!a.raw.capabilities.supportsLogPoints)return{className:"debug-breakpoint-unsupported",message:i.localize(13,null)};c.push(i.localize(14,null,n.logMessage))}return a&&n.condition&&!a.raw.capabilities.supportsConditionalBreakpoints?{className:"debug-breakpoint-unsupported",message:i.localize(15,null)
}:a&&n.hitCondition&&!a.raw.capabilities.supportsHitConditionalBreakpoints?{className:"debug-breakpoint-unsupported",message:i.localize(16,null)}:(n.condition&&c.push(i.localize(17,null,n.condition)),n.hitCondition&&c.push(i.localize(18,null,n.hitCondition)),{className:n.logMessage?"debug-breakpoint-log":"debug-breakpoint-conditional",message:s(c.join("\n"))})}return{className:"debug-breakpoint",message:n.message}}Object.defineProperty(t,"__esModule",{value:!0});var M=o.$,P=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,r,n,l)||this;return u.debugService=i,u.instantiationService=o,u.themeService=s,u.editorService=a,u.contextViewService=c,u.minimumBodySize=u.maximumBodySize=u.getExpandedBodySize(),u.settings=t.viewletSettings,u.disposables.push(u.debugService.getModel().onDidChangeBreakpoints(function(){return u.onBreakpointsChange()})),u}return n(t,e),t.prototype.renderBody=function(e){var t=this;o.addClass(e,"debug-breakpoints");var n=new N(this.debugService)
;this.list=this.instantiationService.createInstance(I.WorkbenchList,e,n,[this.instantiationService.createInstance(F),new W(this.debugService),this.instantiationService.createInstance(B),new V(this.debugService,this.contextViewService,this.themeService)],{identityProvider:function(e){return e.getId()},multipleSelectionSupport:!1}),u.CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService),this.list.onContextMenu(this.onListContextMenu,this,this.disposables),this.disposables.push(this.list.onOpen(function(e){var n=!1,i=!1,r=!1,o=e.browserEvent;o instanceof MouseEvent&&(n=1===o.detail,i=2===o.detail,r=o.ctrlKey||o.metaKey||o.altKey);var a=t.list.getFocusedElements(),c=a.length?a[0]:void 0;c instanceof d.Breakpoint&&R(c,r,n,t.debugService,t.editorService).done(void 0,s.onUnexpectedError),i&&c instanceof d.FunctionBreakpoint&&c!==t.debugService.getViewModel().getSelectedFunctionBreakpoint()&&(t.debugService.getViewModel().setSelectedFunctionBreakpoint(c),t.onBreakpointsChange())})),
this.list.splice(0,this.list.length,this.elements)},t.prototype.focus=function(){e.prototype.focus.call(this),this.list&&this.list.domFocus()},t.prototype.layoutBody=function(e){this.list&&this.list.layout(e)},t.prototype.onListContextMenu=function(e){var t=this,n=[],r=e.element,o=r instanceof d.Breakpoint&&r.logMessage?i.localize(0,null):i.localize(1,null);(r instanceof d.Breakpoint||r instanceof d.FunctionBreakpoint)&&(n.push(new c.Action("workbench.action.debug.openEditorAndEditBreakpoint",i.localize(2,null,o),void 0,!0,function(){if(r instanceof d.Breakpoint)return R(r,!1,!1,t.debugService,t.editorService).then(function(e){var t=e.getControl();x.isCodeEditor(t)&&t.getContribution(u.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(r.lineNumber,r.column)});t.debugService.getViewModel().setSelectedFunctionBreakpoint(r),t.onBreakpointsChange()})),n.push(new E.Separator)),n.push(new h.RemoveBreakpointAction(h.RemoveBreakpointAction.ID,i.localize(3,null,o),this.debugService,this.keybindingService)),
this.debugService.getModel().getBreakpoints().length+this.debugService.getModel().getFunctionBreakpoints().length>1&&(n.push(new h.RemoveAllBreakpointsAction(h.RemoveAllBreakpointsAction.ID,h.RemoveAllBreakpointsAction.LABEL,this.debugService,this.keybindingService)),n.push(new E.Separator),n.push(new h.EnableAllBreakpointsAction(h.EnableAllBreakpointsAction.ID,h.EnableAllBreakpointsAction.LABEL,this.debugService,this.keybindingService)),n.push(new h.DisableAllBreakpointsAction(h.DisableAllBreakpointsAction.ID,h.DisableAllBreakpointsAction.LABEL,this.debugService,this.keybindingService))),n.push(new E.Separator),n.push(new h.ReapplyBreakpointsAction(h.ReapplyBreakpointsAction.ID,h.ReapplyBreakpointsAction.LABEL,this.debugService,this.keybindingService)),this.contextMenuService.showContextMenu({getAnchor:function(){return e.anchor},getActions:function(){return C.TPromise.as(n)},getActionsContext:function(){return r}})},t.prototype.getActions=function(){
return[new h.AddFunctionBreakpointAction(h.AddFunctionBreakpointAction.ID,h.AddFunctionBreakpointAction.LABEL,this.debugService,this.keybindingService),new h.ToggleBreakpointsActivatedAction(h.ToggleBreakpointsActivatedAction.ID,h.ToggleBreakpointsActivatedAction.ACTIVATE_LABEL,this.debugService,this.keybindingService),new h.RemoveAllBreakpointsAction(h.RemoveAllBreakpointsAction.ID,h.RemoveAllBreakpointsAction.LABEL,this.debugService,this.keybindingService)]},t.prototype.setExpanded=function(t){e.prototype.setExpanded.call(this,t),t&&this.needsRefresh&&this.onBreakpointsChange()},t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){t&&n.needsRefresh&&n.onBreakpointsChange()})},t.prototype.onBreakpointsChange=function(){this.isExpanded()&&this.isVisible()?(this.minimumBodySize=this.getExpandedBodySize(),this.maximumBodySize<Number.POSITIVE_INFINITY&&(this.maximumBodySize=this.minimumBodySize),this.list&&(this.list.splice(0,this.list.length,this.elements),
this.needsRefresh=!1)):this.needsRefresh=!0},Object.defineProperty(t.prototype,"elements",{get:function(){var e=this.debugService.getModel();return e.getExceptionBreakpoints().concat(e.getFunctionBreakpoints()).concat(e.getBreakpoints())},enumerable:!0,configurable:!0}),t.prototype.getExpandedBodySize=function(){var e=this.debugService.getModel(),n=e.getBreakpoints().length+e.getExceptionBreakpoints().length+e.getFunctionBreakpoints().length;return 22*Math.min(t.MAX_VISIBLE_FILES,n)},t.prototype.shutdown=function(){this.settings[t.MEMENTO]=!this.isExpanded()},t.MAX_VISIBLE_FILES=9,t.MEMENTO="breakopintsview.memento",t=a([l(1,p.IContextMenuService),l(2,u.IDebugService),l(3,g.IKeybindingService),l(4,f.IInstantiationService),l(5,v.IThemeService),l(6,A.IEditorService),l(7,p.IContextViewService),l(8,k.IConfigurationService)],t)}(L.ViewletPanel);t.BreakpointsView=P;var N=function(){function e(e){this.debugService=e}return e.prototype.getHeight=function(e){return 22},e.prototype.getTemplateId=function(e){
if(e instanceof d.Breakpoint)return F.ID;if(e instanceof d.FunctionBreakpoint){var t=this.debugService.getViewModel().getSelectedFunctionBreakpoint();return!e.name||t&&t.getId()===e.getId()?V.ID:B.ID}return e instanceof d.ExceptionBreakpoint?W.ID:void 0},e}(),F=function(){function e(e,t,n,i){this.debugService=e,this.contextService=t,this.environmentService=n,this.textFileService=i}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=Object.create(null);n.breakpoint=o.append(e,M(".breakpoint")),n.icon=M(".icon"),n.checkbox=M("input"),n.checkbox.type="checkbox",n.toDispose=[],n.toDispose.push(o.addStandardDisposableListener(n.checkbox,"change",function(e){t.debugService.enableOrDisableBreakpoints(!n.context.enabled,n.context)})),o.append(n.breakpoint,n.icon),o.append(n.breakpoint,n.checkbox),n.name=o.append(n.breakpoint,M("span.name")),n.filePath=o.append(n.breakpoint,M("span.file-path"))
;var i=o.append(n.breakpoint,M(".line-number-container"));return n.lineNumber=o.append(i,M("span.line-number")),n},e.prototype.renderElement=function(e,t,n){n.context=e,o.toggleClass(n.breakpoint,"disabled",!this.debugService.getModel().areBreakpointsActivated()),n.name.textContent=S.basename(y.getPathLabel(e.uri,this.environmentService,this.contextService)),n.lineNumber.textContent=e.lineNumber.toString(),e.column&&(n.lineNumber.textContent+=":"+e.column),n.filePath.textContent=y.getPathLabel(r.dirname(e.uri),this.environmentService,this.contextService),n.checkbox.checked=e.enabled;var i=O(this.debugService,this.textFileService,e),s=i.message,a=i.className;n.icon.className=a+" icon",n.breakpoint.title=e.message||s||"";(this.debugService.state===u.State.Running||this.debugService.state===u.State.Stopped)&&!e.verified&&o.addClass(n.breakpoint,"disabled")},e.prototype.disposeTemplate=function(e){b.dispose(e.toDispose)},e.ID="breakpoints",
e=a([l(0,u.IDebugService),l(1,m.IWorkspaceContextService),l(2,_.IEnvironmentService),l(3,D.ITextFileService)],e)}(),W=function(){function e(e){this.debugService=e}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=Object.create(null);return n.breakpoint=o.append(e,M(".breakpoint")),n.checkbox=M("input"),n.checkbox.type="checkbox",n.toDispose=[],n.toDispose.push(o.addStandardDisposableListener(n.checkbox,"change",function(e){t.debugService.enableOrDisableBreakpoints(!n.context.enabled,n.context)})),o.append(n.breakpoint,n.checkbox),n.name=o.append(n.breakpoint,M("span.name")),o.addClass(n.breakpoint,"exception"),n},e.prototype.renderElement=function(e,t,n){n.context=e,n.name.textContent=e.label||e.filter+" exceptions",n.breakpoint.title=n.name.textContent,n.checkbox.checked=e.enabled},e.prototype.disposeTemplate=function(e){b.dispose(e.toDispose)},e.ID="exceptionbreakpoints",e}(),B=function(){
function e(e,t){this.debugService=e,this.textFileService=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=Object.create(null);return n.breakpoint=o.append(e,M(".breakpoint")),n.icon=M(".icon"),n.checkbox=M("input"),n.checkbox.type="checkbox",n.toDispose=[],n.toDispose.push(o.addStandardDisposableListener(n.checkbox,"change",function(e){t.debugService.enableOrDisableBreakpoints(!n.context.enabled,n.context)})),o.append(n.breakpoint,n.icon),o.append(n.breakpoint,n.checkbox),n.name=o.append(n.breakpoint,M("span.name")),n},e.prototype.renderElement=function(e,t,n){n.context=e,n.name.textContent=e.name;var r=O(this.debugService,this.textFileService,e),s=r.className,a=r.message;n.icon.className=s+" icon",n.icon.title=a||"",n.checkbox.checked=e.enabled,n.breakpoint.title=e.name;var c=this.debugService.getViewModel().focusedSession
;o.toggleClass(n.breakpoint,"disalbed",c&&!c.raw.capabilities.supportsFunctionBreakpoints||!this.debugService.getModel().areBreakpointsActivated()),c&&!c.raw.capabilities.supportsFunctionBreakpoints&&(n.breakpoint.title=i.localize(4,null))},e.prototype.disposeTemplate=function(e){b.dispose(e.toDispose)},e.ID="functionbreakpoints",e=a([l(0,u.IDebugService),l(1,D.ITextFileService)],e)}(),V=function(){function e(e,t,n){this.debugService=e,this.contextViewService=t,this.themeService=n}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=Object.create(null),r=o.append(e,M(".inputBoxContainer")),a=new w.InputBox(r,this.contextViewService,{placeholder:i.localize(5,null),ariaLabel:i.localize(6,null)}),c=T.attachInputBoxStyler(a,this.themeService),l=[a,c],u=function(e){n.reactedOnEvent||(n.reactedOnEvent=!0,t.debugService.getViewModel().setSelectedFunctionBreakpoint(void 0),
a.value&&(e||n.breakpoint.name)?t.debugService.renameFunctionBreakpoint(n.breakpoint.getId(),e?a.value:n.breakpoint.name).done(null,s.onUnexpectedError):t.debugService.removeFunctionBreakpoints(n.breakpoint.getId()).done(null,s.onUnexpectedError))};return l.push(o.addStandardDisposableListener(a.inputElement,"keydown",function(e){var t=e.equals(9),n=e.equals(3);(t||n)&&(e.preventDefault(),e.stopPropagation(),u(n))})),l.push(o.addDisposableListener(a.inputElement,"blur",function(){n.breakpoint.name||u(!0)})),n.inputBox=a,n.toDispose=l,n},e.prototype.renderElement=function(e,t,n){n.breakpoint=e,n.reactedOnEvent=!1,n.inputBox.value=e.name||"",n.inputBox.focus(),n.inputBox.select()},e.prototype.disposeTemplate=function(e){b.dispose(e.toDispose)},e.ID="functionbreakpointinput",e}();t.openBreakpointSource=R,t.getBreakpointMessageAndClassName=O}),define(e[533],t([1,0,9,14,78,74,8,20,82,41,46,79,121,526,17,34,28,69,12,26,587,37,35,22,18,6,878]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.debugToolBarBackground=C.registerColor("debugToolBar.background",{dark:"#333333",light:"#F3F3F3",hc:"#000000"},E.localize(0,null)),t.debugToolBarBorder=C.registerColor("debugToolBar.border",{dark:null,light:null,hc:null},E.localize(1,null));var D=function(e){function S(t,n,i,r,o,a,c,l,d,p){var m=e.call(this,c)||this;m.notificationService=t,m.telemetryService=n,m.debugService=i,m.partService=r,m.storageService=o,m.configurationService=a,m.keybindingService=l,m.instantiationService=p,m.allActions=[],m.$el=s.$().div().addClass("debug-actions-widget").style("top",r.getTitleBarOffset()+"px"),m.dragArea=s.$().div().addClass("drag-area"),m.$el.append(m.dragArea);var y=s.$().div().addClass(".action-bar-container");return m.$el.append(y),m.activeActions=[],m.actionBar=new h.ActionBar(y.getHTMLElement(),{orientation:h.ActionsOrientation.HORIZONTAL,actionItemProvider:function(e){
return e.id===g.FocusSessionAction.ID?new v.FocusSessionActionItem(e,m.debugService,m.themeService,d):null}}),m.updateScheduler=new x.RunOnceScheduler(function(){var e=m.debugService.state,t=m.configurationService.getValue("debug").toolBarLocation;if(e===f.State.Inactive||"docked"===t||"hidden"===t)return m.hide();var n=S.getActions(m.allActions,m.toUnbind,m.debugService,m.keybindingService,m.instantiationService);u.equals(n,m.activeActions,function(e,t){return e.id===t.id})||(m.actionBar.clear(),m.actionBar.push(n,{icon:!0,label:!1}),m.activeActions=n),m.show()},20),m.updateStyles(),m.toUnbind.push(m.actionBar),m.registerListeners(),m.hide(),m.isBuilt=!1,m}return n(S,e),S.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.debugService.onDidChangeState(function(){return e.updateScheduler.schedule()})),this.toUnbind.push(this.debugService.getViewModel().onDidFocusSession(function(){return e.updateScheduler.schedule()})),
this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){return e.onDidConfigurationChange(t)})),this.toUnbind.push(this.actionBar.actionRunner.onDidRun(function(t){t.error&&!i.isPromiseCanceledError(t.error)&&e.notificationService.error(t.error),e.telemetryService&&e.telemetryService.publicLog("workbenchActionExecuted",{id:t.action.id,from:"debugActionsWidget"})})),s.$(window).on(c.EventType.RESIZE,function(){return e.setCoordinates()},this.toUnbind),this.dragArea.on(c.EventType.MOUSE_UP,function(t){if(2===new d.StandardMouseEvent(t).detail){var n=e.$el.getHTMLElement().clientWidth;e.setCoordinates(.5*window.innerWidth-.5*n,0),e.storePosition()}}),this.dragArea.on(c.EventType.MOUSE_DOWN,function(t){var n=s.$(window);e.dragArea.addClass("dragged"),n.on("mousemove",function(t){var n=new d.StandardMouseEvent(t);n.preventDefault(),e.setCoordinates(n.posx-14,n.posy-e.partService.getTitleBarOffset())}).once("mouseup",function(t){e.storePosition(),e.dragArea.removeClass("dragged"),
n.off("mousemove")})}),this.toUnbind.push(this.partService.onTitleBarVisibilityChange(function(){return e.setYCoordinate()})),this.toUnbind.push(o.onDidChangeZoomLevel(function(){return e.setYCoordinate()}))},S.prototype.storePosition=function(){var e=parseFloat(this.$el.getComputedStyle().left)/window.innerWidth;this.storageService.store("debug.actionswidgetposition",e,y.StorageScope.GLOBAL)},S.prototype.updateStyles=function(){if(e.prototype.updateStyles.call(this),this.$el){this.$el.style("background-color",this.getColor(t.debugToolBarBackground));var n=this.getColor(C.widgetShadow);this.$el.style("box-shadow",n?"0 5px 8px "+n:null);var i=this.getColor(C.contrastBorder),r=this.getColor(t.debugToolBarBorder);i?this.$el.style("border","1px solid "+i):this.$el.style({border:r?"solid "+r:"none","border-width":"1px 0"})}},S.prototype.setYCoordinate=function(e){void 0===e&&(e=0);var t=this.partService.getTitleBarOffset();this.$el.style("top",t+e+"px")},S.prototype.setCoordinates=function(e,t){if(this.isVisible){
var n=this.$el.getHTMLElement().clientWidth;if(void 0===e){var i=this.storageService.get("debug.actionswidgetposition",y.StorageScope.GLOBAL);e=void 0!==i?parseFloat(i)*window.innerWidth:.5*window.innerWidth-.5*n}e=Math.max(0,Math.min(e,window.innerWidth-n)),this.$el.style("left",e+"px"),void 0===t&&(t=this.storageService.getInteger("debug.actionswidgety",y.StorageScope.GLOBAL,0));if(t<17.5||t>52.5){var r=t<35;this.setYCoordinate(r?0:35),this.storageService.store("debug.actionswidgety",r?0:70,y.StorageScope.GLOBAL)}}},S.prototype.onDidConfigurationChange=function(e){(e.affectsConfiguration("debug.hideActionBar")||e.affectsConfiguration("debug.toolBarLocation"))&&this.updateScheduler.schedule()},S.prototype.show=function(){this.isVisible?this.setCoordinates():(this.isBuilt||(this.isBuilt=!0,this.$el.build(document.getElementById(this.partService.getWorkbenchElementId()))),this.isVisible=!0,this.$el.show(),this.setCoordinates())},S.prototype.hide=function(){this.isVisible=!1,this.$el.hide()},
S.getActions=function(e,t,n,i,o){0===e.length&&(e.push(new g.ContinueAction(g.ContinueAction.ID,g.ContinueAction.LABEL,n,i)),e.push(new g.PauseAction(g.PauseAction.ID,g.PauseAction.LABEL,n,i)),e.push(new g.StopAction(g.StopAction.ID,g.StopAction.LABEL,n,i)),e.push(new g.DisconnectAction(g.DisconnectAction.ID,g.DisconnectAction.LABEL,n,i)),e.push(new g.StepOverAction(g.StepOverAction.ID,g.StepOverAction.LABEL,n,i)),e.push(new g.StepIntoAction(g.StepIntoAction.ID,g.StepIntoAction.LABEL,n,i)),e.push(new g.StepOutAction(g.StepOutAction.ID,g.StepOutAction.LABEL,n,i)),e.push(o.createInstance(g.RestartAction,g.RestartAction.ID,g.RestartAction.LABEL)),e.push(new g.StepBackAction(g.StepBackAction.ID,g.StepBackAction.LABEL,n,i)),e.push(new g.ReverseContinueAction(g.ReverseContinueAction.ID,g.ReverseContinueAction.LABEL,n,i)),e.push(o.createInstance(g.FocusSessionAction,g.FocusSessionAction.ID,g.FocusSessionAction.LABEL)),e.forEach(function(e){t.push(e)}))
;var s=n.state,a=n.getViewModel().focusedSession,c=a&&"attach"===a.configuration.request&&a.configuration.type&&!r.equalsIgnoreCase(a.configuration.type,"extensionHost");return e.filter(function(e){return e.id===g.ContinueAction.ID?s!==f.State.Running:e.id===g.PauseAction.ID?s===f.State.Running:e.id===g.StepBackAction.ID?a&&a.raw.capabilities.supportsStepBack:e.id===g.ReverseContinueAction.ID?a&&a.raw.capabilities.supportsStepBack:e.id===g.DisconnectAction.ID?c:e.id===g.StopAction.ID?!c:e.id!==g.FocusSessionAction.ID||n.getViewModel().isMultiSessionView()}).sort(function(e,t){return e.weight-t.weight})},S.prototype.dispose=function(){e.prototype.dispose.call(this),this.$el&&(this.$el.destroy(),delete this.$el)},S=a([l(0,T.INotificationService),l(1,b.ITelemetryService),l(2,f.IDebugService),l(3,p.IPartService),l(4,y.IStorageService),l(5,m.IConfigurationService),l(6,_.IThemeService),l(7,w.IKeybindingService),l(8,I.IContextViewService),l(9,k.IInstantiationService)],S)}(S.Themable);t.DebugActionsWidget=D}),
define(e[1509],t([1,0,588,4,169,9,52,58,27,79,142,104,65,45,31,21,55,15,301,22,304]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerCommands=function(){s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.toggleBreakpoint",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(5),when:m.ContextKeyExpr.and(l.CONTEXT_BREAKPOINTS_FOCUSED,S.InputFocusedContext.toNegated()),primary:10,handler:function(e){var t=e.get(a.IListService),n=e.get(l.IDebugService),i=t.lastFocusedList;if(i instanceof r.List){var s=i.getFocusedElements();s&&s.length&&n.enableOrDisableBreakpoints(!s[0].enabled,s[0]).done(null,o.onUnexpectedError)}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.enableOrDisableBreakpoint",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),primary:void 0,when:v.EditorContextKeys.editorTextFocus,handler:function(e){var t=e.get(l.IDebugService),n=e.get(g.IEditorService).activeTextEditorWidget
;if(p.isCodeEditor(n)){var i=n.getModel();if(i){var r=n.getPosition(),s=t.getModel().getBreakpoints({uri:i.uri,lineNumber:r.lineNumber});s.length&&t.enableOrDisableBreakpoints(!s[0].enabled,s[0]).done(null,o.onUnexpectedError)}}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.renameWatchExpression",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(5),when:l.CONTEXT_WATCH_EXPRESSIONS_FOCUSED,primary:60,mac:{primary:3},handler:function(e){var t=e.get(a.IListService),n=e.get(l.IDebugService),i=t.lastFocusedList;if(!(i instanceof r.List)){var o=i.getFocus();o instanceof u.Expression&&n.getViewModel().setSelectedExpression(o)}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.setVariable",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(5),when:l.CONTEXT_VARIABLES_FOCUSED,primary:60,mac:{primary:3},handler:function(e){var t=e.get(a.IListService),n=e.get(l.IDebugService),i=t.lastFocusedList;if(!(i instanceof r.List)){var o=i.getFocus()
;o instanceof u.Variable&&n.getViewModel().setSelectedExpression(o)}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.removeWatchExpression",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:m.ContextKeyExpr.and(l.CONTEXT_WATCH_EXPRESSIONS_FOCUSED,l.CONTEXT_EXPRESSION_SELECTED.toNegated()),primary:20,mac:{primary:2049},handler:function(e){var t=e.get(a.IListService),n=e.get(l.IDebugService),i=t.lastFocusedList;if(!(i instanceof r.List)){var o=i.getFocus();o instanceof u.Expression&&n.removeWatchExpressions(o.getId())}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.removeBreakpoint",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:m.ContextKeyExpr.and(l.CONTEXT_BREAKPOINTS_FOCUSED,l.CONTEXT_BREAKPOINT_SELECTED.toNegated()),primary:20,mac:{primary:2049},handler:function(e){var t=e.get(a.IListService),n=e.get(l.IDebugService),i=t.lastFocusedList;if(i instanceof r.List){var s=i.getFocusedElements(),c=s.length?s[0]:void 0
;c instanceof u.Breakpoint?n.removeBreakpoints(c.getId()).done(null,o.onUnexpectedError):c instanceof u.FunctionBreakpoint&&n.removeFunctionBreakpoints(c.getId()).done(null,o.onUnexpectedError)}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.installAdditionalDebuggers",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,handler:function(e){return e.get(h.IViewletService).openViewlet(d.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("tag:debuggers @sort:installs"),e.focus()})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.addConfiguration",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:void 0,handler:function(e,t){var r=e.get(l.IDebugService).getConfigurationManager();return e.get(c.IWorkspaceContextService).getWorkbenchState()===c.WorkbenchState.EMPTY?(e.get(b.INotificationService).info(n.localize(0,null)),i.TPromise.as(null)):(r.getLaunches().filter(function(e){
return e.uri.toString()===t}).pop()||r.selectedConfiguration.launch).openConfigFile(!1).done(function(e){var t=e.editor,n=e.created;if(t&&!n){var i=t.getControl();if(i)return i.getContribution(l.EDITOR_CONTRIBUTION_ID).addLaunchConfiguration()}})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),primary:1091,when:v.EditorContextKeys.editorTextFocus,id:"editor.debug.action.toggleInlineBreakpoint",handler:function(e){var t=e.get(l.IDebugService),n=e.get(g.IEditorService).activeTextEditorWidget;if(p.isCodeEditor(n)){var r=n.getPosition(),o=n.getModel().uri;if(t.getModel().getBreakpoints({lineNumber:r.lineNumber,uri:o}).filter(function(e){return e.column===r.column||!e.column&&r.column<=1}).pop())return i.TPromise.as(null);if(t.getConfigurationManager().canSetBreakpointsIn(n.getModel()))return t.addBreakpoints(o,[{lineNumber:r.lineNumber,column:r.column>1?r.column:void 0}])}return i.TPromise.as(null)}}),
f.MenuRegistry.appendMenuItem(f.MenuId.CommandPalette,{command:{id:"editor.debug.action.toggleInlineBreakpoint",title:n.localize(1,null),category:n.localize(2,null)}}),f.MenuRegistry.appendMenuItem(f.MenuId.EditorContext,{command:{id:"editor.debug.action.toggleInlineBreakpoint",title:n.localize(3,null)},when:m.ContextKeyExpr.and(l.CONTEXT_IN_DEBUG_MODE,l.CONTEXT_NOT_IN_DEBUG_REPL,v.EditorContextKeys.writable),group:"debug",order:1}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.openBreakpointToSide",weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:l.CONTEXT_BREAKPOINTS_FOCUSED,primary:2051,secondary:[515],handler:function(e){var t=e.get(a.IListService).lastFocusedList;if(t instanceof r.List){var n=t.getFocusedElements();if(n.length&&n[0]instanceof u.Breakpoint)return y.openBreakpointSource(n[0],!0,!1,e.get(l.IDebugService),e.get(g.IEditorService))}return i.TPromise.as(void 0)}})}}),
define(e[1510],t([1,0,590,4,73,19,55,32,15,79,81,65,21,301]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(){return e.call(this,{id:"editor.debug.action.toggleBreakpoint",label:i.localize(0,null),alias:"Debug: Toggle Breakpoint",precondition:null,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:67}})||this}return n(t,e),t.prototype.run=function(e,t){var n=e.get(u.IDebugService),i=t.getPosition(),o=t.getModel().uri,s=n.getModel().getBreakpoints({lineNumber:i.lineNumber,uri:o});return s.length?r.TPromise.join(s.map(function(e){return n.removeBreakpoints(e.getId())})):n.getConfigurationManager().canSetBreakpointsIn(t.getModel())?n.addBreakpoints(o,[{lineNumber:i.lineNumber}]):r.TPromise.as(null)},t}(c.EditorAction),v=function(e){function t(){return e.call(this,{id:"editor.debug.action.conditionalBreakpoint",label:i.localize(1,null),alias:"Debug: Add Conditional Breakpoint...",precondition:null})||this}return n(t,e),
t.prototype.run=function(e,t){var n=e.get(u.IDebugService),i=t.getPosition(),r=i.lineNumber,o=i.column;n.getConfigurationManager().canSetBreakpointsIn(t.getModel())&&t.getContribution(u.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(r,o)},t}(c.EditorAction),m=function(e){function t(){return e.call(this,{id:"editor.debug.action.toggleLogPoint",label:i.localize(2,null),alias:"Debug: Add Logpoint...",precondition:null})||this}return n(t,e),t.prototype.run=function(e,t){var n=e.get(u.IDebugService),i=t.getPosition(),r=i.lineNumber,o=i.column;n.getConfigurationManager().canSetBreakpointsIn(t.getModel())&&t.getContribution(u.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(r,o,u.BreakpointWidgetContext.LOG_MESSAGE)},t}(c.EditorAction),y=function(e){function t(){return e.call(this,{id:"editor.debug.action.runToCursor",label:i.localize(3,null),alias:"Debug: Run to Cursor",
precondition:l.ContextKeyExpr.and(u.CONTEXT_IN_DEBUG_MODE,u.CONTEXT_NOT_IN_DEBUG_REPL,a.EditorContextKeys.writable,u.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),menuOpts:{group:"debug",order:2}})||this}return n(t,e),t.prototype.run=function(e,t){var n=e.get(u.IDebugService);if(n.state!==u.State.Stopped)return r.TPromise.as(null);var i,o=n.getViewModel().focusedSession.raw.onDidEvent(function(e){"stopped"!==e.event&&"exit"!==e.event||(i&&n.removeBreakpoints(i.getId()),o.dispose())}),s=t.getPosition(),a=t.getModel().uri;return(!!n.getModel().getBreakpoints({column:s.column,lineNumber:s.lineNumber,uri:a}).length?r.TPromise.as(null):n.addBreakpoints(a,[{lineNumber:s.lineNumber,column:s.column}])).then(function(e){e&&e.length&&(i=e[0]),n.getViewModel().focusedThread.continue()})},t}(c.EditorAction),b=function(e){function t(){return e.call(this,{id:"editor.debug.action.selectionToRepl",label:i.localize(4,null),alias:"Debug: Evaluate",
precondition:l.ContextKeyExpr.and(a.EditorContextKeys.hasNonEmptySelection,u.CONTEXT_IN_DEBUG_MODE,u.CONTEXT_NOT_IN_DEBUG_REPL),menuOpts:{group:"debug",order:0}})||this}return n(t,e),t.prototype.run=function(e,t){var n=e.get(u.IDebugService),i=e.get(d.IPanelService),r=t.getModel().getValueInRange(t.getSelection());return n.addReplExpression(r).then(function(){return i.openPanel(u.REPL_ID,!0)}).then(function(e){})},t}(c.EditorAction),S=function(e){function t(){return e.call(this,{id:"editor.debug.action.selectionToWatch",label:i.localize(5,null),alias:"Debug: Add to Watch",precondition:l.ContextKeyExpr.and(a.EditorContextKeys.hasNonEmptySelection,u.CONTEXT_IN_DEBUG_MODE,u.CONTEXT_NOT_IN_DEBUG_REPL),menuOpts:{group:"debug",order:1}})||this}return n(t,e),t.prototype.run=function(e,t){var n=e.get(u.IDebugService),i=e.get(h.IViewletService),r=t.getModel().getValueInRange(t.getSelection());return i.openViewlet(u.VIEWLET_ID).then(function(){return n.addWatchExpression(r)})},t}(c.EditorAction),_=function(e){
function t(){return e.call(this,{id:"editor.debug.action.showDebugHover",label:i.localize(6,null),alias:"Debug: Show Hover",precondition:u.CONTEXT_IN_DEBUG_MODE,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:o.KeyChord(2089,2087)}})||this}return n(t,e),t.prototype.run=function(e,t){var n=t.getPosition(),i=t.getModel().getWordAtPosition(n);if(!i)return r.TPromise.as(null);var o=new s.Range(n.lineNumber,n.column,n.lineNumber,i.endColumn);return t.getContribution(u.EDITOR_CONTRIBUTION_ID).showHover(o,!0)},t}(c.EditorAction),C=function(e){function t(t,n){var i=e.call(this,n)||this;return i.isNext=t,i}return n(t,e),t.prototype.run=function(e,t,n){var i=e.get(u.IDebugService),o=e.get(p.IEditorService),s=t.getModel().uri,a=t.getPosition().lineNumber,c=i.getModel().getBreakpoints({enabledOnly:!0}),l=this.isNext?c.filter(function(e){return e.uri.toString()===s.toString()&&e.lineNumber>a}).shift():c.filter(function(e){return e.uri.toString()===s.toString()&&e.lineNumber<a}).pop()
;return l||(l=this.isNext?c.filter(function(e){return e.uri.toString()>s.toString()}).shift():c.filter(function(e){return e.uri.toString()<s.toString()}).pop()),!l&&c.length&&(l=this.isNext?c[0]:c[c.length-1]),l?f.openBreakpointSource(l,!1,!0,i,o):r.TPromise.as(null)},t}(c.EditorAction),E=function(e){function t(){return e.call(this,!0,{id:"editor.debug.action.goToNextBreakpoint",label:i.localize(7,null),alias:"Debug: Go To Next Breakpoint",precondition:null})||this}return n(t,e),t}(C),w=function(e){function t(){return e.call(this,!1,{id:"editor.debug.action.goToPreviousBreakpoint",label:i.localize(8,null),alias:"Debug: Go To Previous Breakpoint",precondition:null})||this}return n(t,e),t}(C);c.registerEditorAction(g),c.registerEditorAction(v),c.registerEditorAction(m),c.registerEditorAction(y),c.registerEditorAction(b),c.registerEditorAction(S),c.registerEditorAction(_),c.registerEditorAction(E),c.registerEditorAction(w)}),define(e[1511],t([1,0,5,19,57,79,47,134,301,48]),function(e,t,n,i,r,o,s,c,u,d){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,n){this.modelService=e,this.debugService=t,this.textFileService=n,this.modelDataMap=new Map,this.toDispose=[],this.registerListeners()}return e.prototype.dispose=function(){this.modelDataMap.forEach(function(e){n.dispose(e.toDispose),e.model.deltaDecorations(e.breakpointDecorations.map(function(e){return e.decorationId}),[]),e.model.deltaDecorations(e.currentStackDecorations,[])}),this.toDispose=n.dispose(this.toDispose),this.modelDataMap.clear()},e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.modelService.onModelAdded(this.onModelAdded,this)),this.modelService.getModels().forEach(function(t){return e.onModelAdded(t)}),this.toDispose.push(this.modelService.onModelRemoved(this.onModelRemoved,this)),this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(function(){return e.onBreakpointsChange()})),
this.toDispose.push(this.debugService.getViewModel().onDidFocusStackFrame(function(){return e.onFocusStackFrame()})),this.toDispose.push(this.debugService.onDidChangeState(function(t){t===o.State.Inactive&&e.modelDataMap.forEach(function(e){e.topStackFrameRange=void 0})}))},e.prototype.onModelAdded=function(e){var t=this,n=e.uri.toString(),i=this.debugService.getModel().getBreakpoints({uri:e.uri}),r=e.deltaDecorations([],this.createCallStackDecorations(n)),o=this.createBreakpointDecorations(e,i),s=e.deltaDecorations([],o),a=[e.onDidChangeDecorations(function(e){return t.onModelDecorationsChanged(n)})];this.modelDataMap.set(n,{model:e,toDispose:a,breakpointDecorations:s.map(function(e,t){return{decorationId:e,modelId:i[t].getId(),range:o[t].range}}),currentStackDecorations:r,topStackFrameRange:void 0})},e.prototype.onModelRemoved=function(e){var t=e.uri.toString();this.modelDataMap.has(t)&&(n.dispose(this.modelDataMap.get(t).toDispose),this.modelDataMap.delete(t))},e.prototype.onFocusStackFrame=function(){
var e=this;this.modelDataMap.forEach(function(t,n){t.currentStackDecorations=t.model.deltaDecorations(t.currentStackDecorations,e.createCallStackDecorations(n))})},e.prototype.createCallStackDecorations=function(t){var n=[],r=this.debugService.getViewModel().focusedStackFrame;if(!r||r.source.uri.toString()!==t)return n;var o=new i.Range(r.range.startLineNumber,r.range.startColumn,r.range.startLineNumber,1073741824),s=new i.Range(r.range.startLineNumber,r.range.startColumn,r.range.startLineNumber,r.range.startColumn+1),a=r.thread.getCallStack();if(a&&a.length&&r===a[0]){if(n.push({options:e.TOP_STACK_FRAME_MARGIN,range:s}),r.thread.stoppedDetails&&"exception"===r.thread.stoppedDetails.reason)n.push({options:e.TOP_STACK_FRAME_EXCEPTION_DECORATION,range:o});else if(n.push({options:e.TOP_STACK_FRAME_DECORATION,range:o}),r.range.endLineNumber&&r.range.endColumn&&n.push({options:{className:"debug-top-stack-frame-range"},range:r.range}),this.modelDataMap.has(t)){var c=this.modelDataMap.get(t)
;c.topStackFrameRange&&c.topStackFrameRange.startLineNumber===r.range.startLineNumber&&c.topStackFrameRange.startColumn!==r.range.startColumn&&n.push({options:e.TOP_STACK_FRAME_INLINE_DECORATION,range:o}),c.topStackFrameRange=o}}else n.push({options:e.FOCUSED_STACK_FRAME_MARGIN,range:s}),r.range.endLineNumber&&r.range.endColumn&&n.push({options:{className:"debug-focused-stack-frame-range"},range:r.range}),n.push({options:e.FOCUSED_STACK_FRAME_DECORATION,range:o});return n},e.prototype.onModelDecorationsChanged=function(e){var t=this.modelDataMap.get(e);if(0!==t.breakpointDecorations.length&&!this.ignoreDecorationsChangedEvent){var n=!1;if(t.breakpointDecorations.forEach(function(e){if(!n){var i=t.model.getDecorationRange(e.decorationId);i&&!e.range.equalsRange(i)&&(n=!0)}}),n){for(var i=Object.create(null),r=this.debugService.getModel().getBreakpoints(),o=t.model.uri,s=function(e,n){var o=t.breakpointDecorations[e],s=t.model.getDecorationRange(o.decorationId);if(s){var a=r.filter(function(e){
return e.getId()===o.modelId}).pop();a&&(i[a.getId()]={lineNumber:s.startLineNumber,column:a.column?s.startColumn:void 0})}},a=0,c=t.breakpointDecorations.length;a<c;a++)s(a);this.debugService.updateBreakpoints(o,i,!0)}}},e.prototype.onBreakpointsChange=function(){var e=this,t=new Map;this.debugService.getModel().getBreakpoints().forEach(function(e){var n=e.uri.toString();t.has(n)?t.get(n).push(e):t.set(n,[e])}),t.forEach(function(n,i){e.modelDataMap.has(i)&&e.updateBreakpoints(e.modelDataMap.get(i),t.get(i))}),this.modelDataMap.forEach(function(n,i){t.has(i)||e.updateBreakpoints(n,[])})},e.prototype.updateBreakpoints=function(e,t){var n,i=this.createBreakpointDecorations(e.model,t);try{this.ignoreDecorationsChangedEvent=!0,n=e.model.deltaDecorations(e.breakpointDecorations.map(function(e){return e.decorationId}),i)}finally{this.ignoreDecorationsChangedEvent=!1}e.breakpointDecorations=n.map(function(e,n){return{decorationId:e,modelId:t[n].getId(),range:i[n].range}})},
e.prototype.createBreakpointDecorations=function(e,t){var n=this,r=[];return t.forEach(function(t){if(t.lineNumber<=e.getLineCount()){var o=e.getLineFirstNonWhitespaceColumn(t.lineNumber),s=e.validateRange(t.column?new i.Range(t.lineNumber,t.column,t.lineNumber,t.column+1):new i.Range(t.lineNumber,o,t.lineNumber,o+1));r.push({options:n.getBreakpointDecorationOptions(t),range:s})}}),r},e.prototype.getBreakpointDecorationOptions=function(t){var n,i=u.getBreakpointMessageAndClassName(this.debugService,this.textFileService,t),r=i.className,o=i.message;if(o)if(t.condition||t.hitCondition){var s=this.modelDataMap.get(t.uri.toString()),a=s?s.model.getLanguageIdentifier().language:"";n=(new c.MarkdownString).appendCodeblock(a,o)}else n=(new c.MarkdownString).appendText(o);return{glyphMarginClassName:r,glyphMarginHoverMessage:n,stickiness:e.STICKINESS,beforeContentClassName:t.column?"debug-breakpoint-column "+r+"-column":void 0}},e.ID="breakpointManager",
e.STICKINESS=r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,e.TOP_STACK_FRAME_MARGIN={glyphMarginClassName:"debug-top-stack-frame",stickiness:e.STICKINESS},e.FOCUSED_STACK_FRAME_MARGIN={glyphMarginClassName:"debug-focused-stack-frame",stickiness:e.STICKINESS},e.TOP_STACK_FRAME_DECORATION={isWholeLine:!0,inlineClassName:"debug-remove-token-colors",className:"debug-top-stack-frame-line",stickiness:e.STICKINESS},e.TOP_STACK_FRAME_EXCEPTION_DECORATION={isWholeLine:!0,inlineClassName:"debug-remove-token-colors",className:"debug-top-stack-frame-exception-line",stickiness:e.STICKINESS},e.TOP_STACK_FRAME_INLINE_DECORATION={beforeContentClassName:"debug-top-stack-frame-column"},e.FOCUSED_STACK_FRAME_DECORATION={isWholeLine:!0,inlineClassName:"debug-remove-token-colors",className:"debug-focused-stack-frame-line",stickiness:e.STICKINESS},e=a([l(0,s.IModelService),l(1,o.IDebugService),l(2,d.ITextFileService)],e)}();t.DebugEditorModelManager=h}),
define(e[534],t([1,0,591,110,4,86,122,109,79,27,9,29,121,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(t,n,i,r,o){void 0===o&&(o=[]);var s=e.call(this,o)||this;return s.label=t,s.launch=n,s.commandService=i,s.contextService=r,s}return n(t,e),t.prototype.getLabel=function(){return this.label},t.prototype.getDescription=function(){return this.contextService.getWorkbenchState()===h.WorkbenchState.WORKSPACE?this.launch.name:""},t.prototype.getAriaLabel=function(){return i.localize(0,null,this.getLabel())},t.prototype.run=function(e,t){return e!==c.Mode.PREVIEW&&(this.commandService.executeCommand("debug.addConfiguration",this.launch.uri.toString()).done(void 0,p.onUnexpectedError),!0)},t}(u.QuickOpenEntry),y=function(e){function t(t,n,i,r,o,s){void 0===s&&(s=[]);var a=e.call(this,s)||this;return a.debugService=t,a.contextService=n,a.notificationService=i,a.launch=r,a.configurationName=o,a}return n(t,e),
t.prototype.getLabel=function(){return this.configurationName},t.prototype.getDescription=function(){return this.contextService.getWorkbenchState()===h.WorkbenchState.WORKSPACE?this.launch.name:""},t.prototype.getAriaLabel=function(){return i.localize(1,null,this.getLabel())},t.prototype.run=function(e,t){var n=this;return!(e===c.Mode.PREVIEW||!g.StartAction.isEnabled(this.debugService,this.contextService,this.configurationName))&&(this.debugService.getConfigurationManager().selectConfiguration(this.launch,this.configurationName),this.debugService.startDebugging(this.launch).done(void 0,function(e){return n.notificationService.error(e)}),!0)},t}(u.QuickOpenEntry),b=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.debugService=t,o.contextService=n,o.commandService=i,o.notificationService=r,o}return n(t,e),t.prototype.getAriaLabel=function(){return i.localize(2,null)},t.prototype.getResults=function(e){
for(var t=this,n=[],s=this.debugService.getConfigurationManager(),a=s.getLaunches(),c=function(i){i.getConfigurationNames().map(function(t){return{config:t,highlights:r.matchesContiguousSubString(e,t)}}).filter(function(e){return!!e.highlights}).forEach(function(e){var r=e.config,o=e.highlights;i===s.selectedConfiguration.launch&&r===s.selectedConfiguration.name&&(t.autoFocusIndex=n.length),n.push(new y(t.debugService,t.contextService,t.notificationService,i,r,o))})},l=0,d=a;l<d.length;l++){c(d[l])}return a.filter(function(e){return!e.hidden}).forEach(function(o,s){var a=t.contextService.getWorkbenchState()===h.WorkbenchState.WORKSPACE?i.localize(3,null,o.name):i.localize(4,null),c=new m(a,o,t.commandService,t.contextService,r.matchesContiguousSubString(e,a));0===s?n.push(new u.QuickOpenEntryGroup(c,void 0,!0)):n.push(c)}),o.TPromise.as(new u.QuickOpenModel(n))},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!!e,autoFocusIndex:this.autoFocusIndex}},t.prototype.getEmptyLabel=function(e){
return e.length>0?i.localize(5,null):i.localize(6,null)},t.ID="workbench.picker.launch",t=a([l(0,d.IDebugService),l(1,h.IWorkspaceContextService),l(2,f.ICommandService),l(3,v.INotificationService)],t)}(s.QuickOpenHandler);t.DebugQuickOpenHandler=b}),define(e[535],t([1,0,593,23,8,4,158,79,121,526,6,49,119,27,28,34,12,65,35,5,46,111,17,533,37,883]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var A=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,p,f){var g=e.call(this,h.VIEWLET_ID,h.VIEWLET_ID+".state",!1,t,n,a,o,c,l,u,s)||this;return g.progressService=i,g.debugService=r,g.configurationService=d,g.keybindingService=p,g.contextViewService=f,g.panelListeners=new Map,g.allActions=[],g.progressRunner=null,g._register(g.debugService.onDidChangeState(function(e){return g.onDebugServiceStateChange(e)})),g._register(g.contextService.onDidChangeWorkbenchState(function(){return g.updateTitleArea()})),
g._register(g.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("debug.toolBarLocation")&&g.updateTitleArea()})),g}return n(t,e),t.prototype.create=function(t){return o(this,void 0,u.TPromise,function(){return s(this,function(n){switch(n.label){case 0:return[4,e.prototype.create.call(this,t)];case 1:return n.sent(),c.addClass(t,"debug-viewlet"),[2]}})})},t.prototype.focus=function(){e.prototype.focus.call(this),this.startDebugActionItem&&this.startDebugActionItem.focus()},Object.defineProperty(t.prototype,"startAction",{get:function(){return this._register(this.instantiationService.createInstance(p.StartAction,p.StartAction.ID,p.StartAction.LABEL))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"configureAction",{get:function(){return this._register(this.instantiationService.createInstance(p.ConfigureAction,p.ConfigureAction.ID,p.ConfigureAction.LABEL))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toggleReplAction",{get:function(){
return this._register(this.instantiationService.createInstance(p.ToggleReplAction,p.ToggleReplAction.ID,p.ToggleReplAction.LABEL))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectAndStartAction",{get:function(){return this._register(this.instantiationService.createInstance(p.SelectAndStartAction,p.SelectAndStartAction.ID,i.localize(0,null)))},enumerable:!0,configurable:!0}),t.prototype.getActions=function(){return this.showInitialDebugActions?[this.startAction,this.configureAction,this.toggleReplAction]:k.DebugActionsWidget.getActions(this.allActions,this.toUnbind,this.debugService,this.keybindingService,this.instantiationService)},Object.defineProperty(t.prototype,"showInitialDebugActions",{get:function(){return this.debugService.state===h.State.Inactive||"docked"!==this.configurationService.getValue("debug").toolBarLocation},enumerable:!0,configurable:!0}),t.prototype.getSecondaryActions=function(){
return this.showInitialDebugActions?[]:[this.selectAndStartAction,this.configureAction,this.toggleReplAction]},t.prototype.getActionItem=function(e){return e.id===p.StartAction.ID?(this.startDebugActionItem=this.instantiationService.createInstance(f.StartDebugActionItem,null,e),this.startDebugActionItem):e.id===p.FocusSessionAction.ID?new f.FocusSessionActionItem(e,this.debugService,this.themeService,this.contextViewService):null},t.prototype.focusView=function(e){var t=this.getView(e);t&&t.focus()},t.prototype.onDebugServiceStateChange=function(e){this.progressRunner&&this.progressRunner.done(),e===h.State.Initializing?this.progressRunner=this.progressService.show(!0):this.progressRunner=null,"docked"===this.configurationService.getValue("debug").toolBarLocation&&this.updateTitleArea()},t.prototype.addPanels=function(t){var n=this;e.prototype.addPanels.call(this,t);for(var i=0,r=t;i<r.length;i++){var o=r[i].panel;o.id===h.BREAKPOINTS_VIEW_ID?(this.breakpointView=o,
this.updateBreakpointsMaxSize()):this.panelListeners.set(o.id,o.onDidChange(function(){return n.updateBreakpointsMaxSize()}))}},t.prototype.removePanels=function(t){e.prototype.removePanels.call(this,t);for(var n=0,i=t;n<i.length;n++){var r=i[n];w.dispose(this.panelListeners.get(r.id)),this.panelListeners.delete(r.id)}},t.prototype.updateBreakpointsMaxSize=function(){var e=this;if(this.breakpointView){var t=this.panels.every(function(t){return!t.isExpanded()||t===e.breakpointView});this.breakpointView.maximumBodySize=t?Number.POSITIVE_INFINITY:this.breakpointView.minimumBodySize}},a([T.memoize],t.prototype,"startAction",null),a([T.memoize],t.prototype,"configureAction",null),a([T.memoize],t.prototype,"toggleReplAction",null),a([T.memoize],t.prototype,"selectAndStartAction",null),
t=a([l(0,I.IPartService),l(1,b.ITelemetryService),l(2,m.IProgressService),l(3,h.IDebugService),l(4,g.IInstantiationService),l(5,y.IWorkspaceContextService),l(6,S.IStorageService),l(7,_.IThemeService),l(8,E.IContextMenuService),l(9,v.IExtensionService),l(10,x.IConfigurationService),l(11,D.IKeybindingService),l(12,E.IContextViewService)],t)}(d.ViewContainerViewlet);t.DebugViewlet=A;var L=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(h.VIEWLET_ID).then(function(e){e.focusView(h.VARIABLES_VIEW_ID)})},t.ID="workbench.debug.action.focusVariablesView",t.LABEL=i.localize(1,null),t=a([l(2,C.IViewletService)],t)}(r.Action);t.FocusVariablesViewAction=L;var R=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(h.VIEWLET_ID).then(function(e){e.focusView(h.WATCH_VIEW_ID)})},
t.ID="workbench.debug.action.focusWatchView",t.LABEL=i.localize(2,null),t=a([l(2,C.IViewletService)],t)}(r.Action);t.FocusWatchViewAction=R;var O=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(h.VIEWLET_ID).then(function(e){e.focusView(h.CALLSTACK_VIEW_ID)})},t.ID="workbench.debug.action.focusCallStackView",t.LABEL=i.localize(3,null),t=a([l(2,C.IViewletService)],t)}(r.Action);t.FocusCallStackViewAction=O;var M=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(h.VIEWLET_ID).then(function(e){e.focusView(h.BREAKPOINTS_VIEW_ID)})},t.ID="workbench.debug.action.focusBreakpointsView",t.LABEL=i.localize(4,null),t=a([l(2,C.IViewletService)],t)}(r.Action);t.FocusBreakpointsViewAction=M}),
define(e[1514],t([1,0,602,18,8,4,9,158,79,142,35,6,31,37,242,121,271,27,58,21,17,41,15,62,36]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=o.$,A=function(e){function t(t,n,s,a,l,d,f,g){var v=e.call(this,c({},t,{ariaHeaderLabel:i.localize(0,null)}),a,n,f)||this;return v.options=t,v.debugService=s,v.instantiationService=l,v.editorService=d,v.settings=t.viewletSettings,v.callStackItemType=h.CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(g),v.onCallStackChangeScheduler=new r.RunOnceScheduler(function(){var e=v.debugService.getModel(),t=v.debugService.getModel().getSessions();if(!v.debugService.getViewModel().isMultiSessionView()&&t.length){var n=t[0].getAllThreads();e=1===n.length?n[0]:t[0]}e instanceof p.Thread&&e.stoppedDetails?(v.pauseMessageLabel.textContent=e.stoppedDetails.description||i.localize(1,null,e.stoppedDetails.reason),e.stoppedDetails.text&&(v.pauseMessageLabel.title=e.stoppedDetails.text),
o.toggleClass(v.pauseMessageLabel,"exception","exception"===e.stoppedDetails.reason),v.pauseMessage.hidden=!1):v.pauseMessage.hidden=!0,v.needsRefresh=!1,(v.tree.getInput()===e?v.tree.refresh():v.tree.setInput(e)).done(function(){return v.updateTreeSelection()},u.onUnexpectedError)},50),v}return n(t,e),t.prototype.renderHeaderTitle=function(e){var t=o.append(e,D(".title.debug-call-stack-title"));o.append(t,D("span")).textContent=this.options.title,this.pauseMessage=o.append(t,D("span.pause-message")),this.pauseMessage.hidden=!0,this.pauseMessageLabel=o.append(this.pauseMessage,D("span.label"))},t.prototype.renderBody=function(e){var t=this;o.addClass(e,"debug-call-stack"),this.treeContainer=y.renderViewTree(e);var n=new R(this.debugService,this.keybindingService,this.instantiationService),r=this.instantiationService.createInstance(L,n,v.MenuId.DebugCallStackContext,{});this.tree=this.instantiationService.createInstance(C.WorkbenchTree,this.treeContainer,{dataSource:new O,
renderer:this.instantiationService.createInstance(M),accessibilityProvider:this.instantiationService.createInstance(P),controller:r},{ariaLabel:i.localize(2,null),twistiePixels:y.twistiePixels});var s=new C.TreeResourceNavigator(this.tree);this.disposables.push(s),this.disposables.push(s.openResource(function(e){if(!t.ignoreSelectionChangedEvent){var n=e.element;if(n instanceof p.StackFrame&&(t.debugService.focusStackFrame(n,n.thread,n.thread.session,!0),n.openInEditor(t.editorService,e.editorOptions.preserveFocus,e.sideBySide,e.editorOptions.pinned).done(void 0,u.onUnexpectedError)),n instanceof p.Thread&&t.debugService.focusStackFrame(void 0,n,n.session,!0),n instanceof p.Session&&t.debugService.focusStackFrame(void 0,void 0,n,!0),n instanceof p.ThreadAndSessionIds){var i=t.debugService.getModel().getSessions().filter(function(e){return e.getId()===n.sessionId}).pop(),r=i&&i.getThread(n.threadId);r&&r.fetchCallStack().done(function(){return t.tree.refresh()},u.onUnexpectedError)}}})),
this.disposables.push(this.tree.onDidChangeFocus(function(){var e=t.tree.getFocus();e instanceof p.StackFrame?t.callStackItemType.set("stackFrame"):e instanceof p.Thread?t.callStackItemType.set("thread"):e instanceof p.Session?t.callStackItemType.set("session"):t.callStackItemType.reset()})),this.disposables.push(this.debugService.getModel().onDidChangeCallStack(function(){t.isVisible()?t.onCallStackChangeScheduler.isScheduled()||t.onCallStackChangeScheduler.schedule():t.needsRefresh=!0})),this.disposables.push(this.debugService.getViewModel().onDidFocusStackFrame(function(){t.isVisible?t.updateTreeSelection().done(void 0,u.onUnexpectedError):t.needsRefresh=!0})),this.debugService.state===h.State.Stopped&&this.onCallStackChangeScheduler.schedule()},t.prototype.layoutBody=function(t){this.treeContainer&&(this.treeContainer.style.height=t+"px"),e.prototype.layoutBody.call(this,t)},t.prototype.updateTreeSelection=function(){var e=this;if(!this.tree.getInput())return s.TPromise.as(null)
;var t=this.debugService.getViewModel().focusedStackFrame,n=this.debugService.getViewModel().focusedThread,i=this.debugService.getViewModel().focusedSession,r=function(t){e.ignoreSelectionChangedEvent=!0;try{e.tree.setSelection([t])}finally{e.ignoreSelectionChangedEvent=!1}};return n?this.tree.expandAll([n.session,n]).then(function(){return t?(r(t),e.tree.reveal(t)):s.TPromise.as(null)}):i?(r(i),this.tree.reveal(i)):(this.tree.clearSelection(),s.TPromise.as(null))},t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){t&&n.needsRefresh&&n.onCallStackChangeScheduler.schedule()})},t.prototype.shutdown=function(){this.settings[t.MEMENTO]=!this.isExpanded(),e.prototype.shutdown.call(this)},t.MEMENTO="callstackview.memento",t=a([l(1,f.IContextMenuService),l(2,h.IDebugService),l(3,m.IKeybindingService),l(4,g.IInstantiationService),l(5,E.IEditorService),l(6,w.IConfigurationService),l(7,T.IContextKeyService)],t)}(d.TreeViewsViewletPanel);t.CallStackView=A
;var L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getContext=function(e){return e instanceof p.StackFrame?e.source.inMemory?e.source.raw.path||e.source.reference:e.source.uri.toString():e instanceof p.Thread?e.threadId:void 0},t}(y.BaseDebugController),R=function(){function e(e,t,n){this.debugService=e,this.keybindingService=t,this.instantiationService=n}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return s.TPromise.as([])},e.prototype.hasSecondaryActions=function(e,t){return t!==e.getInput()},e.prototype.getSecondaryActions=function(e,t){var n=[];if(t instanceof p.Session)n.push(this.instantiationService.createInstance(b.RestartAction,b.RestartAction.ID,b.RestartAction.LABEL)),n.push(new b.StopAction(b.StopAction.ID,b.StopAction.LABEL,this.debugService,this.keybindingService));else if(t instanceof p.Thread){
t.stopped?(n.push(new b.ContinueAction(b.ContinueAction.ID,b.ContinueAction.LABEL,this.debugService,this.keybindingService)),n.push(new b.StepOverAction(b.StepOverAction.ID,b.StepOverAction.LABEL,this.debugService,this.keybindingService)),n.push(new b.StepIntoAction(b.StepIntoAction.ID,b.StepIntoAction.LABEL,this.debugService,this.keybindingService)),n.push(new b.StepOutAction(b.StepOutAction.ID,b.StepOutAction.LABEL,this.debugService,this.keybindingService))):n.push(new b.PauseAction(b.PauseAction.ID,b.PauseAction.LABEL,this.debugService,this.keybindingService)),n.push(new I.Separator),n.push(new b.TerminateThreadAction(b.TerminateThreadAction.ID,b.TerminateThreadAction.LABEL,this.debugService,this.keybindingService))}else t instanceof p.StackFrame&&(t.thread.session.raw.capabilities.supportsRestartFrame&&n.push(new b.RestartFrameAction(b.RestartFrameAction.ID,b.RestartFrameAction.LABEL,this.debugService,this.keybindingService)),
n.push(new S.CopyStackTraceAction(S.CopyStackTraceAction.ID,S.CopyStackTraceAction.LABEL)));return s.TPromise.as(n)},e.prototype.getActionItem=function(e,t,n){return null},e}(),O=function(){function e(){}return e.prototype.getId=function(e,t){return"string"==typeof t?t:t.getId()},e.prototype.hasChildren=function(e,t){return t instanceof p.Model||t instanceof p.Session||t instanceof p.Thread&&t.stopped},e.prototype.getChildren=function(e,t){if(t instanceof p.Thread)return this.getThreadChildren(t);if(t instanceof p.Model)return s.TPromise.as(t.getSessions());var n=t;return s.TPromise.as(n.getAllThreads())},e.prototype.getThreadChildren=function(e){var t=e.getCallStack(),n=s.TPromise.as(null);return t&&t.length||(n=e.fetchCallStack().then(function(){return t=e.getCallStack()})),n.then(function(){return 1===t.length&&e.session.raw.capabilities.supportsDelayedStackTraceLoading&&(t=t.concat(e.getStaleCallStack().slice(1))),
e.stoppedDetails&&e.stoppedDetails.framesErrorMessage&&(t=t.concat([e.stoppedDetails.framesErrorMessage])),e.stoppedDetails&&e.stoppedDetails.totalFrames>t.length&&t.length>1&&(t=t.concat([new p.ThreadAndSessionIds(e.session.getId(),e.threadId)])),t})},e.prototype.getParent=function(e,t){return s.TPromise.as(null)},e}(),M=function(){function e(e,t){this.contextService=e,this.environmentService=t}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(t,n){return n instanceof p.Session?e.SESSION_TEMPLATE_ID:n instanceof p.Thread?e.THREAD_TEMPLATE_ID:n instanceof p.StackFrame?e.STACK_FRAME_TEMPLATE_ID:"string"==typeof n?e.ERROR_TEMPLATE_ID:e.LOAD_MORE_TEMPLATE_ID},e.prototype.renderTemplate=function(t,n,i){if(n===e.SESSION_TEMPLATE_ID){var r=Object.create(null);return r.session=o.append(i,D(".session")),r.name=o.append(r.session,D(".name")),r.state=o.append(r.session,D(".state")),r.stateLabel=o.append(r.state,D("span.label")),r}if(n===e.LOAD_MORE_TEMPLATE_ID){
var s=Object.create(null);return s.label=o.append(i,D(".load-more")),s}if(n===e.ERROR_TEMPLATE_ID){var a=Object.create(null);return a.label=o.append(i,D(".error")),a}if(n===e.THREAD_TEMPLATE_ID){var c=Object.create(null);return c.thread=o.append(i,D(".thread")),c.name=o.append(c.thread,D(".name")),c.state=o.append(c.thread,D(".state")),c.stateLabel=o.append(c.state,D("span.label")),c}var l=Object.create(null);l.stackFrame=o.append(i,D(".stack-frame")),l.label=o.append(l.stackFrame,D("span.label.expression")),l.file=o.append(l.stackFrame,D(".file")),l.fileName=o.append(l.file,D("span.file-name"));var u=o.append(l.file,D("span.line-number-wrapper"));return l.lineNumber=o.append(u,D("span.line-number")),l},e.prototype.renderElement=function(t,n,i,r){i===e.SESSION_TEMPLATE_ID?this.renderSession(n,r):i===e.THREAD_TEMPLATE_ID?this.renderThread(n,r):i===e.STACK_FRAME_TEMPLATE_ID?this.renderStackFrame(n,r):i===e.ERROR_TEMPLATE_ID?this.renderError(n,r):i===e.LOAD_MORE_TEMPLATE_ID&&this.renderLoadMore(r)},
e.prototype.renderSession=function(e,t){t.session.title=i.localize(3,null),t.name.textContent=e.getName(this.contextService.getWorkbenchState()===_.WorkbenchState.WORKSPACE);var n=e.getAllThreads().filter(function(e){return e.stopped}).pop();t.stateLabel.textContent=n?i.localize(4,null):i.localize(5,null)},e.prototype.renderThread=function(e,t){t.thread.title=i.localize(6,null),t.name.textContent=e.name,e.stopped?t.stateLabel.textContent=e.stoppedDetails.description||e.stoppedDetails.reason?i.localize(7,null,e.stoppedDetails.reason):i.localize(8,null):t.stateLabel.textContent=i.localize(9,null)},e.prototype.renderError=function(e,t){t.label.textContent=e,t.label.title=e},e.prototype.renderLoadMore=function(e){e.label.textContent=i.localize(10,null)},e.prototype.renderStackFrame=function(e,t){o.toggleClass(t.stackFrame,"disabled",!e.source.available||"deemphasize"===e.source.presentationHint),o.toggleClass(t.stackFrame,"label","label"===e.presentationHint),
o.toggleClass(t.stackFrame,"subtle","subtle"===e.presentationHint);var n=e.source.raw.path||e.source.name;t.file.title=x.getPathLabel(n,this.environmentService),e.source.raw.origin&&(t.file.title+="\n"+e.source.raw.origin),t.label.textContent=e.name,t.label.title=e.name,t.fileName.textContent=e.getSpecificSourceName(),void 0!==e.range.startLineNumber?(t.lineNumber.textContent=""+e.range.startLineNumber,e.range.startColumn&&(t.lineNumber.textContent+=":"+e.range.startColumn),o.removeClass(t.lineNumber,"unavailable")):o.addClass(t.lineNumber,"unavailable")},e.prototype.disposeTemplate=function(e,t,n){},e.THREAD_TEMPLATE_ID="thread",e.STACK_FRAME_TEMPLATE_ID="stackFrame",e.ERROR_TEMPLATE_ID="error",e.LOAD_MORE_TEMPLATE_ID="loadMore",e.SESSION_TEMPLATE_ID="session",e=a([l(0,_.IWorkspaceContextService),l(1,k.IEnvironmentService)],e)}(),P=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){
return t instanceof p.Thread?i.localize(11,null,t.name):t instanceof p.StackFrame?i.localize(12,null,t.name,t.range.startLineNumber,t.getSpecificSourceName()):null},e}()}),define(e[1515],t([1,0,607,5,7,70,14,136,10,11,20,30,9,83,4,128,15,90,38,49,6,33,42,28,34,79,1136,142,528,121,1387,201,216,96,65,81,46,48,17,27,21,461,263,348,310,154,100,22,23,62,18,76,24]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z,J,ee){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var te="debug.breakpointactivated",ne=function(){function e(e,t,n,i,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S){this.storageService=e,this.editorService=t,this.textFileService=n,this.viewletService=i,this.panelService=o,this.notificationService=s,this.dialogService=a,this.partService=c,this.windowService=l,this.broadcastService=u,this.telemetryService=d,this.contextService=h,this.lifecycleService=f,this.instantiationService=g,this.extensionService=v,this.markerService=m,this.taskService=y,
this.fileService=b,this.configurationService=S,this.toDispose=[],this.toDisposeOnSessionEnd=new Map,this.breakpointsToSendOnResourceSaved=new Set,this._onDidChangeState=new r.Emitter,this._onDidNewSession=new r.Emitter,this._onDidEndSession=new r.Emitter,this._onDidCustomEvent=new r.Emitter,this.sessionStates=new Map,this.allSessions=new Map,this.fetchThreadsSchedulers=new Map,this.configurationManager=this.instantiationService.createInstance(R.ConfigurationManager),this.toDispose.push(this.configurationManager),this.inDebugMode=x.CONTEXT_IN_DEBUG_MODE.bindTo(p),this.debugType=x.CONTEXT_DEBUG_TYPE.bindTo(p),this.debugState=x.CONTEXT_DEBUG_STATE.bindTo(p),this.model=new D.Model(this.loadBreakpoints(),this.storageService.getBoolean(te,T.StorageScope.WORKSPACE,!0),this.loadFunctionBreakpoints(),this.loadExceptionBreakpoints(),this.loadWatchExpressions()),this.toDispose.push(this.model),this.viewModel=new A.ViewModel(p),this.firstSessionStart=!0,this.registerListeners()}
return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.fileService.onFileChanges(function(t){return e.onFileChanges(t)})),this.lifecycleService.onShutdown(this.store,this),this.lifecycleService.onShutdown(this.dispose,this),this.toDispose.push(this.broadcastService.onBroadcast(this.onBroadcast,this)),this.toDispose.push(this.viewModel.onDidFocusSession(function(t){var n=t?t.getId():void 0;e.model.setBreakpointsSessionId(n)}))},e.prototype.onBroadcast=function(e){var t=this.allSessions.get(e.payload.debugId);if(t){var r=t.raw;if(e.channel!==K.EXTENSION_ATTACH_BROADCAST_CHANNEL)if(e.channel!==K.EXTENSION_TERMINATE_BROADCAST_CHANNEL){if(e.channel===K.EXTENSION_LOG_BROADCAST_CHANNEL){var s=e.payload.logEntry,a="warn"===s.severity?g.default.Warning:"error"===s.severity?g.default.Error:g.default.Info,c=G.parse(s),l=c.args,u=c.stack,d=void 0;if(u){var h=G.getFirstFrame(u);h&&(d={column:h.column,lineNumber:h.line,source:t.getSource({name:o.basenameOrAuthority(h.uri),path:h.uri.fsPath})})}
for(var f=[],v=0;v<l.length;v++){var m=l[v];if(void 0===m)f.push("undefined");else if(null===m)f.push("null");else if(p.isObject(m)||Array.isArray(m))f.length&&(this.logToRepl(f.join(" "),a,d),f=[]),this.logToRepl(new D.RawObjectReplElement(m.prototype,m,void 0,n.localize(0,null)),a,d);else if("string"==typeof m){for(var y="",b=0,S=m.length;b<S;b++)"%"!==m[b]||"s"!==m[b+1]&&"i"!==m[b+1]&&"d"!==m[b+1]?y+=m[b]:(v++,y+=p.isUndefinedOrNull(l[v])?"":l[v],b++);f.push(y)}else f.push(m)}f.length&&this.logToRepl(f.join(" ")+"\n",a,d)}}else this.onRawSessionEnd(r);else{var _="launch"===t.configuration.request;if(t.configuration.request="attach",t.configuration.port=e.payload.port,_){var C=r.root;i.dispose(this.toDisposeOnSessionEnd[r.getId()]),this.initializeRawSession(C,{resolved:t.configuration,unresolved:t.unresolvedConfiguration},t.getId(),t).then(function(e){e.raw.attach(e.configuration)})}else this.onRawSessionEnd(r),this.doCreateSession(t.raw.root,{resolved:t.configuration,unresolved:t.unresolvedConfiguration
},t.getId())}}},e.prototype.tryToAutoFocusStackFrame=function(e){var t=e.getCallStack();if(!t.length||this.viewModel.focusedStackFrame&&this.viewModel.focusedStackFrame.thread.getId()===e.getId())return v.TPromise.as(null);var i=h.first(t,function(e){return e.source&&e.source.available},void 0);return i?(this.focusStackFrame(i),e.stoppedDetails&&("openOnDebugBreak"===this.configurationService.getValue("debug").openDebug&&this.viewletService.openViewlet(x.VIEWLET_ID).done(void 0,f.onUnexpectedError),this.windowService.focusWindow(),m.alert(n.localize(1,null,e.stoppedDetails.reason,i.source?i.source.name:"",i.range.startLineNumber))),i.openInEditor(this.editorService,!0)):v.TPromise.as(null)},e.prototype.registerSessionListeners=function(e,t){var i=this;this.toDisposeOnSessionEnd.get(t.getId()).push(t),this.toDisposeOnSessionEnd.get(t.getId()).push(t.onDidInitialize(function(r){m.status(n.localize(2,null));var o=function(){
if(t&&t.capabilities.supportsConfigurationDoneRequest)return t.configurationDone().done(null,function(e){t&&t.disconnect().done(null,f.onUnexpectedError),i.notificationService.error(e.message)})};i.sendAllBreakpoints(e).then(o,o).done(function(){return i.fetchThreads(t)},f.onUnexpectedError)})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidStop(function(n){i.updateStateAndEmit(e.getId(),x.State.Stopped),i.fetchThreads(t,n.body).done(function(){var t=e&&e.getThread(n.body.threadId);t&&i.model.fetchCallStack(t).then(function(){return n.body.preserveFocusHint?void 0:i.tryToAutoFocusStackFrame(t)})},f.onUnexpectedError)})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidThread(function(n){if("started"===n.body.reason){var r=i.fetchThreadsSchedulers.get(e.getId());r||(r=new Z.RunOnceScheduler(function(){i.fetchThreads(t).done(void 0,f.onUnexpectedError)},100),i.fetchThreadsSchedulers.set(e.getId(),r),i.toDisposeOnSessionEnd.get(e.getId()).push(r)),r.isScheduled()||r.schedule()
}else"exited"===n.body.reason&&i.model.clearThreads(e.getId(),!0,n.body.threadId)})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidTerminateDebugee(function(r){m.status(n.localize(3,null)),e&&e.getId()===r.sessionId&&(r.body&&r.body.restart&&e?i.restartSession(e,r.body.restart).done(null,function(e){return i.notificationService.error(e.message)}):t.disconnect().done(null,f.onUnexpectedError))})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidContinued(function(t){var n=!1!==t.body.allThreadsContinued?void 0:t.body.threadId;i.model.clearThreads(e.getId(),!1,n),i.viewModel.focusedSession.getId()===e.getId()&&i.focusStackFrame(void 0,i.viewModel.focusedThread,i.viewModel.focusedSession),i.updateStateAndEmit(e.getId(),x.State.Running)}));var r=[];this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidOutput(function(n){if(n.body){var o="stderr"===n.body.category?g.default.Error:"console"===n.body.category?g.default.Warning:g.default.Info;if("telemetry"!==n.body.category){
var s=r.slice(),a=n.body.source?{lineNumber:n.body.line,column:n.body.column?n.body.column:1,source:e.getSource(n.body.source)}:void 0;if(n.body.variablesReference){var l=new D.ExpressionContainer(e,n.body.variablesReference,c.generateUuid());r.push(l.getChildren().then(function(e){return v.TPromise.join(s).then(function(){return e.forEach(function(e){e.name=null,i.logToRepl(e,o,a)})})}))}else"string"==typeof n.body.output&&v.TPromise.join(s).then(function(){return i.logToRepl(n.body.output,o,a)});v.TPromise.join(r).then(function(){return r=[]})}else t.customTelemetryService&&i.telemetryService.isOptedIn&&t.customTelemetryService.publicLog(n.body.output,n.body.data)}})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidBreakpoint(function(t){var n,r,o,s=t.body&&t.body.breakpoint?t.body.breakpoint.id:void 0,a=i.model.getBreakpoints().filter(function(e){return e.idFromAdapter===s}).pop(),c=i.model.getFunctionBreakpoints().filter(function(e){return e.idFromAdapter===s}).pop()
;if("new"===t.body.reason&&t.body.breakpoint.source){var l=e.getSource(t.body.breakpoint.source),u=i.model.addBreakpoints(l.uri,[{column:t.body.breakpoint.column,enabled:!0,lineNumber:t.body.breakpoint.line}],!1);1===u.length&&i.model.updateBreakpoints((n={},n[u[0].getId()]=t.body.breakpoint,n))}"removed"===t.body.reason&&(a&&i.model.removeBreakpoints([a]),c&&i.model.removeFunctionBreakpoints(c.getId())),"changed"===t.body.reason&&(a&&(a.column||(t.body.breakpoint.column=void 0),i.model.setBreakpointSessionData(e.getId(),(r={},r[a.getId()]=t.body.breakpoint,r))),c&&i.model.setBreakpointSessionData(e.getId(),(o={},o[c.getId()]=t.body.breakpoint,o)))})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidExitAdapter(function(n){s.equalsIgnoreCase(e.configuration.type,"extensionhost")&&i.sessionStates.get(e.getId())===x.State.Running&&e&&e.raw.root&&e.configuration.noDebug&&i.broadcastService.broadcast({channel:K.EXTENSION_CLOSE_EXTHOST_BROADCAST_CHANNEL,payload:[e.raw.root.uri.fsPath]}),
e&&e.getId()===n.sessionId&&i.onRawSessionEnd(t)})),this.toDisposeOnSessionEnd.get(e.getId()).push(t.onDidCustomEvent(function(e){i._onDidCustomEvent.fire(e)}))},e.prototype.fetchThreads=function(e,t){var n=this;return e.threads().then(function(i){i&&i.body&&i.body.threads&&i.body.threads.forEach(function(i){n.model.rawUpdate({sessionId:e.getId(),threadId:i.id,thread:i,stoppedDetails:t&&i.id===t.threadId?t:void 0})})})},e.prototype.loadBreakpoints=function(){var e;try{e=JSON.parse(this.storageService.get("debug.breakpoint",T.StorageScope.WORKSPACE,"[]")).map(function(e){return new D.Breakpoint(u.default.parse(e.uri.external||e.source.uri.external),e.lineNumber,e.column,e.enabled,e.condition,e.hitCondition,e.logMessage,e.adapterData)})}catch(e){}return e||[]},e.prototype.loadFunctionBreakpoints=function(){var e;try{e=JSON.parse(this.storageService.get("debug.functionbreakpoint",T.StorageScope.WORKSPACE,"[]")).map(function(e){
return new D.FunctionBreakpoint(e.name,e.enabled,e.hitCondition,e.condition,e.logMessage)})}catch(e){}return e||[]},e.prototype.loadExceptionBreakpoints=function(){var e;try{e=JSON.parse(this.storageService.get("debug.exceptionbreakpoint",T.StorageScope.WORKSPACE,"[]")).map(function(e){return new D.ExceptionBreakpoint(e.filter,e.label,e.enabled)})}catch(e){}return e||[]},e.prototype.loadWatchExpressions=function(){var e;try{e=JSON.parse(this.storageService.get("debug.watchexpressions",T.StorageScope.WORKSPACE,"[]")).map(function(e){return new D.Expression(e.name,e.id)})}catch(e){}return e||[]},Object.defineProperty(e.prototype,"state",{get:function(){var e=this.viewModel.focusedThread;if(e&&e.stopped)return x.State.Stopped;var t=this.viewModel.focusedSession;return t&&this.sessionStates.has(t.getId())?this.sessionStates.get(t.getId()):this.sessionStates.size>0?x.State.Initializing:x.State.Inactive},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeState",{get:function(){
return this._onDidChangeState.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidNewSession",{get:function(){return this._onDidNewSession.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidEndSession",{get:function(){return this._onDidEndSession.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidCustomEvent",{get:function(){return this._onDidCustomEvent.event},enumerable:!0,configurable:!0}),e.prototype.updateStateAndEmit=function(e,t){e&&(t===x.State.Inactive?this.sessionStates.delete(e):this.sessionStates.set(e,t));var n=this.state;if(this.previousState!==n){var i=x.State[n];i&&this.debugState.set(i.toLowerCase()),this.previousState=n,this._onDidChangeState.fire(n)}},e.prototype.focusStackFrame=function(e,t,n,i){if(!n)if(e||t)n=e?e.thread.session:t.session;else{var r=this.model.getSessions();n=r.length?r[0]:void 0}if(!t)if(e)t=e.thread;else{var o=n?n.getAllThreads():void 0;t=o&&o.length?o[0]:void 0}if(!e&&t){
var s=t.getCallStack();e=s&&s.length?s[0]:null}this.viewModel.setFocus(e,t,n,i),this.updateStateAndEmit()},e.prototype.enableOrDisableBreakpoints=function(e,t){return t?(this.model.setEnablement(t,e),t instanceof D.Breakpoint?this.sendBreakpoints(t.uri):t instanceof D.FunctionBreakpoint?this.sendFunctionBreakpoints():this.sendExceptionBreakpoints()):(this.model.enableOrDisableAllBreakpoints(e),this.sendAllBreakpoints())},e.prototype.addBreakpoints=function(e,t){var i=this.model.addBreakpoints(e,t);return i.forEach(function(t){return m.status(n.localize(4,null,t.lineNumber,e.fsPath))}),this.sendBreakpoints(e).then(function(){return i})},e.prototype.updateBreakpoints=function(e,t,n){this.model.updateBreakpoints(t),n?this.breakpointsToSendOnResourceSaved.add(e.toString()):this.sendBreakpoints(e)},e.prototype.removeBreakpoints=function(e){var t=this,i=this.model.getBreakpoints().filter(function(t){return!e||t.getId()===e});i.forEach(function(e){return m.status(n.localize(5,null,e.lineNumber,e.uri.fsPath))})
;var r=h.distinct(i,function(e){return e.uri.toString()}).map(function(e){return e.uri});return this.model.removeBreakpoints(i),v.TPromise.join(r.map(function(e){return t.sendBreakpoints(e)}))},e.prototype.setBreakpointsActivated=function(e){return this.model.setBreakpointsActivated(e),this.sendAllBreakpoints()},e.prototype.addFunctionBreakpoint=function(e,t){var n=this.model.addFunctionBreakpoint(e||"",t);this.viewModel.setSelectedFunctionBreakpoint(n)},e.prototype.renameFunctionBreakpoint=function(e,t){return this.model.renameFunctionBreakpoint(e,t),this.sendFunctionBreakpoints()},e.prototype.removeFunctionBreakpoints=function(e){return this.model.removeFunctionBreakpoints(e),this.sendFunctionBreakpoints()},e.prototype.addReplExpression=function(e){var t=this;return this.model.addReplExpression(this.viewModel.focusedSession,this.viewModel.focusedStackFrame,e).then(function(){return t.focusStackFrame(t.viewModel.focusedStackFrame,t.viewModel.focusedThread,t.viewModel.focusedSession)})},
e.prototype.removeReplExpressions=function(){this.model.removeReplExpressions()},e.prototype.logToRepl=function(e,t,i){void 0===t&&(t=g.default.Info);"string"==typeof e&&e.indexOf("")>=0&&(this.model.removeReplExpressions(),this.model.appendToRepl(n.localize(6,null),g.default.Ignore),e=e.substr(e.indexOf("")+"".length)),this.model.appendToRepl(e,t,i)},e.prototype.addWatchExpression=function(e){var t=this.model.addWatchExpression(e);this.viewModel.setSelectedExpression(t)},e.prototype.renameWatchExpression=function(e,t){return this.model.renameWatchExpression(e,t)},e.prototype.moveWatchExpression=function(e,t){this.model.moveWatchExpression(e,t)},e.prototype.removeWatchExpressions=function(e){this.model.removeWatchExpressions(e)},e.prototype.startDebugging=function(e,t,i,r){var o=this;void 0===i&&(i=!1);var s=c.generateUuid();this.updateStateAndEmit(s,x.State.Initializing);var a=function(){o.sessionStates.get(s)===x.State.Initializing&&o.updateStateAndEmit(s,x.State.Inactive)}
;return this.extensionService.activateByEvent("onDebug").then(function(){return o.textFileService.saveAll().then(function(){return o.configurationService.reloadConfiguration(e?e.workspace:void 0).then(function(){return o.extensionService.whenInstalledExtensionsRegistered().then(function(){0===o.model.getSessions().length&&(o.removeReplExpressions(),o.allSessions.clear());var a,c;if(t||(t=o.configurationManager.selectedConfiguration.name),"string"==typeof t&&e){a=e.getConfiguration(t),c=e.getCompound(t);var l=o.model.getSessions(),u=n.localize(7,null,t);if(l.some(function(n){return!(n.getName(!1)!==t||e&&e.workspace&&n.raw.root&&n.raw.root.uri.toString()!==e.workspace.uri.toString())}))return v.TPromise.wrapError(new Error(u));if(c&&c.configurations&&l.some(function(e){return-1!==c.configurations.indexOf(e.getName(!1))}))return v.TPromise.wrapError(new Error(u))}else"string"!=typeof t&&(a=t);if(c)return c.configurations?v.TPromise.join(c.configurations.map(function(t){var s="string"==typeof t?t:t.name
;if(s===c.name)return v.TPromise.as(null);var a;if("string"==typeof t){var l=o.configurationManager.getLaunches().filter(function(e){return!!e.getConfiguration(s)});if(1===l.length)a=l[0];else{if(!(l.length>1&&l.indexOf(e)>=0))return v.TPromise.wrapError(new Error(0===l.length?n.localize(9,null,s):n.localize(10,null,s)));a=e}}else if(t.folder){var u=o.configurationManager.getLaunches().filter(function(e){return e.workspace&&e.workspace.name===t.folder&&!!e.getConfiguration(t.name)});if(1!==u.length)return v.TPromise.wrapError(new Error(n.localize(11,null,t.folder,t.name,c.name)));a=u[0]}return o.startDebugging(a,s,i,r)})):v.TPromise.wrapError(new Error(n.localize(8,null)));if(t&&!a){var d=e?n.localize(12,null,t):n.localize(13,null);return v.TPromise.wrapError(new Error(d))}var h;return a?h=a.type:a={},r=r||ee.deepClone(a),i&&(a.noDebug=!0),(h?v.TPromise.as(null):o.configurationManager.guessDebugger().then(function(e){return h=e&&e.type})).then(function(){
return o.configurationManager.resolveConfigurationByProviders(e&&e.workspace?e.workspace.uri:void 0,h,a).then(function(t){return t&&t.type?o.createSession(e,t,r,s):e&&h?e.openConfigFile(!1,h).done(void 0,f.onUnexpectedError):void 0})}).then(function(){})})})})}).then(function(){return a()},function(e){return a(),v.TPromise.wrapError(e)})},e.prototype.substituteVariables=function(e,t){var n=this,i=this.configurationManager.getDebugger(t.type);if(i){var r=void 0;if(e&&e.workspace)r=e.workspace;else{var o=this.contextService.getWorkspace().folders;1===o.length&&(r=o[0])}return i.substituteVariables(r,t).then(function(e){return e},function(e){n.showError(e.message)})}return v.TPromise.as(t)},e.prototype.createSession=function(e,t,i,r){var o=this;return this.textFileService.saveAll().then(function(){return o.substituteVariables(e,t).then(function(s){if(s){if(!o.configurationManager.getDebugger(s.type)||"attach"!==t.request&&"launch"!==t.request){var a=void 0
;return a="attach"!==t.request&&"launch"!==t.request?t.request?n.localize(14,null,"request",t.request):n.localize(15,null,"request"):s.type?n.localize(16,null,s.type):n.localize(17,null),o.showError(a)}o.toDisposeOnSessionEnd.set(r,[]);var c=e?e.workspace:void 0;return o.runTask(r,c,s.preLaunchTask,s,i,function(){return o.doCreateSession(c,{resolved:s,unresolved:i},r)})}},function(t){return t&&t.message?o.showError(t.message):o.contextService.getWorkbenchState()===z.WorkbenchState.EMPTY?o.showError(n.localize(18,null)):e&&e.openConfigFile(!1).then(function(e){})})})},e.prototype.initializeRawSession=function(e,t,n,i){var r=this,o=this.configurationManager.getDebugger(t.resolved.type);return o.getCustomTelemetryService().then(function(s){var a=r.instantiationService.createInstance(k.RawDebugSession,n,t.resolved.debugServer,o,s,e);return i?i.raw=a:(i=r.model.addSession(t,a),r.allSessions.set(i.getId(),i)),r.registerSessionListeners(i,a),a.initialize({clientID:"vscode",clientName:J.default.nameLong,
adapterID:t.resolved.type,pathFormat:"path",linesStartAt1:!0,columnsStartAt1:!0,supportsVariableType:!0,supportsVariablePaging:!0,supportsRunInTerminalRequest:!0,locale:d.locale}).then(function(e){return r.model.setExceptionBreakpoints(a.capabilities.exceptionBreakpointFilters),i})})},e.prototype.doCreateSession=function(e,t,n){var i=this,r=t.resolved;r.__sessionId=n,this.inDebugMode.set(!0);var o=this.configurationManager.getDebugger(r.type);return this.initializeRawSession(e,t,n).then(function(t){var n=t.raw;return("attach"===r.request?n.attach(r):n.launch(r)).then(function(s){if(n.disconnected)return v.TPromise.as(null);i.focusStackFrame(void 0,void 0,t),i._onDidNewSession.fire(t);var a=r.internalConsoleOptions||i.configurationService.getValue("debug").internalConsoleOptions;("openOnSessionStart"===a||i.firstSessionStart&&"openOnFirstSessionStart"===a)&&i.panelService.openPanel(x.REPL_ID,!1).done(void 0,f.onUnexpectedError);var c=i.configurationService.getValue("debug").openDebug
;return("openOnSessionStart"===c||"openOnFirstSessionStart"===c&&i.firstSessionStart)&&i.viewletService.openViewlet(x.VIEWLET_ID),i.firstSessionStart=!1,i.debugType.set(r.type),i.model.getSessions().length>1&&i.viewModel.setMultiSessionView(!0),i.updateStateAndEmit(n.getId(),x.State.Running),i.telemetryService.publicLog("debugSessionStart",{type:r.type,breakpointCount:i.model.getBreakpoints().length,exceptionBreakpoints:i.model.getExceptionBreakpoints(),watchExpressionsCount:i.model.getWatchExpressions().length,extensionName:o.extensionDescription.id,isBuiltin:o.extensionDescription.isBuiltin,launchJsonExists:e&&!!i.configurationService.getValue("launch",{resource:e.uri})})}).then(function(){return t},function(e){if(f.isPromiseCanceledError(e))return v.TPromise.as(null);var o=e instanceof Error?e.message:e;i.telemetryService.publicLog("debugMisconfiguration",{type:r?r.type:void 0,error:o}),i.updateStateAndEmit(n.getId(),x.State.Inactive),
n.disconnected?t&&i.model.removeSession(t.getId()):n.disconnect().done(null,f.onUnexpectedError),i.model.getReplElements().length>0&&i.panelService.openPanel(x.REPL_ID,!1).done(void 0,f.onUnexpectedError),0===i.model.getReplElements().length&&i.inDebugMode.reset(),i.showError(o,f.isErrorWithActions(e)?e.actions:[])})})},e.prototype.showError=function(e,t){void 0===t&&(t=[]);var i=this.instantiationService.createInstance(L.ConfigureAction,L.ConfigureAction.ID,L.ConfigureAction.LABEL);return t.push(i),this.dialogService.show(g.default.Error,e,t.map(function(e){return e.label}).concat(n.localize(19,null)),{cancelId:t.length}).then(function(e){return e<t.length?t[e].run():v.TPromise.as(null)})},e.prototype.runTask=function(e,t,i,r,o,s){var a=this,c=new X.Action("debug.debugAnyway",n.localize(20,null),void 0,!0,function(){return a.doCreateSession(t,{resolved:r,unresolved:o},e)});return this.doRunTask(e,t,i).then(function(e){
var t=r.preLaunchTask?a.markerService.getStatistics().errors:0,i=e&&0===e.exitCode,o=e&&void 0!==e.exitCode&&0!==e.exitCode;if(i||0===t&&!o)return s();var l=t>1?n.localize(21,null,r.preLaunchTask):1===t?n.localize(22,null,r.preLaunchTask):n.localize(23,null,r.preLaunchTask,e.exitCode),u=new X.Action("debug.showErrors",n.localize(24,null),void 0,!0,function(){return a.panelService.openPanel(O.default.MARKERS_PANEL_ID).then(function(){})});return a.showError(l,[c,u])},function(e){return a.showError(e.message,[c,a.taskService.configureAction()])})},e.prototype.doRunTask=function(e,t,i){var r=this;return!i||this.skipRunningTask?(this.skipRunningTask=!1,v.TPromise.as(null)):this.taskService.getTask(t,i).then(function(t){function o(e,t){return function(n,i,r){void 0===i&&(i=null);var o=t(function(t){if(t.kind===e)return o.dispose(),n.call(i,t)},null,r);return o}}if(!t){var s="string"==typeof i?n.localize(25,null,i):n.localize(26,null);return v.TPromise.wrapError(f.create(s))}
var a=!1,c=r.taskService.getActiveTasks().then(function(n){if(n.filter(function(e){return e._id===t._id}).length)return v.TPromise.as(null);r.toDisposeOnSessionEnd.get(e).push(o(q.TaskEventKind.Active,r.taskService.onDidStateChange)(function(){a=!0}));var i=r.taskService.run(t);return t.isBackground?new v.TPromise(function(t,n){return r.toDisposeOnSessionEnd.get(e).push(o(q.TaskEventKind.Inactive,r.taskService.onDidStateChange)(function(){return t(null)}))}):i});return new v.TPromise(function(e,t){c.then(function(t){a=!0,e(t)},function(e){return t(e)}),setTimeout(function(){if(!a){var e="string"==typeof i?n.localize(27,null):n.localize(28,null,i);t({severity:g.default.Error,message:e})}},1e4)})})},e.prototype.sourceIsNotAvailable=function(e){this.model.sourceIsNotAvailable(e)},e.prototype.restartSession=function(e,t){var n=this;return this.textFileService.saveAll().then(function(){var i=e.unresolvedConfiguration
;if(e.raw.capabilities.supportsRestartRequest)return n.runTask(e.getId(),e.raw.root,e.configuration.postDebugTask,e.configuration,i,function(){return e.raw.custom("restart",null)});var r=n.viewModel.focusedSession,o=r&&e.getId()===r.getId();return n.skipRunningTask=!!t,e.raw.disconnect(!0).then(function(){return s.equalsIgnoreCase(e.configuration.type,"extensionHost")&&e.raw.root?n.broadcastService.broadcast({channel:K.EXTENSION_RELOAD_BROADCAST_CHANNEL,payload:[e.raw.root.uri.fsPath]}):new v.TPromise(function(r,o){setTimeout(function(){var s=e.configuration,a=e.raw.root?n.configurationManager.getLaunch(e.raw.root.uri):void 0;if(a){var c=a.getConfiguration(e.configuration.name);c&&!ee.equals(c,i)&&((s=c).type=e.configuration.type,s.noDebug=e.configuration.noDebug)}s.__restart=t,n.skipRunningTask=!!t,n.startDebugging(a,s,s.noDebug,i).then(function(){return r(null)},function(e){return o(e)})},300)})}).then(function(){if(o){var t=n.model.getSessions().filter(function(t){
return t.configuration.name===e.configuration.name}).pop();t&&t!==n.viewModel.focusedSession&&n.focusStackFrame(void 0,void 0,t)}})})},e.prototype.stopSession=function(e){if(e)return e.raw.disconnect(!1,!0);var t=this.model.getSessions();if(t.length)return v.TPromise.join(t.map(function(e){return e.raw.disconnect(!1,!0)}));this.sessionStates.clear(),this._onDidChangeState.fire()},e.prototype.onRawSessionEnd=function(e){var t=this,n=this.model.getBreakpoints(),r=this.model.getSessions().filter(function(t){return t.getId()===e.getId()}).pop();this.telemetryService.publicLog("debugSessionStop",{type:r&&r.configuration.type,success:e.emittedStopped||0===n.length,sessionLengthInSeconds:e.getLengthInSeconds(),breakpointCount:n.length,watchExpressionsCount:this.model.getWatchExpressions().length}),this.model.removeSession(e.getId()),r&&(this._onDidEndSession.fire(r),r.configuration.postDebugTask&&this.doRunTask(r.getId(),r.raw.root,r.configuration.postDebugTask).done(void 0,function(e){
return t.notificationService.error(e)})),i.dispose(this.toDisposeOnSessionEnd.get(e.getId()));var o=this.viewModel.focusedSession;o&&o.getId()===e.getId()&&this.focusStackFrame(null),this.updateStateAndEmit(e.getId(),x.State.Inactive),0===this.model.getSessions().length&&(this.inDebugMode.reset(),this.debugType.reset(),this.viewModel.setMultiSessionView(!1),this.partService.isVisible(W.Parts.SIDEBAR_PART)&&this.configurationService.getValue("debug").openExplorerOnEnd&&this.viewletService.openViewlet(P.VIEWLET_ID).done(null,f.onUnexpectedError))},e.prototype.getModel=function(){return this.model},e.prototype.getViewModel=function(){return this.viewModel},e.prototype.getConfigurationManager=function(){return this.configurationManager},e.prototype.sendAllBreakpoints=function(e){var t=this;return v.TPromise.join(h.distinct(this.model.getBreakpoints(),function(e){return e.uri.toString()}).map(function(n){return t.sendBreakpoints(n.uri,!1,e)})).then(function(){return t.sendFunctionBreakpoints(e)}).then(function(){
return t.sendExceptionBreakpoints(e)})},e.prototype.sendBreakpoints=function(e,t,n){var i=this;void 0===t&&(t=!1);return this.sendToOneOrAllSessions(n,function(n){var r=n.raw;if(!r.readyForBreakpoints)return v.TPromise.as(null);var o,s=i.model.getBreakpoints({uri:e,enabledOnly:!0}),a=n.getSourceForUri(e);if(a)o=a.raw;else{var c=j.Source.getEncodedDebugData(e);o={name:c.name,path:c.path,sourceReference:c.sourceReference}}return s.length&&!o.adapterData&&(o.adapterData=s[0].adapterData),o.path=Q.normalizeDriveLetter(o.path),r.setBreakpoints({source:o,lines:s.map(function(e){return e.lineNumber}),breakpoints:s.map(function(e){return{line:e.lineNumber,column:e.column,condition:e.condition,hitCondition:e.hitCondition,logMessage:e.logMessage}}),sourceModified:t}).then(function(e){if(e&&e.body){for(var t=Object.create(null),n=0;n<s.length;n++)t[s[n].getId()]=e.body.breakpoints[n];i.model.setBreakpointSessionData(r.getId(),t)}})})},e.prototype.sendFunctionBreakpoints=function(e){var t=this
;return this.sendToOneOrAllSessions(e,function(e){var n=e.raw;if(!n.readyForBreakpoints||!n.capabilities.supportsFunctionBreakpoints)return v.TPromise.as(null);var i=t.model.getFunctionBreakpoints().filter(function(e){return e.enabled&&t.model.areBreakpointsActivated()});return n.setFunctionBreakpoints({breakpoints:i}).then(function(e){if(e&&e.body){for(var r=Object.create(null),o=0;o<i.length;o++)r[i[o].getId()]=e.body.breakpoints[o];t.model.setBreakpointSessionData(n.getId(),r)}})})},e.prototype.sendExceptionBreakpoints=function(e){var t=this;return this.sendToOneOrAllSessions(e,function(e){var n=e.raw;if(!n.readyForBreakpoints||0===t.model.getExceptionBreakpoints().length)return v.TPromise.as(null);var i=t.model.getExceptionBreakpoints().filter(function(e){return e.enabled});return n.setExceptionBreakpoints({filters:i.map(function(e){return e.filter})})})},e.prototype.sendToOneOrAllSessions=function(e,t){return e?t(e):v.TPromise.join(this.model.getSessions().map(function(e){return t(e)
})).then(function(){})},e.prototype.onFileChanges=function(e){var t=this,n=this.model.getBreakpoints().filter(function(t){return e.contains(t.uri,E.FileChangeType.DELETED)});n.length&&this.model.removeBreakpoints(n),e.getUpdated().forEach(function(e){t.breakpointsToSendOnResourceSaved.delete(e.resource.toString())&&t.sendBreakpoints(e.resource,!0).done(null,f.onUnexpectedError)})},e.prototype.store=function(){var e=this.model.getBreakpoints();e.length?this.storageService.store("debug.breakpoint",JSON.stringify(e),T.StorageScope.WORKSPACE):this.storageService.remove("debug.breakpoint",T.StorageScope.WORKSPACE),this.model.areBreakpointsActivated()?this.storageService.remove(te,T.StorageScope.WORKSPACE):this.storageService.store(te,"false",T.StorageScope.WORKSPACE);var t=this.model.getFunctionBreakpoints();t.length?this.storageService.store("debug.functionbreakpoint",JSON.stringify(t),T.StorageScope.WORKSPACE):this.storageService.remove("debug.functionbreakpoint",T.StorageScope.WORKSPACE)
;var n=this.model.getExceptionBreakpoints();n.length?this.storageService.store("debug.exceptionbreakpoint",JSON.stringify(n),T.StorageScope.WORKSPACE):this.storageService.remove("debug.exceptionbreakpoint",T.StorageScope.WORKSPACE);var i=this.model.getWatchExpressions();i.length?this.storageService.store("debug.watchexpressions",JSON.stringify(i.map(function(e){return{name:e.name,id:e.getId()}})),T.StorageScope.WORKSPACE):this.storageService.remove("debug.watchexpressions",T.StorageScope.WORKSPACE)},e.prototype.dispose=function(){this.toDisposeOnSessionEnd.forEach(function(e){return i.dispose(e)}),this.toDispose=i.dispose(this.toDispose)},
e=a([l(0,T.IStorageService),l(1,H.IEditorService),l(2,B.ITextFileService),l(3,N.IViewletService),l(4,F.IPanelService),l(5,Y.INotificationService),l(6,$.IDialogService),l(7,W.IPartService),l(8,w.IWindowService),l(9,U.IBroadcastService),l(10,I.ITelemetryService),l(11,z.IWorkspaceContextService),l(12,y.IContextKeyService),l(13,S.ILifecycleService),l(14,C.IInstantiationService),l(15,_.IExtensionService),l(16,b.IMarkerService),l(17,M.ITaskService),l(18,E.IFileService),l(19,V.IConfigurationService)],e)}();t.DebugService=ne}),define(e[1516],t([1,0,611,4,5,9,14,41,8,83,142,242,121,271,6,21,424,1107,62,36]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=d.$,w=function(){function e(){}return e.prototype.getId=function(e,t){return t.getId()},e.prototype.hasChildren=function(e,t){return t instanceof p.Model||t.hasChildren},e.prototype.getChildren=function(e,t){
return t instanceof p.Model?r.TPromise.as(t.getReplElements()):t instanceof p.RawObjectReplElement?t.getChildren():t instanceof p.SimpleReplElement?r.TPromise.as(null):t.getChildren()},e.prototype.getParent=function(e,t){return r.TPromise.as(null)},e}();t.ReplExpressionsDataSource=w;var I=function(){function e(e,t,n){this.editorService=e,this.instantiationService=t,this.environmentService=n,this.linkDetector=this.instantiationService.createInstance(b.LinkDetector)}return e.prototype.getHeight=function(t,n){if(n instanceof p.Variable&&(n.hasChildren||null!==n.name))return e.LINE_HEIGHT_PX;if(n instanceof p.Expression&&n.hasChildren)return 2*e.LINE_HEIGHT_PX;var i=this.width;return n instanceof p.SimpleReplElement&&n.sourceData&&(i-=(n.sourceData.source.name+":"+n.sourceData.lineNumber).length*this.characterWidth),this.getHeightForString(n.value,i)+(n instanceof p.Expression?this.getHeightForString(n.name,i):0)},e.prototype.getHeightForString=function(t,n){var i=this
;if(!t||!t.length||!n||n<=0||!this.characterWidth||this.characterWidth<=0)return e.LINE_HEIGHT_PX;c.endsWith(t,"\n")&&(t=t.substr(0,t.length-1));var r=c.removeAnsiEscapeCodes(t).split("\n"),o=r.reduce(function(e,t){for(var r=0,o=0;o<t.length;o++)r+=c.isFullWidthCharacter(t.charCodeAt(o))?2:1;return e+Math.floor(r*i.characterWidth/n)},r.length);return e.LINE_HEIGHT_PX*o},e.prototype.setWidth=function(e,t){this.width=e,this.characterWidth=t},e.prototype.getTemplateId=function(t,n){return n instanceof p.Variable&&n.name?e.VARIABLE_TEMPLATE_ID:n instanceof p.Expression?e.EXPRESSION_TEMPLATE_ID:n instanceof p.SimpleReplElement||n instanceof p.Variable&&!n.name?e.SIMPLE_REPL_ELEMENT_TEMPLATE_ID:n instanceof p.RawObjectReplElement?e.RAW_OBJECT_REPL_ELEMENT_TEMPLATE_ID:null},e.prototype.renderTemplate=function(t,n,i){var r=this;if(n===e.VARIABLE_TEMPLATE_ID){return(c=Object.create(null)).expression=d.append(i,E(".expression")),c.name=d.append(c.expression,E("span.name")),
c.value=d.append(c.expression,E("span.value")),c}if(n===e.EXPRESSION_TEMPLATE_ID){c=Object.create(null);return d.addClass(i,"input-output-pair"),c.input=d.append(i,E(".input.expression")),c.output=d.append(i,E(".output.expression")),c.value=d.append(c.output,E("span.value")),c.annotation=d.append(c.output,E("span")),c}if(n===e.SIMPLE_REPL_ELEMENT_TEMPLATE_ID){var o=Object.create(null);d.addClass(i,"output");var a=d.append(i,E(".output.expression.value-and-source"));return o.container=i,o.value=d.append(a,E("span.value")),o.source=d.append(a,E(".source")),o.toDispose=[],o.toDispose.push(d.addDisposableListener(o.source,"click",function(e){e.preventDefault(),e.stopPropagation();var t=o.getReplElementSource();t&&t.source.openInEditor(r.editorService,{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:t.lineNumber,endColumn:t.column}).done(void 0,s.onUnexpectedError)})),o}if(n===e.RAW_OBJECT_REPL_ELEMENT_TEMPLATE_ID){var c=Object.create(null);return d.addClass(i,"output"),c.container=i,
c.expression=d.append(i,E(".output.expression")),c.name=d.append(c.expression,E("span.name")),c.value=d.append(c.expression,E("span.value")),c.annotation=d.append(c.expression,E("span")),c}},e.prototype.renderElement=function(t,n,i,r){i===e.VARIABLE_TEMPLATE_ID?f.renderVariable(n,r,!1):i===e.EXPRESSION_TEMPLATE_ID?this.renderExpression(t,n,r):i===e.SIMPLE_REPL_ELEMENT_TEMPLATE_ID?this.renderSimpleReplElement(n,r):i===e.RAW_OBJECT_REPL_ELEMENT_TEMPLATE_ID&&this.renderRawObjectReplElement(t,n,r)},e.prototype.renderExpression=function(e,t,n){n.input.textContent=t.name,f.renderExpressionValue(t,n.value,{preserveWhitespace:!t.hasChildren,showHover:!1,colorize:!0}),t.hasChildren&&(n.annotation.className="annotation octicon octicon-info",n.annotation.title=i.localize(0,null))},e.prototype.renderSimpleReplElement=function(e,t){d.clearNode(t.value),t.value.className="value";var n=S.handleANSIOutput(e.value,this.linkDetector);t.value.appendChild(n),
d.addClass(t.value,e.severity===h.default.Warning?"warn":e.severity===h.default.Error?"error":e.severity===h.default.Ignore?"ignore":"info"),t.source.textContent=e.sourceData?e.sourceData.source.name+":"+e.sourceData.lineNumber:"",t.source.title=e.sourceData?_.getPathLabel(e.sourceData.source.uri,this.environmentService):"",t.getReplElementSource=function(){return e.sourceData}},e.prototype.renderRawObjectReplElement=function(e,t,n){t.name?n.name.textContent=t.name+":":n.name.textContent="",f.renderExpressionValue(t.value,n.value,{preserveWhitespace:!0,showHover:!1}),t.annotation?(n.annotation.className="annotation octicon octicon-info",n.annotation.title=t.annotation):(n.annotation.className="",n.annotation.title="")},e.prototype.disposeTemplate=function(e,t,n){n.toDispose&&o.dispose(n.toDispose)},e.VARIABLE_TEMPLATE_ID="variable",e.EXPRESSION_TEMPLATE_ID="expressionRepl",e.SIMPLE_REPL_ELEMENT_TEMPLATE_ID="simpleReplElement",e.RAW_OBJECT_REPL_ELEMENT_TEMPLATE_ID="rawObject",e.LINE_HEIGHT_PX=18,
e=a([l(0,y.IEditorService),l(1,m.IInstantiationService),l(2,C.IEnvironmentService)],e)}();t.ReplExpressionsRenderer=I;var T=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof p.Variable?i.localize(1,null,t.name,t.value):t instanceof p.Expression?i.localize(2,null,t.name,t.value):t instanceof p.SimpleReplElement?i.localize(3,null,t.value):t instanceof p.RawObjectReplElement?i.localize(4,null,t.name,t.value):null},e}();t.ReplExpressionsAccessibilityProvider=T;var x=function(){function e(e,t){this.instantiationService=e,this.toFocus=t}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return r.TPromise.as([])},e.prototype.hasSecondaryActions=function(e,t){return!0},e.prototype.getSecondaryActions=function(e,t){var n=[];return n.push(new v.CopyAction(v.CopyAction.ID,v.CopyAction.LABEL)),n.push(new v.CopyAllAction(v.CopyAllAction.ID,v.CopyAllAction.LABEL,e)),n.push(new g.ReplCollapseAllAction(e,this.toFocus)),n.push(new u.Separator),
n.push(this.instantiationService.createInstance(g.ClearReplAction,g.ClearReplAction.ID,g.ClearReplAction.LABEL)),r.TPromise.as(n)},e.prototype.getActionItem=function(e,t,n){return null},e}();t.ReplExpressionsActionProvider=x;var k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastSelectedString=null,t}return n(t,e),t.prototype.onLeftClick=function(t,n,i,r){void 0===r&&(r="mouse");var o=i;(n.reference>0||n instanceof p.RawObjectReplElement&&n.hasChildren)&&-1===o.target.className.indexOf("input expression")&&(e.prototype.onLeftClick.call(this,t,n,i,r),t.clearFocus(),t.deselect(n));var s=window.getSelection();return"Range"===s.type&&this.lastSelectedString!==s.toString()||this.toFocusOnClick.focus(),this.lastSelectedString=s.toString(),!0},t.prototype.onContextMenu=function(t,n,i){return e.prototype.onContextMenu.call(this,t,n,i,!1)},t}(f.BaseDebugController);t.ReplExpressionsController=k}),
define(e[536],t([1,0,610,10,18,4,9,8,11,168,284,44,32,47,31,137,15,28,6,34,1516,468,121,108,81,12,103,58,111,5,117,55,157,79,410,185,887]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var B=u.$,V={twistiePixels:20,ariaLabel:i.localize(0,null)},z="debug.repl.history",H=_.createDecorator("privateReplService"),K=function(e){function t(n,i,r,o,s,a,c,l){var u=e.call(this,N.REPL_ID,i,a)||this;return u.debugService=n,u.instantiationService=r,u.storageService=o,u.panelService=s,u.themeService=a,u.modelService=c,u.contextKeyService=l,u.replInputHeight=t.REPL_INPUT_INITIAL_HEIGHT,u.history=new F.HistoryNavigator(JSON.parse(u.storageService.get(z,C.StorageScope.WORKSPACE,"[]")),50),u.registerListeners(),u}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.debugService.getModel().onDidChangeReplElements(function(){
e.refreshReplElements(0===e.debugService.getModel().getReplElements().length)})),this.toUnbind.push(this.panelService.onDidPanelOpen(function(t){return e.refreshReplElements(!0)}))},t.prototype.refreshReplElements=function(e){var n=this;if(this.tree&&this.isVisible()){if(this.refreshTimeoutHandle)return;var i=e?0:t.REFRESH_DELAY;this.refreshTimeoutHandle=setTimeout(function(){n.refreshTimeoutHandle=null;var e=n.tree.getScrollPosition();n.tree.refresh().then(function(){1===e&&n.tree.setScrollPosition(1)},c.onUnexpectedError)},i)}},t.prototype.create=function(t){e.prototype.create.call(this,t),this.container=u.append(t,B(".repl")),this.treeContainer=u.append(this.container,B(".repl-tree")),this.createReplInput(this.container),this.renderer=this.instantiationService.createInstance(E.ReplExpressionsRenderer);var n=this.instantiationService.createInstance(E.ReplExpressionsController,new E.ReplExpressionsActionProvider(this.instantiationService,this.replInput),m.MenuId.DebugConsoleContext,{
openMode:O.OpenMode.SINGLE_CLICK,clickBehavior:O.ClickBehavior.ON_MOUSE_UP});return n.toFocusOnClick=this.replInput,this.tree=this.instantiationService.createInstance(A.WorkbenchTree,this.treeContainer,{dataSource:new E.ReplExpressionsDataSource,renderer:this.renderer,accessibilityProvider:new E.ReplExpressionsAccessibilityProvider,controller:n},V),this.tree.setInput(this.debugService.getModel())},t.prototype.setVisible=function(t){return t?(this.model=this.modelService.createModel("",null,r.default.parse(N.DEBUG_SCHEME+":replinput"),!0),this.replInput.setModel(this.model)):R.dispose(this.model),e.prototype.setVisible.call(this,t)},t.prototype.createReplInput=function(e){var n=this;this.replInputContainer=u.append(e,B(".repl-input-wrapper"));var i=W.createAndBindHistoryNavigationWidgetScopedContextKeyService(this.contextKeyService,{target:this.replInputContainer,historyNavigator:this}),r=i.scopedContextKeyService,a=i.historyNavigationEnablement;this.historyNavigationEnablement=a,this.toUnbind.push(r),
N.CONTEXT_IN_DEBUG_REPL.bindTo(r).set(!0);var c=this.instantiationService.createChild(new y.ServiceCollection([b.IContextKeyService,r],[H,this]));this.replInput=c.createInstance(P.CodeEditorWidget,this.replInputContainer,w.SimpleDebugEditor.getEditorOptions(),w.SimpleDebugEditor.getCodeEditorWidgetOptions()),f.SuggestRegistry.register({scheme:N.DEBUG_SCHEME,pattern:"**/replinput",hasAccessToAllModels:!0},{triggerCharacters:["."],provideCompletionItems:function(e,t,i,r){n.historyNavigationEnablement.set(!1);var a=n.replInput.getModel().getWordAtPosition(t),c=a?a.word.length:0,l=n.replInput.getModel().getLineContent(t.lineNumber),u=n.debugService.getViewModel().focusedStackFrame,d=u?u.frameId:void 0,h=n.debugService.getViewModel().focusedSession,p=h?h.completions(d,l,t,c):s.TPromise.as([]);return o.wireCancellationToken(r,p.then(function(e){return{suggestions:e}}))}}),this.toUnbind.push(this.replInput.onDidScrollChange(function(e){
e.scrollHeightChanged&&(n.replInputHeight=Math.max(t.REPL_INPUT_INITIAL_HEIGHT,Math.min(t.REPL_INPUT_MAX_HEIGHT,e.scrollHeight,n.dimension.height)),n.layout(n.dimension))})),this.toUnbind.push(this.replInput.onDidChangeModelContent(function(){n.historyNavigationEnablement.set(""===n.replInput.getModel().getValue())})),this.toUnbind.push(u.addStandardDisposableListener(this.replInputContainer,u.EventType.FOCUS,function(){return u.addClass(n.replInputContainer,"synthetic-focus")})),this.toUnbind.push(u.addStandardDisposableListener(this.replInputContainer,u.EventType.BLUR,function(){return u.removeClass(n.replInputContainer,"synthetic-focus")}))},t.prototype.navigateHistory=function(e){var t=e?this.history.previous():this.history.next();t&&(this.replInput.setValue(t),this.replInput.setPosition({lineNumber:1,column:t.length+1}),this.historyNavigationEnablement.set(!0))},t.prototype.showPreviousValue=function(){this.navigateHistory(!0)},t.prototype.showNextValue=function(){this.navigateHistory(!1)},
t.prototype.acceptReplInput=function(){this.debugService.addReplExpression(this.replInput.getValue()),this.history.add(this.replInput.getValue()),this.replInput.setValue(""),this.replInputHeight=t.REPL_INPUT_INITIAL_HEIGHT,this.layout(this.dimension)},t.prototype.getVisibleContent=function(){for(var e="",t=this.tree.getNavigator();t.next();)e&&(e+="\n"),e+=t.current().toString();return e},t.prototype.layout=function(e){if(this.dimension=e,this.tree){this.renderer.setWidth(e.width-25,this.characterWidth);var t=e.height-this.replInputHeight;this.treeContainer.style.height=t+"px",this.tree.layout(t)}this.replInputContainer.style.height=this.replInputHeight+"px",this.replInput.layout({width:e.width-20,height:this.replInputHeight})},Object.defineProperty(t.prototype,"characterWidth",{get:function(){var e=u.append(this.container,B(".surveyor"));e.textContent=t.HALF_WIDTH_TYPICAL;for(var n=0;n<10;n++)e.textContent+=e.textContent;return e.style.fontSize=d.isMacintosh?"12px":"14px",e.clientWidth/e.textContent.length},
enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.replInput.focus()},t.prototype.getActions=function(){var e=this;return this.actions||(this.actions=[this.instantiationService.createInstance(I.ClearReplAction,I.ClearReplAction.ID,I.ClearReplAction.LABEL)],this.actions.forEach(function(t){e.toUnbind.push(t)})),this.actions},t.prototype.shutdown=function(){var e=this.history.getHistory();e.length?this.storageService.store(z,JSON.stringify(e),C.StorageScope.WORKSPACE):this.storageService.remove(z,C.StorageScope.WORKSPACE)},t.prototype.dispose=function(){this.replInput.dispose(),e.prototype.dispose.call(this)},t.HALF_WIDTH_TYPICAL="n",t.REFRESH_DELAY=500,t.REPL_INPUT_INITIAL_HEIGHT=19,t.REPL_INPUT_MAX_HEIGHT=170,a([L.memoize],t.prototype,"characterWidth",null),t=a([l(0,N.IDebugService),l(1,S.ITelemetryService),l(2,_.IInstantiationService),l(3,C.IStorageService),l(4,x.IPanelService),l(5,k.IThemeService),l(6,v.IModelService),l(7,b.IContextKeyService)],t)}(T.Panel);t.Repl=K;var U=function(e){
function t(){return e.call(this,{id:"repl.action.acceptInput",label:i.localize(1,null),alias:"REPL Accept Input",precondition:N.CONTEXT_IN_DEBUG_REPL,kbOpts:{kbExpr:M.EditorContextKeys.textInputFocus,primary:3}})||this}return n(t,e),t.prototype.run=function(e,t){p.SuggestController.get(t).acceptSelectedSuggestion(),e.get(H).acceptReplInput()},t}(g.EditorAction),G=function(e){function t(){return e.call(this,{id:"repl.action.copyAll",label:i.localize(2,null),alias:"Debug Console Copy All",precondition:N.CONTEXT_IN_DEBUG_REPL})||this}return n(t,e),t.prototype.run=function(e,t){D.clipboard.writeText(e.get(H).getVisibleContent())},t}(g.EditorAction);t.ReplCopyAllAction=G,g.registerEditorAction(U),g.registerEditorAction(G);var j=g.EditorCommand.bindToContribution(p.SuggestController.get);g.registerEditorCommand(new j({id:"repl.action.acceptSuggestion",precondition:b.ContextKeyExpr.and(N.CONTEXT_IN_DEBUG_REPL,h.Context.Visible),handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:50,
kbExpr:M.EditorContextKeys.textInputFocus,primary:17}}))}),define(e[537],t([1,0,613,18,8,9,99,158,79,142,35,6,31,37,12,242,4,121,271,41,528,14,58,117,17]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=o.$,A=function(e){function t(t,n,o,a,l,u){var d=e.call(this,c({},t,{ariaHeaderLabel:i.localize(0,null)}),a,n,u)||this;return d.debugService=o,d.instantiationService=l,d.settings=t.viewletSettings,d.expandedElements=[],d.onFocusStackFrameScheduler=new r.RunOnceScheduler(function(){var e=d.tree.getExpandedElements();e.length>0&&(d.expandedElements=e),d.needsRefresh=!1,d.tree.refresh().then(function(){var e=d.debugService.getViewModel().focusedStackFrame;return r.sequence(d.expandedElements.map(function(e){return function(){return d.tree.expand(e)}})).then(function(){if(e&&0===d.tree.getExpandedElements().length)return e.getScopes().then(function(e){if(e.length>0&&!e[0].expensive)return d.tree.expand(e[0])})})
}).done(null,s.onUnexpectedError)},400),d}return n(t,e),t.prototype.renderBody=function(e){var t=this;o.addClass(e,"debug-variables"),this.treeContainer=b.renderViewTree(e),this.tree=this.instantiationService.createInstance(T.WorkbenchTree,this.treeContainer,{dataSource:new R,renderer:this.instantiationService.createInstance(O),accessibilityProvider:new M,controller:this.instantiationService.createInstance(P,new L(this.debugService,this.keybindingService),v.MenuId.DebugVariablesContext,{openMode:x.OpenMode.SINGLE_CLICK,clickBehavior:x.ClickBehavior.ON_MOUSE_UP})},{ariaLabel:i.localize(1,null),twistiePixels:b.twistiePixels}),h.CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService);var n=this.debugService.getViewModel();this.tree.setInput(n);var r=new u.CollapseAction(this.tree,!1,"explorer-action collapse-explorer");this.toolbar.setActions([r])(),this.disposables.push(n.onDidFocusStackFrame(function(e){
t.isVisible()&&t.isExpanded()?!t.tree.getContentHeight()||e.explicit?t.onFocusStackFrameScheduler.schedule(0):t.onFocusStackFrameScheduler.schedule():t.needsRefresh=!0})),this.disposables.push(this.debugService.onDidChangeState(function(e){r.enabled=e===h.State.Running||e===h.State.Stopped})),this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(function(e){e instanceof p.Variable&&t.tree.refresh(e,!1).done(null,s.onUnexpectedError)}))},t.prototype.layoutBody=function(t){this.treeContainer&&(this.treeContainer.style.height=t+"px"),e.prototype.layoutBody.call(this,t)},t.prototype.setExpanded=function(t){e.prototype.setExpanded.call(this,t),t&&this.needsRefresh&&this.onFocusStackFrameScheduler.schedule()},t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){t&&n.needsRefresh&&n.onFocusStackFrameScheduler.schedule()})},t.prototype.shutdown=function(){this.settings[t.MEMENTO]=!this.isExpanded(),e.prototype.shutdown.call(this)},
t.MEMENTO="variablesview.memento",t=a([l(1,f.IContextMenuService),l(2,h.IDebugService),l(3,m.IKeybindingService),l(4,g.IInstantiationService),l(5,k.IConfigurationService)],t)}(d.TreeViewsViewletPanel);t.VariablesView=A;var L=function(){function e(e,t){this.debugService=e,this.keybindingService=t}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return S.TPromise.as([])},e.prototype.hasSecondaryActions=function(e,t){return t instanceof p.Variable&&!!t.value},e.prototype.getSecondaryActions=function(e,t){var n=[],i=t;return n.push(new _.SetValueAction(_.SetValueAction.ID,_.SetValueAction.LABEL,i,this.debugService,this.keybindingService)),n.push(new C.CopyValueAction(C.CopyValueAction.ID,C.CopyValueAction.LABEL,i,this.debugService)),n.push(new C.CopyEvaluatePathAction(C.CopyEvaluatePathAction.ID,C.CopyEvaluatePathAction.LABEL,i)),n.push(new E.Separator),
n.push(new _.AddToWatchExpressionsAction(_.AddToWatchExpressionsAction.ID,_.AddToWatchExpressionsAction.LABEL,i,this.debugService,this.keybindingService)),S.TPromise.as(n)},e.prototype.getActionItem=function(e,t,n){return null},e}(),R=function(){function e(){}return e.prototype.getId=function(e,t){return t.getId()},e.prototype.hasChildren=function(e,t){if(t instanceof w.ViewModel||t instanceof p.Scope)return!0;var n=t;return n.hasChildren&&!I.equalsIgnoreCase(n.value,"null")},e.prototype.getChildren=function(e,t){if(t instanceof w.ViewModel){var n=t.focusedStackFrame;return n?n.getScopes():S.TPromise.as([])}return t.getChildren()},e.prototype.getParent=function(e,t){return S.TPromise.as(null)},e}();t.VariablesDataSource=R;var O=function(){function e(e,t,n){this.debugService=e,this.contextViewService=t,this.themeService=n}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(t,n){
return n instanceof p.Scope?e.SCOPE_TEMPLATE_ID:n instanceof p.Variable?e.VARIABLE_TEMPLATE_ID:null},e.prototype.renderTemplate=function(t,n,i){if(n===e.SCOPE_TEMPLATE_ID){var r=Object.create(null);return r.name=o.append(i,D(".scope")),r}var s=Object.create(null);return s.expression=o.append(i,D(".expression")),s.name=o.append(s.expression,D("span.name")),s.value=o.append(s.expression,D("span.value")),s},e.prototype.renderElement=function(t,n,r,o){if(r===e.SCOPE_TEMPLATE_ID)this.renderScope(n,o);else{var s=n;s===this.debugService.getViewModel().getSelectedExpression()||s.errorMessage?b.renderRenameBox(this.debugService,this.contextViewService,this.themeService,t,s,o.expression,{initialValue:s.value,ariaLabel:i.localize(2,null),validationOptions:{validation:function(e){return s.errorMessage?{content:s.errorMessage}:null}}}):b.renderVariable(s,o,!0)}},e.prototype.renderScope=function(e,t){t.name.textContent=e.name},e.prototype.disposeTemplate=function(e,t,n){},e.SCOPE_TEMPLATE_ID="scope",
e.VARIABLE_TEMPLATE_ID="variable",e=a([l(0,h.IDebugService),l(1,f.IContextViewService),l(2,y.IThemeService)],e)}();t.VariablesRenderer=O;var M=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof p.Scope?i.localize(3,null,t.name):t instanceof p.Variable?i.localize(4,null,t.name,t.value):null},e}(),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.onLeftClick=function(t,n,i){var r=this.debugService.getViewModel().focusedSession;if(n instanceof p.Variable&&2===i.detail&&r&&r.raw.capabilities.supportsSetVariable){var o=n;return this.debugService.getViewModel().setSelectedExpression(o),!0}return e.prototype.onLeftClick.call(this,t,n,i)},t}(b.BaseDebugController)}),define(e[1519],t([1,0,606,5,4,101,8,117,19,45,142,242,537,129,68,26,58,17,66,318]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=c.$,w=function(){function e(e,t,n,i){this.editor=e,
this.debugService=t,this.instantiationService=n,this.themeService=i,this.allowEditorOverflow=!0,this.toDispose=[],this._isVisible=!1,this.showAtPosition=null,this.highlightDecorations=[]}return e.prototype.create=function(){var e=this;this.domNode=E(".debug-hover-widget"),this.complexValueContainer=c.append(this.domNode,E(".complex-value")),this.complexValueTitle=c.append(this.complexValueContainer,E(".title")),this.treeContainer=c.append(this.complexValueContainer,E(".debug-hover-tree")),this.treeContainer.setAttribute("role","tree"),this.tree=this.instantiationService.createInstance(b.WorkbenchTree,this.treeContainer,{dataSource:new g.VariablesDataSource,renderer:this.instantiationService.createInstance(T),controller:this.instantiationService.createInstance(I,this.editor)},{indentPixels:6,twistiePixels:15,ariaLabel:i.localize(0,null)}),this.valueContainer=E(".value"),this.valueContainer.tabIndex=0,this.valueContainer.setAttribute("role","tooltip"),
this.scrollbar=new v.DomScrollableElement(this.valueContainer,{horizontal:s.ScrollbarVisibility.Hidden}),this.domNode.appendChild(this.scrollbar.getDomNode()),this.toDispose.push(this.scrollbar),this.editor.applyFontInfo(this.domNode),this.toDispose.push(m.attachStylerCallback(this.themeService,{editorHoverBackground:y.editorHoverBackground,editorHoverBorder:y.editorHoverBorder},function(t){t.editorHoverBackground?e.domNode.style.backgroundColor=t.editorHoverBackground.toString():e.domNode.style.backgroundColor=null,t.editorHoverBorder?e.domNode.style.border="1px solid "+t.editorHoverBorder:e.domNode.style.border=null})),this.registerListeners(),this.editor.addContentWidget(this)},e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.tree.onDidExpandItem(function(){e.layoutTree()})),this.toDispose.push(this.tree.onDidCollapseItem(function(){e.layoutTree()})),this.toDispose.push(c.addStandardDisposableListener(this.domNode,"keydown",function(t){t.equals(9)&&e.hide()})),
this.toDispose.push(this.editor.onDidChangeConfiguration(function(t){t.fontInfo&&e.editor.applyFontInfo(e.domNode)}))},e.prototype.isVisible=function(){return this._isVisible},e.prototype.getId=function(){return e.ID},e.prototype.getDomNode=function(){return this.domNode},e.prototype.showAt=function(t,n){var i=this,r=t.getStartPosition(),s=this.debugService.getViewModel().focusedSession,a=this.editor.getModel().getLineContent(r.lineNumber),c=C.getExactExpressionStartAndEnd(a,t.startColumn,t.endColumn),l=c.start,u=c.end,h=a.substring(l-1,u);if(!h)return o.TPromise.as(this.hide());var f;if(s.raw.capabilities.supportsEvaluateForHovers){var g=new p.Expression(h);f=g.evaluate(s,this.debugService.getViewModel().focusedStackFrame,"hover").then(function(){return g})}else f=this.findExpressionInStackFrame(h.split(".").map(function(e){return e.trim()}).filter(function(e){return!!e}));return f.then(function(t){
if(!(!t||t instanceof p.Expression&&!t.available))return i.highlightDecorations=i.editor.deltaDecorations(i.highlightDecorations,[{range:new d.Range(r.lineNumber,l,r.lineNumber,l+h.length),options:e._HOVER_HIGHLIGHT_DECORATION_OPTIONS}]),i.doShow(r,t,n);i.hide()})},e.prototype.doFindExpression=function(e,t){var n=this;return e?e.getChildren().then(function(e){var i=e.filter(function(e){return t[0]===e.name});return 1!==i.length?null:1===t.length?i[0]:n.doFindExpression(i[0],t.slice(1))}):o.TPromise.as(null)},e.prototype.findExpressionInStackFrame=function(e){var t=this;return this.debugService.getViewModel().focusedStackFrame.getScopes().then(function(e){return e.filter(function(e){return!e.expensive})}).then(function(n){return o.TPromise.join(n.map(function(n){return t.doFindExpression(n,e)}))}).then(function(e){return e.filter(function(e){return!!e})}).then(function(e){return e.length>0&&e.every(function(t){return t.value===e[0].value})?e[0]:null})},e.prototype.doShow=function(e,t,n,i){var r=this
;return void 0===i&&(i=!1),this.domNode||this.create(),this.showAtPosition=e,this._isVisible=!0,this.stoleFocus=n,!t.hasChildren||i?(this.complexValueContainer.hidden=!0,this.valueContainer.hidden=!1,f.renderExpressionValue(t,this.valueContainer,{showChanged:!1,preserveWhitespace:!0,colorize:!0}),this.valueContainer.title="",this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode(),n&&(this.editor.render(),this.valueContainer.focus()),o.TPromise.as(null)):(this.valueContainer.hidden=!0,this.complexValueContainer.hidden=!1,this.tree.setInput(t).then(function(){r.complexValueTitle.textContent=t.value,r.complexValueTitle.title=t.value,r.layoutTree(),r.editor.layoutContentWidget(r),r.scrollbar.scanDomNode(),n&&(r.editor.render(),r.tree.domFocus())}))},e.prototype.layoutTree=function(){for(var e=this.tree.getNavigator(),t=0;e.next();)t++;if(0===t)this.doShow(this.showAtPosition,this.tree.getInput(),!1,!0);else{var n=18*Math.min(t,18)
;this.treeContainer.clientHeight!==n&&(this.treeContainer.style.height=n+"px",this.tree.layout())}},e.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this.editor.deltaDecorations(this.highlightDecorations,[]),this.highlightDecorations=[],this.editor.layoutContentWidget(this),this.stoleFocus&&this.editor.focus())},e.prototype.getPosition=function(){return this._isVisible?{position:this.showAtPosition,preference:[h.ContentWidgetPositionPreference.ABOVE,h.ContentWidgetPositionPreference.BELOW]}:null},e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose)},e.ID="debug.hoverWidget",e._HOVER_HIGHLIGHT_DECORATION_OPTIONS=_.ModelDecorationOptions.register({className:"hoverHighlight"}),e}();t.DebugHoverWidget=w;var I=function(e){function t(t,n){var i=e.call(this,{openMode:u.OpenMode.SINGLE_CLICK},n)||this;return i.editor=t,i}return n(t,e),t.prototype.onLeftClick=function(t,n,i,r){return void 0===r&&(r="mouse"),n.reference>0&&(e.prototype.onLeftClick.call(this,t,n,i,r),t.clearFocus(),
t.deselect(n),this.editor.focus()),!0},t=a([l(1,S.IConfigurationService)],t)}(b.WorkbenchTreeController),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getHeight=function(e,t){return 18},t}(g.VariablesRenderer)}),define(e[1520],t([1,0,605,9,4,18,5,11,89,83,23,237,45,32,57,71,19,6,28,17,29,15,35,1519,121,79,1344,1219,196,12,39,256,20,37,267,111,100,382]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var V=/launch\.json$/,z="inlinevaluedecoration",H=function(){function e(e,t,n,i,r,o,s,a,c,l,u,d){this.editor=e,this.debugService=t,this.contextMenuService=n,this.instantiationService=i,this.commandService=o,this.codeEditorService=s,this.telemetryService=a,this.configurationService=c,this.keybindingService=u,this.dialogService=d,this.breakpointHintDecoration=[],this.hoverWidget=new I.DebugHoverWidget(this.editor,this.debugService,this.instantiationService,l),
this.toDispose=[],this.registerListeners(),this.breakpointWidgetVisible=x.CONTEXT_BREAKPOINT_WIDGET_VISIBLE.bindTo(r),this.updateConfigurationWidgetVisibility(),this.codeEditorService.registerDecorationType(z,{}),this.toggleExceptionWidget()}return e.prototype.getContextMenuActions=function(e,t,i){var o=this,s=[];if(1===e.length){var a=e[0].logMessage?n.localize(0,null):n.localize(1,null);s.push(new T.RemoveBreakpointAction(T.RemoveBreakpointAction.ID,n.localize(2,null,a),this.debugService,this.keybindingService)),s.push(new h.Action("workbench.debug.action.editBreakpointAction",n.localize(3,null,a),void 0,!0,function(){return r.TPromise.as(o.editor.getContribution(x.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(e[0].lineNumber,e[0].column))})),s.push(new h.Action("workbench.debug.viewlet.action.toggleBreakpoint",e[0].enabled?n.localize(4,null,a):n.localize(5,null,a),void 0,!0,function(){return o.debugService.enableOrDisableBreakpoints(!e[0].enabled,e[0])}))}else if(e.length>1){
var c=e.slice().sort(function(e,t){return e.column-t.column});s.push(new N.ContextSubMenu(n.localize(6,null),c.map(function(e){return new h.Action("removeInlineBreakpoint",e.column?n.localize(7,null,e.column):n.localize(8,null),null,!0,function(){return o.debugService.removeBreakpoints(e.getId())})}))),s.push(new N.ContextSubMenu(n.localize(9,null),c.map(function(e){return new h.Action("editBreakpoint",e.column?n.localize(10,null,e.column):n.localize(11,null),null,!0,function(){return r.TPromise.as(o.editor.getContribution(x.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(e.lineNumber,e.column))})}))),s.push(new N.ContextSubMenu(n.localize(12,null),c.map(function(e){return new h.Action(e.enabled?"disableColumnBreakpoint":"enableColumnBreakpoint",e.enabled?e.column?n.localize(13,null,e.column):n.localize(14,null):e.column?n.localize(15,null,e.column):n.localize(16,null),null,!0,function(){return o.debugService.enableOrDisableBreakpoints(!e.enabled,e)})})))
}else s.push(new h.Action("addBreakpoint",n.localize(17,null),null,!0,function(){return o.debugService.addBreakpoints(t,[{lineNumber:i}])})),s.push(new h.Action("addConditionalBreakpoint",n.localize(18,null),null,!0,function(){return r.TPromise.as(o.editor.getContribution(x.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(i,void 0))})),s.push(new h.Action("addLogPoint",n.localize(19,null),null,!0,function(){return r.TPromise.as(o.editor.getContribution(x.EDITOR_CONTRIBUTION_ID).showBreakpointWidget(i,void 0,x.BreakpointWidgetContext.LOG_MESSAGE))}));return r.TPromise.as(s)},e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.editor.onMouseDown(function(t){var i=t.target.detail;if(t.target.type===f.MouseTargetType.GUTTER_GLYPH_MARGIN&&!i.isAfterLines&&e.marginFreeFromNonDebugDecorations(t.target.position.lineNumber)){var r=e.debugService.getConfigurationManager().canSetBreakpointsIn(e.editor.getModel()),o=t.target.position.lineNumber,s=e.editor.getModel().uri
;if(t.event.rightButton||c.isMacintosh&&t.event.leftButton&&t.event.ctrlKey){if(!r)return;var a={x:t.event.posx,y:t.event.posy},l=e.debugService.getModel().getBreakpoints({lineNumber:o,uri:s});e.contextMenuService.showContextMenu({getAnchor:function(){return a},getActions:function(){return e.getContextMenuActions(l,s,o)},getActionsContext:function(){return l.length?l[0]:void 0}})}else{var u=e.debugService.getModel().getBreakpoints({uri:s,lineNumber:o});if(u.length)if(!c.isLinux&&u.some(function(e){return!!e.condition||!!e.logMessage||!!e.hitCondition})){var h=u.every(function(e){return!!e.logMessage}),p=h?n.localize(20,null):n.localize(21,null);e.dialogService.show(d.default.Info,n.localize(22,null,p.toLowerCase(),h?n.localize(23,null):n.localize(24,null)),[n.localize(25,null,p),n.localize(26,null,p),n.localize(27,null)],{cancelId:2}).then(function(t){0===t&&u.forEach(function(t){return e.debugService.removeBreakpoints(t.getId())}),1===t&&u.forEach(function(t){
return e.debugService.enableOrDisableBreakpoints(!1,t)})})}else u.forEach(function(t){return e.debugService.removeBreakpoints(t.getId())});else r&&e.debugService.addBreakpoints(s,[{lineNumber:o}])}}})),this.toDispose.push(this.editor.onMouseMove(function(t){var n=-1;if(t.target.type===f.MouseTargetType.GUTTER_GLYPH_MARGIN&&e.debugService.getConfigurationManager().canSetBreakpointsIn(e.editor.getModel())&&e.marginFreeFromNonDebugDecorations(t.target.position.lineNumber)){t.target.detail.isAfterLines||(n=t.target.position.lineNumber)}e.ensureBreakpointHintDecoration(n)})),this.toDispose.push(this.editor.onMouseLeave(function(t){e.ensureBreakpointHintDecoration(-1)})),this.toDispose.push(this.debugService.getViewModel().onDidFocusStackFrame(function(t){return e.onFocusStackFrame(t.stackFrame)})),this.toDispose.push(this.editor.onMouseDown(function(t){return e.onEditorMouseDown(t)})),this.toDispose.push(this.editor.onMouseMove(function(t){return e.onEditorMouseMove(t)})),
this.toDispose.push(this.editor.onMouseLeave(function(t){e.provideNonDebugHoverScheduler.cancel();var n=e.hoverWidget.getDomNode();if(n){var i=n.getBoundingClientRect();(t.event.posx<i.left||t.event.posx>i.right||t.event.posy<i.top||t.event.posy>i.bottom)&&e.hideHoverWidget()}})),this.toDispose.push(this.editor.onKeyDown(function(t){return e.onKeyDown(t)})),this.toDispose.push(this.editor.onDidChangeModelContent(function(){e.wordToLineNumbersMap=null,e.updateInlineValuesScheduler.schedule()})),this.toDispose.push(this.editor.onDidChangeModel(function(){var t=e.debugService.getViewModel().focusedStackFrame,n=e.editor.getModel();e._applyHoverConfiguration(n,t),e.closeBreakpointWidget(),e.toggleExceptionWidget(),e.hideHoverWidget(),e.updateConfigurationWidgetVisibility(),e.wordToLineNumbersMap=null,e.updateInlineValueDecorations(t)})),this.toDispose.push(this.editor.onDidScrollChange(function(){return e.hideHoverWidget})),this.toDispose.push(this.debugService.onDidChangeState(function(t){
t!==x.State.Stopped&&e.toggleExceptionWidget()}))},e.prototype._applyHoverConfiguration=function(e,t){if(t&&e&&e.uri.toString()===t.source.uri.toString())this.editor.updateOptions({hover:{enabled:!t||!e||e.uri.toString()!==t.source.uri.toString()}});else{var n=void 0;e&&(n={resource:e.uri,overrideIdentifier:e.getLanguageIdentifier().language});var i=this.configurationService.getValue("editor.hover",n);this.editor.updateOptions({hover:{enabled:i.enabled,delay:i.delay,sticky:i.sticky}})}},e.prototype.getId=function(){return x.EDITOR_CONTRIBUTION_ID},e.prototype.showHover=function(e,t){var n=this.debugService.getViewModel().focusedStackFrame,i=this.editor.getModel();if(n&&i&&n.source.uri.toString()===i.uri.toString())return this.hoverWidget.showAt(e,t)},e.prototype.marginFreeFromNonDebugDecorations=function(e){var t=this.editor.getLineDecorations(e);if(t)for(var n=0,i=t;n<i.length;n++){var r=i[n].options;if(r.glyphMarginClassName&&-1===r.glyphMarginClassName.indexOf("debug"))return!1}return!0},
e.prototype.ensureBreakpointHintDecoration=function(t){var n=[];-1!==t&&n.push({options:e.BREAKPOINT_HELPER_DECORATION,range:{startLineNumber:t,startColumn:1,endLineNumber:t,endColumn:1}}),this.breakpointHintDecoration=this.editor.deltaDecorations(this.breakpointHintDecoration,n)},e.prototype.onFocusStackFrame=function(e){var t=this.editor.getModel();this._applyHoverConfiguration(t,e),t&&e&&e.source.uri.toString()===t.uri.toString()?this.toggleExceptionWidget():this.hideHoverWidget(),this.updateInlineValueDecorations(e)},Object.defineProperty(e.prototype,"showHoverScheduler",{get:function(){var e=this,t=new o.RunOnceScheduler(function(){return e.showHover(e.hoverRange,!1)},300);return this.toDispose.push(t),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideHoverScheduler",{get:function(){var e=this,t=new o.RunOnceScheduler(function(){return e.hoverWidget.hide()},300);return this.toDispose.push(t),t},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"provideNonDebugHoverScheduler",{get:function(){var e=this,t=new o.RunOnceScheduler(function(){B.getHover(e.editor.getModel(),e.nonDebugHoverPosition)},300);return this.toDispose.push(t),t},enumerable:!0,configurable:!0}),e.prototype.hideHoverWidget=function(){!this.hideHoverScheduler.isScheduled()&&this.hoverWidget.isVisible()&&this.hideHoverScheduler.schedule(),this.showHoverScheduler.cancel(),this.provideNonDebugHoverScheduler.cancel()},e.prototype.onEditorMouseDown=function(e){e.target.type===f.MouseTargetType.CONTENT_WIDGET&&e.target.detail===I.DebugHoverWidget.ID||this.hideHoverWidget()},e.prototype.onEditorMouseMove=function(e){if(this.debugService.state===x.State.Stopped){this.configurationService.getValue("debug").enableAllHovers||(this.nonDebugHoverPosition=e.target.position,this.provideNonDebugHoverScheduler.schedule());var t=e.target.type,n=c.isMacintosh?"metaKey":"ctrlKey"
;(t!==f.MouseTargetType.CONTENT_WIDGET||e.target.detail!==I.DebugHoverWidget.ID||e.event[n])&&(t===f.MouseTargetType.CONTENT_TEXT?e.target.range.equalsRange(this.hoverRange)||(this.hoverRange=e.target.range,this.showHoverScheduler.schedule()):this.hideHoverWidget())}},e.prototype.onKeyDown=function(e){var t=c.isMacintosh?57:5;e.keyCode!==t&&this.hideHoverWidget()},e.prototype.showBreakpointWidget=function(e,t,n){this.breakpointWidget&&this.breakpointWidget.dispose(),this.breakpointWidget=this.instantiationService.createInstance(k.BreakpointWidget,this.editor,e,n),this.breakpointWidget.show({lineNumber:e,column:1},2),this.breakpointWidgetVisible.set(!0)},e.prototype.closeBreakpointWidget=function(){this.breakpointWidget&&(this.breakpointWidget.dispose(),this.breakpointWidget=null,this.breakpointWidgetVisible.reset(),this.editor.focus())},e.prototype.toggleExceptionWidget=function(){var e=this,t=this.editor.getModel(),n=this.debugService.getViewModel().focusedStackFrame,i=n?n.thread.getCallStack():null
;if(t&&n&&i&&0!==i.length){var r=M.first(i,function(e){return e.source&&e.source.available},void 0);if(r&&r===n){var o=r.source.uri.toString()===t.uri.toString();this.exceptionWidget&&!o?this.closeExceptionWidget():o&&n.thread.exceptionInfo.then(function(t){t&&r.range.startLineNumber&&r.range.startColumn&&e.showExceptionWidget(t,r.range.startLineNumber,r.range.startColumn)})}else this.closeExceptionWidget()}else this.closeExceptionWidget()},e.prototype.showExceptionWidget=function(e,t,n){this.exceptionWidget&&this.exceptionWidget.dispose(),this.exceptionWidget=this.instantiationService.createInstance(D.ExceptionWidget,this.editor,e),this.exceptionWidget.show({lineNumber:t,column:n},0)},e.prototype.closeExceptionWidget=function(){this.exceptionWidget&&(this.exceptionWidget.dispose(),this.exceptionWidget=null)},e.prototype.updateConfigurationWidgetVisibility=function(){var e=this,t=this.editor.getModel();this.configurationWidget&&this.configurationWidget.dispose(),
t&&V.test(t.uri.toString())&&(this.configurationWidget=this.instantiationService.createInstance(A.FloatingClickWidget,this.editor,n.localize(28,null),null),this.configurationWidget.render(),this.toDispose.push(this.configurationWidget.onClick(function(){return e.addLaunchConfiguration().done(void 0,i.onUnexpectedError)})))},e.prototype.addLaunchConfiguration=function(){var e=this;this.telemetryService.publicLog("debug/addLaunchConfiguration");var t,n,i=this.editor.getModel(),o=0;if(u.visit(i.getValue(),{onObjectProperty:function(e,t,i){n=e},onArrayBegin:function(e,r){"configurations"===n&&0===o&&(t=i.getPositionAt(e+1)),o++},onArrayEnd:function(){o--}}),this.editor.focus(),!t)return r.TPromise.as(void 0);return function(t){return e.editor.getModel().getLineLastNonWhitespaceColumn(t.lineNumber)>t.column&&(e.editor.setPosition(t),O.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,e.editor,null)),0===e.editor.getModel().getLineLastNonWhitespaceColumn(t.lineNumber+1)&&(e.editor.setPosition({
lineNumber:t.lineNumber+1,column:1073741824}),e.commandService.executeCommand("editor.action.deleteLines")),e.editor.setPosition(t),e.commandService.executeCommand("editor.action.insertLineAfter")}(t).then(function(){return e.commandService.executeCommand("editor.action.triggerSuggest")})},Object.defineProperty(e.prototype,"removeInlineValuesScheduler",{get:function(){var e=this;return new o.RunOnceScheduler(function(){return e.editor.removeDecorations(z)},100)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"updateInlineValuesScheduler",{get:function(){var e=this;return new o.RunOnceScheduler(function(){return e.updateInlineValueDecorations(e.debugService.getViewModel().focusedStackFrame)},200)},enumerable:!0,configurable:!0}),e.prototype.updateInlineValueDecorations=function(e){var t=this,n=this.editor.getModel();this.configurationService.getValue("debug").inlineValues&&n&&e&&n.uri.toString()===e.source.uri.toString()?(this.removeInlineValuesScheduler.cancel(),
e.getMostSpecificScopes(e.range).then(function(n){return r.TPromise.join(n.map(function(n){return n.getChildren().then(function(i){var r=new y.Range(0,0,e.range.startLineNumber,e.range.startColumn);return n.range&&(r=r.setStartPosition(n.range.startLineNumber,n.range.startColumn)),t.createInlineValueDecorationsInsideRange(i,r)})})).then(function(e){var n=e.reduce(function(e,t){return e.concat(t)},[]);t.editor.setDecorations(z,n)})})):this.removeInlineValuesScheduler.isScheduled()||this.removeInlineValuesScheduler.schedule()},e.prototype.createInlineValueDecorationsInsideRange=function(e,t){for(var n=this,i=new Map,r=0,o=e;r<o.length;r++){var s=o[r];if(i.set(s.name,s.value),i.size>=100)break}var a=new Map,c=this.getWordToPositionsMap();i.forEach(function(e,n){if(c.has(n))for(var i=0,r=c.get(n);i<r.length;i++){var o=r[i];t.containsPosition(o)&&(a.has(o.lineNumber)||a.set(o.lineNumber,[]),-1===a.get(o.lineNumber).indexOf(n)&&a.get(o.lineNumber).push(n))}});var l=[];return a.forEach(function(e,t){
var r=e.sort(function(e,i){var r=n.editor.getModel().getLineContent(t);return r.indexOf(e)-r.indexOf(i)}).map(function(e){return e+" = "+i.get(e)}).join(", ");l.push(n.createInlineValueDecoration(t,r))}),l},e.prototype.createInlineValueDecoration=function(e,t){return t.length>150&&(t=t.substr(0,150)+"..."),{range:{startLineNumber:e,endLineNumber:e,startColumn:1073741824,endColumn:1073741824},renderOptions:{after:{contentText:t,backgroundColor:"rgba(255, 200, 0, 0.2)",margin:"10px"},dark:{after:{color:"rgba(255, 255, 255, 0.5)"}},light:{after:{color:"rgba(0, 0, 0, 0.5)"}}}}},e.prototype.getWordToPositionsMap=function(){if(!this.wordToLineNumbersMap){this.wordToLineNumbersMap=new Map;var e=this.editor.getModel();if(!e)return this.wordToLineNumbersMap;for(var t=1,n=e.getLineCount();t<=n;++t){var i=e.getLineContent(t);if(!(i.length>500)){e.forceTokenization(t);for(var r=e.getLineTokens(t),o=0,s=r.getCount();o<s;o++){var a=r.getStartOffset(o),c=r.getEndOffset(o),l=r.getStandardTokenType(o),u=i.substring(a,c)
;if(0===l){p.DEFAULT_WORD_REGEXP.lastIndex=0;var d=p.DEFAULT_WORD_REGEXP.exec(u);if(d){var h=d[0];this.wordToLineNumbersMap.has(h)||this.wordToLineNumbersMap.set(h,[]),this.wordToLineNumbersMap.get(h).push(new R.Position(t,a))}}}}}}return this.wordToLineNumbersMap},e.prototype.dispose=function(){this.breakpointWidget&&this.breakpointWidget.dispose(),this.hoverWidget&&this.hoverWidget.dispose(),this.configurationWidget&&this.configurationWidget.dispose(),this.toDispose=s.dispose(this.toDispose)},e.BREAKPOINT_HELPER_DECORATION={glyphMarginClassName:"debug-breakpoint-hint",stickiness:v.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges},a([F.memoize],e.prototype,"showHoverScheduler",null),a([F.memoize],e.prototype,"hideHoverScheduler",null),a([F.memoize],e.prototype,"provideNonDebugHoverScheduler",null),a([F.memoize],e.prototype,"removeInlineValuesScheduler",null),a([F.memoize],e.prototype,"updateInlineValuesScheduler",null),
e=a([l(1,x.IDebugService),l(2,w.IContextMenuService),l(3,b.IInstantiationService),l(4,E.IContextKeyService),l(5,C.ICommandService),l(6,m.ICodeEditorService),l(7,S.ITelemetryService),l(8,_.IConfigurationService),l(9,L.IThemeService),l(10,P.IKeybindingService),l(11,W.IDialogService)],e)}();t.DebugEditorContribution=H,g.registerEditorContribution(H)}),define(e[1521],t([1,0,614,18,8,5,4,9,337,99,158,79,142,121,35,6,31,37,12,271,41,14,117,242,58,17]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var A=o.$,L=function(e){function t(t,n,o,s,a,l){var u=e.call(this,c({},t,{ariaHeaderLabel:i.localize(0,null)}),s,n,l)||this;return u.debugService=o,u.instantiationService=a,u.settings=t.viewletSettings,u.onWatchExpressionsUpdatedScheduler=new r.RunOnceScheduler(function(){u.needsRefresh=!1,u.tree.refresh().done(void 0,d.onUnexpectedError)},50),u}return n(t,e),t.prototype.renderBody=function(e){var t=this;o.addClass(e,"debug-watch"),
this.treeContainer=x.renderViewTree(e);var n=new R(this.debugService,this.keybindingService);this.tree=this.instantiationService.createInstance(k.WorkbenchTree,this.treeContainer,{dataSource:new O(this.debugService),renderer:this.instantiationService.createInstance(M),accessibilityProvider:new P,controller:this.instantiationService.createInstance(N,n,S.MenuId.DebugWatchContext,{clickBehavior:T.ClickBehavior.ON_MOUSE_UP,openMode:T.OpenMode.SINGLE_CLICK}),dnd:new F(this.debugService)},{ariaLabel:i.localize(1,null),twistiePixels:x.twistiePixels}),g.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService),this.tree.setInput(this.debugService.getModel())
;var r=new m.AddWatchExpressionAction(m.AddWatchExpressionAction.ID,m.AddWatchExpressionAction.LABEL,this.debugService,this.keybindingService),s=new p.CollapseAction(this.tree,!0,"explorer-action collapse-explorer"),a=new m.RemoveAllWatchExpressionsAction(m.RemoveAllWatchExpressionsAction.ID,m.RemoveAllWatchExpressionsAction.LABEL,this.debugService,this.keybindingService);this.toolbar.setActions([r,s,a])(),this.disposables.push(this.debugService.getModel().onDidChangeWatchExpressions(function(e){t.isExpanded()&&t.isVisible()?t.tree.refresh().done(function(){return e instanceof v.Expression?t.tree.reveal(e):u.TPromise.as(!0)},d.onUnexpectedError):t.needsRefresh=!0})),this.disposables.push(this.debugService.getViewModel().onDidFocusStackFrame(function(){t.isExpanded()&&t.isVisible()?t.onWatchExpressionsUpdatedScheduler.isScheduled()||t.onWatchExpressionsUpdatedScheduler.schedule():t.needsRefresh=!0})),this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(function(e){
e instanceof v.Expression&&t.tree.refresh(e,!1).done(null,d.onUnexpectedError)}))},t.prototype.layoutBody=function(t){this.treeContainer&&(this.treeContainer.style.height=t+"px"),e.prototype.layoutBody.call(this,t)},t.prototype.setExpanded=function(t){e.prototype.setExpanded.call(this,t),t&&this.needsRefresh&&this.onWatchExpressionsUpdatedScheduler.schedule()},t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){t&&n.needsRefresh&&n.onWatchExpressionsUpdatedScheduler.schedule()})},t.prototype.shutdown=function(){this.settings[t.MEMENTO]=!this.isExpanded(),e.prototype.shutdown.call(this)},t.MEMENTO="watchexpressionsview.memento",t=a([l(1,y.IContextMenuService),l(2,g.IDebugService),l(3,_.IKeybindingService),l(4,b.IInstantiationService),l(5,D.IConfigurationService)],t)}(f.TreeViewsViewletPanel);t.WatchExpressionsView=L;var R=function(){function e(e,t){this.debugService=e,this.keybindingService=t}return e.prototype.hasActions=function(e,t){
return t instanceof v.Expression&&!!t.name},e.prototype.hasSecondaryActions=function(e,t){return!0},e.prototype.getActions=function(e,t){return u.TPromise.as([])},e.prototype.getSecondaryActions=function(e,t){var n=[];if(t instanceof v.Expression){var i=t;n.push(new m.AddWatchExpressionAction(m.AddWatchExpressionAction.ID,m.AddWatchExpressionAction.LABEL,this.debugService,this.keybindingService)),n.push(new m.EditWatchExpressionAction(m.EditWatchExpressionAction.ID,m.EditWatchExpressionAction.LABEL,this.debugService,this.keybindingService)),i.hasChildren||n.push(new E.CopyValueAction(E.CopyValueAction.ID,E.CopyValueAction.LABEL,i.value,this.debugService)),n.push(new w.Separator),n.push(new m.RemoveWatchExpressionAction(m.RemoveWatchExpressionAction.ID,m.RemoveWatchExpressionAction.LABEL,this.debugService,this.keybindingService)),n.push(new m.RemoveAllWatchExpressionsAction(m.RemoveAllWatchExpressionsAction.ID,m.RemoveAllWatchExpressionsAction.LABEL,this.debugService,this.keybindingService))}else{
if(n.push(new m.AddWatchExpressionAction(m.AddWatchExpressionAction.ID,m.AddWatchExpressionAction.LABEL,this.debugService,this.keybindingService)),t instanceof v.Variable){var r=t;r.hasChildren||n.push(new E.CopyValueAction(E.CopyValueAction.ID,E.CopyValueAction.LABEL,r.value,this.debugService)),n.push(new w.Separator)}n.push(new m.RemoveAllWatchExpressionsAction(m.RemoveAllWatchExpressionsAction.ID,m.RemoveAllWatchExpressionsAction.LABEL,this.debugService,this.keybindingService))}return u.TPromise.as(n)},e.prototype.getActionItem=function(e,t,n){return null},e}(),O=function(){function e(e){this.debugService=e}return e.prototype.getId=function(e,t){return t.getId()},e.prototype.hasChildren=function(e,t){if(t instanceof v.Model)return!0;var n=t;return n.hasChildren&&!I.equalsIgnoreCase(n.value,"null")},e.prototype.getChildren=function(e,t){if(t instanceof v.Model){var n=this.debugService.getViewModel();return u.TPromise.join(t.getWatchExpressions().map(function(e){
return e.name?e.evaluate(n.focusedSession,n.focusedStackFrame,"watch").then(function(){return e}):u.TPromise.as(e)}))}return t.getChildren()},e.prototype.getParent=function(e,t){return u.TPromise.as(null)},e}(),M=function(){function e(e,t,n){this.debugService=e,this.contextViewService=t,this.themeService=n,this.toDispose=[]}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(t,n){return n instanceof v.Expression?e.WATCH_EXPRESSION_TEMPLATE_ID:e.VARIABLE_TEMPLATE_ID},e.prototype.renderTemplate=function(t,n,i){var r=function(e,t){e.expression=o.append(t,A(".expression")),e.name=o.append(e.expression,A("span.name")),e.value=o.append(e.expression,A("span.value"))};if(n===e.WATCH_EXPRESSION_TEMPLATE_ID){var s=Object.create(null);return s.watchExpression=o.append(i,A(".watch-expression")),r(s,s.watchExpression),s}var a=Object.create(null);return r(a,i),a},e.prototype.renderElement=function(t,n,i,r){
i===e.WATCH_EXPRESSION_TEMPLATE_ID?this.renderWatchExpression(t,n,r):x.renderVariable(n,r,!0)},e.prototype.renderWatchExpression=function(e,t,n){var r=this.debugService.getViewModel().getSelectedExpression();r instanceof v.Expression&&r.getId()===t.getId()&&x.renderRenameBox(this.debugService,this.contextViewService,this.themeService,e,t,n.expression,{initialValue:t.name,placeholder:i.localize(2,null),ariaLabel:i.localize(3,null)}),n.name.textContent=t.name,t.value&&(n.name.textContent+=":",x.renderExpressionValue(t,n.value,{showChanged:!0,maxValueLength:1024,preserveWhitespace:!1,showHover:!0,colorize:!0}),n.name.title=t.type?t.type:t.value)},e.prototype.disposeTemplate=function(e,t,n){},e.prototype.dispose=function(){this.toDispose=s.dispose(this.toDispose)},e.WATCH_EXPRESSION_TEMPLATE_ID="watchExpression",e.VARIABLE_TEMPLATE_ID="variables",e=a([l(0,g.IDebugService),l(1,y.IContextViewService),l(2,C.IThemeService)],e)}(),P=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){
return t instanceof v.Expression?i.localize(4,null,t.name,t.value):t instanceof v.Variable?i.localize(5,null,t.name,t.value):null},e}(),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.onLeftClick=function(t,n,i){if(n instanceof v.Expression&&2===i.detail){var r=n;return this.debugService.getViewModel().setSelectedExpression(r),!0}return n instanceof v.Model&&2===i.detail?(this.debugService.addWatchExpression(),!0):e.prototype.onLeftClick.call(this,t,n,i)},t}(x.BaseDebugController),F=function(e){function t(t){var n=e.call(this)||this;return n.debugService=t,n}return n(t,e),t.prototype.getDragURI=function(e,t){return t instanceof v.Expression?t.getId():null},t.prototype.getDragLabel=function(e,t){return t.length>1?String(t.length):t[0].name},t.prototype.onDragOver=function(e,t,n,i){return n instanceof v.Expression||n instanceof v.Model?{accept:!0,autoExpand:!1}:h.DRAG_OVER_REJECT},t.prototype.drop=function(e,t,n,i){var r=t.getData();if(Array.isArray(r)){
var o=r[0],s=this.debugService.getModel().getWatchExpressions(),a=n instanceof v.Model?s.length-1:s.indexOf(n);this.debugService.moveWatchExpression(o.getId(),a)}},t}(T.DefaultDragAndDrop)}),define(e[1522],t([1,0,603,31,16,107,52,63,56,99,108,172,537,301,1521,1514,75,79,46,81,1511,121,533,1515,1221,65,1509,86,475,98,11,15,10,535,536,534,1368,38,95,53,877,881,1520]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var K=function(e){function t(t,n,i,r){return e.call(this,t,n,S.VIEWLET_ID,i,r)||this}return n(t,e),t.ID=S.VIEWLET_ID,t.LABEL=i.localize(0,null),t=a([l(2,k.IViewletService),l(3,H.IEditorGroupsService)],t)}(h.ToggleViewletAction),U=function(e){function t(t,n,i,r){return e.call(this,t,n,S.REPL_ID,i,r)||this}return n(t,e),t.ID="workbench.debug.action.toggleRepl",t.LABEL=i.localize(1,null),t=a([l(2,C.IPanelService),l(3,_.IPartService)],t)}(p.TogglePanelAction)
;o.Registry.as(h.Extensions.Viewlets).registerViewlet(new h.ViewletDescriptor(N.DebugViewlet,S.VIEWLET_ID,i.localize(2,null),"debug",3));o.Registry.as(p.Extensions.Panels).registerPanel(new p.PanelDescriptor(F.Repl,S.REPL_ID,i.localize(3,null),"repl",30,U.ID)),o.Registry.as(p.Extensions.Panels).setDefaultPanelId(S.REPL_ID),R.ViewsRegistry.registerViews([{id:S.VARIABLES_VIEW_ID,name:i.localize(4,null),ctor:g.VariablesView,order:10,weight:40,container:S.VIEW_CONTAINER,canToggleVisibility:!0}]),R.ViewsRegistry.registerViews([{id:S.WATCH_VIEW_ID,name:i.localize(5,null),ctor:m.WatchExpressionsView,order:20,weight:10,container:S.VIEW_CONTAINER,canToggleVisibility:!0}]),R.ViewsRegistry.registerViews([{id:S.CALLSTACK_VIEW_ID,name:i.localize(6,null),ctor:y.CallStackView,order:30,weight:30,container:S.VIEW_CONTAINER,canToggleVisibility:!0}]),R.ViewsRegistry.registerViews([{id:S.BREAKPOINTS_VIEW_ID,name:i.localize(7,null),ctor:v.BreakpointsView,order:40,weight:20,container:S.VIEW_CONTAINER,canToggleVisibility:!0}])
;var G=o.Registry.as(d.Extensions.WorkbenchActions);G.registerWorkbenchAction(new r.SyncActionDescriptor(U,U.ID,U.LABEL,{primary:3127}),"View: Debug Console",i.localize(8,null)),G.registerWorkbenchAction(new r.SyncActionDescriptor(K,K.ID,K.LABEL,{primary:3106}),"View: Show Debug",i.localize(9,null)),o.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(E.DebugEditorModelManager,V.LifecyclePhase.Running),o.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(I.DebugActionsWidget,V.LifecyclePhase.Running),o.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(x.DebugContentProvider,V.LifecyclePhase.Eventually),o.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(L.StatusBarColorProvider,V.LifecyclePhase.Eventually);var j=i.localize(10,null);G.registerWorkbenchAction(new r.SyncActionDescriptor(w.StartAction,w.StartAction.ID,w.StartAction.LABEL,{primary:63},S.CONTEXT_NOT_IN_DEBUG_MODE),"Debug: Start Debugging",j),
G.registerWorkbenchAction(new r.SyncActionDescriptor(w.StepOverAction,w.StepOverAction.ID,w.StepOverAction.LABEL,{primary:68},S.CONTEXT_IN_DEBUG_MODE),"Debug: Step Over",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.StepIntoAction,w.StepIntoAction.ID,w.StepIntoAction.LABEL,{primary:69},S.CONTEXT_IN_DEBUG_MODE,c.KeybindingsRegistry.WEIGHT.workbenchContrib(1)),"Debug: Step Into",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.StepOutAction,w.StepOutAction.ID,w.StepOutAction.LABEL,{primary:1093},S.CONTEXT_IN_DEBUG_MODE),"Debug: Step Out",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.RestartAction,w.RestartAction.ID,w.RestartAction.LABEL,{primary:3135},S.CONTEXT_IN_DEBUG_MODE),"Debug: Restart",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.StopAction,w.StopAction.ID,w.StopAction.LABEL,{primary:1087},S.CONTEXT_IN_DEBUG_MODE),"Debug: Stop",j),
G.registerWorkbenchAction(new r.SyncActionDescriptor(w.DisconnectAction,w.DisconnectAction.ID,w.DisconnectAction.LABEL),"Debug: Disconnect",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.ContinueAction,w.ContinueAction.ID,w.ContinueAction.LABEL,{primary:63},S.CONTEXT_IN_DEBUG_MODE),"Debug: Continue",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.PauseAction,w.PauseAction.ID,w.PauseAction.LABEL,{primary:64},S.CONTEXT_IN_DEBUG_MODE),"Debug: Pause",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.TerminateThreadAction,w.TerminateThreadAction.ID,w.TerminateThreadAction.LABEL,void 0,S.CONTEXT_IN_DEBUG_MODE),"Debug: Terminate Thread",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.ConfigureAction,w.ConfigureAction.ID,w.ConfigureAction.LABEL),"Debug: Open launch.json",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.AddFunctionBreakpointAction,w.AddFunctionBreakpointAction.ID,w.AddFunctionBreakpointAction.LABEL),"Debug: Add Function Breakpoint",j),
G.registerWorkbenchAction(new r.SyncActionDescriptor(w.ReapplyBreakpointsAction,w.ReapplyBreakpointsAction.ID,w.ReapplyBreakpointsAction.LABEL),"Debug: Reapply All Breakpoints",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.RunAction,w.RunAction.ID,w.RunAction.LABEL,{primary:2111,mac:{primary:319}},S.CONTEXT_NOT_IN_DEBUG_MODE),"Debug: Start Without Debugging",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.RemoveAllBreakpointsAction,w.RemoveAllBreakpointsAction.ID,w.RemoveAllBreakpointsAction.LABEL),"Debug: Remove All Breakpoints",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.EnableAllBreakpointsAction,w.EnableAllBreakpointsAction.ID,w.EnableAllBreakpointsAction.LABEL),"Debug: Enable All Breakpoints",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.DisableAllBreakpointsAction,w.DisableAllBreakpointsAction.ID,w.DisableAllBreakpointsAction.LABEL),"Debug: Disable All Breakpoints",j),
G.registerWorkbenchAction(new r.SyncActionDescriptor(w.ClearReplAction,w.ClearReplAction.ID,w.ClearReplAction.LABEL),"Debug: Clear Console",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.FocusReplAction,w.FocusReplAction.ID,w.FocusReplAction.LABEL),"Debug: Focus Debug Console",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(w.SelectAndStartAction,w.SelectAndStartAction.ID,w.SelectAndStartAction.LABEL),"Debug: Select and Start Debugging",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(N.FocusVariablesViewAction,N.FocusVariablesViewAction.ID,N.FocusVariablesViewAction.LABEL),"Debug: Focus Variables",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(N.FocusWatchViewAction,N.FocusWatchViewAction.ID,N.FocusWatchViewAction.LABEL),"Debug: Focus Watch",j),G.registerWorkbenchAction(new r.SyncActionDescriptor(N.FocusCallStackViewAction,N.FocusCallStackViewAction.ID,N.FocusCallStackViewAction.LABEL),"Debug: Focus Call Stack",j),
G.registerWorkbenchAction(new r.SyncActionDescriptor(N.FocusBreakpointsViewAction,N.FocusBreakpointsViewAction.ID,N.FocusBreakpointsViewAction.LABEL),"Debug: Focus Breakpoints",j),o.Registry.as(A.Extensions.Quickopen).registerQuickOpenHandler(new A.QuickOpenHandlerDescriptor(W.DebugQuickOpenHandler,W.DebugQuickOpenHandler.ID,"debug ","inLaunchConfigurationsPicker",i.localize(11,null))),s.registerSingleton(S.IDebugService,T.DebugService);o.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"debug",order:20,title:i.localize(12,null),type:"object",properties:{"debug.allowBreakpointsEverywhere":{type:"boolean",description:i.localize(13,null),default:!1},"debug.openExplorerOnEnd":{type:"boolean",description:i.localize(14,null),default:!1},"debug.inlineValues":{type:"boolean",description:i.localize(15,null),default:!1},"debug.toolBarLocation":{enum:["floating","docked","hidden"],description:i.localize(16,null),default:"floating"},"debug.showInStatusBar":{enum:["never","always","onFirstSessionStart"],
enumDescriptions:[i.localize(17,null),i.localize(18,null),i.localize(19,null)],description:i.localize(20,null),default:"onFirstSessionStart"},"debug.internalConsoleOptions":S.INTERNAL_CONSOLE_OPTIONS_SCHEMA,"debug.openDebug":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart","openOnDebugBreak"],default:"openOnFirstSessionStart",description:i.localize(21,null)},"debug.enableAllHovers":{type:"boolean",description:i.localize(22,null),default:!1},launch:{type:"object",description:i.localize(23,null),default:{configurations:[],compounds:[]},$ref:z.launchSchemaId}}}),D.registerCommands();if(o.Registry.as(f.Extensions.Statusbar).registerStatusbarItem(new f.StatusbarItemDescriptor(B.DebugStatus,f.StatusbarAlignment.LEFT,30)),O.isMacintosh){var q=function(t,n,i,o,s){r.MenuRegistry.appendMenuItem(r.MenuId.TouchBarContext,{command:{id:t,title:n,iconLocation:{dark:P.default.parse(e.toUrl("vs/workbench/parts/debug/electron-browser/media/"+s))}},when:o,group:"9_debug",order:i})}
;q(w.StartAction.ID,w.StartAction.LABEL,0,S.CONTEXT_NOT_IN_DEBUG_MODE,"continue-tb.png"),q(w.ContinueAction.ID,w.ContinueAction.LABEL,0,S.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),"continue-tb.png"),q(w.PauseAction.ID,w.PauseAction.LABEL,1,M.ContextKeyExpr.and(S.CONTEXT_IN_DEBUG_MODE,M.ContextKeyExpr.notEquals("debugState","stopped")),"pause-tb.png"),q(w.StepOverAction.ID,w.StepOverAction.LABEL,2,S.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),"stepover-tb.png"),q(w.StepIntoAction.ID,w.StepIntoAction.LABEL,3,S.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),"stepinto-tb.png"),q(w.StepOutAction.ID,w.StepOutAction.LABEL,4,S.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),"stepout-tb.png"),q(w.RestartAction.ID,w.RestartAction.LABEL,5,S.CONTEXT_IN_DEBUG_MODE,"restart-tb.png"),q(w.StopAction.ID,w.StopAction.LABEL,6,S.CONTEXT_IN_DEBUG_MODE,"stop-tb.png")}}),define(e[538],t([1,0,623,4,122,109,86,104,65,80,22]),function(e,t,i,r,o,s,c,u,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){
function t(t,n){var i=e.call(this)||this;return i.label=t,i.action=n,i}return n(t,e),t.prototype.getLabel=function(){return this.label},t.prototype.getAriaLabel=function(){return this.label},t.prototype.run=function(e){return e!==o.Mode.PREVIEW&&(this.action(),!0)},t}(s.QuickOpenEntry),g=function(e){function t(t){var n=e.call(this)||this;return n.viewletService=t,n}return n(t,e),t.prototype.getResults=function(e){var t=this,n=i.localize(0,null);return r.TPromise.as(new s.QuickOpenModel([new f(n,function(){t.viewletService.openViewlet(u.VIEWLET_ID,!0).then(function(e){return e}).done(function(e){e.search(""),e.focus()})})]))},t.prototype.getEmptyLabel=function(e){return""},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!0}},t.ID="workbench.picker.extensions",t=a([l(0,d.IViewletService)],t)}(c.QuickOpenHandler);t.ExtensionsHandler=g;var v=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.viewletService=t,o.galleryService=n,o.extensionsService=i,o.notificationService=r,o}
return n(t,e),t.prototype.getResults=function(e){var t=this;if(/\./.test(e))return this.galleryService.query({names:[e],pageSize:1}).then(function(n){var r=[],o=n.firstPage[0];if(o){var a=i.localize(2,null,e),c=function(){return t.viewletService.openViewlet(u.VIEWLET_ID,!0).then(function(e){return e}).then(function(t){return t.search("@id:"+e)}).then(function(){return t.extensionsService.installFromGallery(o)}).done(null,function(e){return t.notificationService.error(e)})};r.push(new f(a,c))}else{a=i.localize(1,null,e);r.push(new f(a,function(){return null}))}return new s.QuickOpenModel(r)});var n=[];if(e){var o=i.localize(3,null,e),a=function(){t.viewletService.openViewlet(u.VIEWLET_ID,!0).then(function(e){return e}).done(function(t){t.search(e),t.focus()})};n.push(new f(o,a))}return r.TPromise.as(new s.QuickOpenModel(n))},t.prototype.getEmptyLabel=function(e){return i.localize(4,null)},t.prototype.getAutoFocus=function(e){return{autoFocusFirstEntry:!0}},t.ID="workbench.picker.gallery",
t=a([l(0,d.IViewletService),l(1,h.IExtensionGalleryService),l(2,h.IExtensionManagementService),l(3,p.INotificationService)],t)}(c.QuickOpenHandler);t.GalleryExtensionsHandler=v}),define(e[1524],t([1,0,4,642,9,126,30,25,23,96,48,290,268,65,33,28,27,34,127,6,115,354,12,42,21,53]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(n,i,r,o,s,a,c,l,u,d,h,p,f){var g=e.call(this,t.ID,n,o,a,c,u,h,l,d)||this;return g.fileService=i,g.viewletService=r,g.contextService=s,g.windowsService=p,g.preferencesService=f,g.toUnbind.push(g.fileService.onFileChanges(function(e){return g.onFilesChanged(e)})),g}return n(t,e),t.prototype.onFilesChanged=function(e){var t=e.getDeleted();t&&t.length&&this.clearTextEditorViewState(t.map(function(e){return e.resource}))},t.prototype.getTitle=function(){return this.input?this.input.getName():r.localize(0,null)},Object.defineProperty(t.prototype,"input",{get:function(){return this._input},
enumerable:!0,configurable:!0}),t.prototype.setEditorVisible=function(t,n){var i=this;e.prototype.setEditorVisible.call(this,t,n),this.toUnbind.push(n.onWillCloseEditor(function(e){e.editor===i.input&&i.doSaveTextEditorViewState(i.input)}))},t.prototype.setOptions=function(e){var t=e;t&&c.isFunction(t.apply)&&t.apply(this.getControl(),0)},t.prototype.setInput=function(t,n,a){var l=this;return this.doSaveTextEditorViewState(this.input),e.prototype.setInput.call(this,t,n,a).then(function(){return t.resolve(!0).then(function(e){if(!a.isCancellationRequested){if(e instanceof g.BinaryEditorModel)return l.openAsBinary(t,n);var i=e,r=!!l.input,o=i.isDisposed(),s=r&&l.input.getResource().toString()!==i.getResource().toString();if(r&&!o&&!s){var u=l.getControl();u.setModel(i.textEditorModel);var d=l.loadTextEditorViewState(l.input.getResource());d&&u.restoreViewState(d),n&&c.isFunction(n.apply)&&n.apply(u,1),u.updateOptions({readOnly:i.isReadonly()})}}},function(e){
if(e.fileOperationResult===m.FileOperationResult.FILE_IS_BINARY)return l.openAsBinary(t,n);if(e.fileOperationResult!==m.FileOperationResult.FILE_IS_DIRECTORY||!l.openAsFolder(t)){if(e.fileOperationResult===m.FileOperationResult.FILE_NOT_FOUND&&u.isValidBasename(u.basename(t.getResource().fsPath)))return i.TPromise.wrapError(o.create(s.toErrorMessage(e),{actions:[new d.Action("workbench.files.action.createMissingFile",r.localize(1,null),null,!0,function(){return l.fileService.updateContent(t.getResource(),"").then(function(){return l.editorService.openEditor({resource:t.getResource(),options:{pinned:!0}})})})]}));if(e.fileOperationResult===m.FileOperationResult.FILE_EXCEED_MEMORY_LIMIT){var a=Math.max(m.MIN_MAX_MEMORY_SIZE_MB,+l.configurationService.getValue(null,"files.maxMemoryForLargeFilesMB")||m.FALLBACK_MAX_MEMORY_SIZE_MB);return i.TPromise.wrapError(o.create(s.toErrorMessage(e),{actions:[new d.Action("workbench.window.action.relaunchWithIncreasedMemoryLimit",r.localize(2,null,a),null,!0,function(){
return l.windowsService.relaunch({addArgs:["--max-memory="+a]})}),new d.Action("workbench.window.action.configureMemoryLimit",r.localize(3,null),null,!0,function(){return l.preferencesService.openGlobalSettings().then(function(e){e instanceof w.PreferencesEditor&&e.focusSearch("files.maxMemoryForLargeFilesMB")})})]}))}return i.TPromise.wrapError(e)}})})},t.prototype.openAsBinary=function(e,t){e.setForceOpenAsBinary(),this.editorService.openEditor(e,t,this.group)},t.prototype.openAsFolder=function(e){var t=this;return this.group.closeEditor(this.input).then(function(){t.contextService.isInsideWorkspace(e.getResource())&&t.viewletService.openViewlet(h.VIEWLET_ID,!0).done(function(t){return t.getExplorerView().select(e.getResource(),!0)},o.onUnexpectedError)}),!0},t.prototype.getAriaLabel=function(){var e=this.input,t=e&&e.getName();return t?r.localize(4,null,t):r.localize(5,null)},t.prototype.clearInput=function(){this.doSaveTextEditorViewState(this.input),this.getControl().setModel(null),
e.prototype.clearInput.call(this)},t.prototype.shutdown=function(){this.doSaveTextEditorViewState(this.input),e.prototype.shutdown.call(this)},t.prototype.doSaveTextEditorViewState=function(e){e&&!e.isDisposed()&&this.saveTextEditorViewState(e.getResource())},t.ID=h.TEXT_FILE_EDITOR_ID,t=a([l(0,y.ITelemetryService),l(1,m.IFileService),l(2,v.IViewletService),l(3,C.IInstantiationService),l(4,b.IWorkspaceContextService),l(5,S.IStorageService),l(6,_.ITextResourceConfigurationService),l(7,x.IEditorService),l(8,I.IThemeService),l(9,k.IEditorGroupsService),l(10,p.ITextFileService),l(11,T.IWindowsService),l(12,E.IPreferencesService)],t)}(f.BaseTextEditor);t.TextFileEditor=D}),define(e[1525],t([1,0,658,16,75,120,56,31,5,1225,102,438,38,11,80,22,83,212,36,10,25,42,34,4,65,104,885,28]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";function L(e){r.Registry.as(s.Extensions.JSONContribution).registerSchema("vscode://schemas/locale",{id:"vscode://schemas/locale",allowComments:!0,
description:"Locale Definition file",type:"object",default:{locale:"en"},required:["locale"],properties:{locale:{type:"string",enum:e,description:i.localize(9,null)}}})}Object.defineProperty(t,"__esModule",{value:!0});r.Registry.as(c.Extensions.WorkbenchActions).registerWorkbenchAction(new u.SyncActionDescriptor(h.ConfigureLocaleAction,h.ConfigureLocaleAction.ID,h.ConfigureLocaleAction.LABEL),"Configure Display Language");var R=function(e){function t(t,n,i,r,o,s,a,c,l,u){var d=e.call(this)||this;return d.localizationService=t,d.notificationService=n,d.jsonEditingService=i,d.environmentService=r,d.windowsService=o,d.storageService=s,d.extensionManagementService=a,d.galleryService=c,d.viewletService=l,d.telemetryService=u,d.updateLocaleDefintionSchema(),d.checkAndInstall(),d._register(d.localizationService.onDidLanguagesChange(function(){return d.updateLocaleDefintionSchema()})),d._register(d.extensionManagementService.onDidInstallExtension(function(e){return d.onDidInstallExtension(e)})),d}return n(t,e),
t.prototype.updateLocaleDefintionSchema=function(){this.localizationService.getLanguageIds().then(function(e){var t=[];e.forEach(function(e){var n=e.toLowerCase();n!==e&&t.push(n)}),L(e.concat(t))})},t.prototype.onDidInstallExtension=function(e){var t=this;if(!this.storageService.getBoolean("langugage.update.donotask")&&e.local&&e.operation===m.InstallOperation.Install&&e.local.manifest.contributes&&e.local.manifest.contributes.localizations&&e.local.manifest.contributes.localizations.length){var n=e.local.manifest.contributes.localizations[0].languageId;if(v.language!==n){var r=v.locale!==n;this.notificationService.prompt(b.default.Info,r?i.localize(0,null,e.local.manifest.contributes.localizations[0].languageName||e.local.manifest.contributes.localizations[0].languageId):i.localize(1,null),[{label:i.localize(2,null),run:function(){var e=C.default.file(E.join(t.environmentService.appSettingsHome,"locale.json"));(r?t.jsonEditingService.write(e,{key:"locale",value:n},!0):T.TPromise.as(null)).then(function(){
return t.windowsService.relaunch({})},function(e){return t.notificationService.error(e)})}},{label:i.localize(3,null),run:function(){}},{label:i.localize(4,null),isSecondary:!0,run:function(){return t.storageService.store("langugage.update.donotask",!0)}}])}}},t.prototype.migrateToMarketplaceLanguagePack=function(e){var t=this;this.isLanguageInstalled(e).then(function(n){n||t.getLanguagePackExtension(e).then(function(e){e&&t.notificationService.prompt(b.default.Warning,i.localize(5,null,e.displayName||e.displayName),[{label:i.localize(6,null),run:function(){return t.installExtension(e)}},{label:i.localize(7,null),run:function(){return window.open("https://go.microsoft.com/fwlink/?linkid=872941")}}])})})},t.prototype.checkAndInstall=function(){var e=this,t=v.language,n=v.locale,r=JSON.parse(this.storageService.get("extensionsAssistant/languagePackSuggestionIgnore",I.StorageScope.GLOBAL,"[]"))
;this.galleryService.isEnabled()&&("en"===t||-1===t.indexOf("en-")?"en"!==n&&-1===n.indexOf("en-")&&(t===n||r.indexOf(t)>-1||this.isLanguageInstalled(n).then(function(o){if(!o){var s=e.getPossibleChineseMapping(n),a=e.galleryService.query({names:["MS-CEINTL.vscode-language-pack-"+s],pageSize:1}),c=e.galleryService.query({text:"tag:lp-"+n,pageSize:1});T.TPromise.join([a,c]).then(function(o){var s=o[0],a=o[1];if(0!==s.total||0!==a.total){var c=1===s.total?s.firstPage[0]:1===a.total?a.firstPage[0]:null,l=c||(a.total>0?a.firstPage[0]:null);l&&l.assets.manifest&&T.TPromise.join([e.galleryService.getManifest(l),e.galleryService.getCoreTranslation(l,n)]).then(function(o){var s=o[0],a=o[1],l=s&&s.contributes&&s.contributes.localizations&&s.contributes.localizations.filter(function(e){return e.languageId.toLowerCase()===n
})[0],u=l?l.languageName||n:n,d=l?l.localizedLanguageName||l.languageName||n:n,h=a&&a.contents?a.contents["vs/platform/node/minimalTranslations"]:{},p=c?"installAndRestartMessage":"showLanguagePackExtensions",f=!h[p],g={};Object.keys(D.minimumTranslatedStrings).forEach(function(e){!h[e]||f?g[e]=D.minimumTranslatedStrings[e].replace("{0}",u):g[e]=h[e].replace("{0}",d)+" ("+D.minimumTranslatedStrings[e].replace("{0}",u)+")"});var v=function(n){e.telemetryService.publicLog("languagePackSuggestion:popup",{userReaction:n,language:t})},m={label:g.searchMarketplace,run:function(){v("search"),e.viewletService.openViewlet(k.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("tag:lp-"+n),e.focus()})}},y={label:g.installAndRestart,run:function(){v("installAndRestart"),e.installExtension(c).then(function(){return e.windowsService.relaunch({})})}},S=g[p];e.notificationService.prompt(b.default.Info,S,[c?y:m,{label:i.localize(8,null),isSecondary:!0,run:function(){r.push(t),
e.storageService.store("extensionsAssistant/languagePackSuggestionIgnore",JSON.stringify(r),I.StorageScope.GLOBAL),v("neverShowAgain")}}],function(){v("cancelled")})})}})}})):this.migrateToMarketplaceLanguagePack(t))},t.prototype.getPossibleChineseMapping=function(e){return"zh-cn"===(e=e.toLowerCase())?"zh-hans":"zh-tw"===e?"zh-hant":e},t.prototype.getLanguagePackExtension=function(e){var t=this;return this.localizationService.getLanguageIds(f.LanguageType.Core).then(function(n){if(n.some(function(t){return t.toLowerCase()===e})){var i="MS-CEINTL.vscode-language-pack-"+("zh-cn"===e?"zh-hans":"zh-tw"===e?"zh-hant":e);return t.galleryService.query({names:[i],pageSize:1}).then(function(e){return 1===e.total?e.firstPage[0]:null})}return null})},t.prototype.isLanguageInstalled=function(e){return this.extensionManagementService.getInstalled(m.LocalExtensionType.User).then(function(t){return t.some(function(t){
return t.manifest&&t.manifest.contributes&&t.manifest.contributes.localizations&&t.manifest.contributes.localizations.length&&t.manifest.contributes.localizations.some(function(t){return t.languageId.toLowerCase()===e})})})},t.prototype.installExtension=function(e){var t=this;return this.viewletService.openViewlet(k.VIEWLET_ID).then(function(e){return e}).then(function(t){return t.search("@id:"+e.identifier.id)}).then(function(){return t.extensionManagementService.installFromGallery(e)}).then(function(){return null},function(e){return t.notificationService.error(e)})},t=a([l(0,f.ILocalizationsService),l(1,y.INotificationService),l(2,S.IJSONEditingService),l(3,_.IEnvironmentService),l(4,w.IWindowsService),l(5,I.IStorageService),l(6,m.IExtensionManagementService),l(7,m.IExtensionGalleryService),l(8,x.IViewletService),l(9,A.ITelemetryService)],t)}(d.Disposable);t.LocalizationWorkbenchContribution=R,L([v.language]);r.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(R,g.LifecyclePhase.Eventually),
p.ExtensionsRegistry.registerExtensionPoint("localizations",[],{description:i.localize(10,null),type:"array",default:[],items:{type:"object",required:["languageId","translations"],defaultSnippets:[{body:{languageId:"",languageName:"",localizedLanguageName:"",translations:[{id:"vscode",path:""}]}}],properties:{languageId:{description:i.localize(11,null),type:"string"},languageName:{description:i.localize(12,null),type:"string"},localizedLanguageName:{description:i.localize(13,null),type:"string"},translations:{description:i.localize(14,null),type:"array",default:[{id:"vscode",path:""}],items:{type:"object",required:["id","path"],properties:{id:{type:"string",description:i.localize(15,null),pattern:"^((vscode)|([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*))$",patternErrorMessage:i.localize(16,null)},path:{type:"string",description:i.localize(17,null)}},defaultSnippets:[{body:{id:"",path:""}}]}}}}})}),
define(e[1526],t([1,0,59,8,82,41,118,205,23,20,18,9,7,149,5,50,14,4,45,19,44,389,669,17,15,35,6,37,52,58,90,34,68,12,173,99,98,21,245,381,1038,899]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G){"use strict";function j(e,t){return o(this,void 0,void 0,function(){var n,i;return s(this,function(r){switch(r.label){case 0:return n=e.get(z.IViewsService),[4,n.openView(U.OutlineViewId)];case 1:return(i=r.sent())instanceof Q&&i.focusHighlightedElement(t),[2]}})})}Object.defineProperty(t,"__esModule",{value:!0});var q=function(){function e(e,t,n,i){this._editorId=e,this._modelId=t,this._modelVersion=n,this._providerCount=i}return e.prototype.equals=function(e){return e&&this._editorId===e._editorId&&this._modelId===e._modelId&&this._modelVersion===e._modelVersion&&this._providerCount===e._providerCount},e}(),$=function(){function e(e,t,n){this._callback=e,this._featureRegistry=t,this._editorService=n,this._disposables=new Array,
n.onDidActiveEditorChange(this._update,this,this._disposables),t.onDidChange(this._update,this,this._disposables),this._update()}return e.prototype.dispose=function(){b.dispose(this._disposables),b.dispose(this._sessionDisposable)},e.prototype._update=function(){var e=this,t=this._editorService.activeTextEditorWidget,n=void 0;if(E.isCodeEditor(t)?n=t:E.isDiffEditor(t)&&(n=t.getModifiedEditor()),!n||!n.getModel())return this._lastState=void 0,void this._callback(void 0,void 0);var i=new q(n.getId(),n.getModel().id,n.getModel().getVersionId(),this._featureRegistry.all(n.getModel()).length);if(!i.equals(this._lastState)){b.dispose(this._sessionDisposable),this._lastState=i,this._callback(n,void 0);var r,o=n.onDidChangeModelContent(function(t){clearTimeout(r),r=setTimeout(function(){return e._callback(n,t)},350)}),s=n.onDidChangeModelLanguage(function(t){e._callback(n,void 0)});this._sessionDisposable={dispose:function(){o.dispose(),clearTimeout(r),s.dispose()}}}},e=a([l(2,H.IEditorService)],e)}(),Y=function(e){
function t(t,n,i,r){var o=e.call(this,"simple"+y.defaultGenerator.nextId(),t,r,!0,function(e){o.checked=!o.checked,i(o)})||this;return o.checked=n,o}return n(t,e),t}(p.Action),X=function(){function e(){this._followCursor=!1,this._filterOnType=!0,this._sortBy=G.OutlineItemCompareType.ByKind,this._onDidChange=new m.Emitter,this.onDidChange=this._onDidChange.event}return Object.defineProperty(e.prototype,"followCursor",{get:function(){return this._followCursor},set:function(e){e!==this._followCursor&&(this._followCursor=e,this._onDidChange.fire({followCursor:!0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterOnType",{get:function(){return this._filterOnType},set:function(e){e!==this._filterOnType&&(this._filterOnType=e,this._onDidChange.fire({filterOnType:!0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortBy",{get:function(){return this._sortBy},set:function(e){e!==this._sortBy&&(this._sortBy=e,this._onDidChange.fire({sortBy:!0}))},enumerable:!0,
configurable:!0}),e.prototype.persist=function(e){e.store("outline/state",JSON.stringify({followCursor:this.followCursor,sortBy:this.sortBy}),N.StorageScope.WORKSPACE)},e.prototype.restore=function(e){var t=e.get("outline/state",N.StorageScope.WORKSPACE);if(t){var n;try{n=JSON.parse(t)}catch(e){return}this.followCursor=n.followCursor,this.sortBy=n.sortBy}},e}(),Q=function(e){function t(t,n,i,r,o,s,a,c,l,u,d){var h=e.call(this,t,l,d,c)||this;return h._instantiationService=n,h._themeService=i,h._storageService=r,h._editorService=o,h._markerService=s,h._configurationService=a,h._disposables=new Array,h._editorDisposables=new Array,h._outlineViewState=new X,h._treeStates=new S.LRUCache(10),h._outlineViewState.restore(h._storageService),h._contextKeyFocused=U.OutlineViewFocused.bindTo(u),h._contextKeyFiltered=U.OutlineViewFiltered.bindTo(u),h._disposables.push(h.onDidFocus(function(e){return h._contextKeyFocused.set(!0)})),h._disposables.push(h.onDidBlur(function(e){return h._contextKeyFocused.set(!1)})),h}
return n(t,e),t.prototype.dispose=function(){b.dispose(this._disposables),b.dispose(this._requestOracle),b.dispose(this._editorDisposables),e.prototype.dispose.call(this)},t.prototype.focus=function(){this._tree&&this._tree.domFocus()},t.prototype.renderBody=function(e){var t=this;this._domNode=e,r.addClass(e,"outline-panel");var i=r.$(".outline-progress");this._message=r.$(".outline-message"),this._inputContainer=r.$(".outline-input"),this._progressBar=new h.ProgressBar(i),this.disposables.push(F.attachProgressBarStyler(this._progressBar,this._themeService));var o=r.$(".outline-tree");r.append(e,i,this._message,this._inputContainer,o),this._input=new d.InputBox(this._inputContainer,null,{placeholder:this._outlineViewState.filterOnType?x.localize(0,null):x.localize(1,null)}),this._input.disable(),this.disposables.push(F.attachInputBoxStyler(this._input,this._themeService)),this.disposables.push(r.addStandardDisposableListener(this._input.inputElement,"keyup",function(e){if(18===e.keyCode)t._tree.focusNext(),
t._tree.domFocus();else if(16===e.keyCode)t._tree.focusPrevious(),t._tree.domFocus();else if(3===e.keyCode){var n=t._tree.getFocus();n instanceof T.OutlineElement&&t._revealTreeSelection(T.OutlineModel.get(n),n,!0,!1)}else 9===e.keyCode&&(t._input.value="",t._tree.domFocus())}));var s=this,a=new(function(e){function t(){var t=e.call(this,{},s.configurationService)||this;return t._mapper=K.KeyboardMapperFactory.INSTANCE,t}return n(t,e),t.prototype.onKeyDown=function(t,n){if(e.prototype.onKeyDown.call(this,t,n))return!0;if(this.upKeyBindingDispatcher.has(n.keyCode))return!1;var i=this._mapper.getRawKeyboardMapping();if(!i)return!1;return!!i[n.code].value&&(s._input.focus(),!0)},t}(G.OutlineController));this._treeRenderer=this._instantiationService.createInstance(G.OutlineRenderer),this._treeDataSource=new G.OutlineDataSource,this._treeComparator=new G.OutlineItemComparator(this._outlineViewState.sortBy),this._treeFilter=new G.OutlineItemFilter,
this._tree=this._instantiationService.createInstance(M.WorkbenchTree,o,{controller:a,renderer:this._treeRenderer,dataSource:this._treeDataSource,sorter:this._treeComparator,filter:this._treeFilter},{}),this._treeRenderer.renderProblemColors=this._configurationService.getValue(U.OutlineConfigKeys.problemsColors),this._treeRenderer.renderProblemBadges=this._configurationService.getValue(U.OutlineConfigKeys.problemsBadges),this._disposables.push(this._tree,this._input),this._disposables.push(this._outlineViewState.onDidChange(this._onDidChangeUserState,this)),r.toggleClass(this._domNode,"no-icons",!this._configurationService.getValue(U.OutlineConfigKeys.icons)),this.disposables.push(this._configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration(U.OutlineConfigKeys.icons)&&r.toggleClass(t._domNode,"no-icons",!t._configurationService.getValue(U.OutlineConfigKeys.icons))}))},t.prototype.layoutBody=function(e){void 0===e&&(e=this._cachedHeight),this._cachedHeight=e,this._input.layout(),
this._tree.layout(e-(r.getTotalHeight(this._inputContainer)+5))},t.prototype.setVisible=function(t){var n=this;return t?this._requestOracle=this._requestOracle||this._instantiationService.createInstance($,function(e,t){return n._doUpdate(e,t).then(void 0,v.onUnexpectedError)},I.DocumentSymbolProviderRegistry):(b.dispose(this._requestOracle),this._requestOracle=void 0,this._doUpdate(void 0,void 0)),e.prototype.setVisible.call(this,t)},t.prototype.getActions=function(){var e=this;return[new p.Action("collapse",x.localize(2,null),"explorer-action collapse-explorer",!0,function(){return new V.CollapseAction(e._tree,!0,void 0).run()})]},t.prototype.getSecondaryActions=function(){var e,t=this,n=new p.RadioGroup([new Y(x.localize(3,null),this._outlineViewState.sortBy===G.OutlineItemCompareType.ByPosition,function(e){return t._outlineViewState.sortBy=G.OutlineItemCompareType.ByPosition}),new Y(x.localize(4,null),this._outlineViewState.sortBy===G.OutlineItemCompareType.ByName,function(e){
return t._outlineViewState.sortBy=G.OutlineItemCompareType.ByName}),new Y(x.localize(5,null),this._outlineViewState.sortBy===G.OutlineItemCompareType.ByKind,function(e){return t._outlineViewState.sortBy=G.OutlineItemCompareType.ByKind})]),i=[new Y(x.localize(6,null),this._outlineViewState.followCursor,function(e){return t._outlineViewState.followCursor=e.checked}),new Y(x.localize(7,null),this._outlineViewState.filterOnType,function(e){return t._outlineViewState.filterOnType=e.checked}),new u.Separator].concat(n.actions);return(e=this.disposables).push.apply(e,i),this.disposables.push(n),i},t.prototype._onDidChangeUserState=function(e){this._outlineViewState.persist(this._storageService),e.followCursor,e.sortBy&&(this._treeComparator.type=this._outlineViewState.sortBy,this._tree.refresh(void 0,!0)),e.filterOnType&&this._applyTypeToFilter()},t.prototype._showMessage=function(e){r.addClass(this._domNode,"message"),this._tree.setInput(void 0),this._progressBar.stop().hide(),this._message.innerText=_.escape(e)},
t.prototype._doUpdate=function(e,t){return o(this,void 0,C.TPromise,function(){var n,a,l,u,d,h,p,v,m,y,S,_,E,w,k,D,A=this;return s(this,function(L){switch(L.label){case 0:return b.dispose(this._editorDisposables),this._editorDisposables=new Array,this._progressBar.infinite().show(150),this._input.disable(),t||(this._input.value=""),e&&I.DocumentSymbolProviderRegistry.has(e.getModel())?(n=e.getModel(),(l=this._tree.getInput())||(a=g.setDisposableTimeout(function(){return A._showMessage(x.localize(9,null,i.posix.basename(n.uri.path)))},100)),[4,g.asDisposablePromise(T.OutlineModel.create(n),void 0,this._editorDisposables).promise]):[2,this._showMessage(x.localize(8,null))];case 1:return u=L.sent(),b.dispose(a),u?(d=T.TreeElement.size(u))>7500?[2,this._showMessage(x.localize(10,null))]:(r.removeClass(this._domNode,"message"),t&&l&&n.getLineCount()>=25?(h=n.getValueLength(),p=d/h,v=T.TreeElement.size(l),m=h-t.changes.reduce(function(e,t){return e+t.rangeLength},0),y=v/m,
p<=.5*y||p>=1.5*y?[4,g.asDisposablePromise(C.TPromise.timeout(2e3).then(function(e){return!0}),!1,this._editorDisposables).promise]:[3,3]):[3,3]):[2];case 2:if(!L.sent())return[2];L.label=3;case 3:return this._progressBar.stop().hide(),l&&l.adopt(u)?(this._tree.refresh(void 0,!0),u=l,[3,6]):[3,4];case 4:return l&&(S=G.OutlineTreeState.capture(this._tree),this._treeStates.set(l.textModel.uri.toString(),S)),[4,this._tree.setInput(u)];case 5:L.sent(),_=this._treeStates.get(u.textModel.uri.toString()),G.OutlineTreeState.restore(this._tree,_,this),L.label=6;case 6:return this._input.enable(),this.layoutBody(),w=function(e){return o(A,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return this._contextKeyFiltered.set(e.length>0),e&&!E&&(E=G.OutlineTreeState.capture(this._tree)),t=u.updateMatches(e),[4,this._tree.refresh(void 0,!0)];case 1:return n.sent(),t?[4,this._tree.expandAll(void 0)]:[3,4];case 2:return n.sent(),[4,this._tree.reveal(t)];case 3:n.sent(),
this._tree.setFocus(t,this),this._tree.setSelection([t],this),n.label=4;case 4:return e||!E?[3,6]:[4,G.OutlineTreeState.restore(this._tree,E,this)];case 5:n.sent(),E=void 0,n.label=6;case 6:return[2]}})})},this._input.value&&w(this._input.value),this._editorDisposables.push(this._input.onDidChange(w)),this._editorDisposables.push({dispose:function(){return A._contextKeyFiltered.reset()}}),this._editorDisposables.push(this._tree.onDidChangeSelection(function(e){if(!(e.payload===A||e.payload&&e.payload.didClickOnTwistie)){var t=e.selection[0];if(t instanceof T.OutlineElement){var n=!1,i=!1;if(e.payload)if("keyboard"===e.payload.origin)n=!0;else if("mouse"===e.payload.origin&&e.payload.originalEvent instanceof c.StandardMouseEvent){var r=e.payload.originalEvent;n=2===r.detail,i=!A._tree.useAltAsMultipleSelectionModifier&&r.altKey||A._tree.useAltAsMultipleSelectionModifier&&(r.ctrlKey||r.metaKey)}A._revealTreeSelection(u,t,n,i)}}})),this._revealEditorSelection(u,e.getSelection()),k=u.textModel.getVersionId(),
this._editorDisposables.push(e.onDidChangeCursorSelection(function(e){u.textModel.isDisposed()||u.textModel.getVersionId()!==k||A._revealEditorSelection(u,e.selection)})),(D=function(e,t){if(A._configurationService.getValue(U.OutlineConfigKeys.problemsEnabled)&&!(f.firstIndex(e,function(e){return e.toString()===n.uri.toString()})<0)){var i=A._markerService.read({resource:n.uri,severities:P.MarkerSeverity.Error|P.MarkerSeverity.Warning});(i.length>0||!t)&&(u.updateMarker(i),A._tree.refresh(void 0,!0))}})([n.uri],!0),this._editorDisposables.push(this._markerService.onMarkerChanged(D)),this._editorDisposables.push(this.configurationService.onDidChangeConfiguration(function(e){if(e.affectsConfiguration(U.OutlineConfigKeys.problemsBadges)||e.affectsConfiguration(U.OutlineConfigKeys.problemsColors))return A._treeRenderer.renderProblemColors=A._configurationService.getValue(U.OutlineConfigKeys.problemsColors),A._treeRenderer.renderProblemBadges=A._configurationService.getValue(U.OutlineConfigKeys.problemsBadges),
void A._tree.refresh(void 0,!0);e.affectsConfiguration(U.OutlineConfigKeys.problemsEnabled)&&(A._configurationService.getValue(U.OutlineConfigKeys.problemsEnabled)?D([n.uri],!0):(u.updateMarker([]),A._tree.refresh(void 0,!0)))})),[2]}})})},t.prototype._applyTypeToFilter=function(){this._outlineViewState.filterOnType?(this._treeFilter.enabled=!0,this._treeDataSource.filterOnScore=!0,this._input.setPlaceHolder(x.localize(11,null))):(this._treeFilter.enabled=!1,this._treeDataSource.filterOnScore=!1,this._input.setPlaceHolder(x.localize(12,null))),this._tree.getInput()&&this._tree.refresh(void 0,!0)},t.prototype._revealTreeSelection=function(e,t,n,i){return o(this,void 0,C.TPromise,function(){var r;return s(this,function(o){switch(o.label){case 0:return r=this._editorService.createInput({resource:e.textModel.uri}),[4,this._editorService.openEditor(r,{preserveFocus:!n,selection:w.Range.collapseToStart(t.symbol.selectionRange),revealInCenterIfOutsideViewport:!0,forceOpen:!0},i?H.SIDE_GROUP:H.ACTIVE_GROUP)];case 1:
return o.sent(),[2]}})})},t.prototype._revealEditorSelection=function(e,t){return o(this,void 0,C.TPromise,function(){var n,i;return s(this,function(r){switch(r.label){case 0:return this._outlineViewState.followCursor&&this._tree.getInput()?(n=this._tree.getSelection()[0],(i=e.getItemEnclosingPosition({lineNumber:t.selectionStartLineNumber,column:t.selectionStartColumn},n instanceof T.OutlineElement?n:void 0))?[4,this._tree.reveal(i,.5)]:[3,2]):[2];case 1:r.sent(),this._tree.setFocus(i,this),this._tree.setSelection([i],this),r.label=2;case 2:return[2]}})})},t.prototype.focusHighlightedElement=function(e){if(this._tree.getInput())if(this._tree.isDOMFocused()){for(var t,n=this._tree.getNavigator(this._tree.getFocus(),!1);t=e?n.previous():n.next();)if(t instanceof T.OutlineElement&&t.score&&t.score[1].length>0){this._tree.setFocus(t,this),this._tree.reveal(t).then(void 0,v.onUnexpectedError);break}}else this._tree.domFocus()},
t=a([l(1,L.IInstantiationService),l(2,W.IThemeService),l(3,N.IStorageService),l(4,H.IEditorService),l(5,P.IMarkerService),l(6,k.IConfigurationService),l(7,k.IConfigurationService),l(8,R.IKeybindingService),l(9,D.IContextKeyService),l(10,A.IContextMenuService)],t)}(B.ViewletPanel);t.OutlinePanel=Q,O.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"outline.focusDownHighlighted",weight:O.KeybindingsRegistry.WEIGHT.workbenchContrib(),primary:18,when:D.ContextKeyExpr.and(U.OutlineViewFiltered,U.OutlineViewFocused),handler:function(e){return j(e,!1)}}),O.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"outline.focusUpHighlighted",weight:O.KeybindingsRegistry.WEIGHT.workbenchContrib(),primary:16,when:D.ContextKeyExpr.and(U.OutlineViewFiltered,U.OutlineViewFocused),handler:function(e){return j(e,!0)}})}),define(e[1527],t([1,0,29,668,98,1526,31,96,16,63,381]),function(e,t,n,i,r,o,s,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d,h={id:u.OutlineViewId,
name:i.localize(0,null),ctor:o.OutlinePanel,container:a.VIEW_CONTAINER,canToggleVisibility:!0,hideByDefault:!1,collapsed:!0,order:2,weight:30};r.ViewsRegistry.registerViews([h]),n.CommandsRegistry.registerCommand("outline.focus",function(e){return e.get(r.IViewsService).openView(u.OutlineViewId,!0)}),s.MenuRegistry.addCommand({id:"outline.focus",category:i.localize(1,null),title:i.localize(2,null)}),c.Registry.as(l.Extensions.Configuration).registerConfiguration({id:"outline",order:117,title:i.localize(3,null),type:"object",properties:(d={},d[u.OutlineConfigKeys.icons]={description:i.localize(4,null),type:"boolean",default:!0},d[u.OutlineConfigKeys.problemsEnabled]={description:i.localize(5,null),type:"boolean",default:!0},d[u.OutlineConfigKeys.problemsEnabled]={description:i.localize(6,null),type:"boolean",default:!0},d[u.OutlineConfigKeys.problemsColors]={description:i.localize(7,null),type:"boolean",default:!0},d[u.OutlineConfigKeys.problemsBadges]={description:i.localize(8,null),type:"boolean",default:!0
},d)})}),define(e[1528],t([1,0,36,49,6,38,42,75,16,253,4,59,674,87,25,100]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e,t,n,i,r,s){var a=this;this._windowsService=e,this._dialogService=t,this._environmentService=n,this._instantiationService=i,Promise.all([r.when(o.LifecyclePhase.Eventually),s.whenInstalledExtensionsRegistered()]).then(function(){a._stopProfiling()})}return e.prototype._stopProfiling=function(){var e=this,t=this._environmentService.args["prof-startup-prefix"];if(t){var n=p.dirname(t),i=v.basename(t),r=["--prof-startup"];g.readFile(t).then(function(e){return r.push.apply(r,e.toString().split("|"))}).then(function(){return g.del(t)}).then(function(){return h.TPromise.timeout(1e3)}).then(function(){return g.readdir(n).then(function(e){return e.filter(function(e){return 0===e.indexOf(i)})})}).then(function(t){var i=t.reduce(function(e,t){return""+e+p.join(n,t)+"\n"},"\n");return e._dialogService.confirm({
type:"info",message:f.localize(0,null),detail:f.localize(1,null,i),primaryButton:f.localize(2,null),secondaryButton:f.localize(3,null)}).then(function(i){if(i.confirmed){var o=e._instantiationService.createInstance(d.ReportPerformanceIssueAction,d.ReportPerformanceIssueAction.ID,d.ReportPerformanceIssueAction.LABEL);h.TPromise.join([e._windowsService.showItemInFolder(p.join(n,t[0])),o.run(":warning: Make sure to **attach** these files from your *home*-directory: :warning:\n"+t.map(function(e){return"-`"+e+"`"}).join("\n"))]).then(function(){return e._dialogService.confirm({type:"info",message:f.localize(4,null),detail:f.localize(5,null,e._environmentService.appNameLong),primaryButton:f.localize(6,null),secondaryButton:null}).then(function(){e._windowsService.relaunch({removeArgs:r})})})}else e._windowsService.relaunch({removeArgs:r})})})}},e=a([l(0,s.IWindowsService),l(1,m.IDialogService),l(2,n.IEnvironmentService),l(3,r.IInstantiationService),l(4,o.ILifecycleService),l(5,i.IExtensionService)],e)}()
;u.Registry.as(c.Extensions.Workbench).registerWorkbenchContribution(y,o.LifecyclePhase.Running)}),define(e[1529],t([1,0,49,38,42,75,16,4,28,357,9,65,96,21,45,20,77,81,287]),function(e,t,n,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e,t,n,i,r,o,s,a,c,l){this._logService=e,this._timerService=t,this._windowsService=n,this._editorService=i,this._viewletService=r,this._panelService=o,this._telemetryService=s,this._lifecycleService=a,this._extensionService=c,this._updateService=l,this._reportVariedStartupTimes().then(void 0,f.onUnexpectedError),this._reportStandardStartupTimes().then(void 0,f.onUnexpectedError)}return e.prototype._reportVariedStartupTimes=function(){return o(this,void 0,d.TPromise,function(){return s(this,function(e){switch(e.label){case 0:return[4,d.TPromise.join([this._extensionService.whenInstalledExtensionsRegistered(),this._lifecycleService.when(i.LifecyclePhase.Eventually)])];case 1:return e.sent(),
this._telemetryService.publicLog("startupTimeVaried",this._timerService.startupMetrics),[2]}})})},e.prototype._reportStandardStartupTimes=function(){return o(this,void 0,d.TPromise,function(){var e;return s(this,function(t){switch(t.label){case 0:return this._lifecycleService.startupKind!==i.StartupKind.NewWindow?(this._logService.info("no standard startup: not a new window"),[2]):[4,this._windowsService.getWindowCount()];case 1:return 1!==t.sent()?(this._logService.info("no standard startup: not just one window"),[2]):this._viewletService.getActiveViewlet()&&this._viewletService.getActiveViewlet().getId()===v.VIEWLET_ID?1===(e=this._editorService.visibleControls).length&&y.isCodeEditor(e[0].getControl())?this._panelService.getActivePanel()?(this._logService.info("no standard startup: panel is active"),[2]):this._didUseCachedData()?[4,this._updateService.isLatestVersion()]:(this._logService.info("no standard startup: not using cached data"),
[2]):(this._logService.info("no standard startup: not just one text editor"),[2]):(this._logService.info("no standard startup: not the explorer viewlet"),[2]);case 2:return t.sent()?[4,d.TPromise.join([this._extensionService.whenInstalledExtensionsRegistered(),this._lifecycleService.when(i.LifecyclePhase.Eventually)])]:(this._logService.info("no standard startup: not running latest version"),[2]);case 3:return t.sent(),this._telemetryService.publicLog("startupTime",this._timerService.startupMetrics),this._logService.info("standard startup",this._timerService.startupMetrics),[2]}})})},e.prototype._didUseCachedData=function(){return!!Boolean(global.require.getConfig().nodeCachedDataDir)&&!!b.isFalsyOrEmpty(MonacoEnvironment.onNodeCachedData)},e=a([l(0,S.ILogService),l(1,p.ITimerService),l(2,r.IWindowsService),l(3,m.IEditorService),l(4,g.IViewletService),l(5,_.IPanelService),l(6,h.ITelemetryService),l(7,i.ILifecycleService),l(8,n.IExtensionService),l(9,C.IUpdateService)],e)}()
;u.Registry.as(c.Extensions.Workbench).registerWorkbenchContribution(E,i.LifecyclePhase.Running)}),define(e[1530],t([1,0,1528,1529,1140]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(e[1531],t([1,0,4,691,9,122,109,86,65,125,94,81,64,23,37,14,110,98,15,16]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_PICKER_PREFIX="view ";var E=function(e){function t(t,n,i){var r=e.call(this)||this;return r.label=t,r.category=n,r.open=i,r}return n(t,e),t.prototype.getLabel=function(){return this.label},t.prototype.getCategory=function(){return this.category},t.prototype.getAriaLabel=function(){return r.localize(0,null,this.getLabel())},t.prototype.run=function(t,n){return t===s.Mode.OPEN?this.runOpen(n):e.prototype.run.call(this,t,n)},t.prototype.runOpen=function(e){var t=this;return setTimeout(function(){t.open()},0),!0},t}(c.QuickOpenEntryGroup);t.ViewEntry=E;var w=function(e){function t(t,n,i,r,o,s){
var a=e.call(this)||this;return a.viewletService=t,a.viewsService=n,a.outputService=i,a.terminalService=r,a.panelService=o,a.contextKeyService=s,a}return n(t,e),t.prototype.getResults=function(e){e=e.trim();var t,n=y.stripWildcards(e).toLowerCase(),r=this.getViewEntries().filter(function(t){if(!e)return!0;var i=b.matchesFuzzy(n,t.getLabel(),!0);return i&&t.setHighlights(i),!(!i&&!y.fuzzyContains(t.getCategory(),n))});return r.forEach(function(e,n){t!==e.getCategory()?(t=e.getCategory(),e.setShowBorder(n>0),e.setGroupLabel(t)):(e.setShowBorder(!1),e.setGroupLabel(void 0))}),i.TPromise.as(new c.QuickOpenModel(r))},t.prototype.getViewEntries=function(){var e=this,t=[],n=this.viewletService.getViewlets();n.forEach(function(n,i){return t.push(new E(n.name,r.localize(1,null),function(){return e.viewletService.openViewlet(n.id,!0).done(null,o.onUnexpectedError)}))});this.panelService.getPanels().forEach(function(n,i){return t.push(new E(n.name,r.localize(2,null),function(){
return e.panelService.openPanel(n.id,!0).done(null,o.onUnexpectedError)}))}),n.forEach(function(n,i){var r=C.Registry.as(S.Extensions.ViewContainersRegistry).get(n.id);if(r){var o=function(t,n){var i=S.ViewsRegistry.getViews(n),r=[];if(i.length)for(var o=function(n){e.contextKeyService.contextMatchesRules(n.when)&&r.push(new E(n.name,t.name,function(){return e.viewsService.openView(n.id,!0)}))},s=0,a=i;s<a.length;s++)o(a[s]);return r}(n,r);t.push.apply(t,o)}});var i=r.localize(3,null);this.terminalService.terminalTabs.forEach(function(n,s){n.terminalInstances.forEach(function(n,a){var c=s+1+"."+(a+1),l=new E(r.localize(4,null,c,n.title),i,function(){e.terminalService.showPanel(!0).done(function(){e.terminalService.setActiveInstance(n)},o.onUnexpectedError)});t.push(l)})});return this.outputService.getChannels().forEach(function(n,i){var s=r.localize(5,null),a=new E(n.label,s,function(){return e.outputService.showChannel(n.id).done(null,o.onUnexpectedError)});t.push(a)}),t},
t.prototype.getAutoFocus=function(e,t){return{autoFocusFirstEntry:!!e||!!t.quickNavigateConfiguration}},t.ID="workbench.picker.views",t=a([l(0,d.IViewletService),l(1,S.IViewsService),l(2,h.IOutputService),l(3,p.ITerminalService),l(4,f.IPanelService),l(5,_.IContextKeyService)],t)}(u.QuickOpenHandler);t.ViewPickerHandler=w;var I=function(e){function i(n,i,r){return e.call(this,n,i,t.VIEW_PICKER_PREFIX,r)||this}return n(i,e),i.ID="workbench.action.openView",i.LABEL=r.localize(6,null),i=a([l(2,g.IQuickOpenService)],i)}(u.QuickOpenAction);t.OpenViewPickerAction=I;var T=function(e){function o(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=i,o.keybindingService=r,o}return n(o,e),o.prototype.run=function(){var e=this.keybindingService.lookupKeybindings(this.id);return this.quickOpenService.show(t.VIEW_PICKER_PREFIX,{quickNavigateConfiguration:{keybindings:e}}),i.TPromise.as(!0)},o.ID="workbench.action.quickOpenView",o.LABEL=r.localize(7,null),
o=a([l(2,g.IQuickOpenService),l(3,m.IKeybindingService)],o)}(v.Action);t.QuickOpenViewPickerAction=T}),define(e[1532],t([1,0,11,690,86,16,31,56,1228,272,1227,1229,1531,164,15,52]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=o.Registry.as(a.Extensions.WorkbenchActions);v.registerWorkbenchAction(new s.SyncActionDescriptor(l.ClearCommandHistoryAction,l.ClearCommandHistoryAction.ID,l.ClearCommandHistoryAction.LABEL),"Clear Command History"),v.registerWorkbenchAction(new s.SyncActionDescriptor(l.ShowAllCommandsAction,l.ShowAllCommandsAction.ID,l.ShowAllCommandsAction.LABEL,{primary:3118,secondary:[59]}),"Show All Commands"),v.registerWorkbenchAction(new s.SyncActionDescriptor(u.GotoLineAction,u.GotoLineAction.ID,u.GotoLineAction.LABEL,{primary:2085,mac:{primary:293}}),"Go to Line..."),v.registerWorkbenchAction(new s.SyncActionDescriptor(c.GotoSymbolAction,c.GotoSymbolAction.ID,c.GotoSymbolAction.LABEL,{primary:3117}),"Go to Symbol in File...")
;var m=f.ContextKeyExpr.and(p.inQuickOpenContext,f.ContextKeyExpr.has("inViewsPicker")),y={primary:2095,mac:{primary:303},linux:{primary:null}},b=i.localize(0,null);v.registerWorkbenchAction(new s.SyncActionDescriptor(h.OpenViewPickerAction,h.OpenViewPickerAction.ID,h.OpenViewPickerAction.LABEL),"View: Open View",b),v.registerWorkbenchAction(new s.SyncActionDescriptor(h.QuickOpenViewPickerAction,h.QuickOpenViewPickerAction.ID,h.QuickOpenViewPickerAction.LABEL,y),"View: Quick Open View",b);g.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigateNextInViewPicker",weight:g.KeybindingsRegistry.WEIGHT.workbenchContrib(50),handler:p.getQuickNavigateHandler("workbench.action.quickOpenNavigateNextInViewPicker",!0),when:m,primary:y.primary,linux:y.linux,mac:y.mac});g.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigatePreviousInViewPicker",weight:g.KeybindingsRegistry.WEIGHT.workbenchContrib(50),
handler:p.getQuickNavigateHandler("workbench.action.quickOpenNavigatePreviousInViewPicker",!1),when:m,primary:1024|y.primary,linux:y.linux,mac:{primary:1024|y.mac.primary}}),o.Registry.as(r.Extensions.Quickopen).registerQuickOpenHandler(new r.QuickOpenHandlerDescriptor(l.CommandsHandler,l.CommandsHandler.ID,l.ALL_COMMANDS_PREFIX,"inCommandsPicker",i.localize(1,null))),o.Registry.as(r.Extensions.Quickopen).registerQuickOpenHandler(new r.QuickOpenHandlerDescriptor(u.GotoLineHandler,u.GotoLineHandler.ID,u.GOTO_LINE_PREFIX,null,[{prefix:u.GOTO_LINE_PREFIX,needsEditor:!0,description:n.isMacintosh?i.localize(2,null):i.localize(3,null)}])),o.Registry.as(r.Extensions.Quickopen).registerQuickOpenHandler(new r.QuickOpenHandlerDescriptor(c.GotoSymbolHandler,c.GotoSymbolHandler.ID,c.GOTO_SYMBOL_PREFIX,"inFileSymbolsPicker",[{prefix:c.GOTO_SYMBOL_PREFIX,needsEditor:!0,description:i.localize(4,null)},{prefix:c.GOTO_SYMBOL_PREFIX+c.SCOPE_PREFIX,needsEditor:!0,description:i.localize(5,null)}])),
o.Registry.as(r.Extensions.Quickopen).registerQuickOpenHandler(new r.QuickOpenHandlerDescriptor(d.HelpHandler,d.HelpHandler.ID,d.HELP_PREFIX,null,i.localize(6,null))),o.Registry.as(r.Extensions.Quickopen).registerQuickOpenHandler(new r.QuickOpenHandlerDescriptor(h.ViewPickerHandler,h.ViewPickerHandler.ID,h.VIEW_PICKER_PREFIX,"inViewsPicker",[{prefix:h.VIEW_PICKER_PREFIX,needsEditor:!1,description:i.localize(7,null)}]))}),define(e[539],t([1,0,696,4,7,106,25,9,5,173,8,28,299,138,204,249,21,6,35,15,29,37,31,23,143,1150,41,12,388,68,49,27,34,118,84,243,82,11,14,20,58,17,18,22,46,364,470]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X){"use strict";function Q(e){if(O.isSCMResource(e)){var t=e.resourceGroup;return(n=t.provider).contextValue+"/"+t.id+"/"+e.sourceUri.toString()}var n=e.provider;return n.contextValue+"/"+e.id}function Z(e){return e.elements.length>0||!e.hideWhenEmpty}Object.defineProperty(t,"__esModule",{value:!0});var J=function(){function e(){}
return e.prototype.getHeight=function(e){return 22},e.prototype.getTemplateId=function(e){return"provider"},e}(),ee=function(e){function t(t,n){var i=e.call(this,"statusbaraction{"+t.id+"}",t.title,"",!0)||this;return i.command=t,i.commandService=n,i.tooltip=t.tooltip,i}return n(t,e),t.prototype.run=function(){var e;return(e=this.commandService).executeCommand.apply(e,[this.command.id].concat(this.command.arguments))},t}(k.Action),te=function(e){function t(t){return e.call(this,null,t,{})||this}return n(t,e),t.prototype._updateLabel=function(){this.options.label&&this.$e.innerHtml(V.renderOcticons(this.getAction().label))},t}(L.ActionItem),ne=function(){function e(e,t){this.commandService=e,this.themeService=t,this.templateId="provider"}return e.prototype.renderTemplate=function(e){
var t=g.append(e,g.$(".scm-provider")),n=g.append(t,g.$(".name")),i=g.append(n,g.$("span.title")),r=g.append(n,g.$("span.type")),o=g.append(t,g.$(".count")),s=new b.CountBadge(o),a=M.attachBadgeStyler(s,this.themeService),c=new L.ActionBar(t,{actionItemProvider:function(e){return new te(e)}});return{title:i,type:r,countContainer:o,count:s,actionBar:c,disposable:p.empty,templateDisposable:p.combinedDisposable([c,a])}},e.prototype.renderElement=function(e,t,n){var i=this;n.disposable.dispose();var r=[];e.provider.rootUri?(n.title.textContent=d.basename(e.provider.rootUri.fsPath),n.type.textContent=e.provider.label):(n.title.textContent=e.provider.label,n.type.textContent="");var o=[],s=function(){return p.dispose(o)};r.push({dispose:s});var a=function(){s();var t=e.provider.statusBarCommands||[];o.splice.apply(o,[0,o.length].concat(t.map(function(e){return new ee(e,i.commandService)}))),n.actionBar.clear(),n.actionBar.push(o);var r=e.provider.count||0;g.toggleClass(n.countContainer,"hidden",0===r),
n.count.setCount(e.provider.count)};e.provider.onDidChange(a,null,r),a(),n.disposable=p.combinedDisposable(r)},e.prototype.disposeTemplate=function(e){e.disposable.dispose(),e.templateDisposable.dispose()},e=a([l(0,I.ICommandService),l(1,R.IThemeService)],e)}(),ie=function(e){function t(t,n,r,o,s,a,l,u){var d=e.call(this,{id:"scm.mainPanel",title:i.localize(0,null)},n,r,u)||this;return d.viewModel=t,d.keybindingService=n,d.contextMenuService=r,d.scmService=o,d.instantiationService=s,d.contextKeyService=a,d.menuService=l,d.visibilityDisposables=[],d.previousSelection=void 0,d._onSelectionChange=new c.Emitter,d.onSelectionChange=d._onSelectionChange.event,d.updateBodySize(),d}return n(t,e),t.prototype.focus=function(){e.prototype.focus.call(this),this.list.domFocus()},t.prototype.hide=function(e){var t=this.list.getSelectedElements().indexOf(e);if(-1!==t){var n=this.list.getSelection();this.list.setSelection(n.slice(0,t).concat(n.slice(t+1)))}},t.prototype.getSelection=function(){
return this.list.getSelectedElements()},t.prototype.renderBody=function(e){var t=new J,n=this.instantiationService.createInstance(ne);this.list=this.instantiationService.createInstance(G.WorkbenchList,e,t,[n],{identityProvider:function(e){return e.provider.id}}),this.list.onSelectionChange(this.onListSelectionChange,this,this.disposables),this.list.onContextMenu(this.onListContextMenu,this,this.disposables),this.viewModel.onDidChangeVisibility(this.onDidChangeVisibility,this,this.disposables),this.onDidChangeVisibility(this.viewModel.isVisible()),this.disposables.push(this.list)},t.prototype.onDidChangeVisibility=function(e){var t=this;e?(this.viewModel.onDidSplice(function(e){var n=e.index,i=e.deleteCount,r=e.elements;return t.splice(n,i,r)},null,this.visibilityDisposables),this.splice(0,0,this.viewModel.repositories)):(this.visibilityDisposables=p.dispose(this.visibilityDisposables),this.splice(0,this.list.length))},t.prototype.splice=function(e,t,n){void 0===n&&(n=[]);var i=0===this.list.length
;this.list.splice(e,t,n),this.updateBodySize(),i&&this.list.length>0&&this.restoreSelection()},t.prototype.layoutBody=function(e){this.list.layout(e)},t.prototype.updateBodySize=function(){var e=this.viewModel.repositories.length;if(e<=5){var t=22*e;this.minimumBodySize=t,this.maximumBodySize=t}else this.minimumBodySize=110,this.maximumBodySize=Number.POSITIVE_INFINITY},t.prototype.onListContextMenu=function(e){var t=e.element,n=this.contextKeyService.createScoped();n.createKey("scmProvider",void 0).set(t.provider.contextValue);var i=this.menuService.createMenu(x.MenuId.SCMSourceControl,n),o=[],s={primary:[],secondary:o};D.fillInContextMenuActions(i,{shouldForwardArgs:!0},s,this.contextMenuService,function(e){return"inline"===e}),i.dispose(),n.dispose(),0!==o.length&&this.contextMenuService.showContextMenu({getAnchor:function(){return e.anchor},getActions:function(){return r.TPromise.as(o)},getActionsContext:function(){return t.provider}})},t.prototype.onListSelectionChange=function(e){
0===e.elements.length&&this.list.length>0?this.restoreSelection():(e.elements.length>0&&(this.previousSelection=e.elements),this._onSelectionChange.fire(e.elements))},t.prototype.restoreSelection=function(){var e,t=this;this.previousSelection&&(e=this.previousSelection.map(function(e){return t.viewModel.repositories.indexOf(e)}).filter(function(e){return e>-1})),e&&0!==e.length||(e=[0]),this.list.setSelection(e),this.list.setFocus([e[0]])},t.prototype.dispose=function(){this.visibilityDisposables=p.dispose(this.visibilityDisposables),e.prototype.dispose.call(this)},t=a([l(1,T.IKeybindingService),l(2,E.IContextMenuService),l(3,S.ISCMService),l(4,C.IInstantiationService),l(5,w.IContextKeyService),l(6,x.IMenuService),l(7,j.IConfigurationService)],t)}(f.ViewletPanel),re=function(){function e(e,t,n,i){this.actionItemProvider=e,this.themeService=t,this.contextKeyService=n,this.menuService=i}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.TEMPLATE_ID},enumerable:!0,configurable:!0}),
e.prototype.renderTemplate=function(e){var t=g.append(e,g.$(".resource-group")),n=g.append(t,g.$(".name")),i=g.append(t,g.$(".actions")),r=new L.ActionBar(i,{actionItemProvider:this.actionItemProvider}),o=g.append(t,g.$(".count")),s=new b.CountBadge(o),a=M.attachBadgeStyler(s,this.themeService),c=p.empty;return{name:n,count:s,actionBar:r,elementDisposable:c,dispose:function(){r.dispose(),a.dispose()}}},e.prototype.renderElement=function(e,t,n){n.elementDisposable.dispose(),n.name.textContent=e.label,n.actionBar.clear(),n.actionBar.context=e;var i=[],r=this.contextKeyService.createScoped();i.push(r),r.createKey("scmProvider",e.provider.contextValue),r.createKey("scmResourceGroup",O.getSCMResourceContextKey(e));var o=this.menuService.createMenu(x.MenuId.SCMResourceGroupContext,r);i.push(o);var s=function(){var e=[],t={primary:e,secondary:[]};D.fillInActionBarActions(o,{shouldForwardArgs:!0},t,function(e){return/^inline/.test(e)}),n.actionBar.clear(),n.actionBar.push(e,{icon:!0,label:!1})}
;o.onDidChange(s,null,i),s();var a=function(){return n.count.setCount(e.elements.length)};e.onDidSplice(a,null,i),a(),n.elementDisposable=p.combinedDisposable(i)},e.prototype.disposeTemplate=function(e){e.dispose()},e.TEMPLATE_ID="resource group",e}(),oe=function(e){function t(t){var n=e.call(this)||this;return n.getSelectedResources=t,n}return n(t,e),t.prototype.runAction=function(t,n){if(t instanceof x.MenuItemAction){var i=this.getSelectedResources(),r=i.filter(function(e){return e!==n});return i.length===r.length||1===i.length?t.run(n):t.run.apply(t,[n].concat(r))}return e.prototype.runAction.call(this,t,n)},t}(k.ActionRunner),se=function(){function e(e,t,n,i,r,o){this.actionItemProvider=e,this.getSelectedResources=t,this.themeService=n,this.instantiationService=i,this.contextKeyService=r,this.menuService=o}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.TEMPLATE_ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){
var t=g.append(e,g.$(".resource")),n=g.append(t,g.$(".name")),i=this.instantiationService.createInstance(y.FileLabel,n,void 0),r=g.append(i.element,g.$(".actions")),o=new L.ActionBar(r,{actionItemProvider:this.actionItemProvider,actionRunner:new oe(this.getSelectedResources)}),s=g.append(t,g.$(".decoration-icon"));return{element:t,name:n,fileLabel:i,decorationIcon:s,actionBar:o,elementDisposable:p.empty,dispose:function(){o.dispose(),i.dispose()}}},e.prototype.renderElement=function(e,t,n){n.elementDisposable.dispose();var i=this.themeService.getTheme().type===R.LIGHT?e.decorations.icon:e.decorations.iconDark;n.fileLabel.setFile(e.sourceUri,{fileDecorations:{colors:!1,badges:!i,data:e.decorations}}),n.actionBar.context=e;var r=[],o=this.contextKeyService.createScoped();r.push(o),o.createKey("scmProvider",e.resourceGroup.provider.contextValue),o.createKey("scmResourceGroup",O.getSCMResourceContextKey(e.resourceGroup));var s=this.menuService.createMenu(x.MenuId.SCMResourceContext,o);r.push(s);var a=function(){
var e=[],t={primary:e,secondary:[]};D.fillInActionBarActions(s,{shouldForwardArgs:!0},t,function(e){return/^inline/.test(e)}),n.actionBar.clear(),n.actionBar.push(e,{icon:!0,label:!1})};s.onDidChange(a,null,r),a(),g.toggleClass(n.name,"strike-through",e.decorations.strikeThrough),g.toggleClass(n.element,"faded",e.decorations.faded),i?(n.decorationIcon.style.display="",n.decorationIcon.style.backgroundImage="url('"+i+"')",n.decorationIcon.title=e.decorations.tooltip):(n.decorationIcon.style.display="none",n.decorationIcon.style.backgroundImage=""),n.element.setAttribute("data-tooltip",e.decorations.tooltip),n.elementDisposable=p.combinedDisposable(r)},e.prototype.disposeTemplate=function(e){e.elementDisposable.dispose(),e.dispose()},e.TEMPLATE_ID="resource",e}(),ae=function(){function e(){}return e.prototype.getHeight=function(){return 22},e.prototype.getTemplateId=function(e){return O.isSCMResource(e)?se.TEMPLATE_ID:re.TEMPLATE_ID},e}(),ce=function(){function e(e,t){this.spliceable=t,this.items=[],
this.disposables=[],e.onDidSplice(this.onDidSpliceGroups,this,this.disposables),this.onDidSpliceGroups({start:0,deleteCount:0,toInsert:e.elements})}return e.prototype.onDidSpliceGroups=function(e){for(var t,n=this,i=e.start,r=e.deleteCount,o=e.toInsert,s=0,a=0;a<i;a++){s+=((m=this.items[a]).visible?1:0)+m.group.elements.length}for(var c=0,a=0;a<r;a++){c+=((m=this.items[i+a]).visible?1:0)+m.group.elements.length}for(var l=[],u=[],d=function(e){var t=Z(e);t&&u.push(e);for(var i=0,r=e.elements;i<r.length;i++){var o=r[i];u.push(o)}var s=p.combinedDisposable([e.onDidChange(function(){return n.onDidChangeGroup(e)}),e.onDidSplice(function(t){return n.onDidSpliceGroup(e,t)})]);l.push({group:e,visible:t,disposable:s})},h=0,f=o;h<f.length;h++){d(f[h])}for(var g=0,v=(t=this.items).splice.apply(t,[i,r].concat(l));g<v.length;g++){var m=v[g];m.disposable.dispose()}this.spliceable.splice(s,c,u)},e.prototype.onDidChangeGroup=function(e){var t=U.firstIndex(this.items,function(t){return t.group===e});if(!(t<0)){
var n=this.items[t],i=Z(e);if(n.visible!==i){for(var r=0,o=0;o<t;o++){var s=this.items[o];r+=(s.visible?1:0)+s.group.elements.length}i?this.spliceable.splice(r,0,[e].concat(e.elements)):this.spliceable.splice(r,1+e.elements.length,[]),n.visible=i}}},e.prototype.onDidSpliceGroup=function(e,t){var n=t.start,i=t.deleteCount,r=t.toInsert,o=U.firstIndex(this.items,function(t){return t.group===e});if(!(o<0)){var s=this.items[o],a=Z(e);if(s.visible||a){for(var c=n,l=0;l<o;l++){var u=this.items[l];c+=(u.visible?1:0)+u.group.elements.length}s.visible&&!a?this.spliceable.splice(c,1+i,r):!s.visible&&a?this.spliceable.splice(c,i,[e].concat(r)):this.spliceable.splice(c+1,i,r),s.visible=a}}},e.prototype.dispose=function(){this.onDidSpliceGroups({start:0,deleteCount:this.items.length,toInsert:[]}),this.disposables=p.dispose(this.disposables)},e}(),le=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,h,p,f){var g=e.call(this,{id:t,title:n.provider.label},r,s,h)||this;return g.repository=n,g.viewModel=i,g.keybindingService=r,
g.themeService=o,g.contextMenuService=s,g.contextViewService=a,g.commandService=c,g.notificationService=l,g.editorService=u,g.instantiationService=d,g.configurationService=h,g.contextKeyService=p,g.menuService=f,g.cachedHeight=void 0,g.visibilityDisposables=[],g.menus=d.createInstance(A.SCMMenus,n.provider),g.menus.onDidChangeTitle(g._onDidChangeTitleArea.fire,g._onDidChangeTitleArea,g.disposables),g}return n(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.menus.onDidChangeTitle(this.updateActions,this,this.disposables)},t.prototype.renderHeaderTitle=function(e){var t=g.append(e,g.$(".title.scm-provider")),n=g.append(t,g.$(".name")),i=g.append(n,g.$("span.title")),r=g.append(n,g.$("span.type"));this.repository.provider.rootUri?(i.textContent=d.basename(this.repository.provider.rootUri.fsPath),r.textContent=this.repository.provider.label):(i.textContent=this.repository.provider.label,r.textContent="");c.mapEvent(u.stop(u.domEvent(e,"contextmenu")),function(e){
return new z.StandardMouseEvent(e)})(this.onContextMenu,this,this.disposables)},t.prototype.onContextMenu=function(e){var t=this;this.viewModel.selectedRepositories.length<=1||this.contextMenuService.showContextMenu({getAnchor:function(){return{x:e.posx,y:e.posy}},getActions:function(){return r.TPromise.as([{id:"scm.hideRepository",label:i.localize(1,null),enabled:!0,run:function(){return t.viewModel.hide(t.repository)}}])}})},t.prototype.renderBody=function(e){var t=this,n=g.trackFocus(e);this.disposables.push(n.onDidFocus(function(){return t.repository.focus()})),this.disposables.push(n),this.inputBoxContainer=g.append(e,g.$(".scm-editor"));var i=function(){var e=K.format(t.repository.input.placeholder,H.isMacintosh?"Cmd+Enter":"Ctrl+Enter");t.inputBox.setPlaceHolder(e)},a=new q.ThrottledDelayer(200),l=function(){a.trigger(function(){return o(t,void 0,r.TPromise,function(){var e;return s(this,function(t){switch(t.label){case 0:
return[4,this.repository.input.validateInput(this.inputBox.value,this.inputBox.inputElement.selectionStart)];case 1:return(e=t.sent())?(this.inputBox.inputElement.setAttribute("aria-invalid","true"),this.inputBox.showMessage({content:e.message,type:function(e){switch(e){case S.InputValidationType.Information:return W.MessageType.INFO;case S.InputValidationType.Warning:return W.MessageType.WARNING;case S.InputValidationType.Error:return W.MessageType.ERROR}}(e.type)})):(this.inputBox.inputElement.removeAttribute("aria-invalid"),this.inputBox.hideMessage()),[2]}})})})};this.inputBox=new W.InputBox(this.inputBoxContainer,this.contextViewService,{flexibleHeight:!0}),this.disposables.push(M.attachInputBoxStyler(this.inputBox,this.themeService)),this.disposables.push(this.inputBox),this.inputBox.onDidChange(l,null,this.disposables);var d=u.domEvent(this.inputBox.inputElement,"keyup"),h=u.domEvent(this.inputBox.inputElement,"mouseup");c.anyEvent(d,h)(function(){return l()},null,this.disposables),
this.inputBox.value=this.repository.input.value,this.inputBox.onDidChange(function(e){return t.repository.input.value=e},null,this.disposables),this.repository.input.onDidChange(function(e){return t.inputBox.value=e},null,this.disposables),i(),this.repository.input.onDidChangePlaceholder(i,null,this.disposables),this.disposables.push(this.inputBox.onDidHeightChange(function(){return t.layoutBody()})),c.chain(u.domEvent(this.inputBox.inputElement,"keydown")).map(function(e){return new B.StandardKeyboardEvent(e)}).filter(function(e){return e.equals(2051)||e.equals(2097)}).on(this.onDidAcceptInput,this,this.disposables),this.repository.provider.onDidChangeCommitTemplate&&this.repository.provider.onDidChangeCommitTemplate(this.updateInputBox,this,this.disposables),this.updateInputBox(),this.listContainer=g.append(e,g.$(".scm-status.show-file-icons"));var p=new ae,f=function(e){return t.getActionItem(e)},v=[new re(f,this.themeService,this.contextKeyService,this.menuService),new se(f,function(){
return t.getSelectedResources()},this.themeService,this.instantiationService,this.contextKeyService,this.menuService)];this.list=this.instantiationService.createInstance(G.WorkbenchList,this.listContainer,p,v,{identityProvider:Q}),c.chain(this.list.onOpen).map(function(e){return e.elements[0]}).filter(function(e){return!!e&&O.isSCMResource(e)}).on(this.open,this,this.disposables),c.chain(this.list.onPin).map(function(e){return e.elements[0]}).filter(function(e){return!!e&&O.isSCMResource(e)}).on(this.pin,this,this.disposables),this.list.onContextMenu(this.onListContextMenu,this,this.disposables),this.disposables.push(this.list),this.viewModel.onDidChangeVisibility(this.onDidChangeVisibility,this,this.disposables),this.onDidChangeVisibility(this.viewModel.isVisible())},t.prototype.onDidChangeVisibility=function(e){if(e){var t=new ce(this.repository.provider.groups,this.list);this.visibilityDisposables.push(t)}else this.visibilityDisposables=p.dispose(this.visibilityDisposables)},
t.prototype.layoutBody=function(e){if(void 0===e&&(e=this.cachedHeight),void 0!==e){this.cachedHeight=e,this.inputBox.layout();var t=this.inputBox.height,n=e-(t+12);this.listContainer.style.height=n+"px",this.list.layout(n),g.toggleClass(this.inputBoxContainer,"scroll",t>=134)}},t.prototype.focus=function(){e.prototype.focus.call(this),this.isExpanded()&&this.inputBox.focus()},t.prototype.getActions=function(){return this.menus.getTitleActions()},t.prototype.getSecondaryActions=function(){return this.menus.getTitleSecondaryActions()},t.prototype.getActionItem=function(e){if(e instanceof x.MenuItemAction)return new D.ContextAwareMenuItemActionItem(e,this.keybindingService,this.notificationService,this.contextMenuService)},t.prototype.getActionsContext=function(){return this.repository.provider},t.prototype.open=function(e){e.open().done(void 0,h.onUnexpectedError)},t.prototype.pin=function(){var e=this.editorService.activeControl;e&&e.group.pinEditor(e.input)},t.prototype.onListContextMenu=function(e){
var t,n=this,i=e.element;t=O.isSCMResource(i)?this.menus.getResourceContextActions(i):this.menus.getResourceGroupContextActions(i),this.contextMenuService.showContextMenu({getAnchor:function(){return e.anchor},getActions:function(){return r.TPromise.as(t)},getActionsContext:function(){return i},actionRunner:new oe(function(){return n.getSelectedResources()})})},t.prototype.getSelectedResources=function(){return this.list.getSelectedElements().filter(function(e){return O.isSCMResource(e)})},t.prototype.updateInputBox=function(){void 0===this.repository.provider.commitTemplate||this.inputBox.value||(this.inputBox.value=this.repository.provider.commitTemplate)},t.prototype.onDidAcceptInput=function(){var e;if(this.repository.provider.acceptInputCommand){var t=this.repository.provider.acceptInputCommand.id,n=this.repository.provider.acceptInputCommand.arguments;(e=this.commandService).executeCommand.apply(e,[t].concat(n)).done(void 0,h.onUnexpectedError)}},t.prototype.dispose=function(){
this.visibilityDisposables=p.dispose(this.visibilityDisposables),e.prototype.dispose.call(this)},t=a([l(3,T.IKeybindingService),l(4,R.IThemeService),l(5,E.IContextMenuService),l(6,E.IContextViewService),l(7,I.ICommandService),l(8,$.INotificationService),l(9,_.IEditorService),l(10,C.IInstantiationService),l(11,j.IConfigurationService),l(12,w.IContextKeyService),l(13,x.IMenuService)],t)}(f.ViewletPanel);t.RepositoryPanel=le;var ue=function(){function e(){}return e.prototype.canDrag=function(e){return!(e instanceof ie||e instanceof le)},e.prototype.canDrop=function(e,t){return!(t instanceof ie||t instanceof le)},e}(),de=function(e){function t(t,n,i,r,o,s,a,l,u,d,h,f,g,v,y){var b=e.call(this,m.VIEWLET_ID,{showHeaderInTitleWhenSingleView:!0,dnd:new ue},t,u,n,d)||this;return b.scmService=i,b.instantiationService=r,b.contextViewService=o,b.keybindingService=a,b.notificationService=l,b.contextMenuService=u,b.themeService=d,b.commandService=h,b.configurationService=y,b.mainPanel=null,b.mainPanelDisposable=p.empty,
b._repositories=[],b.repositoryPanels=[],b.singlePanelTitleActionsDisposable=p.empty,b.disposables=[],b._onDidSplice=new c.Emitter,b.onDidSplice=b._onDidSplice.event,b._onDidChangeVisibility=new c.Emitter,b.onDidChangeVisibility=b._onDidChangeVisibility.event,b._height=void 0,b.contributedViewDisposables=[],b.didLayout=!1,b.menus=r.createInstance(A.SCMMenus,void 0),b.menus.onDidChangeTitle(b.updateTitleArea,b,b.disposables),b.contributedViews=new X.PersistentContributableViewsModel(m.VIEW_CONTAINER,"scm.views",s,g,f),b.disposables.push(b.contributedViews),b}return n(t,e),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"repositories",{get:function(){return this._repositories},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedRepositories",{get:function(){return this.repositoryPanels.map(function(e){return e.repository})},enumerable:!0,configurable:!0}),t.prototype.create=function(t){
return o(this,void 0,r.TPromise,function(){var n,r,o,a=this;return s(this,function(s){switch(s.label){case 0:return[4,e.prototype.create.call(this,t)];case 1:return s.sent(),this.el=t,g.addClass(this.el,"scm-viewlet"),g.addClass(this.el,"empty"),g.append(t,g.$("div.empty-message",null,i.localize(2,null))),this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables),this.scmService.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables),this.scmService.repositories.forEach(function(e){return a.onDidAddRepository(e)}),(n=c.filterEvent(this.configurationService.onDidChangeConfiguration,function(e){return e.affectsConfiguration("scm.alwaysShowProviders")}))(this.onDidChangeRepositories,this,this.disposables),this.onDidChangeRepositories(),this.contributedViews.onDidAdd(this.onDidAddContributedViews,this,this.disposables),this.contributedViews.onDidRemove(this.onDidRemoveContributedViews,this,this.disposables),r=this.getContributedViewsStartIndex(),
(o=this.contributedViews.visibleViewDescriptors.map(function(e){var t=a.contributedViews.getSize(e.id),n=a.contributedViews.isCollapsed(e.id);return{viewDescriptor:e,index:r++,size:t,collapsed:n}})).length&&this.onDidAddContributedViews(o),this.onDidSashChange(this.saveContributedViewSizes,this,this.disposables),[2]}})})},t.prototype.onDidAddRepository=function(e){var t=this._repositories.length;this._repositories.push(e),this._onDidSplice.fire({index:t,deleteCount:0,elements:[e]}),this.onDidChangeRepositories(),this.mainPanel||this.onSelectionChange(this.repositories)},t.prototype.onDidRemoveRepository=function(e){var t=this._repositories.indexOf(e);-1!==t&&(this._repositories.splice(t,1),this._onDidSplice.fire({index:t,deleteCount:1,elements:[]}),this.onDidChangeRepositories(),this.mainPanel||this.onSelectionChange(this.repositories))},t.prototype.onDidChangeRepositories=function(){var e=this;g.toggleClass(this.el,"empty",0===this.scmService.repositories.length)
;var t=this.configurationService.getValue("scm.alwaysShowProviders")||this.scmService.repositories.length>1;if(!!this.mainPanel!==t)if(t){this.mainPanel=this.instantiationService.createInstance(ie,this),this.mainPanel.render(),this.addPanels([{panel:this.mainPanel,size:this.mainPanel.minimumSize,index:0}]);var n=this.mainPanel.onSelectionChange(this.onSelectionChange,this);this.onSelectionChange(this.mainPanel.getSelection()),this.mainPanelDisposable=p.toDisposable(function(){e.removePanels([e.mainPanel]),n.dispose(),e.mainPanel.dispose()})}else this.mainPanelDisposable.dispose(),this.mainPanelDisposable=p.empty,this.mainPanel=null},t.prototype.getContributedViewsStartIndex=function(){return(this.mainPanel?1:0)+this.repositoryPanels.length},t.prototype.setVisible=function(t){var n=[];n.push(e.prototype.setVisible.call(this,t)),t||(this.cachedMainPanelHeight=this.getPanelSize(this.mainPanel)),this._onDidChangeVisibility.fire(t)
;for(var i=this.getContributedViewsStartIndex(),o=0;o<this.contributedViews.visibleViewDescriptors.length;o++){var s=this.panels[i+o];n.push(s.setVisible(t))}return r.TPromise.join(n)},t.prototype.getOptimalWidth=function(){return 400},t.prototype.getTitle=function(){var e=i.localize(3,null);if(1===this.repositories.length){var t=this.repositories[0];return i.localize(4,null,e,t.provider.label)}return e},t.prototype.getActions=function(){return this.isSingleView()?this.panels[0].getActions():this.menus.getTitleActions()},t.prototype.getSecondaryActions=function(){return this.isSingleView()?this.panels[0].getSecondaryActions():this.menus.getTitleSecondaryActions()},t.prototype.getActionItem=function(e){if(e instanceof x.MenuItemAction)return new D.ContextAwareMenuItemActionItem(e,this.keybindingService,this.notificationService,this.contextMenuService)},t.prototype.layout=function(t){e.prototype.layout.call(this,t),this._height=t.height,this.didLayout||(this.didLayout=!0,this.restoreContributedViewSizes())},
t.prototype.movePanel=function(t,n){var i=this.getContributedViewsStartIndex(),r=U.firstIndex(this.panels,function(e){return e===t})-i,o=U.firstIndex(this.panels,function(e){return e===n})-i,s=this.contributedViews.viewDescriptors[r],a=this.contributedViews.viewDescriptors[o];e.prototype.movePanel.call(this,t,n),this.contributedViews.move(s.id,a.id)},t.prototype.onSelectionChange=function(e){var t=this,n=this.isSingleView(),i=this.getContributableViewsSize(),r=this.repositoryPanels.filter(function(t){return e.every(function(e){return t.repository!==e})}),o=this.repositoryPanels.filter(function(t){return e.some(function(e){return t.repository===e})}),s=e.filter(function(e){return t.repositoryPanels.every(function(t){return t.repository!==e})}).map(function(e,n){var i=t.instantiationService.createInstance(le,"scm.repository."+e.provider.label+"."+n,e,t);return i.render(),i}),a=o.length+(this.mainPanel?1:0);this.repositoryPanels=o.concat(s),s.forEach(function(e){t.addPanels([{panel:e,size:e.minimumSize,index:a++
}]),e.repository.focus(),e.onDidFocus(function(){return t.lastFocusedRepository=e.repository}),1!==s.length&&t.lastFocusedRepository!==e.repository||e.focus()}),this.removePanels(r),this.isVisible()&&"number"==typeof this.cachedMainPanelHeight&&(this.resizePanel(this.mainPanel,this.cachedMainPanelHeight),this.cachedMainPanelHeight=void 0);for(var c=(("number"==typeof this.height?this.height:1e3)-this.getPanelSize(this.mainPanel)-i)/e.length,l=0,u=this.repositoryPanels;l<u.length;l++){var d=u[l];this.resizePanel(d,c)}this.restoreContributedViewSizes(),n!==this.isSingleView()&&(this.singlePanelTitleActionsDisposable.dispose(),this.isSingleView()&&(this.singlePanelTitleActionsDisposable=this.panels[0].onDidChangeTitleArea(this.updateTitleArea,this)),this.updateTitleArea())},t.prototype.getContributableViewsSize=function(){for(var e=0,t=this.getContributedViewsStartIndex();t<this.length;t++)e+=this.getPanelSize(this.panels[t]);return e},t.prototype.onDidAddContributedViews=function(e){
for(var t=this,n=this.getContributedViewsStartIndex(),i=[],r=function(e,r,s,a){var l=o.instantiationService.createInstance(e.ctor,{id:e.id,title:e.name,actionRunner:o.getActionRunner(),expanded:!r});l.render(),l.setVisible(!0);var u=g.addDisposableListener(l.draggableElement,"contextmenu",function(n){n.stopPropagation(),n.preventDefault(),t.onViewHeaderContextMenu(new z.StandardMouseEvent(n),e)}),d=c.latch(c.mapEvent(l.onDidChange,function(){return!l.isExpanded()}))(function(n){t.contributedViews.setCollapsed(e.id,n)});o.contributedViewDisposables.splice(s,0,p.combinedDisposable([u,d])),i.push({panel:l,size:a||l.minimumSize,index:n+s})},o=this,s=0,a=e;s<a.length;s++){var l=a[s];r(l.viewDescriptor,l.collapsed,l.index,l.size)}this.addPanels(i)},t.prototype.onViewHeaderContextMenu=function(e,t){var n=this,o=[];o.push({id:t.id+".removeView",label:i.localize(5,null),enabled:t.canToggleVisibility,run:function(){return n.contributedViews.setVisible(t.id,!n.contributedViews.isVisible(t.id))}})
;var s=this.getContextMenuActions();s.length&&o.push.apply(o,[new L.Separator].concat(s));var a={x:e.posx,y:e.posy};this.contextMenuService.showContextMenu({getAnchor:function(){return a},getActions:function(){return r.TPromise.as(o)}})},t.prototype.getContextMenuActions=function(){var t=this,n=[],i=this.contributedViews.viewDescriptors.map(function(e){return{id:e.id+".toggleVisibility",label:e.name,checked:t.contributedViews.isVisible(e.id),enabled:e.canToggleVisibility,run:function(){return t.contributedViews.setVisible(e.id,!t.contributedViews.isVisible(e.id))}}});n.push.apply(n,i);var r=e.prototype.getContextMenuActions.call(this);return i.length&&r.length&&n.push(new L.Separator),n.push.apply(n,r),n},t.prototype.onDidRemoveContributedViews=function(e){e=e.sort(function(e,t){return t.index-e.index});for(var t=this.getContributedViewsStartIndex(),n=[],i=0,r=e;i<r.length;i++){var o=r[i].index;this.contributedViewDisposables.splice(o,1)[0].dispose(),n.push(this.panels[t+o])}this.removePanels(n),p.dispose(n)
},t.prototype.saveContributedViewSizes=function(){for(var e=this.getContributedViewsStartIndex(),t=0;t<this.contributedViews.viewDescriptors.length;t++){var n=this.contributedViews.viewDescriptors[t],i=this.getPanelSize(this.panels[e+t]);this.contributedViews.setSize(n.id,i)}},t.prototype.restoreContributedViewSizes=function(){if(this.didLayout)for(var e=this.getContributedViewsStartIndex(),t=0;t<this.contributedViews.viewDescriptors.length;t++){var n=this.panels[e+t],i=this.contributedViews.viewDescriptors[t],r=this.contributedViews.getSize(i.id);"number"==typeof r&&this.resizePanel(n,r)}},t.prototype.isSingleView=function(){return e.prototype.isSingleView.call(this)&&this.repositoryPanels.length+this.contributedViews.visibleViewDescriptors.length===1},t.prototype.openView=function(e,t){t&&this.focus();var n=this.panels.filter(function(t){return t instanceof f.ViewletPanel&&t.id===e})[0];return n||this.contributedViews.setVisible(e,!0),(n=this.panels.filter(function(t){
return t instanceof f.ViewletPanel&&t.id===e})[0]).setExpanded(!0),n.focus(),r.TPromise.as(n)},t.prototype.hide=function(e){this.mainPanel&&this.mainPanel.hide(e)},t.prototype.shutdown=function(){this.contributedViews.saveViewsStates(),e.prototype.shutdown.call(this)},t.prototype.dispose=function(){this.disposables=p.dispose(this.disposables),this.contributedViewDisposables=p.dispose(this.contributedViewDisposables),this.mainPanelDisposable.dispose(),e.prototype.dispose.call(this)},t=a([l(0,Y.IPartService),l(1,v.ITelemetryService),l(2,S.ISCMService),l(3,C.IInstantiationService),l(4,E.IContextViewService),l(5,w.IContextKeyService),l(6,T.IKeybindingService),l(7,$.INotificationService),l(8,E.IContextMenuService),l(9,R.IThemeService),l(10,I.ICommandService),l(11,N.IWorkspaceContextService),l(12,F.IStorageService),l(13,P.IExtensionService),l(14,j.IConfigurationService)],t)}(f.PanelViewlet);t.SCMViewlet=de}),
define(e[1534],t([1,0,694,16,75,1399,99,299,56,31,65,1400,539,38,63,53]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(e){function t(t,n,i,r){return e.call(this,t,n,u.VIEWLET_ID,i,r)||this}return n(t,e),t.ID=u.VIEWLET_ID,t.LABEL=i.localize(0,null),t=a([l(2,p.IViewletService),l(3,y.IEditorGroupsService)],t)}(c.ToggleViewletAction);r.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(s.DirtyDiffWorkbenchController,v.LifecyclePhase.Running);var S=new c.ViewletDescriptor(g.SCMViewlet,u.VIEWLET_ID,i.localize(1,null),"scm",2);r.Registry.as(c.Extensions.Viewlets).registerViewlet(S),r.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(f.StatusUpdater,v.LifecyclePhase.Running),r.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(f.StatusBarController,v.LifecyclePhase.Running),
r.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(new h.SyncActionDescriptor(b,u.VIEWLET_ID,i.localize(2,null),{primary:null,win:{primary:3109},linux:{primary:3109},mac:{primary:1317}}),"View: Show SCM",i.localize(3,null)),r.Registry.as(m.Extensions.Configuration).registerConfiguration({id:"scm",order:5,title:i.localize(4,null),type:"object",properties:{"scm.alwaysShowProviders":{type:"boolean",description:i.localize(5,null),default:!1},"scm.diffDecorations":{type:"string",enum:["all","gutter","overview","none"],default:"all",description:i.localize(6,null)},"scm.diffDecorationsGutterWidth":{type:"number",enum:[1,2,3,4,5],default:3,description:i.localize(7,null)}}})}),define(e[302],t([1,0,8,23,73,62,43,11,4,702,135,37,140,231,232,234,21,81,65,25]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";function I(e,t,n){if("number"==typeof t){var i=n.resolveKeybinding(c.createKeybinding(t,h.OS));return k(e,i.length>0?i[0]:null)}return k(e,t)}function T(e,t,n){
return e.getViewlets().filter(function(e){return e.id===m.VIEW_ID}).length?e.openViewlet(m.VIEW_ID,n).then(function(e){return e}):t.openPanel(m.VIEW_ID,n).then(function(e){return e})}function x(e,t){var n=e.getActiveViewlet();if(n&&n.getId()===m.VIEW_ID)return n;var i=t.getActivePanel();return i&&i.getId()===m.VIEW_ID?i:void 0}function k(e,t){return t?e+" ("+t.getLabel()+")":e}function D(e){return e.scheme===d.Schemas.file?w.normalize(u.normalizeDriveLetter(e.fsPath),!0):e.toString()}function A(e){return e.range().startLineNumber+","+e.range().startColumn+": "+e.text()}function L(e,t){var n=e.matches().sort(S.searchMatchComparer).slice(0,t).map(A).map(function(e){return"  "+e});return{text:""+D(e.resource())+X+n.join(X),count:n.length}}function R(e,t){for(var n=[],i=0,r=e.matches().sort(S.searchMatchComparer),o=0;o<e.fileCount()&&i<t;o++){var s=L(r[o],t-i);i+=s.count,n.push(s.text)}return{text:n.join(X+X),count:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.isSearchViewFocused=function(e,t){
var n=x(e,t),r=document.activeElement;return n&&r&&i.isAncestor(r,n.getContainer())},t.appendKeyBindingLabel=I,t.openSearchView=T,t.getSearchView=x,t.toggleCaseSensitiveCommand=function(e){x(e.get(E.IViewletService),e.get(C.IPanelService)).toggleCaseSensitive()},t.toggleWholeWordCommand=function(e){x(e.get(E.IViewletService),e.get(C.IPanelService)).toggleWholeWords()},t.toggleRegexCommand=function(e){x(e.get(E.IViewletService),e.get(C.IPanelService)).toggleRegex()},t.FocusActiveEditorCommand=function(e){var t=e.get(_.IEditorService).activeControl;return t&&t.focus(),p.TPromise.as(!0)};var O=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.viewletService=i,o.panelService=r,o}return n(t,e),t.prototype.run=function(){return x(this.viewletService,this.panelService).focusNextInputBox(),p.TPromise.as(null)},t.ID="search.focus.nextInputBox",t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.FocusNextInputAction=O;var M=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this
;return o.viewletService=i,o.panelService=r,o}return n(t,e),t.prototype.run=function(){return x(this.viewletService,this.panelService).focusPreviousInputBox(),p.TPromise.as(null)},t.ID="search.focus.previousInputBox",t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.FocusPreviousInputAction=M;var P=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.viewletService=i,c.panelService=r,c.expandSearchReplaceWidget=o,c.selectWidgetText=s,c.focusReplace=a,c}return n(t,e),t.prototype.run=function(){var e=this;return T(this.viewletService,this.panelService,!0).then(function(t){var n=t.searchAndReplaceWidget;n.toggleReplace(e.expandSearchReplaceWidget);var i=e.focusReplace&&n.searchInput.getValue();n.focus(e.selectWidgetText,!!i)})},t}(r.Action);t.FindOrReplaceInFilesAction=P;var N=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r,!1,!0,!1)||this}return n(t,e),t.LABEL=f.localize(0,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(P);t.FindInFilesAction=N
;var F=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r,!0,!1,!0)||this}return n(t,e),t.ID="workbench.action.replaceInFiles",t.LABEL=f.localize(1,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(P);t.ReplaceInFilesAction=F;var W=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.viewletService=i,o.panelService=r,o}return n(t,e),t.prototype.run=function(){var e=x(this.viewletService,this.panelService);return e.searchAndReplaceWidget.toggleReplace(!1),e.searchAndReplaceWidget.focus(),p.TPromise.as(null)},t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.CloseReplaceAction=W;var B=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"search-action refresh")||this;return o.viewletService=i,o.panelService=r,o.update(),o}return n(t,e),t.prototype.update=function(){var e=x(this.viewletService,this.panelService);this.enabled=e&&e.isSearchSubmitted()},t.prototype.run=function(){var e=x(this.viewletService,this.panelService);return e&&e.onQueryChanged(!0),
p.TPromise.as(null)},t.ID="search.action.refreshSearchResults",t.LABEL=f.localize(2,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.RefreshAction=B;var V=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"search-action collapse")||this;return o.viewletService=i,o.panelService=r,o.update(),o}return n(t,e),t.prototype.update=function(){var e=x(this.viewletService,this.panelService);this.enabled=e&&e.hasSearchResults()},t.prototype.run=function(){var e=x(this.viewletService,this.panelService);if(e){var t=e.getControl();if(t.getHighlight())return p.TPromise.as(null);t.collapseDeepestExpandedLevel(),t.clearSelection(),t.clearFocus(),t.domFocus(),t.focusFirst()}return p.TPromise.as(null)},t.ID="search.action.collapseSearchResults",t.LABEL=f.localize(3,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.CollapseDeepestExpandedLevelAction=V;var z=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"search-action clear-search-results")||this;return o.viewletService=i,
o.panelService=r,o.update(),o}return n(t,e),t.prototype.update=function(){var e=x(this.viewletService,this.panelService);this.enabled=e&&e.isSearchSubmitted()},t.prototype.run=function(){var e=x(this.viewletService,this.panelService);return e&&e.clearSearchResults(),p.TPromise.as(null)},t.ID="search.action.clearSearchResults",t.LABEL=f.localize(4,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.ClearSearchResultsAction=z;var H=function(e){function t(t,n,i,r){var o=e.call(this,t,n,"search-action cancel-search")||this;return o.viewletService=i,o.panelService=r,o.update(),o}return n(t,e),t.prototype.update=function(){var e=x(this.viewletService,this.panelService);this.enabled=e&&e.isSearching()},t.prototype.run=function(){var e=x(this.viewletService,this.panelService);return e&&e.cancelSearch(),p.TPromise.as(null)},t.ID="search.action.cancelSearch",t.LABEL=f.localize(5,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.CancelSearchAction=H;var K=function(e){
function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.viewletService=i,o.panelService=r,o}return n(t,e),t.prototype.run=function(){return T(this.viewletService,this.panelService).then(function(e){e.selectNextMatch()})},t.ID="search.action.focusNextSearchResult",t.LABEL=f.localize(6,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.FocusNextSearchResultAction=K;var U=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.viewletService=i,o.panelService=r,o}return n(t,e),t.prototype.run=function(){return T(this.viewletService,this.panelService).then(function(e){e.selectPreviousMatch()})},t.ID="search.action.focusPreviousSearchResult",t.LABEL=f.localize(7,null),t=a([l(2,E.IViewletService),l(3,C.IPanelService)],t)}(r.Action);t.FocusPreviousSearchResultAction=U;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getElementToFocusAfterRemoved=function(e,t){var n=this.getNextElementAfterRemoved(e,t)
;return n||(n=this.getPreviousElementAfterRemoved(e,t)),n},t.prototype.getNextElementAfterRemoved=function(e,t){var n=this.getNavigatorAt(t,e);if(t instanceof S.FolderMatch)for(;n.next()&&!(n.current()instanceof S.FolderMatch););else if(t instanceof S.FileMatch)for(;n.next()&&!(n.current()instanceof S.FileMatch););else for(;n.next()&&!(n.current()instanceof S.Match);)e.expand(n.current());return n.current()},t.prototype.getPreviousElementAfterRemoved=function(e,t){var n=this.getNavigatorAt(t,e),i=n.previous(),r=t.parent();return r===i&&(i=n.previous()),r instanceof S.FileMatch&&r.parent()===i&&(i=n.previous()),t instanceof S.Match&&i&&i instanceof S.FolderMatch&&(n.next(),e.expand(i),i=n.previous()),t instanceof S.Match&&i&&i instanceof S.FileMatch&&(n.next(),e.expand(i),i=n.previous()),i},t.prototype.getNavigatorAt=function(e,t){for(var n=t.getNavigator();n.current()!==e&&n.next(););return n},t}(r.Action);t.AbstractSearchAndReplaceAction=G;var j=function(e){function t(n,i){
var r=e.call(this,"remove",t.LABEL,"action-remove")||this;return r.viewer=n,r.element=i,r}return n(t,e),t.prototype.run=function(){var e=this.viewer.getFocus(),t=!e||e instanceof S.SearchResult||function(e,t){do{if(e===t)return!0}while(!(e.parent()instanceof S.SearchResult)&&(e=e.parent()));return!1}(e,this.element)?this.getElementToFocusAfterRemoved(this.viewer,this.element):null;t&&(this.viewer.reveal(t),this.viewer.setFocus(t));var n,i=this.element;if(i instanceof S.FolderMatch){var r=i.parent();r.remove(i),n=r}else if(i instanceof S.FileMatch){var o=i.parent();o.remove(i),n=o}else if(i instanceof S.Match){var s=i.parent();s.remove(i),n=0===s.count()?s.parent():s}return this.viewer.domFocus(),this.viewer.refresh(n)},t.LABEL=f.localize(8,null),t}(G);t.RemoveAction=j;var q=function(e){function t(n,i,r,o){var s=e.call(this,y.ReplaceAllInFileActionId,I(t.LABEL,o.lookupKeybinding(y.ReplaceAllInFileActionId),o),"action-replace-all")||this;return s.viewer=n,s.fileMatch=i,s.viewlet=r,s}return n(t,e),
t.prototype.run=function(){var e=this,t=this.getElementToFocusAfterRemoved(this.viewer,this.fileMatch);return this.fileMatch.parent().replace(this.fileMatch).then(function(){t&&e.viewer.setFocus(t),e.viewer.domFocus(),e.viewlet.open(e.fileMatch,!0)})},t.LABEL=f.localize(9,null),t=a([l(3,v.IKeybindingService)],t)}(G);t.ReplaceAllAction=q;var $=function(e){function t(n,i,r){var o=e.call(this,y.ReplaceAllInFolderActionId,I(t.LABEL,r.lookupKeybinding(y.ReplaceAllInFolderActionId),r),"action-replace-all")||this;return o.viewer=n,o.folderMatch=i,o}return n(t,e),t.prototype.run=function(){return o(this,void 0,p.TPromise,function(){var e;return s(this,function(t){switch(t.label){case 0:return e=this.getElementToFocusAfterRemoved(this.viewer,this.folderMatch),[4,this.folderMatch.replaceAll()];case 1:return t.sent(),e&&this.viewer.setFocus(e),this.viewer.domFocus(),[2]}})})},t.LABEL=f.localize(10,null),t=a([l(2,v.IKeybindingService)],t)}(G);t.ReplaceAllInFolderAction=$;var Y=function(e){function t(n,i,r,o,s,a){
var c=e.call(this,y.ReplaceActionId,I(t.LABEL,s.lookupKeybinding(y.ReplaceActionId),s),"action-replace")||this;return c.viewer=n,c.element=i,c.viewlet=r,c.replaceService=o,c.editorService=a,c}return n(t,e),t.prototype.run=function(){var e=this;return this.enabled=!1,this.element.parent().replace(this.element).then(function(){var t=e.getElementToFocusAfterReplace();t&&e.viewer.setFocus(t);var n=e.getElementToShowReplacePreview(t);e.viewer.domFocus(),!n||e.hasToOpenFile()?e.viewlet.open(e.element,!0):e.replaceService.openReplacePreview(n,!0)})},t.prototype.getElementToFocusAfterReplace=function(){var e=this.viewer.getNavigator(),t=!1,n=null;do{if((n=e.current())instanceof S.Match){if(n.parent().id()===this.element.parent().id()){if(t=!0,this.element.range().getStartPosition().isBeforeOrEqual(n.range().getStartPosition()))break}else if(t)break}else if(t&&!this.viewer.isExpanded(n))break}while(e.next());return n},t.prototype.getElementToShowReplacePreview=function(e){if(this.hasSameParent(e))return e
;var t=this.getPreviousElementAfterRemoved(this.viewer,this.element);return this.hasSameParent(t)?t:null},t.prototype.hasSameParent=function(e){return e&&e instanceof S.Match&&e.parent().resource()===this.element.parent().resource()},t.prototype.hasToOpenFile=function(){var e=this.editorService.activeEditor,t=e?e.getResource():void 0;return!!t&&t.toString()===this.element.parent().resource().toString()},t.LABEL=f.localize(11,null),t=a([l(3,b.IReplaceService),l(4,v.IKeybindingService),l(5,_.IEditorService)],t)}(G);t.ReplaceAction=Y,t.copyPathCommand=function(e,t){var n=e.get(g.IClipboardService),i=D(t.resource());n.writeText(i)};var X=h.isWindows?"\r\n":"\n";t.copyMatchCommand=function(e,t){var n,i=e.get(g.IClipboardService);t instanceof S.Match?n=A(t):t instanceof S.FileMatch?n=L(t,1e4).text:t instanceof S.FolderMatch&&(n=R(t,1e4).text),n&&i.writeText(n)},t.copyAllCommand=function(e){var t=e.get(E.IViewletService),n=e.get(C.IPanelService),i=e.get(g.IClipboardService),r=function(e,t){var n=[],i=0
;e=e.sort(S.searchMatchComparer);for(var r=0;r<e.length&&i<t;r++){var o=R(e[r],t-i);o.count&&(i+=o.count,n.push(o.text))}return n.join(X+X)}(x(t,n).getControl().getInput().folderMatches(),1e4);i.writeText(r)},t.clearHistoryCommand=function(e){e.get(m.ISearchHistoryService).clearHistory()}}),define(e[1536],t([1,0,703,70,25,8,5,4,41,204,138,234,27,302,6,68,12,62,33,17,35,31,58,143,36]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k=function(){function e(e){var t=this;this.contextService=e,this.updateIncludeFolderMatch(),this.listener=this.contextService.onDidChangeWorkbenchState(function(){return t.updateIncludeFolderMatch()})}return e.prototype.updateIncludeFolderMatch=function(){this.includeFolderMatch=this.contextService.getWorkbenchState()===g.WorkbenchState.WORKSPACE},e.prototype.getId=function(e,t){return t instanceof f.FolderMatch?t.id():t instanceof f.FileMatch?t.id():t instanceof f.Match?t.id():"root"},
e.prototype._getChildren=function(e){if(e instanceof f.FileMatch)return e.matches();if(e instanceof f.FolderMatch)return e.matches();if(e instanceof f.SearchResult){var t=e.folderMatches();return t.length>2?t.filter(function(e){return!e.isEmpty()}):e.matches()}return[]},e.prototype.getChildren=function(e,t){return u.TPromise.as(this._getChildren(t))},e.prototype.hasChildren=function(e,t){return t instanceof f.FileMatch||t instanceof f.FolderMatch||t instanceof f.SearchResult},e.prototype.getParent=function(e,t){var n=null;return t instanceof f.Match?n=t.parent():t instanceof f.FileMatch?n=this.includeFolderMatch?t.parent():t.parent().parent():t instanceof f.FolderMatch&&(n=t.parent()),u.TPromise.as(n)},e.prototype.shouldAutoexpand=function(t,n){var i=this._getChildren(n).length;return!(i<=0)&&(i<e.AUTOEXPAND_CHILD_LIMIT||n instanceof f.FolderMatch)},e.prototype.dispose=function(){this.listener=c.dispose(this.listener)},e.AUTOEXPAND_CHILD_LIMIT=10,e=a([l(0,g.IWorkspaceContextService)],e)}()
;t.SearchDataSource=k;var D=function(){function e(){}return e.prototype.compare=function(e,t,n){return f.searchMatchComparer(t,n)},e}();t.SearchSorter=D;var A=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.searchView=n,s.instantiationService=i,s.themeService=r,s.contextService=o,s}return n(t,e),t.prototype.getHeight=function(e,t){return 22},t.prototype.getTemplateId=function(e,n){return n instanceof f.FolderMatch?t.FOLDER_MATCH_TEMPLATE_ID:n instanceof f.FileMatch?t.FILE_MATCH_TEMPLATE_ID:n instanceof f.Match?t.MATCH_TEMPLATE_ID:null},t.prototype.renderTemplate=function(e,n,i){return n===t.FOLDER_MATCH_TEMPLATE_ID?this.renderFolderMatchTemplate(e,n,i):n===t.FILE_MATCH_TEMPLATE_ID?this.renderFileMatchTemplate(e,n,i):n===t.MATCH_TEMPLATE_ID?this.renderMatchTemplate(e,n,i):null},t.prototype.renderElement=function(e,n,i,r){t.FOLDER_MATCH_TEMPLATE_ID===i?this.renderFolderMatch(e,n,r):t.FILE_MATCH_TEMPLATE_ID===i?this.renderFileMatch(e,n,r):t.MATCH_TEMPLATE_ID===i&&this.renderMatch(e,n,r)},
t.prototype.renderFolderMatchTemplate=function(e,t,n){var i=s.append(n,s.$(".foldermatch")),r=this.instantiationService.createInstance(p.FileLabel,i,void 0),o=new h.CountBadge(s.append(i,s.$(".badge")));this._register(y.attachBadgeStyler(o,this.themeService));return{label:r,badge:o,actions:new d.ActionBar(i,{animated:!1})}},t.prototype.renderFileMatchTemplate=function(e,t,n){var i=s.append(n,s.$(".filematch")),r=this.instantiationService.createInstance(p.FileLabel,i,void 0),o=new h.CountBadge(s.append(i,s.$(".badge")));this._register(y.attachBadgeStyler(o,this.themeService));return{el:i,label:r,badge:o,actions:new d.ActionBar(i,{animated:!1})}},t.prototype.renderMatchTemplate=function(e,t,n){s.addClass(n,"linematch");var i=s.append(n,s.$("a.plain.match"));return{parent:i,before:s.append(i,s.$("span")),match:s.append(i,s.$("span.findInFileMatch")),replace:s.append(i,s.$("span.replaceMatch")),after:s.append(i,s.$("span")),actions:new d.ActionBar(n,{animated:!1})}},t.prototype.renderFolderMatch=function(e,t,n){
if(t.hasRoot()){var o=r.isEqual(this.contextService.getWorkspaceFolder(t.resource()).uri,t.resource())?_.FileKind.ROOT_FOLDER:_.FileKind.FOLDER;n.label.setFile(t.resource(),{fileKind:o})}else n.label.setValue(i.localize(0,null));var s=t.fileCount();n.badge.setCount(s),n.badge.setTitleFormat(s>1?i.localize(1,null,s):i.localize(2,null,s)),n.actions.clear();var a=[];e.getInput().searchModel.isReplaceActive()&&s>0&&a.push(this.instantiationService.createInstance(v.ReplaceAllInFolderAction,e,t)),a.push(new v.RemoveAction(e,t)),n.actions.push(a,{icon:!0,label:!1})},t.prototype.renderFileMatch=function(e,t,n){var r=t.parent(),o=r.hasRoot()?r.resource():void 0;n.el.setAttribute("data-resource",t.resource().toString()),n.label.setFile(t.resource(),{root:o});var s=t.count();n.badge.setCount(s),n.badge.setTitleFormat(s>1?i.localize(3,null,s):i.localize(4,null,s));var a=e.getInput();n.actions.clear();var c=[]
;a.searchModel.isReplaceActive()&&s>0&&c.push(this.instantiationService.createInstance(v.ReplaceAllAction,e,t,this.searchView)),c.push(new v.RemoveAction(e,t)),n.actions.push(c,{icon:!0,label:!1})},t.prototype.renderMatch=function(e,t,n){var i=t.preview(),r=e.getInput().searchModel,o=r.isReplaceActive()&&!!r.replaceString;n.before.textContent=i.before,n.match.textContent=i.inside,s.toggleClass(n.match,"replace",o),n.replace.textContent=o?t.replaceString:"",n.after.textContent=i.after,n.parent.title=(i.before+(o?t.replaceString:i.inside)+i.after).trim().substr(0,999),n.actions.clear(),r.isReplaceActive()?n.actions.push([this.instantiationService.createInstance(v.ReplaceAction,e,t,this.searchView),new v.RemoveAction(e,t)],{icon:!0,label:!1}):n.actions.push([new v.RemoveAction(e,t)],{icon:!0,label:!1})},t.prototype.disposeTemplate=function(e,n,i){if(t.FOLDER_MATCH_TEMPLATE_ID===n){(r=i).label.dispose(),r.actions.dispose()}else if(t.FILE_MATCH_TEMPLATE_ID===n){(r=i).label.dispose(),r.actions.dispose()
}else if(t.MATCH_TEMPLATE_ID===n){var r=i;r.actions.dispose()}},t.FOLDER_MATCH_TEMPLATE_ID="folderMatch",t.FILE_MATCH_TEMPLATE_ID="fileMatch",t.MATCH_TEMPLATE_ID="match",t=a([l(2,m.IInstantiationService),l(3,b.IThemeService),l(4,g.IWorkspaceContextService)],t)}(c.Disposable);t.SearchRenderer=A;var L=function(){function e(e,t){this.contextService=e,this.environmentService=t}return e.prototype.getAriaLabel=function(e,t){if(t instanceof f.FolderMatch)return i.localize(5,null,t.count(),t.name());if(t instanceof f.FileMatch){var n=S.getPathLabel(t.resource(),this.environmentService,this.contextService)||t.resource().fsPath;return i.localize(6,null,t.count(),t.name(),o.dirname(n))}if(t instanceof f.Match){var r=t,s=e.getInput().searchModel,a=s.isReplaceActive()&&!!s.replaceString,c=r.getMatchString(),l=r.range(),u=r.text().substr(0,l.endColumn+150);return a?i.localize(7,null,c,r.replaceString,l.startColumn+1,u):i.localize(8,null,c,l.startColumn+1,u)}},
e=a([l(0,g.IWorkspaceContextService),l(1,x.IEnvironmentService)],e)}();t.SearchAccessibilityProvider=L;var R=function(){function e(){}return e.prototype.isVisible=function(e,t){return!(t instanceof f.FileMatch||t instanceof f.FolderMatch)||t.matches().length>0},e}();t.SearchFilter=R;var O=function(e){function t(t,n,i){var r=e.call(this,{},i)||this;return r.contextMenuService=t,r.menuService=n,r}return n(t,e),t.prototype.onContextMenu=function(e,t,n){var i=this;this.contextMenu||(this.contextMenu=this.menuService.createMenu(w.MenuId.SearchContext,e.contextKeyService)),e.setFocus(t,{preventOpenOnFocus:!0});var r={x:n.posx,y:n.posy};return this.contextMenuService.showContextMenu({getAnchor:function(){return r},getActions:function(){var e=[];return T.fillInContextMenuActions(i.contextMenu,{shouldForwardArgs:!0},e,i.contextMenuService),u.TPromise.as(e)},getActionsContext:function(){return t}}),!0},t=a([l(0,E.IContextMenuService),l(1,w.IMenuService),l(2,C.IConfigurationService)],t)}(I.WorkbenchTreeController)
;t.SearchTreeController=O}),define(e[1537],t([1,0,65,81,17,140]),function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n){var i=function(i){"panel"===n.getValue().search.location?(e.setViewletEnablement(o.VIEW_ID,!1),t.setPanelEnablement(o.VIEW_ID,!0),i&&t.openPanel(o.VIEW_ID)):(t.setPanelEnablement(o.VIEW_ID,!1),e.setViewletEnablement(o.VIEW_ID,!0),i&&e.openViewlet(o.VIEW_ID))};n.onDidChangeConfiguration(function(e){e.affectsConfiguration("search.location")&&i(!0)}),i(!1)}return e=a([l(0,n.IViewletService),l(1,i.IPanelService),l(2,r.IConfigurationService)],e)}();t.SearchViewLocationUpdater=s}),define(e[541],t([1,0,705,14,8,4,92,23,41,155,52,37,15,35,7,65,302,231,68,12,219,135,17,81,185,18]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=function(e){function t(){var n=e.call(this,t.ID,"","action-replace-all",!1)||this;return n._searchWidget=null,n}return n(t,e),
Object.defineProperty(t,"INSTANCE",{get:function(){return null===t.fgInstance&&(t.fgInstance=new t),t.fgInstance},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchWidget",{set:function(e){this._searchWidget=e},enumerable:!0,configurable:!0}),t.prototype.run=function(){return this._searchWidget?this._searchWidget.triggerReplaceAll():s.TPromise.as(null)},t.fgInstance=null,t.ID="search.action.replaceAll",t}(u.Action),A=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this)||this;return l.contextViewService=i,l.themeService=r,l.contextKeyService=o,l.keyBindingService=s,l.clipboardServce=a,l.configurationService=c,l.ignoreGlobalFindBufferOnNextFocus=!1,l._onSearchSubmit=l._register(new m.Emitter),l.onSearchSubmit=l._onSearchSubmit.event,l._onSearchCancel=l._register(new m.Emitter),l.onSearchCancel=l._onSearchCancel.event,l._onReplaceToggled=l._register(new m.Emitter),l.onReplaceToggled=l._onReplaceToggled.event,l._onReplaceStateChange=l._register(new m.Emitter),
l.onReplaceStateChange=l._onReplaceStateChange.event,l._onReplaceValueChanged=l._register(new m.Emitter),l.onReplaceValueChanged=l._onReplaceValueChanged.event,l._onReplaceAll=l._register(new m.Emitter),l.onReplaceAll=l._onReplaceAll.event,l._onBlur=l._register(new m.Emitter),l.onBlur=l._onBlur.event,l.replaceActive=S.ReplaceActiveKey.bindTo(l.contextKeyService),l.searchInputBoxFocused=S.SearchInputBoxFocusedKey.bindTo(l.contextKeyService),l.replaceInputBoxFocused=S.ReplaceInputBoxFocusedKey.bindTo(l.contextKeyService),l._replaceHistoryDelayer=new k.Delayer(500),l.render(t,n),l}return n(t,e),t.prototype.focus=function(e,t,n){void 0===e&&(e=!0),void 0===t&&(t=!1),void 0===n&&(n=!1),this.ignoreGlobalFindBufferOnNextFocus=n,t&&this.isReplaceShown()?(this.replaceInput.focus(),e&&this.replaceInput.select()):(this.searchInput.focus(),e&&this.searchInput.select())},t.prototype.setWidth=function(e){this.searchInput.setWidth(e),this.replaceInput.width=e-28},t.prototype.clear=function(){this.searchInput.clear(),
this.replaceInput.value="",this.setReplaceAllActionState(!1)},t.prototype.isReplaceShown=function(){return!o.hasClass(this.replaceContainer,"disabled")},t.prototype.isReplaceActive=function(){return this.replaceActive.get()},t.prototype.getReplaceValue=function(){return this.replaceInput.value},t.prototype.toggleReplace=function(e){void 0!==e&&e===this.isReplaceShown()||this.onToggleReplaceButton()},t.prototype.getSearchHistory=function(){return this.searchInput.inputBox.getHistory()},t.prototype.getReplaceHistory=function(){return this.replaceInput.getHistory()},t.prototype.clearHistory=function(){this.searchInput.inputBox.clearHistory()},t.prototype.showNextSearchTerm=function(){this.searchInput.inputBox.showNextValue()},t.prototype.showPreviousSearchTerm=function(){this.searchInput.inputBox.showPreviousValue()},t.prototype.showNextReplaceTerm=function(){this.replaceInput.showNextValue()},t.prototype.showPreviousReplaceTerm=function(){this.replaceInput.showPreviousValue()},
t.prototype.searchInputHasFocus=function(){return this.searchInputBoxFocused.get()},t.prototype.replaceInputHasFocus=function(){return this.replaceInput.hasFocus()},t.prototype.focusReplaceAllAction=function(){this.replaceActionBar.focus(!0)},t.prototype.focusRegexAction=function(){this.searchInput.focusOnRegex()},t.prototype.render=function(e,t){this.domNode=e.div({class:"search-widget"}).style({position:"relative"}).getHTMLElement(),this.renderToggleReplaceButton(this.domNode),this.renderSearchInput(this.domNode,t),this.renderReplaceInput(this.domNode,t)},t.prototype.renderToggleReplaceButton=function(e){var t=this;this.toggleReplaceButton=this._register(new h.Button(e,{buttonBackground:null,buttonBorder:null,buttonForeground:null,buttonHoverBackground:null})),this.toggleReplaceButton.element.setAttribute("aria-expanded","false"),this.toggleReplaceButton.icon="toggle-replace-button collapse",this.toggleReplaceButton.onDidClick(function(){return t.onToggleReplaceButton()}),
this.toggleReplaceButton.element.title=i.localize(2,null)},t.prototype.renderSearchInput=function(e,t){var n=this,r={label:i.localize(3,null),validation:function(e){return n.validateSearchInput(e)},placeholder:i.localize(4,null),appendCaseSensitiveLabel:b.appendKeyBindingLabel("",this.keyBindingService.lookupKeybinding(S.ToggleCaseSensitiveCommandId),this.keyBindingService),appendWholeWordsLabel:b.appendKeyBindingLabel("",this.keyBindingService.lookupKeybinding(S.ToggleWholeWordCommandId),this.keyBindingService),appendRegexLabel:b.appendKeyBindingLabel("",this.keyBindingService.lookupKeybinding(S.ToggleRegexCommandId),this.keyBindingService),history:t.searchHistory},s=o.append(e,o.$(".search-container.input-box"));this.searchInput=this._register(new x.ContextScopedFindInput(s,this.contextViewService,r,this.contextKeyService)),this._register(_.attachFindInputBoxStyler(this.searchInput,this.themeService)),this.searchInput.onKeyDown(function(e){return n.onSearchInputKeyDown(e)}),
this.searchInput.setValue(t.value||""),this.searchInput.setRegex(!!t.isRegex),this.searchInput.setCaseSensitive(!!t.isCaseSensitive),this.searchInput.setWholeWords(!!t.isWholeWords),this._register(this.onSearchSubmit(function(){n.searchInput.inputBox.addToHistory()})),this.searchInput.onCaseSensitiveKeyDown(function(e){return n.onCaseSensitiveKeyDown(e)}),this.searchInput.onRegexKeyDown(function(e){return n.onRegexKeyDown(e)}),this._register(this.onReplaceValueChanged(function(){n._replaceHistoryDelayer.trigger(function(){return n.replaceInput.addToHistory()})})),this.searchInputFocusTracker=this._register(o.trackFocus(this.searchInput.inputBox.inputElement)),this._register(this.searchInputFocusTracker.onDidFocus(function(){n.searchInputBoxFocused.set(!0);var e=n.configurationService.getValue("search").globalFindClipboard;if(!n.ignoreGlobalFindBufferOnNextFocus&&e){var t=n.clipboardServce.readFindText();n.previousGlobalFindBufferValue!==t&&(n.searchInput.inputBox.addToHistory(),n.searchInput.setValue(t),
n.searchInput.select()),n.previousGlobalFindBufferValue=t}n.ignoreGlobalFindBufferOnNextFocus=!1})),this._register(this.searchInputFocusTracker.onDidBlur(function(){return n.searchInputBoxFocused.set(!1)}))},t.prototype.renderReplaceInput=function(e,n){var r=this;this.replaceContainer=o.append(e,o.$(".replace-container.disabled"));var s=o.append(this.replaceContainer,o.$(".input-box"));this.replaceInput=this._register(new x.ContextScopedHistoryInputBox(s,this.contextViewService,{ariaLabel:i.localize(5,null),placeholder:i.localize(6,null),history:n.replaceHistory||[]},this.contextKeyService)),this._register(_.attachInputBoxStyler(this.replaceInput,this.themeService)),this.onkeydown(this.replaceInput.inputElement,function(e){return r.onReplaceInputKeyDown(e)}),this.replaceInput.onDidChange(function(){return r._onReplaceValueChanged.fire()}),this.searchInput.inputBox.onDidChange(function(){return r.onSearchInputChanged()}),this.replaceAllAction=D.INSTANCE,this.replaceAllAction.searchWidget=this,
this.replaceAllAction.label=t.REPLACE_ALL_DISABLED_LABEL,this.replaceActionBar=this._register(new d.ActionBar(this.replaceContainer)),this.replaceActionBar.push([this.replaceAllAction],{icon:!0,label:!1}),this.onkeydown(this.replaceActionBar.domNode,function(e){return r.onReplaceActionbarKeyDown(e)}),this.replaceInputFocusTracker=this._register(o.trackFocus(this.replaceInput.inputElement)),this._register(this.replaceInputFocusTracker.onDidFocus(function(){return r.replaceInputBoxFocused.set(!0)})),this._register(this.replaceInputFocusTracker.onDidBlur(function(){return r.replaceInputBoxFocused.set(!1)}))},t.prototype.triggerReplaceAll=function(){return this._onReplaceAll.fire(),s.TPromise.as(null)},t.prototype.onToggleReplaceButton=function(){o.toggleClass(this.replaceContainer,"disabled"),o.toggleClass(this.toggleReplaceButton.element,"collapse"),o.toggleClass(this.toggleReplaceButton.element,"expand"),this.toggleReplaceButton.element.setAttribute("aria-expanded",this.isReplaceShown()?"true":"false"),
this.updateReplaceActiveState(),this._onReplaceToggled.fire()},t.prototype.setReplaceAllActionState=function(e){this.replaceAllAction.enabled!==e&&(this.replaceAllAction.enabled=e,this.replaceAllAction.label=e?t.REPLACE_ALL_ENABLED_LABEL(this.keyBindingService):t.REPLACE_ALL_DISABLED_LABEL,this.updateReplaceActiveState())},t.prototype.updateReplaceActiveState=function(){var e=this.isReplaceActive(),t=this.isReplaceShown()&&this.replaceAllAction.enabled;e!==t&&(this.replaceActive.set(t),this._onReplaceStateChange.fire(t))},t.prototype.validateSearchInput=function(e){if(0===e.length)return null;if(!this.searchInput.getRegex())return null;var t;try{t=new RegExp(e)}catch(e){return{content:e.message}}return r.regExpLeadsToEndlessLoop(t)?{content:i.localize(7,null)}:r.regExpContainsBackreference(e)?{content:i.localize(8,null)}:null},t.prototype.onSearchInputChanged=function(){this.setReplaceAllActionState(!1)},t.prototype.onSearchInputKeyDown=function(e){e.equals(3)?(this.submitSearch(),
e.preventDefault()):e.equals(9)?(this._onSearchCancel.fire(),e.preventDefault()):e.equals(2)&&(this.isReplaceShown()?this.replaceInput.focus():this.searchInput.focusOnCaseSensitive(),e.preventDefault())},t.prototype.onCaseSensitiveKeyDown=function(e){e.equals(1026)&&this.isReplaceShown()&&(this.replaceInput.focus(),e.preventDefault())},t.prototype.onRegexKeyDown=function(e){e.equals(2)&&(this.isReplaceActive()?this.focusReplaceAllAction():this._onBlur.fire(),e.preventDefault())},t.prototype.onReplaceInputKeyDown=function(e){e.equals(3)?(this.submitSearch(),e.preventDefault()):e.equals(2)?(this.searchInput.focusOnCaseSensitive(),e.preventDefault()):e.equals(1026)&&(this.searchInput.focus(),e.preventDefault())},t.prototype.onReplaceActionbarKeyDown=function(e){e.equals(1026)&&(this.focusRegexAction(),e.preventDefault())},t.prototype.submitSearch=function(e){void 0===e&&(e=!0);var t=this.searchInput.getValue(),n=this.configurationService.getValue("search").globalFindClipboard
;t&&(n&&this.clipboardServce.writeFindText(t),this._onSearchSubmit.fire(e))},t.prototype.dispose=function(){this.setReplaceAllActionState(!1),this.replaceAllAction.searchWidget=null,this.replaceActionBar=null,e.prototype.dispose.call(this)},t.REPLACE_ALL_DISABLED_LABEL=i.localize(0,null),t.REPLACE_ALL_ENABLED_LABEL=function(e){var t=e.lookupKeybinding(D.ID);return b.appendKeyBindingLabel(i.localize(1,null),t,e)},t=a([l(2,v.IContextViewService),l(3,C.IThemeService),l(4,g.IContextKeyService),l(5,f.IKeybindingService),l(6,w.IClipboardService),l(7,I.IConfigurationService)],t)}(c.Widget);t.SearchWidget=A,t.registerContributions=function(){p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:D.ID,weight:p.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:g.ContextKeyExpr.and(S.SearchViewVisibleKey,S.ReplaceActiveKey,E.CONTEXT_FIND_WIDGET_NOT_VISIBLE),primary:2563,handler:function(e){b.isSearchViewFocused(e.get(y.IViewletService),e.get(T.IPanelService))&&D.INSTANCE.run()}})}}),
define(e[1539],t([1,0,739,23,20,73,31,16,56,64,141,104,80,65,18,95,26,21,51,17,12,508,9]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";function T(e,t,n,i){return e.isEnabled()?[{id:void 0,label:i,separator:{border:!0},alwaysShow:!0,run:function(){return t.openViewlet(f.VIEWLET_ID,!0).then(function(e){e.search(n),e.focus()})}}]:[]}function x(e,t,n){void 0===n&&(n=!1);var i=e.map(function(e){return{id:e.id,label:e.label,description:e.description}}).sort(function(e,t){return e.label.localeCompare(t.label)});return i.length>0&&(t||n)&&(i[0].separator={label:t,border:n}),i}Object.defineProperty(t,"__esModule",{value:!0});var k=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.quickOpenService=i,c.themeService=r,c.extensionGalleryService=o,c.viewletService=s,c.configurationService=a,c}return n(t,e),t.prototype.run=function(){var e=this;return this.themeService.getColorThemes().then(function(t){var n=e.themeService.getColorTheme(),r=[].concat(x(t.filter(function(e){
return e.type===E.LIGHT}),i.localize(1,null)),x(t.filter(function(e){return e.type===E.DARK}),i.localize(2,null),!0),x(t.filter(function(e){return e.type===E.HIGH_CONTRAST}),i.localize(3,null),!0),T(e.extensionGalleryService,e.viewletService,"category:themes",i.localize(4,null))),s=function(t,i){void 0===t.id&&(t=n);var r=null;if(i){r=void 0!==e.configurationService.inspect(p.COLOR_THEME_SETTING).workspace?C.ConfigurationTarget.WORKSPACE:C.ConfigurationTarget.USER}e.themeService.setColorTheme(t.id,r).done(null,function(t){I.onUnexpectedError(t),e.themeService.setColorTheme(n.id,null)})},a=i.localize(5,null),c=o.firstIndex(r,function(e){return e.id===n.id}),l=new m.Delayer(100);return e.quickOpenService.pick(r,{placeHolder:a,autoFocus:{autoFocusIndex:c}}).then(function(e){return l.trigger(function(){return s(e||n,!0)},0)},null,function(e){return l.trigger(function(){return s(e,!1)})})})},t.ID="workbench.action.selectTheme",t.LABEL=i.localize(0,null),
t=a([l(2,h.IQuickOpenService),l(3,p.IWorkbenchThemeService),l(4,g.IExtensionGalleryService),l(5,v.IViewletService),l(6,y.IWorkspaceConfigurationService)],t)}(r.Action);t.SelectColorThemeAction=k;var D=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.quickOpenService=i,c.themeService=r,c.extensionGalleryService=o,c.viewletService=s,c.configurationService=a,c}return n(t,e),t.prototype.run=function(){var e=this;return this.themeService.getFileIconThemes().then(function(t){var n=e.themeService.getFileIconTheme(),r=[{id:"",label:i.localize(7,null),description:i.localize(8,null)}];r=r.concat(x(t),T(e.extensionGalleryService,e.viewletService,"tag:icon-theme",i.localize(9,null)));var s=function(t,i){void 0===t.id&&(t=n);var r=null;if(i){r=void 0!==e.configurationService.inspect(p.ICON_THEME_SETTING).workspace?C.ConfigurationTarget.WORKSPACE:C.ConfigurationTarget.USER}e.themeService.setFileIconTheme(t&&t.id,r).done(null,function(t){I.onUnexpectedError(t),
e.themeService.setFileIconTheme(n.id,null)})},a=i.localize(10,null),c=o.firstIndex(r,function(e){return e.id===n.id}),l=new m.Delayer(100);return e.quickOpenService.pick(r,{placeHolder:a,autoFocus:{autoFocusIndex:c}}).then(function(e){return l.trigger(function(){return s(e||n,!0)},0)},null,function(e){return l.trigger(function(){return s(e,!1)})})})},t.ID="workbench.action.selectIconTheme",t.LABEL=i.localize(6,null),t=a([l(2,h.IQuickOpenService),l(3,p.IWorkbenchThemeService),l(4,g.IExtensionGalleryService),l(5,v.IViewletService),l(6,y.IWorkspaceConfigurationService)],t)}(r.Action),A=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.themeService=i,o.editorService=r,o}return n(t,e),t.prototype.run=function(){for(var e=this.themeService.getColorTheme(),t={},n=[],i=0,r=u.Registry.as(b.Extensions.ColorContribution).getColors().map(function(e){return e.id}).sort();i<r.length;i++){var o=r[i];(l=e.getColor(o,!1))?t[o]=_.Color.Format.CSS.formatHexA(l,!0):n.push(o)}for(var s=0,a=n;s<a.length;s++){
var c=a[s],l=e.getColor(c);l&&(t["__"+c]=_.Color.Format.CSS.formatHexA(l,!0))}var d=JSON.stringify({$schema:w.schemaId,type:e.type,colors:t,tokenColors:e.tokenColors.filter(function(e){return!!e.scope})},null,"\t");return d=d.replace(/\"__/g,'//"'),this.editorService.openEditor({contents:d,language:"jsonc"})},t.ID="workbench.action.generateColorTheme",t.LABEL=i.localize(11,null),t=a([l(2,p.IWorkbenchThemeService),l(3,S.IEditorService)],t)}(r.Action),L=i.localize(12,null),R=new c.SyncActionDescriptor(k,k.ID,k.LABEL,{primary:s.KeyChord(2089,2098)});u.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(R,"Preferences: Color Theme",L);var O=new c.SyncActionDescriptor(D,D.ID,D.LABEL);u.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(O,"Preferences: File Icon Theme",L);var M=i.localize(13,null),P=new c.SyncActionDescriptor(A,A.ID,A.LABEL);u.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(P,"Developer: Generate Color Theme From Current Settings",M)}),
define(e[542],t([1,0,5,4,30,65,81]),function(e,t,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t,n){this.viewletService=e,this.panelService=t,this.scopeId=n,this.toDispose=[],this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.viewletService.onDidViewletOpen(function(t){return e.onScopeOpened(t.getId())})),this.toDispose.push(this.panelService.onDidPanelOpen(function(t){return e.onScopeOpened(t.getId())})),this.toDispose.push(this.viewletService.onDidViewletClose(function(t){return e.onScopeClosed(t.getId())})),this.toDispose.push(this.panelService.onDidPanelClose(function(t){return e.onScopeClosed(t.getId())}))},e.prototype.onScopeClosed=function(e){e===this.scopeId&&this.onScopeDeactivated()},e.prototype.onScopeOpened=function(e){e===this.scopeId&&this.onScopeActivated()},e}();t.ScopedService=u;var d=function(e){function t(t,n,i,r,s){var a=e.call(this,r,s,n)||this;return a.progressbar=t,
a.isActive=i||o.isUndefinedOrNull(n),a.progressState=Object.create(null),a}return n(t,e),t.prototype.onScopeDeactivated=function(){this.isActive=!1},t.prototype.onScopeActivated=function(){if(this.isActive=!0,!this.progressState.done)if(this.progressState.whilePromise){var e=void 0;if(this.progressState.whileDelay>0){var t=this.progressState.whileDelay-(Date.now()-this.progressState.whileStart);t>0&&(e=t)}this.doShowWhile(e)}else this.progressState.infinite?this.progressbar.infinite().show():(this.progressState.total&&this.progressbar.total(this.progressState.total).show(),this.progressState.worked&&this.progressbar.worked(this.progressState.worked).show())},t.prototype.clearProgressState=function(){this.progressState.infinite=void 0,this.progressState.done=void 0,this.progressState.worked=void 0,this.progressState.total=void 0,this.progressState.whilePromise=void 0,this.progressState.whileStart=void 0,this.progressState.whileDelay=void 0},t.prototype.show=function(e,t){var n,i,r=this
;return"boolean"==typeof e?n=e:i=e,this.clearProgressState(),this.progressState.infinite=n,this.progressState.total=i,this.isActive&&(o.isUndefinedOrNull(n)?o.isUndefinedOrNull(i)||this.progressbar.total(i).show(t):this.progressbar.infinite().show(t)),{total:function(e){r.progressState.infinite=!1,r.progressState.total=e,r.isActive&&r.progressbar.total(e)},worked:function(e){!r.isActive||r.progressbar.hasTotal()?(r.progressState.infinite=!1,r.progressState.worked?r.progressState.worked+=e:r.progressState.worked=e,r.isActive&&r.progressbar.worked(e)):(r.progressState.infinite=!0,r.progressState.worked=void 0,r.progressState.total=void 0,r.progressbar.infinite().show())},done:function(){r.progressState.infinite=!1,r.progressState.done=!0,r.isActive&&r.progressbar.stop().hide()}}},t.prototype.showWhile=function(e,t){var n=this;!!this.progressState.whilePromise?e=r.TPromise.join([e,this.progressState.whilePromise]):this.clearProgressState(),this.progressState.whilePromise=e,this.progressState.whileDelay=t||0,
this.progressState.whileStart=Date.now();var i=function(){n.progressState.whilePromise&&n.progressState.whilePromise!==e||(n.clearProgressState(),n.isActive&&n.progressbar.stop().hide())};return this.doShowWhile(t),e.then(i,i)},t.prototype.doShowWhile=function(e){this.isActive&&this.progressbar.infinite().show(e)},t.prototype.dispose=function(){this.toDispose=i.dispose(this.toDispose)},t=a([l(3,s.IViewletService),l(4,c.IPanelService)],t)}(u);t.ScopedProgressService=d;var h=function(){function e(e){this.progressbar=e}return e.prototype.show=function(e,t){var n=this;return"boolean"==typeof e?this.progressbar.infinite().show(t):this.progressbar.total(e).show(t),{total:function(e){n.progressbar.total(e)},worked:function(e){n.progressbar.hasTotal()?n.progressbar.worked(e):n.progressbar.infinite().show()},done:function(){n.progressbar.stop().hide()}}},e.prototype.showWhile=function(e,t){var n=this,i=function(){n.progressbar.stop().hide()};return this.progressbar.infinite().show(t),e.then(i,i)},e}()
;t.ProgressService=h}),define(e[543],t([1,0,1490,149,4,5,74,14,7,30,9,346,41,205,146,200,542,34,137,119,68,844]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(e){function t(t,n,i,r,o,s,a,c,u,d,h,p,f,g,v,m){var b=e.call(this,v,m,c)||this;return b.notificationService=t,b.storageService=n,b.telemetryService=i,b.contextMenuService=r,b.partService=o,b.keybindingService=s,b.instantiationService=a,b.registry=u,b.activeCompositeSettingsKey=d,b.defaultCompositeId=h,b.nameForTelemetry=p,b.compositeCSSClass=f,b.titleForegroundColor=g,b._onDidCompositeOpen=new l.Emitter,b._onDidCompositeClose=new l.Emitter,b.instantiatedCompositeListeners=[],b.mapCompositeToCompositeContainer={},b.mapActionsBindingToComposite={},b.mapProgressServiceToComposite={},b.activeComposite=null,b.instantiatedComposites=[],b.lastActiveCompositeId=n.get(d,y.StorageScope.WORKSPACE,b.defaultCompositeId),b}return n(t,e),t.prototype.openComposite=function(e,t){
return this.activeComposite&&this.activeComposite.getId()===e?(t&&this.activeComposite.focus(),o.TPromise.as(this.activeComposite)):this.doOpenComposite(e,t)},t.prototype.doOpenComposite=function(e,t){var n=this,i=r.defaultGenerator.nextId();this.currentCompositeOpenToken=i;return(this.activeComposite?this.hideActiveComposite():o.TPromise.as(null)).then(function(){n.updateTitle(e);var r=n.createComposite(e,!0);return n.currentCompositeOpenToken!==i||n.activeComposite&&n.activeComposite.getId()!==r.getId()?o.TPromise.as(null):n.activeComposite&&n.activeComposite.getId()===r.getId()?(t&&r.focus(),o.TPromise.as(r)):n.showComposite(r).then(function(){return t&&r.focus(),r})}).then(function(e){return e&&n._onDidCompositeOpen.fire(e),e})},t.prototype.createComposite=function(e,t){for(var n=this,i=0;i<this.instantiatedComposites.length;i++)if(this.instantiatedComposites[i].getId()===e)return this.instantiatedComposites[i];var r=this.registry.getComposite(e);if(r){
var o=this.instantiationService.createInstance(m.ScopedProgressService,this.progressBar,r.id,t),s=this.instantiationService.createChild(new b.ServiceCollection([S.IProgressService,o])),a=r.instantiate(s);return this.mapProgressServiceToComposite[a.getId()]=o,this.instantiatedComposites.push(a),this.instantiatedCompositeListeners.push(a.onTitleAreaUpdate(function(){return n.onTitleAreaUpdate(a.getId())})),a}throw new Error(c.format("Unable to find composite with id {0}",e))},t.prototype.showComposite=function(e){var t=this;this.activeComposite=e;var n=this.activeComposite.getId();n!==this.defaultCompositeId?this.storageService.store(this.activeCompositeSettingsKey,n,y.StorageScope.WORKSPACE):this.storageService.remove(this.activeCompositeSettingsKey,y.StorageScope.WORKSPACE),this.lastActiveCompositeId=this.activeComposite.getId();var i,r=this.mapCompositeToCompositeContainer[e.getId()];r?i=o.TPromise.as(null):(r=a.$().div({class:["composite",this.compositeCSSClass],id:e.getId()},function(t){
i=e.create(t.getHTMLElement()).then(function(){e.updateStyles()})}),this.mapCompositeToCompositeContainer[e.getId()]=r);return this.mapProgressServiceToComposite[e.getId()]&&!r&&this.mapProgressServiceToComposite[e.getId()].showWhile(i,this.partService.isCreated()?800:3200),i.then(function(){if(t.activeComposite&&e.getId()===t.activeComposite.getId()){r.build(t.getContentArea()),r.show(),t.toolBar.actionRunner=e.getActionRunner();var n=t.registry.getComposite(e.getId());n&&n.name!==e.getTitle()&&t.updateTitle(e.getId(),e.getTitle());var i=t.mapActionsBindingToComposite[e.getId()];return i||(i=t.collectCompositeActions(e),t.mapActionsBindingToComposite[e.getId()]=i),i(),t.telemetryActionsListener&&(t.telemetryActionsListener.dispose(),t.telemetryActionsListener=null),t.telemetryActionsListener=t.toolBar.actionRunner.onDidRun(function(e){e.error&&!d.isPromiseCanceledError(e.error)&&t.notificationService.error(e.error),t.telemetryService&&t.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,
from:t.nameForTelemetry})}),e.setVisible(!0).then(function(){t.activeComposite&&e.getId()===t.activeComposite.getId()&&t.contentAreaSize&&e.layout(t.contentAreaSize)})}},function(e){return t.onError(e)})},t.prototype.onTitleAreaUpdate=function(e){if(this.activeComposite&&this.activeComposite.getId()===e){this.updateTitle(this.activeComposite.getId(),this.activeComposite.getTitle());var t=this.collectCompositeActions(this.activeComposite);this.mapActionsBindingToComposite[this.activeComposite.getId()]=t,t()}else delete this.mapActionsBindingToComposite[e]},t.prototype.updateTitle=function(e,t){var n=this.registry.getComposite(e);if(n&&this.titleLabel){t||(t=n.name);var r=this.keybindingService.lookupKeybinding(e);this.titleLabel.updateTitle(e,t,r?r.getLabel():void 0),this.toolBar.setAriaLabel(i.localize(0,null,t))}},t.prototype.collectCompositeActions=function(e){var t=e.getActions().slice(0),n=e.getSecondaryActions().slice(0);return t.push.apply(t,this.getActions()),n.push.apply(n,this.getSecondaryActions()),
this.toolBar.setActions(g.prepareActions(t),g.prepareActions(n))},t.prototype.getActiveComposite=function(){return this.activeComposite},t.prototype.getLastActiveCompositetId=function(){return this.lastActiveCompositeId},t.prototype.hideActiveComposite=function(){var e=this;if(!this.activeComposite)return o.TPromise.as(null);var t=this.activeComposite;this.activeComposite=null;var n=this.mapCompositeToCompositeContainer[t.getId()];return t.setVisible(!1).then(function(){return n.offDOM(),n.hide(),e.progressBar.stop().hide(),e.toolBar.setActions([])(),e._onDidCompositeClose.fire(t),t})},t.prototype.createTitleArea=function(e){var t=this,n=a.$(e).div({class:["composite","title"]});return this.titleLabel=this.createTitleLabel(n.getHTMLElement()),a.$(n).div({class:"title-actions"},function(e){t.toolBar=new h.ToolBar(e.getHTMLElement(),t.contextMenuService,{actionItemProvider:function(e){return t.actionItemProvider(e)},orientation:p.ActionsOrientation.HORIZONTAL,getKeyBinding:function(e){
return t.keybindingService.lookupKeybinding(e.id)}})}),n.getHTMLElement()},t.prototype.createTitleLabel=function(e){var t;a.$(e).div({class:"title-label"},function(e){t=e.span()});var n=this;return{updateTitle:function(e,n,r){t.safeInnerHtml(n),t.title(r?i.localize(1,null,n,r):n)},updateStyles:function(){t.style("color",n.getColor(n.titleForegroundColor))}}},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this),this.titleLabel.updateStyles()},t.prototype.actionItemProvider=function(e){if(this.activeComposite)return this.activeComposite.getActionItem(e)},t.prototype.createContentArea=function(e){var t=this;return a.$(e).div({class:"content"},function(e){t.progressBar=new f.ProgressBar(e.getHTMLElement()),t.toUnbind.push(_.attachProgressBarStyler(t.progressBar,t.themeService)),t.progressBar.hide()}).getHTMLElement()},t.prototype.onError=function(e){this.notificationService.error(u.isString(e)?new Error(e):e)},t.prototype.getProgressIndicator=function(e){
return this.mapProgressServiceToComposite[e]},t.prototype.getActions=function(){return[]},t.prototype.getSecondaryActions=function(){return[]},t.prototype.layout=function(t){var n=e.prototype.layout.call(this,t);return this.contentAreaSize=n[1],this.activeComposite&&this.activeComposite.layout(this.contentAreaSize),n},t.prototype.shutdown=function(){this.instantiatedComposites.forEach(function(e){return e.shutdown()}),e.prototype.shutdown.call(this)},t.prototype.dispose=function(){this.mapCompositeToCompositeContainer=null,this.mapProgressServiceToComposite=null,this.mapActionsBindingToComposite=null;for(var t=0;t<this.instantiatedComposites.length;t++)this.instantiatedComposites[t].dispose();this.instantiatedComposites=[],this.instantiatedCompositeListeners=s.dispose(this.instantiatedCompositeListeners),this.progressBar.dispose(),this.toolBar.dispose(),e.prototype.dispose.call(this)},t}(v.Part);t.CompositePart=C}),
define(e[1542],t([1,0,4,466,40,7,6,8,137,15,205,68,12,26,69,53,1474,1359,119,542,1506,9,5,22,126,28,18,132,223,91,25,41,37,23,187,1473,31,82,143,35,824]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var K=function(e){function t(n,i,o,a,c,l,u,d,h,p,f,g){var v=e.call(this,l)||this;return v.accessor=n,v._label=o,v.instantiationService=a,v.contextKeyService=c,v.notificationService=u,v.telemetryService=d,v.untitledEditorService=h,v.keybindingService=p,v.menuService=f,v.contextMenuService=g,v._onDidFocus=v._register(new s.Emitter),v._onWillDispose=v._register(new s.Emitter),v._onDidGroupChange=v._register(new s.Emitter),v._onWillOpenEditor=v._register(new s.Emitter),v._onDidOpenEditorFail=v._register(new s.Emitter),v._onWillCloseEditor=v._register(new s.Emitter),v._onDidCloseEditor=v._register(new s.Emitter),v.mapEditorToPendingConfirmation=new Map,v.element=document.createElement("div"),
v._onDidChange=v._register(new s.Relay),v.onDidChange=v._onDidChange.event,i instanceof t?v._group=v._register(i.group.clone()):r.isSerializedEditorGroup(i)?v._group=v._register(a.createInstance(r.EditorGroup,i)):v._group=v._register(a.createInstance(r.EditorGroup,void 0)),v.disposedEditorsWorker=v._register(new D.RunOnceWorker(function(e){return v.handleDisposedEditors(e)},0)),v.create(),v._whenRestored=v.restoreEditors(i),v._whenRestored.then(function(){return v.isRestored=!0}),v.registerListeners(),v}return n(t,e),t.createNew=function(e,n,i){return i.createInstance(t,e,null,n)},t.createFromSerialized=function(e,n,i,r){return r.createInstance(t,n,e,i)},t.createCopy=function(e,n,i,r){return r.createInstance(t,n,e,i)},Object.defineProperty(t.prototype,"onDidFocus",{get:function(){return this._onDidFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onWillDispose",{get:function(){return this._onWillDispose.event},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"onDidGroupChange",{get:function(){return this._onDidGroupChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onWillOpenEditor",{get:function(){return this._onWillOpenEditor.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidOpenEditorFail",{get:function(){return this._onDidOpenEditorFail.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onWillCloseEditor",{get:function(){return this._onWillCloseEditor.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidCloseEditor",{get:function(){return this._onDidCloseEditor.event},enumerable:!0,configurable:!0}),t.prototype.create=function(){u.addClasses(this.element,"editor-group-container"),this.registerContainerListeners(),this.createContainerToolbar(),this.createContainerContextMenu();var e=document.createElement("div");u.addClass(e,"editor-group-letterpress"),this.element.appendChild(e),
this.progressBar=this._register(new p.ProgressBar(this.element)),this._register(f.attachProgressBarStyler(this.progressBar,this.themeService)),this.progressBar.hide();var t=this._register(this.contextKeyService.createScoped(this.element));this.scopedInstantiationService=this.instantiationService.createChild(new d.ServiceCollection([h.IContextKeyService,t],[_.IProgressService,new C.ProgressService(this.progressBar)])),this.handleGroupContextKeys(t),this.titleContainer=document.createElement("div"),u.addClass(this.titleContainer,"title"),this.element.appendChild(this.titleContainer),this.createTitleAreaControl(),this.editorContainer=document.createElement("div"),u.addClass(this.editorContainer,"editor-container"),this.element.appendChild(this.editorContainer),this.editorControl=this._register(this.scopedInstantiationService.createInstance(S.EditorControl,this.editorContainer,this)),this._onDidChange.input=this.editorControl.onDidSizeConstraintsChange,this.doTrackFocus(),this.updateTitleContainer(),
this.updateContainer(),this.updateStyles()},t.prototype.handleGroupContextKeys=function(e){var t,n=this,i=o.EditorGroupActiveEditorDirtyContext.bindTo(e),r=function(){t=I.dispose(t);var e=n._group.activeEditor;e?(i.set(e.isDirty()),t=e.onDidChangeDirty(function(){return i.set(e.isDirty())})):i.set(!1)};this._register(this.onDidGroupChange(function(e){e.kind===y.GroupChangeKind.EDITOR_ACTIVE&&r()})),r()},t.prototype.registerContainerListeners=function(){var e=this;this._register(u.addDisposableListener(this.element,u.EventType.DBLCLICK,function(t){e.isEmpty()&&(u.EventHelper.stop(t),e.openEditor(e.untitledEditorService.createOrGet(),o.EditorOptions.create({pinned:!0})))})),this._register(u.addDisposableListener(this.element,u.EventType.MOUSE_UP,function(t){e.isEmpty()&&1===t.button&&(u.EventHelper.stop(t),e.accessor.removeGroup(e))}))},t.prototype.createContainerToolbar=function(){var e=this,t=document.createElement("div");u.addClass(t,"editor-group-container-toolbar"),this.element.appendChild(t)
;var r=this._group.id,o=new M.ActionBar(t,{ariaLabel:E.localize(0,null),actionRunner:this._register(new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(e){return e.run(r)},t}(N.ActionRunner)))}),s=this._register(new N.Action(F.CLOSE_EDITOR_GROUP_COMMAND_ID,E.localize(1,null),"close-editor-group",!0,function(){return e.accessor.removeGroup(e),i.TPromise.as(!0)})),a=this.keybindingService.lookupKeybinding(s.id);o.push(s,{icon:!0,label:!1,keybinding:a?a.getLabel():void 0})},t.prototype.createContainerContextMenu=function(){var e=this,t=this._register(this.menuService.createMenu(B.MenuId.EmptyEditorGroupContext,this.contextKeyService));this._register(u.addDisposableListener(this.element,u.EventType.CONTEXT_MENU,function(n){return e.onShowContainerContextMenu(t,n)})),this._register(u.addDisposableListener(this.element,A.EventType.Contextmenu,function(n){return e.onShowContainerContextMenu(t)}))},t.prototype.onShowContainerContextMenu=function(e,t){
var n=this;if(this.isEmpty()){var r=this.element;if(t instanceof MouseEvent){var o=new V.StandardMouseEvent(t);r={x:o.posx,y:o.posy}}var s=[];z.fillInContextMenuActions(e,void 0,s,this.contextMenuService),this.contextMenuService.showContextMenu({getAnchor:function(){return r},getActions:function(){return i.TPromise.as(s)},getKeyBinding:function(e){return n.keybindingService.lookupKeybinding(e.id)},onHide:function(){return n.focus()}})}},t.prototype.doTrackFocus=function(){var e=this,t=this._register(u.trackFocus(this.element));this._register(t.onDidFocus(function(){e.isEmpty()&&e._onDidFocus.fire()}));var n=function(t){var n;if(t instanceof MouseEvent){if(0!==t.button)return;n=t.target}else n=t.initialTarget;u.findParentWithClass(n,"monaco-action-bar",e.titleContainer)||setTimeout(function(){e.focus()})};this._register(u.addDisposableListener(this.titleContainer,u.EventType.MOUSE_DOWN,function(e){return n(e)})),this._register(u.addDisposableListener(this.titleContainer,A.EventType.Tap,function(e){return n(e)
})),this._register(this.editorControl.onDidFocus(function(){e._onDidFocus.fire()}))},t.prototype.updateContainer=function(){this.isEmpty()?(u.addClass(this.element,"empty"),this.element.tabIndex=0,this.element.setAttribute("aria-label",E.localize(2,null,this.label))):(u.removeClass(this.element,"empty"),this.element.removeAttribute("tabIndex"),this.element.removeAttribute("aria-label")),this.updateStyles()},t.prototype.updateTitleContainer=function(){u.toggleClass(this.titleContainer,"tabs",this.accessor.partOptions.showTabs),u.toggleClass(this.titleContainer,"show-file-icons",this.accessor.partOptions.showIcons)},t.prototype.createTitleAreaControl=function(){this.titleAreaControl&&(this.titleAreaControl.dispose(),u.clearNode(this.titleContainer)),
this.accessor.partOptions.showTabs?this.titleAreaControl=this.scopedInstantiationService.createInstance(b.TabsTitleControl,this.titleContainer,this.accessor,this):this.titleAreaControl=this.scopedInstantiationService.createInstance(W.NoTabsTitleControl,this.titleContainer,this.accessor,this)},t.prototype.restoreEditors=function(e){var n=this;if(0===this._group.count)return i.TPromise.as(void 0);var r;r=e instanceof t?L.getActiveTextEditorOptions(e):new o.EditorOptions;var s=this._group.activeEditor;return r.pinned=this._group.isPinned(s),r.preserveFocus=!0,this.doShowEditor(s,!0,r).then(function(){n.accessor.activeGroup===n&&n.focus()})},t.prototype.registerListeners=function(){var e=this;this._register(this._group.onDidEditorPin(function(t){return e.onDidEditorPin(t)})),this._register(this._group.onDidEditorOpen(function(t){return e.onDidEditorOpen(t)})),this._register(this._group.onDidEditorClose(function(t){return e.onDidEditorClose(t)})),this._register(this._group.onDidEditorDispose(function(t){
return e.onDidEditorDispose(t)})),this._register(this._group.onDidEditorBecomeDirty(function(t){return e.onDidEditorBecomeDirty(t)})),this._register(this._group.onDidEditorLabelChange(function(t){return e.onDidEditorLabelChange(t)})),this._register(this.accessor.onDidEditorPartOptionsChange(function(t){return e.onDidEditorPartOptionsChange(t)}))},t.prototype.onDidEditorPin=function(e){this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_PIN,editor:e})},t.prototype.onDidEditorOpen=function(e){this.telemetryService.publicLog("editorOpened",e.getTelemetryDescriptor()),this.updateContainer(),this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_OPEN,editor:e})},t.prototype.onDidEditorClose=function(e){var t=this;this._onWillCloseEditor.fire(e);var n=e.editor,i=[n];n instanceof o.SideBySideEditorInput&&!this.accessor.groups.some(function(e){return e.group.contains(n)})&&i.push(n.master,n.details),i.forEach(function(e){var n=e?e.getResource():void 0;t.accessor.groups.some(function(t){
return t.group.contains(n||e)})||e.close()}),this.telemetryService.publicLog("editorClosed",e.editor.getTelemetryDescriptor()),this.updateContainer(),this._onDidCloseEditor.fire(e),this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_CLOSE,editor:n,editorIndex:e.index})},t.prototype.onDidEditorDispose=function(e){this.disposedEditorsWorker.work(e)},t.prototype.handleDisposedEditors=function(e){var t,n=this,i=[];e.forEach(function(e){n._group.isActive(e)?t=e:n._group.contains(e)&&i.push(e)}),i.forEach(function(e){return n.doCloseEditor(e,!1)}),t&&this.doCloseEditor(t,!1)},t.prototype.onDidEditorPartOptionsChange=function(e){this.updateTitleContainer(),e.oldPartOptions.showTabs!==e.newPartOptions.showTabs?(this.createTitleAreaControl(),this._group.activeEditor&&this.titleAreaControl.openEditor(this._group.activeEditor)):this.titleAreaControl.updateOptions(e.oldPartOptions,e.newPartOptions),this.updateStyles(),
e.oldPartOptions.enablePreview&&!e.newPartOptions.enablePreview&&this.pinEditor(this._group.previewEditor)},t.prototype.onDidEditorBecomeDirty=function(e){this.pinEditor(e),this.titleAreaControl.updateEditorDirty(e),this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_DIRTY,editor:e})},t.prototype.onDidEditorLabelChange=function(e){this.titleAreaControl.updateEditorLabel(e),this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_LABEL,editor:e})},Object.defineProperty(t.prototype,"group",{get:function(){return this._group},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"whenRestored",{get:function(){return this._whenRestored},enumerable:!0,configurable:!0}),t.prototype.setLabel=function(e){this._label!==e&&(this._label=e,this._onDidGroupChange.fire({
kind:y.GroupChangeKind.GROUP_LABEL}))},t.prototype.setActive=function(e){this.active=e,u.toggleClass(this.element,"active",e),u.toggleClass(this.element,"inactive",!e),this.titleAreaControl.setActive(e),this.updateStyles(),this._onDidGroupChange.fire({kind:y.GroupChangeKind.GROUP_ACTIVE})},t.prototype.isEmpty=function(){return 0===this._group.count},Object.defineProperty(t.prototype,"id",{get:function(){return this._group.id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"editors",{get:function(){return this._group.getEditors()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._group.count},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeControl",{get:function(){return this.editorControl?this.editorControl.activeControl:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeEditor",{get:function(){return this._group.activeEditor},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"previewEditor",{get:function(){return this._group.previewEditor},enumerable:!0,configurable:!0}),t.prototype.isPinned=function(e){return this._group.isPinned(e)},t.prototype.isActive=function(e){return this._group.isActive(e)},t.prototype.getEditors=function(e){return e===y.EditorsOrder.MOST_RECENTLY_ACTIVE?this._group.getEditors(!0):this.editors},t.prototype.getEditor=function(e){return this._group.getEditor(e)},t.prototype.getIndexOfEditor=function(e){return this._group.indexOf(e)},t.prototype.isOpened=function(e){return this._group.contains(e)},t.prototype.focus=function(){this.activeControl?this.activeControl.focus():this.element.focus(),this._onDidFocus.fire()},t.prototype.pinEditor=function(e){void 0===e&&(e=this.activeEditor),e&&!this._group.isPinned(e)&&(this._group.pin(e),this.titleAreaControl.pinEditor(e))},t.prototype.invokeWithinContext=function(e){return this.scopedInstantiationService.invokeFunction(e)},t.prototype.openEditor=function(e,t){
var n=new U(this._group.id,e,t);this._onWillOpenEditor.fire(n);var i=n.isPrevented();return i?i():this.doOpenEditor(e,t)},t.prototype.doOpenEditor=function(e,t){var n={index:t?t.index:void 0,pinned:!this.accessor.partOptions.enablePreview||e.isDirty()||t&&t.pinned||t&&"number"==typeof t.index,active:0===this._group.count||!t||!t.inactive};n.active||n.pinned||!this._group.isPreview(this._group.activeEditor)||(n.active=!0),!n.active||t&&t.preserveFocus||this.accessor.activateGroup(this),this._group.openEditor(e,n);return this.doShowEditor(e,n.active,t)},t.prototype.doShowEditor=function(e,t,n){var r,o=this;return r=t?this.editorControl.openEditor(e,n).then(function(t){t.editorChanged&&o._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_ACTIVE,editor:e})},function(t){o.doHandleOpenEditorError(t,e,n)}):i.TPromise.as(void 0),this.titleAreaControl.openEditor(e),r},t.prototype.doHandleOpenEditorError=function(e,t,n){if(this.isRestored&&!w.isPromiseCanceledError(e)&&!this.ignoreOpenEditorErrors){var i={primary:[]
};w.isErrorWithActions(e)&&(i.primary=e.actions);var r=this.notificationService.notify({severity:T.Severity.Error,message:E.localize(3,null,t.getName(),x.toErrorMessage(e)),actions:i});s.once(r.onDidClose)(function(){return I.dispose(i.primary)})}if(this._onDidOpenEditorFail.fire(t),this.activeEditor===t){var o=!n||!n.preserveFocus;this.doCloseEditor(t,o,!0)}},t.prototype.openEditors=function(e){var t=this;if(!e.length)return i.TPromise.as(void 0);var n=(e=e.slice(0)).shift(),r=n.editor,s=n.options;return this.openEditor(r,s).then(function(){var n=t.getIndexOfEditor(r)+1;return i.TPromise.join(e.map(function(e,i){var r=e.editor,s=e.options||new o.EditorOptions;return s.inactive=!0,s.pinned=!0,s.index=n+i,t.openEditor(r,s)})).then(function(){})})},t.prototype.moveEditor=function(e,t,n){this===t?this.doMoveEditorInsideGroup(e,n):this.doMoveOrCopyEditorAcrossGroups(e,t,n)},t.prototype.doMoveEditorInsideGroup=function(e,t){var n=t?t.index:void 0;if("number"==typeof n){var i=this._group.indexOf(e)
;i!==n&&(this._group.moveEditor(e,n),this._group.pin(e),this.titleAreaControl.moveEditor(e,i,n),this.titleAreaControl.pinEditor(e),this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_MOVE,editor:e}))}},t.prototype.doMoveOrCopyEditorAcrossGroups=function(e,t,n,i){void 0===n&&(n=Object.create(null));var r=L.getActiveTextEditorOptions(this,e,o.EditorOptions.create(n));r.pinned=!0,t.openEditor(e,r),i||this.doCloseEditor(e,!1)},t.prototype.copyEditor=function(e,t,n){this===t?this.doMoveEditorInsideGroup(e,n):this.doMoveOrCopyEditorAcrossGroups(e,t,n,!0)},t.prototype.closeEditor=function(e){var t=this;return void 0===e&&(e=this.activeEditor),e?this.handleDirty([e]).then(function(n){n||t.doCloseEditor(e)}):i.TPromise.as(void 0)},t.prototype.doCloseEditor=function(e,t,n){void 0===t&&(t=this.accessor.activeGroup===this),this._group.isActive(e)?this.doCloseActiveEditor(t,n):this.doCloseInactiveEditor(e),this.titleAreaControl.closeEditor(e)},t.prototype.doCloseActiveEditor=function(e,t){var n=this
;void 0===e&&(e=this.accessor.activeGroup===this);var i=this.activeEditor,r=u.isAncestor(document.activeElement,this.element),s=this.accessor.partOptions.closeEmptyGroups;if(s&&this.active&&1===this._group.count){var a=this.accessor.getGroups(y.GroupsOrder.MOST_RECENTLY_ACTIVE)[1];a&&(r?a.focus():this.accessor.activateGroup(a))}this._group.closeEditor(i);var c=this._group.activeEditor;if(c){t&&(this.ignoreOpenEditorErrors=!0);var l=e?void 0:o.EditorOptions.create({preserveFocus:!0});this.openEditor(c,l).then(function(){n.ignoreOpenEditorErrors=!1})}else this.editorControl.closeEditor(i),r&&!s&&this.focus(),this._onDidGroupChange.fire({kind:y.GroupChangeKind.EDITOR_ACTIVE}),s&&this.accessor.removeGroup(this)},t.prototype.doCloseInactiveEditor=function(e){this._group.closeEditor(e)},t.prototype.handleDirty=function(e){var t=this;if(!e.length)return i.TPromise.as(!1);var n=e.shift(),r=this.mapEditorToPendingConfirmation.get(n);return r||(r=this.doHandleDirty(n),this.mapEditorToPendingConfirmation.set(n,r)),
r.then(function(i){return t.mapEditorToPendingConfirmation.delete(n),i||t.handleDirty(e)})},t.prototype.doHandleDirty=function(e){var t=this;return!e.isDirty()||this.accessor.groups.some(function(n){return n!==t&&n.group.contains(e,!0)})||e instanceof o.SideBySideEditorInput&&this.isOpened(e.master)?i.TPromise.as(!1):this.openEditor(e).then(function(){return e.confirmSave().then(function(t){if(!e.isDirty())return t===o.ConfirmResult.CANCEL;switch(t){case o.ConfirmResult.SAVE:return e.save().then(function(e){return!e});case o.ConfirmResult.DONT_SAVE:return e.revert().then(function(e){return!e},function(t){return e.revert({soft:!0}).then(function(e){return!e})});case o.ConfirmResult.CANCEL:return!0}})})},t.prototype.closeEditors=function(e){var t=this;if(this.isEmpty())return i.TPromise.as(void 0);var n=this.getEditorsToClose(e);return this.handleDirty(n.slice(0)).then(function(e){e||t.doCloseEditors(n)})},t.prototype.getEditorsToClose=function(e){if(Array.isArray(e))return e
;var t=e,n="number"==typeof t.direction,i=this._group.getEditors(!n);return t.savedOnly?i=i.filter(function(e){return!e.isDirty()}):n?i=t.direction===o.CloseDirection.LEFT?i.slice(0,this._group.indexOf(t.except)):i.slice(this._group.indexOf(t.except)+1):t.except&&(i=i.filter(function(e){return!e.matches(t.except)})),i},t.prototype.doCloseEditors=function(e){var t=this,n=!1;e.forEach(function(e){t.isActive(e)?n=!0:t.doCloseInactiveEditor(e)}),n&&this.doCloseActiveEditor(),this.titleAreaControl.closeEditors(e)},t.prototype.closeAllEditors=function(){var e=this;if(this.isEmpty())return this.accessor.partOptions.closeEmptyGroups&&this.accessor.removeGroup(this),i.TPromise.as(void 0);var t=this._group.getEditors(!0);return this.handleDirty(t.slice(0)).then(function(t){t||e.doCloseAllEditors()})},t.prototype.doCloseAllEditors=function(){var e=this;this.editors.forEach(function(t){e.isActive(t)||e.doCloseInactiveEditor(t)}),this.doCloseActiveEditor(),this.titleAreaControl.closeAllEditors()},
t.prototype.replaceEditors=function(e){var t,n=this,r=[];if(e.forEach(function(e){var i=e.editor,s=e.replacement,a=e.options;if(!i.isDirty()){var c=n.getIndexOfEditor(i);if(c>=0){var l=n.isActive(i);a?a.index=c:a=o.EditorOptions.create({index:c}),a.inactive=!l,a.pinned=!0;var u={editor:i,replacement:s,options:a};l?t=u:r.push(u)}}}),r.forEach(function(e){var t=e.editor,i=e.replacement,r=e.options;n.doOpenEditor(i,r),n.doCloseInactiveEditor(t),n.titleAreaControl.closeEditor(t)}),t){var s=this.doOpenEditor(t.replacement,t.options);return this.doCloseInactiveEditor(t.editor),this.titleAreaControl.closeEditor(t.editor),s}return i.TPromise.as(void 0)},t.prototype.updateStyles=function(){var e=this.isEmpty();this.element.style.backgroundColor=e?this.getColor(m.EDITOR_GROUP_EMPTY_BACKGROUND):null;var t=this.accessor.partOptions.showTabs,n=this.getColor(m.EDITOR_GROUP_HEADER_TABS_BORDER)||this.getColor(v.contrastBorder);!e&&t&&n?(u.addClass(this.titleContainer,"title-border-bottom"),
this.titleContainer.style.setProperty("--title-border-bottom-color",n.toString())):(u.removeClass(this.titleContainer,"title-border-bottom"),this.titleContainer.style.removeProperty("--title-border-bottom-color")),this.titleContainer.style.backgroundColor=this.getColor(t?m.EDITOR_GROUP_HEADER_TABS_BACKGROUND:m.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND),this.editorContainer.style.backgroundColor=this.getColor(v.editorBackground)},Object.defineProperty(t.prototype,"minimumWidth",{get:function(){return this.editorControl.minimumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minimumHeight",{get:function(){return this.editorControl.minimumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumWidth",{get:function(){return this.editorControl.maximumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximumHeight",{get:function(){return this.editorControl.maximumHeight},enumerable:!0,configurable:!0}),t.prototype.layout=function(e,t){
this.dimension=new u.Dimension(e,t),this.titleAreaControl.layout(new u.Dimension(this.dimension.width,L.EDITOR_TITLE_HEIGHT)),this.editorControl.layout(new u.Dimension(this.dimension.width,this.dimension.height-L.EDITOR_TITLE_HEIGHT))},t.prototype.toJSON=function(){return this._group.serialize()},t.prototype.shutdown=function(){this.editorControl.shutdown()},t.prototype.dispose=function(){this._disposed=!0,this._onWillDispose.fire(),this.titleAreaControl.dispose(),e.prototype.dispose.call(this)},t=a([l(3,c.IInstantiationService),l(4,h.IContextKeyService),l(5,g.IThemeService),l(6,T.INotificationService),l(7,k.ITelemetryService),l(8,R.IUntitledEditorService),l(9,P.IKeybindingService),l(10,B.IMenuService),l(11,H.IContextMenuService)],t)}(m.Themable);t.EditorGroupView=K;var U=function(){function e(e,t,n){this._group=e,this._editor=t,this._options=n}return Object.defineProperty(e.prototype,"groupId",{get:function(){return this._group},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"editor",{
get:function(){return this._editor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.prevent=function(e){this.override=e},e.prototype.isPrevented=function(){return this.override},e}();g.registerThemingParticipant(function(e,t,n){var i="resources/letterpress"+("dark"===e.type?"-dark":"hc"===e.type?"-hc":"")+".svg";t.addRule("\n\t\t.monaco-workbench > .part.editor > .content .editor-group-container.empty .editor-group-letterpress {\n\t\t\tbackground-image: url('"+O.join(n.appRoot,i)+"')\n\t\t}\n\t");var r=e.getColor(m.EDITOR_GROUP_FOCUSED_EMPTY_BORDER)
;r?t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content:not(.empty) .editor-group-container.empty.active:focus {\n\t\t\t\toutline-width: 1px;\n\t\t\t\toutline-color: "+r+";\n\t\t\t\toutline-offset: -2px;\n\t\t\t\toutline-style: solid;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .part.editor > .content.empty .editor-group-container.empty.active:focus {\n\t\t\t\toutline: none; /* never show outline for empty group if it is the last */\n\t\t\t}\n\t\t"):t.addRule("\n\t\t\t.monaco-workbench > .part.editor > .content .editor-group-container.empty.active:focus {\n\t\t\t\toutline: none; /* disable focus outline unless active empty group border is defined */\n\t\t\t}\n\t\t")})}),define(e[1543],t([1,0,12,200,8,7,26,53,6,1127,50,69,20,223,1542,17,5,24,34,225,466,4,18,22,42,38,1468,1507,51,1116,325,1471]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var M=function(){function e(){this.element=o.$(".grid-view-container"),
this._onDidChange=new s.Relay,this.onDidChange=this._onDidChange.event}return Object.defineProperty(e.prototype,"minimumWidth",{get:function(){return this.gridWidget?this.gridWidget.minimumWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumWidth",{get:function(){return this.gridWidget?this.gridWidget.maximumWidth:Number.POSITIVE_INFINITY},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minimumHeight",{get:function(){return this.gridWidget?this.gridWidget.minimumHeight:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximumHeight",{get:function(){return this.gridWidget?this.gridWidget.maximumHeight:Number.POSITIVE_INFINITY},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridWidget",{get:function(){return this._gridWidget},set:function(e){this.element.innerHTML="",e?(this.element.appendChild(e.element),this._onDidChange.input=e.onDidChange):this._onDidChange.input=s.Event.None,this._gridWidget=e},enumerable:!0,
configurable:!0}),e.prototype.layout=function(e,t){this.gridWidget&&this.gridWidget.layout(e,t)},e.prototype.dispose=function(){this._onDidChange.dispose()},e}();t.EDITOR_PANE_BACKGROUND=c.registerColor("editorPane.background",{dark:c.editorBackground,light:c.editorBackground,hc:c.editorBackground},A.localize(0,null));var P=function(e){function r(t,n,i,r,o,a,c,l,u){var d=e.call(this,t,{hasTitle:!1},r)||this;return d.restorePreviousState=n,d.instantiationService=i,d.configurationService=o,d.storageService=a,d.notificationService=c,d.windowService=l,d.lifecycleService=u,d._onDidLayout=d._register(new s.Emitter),d._onDidActiveGroupChange=d._register(new s.Emitter),d._onDidAddGroup=d._register(new s.Emitter),d._onDidRemoveGroup=d._register(new s.Emitter),d._onDidMoveGroup=d._register(new s.Emitter),d.onDidSetGridWidget=d._register(new s.Emitter),d._onDidSizeConstraintsChange=d._register(new s.Relay),d._onDidPreferredSizeChange=d._register(new s.Emitter),d.groupViews=new Map,d.mostRecentActiveGroups=[],
d.enforcedPartOptions=[],d._onDidEditorPartOptionsChange=d._register(new s.Emitter),d.gridWidgetView=new M,d._partOptions=v.getEditorPartOptions(d.configurationService.getValue()),d.memento=d.getMemento(d.storageService,C.Scope.WORKSPACE),d.globalMemento=d.getMemento(d.storageService,C.Scope.GLOBAL),d._whenRestored=new w.TPromise(function(e){d.whenRestoredComplete=e}),d.registerListeners(),d}return n(r,e),Object.defineProperty(r.prototype,"onDidLayout",{get:function(){return this._onDidLayout.event},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidActiveGroupChange",{get:function(){return this._onDidActiveGroupChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidAddGroup",{get:function(){return this._onDidAddGroup.event},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidRemoveGroup",{get:function(){return this._onDidRemoveGroup.event},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidMoveGroup",{get:function(){
return this._onDidMoveGroup.event},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidSizeConstraintsChange",{get:function(){return s.anyEvent(this.onDidSetGridWidget.event,this._onDidSizeConstraintsChange.event)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidPreferredSizeChange",{get:function(){return this._onDidPreferredSizeChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"onDidEditorPartOptionsChange",{get:function(){return this._onDidEditorPartOptionsChange.event},enumerable:!0,configurable:!0}),r.prototype.registerListeners=function(){var e=this;this._register(this.configurationService.onDidChangeConfiguration(function(t){return e.onConfigurationUpdated(t)}))},r.prototype.onConfigurationUpdated=function(e){v.impactsEditorPartOptions(e)&&this.handleChangedPartOptions()},r.prototype.handleChangedPartOptions=function(){var e=this._partOptions,t=v.getEditorPartOptions(this.configurationService.getValue())
;this.enforcedPartOptions.forEach(function(e){S.assign(t,e)}),this._partOptions=t,this._onDidEditorPartOptionsChange.fire({oldPartOptions:e,newPartOptions:t})},Object.defineProperty(r.prototype,"partOptions",{get:function(){return this._partOptions},enumerable:!0,configurable:!0}),r.prototype.enforcePartOptions=function(e){var t=this;return this.enforcedPartOptions.push(e),this.handleChangedPartOptions(),b.toDisposable(function(){t.enforcedPartOptions.splice(t.enforcedPartOptions.indexOf(e),1),t.handleChangedPartOptions()})},Object.defineProperty(r.prototype,"activeGroup",{get:function(){return this._activeGroup},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"groups",{get:function(){return p.values(this.groupViews)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"count",{get:function(){return this.groupViews.size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"orientation",{get:function(){
if(this.gridWidget)return this.gridWidget.orientation===h.Orientation.VERTICAL?u.GroupOrientation.VERTICAL:u.GroupOrientation.HORIZONTAL},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"whenRestored",{get:function(){return this._whenRestored},enumerable:!0,configurable:!0}),r.prototype.getGroups=function(e){var t=this;switch(void 0===e&&(e=u.GroupsOrder.CREATION_TIME),e){case u.GroupsOrder.CREATION_TIME:return this.groups;case u.GroupsOrder.MOST_RECENTLY_ACTIVE:var n=this.mostRecentActiveGroups.map(function(e){return t.getGroup(e)});return g.distinct(n.concat(this.groups));case u.GroupsOrder.GRID_APPEARANCE:var i=[];return this.gridWidget&&this.fillGridNodes(i,this.gridWidget.getViews()),i}},r.prototype.fillGridNodes=function(e,t){var n=this;h.isGridBranchNode(t)?t.children.forEach(function(t){return n.fillGridNodes(e,t)}):e.push(t.view)},r.prototype.getGroup=function(e){return this.groupViews.get(e)},r.prototype.findGroup=function(e,t,n){return void 0===t&&(t=this.activeGroup),
"number"==typeof e.direction?this.doFindGroupByDirection(e.direction,t,n):this.doFindGroupByLocation(e.location,t,n)},r.prototype.doFindGroupByDirection=function(e,t,n){var i=this,r=this.assertGroupView(t),o=this.gridWidget.getNeighborViews(r,this.toGridViewDirection(e),n);return o.sort(function(e,t){return i.mostRecentActiveGroups.indexOf(e.id)-i.mostRecentActiveGroups.indexOf(t.id)}),o[0]},r.prototype.doFindGroupByLocation=function(e,t,n){var i=this.assertGroupView(t),r=this.getGroups(u.GroupsOrder.GRID_APPEARANCE),o=r.indexOf(i);switch(e){case u.GroupLocation.FIRST:return r[0];case u.GroupLocation.LAST:return r[r.length-1];case u.GroupLocation.NEXT:var s=r[o+1];return!s&&n&&(s=this.doFindGroupByLocation(u.GroupLocation.FIRST,t)),s;case u.GroupLocation.PREVIOUS:var a=r[o-1];return!a&&n&&(a=this.doFindGroupByLocation(u.GroupLocation.LAST,t)),a}},r.prototype.activateGroup=function(e){var t=this.assertGroupView(e);return this.doSetGroupActive(t),t},r.prototype.getSize=function(e){var t=this.assertGroupView(e)
;return this.gridWidget.getViewSize(t)},r.prototype.setSize=function(e,t){var n=this.assertGroupView(e);this.gridWidget.resizeView(n,t)},r.prototype.arrangeGroups=function(e){this.count<2||this.gridWidget&&(e===u.GroupsArrangement.EVEN?this.gridWidget.distributeViewSizes():this.gridWidget.maximizeViewSize(this.activeGroup))},r.prototype.setGroupOrientation=function(e){if(this.gridWidget){var t=e===u.GroupOrientation.HORIZONTAL?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL;this.gridWidget.orientation!==t&&(this.gridWidget.orientation=t,this.resetPreferredSize())}},r.prototype.applyLayout=function(e){function t(e){e.forEach(function(e){Array.isArray(e.groups)?t(e.groups):r++})}var n=this,i=o.isAncestor(document.activeElement,this.container),r=0;t(e.groups);var s=this.getGroups(u.GroupsOrder.GRID_APPEARANCE);if(r<s.length){var a=s[r-1];s.forEach(function(e,t){t>=r&&n.mergeGroup(e,a)}),s=this.getGroups(u.GroupsOrder.GRID_APPEARANCE)}var c=this.activeGroup,l=h.createSerializedGrid({
orientation:this.toGridViewOrientation(e.orientation,this.isTwoDimensionalGrid()?this.gridWidget.orientation:O.orthogonal(this.gridWidget.orientation)),groups:e.groups});this.doCreateGridControlWithState(l,c.id,s),this.doLayout(this.dimension),this.updateContainer(),this.resetPreferredSize(),this.getGroups(u.GroupsOrder.GRID_APPEARANCE).forEach(function(e){-1===s.indexOf(e)&&n._onDidAddGroup.fire(e)}),i&&this._activeGroup.focus()},r.prototype.isTwoDimensionalGrid=function(){var e=this.gridWidget.getViews();return!!h.isGridBranchNode(e)&&e.children.some(function(e){return h.isGridBranchNode(e)})},r.prototype.addGroup=function(e,t,n){var i=this.assertGroupView(e),r=this.doAddGroup(i,t);return n&&n.activate&&this.doSetGroupActive(r),r},r.prototype.doAddGroup=function(e,t,n){var i=this.doCreateGroupView(n);return this.gridWidget.addView(i,h.Sizing.Distribute,e,this.toGridViewDirection(t)),this.updateContainer(),this.resetPreferredSize(),this._onDidAddGroup.fire(i),i},r.prototype.doCreateGroupView=function(e){
var t,n=this,i=this.getGroupLabel(this.count+1);t=e instanceof m.EditorGroupView?m.EditorGroupView.createCopy(e,this,i,this.instantiationService):E.isSerializedEditorGroup(e)?m.EditorGroupView.createFromSerialized(e,this,i,this.instantiationService):m.EditorGroupView.createNew(this,i,this.instantiationService),this.groupViews.set(t.id,t);var r=[];return r.push(t.onDidFocus(function(){n.doSetGroupActive(t)})),r.push(t.onDidGroupChange(function(e){e.kind===u.GroupChangeKind.EDITOR_ACTIVE&&n.updateContainer()})),s.once(t.onWillDispose)(function(){r=b.dispose(r),n.groupViews.delete(t.id),n.doUpdateMostRecentActive(t)}),t},r.prototype.doSetGroupActive=function(e){if(this._activeGroup!==e){var t=this._activeGroup;this._activeGroup=e,this.doUpdateMostRecentActive(e,!0),t&&t.setActive(!1),e.setActive(!0),this._onDidActiveGroupChange.fire(e)}},r.prototype.doUpdateMostRecentActive=function(e,t){var n=this.mostRecentActiveGroups.indexOf(e.id);-1!==n&&this.mostRecentActiveGroups.splice(n,1),
t&&this.mostRecentActiveGroups.unshift(e.id)},r.prototype.toGridViewDirection=function(e){switch(e){case u.GroupDirection.UP:return h.Direction.Up;case u.GroupDirection.DOWN:return h.Direction.Down;case u.GroupDirection.LEFT:return h.Direction.Left;case u.GroupDirection.RIGHT:return h.Direction.Right}},r.prototype.toGridViewOrientation=function(e,t){return"number"==typeof e?e===u.GroupOrientation.HORIZONTAL?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL:t},r.prototype.removeGroup=function(e){var t=this.assertGroupView(e);if(1!==this.groupViews.size)return t.isEmpty()?this.doRemoveEmptyGroup(t):void this.doRemoveGroupWithEditors(t)},r.prototype.doRemoveGroupWithEditors=function(e){var t,n=this.getGroups(u.GroupsOrder.MOST_RECENTLY_ACTIVE);t=this._activeGroup===e?n[1]:n[0],this.mergeGroup(e,t)},r.prototype.doRemoveEmptyGroup=function(e){var t=this,n=o.isAncestor(document.activeElement,this.container);if(this._activeGroup===e){var i=this.getGroups(u.GroupsOrder.MOST_RECENTLY_ACTIVE)[1];this.activateGroup(i)}
this.gridWidget.removeView(e,h.Sizing.Distribute),e.dispose(),n&&this._activeGroup.focus(),this.getGroups(u.GroupsOrder.CREATION_TIME).forEach(function(e,n){e.setLabel(t.getGroupLabel(n+1))}),this.updateContainer(),this.resetPreferredSize(),this._onDidRemoveGroup.fire(e)},r.prototype.getGroupLabel=function(e){return A.localize(1,null,e)},r.prototype.moveGroup=function(e,t,n){var i=this.assertGroupView(e),r=this.assertGroupView(t);if(i.id===r.id)throw new Error("Cannot move group into its own");var s=o.isAncestor(document.activeElement,i.element);return this.gridWidget.removeView(i,h.Sizing.Distribute),this.gridWidget.addView(i,h.Sizing.Distribute,r,this.toGridViewDirection(n)),s&&i.focus(),this._onDidMoveGroup.fire(i),i},r.prototype.copyGroup=function(e,t,n){var i=this.assertGroupView(e),r=this.assertGroupView(t),s=o.isAncestor(document.activeElement,i.element),a=this.doAddGroup(r,n,i);return s&&a.focus(),a},r.prototype.mergeGroup=function(e,t,n){
var i=this.assertGroupView(e),r=this.assertGroupView(t),o=n&&"number"==typeof n.index?n.index:r.count;return i.editors.forEach(function(e){var t=!i.isActive(e),s={index:o,inactive:t,preserveFocus:t};n&&n.mode===u.MergeGroupMode.COPY_EDITORS?i.copyEditor(e,r,s):i.moveEditor(e,r,s),o++}),i.isEmpty()&&!i.disposed&&this.removeGroup(i),r},r.prototype.assertGroupView=function(e){if("number"==typeof e&&(e=this.getGroup(e)),!e)throw new Error("Invalid editor group provided!");return e},Object.defineProperty(r.prototype,"minimumWidth",{get:function(){return this.centeredLayoutWidget.minimumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maximumWidth",{get:function(){return this.centeredLayoutWidget.maximumWidth},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"minimumHeight",{get:function(){return this.centeredLayoutWidget.minimumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maximumHeight",{get:function(){
return this.centeredLayoutWidget.maximumHeight},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"preferredSize",{get:function(){return this._preferredSize||(this._preferredSize=new o.Dimension(this.gridWidget.minimumWidth,this.gridWidget.minimumHeight)),this._preferredSize},enumerable:!0,configurable:!0}),r.prototype.resetPreferredSize=function(){this._preferredSize=void 0,this._onDidPreferredSizeChange.fire()},Object.defineProperty(r.prototype,"gridSeparatorBorder",{get:function(){return this.theme.getColor(f.EDITOR_GROUP_BORDER)||this.theme.getColor(c.contrastBorder)||L.Color.transparent},enumerable:!0,configurable:!0}),r.prototype.updateStyles=function(){this.container.style.backgroundColor=this.getColor(c.editorBackground);var e={separatorBorder:this.gridSeparatorBorder,background:this.theme.getColor(t.EDITOR_PANE_BACKGROUND)||L.Color.transparent};this.gridWidget.style(e),this.centeredLayoutWidget.styles(e)},r.prototype.createContentArea=function(e){
return this.container=document.createElement("div"),o.addClass(this.container,"content"),e.appendChild(this.container),this.doCreateGridControl(),this.centeredLayoutWidget=this._register(new R.CenteredViewLayout(this.container,this.gridWidgetView,this.globalMemento[r.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY])),this._register(this.instantiationService.createInstance(D.EditorDropTarget,this,this.container)),this.container},r.prototype.centerLayout=function(e){this.centeredLayoutWidget.activate(e)},r.prototype.isLayoutCentered=function(){return this.centeredLayoutWidget.isActive()},r.prototype.doCreateGridControl=function(){var e=this;if(this.restorePreviousState&&this.doCreateGridControlWithPreviousState(),!this.gridWidget){var t=this.doCreateGroupView();this.doSetGridWidget(new h.SerializableGrid(t)),this.doSetGroupActive(t)}I.always(w.TPromise.join(this.groups.map(function(e){return e.whenRestored})),function(){return e.whenRestoredComplete(void 0)}),this.updateContainer()},
r.prototype.doCreateGridControlWithPreviousState=function(){var e=this.doGetPreviousState();if(e&&e.serializedGrid)try{this.previousUIState=e,this.mostRecentActiveGroups=e.mostRecentActiveGroups,this.doCreateGridControlWithState(e.serializedGrid,e.activeGroup),this._activeGroup.focus()}catch(e){this.gridWidget&&this.doSetGridWidget(),this.groupViews.forEach(function(e){return e.dispose()}),this.groupViews.clear(),this._activeGroup=void 0,this.mostRecentActiveGroups=[],this.gridError(e)}},r.prototype.doCreateGridControlWithState=function(e,t,n){var i,r=this;i=n?n.slice(0):[];var o=h.SerializableGrid.deserialize(e,{fromJSON:function(e){var n;return(n=i.length>0?i.shift():r.doCreateGroupView(e)).id===t&&r.doSetGroupActive(n),n}},{styles:{separatorBorder:this.gridSeparatorBorder}});this.doSetGridWidget(o)},r.prototype.doSetGridWidget=function(e){this.gridWidget&&this.gridWidget.dispose(),this.gridWidget=e,this.gridWidgetView.gridWidget=e,e&&(this._onDidSizeConstraintsChange.input=e.onDidChange),
this.onDidSetGridWidget.fire()},r.prototype.doGetPreviousState=function(){var e=this.doGetPreviousLegacyState();return e||this.memento[r.EDITOR_PART_UI_STATE_STORAGE_KEY]},r.prototype.doGetPreviousLegacyState=function(){var e,t=this.storageService.get("editorStacks.model",_.StorageScope.WORKSPACE);if(t)try{e=JSON.parse(t)}catch(e){}e&&this.storageService.remove("editorStacks.model",_.StorageScope.WORKSPACE);var n=this.memento["editorpart.uiState"];if(n&&delete this.memento["editorpart.uiState"],e&&Array.isArray(e.groups)&&e.groups.length>0){var i=n&&"horizontal"===n.groupOrientation,r=Object.create(null),o=e.groups[0],s=e.groups[1],a=e.groups[2];r.activeGroup=e.active,r.mostRecentActiveGroups=[e.active],(s||a)&&(a?0===r.activeGroup?r.mostRecentActiveGroups.push(1,2):1===r.activeGroup?r.mostRecentActiveGroups.push(0,2):r.mostRecentActiveGroups.push(0,1):r.mostRecentActiveGroups.push(0===r.activeGroup?1:0));var c=function(e,t){return{data:e,size:t,type:"leaf"}};if(s){var l=[],u=a?400:600;l.push(c(o,u)),
l.push(c(s,u)),a&&l.push(c(a,u)),r.serializedGrid={width:1200,height:1200,orientation:i?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL,root:{data:l,size:1200,type:"branch"}}}else r.serializedGrid={width:1200,height:1200,orientation:i?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL,root:c(o,1200)};return r}},r.prototype.updateContainer=function(){o.toggleClass(this.container,"empty",this.isEmpty())},r.prototype.isEmpty=function(){return 1===this.groupViews.size&&this._activeGroup.isEmpty()},r.prototype.gridError=function(e){var t=this;console.error(e),this.previousUIState&&console.error("Serialized Grid State: ",this.previousUIState),this.lifecycleService.when(k.LifecyclePhase.Running).then(function(){t.notificationService.prompt(T.Severity.Error,"Grid Issue: "+e+". Please report this error stack with reproducible steps.",[{label:"Open DevTools",run:function(){return t.windowService.openDevTools()}}])})},r.prototype.layout=function(t){var n=e.prototype.layout.call(this,t);return this.doLayout(n[1]),n},
r.prototype.doLayout=function(e){this.dimension=e;try{this.centeredLayoutWidget.layout(this.dimension.width,this.dimension.height)}catch(e){this.gridError(e)}this._onDidLayout.fire(e)},r.prototype.shutdown=function(){if(this.gridWidget){var t={serializedGrid:this.gridWidget.serialize(),activeGroup:this._activeGroup.id,mostRecentActiveGroups:this.mostRecentActiveGroups};this.isEmpty()?delete this.memento[r.EDITOR_PART_UI_STATE_STORAGE_KEY]:this.memento[r.EDITOR_PART_UI_STATE_STORAGE_KEY]=t}this.globalMemento[r.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY]=this.centeredLayoutWidget.state,this.groupViews.forEach(function(e){return e.shutdown()}),e.prototype.shutdown.call(this)},r.prototype.dispose=function(){this.groupViews.forEach(function(e){return e.dispose()}),this.groupViews.clear(),this.gridWidget&&this.gridWidget.dispose(),e.prototype.dispose.call(this)},r.EDITOR_PART_UI_STATE_STORAGE_KEY="editorpart.state",r.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY="editorpart.centeredview",
r=a([l(2,d.IInstantiationService),l(3,i.IThemeService),l(4,y.IConfigurationService),l(5,_.IStorageService),l(6,T.INotificationService),l(7,x.IWindowService),l(8,k.ILifecycleService)],r)}(r.Part);t.EditorPart=P}),define(e[1544],t([1,0,4,74,16,41,543,108,46,34,35,28,37,6,473,12,69,26,408,238,22,8,1562,5,15,460]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ActivePanelContext=new x.RawContextKey("activePanel","");var k=function(e){function c(n,i,r,a,l,d,h,p,f,g){var v=e.call(this,i,r,a,l,d,h,p,f,o.Registry.as(u.Extensions.Panels),c.activePanelSettingsKey,o.Registry.as(u.Extensions.Panels).getDefaultPanelId(),"panel","panel",null,n,{hasTitle:!0})||this;v.disposables=[],v.compositeActions=Object.create(null),v.compositeBar=v.instantiationService.createInstance(_.CompositeBar,{icon:!1,storageId:c.PINNED_PANELS,orientation:s.ActionsOrientation.HORIZONTAL,openComposite:function(e){return v.openPanel(e,!0)},getActivityAction:function(e){
return v.getCompositeActions(e).activityAction},getCompositePinnedAction:function(e){return v.getCompositeActions(e).pinnedAction},getOnCompositeClickAction:function(e){return v.instantiationService.createInstance(m.PanelActivityAction,v.getPanel(e))},getContextMenuActions:function(){return[v.instantiationService.createInstance(m.TogglePanelAction,m.TogglePanelAction.ID,I.localize(0,null))]},getDefaultCompositeId:function(){return o.Registry.as(u.Extensions.Panels).getDefaultPanelId()},hidePart:function(){return v.partService.setPanelHidden(!0)},compositeSize:0,overflowActionSize:44,colors:{backgroundColor:b.PANEL_BACKGROUND,badgeBackground:S.badgeBackground,badgeForeground:S.badgeForeground,dragAndDropBackground:b.PANEL_DRAG_AND_DROP_BACKGROUND}}),v.toUnbind.push(v.compositeBar);for(var y=0,C=v.getPanels();y<C.length;y++){var E=C[y];v.compositeBar.addComposite(E)}return v.activePanelContextKey=t.ActivePanelContext.bindTo(g),v.onDidPanelOpen(v._onDidPanelOpen,v,v.disposables),
v.onDidPanelClose(v._onDidPanelClose,v,v.disposables),v.registerListeners(),v}return n(c,e),c.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.registry.onDidRegister(function(t){return e.compositeBar.addComposite(t)})),this.toUnbind.push(this.onDidPanelOpen(function(t){e.compositeBar.activateComposite(t.getId()),e.layoutCompositeBar()})),this.toUnbind.push(this.onDidPanelClose(function(t){return e.compositeBar.deactivateComposite(t.getId())}))},c.prototype._onDidPanelOpen=function(e){this.activePanelContextKey.set(e.getId())},c.prototype._onDidPanelClose=function(e){var t=e.getId();this.activePanelContextKey.get()===t&&this.activePanelContextKey.reset()},Object.defineProperty(c.prototype,"onDidPanelOpen",{get:function(){return this._onDidCompositeOpen.event},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"onDidPanelClose",{get:function(){return this._onDidCompositeClose.event},enumerable:!0,configurable:!0}),c.prototype.updateStyles=function(){
e.prototype.updateStyles.call(this);var t=r.$(this.getContainer());t.style("background-color",this.getColor(b.PANEL_BACKGROUND)),t.style("border-left-color",this.getColor(b.PANEL_BORDER)||this.getColor(S.contrastBorder));r.$(this.getTitleArea()).style("border-top-color",this.getColor(b.PANEL_BORDER)||this.getColor(S.contrastBorder))},c.prototype.openPanel=function(e,t){var n=this;if(this.blockOpeningPanel)return i.TPromise.as(null);var r=i.TPromise.wrap(null);if(!this.partService.isVisible(d.Parts.PANEL_PART))try{this.blockOpeningPanel=!0,r=this.partService.setPanelHidden(!1)}finally{this.blockOpeningPanel=!1}return r.then(function(){return n.openComposite(e,t)})},c.prototype.showActivity=function(e,t,n){return this.compositeBar.showActivity(e,t,n)},c.prototype.getPanel=function(e){return this.getPanels().filter(function(t){return t.id===e}).pop()},c.prototype.getPanels=function(){return o.Registry.as(u.Extensions.Panels).getPanels().filter(function(e){return e.enabled}).sort(function(e,t){
return e.order-t.order})},c.prototype.setPanelEnablement=function(e,t){var n=o.Registry.as(u.Extensions.Panels).getPanels().filter(function(t){return t.id===e}).pop();n&&n.enabled!==t&&(n.enabled=t,t?this.compositeBar.addComposite(n):this.removeComposite(e))},c.prototype.getActions=function(){return[this.instantiationService.createInstance(m.ToggleMaximizedPanelAction,m.ToggleMaximizedPanelAction.ID,m.ToggleMaximizedPanelAction.LABEL),this.instantiationService.createInstance(m.TogglePanelPositionAction,m.TogglePanelPositionAction.ID,m.TogglePanelPositionAction.LABEL),this.instantiationService.createInstance(m.ClosePanelAction,m.ClosePanelAction.ID,m.ClosePanelAction.LABEL)]},c.prototype.getActivePanel=function(){return this.getActiveComposite()},c.prototype.getLastActivePanelId=function(){return this.getLastActiveCompositetId()},c.prototype.hideActivePanel=function(){return this.hideActiveComposite().then(function(e){})},c.prototype.createTitleLabel=function(e){var t=this
;return this.compositeBar.create(e).classList.add("panel-switcher-container"),{updateTitle:function(e,n,i){var r=t.compositeBar.getAction(e);r&&(r.label=n)},updateStyles:function(){}}},c.prototype.layout=function(t){if(!this.partService.isVisible(d.Parts.PANEL_PART))return[t];this.partService.getPanelPosition()===d.Position.RIGHT?this.dimension=new w.Dimension(t.width-1,t.height):this.dimension=t;var n=e.prototype.layout.call(this,this.dimension);return this.layoutCompositeBar(),n},c.prototype.layoutCompositeBar=function(){if(this.dimension){var e=this.dimension.width-40;this.toolBar&&(e=Math.max(c.MIN_COMPOSITE_BAR_WIDTH,e-this.getToolbarWidth())),this.compositeBar.layout(new w.Dimension(e,this.dimension.height))}},c.prototype.getCompositeActions=function(e){var t=this.compositeActions[e];return t||(t={activityAction:this.instantiationService.createInstance(m.PanelActivityAction,this.getPanel(e)),pinnedAction:new C.ToggleCompositePinnedAction(this.getPanel(e),this.compositeBar)},this.compositeActions[e]=t),t
},c.prototype.removeComposite=function(e){this.compositeBar.removeComposite(e);var t=this.compositeActions[e];t&&(t.activityAction.dispose(),t.pinnedAction.dispose(),delete this.compositeActions[e])},c.prototype.getToolbarWidth=function(){return this.getActivePanel()?this.toolBar.getItemsWidth():0},c.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=T.dispose(this.disposables)},c.activePanelSettingsKey="workbench.panelpart.activepanelid",c.PINNED_PANELS="workbench.panel.pinnedPanels",c.MIN_COMPOSITE_BAR_WIDTH=50,c=a([l(1,E.INotificationService),l(2,h.IStorageService),l(3,f.ITelemetryService),l(4,p.IContextMenuService),l(5,d.IPartService),l(6,g.IKeybindingService),l(7,v.IInstantiationService),l(8,y.IThemeService),l(9,x.IContextKeyService)],c)}(c.CompositePart);t.PanelPart=k,y.registerThemingParticipant(function(e,t){var n=e.getColor(b.PANEL_BACKGROUND)
;n&&n!==e.getColor(S.editorBackground)&&t.addRule("\n\t\t\t.monaco-workbench > .part.panel > .content .monaco-editor,\n\t\t\t.monaco-workbench > .part.panel > .content .monaco-editor .margin,\n\t\t\t.monaco-workbench > .part.panel > .content .monaco-editor .monaco-editor-background {\n\t\t\t\tbackground-color: "+n+";\n\t\t\t}\n\t\t");var i=e.getColor(b.PANEL_ACTIVE_TITLE_FOREGROUND),r=e.getColor(b.PANEL_ACTIVE_TITLE_BORDER);(i||r)&&t.addRule("\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label,\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label {\n\t\t\t\tcolor: "+i+";\n\t\t\t\tborder-bottom-color: "+r+";\n\t\t\t}\n\t\t");var o=e.getColor(b.PANEL_INACTIVE_TITLE_FOREGROUND);o&&t.addRule("\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label {\n\t\t\t\tcolor: "+o+";\n\t\t\t}\n\t\t")
;var s=e.getColor(S.focusBorder);s&&(t.addRule("\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus .action-label {\n\t\t\t\tcolor: "+i+";\n\t\t\t\tborder-bottom-color: "+s+" !important;\n\t\t\t\tborder-bottom: 1px solid;\n\t\t\t}\n\t\t\t"),t.addRule("\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t\t"));if(e.getColor(S.activeContrastBorder)){var a=e.getColor(S.activeContrastBorder)
;t.addRule("\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label,\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:hover {\n\t\t\t\toutline-color: "+a+";\n\t\t\t\toutline-width: 1px;\n\t\t\t\toutline-style: solid;\n\t\t\t\tborder-bottom: none;\n\t\t\t\tpadding-bottom: 0;\n\t\t\t\toutline-offset: 1px;\n\t\t\t}\n\n\t\t\t.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:not(.checked) .action-label:hover {\n\t\t\t\toutline-style: dashed;\n\t\t\t}\n\t\t")}})}),define(e[1545],t([1,0,4,1573,16,23,543,99,56,31,65,46,34,35,28,37,6,12,26,69,22,8,74,82,858]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var x=function(e){function t(n,i,r,s,a,c,l,d,h){
var p=e.call(this,i,r,s,a,c,l,d,h,o.Registry.as(u.Extensions.Viewlets),t.activeViewletSettingsKey,o.Registry.as(u.Extensions.Viewlets).getDefaultViewletId(),"sideBar","viewlet",C.SIDE_BAR_TITLE_FOREGROUND,n,{hasTitle:!0,borderWidth:function(){return p.getColor(C.SIDE_BAR_BORDER)||p.getColor(_.contrastBorder)?1:0}})||this;return p}return n(t,e),Object.defineProperty(t.prototype,"onDidViewletOpen",{get:function(){return this._onDidCompositeOpen.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidViewletClose",{get:function(){return this._onDidCompositeClose.event},enumerable:!0,configurable:!0}),t.prototype.createTitleArea=function(t){var n=this,i=e.prototype.createTitleArea.call(this,t);return I.$(i).on(w.EventType.CONTEXT_MENU,function(e){return n.onTitleAreaContextMenu(new T.StandardMouseEvent(e))}),i},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this);var t=I.$(this.getContainer());t.style("background-color",this.getColor(C.SIDE_BAR_BACKGROUND)),
t.style("color",this.getColor(C.SIDE_BAR_FOREGROUND));var n=this.getColor(C.SIDE_BAR_BORDER)||this.getColor(_.contrastBorder),i=this.partService.getSideBarPosition()===f.Position.LEFT;t.style("border-right-width",n&&i?"1px":null),t.style("border-right-style",n&&i?"solid":null),t.style("border-right-color",i?n:null),t.style("border-left-width",n&&!i?"1px":null),t.style("border-left-style",n&&!i?"solid":null),t.style("border-left-color",i?null:n)},t.prototype.openViewlet=function(e,t){var n=this;if(this.blockOpeningViewlet)return i.TPromise.as(null);var r=i.TPromise.wrap(null);if(!this.partService.isVisible(f.Parts.SIDEBAR_PART))try{this.blockOpeningViewlet=!0,r=this.partService.setSideBarHidden(!1)}finally{this.blockOpeningViewlet=!1}return r.then(function(){return n.openComposite(e,t)})},t.prototype.getActiveViewlet=function(){return this.getActiveComposite()},t.prototype.getLastActiveViewletId=function(){return this.getLastActiveCompositetId()},t.prototype.hideActiveViewlet=function(){
return this.hideActiveComposite().then(function(e){})},t.prototype.layout=function(t){return this.partService.isVisible(f.Parts.SIDEBAR_PART)?e.prototype.layout.call(this,t):[t]},t.prototype.onTitleAreaContextMenu=function(e){var t=this,n=this.getActiveViewlet();if(n){var r=n?n.getContextMenuActions():[];if(r.length){var o={x:e.posx,y:e.posy};this.contextMenuService.showContextMenu({getAnchor:function(){return o},getActions:function(){return i.TPromise.as(r)},getActionItem:function(e){return t.actionItemProvider(e)},actionRunner:n.getActionRunner(),getKeyBinding:function(e){return t.keybindingService.lookupKeybinding(e.id)}})}}},t.activeViewletSettingsKey="workbench.sidebar.activeviewletid",t=a([l(1,E.INotificationService),l(2,g.IStorageService),l(3,m.ITelemetryService),l(4,v.IContextMenuService),l(5,f.IPartService),l(6,y.IKeybindingService),l(7,b.IInstantiationService),l(8,S.IThemeService)],t)}(c.CompositePart);t.SidebarPart=x;var k=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this
;return o.viewletService=i,o.partService=r,o}return n(t,e),t.prototype.run=function(){if(!this.partService.isVisible(f.Parts.SIDEBAR_PART))return this.partService.setSideBarHidden(!1);var e=this.viewletService.getActiveViewlet();return e&&e.focus(),i.TPromise.as(!0)},t.ID="workbench.action.focusSideBar",t.LABEL=r.localize(0,null),t=a([l(2,p.IViewletService),l(3,f.IPartService)],t)}(s.Action);o.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(new h.SyncActionDescriptor(k,k.ID,k.LABEL,{primary:2069}),"View: Focus into Side Bar",r.localize(1,null))}),define(e[1546],t([1,0,8,781,5,174,119,65,243,16,172,4,18,175,22,23,7,98,941]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=function(){function e(){e.Instance=this}return e.prototype.render=function(e){this._element=e,this._element.classList.add("progress");var t=document.createElement("span");this._element.appendChild(t);var n=document.createElement("span")
;n.classList.add("spinner-container"),t.appendChild(n);new d.OcticonLabel(n).text="$(sync~spin)";var i=document.createElement("span");return t.appendChild(i),this._label=new d.OcticonLabel(i),this.hide(),null},Object.defineProperty(e.prototype,"text",{set:function(e){this._label.text=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this._label.title=e},enumerable:!0,configurable:!0}),e.prototype.hide=function(){i.hide(this._element)},e.prototype.show=function(){i.show(this._element)},e}(),C=function(){function e(e,t,n){this._activityBar=e,this._viewletService=t,this._notificationService=n,this._stack=[]}return e.prototype.withProgress=function(e,t,n){var i=e.location;if(i instanceof S.ViewContainer){return this._viewletService.getViewlet(i.id)?this._withViewletProgress(i.id,t):void console.warn("Bad progress location: "+i.id)}switch(i){case s.ProgressLocation.Notification:return this._withNotificationProgress(e,t,n);case s.ProgressLocation.Window:
return this._withWindowProgress(e,t);case s.ProgressLocation.Explorer:return this._withViewletProgress("workbench.view.explorer",t);case s.ProgressLocation.Scm:return this._withViewletProgress("workbench.view.scm",t);case s.ProgressLocation.Extensions:return this._withViewletProgress("workbench.view.extensions",t);default:return void console.warn("Bad progress location: "+i)}},e.prototype._withWindowProgress=function(e,t){var n=this,i=[e,new c.Progress(function(){return n._updateWindowProgress()})],r=t(i[1]),o=setTimeout(function(){o=void 0,n._stack.unshift(i),n._updateWindowProgress(),g.always(f.TPromise.join([f.TPromise.timeout(150),r]),function(){var e=n._stack.indexOf(i);n._stack.splice(e,1),n._updateWindowProgress()})},150);return g.always(f.TPromise.wrap(r),function(){return clearTimeout(o)}),r},e.prototype._updateWindowProgress=function(e){if(void 0===e&&(e=0),e>=this._stack.length)_.Instance.hide();else{var t=this._stack[e],n=t[0],i=t[1],o=n.title,s=i.value&&i.value.message,a=void 0,c=void 0
;if(o&&s)a=r.localize(0,null,o,s),c=n.source?r.localize(1,null,n.source,o,s):a;else if(o)a=o,c=n.source?r.localize(2,null,n.source,o):a;else{if(!s)return void this._updateWindowProgress(e+1);a=s,c=n.source?r.localize(3,null,n.source,s):a}_.Instance.text=a,_.Instance.title=c,_.Instance.show()}},e.prototype._withNotificationProgress=function(e,t,i){var s,a=this,c=[],l=function(e,t){"number"==typeof t&&t>=0?(e.progress.total(100),e.progress.worked(t)):e.progress.infinite()},u=function(t,u){if(s){if("string"==typeof t){var d=void 0;d="string"==typeof e.title?e.title+": "+t:t,s.updateMessage(d)}"number"==typeof u&&l(s,u)}else s=function(t,s){if(t){var u={primary:[]};if(e.cancellable){var d=new(function(e){function t(){return e.call(this,"progress.cancel",r.localize(4,null),null,!0)||this}return n(t,e),t.prototype.run=function(){return"function"==typeof i&&i(),f.TPromise.as(void 0)},t}(y.Action));c.push(d),u.primary.push(d)}var h=a._notificationService.notify({severity:m.Severity.Info,message:t,source:e.source,
actions:u});return l(h,s),b.once(h.onDidClose)(function(){o.dispose(c)}),h}}(t,u)};u(e.title);var d=t({report:function(e){u(e.message,e.increment)}});return g.always(f.TPromise.join([f.TPromise.timeout(800),d]),function(){s&&s.close()}),d},e.prototype._withViewletProgress=function(e,t){var n=this,i=t(c.emptyProgress),r=this._viewletService.getProgressIndicator(e);r&&r.showWhile(f.TPromise.wrap(i));var s,a=setTimeout(function(){a=void 0;var t=n._activityBar.showActivity(e,new v.ProgressBadge(function(){return""}),"progress-badge",100),i=Date.now();s={dispose:function(){var e=Date.now()-i;e<300?setTimeout(function(){return t.dispose()},300-e):t.dispose()}}},300),l=function(){clearTimeout(a),o.dispose(s)};return i.then(l,l),i},e=a([l(0,v.IActivityService),l(1,u.IViewletService),l(2,m.INotificationService)],e)}();t.ProgressService2=C,h.Registry.as(p.Extensions.Statusbar).registerStatusbarItem(new p.StatusbarItemDescriptor(_,p.StatusbarAlignment.LEFT))}),
define(e[1547],t([1,0,7,16,99,15,5,49]),function(e,t,n,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ActiveViewletContext=new o.RawContextKey("activeViewlet","");var u=function(){function e(e,o,s){this.extensionService=s,this._onDidViewletEnable=new n.Emitter,this.disposables=[],this.sidebarPart=e,this.viewletRegistry=i.Registry.as(r.Extensions.Viewlets),this.activeViewletContextKey=t.ActiveViewletContext.bindTo(o),this.onDidViewletOpen(this._onDidViewletOpen,this,this.disposables),this.onDidViewletClose(this._onDidViewletClose,this,this.disposables)}return Object.defineProperty(e.prototype,"onDidViewletRegister",{get:function(){return this.viewletRegistry.onDidRegister},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidViewletOpen",{get:function(){return this.sidebarPart.onDidViewletOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidViewletClose",{get:function(){return this.sidebarPart.onDidViewletClose},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"onDidViewletEnablementChange",{get:function(){return this._onDidViewletEnable.event},enumerable:!0,configurable:!0}),e.prototype._onDidViewletOpen=function(e){this.activeViewletContextKey.set(e.getId())},e.prototype._onDidViewletClose=function(e){var t=e.getId();this.activeViewletContextKey.get()===t&&this.activeViewletContextKey.reset()},e.prototype.setViewletEnablement=function(e,t){var n=this.getAllViewlets().filter(function(t){return t.id===e}).pop();n&&n.enabled!==t&&(n.enabled=t,this._onDidViewletEnable.fire({id:e,enabled:t}))},e.prototype.openViewlet=function(e,t){var n=this;return this.getViewlet(e)?this.sidebarPart.openViewlet(e,t):this.extensionService.whenInstalledExtensionsRegistered().then(function(){return n.getViewlet(e)?n.sidebarPart.openViewlet(e,t):null})},e.prototype.getActiveViewlet=function(){return this.sidebarPart.getActiveViewlet()},e.prototype.getViewlets=function(){return this.getAllViewlets().filter(function(e){return e.enabled})
},e.prototype.getAllViewlets=function(){return this.viewletRegistry.getViewlets().sort(function(e,t){return e.order-t.order})},e.prototype.getDefaultViewletId=function(){return this.viewletRegistry.getDefaultViewletId()},e.prototype.getViewlet=function(e){return this.getViewlets().filter(function(t){return t.id===e})[0]},e.prototype.getProgressIndicator=function(e){return this.sidebarPart.getProgressIndicator(e)},e.prototype.dispose=function(){this.disposables=s.dispose(this.disposables)},e=a([l(1,o.IContextKeyService),l(2,c.IExtensionService)],e)}();t.ViewletService=u}),define(e[190],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceEditingService=n.createDecorator("workspaceEditingService"),t.IWorkspaceMigrationService=n.createDecorator("workspaceMigrationService")}),define(e[1549],t([1,0,9,10,140,27,48,4,61,5,67,17,190,1457,189]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(){
function e(e,t,n,i,r,o,s){this._searchService=t,this._contextService=n,this._textFileService=i,this._configurationService=r,this._workspaceEditingService=o,this._statusbarService=s,this._toDispose=[],this._activeSearches=Object.create(null),this._proxy=e.getProxy(u.ExtHostContext.ExtHostWorkspace),this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace,this,this._toDispose),this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace,this,this._toDispose)}return e.prototype.dispose=function(){d.dispose(this._toDispose);for(var e in this._activeSearches){this._activeSearches[e].cancel()}},e.prototype.$updateWorkspaceFolders=function(e,t,n,r){var o=r.map(function(e){return{uri:i.default.revive(e.uri),name:e.name}});return this._statusbarService.setStatusMessage(this.getStatusMessage(e,o.length,n),1e4),this._workspaceEditingService.updateFolders(t,n,o,!0)},e.prototype.getStatusMessage=function(e,t,n){var i=t>0,r=n>0
;return i&&!r?1===t?g.localize(0,null,e):g.localize(1,null,e,t):r&&!i?1===n?g.localize(2,null,e):g.localize(3,null,e,n):g.localize(4,null,e)},e.prototype._onDidChangeWorkspace=function(){this._proxy.$acceptWorkspaceData(this._contextService.getWorkbenchState()===o.WorkbenchState.EMPTY?null:this._contextService.getWorkspace())},e.prototype.$startSearch=function(e,t,o,s,a){var l,u,d=this,h=this._contextService.getWorkspace();if(h.folders.length){var p;if(p="string"==typeof t?[{folder:i.default.file(t)}]:h.folders.map(function(e){return{folder:e.uri}})){var f=p.every(function(e){return d._configurationService.getValue({resource:e.folder}).search.useRipgrep}),g=p.every(function(e){return!d._configurationService.getValue({resource:e.folder}).search.followSymlinks}),v={folderQueries:p,type:r.QueryType.File,maxResults:s,disregardExcludeSettings:!1===o,useRipgrep:f,ignoreSymlinks:g};"string"==typeof e&&(v.includePattern=(l={},l[e]=!0,l)),"string"==typeof o&&(v.excludePattern=(u={},u[o]=!0,u)),
this._searchService.extendQuery(v);var m=this._searchService.search(v).then(function(e){return e.results.map(function(e){return e.resource})},function(e){if(!n.isPromiseCanceledError(e))return c.TPromise.wrapError(e)});this._activeSearches[a]=m;var y=function(){return delete d._activeSearches[a]};return m.done(y,y),m}}},e.prototype.$cancelSearch=function(e){var t=this._activeSearches[e];if(t)return delete this._activeSearches[e],t.cancel(),c.TPromise.as(!0)},e.prototype.$saveAll=function(e){return this._textFileService.saveAll(e).then(function(e){return e.results.every(function(e){return!0===e.success})})},e=a([h.extHostNamedCustomer(u.MainContext.MainThreadWorkspace),l(1,r.ISearchService),l(2,o.IWorkspaceContextService),l(3,s.ITextFileService),l(4,p.IConfigurationService),l(5,f.IWorkspaceEditingService),l(6,v.IStatusbarService)],e)}();t.MainThreadWorkspace=m}),
define(e[1550],t([1,0,75,16,6,38,1326,1446,1410,1415,1267,1268,1269,1270,1271,1272,1273,515,1465,444,451,1275,1294,1276,1412,445,1414,1279,1281,1352,1395,1282,1398,1283,1443,1284,1285,1286,1287,1288,1289,1280,1381,1482,1290,1291,1549]),function(e,t,n,i,r,o,s,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e){this.instantiationService=e,this.instantiationService.createInstance(s.JSONValidationExtensionPoint),this.instantiationService.createInstance(c.ColorExtensionPoint),this.instantiationService.createInstance(u.LanguageConfigurationFileHandler)}return e=a([l(0,r.IInstantiationService)],e)}();t.ExtensionPoints=d,i.Registry.as(n.Extensions.Workbench).registerWorkbenchContribution(d,o.LifecyclePhase.Starting)}),define(e[255],t([1,0,1481,42,27,190,10,70,65,25,64,145,62,29,162,33,36,11]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m){"use strict";function y(e,t){var n;return(n=t.getLastActiveWorkspaceRoot("file"))||(n=t.getLastActiveFile()),
n?l.dirname(n.fsPath):void 0}function b(e){return{windowService:e.get(i.IWindowService),historyService:e.get(f.IHistoryService),contextService:e.get(r.IWorkspaceContextService),environmentService:e.get(v.IEnvironmentService)}}function S(e,t){var n;return(n=t.getLastActiveFile())||(n=t.getLastActiveWorkspaceRoot("file")),n?l.dirname(n.fsPath):void 0}function _(e,t,n){return e.getWorkbenchState()!==r.WorkbenchState.WORKSPACE||function(e,t){return g.isParent(e,t.workspacesHome,!m.isLinux)}(e.getWorkspace().configuration.fsPath,n)?y(0,t):l.dirname(e.getWorkspace().configuration.fsPath)}Object.defineProperty(t,"__esModule",{value:!0}),t.ADD_ROOT_FOLDER_COMMAND_ID="addRootFolder",t.ADD_ROOT_FOLDER_LABEL=n.localize(0,null),t.PICK_WORKSPACE_FOLDER_COMMAND_ID="_workbench.pickWorkspaceFolder",t.defaultFolderPath=y,t.defaultFilePath=S,t.defaultWorkspacePath=_,p.CommandsRegistry.registerCommand({id:"workbench.action.files.openFileFolderInNewWindow",handler:function(e){var t=b(e),n=t.windowService,i=t.historyService
;t.contextService;n.pickFileFolderAndOpen({forceNewWindow:!0,dialogOptions:{defaultPath:S(0,i)}})}}),p.CommandsRegistry.registerCommand({id:"_files.pickFolderAndOpen",handler:function(e,t){var n=b(e),i=n.windowService,r=n.historyService;n.contextService;i.pickFolderAndOpen({forceNewWindow:t,dialogOptions:{defaultPath:y(0,r)}})}}),p.CommandsRegistry.registerCommand({id:"workbench.action.files.openFolderInNewWindow",handler:function(e){var t=b(e),n=t.windowService,i=t.historyService;t.contextService;n.pickFolderAndOpen({forceNewWindow:!0,dialogOptions:{defaultPath:y(0,i)}})}}),p.CommandsRegistry.registerCommand({id:"workbench.action.files.openFileInNewWindow",handler:function(e){var t=b(e),n=t.windowService,i=t.historyService;t.contextService;n.pickFileAndOpen({forceNewWindow:!0,dialogOptions:{defaultPath:S(0,i)}})}}),p.CommandsRegistry.registerCommand({id:"workbench.action.openWorkspaceInNewWindow",handler:function(e){var t=b(e),n=t.windowService,i=t.historyService,r=t.contextService,o=t.environmentService
;n.pickWorkspaceAndOpen({forceNewWindow:!0,dialogOptions:{defaultPath:_(r,i,o)}})}}),p.CommandsRegistry.registerCommand({id:t.ADD_ROOT_FOLDER_COMMAND_ID,handler:function(e){var t=e.get(c.IViewletService),a=e.get(o.IWorkspaceEditingService);return function(e,t,n,i,r){return n.showOpenDialog({buttonLabel:e,title:t,properties:["multiSelections","openDirectory","createDirectory"],defaultPath:y(0,r)})}(h.mnemonicButtonLabel(n.localize(1,null)),n.localize(2,null),e.get(i.IWindowService),e.get(r.IWorkspaceContextService),e.get(f.IHistoryService)).then(function(e){return e&&e.length?a.addFolders(e.map(function(e){return{uri:s.default.file(e)}})).then(function(){return t.openViewlet(t.getDefaultViewletId(),!0)}).then(function(){}):null})}}),p.CommandsRegistry.registerCommand(t.PICK_WORKSPACE_FOLDER_COMMAND_ID,function(e,t){var i=e.get(r.IWorkspaceContextService),o=e.get(u.IQuickOpenService),s=e.get(v.IEnvironmentService),c=i.getWorkspace().folders;if(c.length){var l,p=c.map(function(e){return{label:e.name,
description:h.getPathLabel(a.dirname(e.uri),s,i),folder:e,resource:e.uri,fileKind:g.FileKind.ROOT_FOLDER}});t&&(l=t[0]),l||(l=Object.create(null)),l.autoFocus||(l.autoFocus={autoFocusFirstEntry:!0}),l.placeHolder||(l.placeHolder=n.localize(3,null)),"boolean"!=typeof l.matchOnDescription&&(l.matchOnDescription=!0);var f;return t&&(f=t[1]),f||(f=d.CancellationToken.None),o.pick(p,l,f).then(function(e){if(e)return c[p.indexOf(e)]})}})}),define(e[305],t([1,0,4,23,1475,42,27,190,150,36,62,21,29,162,255]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.windowService=i,s.historyService=r,s.contextService=o,s}return n(t,e),t.prototype.run=function(e,t){return this.windowService.pickFileAndOpen({telemetryExtraData:t,dialogOptions:{defaultPath:m.defaultFilePath(this.contextService,this.historyService)}})},t.ID="workbench.action.files.openFile",t.LABEL=o.localize(0,null),
t=a([l(2,s.IWindowService),l(3,v.IHistoryService),l(4,c.IWorkspaceContextService)],t)}(r.Action);t.OpenFileAction=y;var b=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.windowService=i,s.historyService=r,s.contextService=o,s}return n(t,e),t.prototype.run=function(e,t){return this.windowService.pickFolderAndOpen({telemetryExtraData:t,dialogOptions:{defaultPath:m.defaultFolderPath(this.contextService,this.historyService)}})},t.ID="workbench.action.files.openFolder",t.LABEL=o.localize(1,null),t=a([l(2,s.IWindowService),l(3,v.IHistoryService),l(4,c.IWorkspaceContextService)],t)}(r.Action);t.OpenFolderAction=b;var S=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.windowService=i,s.historyService=r,s.contextService=o,s}return n(t,e),t.prototype.run=function(e,t){return this.windowService.pickFileFolderAndOpen({telemetryExtraData:t,dialogOptions:{defaultPath:m.defaultFilePath(this.contextService,this.historyService)}})},t.ID="workbench.action.files.openFileFolder",
t.LABEL=o.localize(2,null),t=a([l(2,s.IWindowService),l(3,v.IHistoryService),l(4,c.IWorkspaceContextService)],t)}(r.Action);t.OpenFileFolderAction=S;var _=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.commandService=i,r}return n(t,e),t.prototype.run=function(){return this.commandService.executeCommand(m.ADD_ROOT_FOLDER_COMMAND_ID)},t.ID="workbench.action.addRootFolder",t.LABEL=m.ADD_ROOT_FOLDER_LABEL,t=a([l(2,g.ICommandService)],t)}(r.Action);t.AddRootFolderAction=_;var C=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.workspaceEditingService=i,s.contextService=r,s.commandService=o,s}return n(t,e),t.prototype.run=function(){var e=this,t=this.contextService.getWorkbenchState();return t===c.WorkbenchState.WORKSPACE||t===c.WorkbenchState.FOLDER?this.commandService.executeCommand(m.PICK_WORKSPACE_FOLDER_COMMAND_ID).then(function(t){return!t||e.workspaceEditingService.removeFolders([t.uri]).then(function(){return!0})}):i.TPromise.as(!0)},
t.ID="workbench.action.removeRootFolder",t.LABEL=o.localize(3,null),t=a([l(2,u.IWorkspaceEditingService),l(3,c.IWorkspaceContextService),l(4,g.ICommandService)],t)}(r.Action);t.GlobalRemoveRootFolderAction=C;var E=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n)||this;return c.windowService=i,c.environmentService=r,c.contextService=o,c.workspaceEditingService=s,c.historyService=a,c}return n(t,e),t.prototype.run=function(){var e=this;return this.getNewWorkspaceConfigPath().then(function(t){if(t)switch(e.contextService.getWorkbenchState()){case c.WorkbenchState.EMPTY:case c.WorkbenchState.FOLDER:var n=e.contextService.getWorkspace().folders.map(function(e){return{uri:e.uri}});return e.workspaceEditingService.createAndEnterWorkspace(n,t);case c.WorkbenchState.WORKSPACE:return e.workspaceEditingService.saveAndEnterWorkspace(t)}return null})},t.prototype.getNewWorkspaceConfigPath=function(){return this.windowService.showSaveDialog({buttonLabel:p.mnemonicButtonLabel(o.localize(5,null)),
title:o.localize(6,null),filters:d.WORKSPACE_FILTER,defaultPath:m.defaultWorkspacePath(this.contextService,this.historyService,this.environmentService)})},t.ID="workbench.action.saveWorkspaceAs",t.LABEL=o.localize(4,null),t=a([l(2,s.IWindowService),l(3,h.IEnvironmentService),l(4,c.IWorkspaceContextService),l(5,u.IWorkspaceEditingService),l(6,v.IHistoryService)],t)}(r.Action);t.SaveWorkspaceAsAction=E;var w=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n)||this;return a.windowService=i,a.contextService=r,a.historyService=o,a.environmentService=s,a}return n(t,e),t.prototype.run=function(e,t){return this.windowService.pickWorkspaceAndOpen({telemetryExtraData:t,dialogOptions:{defaultPath:m.defaultWorkspacePath(this.contextService,this.historyService,this.environmentService)}})},t.ID="workbench.action.openWorkspace",t.LABEL=o.localize(7,null),t=a([l(2,s.IWindowService),l(3,c.IWorkspaceContextService),l(4,v.IHistoryService),l(5,h.IEnvironmentService)],t)}(r.Action);t.OpenWorkspaceAction=w
;var I=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.workspaceContextService=i,o.editorService=r,o.enabled=!!o.workspaceContextService.getWorkspace().configuration,o}return n(t,e),t.prototype.run=function(){return this.editorService.openEditor({resource:this.workspaceContextService.getWorkspace().configuration})},t.ID="workbench.action.openWorkspaceConfigFile",t.LABEL=o.localize(8,null),t=a([l(2,c.IWorkspaceContextService),l(3,f.IEditorService)],t)}(r.Action);t.OpenWorkspaceConfigFileAction=I;var T=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n)||this;return a.workspaceContextService=i,a.workspaceEditingService=r,a.windowService=o,a.workspacesService=s,a}return n(t,e),t.prototype.run=function(){var e=this,t=this.workspaceContextService.getWorkspace().folders;return this.workspacesService.createWorkspace(t).then(function(t){return e.workspaceEditingService.copyWorkspaceSettings(t).then(function(){return e.windowService.openWindow([t.configPath],{forceNewWindow:!0})})})},
t.ID="workbench.action.duplicateWorkspaceInNewWindow",t.LABEL=o.localize(9,null),t=a([l(2,c.IWorkspaceContextService),l(3,u.IWorkspaceEditingService),l(4,s.IWindowService),l(5,d.IWorkspacesService)],t)}(r.Action);t.DuplicateWorkspaceInNewWindowAction=T}),define(e[1553],t([1,0,16,567,76,93,31,63,56,73,11,253,1366,305,15,164,52,29,6,75,38,1386]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),h.registerCommands();var C=i.localize(0,null),E=i.localize(1,null),w=i.localize(2,null),I=n.Registry.as(c.Extensions.WorkbenchActions);I.registerWorkbenchAction(new s.SyncActionDescriptor(d.NewWindowAction,d.NewWindowAction.ID,d.NewWindowAction.LABEL,{primary:3116}),"New Window"),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.CloseCurrentWindowAction,d.CloseCurrentWindowAction.ID,d.CloseCurrentWindowAction.LABEL,{primary:3125}),"Close Window"),
I.registerWorkbenchAction(new s.SyncActionDescriptor(d.SwitchWindow,d.SwitchWindow.ID,d.SwitchWindow.LABEL,{primary:null,mac:{primary:309}}),"Switch Window..."),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.QuickSwitchWindow,d.QuickSwitchWindow.ID,d.QuickSwitchWindow.LABEL),"Quick Switch Window..."),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.QuickOpenRecentAction,d.QuickOpenRecentAction.ID,d.QuickOpenRecentAction.LABEL),"File: Quick Open Recent...",w),u.isMacintosh?I.registerWorkbenchAction(new s.SyncActionDescriptor(p.OpenFileFolderAction,p.OpenFileFolderAction.ID,p.OpenFileFolderAction.LABEL,{primary:2093}),"File: Open...",w):(I.registerWorkbenchAction(new s.SyncActionDescriptor(p.OpenFileAction,p.OpenFileAction.ID,p.OpenFileAction.LABEL,{primary:2093}),"File: Open File...",w),I.registerWorkbenchAction(new s.SyncActionDescriptor(p.OpenFolderAction,p.OpenFolderAction.ID,p.OpenFolderAction.LABEL,{primary:l.KeyChord(2089,2093)}),"File: Open Folder...",w)),
I.registerWorkbenchAction(new s.SyncActionDescriptor(d.CloseWorkspaceAction,d.CloseWorkspaceAction.ID,d.CloseWorkspaceAction.LABEL,{primary:l.KeyChord(2089,36)}),"File: Close Workspace",w),r.default.reportIssueUrl&&(I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenIssueReporterAction,d.OpenIssueReporterAction.ID,d.OpenIssueReporterAction.LABEL),"Help: Open Issue Reporter",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ReportPerformanceIssueUsingReporterAction,d.ReportPerformanceIssueUsingReporterAction.ID,d.ReportPerformanceIssueUsingReporterAction.LABEL),"Help: Report Performance Issue",E)),d.KeybindingsReferenceAction.AVAILABLE&&I.registerWorkbenchAction(new s.SyncActionDescriptor(d.KeybindingsReferenceAction,d.KeybindingsReferenceAction.ID,d.KeybindingsReferenceAction.LABEL,{primary:l.KeyChord(2089,2096)}),"Help: Keyboard Shortcuts Reference",E),
d.OpenDocumentationUrlAction.AVAILABLE&&I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenDocumentationUrlAction,d.OpenDocumentationUrlAction.ID,d.OpenDocumentationUrlAction.LABEL),"Help: Documentation",E),d.OpenIntroductoryVideosUrlAction.AVAILABLE&&I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenIntroductoryVideosUrlAction,d.OpenIntroductoryVideosUrlAction.ID,d.OpenIntroductoryVideosUrlAction.LABEL),"Help: Introductory Videos",E),d.OpenTipsAndTricksUrlAction.AVAILABLE&&I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenTipsAndTricksUrlAction,d.OpenTipsAndTricksUrlAction.ID,d.OpenTipsAndTricksUrlAction.LABEL),"Help: Tips and Tricks",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenTwitterUrlAction,d.OpenTwitterUrlAction.ID,d.OpenTwitterUrlAction.LABEL),"Help: Join us on Twitter",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenRequestFeatureUrlAction,d.OpenRequestFeatureUrlAction.ID,d.OpenRequestFeatureUrlAction.LABEL),"Help: Search Feature Requests",E),
I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenLicenseUrlAction,d.OpenLicenseUrlAction.ID,d.OpenLicenseUrlAction.LABEL),"Help: View License",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenPrivacyStatementUrlAction,d.OpenPrivacyStatementUrlAction.ID,d.OpenPrivacyStatementUrlAction.LABEL),"Help: Privacy Statement",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ShowAccessibilityOptionsAction,d.ShowAccessibilityOptionsAction.ID,d.ShowAccessibilityOptionsAction.LABEL),"Help: Accessibility Options",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ShowAboutDialogAction,d.ShowAboutDialogAction.ID,d.ShowAboutDialogAction.LABEL),"Help: About",E),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ZoomInAction,d.ZoomInAction.ID,d.ZoomInAction.LABEL,{primary:2129,secondary:[3153,2152]}),"View: Zoom In",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ZoomOutAction,d.ZoomOutAction.ID,d.ZoomOutAction.LABEL,{primary:2131,secondary:[3155,2154],linux:{primary:2131,
secondary:[2154]}}),"View: Zoom Out",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ZoomResetAction,d.ZoomResetAction.ID,d.ZoomResetAction.LABEL,{primary:2141}),"View: Reset Zoom",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ToggleFullScreenAction,d.ToggleFullScreenAction.ID,d.ToggleFullScreenAction.LABEL,{primary:69,mac:{primary:2340}}),"View: Toggle Full Screen",C),(u.isWindows||u.isLinux)&&I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ToggleMenuBarAction,d.ToggleMenuBarAction.ID,d.ToggleMenuBarAction.LABEL),"View: Toggle Menu Bar",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.NavigateUpAction,d.NavigateUpAction.ID,d.NavigateUpAction.LABEL,null),"View: Navigate to the View Above",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.NavigateDownAction,d.NavigateDownAction.ID,d.NavigateDownAction.LABEL,null),"View: Navigate to the View Below",C),
I.registerWorkbenchAction(new s.SyncActionDescriptor(d.NavigateLeftAction,d.NavigateLeftAction.ID,d.NavigateLeftAction.LABEL,null),"View: Navigate to the View on the Left",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.NavigateRightAction,d.NavigateRightAction.ID,d.NavigateRightAction.LABEL,null),"View: Navigate to the View on the Right",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.IncreaseViewSizeAction,d.IncreaseViewSizeAction.ID,d.IncreaseViewSizeAction.LABEL,null),"View: Increase Current View Size",C),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.DecreaseViewSizeAction,d.DecreaseViewSizeAction.ID,d.DecreaseViewSizeAction.LABEL,null),"View: Decrease Current View Size",C);var T=i.localize(3,null);I.registerWorkbenchAction(new s.SyncActionDescriptor(p.AddRootFolderAction,p.AddRootFolderAction.ID,p.AddRootFolderAction.LABEL),"Workspaces: Add Folder to Workspace...",T),
I.registerWorkbenchAction(new s.SyncActionDescriptor(p.GlobalRemoveRootFolderAction,p.GlobalRemoveRootFolderAction.ID,p.GlobalRemoveRootFolderAction.LABEL),"Workspaces: Remove Folder from Workspace...",T),I.registerWorkbenchAction(new s.SyncActionDescriptor(p.OpenWorkspaceAction,p.OpenWorkspaceAction.ID,p.OpenWorkspaceAction.LABEL),"Workspaces: Open Workspace...",T),I.registerWorkbenchAction(new s.SyncActionDescriptor(p.SaveWorkspaceAsAction,p.SaveWorkspaceAsAction.ID,p.SaveWorkspaceAsAction.LABEL),"Workspaces: Save Workspace As...",T),I.registerWorkbenchAction(new s.SyncActionDescriptor(p.DuplicateWorkspaceInNewWindowAction,p.DuplicateWorkspaceInNewWindowAction.ID,p.DuplicateWorkspaceInNewWindowAction.LABEL),"Workspaces: Duplicate Workspace in New Window",T),m.CommandsRegistry.registerCommand(p.OpenWorkspaceConfigFileAction.ID,function(e){e.get(y.IInstantiationService).createInstance(p.OpenWorkspaceConfigFileAction,p.OpenWorkspaceConfigFileAction.ID,p.OpenWorkspaceConfigFileAction.LABEL).run()}),
s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:p.OpenWorkspaceConfigFileAction.ID,title:T+": "+p.OpenWorkspaceConfigFileAction.LABEL},when:new f.RawContextKey("workbenchState","").isEqualTo("workspace")});var x=i.localize(4,null);I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ShowStartupPerformance,d.ShowStartupPerformance.ID,d.ShowStartupPerformance.LABEL),"Developer: Startup Performance",x),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.ToggleSharedProcessAction,d.ToggleSharedProcessAction.ID,d.ToggleSharedProcessAction.LABEL),"Developer: Toggle Shared Process",x),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.InspectContextKeysAction,d.InspectContextKeysAction.ID,d.InspectContextKeysAction.LABEL),"Developer: Inspect Context Keys",x),I.registerWorkbenchAction(new s.SyncActionDescriptor(d.OpenProcessExplorer,d.OpenProcessExplorer.ID,d.OpenProcessExplorer.LABEL),"Developer: Open Process Explorer",x)
;var k=f.ContextKeyExpr.and(g.inQuickOpenContext,f.ContextKeyExpr.has(d.inRecentFilesPickerContextKey));v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigateNextInRecentFilesPicker",weight:v.KeybindingsRegistry.WEIGHT.workbenchContrib(50),handler:g.getQuickNavigateHandler("workbench.action.quickOpenNavigateNextInRecentFilesPicker",!0),when:k,primary:2096,mac:{primary:304}});v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",weight:v.KeybindingsRegistry.WEIGHT.workbenchContrib(50),handler:g.getQuickNavigateHandler("workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",!1),when:k,primary:3120,mac:{primary:1328}});var D=n.Registry.as(a.Extensions.Configuration);D.registerConfiguration({id:"workbench",order:7,title:i.localize(5,null),type:"object",properties:{"workbench.editor.showTabs":{type:"boolean",description:i.localize(6,null),default:!0},"workbench.editor.labelFormat":{type:"string",
enum:["default","short","medium","long"],enumDescriptions:[i.localize(7,null),i.localize(8,null),i.localize(9,null),i.localize(10,null)],default:"default",description:i.localize(11,null)},"workbench.editor.tabCloseButton":{type:"string",enum:["left","right","off"],default:"right",description:i.localize(12,null)},"workbench.editor.tabSizing":{type:"string",enum:["fit","shrink"],default:"fit",description:i.localize(13,null)},"workbench.editor.showIcons":{type:"boolean",description:i.localize(14,null),default:!0},"workbench.editor.enablePreview":{type:"boolean",description:i.localize(15,null),default:!0},"workbench.editor.enablePreviewFromQuickOpen":{type:"boolean",description:i.localize(16,null),default:!0},"workbench.editor.closeOnFileDelete":{type:"boolean",description:i.localize(17,null),default:!0},"workbench.editor.openPositioning":{type:"string",enum:["left","right","first","last"],default:"right",description:i.localize(18,null)},"workbench.editor.openSideBySideDirection":{type:"string",
enum:["right","down"],default:"right",description:i.localize(19,null)},"workbench.editor.closeEmptyGroups":{type:"boolean",description:i.localize(20,null),default:!0},"workbench.editor.revealIfOpen":{type:"boolean",description:i.localize(21,null),default:!1},"workbench.editor.swipeToNavigate":{type:"boolean",description:i.localize(22,null),default:!1,included:u.isMacintosh},"workbench.commandPalette.history":{type:"number",description:i.localize(23,null),default:50},"workbench.commandPalette.preserveInput":{type:"boolean",description:i.localize(24,null),default:!1},"workbench.quickOpen.closeOnFocusLost":{type:"boolean",description:i.localize(25,null),default:!0},"workbench.settings.openDefaultSettings":{type:"boolean",description:i.localize(26,null),default:!0},"workbench.sideBar.location":{type:"string",enum:["left","right"],default:"left",description:i.localize(27,null)},"workbench.panel.defaultLocation":{type:"string",enum:["bottom","right"],default:"bottom",description:i.localize(28,null)},
"workbench.statusBar.visible":{type:"boolean",default:!0,description:i.localize(29,null)},"workbench.activityBar.visible":{type:"boolean",default:!0,description:i.localize(30,null)},"workbench.view.alwaysShowHeaderActions":{type:"boolean",default:!1,description:i.localize(31,null)},"workbench.fontAliasing":{type:"string",enum:["default","antialiased","none","auto"],default:"default",description:i.localize(32,null),enumDescriptions:[i.localize(33,null),i.localize(34,null),i.localize(35,null),i.localize(36,null)],included:u.isMacintosh},"workbench.settings.enableNaturalLanguageSearch":{type:"boolean",description:i.localize(37,null),default:!0,scope:a.ConfigurationScope.WINDOW},"workbench.settings.settingsSearchTocBehavior":{type:"string",enum:["hide","filter","show"],description:i.localize(38,null),default:"hide",scope:a.ConfigurationScope.WINDOW},"workbench.settings.tocVisible":{type:"boolean",description:i.localize(39,null),default:!0,scope:a.ConfigurationScope.WINDOW}}}),D.registerConfiguration({id:"window",
order:8,title:i.localize(40,null),type:"object",properties:{"window.openFilesInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[i.localize(41,null),i.localize(42,null),u.isMacintosh?i.localize(43,null):i.localize(44,null)],default:"off",scope:a.ConfigurationScope.APPLICATION,description:u.isMacintosh?i.localize(45,null):i.localize(46,null)},"window.openFoldersInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[i.localize(47,null),i.localize(48,null),i.localize(49,null)],default:"default",scope:a.ConfigurationScope.APPLICATION,description:i.localize(50,null)},"window.openWithoutArgumentsInNewWindow":{type:"string",enum:["on","off"],enumDescriptions:[i.localize(51,null),i.localize(52,null)],default:u.isMacintosh?"off":"on",scope:a.ConfigurationScope.APPLICATION,description:i.localize(53,null)},"window.restoreWindows":{type:"string",enum:["all","folders","one","none"],enumDescriptions:[i.localize(54,null),i.localize(55,null),i.localize(56,null),i.localize(57,null)],
default:"one",scope:a.ConfigurationScope.APPLICATION,description:i.localize(58,null)},"window.restoreFullscreen":{type:"boolean",default:!1,scope:a.ConfigurationScope.APPLICATION,description:i.localize(59,null)},"window.zoomLevel":{type:"number",default:0,description:i.localize(60,null)},"window.title":{type:"string",default:u.isMacintosh?"${activeEditorShort}${separator}${rootName}":"${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}",description:i.localize(61,null)},"window.newWindowDimensions":{type:"string",enum:["default","inherit","maximized","fullscreen"],enumDescriptions:[i.localize(62,null),i.localize(63,null),i.localize(64,null),i.localize(65,null)],default:"default",scope:a.ConfigurationScope.APPLICATION,description:i.localize(66,null)},"window.closeWhenEmpty":{type:"boolean",default:!1,description:i.localize(67,null)},"window.menuBarVisibility":{type:"string",enum:["default","visible","toggle","hidden"],
enumDescriptions:[i.localize(68,null),i.localize(69,null),i.localize(70,null),i.localize(71,null)],default:"default",scope:a.ConfigurationScope.APPLICATION,description:i.localize(72,null),included:u.isWindows||u.isLinux},"window.enableMenuBarMnemonics":{type:"boolean",default:!0,scope:a.ConfigurationScope.APPLICATION,description:i.localize(73,null),included:u.isWindows||u.isLinux},"window.autoDetectHighContrast":{type:"boolean",default:!0,description:i.localize(74,null),included:u.isWindows},"window.titleBarStyle":{type:"string",enum:["native","custom"],default:u.isMacintosh?"custom":"native",scope:a.ConfigurationScope.APPLICATION,description:i.localize(75,null)},"window.nativeTabs":{type:"boolean",default:!1,scope:a.ConfigurationScope.APPLICATION,description:i.localize(76,null),included:u.isMacintosh&&parseFloat(o.release())>=16},"window.smoothScrollingWorkaround":{type:"boolean",default:!1,scope:a.ConfigurationScope.APPLICATION,description:i.localize(77,null),included:u.isWindows},
"window.clickThroughInactive":{type:"boolean",default:!0,scope:a.ConfigurationScope.APPLICATION,description:i.localize(78,null),included:u.isMacintosh}}}),D.registerConfiguration({id:"zenMode",order:9,title:i.localize(79,null),type:"object",properties:{"zenMode.fullScreen":{type:"boolean",default:!0,description:i.localize(80,null)},"zenMode.centerLayout":{type:"boolean",default:!0,description:i.localize(81,null)},"zenMode.hideTabs":{type:"boolean",default:!0,description:i.localize(82,null)},"zenMode.hideStatusBar":{type:"boolean",default:!0,description:i.localize(83,null)},"zenMode.hideActivityBar":{type:"boolean",default:!0,description:i.localize(84,null)},"zenMode.restore":{type:"boolean",default:!1,description:i.localize(85,null)}}}),n.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(_.HistoryNavigationKeybindingsChangedContribution,S.LifecyclePhase.Eventually)}),
define(e[1554],t([1,0,569,10,9,30,4,20,24,8,41,23,33,40,21,28,95,42,35,37,513,141,78,29,49,245,69,103,190,31,15,143,18,5,17,38,300,11,76,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var K=[new f.Action("undo",i.localize(0,null),null,!0,function(){return document.execCommand("undo")&&c.TPromise.as(!0)}),new f.Action("redo",i.localize(1,null),null,!0,function(){return document.execCommand("redo")&&c.TPromise.as(!0)}),new p.Separator,new f.Action("editor.action.clipboardCutAction",i.localize(2,null),null,!0,function(){return document.execCommand("cut")&&c.TPromise.as(!0)}),new f.Action("editor.action.clipboardCopyAction",i.localize(3,null),null,!0,function(){return document.execCommand("copy")&&c.TPromise.as(!0)}),new f.Action("editor.action.clipboardPasteAction",i.localize(4,null),null,!0,function(){return document.execCommand("paste")&&c.TPromise.as(!0)
}),new p.Separator,new f.Action("editor.action.selectAll",i.localize(5,null),null,!0,function(){return document.execCommand("selectAll")&&c.TPromise.as(!0)})],U=function(t){function f(e,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y){var b=t.call(this,a)||this;return b.editorService=n,b.windowsService=i,b.windowService=r,b.configurationService=o,b.titleService=s,b.themeService=a,b.notificationService=c,b.commandService=l,b.extensionService=u,b.contextMenuService=d,b.keybindingService=h,b.telemetryService=p,b.workspaceEditingService=f,b.fileService=g,b.menuService=v,b.lifecycleService=m,b.integrityService=y,b.touchBarDisposables=[],b.pendingFoldersToAdd=[],b.addFoldersScheduler=new P.RunOnceScheduler(function(){return b.doAddFolders()},100),b.toUnbind.push(b.addFoldersScheduler),b.registerListeners(),b.create(),b}return n(f,t),f.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.editorService.onDidActiveEditorChange(function(){return e.updateTouchbarMenu()})),
[h.EventType.DRAG_OVER,h.EventType.DROP].forEach(function(e){window.document.body.addEventListener(e,function(e){h.EventHelper.stop(e)})}),A.ipcRenderer.on("vscode:runAction",function(t,n){var i,r=[];if("touchbar"===n.from){var o=e.editorService.activeEditor;if(o){var s=v.toResource(o,{supportSideBySide:!0});s&&r.push(s)}}else r.push({from:n.from});(i=e.commandService).executeCommand.apply(i,[n.id].concat(r)).done(function(t){e.telemetryService.publicLog("commandExecuted",{id:n.id,from:n.from})},function(t){e.notificationService.error(t)})}),A.ipcRenderer.on("vscode:resolveKeybindings",function(t,n){var i=[];try{i=JSON.parse(n)}catch(e){}e.resolveKeybindings(i).done(function(e){e.length&&A.ipcRenderer.send("vscode:keybindingsResolved",JSON.stringify(e))},function(){return o.onUnexpectedError})}),A.ipcRenderer.on("vscode:reportError",function(e,t){if(t){var n=JSON.parse(t);n.mainProcess=!0,o.onUnexpectedError(n)}}),A.ipcRenderer.on("vscode:openFiles",function(t,n){return e.onOpenFiles(n)}),
A.ipcRenderer.on("vscode:addFolders",function(t,n){return e.onAddFoldersRequest(n)}),A.ipcRenderer.on("vscode:showInfoMessage",function(t,n){e.notificationService.info(n)}),A.ipcRenderer.on("vscode.toggleAutoSave",function(){e.toggleAutoSave()}),A.ipcRenderer.on("vscode:enterFullScreen",function(){e.lifecycleService.when(W.LifecyclePhase.Running).then(function(){I.setFullscreen(!0)})}),A.ipcRenderer.on("vscode:leaveFullScreen",function(){e.lifecycleService.when(W.LifecyclePhase.Running).then(function(){I.setFullscreen(!1)})}),A.ipcRenderer.on("vscode:enterHighContrast",function(){var t=e.configurationService.getValue("window");t&&t.autoDetectHighContrast&&e.lifecycleService.when(W.LifecyclePhase.Running).then(function(){e.themeService.setColorTheme(w.VS_HC_THEME,null)})}),A.ipcRenderer.on("vscode:leaveHighContrast",function(){var t=e.configurationService.getValue("window");t&&t.autoDetectHighContrast&&e.lifecycleService.when(W.LifecyclePhase.Running).then(function(){
e.themeService.setColorTheme(w.VS_DARK_THEME,null)})}),A.ipcRenderer.on("vscode:keyboardLayoutChanged",function(){k.KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged()}),A.ipcRenderer.on("vscode:accessibilitySupportChanged",function(e,t){I.setAccessibilitySupport(t?2:1)}),this.updateWindowZoomLevel(),this.toUnbind.push(this.configurationService.onDidChangeConfiguration(function(t){t.affectsConfiguration("window.zoomLevel")&&e.updateWindowZoomLevel()})),window.document.addEventListener("contextmenu",function(t){return e.onContextMenu(t)})},f.prototype.onContextMenu=function(e){if(e.target instanceof HTMLElement){var t=e.target;!t.nodeName||"input"!==t.nodeName.toLowerCase()&&"textarea"!==t.nodeName.toLowerCase()||(h.EventHelper.stop(e,!0),this.contextMenuService.showContextMenu({getAnchor:function(){return e},getActions:function(){return c.TPromise.as(K)},onHide:function(){return t.focus()}}))}},f.prototype.updateWindowZoomLevel=function(){var e=this.configurationService.getValue(),t=0
;if(e.window&&"number"==typeof e.window.zoomLevel){if(t=e.window.zoomLevel,this.previousConfiguredZoomLevel===t)return;this.previousConfiguredZoomLevel=t}A.webFrame.getZoomLevel()!==t&&(A.webFrame.setZoomLevel(t),I.setZoomFactor(A.webFrame.getZoomFactor()),I.setZoomLevel(A.webFrame.getZoomLevel(),!1))},f.prototype.create=function(){var t=this,n=this;window.open=function(e,t,i,r){return n.windowsService.openExternal(e),null},this.lifecycleService.when(W.LifecyclePhase.Running).then(function(){A.ipcRenderer.send("vscode:workbenchLoaded",t.windowService.getCurrentWindowId())}),this.integrityService.isPure().then(function(e){return t.titleService.updateProperties({isPure:e.isPure})}),this.lifecycleService.when(W.LifecyclePhase.Running).then(function(){return(V.isWindows?new Promise(function(t,n){e(["native-is-elevated"],t,n)}).then(function(e){return e()}):Promise.resolve(V.isRootUser())).then(function(e){t.titleService.updateProperties({isAdmin:e}),
e&&!V.isWindows&&t.notificationService.warn(i.localize(6,null,z.default.nameShort))})}),this.updateTouchbarMenu()},f.prototype.updateTouchbarMenu=function(){var e=this;V.isMacintosh&&this.configurationService.getValue("keyboard.touchbar.enabled")&&(this.touchBarDisposables=N.dispose(this.touchBarDisposables),this.touchBarMenu=void 0,this.touchBarUpdater=new P.RunOnceScheduler(function(){return e.doUpdateTouchbarMenu()},300),this.touchBarDisposables.push(this.touchBarUpdater),this.touchBarUpdater.schedule())},f.prototype.doUpdateTouchbarMenu=function(){var e=this;this.touchBarMenu||(this.touchBarMenu=this.editorService.invokeWithinEditorContext(function(t){return e.menuService.createMenu(R.MenuId.TouchBarContext,t.get(O.IContextKeyService))}),this.touchBarDisposables.push(this.touchBarMenu),this.touchBarDisposables.push(this.touchBarMenu.onDidChange(function(){return e.touchBarUpdater.schedule()})));var t=[];M.fillInActionBarActions(this.touchBarMenu,void 0,t);for(var n=[],i=[],r=0;r<t.length;r++){var o=t[r]
;o instanceof R.MenuItemAction?i.push(o.item):o instanceof p.Separator&&(i.length&&n.push(i),i=[])}i.length&&n.push(i),d.equals(this.lastInstalledTouchedBar,n)||(this.lastInstalledTouchedBar=n,this.windowService.updateTouchBar(n))},f.prototype.resolveKeybindings=function(e){var t=this;return c.TPromise.join([this.lifecycleService.when(W.LifecyclePhase.Running),this.extensionService.whenInstalledExtensionsRegistered()]).then(function(){return u.coalesce(e.map(function(e){var n=t.keybindingService.lookupKeybinding(e);if(!n)return null;var i=n.getElectronAccelerator();if(i)return{id:e,label:i,isNative:!0};var r=n.getLabel();return r?{id:e,label:r,isNative:!1}:null}))})},f.prototype.onAddFoldersRequest=function(e){this.pendingFoldersToAdd.push(e),this.addFoldersScheduler.isScheduled()||this.addFoldersScheduler.schedule()},f.prototype.doAddFolders=function(){var e=[];this.pendingFoldersToAdd.forEach(function(t){e.push.apply(e,t.foldersToAdd.map(function(e){return{uri:r.default.file(e.filePath)}}))}),
this.pendingFoldersToAdd=[],this.workspaceEditingService.addFolders(e).done(null,o.onUnexpectedError)},f.prototype.onOpenFiles=function(e){var t=this,n=[],i=2===e.filesToDiff.length;if(!i&&e.filesToOpen&&n.push.apply(n,this.toInputs(e.filesToOpen,!1)),!i&&e.filesToCreate&&n.push.apply(n,this.toInputs(e.filesToCreate,!0)),i&&n.push.apply(n,this.toInputs(e.filesToDiff,!1)),n.length&&this.openResources(n,i).then(null,o.onUnexpectedError),e.filesToWait&&n.length)var s=e.filesToWait.paths.map(function(e){return r.default.file(e.filePath)}),a=r.default.file(e.filesToWait.waitMarkerFilePath),c=this.editorService.onDidCloseEditor(function(){s.every(function(e){return!t.editorService.isOpen({resource:e})})&&(c.dispose(),t.fileService.del(a).done(null,o.onUnexpectedError))})},f.prototype.openResources=function(e,t){var n=this;return this.lifecycleService.when(W.LifecyclePhase.Running).then(function(){return t&&2===e.length?n.editorService.openEditor({leftResource:e[0].resource,rightResource:e[1].resource,options:{
pinned:!0}}):1===e.length?n.editorService.openEditor(e[0]):n.editorService.openEditors(e)})},f.prototype.toInputs=function(e,t){return e.map(function(e){var n,i=r.default.file(e.filePath);return n=t?{filePath:i.fsPath,options:{pinned:!0}}:{resource:i,options:{pinned:!0}},!t&&e.lineNumber&&(n.options.selection={startLineNumber:e.lineNumber,startColumn:e.columnNumber}),n})},f.prototype.toggleAutoSave=function(){var e=this.configurationService.inspect(f.AUTO_SAVE_SETTING),t=e.user;s.isUndefinedOrNull(t)&&(t=e.default);var n;n=[g.AutoSaveConfiguration.AFTER_DELAY,g.AutoSaveConfiguration.ON_FOCUS_CHANGE,g.AutoSaveConfiguration.ON_WINDOW_CHANGE].some(function(e){return e===t})?g.AutoSaveConfiguration.OFF:g.AutoSaveConfiguration.AFTER_DELAY,this.configurationService.updateValue(f.AUTO_SAVE_SETTING,n,F.ConfigurationTarget.USER)},f.prototype.dispose=function(){this.touchBarDisposables=N.dispose(this.touchBarDisposables),t.prototype.dispose.call(this)},f.AUTO_SAVE_SETTING="files.autoSave",
f=a([l(1,m.IEditorService),l(2,S.IWindowsService),l(3,S.IWindowService),l(4,b.IWorkspaceConfigurationService),l(5,E.ITitleService),l(6,w.IWorkbenchThemeService),l(7,H.INotificationService),l(8,T.ICommandService),l(9,x.IExtensionService),l(10,_.IContextMenuService),l(11,C.IKeybindingService),l(12,y.ITelemetryService),l(13,L.IWorkspaceEditingService),l(14,g.IFileService),l(15,R.IMenuService),l(16,W.ILifecycleService),l(17,B.IIntegrityService)],f)}(D.Themable);t.ElectronWindow=U}),define(e[193],t([1,0,631,236,4,23,18,8,25,89,41,35,5,104,546,80,123,6,99,65,540,33,27,42,49,10,29,17,12,26,51,212,72,352,15,31,255,22,88,62,36,64,21,53,285,76,267,890]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var X=function(e,t,n,r,o){var s=$.default.extensionsGallery.serviceUrl+"/publishers/"+e.publisher+"/vsextensions/"+e.name+"/"+e.version+"/vspackage";r.prompt(V.Severity.Error,t,[{label:i.localize(0,null),
run:function(){return o.open(k.default.parse(s)).then(function(){r.prompt(V.Severity.Info,i.localize(1,null,e.identifier.id),[{label:nt.LABEL,run:function(){var e=n.createInstance(nt,nt.ID,nt.LABEL);e.run(),e.dispose()}}])})}}])},Q=function(e,t,n){if(e instanceof k.default)return t.getExtensionManagementServer(e);if(e===n.getWorkspace())return t.getDefaultExtensionManagementServer();for(var i=0,r=n.getWorkspace().folders;i<r.length;i++){var o=r[i];if(e===o)return t.getExtensionManagementServer(o.uri)}return t.getDefaultExtensionManagementServer()},Z=function(e){function t(n,i,r,o){var s=e.call(this,"extensions.install",t.INSTALL_LABEL,t.Class,!1)||this;return s.extensionsWorkbenchService=n,s.instantiationService=i,s.notificationService=r,s.openerService=o,s.disposables=[],s.disposables.push(s.extensionsWorkbenchService.onChange(function(){return s.update()})),s.update(),s}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,
this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){if(!this.extension||this.extension.type===y.LocalExtensionType.System)return this.enabled=!1,this.class=t.Class,void(this.label=t.INSTALL_LABEL);this.enabled=this.extensionsWorkbenchService.canInstall(this.extension)&&this.extension.state===v.ExtensionState.Uninstalled,this.extension.state===v.ExtensionState.Installing?(this.label=t.INSTALLING_LABEL,this.class=t.InstallingClass,this.tooltip=t.INSTALLING_LABEL):(this.label=t.INSTALL_LABEL,this.class=t.Class,this.tooltip=t.INSTALL_LABEL)},t.prototype.run=function(){return this.extensionsWorkbenchService.open(this.extension),this.install(this.extension)},t.prototype.install=function(e){var t=this;return this.extensionsWorkbenchService.install(e).then(null,function(n){if(!e.gallery)return t.notificationService.error(n);console.error(n),X(e.gallery,i.localize(4,null,e.id),t.instantiationService,t.notificationService,t.openerService)})},t.prototype.dispose=function(){
e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.INSTALL_LABEL=i.localize(2,null),t.INSTALLING_LABEL=i.localize(3,null),t.Class="extension-action prominent install",t.InstallingClass="extension-action install installing",t=a([l(0,v.IExtensionsWorkbenchService),l(1,S.IInstantiationService),l(2,V.INotificationService),l(3,z.IOpenerService)],t)}(s.Action);t.InstallAction=Z;var J=function(e){function t(n){var i=e.call(this,"extensions.uninstall",t.UninstallLabel,t.UninstallClass,!1)||this;return i.extensionsWorkbenchService=n,i.disposables=[],i.disposables.push(i.extensionsWorkbenchService.onChange(function(){return i.update()})),i.update(),i}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){var e=this;if(this.extension){if(this.extension.state===v.ExtensionState.Uninstalling)return this.label=t.UninstallingLabel,
this.class=t.UnInstallingClass,void(this.enabled=!1);this.label=t.UninstallLabel,this.class=t.UninstallClass;var n=this.extensionsWorkbenchService.local.filter(function(t){return t.id===e.extension.id});n.length&&n[0].type===y.LocalExtensionType.User?this.enabled=!0:this.enabled=!1}else this.enabled=!1},t.prototype.run=function(){return this.extensionsWorkbenchService.uninstall(this.extension)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.UninstallLabel=i.localize(5,null),t.UninstallingLabel=i.localize(6,null),t.UninstallClass="extension-action uninstall",t.UnInstallingClass="extension-action uninstall uninstalling",t=a([l(0,v.IExtensionsWorkbenchService)],t)}(s.Action);t.UninstallAction=J;var ee=function(e){function t(t,n){var i=e.call(this,"extensions.combinedInstall","","",!1)||this;return i.disposables=[],i.installAction=n.extensionManagementServers.length>1?t.createInstance(oe,!1):t.createInstance(Z),
i.uninstallAction=n.extensionManagementServers.length>1?t.createInstance(le):t.createInstance(J),i.disposables.push(i.installAction,i.uninstallAction),i.installAction.onDidChange(i.update,i,i.disposables),i.uninstallAction.onDidChange(i.update,i,i.disposables),i.update(),i}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.installAction.extension=e,this.uninstallAction.extension=e},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.extension&&this.extension.type!==y.LocalExtensionType.System?this.installAction.enabled?(this.enabled=!0,this.label=this.installAction.label,this.class=this.installAction.class,this.tooltip=this.installAction.tooltip):this.uninstallAction.enabled?(this.enabled=!0,this.label=this.uninstallAction.label,this.class=this.uninstallAction.class,this.tooltip=this.uninstallAction.tooltip):this.extension.state===v.ExtensionState.Installing?(this.enabled=!1,
this.label=this.installAction.label,this.class=this.installAction.class,this.tooltip=this.installAction.tooltip):this.extension.state===v.ExtensionState.Uninstalling?(this.enabled=!1,this.label=this.uninstallAction.label,this.class=this.uninstallAction.class,this.tooltip=this.uninstallAction.tooltip):(this.enabled=!1,this.label=this.installAction.label,this.class=this.installAction.class,this.tooltip=this.installAction.tooltip):(this.enabled=!1,this.class=t.NoExtensionClass)},t.prototype.run=function(){return this.installAction.enabled?this.installAction.run():this.uninstallAction.enabled?this.uninstallAction.run():o.TPromise.as(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.NoExtensionClass="extension-action prominent install no-extension",t=a([l(0,S.IInstantiationService),l(1,y.IExtensionManagementServerService)],t)}(s.Action);t.CombinedInstallAction=ee;var te=function(e){function t(n,i,r,o){
var s=e.call(this,"extensions.update","",t.DisabledClass,!1)||this;return s.extensionsWorkbenchService=n,s.instantiationService=i,s.notificationService=r,s.openerService=o,s.disposables=[],s.disposables.push(s.extensionsWorkbenchService.onChange(function(){return s.update()})),s.update(),s}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){if(!this.extension)return this.enabled=!1,this.class=t.DisabledClass,void(this.label=this.getUpdateLabel());if(this.extension.type!==y.LocalExtensionType.User)return this.enabled=!1,this.class=t.DisabledClass,void(this.label=this.getUpdateLabel());var e=this.extensionsWorkbenchService.canInstall(this.extension),n=this.extension.state===v.ExtensionState.Installed;this.enabled=e&&n&&this.extension.outdated,this.class=this.enabled?t.EnabledClass:t.DisabledClass,
this.label=this.extension.outdated?this.getUpdateLabel(this.extension.latestVersion):this.getUpdateLabel()},t.prototype.run=function(){return this.install(this.extension)},t.prototype.install=function(e){var t=this;return this.extensionsWorkbenchService.install(e).then(null,function(n){if(!e.gallery)return t.notificationService.error(n);console.error(n),X(e.gallery,i.localize(7,null,e.id),t.instantiationService,t.notificationService,t.openerService)})},t.prototype.getUpdateLabel=function(e){return e?i.localize(8,null,e):i.localize(9,null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.EnabledClass="extension-action prominent update",t.DisabledClass=t.EnabledClass+" disabled",t=a([l(0,v.IExtensionsWorkbenchService),l(1,S.IInstantiationService),l(2,V.INotificationService),l(3,z.IOpenerService)],t)}(s.Action);t.UpdateAction=te;var ne=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,null,!1)||this;return a.notificationService=r,
a.instantiationService=o,a.openerService=s,a._server=i,a}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.enabled=!!this._extension},enumerable:!0,configurable:!0}),t.prototype.run=function(){var e=this;return this.extension?this._server.extensionManagementService.installFromGallery(this.extension).then(function(){return null},function(t){console.error(t),X(e.extension,i.localize(10,null,e.extension.identifier.id),e.instantiationService,e.notificationService,e.openerService)}):o.TPromise.as(null)},t=a([l(3,V.INotificationService),l(4,S.IInstantiationService),l(5,z.IOpenerService)],t)}(s.Action);t.InstallGalleryExtensionAction=ne;var ie=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!1)||this;return r._server=i,r}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.enabled=!!this._extension},enumerable:!0,configurable:!0}),
t.prototype.run=function(){return this.extension?this._server.extensionManagementService.uninstall(this.extension):o.TPromise.as(null)},t}(s.Action);t.UninstallExtensionAction=ie;var re=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,null,!1)||this;return a.notificationService=r,a.instantiationService=o,a.openerService=s,a.server=i,a}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return{local:this.local,gallery:this.gallery}},set:function(e){this.local=e?e.local:null,this.gallery=e?e.gallery:null,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.enabled=this.local&&this.gallery&&this.local.type===y.LocalExtensionType.User&&r.gt(this.gallery.version,this.local.manifest.version),this.label=this.enabled?i.localize(11,null,this.gallery.version,this.server.location.authority):i.localize(12,null,this.server.location.authority)},t.prototype.run=function(){var e=this
;return this.gallery?this.server.extensionManagementService.installFromGallery(this.gallery).then(function(){return null},function(t){console.error(t),X(e.gallery,i.localize(13,null,e.gallery.identifier.id),e.instantiationService,e.notificationService,e.openerService)}):o.TPromise.as(null)},t=a([l(3,V.INotificationService),l(4,S.IInstantiationService),l(5,z.IOpenerService)],t)}(s.Action);t.UpdateGalleryExtensionAction=re;var oe=function(e){function t(n,r,o,s,a){var c,l=e.call(this,t.ID,t.InstallLabel,t.Class,!1)||this;return l.extensionManagementServerService=r,l.instantiationService=o,l.extensionsWorkbenchService=s,l.contextService=a,l.actions=[],l.disposables=[],l.disableWhenInstalled=n,l.actions=l.extensionManagementServerService.extensionManagementServers.map(function(e){return l.instantiationService.createInstance(ne,"extensions.install."+e.location.authority,i.localize(16,null,e.location.authority),e)}),l._actionItem=l.instantiationService.createInstance(ue,l,[l.actions]),
(c=l.disposables).push.apply(c,[l._actionItem].concat(l.actions)),l.disposables.push(l.extensionsWorkbenchService.onChange(function(){l.extension&&(l.extension=l.extensionsWorkbenchService.local.filter(function(e){return b.areSameExtensions({id:e.id},{id:l.extension.id})})[0]||l.extension)})),l.update(),l}return n(t,e),Object.defineProperty(t.prototype,"actionItem",{get:function(){return this._actionItem},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){var e=this;if(!this.extension||this.extension.type===y.LocalExtensionType.System)return this.enabled=!1,this.class=t.Class,void(this.label=t.InstallLabel);this.extension.state===v.ExtensionState.Installing?(this.label=t.InstallingLabel,this.class=t.InstallingClass,this.tooltip=t.InstallingLabel):(this.label=t.InstallLabel,this.class=t.Class,this.tooltip=t.InstallLabel)
;if(this.extension.locals.length>0&&this.disableWhenInstalled)this.enabled=!1;else{var n=!1;this.actions.forEach(function(t,r){var o=e.extensionManagementServerService.extensionManagementServers[r];t.extension=e.extension.gallery,t.label=i.localize(17,null,o.location.authority),t.enabled=e.extension.gallery&&!e.extension.locals.some(function(t){return e.extensionManagementServerService.getExtensionManagementServer(t.location)===o}),e.extension.recommendationSources&&e.extension.recommendationSources.length&&e.extension.recommendationSources.some(function(t){return Q(t,e.extensionManagementServerService,e.contextService)===o})&&(t.label=i.localize(18,null,o.location.authority),n=n||t.enabled)}),this.enabled=this.extensionsWorkbenchService.canInstall(this.extension)&&(n||0===this.extension.locals.length)}},t.prototype.run=function(){return this._actionItem.showMenu(),o.TPromise.wrap(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},
t.ID="extensions.multiserver.install",t.InstallLabel=i.localize(14,null),t.InstallingLabel=i.localize(15,null),t.Class="extension-action multiserver prominent install",t.InstallingClass="extension-action multiserver install installing",t=a([l(1,y.IExtensionManagementServerService),l(2,S.IInstantiationService),l(3,v.IExtensionsWorkbenchService),l(4,I.IWorkspaceContextService)],t)}(s.Action);t.MultiServerInstallAction=oe;var se=function(e){function t(t){var n=e.call(this,"",[])||this;return n.disposables=[],n.action=t.createInstance(oe,!1),n.disposables.push(n.action),n.entries=n.action.actions,n.disposables.push(n.onDidChange(function(){return n.update()})),n.update(),n}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.action.extension=e},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.label=this.action.label,this.enabled=this.action.enabled},t.prototype.dispose=function(){e.prototype.dispose.call(this),
this.disposables=g.dispose(this.disposables)},t=a([l(0,S.IInstantiationService)],t)}(Y.ContextSubMenu);t.MultiServerInstallSubMenuAction=se;var ae=function(e){function t(t){var n=e.call(this,"",[])||this;return n.disposables=[],n.action=t.createInstance(le),n.disposables.push(n.action),n.entries=n.action.actions,n.disposables.push(n.onDidChange(function(){return n.update()})),n.update(),n}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.action.extension=e},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.label=this.action.label,this.enabled=this.action.enabled},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t=a([l(0,S.IInstantiationService)],t)}(Y.ContextSubMenu);t.MultiServerUnInstallSubMenuAction=ae;var ce=function(e){function t(n,r,o){var s,a=e.call(this,t.ID,i.localize(19,null),t.Class,!1)||this;return a.extensionManagementServerService=n,
a.instantiationService=r,a.extensionsWorkbenchService=o,a._updateActions=[],a.disposables=[],a._updateActions=a.extensionManagementServerService.extensionManagementServers.map(function(e){return a.instantiationService.createInstance(re,"extensions.update."+e.location.authority,i.localize(20,null,e.location.authority),e)}),a._actionItem=a.instantiationService.createInstance(ue,a,[a._updateActions]),a.disposables.push(a._actionItem),(s=a.disposables).push.apply(s,a._updateActions),a.disposables.push(a.extensionsWorkbenchService.onChange(function(){return a.update()})),a.update(),a}return n(t,e),Object.defineProperty(t.prototype,"actionItem",{get:function(){return this._actionItem},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){var e=this;this._updateActions.forEach(function(t,n){if(t.extension=null,
e.extension&&e.extension.locals&&e.extension.gallery){var i=e.extensionManagementServerService.extensionManagementServers[n],r=e.extension.locals.filter(function(t){return e.extensionManagementServerService.getExtensionManagementServer(t.location)===i})[0];t.extension={local:r,gallery:e.extension.gallery}}}),this.enabled=this._updateActions.some(function(e){return e.enabled})},t.prototype.run=function(){return this._actionItem.showMenu(),o.TPromise.wrap(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.multiserver.update",t.Class="extension-action multiserver prominent update",t=a([l(0,y.IExtensionManagementServerService),l(1,S.IInstantiationService),l(2,v.IExtensionsWorkbenchService)],t)}(s.Action);t.MultiServerUpdateAction=ce;var le=function(e){function t(n,i,r){var o,s=e.call(this,t.ID,t.UninstallLabel,t.UninstallClass,!1)||this;return s.extensionManagementServerService=n,s.instantiationService=i,
s.extensionsWorkbenchService=r,s.actions=[],s.disposables=[],s.actions=s.extensionManagementServerService.extensionManagementServers.map(function(e){return s.instantiationService.createInstance(ie,"extensions.uninstall."+e.location.authority,e.location.authority,e)}),s._actionItem=s.instantiationService.createInstance(ue,s,[s.actions]),(o=s.disposables).push.apply(o,[s._actionItem].concat(s.actions)),s.disposables.push(s.extensionsWorkbenchService.onChange(function(){return s.extension=s.extension?s.extensionsWorkbenchService.local.filter(function(e){return b.areSameExtensions({id:e.id},{id:s.extension.id})})[0]:s.extension})),s.update(),s}return n(t,e),Object.defineProperty(t.prototype,"actionItem",{get:function(){return this._actionItem},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){var e=this;if(this.extension){
if(this.extension.state===v.ExtensionState.Uninstalling)return this.label=t.UninstallingLabel,this.class=t.UnInstallingClass,void(this.enabled=!1);this.label=t.UninstallLabel,this.class=t.UninstallClass;var n=this.extensionsWorkbenchService.local.filter(function(t){return t.id===e.extension.id});if(!n.length)return void(this.enabled=!1);if(n[0].type!==y.LocalExtensionType.User)return void(this.enabled=!1);this.enabled=!0,this.actions.forEach(function(t,n){var i=e.extensionManagementServerService.extensionManagementServers[n];t.extension=e.extension.locals.filter(function(t){return e.extensionManagementServerService.getExtensionManagementServer(t.location)===i})[0]})}else this.enabled=!1},t.prototype.run=function(){return this._actionItem.showMenu(),o.TPromise.wrap(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.multiserver.uninstall",t.UninstallLabel=i.localize(21,null),t.UninstallingLabel=i.localize(22,null),
t.UninstallClass="extension-action uninstall",t.UnInstallingClass="extension-action uninstall uninstalling",t=a([l(0,y.IExtensionManagementServerService),l(1,S.IInstantiationService),l(2,v.IExtensionsWorkbenchService)],t)}(s.Action);t.MultiServerUninstallAction=le;var ue=function(e){function t(t,n,i){var r=e.call(this,null,t,{icon:!0,label:!0})||this;return r.contextMenuService=i,r.disposables=[],r.menuActionGroups=n,r}return n(t,e),Object.defineProperty(t.prototype,"menuActionGroups",{get:function(){return this._menuActionGroups},set:function(e){this._menuActionGroups=e},enumerable:!0,configurable:!0}),t.prototype.showMenu=function(){var e=this.getActions(),t=u.getDomNodePagePosition(this.builder.getHTMLElement()),n={x:t.left,y:t.top+t.height+10};this.contextMenuService.showContextMenu({getAnchor:function(){return n},getActions:function(){return o.TPromise.wrap(e)},actionRunner:this.actionRunner})},t.prototype.getActions=function(){for(var e=[],t=0,n=this.menuActionGroups;t<n.length;t++){var i=n[t]
;e=e.concat(i,[new p.Separator])}return e.length?e.slice(0,e.length-1):e},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t=a([l(2,f.IContextMenuService)],t)}(p.ActionItem);t.DropDownMenuActionItem=ue;var de=function(e){function t(n,i,r){var o=e.call(this,t.ID)||this;return o.extensionsWorkbenchService=n,o.instantiationService=i,o.extensionManagmentServerService=r,o.disposables=[],o._actionItem=o.instantiationService.createInstance(ue,o,o.createMenuActionGroups()),o.disposables.push(o._actionItem),o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o.update(),o}return n(t,e),Object.defineProperty(t.prototype,"actionItem",{get:function(){return this._actionItem},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.createMenuActionGroups=function(){var e=[]
;return e.push([this.instantiationService.createInstance(pe,pe.LABEL),this.instantiationService.createInstance(he,he.LABEL)]),e.push([this.instantiationService.createInstance(ve,ve.LABEL),this.instantiationService.createInstance(ge,ge.LABEL)]),this.extensionManagmentServerService.extensionManagementServers.length>1?(e.push([this.instantiationService.createInstance(se)]),e.push([this.instantiationService.createInstance(ae)])):e.push([this.instantiationService.createInstance(J)]),e},t.prototype.update=function(){if(this.class=t.HideManageExtensionClass,this.tooltip="",this.enabled=!1,this.extension){var e=this.extension.state;this.enabled=e===v.ExtensionState.Installed,this.class=this.enabled||e===v.ExtensionState.Uninstalling?t.Class:t.HideManageExtensionClass,this.tooltip=e===v.ExtensionState.Uninstalling?i.localize(23,null):""}for(var n=this.createMenuActionGroups(),r=0,o=n;r<o.length;r++)for(var s=0,a=o[r];s<a.length;s++){a[s].extension=this.extension}this._actionItem.menuActionGroups=n},
t.prototype.run=function(){return this._actionItem.showMenu(),o.TPromise.wrap(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.manage",t.Class="extension-action manage",t.HideManageExtensionClass=t.Class+" hide",t=a([l(0,v.IExtensionsWorkbenchService),l(1,S.IInstantiationService),l(2,y.IExtensionManagementServerService)],t)}(s.Action);t.ManageExtensionAction=de;var he=function(e){function t(n,i,r,o){var s=e.call(this,t.ID,n)||this;return s.workspaceContextService=i,s.extensionsWorkbenchService=r,s.extensionEnablementService=o,s.disposables=[],s.disposables.push(s.extensionsWorkbenchService.onChange(function(){return s.update()})),s.disposables.push(s.workspaceContextService.onDidChangeWorkbenchState(function(){return s.update()})),s.update(),s}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),
t.prototype.update=function(){this.enabled=!1,this.extension&&(this.enabled=(this.extension.enablementState===y.EnablementState.Disabled||this.extension.enablementState===y.EnablementState.WorkspaceDisabled)&&this.extension.local&&this.extensionEnablementService.canChangeEnablement(this.extension.local))},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extension,y.EnablementState.WorkspaceEnabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.enableForWorkspace",t.LABEL=i.localize(24,null),t=a([l(1,I.IWorkspaceContextService),l(2,v.IExtensionsWorkbenchService),l(3,y.IExtensionEnablementService)],t)}(s.Action);t.EnableForWorkspaceAction=he;var pe=function(e){function t(n,i,r){var o=e.call(this,t.ID,n)||this;return o.extensionsWorkbenchService=i,o.extensionEnablementService=r,o.disposables=[],o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o.update(),o}
return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.enabled=!1,this.extension&&(this.enabled=(this.extension.enablementState===y.EnablementState.Disabled||this.extension.enablementState===y.EnablementState.WorkspaceDisabled)&&this.extension.local&&this.extensionEnablementService.canChangeEnablement(this.extension.local))},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extension,y.EnablementState.Enabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.enableGlobally",t.LABEL=i.localize(25,null),t=a([l(1,v.IExtensionsWorkbenchService),l(2,y.IExtensionEnablementService)],t)}(s.Action);t.EnableGloballyAction=pe;var fe=function(e){function t(n,r){var o=e.call(this,t.ID,i.localize(26,null),t.DisabledClass,!1)||this
;return o.instantiationService=n,o.extensionsWorkbenchService=r,o.disposables=[],o._enableActions=[n.createInstance(pe,pe.LABEL),n.createInstance(he,he.LABEL)],o._actionItem=o.instantiationService.createInstance(ue,o,[o._enableActions]),o.disposables.push(o._actionItem),o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o.update(),o}return n(t,e),Object.defineProperty(t.prototype,"actionItem",{get:function(){return this._actionItem},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){for(var e=0,n=this._actionItem.menuActionGroups;e<n.length;e++)for(var i=0,r=n[e];i<r.length;i++){r[i].extension=this.extension}if(!this.extension)return this.enabled=!1,void(this.class=t.DisabledClass);this.enabled=this.extension.state===v.ExtensionState.Installed&&this._enableActions.some(function(e){return e.enabled
}),this.class=this.enabled?t.EnabledClass:t.DisabledClass},t.prototype.run=function(){return this._actionItem.showMenu(),o.TPromise.wrap(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.enable",t.EnabledClass="extension-action prominent enable",t.DisabledClass=t.EnabledClass+" disabled",t=a([l(0,S.IInstantiationService),l(1,v.IExtensionsWorkbenchService)],t)}(s.Action);t.EnableAction=fe;var ge=function(e){function t(n,i,r,o){var s=e.call(this,t.ID,n)||this;return s.workspaceContextService=i,s.extensionsWorkbenchService=r,s.extensionEnablementService=o,s.disposables=[],s.disposables.push(s.extensionsWorkbenchService.onChange(function(){return s.update()})),s.update(),s.workspaceContextService.onDidChangeWorkbenchState(function(){return s.update()},s,s.disposables),s}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,
configurable:!0}),t.prototype.update=function(){this.enabled=!1,this.extension&&this.workspaceContextService.getWorkbenchState()!==I.WorkbenchState.EMPTY&&(this.enabled=(this.extension.enablementState===y.EnablementState.Enabled||this.extension.enablementState===y.EnablementState.WorkspaceEnabled)&&this.extension.local&&this.extensionEnablementService.canChangeEnablement(this.extension.local))},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extension,y.EnablementState.WorkspaceDisabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.disableForWorkspace",t.LABEL=i.localize(27,null),t=a([l(1,I.IWorkspaceContextService),l(2,v.IExtensionsWorkbenchService),l(3,y.IExtensionEnablementService)],t)}(s.Action);t.DisableForWorkspaceAction=ge;var ve=function(e){function t(n,i,r){var o=e.call(this,t.ID,n)||this;return o.extensionsWorkbenchService=i,o.extensionEnablementService=r,o.disposables=[],
o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o.update(),o}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.enabled=!1,this.extension&&(this.enabled=(this.extension.enablementState===y.EnablementState.Enabled||this.extension.enablementState===y.EnablementState.WorkspaceEnabled)&&this.extension.local&&this.extensionEnablementService.canChangeEnablement(this.extension.local))},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extension,y.EnablementState.Disabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.disableGlobally",t.LABEL=i.localize(28,null),t=a([l(1,v.IExtensionsWorkbenchService),l(2,y.IExtensionEnablementService)],t)}(s.Action);t.DisableGloballyAction=ve;var me=function(e){
function t(n,r){var o=e.call(this,t.ID,i.localize(29,null),t.DisabledClass,!1)||this;return o.instantiationService=n,o.extensionsWorkbenchService=r,o.disposables=[],o._disableActions=[n.createInstance(ve,ve.LABEL),n.createInstance(ge,ge.LABEL)],o._actionItem=o.instantiationService.createInstance(ue,o,[o._disableActions]),o.disposables.push(o._actionItem),o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o.update(),o}return n(t,e),Object.defineProperty(t.prototype,"actionItem",{get:function(){return this._actionItem},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){for(var e=0,n=this._actionItem.menuActionGroups;e<n.length;e++)for(var i=0,r=n[e];i<r.length;i++){r[i].extension=this.extension}if(!this.extension)return this.enabled=!1,void(this.class=t.DisabledClass)
;this.enabled=this.extension.state===v.ExtensionState.Installed&&this._disableActions.some(function(e){return e.enabled}),this.class=this.enabled?t.EnabledClass:t.DisabledClass},t.prototype.run=function(){return this._actionItem.showMenu(),o.TPromise.wrap(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.disable",t.EnabledClass="extension-action disable",t.DisabledClass=t.EnabledClass+" disabled",t=a([l(0,S.IInstantiationService),l(1,v.IExtensionsWorkbenchService)],t)}(s.Action);t.DisableAction=me;var ye=function(e){function t(t,n,i){void 0===t&&(t=Ce.ID),void 0===n&&(n=Ce.LABEL);var r=e.call(this,t,n,"",!0)||this;return r.extensionsWorkbenchService=i,r}return n(t,e),t.prototype.run=function(){return this.extensionsWorkbenchService.checkForUpdates()},t.ID="workbench.extensions.action.checkForUpdates",t.LABEL=i.localize(30,null),t=a([l(2,v.IExtensionsWorkbenchService)],t)}(s.Action);t.CheckForUpdatesAction=ye;var be=function(e){
function t(t,n,i,r){var o=e.call(this,t,n,"",!0)||this;return o.autoUpdateValue=i,o.configurationService=r,o.updateEnablement(),r.onDidChangeConfiguration(function(){return o.updateEnablement()}),o}return n(t,e),t.prototype.updateEnablement=function(){this.enabled=this.configurationService.getValue(v.AutoUpdateConfigurationKey)!==this.autoUpdateValue},t.prototype.run=function(){return this.configurationService.updateValue(v.AutoUpdateConfigurationKey,this.autoUpdateValue)},t=a([l(3,A.IConfigurationService)],t)}(s.Action);t.ToggleAutoUpdateAction=be;var Se=function(e){function t(n,i,r){return void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL),e.call(this,n,i,!0,r)||this}return n(t,e),t.ID="workbench.extensions.action.enableAutoUpdate",t.LABEL=i.localize(31,null),t=a([l(2,A.IConfigurationService)],t)}(be);t.EnableAutoUpdateAction=Se;var _e=function(e){function t(t,n,i){return void 0===t&&(t=Se.ID),void 0===n&&(n=Se.LABEL),e.call(this,t,n,!1,i)||this}return n(t,e),t.ID="workbench.extensions.action.disableAutoUpdate",
t.LABEL=i.localize(32,null),t=a([l(2,A.IConfigurationService)],t)}(be);t.DisableAutoUpdateAction=_e;var Ce=function(e){function t(n,i,r,o,s,a){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var c=e.call(this,n,i,"",!1)||this;return c.extensionsWorkbenchService=r,c.notificationService=o,c.instantiationService=s,c.openerService=a,c.disposables=[],c.disposables.push(c.extensionsWorkbenchService.onChange(function(){return c.update()})),c.update(),c}return n(t,e),Object.defineProperty(t.prototype,"outdated",{get:function(){return this.extensionsWorkbenchService.local.filter(function(e){return e.outdated&&e.state!==v.ExtensionState.Installing})},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.enabled=this.outdated.length>0},t.prototype.run=function(){var e=this;return o.TPromise.join(this.outdated.map(function(t){return e.install(t)}))},t.prototype.install=function(e){var t=this;return this.extensionsWorkbenchService.install(e).then(null,function(n){
if(!e.gallery)return t.notificationService.error(n);console.error(n),X(e.gallery,i.localize(34,null,e.id),t.instantiationService,t.notificationService,t.openerService)})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="workbench.extensions.action.updateAllExtensions",t.LABEL=i.localize(33,null),t=a([l(2,v.IExtensionsWorkbenchService),l(3,V.INotificationService),l(4,S.IInstantiationService),l(5,z.IOpenerService)],t)}(s.Action);t.UpdateAllAction=Ce;var Ee=function(e){function t(n,r,o,s,a){var l=e.call(this,"extensions.reload",i.localize(35,null),t.DisabledClass,!1)||this;return l.extensionsWorkbenchService=n,l.windowService=r,l.extensionService=o,l.extensionEnablementService=s,l.extensionManagementServerService=a,l.disposables=[],l.reloadMessage="",l.throttler=new c.Throttler,l.disposables.push(l.extensionsWorkbenchService.onChange(function(){return l.update()})),l.update(),l}return n(t,e),Object.defineProperty(t.prototype,"extension",{
get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){var e=this;this.throttler.queue(function(){if(e.enabled=!1,e.tooltip="",e.reloadMessage="",!e.extension)return o.TPromise.wrap(null);var t=e.extension.state;return t===v.ExtensionState.Installing||t===v.ExtensionState.Uninstalling?o.TPromise.wrap(null):e.extensionService.getExtensions().then(function(t){return e.computeReloadState(t)})}).done(function(){e.class=e.enabled?t.EnabledClass:t.DisabledClass})},t.prototype.computeReloadState=function(e){var t=this,n=this.extensionsWorkbenchService.local.filter(function(e){return e.id===t.extension.id})[0],r=this.extension.state===v.ExtensionState.Uninstalled,o=!!this.extension.local&&!this.extensionEnablementService.isEnabled(this.extension.local),s=e.filter(function(e){return b.areSameExtensions(e,t.extension)})[0];if(n&&n.local){if(s){
var a=this.extensionManagementServerService.getExtensionManagementServer(s.extensionLocation),c=this.extensionManagementServerService.getExtensionManagementServer(n.local.location);if(a.location.toString()===c.location.toString()){if(this.extension.version!==s.version&&!o)return this.enabled=!0,this.tooltip=i.localize(36,null),void(this.reloadMessage=i.localize(37,null,this.extension.displayName));if(o)return this.enabled=!0,this.tooltip=i.localize(38,null),void(this.reloadMessage=i.localize(39,null,this.extension.displayName))}return}if(!o)return this.enabled=!0,this.tooltip=i.localize(40,null),void(this.reloadMessage=i.localize(41,null,this.extension.displayName))}else if(r&&s)return this.enabled=!0,this.tooltip=i.localize(42,null),void(this.reloadMessage=i.localize(43,null,this.extension.displayName))},t.prototype.run=function(){return this.windowService.reloadWindow()},t.EnabledClass="extension-action reload",t.DisabledClass=t.EnabledClass+" disabled",
t=a([l(0,v.IExtensionsWorkbenchService),l(1,T.IWindowService),l(2,x.IExtensionService),l(3,y.IExtensionEnablementService),l(4,y.IExtensionManagementServerService)],t)}(s.Action);t.ReloadAction=Ee;var we=function(e){function t(t,n,i,r){return e.call(this,t,n,v.VIEWLET_ID,i,r)||this}return n(t,e),t.ID=v.VIEWLET_ID,t.LABEL=i.localize(44,null),t=a([l(2,C.IViewletService),l(3,j.IEditorGroupsService)],t)}(_.ToggleViewletAction);t.OpenExtensionsViewletAction=we;var Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.ID="workbench.extensions.action.installExtensions",t.LABEL=i.localize(45,null),t}(we);t.InstallExtensionsAction=Ie;var Te=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@enabled "),e.focus()})},t.ID="workbench.extensions.action.showEnabledExtensions",
t.LABEL=i.localize(46,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowEnabledExtensionsAction=Te;var xe=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@installed "),e.focus()})},t.ID="workbench.extensions.action.showInstalledExtensions",t.LABEL=i.localize(47,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowInstalledExtensionsAction=xe;var ke=function(e){function t(t,n,i){var r=e.call(this,t,n,"null",!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@disabled "),e.focus()})},t.ID="workbench.extensions.action.showDisabledExtensions",t.LABEL=i.localize(48,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowDisabledExtensionsAction=ke;var De=function(e){
function t(t,n,i,r){var o=e.call(this,t,n,"clear-extensions",!0)||this;return o.viewletService=r,o.disposables=[],o.enabled=!1,i(o.onSearchChange,o,o.disposables),o}return n(t,e),t.prototype.onSearchChange=function(e){this.enabled=!!e},t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search(""),e.focus()})},t.prototype.dispose=function(){this.disposables=g.dispose(this.disposables)},t.ID="workbench.extensions.action.clearExtensionsInput",t.LABEL=i.localize(49,null),t=a([l(3,C.IViewletService)],t)}(s.Action);t.ClearExtensionsInputAction=De;var Ae=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@builtin "),e.focus()})},t.ID="workbench.extensions.action.listBuiltInExtensions",t.LABEL=i.localize(50,null),t=a([l(2,C.IViewletService)],t)
}(s.Action);t.ShowBuiltInExtensionsAction=Ae;var Le=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@outdated "),e.focus()})},t.ID="workbench.extensions.action.listOutdatedExtensions",t.LABEL=i.localize(51,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowOutdatedExtensionsAction=Le;var Re=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@sort:installs "),e.focus()})},t.ID="workbench.extensions.action.showPopularExtensions",t.LABEL=i.localize(52,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowPopularExtensionsAction=Re;var Oe=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this
;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@recommended "),e.focus()})},t.ID="workbench.extensions.action.showRecommendedExtensions",t.LABEL=i.localize(53,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowRecommendedExtensionsAction=Oe;var Me=function(e){function t(n,i,r,o,s,a,c,l,u,d){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var h=e.call(this,n,i,"extension-action")||this;return h.contextService=o,h.viewletService=s,h.notificationService=a,h.instantiationService=c,h.openerService=l,h.extensionManagementServerService=u,h.extensionGalleryService=d,h.disposables=[],h._recommendations=[],h.recommendations=r,h}return n(t,e),Object.defineProperty(t.prototype,"recommendations",{get:function(){return this._recommendations},set:function(e){this._recommendations=e,this.enabled=this._recommendations.length>0},enumerable:!0,configurable:!0}),t.prototype.run=function(){
var e=this;return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(t){if(t.search("@recommended "),t.focus(),0===e.recommendations.length)return e.notificationService.info(i.localize(55,null)),o.TPromise.as(null);var n=e.recommendations.map(function(e){return e.extensionId});return e.extensionGalleryService.query({names:n,source:"install-all-workspace-recommendations"}).then(function(t){for(var n=[],i=new N.PagedModel(t),r=0;r<t.total;r++)n.push(i.resolve(r).then(function(t){return e.install(t)}));return o.TPromise.join(n)})})},t.prototype.install=function(e){var t=this,n=[],r=this.recommendations.filter(function(t){return b.areSameExtensions({id:t.extensionId},e.identifier)})[0];if(r)for(var s=0,a=r.sources||[];s<a.length;s++){var c=Q(a[s],this.extensionManagementServerService,this.contextService);-1===n.indexOf(c)&&n.push(c)}return n.length||n.push(this.extensionManagementServerService.getDefaultExtensionManagementServer()),o.TPromise.join(n.map(function(n){
return n.extensionManagementService.installFromGallery(e).then(null,function(n){console.error(n),X(e,i.localize(56,null,e.identifier.id),t.instantiationService,t.notificationService,t.openerService)})})).then(function(){return null})},t.prototype.dispose=function(){this.disposables=g.dispose(this.disposables),e.prototype.dispose.call(this)},t.ID="workbench.extensions.action.installWorkspaceRecommendedExtensions",t.LABEL=i.localize(54,null),t=a([l(3,I.IWorkspaceContextService),l(4,C.IViewletService),l(5,V.INotificationService),l(6,S.IInstantiationService),l(7,z.IOpenerService),l(8,y.IExtensionManagementServerService),l(9,y.IExtensionGalleryService)],t)}(s.Action);t.InstallWorkspaceRecommendedExtensionsAction=Me;var Pe=function(e){function t(n,i,r,o,s,a,c){var l=e.call(this,t.ID,t.LABEL,i,o,s,a)||this;return l.viewletService=r,l.extensionGalleryService=c,l.extensionId=n,l}return n(t,e),t.prototype.run=function(){var t=this;return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e
}).then(function(n){return n.search("@recommended "),n.focus(),t.extensionGalleryService.query({names:[t.extensionId],source:"install-recommendation",pageSize:1}).then(function(n){return n&&n.firstPage&&n.firstPage.length&&(t.extension=n.firstPage[0]),e.prototype.run.call(t)})})},t.ID="workbench.extensions.action.installRecommendedExtension",t.LABEL=i.localize(57,null),t=a([l(2,C.IViewletService),l(3,V.INotificationService),l(4,S.IInstantiationService),l(5,z.IOpenerService),l(6,y.IExtensionGalleryService)],t)}(ne);t.InstallRecommendedExtensionAction=Pe;var Ne=function(e){function t(n){var r=e.call(this,t.ID,"Ignore Recommendation")||this;return r.extensionsTipsService=n,r.disposables=[],r.class=t.Class,r.tooltip=i.localize(58,null),r.enabled=!0,r}return n(t,e),t.prototype.run=function(){return this.extensionsTipsService.toggleIgnoredRecommendation(this.extension.id,!0),o.TPromise.as(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},
t.ID="extensions.ignore",t.Class="extension-action ignore",t=a([l(0,y.IExtensionTipsService)],t)}(s.Action);t.IgnoreExtensionRecommendationAction=Ne;var Fe=function(e){function t(n){var r=e.call(this,t.ID,"Undo")||this;return r.extensionsTipsService=n,r.disposables=[],r.class=t.Class,r.tooltip=i.localize(59,null),r.enabled=!0,r}return n(t,e),t.prototype.run=function(){return this.extensionsTipsService.toggleIgnoredRecommendation(this.extension.id,!1),o.TPromise.as(null)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="extensions.ignore",t.Class="extension-action undo-ignore",t=a([l(0,y.IExtensionTipsService)],t)}(s.Action);t.UndoIgnoreExtensionRecommendationAction=Fe;var We=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@recommended:keymaps "),
e.focus()})},t.ID="workbench.extensions.action.showRecommendedKeymapExtensions",t.SHORT_LABEL=i.localize(60,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowRecommendedKeymapExtensionsAction=We;var Be=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@sort:installs category:languages "),e.focus()})},t.ID="workbench.extensions.action.showLanguageExtensions",t.SHORT_LABEL=i.localize(61,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowLanguageExtensionsAction=Be;var Ve=function(e){function t(t,n,i){var r=e.call(this,t,n,null,!0)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@sort:installs azure "),e.focus()})},t.ID="workbench.extensions.action.showAzureExtensions",
t.SHORT_LABEL=i.localize(62,null),t=a([l(2,C.IViewletService)],t)}(s.Action);t.ShowAzureExtensionsAction=Ve;var ze=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,null,!0)||this;if(s.sortBy=r,s.viewletService=o,s.disposables=[],void 0===r)throw new Error("bad arguments");return s.query=E.Query.parse(""),s.enabled=!1,i(s.onSearchChange,s,s.disposables),s}return n(t,e),t.prototype.onSearchChange=function(e){var t=E.Query.parse(e);this.query=new E.Query(t.value,this.sortBy||t.sortBy,t.groupBy),this.enabled=e&&this.query.isValid()&&!this.query.equals(t)},t.prototype.run=function(){var e=this;return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(t){t.search(e.query.toString()),t.focus()})},t=a([l(4,C.IViewletService)],t)}(s.Action);t.ChangeSortAction=ze;var He=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,null,!0)||this;if(s.groupBy=r,s.viewletService=o,s.disposables=[],void 0===r)throw new Error("bad arguments");return s.query=E.Query.parse(""),
i(s.onSearchChange,s,s.disposables),s.onSearchChange(""),s}return n(t,e),t.prototype.onSearchChange=function(e){var t=E.Query.parse(e);this.query=new E.Query(t.value,t.sortBy,this.groupBy||t.groupBy)},t.prototype.run=function(){var e=this;return this.viewletService.openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(t){t.search(e.query.toString()),t.focus()})},t=a([l(4,C.IViewletService)],t)}(s.Action);t.ChangeGroupAction=He;var Ke=function(e){function t(t,n,i){var r=e.call(this)||this;r.workspaceContextKey=new F.RawContextKey("workspaceRecommendations",!0),r.workspaceFolderContextKey=new F.RawContextKey("workspaceFolderRecommendations",!0),r.addToWorkspaceRecommendationsContextKey=new F.RawContextKey("addToWorkspaceRecommendations",!1),r.addToWorkspaceFolderRecommendationsContextKey=new F.RawContextKey("addToWorkspaceFolderRecommendations",!1);var o=r.workspaceContextKey.bindTo(t);o.set(n.getWorkbenchState()===I.WorkbenchState.WORKSPACE),r._register(n.onDidChangeWorkbenchState(function(){
return o.set(n.getWorkbenchState()===I.WorkbenchState.WORKSPACE)}));var s=r.workspaceFolderContextKey.bindTo(t);s.set(n.getWorkspace().folders.length>0),r._register(n.onDidChangeWorkspaceFolders(function(){return s.set(n.getWorkspace().folders.length>0)}));var a=r.addToWorkspaceRecommendationsContextKey.bindTo(t);a.set(i.activeEditor instanceof q.ExtensionsInput&&n.getWorkbenchState()===I.WorkbenchState.WORKSPACE),r._register(i.onDidActiveEditorChange(function(){return a.set(i.activeEditor instanceof q.ExtensionsInput&&n.getWorkbenchState()===I.WorkbenchState.WORKSPACE)})),r._register(n.onDidChangeWorkbenchState(function(){return a.set(i.activeEditor instanceof q.ExtensionsInput&&n.getWorkbenchState()===I.WorkbenchState.WORKSPACE)}));var c=r.addToWorkspaceFolderRecommendationsContextKey.bindTo(t);return c.set(i.activeEditor instanceof q.ExtensionsInput),r._register(i.onDidActiveEditorChange(function(){return c.set(i.activeEditor instanceof q.ExtensionsInput)})),r.registerCommands(),r}return n(t,e),
t.prototype.registerCommands=function(){D.CommandsRegistry.registerCommand(Ge.ID,function(e){e.get(S.IInstantiationService).createInstance(Ge,Ge.ID,Ge.LABEL).run()}),W.MenuRegistry.appendMenuItem(W.MenuId.CommandPalette,{command:{id:Ge.ID,title:y.ExtensionsLabel+": "+Ge.LABEL},when:this.workspaceContextKey}),D.CommandsRegistry.registerCommand(je.ID,function(e){e.get(S.IInstantiationService).createInstance(je,je.ID,je.LABEL).run()}),W.MenuRegistry.appendMenuItem(W.MenuId.CommandPalette,{command:{id:je.ID,title:y.ExtensionsLabel+": "+je.LABEL},when:this.workspaceFolderContextKey}),D.CommandsRegistry.registerCommand($e.ADD_ID,function(e){e.get(S.IInstantiationService).createInstance($e,$e.ADD_ID,$e.ADD_LABEL).run($e.ADD)}),W.MenuRegistry.appendMenuItem(W.MenuId.CommandPalette,{command:{id:$e.ADD_ID,title:y.ExtensionsLabel+": "+$e.ADD_LABEL},when:this.addToWorkspaceRecommendationsContextKey}),D.CommandsRegistry.registerCommand(qe.ADD_ID,function(e){
e.get(S.IInstantiationService).createInstance(qe,qe.ADD_ID,qe.ADD_LABEL).run($e.ADD)}),W.MenuRegistry.appendMenuItem(W.MenuId.CommandPalette,{command:{id:qe.ADD_ID,title:y.ExtensionsLabel+": "+qe.ADD_LABEL},when:this.addToWorkspaceFolderRecommendationsContextKey}),D.CommandsRegistry.registerCommand($e.IGNORE_ID,function(e){e.get(S.IInstantiationService).createInstance($e,$e.IGNORE_ID,$e.IGNORE_LABEL).run($e.IGNORE)}),W.MenuRegistry.appendMenuItem(W.MenuId.CommandPalette,{command:{id:$e.IGNORE_ID,title:y.ExtensionsLabel+": "+$e.IGNORE_LABEL},when:this.addToWorkspaceRecommendationsContextKey}),D.CommandsRegistry.registerCommand(qe.IGNORE_ID,function(e){e.get(S.IInstantiationService).createInstance(qe,qe.IGNORE_ID,qe.IGNORE_LABEL).run($e.IGNORE)}),W.MenuRegistry.appendMenuItem(W.MenuId.CommandPalette,{command:{id:qe.IGNORE_ID,title:y.ExtensionsLabel+": "+qe.IGNORE_LABEL},when:this.addToWorkspaceFolderRecommendationsContextKey})},
t=a([l(0,F.IContextKeyService),l(1,I.IWorkspaceContextService),l(2,G.IEditorService)],t)}(g.Disposable);t.ConfigureRecommendedExtensionsCommandsContributor=Ke;var Ue=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n,null)||this;return c.contextService=i,c.fileService=r,c.editorService=o,c.jsonEditingService=s,c.textModelResolverService=a,c}return n(t,e),t.prototype.openExtensionsFile=function(e){var t=this;return this.getOrCreateExtensionsFile(e).then(function(n){var i=n.created,r=n.content;return t.getSelectionPosition(r,e,["recommendations"]).then(function(n){return t.editorService.openEditor({resource:e,options:{forceOpen:!0,pinned:i,selection:n}})})},function(e){return o.TPromise.wrapError(new Error(i.localize(63,null,e)))})},t.prototype.openWorkspaceConfigurationFile=function(e){var t=this;return this.getOrUpdateWorkspaceConfigurationFile(e).then(function(e){return t.getSelectionPosition(e.value,e.resource,["extensions","recommendations"])}).then(function(n){return t.editorService.openEditor({
resource:e,options:{forceOpen:!0,selection:n}})})},t.prototype.addExtensionToWorkspaceConfig=function(e,t,n){var i=this;return this.getOrUpdateWorkspaceConfigurationFile(e).then(function(r){var s=t.toLowerCase(),a=(h.parse(r.value)||{}).extensions||{},c=n?a.recommendations||[]:a.unwantedRecommendations||[],l=n?a.unwantedRecommendations||[]:a.recommendations||[];return c.some(function(e){return e.toLowerCase()===s})?o.TPromise.as(null):(c.push(t),l=l.filter(function(e){return e.toLowerCase()!==s}),i.jsonEditingService.write(e,{key:"extensions",value:{recommendations:n?c:l,unwantedRecommendations:n?l:c}},!0))})},t.prototype.addExtensionToWorkspaceFolderConfig=function(e,t,n){var i=this;return this.getOrCreateExtensionsFile(e).then(function(r){var s=r.content,a=t.toLowerCase(),c=h.parse(s)||{},l=n?c.recommendations||[]:c.unwantedRecommendations||[],u=n?c.unwantedRecommendations||[]:c.recommendations||[];if(l.some(function(e){return e.toLowerCase()===a}))return o.TPromise.as(null);l.push(t)
;var d=o.TPromise.wrap(null);return u.some(function(e){return e.toLowerCase()===a})&&(u=u.filter(function(e){return e.toLowerCase()!==a}),d=i.jsonEditingService.write(e,{key:n?"unwantedRecommendations":"recommendations",value:u},!0)),d.then(function(){return i.jsonEditingService.write(e,{key:n?"recommendations":"unwantedRecommendations",value:l},!0)})})},t.prototype.getWorkspaceExtensionsConfigContent=function(e){return this.fileService.resolveContent(e).then(function(e){return(h.parse(e.value)||{}).extensions||{}},function(e){return{recommendations:[],unwantedRecommendations:[]}})},t.prototype.getWorkspaceFolderExtensionsConfigContent=function(e){return this.fileService.resolveContent(e).then(function(e){return h.parse(e.value)},function(e){return{recommendations:[],unwantedRecommendations:[]}})},t.prototype.getOrUpdateWorkspaceConfigurationFile=function(e){var t=this;return this.fileService.resolveContent(e).then(function(n){var i=h.parse(n.value).extensions
;return i&&i.recommendations?n:t.jsonEditingService.write(e,{key:"extensions",value:{recommendations:[]}},!0).then(function(){return t.fileService.resolveContent(e)})})},t.prototype.getSelectionPosition=function(e,t,n){var i=h.parseTree(e),r=h.findNodeAtLocation(i,n);if(r&&r.parent.children[1]){var s=r.parent.children[1],a=s.children&&s.children.length?s.children[s.children.length-1]:null,c=a?a.offset+a.length:s.offset+1;return this.textModelResolverService.createModelReference(t).then(function(e){var t=e.object.textEditorModel.getPositionAt(c);return e.dispose(),{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:t.lineNumber,endColumn:t.column}})}return o.TPromise.as(null)},t.prototype.getOrCreateExtensionsFile=function(e){var t=this;return this.fileService.resolveContent(e).then(function(t){return{created:!1,extensionsFileResource:e,content:t.value}},function(n){return t.fileService.updateContent(e,m.ExtensionsConfigurationInitialContent).then(function(){return{created:!0,
extensionsFileResource:e,content:m.ExtensionsConfigurationInitialContent}})})},t=a([l(2,I.IWorkspaceContextService),l(3,w.IFileService),l(4,G.IEditorService),l(5,M.IJSONEditingService),l(6,P.ITextModelService)],t)}(s.Action);t.AbstractConfigureRecommendedExtensionsAction=Ue;var Ge=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this,t,n,r,i,o,s,a)||this;return c.disposables=[],c.contextService.onDidChangeWorkbenchState(function(){return c.update()},c,c.disposables),c.update(),c}return n(t,e),t.prototype.update=function(){this.enabled=this.contextService.getWorkbenchState()!==I.WorkbenchState.EMPTY},t.prototype.run=function(){switch(this.contextService.getWorkbenchState()){case I.WorkbenchState.FOLDER:return this.openExtensionsFile(this.contextService.getWorkspace().folders[0].toResource(d.join(".vscode","extensions.json")));case I.WorkbenchState.WORKSPACE:return this.openWorkspaceConfigurationFile(this.contextService.getWorkspace().configuration)}return o.TPromise.as(null)},t.prototype.dispose=function(){
this.disposables=g.dispose(this.disposables),e.prototype.dispose.call(this)},t.ID="workbench.extensions.action.configureWorkspaceRecommendedExtensions",t.LABEL=i.localize(64,null),t=a([l(2,w.IFileService),l(3,I.IWorkspaceContextService),l(4,G.IEditorService),l(5,M.IJSONEditingService),l(6,P.ITextModelService)],t)}(Ue);t.ConfigureWorkspaceRecommendedExtensionsAction=Ge;var je=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,t,n,r,i,o,s,a)||this;return l.commandService=c,l.disposables=[],l.contextService.onDidChangeWorkspaceFolders(function(){return l.update()},l,l.disposables),l.update(),l}return n(t,e),t.prototype.update=function(){this.enabled=this.contextService.getWorkspace().folders.length>0},t.prototype.run=function(){var e=this;return(1===this.contextService.getWorkspace().folders.length?o.TPromise.as(this.contextService.getWorkspace().folders[0]):this.commandService.executeCommand(B.PICK_WORKSPACE_FOLDER_COMMAND_ID)).then(function(t){
return t?e.openExtensionsFile(t.toResource(d.join(".vscode","extensions.json"))):null})},t.prototype.dispose=function(){this.disposables=g.dispose(this.disposables),e.prototype.dispose.call(this)},t.ID="workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions",t.LABEL=i.localize(65,null),t=a([l(2,w.IFileService),l(3,I.IWorkspaceContextService),l(4,G.IEditorService),l(5,M.IJSONEditingService),l(6,P.ITextModelService),l(7,D.ICommandService)],t)}(Ue);t.ConfigureWorkspaceFolderRecommendedExtensionsAction=je;var qe=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,n,r,i,o,s,a)||this;return u.commandService=c,u.notificationService=l,u}return n(t,e),t.prototype.run=function(e){var t=this;if(!(this.editorService.activeEditor instanceof q.ExtensionsInput&&this.editorService.activeEditor.extension))return o.TPromise.as(null);var n=this.contextService.getWorkspace().folders;if(!n||!n.length)return this.notificationService.info(i.localize(68,null)),o.TPromise.as(null)
;var r=this.editorService.activeEditor.extension.id;return(1===n.length?o.TPromise.as(n[0]):this.commandService.executeCommand(B.PICK_WORKSPACE_FOLDER_COMMAND_ID)).then(function(n){if(!n)return o.TPromise.as(null);var s=n.toResource(d.join(".vscode","extensions.json"));return t.getWorkspaceFolderExtensionsConfigContent(s).then(function(n){var a=r.toLowerCase();return e?(n.recommendations||[]).some(function(e){return e.toLowerCase()===a})?(t.notificationService.info(i.localize(69,null)),o.TPromise.as(null)):t.addExtensionToWorkspaceFolderConfig(s,r,e).then(function(){t.notificationService.info(i.localize(70,null))},function(e){t.notificationService.error(i.localize(71,null,e))}):(n.unwantedRecommendations||[]).some(function(e){return e.toLowerCase()===a})?(t.notificationService.info(i.localize(72,null)),o.TPromise.as(null)):t.addExtensionToWorkspaceFolderConfig(s,r,e).then(function(){t.notificationService.info(i.localize(73,null))},function(e){t.notificationService.error(i.localize(74,null,e))})})})},t.ADD=!0,
t.IGNORE=!1,t.ADD_ID="workbench.extensions.action.addToWorkspaceFolderRecommendations",t.ADD_LABEL=i.localize(66,null),t.IGNORE_ID="workbench.extensions.action.addToWorkspaceFolderIgnoredRecommendations",t.IGNORE_LABEL=i.localize(67,null),t=a([l(2,w.IFileService),l(3,I.IWorkspaceContextService),l(4,G.IEditorService),l(5,M.IJSONEditingService),l(6,P.ITextModelService),l(7,D.ICommandService),l(8,V.INotificationService)],t)}(Ue);t.AddToWorkspaceFolderRecommendationsAction=qe;var $e=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,t,n,r,i,o,s,a)||this;return l.notificationService=c,l}return n(t,e),t.prototype.run=function(e){var t=this;if(!(this.editorService.activeEditor instanceof q.ExtensionsInput&&this.editorService.activeEditor.extension))return o.TPromise.as(null);var n=this.contextService.getWorkspace().configuration,r=this.editorService.activeEditor.extension.id;return this.getWorkspaceExtensionsConfigContent(n).then(function(s){var a=r.toLowerCase()
;return e?(s.recommendations||[]).some(function(e){return e.toLowerCase()===a})?(t.notificationService.info(i.localize(77,null)),o.TPromise.as(null)):t.addExtensionToWorkspaceConfig(n,r,e).then(function(){t.notificationService.info(i.localize(78,null))},function(e){t.notificationService.error(i.localize(79,null,e))}):(s.unwantedRecommendations||[]).some(function(e){return e.toLowerCase()===a})?(t.notificationService.info(i.localize(80,null)),o.TPromise.as(null)):t.addExtensionToWorkspaceConfig(n,r,e).then(function(){t.notificationService.info(i.localize(81,null))},function(e){t.notificationService.error(i.localize(82,null,e))})})},t.ADD=!0,t.IGNORE=!1,t.ADD_ID="workbench.extensions.action.addToWorkspaceRecommendations",t.ADD_LABEL=i.localize(75,null),t.IGNORE_ID="workbench.extensions.action.addToWorkspaceIgnoredRecommendations",t.IGNORE_LABEL=i.localize(76,null),
t=a([l(2,w.IFileService),l(3,I.IWorkspaceContextService),l(4,G.IEditorService),l(5,M.IJSONEditingService),l(6,P.ITextModelService),l(7,V.INotificationService)],t)}(Ue);t.AddToWorkspaceRecommendationsAction=$e;var Ye=function(e){function t(t){var n=this,r=i.localize(83,null),o=t?r:i.localize(84,null);return n=e.call(this,"extensions.install",o,"",!1)||this,n.tooltip=i.localize(85,null),n}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){this.extension&&this.extension.isMalicious?this.class=t.Class+" malicious":this.class=t.Class+" not-malicious"},t.prototype.run=function(){return o.TPromise.as(null)},t.Class="malicious-status",t}(s.Action);t.MaliciousStatusLabelAction=Ye;var Xe=function(e){function t(n,r){var o=e.call(this,"extensions.install",i.localize(86,null),t.Class+" hide",!1)||this;return o.extensionsWorkbenchService=n,o.extensionService=r,
o.disposables=[],o.throttler=new c.Throttler,o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o.update(),o}return n(t,e),Object.defineProperty(t.prototype,"extension",{get:function(){return this._extension},set:function(e){this._extension=e,this.update()},enumerable:!0,configurable:!0}),t.prototype.update=function(){var e=this;this.throttler.queue(function(){return e.extensionService.getExtensions().then(function(n){e.class=t.Class+" hide",e.tooltip="",!e.extension||e.extension.isMalicious||n.some(function(t){return t.id===e.extension.id})||e.extension.enablementState!==y.EnablementState.Disabled&&e.extension.enablementState!==y.EnablementState.WorkspaceDisabled||(e.class=""+t.Class,e.tooltip=e.extension.enablementState===y.EnablementState.Disabled?i.localize(87,null):i.localize(88,null))})})},t.prototype.run=function(){return o.TPromise.as(null)},t.Class="disable-status",t=a([l(0,v.IExtensionsWorkbenchService),l(1,x.IExtensionService)],t)}(s.Action)
;t.DisabledStatusLabelAction=Xe;var Qe=function(e){function t(n,i,r){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var o=e.call(this,n,i)||this;return o.extensionsWorkbenchService=r,o.disposables=[],o.update(),o.disposables.push(o.extensionsWorkbenchService.onChange(function(){return o.update()})),o}return n(t,e),t.prototype.update=function(){this.enabled=this.extensionsWorkbenchService.local.some(function(e){return e.type===y.LocalExtensionType.User&&(e.enablementState===y.EnablementState.Enabled||e.enablementState===y.EnablementState.WorkspaceEnabled)})},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(function(e){return e.type===y.LocalExtensionType.User}),y.EnablementState.Disabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="workbench.extensions.action.disableAll",t.LABEL=i.localize(89,null),t=a([l(2,v.IExtensionsWorkbenchService)],t)}(s.Action)
;t.DisableAllAction=Qe;var Ze=function(e){function t(n,i,r,o){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var s=e.call(this,n,i)||this;return s.workspaceContextService=r,s.extensionsWorkbenchService=o,s.disposables=[],s.update(),s.workspaceContextService.onDidChangeWorkbenchState(function(){return s.update()},s,s.disposables),s.extensionsWorkbenchService.onChange(function(){return s.update()},s,s.disposables),s}return n(t,e),t.prototype.update=function(){this.enabled=this.workspaceContextService.getWorkbenchState()!==I.WorkbenchState.EMPTY&&this.extensionsWorkbenchService.local.some(function(e){return e.type===y.LocalExtensionType.User&&(e.enablementState===y.EnablementState.Enabled||e.enablementState===y.EnablementState.WorkspaceEnabled)})},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(function(e){return e.type===y.LocalExtensionType.User}),y.EnablementState.WorkspaceDisabled)},t.prototype.dispose=function(){
e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="workbench.extensions.action.disableAllWorkspace",t.LABEL=i.localize(90,null),t=a([l(2,I.IWorkspaceContextService),l(3,v.IExtensionsWorkbenchService)],t)}(s.Action);t.DisableAllWorkpsaceAction=Ze;var Je=function(e){function t(n,i,r,o){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var s=e.call(this,n,i)||this;return s.extensionsWorkbenchService=r,s.extensionEnablementService=o,s.disposables=[],s.update(),s.disposables.push(s.extensionsWorkbenchService.onChange(function(){return s.update()})),s}return n(t,e),t.prototype.update=function(){var e=this;this.enabled=this.extensionsWorkbenchService.local.some(function(t){return t.local&&e.extensionEnablementService.canChangeEnablement(t.local)&&(t.enablementState===y.EnablementState.Disabled||t.enablementState===y.EnablementState.WorkspaceDisabled)})},t.prototype.run=function(){
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local,y.EnablementState.Enabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="workbench.extensions.action.enableAll",t.LABEL=i.localize(91,null),t=a([l(2,v.IExtensionsWorkbenchService),l(3,y.IExtensionEnablementService)],t)}(s.Action);t.EnableAllAction=Je;var et=function(e){function t(n,i,r,o,s){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var a=e.call(this,n,i)||this;return a.workspaceContextService=r,a.extensionsWorkbenchService=o,a.extensionEnablementService=s,a.disposables=[],a.update(),a.extensionsWorkbenchService.onChange(function(){return a.update()},a,a.disposables),a.workspaceContextService.onDidChangeWorkbenchState(function(){return a.update()},a,a.disposables),a}return n(t,e),t.prototype.update=function(){var e=this
;this.enabled=this.workspaceContextService.getWorkbenchState()!==I.WorkbenchState.EMPTY&&this.extensionsWorkbenchService.local.some(function(t){return t.local&&e.extensionEnablementService.canChangeEnablement(t.local)&&(t.enablementState===y.EnablementState.Disabled||t.enablementState===y.EnablementState.WorkspaceDisabled)})},t.prototype.run=function(){return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local,y.EnablementState.WorkspaceEnabled)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=g.dispose(this.disposables)},t.ID="workbench.extensions.action.enableAllWorkspace",t.LABEL=i.localize(92,null),t=a([l(2,I.IWorkspaceContextService),l(3,v.IExtensionsWorkbenchService),l(4,y.IExtensionEnablementService)],t)}(s.Action);t.EnableAllWorkpsaceAction=et;var tt=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,null,!0)||this;return s.windowsService=i,s.fileService=r,s.environmentService=o,s}return n(t,e),t.prototype.run=function(){
var e=this,t=this.environmentService.extensionsPath;return this.fileService.resolveFile(k.default.file(t)).then(function(n){var i;return i=n.children&&n.children.length>0?n.children[0].resource.fsPath:d.normalize(t,!0),e.windowsService.showItemInFolder(i)})},t.ID="workbench.extensions.action.openExtensionsFolder",t.LABEL=i.localize(93,null),t=a([l(2,T.IWindowsService),l(3,w.IFileService),l(4,K.IEnvironmentService)],t)}(s.Action);t.OpenExtensionsFolderAction=tt;var nt=function(e){function t(n,i,r,o,s){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var a=e.call(this,n,i,"extension-action install-vsix",!0)||this;return a.extensionsWorkbenchService=r,a.notificationService=o,a.windowService=s,a}return n(t,e),t.prototype.run=function(){var e=this;return this.windowService.showOpenDialog({title:i.localize(95,null),filters:[{name:"VSIX Extensions",extensions:["vsix"]}],properties:["openFile"],buttonLabel:H.mnemonicButtonLabel(i.localize(96,null))}).then(function(t){return t?o.TPromise.join(t.map(function(t){
return e.extensionsWorkbenchService.install(t)})).then(function(){e.notificationService.prompt(V.Severity.Info,i.localize(97,null),[{label:i.localize(98,null),run:function(){return e.windowService.reloadWindow()}}])}):o.TPromise.as(null)})},t.ID="workbench.extensions.action.installVSIX",t.LABEL=i.localize(94,null),t=a([l(2,v.IExtensionsWorkbenchService),l(3,V.INotificationService),l(4,T.IWindowService)],t)}(s.Action);t.InstallVSIXAction=nt;var it=function(e){function t(n,i,r,o,s,a){void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL);var c=e.call(this,n,i)||this;return c.extensionsWorkbenchService=r,c.quickOpenService=o,c.notificationService=s,c.windowService=a,c}return n(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.extensionsWorkbenchService.local.filter(function(e){return e.type===y.LocalExtensionType.User&&e.local}).length>0},enumerable:!0,configurable:!0}),t.prototype.run=function(){return this.quickOpenService.pick(this.getEntries(),{placeHolder:i.localize(100,null)})},
t.prototype.getEntries=function(){var e=this;return this.extensionsWorkbenchService.queryLocal().then(function(t){return t.filter(function(e){return e.type===y.LocalExtensionType.User}).map(function(t){return{id:t.id,label:t.displayName,description:t.id,run:function(){return e.reinstallExtension(t)}}})})},t.prototype.reinstallExtension=function(e){var t=this;return this.extensionsWorkbenchService.reinstall(e).then(function(){t.notificationService.prompt(V.Severity.Info,i.localize(101,null),[{label:i.localize(102,null),run:function(){return t.windowService.reloadWindow()}}])},function(e){return t.notificationService.error(e)})},t.ID="workbench.extensions.action.reinstall",t.LABEL=i.localize(99,null),t=a([l(2,v.IExtensionsWorkbenchService),l(3,U.IQuickOpenService),l(4,V.INotificationService),l(5,T.IWindowService)],t)}(s.Action);t.ReinstallAction=it,D.CommandsRegistry.registerCommand("workbench.extensions.action.showExtensionsForLanguage",function(e,t){
return e.get(C.IViewletService).openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("ext:"+t.replace(/^\./,"")),e.focus()})}),D.CommandsRegistry.registerCommand("workbench.extensions.action.showExtensionsWithId",function(e,t){return e.get(C.IViewletService).openViewlet(v.VIEWLET_ID,!0).then(function(e){return e}).then(function(e){e.search("@id:"+t),e.focus()})}),t.extensionButtonProminentBackground=R.registerColor("extensionButton.prominentBackground",{dark:"#327e36",light:"#327e36",hc:null},i.localize(103,null)),t.extensionButtonProminentForeground=R.registerColor("extensionButton.prominentForeground",{dark:O.Color.white,light:O.Color.white,hc:null},i.localize(104,null)),t.extensionButtonProminentHoverBackground=R.registerColor("extensionButton.prominentHoverBackground",{dark:"#28632b",light:"#28632b",hc:null},i.localize(105,null)),L.registerThemingParticipant(function(e,n){var i=e.getColor(R.foreground)
;i&&(n.addRule(".extension .monaco-action-bar .action-item .action-label.extension-action.built-in-status { border-color: "+i+"; }"),n.addRule(".extension-editor .monaco-action-bar .action-item .action-label.extension-action.built-in-status { border-color: "+i+"; }"));var r=e.getColor(R.buttonBackground);r&&(n.addRule(".extension .monaco-action-bar .action-item .action-label.extension-action { background-color: "+r+"; }"),n.addRule(".extension-editor .monaco-action-bar .action-item .action-label.extension-action { background-color: "+r+"; }"));var o=e.getColor(R.buttonForeground);o&&(n.addRule(".extension .monaco-action-bar .action-item .action-label.extension-action { color: "+o+"; }"),n.addRule(".extension-editor .monaco-action-bar .action-item .action-label.extension-action { color: "+o+"; }"));var s=e.getColor(R.buttonHoverBackground);s&&(n.addRule(".extension .monaco-action-bar .action-item:hover .action-label.extension-action { background-color: "+s+"; }"),
n.addRule(".extension-editor .monaco-action-bar .action-item:hover .action-label.extension-action { background-color: "+s+"; }"));var a=e.getColor(R.contrastBorder);a&&(n.addRule(".extension .monaco-action-bar .action-item .action-label.extension-action { border: 1px solid "+a+"; }"),n.addRule(".extension-editor .monaco-action-bar .action-item .action-label.extension-action { border: 1px solid "+a+"; }"));var c=e.getColor(t.extensionButtonProminentBackground);t.extensionButtonProminentBackground&&(n.addRule(".extension .monaco-action-bar .action-item .action-label.extension-action.prominent { background-color: "+c+"; }"),n.addRule(".extension-editor .monaco-action-bar .action-item .action-label.extension-action.prominent { background-color: "+c+"; }"));var l=e.getColor(t.extensionButtonProminentForeground);t.extensionButtonProminentForeground&&(n.addRule(".extension .monaco-action-bar .action-item .action-label.extension-action.prominent { color: "+l+"; }"),
n.addRule(".extension-editor .monaco-action-bar .action-item .action-label.extension-action.prominent { color: "+l+"; }"));var u=e.getColor(t.extensionButtonProminentHoverBackground);t.extensionButtonProminentHoverBackground&&(n.addRule(".extension .monaco-action-bar .action-item:hover .action-label.extension-action.prominent { background-color: "+u+"; }"),n.addRule(".extension-editor .monaco-action-bar .action-item:hover .action-label.extension-action.prominent { background-color: "+u+"; }"))})}),define(e[1556],t([1,0,627,4,250,18,20,11,7,863,23,9,5,106,8,124,65,28,6,80,104,1121,545,41,193,340,281,37,129,88,46,12,264,15,32,21,52,51,58,24,22,891]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U){"use strict";function G(t){
return'<!DOCTYPE html>\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<meta http-equiv="Content-type" content="text/html;charset=UTF-8">\n\t\t\t\t<meta http-equiv="Content-Security-Policy" content="default-src \'none\'; img-src https: data:; media-src https:; script-src \'none\'; style-src vscode-core-resource:; child-src \'none\'; frame-src \'none\';">\n\t\t\t\t<link rel="stylesheet" type="text/css" href="'+e.toUrl("./media/markdown.css").replace("file://","vscode-core-resource://")+'">\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<a id="scroll-to-top" role="button" aria-label="scroll to top" href="#"><span class="icon"></span></a>\n\t\t\t\t'+t+"\n\t\t\t</body>\n\t\t</html>"}function j(e){for(var t=(new DOMParser).parseFromString(e,"text/html"),n=t.documentElement.querySelectorAll("svg"),i=0;i<n.length;i++)n[i].parentNode.removeChild(n[i]);return t.documentElement.outerHTML}Object.defineProperty(t,"__esModule",{value:!0}),
t.KEYBINDING_CONTEXT_EXTENSIONEDITOR_WEBVIEW_FOCUS=new F.RawContextKey("extensionEditorWebviewFocus",void 0),t.KEYBINDING_CONTEXT_EXTENSIONEDITOR_FIND_WIDGET_INPUT_FOCUSED=new F.RawContextKey("extensionEditorFindWidgetInputFocused",!1);var q=function(){function e(e){this._onChange=new h.Emitter,this.currentId=null;var t=y.append(e,y.$(".navbar"));this.actions=[],this.actionbar=new x.ActionBar(t,{animated:!1})}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),e.prototype.push=function(e,t,n){var i=this,r=function(){return i._update(e)},o=new f.Action(e,t,null,!0,r);o.tooltip=n,this.actions.push(o),this.actionbar.push(o),1===this.actions.length&&r()},e.prototype.clear=function(){this.actions=v.dispose(this.actions),this.actionbar.clear()},e.prototype.update=function(){this._update(this.currentId)},e.prototype._update=function(e){return void 0===e&&(e=this.currentId),this.currentId=e,this._onChange.fire(e),
this.actions.forEach(function(t){return t.enabled=t.id!==e}),r.TPromise.as(null)},e.prototype.dispose=function(){this.actionbar=v.dispose(this.actionbar)},e}(),$={Readme:"readme",Contributions:"contributions",Changelog:"changelog",Dependencies:"dependencies"},Y=function(e){function r(n,i,o,s,a,c,l,u,d,h,p){var f=e.call(this,r.ID,n,a)||this;return f.instantiationService=i,f.viewletService=o,f.extensionsWorkbenchService=s,f.themeService=a,f.keybindingService=c,f.notificationService=l,f.openerService=u,f.partService=d,f.contextKeyService=h,f.extensionTipsService=p,f.layoutParticipants=[],f.contentDisposables=[],f.transientDisposables=[],f.editorLoadComplete=!1,f.disposables=[],f.extensionReadme=null,f.extensionChangelog=null,f.extensionManifest=null,f.extensionDependencies=null,f.contextKey=t.KEYBINDING_CONTEXT_EXTENSIONEDITOR_WEBVIEW_FOCUS.bindTo(f.contextKeyService),f.findInputFocusContextKey=t.KEYBINDING_CONTEXT_EXTENSIONEDITOR_FIND_WIDGET_INPUT_FOCUSED.bindTo(f.contextKeyService),f}return n(r,e),
r.prototype.createEditor=function(e){var t=y.append(e,y.$(".extension-editor"));this.header=y.append(t,y.$(".header")),this.icon=y.append(this.header,y.$("img.icon",{draggable:!1}));var n=y.append(this.header,y.$(".details")),r=y.append(n,y.$(".title"));this.name=y.append(r,y.$("span.name.clickable",{title:i.localize(0,null)})),this.identifier=y.append(r,y.$("span.identifier",{title:i.localize(1,null)})),this.preview=y.append(r,y.$("span.preview",{title:i.localize(2,null)})),this.preview.textContent=i.localize(3,null),this.builtin=y.append(r,y.$("span.builtin")),this.builtin.textContent=i.localize(4,null);var o=y.append(n,y.$(".subtitle"));this.publisher=y.append(o,y.$("span.publisher.clickable",{title:i.localize(5,null)})),this.installCount=y.append(o,y.$("span.install",{title:i.localize(6,null)})),this.rating=y.append(o,y.$("span.rating.clickable",{title:i.localize(7,null)})),this.repository=y.append(o,y.$("span.repository.clickable")),this.repository.textContent=i.localize(8,null),
this.repository.style.display="none",this.license=y.append(o,y.$("span.license.clickable")),this.license.textContent=i.localize(9,null),this.license.style.display="none",this.description=y.append(n,y.$(".description"));var s=y.append(n,y.$(".actions"));this.extensionActionBar=new x.ActionBar(s,{animated:!1,actionItemProvider:function(e){return e.id===k.EnableAction.ID?e.actionItem:e.id===k.DisableAction.ID?e.actionItem:e.id===k.MultiServerInstallAction.ID?e.actionItem:e.id===k.MultiServerUpdateAction.ID?e.actionItem:null}}),this.recommendation=y.append(n,y.$(".recommendation")),this.recommendationText=y.append(this.recommendation,y.$(".recommendation-text")),this.ignoreActionbar=new x.ActionBar(this.recommendation,{animated:!1}),this.disposables.push(this.extensionActionBar),this.disposables.push(this.ignoreActionbar),h.chain(this.extensionActionBar.onDidRun).map(function(e){return e.error}).filter(function(e){return!!e}).on(this.onError,this,this.disposables),
h.chain(this.ignoreActionbar.onDidRun).map(function(e){return e.error}).filter(function(e){return!!e}).on(this.onError,this,this.disposables);var a=y.append(t,y.$(".body"));this.navbar=new q(a),this.content=y.append(a,y.$(".content"))},r.prototype.setInput=function(t,n,r){var o=this;this.editorLoadComplete=!1;var s=t.extension,a=t.servers;this.transientDisposables=v.dispose(this.transientDisposables),this.extensionReadme=new p.default(function(){return s.getReadme()}),this.extensionChangelog=new p.default(function(){return s.getChangelog()}),this.extensionManifest=new p.default(function(){return s.getManifest()}),this.extensionDependencies=new p.default(function(){return o.extensionsWorkbenchService.loadDependencies(s)});h.once(m.domEvent(this.icon,"error"))(function(){return o.icon.src=s.iconUrlFallback},null,this.transientDisposables),this.icon.src=s.iconUrl,this.name.textContent=s.displayName,this.identifier.textContent=s.id,this.preview.style.display=s.preview?"inherit":"none",
this.builtin.style.display=s.type===E.LocalExtensionType.System?"inherit":"none",this.publisher.textContent=s.publisherDisplayName,this.description.textContent=s.description,y.removeClass(this.header,"recommendation-ignored"),y.removeClass(this.header,"recommended");var c=this.extensionTipsService.getAllRecommendationsWithReason(),l={};c[s.id.toLowerCase()]?(y.addClass(this.header,"recommended"),this.recommendationText.textContent=c[s.id.toLowerCase()].reasonText,l={recommendationReason:c[s.id.toLowerCase()].reasonId}):-1!==this.extensionTipsService.getAllIgnoredRecommendations().global.indexOf(s.id.toLowerCase())?(y.addClass(this.header,"recommendation-ignored"),this.recommendationText.textContent=i.localize(10,null)):this.recommendationText.textContent="",this.telemetryService.publicLog("extensionGallery:openExtension",K.assign(s.telemetryData,l)),y.toggleClass(this.name,"clickable",!!s.url),y.toggleClass(this.publisher,"clickable",!!s.url),y.toggleClass(this.rating,"clickable",!!s.url),
s.url?(this.name.onclick=y.finalHandler(function(){return window.open(s.url)}),this.rating.onclick=y.finalHandler(function(){return window.open(s.url+"#review-details")}),this.publisher.onclick=y.finalHandler(function(){o.viewletService.openViewlet(w.VIEWLET_ID,!0).then(function(e){return e}).done(function(e){return e.search('publisher:"'+s.publisherDisplayName+'"')})}),s.licenseUrl?(this.license.onclick=y.finalHandler(function(){return window.open(s.licenseUrl)}),this.license.style.display="initial"):(this.license.onclick=null,this.license.style.display="none")):(this.name.onclick=null,this.rating.onclick=null,this.publisher.onclick=null),s.repository?(this.repository.onclick=y.finalHandler(function(){return window.open(s.repository)}),this.repository.style.display="initial"):(this.repository.onclick=null,this.repository.style.display="none");var u=this.instantiationService.createInstance(T.InstallCountWidget,this.installCount,{extension:s});this.transientDisposables.push(u)
;var d=this.instantiationService.createInstance(T.RatingsWidget,this.rating,{extension:s});this.transientDisposables.push(d);var f=this.instantiationService.createInstance(k.MaliciousStatusLabelAction,!0),g=this.instantiationService.createInstance(k.DisabledStatusLabelAction),b=this.instantiationService.createInstance(k.CombinedInstallAction),S=1===a.length?this.instantiationService.createInstance(k.UpdateAction):this.instantiationService.createInstance(k.MultiServerUpdateAction),_=this.instantiationService.createInstance(k.EnableAction),C=this.instantiationService.createInstance(k.DisableAction),I=this.instantiationService.createInstance(k.ReloadAction);b.extension=s,f.extension=s,g.extension=s,S.extension=s,_.extension=s,C.extension=s,I.extension=s,this.extensionActionBar.clear(),this.extensionActionBar.push([g,I,S,_,C,b,f],{icon:!0,label:!0}),this.transientDisposables.push(_,S,I,C,b,f,g)
;var x=this.instantiationService.createInstance(k.IgnoreExtensionRecommendationAction),D=this.instantiationService.createInstance(k.UndoIgnoreExtensionRecommendationAction);return x.extension=s,D.extension=s,this.extensionTipsService.onRecommendationChange(function(e){if(e.extensionId.toLowerCase()===s.id.toLowerCase())if(e.isRecommended){y.removeClass(o.header,"recommendation-ignored");var t=o.extensionTipsService.getAllRecommendationsWithReason();t[s.id.toLowerCase()]&&(y.addClass(o.header,"recommended"),o.recommendationText.textContent=t[s.id.toLowerCase()].reasonText)}else y.addClass(o.header,"recommendation-ignored"),y.removeClass(o.header,"recommended"),o.recommendationText.textContent=i.localize(11,null)}),this.ignoreActionbar.clear(),this.ignoreActionbar.push([x,D],{icon:!0,label:!0}),this.transientDisposables.push(x,D),this.content.innerHTML="",this.navbar.clear(),this.navbar.onChange(this.onNavbarChange.bind(this,s),this,this.transientDisposables),
this.navbar.push($.Readme,i.localize(12,null),i.localize(13,null)),this.navbar.push($.Contributions,i.localize(14,null),i.localize(15,null)),this.navbar.push($.Changelog,i.localize(16,null),i.localize(17,null)),this.navbar.push($.Dependencies,i.localize(18,null),i.localize(19,null)),this.editorLoadComplete=!0,e.prototype.setInput.call(this,t,n,r)},r.prototype.showFind=function(){this.activeWebview&&this.activeWebview.showFind()},r.prototype.onNavbarChange=function(e,t){switch(this.editorLoadComplete&&this.telemetryService.publicLog("extensionEditor:navbarChange",K.assign(e.telemetryData,{navItem:t})),this.contentDisposables=v.dispose(this.contentDisposables),this.content.innerHTML="",this.activeWebview=null,t){case $.Readme:return this.openReadme();case $.Contributions:return this.openContributions();case $.Changelog:return this.openChangelog();case $.Dependencies:return this.openDependencies(e)}},r.prototype.openMarkdown=function(e,t){var n=this;return this.loadContents(function(){
return e.then(o.marked.parse).then(G).then(j).then(function(e){var t=n.extensionsWorkbenchService.allowedBadgeProviders,i=t.length>0?{allowScripts:!1,allowSvgs:!1,svgWhiteList:t}:{};n.activeWebview=n.instantiationService.createInstance(D.WebviewElement,n.partService.getContainer(M.Parts.EDITOR_PART),n.contextKey,n.findInputFocusContextKey,i),n.activeWebview.mountTo(n.content);var r=u.insert(n.layoutParticipants,n.activeWebview);n.contentDisposables.push(v.toDisposable(r)),n.activeWebview.contents=e,n.activeWebview.onDidClickLink(function(e){e&&["http","https","mailto"].indexOf(e.scheme)>=0&&n.openerService.open(e)},null,n.contentDisposables),n.contentDisposables.push(n.activeWebview)}).then(null,function(){y.append(n.content,y.$("p.nocontent")).textContent=t})})},r.prototype.openReadme=function(){return this.openMarkdown(this.extensionReadme.get(),i.localize(20,null))},r.prototype.openChangelog=function(){return this.openMarkdown(this.extensionChangelog.get(),i.localize(21,null))},
r.prototype.openContributions=function(){var e=this;return this.loadContents(function(){return e.extensionManifest.get().then(function(t){var n=y.$("div",{class:"subcontent"}),r=new R.DomScrollableElement(n,{}),o=function(){return r.scanDomNode()},s=u.insert(e.layoutParticipants,{layout:o});e.contentDisposables.push(v.toDisposable(s));var a=![e.renderSettings(n,t,o),e.renderCommands(n,t,o),e.renderLanguages(n,t,o),e.renderColorThemes(n,t,o),e.renderIconThemes(n,t,o),e.renderColors(n,t,o),e.renderJSONValidation(n,t,o),e.renderDebuggers(n,t,o),e.renderViewContainers(n,t,o),e.renderViews(n,t,o),e.renderLocalizations(n,t,o)].reduce(function(e,t){return t||e},!1);r.scanDomNode(),a?y.append(e.content,y.$("p.nocontent")).textContent=i.localize(22,null):(y.append(e.content,r.getDomNode()),e.contentDisposables.push(r))},function(){y.append(e.content,y.$("p.nocontent")).textContent=i.localize(23,null)})})},r.prototype.openDependencies=function(e){var t=this
;if(0!==e.dependencies.length)return this.loadContents(function(){return t.extensionDependencies.get().then(function(e){var n=y.$("div",{class:"subcontent"}),i=new R.DomScrollableElement(n,{});y.append(t.content,i.getDomNode()),t.contentDisposables.push(i);var r=t.renderDependencies(n,e),o=u.insert(t.layoutParticipants,{layout:function(){i.scanDomNode();var e=i.getScrollDimensions();r.layout(e.height)}});t.contentDisposables.push(v.toDisposable(o)),t.contentDisposables.push(r),i.scanDomNode()},function(e){y.append(t.content,y.$("p.nocontent")).textContent=e,t.notificationService.error(e)})});y.append(this.content,y.$("p.nocontent")).textContent=i.localize(24,null)},r.prototype.renderDependencies=function(e,t){var n=this.instantiationService.createInstance(I.Renderer),i=this.instantiationService.createInstance(I.Controller),r=this.instantiationService.createInstance(H.WorkbenchTree,e,{dataSource:new I.DataSource,renderer:n,controller:i},{indentPixels:40,twistiePixels:20});return r.setInput(t),
this.contentDisposables.push(r.onDidChangeSelection(function(e){e&&e.payload&&"keyboard"===e.payload.origin&&i.openExtension(r,!1)})),r},r.prototype.renderSettings=function(e,t,n){var r=t.contributes,o=r&&r.configuration,s=o&&o.properties,a=s?Object.keys(s):[];if(!a.length)return!1;var c=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(25,null,a.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(26,null)),y.$("th",null,i.localize(27,null)),y.$("th",null,i.localize(28,null)))].concat(a.map(function(e){return y.$("tr",null,y.$("td",null,y.$("code",null,e)),y.$("td",null,s[e].description),y.$("td",null,y.$("code",null,s[e].default)))}))));return y.append(e,c),!0},r.prototype.renderDebuggers=function(e,t,n){var r=t.contributes,o=r&&r.debuggers||[];if(!o.length)return!1;var s=y.$("details",{open:!0,ontoggle:n
},y.$("summary",null,i.localize(29,null,o.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(30,null)),y.$("th",null,i.localize(31,null)))].concat(o.map(function(e){return y.$("tr",null,y.$("td",null,e.label),y.$("td",null,e.type))}))));return y.append(e,s),!0},r.prototype.renderViewContainers=function(e,t,n){var r=t.contributes,o=r&&r.viewsContainers||{},s=Object.keys(o).reduce(function(e,t){var n=o[t];return e.push.apply(e,n.map(function(e){return c({},e,{location:t})})),e},[]);if(!s.length)return!1;var a=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(32,null,s.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(33,null)),y.$("th",null,i.localize(34,null)),y.$("th",null,i.localize(35,null)))].concat(s.map(function(e){return y.$("tr",null,y.$("td",null,e.id),y.$("td",null,e.title),y.$("td",null,e.location))}))));return y.append(e,a),!0},r.prototype.renderViews=function(e,t,n){
var r=t.contributes,o=r&&r.views||{},s=Object.keys(o).reduce(function(e,t){var n=o[t];return e.push.apply(e,n.map(function(e){return c({},e,{location:t})})),e},[]);if(!s.length)return!1;var a=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(36,null,s.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(37,null)),y.$("th",null,i.localize(38,null)),y.$("th",null,i.localize(39,null)))].concat(s.map(function(e){return y.$("tr",null,y.$("td",null,e.id),y.$("td",null,e.name),y.$("td",null,e.location))}))));return y.append(e,a),!0},r.prototype.renderLocalizations=function(e,t,n){var r=t.contributes,o=r&&r.localizations||[];if(!o.length)return!1;var s=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(40,null,o.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(41,null)),y.$("th",null,i.localize(42,null)),y.$("th",null,i.localize(43,null)))].concat(o.map(function(e){
return y.$("tr",null,y.$("td",null,e.languageId),y.$("td",null,e.languageName),y.$("td",null,e.localizedLanguageName))}))));return y.append(e,s),!0},r.prototype.renderColorThemes=function(e,t,n){var r=t.contributes,o=r&&r.themes||[];if(!o.length)return!1;var s=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(44,null,o.length)),y.$.apply(void 0,["ul",null].concat(o.map(function(e){return y.$("li",null,e.label)}))));return y.append(e,s),!0},r.prototype.renderIconThemes=function(e,t,n){var r=t.contributes,o=r&&r.iconThemes||[];if(!o.length)return!1;var s=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(45,null,o.length)),y.$.apply(void 0,["ul",null].concat(o.map(function(e){return y.$("li",null,e.label)}))));return y.append(e,s),!0},r.prototype.renderColors=function(e,t,n){function r(e){var t=[];if(e&&"#"===e[0]){var n=z.Color.fromHex(e);n&&t.push(y.$("span",{class:"colorBox",style:"background-color: "+z.Color.Format.CSS.format(n)},""))}return t.push(y.$("code",null,e)),t}
var o=t.contributes,s=o&&o.colors;if(!s||!s.length)return!1;var a=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(46,null,s.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(47,null)),y.$("th",null,i.localize(48,null)),y.$("th",null,i.localize(49,null)),y.$("th",null,i.localize(50,null)),y.$("th",null,i.localize(51,null)))].concat(s.map(function(e){return y.$("tr",null,y.$("td",null,y.$("code",null,e.id)),y.$("td",null,e.description),y.$.apply(void 0,["td",null].concat(r(e.defaults.dark))),y.$.apply(void 0,["td",null].concat(r(e.defaults.light))),y.$.apply(void 0,["td",null].concat(r(e.defaults.highContrast))))}))));return y.append(e,a),!0},r.prototype.renderJSONValidation=function(e,t,n){var r=t.contributes,o=r&&r.jsonValidation||[];if(!o.length)return!1;var s=y.$("details",{open:!0,ontoggle:n
},y.$("summary",null,i.localize(52,null,o.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(53,null)),y.$("th",null,i.localize(54,null)))].concat(o.map(function(e){return y.$("tr",null,y.$("td",null,y.$("code",null,e.fileMatch)),y.$("td",null,e.url))}))));return y.append(e,s),!0},r.prototype.renderCommands=function(e,t,n){var r=this,o=t.contributes,s=(o&&o.commands||[]).map(function(e){return{id:e.command,title:e.title,keybindings:[],menus:[]}}),a=u.index(s,function(e){return e.id}),c=o&&o.menus||{};Object.keys(c).forEach(function(e){c[e].forEach(function(t){var n=a[t.command];n?n.menus.push(e):(n={id:t.command,title:"",keybindings:[],menus:[e]},a[n.id]=n,s.push(n))})});if((o&&o.keybindings||[]).forEach(function(e){var t=r.resolveKeybinding(e);if(t){var n=a[e.command];n?n.keybindings.push(t):(n={id:e.command,title:"",keybindings:[t],menus:[]},a[n.id]=n,s.push(n))}}),!s.length)return!1;var l=y.$("details",{open:!0,ontoggle:n
},y.$("summary",null,i.localize(55,null,s.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(56,null)),y.$("th",null,i.localize(57,null)),y.$("th",null,i.localize(58,null)),y.$("th",null,i.localize(59,null)))].concat(s.map(function(e){return y.$("tr",null,y.$("td",null,y.$("code",null,e.id)),y.$("td",null,e.title),y.$.apply(void 0,["td",null].concat(e.keybindings.map(function(e){return function(e){var t=y.$("");return new N.KeybindingLabel(t,d.OS).set(e,null),t}(e)}))),y.$.apply(void 0,["td",null].concat(e.menus.map(function(e){return y.$("code",null,e)}))))}))));return y.append(e,l),!0},r.prototype.renderLanguages=function(e,t,n){var r=t.contributes,o=(r&&r.languages||[]).map(function(e){return{id:e.id,name:(e.aliases||[])[0]||e.id,extensions:e.extensions||[],hasGrammar:!1,hasSnippets:!1}}),s=u.index(o,function(e){return e.id});(r&&r.grammars||[]).forEach(function(e){var t=s[e.language];t?t.hasGrammar=!0:(t={id:e.language,name:e.language,extensions:[],hasGrammar:!0,hasSnippets:!1
},s[t.id]=t,o.push(t))});if((r&&r.snippets||[]).forEach(function(e){var t=s[e.language];t?t.hasSnippets=!0:(t={id:e.language,name:e.language,extensions:[],hasGrammar:!1,hasSnippets:!0},s[t.id]=t,o.push(t))}),!o.length)return!1;var a=y.$("details",{open:!0,ontoggle:n},y.$("summary",null,i.localize(60,null,o.length)),y.$.apply(void 0,["table",null,y.$("tr",null,y.$("th",null,i.localize(61,null)),y.$("th",null,i.localize(62,null)),y.$("th",null,i.localize(63,null)),y.$("th",null,i.localize(64,null)),y.$("th",null,i.localize(65,null)))].concat(o.map(function(e){return y.$("tr",null,y.$("td",null,e.id),y.$("td",null,e.name),y.$.apply(void 0,["td",null].concat(y.join(e.extensions.map(function(e){return y.$("code",null,e)})," "))),y.$("td",null,document.createTextNode(e.hasGrammar?"✔︎":"—")),y.$("td",null,document.createTextNode(e.hasSnippets?"✔︎":"—")))}))));return y.append(e,a),!0},r.prototype.resolveKeybinding=function(e){var t;switch(process.platform){case"win32":t=e.win;break;case"linux":t=e.linux;break
;case"darwin":t=e.mac}var n=A.KeybindingIO.readKeybinding(t||e.key,d.OS);return n?this.keybindingService.resolveKeybinding(n)[0]:null},r.prototype.loadContents=function(e){var t=this;y.addClass(this.content,"loading");var n=e();n=s.always(n,function(){return y.removeClass(t.content,"loading")}),this.contentDisposables.push(v.toDisposable(function(){return n.cancel()}))},r.prototype.layout=function(){this.layoutParticipants.forEach(function(e){return e.layout()})},r.prototype.onError=function(e){g.isPromiseCanceledError(e)||this.notificationService.error(e)},r.prototype.dispose=function(){this.transientDisposables=v.dispose(this.transientDisposables),this.disposables=v.dispose(this.disposables),e.prototype.dispose.call(this)},r.ID="workbench.editor.extension",
r=a([l(0,_.ITelemetryService),l(1,C.IInstantiationService),l(2,S.IViewletService),l(3,w.IExtensionsWorkbenchService),l(4,P.IThemeService),l(5,L.IKeybindingService),l(6,U.INotificationService),l(7,O.IOpenerService),l(8,M.IPartService),l(9,F.IContextKeyService),l(10,E.IExtensionTipsService)],r)}(b.BaseEditor);t.ExtensionEditor=Y;var X=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getExtensionEditor(e);n&&n.showFind()},t.prototype.getExtensionEditor=function(e){var t=e.get(B.IEditorService).activeControl;return t instanceof Y?t:null},t}(W.Command))({id:"editor.action.extensioneditor.showfind",precondition:t.KEYBINDING_CONTEXT_EXTENSIONEDITOR_WEBVIEW_FOCUS,kbOpts:{primary:2084}});V.KeybindingsRegistry.registerCommandAndKeybindingRule(X.toCommandAndKeybindingRule(V.KeybindingsRegistry.WEIGHT.editorContrib()))}),
define(e[1557],t([1,0,632,8,5,41,6,7,106,104,193,123,545,49,80,12,22]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(){}return e.prototype.getHeight=function(){return 62},e.prototype.getTemplateId=function(){return"extension"},e}();t.Delegate=b;var S={icon:!0,label:!0},_=function(){function e(e,t,n,i,r,o,s){this.instantiationService=e,this.notificationService=t,this.extensionsWorkbenchService=n,this.extensionService=i,this.extensionTipsService=r,this.themeService=o,this.extensionManagementServerService=s}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"extension"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=i.append(e,i.$("span.bookmark"));i.append(n,i.$("span.octicon.octicon-star"));var r=function(e){var t=e.getColor(h.extensionButtonProminentBackground),i=e.getColor(h.extensionButtonProminentForeground)
;n.style.borderTopColor=t?t.toString():"transparent",n.style.color=i?i.toString():"white"};r(this.themeService.getTheme());var s=this.themeService.onThemeChange(r.bind(this)),a=i.append(e,i.$(".extension")),c=i.append(a,i.$("img.icon")),l=i.append(a,i.$(".details")),u=i.append(l,i.$(".header-container")),d=i.append(u,i.$(".header")),p=i.append(d,i.$("span.name")),g=i.append(d,i.$("span.version")),v=i.append(d,i.$("span.install-count")),m=i.append(d,i.$("span.ratings")),y=i.append(l,i.$(".description.ellipsis")),b=i.append(l,i.$(".footer")),_=i.append(b,i.$(".author.ellipsis")),C=new o.ActionBar(b,{animated:!1,actionItemProvider:function(e){return e.id===h.ManageExtensionAction.ID?e.actionItem:e.id===h.MultiServerInstallAction.ID?e.actionItem:e.id===h.MultiServerUpdateAction.ID?e.actionItem:null}});C.onDidRun(function(e){var n=e.error;return n&&t.notificationService.error(n)});var E=this.instantiationService.createInstance(f.Label,g,function(e){return e.version
}),w=this.instantiationService.createInstance(f.InstallCountWidget,v,{small:!0}),I=this.instantiationService.createInstance(f.RatingsWidget,m,{small:!0}),T=this.instantiationService.createInstance(h.MaliciousStatusLabelAction,!1),x=this.instantiationService.createInstance(h.DisabledStatusLabelAction),k=1===this.extensionManagementServerService.extensionManagementServers.length?this.instantiationService.createInstance(h.InstallAction):this.instantiationService.createInstance(h.MultiServerInstallAction,!0),D=1===this.extensionManagementServerService.extensionManagementServers.length?this.instantiationService.createInstance(h.UpdateAction):this.instantiationService.createInstance(h.MultiServerUpdateAction),A=this.instantiationService.createInstance(h.ReloadAction),L=this.instantiationService.createInstance(h.ManageExtensionAction);C.push([D,A,k,x,T,L],S);return{root:e,element:a,icon:c,name:p,installCount:v,ratings:m,author:_,description:y,disposables:[E,w,I,T,x,D,k,A,L,C,s],extensionDisposables:[],
set extension(e){E.extension=e,w.extension=e,I.extension=e,T.extension=e,x.extension=e,k.extension=e,D.extension=e,A.extension=e,L.extension=e}}},e.prototype.renderPlaceholder=function(e,t){i.addClass(t.element,"loading"),t.root.removeAttribute("aria-label"),t.extensionDisposables=r.dispose(t.extensionDisposables),t.icon.src="",t.name.textContent="",t.author.textContent="",t.description.textContent="",t.installCount.style.display="none",t.ratings.style.display="none",t.extension=null},e.prototype.renderElement=function(e,t,n){var o=this;i.removeClass(n.element,"loading"),n.extensionDisposables=r.dispose(n.extensionDisposables);var s=this.extensionsWorkbenchService.local.filter(function(t){return t.id===e.id})[0];this.extensionService.getExtensions().then(function(t){if(s&&s.local){var r=o.extensionManagementServerService.getExtensionManagementServer(s.local.location),a=t.some(function(t){
return p.areSameExtensions(t,e)&&r.location.toString()===o.extensionManagementServerService.getExtensionManagementServer(t.extensionLocation).location.toString()});i.toggleClass(n.root,"disabled",!a)}else i.removeClass(n.root,"disabled")});c.once(u.domEvent(n.icon,"error"))(function(){return n.icon.src=e.iconUrlFallback},null,n.extensionDisposables),n.icon.src=e.iconUrl,n.icon.complete?n.icon.style.visibility="inherit":(n.icon.style.visibility="hidden",n.icon.onload=function(){return n.icon.style.visibility="inherit"}),this.updateRecommendationStatus(e,n),n.extensionDisposables.push(this.extensionTipsService.onRecommendationChange(function(t){t.extensionId.toLowerCase()===e.id.toLowerCase()&&o.updateRecommendationStatus(e,n)})),n.name.textContent=e.displayName,n.author.textContent=e.publisherDisplayName,n.description.textContent=e.description,n.installCount.style.display="",n.ratings.style.display="",n.extension=e,e.getManifest().then(function(e){
var t=e&&e.contributes&&e.contributes.localizations&&e.contributes.localizations.length>0&&e.contributes.localizations[0].localizedLanguageName;t&&(n.description.textContent=t[0].toLocaleUpperCase()+t.slice(1))})},e.prototype.updateRecommendationStatus=function(e,t){var r=this.extensionTipsService.getAllRecommendationsWithReason(),o=e.displayName+". ";r[e.id.toLowerCase()]?(i.addClass(t.root,"recommended"),o+=r[e.id.toLowerCase()].reasonText+" ",t.root.title=r[e.id.toLowerCase()].reasonText):(i.removeClass(t.root,"recommended"),t.root.title=""),o+=n.localize(0,null),t.root.setAttribute("aria-label",o)},e.prototype.disposeTemplate=function(e){e.disposables=r.dispose(e.disposables)},e=a([l(0,s.IInstantiationService),l(1,y.INotificationService),l(2,d.IExtensionsWorkbenchService),l(3,g.IExtensionService),l(4,v.IExtensionTipsService),l(5,m.IThemeService),l(6,v.IExtensionManagementServerService)],e)}();t.Renderer=_}),
define(e[548],t([1,0,636,93,76,10,40,139,4,23,124,28,6,104,12,21,49,58,8,41,5,18,103,80,35,42,87,36,111,20,193,22,894]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionHostProfileService=m.createDecorator("extensionHostProfileService");!function(e){e[e.None=0]="None",e[e.Starting=1]="Starting",e[e.Running=2]="Running",e[e.Stopping=3]="Stopping"}(t.ProfileSessionState||(t.ProfileSessionState={}));var F=function(e){function r(t,n,i,o,s,a,c,l){var u=e.call(this,r.ID,t,n)||this;return u._extensionsWorkbenchService=i,u._extensionService=o,u._notificationService=s,u._contextMenuService=a,u._instantiationService=c,u._extensionHostProfileService=l,u._list=null,u._profileInfo=u._extensionHostProfileService.lastProfile,u._register(u._extensionHostProfileService.onDidChangeLastProfile(function(){u._profileInfo=u._extensionHostProfileService.lastProfile,u._updateExtensions()})),u._elements=null,
u._extensionsDescriptions=[],u._updateExtensions(),u._updateSoon=u._register(new T.RunOnceScheduler(function(){return u._updateExtensions()},200)),u._extensionService.getExtensions().then(function(e){u._extensionsDescriptions=e.filter(function(e){return!!e.main}),u._updateExtensions()}),u._register(u._extensionService.onDidChangeExtensionsStatus(function(){return u._updateSoon.schedule()})),u}return n(r,e),r.prototype._updateExtensions=function(){this._elements=this._resolveExtensions(),this._list&&this._list.splice(0,this._list.length,this._elements)},r.prototype._resolveExtensions=function(){for(var e=Object.create(null),t=0,n=this._extensionsWorkbenchService.local;t<n.length;t++){var i=n[t];e[i.id]=i}var r=this._extensionService.getExtensionsStatus(),o=Object.create(null);if(this._profileInfo)for(var s=this._profileInfo.startTime,a=0,c=this._profileInfo.deltas.length;a<c;a++){var l=this._profileInfo.ids[a],u=this._profileInfo.deltas[a];(f=o[l])||(f=[],o[l]=f),f.push(s),s+=u,f.push(s)}
for(var d=[],a=0,c=this._extensionsDescriptions.length;a<c;a++){var h=this._extensionsDescriptions[a],p=null;if(this._profileInfo){for(var f=o[h.id]||[],g=0,v=0,m=f.length/2;v<m;v++){var y=f[2*v];g+=f[2*v+1]-y}p={segments:f,totalTime:g}}d[a]={originalIndex:a,description:h,marketplaceInfo:e[h.id],status:r[h.id],profileInfo:p}}return d=d.filter(function(e){return e.status.activationTimes}),this._profileInfo&&(d=d.sort(function(e,t){return e.profileInfo.totalTime===t.profileInfo.totalTime?e.originalIndex-t.originalIndex:t.profileInfo.totalTime-e.profileInfo.totalTime})),d},r.prototype.createEditor=function(e){var t=this;E.addClass(e,"runtime-extensions-editor");var n=new(function(){function e(){}return e.prototype.getHeight=function(e){return 62},e.prototype.getTemplateId=function(e){return"runtimeExtensionElementTemplate"},e}()),r={templateId:"runtimeExtensionElementTemplate",renderTemplate:function(e){
var n=E.append(e,E.$(".extension")),i=E.append(n,E.$("div.desc")),r=E.append(i,E.$("div.name")),o=E.append(i,E.$("div.msg")),s=E.append(o,E.$(".")),a=E.append(o,E.$("span.msg-label")),c=E.append(n,E.$(".time")),l=E.append(c,E.$("div.activation-time")),u=E.append(c,E.$("div.profile-time")),d=E.append(n,E.$("div.profile-timeline")),h=new w.ActionBar(n,{animated:!1});h.onDidRun(function(e){var n=e.error;return n&&t._notificationService.error(n)}),h.push(new V,{icon:!0,label:!0});return{root:e,element:n,name:r,actionbar:h,activationTime:l,profileTime:u,profileTimeline:d,msgIcon:s,msgLabel:a,disposables:[h],elementDisposables:[]}},renderElement:function(e,n,r){r.elementDisposables=I.dispose(r.elementDisposables),E.toggleClass(r.root,"odd",n%2==1),r.name.textContent=e.marketplaceInfo?e.marketplaceInfo.displayName:e.description.displayName;var o=e.status.activationTimes,s=o.codeLoadingTime+o.activateCallTime;r.activationTime.textContent=o.startup?"Startup Activation: "+s+"ms":"Activation: "+s+"ms",
r.actionbar.context=e,E.toggleClass(r.actionbar.getContainer(),"hidden",e.marketplaceInfo&&e.marketplaceInfo.type===k.LocalExtensionType.User&&(!e.description.repository||!e.description.repository.url));var a;if("*"===o.activationEvent)a=i.localize(0,null);else if(/^workspaceContains:/.test(o.activationEvent)){var c=o.activationEvent.substr("workspaceContains:".length);a=c.indexOf("*")>=0||c.indexOf("?")>=0?i.localize(1,null,c):i.localize(2,null,c)}else if(/^onLanguage:/.test(o.activationEvent)){var l=o.activationEvent.substr("onLanguage:".length);a=i.localize(3,null,l)}else a=i.localize(4,null,o.activationEvent);if(r.activationTime.title=a,M.isFalsyOrEmpty(e.status.runtimeErrors)?e.status.messages&&e.status.messages.length>0?(r.msgIcon.className="octicon octicon-alert",r.msgLabel.textContent=e.status.messages[0].message):(r.msgIcon.className="",r.msgLabel.textContent=""):(r.msgIcon.className="octicon octicon-bug",r.msgLabel.textContent=i.localize(5,null,e.status.runtimeErrors.length)),t._profileInfo){
r.profileTime.textContent="Profile: "+(e.profileInfo.totalTime/1e3).toFixed(2)+"ms";for(var u=e.profileInfo.segments,d='<rect x="0" y="99" width="100" height="1" />',h=0,p=u.length/2;h<p;h++){var f=u[2*h],g=u[2*h+1],v=f-t._profileInfo.startTime,m=g-t._profileInfo.startTime,y=t._profileInfo.endTime-t._profileInfo.startTime,b=v/y*100;d+='<rect x="'+b+'" y="0" width="'+(m/y*100-b)+'" height="100" />'}var S='<svg class="profile-timeline-svg" preserveAspectRatio="none" height="16" viewBox="0 0 100 100">'+d+"</svg>";r.profileTimeline.innerHTML=S,r.profileTimeline.style.display="inherit"}else r.profileTime.textContent="",r.profileTimeline.innerHTML=""},disposeTemplate:function(e){e.disposables=I.dispose(e.disposables)}};this._list=this._instantiationService.createInstance(C.WorkbenchList,e,n,[r],{multipleSelectionSupport:!1}),this._list.splice(0,this._list.length,this._elements),this._list.onContextMenu(function(e){var n=[]
;e.element.marketplaceInfo.type===k.LocalExtensionType.User&&(n.push(t._instantiationService.createInstance(P.DisableForWorkspaceAction,P.DisableForWorkspaceAction.LABEL)),n.push(t._instantiationService.createInstance(P.DisableGloballyAction,P.DisableGloballyAction.LABEL)),n.forEach(function(t){return t.extension=e.element.marketplaceInfo}),n.push(new w.Separator)),n.push(t.extensionHostProfileAction,t.saveExtensionHostProfileAction),t._contextMenuService.showContextMenu({getAnchor:function(){return e.anchor},getActions:function(){return p.TPromise.as(n)}})})},r.prototype.getActions=function(){return[this.saveExtensionHostProfileAction,this.extensionHostProfileAction]},Object.defineProperty(r.prototype,"extensionHostProfileAction",{get:function(){return this._instantiationService.createInstance(z,z.ID,z.LABEL_START)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"saveExtensionHostProfileAction",{get:function(){return this._instantiationService.createInstance(H,H.ID,H.LABEL)},enumerable:!0,
configurable:!0}),r.prototype.layout=function(e){this._list.layout(e.height)},r.ID="workbench.editor.runtimeExtensions",a([O.memoize],r.prototype,"extensionHostProfileAction",null),a([O.memoize],r.prototype,"saveExtensionHostProfileAction",null),r=a([l(0,v.ITelemetryService),l(1,b.IThemeService),l(2,y.IExtensionsWorkbenchService),l(3,_.IExtensionService),l(4,N.INotificationService),l(5,D.IContextMenuService),l(6,m.IInstantiationService),l(7,t.IExtensionHostProfileService)],r)}(g.BaseEditor);t.RuntimeExtensionsEditor=F;var W=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.getTypeId=function(){return t.ID},t.prototype.getName=function(){return i.localize(6,null)},t.prototype.matches=function(e){return e instanceof t},t.prototype.resolve=function(e){return p.TPromise.as(null)},t.prototype.supportsSplitEditor=function(){return!1},t.prototype.getResource=function(){return u.default.from({scheme:"runtime-extensions",path:"default"})},t.ID="workbench.runtimeExtensions.input",t
}(d.EditorInput);t.RuntimeExtensionsInput=W;var B=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o._editorService=i,o._instantiationService=r,o}return n(t,e),t.prototype.run=function(e){return this._editorService.openEditor(this._instantiationService.createInstance(W),{revealIfOpened:!0})},t.ID="workbench.action.showRuntimeExtensions",t.LABEL=i.localize(7,null),t=a([l(2,S.IEditorService),l(3,m.IInstantiationService)],t)}(f.Action);t.ShowRuntimeExtensionsAction=B;var V=function(e){function t(n,i){return void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL),e.call(this,n,i,"extension-action report-issue")||this}return n(t,e),t.prototype.run=function(e){return x.clipboard.writeText("```json \n"+JSON.stringify(e.status,null,"\t")+"\n```"),window.open(this.generateNewIssueUrl(e)),p.TPromise.as(null)},t.prototype.generateNewIssueUrl=function(e){var t=e.marketplaceInfo&&e.marketplaceInfo.type===k.LocalExtensionType.User&&e.description.repository?e.description.repository.url:void 0
;t=t?(-1!==t.indexOf(".git")?t.substr(0,t.length-4):t)+"/issues/new/":c.default.reportIssueUrl;var n=r.type()+" "+r.arch()+" "+r.release();return""+t+(-1===t.indexOf("?")?"?":"&")+"body="+encodeURIComponent("- Extension Name: "+e.description.name+"\n- Extension Version: "+e.description.version+"\n- OS Version: "+n+"\n- VSCode version: "+h.default.version+"\n\n We have written the needed data into your clipboard. Please paste:")},t.ID="workbench.extensions.action.reportExtensionIssue",t.LABEL=i.localize(8,null),t}(f.Action),z=function(e){function r(t,n,i){void 0===t&&(t=r.ID),void 0===n&&(n=r.LABEL_START);var o=e.call(this,t,n,r.START_CSS_CLASS)||this;return o._extensionHostProfileService=i,o._extensionHostProfileService.onDidChangeState(function(){return o._update()}),o}return n(r,e),r.prototype._update=function(){2===this._extensionHostProfileService.state?(this.class=r.STOP_CSS_CLASS,this.label=r.LABEL_STOP):(this.class=r.START_CSS_CLASS,this.label=r.LABEL_START)},r.prototype.run=function(){
var e=this._extensionHostProfileService.state;return 2===e?this._extensionHostProfileService.stopProfiling():0===e&&this._extensionHostProfileService.startProfiling(),p.TPromise.as(null)},r.ID="workbench.extensions.action.extensionHostProfile",r.LABEL_START=i.localize(9,null),r.LABEL_STOP=i.localize(10,null),r.STOP_CSS_CLASS="extension-host-profile-stop",r.START_CSS_CLASS="extension-host-profile-start",r=a([l(2,t.IExtensionHostProfileService)],r)}(f.Action),H=function(r){function c(e,t,n,i,o){void 0===e&&(e=c.ID),void 0===t&&(t=c.LABEL);var s=r.call(this,e,t,"save-extension-host-profile",!1)||this;return s._windowService=n,s._environmentService=i,s._extensionHostProfileService=o,s.enabled=null!==s._extensionHostProfileService.lastProfile,s._extensionHostProfileService.onDidChangeLastProfile(function(){s.enabled=null!==s._extensionHostProfileService.lastProfile}),s}return n(c,r),c.prototype.run=function(){return o(this,void 0,p.TPromise,function(){var t,n,i,r,o;return s(this,function(s){switch(s.label){case 0:
return[4,this._windowService.showSaveDialog({title:"Save Extension Host Profile",buttonLabel:"Save",defaultPath:"CPU-"+(new Date).toISOString().replace(/[\-:]/g,"")+".cpuprofile",filters:[{name:"CPU Profiles",extensions:["cpuprofile","txt"]}]})];case 1:return(t=s.sent())?(n=this._extensionHostProfileService.lastProfile,i=n.data,this._environmentService.isBuilt?[4,new Promise(function(t,n){e(["v8-inspect-profiler"],t,n)})]:[3,3]):[2];case 2:r=s.sent(),o=r.rewriteAbsolutePaths({profile:i},"piiRemoved"),i=o.profile,t+=".txt",s.label=3;case 3:return[2,L.writeFile(t,JSON.stringify(n.data,null,"\t"))]}})})},c.LABEL=i.localize(11,null),c.ID="workbench.extensions.action.saveExtensionHostProfile",c=a([l(2,A.IWindowService),l(3,R.IEnvironmentService),l(4,t.IExtensionHostProfileService)],c)}(f.Action)}),define(e[1559],t([1,0,628,7,6,49,5,9,8,172,16,548,21,42,100,486,76]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(t,n,i,o,s){
var a=e.call(this)||this;return a._extensionService=t,a._editorService=n,a._instantiationService=i,a._windowsService=o,a._dialogService=s,a._onDidChangeState=a._register(new r.Emitter),a.onDidChangeState=a._onDidChangeState.event,a._onDidChangeLastProfile=a._register(new r.Emitter),a.onDidChangeLastProfile=a._onDidChangeLastProfile.event,a._profile=null,a._profileSession=null,a._setState(0),a}return n(t,e),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastProfile",{get:function(){return this._profile},enumerable:!0,configurable:!0}),t.prototype._setState=function(e){var t=this;this._state!==e&&(this._state=e,2===this._state?_.instance.show(function(){t.stopProfiling(),t._editorService.openEditor(t._instantiationService.createInstance(f.RuntimeExtensionsInput),{revealIfOpened:!0})}):3===this._state&&_.instance.hide(),this._onDidChangeState.fire(void 0))},t.prototype.startProfiling=function(){var e=this
;return 0!==this._state?null:this._extensionService.canProfileExtensionHost()?(this._setState(1),this._extensionService.startExtensionHostProfile().then(function(t){e._profileSession=t,e._setState(2)},function(t){u.onUnexpectedError(t),e._setState(0)})):this._dialogService.confirm({type:"info",message:i.localize(0,null),detail:i.localize(1,null,b.default.nameLong),primaryButton:i.localize(2,null),secondaryButton:i.localize(3,null)}).then(function(t){t.confirmed&&e._windowsService.relaunch({addArgs:["--inspect-extensions="+y.randomPort()]})})},t.prototype.stopProfiling=function(){var e=this;2===this._state&&(this._setState(3),this._profileSession.stop().then(function(t){e._setLastProfile(t),e._setState(0)},function(t){u.onUnexpectedError(t),e._setState(0)}),this._profileSession=null)},t.prototype._setLastProfile=function(e){this._profile=e,this._onDidChangeLastProfile.fire(void 0)},t.prototype.getLastProfile=function(){return this._profile},t.prototype.clearLastProfile=function(){this._setLastProfile(null)},
t=a([l(0,s.IExtensionService),l(1,g.IEditorService),l(2,o.IInstantiationService),l(3,v.IWindowsService),l(4,m.IDialogService)],t)}(c.Disposable);t.ExtensionHostProfileService=S;var _=function(){function e(){e.instance=this,this.toDispose=[],this.timeStarted=0}return e.prototype.show=function(e){var t=this;this.clickHandler=e,0===this.timeStarted&&(this.timeStarted=(new Date).getTime(),this.statusBarItem.hidden=!1,this.labelUpdater=setInterval(function(){t.updateLabel()},1e3),this.updateLabel())},e.prototype.hide=function(){this.clickHandler=null,this.statusBarItem.hidden=!0,this.timeStarted=0,clearInterval(this.labelUpdater),this.labelUpdater=null},e.prototype.render=function(e){var t=this;if(!this.statusBarItem&&e){this.statusBarItem=d.append(e,d.$(".profileExtHost-statusbar-item")),this.toDispose.push(d.addDisposableListener(this.statusBarItem,"click",function(){t.clickHandler&&t.clickHandler()})),this.statusBarItem.title=i.localize(4,null);var n=d.append(this.statusBarItem,d.$("a"))
;d.append(n,d.$(".icon")),this.label=d.append(n,d.$("span.label")),this.updateLabel(),this.statusBarItem.hidden=!0}return this},e.prototype.updateLabel=function(){var e="Profiling Extension Host";if(this.timeStarted>0){var t=((new Date).getTime()-this.timeStarted)/1e3;e="Profiling Extension Host ("+Math.round(t)+" sec)"}this.label.textContent=e},e.prototype.dispose=function(){this.toDispose=c.dispose(this.toDispose)},e}();t.ProfileExtHostStatusbarItem=_,p.Registry.as(h.Extensions.Statusbar).registerStatusbarItem(new h.StatusbarItemDescriptor(_,h.StatusbarAlignment.RIGHT))}),define(e[306],t([1,0,648,25,4,62,10,40,42,6,65,27,96,135,48,126,58,257,29,15,33,91,45,52,73,11,72,18,327,190,187,43,22,55,21,53]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P){"use strict";function N(e,t,n,i,o,s,c){if(e&&(i.canHandleResource(e)||e.scheme===L.Schemas.untitled)){if(t||e.scheme===L.Schemas.untitled){var l;if(e.scheme===L.Schemas.untitled)l=o.getEncoding(e);else if(i.canHandleResource(e)){
var u=s.models.get(e);l=u&&u.getEncoding()}var d,h=C.getCodeEditor(n.activeTextEditorWidget);if(h){var p=a.toResource(n.activeEditor,{supportSideBySide:!0});p&&(i.canHandleResource(p)||e.scheme===L.Schemas.untitled)&&p.toString()===e.toString()&&(d=h.saveViewState())}return(!t&&e.scheme===L.Schemas.untitled&&o.hasAssociatedFilePath(e)?s.save(e).then(function(t){return t?e.with({scheme:L.Schemas.file}):null}):s.saveAs(e)).then(function(t){if(t&&t.toString()!==e.toString()){var i={resource:t,encoding:l,options:{pinned:!0,viewState:d}};return r.TPromise.join(c.groups.map(function(t){return n.replaceEditors([{editor:{resource:e},replacement:i}],t)})).then(function(){return!0})}})}var f=n.activeControl,g=f&&f.input&&f.input.getResource();return g&&g.toString()===e.toString()&&f.group.pinEditor(f.input),s.save(e,{force:!0})}return r.TPromise.as(!1)}function F(e,t,n,i,r){var o=new Map;return r.groups.forEach(function(e){e.editors.forEach(function(t){var i=t.getResource()
;i&&n.isDirty(i)&&(o.has(e.id)||o.set(e.id,[]),o.get(e.id).push({encoding:n.getEncoding(i),resource:i,options:{inactive:!e.activeEditor||e.activeEditor.getResource().toString()!==i.toString(),pinned:!0,preserveFocus:!0,index:e.getIndexOfEditor(t)}}))})}),i.saveAll(e).then(function(e){o.forEach(function(n,i){n.forEach(function(t){var n=e.results.filter(function(e){return e.success&&e.source.toString()===t.resource.toString()}).pop();n&&(t.resource=n.target)}),t.openEditors(n,i)})})}function W(e,t,r,o){e.length?x.sequence(e.map(function(e){return function(){return t.showItemInFolder(i.normalize(e.fsPath,!0))}})):o.getWorkspace().folders.length?t.showItemInFolder(i.normalize(o.getWorkspace().folders[0].uri.fsPath,!0)):r.info(n.localize(9,null))}function B(e,t,r){if(e.length){var s=I.isWindows?"\r\n":"\n",a=e.map(function(e){return e.scheme===L.Schemas.file?i.normalize(o.normalizeDriveLetter(e.fsPath),!0):e.toString()}).join(s);t.writeText(a)}else r.info(n.localize(10,null))}Object.defineProperty(t,"__esModule",{
value:!0}),t.REVEAL_IN_OS_COMMAND_ID="revealFileInOS",t.REVEAL_IN_OS_LABEL=I.isWindows?n.localize(0,null):I.isMacintosh?n.localize(1,null):n.localize(2,null),t.REVEAL_IN_EXPLORER_COMMAND_ID="revealInExplorer",t.REVERT_FILE_COMMAND_ID="workbench.action.files.revert",t.OPEN_TO_SIDE_COMMAND_ID="explorer.openToSide",t.SELECT_FOR_COMPARE_COMMAND_ID="selectForCompare",t.COMPARE_SELECTED_COMMAND_ID="compareSelected",t.COMPARE_RESOURCE_COMMAND_ID="compareFiles",t.COMPARE_WITH_SAVED_COMMAND_ID="workbench.files.action.compareWithSaved",t.COPY_PATH_COMMAND_ID="copyFilePath",t.SAVE_FILE_AS_COMMAND_ID="workbench.action.files.saveAs",t.SAVE_FILE_AS_LABEL=n.localize(3,null),t.SAVE_FILE_COMMAND_ID="workbench.action.files.save",t.SAVE_FILE_LABEL=n.localize(4,null),t.SAVE_ALL_COMMAND_ID="saveAll",t.SAVE_ALL_LABEL=n.localize(5,null),t.SAVE_ALL_IN_GROUP_COMMAND_ID="workbench.files.action.saveAllInGroup",t.SAVE_FILES_COMMAND_ID="workbench.action.files.saveFiles",
t.OpenEditorsGroupContext=new b.RawContextKey("groupFocusedInOpenEditors",!1),t.DirtyEditorContext=new b.RawContextKey("dirtyEditor",!1),t.ResourceSelectedForCompareContext=new b.RawContextKey("resourceSelectedForCompare",!1),t.REMOVE_ROOT_FOLDER_COMMAND_ID="removeRootFolder",t.REMOVE_ROOT_FOLDER_LABEL=n.localize(6,null),t.openWindowCommand=function(e,t,n){e.get(c.IWindowService).openWindow(t,{forceNewWindow:n})},y.CommandsRegistry.registerCommand({id:t.REVERT_FILE_COMMAND_ID,handler:function(e,t){var o=e.get(M.IEditorService),s=e.get(f.ITextFileService),a=e.get(R.INotificationService),c=k.getMultiSelectedResources(t,e.get(v.IListService),o).filter(function(e){return e.scheme!==L.Schemas.untitled});return c.length?s.revertAll(c,{force:!0}).then(null,function(e){a.error(n.localize(7,null,c.map(function(e){return i.basename(e.fsPath)}).join(", "),g.toErrorMessage(e,!1)))}):r.TPromise.as(!0)}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),
when:h.ExplorerFocusCondition,primary:2051,mac:{primary:259},id:t.OPEN_TO_SIDE_COMMAND_ID,handler:function(e,t){var n=e.get(M.IEditorService),i=e.get(v.IListService),o=e.get(S.IFileService),s=i.lastFocusedList,a=k.getMultiSelectedResources(t,i,n);return s instanceof m.Tree&&s.clearHighlight(),a.length?o.resolveFiles(a.map(function(e){return{resource:e}})).then(function(e){var t=e.filter(function(e){return e.success&&!e.stat.isDirectory}).map(function(e){return{resource:e.stat.resource}});return n.openEditors(t,M.SIDE_GROUP)}):r.TPromise.as(!0)}});var V;E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.COMPARE_WITH_SAVED_COMMAND_ID,when:void 0,weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),primary:w.KeyChord(2089,34),handler:function(e,t){if(!V){var o=e.get(l.IInstantiationService),a=e.get(T.ITextModelService);V=o.createInstance(h.FileOnDiskContentProvider),a.registerTextModelContentProvider("showModifications",V)}
var c=e.get(M.IEditorService),u=k.getResourceForCommand(t,e.get(v.IListService),c);if(u&&u.scheme===L.Schemas.file){var d=i.basename(u.fsPath),p=n.localize(8,null,d,d);return c.openEditor({leftResource:s.default.from({scheme:"showModifications",path:u.fsPath}),rightResource:u,label:p}).then(function(){})}return r.TPromise.as(!0)}});var z,H;y.CommandsRegistry.registerCommand({id:t.SELECT_FOR_COMPARE_COMMAND_ID,handler:function(e,n){var i=e.get(v.IListService),r=i.lastFocusedList;r instanceof m.Tree&&(r.clearHighlight(),r.domFocus()),z=k.getResourceForCommand(n,i,e.get(M.IEditorService)),H||(H=t.ResourceSelectedForCompareContext.bindTo(e.get(b.IContextKeyService))),H.set(!0)}}),y.CommandsRegistry.registerCommand({id:t.COMPARE_SELECTED_COMMAND_ID,handler:function(e,t){var n=e.get(M.IEditorService),i=k.getMultiSelectedResources(t,e.get(v.IListService),n);return 2===i.length?n.openEditor({leftResource:i[0],rightResource:i[1]}):r.TPromise.as(!0)}}),y.CommandsRegistry.registerCommand({
id:t.COMPARE_RESOURCE_COMMAND_ID,handler:function(e,t){var n=e.get(M.IEditorService),i=e.get(v.IListService),r=i.lastFocusedList;return r instanceof m.Tree&&r.clearHighlight(),n.openEditor({leftResource:z,rightResource:k.getResourceForCommand(t,i,n)}).then(function(){})}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.REVEAL_IN_OS_COMMAND_ID,weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:O.EditorContextKeys.focus.toNegated(),primary:2608,win:{primary:1584},handler:function(e,t){W(k.getMultiSelectedResources(t,e.get(v.IListService),e.get(M.IEditorService)),e.get(c.IWindowsService),e.get(R.INotificationService),e.get(d.IWorkspaceContextService))}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:w.KeyChord(2089,48),id:"workbench.action.files.revealActiveFileInWindows",handler:function(e){var t=e.get(M.IEditorService).activeEditor
;W(t&&t.getResource()?[t.getResource()]:[],e.get(c.IWindowsService),e.get(R.INotificationService),e.get(d.IWorkspaceContextService))}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:O.EditorContextKeys.focus.toNegated(),primary:2593,win:{primary:1569},id:t.COPY_PATH_COMMAND_ID,handler:function(e,t){B(k.getMultiSelectedResources(t,e.get(v.IListService),e.get(M.IEditorService)),e.get(p.IClipboardService),e.get(R.INotificationService))}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:w.KeyChord(2089,46),id:"workbench.action.files.copyPathOfActiveFile",handler:function(e){var t=e.get(M.IEditorService).activeEditor;B(t&&t.getResource()?[t.getResource()]:[],e.get(p.IClipboardService),e.get(R.INotificationService))}}),y.CommandsRegistry.registerCommand({id:t.REVEAL_IN_EXPLORER_COMMAND_ID,handler:function(e,t){
var n=e.get(u.IViewletService),i=e.get(d.IWorkspaceContextService),r=k.getResourceForCommand(t,e.get(v.IListService),e.get(M.IEditorService));n.openViewlet(h.VIEWLET_ID,!1).then(function(e){if(i.isInsideWorkspace(r)){var t=e.getExplorerView();t&&(t.setExpanded(!0),t.select(r,!0))}else{var n=e.getOpenEditorsView();n&&n.setExpanded(!0)}})}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:t.SAVE_FILE_AS_COMMAND_ID,weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:void 0,primary:3121,handler:function(e,t){var n=e.get(M.IEditorService),i=void 0;return i=t&&"from"in t&&"menu"===t.from?a.toResource(n.activeEditor):k.getResourceForCommand(t,e.get(v.IListService),n),N(i,!0,n,e.get(S.IFileService),e.get(_.IUntitledEditorService),e.get(f.ITextFileService),e.get(P.IEditorGroupsService))}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({when:void 0,weight:E.KeybindingsRegistry.WEIGHT.workbenchContrib(),primary:2097,id:t.SAVE_FILE_COMMAND_ID,handler:function(e,t){
var n=e.get(M.IEditorService),i=k.getMultiSelectedResources(t,e.get(v.IListService),n);return 1===i.length?N(i[0],!1,n,e.get(S.IFileService),e.get(_.IUntitledEditorService),e.get(f.ITextFileService),e.get(P.IEditorGroupsService)):F(i,n,e.get(_.IUntitledEditorService),e.get(f.ITextFileService),e.get(P.IEditorGroupsService))}}),y.CommandsRegistry.registerCommand({id:t.SAVE_ALL_COMMAND_ID,handler:function(e){return F(!0,e.get(M.IEditorService),e.get(_.IUntitledEditorService),e.get(f.ITextFileService),e.get(P.IEditorGroupsService))}}),y.CommandsRegistry.registerCommand({id:t.SAVE_ALL_IN_GROUP_COMMAND_ID,handler:function(e,t,n){var i,r=A.getMultiSelectedEditorContexts(n,e.get(v.IListService),e.get(P.IEditorGroupsService)),o=e.get(P.IEditorGroupsService);if(r.length){var s=e.get(S.IFileService);i=[],r.forEach(function(e){o.getGroup(e.groupId).editors.forEach(function(e){var t=a.toResource(e,{supportSideBySide:!0});t&&(t.scheme===L.Schemas.untitled||s.canHandleResource(t))&&i.push(t)})})}else i=!0
;return F(i,e.get(M.IEditorService),e.get(_.IUntitledEditorService),e.get(f.ITextFileService),e.get(P.IEditorGroupsService))}}),y.CommandsRegistry.registerCommand({id:t.SAVE_FILES_COMMAND_ID,handler:function(e){return F(!1,e.get(M.IEditorService),e.get(_.IUntitledEditorService),e.get(f.ITextFileService),e.get(P.IEditorGroupsService))}}),y.CommandsRegistry.registerCommand({id:t.REMOVE_ROOT_FOLDER_COMMAND_ID,handler:function(e,t){var n=e.get(D.IWorkspaceEditingService),i=e.get(d.IWorkspaceContextService).getWorkspace(),r=k.getMultiSelectedResources(t,e.get(v.IListService),e.get(M.IEditorService)).filter(function(e){return i.folders.some(function(t){return t.uri.toString()===e.toString()})});return n.removeFolders(r)}})}),define(e[217],t([1,0,4,646,30,11,18,25,70,10,59,9,126,14,416,23,118,5,96,48,33,40,202,91,99,64,65,6,42,306,72,17,135,54,47,29,58,15,43,100,22,21,187,897]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G){"use strict";function j(e,t){
for(var n=d.basenameOrAuthority(t.resource),i=e.resource.with({path:u.join(e.resource.path,n)});;){if(!e.root.find(i))break;n=q(n,t.isDirectory),i=e.resource.with({path:u.join(e.resource.path,n)})}return i}function q(e,t){var n=RegExp("(.*[\\.\\-_])(\\d+)(\\..*)$");if(!t&&e.match(n))return e.replace(n,function(e,t,n,i){var r=parseInt(n);return r<1073741824?t+v.pad(r+1,n.length)+i:v.format("{0}{1}.1{2}",t,n,i)});var i=RegExp("(\\d+)([\\.\\-_].*)(\\..*)$");if(!t&&e.match(i))return e.replace(i,function(e,t,n,i){var r=parseInt(t);return r<1073741824?v.pad(r+1,t.length)+n+i:v.format("{0}{1}.1{2}",t,n,i)});var r=RegExp("(\\d+)(\\..*)$");if(!t&&e.match(r))return e.replace(r,function(e,t,n){var i=parseInt(t);return i<1073741824?v.pad(i+1,t.length)+n:v.format("{0}.1{1}",t,n)});var o=e.lastIndexOf(".");return!t&&o>=0?v.format("{0}.1{1}",e.substr(0,o),e.substr(o)):t&&e.match(/(\d+)$/)?e.replace(/(\d+)$/,function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=parseInt(t[0])
;return i<1073741824?v.pad(i+1,t[0].length):v.format("{0}.1",t[0])}):t&&e.match(/^(\d+)/)?e.replace(/^(\d+)(.*)$/,function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=parseInt(t[0]);return i<1073741824?v.pad(i+1,t[0].length)+t[1]:v.format("{0}{1}.1",t[0],t[1])}):v.format("{0}.1",e)}function $(e,t){if(!(t=X(t))||0===t.length||/^\s+$/.test(t))return r.localize(61,null);if("/"===t[0]||"\\"===t[0])return r.localize(62,null);var n=t.split(/[\\/]/).filter(function(e){return!!e});if(!!e.getChild(t))return r.localize(63,null,t);if(n.some(function(e){return!u.isValidBasename(e)}))return r.localize(64,null,Y(t));if(s.isWindows){if(t.length+e.resource.fsPath.length+1>255)return r.localize(65,null,Y(t))}return null}function Y(e){return e&&e.length>255?e.substr(0,255)+"...":e}function X(e){return e?(e=v.trim(e,"\t"),e=v.rtrim(e,"."),e=v.rtrim(e,"/"),e=v.rtrim(e,"\\")):e}function Q(e,t){var n=e,i=n.getFocus(),r=n.getSelection();return{stat:i,selection:r&&r.indexOf(i)>=0?r:[],
viewletState:t.getActiveViewlet().getViewletState()}}function Z(e,t){var n=e.get(A.IInstantiationService),r=e.get(B.IListService),o=e.get(D.IViewletService),s=o.getActiveViewlet(),a=i.TPromise.as(s);return s&&s.getId()===_.VIEWLET_ID||(a=o.openViewlet(_.VIEWLET_ID,!0)),a.then(function(e){var i=e.getExplorerView();if(i&&i.isVisible()&&i.isExpanded()){i.focus();var s=Q(r.lastFocusedList,o);return n.createInstance(t,r.lastFocusedList,s.stat).run(s)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.NEW_FILE_COMMAND_ID="explorer.newFile",t.NEW_FILE_LABEL=r.localize(0,null),t.NEW_FOLDER_COMMAND_ID="explorer.newFolder",t.NEW_FOLDER_LABEL=r.localize(1,null),t.TRIGGER_RENAME_LABEL=r.localize(2,null),t.MOVE_FILE_TO_TRASH_LABEL=r.localize(3,null),t.COPY_FILE_LABEL=r.localize(4,null),t.PASTE_FILE_LABEL=r.localize(5,null),t.FileCopiedContext=new V.RawContextKey("fileCopied",!1);var J=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._notificationService=i,r}return n(t,e),
Object.defineProperty(t.prototype,"notificationService",{get:function(){return this._notificationService},enumerable:!0,configurable:!0}),t.prototype.onError=function(e){"string"===e.message&&(e=e.message),this._notificationService.error(g.toErrorMessage(e,!1))},t.prototype.onErrorWithRetry=function(e,t){this._notificationService.prompt(K.Severity.Error,g.toErrorMessage(e,!1),[{label:r.localize(6,null),run:function(){return t()}}])},t}(y.Action);t.BaseErrorReportingAction=J;var ee=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,r)||this;return s.fileService=i,s.textFileService=o,s.enabled=!1,s}return n(t,e),t.prototype._isEnabled=function(){return!0},t.prototype._updateEnablement=function(){this.enabled=!(!this.fileService||!this._isEnabled())},t=a([l(2,E.IFileService),l(3,K.INotificationService),l(4,C.ITextFileService)],t)}(J);t.BaseFileAction=ee;var te=function(e){function o(n,i,r,s,a,c){var l=e.call(this,o.ID,t.TRIGGER_RENAME_LABEL,r,s,a)||this;return l.tree=n,l.element=i,
l.renameAction=c.createInstance(ie,i),l._updateEnablement(),l}return n(o,e),o.prototype.validateFileName=function(e){var t=e.split(/[\\/]/).filter(function(e){return!!e});if(t.length>1){if(0===(s.isLinux?v.compare:v.compareIgnoreCase)(t[0],this.element.name))return r.localize(7,null)}return this.renameAction.validateFileName(this.element.parent,e)},o.prototype.run=function(e){var t=this;if(!e)return i.TPromise.wrapError(new Error("No context provided to BaseEnableFileRenameAction."));var n=e.viewletState;if(!n)return i.TPromise.wrapError(new Error("Invalid viewlet state provided to BaseEnableFileRenameAction."));var r=e.stat;if(!r)return i.TPromise.wrapError(new Error("Invalid stat provided to BaseEnableFileRenameAction."));n.setEditable(r,{action:this.renameAction,validator:function(e){var n=t.validateFileName(e);return n?{content:n,formatContent:!0,type:b.MessageType.ERROR}:null}}),this.tree.refresh(r,!1).then(function(){t.tree.setHighlight(r);var e=t.tree.onDidChangeHighlight(function(i){
i.highlight||(n.clearEditable(r),t.tree.refresh(r).done(null,f.onUnexpectedError),e.dispose())})}).done(null,f.onUnexpectedError)},o.ID="renameFile",o=a([l(2,E.IFileService),l(3,K.INotificationService),l(4,C.ITextFileService),l(5,A.IInstantiationService)],o)}(ee),ne=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,r,o,s)||this;return a.element=i,a}return n(t,e),t.prototype._isEnabled=function(){return e.prototype._isEnabled.call(this)&&this.element&&!this.element.isReadonly},t.prototype.run=function(e){var t=this;if(!e)return i.TPromise.wrapError(new Error("No context provided to BaseRenameFileAction."));var n=e.value;if(!n)return i.TPromise.wrapError(new Error("No new name provided to BaseRenameFileAction."));if((n=X(n))===X(this.element.name)||this.validateFileName(this.element.parent,n))return i.TPromise.as(null);return this.runAction(n).then(null,function(e){t.onError(e)})},t.prototype.validateFileName=function(e,t){var n=this.element.name,i=t;return s.isLinux||(n=n.toLowerCase(),
i=i.toLowerCase()),X(n)===X(i)?null:$(e,t)},t=a([l(3,E.IFileService),l(4,K.INotificationService),l(5,C.ITextFileService)],t)}(ee);t.BaseRenameAction=ne;var ie=function(e){function t(n,i,o,s){var a=e.call(this,t.ID,r.localize(8,null),n,i,o,s)||this;return a._updateEnablement(),a}return n(t,e),t.prototype.runAction=function(e){var t=this.element.parent.resource,n=t.with({path:u.join(t.path,e)});return this.textFileService.move(this.element.resource,n)},t.ID="workbench.files.action.renameFile",t=a([l(1,E.IFileService),l(2,K.INotificationService),l(3,C.ITextFileService)],t)}(ne),re=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,t,n,a,c,l)||this;return s&&(u.presetFolder=s.isDirectory?s:s.parent),u.tree=i,u.isFile=r,u.renameAction=o,u}return n(t,e),t.prototype.run=function(e){var t=this;if(!e)return i.TPromise.wrapError(new Error("No context provided to BaseNewAction."));var n=e.viewletState;if(!n)return i.TPromise.wrapError(new Error("Invalid viewlet state provided to BaseNewAction."))
;var r=this.presetFolder;if(!r){var o=this.tree.getFocus();if(o)r=o.isDirectory?o:o.parent;else{var s=this.tree.getInput();r=s instanceof I.Model?s.roots[0]:s}}return r?r.isReadonly?i.TPromise.wrapError(new Error("Parent folder is readonly.")):r.getChild(I.NewStatPlaceholder.NAME)?i.TPromise.as(new Error("Parent folder is already in the process of creating a file")):this.tree.reveal(r,.5).then(function(){return t.tree.expand(r).then(function(){var e=I.NewStatPlaceholder.addNewStatPlaceholder(r,!t.isFile);return t.renameAction.element=e,n.setEditable(e,{action:t.renameAction,validator:function(e){var n=t.renameAction.validateFileName(r,e);return n?{content:n,formatContent:!0,type:b.MessageType.ERROR}:null}}),t.tree.refresh(r).then(function(){return t.tree.expand(r).then(function(){return t.tree.reveal(e,.5).then(function(){t.tree.setHighlight(e);var n=t.tree.onDidChangeHighlight(function(i){i.highlight||(e.destroy(),t.tree.refresh(r).done(null,f.onUnexpectedError),n.dispose())})})})})})
}):i.TPromise.wrapError(new Error("Invalid parent folder to create."))},t=a([l(6,E.IFileService),l(7,K.INotificationService),l(8,C.ITextFileService)],t)}(ee);t.BaseNewAction=re;var oe=function(e){function i(n,i,r,o,s,a){var c=e.call(this,"explorer.newFile",t.NEW_FILE_LABEL,n,!0,a.createInstance(le,i),null,r,o,s)||this;return c.class="explorer-action new-file",c._updateEnablement(),c}return n(i,e),i=a([l(2,E.IFileService),l(3,K.INotificationService),l(4,C.ITextFileService),l(5,A.IInstantiationService)],i)}(re);t.NewFileAction=oe;var se=function(e){function i(n,i,r,o,s,a){var c=e.call(this,"explorer.newFolder",t.NEW_FOLDER_LABEL,n,!1,a.createInstance(ue,i),null,r,o,s)||this;return c.class="explorer-action new-folder",c._updateEnablement(),c}return n(i,e),i=a([l(2,E.IFileService),l(3,K.INotificationService),l(4,C.ITextFileService),l(5,A.IInstantiationService)],i)}(re);t.NewFolderAction=se;var ae=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.editorService=i,r}return n(t,e),
t.prototype.run=function(){return this.editorService.openEditor({options:{pinned:!0}})},t.ID="workbench.action.files.newUntitledFile",t.LABEL=r.localize(9,null),t=a([l(2,U.IEditorService)],t)}(y.Action);t.GlobalNewUntitledFileAction=ae;var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.validateFileName=function(t,n){return this.element instanceof I.NewStatPlaceholder?$(t,n):e.prototype.validateFileName.call(this,t,n)},t}(ne);t.BaseCreateAction=ce;var le=function(e){function t(n,i,r,o,s){var a=e.call(this,t.ID,t.LABEL,n,i,o,s)||this;return a.editorService=r,a._updateEnablement(),a}return n(t,e),t.prototype.runAction=function(e){var t=this,n=this.element.parent.resource;return this.fileService.createFile(n.with({path:u.join(n.path,e)})).then(function(e){return t.editorService.openEditor({resource:e.resource,options:{pinned:!0}})},function(n){t.onErrorWithRetry(n,function(){return t.runAction(e)})})},t.ID="workbench.files.action.createFileFromExplorer",
t.LABEL=r.localize(10,null),t=a([l(1,E.IFileService),l(2,U.IEditorService),l(3,K.INotificationService),l(4,C.ITextFileService)],t)}(ce),ue=function(e){function t(n,i,r,o){var s=e.call(this,t.ID,t.LABEL,null,i,r,o)||this;return s._updateEnablement(),s}return n(t,e),t.prototype.runAction=function(e){var t=this,n=this.element.parent.resource;return this.fileService.createFolder(n.with({path:u.join(n.path,e)})).then(null,function(n){t.onErrorWithRetry(n,function(){return t.runAction(e)})})},t.ID="workbench.files.action.createFolderFromExplorer",t.LABEL=r.localize(11,null),t=a([l(1,E.IFileService),l(2,K.INotificationService),l(3,C.ITextFileService)],t)}(ce),de=function(e){function o(n,i,r,o,s,a,c,l){var d=e.call(this,"moveFileToTrash",t.MOVE_FILE_TO_TRASH_LABEL,o,s,c)||this;return d.tree=n,d.elements=i,d.useTrash=r,d.dialogService=a,d.configurationService=l,d.tree=n,d.useTrash=r&&i.every(function(e){return!u.isUNC(e.resource.fsPath)}),d._updateEnablement(),d}return n(o,e),o.prototype._isEnabled=function(){
return e.prototype._isEnabled.call(this)&&this.elements&&this.elements.every(function(e){return!e.isReadonly})},o.prototype.run=function(){var e=this;this.tree&&this.tree.clearHighlight();var t;t=this.useTrash?s.isWindows?r.localize(12,null):r.localize(13,null):r.localize(14,null);var n=d.distinctParents(this.elements,function(e){return e.resource}),a=i.TPromise.as(!0),c=this.textFileService.getDirty().filter(function(e){return n.some(function(t){return d.isEqualOrParent(e,t.resource,!s.isLinux)})});if(c.length){var l=void 0;l=n.length>1?r.localize(15,null):n[0].isDirectory?1===c.length?r.localize(16,null):r.localize(17,null,c.length):r.localize(18,null),a=this.dialogService.confirm({message:l,type:"warning",detail:r.localize(19,null),primaryButton:t}).then(function(t){return!!t.confirmed&&(e.skipConfirm=!0,e.textFileService.revertAll(c).then(function(){return!0}))})}return a.then(function(a){if(!a)return null;var c
;if(e.skipConfirm||e.useTrash&&!1===e.configurationService.getValue(o.CONFIRM_DELETE_SETTING_KEY))c=i.TPromise.as({confirmed:!0});else if(e.useTrash){l=e.getMoveToTrashMessage(n);c=e.dialogService.confirm({message:l,detail:s.isWindows?r.localize(20,null):r.localize(21,null),primaryButton:t,checkbox:{label:r.localize(22,null)},type:"question"})}else{var l=e.getDeleteMessage(n);c=e.dialogService.confirm({message:l,detail:r.localize(23,null),primaryButton:t,type:"warning"})}return c.then(function(t){var a=i.TPromise.as(void 0);return t.confirmed&&!0===t.checkboxChecked&&(a=e.configurationService.updateValue(o.CONFIRM_DELETE_SETTING_KEY,!1,M.ConfigurationTarget.USER)),a.then(function(){if(!t.confirmed)return i.TPromise.as(null);return i.TPromise.join(n.map(function(t){return e.fileService.del(t.resource,{useTrash:e.useTrash,recursive:!0})})).then(function(){n[0].parent&&e.tree.setFocus(n[0].parent)},function(t){var n,o,a;return e.useTrash?(n=s.isWindows?r.localize(24,null):r.localize(25,null),
o=r.localize(26,null),a=r.localize(27,null)):(n=g.toErrorMessage(t,!1),a=r.localize(28,null)),e.dialogService.confirm({message:n,detail:o,type:"warning",primaryButton:a}).then(function(t){return e.tree.domFocus(),t.confirmed?(e.useTrash&&(e.useTrash=!1),e.skipConfirm=!0,e.run()):i.TPromise.as(void 0)})})})})})},o.prototype.getMoveToTrashMessage=function(e){return this.containsBothDirectoryAndFile(e)?H.getConfirmMessage(r.localize(29,null,e.length),e.map(function(e){return e.resource})):e.length>1?e[0].isDirectory?H.getConfirmMessage(r.localize(30,null,e.length),e.map(function(e){return e.resource})):H.getConfirmMessage(r.localize(31,null,e.length),e.map(function(e){return e.resource})):e[0].isDirectory?r.localize(32,null,e[0].name):r.localize(33,null,e[0].name)},o.prototype.getDeleteMessage=function(e){return this.containsBothDirectoryAndFile(e)?H.getConfirmMessage(r.localize(34,null,e.length),e.map(function(e){return e.resource
})):e.length>1?e[0].isDirectory?H.getConfirmMessage(r.localize(35,null,e.length),e.map(function(e){return e.resource})):H.getConfirmMessage(r.localize(36,null,e.length),e.map(function(e){return e.resource})):e[0].isDirectory?r.localize(37,null,e[0].name):r.localize(38,null,e[0].name)},o.prototype.containsBothDirectoryAndFile=function(e){var t=e.filter(function(e){return e.isDirectory}),n=e.filter(function(e){return!e.isDirectory});return t.length>0&&n.length>0},o.CONFIRM_DELETE_SETTING_KEY="explorer.confirmDelete",o=a([l(3,E.IFileService),l(4,K.INotificationService),l(5,H.IDialogService),l(6,C.ITextFileService),l(7,M.IConfigurationService)],o)}(ee),he=function(e){function t(t,n,i,o,s,a,c,l){var u=e.call(this,"workbench.files.action.addFile",r.localize(39,null),o,c,l)||this;return u.editorService=s,u.dialogService=a,u.tree=t,u.element=n,i&&(u.class=i),u._updateEnablement(),u}return n(t,e),t.prototype.run=function(e){var t=this;return i.TPromise.as(null).then(function(){if(e&&e.length>0){var n
;if(t.element)n=t.element;else{var o=t.tree.getInput();n=t.tree.getFocus()||(o instanceof I.Model?o.roots[0]:o)}return n.isDirectory||(n=n.parent),t.fileService.resolveFile(n.resource).then(function(o){var a=new Set;o.children.forEach(function(e){a.add(s.isLinux?e.name:e.name.toLowerCase())});var l=i.TPromise.as({confirmed:!0});if(e.some(function(e){return a.has(s.isLinux?u.basename(e.fsPath):u.basename(e.fsPath).toLowerCase())})){var d={message:r.localize(40,null),detail:r.localize(41,null),primaryButton:r.localize(42,null),type:"warning"};l=t.dialogService.confirm(d)}return l.then(function(r){if(r.confirmed){var o=[];return e.forEach(function(r){o.push(function(){var o=r,s=n.resource.with({path:u.join(n.resource.path,u.basename(o.path))}),a=i.TPromise.wrap(null);return t.textFileService.isDirty(s)&&(a=t.textFileService.revertAll([s],{soft:!0})),a.then(function(){var i=n.resource.with({path:p.posix.join(n.resource.path,p.posix.basename(o.path))});return t.fileService.copyFile(o,i,!0).then(function(n){
1===e.length&&t.editorService.openEditor({resource:n.resource,options:{pinned:!0}})},function(e){return t.onError(e)})})})}),c.sequence(o)}})})}}).then(function(){t.tree.clearHighlight()},function(e){t.onError(e),t.tree.clearHighlight()})},t=a([l(3,E.IFileService),l(4,U.IEditorService),l(5,H.IDialogService),l(6,K.INotificationService),l(7,C.ITextFileService)],t)}(ee);t.AddFilesAction=he;var pe=function(e){function r(n,i,r,o,s,a,c){var l=e.call(this,"filesExplorer.copy",t.COPY_FILE_LABEL,r,o,s)||this;return l.elements=i,l.clipboardService=c,l.tree=n,l._updateEnablement(),l}return n(r,e),r.prototype.run=function(){return this.clipboardService.writeResources(this.elements.map(function(e){return e.resource})),this.tree&&this.tree.clearHighlight(),this.tree.domFocus(),i.TPromise.as(null)},r=a([l(2,E.IFileService),l(3,K.INotificationService),l(4,C.ITextFileService),l(5,V.IContextKeyService),l(6,P.IClipboardService)],r)}(ee),fe=function(e){function i(n,r,o,s,a,c){
var l=e.call(this,i.ID,t.PASTE_FILE_LABEL,o,s,a)||this;if(l.editorService=c,l.tree=n,l.element=r,!l.element){var u=l.tree.getInput();l.element=u instanceof I.Model?u.roots[0]:u}return l._updateEnablement(),l}return n(i,e),i.prototype.run=function(e){var t=this;if(this.element.resource.toString()!==e.toString()&&d.isEqualOrParent(this.element.resource,e,!s.isLinux))throw new Error(r.localize(43,null));return this.fileService.resolveFile(e).then(function(n){t.tree&&t.tree.clearHighlight();var i,r=j(i=t.element.resource.toString()===e.toString()?t.element.parent:t.element.isDirectory?t.element:t.element.parent,{resource:e,isDirectory:n.isDirectory});return t.fileService.copyFile(e,r).then(function(e){if(!e.isDirectory)return t.editorService.openEditor({resource:e.resource,options:{pinned:!0}})},function(e){return t.onError(e)}).then(function(){t.tree.domFocus()})},function(e){t.onError(new Error(r.localize(44,null)))})},i.ID="filesExplorer.paste",
i=a([l(2,E.IFileService),l(3,K.INotificationService),l(4,C.ITextFileService),l(5,U.IEditorService)],i)}(ee),ge=function(e){function t(t,n,i,o,s,a,c){var l=e.call(this,"workbench.files.action.duplicateFile",r.localize(45,null),o,a,c)||this;return l.editorService=s,l.tree=t,l.element=n,l.target=i&&i.isDirectory?i:n.parent,l._updateEnablement(),l}return n(t,e),t.prototype.run=function(){var e=this;this.tree&&this.tree.clearHighlight();return this.fileService.copyFile(this.element.resource,j(this.target,{resource:this.element.resource,isDirectory:this.element.isDirectory})).then(function(t){if(!t.isDirectory)return e.editorService.openEditor({resource:t.resource,options:{pinned:!0}})},function(t){return e.onError(t)})},t=a([l(3,E.IFileService),l(4,U.IEditorService),l(5,K.INotificationService),l(6,C.ITextFileService)],t)}(ee);t.DuplicateFileAction=ge,t.incrementFileName=q;var ve=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.quickOpenService=i,s.editorService=r,s.notificationService=o,s}
return n(t,e),t.prototype.run=function(){var e=this,t=this.editorService.activeEditor,n=t?t.getResource():void 0;if(n){var o=this.editorService.overrideOpenEditor(function(t,i,r){o.dispose();var s=t.getResource();if(s)return{override:e.editorService.openEditor({leftResource:n,rightResource:s}).then(function(){})}});this.quickOpenService.show("",{autoFocus:{autoFocusSecondEntry:!0}}).then(function(){o.dispose()})}else this.notificationService.info(r.localize(47,null));return i.TPromise.as(!0)},t.ID="workbench.files.action.compareFileWith",t.LABEL=r.localize(46,null),t=a([l(2,k.IQuickOpenService),l(3,U.IEditorService),l(4,K.INotificationService)],t)}(y.Action);t.GlobalCompareResourcesAction=ve;var me=function(e){function t(t,n){return e.call(this,"workbench.files.action.refreshFilesExplorer",r.localize(48,null),n,!0,function(e){return t.refresh()})||this}return n(t,e),t}(y.Action);t.RefreshViewExplorerAction=me;var ye=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.configurationService=i,r}
return n(t,e),t.prototype.run=function(){var e=this.configurationService.inspect("files.autoSave"),t=e.user;o.isUndefinedOrNull(t)&&(t=e.default);var n;return n=[E.AutoSaveConfiguration.AFTER_DELAY,E.AutoSaveConfiguration.ON_FOCUS_CHANGE,E.AutoSaveConfiguration.ON_WINDOW_CHANGE].some(function(e){return e===t})?E.AutoSaveConfiguration.OFF:E.AutoSaveConfiguration.AFTER_DELAY,this.configurationService.updateValue("files.autoSave",n,M.ConfigurationTarget.USER)},t.ID="workbench.action.toggleAutoSave",t.LABEL=r.localize(49,null),t=a([l(2,M.IConfigurationService)],t)}(y.Action);t.ToggleAutoSaveAction=ye;var be=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n,s)||this;return a.textFileService=i,a.untitledEditorService=r,a.commandService=o,a.toDispose=[],a.lastIsDirty=a.textFileService.isDirty(),a.enabled=a.lastIsDirty,a.registerListeners(),a}return n(t,e),t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.textFileService.models.onModelsDirty(function(t){return e.updateEnablement(!0)
})),this.toDispose.push(this.textFileService.models.onModelsSaved(function(t){return e.updateEnablement(!1)})),this.toDispose.push(this.textFileService.models.onModelsReverted(function(t){return e.updateEnablement(!1)})),this.toDispose.push(this.textFileService.models.onModelsSaveError(function(t){return e.updateEnablement(!0)})),this.includeUntitled()&&this.toDispose.push(this.untitledEditorService.onDidChangeDirty(function(t){return e.updateEnablement(e.untitledEditorService.isDirty(t))}))},t.prototype.updateEnablement=function(e){this.lastIsDirty!==e&&(this.enabled=this.textFileService.isDirty(),this.lastIsDirty=this.enabled)},t.prototype.run=function(e){var t=this;return this.doRun(e).then(function(){return!0},function(e){return t.onError(e),null})},t.prototype.dispose=function(){this.toDispose=S.dispose(this.toDispose),e.prototype.dispose.call(this)},t=a([l(2,C.ITextFileService),l(3,T.IUntitledEditorService),l(4,W.ICommandService),l(5,K.INotificationService)],t)}(J);t.BaseSaveAllAction=be
;var Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"class",{get:function(){return"explorer-action save-all"},enumerable:!0,configurable:!0}),t.prototype.doRun=function(e){return this.commandService.executeCommand(R.SAVE_ALL_COMMAND_ID)},t.prototype.includeUntitled=function(){return!0},t.ID="workbench.action.files.saveAll",t.LABEL=R.SAVE_ALL_LABEL,t}(be);t.SaveAllAction=Se;var _e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"class",{get:function(){return"explorer-action save-all"},enumerable:!0,configurable:!0}),t.prototype.doRun=function(e){return this.commandService.executeCommand(R.SAVE_ALL_IN_GROUP_COMMAND_ID,{},e)},t.prototype.includeUntitled=function(){return!0},t.ID="workbench.files.action.saveAllInGroup",t.LABEL=r.localize(50,null),t}(be);t.SaveAllInGroupAction=_e;var Ce=function(e){function t(t,n,i){var r=e.call(this,t,n,"action-close-all-files")||this
;return r.commandService=i,r}return n(t,e),t.prototype.run=function(e){return this.commandService.executeCommand(G.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,{},e)},t.ID="workbench.files.action.closeGroup",t.LABEL=r.localize(51,null),t=a([l(2,W.ICommandService)],t)}(y.Action);t.CloseGroupAction=Ce;var Ee=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(_.VIEWLET_ID,!0).then(function(e){var t=e.getOpenEditorsView();t&&(t.setExpanded(!0),t.getList().domFocus())})},t.ID="workbench.files.action.focusOpenEditorsView",t.LABEL=r.localize(52,null),t=a([l(2,D.IViewletService)],t)}(y.Action);t.FocusOpenEditorsView=Ee;var we=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(_.VIEWLET_ID,!0).then(function(e){var t=e.getExplorerView();t&&(t.setExpanded(!0),t.getViewer().domFocus())})},
t.ID="workbench.files.action.focusFilesExplorer",t.LABEL=r.localize(53,null),t=a([l(2,D.IViewletService)],t)}(y.Action);t.FocusFilesExplorer=we;var Ie=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.editorService=i,s.notificationService=r,s.commandService=o,s}return n(t,e),t.prototype.run=function(){var e=w.toResource(this.editorService.activeEditor,{supportSideBySide:!0});return e?this.commandService.executeCommand(R.REVEAL_IN_EXPLORER_COMMAND_ID,e):this.notificationService.info(r.localize(55,null)),i.TPromise.as(!0)},t.ID="workbench.files.action.showActiveFileInExplorer",t.LABEL=r.localize(54,null),t=a([l(2,U.IEditorService),l(3,K.INotificationService),l(4,W.ICommandService)],t)}(y.Action);t.ShowActiveFileInExplorer=Ie;var Te=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(_.VIEWLET_ID,!0).then(function(e){var t=e.getExplorerView();if(t){var n=t.getViewer();if(n){
var i=new x.CollapseAction(n,!0,null);i.run().done(),i.dispose()}}})},t.ID="workbench.files.action.collapseExplorerFolders",t.LABEL=r.localize(56,null),t=a([l(2,D.IViewletService)],t)}(y.Action);t.CollapseExplorerView=Te;var xe=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.viewletService=i,r}return n(t,e),t.prototype.run=function(){return this.viewletService.openViewlet(_.VIEWLET_ID,!0).then(function(e){var t=e.getExplorerView();t&&t.refresh()})},t.ID="workbench.files.action.refreshFilesExplorer",t.LABEL=r.localize(57,null),t=a([l(2,D.IViewletService)],t)}(y.Action);t.RefreshExplorerView=xe;var ke=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.editorService=i,s.windowService=r,s.notificationService=o,s}return n(t,e),t.prototype.run=function(){var e=w.toResource(this.editorService.activeEditor,{supportSideBySide:!0,filter:z.Schemas.file});return e?this.windowService.openWindow([e.fsPath],{forceNewWindow:!0,forceOpenWorkspaceAsFile:!0
}):this.notificationService.info(r.localize(59,null)),i.TPromise.as(!0)},t.ID="workbench.action.files.showOpenedFileInNewWindow",t.LABEL=r.localize(58,null),t=a([l(2,U.IEditorService),l(3,L.IWindowService),l(4,K.INotificationService)],t)}(y.Action);t.ShowOpenedFileInNewWindow=ke;var De=function(e){function t(n,i){var r=e.call(this,"copyFilePath",t.LABEL)||this;return r.resource=n,r.commandService=i,r.order=140,r}return n(t,e),t.prototype.run=function(){return this.commandService.executeCommand(R.COPY_PATH_COMMAND_ID,this.resource)},t.LABEL=r.localize(60,null),t=a([l(1,W.ICommandService)],t)}(y.Action);t.CopyPathAction=De,t.validateFileName=$,t.getWellFormedFileName=X;var Ae=function(e){function t(t,n,i,r,o,s){var a=e.call(this,t,n)||this;return a.editorService=i,a.instantiationService=r,a.textModelService=o,a.fileService=s,a.enabled=!0,a}return n(t,e),t.prototype.run=function(){var e=this,n=w.toResource(this.editorService.activeEditor,{supportSideBySide:!0})
;if(n&&(this.fileService.canHandleResource(n)||n.scheme===z.Schemas.untitled)){if(!this.registrationDisposal){var o=this.instantiationService.createInstance(Re);this.registrationDisposal=this.textModelService.registerTextModelContentProvider(t.SCHEME,o)}var s=u.basename(n.fsPath),a=r.localize(67,null,s),l=function(){e.registrationDisposal=S.dispose(e.registrationDisposal)};return c.always(this.editorService.openEditor({leftResource:h.default.from({scheme:t.SCHEME,path:n.fsPath}),rightResource:n,label:a}),l)}return i.TPromise.as(!0)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.registrationDisposal=S.dispose(this.registrationDisposal)},t.ID="workbench.files.action.compareWithClipboard",t.LABEL=r.localize(66,null),t.SCHEME="clipboardCompare",t=a([l(2,U.IEditorService),l(3,A.IInstantiationService),l(4,O.ITextModelService),l(5,E.IFileService)],t)}(y.Action);t.CompareWithClipboardAction=Ae;var Le,Re=function(){function e(e,t,n){this.clipboardService=e,this.modeService=t,this.modelService=n}
return e.prototype.provideTextContent=function(e){var t=this.modelService.createModel(this.clipboardService.readText(),this.modeService.getOrCreateMode("text/plain"),e);return i.TPromise.as(t)},e=a([l(0,P.IClipboardService),l(1,N.IModeService),l(2,F.IModelService)],e)}();Le||(Le=m.register("FileActionsDiagnostics",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.log(e[1]+" - "+e[0]+" (time: "+e[2].getTime()+" ["+e[2].toUTCString()+"])")})),W.CommandsRegistry.registerCommand({id:t.NEW_FILE_COMMAND_ID,handler:function(e){return Z(e,oe)}}),W.CommandsRegistry.registerCommand({id:t.NEW_FOLDER_COMMAND_ID,handler:function(e){return Z(e,se)}}),t.renameHandler=function(e){var t=e.get(A.IInstantiationService),n=e.get(B.IListService),i=Q(n.lastFocusedList,e.get(D.IViewletService));return t.createInstance(te,n.lastFocusedList,i.stat).run(i)},t.moveFileToTrashHandler=function(e){
var t=e.get(A.IInstantiationService),n=e.get(B.IListService),i=Q(n.lastFocusedList,e.get(D.IViewletService)),r=i.selection.length>1?i.selection:[i.stat];return t.createInstance(de,n.lastFocusedList,r,!0).run()},t.deleteFileHandler=function(e){var t=e.get(A.IInstantiationService),n=e.get(B.IListService),i=Q(n.lastFocusedList,e.get(D.IViewletService)),r=i.selection.length>1?i.selection:[i.stat];return t.createInstance(de,n.lastFocusedList,r,!1).run()},t.copyFileHandler=function(e){var t=e.get(A.IInstantiationService),n=e.get(B.IListService),i=Q(n.lastFocusedList,e.get(D.IViewletService)),r=i.selection.length>1?i.selection:[i.stat];return t.createInstance(pe,n.lastFocusedList,r).run()},t.pasteFileHandler=function(e){var t=e.get(A.IInstantiationService),n=e.get(B.IListService),r=e.get(P.IClipboardService),o=Q(n.lastFocusedList,e.get(D.IViewletService));return i.TPromise.join(d.distinctParents(r.readResources(),function(e){return e}).map(function(e){return t.createInstance(fe,n.lastFocusedList,o.stat).run(e)}))}
}),define(e[551],t([1,0,4,650,9,126,25,23,10,33,48,6,5,294,72,50,211,161,15,96,293,47,306,66,22,88,34,31,36,7,21]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O){"use strict";function M(){for(;F.length>0;)F.pop().close()}Object.defineProperty(t,"__esModule",{value:!0}),t.CONFLICT_RESOLUTION_CONTEXT="saveConflictResolutionContext",t.CONFLICT_RESOLUTION_SCHEME="conflictResolution";var P=r.localize(0,null),N=function(){function e(e,n,i,r,o,s,a){this.notificationService=e,this.textFileService=n,this.editorService=r,this.instantiationService=s,this.storageService=a,this.toUnbind=[],this.messages=new y.ResourceMap,this.conflictResolutionContext=new _.RawContextKey(t.CONFLICT_RESOLUTION_CONTEXT,!1).bindTo(i);var c=s.createInstance(C.FileOnDiskContentProvider);this.toUnbind.push(c);var l=o.registerTextModelContentProvider(t.CONFLICT_RESOLUTION_SCHEME,c);this.toUnbind.push(l),v.TextFileEditorModel.setSaveErrorHandler(this),this.registerListeners()}
return e.prototype.registerListeners=function(){var e=this;this.toUnbind.push(this.textFileService.models.onModelSaved(function(t){return e.onFileSavedOrReverted(t.resource)})),this.toUnbind.push(this.textFileService.models.onModelReverted(function(t){return e.onFileSavedOrReverted(t.resource)})),this.toUnbind.push(this.editorService.onDidActiveEditorChange(function(){return e.onActiveEditorChanged()}))},e.prototype.onActiveEditorChanged=function(){var e,n=!1,i=this.editorService.activeEditor;if(i instanceof b.DiffEditorInput&&i.originalInput instanceof S.ResourceEditorInput&&i.modifiedInput instanceof E.FileEditorInput){var r=i.originalInput.getResource();r&&r.scheme===t.CONFLICT_RESOLUTION_SCHEME&&(n=!0,e=i.modifiedInput.getResource())}this.conflictResolutionContext.set(n),this.activeConflictResolutionResource=e},e.prototype.onFileSavedOrReverted=function(e){var t=this.messages.get(e);t&&(t.close(),this.messages.delete(e))},e.prototype.onSaveError=function(e,t){var n,i=e,o=t.getResource(),a={primary:[],
secondary:[]};if(i.fileOperationResult===h.FileOperationResult.FILE_MODIFIED_SINCE)if(this.activeConflictResolutionResource&&this.activeConflictResolutionResource.toString()===t.getResource().toString()){if(this.storageService.getBoolean("learnMoreDirtyWriteError"))return;n=P,a.primary.push(this.instantiationService.createInstance(W)),a.secondary.push(this.instantiationService.createInstance(B))}else n=r.localize(1,null,c.basename(o.fsPath)),a.primary.push(this.instantiationService.createInstance(V,t));else{var l=i.fileOperationResult===h.FileOperationResult.FILE_READ_ONLY,u=l&&i.options&&i.options.overwriteReadonly,d=i.fileOperationResult===h.FileOperationResult.FILE_PERMISSION_DENIED;d||u?a.primary.push(this.instantiationService.createInstance(z,t,u)):l?a.primary.push(this.instantiationService.createInstance(H,t)):a.primary.push(this.instantiationService.createInstance(A.ExecuteCommandAction,I.SAVE_FILE_COMMAND_ID,r.localize(2,null))),
a.primary.push(this.instantiationService.createInstance(A.ExecuteCommandAction,I.SAVE_FILE_AS_COMMAND_ID,I.SAVE_FILE_AS_LABEL)),a.primary.push(this.instantiationService.createInstance(A.ExecuteCommandAction,I.REVERT_FILE_COMMAND_ID,r.localize(3,null))),n=l?u?r.localize(4,null,c.basename(o.fsPath)):r.localize(5,null,c.basename(o.fsPath)):d?r.localize(6,null,c.basename(o.fsPath)):r.localize(7,null,c.basename(o.fsPath),s.toErrorMessage(e,!1))}var p=this.notificationService.notify({severity:x.Severity.Error,message:n,actions:a});R.once(p.onDidClose)(function(){return g.dispose.apply(void 0,a.primary.concat(a.secondary))}),this.messages.set(t.getResource(),p)},e.prototype.dispose=function(){this.toUnbind=g.dispose(this.toUnbind),this.messages.clear()},e=a([l(0,x.INotificationService),l(1,p.ITextFileService),l(2,_.IContextKeyService),l(3,O.IEditorService),l(4,m.ITextModelService),l(5,f.IInstantiationService),l(6,D.IStorageService)],e)}();t.SaveErrorHandler=N;var F=[],W=function(e){function t(t){
var n=e.call(this,"workbench.files.action.resolveConflictLearnMore",r.localize(8,null))||this;return n.openerService=t,n}return n(t,e),t.prototype.run=function(){return this.openerService.open(d.default.parse("https://go.microsoft.com/fwlink/?linkid=868264"))},t=a([l(0,k.IOpenerService)],t)}(u.Action),B=function(e){function t(t){var n=e.call(this,"workbench.files.action.resolveConflictLearnMoreDoNotShowAgain",r.localize(9,null))||this;return n.storageService=t,n}return n(t,e),t.prototype.run=function(e){return this.storageService.store("learnMoreDirtyWriteError",!0),e.dispose(),i.TPromise.as(void 0)},t=a([l(0,D.IStorageService)],t)}(u.Action),V=function(e){function o(t,n,i,o,s,a){var c=e.call(this,"workbench.files.action.resolveConflict",r.localize(10,null))||this;return c.model=t,c.editorService=n,c.notificationService=i,c.instantiationService=o,c.storageService=s,c.environmentService=a,c}return n(o,e),o.prototype.run=function(){var e=this;if(!this.model.isDisposed()){
var n=this.model.getResource(),o=c.basename(n.fsPath),s=r.localize(11,null,o,o,this.environmentService.appNameLong);return this.editorService.openEditor({leftResource:d.default.from({scheme:t.CONFLICT_RESOLUTION_SCHEME,path:n.fsPath}),rightResource:n,label:s,options:{pinned:!0}}).then(function(){if(!e.storageService.getBoolean("learnMoreDirtyWriteError")){var t={primary:[],secondary:[]};t.primary.push(e.instantiationService.createInstance(W)),t.secondary.push(e.instantiationService.createInstance(B));var n=e.notificationService.notify({severity:x.Severity.Info,message:P,actions:t});R.once(n.onDidClose)(function(){return g.dispose.apply(void 0,t.primary.concat(t.secondary))}),F.push(n)}})}return i.TPromise.as(!0)},o=a([l(1,O.IEditorService),l(2,x.INotificationService),l(3,f.IInstantiationService),l(4,D.IStorageService),l(5,L.IEnvironmentService)],o)}(u.Action),z=function(e){function t(t,n){var i=e.call(this,"workbench.files.action.saveElevated",n?r.localize(12,null):r.localize(13,null))||this;return i.model=t,
i.triedToMakeWriteable=n,i}return n(t,e),t.prototype.run=function(){return this.model.isDisposed()||this.model.save({writeElevated:!0,overwriteReadonly:this.triedToMakeWriteable}).done(null,o.onUnexpectedError),i.TPromise.as(!0)},t}(u.Action),H=function(e){function t(t){var n=e.call(this,"workbench.files.action.overwrite",r.localize(14,null))||this;return n.model=t,n}return n(t,e),t.prototype.run=function(){return this.model.isDisposed()||this.model.save({overwriteReadonly:!0}).done(null,o.onUnexpectedError),i.TPromise.as(!0)},t}(u.Action);t.acceptLocalChangesCommand=function(e,t){var n=e.get(O.IEditorService),i=e.get(m.ITextModelService),r=e.get(w.IModelService),o=n.activeControl,s=o.input,a=o.group;i.createModelReference(t).then(function(e){var t=e.object,i=t.createSnapshot();return M(),t.revert().then(function(){return r.updateModel(t.textEditorModel,T.createTextBufferFactoryFromSnapshot(i)),t.save().then(function(){return n.openEditor({resource:t.getResource()},a).then(function(){a.closeEditor(s),
s.dispose(),e.dispose()})})})})},t.revertLocalChangesCommand=function(e,t){var n=e.get(O.IEditorService),i=e.get(m.ITextModelService),r=n.activeControl,o=r.input,s=r.group;i.createModelReference(t).then(function(e){var t=e.object;return M(),t.revert().then(function(){return n.openEditor({resource:t.getResource()},s).then(function(){s.closeEditor(o),o.dispose(),e.dispose()})})})}}),define(e[1563],t([1,0,651,9,11,8,4,155,74,6,305,68,12,37,35,27,17,173,176,26,69]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var I=function(e){function t(t,n,r,o,s,a,l){var u=e.call(this,c({},t,{ariaHeaderLabel:i.localize(1,null)}),o,s,l)||this;return u.themeService=n,u.instantiationService=r,u.contextService=a,u.contextService.onDidChangeWorkbenchState(function(){return u.setLabels()}),u}return n(t,e),t.prototype.renderHeader=function(e){this.titleDiv=h.$("span").text(name).appendTo(h.$("div.title").appendTo(e))},t.prototype.renderBody=function(e){var t=this
;s.addClass(e,"explorer-empty-view"),this.messageDiv=h.$("p").appendTo(h.$("div.section").appendTo(e));var n=h.$("div.section").appendTo(e);this.button=new d.Button(n.getHTMLElement()),g.attachButtonStyler(this.button,this.themeService),this.disposables.push(this.button.onDidClick(function(){var e=t.contextService.getWorkbenchState()===b.WorkbenchState.WORKSPACE?f.AddRootFolderAction:o.isMacintosh?f.OpenFileFolderAction:f.OpenFolderAction,n=t.instantiationService.createInstance(e,e.ID,e.LABEL);t.actionRunner.run(n).done(function(){n.dispose()},function(e){n.dispose(),r.onUnexpectedError(e)})})),this.disposables.push(new C.DragAndDropObserver(e,{onDrop:function(n){e.style.backgroundColor=t.themeService.getTheme().getColor(w.SIDE_BAR_BACKGROUND).toString();t.instantiationService.createInstance(C.ResourcesDropHandler,{allowWorkspaceOpen:!0}).handleDrop(n,function(){},function(e){})},onDragEnter:function(n){e.style.backgroundColor=t.themeService.getTheme().getColor(E.listDropBackground).toString()},
onDragEnd:function(){e.style.backgroundColor=t.themeService.getTheme().getColor(w.SIDE_BAR_BACKGROUND).toString()},onDragLeave:function(){e.style.backgroundColor=t.themeService.getTheme().getColor(w.SIDE_BAR_BACKGROUND).toString()},onDragOver:function(e){e.dataTransfer.dropEffect="copy"}})),this.setLabels()},t.prototype.setLabels=function(){this.contextService.getWorkbenchState()===b.WorkbenchState.WORKSPACE?(this.messageDiv.text(i.localize(2,null)),this.button&&(this.button.label=i.localize(3,null)),this.titleDiv.text(this.contextService.getWorkspace().name)):(this.messageDiv.text(i.localize(4,null)),this.button&&(this.button.label=i.localize(5,null)),this.titleDiv.text(this.title))},t.prototype.layoutBody=function(e){},t.prototype.setVisible=function(e){return u.TPromise.as(null)},t.prototype.focusBody=function(){this.button&&this.button.element.focus()},t.prototype.reveal=function(e,t){return u.TPromise.as(null)},t.prototype.getActions=function(){return[]},t.prototype.getSecondaryActions=function(){
return[]},t.prototype.getActionItem=function(e){return null},t.prototype.shutdown=function(){},t.ID="workbench.explorer.emptyView",t.NAME=i.localize(0,null),t=a([l(1,v.IThemeService),l(2,p.IInstantiationService),l(3,m.IKeybindingService),l(4,y.IContextMenuService),l(5,b.IWorkspaceContextService),l(6,S.IConfigurationService)],t)}(_.ViewletPanel);t.EmptyView=I}),define(e[552],t([1,0,4,654,24,8,59,10,303,25,70,9,23,252,118,11,148,138,5,48,33,217,337,485,117,202,46,27,17,15,35,6,119,28,31,68,12,42,190,176,58,135,182,43,14,100,22,21,143,37]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var J=function(){function e(e,t,n,i){this.progressService=e,this.notificationService=t,this.fileService=n,this.partService=i}return e.prototype.getId=function(e,t){return t instanceof k.Model?"model":t.root.resource.toString()+":"+t.getId()},e.prototype.hasChildren=function(e,t){
return t instanceof k.Model||t instanceof k.ExplorerItem&&(t.isDirectory||t.isRoot)},e.prototype.getChildren=function(e,t){var n=this;if(t instanceof k.Model)return i.TPromise.as(t.roots);if(t.isDirectoryResolved)return i.TPromise.as(t.getChildrenArray());var r=this.fileService.resolveFile(t.resource,{resolveSingleChildDescendants:!0}).then(function(e){var n=k.ExplorerItem.create(e,t.root).getChildrenArray();return n&&n.forEach(function(e){t.addChild(e)}),t.isDirectoryResolved=!0,t.getChildrenArray()},function(e){return t instanceof k.ExplorerItem&&t.isRoot||n.notificationService.error(e),[]});return this.progressService.showWhile(r,this.partService.isCreated()?800:3200),r},e.prototype.getParent=function(e,t){return t?e.getInput()===t?i.TPromise.as(null):t instanceof k.ExplorerItem&&t.parent?i.TPromise.as(t.parent):i.TPromise.as(null):i.TPromise.as(null)},e=a([l(0,P.IProgressService),l(1,Y.INotificationService),l(2,E.IFileService),l(3,D.IPartService)],e)}();t.FileDataSource=J;var ee=function(){function e(){
this.editableStats=new Map}return e.prototype.getEditableData=function(e){return this.editableStats.get(e)},e.prototype.setEditable=function(e,t){t&&this.editableStats.set(e,t)},e.prototype.clearEditable=function(e){this.editableStats.delete(e)},e}();t.FileViewletState=ee;var te=function(e){function t(t){var n=e.call(this)||this;return n.viewletState=t,n}return n(t,e),t.prototype.run=function(t,n){return e.prototype.run.call(this,t,{viewletState:this.viewletState})},t}(g.ActionRunner);t.ActionRunner=te;var ne=function(){function e(e,t,n,i,r,o){var s=this;this.contextViewService=t,this.instantiationService=n,this.themeService=i,this.configurationService=r,this.contextService=o,this.state=e,this.config=this.configurationService.getValue(),this.configListener=this.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("explorer")&&(s.config=s.configurationService.getValue())})}return e.prototype.dispose=function(){this.configListener.dispose()},e.prototype.getHeight=function(t,n){
return e.ITEM_HEIGHT},e.prototype.getTemplateId=function(t,n){return e.FILE_TEMPLATE_ID},e.prototype.disposeTemplate=function(e,t,n){n.elementDisposable.dispose(),n.label.dispose()},e.prototype.renderTemplate=function(e,t,n){return{elementDisposable:_.empty,label:this.instantiationService.createInstance(S.FileLabel,n,void 0),container:n}},e.prototype.renderElement=function(e,t,n,i){i.elementDisposable.dispose();var r=this.state.getEditableData(t);if(r)i.label.element.style.display="none",this.renderInputBox(i.container,e,t,r),i.elementDisposable=_.empty;else{i.label.element.style.display="flex";var o=["explorer-item"];i.label.setFile(t.resource,{hidePath:!0,fileKind:t.isRoot?E.FileKind.ROOT_FOLDER:t.isDirectory?E.FileKind.FOLDER:E.FileKind.FILE,extraClasses:o,fileDecorations:this.config.explorer.decorations}),i.elementDisposable=i.label.onDidRender(function(){e.updateWidth(t)})}},e.prototype.renderInputBox=function(e,t,n,i){var o=this,a=this.instantiationService.createInstance(S.FileLabel,e,void 0),l={
hidePath:!0,hideLabel:!0,fileKind:n.isRoot?E.FileKind.ROOT_FOLDER:n.isDirectory||n instanceof k.NewStatPlaceholder&&n.isDirectoryPlaceholder()?E.FileKind.FOLDER:E.FileKind.FILE,extraClasses:["explorer-item","explorer-item-edited"]};a.setFile(n.resource,l);var u=new m.InputBox(a.element,this.contextViewService,{validationOptions:{validation:i.validator},ariaLabel:r.localize(0,null)}),f=W.attachInputBoxStyler(u,this.themeService),g=p.dirname(n.resource);u.onDidChange(function(e){a.setFile(g.with({path:h.join(g.path,e)}),l)});var v=n.name||"",y=v.lastIndexOf(".");u.value=v,u.select({start:0,end:y>0&&!n.isDirectory?y:v.length}),u.focus();var b=d.once(function(n,r){t.clearHighlight(),a.element.style.display="none",n&&u.value&&i.action.run({value:u.value}),setTimeout(function(){r||t.domFocus(),_.dispose(C),e.removeChild(a.element)},0)}),C=[u,s.addStandardDisposableListener(u.inputElement,s.EventType.KEY_DOWN,function(e){e.equals(3)?u.validate()&&b(!0,!1):e.equals(9)&&b(!1,!1)
}),s.addStandardDisposableListener(u.inputElement,s.EventType.KEY_UP,function(e){var t=c.relative(n.root.resource.path,n.parent.resource.path),r="";o.contextService.getWorkbenchState()===A.WorkbenchState.WORKSPACE&&(r=h.basename(n.root.resource.path)),o.showInputMessage(u,t,r,i.action.id)}),s.addDisposableListener(u.inputElement,s.EventType.BLUR,function(){b(u.isInputValid(),!0)}),a,f]},e.prototype.showInputMessage=function(e,t,n,i){if(void 0===n&&(n=""),e.validate()){var o=e.value;if(o&&/.[\\/]./.test(o)){var s=c.normalize(c.join(n,t,o)),a=(s=q.rtrim(s,h.nativeSep)).lastIndexOf(h.nativeSep),l=s.substring(a+1),u=s.substring(0,a),d=void 0;switch(i){case"workbench.files.action.createFileFromExplorer":d=r.localize(1,null,l,u);break;case"workbench.files.action.renameFile":d=r.localize(2,null,s);break;case"workbench.files.action.createFolderFromExplorer":default:d=r.localize(3,null,l,u)}e.showMessage({type:m.MessageType.INFO,content:d,formatContent:!0})}else o&&/^\s|\s$/.test(o)?e.showMessage({
content:r.localize(4,null),formatContent:!0,type:m.MessageType.WARNING}):e.hideMessage()}},e.ITEM_HEIGHT=22,e.FILE_TEMPLATE_ID="file",e=a([l(1,O.IContextViewService),l(2,M.IInstantiationService),l(3,B.IThemeService),l(4,L.IConfigurationService),l(5,A.IWorkspaceContextService)],e)}();t.FileRenderer=ne;var ie=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return r.localize(5,null,t.name)},e}();t.FileAccessibilityProvider=ie;var re=function(e){function t(t,n,i,r,o,s,a,c){var l=e.call(this,{clickBehavior:x.ClickBehavior.ON_MOUSE_UP},c)||this;return l.editorService=t,l.contextMenuService=n,l.telemetryService=i,l.menuService=r,l.clipboardService=s,l.keybindingService=a,l.fileCopiedContextKey=w.FileCopiedContext.bindTo(o),l.toDispose=[],l}return n(t,e),t.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var r={origin:i},o="mouse"===i&&2===n.detail;if(e.getHighlight())return n.preventDefault(),n.stopPropagation(),e.clearHighlight(r),!1
;if(t instanceof k.Model)return e.clearFocus(r),e.clearSelection(r),!1;if(n&&n.browserEvent&&"mousedown"===n.browserEvent.type||n.preventDefault(),n.stopPropagation(),e.domFocus(),t instanceof k.NewStatPlaceholder)return!0;if(e.useAltAsMultipleSelectionModifier&&n.altKey||!e.useAltAsMultipleSelectionModifier&&(n.ctrlKey||n.metaKey)){var s=e.getSelection();this.previousSelectionRangeStop=void 0,s.indexOf(t)>=0?e.setSelection(s.filter(function(e){return e!==t})):(e.setSelection(s.concat(t)),e.setFocus(t,r))}else if(n.shiftKey){var a=e.getFocus();a&&(this.previousSelectionRangeStop&&e.deselectRange(t,this.previousSelectionRangeStop),e.selectRange(a,t,r),this.previousSelectionRangeStop=t)}else{(o||this.openOnSingleClick||this.isClickOnTwistie(n))&&(e.toggleExpansion(t,n.altKey),this.previousSelectionRangeStop=void 0);var c=!o;if(e.setFocus(t,r),o&&n.preventDefault(),e.setSelection([t],r),!t.isDirectory&&(o||this.openOnSingleClick)){var l=!1;n&&(l=e.useAltAsMultipleSelectionModifier?n.ctrlKey||n.metaKey:n.altKey),
this.openEditor(t,{preserveFocus:c,sideBySide:l,pinned:o})}}return!0},t.prototype.onContextMenu=function(e,t,n){var r=this;if(n.target&&n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;n.preventDefault(),n.stopPropagation(),e.setFocus(t),this.fileCopiedContextKey.set(this.clipboardService.hasResources()),this.contributedContextMenu||(this.contributedContextMenu=this.menuService.createMenu(F.MenuId.ExplorerContext,e.contextKeyService),this.toDispose.push(this.contributedContextMenu));var o={x:n.posx,y:n.posy},s=e.getSelection();return this.contextMenuService.showContextMenu({getAnchor:function(){return o},getActions:function(){var e=[];return Q.fillInContextMenuActions(r.contributedContextMenu,{arg:t instanceof k.ExplorerItem?t.resource:{},shouldForwardArgs:!0},e,r.contextMenuService),i.TPromise.as(e)},onHide:function(t){t&&e.domFocus()},getKeyBinding:function(e){return r.keybindingService.lookupKeybinding(e.id)},getActionsContext:function(){return s&&s.indexOf(t)>=0?s.map(function(e){
return e.resource}):t instanceof k.ExplorerItem?[t.resource]:[]}}),!0},t.prototype.openEditor=function(e,t){e&&!e.isDirectory&&(this.telemetryService.publicLog("workbenchActionExecuted",{id:"workbench.files.openFile",from:"explorer"}),this.editorService.openEditor({resource:e.resource,options:t},t.sideBySide?X.SIDE_GROUP:X.ACTIVE_GROUP))},t.prototype.dispose=function(){this.toDispose=_.dispose(this.toDispose)},t=a([l(0,X.IEditorService),l(1,O.IContextMenuService),l(2,N.ITelemetryService),l(3,F.IMenuService),l(4,R.IContextKeyService),l(5,U.IClipboardService),l(6,Z.IKeybindingService),l(7,L.IConfigurationService)],t)}(K.WorkbenchTreeController);t.FileController=re;var oe=function(){function e(e,t){this.configurationService=e,this.contextService=t,this.toDispose=[],this.updateSortOrder(),this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){return e.updateSortOrder()}))},
e.prototype.updateSortOrder=function(){this.sortOrder=this.configurationService.getValue("explorer.sortOrder")||"default"},e.prototype.compare=function(e,t,n){if(t.isRoot)return n.isRoot?this.contextService.getWorkspaceFolder(t.resource).index-this.contextService.getWorkspaceFolder(n.resource).index:-1;if(n.isRoot)return 1;switch(this.sortOrder){case"type":if(t.isDirectory&&!n.isDirectory)return-1;if(n.isDirectory&&!t.isDirectory)return 1;if(t.isDirectory&&n.isDirectory)return v.compareFileNames(t.name,n.name);break;case"filesFirst":if(t.isDirectory&&!n.isDirectory)return 1;if(n.isDirectory&&!t.isDirectory)return-1;break;case"mixed":break;default:if(t.isDirectory&&!n.isDirectory)return-1;if(n.isDirectory&&!t.isDirectory)return 1}if(t instanceof k.NewStatPlaceholder)return-1;if(n instanceof k.NewStatPlaceholder)return 1;switch(this.sortOrder){case"type":return v.compareFileExtensions(t.name,n.name);case"modified":return t.mtime!==n.mtime?t.mtime<n.mtime?1:-1:v.compareFileNames(t.name,n.name);default:
return v.compareFileNames(t.name,n.name)}},e.prototype.dispose=function(){this.toDispose=_.dispose(this.toDispose)},e=a([l(0,L.IConfigurationService),l(1,A.IWorkspaceContextService)],e)}();t.FileSorter=oe;var se=function(){function e(e,t){this.contextService=e,this.configurationService=t,this.hiddenExpressionPerRoot=new Map,this.registerListeners()}return e.prototype.registerListeners=function(){var e=this;this.workspaceFolderChangeListener=this.contextService.onDidChangeWorkspaceFolders(function(){return e.updateConfiguration()})},e.prototype.updateConfiguration=function(){var e=this,t=!1;return this.contextService.getWorkspace().folders.forEach(function(n){var i=e.configurationService.getValue({resource:n.uri}),r=i&&i.files&&i.files.exclude||Object.create(null);t=t||!o.equals(e.hiddenExpressionPerRoot.get(n.uri.toString()),r),e.hiddenExpressionPerRoot.set(n.uri.toString(),o.deepClone(r))}),t},e.prototype.isVisible=function(e,t){return this.doIsVisible(t)},e.prototype.doIsVisible=function(t){
if(t instanceof k.NewStatPlaceholder||t.isRoot)return!0;var n,i=t.parent&&t.parent.getChildrenCount();n=i&&i>e.MAX_SIBLINGS_FILTER_THRESHOLD?function(){}:function(){return t.parent?t.parent.getChildrenNames():void 0};var r=this.hiddenExpressionPerRoot.get(t.root.resource.toString())||Object.create(null);return!b.match(r,h.normalize(c.relative(t.root.resource.path,t.resource.path),!0),n)},e.prototype.dispose=function(){this.workspaceFolderChangeListener=_.dispose(this.workspaceFolderChangeListener)},e.MAX_SIBLINGS_FILTER_THRESHOLD=2e3,e=a([l(0,A.IWorkspaceContextService),l(1,L.IConfigurationService)],e)}();t.FileFilter=se;var ae=function(e){function t(t,n,i,r,o,s,a,c,l){var u=e.call(this,function(e){return u.statToResource(e)},s)||this;return u.notificationService=t,u.dialogService=n,u.contextService=i,u.fileService=r,u.configurationService=o,u.textFileService=a,u.windowService=c,u.workspaceEditingService=l,u.toDispose=[],u.updateDropEnablement(),u.registerListeners(),u}return n(t,e),
t.prototype.statToResource=function(e){return e.isDirectory?u.default.from({scheme:"folder",path:e.resource.path}):e.resource},t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(t){return e.updateDropEnablement()}))},t.prototype.updateDropEnablement=function(){this.dropEnabled=this.configurationService.getValue("explorer.enableDragAndDrop")},t.prototype.onDragStart=function(e,t,n){var i=t.getData();if(i&&i.length){i.forEach(function(t){t.isDirectory&&e.isExpanded(t)&&e.collapse(t,!1)}),this.instantiationService.invokeFunction(H.fillResourceDataTransfers,i,n);var r=i.filter(function(e){return!e.isDirectory&&e.resource.scheme===j.Schemas.file}).map(function(e){return e.resource.fsPath});r.length&&n.dataTransfer.setData(H.CodeDataTransfers.FILES,JSON.stringify(r))}},t.prototype.onDragOver=function(e,t,n,i){if(!this.dropEnabled)return I.DRAG_OVER_REJECT
;var r=i&&(i.ctrlKey&&!y.isMacintosh||i.altKey&&y.isMacintosh),o=t instanceof T.DesktopDragAndDropData;if(o){for(var s=i.dataTransfer.types,a=[],c=0;c<s.length;c++)a.push(s[c].toLowerCase());if(-1===a.indexOf(G.DataTransfers.FILES.toLowerCase())&&-1===a.indexOf(H.CodeDataTransfers.FILES.toLowerCase()))return I.DRAG_OVER_REJECT}else{if(t instanceof T.ExternalElementsDragAndDropData)return I.DRAG_OVER_REJECT;var l=t.getData();if(n instanceof k.Model)return l[0].isRoot?I.DRAG_OVER_ACCEPT_BUBBLE_DOWN(!1):I.DRAG_OVER_REJECT;if(!Array.isArray(l))return I.DRAG_OVER_REJECT;if(l.some(function(e){return e instanceof k.NewStatPlaceholder||(!(!(e.isRoot&&n instanceof k.ExplorerItem)||n.isRoot)||(e.resource.toString()===n.resource.toString()||(!r&&p.dirname(e.resource).toString()===n.resource.toString()||!!p.isEqualOrParent(n.resource,e.resource,!y.isLinux))))}))return I.DRAG_OVER_REJECT}
return n instanceof k.Model?this.contextService.getWorkbenchState()===A.WorkbenchState.WORKSPACE?I.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY(!1):I.DRAG_OVER_REJECT:n.isDirectory?n.isReadonly?I.DRAG_OVER_REJECT:o||r?I.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY(!0):I.DRAG_OVER_ACCEPT_BUBBLE_DOWN(!0):this.contextService.getWorkspace().folders.every(function(e){return e.uri.toString()!==n.resource.toString()})?o||r?I.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY:I.DRAG_OVER_ACCEPT_BUBBLE_UP:I.DRAG_OVER_REJECT},t.prototype.drop=function(e,t,n,r){i.TPromise.as(null);(t instanceof T.DesktopDragAndDropData?this.handleExternalDrop(e,t,n,r):this.handleExplorerDrop(e,t,n,r)).done(null,f.onUnexpectedError)},t.prototype.handleExternalDrop=function(e,t,n,o){var s=this,a=H.extractResources(o.browserEvent,!0);return this.fileService.resolveFiles(a).then(function(t){s.windowService.focusWindow();var o=t.filter(function(e){return e.success&&e.stat.isDirectory}).map(function(e){return{uri:e.stat.resource}});if(o.length>0){var c=i.TPromise.wrap({confirmed:!0
});return s.contextService.getWorkbenchState()!==A.WorkbenchState.WORKSPACE&&(c=s.dialogService.confirm({message:o.length>1?r.localize(6,null):r.localize(7,null),type:"question",primaryButton:o.length>1?r.localize(8,null):r.localize(9,null)})),c.then(function(e){if(e.confirmed)return s.workspaceEditingService.addFolders(o)})}if(n instanceof k.ExplorerItem&&!n.isReadonly){return s.instantiationService.createInstance(w.AddFilesAction,e,n,null).run(a.map(function(e){return e.resource}))}})},t.prototype.handleExplorerDrop=function(e,n,o,s){var a=this,c=p.distinctParents(n.getData(),function(e){return e.resource}),l=s.ctrlKey&&!y.isMacintosh||s.altKey&&y.isMacintosh;return(!l&&this.configurationService.getValue(t.CONFIRM_DND_SETTING_KEY)?this.dialogService.confirm({message:c.length>1&&c.every(function(e){return e.isRoot})?r.localize(10,null):c.length>1?$.getConfirmMessage(r.localize(11,null,c.length),c.map(function(e){return e.resource})):c[0].isRoot?r.localize(12,null,c[0].name):r.localize(13,null,c[0].name),
checkbox:{label:r.localize(14,null)},type:"question",primaryButton:r.localize(15,null)}):i.TPromise.as({confirmed:!0})).then(function(n){var r=i.TPromise.as(void 0);return n.confirmed&&!0===n.checkboxChecked&&(r=a.configurationService.updateValue(t.CONFIRM_DND_SETTING_KEY,!1,L.ConfigurationTarget.USER)),r.then(function(){if(n.confirmed){var t=a.doHandleRootDrop(c.filter(function(e){return e.isRoot}),o);return i.TPromise.join(c.filter(function(e){return!e.isRoot}).map(function(t){return a.doHandleExplorerDrop(e,t,o,l)}).concat(t)).then(function(){})}return i.TPromise.as(void 0)})})},t.prototype.doHandleRootDrop=function(e,t){if(0===e.length)return i.TPromise.as(void 0);for(var n,r=this.contextService.getWorkspace().folders,o=[],s=[],a=function(i){var a={uri:r[i].uri};t instanceof k.ExplorerItem&&r[i].uri.toString()===t.resource.toString()&&(n=o.length),e.every(function(e){return e.resource.toString()!==r[i].uri.toString()})?o.push(a):s.push(a)},c=0;c<r.length;c++)a(c);return t instanceof k.Model&&(n=o.length),
o.splice.apply(o,[n,0].concat(s)),this.workspaceEditingService.updateFolders(0,o.length,o)},t.prototype.doHandleExplorerDrop=function(e,t,n,o){var s=this;return n instanceof k.ExplorerItem?e.expand(n).then(function(){if(!n.isReadonly){if(o)return s.instantiationService.createInstance(w.DuplicateFileAction,e,t,n).run();var i=n.resource.with({path:h.join(n.resource.path,t.name)});return s.textFileService.move(t.resource,i).then(null,function(e){if(e.fileOperationResult===E.FileOperationResult.FILE_MOVE_CONFLICT){var n={message:r.localize(16,null,t.name),detail:r.localize(17,null),primaryButton:r.localize(18,null),type:"warning"};return s.dialogService.confirm(n).then(function(e){if(e.confirmed)return s.textFileService.move(t.resource,i,!0).then(null,function(e){return s.notificationService.error(e)})})}s.notificationService.error(e)})}},f.onUnexpectedError):i.TPromise.as(void 0)},t.CONFIRM_DND_SETTING_KEY="explorer.confirmDragAndDrop",
t=a([l(0,Y.INotificationService),l(1,$.IDialogService),l(2,A.IWorkspaceContextService),l(3,E.IFileService),l(4,L.IConfigurationService),l(5,M.IInstantiationService),l(6,C.ITextFileService),l(7,V.IWindowService),l(8,z.IWorkspaceEditingService)],t)}(H.SimpleFileResourceDragAndDrop);t.FileDragAndDrop=ae}),define(e[1565],t([1,0,653,4,10,18,9,25,70,111,96,33,217,552,40,211,8,99,158,202,46,1128,27,17,37,6,119,35,15,165,509,11,240,182,43,22,21]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var z=function(e){function t(n,r,o,a,l,u,d,h,p,v,m,y,b){var S=e.call(this,c({},n,{ariaHeaderLabel:i.localize(0,null)}),v,o,y)||this;return S.notificationService=r,S.instantiationService=a,S.contextService=l,S.progressService=u,S.editorService=d,S.fileService=h,S.partService=p,S.id=t.ID,S.settings=n.viewletSettings,S.viewletState=n.viewletState,S.autoReveal=!0,
S.explorerRefreshDelayer=new s.ThrottledDelayer(t.EXPLORER_FILE_CHANGES_REFRESH_DELAY),S.resourceContext=a.createInstance(O.ResourceContextKey),S.folderContext=f.ExplorerFolderContext.bindTo(m),S.readonlyContext=f.ExplorerResourceReadonlyContext.bindTo(m),S.rootContext=f.ExplorerRootContext.bindTo(m),S.fileEventsFilter=a.createInstance(M.ResourceGlobMatcher,function(e){return S.getFileEventsExcludes(e)},function(e){return e.affectsConfiguration(g.FILES_EXCLUDE_CONFIG)}),S.decorationProvider=new I.ExplorerDecorationsProvider(S.model,l),b.registerDecorationsProvider(S.decorationProvider),S.disposables.push(S.decorationProvider),S}return n(t,e),t.prototype.getFileEventsExcludes=function(e){var t=e?{resource:e}:void 0,n=this.configurationService.getValue(t);return n&&n.files&&n.files.exclude||Object.create(null)},t.prototype.renderHeader=function(t){var n=this;e.prototype.renderHeader.call(this,t),this.dragHandler=new F.DelayedDragHandler(t,function(){return n.setExpanded(!0)})
;var i=t.querySelector(".title"),r=function(){var e=n.contextService.getWorkspace().folders.map(function(e){return e.name}).join();i.textContent=n.name,i.title=e};this.disposables.push(this.contextService.onDidChangeWorkspaceName(r)),r()},Object.defineProperty(t.prototype,"name",{get:function(){return this.contextService.getWorkspace().name},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.name},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.render=function(){var n=this;e.prototype.render.call(this);var i=this.configurationService.getValue();this.onConfigurationUpdated(i);var r=[];this.settings[t.MEMENTO_EXPANDED_FOLDER_RESOURCES]&&(r=this.settings[t.MEMENTO_EXPANDED_FOLDER_RESOURCES].map(function(e){return o.default.parse(e)})),this.doRefresh(r).then(function(){n.disposables.push(n.editorService.onDidActiveEditorChange(function(){return n.revealActiveFile()})),
n.disposables.push(n.configurationService.onDidChangeConfiguration(function(e){return n.onConfigurationUpdated(n.configurationService.getValue(),e)})),n.revealActiveFile()})},t.prototype.renderBody=function(e){var t=this;this.treeContainer=S.append(e,S.$(".explorer-folders-view")),this.tree=this.createViewer(this.treeContainer),this.toolbar&&this.toolbar.setActions(this.getActions(),this.getSecondaryActions())(),this.disposables.push(this.contextService.onDidChangeWorkspaceFolders(function(e){return t.refreshFromEvent(e.added)})),this.disposables.push(this.contextService.onDidChangeWorkbenchState(function(e){return t.refreshFromEvent()}))},t.prototype.layoutBody=function(t){this.treeContainer&&(this.treeContainer.style.height=t+"px"),e.prototype.layoutBody.call(this,t)},t.prototype.getActions=function(){var e=[];return e.push(this.instantiationService.createInstance(v.NewFileAction,this.getViewer(),null)),e.push(this.instantiationService.createInstance(v.NewFolderAction,this.getViewer(),null)),
e.push(this.instantiationService.createInstance(v.RefreshViewExplorerAction,this,"explorer-action refresh-explorer")),e.push(this.instantiationService.createInstance(_.CollapseAction,this.getViewer(),!0,"explorer-action collapse-explorer")),e},t.prototype.revealActiveFile=function(){if(this.autoReveal){var e=!0,n=!1,i=this.getActiveFile();if(i&&(this.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]=i.toString(),this.isVisible()&&!this.isDisposed&&this.contextService.isInsideWorkspace(i))){this.hasSingleSelection(i)||this.select(i).done(null,u.onUnexpectedError),e=!1}var r=this.editorService.activeEditor;r&&!y.toResource(r,{supportSideBySide:!0,filter:W.Schemas.untitled})||(this.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]=void 0,n=!0),e&&this.explorerViewer.clearSelection(),n&&this.explorerViewer.clearFocus()}},t.prototype.onConfigurationUpdated=function(e,t){if(!this.isDisposed){this.autoReveal=e&&e.explorer&&e.explorer.autoReveal;var n=!1;this.filter&&(n=this.filter.updateConfiguration())
;var i=e&&e.explorer&&e.explorer.sortOrder||"default";this.sortOrder!==i&&(this.sortOrder=i,n=!0),t&&!n&&(n=t.affectsConfiguration("explorer.decorations.colors")||t.affectsConfiguration("explorer.decorations.badges")),t&&n&&this.doRefresh().done(null,u.onUnexpectedError)}},t.prototype.focus=function(){e.prototype.focus.call(this);var t=!1;if(this.explorerViewer){if(this.autoReveal){var n=this.explorerViewer.getSelection();n.length>0&&this.reveal(n[0],.5).done(null,u.onUnexpectedError)}this.explorerViewer.domFocus(),t=!0}this.getActiveFile()||this.openFocusedElement(t)},t.prototype.setVisible=function(n){var i=this;return e.prototype.setVisible.call(this,n).then(function(){if(n){var e=r.TPromise.as(null);if(i.shouldRefresh&&(e=i.doRefresh(),i.shouldRefresh=!1),!i.autoReveal)return e;var s=i.getActiveFile();if(s)return e.then(function(){return i.select(s)});if(!i.partService.isCreated())return r.TPromise.wrap(null);var a=void 0
;return i.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]&&(a=o.default.parse(i.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE])),a&&i.isCreated&&i.model.findClosest(a)?(i.editorService.openEditor({resource:a,options:{revealIfVisible:!0}}),e):e.then(function(){i.openFocusedElement()})}})},t.prototype.openFocusedElement=function(e){var t=this.explorerViewer.getFocus();t&&!t.isDirectory&&this.editorService.openEditor({resource:t.resource,options:{preserveFocus:e,revealIfVisible:!0}})},t.prototype.getActiveFile=function(){var e=this.editorService.activeEditor;return e instanceof b.DiffEditorInput?null:y.toResource(e,{supportSideBySide:!0})},Object.defineProperty(t.prototype,"isCreated",{get:function(){return!(!this.explorerViewer||!this.explorerViewer.getInput())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){var e=this.instantiationService.createInstance(E.Model);return this.disposables.push(e),e},enumerable:!0,configurable:!0}),t.prototype.createViewer=function(e){
var t=this,n=this.instantiationService.createInstance(m.FileDataSource),r=this.instantiationService.createInstance(m.FileRenderer,this.viewletState),o=this.instantiationService.createInstance(m.FileController);this.disposables.push(o);var s=this.instantiationService.createInstance(m.FileSorter);this.disposables.push(s),this.filter=this.instantiationService.createInstance(m.FileFilter),this.disposables.push(this.filter);var a=this.instantiationService.createInstance(m.FileDragAndDrop),c=this.instantiationService.createInstance(m.FileAccessibilityProvider);return this.explorerViewer=this.instantiationService.createInstance(C.FileIconThemableWorkbenchTree,e,{dataSource:n,renderer:r,controller:o,sorter:s,filter:this.filter,dnd:a,accessibilityProvider:c},{autoExpandSingleChildren:!0,ariaLabel:i.localize(1,null)}),f.FilesExplorerFocusedContext.bindTo(this.explorerViewer.contextKeyService),f.ExplorerFocusedContext.bindTo(this.explorerViewer.contextKeyService),
this.disposables.push(this.fileService.onAfterOperation(function(e){return t.onFileOperation(e)})),this.disposables.push(this.fileService.onFileChanges(function(e){return t.onFileChanges(e)})),this.disposables.push(this.explorerViewer.onDidChangeFocus(function(e){var n=t.contextService.getWorkbenchState()===T.WorkbenchState.FOLDER,i=e.focus?e.focus.resource:n?t.contextService.getWorkspace().folders[0].uri:void 0;t.resourceContext.set(i),t.folderContext.set(n&&!e.focus||e.focus&&e.focus.isDirectory),t.readonlyContext.set(e.focus&&e.focus.isReadonly),t.rootContext.set(!e.focus||e.focus&&e.focus.isRoot)})),this.disposables.push(this.explorerViewer.onDidChangeSelection(function(e){if(e&&e.payload&&"keyboard"===e.payload.origin){var n=t.tree.getSelection();Array.isArray(n)&&n[0]instanceof E.ExplorerItem&&(n[0].isDirectory&&t.explorerViewer.toggleExpansion(n[0]),o.openEditor(n[0],{pinned:!1,sideBySide:!1,preserveFocus:!1}))}})),this.explorerViewer},t.prototype.getViewer=function(){return this.tree},
t.prototype.getOptimalWidth=function(){var e=this.explorerViewer.getHTMLElement(),t=[].slice.call(e.querySelectorAll(".explorer-item .label-name"));return S.getLargestChildWidth(e,t)},t.prototype.onFileOperation=function(e){var t=this;if(this.isCreated)if(e.operation===g.FileOperation.CREATE||e.operation===g.FileOperation.COPY){var n=e.target,i=h.dirname(n.resource),o=this.model.findAll(i);o.length&&o.forEach(function(e){(e.isDirectoryResolved?r.TPromise.as(null):t.fileService.resolveFile(e.resource)).then(function(i){if(i){var r=E.ExplorerItem.create(i,e.root);E.ExplorerItem.mergeLocalWithDisk(r,e)}var o=E.ExplorerItem.create(n,e.root);e.removeChild(o),e.addChild(o),t.explorerViewer.refresh(e).then(function(){return t.reveal(o,.5).then(function(){t.explorerViewer.setFocus(o)})}).done(null,u.onUnexpectedError)})})}else if(e.operation===g.FileOperation.MOVE){var s=e.resource,a=e.target,c=h.dirname(s),l=h.dirname(a.resource),d=!1,p=this.explorerViewer.getFocus()
;p&&p.resource&&p.resource.toString()===s.toString()&&(d=!0);var f=!1;if(c&&l&&c.toString()===l.toString()){(m=this.model.findAll(s)).forEach(function(e){f=t.explorerViewer.isExpanded(e),e.rename(a),t.explorerViewer.refresh(e.parent).done(function(){d&&t.explorerViewer.setFocus(e),f&&t.explorerViewer.expand(e)},u.onUnexpectedError)})}else if(c&&l){var v=this.model.findAll(l),m=this.model.findAll(s);v.length&&m.length&&m.forEach(function(e,n){var i=e.parent;e.move(v[n],function(e){t.explorerViewer.refresh(i).done(e,u.onUnexpectedError)},function(){t.explorerViewer.refresh(v[n],!0).done(function(){return t.explorerViewer.expand(v[n])},u.onUnexpectedError)})})}}else if(e.operation===g.FileOperation.DELETE){(m=this.model.findAll(e.resource)).forEach(function(e){if(e.parent){var n=e.parent;n.removeChild(e);var i=t.explorerViewer.isDOMFocused();t.explorerViewer.refresh(n).done(function(){i&&t.explorerViewer.domFocus()},u.onUnexpectedError)}})}},t.prototype.onFileChanges=function(e){var n=this;setTimeout(function(){
var i=n.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE];i&&e.contains(o.default.parse(i),g.FileChangeType.DELETED)&&(n.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]=null)}),setTimeout(function(){!n.shouldRefresh&&n.shouldRefreshFromEvent(e)&&n.refreshFromEvent()},t.EXPLORER_FILE_CHANGES_REACT_DELAY)},t.prototype.shouldRefreshFromEvent=function(e){if(!this.isCreated)return!1;var t=(e=this.filterToViewRelevantEvents(e)).getAdded();if(t.length)for(var n={},i=0;i<t.length;i++){var r=t[i],o=h.dirname(r.resource);if(!n[o.toString()]){var s=this.model.findClosest(o);if(s&&s.isDirectoryResolved&&!this.model.findClosest(r.resource))return!0;s&&s.isDirectoryResolved||(n[o.toString()]=!0)}}var a=e.getDeleted();if(a.length)for(u=0;u<a.length;u++){var c=a[u];if(this.model.findClosest(c.resource))return!0}if(this.sortOrder===f.SortOrderConfiguration.MODIFIED)for(var l=e.getUpdated(),u=0;u<l.length;u++){var d=l[u];if(this.model.findClosest(d.resource))return!0}return!1},t.prototype.filterToViewRelevantEvents=function(e){
var t=this;return new g.FileChangesEvent(e.changes.filter(function(e){return(e.type!==g.FileChangeType.UPDATED||t.sortOrder===f.SortOrderConfiguration.MODIFIED)&&(!!t.contextService.isInsideWorkspace(e.resource)&&!t.fileEventsFilter.matches(e.resource))}))},t.prototype.refreshFromEvent=function(e){var t=this;void 0===e&&(e=[]),this.isVisible()&&!this.isDisposed?this.explorerRefreshDelayer.trigger(function(){return t.explorerViewer.getHighlight()?r.TPromise.as(null):t.doRefresh(e.map(function(e){return e.uri})).then(function(){if(1===e.length)return t.reveal(t.model.findClosest(e[0].uri),.5)})}).done(null,u.onUnexpectedError):this.shouldRefresh=!0},t.prototype.refresh=function(){var e=this;if(!this.explorerViewer||this.explorerViewer.getHighlight())return r.TPromise.as(null);this.explorerViewer.domFocus();var t;if(this.autoReveal&&!(t=this.getActiveFile())){var n=this.explorerViewer.getSelection();n&&1===n.length&&(t=n[0].resource)}return this.doRefresh().then(function(){
return t?e.select(t,!0):r.TPromise.as(null)})},t.prototype.doRefresh=function(e){var t=this;void 0===e&&(e=[]);var n=this.model.roots.map(function(e){return{root:e,resource:e.resource,options:{resolveTo:[]}}});if(this.isCreated)n.forEach(function(e){t.getResolvedDirectories(e.root,e.options.resolveTo)});else{var i=this.getActiveFile();if(i){var r=this.contextService.getWorkspaceFolder(i);if(r){n.filter(function(e){return e.root.resource.toString()===r.uri.toString()}).pop().options.resolveTo.push(i)}}e.forEach(function(e){var i=t.contextService.getWorkspaceFolder(e);if(i){n.filter(function(e){return e.resource.toString()===i.uri.toString()}).pop().options.resolveTo.push(e)}})}var o=this.resolveRoots(n,e).then(function(e){return t.decorationProvider.changed(n.map(function(e){return e.root.resource})),e});return this.progressService.showWhile(o,this.partService.isCreated()?800:3200),o},t.prototype.resolveRoots=function(e,t){
var n=this,i=this.contextService.getWorkbenchState()===T.WorkbenchState.FOLDER?this.model.roots[0]:this.model,o=function(e,t){return E.ExplorerItem.create({resource:e,name:d.basename(e.fsPath),mtime:0,etag:void 0,isDirectory:!0},t,void 0,!0)},a=function(e,t){return e===n.model&&t.every(function(e){return e&&!e.isRoot})&&(t=n.model.roots.concat(t)),n.explorerViewer.setInput(e).then(function(){return n.explorerViewer.expandAll(t)})};if(e.every(function(e){return"file"===e.root.resource.scheme}))return this.fileService.resolveFiles(e).then(function(r){r.map(function(t,n){return t.success&&t.stat.isDirectory?E.ExplorerItem.create(t.stat,e[n].root,e[n].options.resolveTo):o(e[n].resource,e[n].root)}).forEach(function(e,t){t<n.model.roots.length&&E.ExplorerItem.mergeLocalWithDisk(e,n.model.roots[t])});var s=n.explorerViewer.getExpandedElements().concat(t.map(function(e){return n.model.findClosest(e)}));return i===n.explorerViewer.getInput()?n.explorerViewer.refresh().then(function(){
return n.explorerViewer.expandAll(s)}):a(i,s)});var c,l=[],u=new s.Delayer(100);return r.TPromise.join(e.map(function(e,r){return n.fileService.resolveFile(e.resource,e.options).then(function(t){return t.isDirectory?E.ExplorerItem.create(t,e.root,e.options.resolveTo):o(e.resource,e.root)},function(){return o(e.resource,e.root)}).then(function(e){r<n.model.roots.length&&E.ExplorerItem.mergeLocalWithDisk(e,n.model.roots[r]);var o=n.explorerViewer.getExpandedElements().concat(t.map(function(e){return n.model.findClosest(e)}));return i===n.explorerViewer.getInput()?(l=l.concat(o),u.isTriggered()||(c=u.trigger(function(){return n.explorerViewer.refresh().then(function(){return n.explorerViewer.expandAll(l)}).then(function(){return l=[]})})),c):a(i,l)})}))},t.prototype.getResolvedDirectories=function(e,t){var n=this;if(e.isDirectoryResolved){if(!e.isRoot){for(var i=t.length-1;i>=0;i--){var r=t[i];h.isEqualOrParent(e.resource,r,!P.isLinux)&&t.splice(i)}t.push(e.resource)}e.getChildrenArray().forEach(function(e){
n.getResolvedDirectories(e,t)})}},t.prototype.select=function(e,t){var n=this;if(void 0===t&&(t=this.autoReveal),!e)return r.TPromise.as(null);var i=this.hasSingleSelection(e);if(i)return t?this.reveal(i,.5):r.TPromise.as(null);if(!this.isCreated)return r.TPromise.as(null);var o=this.model.findClosest(e);if(o)return this.doSelect(o,t);var s={resolveTo:[e]},a=this.contextService.getWorkspaceFolder(e),c=a?a.uri:this.model.roots[0].resource;return this.fileService.resolveFile(c,s).then(function(i){var r=n.model.roots.filter(function(e){return e.resource.toString()===c.toString()}).pop(),o=E.ExplorerItem.create(i,r,s.resolveTo);return E.ExplorerItem.mergeLocalWithDisk(o,r),n.explorerViewer.refresh(r).then(function(){return n.doSelect(r.find(e),t)})},function(e){n.notificationService.error(e)})},t.prototype.hasSingleSelection=function(e){var t=this.explorerViewer.getSelection();return 1===t.length&&t[0].resource.toString()===e.toString()?t[0]:void 0},t.prototype.doSelect=function(e,t){var n=this
;if(!e)return r.TPromise.as(null);if(!this.filter.isVisible(this.tree,e)&&!(e=e.parent))return r.TPromise.as(null);return(t?this.reveal(e,.5):r.TPromise.as(null)).then(function(){e.isDirectory||n.explorerViewer.setSelection([e]),n.explorerViewer.setFocus(e)})},t.prototype.reveal=function(e,t){return this.tree?this.tree.reveal(e,t):r.TPromise.as(null)},t.prototype.shutdown=function(){if(this.isCreated){var n=this.explorerViewer.getExpandedElements().filter(function(e){return e instanceof E.ExplorerItem}).map(function(e){return e.resource.toString()});n.length?this.settings[t.MEMENTO_EXPANDED_FOLDER_RESOURCES]=n:delete this.settings[t.MEMENTO_EXPANDED_FOLDER_RESOURCES]}this.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]||delete this.settings[t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE],e.prototype.shutdown.call(this)},t.prototype.dispose=function(){this.isDisposed=!0,this.dragHandler&&this.dragHandler.dispose(),e.prototype.dispose.call(this)},t.ID="workbench.explorer.fileView",t.EXPLORER_FILE_CHANGES_REACT_DELAY=500,
t.EXPLORER_FILE_CHANGES_REFRESH_DELAY=100,t.MEMENTO_LAST_ACTIVE_FILE_RESOURCE="explorer.memento.lastActiveFileResource",t.MEMENTO_EXPANDED_FOLDER_RESOURCES="explorer.memento.expandedFolderResources",a([p.memoize],t.prototype,"model",null),t=a([l(1,B.INotificationService),l(2,L.IContextMenuService),l(3,D.IInstantiationService),l(4,T.IWorkspaceContextService),l(5,A.IProgressService),l(6,V.IEditorService),l(7,g.IFileService),l(8,w.IPartService),l(9,k.IKeybindingService),l(10,R.IContextKeyService),l(11,x.IConfigurationService),l(12,N.IDecorationsService)],t)}(C.TreeViewsViewletPanel);t.ExplorerView=z}),define(e[1566],t([1,0,655,9,18,23,8,35,6,53,17,37,217,96,48,202,91,291,452,15,68,12,26,58,138,41,4,28,21,5,143,31,306,165,176,173]),function(e,t,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B){"use strict";function V(e){var t={openEditor:W.CodeDataTransfers.EDITORS.toLowerCase(),externalFile:"Files",codeFile:W.CodeDataTransfers.FILES.toLowerCase()}
;return-1!==e.dataTransfer.types.indexOf(t.openEditor)||-1!==e.dataTransfer.types.indexOf(t.externalFile)||-1!==e.dataTransfer.types.indexOf(t.codeFile)}Object.defineProperty(t,"__esModule",{value:!0});var z=u.$,H=function(e){function t(t,n,r,s,a,l,u,d,h,p,f,g,v){var m=e.call(this,c({},t,{ariaHeaderLabel:i.localize(1,null)}),d,r,u)||this;return m.instantiationService=n,m.textFileService=s,m.editorService=a,m.editorGroupService=l,m.untitledEditorService=h,m.contextKeyService=p,m.themeService=f,m.telemetryService=g,m.menuService=v,m.structuralRefreshDelay=0,m.listRefreshScheduler=new o.RunOnceScheduler(function(){var e=m.list.length;m.list.splice(0,m.list.length,m.elements),m.focusActiveEditor(),e!==m.list.length&&m.updateSize(),m.needsRefresh=!1},m.structuralRefreshDelay),m.registerUpdateEvents(),m.disposables.push(m.configurationService.onDidChangeConfiguration(function(e){return m.onConfigurationChange(e)})),m.disposables.push(m.untitledEditorService.onDidChangeDirty(function(){
return m.updateDirtyIndicator()})),m.disposables.push(m.textFileService.models.onModelsDirty(function(){return m.updateDirtyIndicator()})),m.disposables.push(m.textFileService.models.onModelsSaved(function(){return m.updateDirtyIndicator()})),m.disposables.push(m.textFileService.models.onModelsSaveError(function(){return m.updateDirtyIndicator()})),m.disposables.push(m.textFileService.models.onModelsReverted(function(){return m.updateDirtyIndicator()})),m}return n(t,e),t.prototype.registerUpdateEvents=function(){var e=this,t=function(){e.isVisible()&&e.list&&e.isExpanded()?e.listRefreshScheduler.schedule(e.structuralRefreshDelay):e.needsRefresh=!0},n=new Map,i=function(t){n.set(t.id,t.onDidGroupChange(function(n){if(!e.listRefreshScheduler.isScheduled())if(e.isVisible()&&e.list&&e.isExpanded()){var i=e.getIndex(t,n.editor);switch(n.kind){case p.GroupChangeKind.GROUP_LABEL:e.showGroups&&e.list.splice(i,1,[t]);break;case p.GroupChangeKind.GROUP_ACTIVE:case p.GroupChangeKind.EDITOR_ACTIVE:e.focusActiveEditor()
;break;case p.GroupChangeKind.EDITOR_DIRTY:case p.GroupChangeKind.EDITOR_LABEL:case p.GroupChangeKind.EDITOR_PIN:e.list.splice(i,1,[new b.OpenEditor(n.editor,t)]);break;case p.GroupChangeKind.EDITOR_OPEN:e.list.splice(i,0,[new b.OpenEditor(n.editor,t)]),setTimeout(function(){return e.updateSize()},e.structuralRefreshDelay);break;case p.GroupChangeKind.EDITOR_CLOSE:var r=e.getIndex(t,void 0)+n.editorIndex+(e.showGroups?1:0);e.list.splice(r,1),e.updateSize();break;case p.GroupChangeKind.EDITOR_MOVE:e.listRefreshScheduler.schedule()}}else e.needsRefresh=!0})),e.disposables.push(n.get(t.id))};this.editorGroupService.groups.forEach(function(e){return i(e)}),this.disposables.push(this.editorGroupService.onDidAddGroup(function(e){i(e),t()})),this.disposables.push(this.editorGroupService.onDidMoveGroup(function(){return t()})),this.disposables.push(this.editorGroupService.onDidRemoveGroup(function(e){O.dispose(n.get(e.id)),t()}))},t.prototype.renderHeaderTitle=function(e){var t=this,n=u.append(e,z(".title"))
;u.append(n,z("span",null,this.title));var i=u.append(e,z(".count"));this.dirtyCountElement=u.append(i,z(".monaco-count-badge")),this.disposables.push(w.attachStylerCallback(this.themeService,{badgeBackground:T.badgeBackground,badgeForeground:T.badgeForeground,contrastBorder:T.contrastBorder},function(e){var n=e.badgeBackground?e.badgeBackground.toString():null,i=e.badgeForeground?e.badgeForeground.toString():null,r=e.contrastBorder?e.contrastBorder.toString():null;t.dirtyCountElement.style.backgroundColor=n,t.dirtyCountElement.style.color=i,t.dirtyCountElement.style.borderWidth=r?"1px":null,t.dirtyCountElement.style.borderStyle=r?"solid":null,t.dirtyCountElement.style.borderColor=r})),this.updateDirtyIndicator()},t.prototype.renderBody=function(e){var t=this;u.addClass(e,"explorer-open-editors"),u.addClass(e,"show-file-icons");var n=new U;this.list&&this.list.dispose(),
this.list=this.instantiationService.createInstance(x.WorkbenchList,e,n,[new G(this.keybindingService,this.instantiationService,this.editorGroupService),new j(function(){var e=t.list.getSelectedElements(),n=t.list.getFocusedElements();return n.length&&e.indexOf(n[0])>=0?e:n},this.instantiationService,this.keybindingService,this.configurationService,this.editorGroupService)],{identityProvider:function(e){return e instanceof b.OpenEditor?e.getId():e.id.toString()},selectOnMouseDown:!1}),this.disposables.push(this.list),this.contributedContextMenu=this.menuService.createMenu(P.MenuId.OpenEditorsContext,this.list.contextKeyService),this.disposables.push(this.contributedContextMenu),this.updateSize(),m.OpenEditorsFocusedContext.bindTo(this.list.contextKeyService),m.ExplorerFocusedContext.bindTo(this.list.contextKeyService),this.resourceContext=this.instantiationService.createInstance(F.ResourceContextKey),this.groupFocusedContext=N.OpenEditorsGroupContext.bindTo(this.contextKeyService),
this.dirtyEditorFocusedContext=N.DirtyEditorContext.bindTo(this.contextKeyService),this.disposables.push(this.list.onContextMenu(function(e){return t.onListContextMenu(e)})),this.list.onFocusChange(function(e){t.resourceContext.reset(),t.groupFocusedContext.reset(),t.dirtyEditorFocusedContext.reset();var n=e.elements.length?e.elements[0]:void 0;n instanceof b.OpenEditor?(t.dirtyEditorFocusedContext.set(t.textFileService.isDirty(n.getResource())),t.resourceContext.set(n.getResource())):n&&t.groupFocusedContext.set(!0)}),this.disposables.push(this.list.onOpen(function(e){var n=e.browserEvent,i=!1,o=!1,s=!1,a=!1;n instanceof MouseEvent&&(o=1===n.detail,s=2===n.detail,a=1===n.button,i=t.list.useAltAsMultipleSelectionModifier?n.ctrlKey||n.metaKey:n.altKey);var c=t.list.getFocusedElements(),l=c.length?c[0]:void 0;l instanceof b.OpenEditor?a?l.group.closeEditor(l.editor).done(null,r.onUnexpectedError):t.openEditor(l,{preserveFocus:o,pinned:s,sideBySide:i}):t.editorGroupService.activateGroup(l)})),
this.listRefreshScheduler.schedule(0)},t.prototype.getActions=function(){return[this.instantiationService.createInstance(C.ToggleEditorLayoutAction,C.ToggleEditorLayoutAction.ID,C.ToggleEditorLayoutAction.LABEL),this.instantiationService.createInstance(v.SaveAllAction,v.SaveAllAction.ID,v.SaveAllAction.LABEL),this.instantiationService.createInstance(_.CloseAllEditorsAction,_.CloseAllEditorsAction.ID,_.CloseAllEditorsAction.LABEL)]},t.prototype.setExpanded=function(t){e.prototype.setExpanded.call(this,t),t&&this.needsRefresh&&this.listRefreshScheduler.schedule(0)},t.prototype.setVisible=function(t){var n=this;return e.prototype.setVisible.call(this,t).then(function(){t&&n.needsRefresh&&n.listRefreshScheduler.schedule(0)})},t.prototype.focus=function(){e.prototype.focus.call(this),this.list.domFocus()},t.prototype.getList=function(){return this.list},t.prototype.layoutBody=function(e){this.list&&this.list.layout(e)},Object.defineProperty(t.prototype,"showGroups",{get:function(){
return this.editorGroupService.groups.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elements",{get:function(){var e=this,t=[];return this.editorGroupService.groups.forEach(function(n){e.showGroups&&t.push(n),t.push.apply(t,n.editors.map(function(e){return new b.OpenEditor(e,n)}))}),t},enumerable:!0,configurable:!0}),t.prototype.getIndex=function(e,t){var n=t?e.getIndexOfEditor(t):0;if(!this.showGroups)return n;for(var i=0,r=this.editorGroupService.groups;i<r.length;i++){var o=r[i];if(o.id===e.id)return n+(t?1:0);n+=o.count+1}return-1},t.prototype.openEditor=function(e,t){var n=this;if(e){this.telemetryService.publicLog("workbenchActionExecuted",{id:"workbench.files.openFile",from:"openEditors"});var i=t.sideBySide&&t.preserveFocus;i||this.editorGroupService.activateGroup(e.groupId),this.editorService.openEditor(e.editor,t,t.sideBySide?R.SIDE_GROUP:R.ACTIVE_GROUP).done(function(e){i||n.editorGroupService.activateGroup(e.group)},r.onUnexpectedError)}},
t.prototype.onListContextMenu=function(e){var t=this,n=e.element;this.contextMenuService.showContextMenu({getAnchor:function(){return e.anchor},getActions:function(){var e=[];return M.fillInContextMenuActions(t.contributedContextMenu,{shouldForwardArgs:!0,arg:n instanceof b.OpenEditor?n.editor.getResource():{}},e,t.contextMenuService),A.TPromise.as(e)},getActionsContext:function(){return n instanceof b.OpenEditor?{groupId:n.groupId,editorIndex:n.editorIndex}:{groupId:n.id}}})},t.prototype.focusActiveEditor=function(){if(this.editorGroupService.activeGroup&&this.editorGroupService.activeGroup.activeEditor){var e=this.getIndex(this.editorGroupService.activeGroup,this.editorGroupService.activeGroup.activeEditor);this.list.setFocus([e]),this.list.setSelection([e]),this.list.reveal(e)}else this.list.setFocus([]),this.list.setSelection([])},t.prototype.onConfigurationChange=function(e){e.affectsConfiguration("explorer.openEditors")&&this.updateSize(),
e.affectsConfiguration("explorer.decorations")&&this.listRefreshScheduler.schedule()},t.prototype.updateSize=function(){this.minimumBodySize=this.getMinExpandedBodySize(),this.maximumBodySize=this.getMaxExpandedBodySize()},t.prototype.updateDirtyIndicator=function(){var e=this.textFileService.getAutoSaveMode()!==y.AutoSaveMode.AFTER_SHORT_DELAY?this.textFileService.getDirty().length:this.untitledEditorService.getDirty().length;0===e?u.addClass(this.dirtyCountElement,"hidden"):(this.dirtyCountElement.textContent=i.localize(2,null,e),u.removeClass(this.dirtyCountElement,"hidden"))},Object.defineProperty(t.prototype,"elementCount",{get:function(){return this.editorGroupService.groups.map(function(e){return e.count}).reduce(function(e,t){return e+t},this.showGroups?this.editorGroupService.groups.length:0)},enumerable:!0,configurable:!0}),t.prototype.getMaxExpandedBodySize=function(){return this.elementCount*U.ITEM_HEIGHT},t.prototype.getMinExpandedBodySize=function(){
var e=this.configurationService.getValue("explorer.openEditors.visible");return"number"!=typeof e&&(e=t.DEFAULT_VISIBLE_OPEN_EDITORS),this.computeMinExpandedBodySize(e)},t.prototype.computeMinExpandedBodySize=function(e){void 0===e&&(e=t.DEFAULT_VISIBLE_OPEN_EDITORS);return Math.min(Math.max(e,1),this.elementCount)*U.ITEM_HEIGHT},t.prototype.setStructuralRefreshDelay=function(e){this.structuralRefreshDelay=e},t.prototype.getOptimalWidth=function(){var e=this.list.getHTMLElement(),t=[].slice.call(e.querySelectorAll(".open-editor > a"));return u.getLargestChildWidth(e,t)},t.DEFAULT_VISIBLE_OPEN_EDITORS=9,t.ID="workbench.explorer.openEditorsView",t.NAME=i.localize(0,null),t=a([l(1,h.IInstantiationService),l(2,d.IContextMenuService),l(3,y.ITextFileService),l(4,R.IEditorService),l(5,p.IEditorGroupsService),l(6,f.IConfigurationService),l(7,g.IKeybindingService),l(8,S.IUntitledEditorService),l(9,E.IContextKeyService),l(10,I.IThemeService),l(11,L.ITelemetryService),l(12,P.IMenuService)],t)}(B.ViewletPanel)
;t.OpenEditorsView=H;var K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.run=function(t,n){return e.prototype.run.call(this,t,{groupId:this.editor.groupId,editorIndex:this.editor.editorIndex})},t}(s.ActionRunner),U=function(){function e(){}return e.prototype.getHeight=function(t){return e.ITEM_HEIGHT},e.prototype.getTemplateId=function(e){return e instanceof b.OpenEditor?j.ID:G.ID},e.ITEM_HEIGHT=22,e}(),G=function(){function e(e,t,n){this.keybindingService=e,this.instantiationService=t,this.editorGroupService=n,this.transfer=W.LocalSelectionTransfer.getInstance()}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=Object.create(null);n.root=u.append(e,z(".editor-group")),n.name=u.append(n.root,z("span.name")),n.actionBar=new D.ActionBar(e)
;var i=this.instantiationService.createInstance(v.SaveAllInGroupAction,v.SaveAllInGroupAction.ID,v.SaveAllInGroupAction.LABEL),r=this.keybindingService.lookupKeybinding(i.id);n.actionBar.push(i,{icon:!0,label:!1,keybinding:r?r.getLabel():void 0});var o=this.instantiationService.createInstance(v.CloseGroupAction,v.CloseGroupAction.ID,v.CloseGroupAction.LABEL),s=this.keybindingService.lookupKeybinding(o.id);return n.actionBar.push(o,{icon:!0,label:!1,keybinding:s?s.getLabel():void 0}),n.toDispose=[],n.toDispose.push(u.addDisposableListener(e,u.EventType.DRAG_OVER,function(t){V(t)&&u.addClass(e,"focused")})),n.toDispose.push(u.addDisposableListener(e,u.EventType.DRAG_LEAVE,function(){u.removeClass(e,"focused")})),n.toDispose.push(u.addDisposableListener(e,u.EventType.DROP,function(i){if(u.removeClass(e,"focused"),t.transfer.hasData(b.OpenEditor.prototype))t.transfer.getData(b.OpenEditor.prototype).forEach(function(e){return e.group.moveEditor(e.editor,n.editorGroup,{preserveFocus:!0})}),
t.editorGroupService.activateGroup(n.editorGroup);else{t.instantiationService.createInstance(W.ResourcesDropHandler,{allowWorkspaceOpen:!1}).handleDrop(i,function(){return n.editorGroup},function(){return n.editorGroup.focus()})}})),n},e.prototype.renderElement=function(e,t,n){n.editorGroup=e,n.name.textContent=e.label,n.actionBar.context={groupId:e.id}},e.prototype.disposeTemplate=function(e){e.actionBar.dispose(),O.dispose(e.toDispose)},e.ID="editorgroup",e}(),j=function(){function e(e,t,n,i,r){this.getSelectedElements=e,this.instantiationService=t,this.keybindingService=n,this.configurationService=i,this.editorGroupService=r,this.transfer=W.LocalSelectionTransfer.getInstance()}return Object.defineProperty(e.prototype,"templateId",{get:function(){return e.ID},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,n=Object.create(null);n.container=e,n.actionRunner=new K,n.actionBar=new D.ActionBar(e,{actionRunner:n.actionRunner}),e.draggable=!0
;var i=this.instantiationService.createInstance(_.CloseEditorAction,_.CloseEditorAction.ID,_.CloseEditorAction.LABEL),r=this.keybindingService.lookupKeybinding(i.id);return n.actionBar.push(i,{icon:!0,label:!1,keybinding:r?r.getLabel():void 0}),n.root=this.instantiationService.createInstance(k.EditorLabel,e,void 0),n.toDispose=[],n.toDispose.push(u.addDisposableListener(e,u.EventType.DRAG_START,function(e){var i=t.getSelectedElements().filter(function(e){return e instanceof b.OpenEditor&&!!e.getResource()}),r=document.createElement("div");e.dataTransfer.effectAllowed="copyMove",r.className="monaco-tree-drag-image",r.textContent=1===i.length?n.openEditor.editor.getName():String(i.length),document.body.appendChild(r),e.dataTransfer.setDragImage(r,-10,-10),setTimeout(function(){return document.body.removeChild(r)},0),t.transfer.setData(i,b.OpenEditor.prototype),n.openEditor&&n.openEditor.editor&&t.instantiationService.invokeFunction(W.fillResourceDataTransfers,i.map(function(e){return e.getResource()}),e)})),
n.toDispose.push(u.addDisposableListener(e,u.EventType.DRAG_OVER,function(t){V(t)&&u.addClass(e,"focused")})),n.toDispose.push(u.addDisposableListener(e,u.EventType.DRAG_LEAVE,function(){u.removeClass(e,"focused")})),n.toDispose.push(u.addDisposableListener(e,u.EventType.DROP,function(i){u.removeClass(e,"focused");var r=n.openEditor.group.getIndexOfEditor(n.openEditor.editor);if(t.transfer.hasData(b.OpenEditor.prototype))t.transfer.getData(b.OpenEditor.prototype).forEach(function(e,t){return e.group.moveEditor(e.editor,n.openEditor.group,{index:r+t,preserveFocus:!0})}),t.editorGroupService.activateGroup(n.openEditor.group);else{t.instantiationService.createInstance(W.ResourcesDropHandler,{allowWorkspaceOpen:!1}).handleDrop(i,function(){return n.openEditor.group},function(){return n.openEditor.group.focus()},r)}})),n.toDispose.push(u.addDisposableListener(e,u.EventType.DRAG_END,function(){t.transfer.clearData(b.OpenEditor.prototype)})),n},e.prototype.renderElement=function(e,t,n){n.openEditor=e,
n.actionRunner.editor=e,e.isDirty()?u.addClass(n.container,"dirty"):u.removeClass(n.container,"dirty"),n.root.setEditor(e.editor,{italic:e.isPreview(),extraClasses:["open-editor"],fileDecorations:this.configurationService.getValue().explorer.decorations})},e.prototype.disposeTemplate=function(e){e.actionBar.dispose(),e.root.dispose(),e.actionRunner.dispose(),O.dispose(e.toDispose)},e.ID="openeditor",e}()}),define(e[553],t([1,0,645,4,8,96,158,17,552,1565,1563,1566,34,6,49,27,28,137,15,12,98,35,5,46,523,53,21,896]),function(e,t,i,r,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var O=function(e){function t(t,n,i){var r=e.call(this)||this;return r.workspaceContextService=t,r.configurationService=n,r.registerViews(),r.openEditorsVisibleContextKey=d.OpenEditorsVisibleContext.bindTo(i),r.updateOpenEditorsVisibility(),r._register(t.onDidChangeWorkbenchState(function(){return r.registerViews()})),r._register(t.onDidChangeWorkspaceFolders(function(){
return r.registerViews()})),r._register(r.configurationService.onDidChangeConfiguration(function(e){return r.onConfigurationUpdated(e)})),r}return n(t,e),t.prototype.registerViews=function(){var e=T.ViewsRegistry.getViews(d.VIEW_CONTAINER),t=[],n=[],i=this.createOpenEditorsViewDescriptor(),r=e.some(function(e){return e.id===i.id}),o=this.createExplorerViewDescriptor(),s=e.some(function(e){return e.id===o.id}),a=this.createEmptyViewDescriptor(),c=e.some(function(e){return e.id===a.id});r||t.push(i),this.workspaceContextService.getWorkbenchState()===_.WorkbenchState.EMPTY||0===this.workspaceContextService.getWorkspace().folders.length?(s&&n.push(o.id),c||t.push(a)):(c&&n.push(a.id),s||t.push(o)),t.length&&T.ViewsRegistry.registerViews(t),n.length&&T.ViewsRegistry.deregisterViews(n,d.VIEW_CONTAINER)},t.prototype.createOpenEditorsViewDescriptor=function(){return{id:m.OpenEditorsView.ID,name:m.OpenEditorsView.NAME,container:d.VIEW_CONTAINER,ctor:m.OpenEditorsView,order:0,when:d.OpenEditorsVisibleCondition,
canToggleVisibility:!0}},t.prototype.createEmptyViewDescriptor=function(){return{id:v.EmptyView.ID,name:v.EmptyView.NAME,container:d.VIEW_CONTAINER,ctor:v.EmptyView,order:1,canToggleVisibility:!1}},t.prototype.createExplorerViewDescriptor=function(){return{id:g.ExplorerView.ID,name:i.localize(0,null),container:d.VIEW_CONTAINER,ctor:g.ExplorerView,order:1,canToggleVisibility:!1}},t.prototype.onConfigurationUpdated=function(e){e.affectsConfiguration("explorer.openEditors.visible")&&this.updateOpenEditorsVisibility()},t.prototype.updateOpenEditorsVisibility=function(){this.openEditorsVisibleContextKey.set(this.workspaceContextService.getWorkbenchState()===_.WorkbenchState.EMPTY||0!==this.configurationService.getValue("explorer.openEditors.visible"))},t=a([l(0,_.IWorkspaceContextService),l(1,p.IConfigurationService),l(2,w.IContextKeyService)],t)}(k.Disposable);t.ExplorerViewletViewsContribution=O;var M=function(e){function t(n,i,r,o,s,a,c,l,u,h,p,g){
var v=e.call(this,d.VIEWLET_ID,t.EXPLORER_VIEWS_STATE,!0,n,i,o,l,h,p,g,r)||this;return v.contextService=r,v.storageService=o,v.editorService=s,v.editorGroupService=a,v.configurationService=c,v.instantiationService=l,v.viewletState=new f.FileViewletState,v.viewletVisibleContextKey=d.ExplorerViewletVisibleContext.bindTo(u),v._register(v.contextService.onDidChangeWorkspaceName(function(e){return v.updateTitleArea()})),v}return n(t,e),t.prototype.create=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(n){switch(n.label){case 0:return[4,e.prototype.create.call(this,t)];case 1:return n.sent(),u.addClass(t,"explorer-viewlet"),[2]}})})},t.prototype.createView=function(t,n){var i=this;if(t.id===g.ExplorerView.ID){var r=this.instantiationService.createInstance(A.DelegatingEditorService);r.setEditorOpenHandler(function(e,t,n){var r=i.getOpenEditorsView();if(r){var o=0,s=!!i.configurationService.getValue().workbench.editor.enablePreview,a=i.editorGroupService.activeGroup
;s&&e===a&&!a.previewEditor&&(o=250),r.setStructuralRefreshDelay(o)}var c=function(e){var t=i.getOpenEditorsView();return t&&t.setStructuralRefreshDelay(0),e};return i.editorService.openEditor(t,n,e).then(c,c)});return this.instantiationService.createChild(new E.ServiceCollection([R.IEditorService,r])).createInstance(g.ExplorerView,c({},n,{viewletState:this.viewletState}))}return e.prototype.createView.call(this,t,n)},t.prototype.getExplorerView=function(){return this.getView(g.ExplorerView.ID)},t.prototype.getOpenEditorsView=function(){return this.getView(m.OpenEditorsView.ID)},t.prototype.getEmptyView=function(){return this.getView(v.EmptyView.ID)},t.prototype.setVisible=function(t){return this.viewletVisibleContextKey.set(t),e.prototype.setVisible.call(this,t)},t.prototype.getActionRunner=function(){return this.actionRunner||(this.actionRunner=new f.ActionRunner(this.viewletState)),this.actionRunner},t.prototype.getViewletState=function(){return this.viewletState},t.prototype.focus=function(){
var t=this.getExplorerView();t&&t.isExpanded()?t.focus():e.prototype.focus.call(this)},t.EXPLORER_VIEWS_STATE="workbench.explorer.views.state",t=a([l(0,D.IPartService),l(1,C.ITelemetryService),l(2,_.IWorkspaceContextService),l(3,y.IStorageService),l(4,R.IEditorService),l(5,L.IEditorGroupsService),l(6,p.IConfigurationService),l(7,b.IInstantiationService),l(8,w.IContextKeyService),l(9,I.IThemeService),l(10,x.IContextMenuService),l(11,S.IExtensionService)],t)}(h.ViewContainerViewlet);t.ExplorerViewlet=M}),define(e[1568],t([1,0,10,99,649,31,16,63,56,75,40,33,96,1425,551,293,1524,1424,112,65,11,1484,553,147,491,38,21,53]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var L=function(e){function t(t,n,i,r){return e.call(this,t,n,g.VIEWLET_ID,i,r)||this}return n(t,e),t.ID=g.VIEWLET_ID,t.LABEL=o.localize(0,null),t=a([l(2,C.IViewletService),l(3,A.IEditorGroupsService)],t)}(r.ToggleViewletAction);t.OpenExplorerViewletAction=L,
c.Registry.as(r.Extensions.Viewlets).registerViewlet(new r.ViewletDescriptor(I.ExplorerViewlet,g.VIEWLET_ID,o.localize(1,null),"explore",0)),c.Registry.as(r.Extensions.Viewlets).setDefaultViewletId(g.VIEWLET_ID);c.Registry.as(d.Extensions.WorkbenchActions).registerWorkbenchAction(new s.SyncActionDescriptor(L,L.ID,L.LABEL,{primary:3107}),"View: Show Explorer",o.localize(2,null)),c.Registry.as(T.Extensions.Editors).registerEditor(new T.EditorDescriptor(b.TextFileEditor,b.TextFileEditor.ID,o.localize(3,null)),[new _.SyncDescriptor(y.FileEditorInput)]),c.Registry.as(T.Extensions.Editors).registerEditor(new T.EditorDescriptor(S.BinaryFileEditor,S.BinaryFileEditor.ID,o.localize(4,null)),[new _.SyncDescriptor(y.FileEditorInput),new _.SyncDescriptor(x.DataUriEditorInput)]),c.Registry.as(p.Extensions.EditorInputFactories).registerFileInputFactory({createFileInput:function(e,t,n){return n.createInstance(y.FileEditorInput,e,t)},isFileInput:function(e){return e instanceof y.FileEditorInput}});var R=function(){
function e(){}return e.prototype.serialize=function(e){var t=e,n=t.getResource(),i={resource:n.toString(),resourceJSON:n.toJSON(),encoding:t.getEncoding()};return JSON.stringify(i)},e.prototype.deserialize=function(e,t){return e.invokeFunction(function(e){var n=JSON.parse(t),r=n.resourceJSON?i.default.revive(n.resourceJSON):i.default.parse(n.resource),o=n.encoding;return e.get(D.IEditorService).createInput({resource:r,encoding:o})})},e}();c.Registry.as(p.Extensions.EditorInputFactories).registerEditorInputFactory(g.FILE_EDITOR_INPUT_ID,R),c.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(I.ExplorerViewletViewsContribution,k.LifecyclePhase.Starting),c.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(v.FileEditorTracker,k.LifecyclePhase.Starting),c.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(m.SaveErrorHandler,k.LifecyclePhase.Starting),c.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(w.DirtyFilesTracker,k.LifecyclePhase.Starting)
;var O=c.Registry.as(u.Extensions.Configuration);O.registerConfiguration({id:"files",order:9,title:o.localize(5,null),type:"object",properties:{"files.exclude":{type:"object",description:o.localize(6,null),default:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0},scope:u.ConfigurationScope.RESOURCE,additionalProperties:{anyOf:[{type:"boolean",description:o.localize(7,null)},{type:"object",properties:{when:{type:"string",pattern:"\\w*\\$\\(basename\\)\\w*",default:"$(basename).ext",description:o.localize(8,null)}}}]}},"files.associations":{type:"object",description:o.localize(9,null)},"files.encoding":{type:"string",overridable:!0,enum:Object.keys(f.SUPPORTED_ENCODINGS),default:"utf8",description:o.localize(10,null),scope:u.ConfigurationScope.RESOURCE,enumDescriptions:Object.keys(f.SUPPORTED_ENCODINGS).map(function(e){return f.SUPPORTED_ENCODINGS[e].labelLong})},"files.autoGuessEncoding":{type:"boolean",overridable:!0,default:!1,description:o.localize(11,null),
scope:u.ConfigurationScope.RESOURCE},"files.eol":{type:"string",enum:["\n","\r\n"],default:E.isLinux||E.isMacintosh?"\n":"\r\n",description:o.localize(12,null),scope:u.ConfigurationScope.RESOURCE},"files.trimTrailingWhitespace":{type:"boolean",default:!1,description:o.localize(13,null),overridable:!0,scope:u.ConfigurationScope.RESOURCE},"files.insertFinalNewline":{type:"boolean",default:!1,description:o.localize(14,null),overridable:!0,scope:u.ConfigurationScope.RESOURCE},"files.trimFinalNewlines":{type:"boolean",default:!1,description:o.localize(15,null),overridable:!0,scope:u.ConfigurationScope.RESOURCE},"files.autoSave":{type:"string",enum:[f.AutoSaveConfiguration.OFF,f.AutoSaveConfiguration.AFTER_DELAY,f.AutoSaveConfiguration.ON_FOCUS_CHANGE,f.AutoSaveConfiguration.ON_WINDOW_CHANGE],enumDescriptions:[o.localize(16,null),o.localize(17,null),o.localize(18,null),o.localize(19,null)],default:f.AutoSaveConfiguration.OFF,
description:o.localize(20,null,f.AutoSaveConfiguration.OFF,f.AutoSaveConfiguration.AFTER_DELAY,f.AutoSaveConfiguration.ON_FOCUS_CHANGE,f.AutoSaveConfiguration.ON_WINDOW_CHANGE,f.AutoSaveConfiguration.AFTER_DELAY)},"files.autoSaveDelay":{type:"number",default:1e3,description:o.localize(21,null,f.AutoSaveConfiguration.AFTER_DELAY)},"files.watcherExclude":{type:"object",default:E.isWindows?{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/node_modules/*/**":!0}:{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/node_modules/**":!0},description:o.localize(22,null),scope:u.ConfigurationScope.RESOURCE},"files.hotExit":{type:"string",enum:[f.HotExitConfiguration.OFF,f.HotExitConfiguration.ON_EXIT,f.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],default:f.HotExitConfiguration.ON_EXIT,enumDescriptions:[o.localize(23,null),o.localize(24,null),o.localize(25,null)],description:o.localize(26,null,f.HotExitConfiguration.ON_EXIT,f.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE)},
"files.useExperimentalFileWatcher":{type:"boolean",default:!1,description:o.localize(27,null)},"files.defaultLanguage":{type:"string",description:o.localize(28,null)},"files.maxMemoryForLargeFilesMB":{type:"number",default:4096,description:o.localize(29,null)}}}),O.registerConfiguration({id:"editor",order:5,title:o.localize(30,null),type:"object",properties:{"editor.formatOnSave":{type:"boolean",default:!1,description:o.localize(31,null),overridable:!0,scope:u.ConfigurationScope.RESOURCE},"editor.formatOnSaveTimeout":{type:"number",default:750,description:o.localize(32,null),overridable:!0,scope:u.ConfigurationScope.RESOURCE}}}),O.registerConfiguration({id:"explorer",order:10,title:o.localize(33,null),type:"object",properties:{"explorer.openEditors.visible":{type:"number",description:o.localize(34,null),default:9},"explorer.autoReveal":{type:"boolean",description:o.localize(35,null),default:!0},"explorer.enableDragAndDrop":{type:"boolean",description:o.localize(36,null),default:!0},
"explorer.confirmDragAndDrop":{type:"boolean",description:o.localize(37,null),default:!0},"explorer.confirmDelete":{type:"boolean",description:o.localize(38,null),default:!0},"explorer.sortOrder":{type:"string",enum:[g.SortOrderConfiguration.DEFAULT,g.SortOrderConfiguration.MIXED,g.SortOrderConfiguration.FILES_FIRST,g.SortOrderConfiguration.TYPE,g.SortOrderConfiguration.MODIFIED],default:g.SortOrderConfiguration.DEFAULT,enumDescriptions:[o.localize(39,null),o.localize(40,null),o.localize(41,null),o.localize(42,null),o.localize(43,null)],description:o.localize(44,null)},"explorer.decorations.colors":{type:"boolean",description:o.localize(45,null),default:!0},"explorer.decorations.badges":{type:"boolean",description:o.localize(46,null),default:!0}}})}),define(e[308],t([1,0,678,10,23,5,54,64,115,27,29,255]),function(e,t,i,r,o,s,c,u,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.preferencesService=i,r}return n(t,e),
t.prototype.run=function(e){return this.preferencesService.openRawDefaultSettings()},t.ID="workbench.action.openRawDefaultSettings",t.LABEL=i.localize(0,null),t=a([l(2,d.IPreferencesService)],t)}(o.Action);t.OpenRawDefaultSettingsAction=g;var v=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.preferencesService2=i,r}return n(t,e),t.prototype.run=function(e){return this.preferencesService2.openSettings2()},t.ID="workbench.action.openSettings2",t.LABEL=i.localize(1,null),t=a([l(2,d.IPreferencesService)],t)}(o.Action);t.OpenSettings2Action=v;var m=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.preferencesService=i,r}return n(t,e),t.prototype.run=function(e){return this.preferencesService.openSettings()},t.ID="workbench.action.openSettings",t.LABEL=i.localize(2,null),t=a([l(2,d.IPreferencesService)],t)}(o.Action);t.OpenSettingsAction=m;var y=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.preferencesService=i,r}return n(t,e),t.prototype.run=function(e){
return this.preferencesService.openGlobalSettings()},t.ID="workbench.action.openGlobalSettings",t.LABEL=i.localize(3,null),t=a([l(2,d.IPreferencesService)],t)}(o.Action);t.OpenGlobalSettingsAction=y;var b=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.preferencesService=i,r}return n(t,e),t.prototype.run=function(e){return this.preferencesService.openGlobalKeybindingSettings(!1)},t.ID="workbench.action.openGlobalKeybindings",t.LABEL=i.localize(4,null),t=a([l(2,d.IPreferencesService)],t)}(o.Action);t.OpenGlobalKeybindingsAction=b;var S=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.preferencesService=i,r}return n(t,e),t.prototype.run=function(e){return this.preferencesService.openGlobalKeybindingSettings(!0)},t.ID="workbench.action.openGlobalKeybindingsFile",t.LABEL=i.localize(5,null),t=a([l(2,d.IPreferencesService)],t)}(o.Action);t.OpenGlobalKeybindingsFileAction=S;var _=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.preferencesService=i,
o.workspaceContextService=r,o.disposables=[],o.update(),o.workspaceContextService.onDidChangeWorkbenchState(function(){return o.update()},o,o.disposables),o}return n(t,e),t.prototype.update=function(){this.enabled=this.workspaceContextService.getWorkbenchState()!==h.WorkbenchState.EMPTY},t.prototype.run=function(e){return this.preferencesService.openWorkspaceSettings()},t.prototype.dispose=function(){this.disposables=s.dispose(this.disposables),e.prototype.dispose.call(this)},t.ID="workbench.action.openWorkspaceSettings",t.LABEL=i.localize(6,null),t=a([l(2,d.IPreferencesService),l(3,h.IWorkspaceContextService)],t)}(o.Action);t.OpenWorkspaceSettingsAction=_,t.OPEN_FOLDER_SETTINGS_COMMAND="_workbench.action.openFolderSettings",t.OPEN_FOLDER_SETTINGS_LABEL=i.localize(7,null);var C=function(e){function i(t,n,i,r){var o=e.call(this,t,n)||this;return o.workspaceContextService=i,o.commandService=r,o.disposables=[],o.update(),o.workspaceContextService.onDidChangeWorkbenchState(function(){return o.update()
},o,o.disposables),o.workspaceContextService.onDidChangeWorkspaceFolders(function(){return o.update()},o,o.disposables),o}return n(i,e),i.prototype.update=function(){this.enabled=this.workspaceContextService.getWorkbenchState()===h.WorkbenchState.WORKSPACE&&this.workspaceContextService.getWorkspace().folders.length>0},i.prototype.run=function(){var e=this;return this.commandService.executeCommand(f.PICK_WORKSPACE_FOLDER_COMMAND_ID).then(function(n){return n?e.commandService.executeCommand(t.OPEN_FOLDER_SETTINGS_COMMAND,n.uri):null})},i.prototype.dispose=function(){this.disposables=s.dispose(this.disposables),e.prototype.dispose.call(this)},i.ID="workbench.action.openFolderSettings",i.LABEL=t.OPEN_FOLDER_SETTINGS_LABEL,i=a([l(2,h.IWorkspaceContextService),l(3,p.ICommandService)],i)}(o.Action);t.OpenFolderSettingsAction=C;var E=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.modeService=i,s.quickOpenService=r,s.preferencesService=o,s}return n(t,e),t.prototype.run=function(){
var e=this,t=this.modeService.getRegisteredLanguageNames().sort().map(function(t,n){var o,s=i.localize(9,null,e.modeService.getModeIdForLanguageName(t.toLowerCase())),a=e.modeService.getExtensions(t);if(a&&a.length)o=r.default.file(a[0]);else{var c=e.modeService.getFilenames(t);c&&c.length&&(o=r.default.file(c[0]))}return{label:t,resource:o,description:s}});return this.quickOpenService.pick(t,{placeHolder:i.localize(10,null)}).then(function(t){if(t)return e.modeService.getOrCreateModeByLanguageName(t.label).then(function(t){return e.preferencesService.configureSettingsForLanguage(t.getLanguageIdentifier().language)})})},t.ID="workbench.action.configureLanguageBasedSettings",t.LABEL=i.localize(8,null),t=a([l(2,c.IModeService),l(3,u.IQuickOpenService),l(4,d.IPreferencesService)],t)}(o.Action);t.ConfigureLanguageBasedSettingsAction=E}),define(e[1570],t([1,0,647,16,217,551,31,56,73,306,29,15,52,11,96,255,187,308,48,165,58,10,43]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict"
;function E(e,t,n){s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:e,title:t},when:n,group:"2_files"})}function w(e,t,n,i,r){u.CommandsRegistry.registerCommand(e,r),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:e,title:t,iconLocation:n},when:d.ContextKeyExpr.equals(o.CONFLICT_RESOLUTION_CONTEXT,!0),group:"navigation",order:i})}function I(e,t,n){s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:e,title:t,category:n}})}Object.defineProperty(t,"__esModule",{value:!0});var T=n.localize(0,null),x=i.Registry.as(a.Extensions.WorkbenchActions);x.registerWorkbenchAction(new s.SyncActionDescriptor(r.SaveAllAction,r.SaveAllAction.ID,r.SaveAllAction.LABEL,{primary:void 0,mac:{primary:2609},win:{primary:c.KeyChord(2089,49)}}),"File: Save All",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.GlobalCompareResourcesAction,r.GlobalCompareResourcesAction.ID,r.GlobalCompareResourcesAction.LABEL),"File: Compare Active File With...",T),
x.registerWorkbenchAction(new s.SyncActionDescriptor(r.FocusOpenEditorsView,r.FocusOpenEditorsView.ID,r.FocusOpenEditorsView.LABEL,{primary:c.KeyChord(2089,35)}),"File: Focus on Open Editors View",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.FocusFilesExplorer,r.FocusFilesExplorer.ID,r.FocusFilesExplorer.LABEL),"File: Focus on Files Explorer",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.ShowActiveFileInExplorer,r.ShowActiveFileInExplorer.ID,r.ShowActiveFileInExplorer.LABEL),"File: Reveal Active File in Side Bar",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.CollapseExplorerView,r.CollapseExplorerView.ID,r.CollapseExplorerView.LABEL),"File: Collapse Folders in Explorer",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.RefreshExplorerView,r.RefreshExplorerView.ID,r.RefreshExplorerView.LABEL),"File: Refresh Explorer",T),
x.registerWorkbenchAction(new s.SyncActionDescriptor(r.GlobalNewUntitledFileAction,r.GlobalNewUntitledFileAction.ID,r.GlobalNewUntitledFileAction.LABEL,{primary:2092}),"File: New Untitled File",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.ShowOpenedFileInNewWindow,r.ShowOpenedFileInNewWindow.ID,r.ShowOpenedFileInNewWindow.LABEL,{primary:c.KeyChord(2089,45)}),"File: Open Active File in New Window",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.CompareWithClipboardAction,r.CompareWithClipboardAction.ID,r.CompareWithClipboardAction.LABEL,{primary:c.KeyChord(2089,33)}),"File: Compare Active File with Clipboard",T),x.registerWorkbenchAction(new s.SyncActionDescriptor(r.ToggleAutoSaveAction,r.ToggleAutoSaveAction.ID,r.ToggleAutoSaveAction.LABEL),"File: Toggle Auto Save",T),u.CommandsRegistry.registerCommand("_files.windowOpen",l.openWindowCommand);h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"renameFile",weight:h.KeybindingsRegistry.WEIGHT.workbenchContrib(10),
when:d.ContextKeyExpr.and(f.FilesExplorerFocusCondition,f.ExplorerRootContext.toNegated(),f.ExplorerResourceNotReadonlyContext),primary:60,mac:{primary:3},handler:r.renameHandler});h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"moveFileToTrash",weight:h.KeybindingsRegistry.WEIGHT.workbenchContrib(10),when:d.ContextKeyExpr.and(f.FilesExplorerFocusCondition,f.ExplorerRootContext.toNegated(),f.ExplorerResourceNotReadonlyContext),primary:20,mac:{primary:2049},handler:r.moveFileToTrashHandler});h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"deleteFile",weight:h.KeybindingsRegistry.WEIGHT.workbenchContrib(10),when:d.ContextKeyExpr.and(f.FilesExplorerFocusCondition,f.ExplorerRootContext.toNegated(),f.ExplorerResourceNotReadonlyContext),primary:1044,mac:{primary:2561},handler:r.deleteFileHandler});h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"filesExplorer.copy",weight:h.KeybindingsRegistry.WEIGHT.workbenchContrib(10),
when:d.ContextKeyExpr.and(f.FilesExplorerFocusCondition,f.ExplorerRootContext.toNegated()),primary:2081,handler:r.copyFileHandler});h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"filesExplorer.paste",weight:h.KeybindingsRegistry.WEIGHT.workbenchContrib(10),when:d.ContextKeyExpr.and(f.FilesExplorerFocusCondition,f.ExplorerResourceNotReadonlyContext),primary:2100,handler:r.pasteFileHandler}),E(l.REVEAL_IN_OS_COMMAND_ID,l.REVEAL_IN_OS_LABEL,b.ResourceContextKey.Scheme.isEqualTo(C.Schemas.file)),E(l.COPY_PATH_COMMAND_ID,r.CopyPathAction.LABEL,b.ResourceContextKey.IsFile),E(l.REVEAL_IN_EXPLORER_COMMAND_ID,n.localize(1,null),b.ResourceContextKey.IsFile),w("workbench.files.action.acceptLocalChanges",n.localize(2,null),{light:_.default.parse(e.toUrl("vs/workbench/parts/files/electron-browser/media/check.svg")),dark:_.default.parse(e.toUrl("vs/workbench/parts/files/electron-browser/media/check-inverse.svg"))},-10,o.acceptLocalChangesCommand),
w("workbench.files.action.revertLocalChanges",n.localize(3,null),{light:_.default.parse(e.toUrl("vs/workbench/parts/files/electron-browser/media/undo.svg")),dark:_.default.parse(e.toUrl("vs/workbench/parts/files/electron-browser/media/undo-inverse.svg"))},-9,o.revertLocalChangesCommand),I(l.COPY_PATH_COMMAND_ID,n.localize(4,null),T),I(l.SAVE_FILE_COMMAND_ID,l.SAVE_FILE_LABEL,T),I(l.SAVE_ALL_IN_GROUP_COMMAND_ID,n.localize(5,null),T),I(l.SAVE_FILES_COMMAND_ID,n.localize(6,null),T),I(l.REVERT_FILE_COMMAND_ID,n.localize(7,null),T),I(l.COMPARE_WITH_SAVED_COMMAND_ID,n.localize(8,null),T),I(l.REVEAL_IN_OS_COMMAND_ID,l.REVEAL_IN_OS_LABEL,T),I(l.SAVE_FILE_AS_COMMAND_ID,l.SAVE_FILE_AS_LABEL,T),I(v.CLOSE_EDITOR_COMMAND_ID,n.localize(9,null),n.localize(10,null)),I(r.NEW_FILE_COMMAND_ID,r.NEW_FILE_LABEL,T),I(r.NEW_FOLDER_COMMAND_ID,r.NEW_FOLDER_LABEL,T);var k={id:l.OPEN_TO_SIDE_COMMAND_ID,title:n.localize(11,null)};s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"navigation",order:10,command:k,
when:b.ResourceContextKey.IsFile});var D={id:l.REVEAL_IN_OS_COMMAND_ID,title:p.isWindows?n.localize(12,null):p.isMacintosh?n.localize(13,null):n.localize(14,null)};s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"navigation",order:20,command:D,when:b.ResourceContextKey.Scheme.isEqualTo(C.Schemas.file)});var A={id:l.COPY_PATH_COMMAND_ID,title:n.localize(15,null)};s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"navigation",order:40,command:A,when:b.ResourceContextKey.IsFile}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"2_save",order:10,command:{id:l.SAVE_FILE_COMMAND_ID,title:l.SAVE_FILE_LABEL,precondition:l.DirtyEditorContext},when:d.ContextKeyExpr.and(b.ResourceContextKey.IsFile,y.AutoSaveContext.notEqualsTo("afterDelay")&&y.AutoSaveContext.notEqualsTo(""))}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"2_save",order:20,command:{id:l.REVERT_FILE_COMMAND_ID,title:n.localize(16,null),precondition:l.DirtyEditorContext},
when:d.ContextKeyExpr.and(b.ResourceContextKey.IsFile,y.AutoSaveContext.notEqualsTo("afterDelay")&&y.AutoSaveContext.notEqualsTo(""))}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"2_save",command:{id:l.SAVE_FILE_AS_COMMAND_ID,title:l.SAVE_FILE_AS_LABEL},when:b.ResourceContextKey.Scheme.isEqualTo(C.Schemas.untitled)}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"2_save",command:{id:l.SAVE_ALL_IN_GROUP_COMMAND_ID,title:n.localize(17,null)},when:d.ContextKeyExpr.and(l.OpenEditorsGroupContext,y.AutoSaveContext.notEqualsTo("afterDelay")&&y.AutoSaveContext.notEqualsTo(""))}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"3_compare",order:10,command:{id:l.COMPARE_WITH_SAVED_COMMAND_ID,title:n.localize(18,null),precondition:l.DirtyEditorContext},when:d.ContextKeyExpr.and(b.ResourceContextKey.IsFile,y.AutoSaveContext.notEqualsTo("afterDelay")&&y.AutoSaveContext.notEqualsTo(""),S.WorkbenchListDoubleSelection.toNegated())});var L={
id:l.COMPARE_RESOURCE_COMMAND_ID,title:n.localize(19,null)};s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"3_compare",order:20,command:L,when:d.ContextKeyExpr.and(b.ResourceContextKey.HasResource,l.ResourceSelectedForCompareContext,S.WorkbenchListDoubleSelection.toNegated())});var R={id:l.SELECT_FOR_COMPARE_COMMAND_ID,title:n.localize(20,null)};s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"3_compare",order:30,command:R,when:d.ContextKeyExpr.and(b.ResourceContextKey.HasResource,S.WorkbenchListDoubleSelection.toNegated())});var O={id:l.COMPARE_SELECTED_COMMAND_ID,title:n.localize(21,null)};s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"3_compare",order:30,command:O,when:d.ContextKeyExpr.and(b.ResourceContextKey.HasResource,S.WorkbenchListDoubleSelection)}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"4_close",order:10,command:{id:v.CLOSE_EDITOR_COMMAND_ID,title:n.localize(22,null)},when:l.OpenEditorsGroupContext.toNegated()}),
s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"4_close",order:20,command:{id:v.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:n.localize(23,null)},when:l.OpenEditorsGroupContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"4_close",order:30,command:{id:v.CLOSE_SAVED_EDITORS_COMMAND_ID,title:n.localize(24,null)}}),s.MenuRegistry.appendMenuItem(s.MenuId.OpenEditorsContext,{group:"4_close",order:40,command:{id:v.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:n.localize(25,null)}}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"navigation",order:4,command:{id:r.NEW_FILE_COMMAND_ID,title:r.NEW_FILE_LABEL,precondition:f.ExplorerResourceNotReadonlyContext},when:f.ExplorerFolderContext}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"navigation",order:6,command:{id:r.NEW_FOLDER_COMMAND_ID,title:r.NEW_FOLDER_LABEL,precondition:f.ExplorerResourceNotReadonlyContext},when:f.ExplorerFolderContext}),
s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"navigation",order:10,command:k,when:d.ContextKeyExpr.and(f.ExplorerFolderContext.toNegated(),b.ResourceContextKey.HasResource)}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"navigation",order:20,command:D,when:b.ResourceContextKey.Scheme.isEqualTo(C.Schemas.file)}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"3_compare",order:20,command:L,when:d.ContextKeyExpr.and(f.ExplorerFolderContext.toNegated(),b.ResourceContextKey.IsFile,l.ResourceSelectedForCompareContext,S.WorkbenchListDoubleSelection.toNegated())}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"3_compare",order:30,command:R,when:d.ContextKeyExpr.and(f.ExplorerFolderContext.toNegated(),b.ResourceContextKey.IsFile,S.WorkbenchListDoubleSelection.toNegated())}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"3_compare",order:30,command:O,
when:d.ContextKeyExpr.and(f.ExplorerFolderContext.toNegated(),b.ResourceContextKey.IsFile,S.WorkbenchListDoubleSelection)}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"5_cutcopypaste",order:10,command:{id:"filesExplorer.copy",title:r.COPY_FILE_LABEL},when:f.ExplorerRootContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"5_cutcopypaste",order:20,command:{id:"filesExplorer.paste",title:r.PASTE_FILE_LABEL,precondition:r.FileCopiedContext},when:f.ExplorerFolderContext}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"5_cutcopypaste",order:30,command:A,when:b.ResourceContextKey.IsFile}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"2_workspace",order:10,command:{id:g.ADD_ROOT_FOLDER_COMMAND_ID,title:g.ADD_ROOT_FOLDER_LABEL},when:f.ExplorerRootContext}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"2_workspace",order:20,command:{id:m.OPEN_FOLDER_SETTINGS_COMMAND,title:m.OPEN_FOLDER_SETTINGS_LABEL},
when:d.ContextKeyExpr.and(f.ExplorerRootContext,f.ExplorerFolderContext)}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"2_workspace",order:30,command:{id:l.REMOVE_ROOT_FOLDER_COMMAND_ID,title:l.REMOVE_ROOT_FOLDER_LABEL},when:d.ContextKeyExpr.and(f.ExplorerRootContext,f.ExplorerFolderContext)}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"7_modification",order:10,command:{id:"renameFile",title:r.TRIGGER_RENAME_LABEL,precondition:f.ExplorerResourceNotReadonlyContext},when:f.ExplorerRootContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.ExplorerContext,{group:"7_modification",order:20,command:{id:"moveFileToTrash",title:r.MOVE_FILE_TO_TRASH_LABEL,precondition:f.ExplorerResourceNotReadonlyContext},alt:{id:"deleteFile",title:n.localize(26,null),precondition:f.ExplorerResourceNotReadonlyContext},when:f.ExplorerRootContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:"workbench.action.files.newUntitledFile",
title:n.localize(27,null)},group:"1_file",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:"workbench.action.quickOpen",title:n.localize(28,null)},group:"1_file",order:20})}),define(e[555],t([1,0,74,8,84,128,409,118,18,9,7,25,11,14,4,45,704,17,15,35,100,33,6,58,22,119,140,34,28,26,12,27,305,176,99,225,354,1151,302,1536,541,231,390,232,233,234,21,46,115,91,914]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var J=function(e){function t(t,n,i,r,o,s,a,c,l,u,h,f,g,v,m,y,b,S,_){var C=e.call(this,D.VIEW_ID,t,n,S)||this;return C.fileService=i,C.editorService=r,C.progressService=o,C.notificationService=s,C.dialogService=a,C.storageService=c,C.contextViewService=l,C.instantiationService=u,C.configurationService=h,C.contextService=f,C.searchWorkbenchService=g,C.contextKeyService=v,C.replaceService=m,C.untitledEditorService=y,C.preferencesService=b,
C.themeService=S,C.searchHistoryService=_,C.actions=[],C.viewletVisible=U.SearchViewVisibleKey.bindTo(v),C.inputBoxFocused=U.InputBoxFocusedKey.bindTo(C.contextKeyService),C.inputPatternIncludesFocused=U.PatternIncludesFocusedKey.bindTo(C.contextKeyService),C.inputPatternExclusionsFocused=U.PatternExcludesFocusedKey.bindTo(C.contextKeyService),C.firstMatchFocused=U.FirstMatchFocusKey.bindTo(v),C.fileMatchOrMatchFocused=U.FileMatchOrMatchFocusKey.bindTo(v),C.fileMatchOrFolderMatchFocus=U.FileMatchOrFolderMatchFocusKey.bindTo(v),C.fileMatchFocused=U.FileFocusKey.bindTo(v),C.folderMatchFocused=U.FolderFocusKey.bindTo(v),C.matchFocused=U.MatchFocusKey.bindTo(C.contextKeyService),C.hasSearchResultsKey=U.HasSearchResults.bindTo(C.contextKeyService),C.queryBuilder=C.instantiationService.createInstance(G.QueryBuilder),C.viewletSettings=C.getMemento(c,W.Scope.WORKSPACE),C.toUnbind.push(C.fileService.onFileChanges(function(e){return C.onFilesChanged(e)})),
C.toUnbind.push(C.untitledEditorService.onDidChangeDirty(function(e){return C.onUntitledDidChangeDirty(e)})),C.toUnbind.push(C.contextService.onDidChangeWorkbenchState(function(){return C.onDidChangeWorkbenchState()})),C._register(C.searchHistoryService.onDidClearHistory(function(){return C.clearHistory()})),C.selectCurrentMatchEmitter=new p.Emitter,p.debounceEvent(C.selectCurrentMatchEmitter.event,function(e,t){return t},100,!0)(function(){return C.selectCurrentMatch()}),C.delayedRefresh=new d.Delayer(250),C}return n(t,e),t.prototype.onDidChangeWorkbenchState=function(){this.contextService.getWorkbenchState()!==M.WorkbenchState.EMPTY&&this.searchWithoutFolderMessageBuilder&&this.searchWithoutFolderMessageBuilder.hide()},t.prototype.create=function(t){var n=this;e.prototype.create.call(this,t),this.viewModel=this.searchWorkbenchService.searchModel;var s;i.$(t).div({class:"search-view"},function(e){s=e}),s.div({class:["search-widgets-container"]},function(e){n.searchWidgetsContainer=e}),
this.createSearchWidget(this.searchWidgetsContainer);var a=this.searchHistoryService.load(),l=this.viewletSettings["query.filePatterns"]||"",u=this.viewletSettings["query.folderExclusions"]||"",d=a.exclude||this.viewletSettings["query.folderExclusionsHistory"]||[],h=this.viewletSettings["query.folderIncludes"]||"",p=a.include||this.viewletSettings["query.folderIncludesHistory"]||[],f=this.viewletSettings["query.queryDetailsExpanded"]||"",g="boolean"!=typeof this.viewletSettings["query.useExcludesAndIgnoreFiles"]||this.viewletSettings["query.useExcludesAndIgnoreFiles"],v=[],y=[];p.forEach(function(e){var t=n.queryBuilder.parseIncludeExcludePattern(e);t.includePattern&&v.push(t.includePattern),t.excludePattern&&y.push(t.excludePattern)}),p=v,d.push.apply(d,y);var S=this.queryBuilder.parseIncludeExcludePattern(h);return h=S.includePattern||"",S.excludePattern&&(u?u+=", "+S.excludePattern:u=S.excludePattern),this.queryDetails=this.searchWidgetsContainer.div({class:["query-details"]},function(e){
n.toggleQueryDetailsButton=e.div({class:"more",tabindex:0,role:"button",title:b.localize(0,null)}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e),n.toggleQueryDetails()}).on(r.EventType.KEY_UP,function(e){var t=new o.StandardKeyboardEvent(e);(t.equals(3)||t.equals(10))&&(r.EventHelper.stop(e),n.toggleQueryDetails(!1))}).on(r.EventType.KEY_DOWN,function(e){new o.StandardKeyboardEvent(e).equals(1026)&&(n.searchWidget.isReplaceActive()?n.searchWidget.focusReplaceAllAction():n.searchWidget.focusRegexAction(),r.EventHelper.stop(e))}).getHTMLElement(),e.div({class:"file-types includes"},function(e){var t=b.localize(1,null);e.element("h4",{text:t}),n.inputPatternIncludes=n.instantiationService.createInstance(V.PatternInputWidget,e.getContainer(),n.contextViewService,{ariaLabel:b.localize(2,null),history:p}),n.inputPatternIncludes.setValue(h),n.inputPatternIncludes.on(c.FindInput.OPTION_CHANGE,function(e){n.onQueryChanged(!1)}),n.inputPatternIncludes.onSubmit(function(){return n.onQueryChanged(!0,!0)}),
n.inputPatternIncludes.onCancel(function(){return n.viewModel.cancelSearch()}),n.trackInputBox(n.inputPatternIncludes.inputFocusTracker,n.inputPatternIncludesFocused)}),e.div({class:"file-types excludes"},function(e){var t=b.localize(3,null);e.element("h4",{text:t}),n.inputPatternExcludes=n.instantiationService.createInstance(V.ExcludePatternInputWidget,e.getContainer(),n.contextViewService,{ariaLabel:b.localize(4,null),history:d}),n.inputPatternExcludes.setValue(u),n.inputPatternExcludes.setUseExcludesAndIgnoreFiles(g),n.inputPatternExcludes.on(c.FindInput.OPTION_CHANGE,function(e){n.onQueryChanged(!1)}),n.inputPatternExcludes.onSubmit(function(){return n.onQueryChanged(!0,!0)}),n.inputPatternExcludes.onSubmit(function(){return n.onQueryChanged(!0,!0)}),n.inputPatternExcludes.onCancel(function(){return n.viewModel.cancelSearch()}),n.trackInputBox(n.inputPatternExcludes.inputFocusTracker,n.inputPatternExclusionsFocused)})}).getHTMLElement(),this.messages=s.div({class:"messages"}).hide().clone(),
this.contextService.getWorkbenchState()===M.WorkbenchState.EMPTY&&this.searchWithoutFolderMessage(this.clearMessage()),this.createSearchResultsView(s),this.actions=[this.instantiationService.createInstance(z.RefreshAction,z.RefreshAction.ID,z.RefreshAction.LABEL),this.instantiationService.createInstance(z.CollapseDeepestExpandedLevelAction,z.CollapseDeepestExpandedLevelAction.ID,z.CollapseDeepestExpandedLevelAction.LABEL),this.instantiationService.createInstance(z.ClearSearchResultsAction,z.ClearSearchResultsAction.ID,z.ClearSearchResultsAction.LABEL)],""===l&&""===u&&""===h&&""===f&&g||this.toggleQueryDetails(!0,!0,!0),this.toUnbind.push(this.viewModel.searchResult.onChange(function(e){return n.onSearchResultsChanged(e)})),m.TPromise.as(null)},Object.defineProperty(t.prototype,"searchAndReplaceWidget",{get:function(){return this.searchWidget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchIncludePattern",{get:function(){return this.inputPatternIncludes},enumerable:!0,configurable:!0
}),Object.defineProperty(t.prototype,"searchExcludePattern",{get:function(){return this.inputPatternExcludes},enumerable:!0,configurable:!0}),t.prototype.updateActions=function(){for(var e=0,t=this.actions;e<t.length;e++){t[e].update()}},t.prototype.createSearchWidget=function(e){var n=this,i=this.viewletSettings["query.contentPattern"]||"",r=!0===this.viewletSettings["query.regex"],o=!0===this.viewletSettings["query.wholeWords"],s=!0===this.viewletSettings["query.caseSensitive"],a=this.searchHistoryService.load(),c=a.search||this.viewletSettings["query.searchHistory"]||[],l=a.replace||this.viewletSettings["query.replaceHistory"]||[];this.searchWidget=this.instantiationService.createInstance(K.SearchWidget,e,{value:i,isRegex:r,isCaseSensitive:s,isWholeWords:o,searchHistory:c,replaceHistory:l}),this.storageService.getBoolean(t.SHOW_REPLACE_STORAGE_KEY,A.StorageScope.WORKSPACE,!0)&&this.searchWidget.toggleReplace(!0),this.toUnbind.push(this.searchWidget),
this.toUnbind.push(this.searchWidget.onSearchSubmit(function(e){return n.onQueryChanged(e)})),this.toUnbind.push(this.searchWidget.onSearchCancel(function(){return n.cancelSearch()})),this.toUnbind.push(this.searchWidget.searchInput.onDidOptionChange(function(e){return n.onQueryChanged(!0,e)})),this.toUnbind.push(this.searchWidget.onReplaceToggled(function(){return n.onReplaceToggled()})),this.toUnbind.push(this.searchWidget.onReplaceStateChange(function(e){n.viewModel.replaceActive=e,n.tree.refresh()})),this.toUnbind.push(this.searchWidget.onReplaceValueChanged(function(e){n.viewModel.replaceString=n.searchWidget.getReplaceValue(),n.delayedRefresh.trigger(function(){return n.tree.refresh()})})),this.toUnbind.push(this.searchWidget.onBlur(function(){n.toggleQueryDetailsButton.focus()})),this.toUnbind.push(this.searchWidget.onReplaceAll(function(){return n.replaceAll()})),this.trackInputBox(this.searchWidget.searchInputFocusTracker),this.trackInputBox(this.searchWidget.replaceInputFocusTracker)},
t.prototype.trackInputBox=function(e,t){var n=this;this.toUnbind.push(e.onDidFocus(function(){n.inputBoxFocused.set(!0),t&&t.set(!0)})),this.toUnbind.push(e.onDidBlur(function(){n.inputBoxFocused.set(n.searchWidget.searchInputHasFocus()||n.searchWidget.replaceInputHasFocus()||n.inputPatternIncludes.inputHasFocus()||n.inputPatternExcludes.inputHasFocus()),t&&t.set(!1)}))},t.prototype.onReplaceToggled=function(){this.layout(this.size);this.searchAndReplaceWidget.isReplaceShown()?this.storageService.remove(t.SHOW_REPLACE_STORAGE_KEY):this.storageService.store(t.SHOW_REPLACE_STORAGE_KEY,!1,A.StorageScope.WORKSPACE)},t.prototype.onSearchResultsChanged=function(e){return this.isVisible()?this.refreshAndUpdateCount(e):(this.changedWhileHidden=!0,m.TPromise.wrap(null))},t.prototype.refreshAndUpdateCount=function(e){var t=this;return this.refreshTree(e).then(function(){t.searchWidget.setReplaceAllActionState(!t.viewModel.searchResult.isEmpty()),t.updateSearchResultCount()})},t.prototype.refreshTree=function(e){
return!e||e.added||e.removed?this.tree.refresh(this.viewModel.searchResult):1===e.elements.length?this.tree.refresh(e.elements[0]):this.tree.refresh(e.elements)},t.prototype.replaceAll=function(){var e=this;if(0!==this.viewModel.searchResult.count()){var t=this.progressService.show(100),n=this.viewModel.searchResult.count(),i=this.viewModel.searchResult.fileCount(),r=this.searchWidget.getReplaceValue()||"",o=this.buildAfterReplaceAllMessage(n,i,r),s={title:b.localize(5,null),message:this.buildReplaceAllConfirmationMessage(n,i,r),primaryButton:b.localize(6,null),type:"question"};this.dialogService.confirm(s).then(function(n){n.confirmed&&(e.searchWidget.setReplaceAllActionState(!1),e.viewModel.searchResult.replaceAll(t).then(function(){t.done(),e.clearMessage().p({text:o})},function(n){t.done(),h.isPromiseCanceledError(n),e.notificationService.error(n)}))})}},t.prototype.buildAfterReplaceAllMessage=function(e,t,n){
return 1===e?1===t?n?b.localize(7,null,e,t,n):b.localize(8,null,e,t):n?b.localize(9,null,e,t,n):b.localize(10,null,e,t):1===t?n?b.localize(11,null,e,t,n):b.localize(12,null,e,t):n?b.localize(13,null,e,t,n):b.localize(14,null,e,t)},t.prototype.buildReplaceAllConfirmationMessage=function(e,t,n){return 1===e?1===t?n?b.localize(15,null,e,t,n):b.localize(16,null,e,t):n?b.localize(17,null,e,t,n):b.localize(18,null,e,t):1===t?n?b.localize(19,null,e,t,n):b.localize(20,null,e,t):n?b.localize(21,null,e,t,n):b.localize(22,null,e,t)},t.prototype.clearMessage=function(){return this.searchWithoutFolderMessageBuilder=void 0,this.messages.empty().show().asContainer().div({class:"message"}).asContainer()},t.prototype.createSearchResultsView=function(e){var t=this;e.div({class:"results"},function(e){t.results=e,t.results.addClass("show-file-icons");var n=t.instantiationService.createInstance(H.SearchDataSource);t.toUnbind.push(n);var i=t.instantiationService.createInstance(H.SearchRenderer,t.getActionRunner(),t)
;t.toUnbind.push(i);var r=t.instantiationService.createInstance(N.SimpleFileResourceDragAndDrop,function(e){return e instanceof $.FileMatch?e.resource():void 0});t.tree=t.instantiationService.createInstance(T.WorkbenchTree,e.getHTMLElement(),{dataSource:n,renderer:i,sorter:new H.SearchSorter,filter:new H.SearchFilter,controller:t.instantiationService.createInstance(H.SearchTreeController),accessibilityProvider:t.instantiationService.createInstance(H.SearchAccessibilityProvider),dnd:r},{ariaLabel:b.localize(23,null),showLoading:!1}),t.tree.setInput(t.viewModel.searchResult),t.toUnbind.push(i);var o=t._register(new T.TreeResourceNavigator(t.tree,{openOnFocus:!0}));t._register(p.debounceEvent(o.openResource,function(e,t){return t},75,!0)(function(e){if(e.element instanceof $.Match){var n=e.element;t.currentSelectedFileMatch&&t.currentSelectedFileMatch.setSelectedMatch(null),t.currentSelectedFileMatch=n.parent(),t.currentSelectedFileMatch.setSelectedMatch(n),
e.payload&&e.payload.preventEditorOpen||t.onFocus(n,e.editorOptions.preserveFocus,e.sideBySide,e.editorOptions.pinned)}}));var s=!1;t.tree.onDidFocus(function(){s=!0}),t.toUnbind.push(t.tree.onDidChangeFocus(function(e){if(s){var n=e.focus;t.firstMatchFocused.set(t.tree.getNavigator().first()===n),t.fileMatchOrMatchFocused.set(!!n),t.fileMatchFocused.set(n instanceof $.FileMatch),t.folderMatchFocused.set(n instanceof $.FolderMatch),t.matchFocused.set(n instanceof $.Match),t.fileMatchOrFolderMatchFocus.set(n instanceof $.FileMatch||n instanceof $.FolderMatch)}})),t.toUnbind.push(t.tree.onDidBlur(function(e){s=!1,t.firstMatchFocused.reset(),t.fileMatchOrMatchFocused.reset(),t.fileMatchFocused.reset(),t.folderMatchFocused.reset(),t.matchFocused.reset(),t.fileMatchOrFolderMatchFocus.reset()}))})},t.prototype.selectCurrentMatch=function(){var e=this.tree.getFocus();this.tree.setSelection([e],{focusEditor:!0})},t.prototype.selectNextMatch=function(){var e=this.tree.getSelection()[0]
;e instanceof $.FileMatch&&(this.tree.isExpanded(e)||this.tree.expand(e));var t=this.tree.getNavigator(e,!1),n=t.next();if(n||(n=(t=this.tree.getNavigator(this.tree.getInput(),!0)).first()),n instanceof $.Match||(this.tree.isExpanded(n)||this.tree.expand(n),n=t.next()),n){var i={preventEditorOpen:!0};this.tree.setFocus(n,i),this.tree.setSelection([n],i),this.tree.reveal(n),this.selectCurrentMatchEmitter.fire()}},t.prototype.selectPreviousMatch=function(){var e=this.tree.getSelection()[0],t=this.tree.getNavigator(e,!1),n=t.previous();if(!(n instanceof $.Match)){if(!(n=t.previous())){n=(t=this.tree.getNavigator(this.tree.getInput(),!0)).last(),this.tree.expand(n);for(var i=void 0;i=t.next();)n=i}n instanceof $.Match||(t.next(),this.tree.expand(n),n=t.previous())}if(n){var r={preventEditorOpen:!0};this.tree.setFocus(n,r),this.tree.setSelection([n],r),this.tree.reveal(n),this.selectCurrentMatchEmitter.fire()}},t.prototype.setVisible=function(t){var n;if(this.viewletVisible.set(t),
t?(this.changedWhileHidden&&(this.refreshAndUpdateCount(),this.changedWhileHidden=!1),n=e.prototype.setVisible.call(this,t),this.tree.onVisible()):(this.tree.onHidden(),n=e.prototype.setVisible.call(this,t)),this.viewModel&&this.viewModel.searchResult.toggleHighlights(t),t&&!this.editorService.activeEditor){var i=this.tree.getFocus();i&&this.onFocus(i,!0)}return n},t.prototype.focus=function(){e.prototype.focus.call(this);var t=!1;if(this.configurationService.getValue("editor").find.seedSearchStringFromSelection){var n=this.getSearchTextFromEditor();n&&(this.searchWidget.searchInput.getRegex()&&(n=v.escapeRegExpCharacters(n)),this.searchWidget.searchInput.setValue(n),t=!0)}this.searchWidget.focus(void 0,void 0,t)},t.prototype.focusNextInputBox=function(){if(this.searchWidget.searchInputHasFocus())this.searchWidget.isReplaceShown()?this.searchWidget.focus(!0,!0):this.moveFocusFromSearchOrReplace();else{
if(!this.searchWidget.replaceInputHasFocus())return this.inputPatternIncludes.inputHasFocus()?(this.inputPatternExcludes.focus(),void this.inputPatternExcludes.select()):void(this.inputPatternExcludes.inputHasFocus()&&this.selectTreeIfNotSelected());this.moveFocusFromSearchOrReplace()}},t.prototype.moveFocusFromSearchOrReplace=function(){this.showsFileTypes()?this.toggleQueryDetails(!0,this.showsFileTypes()):this.selectTreeIfNotSelected()},t.prototype.focusPreviousInputBox=function(){if(!this.searchWidget.searchInputHasFocus())if(this.searchWidget.replaceInputHasFocus())this.searchWidget.focus(!0);else{if(!this.inputPatternIncludes.inputHasFocus())return this.inputPatternExcludes.inputHasFocus()?(this.inputPatternIncludes.focus(),void this.inputPatternIncludes.select()):void(this.tree.isDOMFocused()&&this.moveFocusFromResults());this.searchWidget.focus(!0,!0)}},t.prototype.moveFocusFromResults=function(){this.showsFileTypes()?this.toggleQueryDetails(!0,!0,!1,!0):this.searchWidget.focus(!0,!0)},
t.prototype.reLayout=function(){if(!this.isDisposed){this.size.width>=t.WIDE_VIEW_SIZE?r.addClass(this.getContainer(),t.WIDE_CLASS_NAME):r.removeClass(this.getContainer(),t.WIDE_CLASS_NAME),this.searchWidget.setWidth(this.size.width-28),this.inputPatternExcludes.setWidth(this.size.width-28),this.inputPatternIncludes.setWidth(this.size.width-28);var e=this.messages.isHidden()?0:r.getTotalHeight(this.messages.getHTMLElement()),n=this.size.height-e-r.getTotalHeight(this.searchWidgetsContainer.getContainer());this.results.style({height:n+"px"}),this.tree.layout(n)}},t.prototype.layout=function(e){this.size=e,this.reLayout()},t.prototype.getControl=function(){return this.tree},t.prototype.isSearchSubmitted=function(){return this.searchSubmitted},t.prototype.isSearching=function(){return this.searching},t.prototype.hasSearchResults=function(){return!this.viewModel.searchResult.isEmpty()},t.prototype.clearSearchResults=function(){this.viewModel.searchResult.clear(),this.showEmptyStage(),
this.contextService.getWorkbenchState()===M.WorkbenchState.EMPTY&&this.searchWithoutFolderMessage(this.clearMessage()),this.searchWidget.clear(),this.viewModel.cancelSearch()},t.prototype.cancelSearch=function(){return!!this.viewModel.cancelSearch()&&(this.searchWidget.focus(),!0)},t.prototype.selectTreeIfNotSelected=function(){if(this.tree.getInput()){this.tree.domFocus();0===this.tree.getSelection().length&&this.tree.focusNext()}},t.prototype.getSearchTextFromEditor=function(){if(!this.editorService.activeEditor)return null;var e=this.editorService.activeTextEditorWidget;if(y.isDiffEditor(e)&&(e=e.getOriginalEditor().hasTextFocus()?e.getOriginalEditor():e.getModifiedEditor()),!y.isCodeEditor(e))return null;var t=e.getSelection();if(!t)return null;if(t.isEmpty()&&!this.searchWidget.searchInput.getValue()){var n=e.getModel().getWordAtPosition(t.getStartPosition());if(n)return n.word}if(!t.isEmpty()&&t.startLineNumber===t.endLineNumber){var i=e.getModel().getLineContent(t.startLineNumber)
;return i=i.substring(t.startColumn-1,t.endColumn-1)}return null},t.prototype.showsFileTypes=function(){return r.hasClass(this.queryDetails,"more")},t.prototype.toggleCaseSensitive=function(){this.searchWidget.searchInput.setCaseSensitive(!this.searchWidget.searchInput.getCaseSensitive()),this.onQueryChanged(!0,!0)},t.prototype.toggleWholeWords=function(){this.searchWidget.searchInput.setWholeWords(!this.searchWidget.searchInput.getWholeWords()),this.onQueryChanged(!0,!0)},t.prototype.toggleRegex=function(){this.searchWidget.searchInput.setRegex(!this.searchWidget.searchInput.getRegex()),this.onQueryChanged(!0,!0)},t.prototype.toggleQueryDetails=function(e,t,n,i){void 0===e&&(e=!0);t=void 0===t?!r.hasClass(this.queryDetails,"more"):Boolean(t),this.viewletSettings["query.queryDetailsExpanded"]=t,n=Boolean(n),t?(this.toggleQueryDetailsButton.setAttribute("aria-expanded","true"),r.addClass(this.queryDetails,"more"),e&&(i?(this.inputPatternExcludes.focus(),
this.inputPatternExcludes.select()):(this.inputPatternIncludes.focus(),this.inputPatternIncludes.select()))):(this.toggleQueryDetailsButton.setAttribute("aria-expanded","false"),r.removeClass(this.queryDetails,"more"),e&&this.searchWidget.focus()),!n&&this.size&&this.layout(this.size)},t.prototype.searchInFolders=function(e,t){var n=this,i=[],r=this.contextService.getWorkspace();if(e&&e.forEach(function(e){var o;if(n.contextService.getWorkbenchState()===M.WorkbenchState.FOLDER)(o=f.normalize(t(r.folders[0].uri.fsPath,e.fsPath)))&&"."!==o&&(o="./"+o);else{var s=n.contextService.getWorkspaceFolder(e);if(s){var a=f.basename(s.uri.fsPath);o=1===r.folders.filter(function(e){return f.basename(e.uri.fsPath)===a}).length?"./"+a+"/"+f.normalize(t(s.uri.fsPath,e.fsPath)):e.fsPath}}o&&i.push(o)}),!i.length||i.some(function(e){return"."===e}))return this.inputPatternIncludes.setValue(""),void this.searchWidget.focus();this.showsFileTypes()||this.toggleQueryDetails(!0,!0),this.inputPatternIncludes.setValue(i.join(", ")),
this.searchWidget.focus(!1)},t.prototype.onQueryChanged=function(e,n){var i=this,r=this.searchWidget.searchInput.getRegex(),o=this.searchWidget.searchInput.getWholeWords(),s=this.searchWidget.searchInput.getCaseSensitive(),a=this.searchWidget.searchInput.getValue(),c=this.inputPatternExcludes.getValue().trim(),l=this.inputPatternIncludes.getValue().trim(),d=this.inputPatternExcludes.useExcludesAndIgnoreFiles();if(e&&0!==a.length){if(r){var h=void 0;try{h=new RegExp(a)}catch(e){return}if(v.regExpLeadsToEndlessLoop(h))return}var p,f={pattern:a,isRegExp:r,isCaseSensitive:s,isWordMatch:o,wordSeparators:this.configurationService.getValue().editor.wordSeparators,isSmartCase:this.configurationService.getValue().search.smartCase},g=this.inputPatternExcludes.getValue(),m=this.inputPatternIncludes.getValue(),y={extraFileResources:q.getOutOfWorkspaceEditorResources(this.editorService,this.contextService),maxResults:t.MAX_TEXT_RESULTS,disregardIgnoreFiles:!d,disregardExcludeSettings:!d,excludePattern:g,includePattern:m
},b=this.contextService.getWorkspace().folders,S=function(e){i.searchWidget.searchInput.showMessage({content:e.message,type:u.MessageType.ERROR}),i.viewModel.searchResult.clear()};try{p=this.queryBuilder.text(f,b.map(function(e){return e.uri}),y)}catch(e){return void S(e)}this.validateQuery(p).then(function(){i.onQueryTriggered(p,c,l),n||i.searchWidget.focus(!1)},S)}},t.prototype.validateQuery=function(e){var t=this,n=e.folderQueries.map(function(e){return t.fileService.existsFile(e.folder)});return m.TPromise.join(n).then(function(t){var n=e.folderQueries.filter(function(e,n){return t[n]});if(e.folderQueries.length&&!n.length){var i=e.folderQueries[0].folder.fsPath,r=b.localize(24,null,i);return m.TPromise.wrapError(new Error(r))}e.folderQueries=n})},t.prototype.onQueryTriggered=function(e,t,n){var o=this;this.inputPatternExcludes.onSearchSubmit(),this.inputPatternIncludes.onSearchSubmit(),this.viewModel.cancelSearch();var a=0,c=e.useRipgrep?this.progressService.show(!0):this.progressService.show(1e3)
;this.searchWidget.searchInput.clearMessage(),this.searching=!0,setTimeout(function(){o.searching&&o.changeActionAtPosition(0,o.instantiationService.createInstance(z.CancelSearchAction,z.CancelSearchAction.ID,z.CancelSearchAction.LABEL))},2e3),this.showEmptyStage();var l=function(l){o.searching=!1,o.changeActionAtPosition(0,o.instantiationService.createInstance(z.RefreshAction,z.RefreshAction.ID,z.RefreshAction.LABEL)),l&&!e.useRipgrep?(c.worked(1e3-a),setTimeout(function(){return c.done()},200)):c.done(),o.onSearchResultsChanged().then(function(){if(1===o.viewModel.searchResult.count()){var e=o.viewModel.searchResult.matches()[0];if(e.count()<50)return o.tree.expand(e)}return null}).done(null,h.onUnexpectedError),o.viewModel.replaceString=o.searchWidget.getReplaceValue();var d=!o.viewModel.searchResult.isEmpty();if(o.searchSubmitted=!0,o.updateActions(),l&&l.limitHit&&o.searchWidget.searchInput.showMessage({content:b.localize(25,null),type:u.MessageType.WARNING}),
d)o.viewModel.searchResult.toggleHighlights(!0),s.status(b.localize(35,null,o.viewModel.searchResult.count(),o.viewModel.searchResult.fileCount()));else{var p=!!t,f=!!n,g=void 0;g=l?f&&p?b.localize(27,null,n,t):f?b.localize(28,null,n):p?b.localize(29,null,t):b.localize(30,null):b.localize(26,null),s.status(g),o.tree.onHidden(),o.results.hide();var v=o.clearMessage(),m=i.$(v).p({text:g});l?f||p?i.$(m).a({class:["pointer","prominent"],tabindex:"0",text:b.localize(32,null)}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e,!1),o.inputPatternExcludes.setValue(""),o.inputPatternIncludes.setValue(""),o.onQueryChanged(!0)}):i.$(m).a({class:["pointer","prominent"],tabindex:"0",text:b.localize(33,null)}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e,!1);(o.contextService.getWorkbenchState()!==M.WorkbenchState.EMPTY?o.preferencesService.openWorkspaceSettings():o.preferencesService.openGlobalSettings()).done(function(e){e instanceof B.PreferencesEditor&&e.focusSearch(".exclude")},h.onUnexpectedError)
}):i.$(m).a({class:["pointer","prominent"],text:b.localize(31,null)}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e,!1),o.onQueryChanged(!0)}),l&&(i.$(m).span({text:" - "}),i.$(m).a({class:["pointer","prominent"],tabindex:"0",text:b.localize(34,null)}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e,!1),window.open("https://go.microsoft.com/fwlink/?linkid=853977")})),o.contextService.getWorkbenchState()===M.WorkbenchState.EMPTY&&o.searchWithoutFolderMessage(v)}},d=0,p=0,f=0,g=setInterval(function(){if(o.searching){if(!e.useRipgrep){var t=!0;if(d>0&&p>0){var n=Math.round(p/d*1e3);n>a&&(c.worked(n-a),a=n,t=!1)}if(t&&a<900){var i=Math.round((900-a)/900*12)||1;a+=i,c.worked(i)}}var r=o.viewModel.searchResult.fileCount();f!==r&&(f=r,o.tree.refresh().done(null,h.onUnexpectedError),o.updateSearchResultCount()),r>0&&o.updateActions()}else window.clearInterval(g)},100);this.searchWidget.setReplaceAllActionState(!1),this.viewModel.search(e).done(l,function(e){
h.isPromiseCanceledError(e)?l(null):(o.searching=!1,o.changeActionAtPosition(0,o.instantiationService.createInstance(z.RefreshAction,z.RefreshAction.ID,z.RefreshAction.LABEL)),c.done(),o.searchWidget.searchInput.showMessage({content:e.message,type:u.MessageType.ERROR}),o.viewModel.searchResult.clear())},function(e){e.total&&(d=e.total),e.worked&&(p=e.worked)})},t.prototype.updateSearchResultCount=function(){var e=this.viewModel.searchResult.fileCount();this.hasSearchResultsKey.set(e>0);var t=this.messages.isHidden();if(e>0){var n=this.clearMessage();i.$(n).p({text:this.buildResultCountMessage(this.viewModel.searchResult.count(),e)}),t&&this.reLayout()}else t||this.messages.hide()},t.prototype.buildResultCountMessage=function(e,t){return 1===e&&1===t?b.localize(36,null,e,t):1===e?b.localize(37,null,e,t):1===t?b.localize(38,null,e,t):b.localize(39,null,e,t)},t.prototype.searchWithoutFolderMessage=function(e){var t=this;this.searchWithoutFolderMessageBuilder=i.$(e),this.searchWithoutFolderMessageBuilder.p({
text:b.localize(40,null)}).asContainer().a({class:["pointer","prominent"],tabindex:"0",text:b.localize(41,null)}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e,!1);var n=g.isMacintosh?P.OpenFileFolderAction:P.OpenFolderAction,i=t.instantiationService.createInstance(n,n.ID,n.LABEL);t.actionRunner.run(i).done(function(){i.dispose()},function(e){i.dispose(),h.onUnexpectedError(e)})})},t.prototype.showEmptyStage=function(){this.searchSubmitted=!1,this.updateActions(),this.messages.hide(),this.results.show(),this.tree.onVisible(),this.currentSelectedFileMatch=null},t.prototype.onFocus=function(e,t,n,i){return e instanceof $.Match?this.viewModel.isReplaceActive()&&this.viewModel.replaceString?this.replaceService.openReplacePreview(e,t,n,i):this.open(e,t,n,i):(this.viewModel.searchResult.rangeHighlightDecorations.removeHighlightRange(),m.TPromise.as(!0))},t.prototype.open=function(e,t,n,i){var r=this,o=this.getSelectionFrom(e),s=e instanceof $.Match?e.parent().resource():e.resource()
;return this.editorService.openEditor({resource:s,options:{preserveFocus:t,pinned:i,selection:o,revealIfVisible:!0}},n?Y.SIDE_GROUP:Y.ACTIVE_GROUP).then(function(n){n&&e instanceof $.Match&&t?r.viewModel.searchResult.rangeHighlightDecorations.highlightRange(n.getControl().getModel(),e.range()):r.viewModel.searchResult.rangeHighlightDecorations.removeHighlightRange()},h.onUnexpectedError)},t.prototype.getSelectionFrom=function(e){var t=null;if(e instanceof $.Match&&(t=e),e instanceof $.FileMatch&&e.count()>0&&(t=e.matches()[e.matches().length-1]),t){var n=t.range();if(this.viewModel.isReplaceActive()&&this.viewModel.replaceString){var i=t.replaceString;return{startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.startLineNumber,endColumn:n.startColumn+i.length}}return n}},t.prototype.onUntitledDidChangeDirty=function(e){
if(this.viewModel&&!this.untitledEditorService.isDirty(e))for(var t=this.viewModel.searchResult.matches(),n=0,i=t.length;n<i;n++)e.toString()===t[n].resource().toString()&&this.viewModel.searchResult.remove(t[n])},t.prototype.onFilesChanged=function(e){if(this.viewModel)for(var t=this.viewModel.searchResult.matches(),n=0,i=t.length;n<i;n++)e.contains(t[n].resource(),w.FileChangeType.DELETED)&&this.viewModel.searchResult.remove(t[n])},t.prototype.getActions=function(){return this.actions},t.prototype.changeActionAtPosition=function(e,t){this.actions.splice(e,1,t),this.updateTitleArea()},t.prototype.clearHistory=function(){this.searchWidget.clearHistory(),this.inputPatternExcludes.clearHistory(),this.inputPatternIncludes.clearHistory()},t.prototype.shutdown=function(){
var t=this.searchWidget.searchInput.getRegex(),n=this.searchWidget.searchInput.getWholeWords(),i=this.searchWidget.searchInput.getCaseSensitive(),r=this.searchWidget.searchInput.getValue(),o=this.inputPatternExcludes.getValue().trim(),s=this.inputPatternIncludes.getValue().trim(),a=this.inputPatternExcludes.useExcludesAndIgnoreFiles();this.viewletSettings["query.contentPattern"]=r,this.viewletSettings["query.regex"]=t,this.viewletSettings["query.wholeWords"]=n,this.viewletSettings["query.caseSensitive"]=i,this.viewletSettings["query.folderExclusions"]=o,this.viewletSettings["query.folderIncludes"]=s,this.viewletSettings["query.useExcludesAndIgnoreFiles"]=a;var c=this.searchWidget.getSearchHistory(),l=this.searchWidget.getReplaceHistory(),u=this.inputPatternExcludes.getHistory(),d=this.inputPatternIncludes.getHistory();this.viewletSettings["query.searchHistory"]=c,this.viewletSettings["query.replaceHistory"]=l,this.viewletSettings["query.folderExclusionsHistory"]=u,
this.viewletSettings["query.folderIncludesHistory"]=d,this.searchHistoryService.save({search:c,replace:l,exclude:u,include:d}),e.prototype.shutdown.call(this)},t.prototype.dispose=function(){this.isDisposed=!0,this.tree&&this.tree.dispose(),this.searchWidget.dispose(),this.inputPatternIncludes.dispose(),this.inputPatternExcludes.dispose(),this.viewModel.dispose(),e.prototype.dispose.call(this)},t.MAX_TEXT_RESULTS=1e4,t.SHOW_REPLACE_STORAGE_KEY="vs.search.show.replace",t.WIDE_CLASS_NAME="wide",t.WIDE_VIEW_SIZE=600,t=a([l(0,X.IPartService),l(1,L.ITelemetryService),l(2,w.IFileService),l(3,Y.IEditorService),l(4,k.IProgressService),l(5,x.INotificationService),l(6,E.IDialogService),l(7,A.IStorageService),l(8,C.IContextViewService),l(9,I.IInstantiationService),l(10,S.IConfigurationService),l(11,M.IWorkspaceContextService),l(12,$.ISearchWorkbenchService),l(13,_.IContextKeyService),l(14,j.IReplaceService),l(15,Z.IUntitledEditorService),l(16,Q.IPreferencesService),l(17,O.IThemeService),l(18,D.ISearchHistoryService)],t)
}(F.Viewlet);t.SearchView=J,O.registerThemingParticipant(function(e,t){var n=e.getColor(R.editorFindMatchHighlight);n&&t.addRule(".monaco-workbench .search-view .findInFileMatch { background-color: "+n+"; }");var i=e.getColor(R.diffInserted);i&&t.addRule(".monaco-workbench .search-view .replaceMatch { background-color: "+i+"; }");var r=e.getColor(R.diffRemoved);r&&t.addRule(".monaco-workbench .search-view .replace.findInFileMatch { background-color: "+r+"; }");var o=e.getColor(R.diffInsertedOutline);o&&t.addRule(".monaco-workbench .search-view .replaceMatch:not(:empty) { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var s=e.getColor(R.diffRemovedOutline);s&&t.addRule(".monaco-workbench .search-view .replace.findInFileMatch { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(R.editorFindMatchHighlightBorder);a&&t.addRule(".monaco-workbench .search-view .findInFileMatch { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+a+"; }")})}),
define(e[1572],t([1,0,16,107,99,63,707,4,23,24,11,96,31,56,86,52,6,64,71,296,65,231,1431,541,15,219,234,29,555,164,430,522,32,233,9,58,59,70,165,33,20,327,43,108,81,302,140,75,38,1537,17,21,915]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z,J,ee){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.registerSingleton(D.ISearchWorkbenchService,D.SearchWorkbenchService),I.registerContributions(),T.registerContributions();var te=c.localize(0,null);y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.search.toggleQueryDetails",weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:w.SearchViewVisibleKey,primary:3112,handler:function(e){var t=$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService));t&&t.toggleQueryDetails()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.FocusSearchFromResults,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),
when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.FirstMatchFocusKey),primary:2064,handler:function(e,t){$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)).focusPreviousInputBox()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.OpenMatchToSide,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.FileMatchOrMatchFocusKey),primary:2051,mac:{primary:259},handler:function(e,t){var n=$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)),i=n.getControl();n.open(i.getFocus(),!1,!0,!0)}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.CancelActionId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,W.WorkbenchListFocusContextKey),primary:9,handler:function(e,t){$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)).cancelSearch()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.RemoveActionId,
weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.FileMatchOrMatchFocusKey),primary:20,mac:{primary:2049},handler:function(e,t){var n=$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)),i=n.getControl();e.get(b.IInstantiationService).createInstance($.RemoveAction,i,i.getFocus(),n).run()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.ReplaceActionId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.ReplaceActiveKey,w.MatchFocusKey),primary:3094,handler:function(e,t){var n=$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)),i=n.getControl();e.get(b.IInstantiationService).createInstance($.ReplaceAction,i,i.getFocus(),n).run()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.ReplaceAllInFileActionId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.ReplaceActiveKey,w.FileFocusKey),
primary:3094,secondary:[3075],handler:function(e,t){var n=$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)),i=n.getControl();e.get(b.IInstantiationService).createInstance($.ReplaceAllAction,i,i.getFocus(),n).run()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.ReplaceAllInFolderActionId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.ReplaceActiveKey,w.FolderFocusKey),primary:3094,secondary:[3075],handler:function(e,t){var n=$.getSearchView(e.get(E.IViewletService),e.get(q.IPanelService)).getControl();e.get(b.IInstantiationService).createInstance($.ReplaceAllInFolderAction,n,n.getFocus()).run()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.CloseReplaceWidgetActionId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.ReplaceInputBoxFocusedKey),primary:9,handler:function(e,t){
e.get(b.IInstantiationService).createInstance($.CloseReplaceAction,w.CloseReplaceWidgetActionId,"").run()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:$.FocusNextInputAction.ID,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.InputBoxFocusedKey),primary:2066,handler:function(e,t){e.get(b.IInstantiationService).createInstance($.FocusNextInputAction,$.FocusNextInputAction.ID,"").run()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:$.FocusPreviousInputAction.ID,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.InputBoxFocusedKey,w.SearchInputBoxFocusedKey.toNegated()),primary:2064,handler:function(e,t){e.get(b.IInstantiationService).createInstance($.FocusPreviousInputAction,$.FocusPreviousInputAction.ID,"").run()}}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.ReplaceActionId,title:$.ReplaceAction.LABEL},
when:x.ContextKeyExpr.and(w.ReplaceActiveKey,w.MatchFocusKey),group:"search",order:1}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.ReplaceAllInFolderActionId,title:$.ReplaceAllInFolderAction.LABEL},when:x.ContextKeyExpr.and(w.ReplaceActiveKey,w.FolderFocusKey),group:"search",order:1}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.ReplaceAllInFileActionId,title:$.ReplaceAllAction.LABEL},when:x.ContextKeyExpr.and(w.ReplaceActiveKey,w.FileFocusKey),group:"search",order:1}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.RemoveActionId,title:$.RemoveAction.LABEL},when:w.FileMatchOrMatchFocusKey,group:"search",order:2}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.CopyMatchCommandId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:w.FileMatchOrMatchFocusKey,primary:2081,handler:$.copyMatchCommand}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.CopyMatchCommandId,title:c.localize(1,null)},
when:w.FileMatchOrMatchFocusKey,group:"search_2",order:1}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:w.CopyPathCommandId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:w.FileMatchOrFolderMatchFocusKey,primary:2593,win:{primary:1569},handler:$.copyPathCommand}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.CopyPathCommandId,title:c.localize(2,null)},when:w.FileMatchOrFolderMatchFocusKey,group:"search_2",order:2}),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:{id:w.CopyAllCommandId,title:c.localize(3,null)},when:w.HasSearchResults,group:"search_2",order:3}),A.CommandsRegistry.registerCommand({id:w.CopyAllCommandId,handler:$.copyAllCommand}),A.CommandsRegistry.registerCommand({id:w.ClearSearchHistoryCommandId,handler:$.clearHistoryCommand});var ne=c.localize(4,null),ie={id:w.ClearSearchHistoryCommandId,title:ne,category:te};g.MenuRegistry.addCommand(ie),A.CommandsRegistry.registerCommand({id:w.ToggleSearchViewPositionCommandId,
handler:function(e){var t=e.get(J.IConfigurationService),n="sidebar"===t.getValue("search").location?"panel":"sidebar";t.updateValue("search.location",n)}});var re=c.localize(5,null),oe={id:w.ToggleSearchViewPositionCommandId,title:re,category:te};g.MenuRegistry.addCommand(oe),g.MenuRegistry.appendMenuItem(g.MenuId.SearchContext,{command:oe,when:w.SearchViewVisibleKey,group:"search_9",order:1});A.CommandsRegistry.registerCommand({id:"filesExplorer.findInFolder",handler:function(e,t){var n=e.get(W.IListService),i=e.get(E.IViewletService),r=e.get(q.IPanelService),o=e.get(H.IFileService),s=U.getMultiSelectedResources(t,n,e.get(ee.IEditorService));return $.openSearchView(i,r,!0).then(function(e){if(s&&s.length)return o.resolveFiles(s.map(function(e){return{resource:e}})).then(function(t){var n=[];t.forEach(function(e){e.success&&n.push(e.stat.isDirectory?e.stat.resource:V.dirname(e.stat.resource))}),e.searchInFolders(K.distinct(n,function(e){return e.toString()}),function(e,t){return B.relative(e,t)})})})}}),
A.CommandsRegistry.registerCommand({id:$.ClearSearchResultsAction.ID,handler:function(e,t){e.get(b.IInstantiationService).createInstance($.ClearSearchResultsAction,$.ClearSearchResultsAction.ID,"").run()}}),A.CommandsRegistry.registerCommand({id:$.RefreshAction.ID,handler:function(e,t){e.get(b.IInstantiationService).createInstance($.RefreshAction,$.RefreshAction.ID,"").run()}});A.CommandsRegistry.registerCommand({id:"filesExplorer.findInWorkspace",handler:function(e){return $.openSearchView(e.get(E.IViewletService),e.get(q.IPanelService),!0).then(function(e){e.searchInFolders(null,function(e,t){return B.relative(e,t)})})}}),g.MenuRegistry.appendMenuItem(g.MenuId.ExplorerContext,{group:"4_search",order:10,command:{id:"filesExplorer.findInFolder",title:c.localize(6,null)},when:x.ContextKeyExpr.and(f.ExplorerFolderContext,z.ResourceContextKey.Scheme.isEqualTo(G.Schemas.file))}),g.MenuRegistry.appendMenuItem(g.MenuId.ExplorerContext,{group:"4_search",order:10,command:{id:"filesExplorer.findInWorkspace",
title:c.localize(7,null)},when:x.ContextKeyExpr.and(f.ExplorerRootContext,f.ExplorerFolderContext.toNegated())});var se=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.quickOpenService=i,o.editorService=r,o.enabled=!!o.quickOpenService,o}return n(t,e),t.prototype.run=function(e){var n=t.ALL_SYMBOLS_PREFIX,i=void 0,r=this.editorService.getFocusedCodeEditor(),o=r&&C.getSelectionSearchString(r);return o&&(n+=o,i={start:1,end:o.length+1}),this.quickOpenService.show(n,{inputSelection:i}),u.TPromise.as(null)},t.ID="workbench.action.showAllSymbols",t.LABEL=c.localize(8,null),t.ALL_SYMBOLS_PREFIX="#",t=a([l(2,S.IQuickOpenService),l(3,_.ICodeEditorService)],t)}(d.Action);i.Registry.as(o.Extensions.Viewlets).registerViewlet(new o.ViewletDescriptor(L.SearchView,Y.VIEW_ID,c.localize(9,null),"search",1)),i.Registry.as(j.Extensions.Panels).registerPanel(new j.PanelDescriptor(L.SearchView,Y.VIEW_ID,c.localize(10,null),"search",10)),
i.Registry.as(X.Extensions.Workbench).registerWorkbenchContribution(Z.SearchViewLocationUpdater,Q.LifecyclePhase.Restoring);var ae=i.Registry.as(v.Extensions.WorkbenchActions);ae.registerWorkbenchAction(new g.SyncActionDescriptor($.FindInFilesAction,Y.VIEW_ID,c.localize(11,null),{primary:3108},w.SearchViewVisibleKey.toNegated()),"View: Show Search",c.localize(12,null)),ae.registerWorkbenchAction(new g.SyncActionDescriptor($.FindInFilesAction,w.FindInFilesActionId,c.localize(13,null),{primary:3108}),"Find in Files",te),ae.registerWorkbenchAction(new g.SyncActionDescriptor($.FocusNextSearchResultAction,$.FocusNextSearchResultAction.ID,$.FocusNextSearchResultAction.LABEL,{primary:62},x.ContextKeyExpr.and(w.HasSearchResults)),"Focus Next Search Result",te),ae.registerWorkbenchAction(new g.SyncActionDescriptor($.FocusPreviousSearchResultAction,$.FocusPreviousSearchResultAction.ID,$.FocusPreviousSearchResultAction.LABEL,{primary:1086},x.ContextKeyExpr.and(w.HasSearchResults)),"Focus Previous Search Result",te),
ae.registerWorkbenchAction(new g.SyncActionDescriptor($.ReplaceInFilesAction,$.ReplaceInFilesAction.ID,$.ReplaceInFilesAction.LABEL,{primary:3110}),"Replace in Files",te),y.KeybindingsRegistry.registerCommandAndKeybindingRule(h.assign({id:w.ToggleCaseSensitiveCommandId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.SearchInputBoxFocusedKey),handler:$.toggleCaseSensitiveCommand},k.ToggleCaseSensitiveKeybinding)),y.KeybindingsRegistry.registerCommandAndKeybindingRule(h.assign({id:w.ToggleWholeWordCommandId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.SearchInputBoxFocusedKey),handler:$.toggleWholeWordCommand},k.ToggleWholeWordKeybinding)),y.KeybindingsRegistry.registerCommandAndKeybindingRule(h.assign({id:w.ToggleRegexCommandId,weight:y.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:x.ContextKeyExpr.and(w.SearchViewVisibleKey,w.SearchInputBoxFocusedKey),handler:$.toggleRegexCommand
},k.ToggleRegexKeybinding)),ae.registerWorkbenchAction(new g.SyncActionDescriptor($.CollapseDeepestExpandedLevelAction,$.CollapseDeepestExpandedLevelAction.ID,$.CollapseDeepestExpandedLevelAction.LABEL),"Search: Collapse All",te),ae.registerWorkbenchAction(new g.SyncActionDescriptor(se,se.ID,se.LABEL,{primary:2098}),"Go to Symbol in Workspace..."),i.Registry.as(m.Extensions.Quickopen).registerDefaultQuickOpenHandler(new m.QuickOpenHandlerDescriptor(M.OpenAnythingHandler,M.OpenAnythingHandler.ID,"",R.defaultQuickOpenContextKey,c.localize(14,null))),i.Registry.as(m.Extensions.Quickopen).registerQuickOpenHandler(new m.QuickOpenHandlerDescriptor(O.OpenSymbolHandler,O.OpenSymbolHandler.ID,se.ALL_SYMBOLS_PREFIX,"inWorkspaceSymbolsPicker",[{prefix:se.ALL_SYMBOLS_PREFIX,needsEditor:!1,description:c.localize(15,null)}]));i.Registry.as(s.Extensions.Configuration).registerConfiguration({id:"search",order:13,title:c.localize(16,null),type:"object",properties:{"search.exclude":{type:"object",
description:c.localize(17,null),default:{"**/node_modules":!0,"**/bower_components":!0},additionalProperties:{anyOf:[{type:"boolean",description:c.localize(18,null)},{type:"object",properties:{when:{type:"string",pattern:"\\w*\\$\\(basename\\)\\w*",default:"$(basename).ext",description:c.localize(19,null)}}}]},scope:s.ConfigurationScope.RESOURCE},"search.useRipgrep":{type:"boolean",description:c.localize(20,null),default:!0},"search.useIgnoreFiles":{type:"boolean",description:c.localize(21,null),default:!0,scope:s.ConfigurationScope.RESOURCE},"search.quickOpen.includeSymbols":{type:"boolean",description:c.localize(22,null),default:!1},"search.followSymlinks":{type:"boolean",description:c.localize(23,null),default:!0},"search.smartCase":{type:"boolean",description:c.localize(24,null),default:!1},"search.globalFindClipboard":{type:"boolean",default:!1,description:c.localize(25,null),included:p.isMacintosh},"search.location":{type:"string",enum:["sidebar","panel"],default:"sidebar",
description:c.localize(26,null)}}}),P.registerLanguageCommand("_executeWorkspaceSymbolProvider",function(e,t){var n=t.query;if("string"!=typeof n)throw F.illegalArgument();return N.getWorkspaceSymbols(n)})}),define(e[377],t([1,0,733,93,23,57,71,94,41,4,108,46,81,68,12,64,179,146,315,6,35,29,27,255,22]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TERMINAL_PICKER_PREFIX="term ";var k=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,u.TERMINAL_PANEL_ID,i,r)||this;return s.terminalService=o,s}return n(t,e),t.prototype.run=function(t){if(0===this.terminalService.terminalInstances.length)var n=this.terminalService.createTerminal(void 0,!0),i=n.onProcessIdReady(function(){n.focus(),i.dispose()});return e.prototype.run.call(this)},t.ID="workbench.action.terminal.toggleTerminal",t.LABEL=i.localize(0,null),t=a([l(2,g.IPanelService),l(3,f.IPartService),l(4,u.ITerminalService)],t)}(p.TogglePanelAction);t.ToggleTerminalAction=k
;var D=function(e){function t(t,n,i){var r=e.call(this,t,n,"terminal-action kill")||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&(t.dispose(),this.terminalService.terminalInstances.length>0&&this.terminalService.showPanel(!0)),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.kill",t.LABEL=i.localize(1,null),t.PANEL_LABEL=i.localize(2,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.KillTerminalAction=D;var A=function(e){function r(t,n,i,r){var o=e.call(this,t,n,"terminal-action kill")||this;return o.terminalEntry=i,o.quickOpenService=r,o}return n(r,e),r.prototype.run=function(e){var n=this,i=this.terminalEntry.instance;return i&&i.dispose(),h.TPromise.timeout(50).then(function(e){return n.quickOpenService.show(t.TERMINAL_PICKER_PREFIX,null)})},r.ID="workbench.action.terminal.quickKill",r.LABEL=i.localize(3,null),r=a([l(3,y.IQuickOpenService)],r)}(o.Action);t.QuickKillTerminalAction=A;var L=function(e){
function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.copySelection(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.copySelection",t.LABEL=i.localize(4,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.CopyTerminalSelectionAction=L;var R=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.selectAll(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.selectAll",t.LABEL=i.localize(5,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SelectAllTerminalAction=R;var O=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o._text=i,o._terminalService=r,o}return n(t,e),t.prototype.run=function(e){var t=this._terminalService.getActiveInstance();return t&&t.sendText(this._text,!1),h.TPromise.as(void 0)},
t=a([l(3,u.ITerminalService)],t)}(o.Action);t.BaseSendTextTerminalAction=O;var M=function(e){function t(t,n,i){return e.call(this,t,n,String.fromCharCode("W".charCodeAt(0)-64),i)||this}return n(t,e),t.ID="workbench.action.terminal.deleteWordLeft",t.LABEL=i.localize(6,null),t=a([l(2,u.ITerminalService)],t)}(O);t.DeleteWordLeftTerminalAction=M;var P=function(e){function t(t,n,i){return e.call(this,t,n,"D",i)||this}return n(t,e),t.ID="workbench.action.terminal.deleteWordRight",t.LABEL=i.localize(7,null),t=a([l(2,u.ITerminalService)],t)}(O);t.DeleteWordRightTerminalAction=P;var N=function(e){function t(t,n,i){return e.call(this,t,n,String.fromCharCode("A".charCodeAt(0)-64),i)||this}return n(t,e),t.ID="workbench.action.terminal.moveToLineStart",t.LABEL=i.localize(8,null),t=a([l(2,u.ITerminalService)],t)}(O);t.MoveToLineStartTerminalAction=N;var F=function(e){function t(t,n,i){return e.call(this,t,n,String.fromCharCode("E".charCodeAt(0)-64),i)||this}return n(t,e),t.ID="workbench.action.terminal.moveToLineEnd",
t.LABEL=i.localize(9,null),t=a([l(2,u.ITerminalService)],t)}(O);t.MoveToLineEndTerminalAction=F;var W=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,"terminal-action new")||this;return s.terminalService=i,s.commandService=r,s.workspaceContextService=o,s}return n(t,e),t.prototype.run=function(e){var t=this,n=this.workspaceContextService.getWorkspace().folders;if(e instanceof MouseEvent&&(e.altKey||e.ctrlKey)){var r=this.terminalService.getActiveInstance();if(r)return this.terminalService.splitInstance(r),h.TPromise.as(null)}var o;if(n.length<=1)o=h.TPromise.as(this.terminalService.createTerminal(void 0,!0));else{var s={placeHolder:i.localize(12,null)};o=this.commandService.executeCommand(T.PICK_WORKSPACE_FOLDER_COMMAND_ID,[s]).then(function(e){return e?t.terminalService.createTerminal({cwd:e.uri.fsPath},!0):null})}return o.then(function(e){return e?(t.terminalService.setActiveInstance(e),t.terminalService.showPanel(!0)):h.TPromise.as(void 0)})},t.ID="workbench.action.terminal.new",
t.LABEL=i.localize(10,null),t.PANEL_LABEL=i.localize(11,null),t=a([l(2,u.ITerminalService),l(3,w.ICommandService),l(4,I.IWorkspaceContextService)],t)}(o.Action);t.CreateNewTerminalAction=W;var B=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.createTerminal(void 0,!0);return t?(this.terminalService.setActiveInstance(t),this.terminalService.showPanel(!0)):h.TPromise.as(void 0)},t.ID="workbench.action.terminal.newInActiveWorkspace",t.LABEL=i.localize(13,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.CreateNewInActiveWorkspaceTerminalAction=B;var V=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n,"terminal-action split")||this;return s._terminalService=i,s.commandService=r,s.workspaceContextService=o,s}return n(t,e),t.prototype.run=function(e){var t=this,n=this._terminalService.getActiveInstance();if(!n)return h.TPromise.as(void 0)
;var r=this.workspaceContextService.getWorkspace().folders,o=h.TPromise.as({});if(r.length>1){var s={placeHolder:i.localize(15,null)};o=this.commandService.executeCommand(T.PICK_WORKSPACE_FOLDER_COMMAND_ID,[s]).then(function(e){return e?h.TPromise.as({cwd:e.uri.fsPath}):null})}return o.then(function(e){return e?(t._terminalService.splitInstance(n,e),t._terminalService.showPanel(!0)):h.TPromise.as(void 0)})},t.ID="workbench.action.terminal.split",t.LABEL=i.localize(14,null),t=a([l(2,u.ITerminalService),l(3,w.ICommandService),l(4,I.IWorkspaceContextService)],t)}(o.Action);t.SplitTerminalAction=V;var z=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this._terminalService.getActiveInstance();return t?(this._terminalService.splitInstance(t),this._terminalService.showPanel(!0)):h.TPromise.as(void 0)},t.ID="workbench.action.terminal.splitInActiveWorkspace",t.LABEL=i.localize(16,null),t=a([l(2,u.ITerminalService)],t)}(o.Action)
;t.SplitInActiveWorkspaceTerminalAction=z;var H=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this._terminalService.getActiveTab();return t?(t.focusPreviousPane(),this._terminalService.showPanel(!0)):h.TPromise.as(void 0)},t.ID="workbench.action.terminal.focusPreviousPane",t.LABEL=i.localize(17,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.FocusPreviousPaneTerminalAction=H;var K=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r._terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this._terminalService.getActiveTab();return t?(t.focusNextPane(),this._terminalService.showPanel(!0)):h.TPromise.as(void 0)},t.ID="workbench.action.terminal.focusNextPane",t.LABEL=i.localize(18,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.FocusNextPaneTerminalAction=K;var U=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o._direction=i,o._terminalService=r,o}return n(t,e),
t.prototype.run=function(e){var t=this._terminalService.getActiveTab();return t&&t.resizePane(this._direction),h.TPromise.as(void 0)},t=a([l(3,u.ITerminalService)],t)}(o.Action);t.BaseFocusDirectionTerminalAction=U;var G=function(e){function t(t,n,i){var r=e.call(this,t,n,0,i)||this;return r.terminalService=i,r}return n(t,e),t.ID="workbench.action.terminal.resizePaneLeft",t.LABEL=i.localize(19,null),t=a([l(2,u.ITerminalService)],t)}(U);t.ResizePaneLeftTerminalAction=G;var j=function(e){function t(t,n,i){var r=e.call(this,t,n,1,i)||this;return r.terminalService=i,r}return n(t,e),t.ID="workbench.action.terminal.resizePaneRight",t.LABEL=i.localize(20,null),t=a([l(2,u.ITerminalService)],t)}(U);t.ResizePaneRightTerminalAction=j;var q=function(e){function t(t,n,i){var r=e.call(this,t,n,2,i)||this;return r.terminalService=i,r}return n(t,e),t.ID="workbench.action.terminal.resizePaneUp",t.LABEL=i.localize(21,null),t=a([l(2,u.ITerminalService)],t)}(U);t.ResizePaneUpTerminalAction=q;var $=function(e){function t(t,n,i){
var r=e.call(this,t,n,3,i)||this;return r.terminalService=i,r}return n(t,e),t.ID="workbench.action.terminal.resizePaneDown",t.LABEL=i.localize(22,null),t=a([l(2,u.ITerminalService)],t)}(U);t.ResizePaneDownTerminalAction=$;var Y=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveOrCreateInstance(!0);return t?(this.terminalService.setActiveInstance(t),this.terminalService.showPanel(!0)):h.TPromise.as(void 0)},t.ID="workbench.action.terminal.focus",t.LABEL=i.localize(23,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.FocusActiveTerminalAction=Y;var X=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){return this.terminalService.setActiveTabToNext(),this.terminalService.showPanel(!0)},t.ID="workbench.action.terminal.focusNext",t.LABEL=i.localize(24,null),t=a([l(2,u.ITerminalService)],t)}(o.Action)
;t.FocusNextTerminalAction=X;var Q=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){return this.terminalService.setActiveTabToPrevious(),this.terminalService.showPanel(!0)},t.ID="workbench.action.terminal.focusPrevious",t.LABEL=i.localize(25,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.FocusPreviousTerminalAction=Q;var Z=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveOrCreateInstance();return t&&t.paste(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.paste",t.LABEL=i.localize(26,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.TerminalPasteAction=Z;var J=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){return this.terminalService.selectDefaultWindowsShell()},t.ID="workbench.action.terminal.selectDefaultShell",
t.LABEL=i.localize(27,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SelectDefaultShellWindowsTerminalAction=J;var ee=function(e){function t(t,n,i,r){var o=e.call(this,t,n)||this;return o.codeEditorService=i,o.terminalService=r,o}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveOrCreateInstance();if(!t)return h.TPromise.as(void 0);var n=this.codeEditorService.getFocusedCodeEditor();if(!n)return h.TPromise.as(void 0);var i,o=n.getSelection();if(o.isEmpty())i=n.getModel().getLineContent(o.selectionStartLineNumber).trim();else{var a="\n"===r.EOL?s.EndOfLinePreference.LF:s.EndOfLinePreference.CRLF;i=n.getModel().getValueInRange(o,a)}return t.sendText(i,!0),this.terminalService.showPanel()},t.ID="workbench.action.terminal.runSelectedText",t.LABEL=i.localize(28,null),t=a([l(2,c.ICodeEditorService),l(3,u.ITerminalService)],t)}(o.Action);t.RunSelectedTextInTerminalAction=ee;var te=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.codeEditorService=i,
s.terminalService=r,s.notificationService=o,s}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveOrCreateInstance();if(!t)return h.TPromise.as(void 0);var n=this.codeEditorService.getFocusedCodeEditor();if(!n)return h.TPromise.as(void 0);var r=n.getModel().uri;return"file"!==r.scheme?(this.notificationService.warn(i.localize(30,null)),h.TPromise.as(void 0)):(t.sendText(r.fsPath,!0),this.terminalService.showPanel())},t.ID="workbench.action.terminal.runActiveFile",t.LABEL=i.localize(29,null),t=a([l(2,c.ICodeEditorService),l(3,u.ITerminalService),l(4,x.INotificationService)],t)}(o.Action);t.RunActiveFileInTerminalAction=te;var ne=function(e){function t(n,i,r){var o=e.call(this,t.ID,t.LABEL,"terminal-action switch-terminal")||this;return o.terminalService=r,o}return n(t,e),t.prototype.run=function(e){if(!e||!e.split)return h.TPromise.as(null);var t=parseInt(e.split(":")[0],10)-1;return this.terminalService.setActiveTabByIndex(t),this.terminalService.showPanel(!0)},
t.ID="workbench.action.terminal.switchTerminal",t.LABEL=i.localize(31,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SwitchTerminalAction=ne;var ie=function(e){function t(t,n,i,r){var o=e.call(this,null,t,n.getTabLabels(),n.activeTabIndex,r)||this;return o.terminalService=n,o.toDispose.push(n.onInstancesChanged(o._updateItems,o)),o.toDispose.push(n.onActiveTabChanged(o._updateItems,o)),o.toDispose.push(n.onInstanceTitleChanged(o._updateItems,o)),o.toDispose.push(v.attachSelectBoxStyler(o.selectBox,i)),o}return n(t,e),t.prototype._updateItems=function(){this.setOptions(this.terminalService.getTabLabels(),this.terminalService.activeTabIndex)},t=a([l(1,u.ITerminalService),l(2,m.IThemeService),l(3,E.IContextViewService)],t)}(d.SelectActionItem);t.SwitchTerminalActionItem=ie;var re=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.scrollDownLine(),h.TPromise.as(void 0)},
t.ID="workbench.action.terminal.scrollDown",t.LABEL=i.localize(32,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ScrollDownTerminalAction=re;var oe=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.scrollDownPage(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollDownPage",t.LABEL=i.localize(33,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ScrollDownPageTerminalAction=oe;var se=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.scrollToBottom(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollToBottom",t.LABEL=i.localize(34,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ScrollToBottomTerminalAction=se;var ae=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}
return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.scrollUpLine(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollUp",t.LABEL=i.localize(35,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ScrollUpTerminalAction=ae;var ce=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.scrollUpPage(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollUpPage",t.LABEL=i.localize(36,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ScrollUpPageTerminalAction=ce;var le=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.scrollToTop(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollToTop",t.LABEL=i.localize(37,null),t=a([l(2,u.ITerminalService)],t)}(o.Action)
;t.ScrollToTopTerminalAction=le;var ue=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.clear(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.clear",t.LABEL=i.localize(38,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ClearTerminalAction=ue;var de=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){var t=this.terminalService.getActiveInstance();return t&&t.hasSelection()&&t.clearSelection(),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.clearSelection",t.LABEL=i.localize(39,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ClearSelectionTerminalAction=de;var he=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){return this.terminalService.setWorkspaceShellAllowed(!0),h.TPromise.as(void 0)},
t.ID="workbench.action.terminal.allowWorkspaceShell",t.LABEL=i.localize(40,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.AllowWorkspaceShellTerminalCommand=he;var pe=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(e){return this.terminalService.setWorkspaceShellAllowed(!1),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.disallowWorkspaceShell",t.LABEL=i.localize(41,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.DisallowWorkspaceShellTerminalCommand=pe;var fe=function(e){function t(t,n,i,r,o){var s=e.call(this,t,n)||this;return s.quickOpenService=i,s.quickInputService=r,s.terminalService=o,s}return n(t,e),t.prototype.run=function(e){var t=e?e.instance:this.terminalService.getActiveInstance();return t?this.quickInputService.input({value:t.title,prompt:i.localize(43,null)}).then(function(e){e&&t.setTitle(e,!1)}):h.TPromise.as(void 0)},t.ID="workbench.action.terminal.rename",t.LABEL=i.localize(42,null),
t=a([l(2,y.IQuickOpenService),l(3,b.IQuickInputService),l(4,u.ITerminalService)],t)}(o.Action);t.RenameTerminalAction=fe;var ge=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){return this.terminalService.focusFindWidget()},t.ID="workbench.action.terminal.focusFindWidget",t.LABEL=i.localize(44,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.FocusTerminalFindWidgetAction=ge;var ve=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){return h.TPromise.as(this.terminalService.hideFindWidget())},t.ID="workbench.action.terminal.hideFindWidget",t.LABEL=i.localize(45,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.HideTerminalFindWidgetAction=ve;var me=function(e){function t(t){var n=e.call(this)||this;return n.instantiationService=t,n}return n(t,e),t.prototype.getActions=function(e){var t=[]
;return e.element instanceof _.TerminalEntry&&(t.push(this.instantiationService.createInstance(be,be.ID,be.LABEL,e.element)),t.push(this.instantiationService.createInstance(A,A.ID,A.LABEL,e.element))),t},t.prototype.hasActions=function(e){return!0},t=a([l(0,C.IInstantiationService)],t)}(S.ActionBarContributor);t.QuickOpenActionTermContributor=me;var ye=function(e){function r(t,n,i){var r=e.call(this,t,n)||this;return r.quickOpenService=i,r}return n(r,e),r.prototype.run=function(){return this.quickOpenService.show(t.TERMINAL_PICKER_PREFIX,null)},r.ID="workbench.action.quickOpenTerm",r.LABEL=i.localize(46,null),r=a([l(2,y.IQuickOpenService)],r)}(o.Action);t.QuickOpenTermAction=ye;var be=function(e){function i(t,n,i,r,o,s){var a=e.call(this,t,n,r,o,s)||this;return a.terminal=i,a.class="quick-open-terminal-configure",a}return n(i,e),i.prototype.run=function(){var n=this;return e.prototype.run.call(this,this.terminal).then(function(){return h.TPromise.timeout(50)}).then(function(e){
return n.quickOpenService.show(t.TERMINAL_PICKER_PREFIX,null)}),h.TPromise.as(null)},i=a([l(3,y.IQuickOpenService),l(4,b.IQuickInputService),l(5,u.ITerminalService)],i)}(fe);t.RenameTerminalQuickOpenAction=be;var Se=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){var e=this.terminalService.getActiveInstance();return e&&(e.commandTracker.scrollToPreviousCommand(),e.focus()),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollToPreviousCommand",t.LABEL=i.localize(47,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.ScrollToPreviousCommandAction=Se;var _e=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){var e=this.terminalService.getActiveInstance();return e&&(e.commandTracker.scrollToNextCommand(),e.focus()),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.scrollToNextCommand",t.LABEL=i.localize(48,null),t=a([l(2,u.ITerminalService)],t)
}(o.Action);t.ScrollToNextCommandAction=_e;var Ce=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){var e=this.terminalService.getActiveInstance();return e&&(e.commandTracker.selectToPreviousCommand(),e.focus()),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.selectToPreviousCommand",t.LABEL=i.localize(49,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SelectToPreviousCommandAction=Ce;var Ee=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){var e=this.terminalService.getActiveInstance();return e&&(e.commandTracker.selectToNextCommand(),e.focus()),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.selectToNextCommand",t.LABEL=i.localize(50,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SelectToNextCommandAction=Ee;var we=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),
t.prototype.run=function(){var e=this.terminalService.getActiveInstance();return e&&(e.commandTracker.selectToPreviousLine(),e.focus()),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.selectToPreviousLine",t.LABEL=i.localize(51,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SelectToPreviousLineAction=we;var Ie=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.terminalService=i,r}return n(t,e),t.prototype.run=function(){var e=this.terminalService.getActiveInstance();return e&&(e.commandTracker.selectToNextLine(),e.focus()),h.TPromise.as(void 0)},t.ID="workbench.action.terminal.selectToNextLine",t.LABEL=i.localize(52,null),t=a([l(2,u.ITerminalService)],t)}(o.Action);t.SelectToNextLineAction=Ie}),define(e[557],t([1,0,8,737,11,403,41,17,35,6,28,94,12,1171,26,377,108,82,4,10,69,358,182,22,413]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var k=function(e){function t(t,n,i,r,o,s,a){
var c=e.call(this,f.TERMINAL_PANEL_ID,s,o)||this;return c._configurationService=t,c._contextMenuService=n,c._instantiationService=i,c._terminalService=r,c.themeService=o,c._notificationService=a,c._cancelContextMenu=!1,c}return n(t,e),t.prototype.create=function(t){var n=this;return e.prototype.create.call(this,t),this._parentDomElement=t,i.addClass(this._parentDomElement,"integrated-terminal"),this._fontStyleElement=document.createElement("style"),this._terminalContainer=document.createElement("div"),i.addClass(this._terminalContainer,"terminal-outer-container"),this._findWidget=this._instantiationService.createInstance(v.TerminalFindWidget),this._findWidget.focusTracker.onDidFocus(function(){return n._terminalContainer.classList.add("find-focused")}),this._findWidget.focusTracker.onDidBlur(function(){return n._terminalContainer.classList.remove("find-focused")}),this._parentDomElement.appendChild(this._fontStyleElement),this._parentDomElement.appendChild(this._terminalContainer),
this._parentDomElement.appendChild(this._findWidget.getDomNode()),this._attachEventListeners(),this._terminalService.setContainers(this.getContainer(),this._terminalContainer),this._register(this.themeService.onThemeChange(function(e){return n._updateTheme(e)})),this._register(this._configurationService.onDidChangeConfiguration(function(e){if((e.affectsConfiguration("terminal.integrated")||e.affectsConfiguration("editor.fontFamily"))&&n._updateFont(),e.affectsConfiguration("terminal.integrated.fontFamily")||e.affectsConfiguration("editor.fontFamily")){var t=n._terminalService.configHelper;if(t instanceof x.TerminalConfigHelper&&!t.configFontIsMonospace()){var i=[{label:r.localize(0,null),run:function(){return n._configurationService.updateValue("terminal.integrated.fontFamily","monospace")}}];n._notificationService.prompt(T.Severity.Warning,r.localize(1,null),i)}}})),this._updateFont(),this._updateTheme(),this.layout(new i.Dimension(this._terminalContainer.offsetWidth,this._terminalContainer.offsetHeight)),
_.TPromise.as(void 0)},t.prototype.layout=function(e){e&&this._terminalService.terminalTabs.forEach(function(t){return t.layout(e.width,e.height)})},t.prototype.setVisible=function(t){var n=this;if(t){if(!(this._terminalService.terminalInstances.length>0))return e.prototype.setVisible.call(this,t).then(function(){return 0===n._terminalService.terminalInstances.length&&n._terminalService.createTerminal(),n._terminalService.terminalInstances.length>0&&(n._updateFont(),n._updateTheme()),_.TPromise.as(void 0)});this._updateFont(),this._updateTheme()}return e.prototype.setVisible.call(this,t)},t.prototype.getActions=function(){var e=this
;return this._actions||(this._actions=[this._instantiationService.createInstance(y.SwitchTerminalAction,y.SwitchTerminalAction.ID,y.SwitchTerminalAction.LABEL),this._instantiationService.createInstance(y.CreateNewTerminalAction,y.CreateNewTerminalAction.ID,y.CreateNewTerminalAction.PANEL_LABEL),this._instantiationService.createInstance(y.SplitTerminalAction,y.SplitTerminalAction.ID,y.SplitTerminalAction.LABEL),this._instantiationService.createInstance(y.KillTerminalAction,y.KillTerminalAction.ID,y.KillTerminalAction.PANEL_LABEL)],this._actions.forEach(function(t){e._register(t)})),this._actions},t.prototype._getContextMenuActions=function(){var e=this;this._contextMenuActions||(this._copyContextMenuAction=this._instantiationService.createInstance(y.CopyTerminalSelectionAction,y.CopyTerminalSelectionAction.ID,r.localize(2,null)),
this._contextMenuActions=[this._instantiationService.createInstance(y.CreateNewTerminalAction,y.CreateNewTerminalAction.ID,y.CreateNewTerminalAction.PANEL_LABEL),this._instantiationService.createInstance(y.SplitTerminalAction,y.SplitTerminalAction.ID,r.localize(3,null)),new c.Separator,this._copyContextMenuAction,this._instantiationService.createInstance(y.TerminalPasteAction,y.TerminalPasteAction.ID,r.localize(4,null)),this._instantiationService.createInstance(y.SelectAllTerminalAction,y.SelectAllTerminalAction.ID,r.localize(5,null)),new c.Separator,this._instantiationService.createInstance(y.ClearTerminalAction,y.ClearTerminalAction.ID,r.localize(6,null))],this._contextMenuActions.forEach(function(t){e._register(t)}));var t=this._terminalService.getActiveInstance();return this._copyContextMenuAction.enabled=t&&t.hasSelection(),this._contextMenuActions},t.prototype.getActionItem=function(t){
return t.id===y.SwitchTerminalAction.ID?this._instantiationService.createInstance(y.SwitchTerminalActionItem,t):e.prototype.getActionItem.call(this,t)},t.prototype.focus=function(){var e=this._terminalService.getActiveInstance();e&&e.focus(!0)},t.prototype.focusFindWidget=function(){var e=this._terminalService.getActiveInstance();e&&e.hasSelection()&&-1===e.selection.indexOf("\n")?this._findWidget.reveal(e.selection):this._findWidget.reveal()},t.prototype.hideFindWidget=function(){this._findWidget.hide()},t.prototype._attachEventListeners=function(){var e=this;this._register(i.addDisposableListener(this._parentDomElement,"mousedown",function(t){if(0!==e._terminalService.terminalInstances.length)if(2===t.which&&o.isLinux)e._terminalService.getActiveInstance().focus();else if(3===t.which&&"copyPaste"===e._terminalService.configHelper.config.rightClickBehavior){var n=e._terminalService.getActiveInstance();n.hasSelection()?(n.copySelection(),n.clearSelection()):n.paste(),o.isMacintosh&&setTimeout(function(){
n.clearSelection()},0),e._cancelContextMenu=!0}})),this._register(i.addDisposableListener(this._parentDomElement,"mouseup",function(t){if(e._configurationService.getValue("terminal.integrated.copyOnSelection")){if(0===e._terminalService.terminalInstances.length)return;if(1===t.which){var n=e._terminalService.getActiveInstance();n.hasSelection()&&n.copySelection()}}})),this._register(i.addDisposableListener(this._parentDomElement,"contextmenu",function(t){if(!e._cancelContextMenu){var n=new S.StandardMouseEvent(t),i={x:n.posx,y:n.posy};e._contextMenuService.showContextMenu({getAnchor:function(){return i},getActions:function(){return _.TPromise.as(e._getContextMenuActions())},getActionsContext:function(){return e._parentDomElement}})}e._cancelContextMenu=!1})),this._register(i.addDisposableListener(document,"keydown",function(t){e._terminalContainer.classList.toggle("alt-active",!!t.altKey)})),this._register(i.addDisposableListener(document,"keyup",function(t){
e._terminalContainer.classList.toggle("alt-active",!!t.altKey)})),this._register(i.addDisposableListener(this._parentDomElement,"keyup",function(e){27===e.keyCode&&e.stopPropagation()})),this._register(i.addDisposableListener(this._parentDomElement,i.EventType.DROP,function(t){if(t.target===e._parentDomElement||i.isAncestor(t.target,e._parentDomElement)){if(!t.dataTransfer)return;var n=void 0,r=t.dataTransfer.getData(I.DataTransfers.RESOURCES);if(r?n=C.default.parse(JSON.parse(r)[0]).path:t.dataTransfer.files.length>0&&(n=C.default.file(t.dataTransfer.files[0].path).fsPath),!n)return;e._terminalService.getActiveInstance().sendText(s.preparePathForTerminal(n),!1)}}))},t.prototype._updateTheme=function(e){e||(e=this.themeService.getTheme()),this._findWidget.updateTheme(e)},t.prototype._updateFont=function(){0!==this._terminalService.terminalInstances.length&&this.layout(new i.Dimension(this._parentDomElement.offsetWidth,this._parentDomElement.offsetHeight))},
t=a([l(0,u.IConfigurationService),l(1,d.IContextMenuService),l(2,h.IInstantiationService),l(3,f.ITerminalService),l(4,g.IThemeService),l(5,p.ITelemetryService),l(6,T.INotificationService)],t)}(b.Panel);t.TerminalPanel=k,g.registerThemingParticipant(function(e,t){var n=e.getColor(w.TERMINAL_BACKGROUND_COLOR)||e.getColor(E.PANEL_BACKGROUND);t.addRule(".monaco-workbench .panel.integrated-terminal .terminal-outer-container { background-color: "+(n?n.toString():"")+"; }");var i=e.getColor(w.TERMINAL_BORDER_COLOR)||e.getColor(E.PANEL_BORDER);i&&t.addRule(".monaco-workbench .panel.integrated-terminal .split-view-view:not(:first-child) { border-color: "+i.toString()+"; }");var r=e.getColor(m.editorHoverBackground);r&&t.addRule(".monaco-workbench .panel.integrated-terminal .terminal-message-widget { background-color: "+r+"; }");var o=e.getColor(m.editorHoverBorder);o&&t.addRule(".monaco-workbench .panel.integrated-terminal .terminal-message-widget { border: 1px solid "+o+"; }");var s=e.getColor(m.editorForeground)
;s&&t.addRule(".monaco-workbench .panel.integrated-terminal .terminal-message-widget { color: "+s+"; }")})}),define(e[1575],t([1,0,121,732,108,11,1173,63,94,378,56,15,377,16,272,31,1373,331,107,52,291,133,358,253,164,86,146,29,473,557,315,921,922,926,925]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});p.Registry.as(I.Extensions.Quickopen).registerQuickOpenHandler(new I.QuickOpenHandlerDescriptor(A.TerminalPickerHandler,A.TerminalPickerHandler.ID,h.TERMINAL_PICKER_PREFIX,"inTerminalPicker",i.localize(0,null)));x.CommandsRegistry.registerCommand({id:"workbench.action.quickOpenNavigateNextInTerminalPicker",handler:w.getQuickNavigateHandler("workbench.action.quickOpenNavigateNextInTerminalPicker",!0)});x.CommandsRegistry.registerCommand({id:"workbench.action.quickOpenNavigatePreviousInTerminalPicker",handler:w.getQuickNavigateHandler("workbench.action.quickOpenNavigatePreviousInTerminalPicker",!1)})
;p.Registry.as(u.Extensions.WorkbenchActions).registerWorkbenchAction(new g.SyncActionDescriptor(h.QuickOpenTermAction,h.QuickOpenTermAction.ID,h.QuickOpenTermAction.LABEL),"Terminal: Switch Active Terminal",i.localize(1,null));p.Registry.as(T.Extensions.Actionbar).registerActionBarContributor(T.Scope.VIEWER,h.QuickOpenActionTermContributor);p.Registry.as(a.Extensions.Configuration).registerConfiguration({id:"terminal",order:100,title:i.localize(2,null),type:"object",properties:{"terminal.integrated.shell.linux":{description:i.localize(3,null),type:"string",default:l.getTerminalDefaultShellUnixLike()},"terminal.integrated.shellArgs.linux":{description:i.localize(4,null),type:"array",items:{type:"string"},default:[]},"terminal.integrated.shell.osx":{description:i.localize(5,null),type:"string",default:l.getTerminalDefaultShellUnixLike()},"terminal.integrated.shellArgs.osx":{description:i.localize(6,null),type:"array",items:{type:"string"},default:["-l"]},"terminal.integrated.shell.windows":{
description:i.localize(7,null),type:"string",default:l.getTerminalDefaultShellWindows()},"terminal.integrated.shellArgs.windows":{description:i.localize(8,null),type:"array",items:{type:"string"},default:[]},"terminal.integrated.macOptionIsMeta":{description:i.localize(9,null),type:"boolean",default:!1},"terminal.integrated.copyOnSelection":{description:i.localize(10,null),type:"boolean",default:!1},"terminal.integrated.drawBoldTextInBrightColors":{description:i.localize(11,null),type:"boolean",default:!0},"terminal.integrated.fontFamily":{description:i.localize(12,null),type:"string"},"terminal.integrated.fontSize":{description:i.localize(13,null),type:"number",default:_.EDITOR_FONT_DEFAULTS.fontSize},"terminal.integrated.letterSpacing":{description:i.localize(14,null),type:"number",default:c.DEFAULT_LETTER_SPACING},"terminal.integrated.lineHeight":{description:i.localize(15,null),type:"number",default:c.DEFAULT_LINE_HEIGHT},"terminal.integrated.fontWeight":{type:"string",
enum:["normal","bold","100","200","300","400","500","600","700","800","900"],description:i.localize(16,null),default:"normal"},"terminal.integrated.fontWeightBold":{type:"string",enum:["normal","bold","100","200","300","400","500","600","700","800","900"],description:i.localize(17,null),default:"bold"},"terminal.integrated.cursorBlinking":{description:i.localize(18,null),type:"boolean",default:!1},"terminal.integrated.cursorStyle":{description:i.localize(19,null),enum:[c.TerminalCursorStyle.BLOCK,c.TerminalCursorStyle.LINE,c.TerminalCursorStyle.UNDERLINE],default:c.TerminalCursorStyle.BLOCK},"terminal.integrated.scrollback":{description:i.localize(20,null),type:"number",default:1e3},"terminal.integrated.setLocaleVariables":{description:i.localize(21,null),type:"boolean",default:o.isMacintosh},"terminal.integrated.rendererType":{type:"string",enum:["auto","canvas","dom"],default:"auto",description:i.localize(22,null)},"terminal.integrated.rightClickBehavior":{type:"string",
enum:["default","copyPaste","selectWord"],default:o.isMacintosh?"selectWord":o.isWindows?"copyPaste":"default",description:i.localize(23,null)},"terminal.integrated.cwd":{description:i.localize(24,null),type:"string",default:void 0},"terminal.integrated.confirmOnExit":{description:i.localize(25,null),type:"boolean",default:!1},"terminal.integrated.enableBell":{description:i.localize(26,null),type:"boolean",default:!1},"terminal.integrated.commandsToSkipShell":{description:i.localize(27,null),type:"array",items:{type:"string"},
default:[m.ToggleTabFocusModeAction.ID,w.QUICKOPEN_ACTION_ID,w.QUICKOPEN_FOCUS_SECONDARY_ACTION_ID,f.ShowAllCommandsAction.ID,h.CreateNewTerminalAction.ID,h.CreateNewInActiveWorkspaceTerminalAction.ID,h.CopyTerminalSelectionAction.ID,h.KillTerminalAction.ID,h.FocusActiveTerminalAction.ID,h.FocusPreviousTerminalAction.ID,h.FocusNextTerminalAction.ID,"workbench.action.tasks.build","workbench.action.tasks.restartTask","workbench.action.tasks.runTask","workbench.action.tasks.showLog","workbench.action.tasks.showTasks","workbench.action.tasks.terminate","workbench.action.tasks.test","workbench.action.terminal.focusAtIndex1","workbench.action.terminal.focusAtIndex2","workbench.action.terminal.focusAtIndex3","workbench.action.terminal.focusAtIndex4","workbench.action.terminal.focusAtIndex5","workbench.action.terminal.focusAtIndex6","workbench.action.terminal.focusAtIndex7","workbench.action.terminal.focusAtIndex8","workbench.action.terminal.focusAtIndex9","workbench.action.focusSecondEditorGroup","workbench.action.focusThirdEditorGroup","workbench.action.focusFourthEditorGroup","workbench.action.focusFifthEditorGroup","workbench.action.focusSixthEditorGroup","workbench.action.focusSeventhEditorGroup","workbench.action.focusEighthEditorGroup",h.TerminalPasteAction.ID,h.RunSelectedTextInTerminalAction.ID,h.RunActiveFileInTerminalAction.ID,h.ToggleTerminalAction.ID,h.ScrollDownTerminalAction.ID,h.ScrollDownPageTerminalAction.ID,h.ScrollToBottomTerminalAction.ID,h.ScrollUpTerminalAction.ID,h.ScrollUpPageTerminalAction.ID,h.ScrollToTopTerminalAction.ID,h.ClearTerminalAction.ID,h.ClearSelectionTerminalAction.ID,n.StartAction.ID,n.StopAction.ID,n.RunAction.ID,n.RestartAction.ID,n.ContinueAction.ID,n.PauseAction.ID,n.StepIntoAction.ID,n.StepOutAction.ID,n.StepOverAction.ID,S.OpenNextRecentlyUsedEditorInGroupAction.ID,S.OpenPreviousRecentlyUsedEditorInGroupAction.ID,S.FocusActiveGroupAction.ID,S.FocusFirstGroupAction.ID,S.FocusLastGroupAction.ID,S.OpenFirstEditorInGroup.ID,S.OpenLastEditorInGroup.ID,h.SelectAllTerminalAction.ID,h.FocusTerminalFindWidgetAction.ID,h.HideTerminalFindWidgetAction.ID,E.NavigateUpAction.ID,E.NavigateDownAction.ID,E.NavigateRightAction.ID,E.NavigateLeftAction.ID,h.DeleteWordLeftTerminalAction.ID,h.DeleteWordRightTerminalAction.ID,h.MoveToLineStartTerminalAction.ID,h.MoveToLineEndTerminalAction.ID,k.TogglePanelAction.ID,"workbench.action.quickOpenView",h.SplitTerminalAction.ID,h.SplitInActiveWorkspaceTerminalAction.ID,h.FocusPreviousPaneTerminalAction.ID,h.FocusNextPaneTerminalAction.ID,h.ResizePaneLeftTerminalAction.ID,h.ResizePaneRightTerminalAction.ID,h.ResizePaneUpTerminalAction.ID,h.ResizePaneDownTerminalAction.ID,h.ScrollToPreviousCommandAction.ID,h.ScrollToNextCommandAction.ID,h.SelectToPreviousCommandAction.ID,h.SelectToNextCommandAction.ID,h.SelectToPreviousLineAction.ID,h.SelectToNextLineAction.ID].sort()
},"terminal.integrated.env.osx":{description:i.localize(28,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},"terminal.integrated.env.linux":{description:i.localize(29,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},"terminal.integrated.env.windows":{description:i.localize(30,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},"terminal.integrated.showExitAlert":{description:i.localize(31,null),type:"boolean",default:!0},"terminal.integrated.experimentalRestore":{description:i.localize(32,null),type:"boolean",default:!1},"terminal.integrated.experimentalTextureCachingStrategy":{description:i.localize(33,null),type:"string",enum:["static","dynamic"],default:"static"}}}),y.registerSingleton(c.ITerminalService,v.TerminalService),p.Registry.as(r.Extensions.Panels).registerPanel(new r.PanelDescriptor(D.TerminalPanel,c.TERMINAL_PANEL_ID,i.localize(34,null),"terminal",40,h.ToggleTerminalAction.ID))
;var L=i.localize(35,null),R=p.Registry.as(u.Extensions.WorkbenchActions);R.registerWorkbenchAction(new g.SyncActionDescriptor(h.KillTerminalAction,h.KillTerminalAction.ID,h.KillTerminalAction.LABEL),"Terminal: Kill the Active Terminal Instance",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.CopyTerminalSelectionAction,h.CopyTerminalSelectionAction.ID,h.CopyTerminalSelectionAction.LABEL,{primary:2081,linux:{primary:3105}},d.ContextKeyExpr.and(c.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED,c.KEYBINDING_CONTEXT_TERMINAL_FOCUS)),"Terminal: Copy Selection",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.CreateNewTerminalAction,h.CreateNewTerminalAction.ID,h.CreateNewTerminalAction.LABEL,{primary:3158,mac:{primary:1366}}),"Terminal: Create New Integrated Terminal",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ClearSelectionTerminalAction,h.ClearSelectionTerminalAction.ID,h.ClearSelectionTerminalAction.LABEL,{primary:9,linux:{primary:9}
},d.ContextKeyExpr.and(c.KEYBINDING_CONTEXT_TERMINAL_FOCUS,c.KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED,c.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE)),"Terminal: Escape selection",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.CreateNewInActiveWorkspaceTerminalAction,h.CreateNewInActiveWorkspaceTerminalAction.ID,h.CreateNewInActiveWorkspaceTerminalAction.LABEL),"Terminal: Create New Integrated Terminal (In Active Workspace)",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.FocusActiveTerminalAction,h.FocusActiveTerminalAction.ID,h.FocusActiveTerminalAction.LABEL),"Terminal: Focus Terminal",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.FocusNextTerminalAction,h.FocusNextTerminalAction.ID,h.FocusNextTerminalAction.LABEL),"Terminal: Focus Next Terminal",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.FocusPreviousTerminalAction,h.FocusPreviousTerminalAction.ID,h.FocusPreviousTerminalAction.LABEL),"Terminal: Focus Previous Terminal",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.TerminalPasteAction,h.TerminalPasteAction.ID,h.TerminalPasteAction.LABEL,{primary:2100,linux:{primary:3124},mac:{primary:null}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Paste into Active Terminal",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SelectAllTerminalAction,h.SelectAllTerminalAction.ID,h.SelectAllTerminalAction.LABEL,{primary:null,mac:{primary:2079}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Select All",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.RunSelectedTextInTerminalAction,h.RunSelectedTextInTerminalAction.ID,h.RunSelectedTextInTerminalAction.LABEL),"Terminal: Run Selected Text In Active Terminal",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.RunActiveFileInTerminalAction,h.RunActiveFileInTerminalAction.ID,h.RunActiveFileInTerminalAction.LABEL),"Terminal: Run Active File In Active Terminal",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ToggleTerminalAction,h.ToggleTerminalAction.ID,h.ToggleTerminalAction.LABEL,{primary:2134,mac:{primary:342}}),"View: Toggle Integrated Terminal",i.localize(36,null)),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollDownTerminalAction,h.ScrollDownTerminalAction.ID,h.ScrollDownTerminalAction.LABEL,{primary:2572,linux:{primary:3090}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll Down (Line)",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollDownPageTerminalAction,h.ScrollDownPageTerminalAction.ID,h.ScrollDownPageTerminalAction.LABEL,{primary:1036,mac:{primary:12}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll Down (Page)",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollToBottomTerminalAction,h.ScrollToBottomTerminalAction.ID,h.ScrollToBottomTerminalAction.LABEL,{primary:2061,linux:{primary:1037}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll to Bottom",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollUpTerminalAction,h.ScrollUpTerminalAction.ID,h.ScrollUpTerminalAction.LABEL,{primary:2571,linux:{primary:3088}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll Up (Line)",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollUpPageTerminalAction,h.ScrollUpPageTerminalAction.ID,h.ScrollUpPageTerminalAction.LABEL,{primary:1035,mac:{primary:11}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll Up (Page)",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollToTopTerminalAction,h.ScrollToTopTerminalAction.ID,h.ScrollToTopTerminalAction.LABEL,{primary:2062,linux:{primary:1038}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll to Top",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ClearTerminalAction,h.ClearTerminalAction.ID,h.ClearTerminalAction.LABEL,{primary:2089,linux:{primary:null}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS,b.KeybindingsRegistry.WEIGHT.workbenchContrib(1)),"Terminal: Clear",L),
o.isWindows&&R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SelectDefaultShellWindowsTerminalAction,h.SelectDefaultShellWindowsTerminalAction.ID,h.SelectDefaultShellWindowsTerminalAction.LABEL),"Terminal: Select Default Shell",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.AllowWorkspaceShellTerminalCommand,h.AllowWorkspaceShellTerminalCommand.ID,h.AllowWorkspaceShellTerminalCommand.LABEL),"Terminal: Allow Workspace Shell Configuration",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.DisallowWorkspaceShellTerminalCommand,h.DisallowWorkspaceShellTerminalCommand.ID,h.DisallowWorkspaceShellTerminalCommand.LABEL),"Terminal: Disallow Workspace Shell Configuration",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.RenameTerminalAction,h.RenameTerminalAction.ID,h.RenameTerminalAction.LABEL),"Terminal: Rename",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.FocusTerminalFindWidgetAction,h.FocusTerminalFindWidgetAction.ID,h.FocusTerminalFindWidgetAction.LABEL,{
primary:2084},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Focus Find Widget",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.HideTerminalFindWidgetAction,h.HideTerminalFindWidgetAction.ID,h.HideTerminalFindWidgetAction.LABEL,{primary:9,secondary:[1033]},d.ContextKeyExpr.and(c.KEYBINDING_CONTEXT_TERMINAL_FOCUS,c.KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE)),"Terminal: Hide Find Widget",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.DeleteWordLeftTerminalAction,h.DeleteWordLeftTerminalAction.ID,h.DeleteWordLeftTerminalAction.LABEL,{primary:2049,mac:{primary:513}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Delete Word Left",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.DeleteWordRightTerminalAction,h.DeleteWordRightTerminalAction.ID,h.DeleteWordRightTerminalAction.LABEL,{primary:2068,mac:{primary:532}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Delete Word Right",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.MoveToLineStartTerminalAction,h.MoveToLineStartTerminalAction.ID,h.MoveToLineStartTerminalAction.LABEL,{primary:null,mac:{primary:2063}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Move To Line Start",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.MoveToLineEndTerminalAction,h.MoveToLineEndTerminalAction.ID,h.MoveToLineEndTerminalAction.LABEL,{primary:null,mac:{primary:2065}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Move To Line End",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SplitTerminalAction,h.SplitTerminalAction.ID,h.SplitTerminalAction.LABEL,{primary:2136,secondary:[3098],mac:{primary:2136,secondary:[1306]}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Split",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SplitInActiveWorkspaceTerminalAction,h.SplitInActiveWorkspaceTerminalAction.ID,h.SplitInActiveWorkspaceTerminalAction.LABEL),"Terminal: Split Terminal (In Active Workspace)",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.FocusPreviousPaneTerminalAction,h.FocusPreviousPaneTerminalAction.ID,h.FocusPreviousPaneTerminalAction.LABEL,{primary:527,secondary:[528],mac:{primary:2575,secondary:[2576]}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Focus Previous Pane",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.FocusNextPaneTerminalAction,h.FocusNextPaneTerminalAction.ID,h.FocusNextPaneTerminalAction.LABEL,{primary:529,secondary:[530],mac:{primary:2577,secondary:[2578]}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Focus Next Pane",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ResizePaneLeftTerminalAction,h.ResizePaneLeftTerminalAction.ID,h.ResizePaneLeftTerminalAction.LABEL,{primary:null,linux:{primary:3087},mac:{primary:2319}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Resize Pane Left",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ResizePaneRightTerminalAction,h.ResizePaneRightTerminalAction.ID,h.ResizePaneRightTerminalAction.LABEL,{primary:null,linux:{primary:3089},mac:{primary:2321}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Resize Pane Right",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ResizePaneUpTerminalAction,h.ResizePaneUpTerminalAction.ID,h.ResizePaneUpTerminalAction.LABEL,{primary:null,linux:{primary:3088},mac:{primary:2320}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Resize Pane Up",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ResizePaneDownTerminalAction,h.ResizePaneDownTerminalAction.ID,h.ResizePaneDownTerminalAction.LABEL,{primary:null,linux:{primary:3090},mac:{primary:2322}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Resize Pane Down",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollToPreviousCommandAction,h.ScrollToPreviousCommandAction.ID,h.ScrollToPreviousCommandAction.LABEL,{primary:null,mac:{primary:2064}
},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll To Previous Command",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.ScrollToNextCommandAction,h.ScrollToNextCommandAction.ID,h.ScrollToNextCommandAction.LABEL,{primary:null,mac:{primary:2066}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Scroll To Next Command",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SelectToPreviousCommandAction,h.SelectToPreviousCommandAction.ID,h.SelectToPreviousCommandAction.LABEL,{primary:null,mac:{primary:3088}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Select To Previous Command",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SelectToNextCommandAction,h.SelectToNextCommandAction.ID,h.SelectToNextCommandAction.LABEL,{primary:null,mac:{primary:3090}},c.KEYBINDING_CONTEXT_TERMINAL_FOCUS),"Terminal: Select To Next Command",L),
R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SelectToPreviousLineAction,h.SelectToPreviousLineAction.ID,h.SelectToPreviousLineAction.LABEL),"Terminal: Select To Previous Line",L),R.registerWorkbenchAction(new g.SyncActionDescriptor(h.SelectToNextLineAction,h.SelectToNextLineAction.ID,h.SelectToNextLineAction.LABEL),"Terminal: Select To Next Line",L),s.setup(),C.registerColors()}),define(e[1576],t([1,0,74,5,24,11,37,743,16,63,27,75,38,17,253,217,305,272,46,121,231,377,14,164,932]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var T={text:c.localize(0,null),ids:[b.ShowAllCommandsAction.ID]},x={text:c.localize(1,null),ids:[I.QUICKOPEN_ACTION_ID]},k={text:c.localize(2,null),ids:[y.OpenFileAction.ID],mac:!1},D={text:c.localize(3,null),ids:[y.OpenFolderAction.ID],mac:!1},A={text:c.localize(4,null),ids:[y.OpenFileFolderAction.ID],mac:!0},L={text:c.localize(5,null),ids:[v.OpenRecentAction.ID]},R={text:c.localize(6,null),
ids:[m.GlobalNewUntitledFileAction.ID]},O=r.assign({mac:!0},R),M={text:c.localize(7,null),ids:[E.ToggleTerminalAction.ID]},P=[T,k,D,A,L,O,M],N=[T,x,{text:c.localize(8,null),ids:[C.FindInFilesActionId]},{text:c.localize(9,null),ids:[_.StartAction.ID]},M],F=c.localize(10,null),W="workbench.tips.enabled",B=function(){function e(e,t,n,i,r){var o=this;this.partService=t,this.keybindingService=n,this.contextService=i,this.configurationService=r,this.toDispose=[],this.workbenchState=i.getWorkbenchState(),e.onShutdown(this.dispose,this),this.enabled=this.configurationService.getValue(W),this.enabled&&this.create(),this.toDispose.push(this.configurationService.onDidChangeConfiguration(function(e){if(e.affectsConfiguration(W)){var t=o.configurationService.getValue(W);t!==o.enabled&&(o.enabled=t,o.enabled?o.create():o.destroy())}})),this.toDispose.push(this.contextService.onDidChangeWorkbenchState(function(e){var t=o.workbenchState;o.workbenchState=o.contextService.getWorkbenchState(),
o.enabled&&o.workbenchState!==t&&o.recreate()}))}return e.prototype.create=function(){var e=this,t=this.partService.getContainer(S.Parts.EDITOR_PART);t.classList.add("has-watermark"),this.watermark=n.$().div({class:"watermark"});var i=n.$(this.watermark).div({class:"watermark-box"}),r=this.workbenchState!==h.WorkbenchState.EMPTY?N:P.filter(function(e){return!("mac"in e)||e.mac===o.isMacintosh}),s=function(){var t=n.$(i);t.clearChildren(),r.map(function(n){t.element("dl",{},function(t){t.element("dt",{},function(e){return e.text(n.text)}),t.element("dd",{},function(t){return t.innerHtml(n.ids.map(function(t){var n=e.keybindingService.lookupKeybinding(t);return n?'<span class="shortcuts">'+w.escape(n.getLabel())+"</span>":'<span class="unbound">'+w.escape(F)+"</span>"}).join(" / "))})})})};s(),this.watermark.build(t.firstElementChild,0),this.toDispose.push(this.keybindingService.onDidUpdateKeybindings(s)),this.toDispose.push(this.partService.onEditorLayout(function(e){var n=e.height
;t.classList[n<=478?"add":"remove"]("max-height-478px")}))},e.prototype.destroy=function(){this.watermark&&(this.watermark.destroy(),this.partService.getContainer(S.Parts.EDITOR_PART).classList.remove("has-watermark"),this.dispose())},e.prototype.recreate=function(){this.destroy(),this.create()},e.prototype.dispose=function(){this.toDispose=i.dispose(this.toDispose)},e=a([l(0,f.ILifecycleService),l(1,S.IPartService),l(2,s.IKeybindingService),l(3,h.IWorkspaceContextService),l(4,g.IConfigurationService)],e)}();t.WatermarkContribution=B,u.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(B,f.LifecyclePhase.Running),u.Registry.as(d.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:c.localize(11,null),properties:{"workbench.tips.enabled":{type:"boolean",default:!0,description:c.localize(12,null)}}})}),define(e[1577],t([1,0,10,795,4,27,42,212,95,923,34,63,16,49,153,411,29,20,11,70,22]),function(e,t,n,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e,t,n,i,r,o,s,a,c){this.jsonEditingService=e,this.contextService=t,this.windowService=n,this.workspaceConfigurationService=i,this.storageService=r,this.extensionService=o,this.backupFileService=s,this.notificationService=a,this.commandService=c}return e.prototype.updateFolders=function(e,t,n,i){var s=this.contextService.getWorkspace().folders,a=[];"number"==typeof t&&(a=s.slice(e,e+t).map(function(e){return e.uri}));var c=a.length>0,l=Array.isArray(n)&&n.length>0;return l||c?l&&!c?this.doAddFolders(n,e,i):c&&!l?this.removeFolders(a):this.includesSingleFolderWorkspace(a)?this.createAndEnterWorkspace(n):this.contextService.getWorkbenchState()!==o.WorkbenchState.WORKSPACE?this.doAddFolders(n,e,i):this.doUpdateFolders(n,a,e,i):r.TPromise.as(void 0)},e.prototype.doUpdateFolders=function(e,t,n,i){var o=this;return void 0===i&&(i=!1),this.contextService.updateFolders(e,t,n).then(function(){return null},function(e){
return i?r.TPromise.wrapError(e):o.handleWorkspaceConfigurationEditingError(e)})},e.prototype.addFolders=function(e,t){return void 0===t&&(t=!1),this.doAddFolders(e,void 0,t)},e.prototype.doAddFolders=function(e,t,n){var i=this;void 0===n&&(n=!1);var s=this.contextService.getWorkbenchState();if(s!==o.WorkbenchState.WORKSPACE){var a=this.contextService.getWorkspace().folders.map(function(e){return{uri:e.uri}});return a.splice.apply(a,["number"==typeof t?t:a.length,0].concat(e)),a=b.distinct(a,function(e){return S.isLinux?e.uri.toString():e.uri.toString().toLowerCase()}),s===o.WorkbenchState.EMPTY&&0===a.length||s===o.WorkbenchState.FOLDER&&1===a.length?r.TPromise.as(void 0):this.createAndEnterWorkspace(a)}return this.contextService.addFolders(e,t).then(function(){return null},function(e){return n?r.TPromise.wrapError(e):i.handleWorkspaceConfigurationEditingError(e)})},e.prototype.removeFolders=function(e,t){var n=this;return void 0===t&&(t=!1),
this.includesSingleFolderWorkspace(e)?this.createAndEnterWorkspace([]):this.contextService.removeFolders(e).then(function(){return null},function(e){return t?r.TPromise.wrapError(e):n.handleWorkspaceConfigurationEditingError(e)})},e.prototype.includesSingleFolderWorkspace=function(e){if(this.contextService.getWorkbenchState()===o.WorkbenchState.FOLDER){var t=this.contextService.getWorkspace().folders[0];return e.some(function(e){return _.isEqual(e,t.uri,!S.isLinux)})}return!1},e.prototype.createAndEnterWorkspace=function(e,t){var n=this;return this.doEnterWorkspace(function(){return n.windowService.createAndEnterWorkspace(e,t)})},e.prototype.saveAndEnterWorkspace=function(e){var t=this;return this.doEnterWorkspace(function(){return t.windowService.saveAndEnterWorkspace(e)})},e.prototype.handleWorkspaceConfigurationEditingError=function(e){switch(e.code){case c.JSONEditingErrorCode.ERROR_INVALID_FILE:return this.onInvalidWorkspaceConfigurationFileError(),r.TPromise.as(void 0)
;case c.JSONEditingErrorCode.ERROR_FILE_DIRTY:return this.onWorkspaceConfigurationFileDirtyError(),r.TPromise.as(void 0)}return this.notificationService.error(e.message),r.TPromise.as(void 0)},e.prototype.onInvalidWorkspaceConfigurationFileError=function(){var e=i.localize(0,null);this.askToOpenWorkspaceConfigurationFile(e)},e.prototype.onWorkspaceConfigurationFileDirtyError=function(){var e=i.localize(1,null);this.askToOpenWorkspaceConfigurationFile(e)},e.prototype.askToOpenWorkspaceConfigurationFile=function(e){var t=this;this.notificationService.prompt(C.Severity.Error,e,[{label:i.localize(2,null),run:function(){return t.commandService.executeCommand("workbench.action.openWorkspaceConfigFile")}}])},e.prototype.doEnterWorkspace=function(e){var t=this;this.extensionService.stopExtensionHost();var n=function(){t.extensionService.startExtensionHost()};return e().then(function(e){return e?t.migrate(e.workspace).then(function(){
t.backupFileService instanceof m.BackupFileService&&t.backupFileService.initialize(e.backupPath);return t.contextService.initialize(e.workspace)}):r.TPromise.as(void 0)}).then(n,function(e){return n(),r.TPromise.wrapError(e)})},e.prototype.migrate=function(e){return this.migrateStorage(e),this.contextService.getWorkbenchState()===o.WorkbenchState.FOLDER?this.copyWorkspaceSettings(e):r.TPromise.as(void 0)},e.prototype.migrateStorage=function(e){var t=this.storageService,n=d.migrateStorageToMultiRootWorkspace(t.workspaceId,e,t.workspaceStorage);t.setWorkspaceId(n)},e.prototype.copyWorkspaceSettings=function(e){for(var t=f.Registry.as(p.Extensions.Configuration).getConfigurationProperties(),i={},r=0,o=this.workspaceConfigurationService.keys().workspace;r<o.length;r++){var s=o[r];t[s]&&!t[s].notMultiRootAdopted&&t[s].scope===p.ConfigurationScope.WINDOW&&(i[s]=this.workspaceConfigurationService.inspect(s).workspace)}return this.jsonEditingService.write(n.default.file(e.configPath),{key:"settings",value:i},!0)},
e=a([l(0,c.IJSONEditingService),l(1,o.IWorkspaceContextService),l(2,s.IWindowService),l(3,u.IWorkspaceConfigurationService),l(4,h.IStorageService),l(5,g.IExtensionService),l(6,v.IBackupFileService),l(7,C.INotificationService),l(8,y.ICommandService)],e)}();t.WorkspaceEditingService=E}),define(e[558],t([1,0,570,4,5,7,8,74,18,78,192,9,411,153,16,11,75,40,1323,1497,1545,1544,1216,1365,1089,1543,1495,146,108,520,179,474,107,46,27,34,1205,798,245,17,505,212,504,909,37,506,15,175,65,1547,1305,33,266,1236,81,513,64,135,796,162,6,112,1492,48,249,1401,174,1546,1493,72,38,42,189,31,1241,35,36,56,253,190,1577,1209,240,1350,10,58,304,98,364,22,1360,1072,1075,206,1361,1032,115,1393,21,53,523,434,28,141,867]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z,J,ee,te,ne,ie,re,oe,se,ae,ce,le,ue,de,he,pe,fe,ge,ve,me,ye,be,Se,_e,Ce,Ee,we,Ie,Te,xe,ke,De,Ae,Le,Re,Oe,Me,Pe,Ne,Fe,We,Be,Ve,ze,He,Ke,Ue,Ge,je,qe,$e,Ye,Xe,Qe,Ze){"use strict";function Je(e){switch(e){
case F.WorkbenchState.EMPTY:return"empty";case F.WorkbenchState.FOLDER:return"folder";case F.WorkbenchState.WORKSPACE:return"workspace"}}Object.defineProperty(t,"__esModule",{value:!0});var et=["antialiased","none","auto"],tt={WORKBENCH_CONTAINER:"workbench.main.container",TITLEBAR_PART:"workbench.parts.titlebar",ACTIVITYBAR_PART:"workbench.parts.activitybar",SIDEBAR_PART:"workbench.parts.sidebar",PANEL_PART:"workbench.parts.panel",EDITOR_PART:"workbench.parts.editor",STATUSBAR_PART:"workbench.parts.statusbar",MENUBAR_PART:"workbench.parts.menubar"},nt=function(e){function t(t,n,i,r,o,a,c,l,u,h,p,f,g,v,m,y){var b=e.call(this)||this;return b.parent=t,b.container=n,b.configuration=i,b.lifecycleService=o,b.mainProcessClient=a,b.instantiationService=c,b.contextService=l,b.storageService=u,b.configurationService=h,b.themeService=p,b.environmentService=f,b.windowService=g,b.notificationService=v,b.contextViewService=m,b.telemetryService=y,b.closeEmptyWindowScheduler=new d.RunOnceScheduler(function(){
return b.onAllEditorsClosed()},50),b._onTitleBarVisibilityChange=b._register(new s.Emitter),b._onMenubarVisibilityChange=b._register(new s.Emitter),b.workbenchParams={configuration:i,serviceCollection:r},b.hasInitialFilesToOpen=i.filesToCreate&&i.filesToCreate.length>0||i.filesToOpen&&i.filesToOpen.length>0||i.filesToDiff&&i.filesToDiff.length>0,b}return n(t,e),t.prototype.startup=function(){var e=this;return this.workbenchStarted=!0,this.createWorkbench(),this.createGlobalActions(),this.initServices(),this.handleContextKeys(),this.registerListeners(),this.initSettings(),this.renderWorkbench(),this.createWorkbenchLayout(),this.environmentService.driverHandle&&Ue.registerWindowDriver(this.mainProcessClient,this.configuration.windowId,this.instantiationService).then(function(t){return e._register(t)}),this.restoreParts()},t.prototype.createWorkbench=function(){this.workbenchContainer=u.$(".monaco-workbench-container"),this.workbench=u.$().div({
class:"monaco-workbench "+(y.isWindows?"windows":y.isLinux?"linux":"mac"),id:tt.WORKBENCH_CONTAINER}).appendTo(this.workbenchContainer)},t.prototype.createGlobalActions=function(){var e=!this.environmentService.isBuilt||this.environmentService.isExtensionDevelopment,t=m.Registry.as(Te.Extensions.WorkbenchActions);t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.ReloadWindowAction,xe.ReloadWindowAction.ID,xe.ReloadWindowAction.LABEL,e?{primary:2096}:void 0),"Reload Window"),t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.ToggleDevToolsAction,xe.ToggleDevToolsAction.ID,xe.ToggleDevToolsAction.LABEL,e?{primary:3111,mac:{primary:2599}}:void 0),"Developer: Toggle Developer Tools",i.localize(0,null)),t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.OpenRecentAction,xe.OpenRecentAction.ID,xe.OpenRecentAction.LABEL,{primary:e?null:2096,mac:{primary:304}}),"File: Open Recent...",i.localize(1,null)),
t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.ReloadWindowWithExtensionsDisabledAction,xe.ReloadWindowWithExtensionsDisabledAction.ID,xe.ReloadWindowWithExtensionsDisabledAction.LABEL),"Reload Window Without Extensions");var n=this.configurationService.getValue();n&&n.window&&n.window.nativeTabs&&(t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.ShowPreviousWindowTab,xe.ShowPreviousWindowTab.ID,xe.ShowPreviousWindowTab.LABEL),"Show Previous Window Tab"),t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.ShowNextWindowTab,xe.ShowNextWindowTab.ID,xe.ShowNextWindowTab.LABEL),"Show Next Window Tab"),t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.MoveWindowTabToNewWindow,xe.MoveWindowTabToNewWindow.ID,xe.MoveWindowTabToNewWindow.LABEL),"Move Window Tab to New Window"),t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.MergeAllWindowTabs,xe.MergeAllWindowTabs.ID,xe.MergeAllWindowTabs.LABEL),"Merge All Windows"),
t.registerWorkbenchAction(new Ce.SyncActionDescriptor(xe.ToggleWindowTabsBar,xe.ToggleWindowTabsBar.ID,xe.ToggleWindowTabsBar.LABEL),"Toggle Window Tabs Bar"))},t.prototype.initServices=function(){var e=this,t=this.workbenchParams.serviceCollection;t.set(N.IPartService,this),t.set(se.IClipboardService,new ae.ClipboardService),this.statusbarPart=this.instantiationService.createInstance(I.StatusbarPart,tt.STATUSBAR_PART),this._register(o.toDisposable(function(){return e.statusbarPart.shutdown()})),t.set(_e.IStatusbarService,this.statusbarPart),t.set(ge.IProgressService2,new ue.SyncDescriptor(ve.ProgressService2)),this.contextKeyService=this.instantiationService.createInstance(j.ContextKeyService),t.set(Y.IContextKeyService,this.contextKeyService),this.keybindingService=this.instantiationService.createInstance(z.WorkbenchKeybindingService,window),t.set(q.IKeybindingService,this.keybindingService),t.set(Me.IListService,this.instantiationService.createInstance(Me.ListService)),
y.isMacintosh||"custom"!==this.getCustomTitleBarStyle()?t.set(we.IContextMenuService,new ue.SyncDescriptor(B.ContextMenuService)):t.set(we.IContextMenuService,new ue.SyncDescriptor(V.ContextMenuService,null,this.telemetryService,this.notificationService,this.contextViewService)),t.set(Ce.IMenuService,new ue.SyncDescriptor(Ee.MenuService)),this.sidebarPart=this.instantiationService.createInstance(E.SidebarPart,tt.SIDEBAR_PART),this._register(o.toDisposable(function(){return e.sidebarPart.shutdown()})),this.viewletService=this.instantiationService.createInstance(Z.ViewletService,this.sidebarPart),t.set(Q.IViewletService,this.viewletService),this.panelPart=this.instantiationService.createInstance(w.PanelPart,tt.PANEL_PART),this._register(o.toDisposable(function(){return e.panelPart.shutdown()})),t.set(ie.IPanelService,this.panelPart);var n=this.instantiationService.createInstance(Fe.ViewsService);t.set(Ne.IViewsService,n),
this.activitybarPart=this.instantiationService.createInstance(C.ActivitybarPart,tt.ACTIVITYBAR_PART),this._register(o.toDisposable(function(){return e.activitybarPart.shutdown()}));var i=this.instantiationService.createInstance(Re.ActivityService,this.activitybarPart,this.panelPart);t.set(X.IActivityService,i),this.fileService=this.instantiationService.createInstance(J.RemoteFileService),t.set(ee.IFileService,this.fileService),this.configurationService.acquireFileService(this.fileService),this.themeService.acquireFileService(this.fileService);var r=!this.hasInitialFilesToOpen;this.editorPart=this.instantiationService.createInstance(k.EditorPart,tt.EDITOR_PART,r),this._register(o.toDisposable(function(){return e.editorPart.shutdown()})),this.editorGroupService=this.editorPart,t.set($e.IEditorGroupsService,this.editorPart),this.editorService=this.instantiationService.createInstance(Ye.EditorService),t.set(qe.IEditorService,this.editorService),
this.titlebarPart=this.instantiationService.createInstance(T.TitlebarPart,tt.TITLEBAR_PART),this._register(o.toDisposable(function(){return e.titlebarPart.shutdown()})),t.set(re.ITitleService,this.titlebarPart),t.set(ce.IHistoryService,new ue.SyncDescriptor(_.HistoryService)),this.menubarPart=this.instantiationService.createInstance(x.MenubarPart,tt.MENUBAR_PART),this.workbenchParams.configuration.backupPath?this.backupFileService=this.instantiationService.createInstance(g.BackupFileService,this.workbenchParams.configuration.backupPath):this.backupFileService=new g.InMemoryBackupFileService,t.set(v.IBackupFileService,this.backupFileService),t.set(he.ITextFileService,new ue.SyncDescriptor(de.TextFileService)),t.set(Le.IDecorationsService,new ue.SyncDescriptor(Ae.FileDecorationsService)),t.set(pe.ISCMService,new ue.SyncDescriptor(fe.SCMService)),t.set(Xe.IExtensionUrlHandler,new ue.SyncDescriptor(Xe.ExtensionUrlHandler)),t.set(ye.ITextModelService,new ue.SyncDescriptor(me.TextModelResolverService))
;var s=this.instantiationService.createInstance(G.JSONEditingService);t.set(U.IJSONEditingService,s),t.set(ke.IWorkspaceEditingService,new ue.SyncDescriptor(De.WorkspaceEditingService)),t.set($.IKeybindingEditingService,this.instantiationService.createInstance($.KeybindingsEditingService)),t.set(te.IConfigurationResolverService,new ue.SyncDescriptor(ne.ConfigurationResolverService,process.env)),this.quickOpen=this.instantiationService.createInstance(R.QuickOpenController),this._register(o.toDisposable(function(){return e.quickOpen.shutdown()})),t.set(oe.IQuickOpenService,this.quickOpen),this.quickInput=this.instantiationService.createInstance(M.QuickInputService),this._register(o.toDisposable(function(){return e.quickInput.shutdown()})),t.set(O.IQuickInputService,this.quickInput),t.set(Ge.IPreferencesService,this.instantiationService.createInstance(je.PreferencesService));for(var a=0,c=P.getServices();a<c.length;a++){var l=c[a];t.set(l.id,l.descriptor)}
m.Registry.as(A.Extensions.Actionbar).setInstantiationService(this.instantiationService),m.Registry.as(b.Extensions.Workbench).start(this.instantiationService,this.lifecycleService),m.Registry.as(S.Extensions.EditorInputFactories).setInstantiationService(this.instantiationService),this.instantiationService.createInstance(K.DefaultConfigurationExportHelper),this.configurationService.acquireInstantiationService(this.getInstantiationService())},t.prototype.registerListeners=function(){var e=this;this._register(this.editorService.onDidVisibleEditorsChange(function(){return e.onDidVisibleEditorsChange()}));var t=this.workbenchParams.configuration.filesToWait;if(t){var n=t.paths.map(function(e){return Oe.default.file(e.filePath)}),i=Oe.default.file(t.waitMarkerFilePath),r=this.editorService.onDidCloseEditor(function(){return e.onEditorClosed(r,n,i)});this._register(r)}this._register(this.configurationService.onDidChangeConfiguration(function(){return e.onDidUpdateConfiguration()})),
this._register(h.onDidChangeFullscreen(function(){return e.onFullscreenChanged()}))},t.prototype.onFullscreenChanged=function(){if(this.isCreated){h.isFullscreen()?this.workbench.addClass("fullscreen"):(this.workbench.removeClass("fullscreen"),this.zenMode.transitionedToFullScreen&&this.zenMode.active&&this.toggleZenMode());"custom"===this.getCustomTitleBarStyle()&&(this._onTitleBarVisibilityChange.fire(),this.layout())}},t.prototype.onEditorClosed=function(e,t,n){var i=this;t.every(function(e){return!i.editorService.isOpen({resource:e})})&&(e.dispose(),this.fileService.del(n).done(null,f.onUnexpectedError))},t.prototype.onDidVisibleEditorsChange=function(){if(0===this.editorService.visibleControls.length&&this.contextService.getWorkbenchState()===F.WorkbenchState.EMPTY&&!this.environmentService.isExtensionDevelopment){(this.configurationService.getValue(t.closeWhenEmptyConfigurationKey)||this.environmentService.args.wait)&&this.closeEmptyWindowScheduler.schedule()}},t.prototype.onAllEditorsClosed=function(){
0===this.editorService.visibleControls.length&&this.windowService.closeWindow()},t.prototype.onDidUpdateConfiguration=function(e){var n="right"===this.configurationService.getValue(t.sidebarPositionConfigurationKey)?N.Position.RIGHT:N.Position.LEFT;n!==this.getSideBarPosition()&&this.setSideBarPosition(n),this.setPanelPositionFromStorageOrConfig();var i=this.configurationService.getValue(t.fontAliasingConfigurationKey);if(i!==this.fontAliasing&&this.setFontAliasing(i),!this.zenMode.active){var r=!this.configurationService.getValue(t.statusbarVisibleConfigurationKey);r!==this.statusBarHidden&&this.setStatusBarHidden(r,e);var o=!this.configurationService.getValue(t.activityBarVisibleConfigurationKey);o!==this.activityBarHidden&&this.setActivityBarHidden(o,e)}var s=this.configurationService.getValue(t.menubarVisibilityConfigurationKey);this.setMenubarVisibility(s,e)},t.prototype.handleContextKeys=function(){var e=this;this.inZenMode=S.InEditorZenModeContext.bindTo(this.contextKeyService)
;var t=new Y.RawContextKey("sidebarVisible",!1);this.sideBarVisibleContext=t.bindTo(this.contextKeyService);var n=S.EditorsVisibleContext.bindTo(this.contextKeyService),i=S.TextCompareEditorVisibleContext.bindTo(this.contextKeyService),r=S.ActiveEditorGroupEmptyContext.bindTo(this.contextKeyService),o=S.MultipleEditorGroupsContext.bindTo(this.contextKeyService),s=function(){var t=e.editorService.visibleControls;i.set(t.some(function(e){return e.getId()===S.TEXT_DIFF_EDITOR_ID})),t.length>0?n.set(!0):n.reset(),e.editorService.activeEditor?r.reset():r.set(!0),e.editorGroupService.count>1?o.set(!0):o.reset()};this.editorPart.whenRestored.then(function(){return s()}),this._register(this.editorService.onDidActiveEditorChange(function(){return s()})),this._register(this.editorService.onDidVisibleEditorsChange(function(){return s()})),this._register(this.editorGroupService.onDidAddGroup(function(){return s()})),this._register(this.editorGroupService.onDidRemoveGroup(function(){return s()}))
;var a=Pe.InputFocusedContext.bindTo(this.contextKeyService);this._register(c.addDisposableListener(window,"focusin",function(){a.set(document.activeElement&&("INPUT"===document.activeElement.tagName||"TEXTAREA"===document.activeElement.tagName))},!0));var l=new Y.RawContextKey("workbenchState",Je(this.configurationService.getWorkbenchState())).bindTo(this.contextKeyService);this._register(this.configurationService.onDidChangeWorkbenchState(function(){l.set(Je(e.configurationService.getWorkbenchState()))}));var u=new Y.RawContextKey("workspaceFolderCount",this.configurationService.getWorkspace().folders.length).bindTo(this.contextKeyService);this._register(this.configurationService.onDidChangeWorkspaceFolders(function(){u.set(e.configurationService.getWorkspace().folders.length)}));var d=S.SplitEditorsVertically.bindTo(this.contextKeyService),h=function(){var t=$e.preferredSideBySideGroupDirection(e.configurationService);d.set(t===$e.GroupDirection.DOWN)}
;this._register(this.configurationService.onDidChangeConfiguration(function(e){e.affectsConfiguration("workbench.editor.openSideBySideDirection")&&h()})),h()},t.prototype.restoreParts=function(){var e=this,n=[];p.mark("willRestoreEditors"),n.push(this.editorPart.whenRestored.then(function(){return e.resolveEditorsToOpen().then(function(t){return t.length?e.editorService.openEditors(t):r.TPromise.as(void 0)})}).then(function(){p.mark("didRestoreEditors")}));var i;this.sideBarHidden||(this.sideBarVisibleContext.set(!0),this.shouldRestoreLastOpenedViewlet()&&(i=this.storageService.get(E.SidebarPart.activeViewletSettingsKey,W.StorageScope.WORKSPACE)),i||(i=this.viewletService.getDefaultViewletId()),p.mark("willRestoreViewlet"),n.push(this.viewletService.openViewlet(i).then(function(t){return t||e.viewletService.openViewlet(e.viewletService.getDefaultViewletId())}).then(function(){p.mark("didRestoreViewlet")})))
;var o=m.Registry.as(L.Extensions.Panels),s=this.storageService.get(w.PanelPart.activePanelSettingsKey,W.StorageScope.WORKSPACE,o.getDefaultPanelId());!this.panelHidden&&s&&n.push(this.panelPart.openPanel(s,!1)),this.storageService.getBoolean(t.zenModeActiveStorageKey,W.StorageScope.WORKSPACE,!1)&&this.toggleZenMode(!0,!0),this.storageService.getBoolean(t.centeredEditorLayoutActiveStorageKey,W.StorageScope.WORKSPACE,!1)&&this.centerEditorLayout(!0);var a=function(t){return e.workbenchCreated=!0,t&&f.onUnexpectedError(t),{customKeybindingsCount:e.keybindingService.customKeybindingsCount(),pinnedViewlets:e.activitybarPart.getPinned(),restoredViewlet:i,restoredEditorsCount:e.editorService.visibleEditors.length}};return r.TPromise.join(n).then(function(){return a()},function(e){return a(e)})},t.prototype.shouldRestoreLastOpenedViewlet=function(){if(!this.environmentService.isBuilt)return!0;var e=this.storageService.getBoolean(t.sidebarRestoreStorageKey,W.StorageScope.WORKSPACE)
;return e&&this.storageService.remove(t.sidebarRestoreStorageKey,W.StorageScope.WORKSPACE),e},t.prototype.resolveEditorsToOpen=function(){var e=this.workbenchParams.configuration;if(this.hasInitialFilesToOpen){var t=this.toInputs(e.filesToDiff,!1);if(t&&2===t.length)return r.TPromise.as([{leftResource:t[0].resource,rightResource:t[1].resource,options:{pinned:!0}}]);var n=this.toInputs(e.filesToCreate,!0),i=this.toInputs(e.filesToOpen,!1);return r.TPromise.as(i.concat(n))}if(this.contextService.getWorkbenchState()===F.WorkbenchState.EMPTY&&this.openUntitledFile()){return 1===this.editorGroupService.count&&0===this.editorGroupService.activeGroup.count?this.backupFileService.hasBackups().then(function(e){return e?r.TPromise.as([]):r.TPromise.as([{}])}):r.TPromise.as([])}return r.TPromise.as([])},t.prototype.toInputs=function(e,t){return e&&e.length?e.map(function(e){var n,i=Oe.default.file(e.filePath);return n=t?{filePath:i.fsPath,options:{pinned:!0}}:{resource:i,options:{pinned:!0}},
!t&&e.lineNumber&&(n.options.selection={startLineNumber:e.lineNumber,startColumn:e.columnNumber}),n}):[]},t.prototype.openUntitledFile=function(){var e=this.configurationService.inspect("workbench.startupEditor");if(!e.user&&!e.workspace){var t=this.configurationService.getValue("workbench.welcome.enabled");if("boolean"==typeof t)return!t}return"newUntitledFile"===e.value},t.prototype.initSettings=function(){this.sideBarHidden=this.storageService.getBoolean(t.sidebarHiddenStorageKey,W.StorageScope.WORKSPACE,this.contextService.getWorkbenchState()===F.WorkbenchState.EMPTY);var e=m.Registry.as(L.Extensions.Panels);this.panelHidden=this.storageService.getBoolean(t.panelHiddenStorageKey,W.StorageScope.WORKSPACE,!0),e.getDefaultPanelId()||(this.panelHidden=!0);var n=this.configurationService.getValue(t.sidebarPositionConfigurationKey);this.sideBarPosition="right"===n?N.Position.RIGHT:N.Position.LEFT,this.setPanelPositionFromStorageOrConfig()
;var i=this.configurationService.getValue(t.menubarVisibilityConfigurationKey);this.setMenubarVisibility(i,!0);var r=this.configurationService.getValue(t.statusbarVisibleConfigurationKey);this.statusBarHidden=!r;var o=this.configurationService.getValue(t.activityBarVisibleConfigurationKey);this.activityBarHidden=!o,this.fontAliasing=this.configurationService.getValue(t.fontAliasingConfigurationKey),this.zenMode={active:!1,transitionedToFullScreen:!1,transitionedToCenteredEditorLayout:!1,wasSideBarVisible:!1,wasPanelVisible:!1,transitionDisposeables:[]}},t.prototype.setPanelPositionFromStorageOrConfig=function(){var e=this.configurationService.getValue(t.defaultPanelPositionStorageKey),n=this.storageService.get(t.panelPositionStorageKey,W.StorageScope.WORKSPACE,e);this.panelPosition="right"===n?N.Position.RIGHT:N.Position.BOTTOM},t.prototype.getCustomTitleBarStyle=function(){var e=!this.environmentService.isBuilt||this.environmentService.isExtensionDevelopment;if(y.isMacintosh&&e)return null
;var t=this.configurationService.getValue();if(t&&t.window){if(t.window.nativeTabs)return null;var n=t.window.titleBarStyle;if("custom"===n)return n}return null},t.prototype.setStatusBarHidden=function(e,t){this.statusBarHidden=e,e?this.workbench.addClass("nostatusbar"):this.workbench.removeClass("nostatusbar"),t||this.workbenchLayout.layout()},t.prototype.setFontAliasing=function(e){var t;this.fontAliasing=e,(t=document.body.classList).remove.apply(t,et.map(function(e){return"monaco-font-aliasing-"+e})),et.some(function(t){return t===e})&&document.body.classList.add("monaco-font-aliasing-"+e)},t.prototype.createWorkbenchLayout=function(){this.workbenchLayout=this.instantiationService.createInstance(D.WorkbenchLayout,this.container,this.workbench.getHTMLElement(),{titlebar:this.titlebarPart,menubar:this.menubarPart,activitybar:this.activitybarPart,editor:this.editorPart,sidebar:this.sidebarPart,panel:this.panelPart,statusbar:this.statusbarPart
},this.quickOpen,this.quickInput,this.notificationsCenter,this.notificationsToasts)},t.prototype.renderWorkbench=function(){this.sideBarHidden&&this.workbench.addClass("nosidebar"),this.panelHidden&&this.workbench.addClass("nopanel"),this.statusBarHidden&&this.workbench.addClass("nostatusbar"),this.setFontAliasing(this.fontAliasing);var e=this.getCustomTitleBarStyle();e&&c.addClass(this.parent,"titlebar-style-"+e),h.isFullscreen()&&this.workbench.addClass("fullscreen"),this.createTitlebarPart(),this.createMenubarPart(),this.createActivityBarPart(),this.createSidebarPart(),this.createEditorPart(),this.createPanelPart(),this.createStatusbarPart(),this.createNotificationsHandlers(),this.workbenchContainer.build(this.container)},t.prototype.createTitlebarPart=function(){var e=u.$(this.workbench).div({class:["part","titlebar"],id:tt.TITLEBAR_PART,role:"contentinfo"});this.titlebarPart.create(e.getHTMLElement())},t.prototype.createMenubarPart=function(){var e=this,t=u.$(this.workbench).div({
class:["part","menubar"],id:tt.MENUBAR_PART,role:"menubar"});this.menubarPart.create(t.getHTMLElement()),this._register(this.menubarPart.onVisibilityChange(function(t){e._onMenubarVisibilityChange.fire(t)}))},t.prototype.createActivityBarPart=function(){var e=u.$(this.workbench).div({class:["part","activitybar",this.sideBarPosition===N.Position.LEFT?"left":"right"],id:tt.ACTIVITYBAR_PART,role:"navigation"});this.activitybarPart.create(e.getHTMLElement())},t.prototype.createSidebarPart=function(){var e=u.$(this.workbench).div({class:["part","sidebar",this.sideBarPosition===N.Position.LEFT?"left":"right"],id:tt.SIDEBAR_PART,role:"complementary"});this.sidebarPart.create(e.getHTMLElement())},t.prototype.createPanelPart=function(){var e=u.$(this.workbench).div({class:["part","panel",this.panelPosition===N.Position.BOTTOM?"bottom":"right"],id:tt.PANEL_PART,role:"complementary"});this.panelPart.create(e.getHTMLElement())},t.prototype.createEditorPart=function(){var e=u.$(this.workbench).div({
class:["part","editor"],id:tt.EDITOR_PART,role:"main"});this.editorPart.create(e.getHTMLElement())},t.prototype.createStatusbarPart=function(){var e=u.$(this.workbench).div({class:["part","statusbar"],id:tt.STATUSBAR_PART,role:"contentinfo"});this.statusbarPart.create(e.getHTMLElement())},t.prototype.createNotificationsHandlers=function(){var e=this;this.notificationsCenter=this._register(this.instantiationService.createInstance(Be.NotificationsCenter,this.workbench.getHTMLElement(),this.notificationService.model)),this.notificationsToasts=this._register(this.instantiationService.createInstance(Ke.NotificationsToasts,this.workbench.getHTMLElement(),this.notificationService.model)),this._register(this.instantiationService.createInstance(Ve.NotificationsAlerts,this.notificationService.model));var t=this.instantiationService.createInstance(ze.NotificationsStatus,this.notificationService.model);this._register(this.notificationsCenter.onDidChangeVisibility(function(){t.update(e.notificationsCenter.isVisible),
e.notificationsToasts.update(e.notificationsCenter.isVisible)})),He.registerNotificationCommands(this.notificationsCenter,this.notificationsToasts)},t.prototype.getInstantiationService=function(){return this.instantiationService},t.prototype.dispose=function(n){void 0===n&&(n=be.ShutdownReason.QUIT),e.prototype.dispose.call(this),n===be.ShutdownReason.RELOAD&&this.storageService.store(t.sidebarRestoreStorageKey,"true",W.StorageScope.WORKSPACE);var i=this.configurationService.getValue("zenMode");this.zenMode.active&&(i.restore||n===be.ShutdownReason.RELOAD)?this.storageService.store(t.zenModeActiveStorageKey,!0,W.StorageScope.WORKSPACE):(this.zenMode.active&&this.toggleZenMode(!0),this.storageService.remove(t.zenModeActiveStorageKey,W.StorageScope.WORKSPACE)),this.workbenchShutdown=!0},Object.defineProperty(t.prototype,"onTitleBarVisibilityChange",{get:function(){return this._onTitleBarVisibilityChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onMenubarVisibilityChange",{
get:function(){return this._onMenubarVisibilityChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onEditorLayout",{get:function(){return this.editorPart.onDidLayout},enumerable:!0,configurable:!0}),t.prototype.isCreated=function(){return this.workbenchCreated&&this.workbenchStarted},t.prototype.hasFocus=function(e){var t=document.activeElement;if(!t)return!1;var n=this.getContainer(e);return c.isAncestor(t,n)},t.prototype.getContainer=function(e){var t=null;switch(e){case N.Parts.TITLEBAR_PART:t=this.titlebarPart.getContainer();break;case N.Parts.MENUBAR_PART:t=this.menubarPart.getContainer();break;case N.Parts.ACTIVITYBAR_PART:t=this.activitybarPart.getContainer();break;case N.Parts.SIDEBAR_PART:t=this.sidebarPart.getContainer();break;case N.Parts.PANEL_PART:t=this.panelPart.getContainer();break;case N.Parts.EDITOR_PART:t=this.editorPart.getContainer();break;case N.Parts.STATUSBAR_PART:t=this.statusbarPart.getContainer()}return t},t.prototype.isVisible=function(e){switch(e){
case N.Parts.TITLEBAR_PART:return"custom"===this.getCustomTitleBarStyle()&&!h.isFullscreen();case N.Parts.MENUBAR_PART:return!y.isMacintosh&&this.isVisible(N.Parts.TITLEBAR_PART)&&!("hidden"===this.menubarVisibility||"default"===this.menubarVisibility&&h.isFullscreen());case N.Parts.SIDEBAR_PART:return!this.sideBarHidden;case N.Parts.PANEL_PART:return!this.panelHidden;case N.Parts.STATUSBAR_PART:return!this.statusBarHidden;case N.Parts.ACTIVITYBAR_PART:return!this.activityBarHidden}return!0},t.prototype.getTitleBarOffset=function(){var e=0;return this.isVisible(N.Parts.TITLEBAR_PART)&&(e=this.getContainer(N.Parts.TITLEBAR_PART).getBoundingClientRect().height),e},t.prototype.getWorkbenchElementId=function(){return tt.WORKBENCH_CONTAINER},t.prototype.toggleZenMode=function(e,t){void 0===t&&(t=!1),this.zenMode.active=!this.zenMode.active,this.zenMode.transitionDisposeables=o.dispose(this.zenMode.transitionDisposeables);var n=!1;if(this.zenMode.active){var i=this.configurationService.getValue("zenMode")
;n=!h.isFullscreen()&&i.fullScreen,this.zenMode.transitionedToFullScreen=t?i.fullScreen:n,this.zenMode.transitionedToCenteredEditorLayout=!this.isEditorLayoutCentered()&&i.centerLayout,this.zenMode.wasSideBarVisible=this.isVisible(N.Parts.SIDEBAR_PART),this.zenMode.wasPanelVisible=this.isVisible(N.Parts.PANEL_PART),this.setPanelHidden(!0,!0).done(void 0,f.onUnexpectedError),this.setSideBarHidden(!0,!0).done(void 0,f.onUnexpectedError),i.hideActivityBar&&this.setActivityBarHidden(!0,!0),i.hideStatusBar&&this.setStatusBarHidden(!0,!0),i.hideTabs&&this.editorPart.partOptions.showTabs&&this.zenMode.transitionDisposeables.push(this.editorPart.enforcePartOptions({showTabs:!1})),i.centerLayout&&this.centerEditorLayout(!0,!0)}else this.zenMode.wasPanelVisible&&this.setPanelHidden(!1,!0).done(void 0,f.onUnexpectedError),this.zenMode.wasSideBarVisible&&this.setSideBarHidden(!1,!0).done(void 0,f.onUnexpectedError),this.zenMode.transitionedToCenteredEditorLayout&&this.centerEditorLayout(!1,!0),
this.onDidUpdateConfiguration(!0),this.editorGroupService.activeGroup.focus(),n=this.zenMode.transitionedToFullScreen&&h.isFullscreen();this.inZenMode.set(this.zenMode.active),e||this.layout(),n&&this.windowService.toggleFullScreen().done(void 0,f.onUnexpectedError)},t.prototype.layout=function(e){this.workbenchStarted&&!this.workbenchShutdown&&this.workbenchLayout.layout(e)},t.prototype.isEditorLayoutCentered=function(){return this.editorPart.isLayoutCentered()},t.prototype.centerEditorLayout=function(e,n){this.storageService.store(t.centeredEditorLayoutActiveStorageKey,e,W.StorageScope.WORKSPACE),this.editorPart.centerLayout(e),n||this.layout()},t.prototype.resizePart=function(e,t){switch(e){case N.Parts.SIDEBAR_PART:case N.Parts.PANEL_PART:case N.Parts.EDITOR_PART:this.workbenchLayout.resizePart(e,t);break;default:return}},t.prototype.setActivityBarHidden=function(e,t){this.activityBarHidden=e,t||this.workbenchLayout.layout()},t.prototype.setSideBarHidden=function(e,n){var i=this;this.sideBarHidden=e,
this.sideBarVisibleContext.set(!e),e?this.workbench.addClass("nosidebar"):this.workbench.removeClass("nosidebar");var o=r.TPromise.wrap(null);if(e&&this.sidebarPart.getActiveViewlet())o=this.sidebarPart.hideActiveViewlet().then(function(){var e=i.panelPart.getActivePanel();i.hasFocus(N.Parts.PANEL_PART)&&e?e.focus():i.editorGroupService.activeGroup.focus()});else if(!e&&!this.sidebarPart.getActiveViewlet()){var s=this.sidebarPart.getLastActiveViewletId();s&&(o=this.viewletService.openViewlet(s,!0).then(function(e){return e||i.viewletService.openViewlet(i.viewletService.getDefaultViewletId(),!0)}))}return o.then(function(){var r=i.contextService.getWorkbenchState()===F.WorkbenchState.EMPTY;e!==r?i.storageService.store(t.sidebarHiddenStorageKey,e?"true":"false",W.StorageScope.WORKSPACE):i.storageService.remove(t.sidebarHiddenStorageKey,W.StorageScope.WORKSPACE),n||i.workbenchLayout.layout()})},t.prototype.setPanelHidden=function(e,n){var i=this;this.panelHidden=e,
e?this.workbench.addClass("nopanel"):this.workbench.removeClass("nopanel");var o=r.TPromise.wrap(null);if(e&&this.panelPart.getActivePanel())o=this.panelPart.hideActivePanel().then(function(){i.editorGroupService.activeGroup.focus()});else if(!e&&!this.panelPart.getActivePanel()){var s=this.panelPart.getLastActivePanelId();s&&(o=this.panelPart.openPanel(s,!0))}return o.then(function(){e?i.storageService.remove(t.panelHiddenStorageKey,W.StorageScope.WORKSPACE):i.storageService.store(t.panelHiddenStorageKey,"false",W.StorageScope.WORKSPACE),n||i.workbenchLayout.layout()})},t.prototype.toggleMaximizedPanel=function(){this.workbenchLayout.layout({toggleMaximizedPanel:!0,source:N.Parts.PANEL_PART})},t.prototype.isPanelMaximized=function(){return this.workbenchLayout.isPanelMaximized()},t.prototype.getSideBarPosition=function(){return this.sideBarPosition},t.prototype.setSideBarPosition=function(e){this.sideBarHidden&&this.setSideBarHidden(!1,!0).done(void 0,f.onUnexpectedError)
;var t=e===N.Position.LEFT?"left":"right",n=this.sideBarPosition===N.Position.LEFT?"left":"right";this.sideBarPosition=e,c.removeClass(this.activitybarPart.getContainer(),n),c.removeClass(this.sidebarPart.getContainer(),n),c.addClass(this.activitybarPart.getContainer(),t),c.addClass(this.sidebarPart.getContainer(),t),this.activitybarPart.updateStyles(),this.sidebarPart.updateStyles(),this.workbenchLayout.layout()},t.prototype.setMenubarVisibility=function(e,t){this.menubarVisibility=e,t||this.workbenchLayout.layout()},t.prototype.getPanelPosition=function(){return this.panelPosition},t.prototype.setPanelPosition=function(e){var n=this;return(this.panelHidden?this.setPanelHidden(!1,!0):r.TPromise.as(void 0)).then(function(){var i=e===N.Position.BOTTOM?"bottom":"right",r=n.panelPosition===N.Position.BOTTOM?"bottom":"right";n.panelPosition=e,n.storageService.store(t.panelPositionStorageKey,N.Position[n.panelPosition].toLowerCase(),W.StorageScope.WORKSPACE),c.removeClass(n.panelPart.getContainer(),r),
c.addClass(n.panelPart.getContainer(),i),n.panelPart.updateStyles(),n.workbenchLayout.layout()})},t.sidebarHiddenStorageKey="workbench.sidebar.hidden",t.menubarVisibilityConfigurationKey="window.menuBarVisibility",t.sidebarRestoreStorageKey="workbench.sidebar.restore",t.panelHiddenStorageKey="workbench.panel.hidden",t.zenModeActiveStorageKey="workbench.zenmode.active",t.centeredEditorLayoutActiveStorageKey="workbench.centerededitorlayout.active",t.panelPositionStorageKey="workbench.panel.location",t.defaultPanelPositionStorageKey="workbench.panel.defaultLocation",t.sidebarPositionConfigurationKey="workbench.sideBar.location",t.statusbarVisibleConfigurationKey="workbench.statusBar.visible",t.activityBarVisibleConfigurationKey="workbench.activityBar.visible",t.closeWhenEmptyConfigurationKey="window.closeWhenEmpty",t.fontAliasingConfigurationKey="workbench.fontAliasing",
t=a([l(6,le.IInstantiationService),l(7,F.IWorkspaceContextService),l(8,W.IStorageService),l(9,H.IConfigurationService),l(10,Ze.IWorkbenchThemeService),l(11,Ie.IEnvironmentService),l(12,Se.IWindowService),l(13,We.INotificationService),l(14,we.IContextViewService),l(15,Qe.ITelemetryService)],t)}(o.Disposable);t.Workbench=nt}),define(e[199],t([1,0,4,30,972,144,24,1592]),function(e,t,n,i,r,a,c,l){"use strict";function u(t){var a;return(t.getRawRequest?n.TPromise.as(t.getRawRequest(t)):function(t){return o(this,void 0,n.TPromise,function(){var n,i,o;return s(this,function(s){switch(s.label){case 0:return"https:"!==(n=r.parse(t.url)).protocol?[3,2]:[4,new Promise(function(t,n){e(["https"],t,n)})];case 1:return o=s.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["http"],t,n)})];case 3:o=s.sent(),s.label=4;case 4:return i=o,[2,i.request]}})})}(t)).then(function(e){return new n.TPromise(function(n,o){var s=r.parse(t.url),d={hostname:s.hostname,port:s.port?parseInt(s.port):"https:"===s.protocol?443:80,
protocol:s.protocol,path:s.path,method:t.type||"GET",headers:t.headers,agent:t.agent,rejectUnauthorized:!i.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(d.auth=t.user+":"+t.password),(a=e(d,function(e){var r=i.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode>=300&&e.statusCode<400&&r>0&&e.headers.location)u(c.assign({},t,{url:e.headers.location,followRedirects:r-1})).done(n,o);else{var s=e;"gzip"===e.headers["content-encoding"]&&(s=s.pipe(l.createGunzip())),n({res:e,stream:s})}})).on("error",o),t.timeout&&a.setTimeout(t.timeout),t.data){if("string"!=typeof t.data)return void t.data.pipe(a);a.write(t.data)}a.end()},function(){return a&&a.abort()})})}function d(e){return e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function h(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.request=u,t.download=function(e,t){return new n.TPromise(function(n,i){var r=a.createWriteStream(e);r.once("finish",function(){return n(null)}),
t.stream.once("error",i),t.stream.pipe(r)})},t.asText=function(e){return new n.TPromise(function(t,n){if(!d(e))return n("Server returned "+e.res.statusCode);if(h(e))return t(null);var i=[];e.stream.on("data",function(e){return i.push(e)}),e.stream.on("end",function(){return t(i.join(""))}),e.stream.on("error",n)})},t.asJson=function(e){return new n.TPromise(function(t,n){if(!d(e))return n("Server returned "+e.res.statusCode);if(h(e))return t(null);var i=[];e.stream.on("data",function(e){return i.push(e)}),e.stream.on("end",function(){try{t(JSON.parse(i.join("")))}catch(e){n(e)}}),e.stream.on("error",n)})}}),define(e[1581],t([1,0,1409,93,59,4,20,9,80,123,24,207,28,199,139,76,454,36,87,166,136,50]),function(e,t,n,i,r,o,s,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){"use strict";function I(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return String(e.reduce(function(e,t){return e|t},0))}function T(e,t){var n=(e||[]).filter(function(e){return e.statisticName===t})[0];return n?n.value:0}function x(t,n){
var i=t.files.filter(function(e){return e.assetType===n})[0];if(n===M.Repository&&t.properties){var r=t.properties.filter(function(e){return e.key===n}),o=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?");return(s=r.filter(function(e){return o.test(e.value)})[0])?{uri:s.value,fallbackUri:s.value}:{uri:null,fallbackUri:null}}if(!i){if(n===M.Icon){var s=e.toUrl("./media/defaultIcon.png");return{uri:s,fallbackUri:s}}return n===M.Repository?{uri:null,fallbackUri:null}:null}return n===M.VSIX?{uri:t.fallbackAssetUri+"/"+n+"?redirect=true",fallbackUri:t.fallbackAssetUri+"/"+n}:{uri:t.assetUri+"/"+n,fallbackUri:t.fallbackAssetUri+"/"+n}}function k(e){var t=e.properties?e.properties.filter(function(e){return e.key===P.Dependency}):[],n=t.length>0&&t[0].value;return n?n.split(",").map(function(e){return h.adoptToGalleryExtensionId(e)}):[]}function D(e){var t=e.properties?e.properties.filter(function(e){return e.key===P.Engine}):[];return t.length>0&&t[0].value||""}function A(e,t,n,i,r){
var o=e.versions[0],s={manifest:x(o,M.Manifest),readme:x(o,M.Details),changelog:x(o,M.Changelog),download:x(o,M.VSIX),icon:x(o,M.Icon),license:x(o,M.License),repository:x(o,M.Repository),coreTranslations:function(e){return e.files.filter(function(e){return 0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")}).reduce(function(t,n){return t[n.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length)]=x(e,n.assetType),t},{})}(o)};return{identifier:{id:h.getGalleryExtensionId(e.publisher.publisherName,e.extensionName),uuid:e.extensionId},name:e.extensionName,version:o.version,date:o.lastUpdated,displayName:e.displayName,publisherId:e.publisher.publisherId,publisher:e.publisher.publisherName,publisherDisplayName:e.publisher.displayName,description:e.shortDescription||"",installCount:T(e.statistics,"install")+T(e.statistics,"updateCount"),rating:T(e.statistics,"averagerating"),ratingCount:T(e.statistics,"ratingcount"),assets:s,properties:{dependencies:k(o),engine:D(o)},telemetryData:{
index:(i.pageNumber-1)*i.pageSize+n,searchText:i.searchText,querySource:r},preview:function(e){return-1!==e.indexOf("preview")}(e.flags)}}function L(e){var t=r.join(e.userDataPath,"machineid");return _.readFile(t,"utf8").then(function(e){return E.isUUID(e)?e:o.TPromise.wrap(null)},function(e){return o.TPromise.wrap(null)}).then(function(e){if(!e){e=E.generateUuid();try{C.writeFileAndFlushSync(t,e)}catch(e){}}return{"X-Market-Client-Id":"VSCode "+m.default.version,"User-Agent":"VSCode "+m.default.version,"X-Market-User-Id":e}})}Object.defineProperty(t,"__esModule",{value:!0});var R;!function(e){e[e.None=0]="None",e[e.IncludeVersions=1]="IncludeVersions",e[e.IncludeFiles=2]="IncludeFiles",e[e.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",e[e.IncludeSharedAccounts=8]="IncludeSharedAccounts",e[e.IncludeVersionProperties=16]="IncludeVersionProperties",e[e.ExcludeNonValidated=32]="ExcludeNonValidated",e[e.IncludeInstallationTargets=64]="IncludeInstallationTargets",e[e.IncludeAssetUri=128]="IncludeAssetUri",
e[e.IncludeStatistics=256]="IncludeStatistics",e[e.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",e[e.Unpublished=4096]="Unpublished"}(R||(R={}));var O;!function(e){e[e.Tag=1]="Tag",e[e.ExtensionId=4]="ExtensionId",e[e.Category=5]="Category",e[e.ExtensionName=7]="ExtensionName",e[e.Target=8]="Target",e[e.Featured=9]="Featured",e[e.SearchText=10]="SearchText",e[e.ExcludeWithFlags=12]="ExcludeWithFlags"}(O||(O={}));var M={Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest",VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source"},P={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",Engine:"Microsoft.VisualStudio.Code.Engine"},N={pageNumber:1,pageSize:10,sortBy:d.SortBy.NoneOrRelevance,sortOrder:d.SortOrder.Default,
flags:R.None,criteria:[],assetTypes:[]},F=function(){function e(e){void 0===e&&(e=N),this.state=e}return Object.defineProperty(e.prototype,"pageNumber",{get:function(){return this.state.pageNumber},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return this.state.pageSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortBy",{get:function(){return this.state.sortBy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this.state.sortOrder},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.state.flags},enumerable:!0,configurable:!0}),e.prototype.withPage=function(t,n){return void 0===n&&(n=this.state.pageSize),new e(p.assign({},this.state,{pageNumber:t,pageSize:n}))},e.prototype.withFilter=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this.state.criteria.concat(n.map(function(e){return{filterType:t,value:e}}))
;return new e(p.assign({},this.state,{criteria:r}))},e.prototype.withSortBy=function(t){return new e(p.assign({},this.state,{sortBy:t}))},e.prototype.withSortOrder=function(t){return new e(p.assign({},this.state,{sortOrder:t}))},e.prototype.withFlags=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(p.assign({},this.state,{flags:t.reduce(function(e,t){return e|t},0)}))},e.prototype.withAssetTypes=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(p.assign({},this.state,{assetTypes:t}))},Object.defineProperty(e.prototype,"raw",{get:function(){var e=this.state,t=e.criteria,n=e.pageNumber,i=e.pageSize,r=e.sortBy,o=e.sortOrder,s=e.flags;return{filters:[{criteria:t,pageNumber:n,pageSize:i,sortBy:r,sortOrder:o}],assetTypes:e.assetTypes,flags:s}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchText",{get:function(){var e=this.state.criteria.filter(function(e){return e.filterType===O.SearchText})[0];return e?e.value:""},
enumerable:!0,configurable:!0}),e}(),W=function(){function e(e,t,n){this.requestService=e,this.environmentService=t,this.telemetryService=n;var i=y.default.extensionsGallery;this.extensionsGalleryUrl=i&&i.serviceUrl,this.extensionsControlUrl=i&&i.controlUrl,this.commonHeadersPromise=L(this.environmentService)}return e.prototype.api=function(e){return void 0===e&&(e=""),""+this.extensionsGalleryUrl+e},e.prototype.isEnabled=function(){return!!this.extensionsGalleryUrl},e.prototype.query=function(e){var t=this;if(void 0===e&&(e={}),!this.isEnabled())return o.TPromise.wrapError(new Error("No extension gallery service configured."));var n=e.names?"ids":e.text?"text":"all",i=e.text||"",r=p.getOrDefault(e,function(e){return e.pageSize},50);this.telemetryService.publicLog("galleryService:query",{type:n,text:i})
;var s=(new F).withFlags(R.IncludeLatestVersionOnly,R.IncludeAssetUri,R.IncludeStatistics,R.IncludeFiles,R.IncludeVersionProperties).withPage(1,r).withFilter(O.Target,"Microsoft.VisualStudio.Code").withFilter(O.ExcludeWithFlags,I(R.Unpublished));return i?((i=(i=(i=i.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return s=s.withFilter(O.Category,n||t),""})).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return s=s.withFilter(O.Tag,n||t),""})).trim())&&(i=i.length<200?i:i.substring(0,200),s=s.withFilter(O.SearchText,i)),s=s.withSortBy(d.SortBy.NoneOrRelevance)):s=e.ids?s.withFilter.apply(s,[O.ExtensionId].concat(e.ids)):e.names?s.withFilter.apply(s,[O.ExtensionName].concat(e.names)):s.withSortBy(d.SortBy.InstallCount),"number"==typeof e.sortBy&&(s=s.withSortBy(e.sortBy)),"number"==typeof e.sortOrder&&(s=s.withSortOrder(e.sortOrder)),this.queryGallery(s).then(function(n){var i=n.galleryExtensions,r=n.total;return{firstPage:i.map(function(n,i){
return A(n,t.extensionsGalleryUrl,i,s,e.source)}),total:r,pageSize:s.pageSize,getPage:function(n){var i=s.withPage(n+1);return t.queryGallery(i).then(function(n){return n.galleryExtensions.map(function(n,r){return A(n,t.extensionsGalleryUrl,r,i,e.source)})})}}})},e.prototype.queryGallery=function(e){var t=this;return this.commonHeadersPromise.then(function(n){var i=JSON.stringify(e.raw),r=p.assign({},n,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":i.length});return t.requestService.request({type:"POST",url:t.api("/extensionquery"),data:i,headers:r}).then(function(e){return e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:v.asJson(e).then(function(e){var t=e.results[0],n=t.extensions,i=t.resultMetadata&&t.resultMetadata.filter(function(e){return"ResultCount"===e.metadataType})[0];return{galleryExtensions:n,total:i&&i.metadataItems.filter(function(e){return"TotalCount"===e.name})[0].count||0}})})})},
e.prototype.reportStatistic=function(e,t,n,i){var r=this;return this.isEnabled()?this.commonHeadersPromise.then(function(o){var s=c({},o,{Accept:"*/*;api-version=4.0-preview.1"});return r.requestService.request({type:"POST",url:r.api("/publishers/"+e+"/extensions/"+t+"/"+n+"/stats?statType="+i),headers:s}).then(null,function(){return null})}):o.TPromise.as(null)},e.prototype.download=function(e,t){var s=this;return this.loadCompatibleVersion(e).then(function(e){if(!e)return o.TPromise.wrapError(new Error(n.localize(0,null,m.default.version)));var a=r.join(i.tmpdir(),E.generateUuid()),c=h.getGalleryExtensionTelemetryData(e),l=(new Date).getTime(),u=t===d.InstallOperation.Install?"install":t===d.InstallOperation.Update?"update":"",f=u?{uri:e.assets.download.uri+"&"+u+"=true",fallbackUri:e.assets.download.fallbackUri+"?"+u+"=true"}:e.assets.download;return s.getAsset(f).then(function(e){return v.download(a,e)}).then(function(){return function(e){
return s.telemetryService.publicLog("galleryService:downloadVSIX",p.assign(c,{duration:e}))}((new Date).getTime()-l)}).then(function(){return a})})},e.prototype.getReadme=function(e){return this.getAsset(e.assets.readme).then(v.asText)},e.prototype.getManifest=function(e){return this.getAsset(e.assets.manifest).then(v.asText).then(JSON.parse)},e.prototype.getCoreTranslation=function(e,t){var n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(v.asText).then(JSON.parse):o.TPromise.as(null)},e.prototype.getChangelog=function(e){return this.getAsset(e.assets.changelog).then(v.asText)},e.prototype.loadAllDependencies=function(e){return this.getDependenciesReccursively(e.map(function(e){return e.id}),[])},e.prototype.loadCompatibleVersion=function(e){var t=this;if(e.properties.engine&&b.isEngineValid(e.properties.engine))return o.TPromise.wrap(e)
;var n=(new F).withFlags(R.IncludeVersions,R.IncludeFiles,R.IncludeVersionProperties).withPage(1,1).withFilter(O.Target,"Microsoft.VisualStudio.Code").withFilter(O.ExcludeWithFlags,I(R.Unpublished)).withAssetTypes(M.Manifest,M.VSIX).withFilter(O.ExtensionId,e.identifier.uuid);return this.queryGallery(n).then(function(n){var i=n.galleryExtensions[0];return i?t.getLastValidExtensionVersion(i,i.versions).then(function(t){return t?(e.properties.dependencies=k(t),e.properties.engine=D(t),e.assets.download=x(t,M.VSIX),e.version=t.version,e):null}):null})},e.prototype.loadDependencies=function(e){var t,n=this;if(!e||0===e.length)return o.TPromise.as([]);var i=(t=(new F).withFlags(R.IncludeLatestVersionOnly,R.IncludeAssetUri,R.IncludeStatistics,R.IncludeFiles,R.IncludeVersionProperties).withPage(1,e.length).withFilter(O.Target,"Microsoft.VisualStudio.Code").withFilter(O.ExcludeWithFlags,I(R.Unpublished)).withAssetTypes(M.Icon,M.License,M.Details,M.Manifest,M.VSIX)).withFilter.apply(t,[O.ExtensionName].concat(e))
;return this.queryGallery(i).then(function(e){for(var t=[],r=[],o=0;o<e.galleryExtensions.length;o++){var s=e.galleryExtensions[o];-1===r.indexOf(s.extensionId)&&(t.push(A(s,n.extensionsGalleryUrl,o,i,"dependencies")),r.push(s.extensionId))}return t})},e.prototype.getDependenciesReccursively=function(t,n){var i=this;return t&&t.length&&(t=n.length?t.filter(function(t){return!e.hasExtensionByName(n,t)}):t).length?this.loadDependencies(t).then(function(t){for(var r=new Set,o=0,a=t;o<a.length;o++){var c=a[o];c.properties.dependencies&&c.properties.dependencies.forEach(function(e){return r.add(e)})}n=s.distinct(n.concat(t),function(e){return e.identifier.uuid});var l=[];return r.forEach(function(t){return!e.hasExtensionByName(n,t)&&l.push(t)}),i.getDependenciesReccursively(l,n)}):o.TPromise.wrap(n)},e.prototype.getAsset=function(e,t){var n=this;return void 0===t&&(t={}),this.commonHeadersPromise.then(function(i){var r=p.assign({},i,t.headers||{});t=p.assign({},t,{type:"GET"},{headers:r})
;var s=e.uri,a=e.fallbackUri,c=p.assign({},t,{url:s});return n.requestService.request(c).then(function(e){return 200===e.res.statusCode?o.TPromise.as(e):v.asText(e).then(function(t){return o.TPromise.wrapError(new Error("Expected 200, got back "+e.res.statusCode+" instead.\n\n"+t))})}).then(null,function(e){if(u.isPromiseCanceledError(e))return o.TPromise.wrapError(e);var i=u.getErrorMessage(e);n.telemetryService.publicLog("galleryService:requestError",{url:s,cdn:!0,message:i}),n.telemetryService.publicLog("galleryService:cdnFallback",{url:s,message:i});var r=p.assign({},t,{url:a});return n.requestService.request(r).then(null,function(e){if(u.isPromiseCanceledError(e))return o.TPromise.wrapError(e);var t=u.getErrorMessage(e);return n.telemetryService.publicLog("galleryService:requestError",{url:a,cdn:!1,message:t}),o.TPromise.wrapError(e)})})})},e.prototype.getLastValidExtensionVersion=function(e,t){var n=this.getLastValidExtensionVersionFromProperties(e,t)
;return n||this.getLastValidExtensionVersionReccursively(e,t)},e.prototype.getLastValidExtensionVersionFromProperties=function(e,t){for(var n=0,i=t;n<i.length;n++){var r=i[n],s=D(r);if(!s)return null;if(b.isEngineValid(s))return o.TPromise.wrap(r)}return null},e.prototype.getLastValidExtensionVersionReccursively=function(e,t){var n=this;if(!t.length)return null;var i=t[0],r=x(i,M.Manifest);return this.getAsset(r,{headers:{"Accept-Encoding":"gzip"}}).then(function(e){return v.asJson(e)}).then(function(r){var o=r.engines.vscode;return b.isEngineValid(o)?(i.properties=i.properties||[],i.properties.push({key:P.Engine,value:r.engines.vscode}),i):n.getLastValidExtensionVersionReccursively(e,t.slice(1))})},e.hasExtensionByName=function(e,t){for(var n=0,i=e;n<i.length;n++){var r=i[n];if(r.publisher+"."+r.name===t)return!0}return!1},e.prototype.getExtensionsReport=function(){return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl}).then(function(e){
return 200!==e.res.statusCode?o.TPromise.wrapError(new Error("Could not get extensions report.")):v.asJson(e).then(function(e){for(var t=new Map,n=0,i=e.malicious;n<i.length;n++){var r=i[n],s=t.get(r)||{id:{id:r},malicious:!0,slow:!1};s.malicious=!0,t.set(r,s)}return o.TPromise.as(w.values(t))})}):o.TPromise.as([]):o.TPromise.wrapError(new Error("No extension gallery service configured."))},e=a([l(0,f.IRequestService),l(1,S.IEnvironmentService),l(2,g.ITelemetryService)],e)}();t.ExtensionGalleryService=W,t.resolveMarketplaceHeaders=L}),define(e[1582],t([1,0,4,24,199,967,17,77]),function(e,t,n,i,r,c,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){var n=this;this.logService=t,this.disposables=[],this.configure(e.getValue()),e.onDidChangeConfiguration(function(){return n.configure(e.getValue())},this,this.disposables)}return e.prototype.configure=function(e){this.proxyUrl=e.http&&e.http.proxy,this.strictSSL=e.http&&e.http.proxyStrictSSL,
this.authorization=e.http&&e.http.proxyAuthorization},e.prototype.request=function(e,t){return void 0===t&&(t=r.request),o(this,void 0,n.TPromise,function(){var n,r,o,a,l;return s(this,function(s){switch(s.label){case 0:return this.logService.trace("RequestService#request",e.url),n=this,r=n.proxyUrl,o=n.strictSSL,a=e,(l=e.agent)?[3,2]:[4,c.getProxyAgent(e.url,{proxyUrl:r,strictSSL:o})];case 1:l=s.sent(),s.label=2;case 2:return a.agent=l,e.strictSSL=o,this.authorization&&(e.headers=i.assign(e.headers||{},{"Proxy-Authorization":this.authorization})),[2,t(e)]}})})},e=a([l(0,u.IConfigurationService),l(1,d.ILogService)],e)}();t.RequestService=h}),define(e[1583],t([1,0,4,412,1582]),function(e,t,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.request=function(n){return e.prototype.request.call(this,n,t.xhrRequest)},i}(o.RequestService);t.RequestService=s,t.xhrRequest=function(e){
var t=new XMLHttpRequest;return new i.TPromise(function(i,o){return t.open(e.type||"GET",e.url,!0,e.user,e.password),function(e,t){if(t.headers)e:for(var n in t.headers){switch(n){case"User-Agent":case"Accept-Encoding":case"Content-Length":continue e}e.setRequestHeader(n,t.headers[n])}}(t,e),t.responseType="arraybuffer",t.onerror=function(e){return o(new Error(t.statusText&&"XHR failed: "+t.statusText))},t.onload=function(e){i({res:{statusCode:t.status,headers:function(e){for(var t=Object.create(null),n=0,i=e.getAllResponseHeaders().split(/\r\n|\n|\r/g);n<i.length;n++){var r=i[n];if(r){var o=r.indexOf(":");t[r.substr(0,o).trim().toLowerCase()]=r.substr(o+1).trim()}}return t}(t)},stream:new(function(e){function t(t){var n=e.call(this)||this;return n._buffer=Buffer.from(new Uint8Array(t)),n._offset=0,n._length=n._buffer.length,n}return n(t,e),t.prototype._read=function(e){this._offset<this._length?(this.push(this._buffer.slice(this._offset,this._offset+e)),this._offset+=e):this.push(null)},t
}(r.Readable))(t.response)})},t.ontimeout=function(t){return o(new Error("XHR timeout: "+e.timeout+"ms"))},e.timeout&&(t.timeout=e.timeout),t.send(e.data),null},function(){t.abort()})}}),define(e[1584],t([1,0,11,192,128,5,9,126,76,112,139,958,558,28,178,393,394,924,1554,965,42,1035,207,1583,17,1491,1033,882,47,994,1235,71,920,300,554,195,446,34,137,865,35,38,90,36,140,29,1242,27,49,333,54,91,417,131,463,1017,799,80,1047,357,330,167,78,141,1459,127,906,12,26,1453,288,263,1319,159,77,69,144,59,876,438,329,1325,22,1345,100,1210,855,8,88,962,1402,860,442,866]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$,Y,X,Q,Z,J,ee,te,ne,ie,re,oe,se,ae,ce,le,ue,de,he,pe,fe,ge,ve,me,ye,be,Se,_e,Ce,Ee,we,Ie,Te,xe,ke,De,Ae,Le,Re,Oe,Me,Pe,Ne,Fe,We){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var Be=function(){function e(e,t,n,i,r){this.mainProcessClient=i,this.container=e,this.configuration=r,this.contextService=t.contextService,
this.configurationService=t.configurationService,this.environmentService=t.environmentService,this.logService=t.logService,this.timerService=t.timerService,this.storageService=t.storageService,this.mainProcessServices=n,this.toUnbind=[],this.previousErrorTime=0}return e.prototype.createContents=function(e){var t=this;r.setARIAContainer(document.body);var n=document.createElement("div");e.appendChild(n);var i=this.initServiceCollection(e),o=i[0],s=i[1];this.workbench=this.createWorkbench(o,s,e,n),this.workbench.getInstantiationService().createInstance(y.ElectronWindow,this.container);var a=setTimeout(function(){t.logService.warn("Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.")},1e4);return this.lifecycleService.when(z.LifecyclePhase.Running).then(function(){clearTimeout(a)}),n},e.prototype.createWorkbench=function(e,t,n,i){var r=this;try{var o=e.createInstance(h.Workbench,n,i,this.configuration,t,this.lifecycleService,this.mainProcessClient)
;return this.lifecycleService.phase=z.LifecyclePhase.Restoring,o.startup().done(function(e){r.lifecycleService.phase=z.LifecyclePhase.Running,r.logStartupTelemetry(e);var t=setTimeout(function(){t=void 0,r.lifecycleService.phase=z.LifecyclePhase.Eventually},3e3);r.toUnbind.push({dispose:function(){t&&clearTimeout(t)}}),r.environmentService.extensionTestsPath||r.contextService.getWorkbenchState()!==q.WorkbenchState.FOLDER||r.logLocalStorageMetrics()}),o}catch(e){throw this.logService.error(a.toErrorMessage(e,!0)),e}},e.prototype.logStartupTelemetry=function(e){var t=this.configuration,r=t.filesToOpen,o=t.filesToCreate,s=t.filesToDiff;this.telemetryService.publicLog("workspaceLoad",{userAgent:navigator.userAgent,windowSize:{innerHeight:window.innerHeight,innerWidth:window.innerWidth,outerHeight:window.outerHeight,outerWidth:window.outerWidth},emptyWorkbench:this.contextService.getWorkbenchState()===q.WorkbenchState.EMPTY,"workbench.filesToOpen":r&&r.length||0,"workbench.filesToCreate":o&&o.length||0,
"workbench.filesToDiff":s&&s.length||0,customKeybindingsCount:e.customKeybindingsCount,theme:this.themeService.getColorTheme().id,language:n.language,pinnedViewlets:e.pinnedViewlets,restoredViewlet:e.restoredViewlet,restoredEditors:e.restoredEditorsCount,startupKind:this.lifecycleService.startupKind}),i.mark("didStartWorkbench")},e.prototype.logLocalStorageMetrics=function(){var e=this;if(this.lifecycleService.startupKind!==z.StartupKind.ReloadedWindow&&this.lifecycleService.startupKind!==z.StartupKind.ReopenedWindow){i.mark("willReadLocalStorage");var t=this.storageService.getBoolean("localStorageMetricsReadyToSend2");i.mark("didReadLocalStorage"),t?this.storageService.getBoolean("localStorageMetricsSent2")||(i.mark("willWriteLocalStorage"),this.storageService.store("localStorageMetricsSent2",!0),i.mark("didWriteLocalStorage"),i.mark("willStatLocalStorage"),Ce.stat(Ee.join(this.environmentService.userDataPath,"Local Storage","file__0.localstorage"),function(t,n){i.mark("didStatLocalStorage"),
e.telemetryService.publicLog("localStorageTimers2",{statTime:i.getDuration("willStatLocalStorage","didStatLocalStorage"),accessTime:i.getDuration("willAccessLocalStorage","didAccessLocalStorage"),firstReadTime:i.getDuration("willReadWorkspaceIdentifier","didReadWorkspaceIdentifier"),subsequentReadTime:i.getDuration("willReadLocalStorage","didReadLocalStorage"),writeTime:i.getDuration("willWriteLocalStorage","didWriteLocalStorage"),keys:window.localStorage.length,size:n?n.size:-1})})):this.storageService.store("localStorageMetricsReadyToSend2",!0)}},e.prototype.initServiceCollection=function(e){var t=this,n=new W.ServiceCollection;n.set(q.IWorkspaceContextService,this.contextService),n.set(w.IConfigurationService,this.configurationService),n.set(K.IEnvironmentService,this.environmentService),n.set(Se.ILogService,this.logService),this.toUnbind.push(this.logService),n.set(oe.ITimerService,this.timerService),n.set(F.IStorageService,this.storageService),this.mainProcessServices.forEach(function(e,t){n.set(e,t)})
;var r=new B.InstantiationService(n,!0);this.notificationService=new De.NotificationService,n.set(ke.INotificationService,this.notificationService),this.broadcastService=r.createInstance(me.BroadcastService,this.configuration.windowId),n.set(me.IBroadcastService,this.broadcastService),n.set(S.IWindowService,new l.SyncDescriptor(_.WindowService,this.configuration.windowId,this.configuration));var o=n.get(S.IWindowsService).whenSharedProcessReady().then(function(){return ee.connect(t.environmentService.sharedIPCHandle,"window:"+t.configuration.windowId)});if(o.done(function(e){return e.registerChannel("dialog",r.createInstance(Re.DialogChannel))}),ae.restoreFontInfo(this.storageService),ae.readFontInfo(se.BareFontInfo.createFromRawSettings(this.configurationService.getValue("editor"),ce.getZoomLevel())),n.set(be.IHashService,new l.SyncDescriptor(ye.HashService)),
this.environmentService.isBuilt&&!this.environmentService.isExtensionDevelopment&&!this.environmentService.args["disable-telemetry"]&&c.default.enableTelemetry){var s=J.getDelayedChannel(o.then(function(e){return e.getChannel("telemetryAppender")})),a=c.default.commit,h=u.default.version,y={appender:new g.TelemetryAppenderClient(s),commonProperties:b.resolveWorkbenchCommonProperties(this.storageService,a,h,this.configuration.machineId,this.environmentService.installSourcePath),piiPaths:[this.environmentService.appRoot,this.environmentService.extensionsPath]},pe=r.createInstance(v.TelemetryService,y);this.telemetryService=pe;var fe=new m.default(pe);this.toUnbind.push(pe,fe)}else this.telemetryService=f.NullTelemetryService;n.set(p.ITelemetryService,this.telemetryService),this.toUnbind.push(f.configurationTelemetry(this.telemetryService,this.configurationService));var _e=Z.NullCrashReporterService
;!this.environmentService.disableCrashReporter&&c.default.crashReporter&&c.default.hockeyApp&&(_e=r.createInstance(Z.CrashReporterService)),n.set(Z.ICrashReporterService,_e),n.set(Ae.IDialogService,r.createInstance(Le.DialogService));var Ce=r.createInstance(T.LifecycleService);this.toUnbind.push(Ce.onShutdown(function(e){return t.dispose(e)})),n.set(z.ILifecycleService,Ce),this.lifecycleService=Ce;var Ee=J.getDelayedChannel(o.then(function(e){return e.getChannel("extensions")})),Oe=new ne.ExtensionManagementChannelClient(Ee,te.DefaultURITransformer);n.set(ie.IExtensionManagementServerService,new l.SyncDescriptor(We.ExtensionManagementServerService,Oe)),n.set(ie.IExtensionManagementService,new l.SyncDescriptor(Fe.MulitExtensionManagementService));var Be=r.createInstance(re.ExtensionEnablementService);n.set(ie.IExtensionEnablementService,Be),this.toUnbind.push(Be),n.set(C.IRequestService,new l.SyncDescriptor(E.RequestService)),this.extensionService=r.createInstance(N.ExtensionService),
n.set($.IExtensionService,this.extensionService),i.mark("willLoadExtensions"),this.extensionService.whenInstalledExtensionsRegistered().done(function(){i.mark("didLoadExtensions")}),this.themeService=r.createInstance(ue.WorkbenchThemeService,document.body),n.set(le.IWorkbenchThemeService,this.themeService),n.set(G.ICommandService,new l.SyncDescriptor(j.CommandService)),this.contextViewService=r.createInstance(d.ContextViewService,this.container),n.set(V.IContextViewService,this.contextViewService),n.set(H.IMarkerService,new l.SyncDescriptor(x.MarkerService)),n.set(X.IModeService,new l.SyncDescriptor(Y.WorkbenchModeServiceImpl)),n.set(k.IModelService,new l.SyncDescriptor(D.ModelServiceImpl)),n.set(de.ITextResourceConfigurationService,new l.SyncDescriptor(he.TextResourceConfigurationService)),n.set(P.IEditorWorkerService,new l.SyncDescriptor(M.EditorWorkerServiceImpl)),n.set(Q.IUntitledEditorService,new l.SyncDescriptor(Q.UntitledEditorService)),
n.set(ve.ITextMateService,new l.SyncDescriptor(ge.TextMateService)),n.set(U.ISearchService,new l.SyncDescriptor(I.SearchService)),n.set(U.ISearchHistoryService,new l.SyncDescriptor(Ne.SearchHistoryService)),n.set(Te.IWorkbenchIssueService,new l.SyncDescriptor(xe.WorkbenchIssueService)),n.set(L.ICodeEditorService,new l.SyncDescriptor(A.CodeEditorService)),n.set(Me.IOpenerService,new l.SyncDescriptor(Pe.OpenerService)),n.set(O.IIntegrityService,new l.SyncDescriptor(R.IntegrityServiceImpl));var Ve=J.getDelayedChannel(o.then(function(e){return e.getChannel("localizations")}));return n.set(Ie.ILocalizationsService,new l.SyncDescriptor(we.LocalizationsChannelClient,Ve)),[r,n]},e.prototype.open=function(){var e=this;s.setUnexpectedErrorHandler(function(t){e.onUnexpectedError(t)}),Oe.addClass(this.container,"monaco-shell"),this.content=document.createElement("div"),Oe.addClass(this.content,"monaco-shell-content"),this.container.appendChild(this.content),this.contentsContainer=this.createContents(this.content),
this.layout(),this.registerListeners()},e.prototype.registerListeners=function(){var e=this;this.toUnbind.push(Oe.addDisposableListener(window,Oe.EventType.RESIZE,function(t){t.target===window&&e.layout()}))},e.prototype.onUnexpectedError=function(e){var t=a.toErrorMessage(e,!0);if(t){var n=Date.now();t===this.previousErrorValue&&n-this.previousErrorTime<=1e3||(this.previousErrorTime=n,this.previousErrorValue=t,this.logService.error(t),e&&e.friendlyMessage&&this.notificationService&&this.notificationService.error(e.friendlyMessage))}},e.prototype.layout=function(){var e=Oe.getClientArea(this.container);this.contentsContainer.style.width=e.width+"px",this.contentsContainer.style.height=e.height+"px",this.contextViewService.layout(),this.workbench.layout()},e.prototype.dispose=function(e){void 0===e&&(e=z.ShutdownReason.QUIT),this.toUnbind=o.dispose(this.toUnbind),ae.saveFontInfo(this.storageService),this.workbench&&this.workbench.dispose(e)},e}();t.WorkbenchShell=Be,pe.registerThemingParticipant(function(e,t){
var n=e.getColor(fe.foreground);n&&t.addRule(".monaco-shell { color: "+n+"; }");var i=e.getColor(fe.selectionBackground);i&&t.addRule(".monaco-shell ::selection { background-color: "+i+"; }");var r=e.getColor(fe.inputPlaceholderForeground);r&&(t.addRule(".monaco-shell input::-webkit-input-placeholder { color: "+r+"; }"),t.addRule(".monaco-shell textarea::-webkit-input-placeholder { color: "+r+"; }"));var o=e.getColor(fe.listHighlightForeground);o&&t.addRule("\n\t\t\t.monaco-shell .monaco-tree .monaco-tree-row .monaco-highlighted-label .highlight,\n\t\t\t.monaco-shell .monaco-list .monaco-list-row .monaco-highlighted-label .highlight {\n\t\t\t\tcolor: "+o+";\n\t\t\t}\n\t\t");var s=_e.WORKBENCH_BACKGROUND(e);t.addRule(".monaco-workbench { background-color: "+s+"; }");var a=e.getColor(fe.scrollbarShadow)
;a&&t.addRule("\n\t\t\t.monaco-shell .monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: "+a+" 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-shell .monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: "+a+" 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-shell .monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: "+a+" 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t");var c=e.getColor(fe.scrollbarSliderBackground);c&&t.addRule("\n\t\t\t.monaco-shell .monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: "+c+";\n\t\t\t}\n\t\t");var l=e.getColor(fe.scrollbarSliderHoverBackground);l&&t.addRule("\n\t\t\t.monaco-shell .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: "+l+";\n\t\t\t}\n\t\t");var u=e.getColor(fe.scrollbarSliderActiveBackground);u&&t.addRule("\n\t\t\t.monaco-shell .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: "+u+";\n\t\t\t}\n\t\t");var d=e.getColor(fe.focusBorder)
;d&&t.addRule('\n\t\t.monaco-shell [tabindex="0"]:focus,\n\t\t.monaco-shell .synthetic-focus,\n\t\t.monaco-shell select:focus,\n\t\t.monaco-shell .monaco-tree.focused.no-focused-item:focus:before,\n\t\t.monaco-shell .monaco-list:not(.element-focused):focus:before,\n\t\t.monaco-shell input[type="button"]:focus,\n\t\t.monaco-shell input[type="text"]:focus,\n\t\t.monaco-shell button:focus,\n\t\t.monaco-shell textarea:focus,\n\t\t.monaco-shell input[type="search"]:focus,\n\t\t.monaco-shell input[type="checkbox"]:focus {\n\t\t\toutline-color: '+d+";\n\t\t}\n\t\t"),
e.type===pe.HIGH_CONTRAST&&t.addRule('\n\t\t.monaco-shell.hc-black [tabindex="0"]:focus,\n\t\t.monaco-shell.hc-black .synthetic-focus,\n\t\t.monaco-shell.hc-black select:focus,\n\t\t.monaco-shell.hc-black input[type="button"]:focus,\n\t\t.monaco-shell.hc-black input[type="text"]:focus,\n\t\t.monaco-shell.hc-black textarea:focus,\n\t\t.monaco-shell.hc-black input[type="checkbox"]:focus {\n\t\t\toutline-style: solid;\n\t\t\toutline-width: 1px;\n\t\t}\n\n\t\t.monaco-shell.hc-black .monaco-tree.focused.no-focused-item:focus:before {\n\t\t\toutline-width: 1px;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t.monaco-shell.hc-black .synthetic-focus input {\n\t\t\tbackground: transparent; /* Search input focus fix when in high contrast */\n\t\t}\n\t\t')})}),
define(e[1585],t([1,0,566,192,4,1584,78,8,9,252,11,25,10,14,27,505,112,137,87,889,1591,1461,245,42,1034,514,1124,103,1020,287,1023,220,1048,150,880,144,77,868,295,879,1024,884,450]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H){"use strict";function K(e){return s.setZoomFactor(x.webFrame.getZoomFactor()),s.setZoomLevel(x.webFrame.getZoomLevel(),!0),s.setFullscreen(!!e.fullscreen),C.KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(),s.setAccessibilitySupport(e.accessibilitySupport?2:1),l.setFileNameComparer(new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"})),function(e){var t=new T.Client("window:"+e.windowId),s=function(e,t){var n=new m.ServiceCollection,i=e.getChannel("windows");n.set(E.IWindowsService,new w.WindowsChannelClient(i));var r=e.getChannel("update");n.set(D.IUpdateService,new v.SyncDescriptor(k.UpdateChannelClient,r));var o=e.getChannel("url"),s=new A.URLServiceChannelClient(o),a=new V.RelayURLService(s);n.set(L.IURLService,a)
;var c=new A.URLHandlerChannel(a);e.registerChannel("urlHandler",c);var l=e.getChannel("issue");n.set(W.IIssueService,new v.SyncDescriptor(F.IssueChannelClient,l));var u=e.getChannel("menubar");n.set(H.IMenubarService,new v.SyncDescriptor(z.MenubarChannelClient,u));var d=e.getChannel("workspaces");return n.set(O.IWorkspacesService,new R.WorkspacesChannelClient(d)),n}(t),l=new b.EnvironmentService(e,e.execPath),S=function(e,t,n){var i=M.createSpdLogService("renderer"+t.windowId,t.logLevel,n.logsPath),r=new N.ConsoleLogService(t.logLevel),o=new N.MultiplexLogService([r,i]),s=new B.LogLevelSetterChannelClient(e.getChannel("loglevel"));return new B.FollowerLogService(s,o)}(t,e,l);return S.trace("openWorkbench configuration",JSON.stringify(e)),function(e,t){return function(e){return e.folderPath?y.realpath(e.folderPath).then(function(e){return d.isUNC(e)&&p.endsWith(e,d.nativeSep)&&(e=p.rtrim(e,d.nativeSep)),e},function(t){return e.verbose&&c.onUnexpectedError(t),null}).then(function(t){e.folderPath=t
}):r.TPromise.as(void 0)}(e).then(function(){var n=new g.WorkspaceService(t);return n.initialize(e.workspace||e.folderPath||e).then(function(){return n},function(e){return n})})}(e,l).then(function(r){var c=new _.TimerService(window.MonacoEnvironment.timers,r.getWorkbenchState()===f.WorkbenchState.EMPTY),d=function(e,t){var n,r;switch(e.getWorkbenchState()){case f.WorkbenchState.WORKSPACE:n=h.default.from({path:e.getWorkspace().id,scheme:"root"}).toString();break;case f.WorkbenchState.FOLDER:var o=e.getWorkspace();n=o.folders[0].uri.toString(),r=o.ctime;break;case f.WorkbenchState.EMPTY:n=e.getWorkspace().id}var s;return t.extensionTestsPath?s=I.inMemoryLocalStorageInstance:(i.mark("willAccessLocalStorage"),s=window.localStorage,i.mark("didAccessLocalStorage")),new I.StorageService(s,s,n,r)}(r,l);return a.domContentLoaded().then(function(){i.mark("willStartWorkbench");var a=new o.WorkbenchShell(document.body,{contextService:r,configurationService:r,environmentService:l,logService:S,timerService:c,
storageService:d},s,t,e);a.open(),self.require.config({onError:function(e){"load"===e.errorCode&&a.onUnexpectedError(function(e){return u.isWeb?new Error(n.localize(0,null)):new Error(n.localize(1,null,JSON.stringify(e)))}(e))}})})})}(e)}Object.defineProperty(t,"__esModule",{value:!0}),S.gracefulify(P),t.startup=K}),define(e[307],t([1,0,76,6,34,36,28,38,80,207,4,11,5,148,199,48,349,7]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S){"use strict";function _(e,t){try{return JSON.parse(e)||t}catch(e){return t}}Object.defineProperty(t,"__esModule",{value:!0});var C;!function(e){e[e.Evaluating=0]="Evaluating",e[e.NoRun=1]="NoRun",e[e.Run=2]="Run",e[e.Complete=3]="Complete"}(C=t.ExperimentState||(t.ExperimentState={}));var E;!function(e){e[e.Custom=0]="Custom",e[e.Prompt=1]="Prompt",e[e.AddToRecommendations=2]="AddToRecommendations"}(E=t.ExperimentActionType||(t.ExperimentActionType={})),t.IExperimentService=r.createDecorator("experimentService");var w=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this)||this
;return c.storageService=t,c.extensionManagementService=n,c.textFileService=i,c.environmentService=r,c.telemetryService=o,c.lifecycleService=s,c.requestService=a,c._experiments=[],c._curatedMapping=Object.create(null),c._disposables=[],c._onExperimentEnabled=new S.Emitter,c.onExperimentEnabled=c._onExperimentEnabled.event,c._loadExperimentsPromise=p.TPromise.wrap(c.lifecycleService.when(u.LifecyclePhase.Eventually)).then(function(){return c.loadExperiments()}),c}return n(t,e),t.prototype.getExperimentById=function(e){var t=this;return this._loadExperimentsPromise.then(function(){return t._experiments.filter(function(t){return t.id===e})[0]})},t.prototype.getExperimentsToRunByType=function(e){var t=this;return this._loadExperimentsPromise.then(function(){return e===E.Custom?t._experiments.filter(function(t){return t.enabled&&t.state===C.Run&&(!t.action||t.action.type===e)}):t._experiments.filter(function(t){return t.enabled&&t.state===C.Run&&t.action&&t.action.type===e})})},
t.prototype.getCuratedExtensionsList=function(e){var t=this;return this._loadExperimentsPromise.then(function(){for(var n=0;n<t._experiments.length;n++)if(t._experiments[n].enabled&&t._experiments[n].state===C.Run&&t._curatedMapping[t._experiments[n].id]&&t._curatedMapping[t._experiments[n].id].curatedExtensionsKey===e)return t._curatedMapping[t._experiments[n].id].curatedExtensionsList;return[]})},t.prototype.markAsCompleted=function(e){var t="experiments."+e,n=_(this.storageService.get(t,o.StorageScope.GLOBAL),{});n.state=C.Complete,this.storageService.store(t,JSON.stringify(n),o.StorageScope.GLOBAL)},t.prototype.getExperiments=function(){return i.default.experimentsUrl?this.requestService.request({type:"GET",url:i.default.experimentsUrl}).then(function(e){return 200!==e.res.statusCode?p.TPromise.as(null):m.asJson(e).then(function(e){return Array.isArray(e.experiments)?e.experiments:[]})},function(){return p.TPromise.as(null)}):p.TPromise.as([])},t.prototype.loadExperiments=function(){var e=this
;return this.getExperiments().then(function(t){if(!t){var n=_(e.storageService.get("allExperiments",o.StorageScope.GLOBAL),[]);return Array.isArray(n)&&n.forEach(function(t){var n="experiments."+t,i=_(e.storageService.get(n,o.StorageScope.GLOBAL),null);i&&e._experiments.push({id:t,enabled:i.enabled,state:i.state})}),p.TPromise.as(null)}var i=_(e.storageService.get("allExperiments",o.StorageScope.GLOBAL),[]),r=t.filter(function(e){return!!e.enabled}).map(function(e){return e.id.toLowerCase()});Array.isArray(i)&&i.forEach(function(t){-1===r.indexOf(t)&&e.storageService.remove("experiments."+t)}),e.storageService.store("allExperiments",JSON.stringify(r),o.StorageScope.GLOBAL);var s=t.map(function(t){var n={id:t.id,enabled:!!t.enabled,state:t.enabled?C.Evaluating:C.NoRun};if(t.action&&(n.action={type:E[t.action.type]||E.Custom,properties:t.action.properties},n.action.type===E.Prompt&&(n.action.properties.commands||[]).forEach(function(n){
n.curatedExtensionsKey&&Array.isArray(n.curatedExtensionsList)&&(e._curatedMapping[t.id]=n)})),e._experiments.push(n),!n.enabled)return p.TPromise.as(null);var i="experiments."+t.id,r=_(e.storageService.get(i,o.StorageScope.GLOBAL),{});return r.hasOwnProperty("enabled")||(r.enabled=n.enabled),r.hasOwnProperty("state")?n.state=r.state:r.state=n.enabled?C.Evaluating:C.NoRun,e.shouldRunExperiment(t,n).then(function(t){return r.state=n.state=t,e.storageService.store(i,JSON.stringify(r)),t===C.Run&&e._onExperimentEnabled.fire(n),p.TPromise.as(null)})});return p.TPromise.join(s).then(function(){e.telemetryService.publicLog("experiments",e._experiments)})})},t.prototype.shouldRunExperiment=function(e,t){var n=this;if(t.state!==C.Evaluating)return p.TPromise.wrap(t.state);if(!e.enabled)return p.TPromise.wrap(C.NoRun);if(!e.condition)return p.TPromise.wrap(C.Run);if("stable"===this.environmentService.appQuality&&!0===e.condition.insidersOnly)return p.TPromise.wrap(C.NoRun)
;if("string"==typeof e.condition.displayLanguage){var i=e.condition.displayLanguage.toLowerCase(),r=f.language.toLowerCase();if(i!==r){var s=r.indexOf("-"),a=i.indexOf("-");if(s>-1&&(r=r.substr(0,s)),a>-1&&(i=i.substr(0,a)),r!==i)return p.TPromise.wrap(C.NoRun)}}e.condition.userProbability||(e.condition.userProbability=1);var c=p.TPromise.as(!0);e.condition.installedExtensions&&(c=this.extensionManagementService.getInstalled(d.LocalExtensionType.User).then(function(t){var n=!0,i=!0,r=t.map(function(e){return e.manifest.publisher.toLowerCase()+"."+e.manifest.name.toLowerCase()});if(Array.isArray(e.condition.installedExtensions.includes)&&e.condition.installedExtensions.includes.length){var o=e.condition.installedExtensions.includes.map(function(e){return e.toLowerCase()});n=r.some(function(e){return o.indexOf(e)>-1})}if(Array.isArray(e.condition.installedExtensions.excludes)&&e.condition.installedExtensions.excludes.length){var s=e.condition.installedExtensions.excludes.map(function(e){return e.toLowerCase()})
;i=!r.some(function(e){return s.indexOf(e)>-1})}return n&&i}));var l="experiments."+e.id,u=_(this.storageService.get(l,o.StorageScope.GLOBAL),{});return c.then(function(i){if(!i||!e.condition.fileEdits||"number"!=typeof e.condition.fileEdits.minEditCount){return i&&Math.random()<e.condition.userProbability?C.Run:C.NoRun}if(u.editCount=u.editCount||0,u.editCount>=e.condition.fileEdits.minEditCount)return C.Run;var r=n.textFileService.models.onModelsSaved(function(i){var s=(new Date).toDateString(),a=_(n.storageService.get(l,o.StorageScope.GLOBAL),{});a.state===C.Evaluating?(i.forEach(function(t){if(!(t.kind!==y.StateChange.SAVED||a.state!==C.Evaluating||s===a.lastEditedDate||a.editCount>=e.condition.fileEdits.minEditCount)){var i=!0,r=!0;"string"==typeof e.condition.fileEdits.filePathPattern&&(i=v.match(e.condition.fileEdits.filePathPattern,t.resource.fsPath)),
Array.isArray(e.condition.fileEdits.workspaceIncludes)&&e.condition.fileEdits.workspaceIncludes.length&&(r=e.condition.fileEdits.workspaceIncludes.some(function(e){return!!b.WorkspaceStats.tags[e]})),r&&Array.isArray(e.condition.fileEdits.workspaceExcludes)&&e.condition.fileEdits.workspaceExcludes.length&&(r=!e.condition.fileEdits.workspaceExcludes.some(function(e){return!!b.WorkspaceStats.tags[e]})),i&&r&&(a.editCount=(a.editCount||0)+1,a.lastEditedDate=s,n.storageService.store(l,JSON.stringify(a),o.StorageScope.GLOBAL))}}),a.editCount>=e.condition.fileEdits.minEditCount&&(t.state=a.state=Math.random()<e.condition.userProbability?C.Run:C.NoRun,n.storageService.store(l,JSON.stringify(a),o.StorageScope.GLOBAL),a.state===C.Run&&E[e.action.type]===E.Prompt&&n._onExperimentEnabled.fire(t))):r.dispose()});return n._disposables.push(r),C.Evaluating})},t.prototype.dispose=function(){this._disposables=g.dispose(this._disposables)},
t=a([l(0,o.IStorageService),l(1,d.IExtensionManagementService),l(2,y.ITextFileService),l(3,s.IEnvironmentService),l(4,c.ITelemetryService),l(5,u.ILifecycleService),l(6,h.IRequestService)],t)}(g.Disposable);t.ExperimentService=w}),define(e[1588],t([1,0,65,22,307,28,5]),function(e,t,i,r,o,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n,i,r){var s=e.call(this)||this;return s.experimentService=t,s.viewletService=n,s.notificationService=i,s.telemetryService=r,s._disposables=[],s.experimentService.onExperimentEnabled(function(e){e.action&&e.action.type===o.ExperimentActionType.Prompt&&e.state===o.ExperimentState.Run&&s.showExperimentalPrompts(e)},s,s._disposables),s}return n(t,e),t.prototype.showExperimentalPrompts=function(e){var t=this;if(e&&e.enabled&&e.action&&e.state===o.ExperimentState.Run){var n=function(n){t.telemetryService.publicLog("experimentalPrompts",{experimentId:e.id,commandText:n,cancelled:!n})},i=e.action.properties;if(i&&i.promptText){
i.commands||(i.commands=[]);var s=i.commands.map(function(i){return{label:i.text,run:function(){n(i.text),i.externalLink?window.open(i.externalLink):i.curatedExtensionsKey&&Array.isArray(i.curatedExtensionsList)?t.viewletService.openViewlet("workbench.view.extensions",!0).then(function(e){return e}).then(function(e){e&&e.search("curated:"+i.curatedExtensionsKey)}):t.experimentService.markAsCompleted(e.id)}}});this.notificationService.prompt(r.Severity.Info,i.promptText,s,n)}}},t.prototype.dispose=function(){this._disposables=c.dispose(this._disposables)},t=a([l(0,o.IExperimentService),l(1,i.IViewletService),l(2,r.INotificationService),l(3,s.ITelemetryService)],t)}(c.Disposable);t.ExperimentalPrompts=u}),define(e[1589],t([1,0,107,307,16,75,38,1588]),function(e,t,n,i,r,o,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.registerSingleton(i.IExperimentService,i.ExperimentService),
r.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(a.ExperimentalPrompts,s.LifecyclePhase.Eventually)}),define(e[1590],t([1,0,629,25,4,113,5,148,89,80,47,34,76,6,193,83,27,33,104,17,28,87,93,20,36,151,49,349,207,199,30,65,22,7,24,10,123,307]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V){"use strict";function z(e,t){if(e)for(var n in e)if(Object.hasOwnProperty.call(e,n)&&n.toLowerCase()===t.toLowerCase())return e[n]}Object.defineProperty(t,"__esModule",{value:!0});var H=i.localize(0,null),K=i.localize(1,null),U=[],G=function(e){function t(t,n,i,r,o,s,a,c,l,u,d,p,v,m,y,b,S){var C=e.call(this)||this;if(C._galleryService=t,C._modelService=n,C.storageService=i,C.extensionsService=r,C.instantiationService=o,C.fileService=s,C.contextService=a,C.configurationService=c,C.telemetryService=l,C.environmentService=u,C.extensionService=d,C.requestService=p,C.viewletService=v,C.notificationService=m,C.extensionManagementService=y,
C.extensionManagementServiceService=b,C.experimentService=S,C._fileBasedRecommendations=Object.create(null),C._exeBasedRecommendations=Object.create(null),C._availableRecommendations=Object.create(null),C._allWorkspaceRecommendedExtensions=[],C._dynamicWorkspaceRecommendations=[],C._experimentalRecommendations=Object.create(null),C._allIgnoredRecommendations=[],C._globallyIgnoredRecommendations=[],C._workspaceIgnoredRecommendations=[],C._disposables=[],C.proactiveRecommendationsFetched=!1,C._onRecommendationChange=new N.Emitter,C.onRecommendationChange=C._onRecommendationChange.event,!C.isEnabled())return C;g.default.extensionsGallery&&g.default.extensionsGallery.recommendationsUrl&&(C._extensionsRecommendationsUrl=g.default.extensionsGallery.recommendationsUrl);var E=JSON.parse(C.storageService.get("extensionsAssistant/ignored_recommendations",f.StorageScope.GLOBAL,"[]"));return C._globallyIgnoredRecommendations=E.map(function(e){return e.toLowerCase()}),
C.loadRecommendationsPromise=C.getWorkspaceRecommendations().then(function(){return C.fetchCachedDynamicWorkspaceRecommendations(),C.fetchFileBasedRecommendations(),C.fetchExperimentalRecommendations(),C.promptWorkspaceRecommendations()}).then(function(){C._modelService.onModelAdded(C.promptFiletypeBasedRecommendations,C,C._disposables),C._modelService.getModels().forEach(function(e){return C.promptFiletypeBasedRecommendations(e)})}),C.configurationService.getValue(_.ShowRecommendationsOnlyOnDemandKey)||C.fetchProactiveRecommendations(!0),C._register(C.contextService.onDidChangeWorkspaceFolders(function(e){return C.onWorkspaceFoldersChanged(e)})),C._register(C.configurationService.onDidChangeConfiguration(function(e){C.proactiveRecommendationsFetched||C.configurationService.getValue(_.ShowRecommendationsOnlyOnDemandKey)||C.fetchProactiveRecommendations()})),C._register(C.extensionManagementService.onDidInstallExtension(function(e){if(e.gallery&&e.operation===h.InstallOperation.Install){
var t=(C.getAllRecommendationsWithReason()||{})[e.gallery.identifier.id.toLowerCase()];t&&C.telemetryService.publicLog("extensionGallery:install:recommendations",F.assign(e.gallery.telemetryData,{recommendationReason:t.reasonId}))}})),C}return n(t,e),t.prototype.fetchProactiveRecommendations=function(e){var t=this,n=o.TPromise.as(null);return this.proactiveRecommendationsFetched||(this.proactiveRecommendationsFetched=!0,n=new o.TPromise(function(n,i){setTimeout(function(){o.TPromise.join([t.fetchExecutableRecommendations(),t.fetchDynamicWorkspaceRecommendations()]).then(function(){return n(null)})},e?1e4:0)})),n},t.prototype.isEnabled=function(){return this._galleryService.isEnabled()&&!this.environmentService.extensionDevelopmentPath},t.prototype.getAllRecommendationsWithReason=function(){var e=Object.create(null);if(!this.proactiveRecommendationsFetched)return e;if(s.forEach(this._experimentalRecommendations,function(t){return e[t.key.toLowerCase()]={reasonId:h.ExtensionRecommendationReason.Experimental,
reasonText:t.value}}),this.contextService.getWorkspace().folders&&1===this.contextService.getWorkspace().folders.length){var t=this.contextService.getWorkspace().folders[0].name;this._dynamicWorkspaceRecommendations.forEach(function(n){return e[n.toLowerCase()]={reasonId:h.ExtensionRecommendationReason.DynamicWorkspace,reasonText:i.localize(2,null,t)}})}s.forEach(this._exeBasedRecommendations,function(t){return e[t.key.toLowerCase()]={reasonId:h.ExtensionRecommendationReason.Executable,reasonText:i.localize(3,null,t.value)}}),s.forEach(this._fileBasedRecommendations,function(t){return e[t.key.toLowerCase()]={reasonId:h.ExtensionRecommendationReason.File,reasonText:i.localize(4,null)}}),this._allWorkspaceRecommendedExtensions.forEach(function(t){var n=t.extensionId;return e[n.toLowerCase()]={reasonId:h.ExtensionRecommendationReason.Workspace,reasonText:i.localize(5,null)}});for(var n=0,r=this._allIgnoredRecommendations;n<r.length;n++){var o=r[n];delete e[o]}return e},
t.prototype.getAllIgnoredRecommendations=function(){return{global:this._globallyIgnoredRecommendations,workspace:this._workspaceIgnoredRecommendations}},t.prototype.getWorkspaceRecommendations=function(){var e=this;return this.isEnabled()?this.fetchWorkspaceRecommendations().then(function(){return e._allWorkspaceRecommendedExtensions.filter(function(t){return e.isExtensionAllowedToBeRecommended(t.extensionId)})}):o.TPromise.as([])},t.prototype.fetchWorkspaceRecommendations=function(){var e=this;return this.isEnabled?this.fetchExtensionRecommendationContents().then(function(t){return e.validateExtensions(t.map(function(e){return e.contents})).then(function(n){var i=n.invalidExtensions,r=n.message;i.length>0&&e.notificationService&&e.notificationService.warn("The below "+i.length+" extension(s) in workspace recommendations have issues:\n"+r);var o={};e._allWorkspaceRecommendedExtensions=[],e._workspaceIgnoredRecommendations=[];for(var s=0,a=t;s<a.length;s++){var c=a[s]
;if(c.contents.unwantedRecommendations)for(var l=0,u=c.contents.unwantedRecommendations;l<u.length;l++){var d=(g=u[l]).toLowerCase();o[d]||-1!==i.indexOf(d)||(e._workspaceIgnoredRecommendations.push(d),o[d]=!0)}if(c.contents.recommendations)for(var h=function(t){var n=t.toLowerCase();if(-1===i.indexOf(n)){var r=e._allWorkspaceRecommendedExtensions.filter(function(e){return e.extensionId===n})[0];r||(r={extensionId:n,sources:[]},e._allWorkspaceRecommendedExtensions.push(r)),-1===r.sources.indexOf(c.source)&&r.sources.push(c.source)}},p=0,f=c.contents.recommendations;p<f.length;p++){var g=f[p];h(g)}}e._allIgnoredRecommendations=T.distinct(e._globallyIgnoredRecommendations.concat(e._workspaceIgnoredRecommendations))})}):o.TPromise.as(null)},t.prototype.fetchExtensionRecommendationContents=function(){var e=this,t=this.contextService.getWorkspace();return o.TPromise.join([this.resolveWorkspaceExtensionConfig(t).then(function(e){return e?{contents:e,source:t}:null})].concat(t.folders.map(function(t){
return e.resolveWorkspaceFolderExtensionConfig(t).then(function(e){return e?{contents:e,source:t}:null})}))).then(function(e){return T.coalesce(e)})},t.prototype.resolveWorkspaceExtensionConfig=function(e){return e.configuration?this.fileService.resolveContent(e.configuration).then(function(e){return d.parse(e.value).extensions},function(e){return null}):o.TPromise.as(null)},t.prototype.resolveWorkspaceFolderExtensionConfig=function(e){var t=this,n=e.toResource(r.join(".vscode","extensions.json"));return this.fileService.resolveFile(n).then(function(){return t.fileService.resolveContent(n)}).then(function(e){return d.parse(e.value)},function(e){return null})},t.prototype.validateExtensions=function(e){var t={recommendations:T.distinct(T.flatten(e.map(function(e){return e.recommendations||[]}))),unwantedRecommendations:T.distinct(T.flatten(e.map(function(e){return e.unwantedRecommendations||[]})))},n=new RegExp(h.EXTENSION_IDENTIFIER_PATTERN),i=[],r="",s=function(e){return e.filter(function(t,o){
return!(e.indexOf(t)!==o||!n.test(t)&&(i.push(t.toLowerCase()),r+=t+" (bad format) Expected: <provider>.<name>\n",1))})}(t.recommendations||[]).map(function(e){return e.toLowerCase()});return s.length?this._galleryService.query({names:s}).then(function(e){var t=e.firstPage.map(function(e){return e.identifier.id.toLowerCase()});return t.length!==s.length&&s.forEach(function(e){-1===t.indexOf(e.toLowerCase())&&(i.push(e.toLowerCase()),r+=e+" (not found in marketplace)\n")}),o.TPromise.as({invalidExtensions:i,message:r})}):o.TPromise.as({invalidExtensions:i,message:r})},t.prototype.isExtensionAllowedToBeRecommended=function(e){return-1===this._allIgnoredRecommendations.indexOf(e.toLowerCase())},t.prototype.onWorkspaceFoldersChanged=function(e){var t=this;if(e.added.length){var n=this._allWorkspaceRecommendedExtensions;this.getWorkspaceRecommendations().then(function(e){e.some(function(e){return n.every(function(t){return e.extensionId!==t.extensionId})})&&t.promptWorkspaceRecommendations()})}
this._dynamicWorkspaceRecommendations=[]},t.prototype.getFileBasedRecommendations=function(){var e=this;return Object.keys(this._fileBasedRecommendations).sort(function(t,n){if(e._fileBasedRecommendations[t].recommendedTime===e._fileBasedRecommendations[n].recommendedTime){if(!g.default.extensionImportantTips||z(g.default.extensionImportantTips,t))return-1;if(z(g.default.extensionImportantTips,n))return 1}return e._fileBasedRecommendations[t].recommendedTime>e._fileBasedRecommendations[n].recommendedTime?-1:1}).filter(function(t){return e.isExtensionAllowedToBeRecommended(t)}).map(function(t){return{extensionId:t,sources:e._fileBasedRecommendations[t].sources}})},t.prototype.getOtherRecommendations=function(){var e=this;return this.fetchProactiveRecommendations().then(function(){var t=T.distinct(Object.keys(e._exeBasedRecommendations).concat(e._dynamicWorkspaceRecommendations,Object.keys(e._experimentalRecommendations))).filter(function(t){return e.isExtensionAllowedToBeRecommended(t)});return T.shuffle(t),
t.map(function(t){var n=[];return e._exeBasedRecommendations[t]&&n.push("executable"),e._dynamicWorkspaceRecommendations[t]&&n.push("dynamic"),{extensionId:t,sources:n}})})},t.prototype.getKeymapRecommendations=function(){var e=this;return(g.default.keymapExtensionTips||[]).filter(function(t){return e.isExtensionAllowedToBeRecommended(t)}).map(function(e){return{extensionId:e,sources:["application"]}})},t.prototype.getAllRecommendations=function(){var e=this;return this.proactiveRecommendationsFetched?o.TPromise.join([this.getWorkspaceRecommendations(),o.TPromise.as(this.getFileBasedRecommendations()),this.getOtherRecommendations(),o.TPromise.as(this.getKeymapRecommendations())]).then(function(t){return T.flatten(t).filter(function(t){return e.isExtensionAllowedToBeRecommended(t.extensionId)})}):o.TPromise.as([])},t.prototype.fetchFileBasedRecommendations=function(){var e=this,t=g.default.extensionTips;if(t){this._availableRecommendations=Object.create(null),s.forEach(t,function(t){
var n=t.key,i=t.value,r=e._availableRecommendations[i];r?r.push(n.toLowerCase()):e._availableRecommendations[i]=[n.toLowerCase()]}),s.forEach(g.default.extensionImportantTips,function(t){var n=t.key,i=t.value.pattern,r=e._availableRecommendations[i];r?r.push(n.toLowerCase()):e._availableRecommendations[i]=[n.toLowerCase()]});var n=T.flatten(Object.keys(this._availableRecommendations).map(function(t){return e._availableRecommendations[t]})),i=JSON.parse(this.storageService.get("extensionsAssistant/recommendations",f.StorageScope.GLOBAL,"[]"));if(Array.isArray(i))for(var r=0,o=i;r<o.length;r++){var a=o[r];n.indexOf(a)>-1&&(this._fileBasedRecommendations[a.toLowerCase()]={recommendedTime:Date.now(),sources:["cached"]})}else{var c=Date.now();s.forEach(i,function(t){if("number"==typeof t.value){(c-t.value)/864e5<=7&&n.indexOf(t.key)>-1&&(e._fileBasedRecommendations[t.key.toLowerCase()]={recommendedTime:t.value,sources:["cached"]})}})}}},t.prototype.getMimeTypes=function(e){
return this.extensionService.whenInstalledExtensionsRegistered().then(function(){return k.guessMimeTypes(e)})},t.prototype.promptFiletypeBasedRecommendations=function(e){var t=this,n=!1,a=e.uri;if(a){var c=r.extname(a.path);if(c){if(U.indexOf(c)>-1)return;U.push(c)}setImmediate(function(){var r=[],l=Date.now();s.forEach(t._availableRecommendations,function(e){var n=e.key,i=e.value;if(u.match(n,a.path))for(var o=0,s=i;o<s.length;o++){var c=s[o];z(g.default.extensionImportantTips,c)&&r.push(c);var d=t._fileBasedRecommendations[c.toLowerCase()]||{recommendedTime:l,sources:[]};d.sources.some(function(e){return e instanceof W.default&&e.toString()===a.toString()})||d.sources.push(a),t._fileBasedRecommendations[c.toLowerCase()]=d}}),t.storageService.store("extensionsAssistant/recommendations",JSON.stringify(Object.keys(t._fileBasedRecommendations).reduce(function(e,n){return e[n]=t._fileBasedRecommendations[n].recommendedTime,e},{})),f.StorageScope.GLOBAL);var d=t.configurationService.getValue(_.ConfigurationKey)
;if(!d.ignoreRecommendations&&!d.showRecommendationsOnlyOnDemand){var p=JSON.parse(t.storageService.get("extensionsAssistant/importantRecommendationsIgnore",f.StorageScope.GLOBAL,"[]"));r=r.filter(function(e){return-1===p.indexOf(e)&&t.isExtensionAllowedToBeRecommended(e)});var v=t.extensionManagementServiceService.getExtensionManagementServer(e.uri),b=0===r.length?o.TPromise.as(null):v.extensionManagementService.getInstalled(h.LocalExtensionType.User).then(function(e){var o=e.map(function(e){return e.manifest.publisher.toLowerCase()+"."+e.manifest.name.toLowerCase()});if((r=r.filter(function(e){return o.every(function(t){return t!==e.toLowerCase()})})).length){var s=r[0],a=z(g.default.extensionImportantTips,s).name;n=!0;var c=i.localize(6,null,a);"vscjava.vscode-java-pack"===s&&(c=i.localize(7,null,a)),t.notificationService.prompt(y.default.Info,c,[{label:i.localize(8,null),run:function(){t.telemetryService.publicLog("extensionRecommendations:popup",{userReaction:"install",extensionId:a})
;var e=t.instantiationService.createInstance(m.InstallRecommendedExtensionAction,s,v);e.run().then(function(){return e.dispose()})}},{label:i.localize(9,null),run:function(){t.telemetryService.publicLog("extensionRecommendations:popup",{userReaction:"show",extensionId:a});var e=t.instantiationService.createInstance(m.ShowRecommendedExtensionsAction,m.ShowRecommendedExtensionsAction.ID,i.localize(10,null));e.run(),e.dispose()}},{label:H,isSecondary:!0,run:function(){p.push(s),t.storageService.store("extensionsAssistant/importantRecommendationsIgnore",JSON.stringify(p),f.StorageScope.GLOBAL),t.telemetryService.publicLog("extensionRecommendations:popup",{userReaction:"neverShowAgain",extensionId:a}),t.promptIgnoreExtensionRecommendations()}}],function(){t.telemetryService.publicLog("extensionRecommendations:popup",{userReaction:"cancelled",extensionId:a})})}}),S=t.getMimeTypes(a.fsPath);o.TPromise.join([b,S]).then(function(e){
var r=JSON.parse(t.storageService.get("extensionsAssistant/fileExtensionsSuggestionIgnore",f.StorageScope.GLOBAL,"[]")),o=e[1];if(c&&(c=c.substr(1)),!(n||!c||1!==o.length||o[0]!==k.MIME_UNKNOWN||r.indexOf(c)>-1)){var s=t.getKeywordsForExtension(c);t._galleryService.query({text:'tag:"__ext_'+c+'" '+s.map(function(e){return'tag:"'+e+'"'})}).then(function(e){e&&e.firstPage&&e.firstPage.length&&t.notificationService.prompt(y.default.Info,i.localize(11,null,c),[{label:K,run:function(){t.telemetryService.publicLog("fileExtensionSuggestion:popup",{userReaction:"ok",fileExtension:c}),t.viewletService.openViewlet("workbench.view.extensions",!0).then(function(e){return e}).then(function(e){e.search("ext:"+c),e.focus()})}},{label:H,isSecondary:!0,run:function(){r.push(c),t.storageService.store("extensionsAssistant/fileExtensionsSuggestionIgnore",JSON.stringify(r),f.StorageScope.GLOBAL),t.telemetryService.publicLog("fileExtensionSuggestion:popup",{userReaction:"neverShowAgain",fileExtension:c})}}],function(){
t.telemetryService.publicLog("fileExtensionSuggestion:popup",{userReaction:"cancelled",fileExtension:c})})})}})}})}},t.prototype.promptWorkspaceRecommendations=function(){var e=this,t="extensionsAssistant/workspaceRecommendationsIgnore",n=this.configurationService.getValue(_.ConfigurationKey),r=this._allWorkspaceRecommendedExtensions.filter(function(t){return e.isExtensionAllowedToBeRecommended(t.extensionId)});if(!(0===r.length||n.ignoreRecommendations||n.showRecommendationsOnlyOnDemand||this.storageService.getBoolean(t,f.StorageScope.WORKSPACE,!1)))return this.extensionsService.getInstalled(h.LocalExtensionType.User).done(function(n){var s=r.filter(function(e){var t=e.extensionId;return n.every(function(e){return!B.areSameExtensions({id:t},{id:B.getGalleryExtensionIdFromLocal(e)})})});return s.length?new o.TPromise(function(n){e.notificationService.prompt(y.default.Info,i.localize(12,null),[{label:i.localize(13,null),run:function(){e.telemetryService.publicLog("extensionWorkspaceRecommendations:popup",{
userReaction:"install"});var t=e.instantiationService.createInstance(m.InstallWorkspaceRecommendedExtensionsAction,m.InstallWorkspaceRecommendedExtensionsAction.ID,i.localize(14,null),s);t.run(),t.dispose(),n(void 0)}},{label:i.localize(15,null),run:function(){e.telemetryService.publicLog("extensionWorkspaceRecommendations:popup",{userReaction:"show"});var t=e.instantiationService.createInstance(m.ShowRecommendedExtensionsAction,m.ShowRecommendedExtensionsAction.ID,i.localize(16,null));t.run(),t.dispose(),n(void 0)}},{label:H,isSecondary:!0,run:function(){e.telemetryService.publicLog("extensionWorkspaceRecommendations:popup",{userReaction:"neverShowAgain"}),e.storageService.store(t,!0,f.StorageScope.WORKSPACE),n(void 0)}}],function(){e.telemetryService.publicLog("extensionWorkspaceRecommendations:popup",{userReaction:"cancelled"}),n(void 0)})}):o.TPromise.as(void 0)})},t.prototype.promptIgnoreExtensionRecommendations=function(){var e=this;this.notificationService.prompt(y.default.Info,i.localize(17,null),[{
label:i.localize(18,null),run:function(){return e.setIgnoreRecommendationsConfig(!0)}},{label:i.localize(19,null),run:function(){return e.setIgnoreRecommendationsConfig(!1)}}])},t.prototype.fetchExecutableRecommendations=function(){var e=this,t=I.homedir(),n=new Set,i=function(t,i){return w.fileExists(i).then(function(i){i&&!n.has(t)&&(n.add(t),(g.default.exeBasedExtensionTips[t].recommendations||[]).forEach(function(n){g.default.exeBasedExtensionTips[t].friendlyName&&(e._exeBasedRecommendations[n.toLowerCase()]=g.default.exeBasedExtensionTips[t].friendlyName)}))})},a=[];return s.forEach(g.default.exeBasedExtensionTips,function(e){if("object"==typeof e.value&&Array.isArray(e.value.recommendations)){var n=e.key;if("win32"===process.platform){var o=e.value.windowsPath;if(!o||"string"!=typeof o)return;o=o.replace("%USERPROFILE%",process.env.USERPROFILE).replace("%ProgramFiles(x86)%",process.env["ProgramFiles(x86)"]).replace("%ProgramFiles%",process.env.ProgramFiles).replace("%APPDATA%",process.env.APPDATA),
a.push(i(n,o))}else a.push(i(n,r.join("/usr/local/bin",n))),a.push(i(n,r.join(t,n)))}}),o.TPromise.join(a)},t.prototype.setIgnoreRecommendationsConfig=function(e){if(this.configurationService.updateValue("extensions.ignoreRecommendations",e,C.ConfigurationTarget.USER),e){this.storageService.store("extensionsAssistant/workspaceRecommendationsIgnore",!0,f.StorageScope.WORKSPACE)}},t.prototype.fetchCachedDynamicWorkspaceRecommendations=function(){if(this.contextService.getWorkbenchState()===b.WorkbenchState.FOLDER){var e="extensionsAssistant/dynamicWorkspaceRecommendations",t={};try{t=JSON.parse(this.storageService.get(e,f.StorageScope.WORKSPACE,"{}"))}catch(t){this.storageService.remove(e,f.StorageScope.WORKSPACE)}Array.isArray(t.recommendations)&&O.isNumber(t.timestamp)&&t.timestamp>0&&(Date.now()-t.timestamp)/864e5<14&&(this._dynamicWorkspaceRecommendations=t.recommendations,this.telemetryService.publicLog("dynamicWorkspaceRecommendations",{count:this._dynamicWorkspaceRecommendations.length,cache:1}))}},
t.prototype.fetchDynamicWorkspaceRecommendations=function(){var e=this;if(this.contextService.getWorkbenchState()!==b.WorkbenchState.FOLDER||this._dynamicWorkspaceRecommendations.length||!this._extensionsRecommendationsUrl)return o.TPromise.as(null);var t=this.contextService.getWorkspace().folders[0].uri;return o.TPromise.join([A.getHashedRemotesFromUri(t,this.fileService,!1),A.getHashedRemotesFromUri(t,this.fileService,!0)]).then(function(t){var n=t[0],i=t[1],r=(n||[]).concat(i||[]);return r.length?e.requestService.request({type:"GET",url:e._extensionsRecommendationsUrl}).then(function(t){return 200!==t.res.statusCode?o.TPromise.as(null):R.asJson(t).then(function(t){var n=Array.isArray(t.workspaceRecommendations)?t.workspaceRecommendations:[];if(n.length)for(var i=!1,o=0;o<r.length&&!i;o++)for(var s=0;s<n.length&&!i;s++)Array.isArray(n[s].remoteSet)&&n[s].remoteSet.indexOf(r[o])>-1&&(i=!0,e._dynamicWorkspaceRecommendations=n[s].recommendations.filter(function(t){return e.isExtensionAllowedToBeRecommended(t)
})||[],e.storageService.store("extensionsAssistant/dynamicWorkspaceRecommendations",JSON.stringify({recommendations:e._dynamicWorkspaceRecommendations,timestamp:Date.now()}),f.StorageScope.WORKSPACE),e.telemetryService.publicLog("dynamicWorkspaceRecommendations",{count:e._dynamicWorkspaceRecommendations.length,cache:0}))})}):null})},t.prototype.fetchExperimentalRecommendations=function(){var e=this;this.experimentService.getExperimentsToRunByType(V.ExperimentActionType.AddToRecommendations).then(function(t){(t||[]).forEach(function(t){t.action.properties&&Array.isArray(t.action.properties.recommendations)&&t.action.properties.recommendationReason&&t.action.properties.recommendations.forEach(function(n){e._experimentalRecommendations[n]=t.action.properties.recommendationReason})})})},t.prototype.getKeywordsForExtension=function(e){return(g.default.extensionKeywords||{})[e]||[]},t.prototype.toggleIgnoredRecommendation=function(e,t){var n=e.toLowerCase();if(t){var i=this.getAllRecommendationsWithReason()[n]
;i&&i.reasonId&&this.telemetryService.publicLog("extensionsRecommendations:ignoreRecommendation",{id:e,recommendationReason:i.reasonId})}this._globallyIgnoredRecommendations=t?T.distinct(this._globallyIgnoredRecommendations.concat([n]).map(function(e){return e.toLowerCase()})):this._globallyIgnoredRecommendations.filter(function(e){return e!==n}),this.storageService.store("extensionsAssistant/ignored_recommendations",JSON.stringify(this._globallyIgnoredRecommendations),f.StorageScope.GLOBAL),this._allIgnoredRecommendations=T.distinct(this._globallyIgnoredRecommendations.concat(this._workspaceIgnoredRecommendations)),this._onRecommendationChange.fire({extensionId:e,isRecommended:!t})},t.prototype.dispose=function(){this._disposables=c.dispose(this._disposables)},
t=a([l(0,h.IExtensionGalleryService),l(1,p.IModelService),l(2,f.IStorageService),l(3,h.IExtensionManagementService),l(4,v.IInstantiationService),l(5,S.IFileService),l(6,b.IWorkspaceContextService),l(7,C.IConfigurationService),l(8,E.ITelemetryService),l(9,x.IEnvironmentService),l(10,D.IExtensionService),l(11,L.IRequestService),l(12,M.IViewletService),l(13,P.INotificationService),l(14,h.IExtensionManagementService),l(15,h.IExtensionManagementServerService),l(16,V.IExperimentService)],t)}(c.Disposable);t.ExtensionTipsService=G}),define(e[1586],t([1,0,635,4,5,24,7,9,352,80,123,37,35,8,6,1557,104,540,49,12,68,308,21,54,28,204,41,193,58,17,22,173,27,20,10,307]),function(e,t,i,r,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var H=function(e){function t(t,n,i,r,o,s,a,l,u,d,h,p,f,g,v,m){var y=e.call(this,c({},t,{ariaHeaderLabel:t.title}),i,r,f)||this;return y.options=t,y.notificationService=n,y.instantiationService=o,y.themeService=s,
y.extensionService=a,y.extensionsWorkbenchService=l,y.editorService=u,y.tipsService=d,y.modeService=h,y.telemetryService=p,y.contextService=g,y.extensionManagementServerService=v,y.experimentService=m,y}return n(t,e),t.prototype.renderHeader=function(e){var t=b.append(e,b.$("div.title"));b.append(t,b.$("span")).textContent=this.options.title,this.badgeContainer=b.append(e,b.$(".count-badge-wrapper")),this.badge=new L.CountBadge(this.badgeContainer),this.disposables.push(T.attachBadgeStyler(this.badge,this.themeService))},t.prototype.renderBody=function(e){this.extensionsList=b.append(e,b.$(".extensions-list")),this.messageBox=b.append(e,b.$(".message"));var t=new _.Delegate,n=this.instantiationService.createInstance(_.Renderer);this.list=this.instantiationService.createInstance(M.WorkbenchPagedList,this.extensionsList,t,[n],{ariaLabel:i.localize(0,null),multipleSelectionSupport:!1}),this.disposables.push(this.list),h.chain(this.list.onOpen).map(function(e){return e.elements[0]}).filter(function(e){return!!e
}).on(this.openExtension,this,this.disposables),h.chain(this.list.onPin).map(function(e){return e.elements[0]}).filter(function(e){return!!e}).on(this.pin,this,this.disposables)},t.prototype.layoutBody=function(e){this.extensionsList.style.height=e+"px",this.list.layout(e)},t.prototype.show=function(e){return o(this,void 0,r.TPromise,function(){var t;return s(this,function(n){switch(n.label){case 0:return[4,this.query(e)];case 1:return t=n.sent(),this.setModel(t),[2,t]}})})},t.prototype.select=function(){this.list.setSelection(this.list.getFocus())},t.prototype.showPrevious=function(){this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0])},t.prototype.showPreviousPage=function(){this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0])},t.prototype.showNext=function(){this.list.focusNext(),this.list.reveal(this.list.getFocus()[0])},t.prototype.showNextPage=function(){this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0])},t.prototype.count=function(){
return this.list.length},t.prototype.query=function(e){return o(this,void 0,r.TPromise,function(){var n,i,r,o,a,c,l,u,h,p,m,y,b,S,_,C,w,I=this;return s(this,function(s){switch(s.label){case 0:switch(n=E.Query.parse(e),i={sortOrder:g.SortOrder.Default},n.sortBy){case"installs":i=d.assign(i,{sortBy:g.SortBy.InstallCount});break;case"rating":i=d.assign(i,{sortBy:g.SortBy.WeightedRating});break;case"name":i=d.assign(i,{sortBy:g.SortBy.Title})}return/@builtin/i.test(e)?((r=/@builtin:themes/i.test(e))&&(e=e.replace(/@builtin:themes/g,"")),(o=/@builtin:basics/i.test(e))&&(e=e.replace(/@builtin:basics/g,"")),(a=/@builtin:features/i.test(e))&&(e=e.replace(/@builtin:features/g,"")),e=e.replace(/@builtin/g,"").replace(/@sort:(\w+)(-\w*)?/g,"").trim().toLowerCase(),[4,this.extensionsWorkbenchService.queryLocal()]):[3,2];case 1:return b=s.sent(),b=b.filter(function(t){return t.type===g.LocalExtensionType.System&&(t.name.toLowerCase().indexOf(e)>-1||t.displayName.toLowerCase().indexOf(e)>-1)}),r?(c=b.filter(function(e){
return e.local.manifest&&e.local.manifest.contributes&&Array.isArray(e.local.manifest.contributes.themes)&&e.local.manifest.contributes.themes.length}),[2,new f.PagedModel(this.sortExtensions(c,i))]):o?(l=b.filter(function(e){return e.local.manifest&&e.local.manifest.contributes&&Array.isArray(e.local.manifest.contributes.languages)&&e.local.manifest.contributes.languages.length&&"git"!==e.local.identifier.id}),[2,new f.PagedModel(this.sortExtensions(l,i))]):a?(u=b.filter(function(e){return e.local.manifest&&e.local.manifest.contributes&&(!Array.isArray(e.local.manifest.contributes.languages)||"git"===e.local.identifier.id)&&!Array.isArray(e.local.manifest.contributes.themes)}),[2,new f.PagedModel(this.sortExtensions(u,i))]):[2,new f.PagedModel(this.sortExtensions(b,i))];case 2:return e&&!t.isInstalledExtensionsQuery(e)?[3,4]:(e=e?e.replace(/@installed/g,"").replace(/@sort:(\w+)(-\w*)?/g,"").trim().toLowerCase():"",[4,this.extensionsWorkbenchService.queryLocal()]);case 3:return b=s.sent(),
b=b.filter(function(t){return t.type===g.LocalExtensionType.User&&(t.name.toLowerCase().indexOf(e)>-1||t.displayName.toLowerCase().indexOf(e)>-1)}),[2,new f.PagedModel(this.sortExtensions(b,i))];case 4:return(h=/@id:(([a-z0-9A-Z][a-z0-9\-A-Z]*)\.([a-z0-9A-Z][a-z0-9\-A-Z]*))/.exec(e))?(p=h[1],[2,this.extensionsWorkbenchService.queryGallery({names:[p],source:"queryById"}).then(function(e){return new f.PagedModel(e)})]):/@outdated/i.test(e)?(e=e.replace(/@outdated/g,"").replace(/@sort:(\w+)(-\w*)?/g,"").trim().toLowerCase(),[4,this.extensionsWorkbenchService.queryLocal()]):[3,6];case 5:return y=s.sent(),b=y.sort(function(e,t){return e.displayName.localeCompare(t.displayName)}).filter(function(t){return t.outdated&&(t.name.toLowerCase().indexOf(e)>-1||t.displayName.toLowerCase().indexOf(e)>-1)}),[2,new f.PagedModel(this.sortExtensions(b,i))];case 6:return/@disabled/i.test(e)?(e=e.replace(/@disabled/g,"").replace(/@sort:(\w+)(-\w*)?/g,"").trim().toLowerCase(),[4,this.extensionsWorkbenchService.queryLocal()]):[3,9]
;case 7:return y=s.sent(),[4,this.extensionService.getExtensions()];case 8:return m=s.sent(),b=y.sort(function(e,t){return e.displayName.localeCompare(t.displayName)}).filter(function(t){return m.every(function(e){return!v.areSameExtensions(e,t)})&&(t.name.toLowerCase().indexOf(e)>-1||t.displayName.toLowerCase().indexOf(e)>-1)}),[2,new f.PagedModel(this.sortExtensions(b,i))];case 9:return/@enabled/i.test(e)?(e=e?e.replace(/@enabled/g,"").replace(/@sort:(\w+)(-\w*)?/g,"").trim().toLowerCase():"",[4,this.extensionsWorkbenchService.queryLocal()]):[3,11];case 10:return y=s.sent(),b=y.sort(function(e,t){return e.displayName.localeCompare(t.displayName)}).filter(function(t){return t.type===g.LocalExtensionType.User&&(t.enablementState===g.EnablementState.Enabled||t.enablementState===g.EnablementState.WorkspaceEnabled)&&(t.name.toLowerCase().indexOf(e)>-1||t.displayName.toLowerCase().indexOf(e)>-1)}),[2,new f.PagedModel(this.sortExtensions(b,i))];case 11:
return t.isWorkspaceRecommendedExtensionsQuery(n.value)?[2,this.getWorkspaceRecommendationsModel(n,i)]:t.isKeymapsRecommendedExtensionsQuery(n.value)?[2,this.getKeymapRecommendationsModel(n,i)]:/@recommended:all/i.test(n.value)||t.isSearchRecommendedExtensionsQuery(n.value)?[2,this.getAllRecommendationsModel(n,i)]:t.isRecommendedExtensionsQuery(n.value)?[2,this.getRecommendationsModel(n,i)]:/\bcurated:([^\s]+)\b/.test(n.value)?[2,this.getCuratedModel(n,i)]:(S=n.value,(_=/\bext:([^\s]+)\b/g).test(n.value)?(S=n.value.replace(_,function(e,t){var n=I.tipsService.getKeywordsForExtension(t),i=I.modeService.getModeIdByFilenameOrFirstLine("."+t),r=i&&I.modeService.getLanguageName(i),o=r?' tag:"'+r+'"':"";return'tag:"__ext_'+t+'" tag:"__ext_.'+t+'" '+n.map(function(e){return'tag:"'+e+'"'}).join(" ")+o+' tag:"'+t+'"'}))===n.value?[3,13]:(i=d.assign(i,{text:S.substr(0,350),source:"file-extension-tags"}),[4,this.extensionsWorkbenchService.queryGallery(i)]):[3,13]);case 12:return C=s.sent(),[2,new f.PagedModel(C)]
;case 13:return S?i=d.assign(i,{text:S.substr(0,350),source:"searchText"}):i.source="viewlet",[4,this.extensionsWorkbenchService.queryGallery(i)];case 14:return w=s.sent(),[2,new f.PagedModel(w)]}})})},t.prototype.sortExtensions=function(e,t){switch(t.sortBy){case g.SortBy.InstallCount:e=e.sort(function(e,t){return t.installCount-e.installCount});break;case g.SortBy.AverageRating:case g.SortBy.WeightedRating:e=e.sort(function(e,t){return t.rating-e.rating});break;default:e=e.sort(function(e,t){return e.displayName.localeCompare(t.displayName)})}return t.sortOrder===g.SortOrder.Descending&&(e=e.reverse()),e},t.prototype.getAllRecommendationsModel=function(e,t){var n=this,i=e.value.replace(/@recommended:all/g,"").replace(/@recommended/g,"").trim().toLowerCase();return this.extensionsWorkbenchService.queryLocal().then(function(e){return e.filter(function(e){return e.type===g.LocalExtensionType.User})}).then(function(e){
var o=n.tipsService.getFileBasedRecommendations(),s=n.tipsService.getOtherRecommendations(),a=n.tipsService.getWorkspaceRecommendations();return r.TPromise.join([s,a]).then(function(s){var a=s[0],c=s[1],l=n.getTrimmedRecommendations(e,i,o,a,c),u=n.tipsService.getAllRecommendationsWithReason();return n.telemetryService.publicLog("extensionAllRecommendations:open",{count:l.length,recommendations:l.map(function(e){return{id:e,recommendationReason:u[e.toLowerCase()].reasonId}})}),l.length?(t.source="recommendations-all",n.extensionsWorkbenchService.queryGallery(d.assign(t,{names:l,pageSize:l.length})).then(function(e){return n.sortFirstPage(e,l),new f.PagedModel(e||[])})):r.TPromise.as(new f.PagedModel([]))})})},t.prototype.getCuratedModel=function(e,t){var n=this,i=e.value.replace(/curated:/g,"").trim();return this.experimentService.getCuratedExtensionsList(i).then(function(e){return Array.isArray(e)&&e.length?(t.source="curated:"+i,n.extensionsWorkbenchService.queryGallery(d.assign(t,{names:e,pageSize:e.length
})).then(function(t){return n.sortFirstPage(t,e),new f.PagedModel(t||[])})):r.TPromise.as(new f.PagedModel([]))})},t.prototype.getRecommendationsModel=function(e,t){var n=this,i=e.value.replace(/@recommended/g,"").trim().toLowerCase();return this.extensionsWorkbenchService.queryLocal().then(function(e){return e.filter(function(e){return e.type===g.LocalExtensionType.User})}).then(function(e){var o=n.tipsService.getFileBasedRecommendations(),s=n.tipsService.getOtherRecommendations(),a=n.tipsService.getWorkspaceRecommendations();return r.TPromise.join([s,a]).then(function(s){var a=s[0],c=s[1];o=o.filter(function(e){return c.every(function(t){var n=t.extensionId;return e.extensionId!==n})}),a=a.filter(function(e){return function(e){return c.every(function(t){var n=t.extensionId;return e.extensionId!==n})}});var l=n.getTrimmedRecommendations(e,i,o,a,[]),u=n.tipsService.getAllRecommendationsWithReason();return n.telemetryService.publicLog("extensionRecommendations:open",{count:l.length,
recommendations:l.map(function(e){return{id:e,recommendationReason:u[e.toLowerCase()].reasonId}})}),l.length?(t.source="recommendations",n.extensionsWorkbenchService.queryGallery(d.assign(t,{names:l,pageSize:l.length})).then(function(e){return n.sortFirstPage(e,l),new f.PagedModel(e||[])})):r.TPromise.as(new f.PagedModel([]))})})},t.prototype.getTrimmedRecommendations=function(e,t,n,i,r){var o=this;r=r.filter(function(n){return!o.isRecommendationInstalled(n,e)&&n.extensionId.toLowerCase().indexOf(t)>-1}),n=n.filter(function(n){return!o.isRecommendationInstalled(n,e)&&r.every(function(e){return e.extensionId!==n.extensionId})&&n.extensionId.toLowerCase().indexOf(t)>-1}),i=i.filter(function(i){return!o.isRecommendationInstalled(i,e)&&n.every(function(e){return e.extensionId!==i.extensionId})&&r.every(function(e){return e.extensionId!==i.extensionId})&&i.extensionId.toLowerCase().indexOf(t)>-1});var s=Math.min(2,i.length),a=Math.min(n.length,8-r.length-s),c=r;return c.push.apply(c,n.splice(0,a)),
c.push.apply(c,i.splice(0,s)),B.distinct(c.map(function(e){return e.extensionId}))},t.prototype.isRecommendationInstalled=function(e,t){var n=this,i=t.filter(function(t){return v.areSameExtensions({id:t.id},{id:e.extensionId})})[0];if(i&&i.locals){for(var r=[],o=0,s=i.locals;o<s.length;o++){var a=s[o],c=this.extensionManagementServerService.getExtensionManagementServer(a.location);-1===r.indexOf(c)&&r.push(c)}for(var l=function(e){if(i.recommendationSources&&i.recommendationSources.length&&i.recommendationSources.some(function(t){return n.getExtensionManagementServerForRecommendationSource(t)===e}))return{value:!0}},u=0,d=r;u<d.length;u++){var h=l(c=d[u]);if("object"==typeof h)return h.value}}return!1},t.prototype.getExtensionManagementServerForRecommendationSource=function(e){if(e instanceof V.default)return this.extensionManagementServerService.getExtensionManagementServer(e);if(e===this.contextService.getWorkspace())return this.extensionManagementServerService.getDefaultExtensionManagementServer()
;for(var t=0,n=this.contextService.getWorkspace().folders;t<n.length;t++){var i=n[t];if(e===i)return this.extensionManagementServerService.getExtensionManagementServer(i.uri)}return this.extensionManagementServerService.getDefaultExtensionManagementServer()},t.prototype.getWorkspaceRecommendationsModel=function(e,t){var n=this,i=e.value.replace(/@recommended:workspace/g,"").trim().toLowerCase();return this.tipsService.getWorkspaceRecommendations().then(function(e){var o=e.map(function(e){return e.extensionId}).filter(function(e){return e.toLowerCase().indexOf(i)>-1});return n.telemetryService.publicLog("extensionWorkspaceRecommendations:open",{count:o.length}),o.length?(t.source="recommendations-workspace",n.extensionsWorkbenchService.queryGallery(d.assign(t,{names:o,pageSize:o.length})).then(function(e){return new f.PagedModel(e||[])})):r.TPromise.as(new f.PagedModel([]))})},t.prototype.getKeymapRecommendationsModel=function(e,t){
var n=e.value.replace(/@recommended:keymaps/g,"").trim().toLowerCase(),i=this.tipsService.getKeymapRecommendations().map(function(e){return e.extensionId}).filter(function(e){return e.toLowerCase().indexOf(n)>-1});return i.length?(t.source="recommendations-keymaps",this.extensionsWorkbenchService.queryGallery(d.assign(t,{names:i,pageSize:i.length})).then(function(e){return new f.PagedModel(e)})):r.TPromise.as(new f.PagedModel([]))},t.prototype.sortFirstPage=function(e,t){t=t.map(function(e){return e.toLowerCase()}),e.firstPage.sort(function(e,n){return t.indexOf(e.id.toLowerCase())<t.indexOf(n.id.toLowerCase())?-1:1})},t.prototype.setModel=function(e){if(this.list){this.list.model=e,this.list.scrollTop=0;var t=this.count();b.toggleClass(this.extensionsList,"hidden",0===t),b.toggleClass(this.messageBox,"hidden",t>0),this.badge.setCount(t),0===t&&this.isVisible()?this.messageBox.textContent=i.localize(1,null):this.messageBox.textContent=""}},t.prototype.openExtension=function(e){var t=this
;this.extensionsWorkbenchService.open(e).done(null,function(e){return t.onError(e)})},t.prototype.pin=function(){var e=this.editorService.activeControl;e&&(e.group.pinEditor(e.input),e.focus())},t.prototype.onError=function(e){if(!p.isPromiseCanceledError(e)){var t=e&&e.message||"";if(/ECONNREFUSED/.test(t)){var n=p.create(i.localize(2,null),{actions:[this.instantiationService.createInstance(x.OpenGlobalSettingsAction,x.OpenGlobalSettingsAction.ID,x.OpenGlobalSettingsAction.LABEL)]});this.notificationService.error(n)}else this.notificationService.error(e)}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=u.dispose(this.disposables),this.list=null},t.isBuiltInExtensionsQuery=function(e){return/^\s*@builtin\s*$/i.test(e)},t.isInstalledExtensionsQuery=function(e){return/@installed/i.test(e)},t.isGroupByServersExtensionsQuery=function(e){return!!E.Query.parse(e).groupBy},t.isOutdatedExtensionsQuery=function(e){return/@outdated/i.test(e)},t.isDisabledExtensionsQuery=function(e){
return/@disabled/i.test(e)},t.isEnabledExtensionsQuery=function(e){return/@enabled/i.test(e)},t.isRecommendedExtensionsQuery=function(e){return/^@recommended$/i.test(e.trim())},t.isSearchRecommendedExtensionsQuery=function(e){return/@recommended/i.test(e)&&!t.isRecommendedExtensionsQuery(e)},t.isWorkspaceRecommendedExtensionsQuery=function(e){return/@recommended:workspace/i.test(e)},t.isKeymapsRecommendedExtensionsQuery=function(e){return/@recommended:keymaps/i.test(e)},t=a([l(1,N.INotificationService),l(2,m.IKeybindingService),l(3,y.IContextMenuService),l(4,S.IInstantiationService),l(5,I.IThemeService),l(6,w.IExtensionService),l(7,C.IExtensionsWorkbenchService),l(8,k.IEditorService),l(9,g.IExtensionTipsService),l(10,D.IModeService),l(11,A.ITelemetryService),l(12,P.IConfigurationService),l(13,W.IWorkspaceContextService),l(14,g.IExtensionManagementServerService),l(15,z.IExperimentService)],t)}(F.ViewletPanel);t.ExtensionsListView=H;var K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}
return n(t,e),t.isInstalledExtensionsQuery=function(e){return H.isInstalledExtensionsQuery(e)||H.isOutdatedExtensionsQuery(e)||H.isDisabledExtensionsQuery(e)||H.isEnabledExtensionsQuery(e)},t.prototype.show=function(n){return o(this,void 0,r.TPromise,function(){var i;return s(this,function(r){return t.isInstalledExtensionsQuery(n)?[2,e.prototype.show.call(this,n)]:(i="@installed",i=n?i+" "+n:i,[2,e.prototype.show.call(this,i)])})})},t}(H);t.InstalledExtensionsView=K;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(n){return t=t.replace(/@group:server/g,"").trim(),t=t||"@installed",K.isInstalledExtensionsQuery(t)||H.isBuiltInExtensionsQuery(t)||(t=t+=" @installed"),[2,e.prototype.show.call(this,t.trim())]})})},t}(H);t.GroupByServerExtensionsView=U;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.show=function(t){
return o(this,void 0,r.TPromise,function(){return s(this,function(t){return[2,e.prototype.show.call(this,"@enabled")]})})},t}(H);t.EnabledExtensionsView=G;var j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(t){return[2,e.prototype.show.call(this,"@disabled")]})})},t}(H);t.DisabledExtensionsView=j;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(n){return[2,e.prototype.show.call(this,t.replace("@builtin","@builtin:features"))]})})},t}(H);t.BuiltInExtensionsView=q;var $=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(n){return[2,e.prototype.show.call(this,t.replace("@builtin","@builtin:themes"))]})})},t}(H)
;t.BuiltInThemesExtensionsView=$;var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(n){return[2,e.prototype.show.call(this,t.replace("@builtin","@builtin:basics"))]})})},t}(H);t.BuiltInBasicsExtensionsView=Y;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.renderBody=function(t){var n=this;e.prototype.renderBody.call(this,t),this.disposables.push(this.tipsService.onRecommendationChange(function(){n.show("")}))},t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(t){return[2,e.prototype.show.call(this,"@recommended:all")]})})},t}(H);t.DefaultRecommendedExtensionsView=X;var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.renderBody=function(t){var n=this;e.prototype.renderBody.call(this,t),
this.disposables.push(this.tipsService.onRecommendationChange(function(){n.show("")}))},t.prototype.show=function(t){return o(this,void 0,r.TPromise,function(){return s(this,function(t){return[2,e.prototype.show.call(this,"@recommended")]})})},t}(H);t.RecommendedExtensionsView=Q;var Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.renderBody=function(t){var n=this;e.prototype.renderBody.call(this,t),this.disposables.push(this.tipsService.onRecommendationChange(function(){return n.update()})),this.disposables.push(this.extensionsWorkbenchService.onChange(function(){return n.setRecommendationsToInstall()})),this.disposables.push(this.contextService.onDidChangeWorkbenchState(function(){return n.update()}))},t.prototype.renderHeader=function(t){var n,i=this;e.prototype.renderHeader.call(this,t);var r=b.$(".list-actionbar-container");t.insertBefore(r,this.badgeContainer);var o=new R.ActionBar(r,{animated:!1});o.onDidRun(function(e){var t=e.error
;return t&&i.notificationService.error(t)}),this.installAllAction=this.instantiationService.createInstance(O.InstallWorkspaceRecommendedExtensionsAction,O.InstallWorkspaceRecommendedExtensionsAction.ID,O.InstallWorkspaceRecommendedExtensionsAction.LABEL,[]);var s=this.instantiationService.createInstance(O.ConfigureWorkspaceFolderRecommendedExtensionsAction,O.ConfigureWorkspaceFolderRecommendedExtensionsAction.ID,O.ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL);this.installAllAction.class="octicon octicon-cloud-download",s.class="octicon octicon-pencil",o.push([this.installAllAction],{icon:!0,label:!1}),o.push([s],{icon:!0,label:!1}),(n=this.disposables).push.apply(n,[this.installAllAction,s,o])},t.prototype.show=function(){return o(this,void 0,r.TPromise,function(){var t;return s(this,function(n){switch(n.label){case 0:return[4,e.prototype.show.call(this,"@recommended:workspace")];case 1:return t=n.sent(),this.setExpanded(t.length>0),[2,t]}})})},t.prototype.update=function(){this.show(),
this.setRecommendationsToInstall()},t.prototype.setRecommendationsToInstall=function(){var e=this;return this.getRecommendationsToInstall().then(function(t){e.installAllAction.recommendations=t})},t.prototype.getRecommendationsToInstall=function(){var e=this;return this.tipsService.getWorkspaceRecommendations().then(function(t){return t.filter(function(t){var n=t.extensionId;return!e.extensionsWorkbenchService.local.some(function(e){return v.areSameExtensions({id:n},{id:e.id})})})})},t}(H);t.WorkspaceRecommendedExtensionsView=Z}),define(e[560],t([1,0,634,18,4,9,5,7,106,41,84,65,8,28,6,49,104,193,80,285,1586,308,119,53,83,175,12,26,17,98,158,34,27,15,35,123,77,22,42,46,137,487,112,442,893]),function(e,t,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M,P,N,F,W,B,V,z,H,K,U,G,j,q,$){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var Y=new W.RawContextKey("nonEmptyWorkspace",!1),X=new W.RawContextKey("searchExtensions",!1),Q=new W.RawContextKey("searchInstalledExtensions",!1),Z=new W.RawContextKey("searchBuiltInExtensions",!1),J=new W.RawContextKey("recommendedExtensions",!1),ee=new W.RawContextKey("defaultRecommendedExtensions",!1),te=new W.RawContextKey("groupByServersContext",!1),ne=function(){function e(e){this.extensionManagementServerService=e,this.registerViews()}return e.prototype.registerViews=function(){var e=[];if(e.push(this.createMarketPlaceExtensionsListViewDescriptor()),e.push(this.createEnabledExtensionsListViewDescriptor()),e.push(this.createDisabledExtensionsListViewDescriptor()),e.push(this.createSearchInstalledExtensionsListViewDescriptor()),e.push(this.createSearchBuiltInExtensionsListViewDescriptor()),e.push(this.createSearchBuiltInBasicsExtensionsListViewDescriptor()),e.push(this.createSearchBuiltInThemesExtensionsListViewDescriptor()),e.push(this.createDefaultRecommendedExtensionsListViewDescriptor()),
e.push(this.createOtherRecommendedExtensionsListViewDescriptor()),e.push(this.createWorkspaceRecommendedExtensionsListViewDescriptor()),this.extensionManagementServerService.extensionManagementServers.length>1)for(var t=0,n=this.extensionManagementServerService.extensionManagementServers;t<n.length;t++){var i=n[t];e.push.apply(e,this.createExtensionsViewDescriptorsForServer(i))}M.ViewsRegistry.registerViews(e)},e.prototype.createMarketPlaceExtensionsListViewDescriptor=function(){return{id:"extensions.listView",name:i.localize(0,null),container:_.VIEW_CONTAINER,ctor:I.ExtensionsListView,when:W.ContextKeyExpr.and(W.ContextKeyExpr.has("searchExtensions"),W.ContextKeyExpr.not("searchInstalledExtensions"),W.ContextKeyExpr.not("searchBuiltInExtensions"),W.ContextKeyExpr.not("recommendedExtensions"),W.ContextKeyExpr.not("groupByServersContext")),weight:100}},e.prototype.createEnabledExtensionsListViewDescriptor=function(){return{id:"extensions.enabledExtensionList",name:i.localize(1,null),container:_.VIEW_CONTAINER,
ctor:I.EnabledExtensionsView,when:W.ContextKeyExpr.not("searchExtensions"),weight:30,canToggleVisibility:!0,order:1}},e.prototype.createDisabledExtensionsListViewDescriptor=function(){return{id:"extensions.disabledExtensionList",name:i.localize(2,null),container:_.VIEW_CONTAINER,ctor:I.DisabledExtensionsView,when:W.ContextKeyExpr.not("searchExtensions"),weight:10,canToggleVisibility:!0,order:3,collapsed:!0}},e.prototype.createSearchInstalledExtensionsListViewDescriptor=function(){return{id:"extensions.searchInstalledList",name:i.localize(3,null),container:_.VIEW_CONTAINER,ctor:I.InstalledExtensionsView,when:W.ContextKeyExpr.and(W.ContextKeyExpr.has("searchInstalledExtensions"),W.ContextKeyExpr.not("groupByServersContext")),weight:100}},e.prototype.createExtensionsViewDescriptorsForServer=function(e){return[{id:"server.extensionsList."+e.location.toString(),name:e.location.authority,container:_.VIEW_CONTAINER,ctor:I.GroupByServerExtensionsView,when:W.ContextKeyExpr.has("groupByServersContext"),weight:100}]},
e.prototype.createDefaultRecommendedExtensionsListViewDescriptor=function(){return{id:"extensions.recommendedList",name:i.localize(4,null),container:_.VIEW_CONTAINER,ctor:I.DefaultRecommendedExtensionsView,when:W.ContextKeyExpr.and(W.ContextKeyExpr.not("searchExtensions"),W.ContextKeyExpr.has("defaultRecommendedExtensions")),weight:70,order:2,canToggleVisibility:!0}},e.prototype.createOtherRecommendedExtensionsListViewDescriptor=function(){return{id:"extensions.otherrecommendedList",name:i.localize(5,null),container:_.VIEW_CONTAINER,ctor:I.RecommendedExtensionsView,when:W.ContextKeyExpr.has("recommendedExtensions"),weight:50,canToggleVisibility:!0,order:2}},e.prototype.createWorkspaceRecommendedExtensionsListViewDescriptor=function(){return{id:"extensions.workspaceRecommendedList",name:i.localize(6,null),container:_.VIEW_CONTAINER,ctor:I.WorkspaceRecommendedExtensionsView,when:W.ContextKeyExpr.and(W.ContextKeyExpr.has("recommendedExtensions"),W.ContextKeyExpr.has("nonEmptyWorkspace")),weight:50,
canToggleVisibility:!0,order:1}},e.prototype.createSearchBuiltInExtensionsListViewDescriptor=function(){return{id:"extensions.builtInExtensionsList",name:i.localize(7,null),container:_.VIEW_CONTAINER,ctor:I.BuiltInExtensionsView,when:W.ContextKeyExpr.has("searchBuiltInExtensions"),weight:100,canToggleVisibility:!0}},e.prototype.createSearchBuiltInThemesExtensionsListViewDescriptor=function(){return{id:"extensions.builtInThemesExtensionsList",name:i.localize(8,null),container:_.VIEW_CONTAINER,ctor:I.BuiltInThemesExtensionsView,when:W.ContextKeyExpr.has("searchBuiltInExtensions"),weight:100,canToggleVisibility:!0}},e.prototype.createSearchBuiltInBasicsExtensionsListViewDescriptor=function(){return{id:"extensions.builtInBasicsExtensionsList",name:i.localize(9,null),container:_.VIEW_CONTAINER,ctor:I.BuiltInBasicsExtensionsView,when:W.ContextKeyExpr.has("searchBuiltInExtensions"),weight:100,canToggleVisibility:!0}},e=a([l(0,E.IExtensionManagementServerService)],e)}();t.ExtensionsViewletViewsContribution=ne
;var ie=function(e){function t(t,n,i,o,s,a,c,l,u,d,h,p,f,g,v,m){var y=e.call(this,_.VIEWLET_ID,_.VIEWLET_ID+".state",!0,t,n,h,o,u,g,v,p)||this;return y.progressService=i,y.editorGroupService=s,y.extensionManagementService=a,y.notificationService=c,y.viewletService=l,y.configurationService=d,y.extensionManagementServerService=m,y.disposables=[],y.searchDelayer=new r.ThrottledDelayer(500),y.nonEmptyWorkspaceContextKey=Y.bindTo(f),y.searchExtensionsContextKey=X.bindTo(f),y.searchInstalledExtensionsContextKey=Q.bindTo(f),y.searchBuiltInExtensionsContextKey=Z.bindTo(f),y.recommendedExtensionsContextKey=J.bindTo(f),y.groupByServersContextKey=te.bindTo(f),y.defaultRecommendedExtensionsContextKey=ee.bindTo(f),y.defaultRecommendedExtensionsContextKey.set(!y.configurationService.getValue(_.ShowRecommendationsOnlyOnDemandKey)),y.disposables.push(y.viewletService.onDidViewletOpen(y.onViewletOpen,y,y.disposables)),y.configurationService.onDidChangeConfiguration(function(e){
e.affectsConfiguration(_.AutoUpdateConfigurationKey)&&(y.secondaryActions=null,y.updateTitleArea()),e.affectedKeys.indexOf(_.ShowRecommendationsOnlyOnDemandKey)>-1&&y.defaultRecommendedExtensionsContextKey.set(!y.configurationService.getValue(_.ShowRecommendationsOnlyOnDemandKey))},y,y.disposables),y}return n(t,e),t.prototype.create=function(t){return o(this,void 0,c.TPromise,function(){var n,r,o,a,c,l=this;return s(this,function(s){switch(s.label){case 0:return m.addClass(t,"extensions-viewlet"),this.root=t,n=m.append(this.root,m.$(".header")),this.searchBox=m.append(n,m.$("input.search-box")),this.searchBox.placeholder=i.localize(10,null),this.disposables.push(m.addStandardDisposableListener(this.searchBox,m.EventType.FOCUS,function(){return m.addClass(l.searchBox,"synthetic-focus")})),this.disposables.push(m.addStandardDisposableListener(this.searchBox,m.EventType.BLUR,function(){return m.removeClass(l.searchBox,"synthetic-focus")})),this.extensionsBox=m.append(this.root,m.$(".extensions")),
(r=h.chain(p.domEvent(this.searchBox,"keydown")).map(function(e){return new g.StandardKeyboardEvent(e)})).filter(function(e){return 9===e.keyCode}).on(this.onEscape,this,this.disposables),(o=r.filter(function(){return l.count()>0})).filter(function(e){return 3===e.keyCode}).on(this.onEnter,this,this.disposables),(a=p.domEvent(this.searchBox,"input"))(function(e){return l.triggerSearch(e.immediate)},null,this.disposables),this.onSearchChange=h.mapEvent(a,function(e){return e.target.value}),[4,e.prototype.create.call(this,this.extensionsBox)];case 1:return s.sent(),[4,this.extensionManagementService.getInstalled(E.LocalExtensionType.User)];case 2:return 0===(c=s.sent()).length&&(this.searchBox.value="@sort:installs",this.searchExtensionsContextKey.set(!0)),[2]}})})},t.prototype.updateStyles=function(){e.prototype.updateStyles.call(this),this.searchBox.style.backgroundColor=this.getColor(R.inputBackground),this.searchBox.style.color=this.getColor(R.inputForeground);var t=this.getColor(R.inputBorder)
;this.searchBox.style.borderWidth=t?"1px":null,this.searchBox.style.borderStyle=t?"solid":null,this.searchBox.style.borderColor=t},t.prototype.setVisible=function(t){var n=this,i=this.isVisible()!==t;return e.prototype.setVisible.call(this,t).then(function(){i&&t&&(n.searchBox.focus(),n.searchBox.setSelectionRange(0,n.searchBox.value.length))})},t.prototype.focus=function(){this.searchBox.focus()},t.prototype.layout=function(t){m.toggleClass(this.root,"narrow",t.width<=300),e.prototype.layout.call(this,new m.Dimension(t.width,t.height-38))},t.prototype.getOptimalWidth=function(){return 400},t.prototype.getActions=function(){return this.primaryActions||(this.primaryActions=[this.instantiationService.createInstance(C.ClearExtensionsInputAction,C.ClearExtensionsInputAction.ID,C.ClearExtensionsInputAction.LABEL,this.onSearchChange)]),this.primaryActions},t.prototype.getSecondaryActions=function(){var e=this
;return this.secondaryActions||(this.groupByServerAction||(this.groupByServerAction=this.instantiationService.createInstance(C.ChangeGroupAction,"extensions.group.servers",i.localize(11,null),this.onSearchChange,"server"),this.disposables.push(this.onSearchChange(function(t){e.groupByServerAction.enabled=!t||I.InstalledExtensionsView.isInstalledExtensionsQuery(t)||I.ExtensionsListView.isBuiltInExtensionsQuery(t)}))),
this.secondaryActions=[this.instantiationService.createInstance(C.ShowInstalledExtensionsAction,C.ShowInstalledExtensionsAction.ID,C.ShowInstalledExtensionsAction.LABEL),this.instantiationService.createInstance(C.ShowOutdatedExtensionsAction,C.ShowOutdatedExtensionsAction.ID,C.ShowOutdatedExtensionsAction.LABEL),this.instantiationService.createInstance(C.ShowEnabledExtensionsAction,C.ShowEnabledExtensionsAction.ID,C.ShowEnabledExtensionsAction.LABEL),this.instantiationService.createInstance(C.ShowDisabledExtensionsAction,C.ShowDisabledExtensionsAction.ID,C.ShowDisabledExtensionsAction.LABEL),this.instantiationService.createInstance(C.ShowBuiltInExtensionsAction,C.ShowBuiltInExtensionsAction.ID,C.ShowBuiltInExtensionsAction.LABEL),this.instantiationService.createInstance(C.ShowRecommendedExtensionsAction,C.ShowRecommendedExtensionsAction.ID,C.ShowRecommendedExtensionsAction.LABEL),this.instantiationService.createInstance(C.ShowPopularExtensionsAction,C.ShowPopularExtensionsAction.ID,C.ShowPopularExtensionsAction.LABEL),new f.Separator,this.instantiationService.createInstance(C.ChangeSortAction,"extensions.sort.install",i.localize(12,null),this.onSearchChange,"installs"),this.instantiationService.createInstance(C.ChangeSortAction,"extensions.sort.rating",i.localize(13,null),this.onSearchChange,"rating"),this.instantiationService.createInstance(C.ChangeSortAction,"extensions.sort.name",i.localize(14,null),this.onSearchChange,"name"),new f.Separator].concat(this.extensionManagementServerService.extensionManagementServers.length>1?[this.groupByServerAction,new f.Separator]:[],[this.instantiationService.createInstance(C.CheckForUpdatesAction,C.CheckForUpdatesAction.ID,C.CheckForUpdatesAction.LABEL)],this.configurationService.getValue(_.AutoUpdateConfigurationKey)?[this.instantiationService.createInstance(C.DisableAutoUpdateAction,C.DisableAutoUpdateAction.ID,C.DisableAutoUpdateAction.LABEL)]:[this.instantiationService.createInstance(C.UpdateAllAction,C.UpdateAllAction.ID,C.UpdateAllAction.LABEL),this.instantiationService.createInstance(C.EnableAutoUpdateAction,C.EnableAutoUpdateAction.ID,C.EnableAutoUpdateAction.LABEL)],[this.instantiationService.createInstance(C.InstallVSIXAction,C.InstallVSIXAction.ID,C.InstallVSIXAction.LABEL),new f.Separator,this.instantiationService.createInstance(C.DisableAllAction,C.DisableAllAction.ID,C.DisableAllAction.LABEL),this.instantiationService.createInstance(C.EnableAllAction,C.EnableAllAction.ID,C.EnableAllAction.LABEL)])),
this.secondaryActions},t.prototype.search=function(e){var t=new Event("input",{bubbles:!0});t.immediate=!0,this.searchBox.value=e,this.searchBox.dispatchEvent(t)},t.prototype.triggerSearch=function(e){var t=this;void 0===e&&(e=!1),this.searchDelayer.trigger(function(){return t.doSearch()},e||!this.searchBox.value?0:500).done(null,function(e){return t.onError(e)})},t.prototype.doSearch=function(){return o(this,void 0,c.TPromise,function(){var e,t=this;return s(this,function(n){return e=this.searchBox.value||"",this.searchExtensionsContextKey.set(!!e),this.searchInstalledExtensionsContextKey.set(I.InstalledExtensionsView.isInstalledExtensionsQuery(e)),this.searchBuiltInExtensionsContextKey.set(I.ExtensionsListView.isBuiltInExtensionsQuery(e)),this.groupByServersContextKey.set(I.ExtensionsListView.isGroupByServersExtensionsQuery(e)),this.recommendedExtensionsContextKey.set(I.ExtensionsListView.isRecommendedExtensionsQuery(e)),
this.nonEmptyWorkspaceContextKey.set(this.contextService.getWorkbenchState()!==F.WorkbenchState.EMPTY),e&&this.progress(c.TPromise.join(this.panels.map(function(e){return e.show(t.searchBox.value)}))),[2]})})},t.prototype.onDidAddViews=function(t){var n=this,i=e.prototype.onDidAddViews.call(this,t);return this.progress(c.TPromise.join(i.map(function(e){return e.show(n.searchBox.value)}))),i},t.prototype.createView=function(e,t){for(var n=0,i=this.extensionManagementServerService.extensionManagementServers;n<i.length;n++){var r=i[n];if(e.id==="server.extensionsList."+r.location.toString()){var o=new G.ServiceCollection;o.set(E.IExtensionManagementServerService,new $.SingleServerExtensionManagementServerService(r)),o.set(E.IExtensionManagementService,r.extensionManagementService),o.set(_.IExtensionsWorkbenchService,new q.SyncDescriptor(j.ExtensionsWorkbenchService));return this.instantiationService.createChild(o).createInstance(e.ctor,t,[r])}}return this.instantiationService.createInstance(e.ctor,t)},
t.prototype.count=function(){return this.panels.reduce(function(e,t){return t.count()+e},0)},t.prototype.onEscape=function(){this.search("")},t.prototype.onEnter=function(){this.panels[0].select()},t.prototype.onViewletOpen=function(e){if(e&&e.getId()!==_.VIEWLET_ID&&this.configurationService.getValue(_.CloseExtensionDetailsOnViewChangeKey)){var t=this.editorGroupService.groups.map(function(e){var t=e.editors.filter(function(e){return e instanceof w.ExtensionsInput}).map(function(t){return e.closeEditor(t)});return c.TPromise.join(t)});c.TPromise.join(t).done(null,u.onUnexpectedError)}},t.prototype.progress=function(e){var t=this.progressService.show(!0);return r.always(e,function(){return t.done()})},t.prototype.onError=function(e){if(!u.isPromiseCanceledError(e)){var t=e&&e.message||"";if(/ECONNREFUSED/.test(t)){var n=u.create(i.localize(15,null),{actions:[this.instantiationService.createInstance(T.OpenGlobalSettingsAction,T.OpenGlobalSettingsAction.ID,T.OpenGlobalSettingsAction.LABEL)]})
;this.notificationService.error(n)}else this.notificationService.error(e)}},t.prototype.dispose=function(){this.disposables=d.dispose(this.disposables),e.prototype.dispose.call(this)},t=a([l(0,U.IPartService),l(1,y.ITelemetryService),l(2,x.IProgressService),l(3,b.IInstantiationService),l(4,k.IEditorGroupsService),l(5,E.IExtensionManagementService),l(6,H.INotificationService),l(7,v.IViewletService),l(8,L.IThemeService),l(9,O.IConfigurationService),l(10,N.IStorageService),l(11,F.IWorkspaceContextService),l(12,W.IContextKeyService),l(13,B.IContextMenuService),l(14,S.IExtensionService),l(15,E.IExtensionManagementServerService)],t)}(P.ViewContainerViewlet);t.ExtensionsViewlet=ie;var re=function(){function e(e,t){this.activityService=e,this.extensionsWorkbenchService=t,t.onChange(this.onServiceChange,this,this.disposables)}return e.prototype.onServiceChange=function(){if(d.dispose(this.badgeHandle),this.extensionsWorkbenchService.local.some(function(e){return e.state===_.ExtensionState.Installing
}))this.badgeHandle=this.activityService.showActivity(_.VIEWLET_ID,new A.ProgressBadge(function(){return i.localize(16,null)}),"extensions-badge progress-badge");else{var e=this.extensionsWorkbenchService.local.reduce(function(e,t){return e+(t.outdated?1:0)},0);if(e>0){var t=new A.NumberBadge(e,function(e){return i.localize(17,null,e)});this.badgeHandle=this.activityService.showActivity(_.VIEWLET_ID,t,"extensions-badge count-badge")}}},e.prototype.dispose=function(){this.disposables=d.dispose(this.disposables),d.dispose(this.badgeHandle)},e=a([l(0,A.IActivityService),l(1,_.IExtensionsWorkbenchService)],e)}();t.StatusUpdater=re;var oe=function(){function e(e,t,n,i){this.extensionsManagementService=e,this.windowService=t,this.logService=n,this.notificationService=i,this.loopCheckForMaliciousExtensions()}return e.prototype.loopCheckForMaliciousExtensions=function(){var e=this;this.checkForMaliciousExtensions().then(function(){return c.TPromise.timeout(3e5)}).then(function(){
return e.loopCheckForMaliciousExtensions()})},e.prototype.checkForMaliciousExtensions=function(){var e=this;return this.extensionsManagementService.getExtensionsReport().then(function(t){var n=V.getMaliciousExtensionsSet(t);return e.extensionsManagementService.getInstalled(E.LocalExtensionType.User).then(function(t){var r=t.filter(function(e){return n.has(V.getGalleryExtensionIdFromLocal(e))});return r.length?c.TPromise.join(r.map(function(t){return e.extensionsManagementService.uninstall(t,!0).then(function(){e.notificationService.prompt(D.default.Warning,i.localize(18,null,V.getGalleryExtensionIdFromLocal(t)),[{label:i.localize(19,null),run:function(){return e.windowService.reloadWindow()}}])})})):c.TPromise.as(null)})},function(t){return e.logService.error(t)})},e.prototype.dispose=function(){this.disposables=d.dispose(this.disposables)},e=a([l(0,E.IExtensionManagementService),l(1,K.IWindowService),l(2,z.ILogService),l(3,H.INotificationService)],e)}();t.MaliciousExtensionChecker=oe}),
define(e[1348],t([1,0,630,9,73,16,31,107,80,1581,56,1590,75,125,112,104,487,193,285,99,1556,560,86,63,120,546,29,549,123,538,147,38,548,40,1559,892]),function(e,t,n,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D,A,L,R,O,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a.registerSingleton(c.IExtensionGalleryService,l.ExtensionGalleryService),a.registerSingleton(c.IExtensionTipsService,d.ExtensionTipsService),a.registerSingleton(g.IExtensionsWorkbenchService,v.ExtensionsWorkbenchService),a.registerSingleton(R.IExtensionHostProfileService,M.ExtensionHostProfileService);var P=o.Registry.as(h.Extensions.Workbench);P.registerWorkbenchContribution(_.StatusUpdater,L.LifecyclePhase.Running),P.registerWorkbenchContribution(_.MaliciousExtensionChecker,L.LifecyclePhase.Eventually),P.registerWorkbenchContribution(m.ConfigureRecommendedExtensionsCommandsContributor,L.LifecyclePhase.Eventually),P.registerWorkbenchContribution(x.KeymapExtensions,L.LifecyclePhase.Running),
P.registerWorkbenchContribution(_.ExtensionsViewletViewsContribution,L.LifecyclePhase.Starting),o.Registry.as(p.Extensions.OutputChannels).registerChannel(c.ExtensionsChannelId,c.ExtensionsLabel),o.Registry.as(C.Extensions.Quickopen).registerQuickOpenHandler(new C.QuickOpenHandlerDescriptor(D.ExtensionsHandler,D.ExtensionsHandler.ID,"ext ",null,n.localize(0,null),!0)),o.Registry.as(C.Extensions.Quickopen).registerQuickOpenHandler(new C.QuickOpenHandlerDescriptor(D.GalleryExtensionsHandler,D.GalleryExtensionsHandler.ID,"ext install ",null,n.localize(1,null),!0));var N=new A.EditorDescriptor(S.ExtensionEditor,S.ExtensionEditor.ID,n.localize(2,null));o.Registry.as(A.Extensions.Editors).registerEditor(N,[new f.SyncDescriptor(y.ExtensionsInput)]);var F=new A.EditorDescriptor(R.RuntimeExtensionsEditor,R.RuntimeExtensionsEditor.ID,n.localize(3,null));o.Registry.as(A.Extensions.Editors).registerEditor(F,[new f.SyncDescriptor(R.RuntimeExtensionsInput)]);var W=function(){function e(){}
return e.prototype.serialize=function(e){return""},e.prototype.deserialize=function(e,t){return new R.RuntimeExtensionsInput},e}();o.Registry.as(O.Extensions.EditorInputFactories).registerEditorInputFactory(R.RuntimeExtensionsInput.ID,W);var B=new b.ViewletDescriptor(_.ExtensionsViewlet,g.VIEWLET_ID,n.localize(4,null),"extensions",4);o.Registry.as(b.Extensions.Viewlets).registerViewlet(B);var V=o.Registry.as(u.Extensions.WorkbenchActions),z=new s.SyncActionDescriptor(m.OpenExtensionsViewletAction,m.OpenExtensionsViewletAction.ID,m.OpenExtensionsViewletAction.LABEL,{primary:3126});V.registerWorkbenchAction(z,"View: Show Extensions",n.localize(5,null));var H=new s.SyncActionDescriptor(m.InstallExtensionsAction,m.InstallExtensionsAction.ID,m.InstallExtensionsAction.LABEL);V.registerWorkbenchAction(H,"Extensions: Install Extensions",c.ExtensionsLabel);var K=new s.SyncActionDescriptor(m.ShowOutdatedExtensionsAction,m.ShowOutdatedExtensionsAction.ID,m.ShowOutdatedExtensionsAction.LABEL)
;V.registerWorkbenchAction(K,"Extensions: Show Outdated Extensions",c.ExtensionsLabel);var U=new s.SyncActionDescriptor(m.ShowRecommendedExtensionsAction,m.ShowRecommendedExtensionsAction.ID,m.ShowRecommendedExtensionsAction.LABEL);V.registerWorkbenchAction(U,"Extensions: Show Recommended Extensions",c.ExtensionsLabel);var G=new s.SyncActionDescriptor(m.ShowRecommendedKeymapExtensionsAction,m.ShowRecommendedKeymapExtensionsAction.ID,m.ShowRecommendedKeymapExtensionsAction.SHORT_LABEL,{primary:r.KeyChord(2089,2091)});V.registerWorkbenchAction(G,"Preferences: Keymaps",c.PreferencesLabel);var j=new s.SyncActionDescriptor(m.ShowLanguageExtensionsAction,m.ShowLanguageExtensionsAction.ID,m.ShowLanguageExtensionsAction.SHORT_LABEL);V.registerWorkbenchAction(j,"Preferences: Language Extensions",c.PreferencesLabel);var q=new s.SyncActionDescriptor(m.ShowAzureExtensionsAction,m.ShowAzureExtensionsAction.ID,m.ShowAzureExtensionsAction.SHORT_LABEL)
;V.registerWorkbenchAction(q,"Preferences: Azure Extensions",c.PreferencesLabel);var $=new s.SyncActionDescriptor(m.ShowPopularExtensionsAction,m.ShowPopularExtensionsAction.ID,m.ShowPopularExtensionsAction.LABEL);V.registerWorkbenchAction($,"Extensions: Show Popular Extensions",c.ExtensionsLabel);var Y=new s.SyncActionDescriptor(m.ShowEnabledExtensionsAction,m.ShowEnabledExtensionsAction.ID,m.ShowEnabledExtensionsAction.LABEL);V.registerWorkbenchAction(Y,"Extensions: Show Enabled Extensions",c.ExtensionsLabel);var X=new s.SyncActionDescriptor(m.ShowInstalledExtensionsAction,m.ShowInstalledExtensionsAction.ID,m.ShowInstalledExtensionsAction.LABEL);V.registerWorkbenchAction(X,"Extensions: Show Installed Extensions",c.ExtensionsLabel);var Q=new s.SyncActionDescriptor(m.ShowDisabledExtensionsAction,m.ShowDisabledExtensionsAction.ID,m.ShowDisabledExtensionsAction.LABEL);V.registerWorkbenchAction(Q,"Extensions: Show Disabled Extensions",c.ExtensionsLabel)
;var Z=new s.SyncActionDescriptor(m.ShowBuiltInExtensionsAction,m.ShowBuiltInExtensionsAction.ID,m.ShowBuiltInExtensionsAction.LABEL);V.registerWorkbenchAction(Z,"Extensions: Show Show Built-in Extensions",c.ExtensionsLabel);var J=new s.SyncActionDescriptor(m.UpdateAllAction,m.UpdateAllAction.ID,m.UpdateAllAction.LABEL);V.registerWorkbenchAction(J,"Extensions: Update All Extensions",c.ExtensionsLabel);var ee=new s.SyncActionDescriptor(m.OpenExtensionsFolderAction,m.OpenExtensionsFolderAction.ID,m.OpenExtensionsFolderAction.LABEL);V.registerWorkbenchAction(ee,"Extensions: Open Extensions Folder",c.ExtensionsLabel);var te=new s.SyncActionDescriptor(m.InstallVSIXAction,m.InstallVSIXAction.ID,m.InstallVSIXAction.LABEL);V.registerWorkbenchAction(te,"Extensions: Install from VSIX...",c.ExtensionsLabel);var ne=new s.SyncActionDescriptor(m.DisableAllAction,m.DisableAllAction.ID,m.DisableAllAction.LABEL);V.registerWorkbenchAction(ne,"Extensions: Disable All Installed Extensions",c.ExtensionsLabel)
;var ie=new s.SyncActionDescriptor(m.DisableAllWorkpsaceAction,m.DisableAllWorkpsaceAction.ID,m.DisableAllWorkpsaceAction.LABEL);V.registerWorkbenchAction(ie,"Extensions: Disable All Installed Extensions for this Workspace",c.ExtensionsLabel);var re=new s.SyncActionDescriptor(m.EnableAllAction,m.EnableAllAction.ID,m.EnableAllAction.LABEL);V.registerWorkbenchAction(re,"Extensions: Enable All Installed Extensions",c.ExtensionsLabel);var oe=new s.SyncActionDescriptor(m.EnableAllWorkpsaceAction,m.EnableAllWorkpsaceAction.ID,m.EnableAllWorkpsaceAction.LABEL);V.registerWorkbenchAction(oe,"Extensions: Enable All Installed Extensions for this Workspace",c.ExtensionsLabel);var se=new s.SyncActionDescriptor(m.CheckForUpdatesAction,m.CheckForUpdatesAction.ID,m.CheckForUpdatesAction.LABEL);V.registerWorkbenchAction(se,"Extensions: Check for Updates",c.ExtensionsLabel),
V.registerWorkbenchAction(new s.SyncActionDescriptor(m.EnableAutoUpdateAction,m.EnableAutoUpdateAction.ID,m.EnableAutoUpdateAction.LABEL),"Extensions: Enable Auto Updating Extensions",c.ExtensionsLabel),V.registerWorkbenchAction(new s.SyncActionDescriptor(m.DisableAutoUpdateAction,m.DisableAutoUpdateAction.ID,m.DisableAutoUpdateAction.LABEL),"Extensions: Disable Auto Updating Extensions",c.ExtensionsLabel),V.registerWorkbenchAction(new s.SyncActionDescriptor(R.ShowRuntimeExtensionsAction,R.ShowRuntimeExtensionsAction.ID,R.ShowRuntimeExtensionsAction.LABEL),"Show Running Extensions",n.localize(6,null)),V.registerWorkbenchAction(new s.SyncActionDescriptor(m.ReinstallAction,m.ReinstallAction.ID,m.ReinstallAction.LABEL),"Reinstall Extension...",n.localize(7,null)),o.Registry.as(E.Extensions.Configuration).registerConfiguration({id:"extensions",order:30,title:n.localize(8,null),type:"object",properties:{"extensions.autoUpdate":{type:"boolean",description:n.localize(9,null),default:!0,
scope:E.ConfigurationScope.APPLICATION},"extensions.ignoreRecommendations":{type:"boolean",description:n.localize(10,null),default:!1},"extensions.showRecommendationsOnlyOnDemand":{type:"boolean",description:n.localize(11,null),default:!1},"extensions.closeExtensionDetailsOnViewChange":{type:"boolean",description:n.localize(12,null),default:!1}}});o.Registry.as(w.Extensions.JSONContribution).registerSchema(I.ExtensionsConfigurationSchemaId,I.ExtensionsConfigurationSchema),T.CommandsRegistry.registerCommand("_extensions.manage",function(e,t){var n=e.get(g.IExtensionsWorkbenchService),r=n.local.filter(function(e){return k.areSameExtensions(e,{id:t})});1===r.length&&n.open(r[0]).done(null,i.onUnexpectedError)})}),define(e[1335],t([1,0,4,20,14,16,63,110,95,36,6,207,199,5,80,77]),function(e,t,i,r,u,d,h,p,f,g,v,m,y,b,S,_){"use strict";function C(e,t){return t?t+"##"+e:e}Object.defineProperty(t,"__esModule",{value:!0});var E=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.configurationService=t,
s.environmentService=n,s.instantiationService=i,s.extensionManagementService=r,s.extensionEnablementService=o,s._installedExtensions=s.extensionManagementService.getInstalled(S.LocalExtensionType.User).then(function(e){return e.filter(function(e){return s.extensionEnablementService.isEnabled(e)}).filter(function(e){return e.manifest&&e.manifest.contributes&&e.manifest.contributes.configuration}).filter(function(e){return!!e.identifier.uuid})}),s}return n(t,e),Object.defineProperty(t.prototype,"remoteSearchAllowed",{get:function(){return!!this.configurationService.getValue().workbench.settings.enableNaturalLanguageSearch&&!!this._endpoint.urlBase},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_endpoint",{get:function(){var e=this.configurationService.getValue().workbench.settings;return e.naturalLanguageSearchEndpoint?{urlBase:e.naturalLanguageSearchEndpoint,key:e.naturalLanguageSearchKey}:{urlBase:this.environmentService.settingsSearchUrl}},enumerable:!0,configurable:!0}),
t.prototype.getRemoteSearchProvider=function(e,t){void 0===t&&(t=!1);var n={filter:e,newExtensionsOnly:t,endpoint:this._endpoint};return this.remoteSearchAllowed&&this.instantiationService.createInstance(I,n,this._installedExtensions)},t.prototype.getLocalSearchProvider=function(e){return this.instantiationService.createInstance(w,e)},t=a([l(0,f.IWorkspaceConfigurationService),l(1,g.IEnvironmentService),l(2,v.IInstantiationService),l(3,S.IExtensionManagementService),l(4,S.IExtensionEnablementService)],t)}(b.Disposable);t.PreferencesSearchService=E;var w=function(){function e(e){this._filter=e,this._filter=this._filter.replace(/[":]/g," ").replace(/  /g," ").trim()}return e.prototype.searchModel=function(e){var t=this;if(!this._filter)return i.TPromise.wrap(null);var n=1e3,r=e.filterSettings(this._filter,this.getGroupFilter(this._filter),function(i){var r=new k(t._filter,i,!0,!0,function(t,n){return e.findValueMatches(t,n)}).matches;return r&&r.length?{matches:r,score:n--}:null});return i.TPromise.wrap({
filterMatches:r})},e.prototype.getGroupFilter=function(e){var t=u.createRegExp(this._filter,!1,{global:!0});return function(e){return t.test(e.title)}},e}();t.LocalSearchProvider=w;var I=function(){function e(e,t,n,r,o){this.options=e,this.installedExtensions=t,this.environmentService=n,this.requestService=r,this.logService=o,this._remoteSearchP=this.options.filter?this.getSettingsForFilter(this.options.filter):i.TPromise.wrap(null)}return e.prototype.searchModel=function(e){var t=this;return this._remoteSearchP.then(function(n){if(!n)return null;var i=Object.keys(n.scoredResults),o=r.top(i,function(e,t){return n.scoredResults[t].score-n.scoredResults[e].score},1)[0],s=(o?n.scoredResults[o].score:0)/5;if(t.options.newExtensionsOnly){return{filterMatches:c=i.filter(function(e){return n.scoredResults[e].score>=s}).map(function(e){var t=n.scoredResults[e];return{setting:function(e){return{description:e.description.split("\n"),descriptionRanges:null,key:e.key,keyRange:null,value:e.defaultValue,range:null,
valueRange:null,overrides:[],extensionName:e.extensionName,extensionPublisher:e.extensionPublisher}}(t),score:t.score,matches:[]}}),metadata:n}}var a=t.getRemoteSettingMatcher(n.scoredResults,s,e),c=e.filterSettings(t.options.filter,function(e){return null},a);return{filterMatches:c,metadata:n}})},e.prototype.getSettingsForFilter=function(t){return o(this,void 0,i.TPromise,function(){var n,r,o,a=this;return s(this,function(s){switch(s.label){case 0:n=[],r=0,s.label=1;case 1:return r<e.MAX_REQUESTS?[4,this.prepareRequest(t,r)]:[3,4];case 2:if(o=s.sent(),n.push(o),!o.hasMoreFilters)return[3,4];s.label=3;case 3:return r++,[3,1];case 4:return[2,i.TPromise.join(n.map(function(e){return a.getSettingsFromBing(e)})).then(function(e){var t=e[0];t.requestCount=1;for(var n=0,i=e.slice(1);n<i.length;n++){var r=i[n];t.requestCount++,t.scoredResults=c({},t.scoredResults,r.scoredResults)}return t})]}})})},e.prototype.getSettingsFromBing=function(e){this.logService.debug("Searching settings via "+e.url),
e.body&&this.logService.debug("Body: "+e.body);var t=e.body?"post":"get",n=Date.now();return this.requestService.request({type:t,url:e.url,data:e.body,headers:{"User-Agent":"request","Content-Type":"application/json; charset=utf-8","api-key":this.options.endpoint.key},timeout:5e3}).then(function(t){if(t.res.statusCode>=300)throw new Error(e+" returned status code: "+t.res.statusCode);return y.asJson(t)}).then(function(t){var i=Date.now(),r=i-n,o=(t.value||[]).map(function(e){var t,n,i,r=JSON.parse(e.setting||e.Setting),o=e.packageid,s=C(r,o),a=e.value,c=a?JSON.parse(a):a,l=e.packagename;return l&&l.indexOf("##")>=0&&(i=(t=l.split("##"))[0],n=t[1]),{key:r,id:s,defaultValue:c,score:e["@search.score"],description:JSON.parse(e.details),packageId:o,extensionName:n,extensionPublisher:i}}),s=Object.create(null);return o.forEach(function(e){s[e.id]=e}),{requestUrl:e.url,requestBody:e.body,duration:r,timestamp:i,scoredResults:s,context:t["@odata.context"],extensions:e.extensions}})},
e.prototype.getRemoteSettingMatcher=function(e,t,n){var i=this;return function(r,o){var s=e[C(r.key,o.id)]||e[C(r.key,"core")]||e[C(r.key)];if(s&&s.score>=t){return{matches:new k(i.options.filter,r,!1,!0,function(e,t){return n.findValueMatches(e,t)}).matches,score:s.score}}return null}},e.prototype.prepareRequest=function(t,n){return void 0===n&&(n=0),o(this,void 0,i.TPromise,function(){var i,r,o,a,c,l,u,d,h,p;return s(this,function(s){switch(s.label){case 0:return i=t,t=function(e){return e.replace(/\./g," ").replace(/[\\/+\-&|!"~*?:(){}\[\]\^]/g,"\\$&").replace(/  /g," ").trim()}(t),r=10,o="("+t+")^"+r,t=t.replace(/\ +/g,"~ ")+"~",a=encodeURIComponent(o+" || "+t),c=""+this.options.endpoint.urlBase,this.options.endpoint.key&&(c+=T+"&"+x),[4,this.installedExtensions];case 1:return l=s.sent(),u=this.options.newExtensionsOnly?["diminish eq 'latest'"]:this.getVersionFilters(l,this.environmentService.settingsSearchBuildId),d=u.slice(n*e.MAX_REQUEST_FILTERS,(n+1)*e.MAX_REQUEST_FILTERS).join(" or "),
h=u.length>(n+1)*e.MAX_REQUEST_FILTERS,p=JSON.stringify({query:a,filters:encodeURIComponent(d),rawQuery:encodeURIComponent(i)}),[2,{url:c,body:p,hasMoreFilters:h,extensions:l}]}})})},e.prototype.getVersionFilters=function(e,t){var n=this,i=e.filter(function(e){return e.manifest.contributes&&e.manifest.contributes.configuration}).map(function(e){return n.getExtensionFilter(e)});return t&&i.push("(packageid eq 'core' and startbuildno le '"+t+"' and endbuildno ge '"+t+"')"),i},e.prototype.getExtensionFilter=function(e){var t=e.identifier.uuid,n=e.manifest.version.split(".").map(function(e){return u.pad(e,10)}).join("");return"(packageid eq '"+t+"' and startbuildno le '"+n+"' and endbuildno ge '"+n+"')"},e.MAX_REQUEST_FILTERS=42,e.MAX_REQUESTS=10,e=a([l(2,g.IEnvironmentService),l(3,m.IRequestService),l(4,_.ILogService)],e)}(),T="api-version=2016-09-01-Preview",x="querytype=full",k=function(){function e(e,t,n,i,o){this.requireFullQueryMatch=n,this.searchDescription=i,this.valuesMatcher=o,
this.descriptionMatchingWords=new Map,this.keyMatchingWords=new Map,this.valueMatchingWords=new Map,this.matches=r.distinct(this._findMatchesInSetting(e,t),function(e){return e.startLineNumber+"_"+e.startColumn+"_"+e.endLineNumber+"_"+e.endColumn+"_"})}return e.prototype._findMatchesInSetting=function(t,n){var i=this._doFindMatchesInSetting(t,n);if(n.overrides&&n.overrides.length)for(var r=0,o=n.overrides;r<o.length;r++){var s=new e(t,o[r],this.requireFullQueryMatch,this.searchDescription,this.valuesMatcher),a=t.split(" "),c=this.getRangesForWords(a,this.descriptionMatchingWords,[s.descriptionMatchingWords,s.keyMatchingWords,s.valueMatchingWords]),l=this.getRangesForWords(a,this.keyMatchingWords,[s.descriptionMatchingWords,s.keyMatchingWords,s.valueMatchingWords]),u=this.getRangesForWords(a,s.keyMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,s.valueMatchingWords]),d=this.getRangesForWords(a,s.valueMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,s.keyMatchingWords])
;i.push.apply(i,c.concat(l,u,d)),i.push.apply(i,s.matches)}return i},e.prototype._doFindMatchesInSetting=function(e,t){for(var n=this,i=d.Registry.as(h.Extensions.Configuration).getConfigurationProperties()[t.key],r=e.split(" "),o=t.key.split(".").join(" "),s=function(e){if(a.searchDescription)for(var r=function(i){var r=p.matchesWords(e,t.description[i],!0);r&&a.descriptionMatchingWords.set(e,r.map(function(e){return n.toDescriptionRange(t,e,i)}))},s=0;s<t.description.length;s++)r(s);var c=p.or(p.matchesWords,p.matchesCamelCase)(e,o);c&&a.keyMatchingWords.set(e,c.map(function(e){return n.toKeyRange(t,e)}));var l="string"==typeof t.value?p.matchesContiguousSubString(e,t.value):null;l?a.valueMatchingWords.set(e,l.map(function(e){return n.toValueRange(t,e)})):i&&i.enum&&i.enum.some(function(t){return"string"==typeof t&&!!p.matchesContiguousSubString(e,t)})&&a.valueMatchingWords.set(e,[])},a=this,c=0,l=r;c<l.length;c++){s(l[c])}var u=[];if(this.searchDescription){for(var f=function(i){
var r=p.or(p.matchesContiguousSubString)(e,t.description[i]||"")||[];u.push.apply(u,r.map(function(e){return n.toDescriptionRange(t,e,i)}))},g=0;g<t.description.length;g++)f(g);0===u.length&&u.push.apply(u,this.getRangesForWords(r,this.descriptionMatchingWords,[this.keyMatchingWords,this.valueMatchingWords]))}var v=p.or(p.matchesPrefix,p.matchesContiguousSubString)(e,t.key),m=v?v.map(function(e){return n.toKeyRange(t,e)}):this.getRangesForWords(r,this.keyMatchingWords,[this.descriptionMatchingWords,this.valueMatchingWords]),y=[];if(t.value&&"string"==typeof t.value){var b=p.or(p.matchesPrefix,p.matchesContiguousSubString)(e,t.value);y=b?b.map(function(e){return n.toValueRange(t,e)}):this.getRangesForWords(r,this.valueMatchingWords,[this.keyMatchingWords,this.descriptionMatchingWords])}else y=this.valuesMatcher?this.valuesMatcher(e,t):[];return u.concat(m,y)},e.prototype.getRangesForWords=function(e,t,n){for(var i=[],r=function(e){var r=t.get(e)
;if(r)i.push.apply(i,r);else if(o.requireFullQueryMatch&&n.every(function(t){return!t.has(e)}))return{value:[]}},o=this,s=0,a=e;s<a.length;s++){var c=r(a[s]);if("object"==typeof c)return c.value}return i},e.prototype.toKeyRange=function(e,t){return{startLineNumber:e.keyRange.startLineNumber,startColumn:e.keyRange.startColumn+t.start,endLineNumber:e.keyRange.startLineNumber,endColumn:e.keyRange.startColumn+t.end}},e.prototype.toDescriptionRange=function(e,t,n){return{startLineNumber:e.descriptionRanges[n].startLineNumber,startColumn:e.descriptionRanges[n].startColumn+t.start,endLineNumber:e.descriptionRanges[n].endLineNumber,endColumn:e.descriptionRanges[n].startColumn+t.end}},e.prototype.toValueRange=function(e,t){return{startLineNumber:e.valueRange.startLineNumber,startColumn:e.valueRange.startColumn+t.start+1,endLineNumber:e.valueRange.startLineNumber,endColumn:e.valueRange.startColumn+t.end+1}},e}()}),
define(e[1278],t([1,0,685,10,16,52,56,40,31,107,73,112,354,1388,484,1441,308,297,6,75,1389,15,21,29,147,38,1335,115,32,905]),function(e,t,i,r,o,s,a,c,l,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x,k,D){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),u.registerSingleton(y.IPreferencesSearchService,x.PreferencesSearchService),o.Registry.as(I.Extensions.Editors).registerEditor(new I.EditorDescriptor(p.PreferencesEditor,p.PreferencesEditor.ID,i.localize(0,null)),[new h.SyncDescriptor(g.PreferencesEditorInput)]),o.Registry.as(I.Extensions.Editors).registerEditor(new I.EditorDescriptor(f.SettingsEditor2,f.SettingsEditor2.ID,i.localize(1,null)),[new h.SyncDescriptor(g.SettingsEditor2Input)]),o.Registry.as(I.Extensions.Editors).registerEditor(new I.EditorDescriptor(v.KeybindingsEditor,v.KeybindingsEditor.ID,i.localize(2,null)),[new h.SyncDescriptor(g.KeybindingsEditorInput)]);var A=function(){function e(){}return e.prototype.serialize=function(e){var t=e;if(t.details&&t.master){
var n=o.Registry.as(c.Extensions.EditorInputFactories),i=n.getEditorInputFactory(t.details.getTypeId()),r=n.getEditorInputFactory(t.master.getTypeId());if(i&&r){var s=i.serialize(t.details),a=r.serialize(t.master);if(s&&a)return JSON.stringify({name:t.getName(),description:t.getDescription(),detailsSerialized:s,masterSerialized:a,detailsTypeId:t.details.getTypeId(),masterTypeId:t.master.getTypeId()})}}return null},e.prototype.deserialize=function(e,t){var n=JSON.parse(t),i=o.Registry.as(c.Extensions.EditorInputFactories),r=i.getEditorInputFactory(n.detailsTypeId),s=i.getEditorInputFactory(n.masterTypeId);if(r&&s){var a=r.deserialize(e,n.detailsSerialized),l=s.deserialize(e,n.masterSerialized);if(a&&l)return new g.PreferencesEditorInput(n.name,n.description,a,l)}return null},e}(),L=function(){function e(){}return e.prototype.serialize=function(e){var t=e;return JSON.stringify({name:t.getName(),typeId:t.getTypeId()})},e.prototype.deserialize=function(e,t){return e.createInstance(g.KeybindingsEditorInput)},e
}(),R=function(){function e(){}return e.prototype.serialize=function(e){return JSON.stringify({})},e.prototype.deserialize=function(e,t){return e.createInstance(g.SettingsEditor2Input)},e}(),O=function(){function e(){}return e.prototype.serialize=function(e){var t={resource:e.getResource().toString()};return JSON.stringify(t)},e.prototype.deserialize=function(e,t){var n=JSON.parse(t);return e.createInstance(g.DefaultPreferencesEditorInput,r.default.parse(n.resource))},e}();o.Registry.as(c.Extensions.EditorInputFactories).registerEditorInputFactory(g.PreferencesEditorInput.ID,A),o.Registry.as(c.Extensions.EditorInputFactories).registerEditorInputFactory(g.DefaultPreferencesEditorInput.ID,O),o.Registry.as(c.Extensions.EditorInputFactories).registerEditorInputFactory(g.KeybindingsEditorInput.ID,L),o.Registry.as(c.Extensions.EditorInputFactories).registerEditorInputFactory(g.SettingsEditor2Input.ID,R);var M=i.localize(3,null),P=o.Registry.as(a.Extensions.WorkbenchActions)
;P.registerWorkbenchAction(new l.SyncActionDescriptor(m.OpenRawDefaultSettingsAction,m.OpenRawDefaultSettingsAction.ID,m.OpenRawDefaultSettingsAction.LABEL),"Preferences: Open Raw Default Settings",M),P.registerWorkbenchAction(new l.SyncActionDescriptor(m.OpenSettingsAction,m.OpenSettingsAction.ID,m.OpenSettingsAction.LABEL,{primary:2130}),"Preferences: Open Settings",M),P.registerWorkbenchAction(new l.SyncActionDescriptor(m.OpenSettings2Action,m.OpenSettings2Action.ID,m.OpenSettings2Action.LABEL),"Preferences: Open Settings (Preview)",M),P.registerWorkbenchAction(new l.SyncActionDescriptor(m.OpenGlobalSettingsAction,m.OpenGlobalSettingsAction.ID,m.OpenGlobalSettingsAction.LABEL),"Preferences: Open User Settings",M),P.registerWorkbenchAction(new l.SyncActionDescriptor(m.OpenGlobalKeybindingsAction,m.OpenGlobalKeybindingsAction.ID,m.OpenGlobalKeybindingsAction.LABEL,{primary:d.KeyChord(2089,2097)}),"Preferences: Open Keyboard Shortcuts",M),
P.registerWorkbenchAction(new l.SyncActionDescriptor(m.OpenGlobalKeybindingsFileAction,m.OpenGlobalKeybindingsFileAction.ID,m.OpenGlobalKeybindingsFileAction.LABEL,{primary:null}),"Preferences: Open Keyboard Shortcuts File",M),P.registerWorkbenchAction(new l.SyncActionDescriptor(m.ConfigureLanguageBasedSettingsAction,m.ConfigureLanguageBasedSettingsAction.ID,m.ConfigureLanguageBasedSettingsAction.LABEL),"Preferences: Configure Language Specific Settings...",M),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_DEFINE,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:d.KeyChord(2089,2089),handler:function(e,t){var n=e.get(E.IEditorService).activeControl;n.defineKeybinding(n.activeKeybindingEntry)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_REMOVE,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),
when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:20,mac:{primary:d.KeyChord(2089,2049)},handler:function(e,t){var n=e.get(E.IEditorService).activeControl;n.removeKeybinding(n.activeKeybindingEntry)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_RESET,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:null,handler:function(e,t){var n=e.get(E.IEditorService).activeControl;n.resetKeybinding(n.activeKeybindingEntry)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_SEARCH,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:2084,handler:function(e,t){return e.get(E.IEditorService).activeControl.focusSearch()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({
id:y.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:null,handler:function(e,t){var n=e.get(E.IEditorService).activeControl;n.showSimilarKeybindings(n.activeKeybindingEntry)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_COPY,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:2081,handler:function(e,t){var n=e.get(E.IEditorService).activeControl;n.copyKeybinding(n.activeKeybindingEntry)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDING_FOCUS),primary:null,handler:function(e,t){var n=e.get(E.IEditorService).activeControl
;n.copyKeybindingCommand(n.activeKeybindingEntry)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDINGS_SEARCH_FOCUS),primary:18,handler:function(e,t){e.get(E.IEditorService).activeControl.focusKeybindings()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,weight:s.KeybindingsRegistry.WEIGHT.workbenchContrib(),when:C.ContextKeyExpr.and(y.CONTEXT_KEYBINDINGS_EDITOR,y.CONTEXT_KEYBINDINGS_SEARCH_FOCUS),primary:9,handler:function(e,t){e.get(E.IEditorService).activeControl.clearSearchResults()}}),o.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(_.PreferencesContribution,T.LifecyclePhase.Starting),w.CommandsRegistry.registerCommand(m.OPEN_FOLDER_SETTINGS_COMMAND,function(e,t){return e.get(k.IPreferencesService).openFolderSettings(t)}),
w.CommandsRegistry.registerCommand(m.OpenFolderSettingsAction.ID,function(e){e.get(b.IInstantiationService).createInstance(m.OpenFolderSettingsAction,m.OpenFolderSettingsAction.ID,m.OpenFolderSettingsAction.LABEL).run()}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:m.OpenFolderSettingsAction.ID,title:M+": "+m.OpenFolderSettingsAction.LABEL},when:new C.RawContextKey("workbenchState","").isEqualTo("workspace")}),w.CommandsRegistry.registerCommand(m.OpenWorkspaceSettingsAction.ID,function(e){e.get(b.IInstantiationService).createInstance(m.OpenWorkspaceSettingsAction,m.OpenWorkspaceSettingsAction.ID,m.OpenWorkspaceSettingsAction.LABEL).run()}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:m.OpenWorkspaceSettingsAction.ID,title:M+": "+m.OpenWorkspaceSettingsAction.LABEL},when:new C.RawContextKey("workbenchState","").notEqualsTo("empty")});var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),
t.prototype.getPreferencesEditor=function(e){var t=e.get(E.IEditorService).activeControl;return t instanceof p.PreferencesEditor||t instanceof f.SettingsEditor2?t:null},t}(D.Command),F=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n&&n.focusSearch()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_SEARCH,precondition:C.ContextKeyExpr.and(y.CONTEXT_SETTINGS_EDITOR),kbOpts:{primary:2084}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(F.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib()));var W=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n&&n.focusSearch()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_FOCUS_SEARCH_FROM_SETTINGS,precondition:C.ContextKeyExpr.and(y.CONTEXT_SETTINGS_EDITOR,y.CONTEXT_SETTINGS_FIRST_ROW_FOCUS),kbOpts:{primary:16}})
;s.KeybindingsRegistry.registerCommandAndKeybindingRule(W.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.workbenchContrib()));var B=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n&&n.clearSearchResults()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,precondition:y.CONTEXT_SETTINGS_SEARCH_FOCUS,kbOpts:{primary:9}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(B.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib()));var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n instanceof p.PreferencesEditor?n.focusSettingsFileEditor():n.focusSettings()},t}(N),z=new V({id:y.SETTINGS_EDITOR_COMMAND_FOCUS_FILE,precondition:y.CONTEXT_SETTINGS_SEARCH_FOCUS,kbOpts:{primary:18}})
;s.KeybindingsRegistry.registerCommandAndKeybindingRule(z.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib()));var H=new V({id:y.SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_FROM_SEARCH,precondition:y.CONTEXT_SETTINGS_SEARCH_FOCUS,kbOpts:{primary:18}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(H.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.workbenchContrib()));var K=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n instanceof p.PreferencesEditor&&n.focusNextResult()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING,precondition:y.CONTEXT_SETTINGS_SEARCH_FOCUS,kbOpts:{primary:3}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(K.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib()));var U=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){
var n=this.getPreferencesEditor(e);n instanceof p.PreferencesEditor&&n.focusPreviousResult()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING,precondition:y.CONTEXT_SETTINGS_SEARCH_FOCUS,kbOpts:{primary:1027}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(U.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib()));var G=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n instanceof p.PreferencesEditor&&n.editFocusedPreference()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING,precondition:y.CONTEXT_SETTINGS_SEARCH_FOCUS,kbOpts:{primary:2132}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(G.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.editorContrib()));var j=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e)
;n instanceof f.SettingsEditor2&&n.editSelectedSetting()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING,precondition:C.ContextKeyExpr.and(y.CONTEXT_SETTINGS_EDITOR,y.CONTEXT_SETTINGS_ROW_FOCUS),kbOpts:{primary:3}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(j.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.workbenchContrib()));var q=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.runCommand=function(e,t){var n=this.getPreferencesEditor(e);n instanceof f.SettingsEditor2&&n.focusSettings()},t}(N))({id:y.SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_LIST,precondition:C.ContextKeyExpr.and(y.CONTEXT_SETTINGS_EDITOR,y.CONTEXT_TOC_ROW_FOCUS),kbOpts:{primary:3}});s.KeybindingsRegistry.registerCommandAndKeybindingRule(q.toCommandAndKeybindingRule(s.KeybindingsRegistry.WEIGHT.workbenchContrib()))}),define(e[1178],t([1,0,9,250,11,4,199,44,453,353,54,740,36,37,88,207,28,964,248,21,281]),function(e,t,n,i,r,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function t(e,t,n,i,r,a,c,l){var u=this;this._environmentService=e,this._keybindingService=t,this._modeService=n,this._openerService=i,this._requestService=r,this._telemetryService=a,this._editorService=c,this._webviewEditorService=l,this._releaseNotesCache=Object.create(null),this._currentReleaseNotes=void 0,d.TokenizationRegistry.onDidChange(function(){return o(u,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return this._currentReleaseNotes&&this._lastText?[4,this.renderBody(this._lastText)]:[2];case 1:return e=t.sent(),this._currentReleaseNotes&&(this._currentReleaseNotes.html=e),[2]}})})})}return t.prototype.show=function(e,t){return o(this,void 0,c.TPromise,function(){var e,n,i,r,o=this;return s(this,function(s){switch(s.label){case 0:return[4,this.loadReleaseNotes(t)];case 1:return e=s.sent(),this._lastText=e,[4,this.renderBody(e)];case 2:return n=s.sent(),i=g.localize(0,null,t),
r=this._editorService.activeControl,this._currentReleaseNotes?(this._currentReleaseNotes.setName(i),this._currentReleaseNotes.html=n,this._webviewEditorService.revealWebview(this._currentReleaseNotes,r?r.group:void 0,!1)):(this._currentReleaseNotes=this._webviewEditorService.createWebview("releaseNotes",i,{group:E.ACTIVE_GROUP,preserveFocus:!1},{tryRestoreScrollPosition:!0,enableFindWidget:!0},void 0,{onDidClickLink:function(e){return o.onDidClickLink(e)},onDispose:function(){o._currentReleaseNotes=void 0}}),this._currentReleaseNotes.html=n),[2,!0]}})})},t.prototype.loadReleaseNotes=function(e){var t=this,n=/^(\d+\.\d+)\./.exec(e);if(!n)return c.TPromise.wrapError(new Error("not found"));var i="https://code.visualstudio.com/raw/v"+n[1].replace(/\./g,"_")+".md",o=g.localize(1,null);return this._releaseNotesCache[e]||(this._releaseNotesCache[e]=this._requestService.request({url:i}).then(u.asText).then(function(e){return function(e){return e.replace(/kb\(([a-z.\d\-]+)\)/gi,function(e,n){
var i=t._keybindingService.lookupKeybinding(n);return i?i.getLabel():o}).replace(/kbstyle\(([^\)]+)\)/gi,function(e,n){var i=w.KeybindingIO.readKeybinding(n,r.OS);if(!i)return o;var s=t._keybindingService.resolveKeybinding(i);return 0===s.length?o:s[0].getLabel()})}(e)})),this._releaseNotesCache[e]},t.prototype.onDidClickLink=function(e){var t=this;_.addGAParameters(this._telemetryService,this._environmentService,e,"ReleaseNotes").then(function(e){return t._openerService.open(e)}).then(null,n.onUnexpectedError)},t.prototype.renderBody=function(t){return o(this,void 0,void 0,function(){var n,i,r,o;return s(this,function(s){switch(s.label){case 0:return[4,this.renderContent(t)];case 1:return n=s.sent(),i=d.TokenizationRegistry.getColorMap(),r=h.generateTokensCSSForColorMap(i),o=function(t,n){
return'<!DOCTYPE html>\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<base href="https://code.visualstudio.com/raw/">\n\t\t\t\t<meta http-equiv="Content-type" content="text/html;charset=UTF-8">\n\t\t\t\t<meta http-equiv="Content-Security-Policy" content="default-src \'none\'; img-src https: data:; media-src https:; script-src \'none\'; style-src vscode-core-resource: https: \'unsafe-inline\'; child-src \'none\'; frame-src \'none\';">\n\t\t\t\t<link rel="stylesheet" type="text/css" href="'+e.toUrl("./media/markdown.css").replace("file://","vscode-core-resource://")+'">\n\t\t\t\t<style>'+n+"</style>\n\t\t\t</head>\n\t\t\t<body>"+t+"</body>\n\t\t</html>"}(n,r),[2,o]}})})},t.prototype.renderContent=function(e){return o(this,void 0,c.TPromise,function(){var t;return s(this,function(n){switch(n.label){case 0:return[4,this.getRenderer(e)];case 1:return t=n.sent(),[2,i.marked(e,{renderer:t})]}})})},t.prototype.getRenderer=function(e){return o(this,void 0,void 0,function(){var t,n,r=this;return s(this,function(o){
switch(o.label){case 0:return t=[],n=new i.marked.Renderer,n.code=function(e,n){var i=r._modeService.getModeIdForLanguageName(n);return t.push(r._modeService.getOrCreateMode(i)),""},i.marked(e,{renderer:n}),[4,c.TPromise.join(t)];case 1:return o.sent(),n.code=function(e,t){var n=r._modeService.getModeIdForLanguageName(t);return"<code>"+p.tokenizeToString(e,n)+"</code>"},[2,n]}})})},t=a([l(0,v.IEnvironmentService),l(1,m.IKeybindingService),l(2,f.IModeService),l(3,y.IOpenerService),l(4,b.IRequestService),l(5,S.ITelemetryService),l(6,E.IEditorService),l(7,C.IWebviewEditorService)],t)}();t.ReleaseNotesManager=I}),define(e[1061],t([1,0,741,83,4,23,5,41,139,76,10,175,6,88,29,34,287,236,36,22,100,42,1178,11,17]),function(e,t,i,r,o,s,c,u,d,h,p,f,g,v,m,y,b,S,_,C,E,w,I,T,x){"use strict";function k(e,t){return D||(D=e.createInstance(I.ReleaseNotesManager)),e.invokeFunction(function(e){return D.show(e,t)})}Object.defineProperty(t,"__esModule",{value:!0});var D=void 0,A=function(e){function t(t){
var n=e.call(this,"update.openLatestReleaseNotes",i.localize(0,null),null,!0)||this;return n.openerService=t,n}return n(t,e),t.prototype.run=function(){var e=p.default.parse(h.default.releaseNotesUrl);return this.openerService.open(e)},t=a([l(0,v.IOpenerService)],t)}(s.Action);t.OpenLatestReleaseNotesInBrowserAction=A;var L=function(e){function t(t,n,i,r){var o=e.call(this,t,n,null,!0)||this;return o.version=i,o.instantiationService=r,o}return n(t,e),t.prototype.run=function(){var e=this;return this.enabled?(this.enabled=!1,k(this.instantiationService,this.version).then(null,function(){return e.instantiationService.createInstance(A).run().then(function(){return!1})})):o.TPromise.as(!1)},t=a([l(3,g.IInstantiationService)],t)}(s.Action);t.AbstractShowReleaseNotesAction=L;var R=function(e){function t(t,n){return e.call(this,"update.showReleaseNotes",i.localize(1,null),t,n)||this}return n(t,e),t=a([l(1,g.IInstantiationService)],t)}(L);t.ShowReleaseNotesAction=R;var O=function(e){function t(n,i,r){
return void 0===n&&(n=t.ID),void 0===i&&(i=t.LABEL),e.call(this,n,i,d.default.version,r)||this}return n(t,e),t.ID="update.showCurrentReleaseNotes",t.LABEL=i.localize(2,null),t=a([l(2,g.IInstantiationService)],t)}(L);t.ShowCurrentReleaseNotesAction=O;var M=function(){function e(t,n,o,s,a,c){var l=t.get(e.KEY,y.StorageScope.GLOBAL,"");c.getValue("update.showReleaseNotes")&&!s.skipReleaseNotes&&h.default.releaseNotesUrl&&l&&d.default.version!==l&&k(n,d.default.version).then(void 0,function(){o.prompt(r.default.Info,i.localize(3,null,h.default.nameLong,d.default.version),[{label:i.localize(4,null),run:function(){var e=p.default.parse(h.default.releaseNotesUrl);a.open(e)}}])}),
// should we show the new license?
h.default.licenseUrl&&l&&S.satisfies(l,"<1.0.0")&&S.satisfies(d.default.version,">=1.0.0")&&o.info(i.localize(5,null,h.default.licenseUrl)),t.store(e.KEY,d.default.version,y.StorageScope.GLOBAL)}return e.KEY="releaseNotes/lastVersion",e=a([l(0,y.IStorageService),l(1,g.IInstantiationService),l(2,C.INotificationService),l(3,_.IEnvironmentService),l(4,v.IOpenerService),l(5,x.IConfigurationService)],e)}();t.ProductContribution=M;var P=function(){function e(e,t){var n=this;this.storageService=t,this.action=new s.Action("neverShowAgain:"+this.key,i.localize(6,null),void 0,!0,function(e){return e.close(),o.TPromise.wrap(n.storageService.store(n.key,!0,y.StorageScope.GLOBAL))}),this.key="neverShowAgain:"+e}return e.prototype.shouldShow=function(){return!this.storageService.getBoolean(this.key,y.StorageScope.GLOBAL,!1)},e=a([l(1,y.IStorageService)],e)}(),N=function(){function e(t,n,o,s){if(!s.disableUpdates){var a=new P(e.KEY,t)
;if(a.shouldShow())var c="insider"===h.default.quality?e.INSIDER_URL:e.URL,l=o.prompt(r.default.Info,i.localize(7,null,h.default.nameShort,c),[{label:i.localize(8,null),isSecondary:!0,run:function(){a.action.run(l),a.action.dispose()}}])}}return e.KEY="update/win32-64bits",e.URL="https://code.visualstudio.com/updates/v1_15#_windows-64-bit",e.INSIDER_URL="https://github.com/Microsoft/vscode-docs/blob/vnext/release-notes/v1_15.md#windows-64-bit",e=a([l(0,y.IStorageService),l(1,g.IInstantiationService),l(2,C.INotificationService),l(3,_.IEnvironmentService)],e)}();t.Win3264BitContribution=N;var F=function(e){function t(t,n,i){return e.call(this,"command-action:"+t,n,void 0,!0,function(){return i.executeCommand(t)})||this}return n(t,e),t=a([l(2,m.ICommandService)],t)}(s.Action),W=function(){function e(e,t,n,i,r,o,s,a){this.storageService=e,this.commandService=t,this.instantiationService=n,this.notificationService=i,this.dialogService=r,this.updateService=o,this.activityService=s,this.windowService=a,
this.badgeDisposable=c.empty,this.disposables=[],this.state=o.state,o.onStateChange(this.onUpdateStateChange,this,this.disposables),this.onUpdateStateChange(this.updateService.state);h.default.commit!==this.storageService.get("update/lastKnownVersion",y.StorageScope.GLOBAL)&&(this.storageService.remove("update/lastKnownVersion",y.StorageScope.GLOBAL),this.storageService.remove("update/updateNotificationTime",y.StorageScope.GLOBAL))}return Object.defineProperty(e.prototype,"id",{get:function(){return"vs.update"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cssClass",{get:function(){return"update-activity"},enumerable:!0,configurable:!0}),e.prototype.onUpdateStateChange=function(e){switch(e.type){case b.StateType.Idle:this.state.type===b.StateType.CheckingForUpdates&&this.state.context&&this.state.context.windowId===this.windowService.getCurrentWindowId()&&this.onUpdateNotAvailable();break
;case b.StateType.AvailableForDownload:this.onUpdateAvailable(e.update);break;case b.StateType.Downloaded:this.onUpdateDownloaded(e.update);break;case b.StateType.Updating:this.onUpdateUpdating(e.update);break;case b.StateType.Ready:this.onUpdateReady(e.update)}var t,n=void 0;e.type===b.StateType.AvailableForDownload||e.type===b.StateType.Downloaded||e.type===b.StateType.Ready?n=new f.NumberBadge(1,function(){return i.localize(9,null,h.default.nameShort)}):e.type!==b.StateType.CheckingForUpdates&&e.type!==b.StateType.Downloading&&e.type!==b.StateType.Updating||(n=new f.ProgressBadge(function(){return i.localize(10,null,h.default.nameShort)}),t="progress-badge"),this.badgeDisposable.dispose(),n&&(this.badgeDisposable=this.activityService.showActivity(this.id,n,t)),this.state=e},e.prototype.onUpdateNotAvailable=function(){this.dialogService.show(r.default.Info,i.localize(11,null),[i.localize(12,null)])},e.prototype.onUpdateAvailable=function(e){var t=this
;this.shouldShowNotification()&&this.notificationService.prompt(r.default.Info,i.localize(13,null),[{label:i.localize(14,null),run:function(){return t.updateService.downloadUpdate()}},{label:i.localize(15,null),run:function(){}},{label:i.localize(16,null),run:function(){var n=t.instantiationService.createInstance(R,e.productVersion);n.run(),n.dispose()}}])},e.prototype.onUpdateDownloaded=function(e){var t=this;this.shouldShowNotification()&&this.notificationService.prompt(r.default.Info,i.localize(17,null,h.default.nameLong,e.productVersion),[{label:i.localize(18,null),run:function(){return t.updateService.applyUpdate()}},{label:i.localize(19,null),run:function(){}},{label:i.localize(20,null),run:function(){var n=t.instantiationService.createInstance(R,e.productVersion);n.run(),n.dispose()}}])},e.prototype.onUpdateUpdating=function(e){if(!T.isWindows||"user"!==h.default.target){var t=new P("update/win32-fast-updates",this.storageService)
;if(t.shouldShow())var n=this.notificationService.prompt(r.default.Info,i.localize(21,null,h.default.nameLong,e.productVersion),[{label:i.localize(22,null),isSecondary:!0,run:function(){t.action.run(n),t.action.dispose()}}])}},e.prototype.onUpdateReady=function(e){var t=this;(T.isWindows&&"user"!==h.default.target||this.shouldShowNotification())&&this.notificationService.prompt(r.default.Info,i.localize(23,null,h.default.nameLong),[{label:i.localize(24,null),run:function(){return t.updateService.quitAndInstall()}},{label:i.localize(25,null),run:function(){}},{label:i.localize(26,null),run:function(){var n=t.instantiationService.createInstance(R,e.productVersion);n.run(),n.dispose()}}])},e.prototype.shouldShowNotification=function(){var e=h.default.commit,t=(new Date).getTime();e!==this.storageService.get("update/lastKnownVersion",y.StorageScope.GLOBAL)&&(this.storageService.store("update/lastKnownVersion",e,y.StorageScope.GLOBAL),
this.storageService.store("update/updateNotificationTime",t,y.StorageScope.GLOBAL));return(t-this.storageService.getInteger("update/updateNotificationTime",y.StorageScope.GLOBAL,t))/864e5>5},e.prototype.getActions=function(){var t=[new F(e.showCommandsId,i.localize(27,null),this.commandService),new u.Separator,new F(e.openSettingsId,i.localize(28,null),this.commandService),new F(e.openKeybindingsId,i.localize(29,null),this.commandService),new F(e.showExtensionsId,i.localize(30,null),this.commandService),new u.Separator,new F(e.openUserSnippets,i.localize(31,null),this.commandService),new u.Separator,new F(e.selectColorThemeId,i.localize(32,null),this.commandService),new F(e.selectIconThemeId,i.localize(33,null),this.commandService)],n=this.getUpdateAction();return n&&t.push(new u.Separator,n),t},e.prototype.getUpdateAction=function(){var e=this;switch(this.updateService.state.type){case b.StateType.Uninitialized:return null;case b.StateType.Idle:var t=this.windowService.getCurrentWindowId()
;return new s.Action("update.check",i.localize(34,null),void 0,!0,function(){return e.updateService.checkForUpdates({windowId:t})});case b.StateType.CheckingForUpdates:return new s.Action("update.checking",i.localize(35,null),void 0,!1);case b.StateType.AvailableForDownload:return new s.Action("update.downloadNow",i.localize(36,null),null,!0,function(){return e.updateService.downloadUpdate()});case b.StateType.Downloading:return new s.Action("update.downloading",i.localize(37,null),void 0,!1);case b.StateType.Downloaded:return new s.Action("update.install",i.localize(38,null),void 0,!0,function(){return e.updateService.applyUpdate()});case b.StateType.Updating:return new s.Action("update.updating",i.localize(39,null),void 0,!1);case b.StateType.Ready:return new s.Action("update.restart",i.localize(40,null),void 0,!0,function(){return e.updateService.quitAndInstall()})}},e.prototype.dispose=function(){this.disposables=c.dispose(this.disposables)},e.showCommandsId="workbench.action.showCommands",
e.openSettingsId="workbench.action.openSettings",e.openKeybindingsId="workbench.action.openGlobalKeybindings",e.openUserSnippets="workbench.action.openSnippets",e.selectColorThemeId="workbench.action.selectTheme",e.selectIconThemeId="workbench.action.selectIconTheme",e.showExtensionsId="workbench.view.extensions",e=a([l(0,y.IStorageService),l(1,m.ICommandService),l(2,g.IInstantiationService),l(3,C.INotificationService),l(4,E.IDialogService),l(5,b.IUpdateService),l(6,f.IActivityService),l(7,w.IWindowService)],e)}();t.UpdateContribution=W}),define(e[1130],t([1,0,11,16,75,459,56,31,1061,38,927,1021]),function(e,t,n,i,r,o,s,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(c.ProductContribution,l.LifecyclePhase.Running),n.isWindows&&"ia32"===process.arch&&i.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(c.Win3264BitContribution,l.LifecyclePhase.Running),
i.Registry.as(o.GlobalActivityExtensions).registerActivity(c.UpdateContribution),i.Registry.as(s.Extensions.WorkbenchActions).registerWorkbenchAction(new a.SyncActionDescriptor(c.ShowCurrentReleaseNotesAction,c.ShowCurrentReleaseNotesAction.ID,c.ShowCurrentReleaseNotesAction.LABEL),"Show Release Notes")}),define(e[1599],t([1,0,14,9,1258,1046,185,1257,529,1504,1525,471,1357,472,1355,452,1358,1354,1059,1278,1333,1138,1476,1532,518,1364,553,1570,1568,1479,1162,1572,555,522,1534,539,1522,534,536,1510,535,1487,1483,1379,1180,1382,1435,1348,538,560,1315,1428,502,1575,315,557,558,1239,1433,1115,1407,1451,1321,235,465,1160,1158,334,1539,1198,1185,1130,1163,1432,1530,1092,1550,1553,1585,1452,1576,1383,1527,1436,1589]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/0f080e5267e829de46638128001aeb7ca2d6d50e/core/vs\workbench\workbench.main.js.map

Anon7 - 2022
AnonSec Team