import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
import { localizeWithPath } from '../../../../nls.js';
import { ConfigurationScope, Extensions as Extensions$1 } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
import { Extensions, workbenchConfigurationNodeBase } from '../../../common/configuration.js';
import { AccessibilitySignal } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';
import { AccessibilityVoiceSettingId, SPEECH_LANGUAGES } from '../../speech/common/speechService.js';
import { ISpeechService } from '../../speech/common/speechService.service.js';
import { Disposable } from '../../../../base/common/lifecycle.js';
import { Event } from '../../../../base/common/event.js';
import { isDefined } from '../../../../base/common/types.js';
import { IProductService } from '../../../../platform/product/common/productService.service.js';
const _moduleId = "vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
const accessibilityHelpIsShown = ( (new RawContextKey('accessibilityHelpIsShown', false, true)));
const accessibleViewIsShown = ( (new RawContextKey('accessibleViewIsShown', false, true)));
const accessibleViewSupportsNavigation = ( (new RawContextKey('accessibleViewSupportsNavigation', false, true)));
const accessibleViewVerbosityEnabled = ( (new RawContextKey('accessibleViewVerbosityEnabled', false, true)));
const accessibleViewGoToSymbolSupported = ( (new RawContextKey('accessibleViewGoToSymbolSupported', false, true)));
const accessibleViewOnLastLine = ( (new RawContextKey('accessibleViewOnLastLine', false, true)));
const accessibleViewCurrentProviderId = ( (new RawContextKey('accessibleViewCurrentProviderId', undefined, undefined)));
const accessibleViewInCodeBlock = ( (new RawContextKey('accessibleViewInCodeBlock', undefined, undefined)));
const accessibleViewContainsCodeBlocks = ( (new RawContextKey('accessibleViewContainsCodeBlocks', undefined, undefined)));
var AccessibilityWorkbenchSettingId;
( ((function(AccessibilityWorkbenchSettingId) {
    AccessibilityWorkbenchSettingId["DimUnfocusedEnabled"] = "accessibility.dimUnfocused.enabled";
    AccessibilityWorkbenchSettingId["DimUnfocusedOpacity"] = "accessibility.dimUnfocused.opacity";
    AccessibilityWorkbenchSettingId["HideAccessibleView"] = "accessibility.hideAccessibleView";
    AccessibilityWorkbenchSettingId["AccessibleViewCloseOnKeyPress"] = "accessibility.accessibleView.closeOnKeyPress";
})(AccessibilityWorkbenchSettingId || (AccessibilityWorkbenchSettingId = {}))));
var ViewDimUnfocusedOpacityProperties;
( ((function(ViewDimUnfocusedOpacityProperties) {
    ViewDimUnfocusedOpacityProperties[ViewDimUnfocusedOpacityProperties["Default"] = 0.75] = "Default";
    ViewDimUnfocusedOpacityProperties[ViewDimUnfocusedOpacityProperties["Minimum"] = 0.2] = "Minimum";
    ViewDimUnfocusedOpacityProperties[ViewDimUnfocusedOpacityProperties["Maximum"] = 1] = "Maximum";
})(
    ViewDimUnfocusedOpacityProperties || (ViewDimUnfocusedOpacityProperties = {})
)));
var AccessibilityVerbositySettingId;
( ((function(AccessibilityVerbositySettingId) {
    AccessibilityVerbositySettingId["Terminal"] = "accessibility.verbosity.terminal";
    AccessibilityVerbositySettingId["DiffEditor"] = "accessibility.verbosity.diffEditor";
    AccessibilityVerbositySettingId["Chat"] = "accessibility.verbosity.panelChat";
    AccessibilityVerbositySettingId["InlineChat"] = "accessibility.verbosity.inlineChat";
    AccessibilityVerbositySettingId["TerminalChat"] = "accessibility.verbosity.terminalChat";
    AccessibilityVerbositySettingId["InlineCompletions"] = "accessibility.verbosity.inlineCompletions";
    AccessibilityVerbositySettingId["KeybindingsEditor"] = "accessibility.verbosity.keybindingsEditor";
    AccessibilityVerbositySettingId["Notebook"] = "accessibility.verbosity.notebook";
    AccessibilityVerbositySettingId["Editor"] = "accessibility.verbosity.editor";
    AccessibilityVerbositySettingId["Hover"] = "accessibility.verbosity.hover";
    AccessibilityVerbositySettingId["Notification"] = "accessibility.verbosity.notification";
    AccessibilityVerbositySettingId["EmptyEditorHint"] = "accessibility.verbosity.emptyEditorHint";
    AccessibilityVerbositySettingId["ReplInputHint"] = "accessibility.verbosity.replInputHint";
    AccessibilityVerbositySettingId["Comments"] = "accessibility.verbosity.comments";
    AccessibilityVerbositySettingId["DiffEditorActive"] = "accessibility.verbosity.diffEditorActive";
})(AccessibilityVerbositySettingId || (AccessibilityVerbositySettingId = {}))));
const baseVerbosityProperty = {
    type: 'boolean',
    default: true,
    tags: ['accessibility']
};
const accessibilityConfigurationNodeBase = ( (Object.freeze({
    id: 'accessibility',
    title: ( localizeWithPath(_moduleId, 0, "Accessibility")),
    type: 'object'
})));
const soundFeatureBase = {
    'type': 'string',
    'enum': ['auto', 'on', 'off'],
    'default': 'auto',
    'enumDescriptions': [
        ( localizeWithPath(_moduleId, 1, "Enable sound when a screen reader is attached.")),
        ( localizeWithPath(_moduleId, 2, "Enable sound.")),
        ( localizeWithPath(_moduleId, 3, "Disable sound."))
    ],
    tags: ['accessibility'],
};
const signalFeatureBase = {
    'type': 'object',
    'tags': ['accessibility'],
    additionalProperties: false,
    default: {
        sound: 'auto',
        announcement: 'auto'
    }
};
const announcementFeatureBase = {
    'type': 'string',
    'enum': ['auto', 'off'],
    'default': 'auto',
    'enumDescriptions': [
        ( localizeWithPath(
            _moduleId,
            4,
            "Enable announcement, will only play when in screen reader optimized mode."
        )),
        ( localizeWithPath(_moduleId, 5, "Disable announcement."))
    ],
    tags: ['accessibility'],
};
const defaultNoAnnouncement = {
    'type': 'object',
    'tags': ['accessibility'],
    additionalProperties: false,
    'default': {
        'sound': 'auto',
    }
};
const configuration = {
    ...accessibilityConfigurationNodeBase,
    scope: ConfigurationScope.RESOURCE,
    properties: {
        [AccessibilityVerbositySettingId.Terminal]: {
            description: ( localizeWithPath(
                _moduleId,
                6,
                'Provide information about how to access the terminal accessibility help menu when the terminal is focused.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.DiffEditor]: {
            description: ( localizeWithPath(
                _moduleId,
                7,
                'Provide information about how to navigate changes in the diff editor when it is focused.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Chat]: {
            description: ( localizeWithPath(
                _moduleId,
                8,
                'Provide information about how to access the chat help menu when the chat input is focused.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.InlineChat]: {
            description: ( localizeWithPath(
                _moduleId,
                9,
                'Provide information about how to access the inline editor chat accessibility help menu and alert with hints that describe how to use the feature when the input is focused.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.InlineCompletions]: {
            description: ( localizeWithPath(
                _moduleId,
                10,
                'Provide information about how to access the inline completions hover and Accessible View.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.KeybindingsEditor]: {
            description: ( localizeWithPath(
                _moduleId,
                11,
                'Provide information about how to change a keybinding in the keybindings editor when a row is focused.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Notebook]: {
            description: ( localizeWithPath(
                _moduleId,
                12,
                'Provide information about how to focus the cell container or inner editor when a notebook cell is focused.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Hover]: {
            description: ( localizeWithPath(
                _moduleId,
                13,
                'Provide information about how to open the hover in an Accessible View.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Notification]: {
            description: ( localizeWithPath(
                _moduleId,
                14,
                'Provide information about how to open the notification in an Accessible View.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.EmptyEditorHint]: {
            description: ( localizeWithPath(
                _moduleId,
                15,
                'Provide information about relevant actions in an empty text editor.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.ReplInputHint]: {
            description: ( localizeWithPath(
                _moduleId,
                16,
                'Provide information about relevant actions For the Repl input.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Comments]: {
            description: ( localizeWithPath(
                _moduleId,
                17,
                'Provide information about actions that can be taken in the comment widget or in a file which contains comments.'
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.DiffEditorActive]: {
            description: ( localizeWithPath(_moduleId, 18, 'Indicate when a diff editor becomes the active editor.')),
            ...baseVerbosityProperty
        },
        [AccessibilityWorkbenchSettingId.AccessibleViewCloseOnKeyPress]: {
            markdownDescription: ( localizeWithPath(
                _moduleId,
                19,
                "On keypress, close the Accessible View and focus the element from which it was invoked."
            )),
            type: 'boolean',
            default: true
        },
        'accessibility.signalOptions.volume': {
            'description': ( localizeWithPath(_moduleId, 20, "The volume of the sounds in percent (0-100).")),
            'type': 'number',
            'minimum': 0,
            'maximum': 100,
            'default': 70,
            'tags': ['accessibility']
        },
        'accessibility.signalOptions.debouncePositionChanges': {
            'description': ( localizeWithPath(_moduleId, 21, "Whether or not position changes should be debounced")),
            'type': 'boolean',
            'default': false,
            'tags': ['accessibility']
        },
        'accessibility.signalOptions.experimental.delays.general': {
            'type': 'object',
            'description': 'Delays for all signals besides error and warning at position',
            'additionalProperties': false,
            'properties': {
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 22, "The delay in milliseconds before an announcement is made.")),
                    'type': 'number',
                    'minimum': 0,
                    'default': 3000
                },
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 23, "The delay in milliseconds before a sound is played.")),
                    'type': 'number',
                    'minimum': 0,
                    'default': 400
                }
            },
            'tags': ['accessibility']
        },
        'accessibility.signalOptions.experimental.delays.warningAtPosition': {
            'type': 'object',
            'additionalProperties': false,
            'properties': {
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        24,
                        "The delay in milliseconds before an announcement is made when there's a warning at the position."
                    )),
                    'type': 'number',
                    'minimum': 0,
                    'default': 3000
                },
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        25,
                        "The delay in milliseconds before a sound is played when there's a warning at the position."
                    )),
                    'type': 'number',
                    'minimum': 0,
                    'default': 1000
                }
            },
            'tags': ['accessibility']
        },
        'accessibility.signalOptions.experimental.delays.errorAtPosition': {
            'type': 'object',
            'additionalProperties': false,
            'properties': {
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        26,
                        "The delay in milliseconds before an announcement is made when there's an error at the position."
                    )),
                    'type': 'number',
                    'minimum': 0,
                    'default': 3000
                },
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        27,
                        "The delay in milliseconds before a sound is played when there's an error at the position."
                    )),
                    'type': 'number',
                    'minimum': 0,
                    'default': 1000
                }
            },
            'tags': ['accessibility']
        },
        'accessibility.signals.lineHasBreakpoint': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                28,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a breakpoint."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 29, "Plays a sound when the active line has a breakpoint.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 30, "Announces when the active line has a breakpoint.")),
                    ...announcementFeatureBase
                },
            },
        },
        'accessibility.signals.lineHasInlineSuggestion': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                31,
                "Plays a sound / audio cue when the active line has an inline suggestion."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        32,
                        "Plays a sound when the active line has an inline suggestion."
                    )),
                    ...soundFeatureBase,
                    'default': 'off'
                }
            }
        },
        'accessibility.signals.lineHasError': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                33,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has an error."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 34, "Plays a sound when the active line has an error.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 35, "Announces when the active line has an error.")),
                    ...announcementFeatureBase,
                    default: 'off'
                },
            },
        },
        'accessibility.signals.lineHasFoldedArea': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                36,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - the active line has a folded area that can be unfolded."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        37,
                        "Plays a sound when the active line has a folded area that can be unfolded."
                    )),
                    ...soundFeatureBase,
                    default: 'off'
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        38,
                        "Announces when the active line has a folded area that can be unfolded."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.lineHasWarning': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                39,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a warning."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 40, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 41, "Announces when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: 'off'
                },
            },
        },
        'accessibility.signals.positionHasError': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                42,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a warning."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 43, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 44, "Announces when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: 'on'
                },
            },
        },
        'accessibility.signals.positionHasWarning': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                45,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a warning."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 46, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 47, "Announces when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: 'on'
                },
            },
        },
        'accessibility.signals.onDebugBreak': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                48,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the debugger stopped on a breakpoint."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 49, "Plays a sound when the debugger stopped on a breakpoint.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 50, "Announces when the debugger stopped on a breakpoint.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.noInlayHints': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                51,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when trying to read a line with inlay hints that has no inlay hints."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        52,
                        "Plays a sound when trying to read a line with inlay hints that has no inlay hints."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        53,
                        "Announces when trying to read a line with inlay hints that has no inlay hints."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.taskCompleted': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                54,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a task is completed."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 55, "Plays a sound when a task is completed.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 56, "Announces when a task is completed.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.taskFailed': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                57,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a task fails (non-zero exit code)."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 58, "Plays a sound when a task fails (non-zero exit code).")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 59, "Announces when a task fails (non-zero exit code).")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalCommandFailed': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                60,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a terminal command fails (non-zero exit code) or when a command with such an exit code is navigated to in the accessible view."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        61,
                        "Plays a sound when a terminal command fails (non-zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        62,
                        "Announces when a terminal command fails (non-zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalCommandSucceeded': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                63,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        64,
                        "Plays a sound when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        65,
                        "Announces when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalQuickFix': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                66,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when terminal Quick Fixes are available."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 67, "Plays a sound when terminal Quick Fixes are available.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 68, "Announces when terminal Quick Fixes are available.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalBell': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                69,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the terminal bell is ringing."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 70, "Plays a sound when the terminal bell is ringing.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 71, "Announces when the terminal bell is ringing.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.diffLineInserted': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                72,
                "Plays a sound / audio cue when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        73,
                        "Plays a sound when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        'accessibility.signals.diffLineModified': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                74,
                "Plays a sound / audio cue when the focus moves to an modified line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        75,
                        "Plays a sound when the focus moves to a modified line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        'accessibility.signals.diffLineDeleted': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                76,
                "Plays a sound / audio cue when the focus moves to an deleted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        77,
                        "Plays a sound when the focus moves to an deleted line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        'accessibility.signals.notebookCellCompleted': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                78,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a notebook cell execution is successfully completed."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        79,
                        "Plays a sound when a notebook cell execution is successfully completed."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        80,
                        "Announces when a notebook cell execution is successfully completed."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.notebookCellFailed': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                81,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a notebook cell execution fails."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 82, "Plays a sound when a notebook cell execution fails.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 83, "Announces when a notebook cell execution fails.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.chatRequestSent': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                84,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a chat request is made."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 85, "Plays a sound when a chat request is made.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 86, "Announces when a chat request is made.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.progress': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                87,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - on loop while progress is occurring."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 88, "Plays a sound on loop while progress is occurring.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 89, "Alerts on loop while progress is occurring.")),
                    ...announcementFeatureBase
                },
            },
        },
        'accessibility.signals.chatResponseReceived': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                90,
                "Plays a sound / audio cue when the response has been received."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        91,
                        "Plays a sound on loop while the response has been received."
                    )),
                    ...soundFeatureBase
                },
            }
        },
        'accessibility.signals.voiceRecordingStarted': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                92,
                "Plays a sound / audio cue when the voice recording has started."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 93, "Plays a sound when the voice recording has started.")),
                    ...soundFeatureBase,
                },
            },
            'default': {
                'sound': 'on'
            }
        },
        'accessibility.signals.voiceRecordingStopped': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                94,
                "Plays a sound / audio cue when the voice recording has stopped."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 95, "Plays a sound when the voice recording has stopped.")),
                    ...soundFeatureBase,
                    default: 'off'
                },
            }
        },
        'accessibility.signals.clear': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                96,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a feature is cleared (for example, the terminal, Debug Console, or Output channel)."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 97, "Plays a sound when a feature is cleared.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 98, "Announces when a feature is cleared.")),
                    ...announcementFeatureBase
                },
            },
        },
        'accessibility.signals.save': {
            'type': 'object',
            'tags': ['accessibility'],
            additionalProperties: false,
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                99,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a file is saved."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 100, "Plays a sound when a file is saved.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 101, "Plays the sound when a user explicitly saves a file.")),
                        ( localizeWithPath(
                            _moduleId,
                            102,
                            "Plays the sound whenever a file is saved, including auto save."
                        )),
                        ( localizeWithPath(_moduleId, 103, "Never plays the sound."))
                    ],
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 104, "Announces when a file is saved.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 105, "Announces when a user explicitly saves a file.")),
                        ( localizeWithPath(_moduleId, 106, "Announces whenever a file is saved, including auto save.")),
                        ( localizeWithPath(_moduleId, 107, "Never plays the announcement."))
                    ],
                },
            },
            default: {
                'sound': 'never',
                'announcement': 'never'
            }
        },
        'accessibility.signals.format': {
            'type': 'object',
            'tags': ['accessibility'],
            additionalProperties: false,
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                108,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a file or notebook is formatted."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 109, "Plays a sound when a file or notebook is formatted.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 110, "Plays the sound when a user explicitly formats a file.")),
                        ( localizeWithPath(
                            _moduleId,
                            111,
                            "Plays the sound whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                        )),
                        ( localizeWithPath(_moduleId, 112, "Never plays the sound."))
                    ],
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 113, "Announces when a file or notebook is formatted.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 114, "Announces when a user explicitly formats a file.")),
                        ( localizeWithPath(
                            _moduleId,
                            115,
                            "Announces whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                        )),
                        ( localizeWithPath(_moduleId, 116, "Never announces."))
                    ],
                },
            },
            default: {
                'sound': 'never',
                'announcement': 'never'
            }
        },
        'accessibility.underlineLinks': {
            'type': 'boolean',
            'description': ( localizeWithPath(
                _moduleId,
                117,
                "Controls whether links should be underlined in the workbench."
            )),
            'default': false,
        },
    }
};
function registerAccessibilityConfiguration() {
    const registry = ( (Registry.as(Extensions$1.Configuration)));
    registry.registerConfiguration(configuration);
    registry.registerConfiguration({
        ...workbenchConfigurationNodeBase,
        properties: {
            [AccessibilityWorkbenchSettingId.DimUnfocusedEnabled]: {
                description: ( localizeWithPath(
                    _moduleId,
                    118,
                    'Whether to dim unfocused editors and terminals, which makes it more clear where typed input will go to. This works with the majority of editors with the notable exceptions of those that utilize iframes like notebooks and extension webview editors.'
                )),
                type: 'boolean',
                default: false,
                tags: ['accessibility'],
                scope: ConfigurationScope.APPLICATION,
            },
            [AccessibilityWorkbenchSettingId.DimUnfocusedOpacity]: {
                markdownDescription: ( localizeWithPath(
                    _moduleId,
                    119,
                    'The opacity fraction (0.2 to 1.0) to use for unfocused editors and terminals. This will only take effect when {0} is enabled.',
                    `\`#${AccessibilityWorkbenchSettingId.DimUnfocusedEnabled}#\``
                )),
                type: 'number',
                minimum: ViewDimUnfocusedOpacityProperties.Minimum,
                maximum: ViewDimUnfocusedOpacityProperties.Maximum,
                default: ViewDimUnfocusedOpacityProperties.Default,
                tags: ['accessibility'],
                scope: ConfigurationScope.APPLICATION,
            },
            [AccessibilityWorkbenchSettingId.HideAccessibleView]: {
                description: ( localizeWithPath(_moduleId, 120, "Controls whether the Accessible View is hidden.")),
                type: 'boolean',
                default: false,
                tags: ['accessibility']
            }
        }
    });
}
const SpeechTimeoutDefault = 1200;
let DynamicSpeechAccessibilityConfiguration = class DynamicSpeechAccessibilityConfiguration extends Disposable {
    static { this.ID = 'workbench.contrib.dynamicSpeechAccessibilityConfiguration'; }
    constructor(speechService, productService) {
        super();
        this.speechService = speechService;
        this.productService = productService;
        this._register(Event.runAndSubscribe(speechService.onDidChangeHasSpeechProvider, () => this.updateConfiguration()));
    }
    updateConfiguration() {
        if (!this.speechService.hasSpeechProvider) {
            return;
        }
        const languages = this.getLanguages();
        const languagesSorted = ( (Object.keys(languages))).sort((langA, langB) => {
            return languages[langA].name.localeCompare(languages[langB].name);
        });
        const registry = ( (Registry.as(Extensions$1.Configuration)));
        registry.registerConfiguration({
            ...accessibilityConfigurationNodeBase,
            properties: {
                [AccessibilityVoiceSettingId.SpeechTimeout]: {
                    'markdownDescription': ( localizeWithPath(
                        _moduleId,
                        121,
                        "The duration in milliseconds that voice speech recognition remains active after you stop speaking. For example in a chat session, the transcribed text is submitted automatically after the timeout is met. Set to `0` to disable this feature."
                    )),
                    'type': 'number',
                    'default': SpeechTimeoutDefault,
                    'minimum': 0,
                    'tags': ['accessibility']
                },
                [AccessibilityVoiceSettingId.SpeechLanguage]: {
                    'markdownDescription': ( localizeWithPath(
                        _moduleId,
                        122,
                        "The language that text-to-speech and speech-to-text should use. Select `auto` to use the configured display language if possible. Note that not all display languages maybe supported by speech recognition and synthesizers."
                    )),
                    'type': 'string',
                    'enum': languagesSorted,
                    'default': 'auto',
                    'tags': ['accessibility'],
                    'enumDescriptions': ( (languagesSorted.map(key => languages[key].name))),
                    'enumItemLabels': ( (languagesSorted.map(key => languages[key].name)))
                },
                [AccessibilityVoiceSettingId.AutoSynthesize]: {
                    'type': 'boolean',
                    'markdownDescription': ( localizeWithPath(
                        _moduleId,
                        123,
                        "Whether a textual response should automatically be read out aloud when speech was used as input. For example in a chat session, a response is automatically synthesized when voice was used as chat request."
                    )),
                    'default': this.productService.quality !== 'stable',
                    'tags': ['accessibility']
                }
            }
        });
    }
    getLanguages() {
        return {
            ['auto']: {
                name: ( localizeWithPath(_moduleId, 124, "Auto (Use Display Language)"))
            },
            ...SPEECH_LANGUAGES
        };
    }
};
DynamicSpeechAccessibilityConfiguration = ( (__decorate([
    ( (__param(0, ISpeechService))),
    ( (__param(1, IProductService)))
], DynamicSpeechAccessibilityConfiguration)));
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'audioCues.volume',
        migrateFn: (value, accessor) => {
            return [
                ['accessibility.signalOptions.volume', { value }],
                ['audioCues.volume', { value: undefined }]
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'audioCues.debouncePositionChanges',
        migrateFn: (value) => {
            return [
                ['accessibility.signalOptions.debouncePositionChanges', { value }],
                ['audioCues.debouncePositionChanges', { value: undefined }]
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'accessibility.signalOptions',
        migrateFn: (value, accessor) => {
            const delayGeneral = getDelaysFromConfig(accessor, 'general');
            const delayError = getDelaysFromConfig(accessor, 'errorAtPosition');
            const delayWarning = getDelaysFromConfig(accessor, 'warningAtPosition');
            const volume = getVolumeFromConfig(accessor);
            const debouncePositionChanges = getDebouncePositionChangesFromConfig(accessor);
            return [
                ['accessibility.signalOptions.volume', { value: volume }],
                ['accessibility.signalOptions.debouncePositionChanges', { value: debouncePositionChanges }],
                ['accessibility.signalOptions.experimental.delays.general', { value: delayGeneral }],
                ['accessibility.signalOptions.experimental.delays.errorAtPosition', { value: delayError }],
                ['accessibility.signalOptions.experimental.delays.warningAtPosition', { value: delayWarning }],
                ['accessibility.signalOptions', { value: undefined }],
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'accessibility.signals.sounds.volume',
        migrateFn: (value) => {
            return [
                ['accessibility.signalOptions.volume', { value }],
                ['accessibility.signals.sounds.volume', { value: undefined }]
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'accessibility.signals.debouncePositionChanges',
        migrateFn: (value) => {
            return [
                ['accessibility.signalOptions.debouncePositionChanges', { value }],
                ['accessibility.signals.debouncePositionChanges', { value: undefined }]
            ];
        }
    }]);
function getDelaysFromConfig(accessor, type) {
    return accessor(`accessibility.signalOptions.experimental.delays.${type}`) || accessor('accessibility.signalOptions')?.['experimental.delays']?.[`${type}`] || accessor('accessibility.signalOptions')?.['delays']?.[`${type}`];
}
function getVolumeFromConfig(accessor) {
    return accessor('accessibility.signalOptions.volume') || accessor('accessibility.signalOptions')?.volume || accessor('accessibility.signals.sounds.volume') || accessor('audioCues.volume');
}
function getDebouncePositionChangesFromConfig(accessor) {
    return accessor('accessibility.signalOptions.debouncePositionChanges') || accessor('accessibility.signalOptions')?.debouncePositionChanges || accessor('accessibility.signals.debouncePositionChanges') || accessor('audioCues.debouncePositionChanges');
}
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'accessibility.signals.chatResponsePending',
        migrateFn: (value, accessor) => {
            return [
                ['accessibility.signals.progress', { value }],
                ['accessibility.signals.chatResponsePending', { value: undefined }],
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations(( (AccessibilitySignal.allAccessibilitySignals.map(item => item.legacySoundSettingsKey ? ({
    key: item.legacySoundSettingsKey,
    migrateFn: (sound, accessor) => {
        const configurationKeyValuePairs = [];
        const legacyAnnouncementSettingsKey = item.legacyAnnouncementSettingsKey;
        let announcement;
        if (legacyAnnouncementSettingsKey) {
            announcement = accessor(legacyAnnouncementSettingsKey) ?? undefined;
            if (announcement !== undefined && typeof announcement !== 'string') {
                announcement = announcement ? 'auto' : 'off';
            }
        }
        configurationKeyValuePairs.push([`${item.legacySoundSettingsKey}`, { value: undefined }]);
        configurationKeyValuePairs.push([`${item.settingsKey}`, { value: announcement !== undefined ? { announcement, sound } : { sound } }]);
        return configurationKeyValuePairs;
    }
}) : undefined))).filter(isDefined));
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations(( (AccessibilitySignal.allAccessibilitySignals.filter(i => !!i.legacyAnnouncementSettingsKey && !!i.legacySoundSettingsKey).map(item => ({
    key: item.legacyAnnouncementSettingsKey,
    migrateFn: (announcement, accessor) => {
        const configurationKeyValuePairs = [];
        const sound = accessor(item.settingsKey)?.sound || accessor(item.legacySoundSettingsKey);
        if (announcement !== undefined && typeof announcement !== 'string') {
            announcement = announcement ? 'auto' : 'off';
        }
        configurationKeyValuePairs.push([`${item.settingsKey}`, { value: announcement !== undefined ? { announcement, sound } : { sound } }]);
        configurationKeyValuePairs.push([`${item.legacyAnnouncementSettingsKey}`, { value: undefined }]);
        configurationKeyValuePairs.push([`${item.legacySoundSettingsKey}`, { value: undefined }]);
        return configurationKeyValuePairs;
    }
})))));
export { AccessibilityVerbositySettingId, AccessibilityVoiceSettingId, AccessibilityWorkbenchSettingId, DynamicSpeechAccessibilityConfiguration, SpeechTimeoutDefault, ViewDimUnfocusedOpacityProperties, accessibilityConfigurationNodeBase, accessibilityHelpIsShown, accessibleViewContainsCodeBlocks, accessibleViewCurrentProviderId, accessibleViewGoToSymbolSupported, accessibleViewInCodeBlock, accessibleViewIsShown, accessibleViewOnLastLine, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, announcementFeatureBase, registerAccessibilityConfiguration, soundFeatureBase };
