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D,QAAgByK,EAAeM,wBAAwBhN,EAAQmF,EAAM,IAE3EnF,EAAOyN,aAAa,qBAAsBtI,EAAMc,KAAIvB,GAAQ,YAAsB,SAAWA,EAAKjB,OAAQiB,EAAKwB,SAG/GlG,EAAOyN,aAAa,qBAAsBtI,EAAMc,KAAIvB,GAAQ,gBAA0B,SAAWA,EAAKjB,OAAQiB,EAAKwB,SAEnHoH,GACAtN,EAAOuN,eAEXC,EAAYE,wCAAwC1N,EACxD,E","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/format.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/formatActions.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/formattingEdit.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { EditorAction, registerEditorAction } from '../../../browser/editorExtensions.js';\nimport { EditorZoom } from '../../../common/config/editorZoom.js';\nimport * as nls from '../../../../nls.js';\nclass EditorFontZoomIn extends EditorAction {\n constructor() {\n super({\n id: 'editor.action.fontZoomIn',\n label: nls.localize('EditorFontZoomIn.label', \"Increase Editor Font Size\"),\n alias: 'Increase Editor Font Size',\n precondition: undefined\n });\n }\n run(accessor, editor) {\n EditorZoom.setZoomLevel(EditorZoom.getZoomLevel() + 1);\n }\n}\nclass EditorFontZoomOut extends EditorAction {\n constructor() {\n super({\n id: 'editor.action.fontZoomOut',\n label: nls.localize('EditorFontZoomOut.label', \"Decrease Editor Font Size\"),\n alias: 'Decrease Editor Font Size',\n precondition: undefined\n });\n }\n run(accessor, editor) {\n EditorZoom.setZoomLevel(EditorZoom.getZoomLevel() - 1);\n }\n}\nclass EditorFontZoomReset extends EditorAction {\n constructor() {\n super({\n id: 'editor.action.fontZoomReset',\n label: nls.localize('EditorFontZoomReset.label', \"Reset Editor Font Size\"),\n alias: 'Reset Editor Font Size',\n precondition: undefined\n });\n }\n run(accessor, editor) {\n EditorZoom.setZoomLevel(0);\n }\n}\nregisterEditorAction(EditorFontZoomIn);\nregisterEditorAction(EditorFontZoomOut);\nregisterEditorAction(EditorFontZoomReset);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { asArray, isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedExternalError } from '../../../../base/common/errors.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { LinkedList } from '../../../../base/common/linkedList.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport { EditorStateCancellationTokenSource, TextModelCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { isCodeEditor } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { FormattingEdit } from './formattingEdit.js';\nimport { CommandsRegistry } from '../../../../platform/commands/common/commands.js';\nimport { ExtensionIdentifierSet } from '../../../../platform/extensions/common/extensions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nexport function getRealAndSyntheticDocumentFormattersOrdered(documentFormattingEditProvider, documentRangeFormattingEditProvider, model) {\n const result = [];\n const seen = new ExtensionIdentifierSet();\n // (1) add all document formatter\n const docFormatter = documentFormattingEditProvider.ordered(model);\n for (const formatter of docFormatter) {\n result.push(formatter);\n if (formatter.extensionId) {\n seen.add(formatter.extensionId);\n }\n }\n // (2) add all range formatter as document formatter (unless the same extension already did that)\n const rangeFormatter = documentRangeFormattingEditProvider.ordered(model);\n for (const formatter of rangeFormatter) {\n if (formatter.extensionId) {\n if (seen.has(formatter.extensionId)) {\n continue;\n }\n seen.add(formatter.extensionId);\n }\n result.push({\n displayName: formatter.displayName,\n extensionId: formatter.extensionId,\n provideDocumentFormattingEdits(model, options, token) {\n return formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token);\n }\n });\n }\n return result;\n}\nexport class FormattingConflicts {\n static setFormatterSelector(selector) {\n const remove = FormattingConflicts._selectors.unshift(selector);\n return { dispose: remove };\n }\n static async select(formatter, document, mode, kind) {\n if (formatter.length === 0) {\n return undefined;\n }\n const selector = Iterable.first(FormattingConflicts._selectors);\n if (selector) {\n return await selector(formatter, document, mode, kind);\n }\n return undefined;\n }\n}\nFormattingConflicts._selectors = new LinkedList();\nexport async function formatDocumentRangesWithSelectedProvider(accessor, editorOrModel, rangeOrRanges, mode, progress, token, userGesture) {\n const instaService = accessor.get(IInstantiationService);\n const { documentRangeFormattingEditProvider: documentRangeFormattingEditProviderRegistry } = accessor.get(ILanguageFeaturesService);\n const model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n const provider = documentRangeFormattingEditProviderRegistry.ordered(model);\n const selected = await FormattingConflicts.select(provider, model, mode, 2 /* FormattingKind.Selection */);\n if (selected) {\n progress.report(selected);\n await instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token, userGesture);\n }\n}\nexport async function formatDocumentRangesWithProvider(accessor, provider, editorOrModel, rangeOrRanges, token, userGesture) {\n var _a, _b;\n const workerService = accessor.get(IEditorWorkerService);\n const logService = accessor.get(ILogService);\n const accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n let model;\n let cts;\n if (isCodeEditor(editorOrModel)) {\n model = editorOrModel.getModel();\n cts = new EditorStateCancellationTokenSource(editorOrModel, 1 /* CodeEditorStateFlag.Value */ | 4 /* CodeEditorStateFlag.Position */, undefined, token);\n }\n else {\n model = editorOrModel;\n cts = new TextModelCancellationTokenSource(editorOrModel, token);\n }\n // make sure that ranges don't overlap nor touch each other\n const ranges = [];\n let len = 0;\n for (const range of asArray(rangeOrRanges).sort(Range.compareRangesUsingStarts)) {\n if (len > 0 && Range.areIntersectingOrTouching(ranges[len - 1], range)) {\n ranges[len - 1] = Range.fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition());\n }\n else {\n len = ranges.push(range);\n }\n }\n const computeEdits = async (range) => {\n var _a, _b;\n logService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, (_a = provider.extensionId) === null || _a === void 0 ? void 0 : _a.value, range);\n const result = (await provider.provideDocumentRangeFormattingEdits(model, range, model.getFormattingOptions(), cts.token)) || [];\n logService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, (_b = provider.extensionId) === null || _b === void 0 ? void 0 : _b.value, result);\n return result;\n };\n const hasIntersectingEdit = (a, b) => {\n if (!a.length || !b.length) {\n return false;\n }\n // quick exit if the list of ranges are completely unrelated [O(n)]\n const mergedA = a.reduce((acc, val) => { return Range.plusRange(acc, val.range); }, a[0].range);\n if (!b.some(x => { return Range.intersectRanges(mergedA, x.range); })) {\n return false;\n }\n // fallback to a complete check [O(n^2)]\n for (const edit of a) {\n for (const otherEdit of b) {\n if (Range.intersectRanges(edit.range, otherEdit.range)) {\n return true;\n }\n }\n }\n return false;\n };\n const allEdits = [];\n const rawEditsList = [];\n try {\n if (typeof provider.provideDocumentRangesFormattingEdits === 'function') {\n logService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, (_a = provider.extensionId) === null || _a === void 0 ? void 0 : _a.value, ranges);\n const result = (await provider.provideDocumentRangesFormattingEdits(model, ranges, model.getFormattingOptions(), cts.token)) || [];\n logService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, (_b = provider.extensionId) === null || _b === void 0 ? void 0 : _b.value, result);\n rawEditsList.push(result);\n }\n else {\n for (const range of ranges) {\n if (cts.token.isCancellationRequested) {\n return true;\n }\n rawEditsList.push(await computeEdits(range));\n }\n for (let i = 0; i < ranges.length; ++i) {\n for (let j = i + 1; j < ranges.length; ++j) {\n if (cts.token.isCancellationRequested) {\n return true;\n }\n if (hasIntersectingEdit(rawEditsList[i], rawEditsList[j])) {\n // Merge ranges i and j into a single range, recompute the associated edits\n const mergedRange = Range.plusRange(ranges[i], ranges[j]);\n const edits = await computeEdits(mergedRange);\n ranges.splice(j, 1);\n ranges.splice(i, 1);\n ranges.push(mergedRange);\n rawEditsList.splice(j, 1);\n rawEditsList.splice(i, 1);\n rawEditsList.push(edits);\n // Restart scanning\n i = 0;\n j = 0;\n }\n }\n }\n }\n for (const rawEdits of rawEditsList) {\n if (cts.token.isCancellationRequested) {\n return true;\n }\n const minimalEdits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n if (minimalEdits) {\n allEdits.push(...minimalEdits);\n }\n }\n }\n finally {\n cts.dispose();\n }\n if (allEdits.length === 0) {\n return false;\n }\n if (isCodeEditor(editorOrModel)) {\n // use editor to apply edits\n FormattingEdit.execute(editorOrModel, allEdits, true);\n editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), 1 /* ScrollType.Immediate */);\n }\n else {\n // use model to apply edits\n const [{ range }] = allEdits;\n const initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n model.pushEditOperations([initialSelection], allEdits.map(edit => {\n return {\n text: edit.text,\n range: Range.lift(edit.range),\n forceMoveMarkers: true\n };\n }), undoEdits => {\n for (const { range } of undoEdits) {\n if (Range.areIntersectingOrTouching(range, initialSelection)) {\n return [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n }\n }\n return null;\n });\n }\n accessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n return true;\n}\nexport async function formatDocumentWithSelectedProvider(accessor, editorOrModel, mode, progress, token, userGesture) {\n const instaService = accessor.get(IInstantiationService);\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n const provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n const selected = await FormattingConflicts.select(provider, model, mode, 1 /* FormattingKind.File */);\n if (selected) {\n progress.report(selected);\n await instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token, userGesture);\n }\n}\nexport async function formatDocumentWithProvider(accessor, provider, editorOrModel, mode, token, userGesture) {\n const workerService = accessor.get(IEditorWorkerService);\n const accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n let model;\n let cts;\n if (isCodeEditor(editorOrModel)) {\n model = editorOrModel.getModel();\n cts = new EditorStateCancellationTokenSource(editorOrModel, 1 /* CodeEditorStateFlag.Value */ | 4 /* CodeEditorStateFlag.Position */, undefined, token);\n }\n else {\n model = editorOrModel;\n cts = new TextModelCancellationTokenSource(editorOrModel, token);\n }\n let edits;\n try {\n const rawEdits = await provider.provideDocumentFormattingEdits(model, model.getFormattingOptions(), cts.token);\n edits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n if (cts.token.isCancellationRequested) {\n return true;\n }\n }\n finally {\n cts.dispose();\n }\n if (!edits || edits.length === 0) {\n return false;\n }\n if (isCodeEditor(editorOrModel)) {\n // use editor to apply edits\n FormattingEdit.execute(editorOrModel, edits, mode !== 2 /* FormattingMode.Silent */);\n if (mode !== 2 /* FormattingMode.Silent */) {\n editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), 1 /* ScrollType.Immediate */);\n }\n }\n else {\n // use model to apply edits\n const [{ range }] = edits;\n const initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n model.pushEditOperations([initialSelection], edits.map(edit => {\n return {\n text: edit.text,\n range: Range.lift(edit.range),\n forceMoveMarkers: true\n };\n }), undoEdits => {\n for (const { range } of undoEdits) {\n if (Range.areIntersectingOrTouching(range, initialSelection)) {\n return [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n }\n }\n return null;\n });\n }\n accessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n return true;\n}\nexport async function getDocumentRangeFormattingEditsUntilResult(workerService, languageFeaturesService, model, range, options, token) {\n const providers = languageFeaturesService.documentRangeFormattingEditProvider.ordered(model);\n for (const provider of providers) {\n const rawEdits = await Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(onUnexpectedExternalError);\n if (isNonEmptyArray(rawEdits)) {\n return await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n }\n }\n return undefined;\n}\nexport async function getDocumentFormattingEditsUntilResult(workerService, languageFeaturesService, model, options, token) {\n const providers = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n for (const provider of providers) {\n const rawEdits = await Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(onUnexpectedExternalError);\n if (isNonEmptyArray(rawEdits)) {\n return await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n }\n }\n return undefined;\n}\nexport function getOnTypeFormattingEdits(workerService, languageFeaturesService, model, position, ch, options, token) {\n const providers = languageFeaturesService.onTypeFormattingEditProvider.ordered(model);\n if (providers.length === 0) {\n return Promise.resolve(undefined);\n }\n if (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) {\n return Promise.resolve(undefined);\n }\n return Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, token)).catch(onUnexpectedExternalError).then(edits => {\n return workerService.computeMoreMinimalEdits(model.uri, edits);\n });\n}\nCommandsRegistry.registerCommand('_executeFormatRangeProvider', async function (accessor, ...args) {\n const [resource, range, options] = args;\n assertType(URI.isUri(resource));\n assertType(Range.isIRange(range));\n const resolverService = accessor.get(ITextModelService);\n const workerService = accessor.get(IEditorWorkerService);\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const reference = await resolverService.createModelReference(resource);\n try {\n return getDocumentRangeFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, Range.lift(range), options, CancellationToken.None);\n }\n finally {\n reference.dispose();\n }\n});\nCommandsRegistry.registerCommand('_executeFormatDocumentProvider', async function (accessor, ...args) {\n const [resource, options] = args;\n assertType(URI.isUri(resource));\n const resolverService = accessor.get(ITextModelService);\n const workerService = accessor.get(IEditorWorkerService);\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const reference = await resolverService.createModelReference(resource);\n try {\n return getDocumentFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, options, CancellationToken.None);\n }\n finally {\n reference.dispose();\n }\n});\nCommandsRegistry.registerCommand('_executeFormatOnTypeProvider', async function (accessor, ...args) {\n const [resource, position, ch, options] = args;\n assertType(URI.isUri(resource));\n assertType(Position.isIPosition(position));\n assertType(typeof ch === 'string');\n const resolverService = accessor.get(ITextModelService);\n const workerService = accessor.get(IEditorWorkerService);\n const languageFeaturesService = accessor.get(ILanguageFeaturesService);\n const reference = await resolverService.createModelReference(resource);\n try {\n return getOnTypeFormattingEdits(workerService, languageFeaturesService, reference.object.textEditorModel, Position.lift(position), ch, options, CancellationToken.None);\n }\n finally {\n reference.dispose();\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { KeyChord } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\nimport { CharacterSet } from '../../../common/core/characterClassifier.js';\nimport { Range } from '../../../common/core/range.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { formatDocumentRangesWithSelectedProvider, formatDocumentWithSelectedProvider, getOnTypeFormattingEdits } from './format.js';\nimport { FormattingEdit } from './formattingEdit.js';\nimport * as nls from '../../../../nls.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { CommandsRegistry, ICommandService } from '../../../../platform/commands/common/commands.js';\nimport { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IEditorProgressService, Progress } from '../../../../platform/progress/common/progress.js';\nlet FormatOnType = class FormatOnType {\n constructor(_editor, _languageFeaturesService, _workerService, _accessibilitySignalService) {\n this._editor = _editor;\n this._languageFeaturesService = _languageFeaturesService;\n this._workerService = _workerService;\n this._accessibilitySignalService = _accessibilitySignalService;\n this._disposables = new DisposableStore();\n this._sessionDisposables = new DisposableStore();\n this._disposables.add(_languageFeaturesService.onTypeFormattingEditProvider.onDidChange(this._update, this));\n this._disposables.add(_editor.onDidChangeModel(() => this._update()));\n this._disposables.add(_editor.onDidChangeModelLanguage(() => this._update()));\n this._disposables.add(_editor.onDidChangeConfiguration(e => {\n if (e.hasChanged(56 /* EditorOption.formatOnType */)) {\n this._update();\n }\n }));\n this._update();\n }\n dispose() {\n this._disposables.dispose();\n this._sessionDisposables.dispose();\n }\n _update() {\n // clean up\n this._sessionDisposables.clear();\n // we are disabled\n if (!this._editor.getOption(56 /* EditorOption.formatOnType */)) {\n return;\n }\n // no model\n if (!this._editor.hasModel()) {\n return;\n }\n const model = this._editor.getModel();\n // no support\n const [support] = this._languageFeaturesService.onTypeFormattingEditProvider.ordered(model);\n if (!support || !support.autoFormatTriggerCharacters) {\n return;\n }\n // register typing listeners that will trigger the format\n const triggerChars = new CharacterSet();\n for (const ch of support.autoFormatTriggerCharacters) {\n triggerChars.add(ch.charCodeAt(0));\n }\n this._sessionDisposables.add(this._editor.onDidType((text) => {\n const lastCharCode = text.charCodeAt(text.length - 1);\n if (triggerChars.has(lastCharCode)) {\n this._trigger(String.fromCharCode(lastCharCode));\n }\n }));\n }\n _trigger(ch) {\n if (!this._editor.hasModel()) {\n return;\n }\n if (this._editor.getSelections().length > 1 || !this._editor.getSelection().isEmpty()) {\n return;\n }\n const model = this._editor.getModel();\n const position = this._editor.getPosition();\n const cts = new CancellationTokenSource();\n // install a listener that checks if edits happens before the\n // position on which we format right now. If so, we won't\n // apply the format edits\n const unbind = this._editor.onDidChangeModelContent((e) => {\n if (e.isFlush) {\n // a model.setValue() was called\n // cancel only once\n cts.cancel();\n unbind.dispose();\n return;\n }\n for (let i = 0, len = e.changes.length; i < len; i++) {\n const change = e.changes[i];\n if (change.range.endLineNumber <= position.lineNumber) {\n // cancel only once\n cts.cancel();\n unbind.dispose();\n return;\n }\n }\n });\n getOnTypeFormattingEdits(this._workerService, this._languageFeaturesService, model, position, ch, model.getFormattingOptions(), cts.token).then(edits => {\n if (cts.token.isCancellationRequested) {\n return;\n }\n if (isNonEmptyArray(edits)) {\n this._accessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture: false });\n FormattingEdit.execute(this._editor, edits, true);\n }\n }).finally(() => {\n unbind.dispose();\n });\n }\n};\nFormatOnType.ID = 'editor.contrib.autoFormat';\nFormatOnType = __decorate([\n __param(1, ILanguageFeaturesService),\n __param(2, IEditorWorkerService),\n __param(3, IAccessibilitySignalService)\n], FormatOnType);\nexport { FormatOnType };\nlet FormatOnPaste = class FormatOnPaste {\n constructor(editor, _languageFeaturesService, _instantiationService) {\n this.editor = editor;\n this._languageFeaturesService = _languageFeaturesService;\n this._instantiationService = _instantiationService;\n this._callOnDispose = new DisposableStore();\n this._callOnModel = new DisposableStore();\n this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update()));\n this._callOnDispose.add(editor.onDidChangeModel(() => this._update()));\n this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update()));\n this._callOnDispose.add(_languageFeaturesService.documentRangeFormattingEditProvider.onDidChange(this._update, this));\n }\n dispose() {\n this._callOnDispose.dispose();\n this._callOnModel.dispose();\n }\n _update() {\n // clean up\n this._callOnModel.clear();\n // we are disabled\n if (!this.editor.getOption(55 /* EditorOption.formatOnPaste */)) {\n return;\n }\n // no model\n if (!this.editor.hasModel()) {\n return;\n }\n // no formatter\n if (!this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())) {\n return;\n }\n this._callOnModel.add(this.editor.onDidPaste(({ range }) => this._trigger(range)));\n }\n _trigger(range) {\n if (!this.editor.hasModel()) {\n return;\n }\n if (this.editor.getSelections().length > 1) {\n return;\n }\n this._instantiationService.invokeFunction(formatDocumentRangesWithSelectedProvider, this.editor, range, 2 /* FormattingMode.Silent */, Progress.None, CancellationToken.None, false).catch(onUnexpectedError);\n }\n};\nFormatOnPaste.ID = 'editor.contrib.formatOnPaste';\nFormatOnPaste = __decorate([\n __param(1, ILanguageFeaturesService),\n __param(2, IInstantiationService)\n], FormatOnPaste);\nclass FormatDocumentAction extends EditorAction {\n constructor() {\n super({\n id: 'editor.action.formatDocument',\n label: nls.localize('formatDocument.label', \"Format Document\"),\n alias: 'Format Document',\n precondition: ContextKeyExpr.and(EditorContextKeys.notInCompositeEditor, EditorContextKeys.writable, EditorContextKeys.hasDocumentFormattingProvider),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* KeyMod.Shift */ | 512 /* KeyMod.Alt */ | 36 /* KeyCode.KeyF */,\n linux: { primary: 2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 39 /* KeyCode.KeyI */ },\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n contextMenuOpts: {\n group: '1_modification',\n order: 1.3\n }\n });\n }\n async run(accessor, editor) {\n if (editor.hasModel()) {\n const instaService = accessor.get(IInstantiationService);\n const progressService = accessor.get(IEditorProgressService);\n await progressService.showWhile(instaService.invokeFunction(formatDocumentWithSelectedProvider, editor, 1 /* FormattingMode.Explicit */, Progress.None, CancellationToken.None, true), 250);\n }\n }\n}\nclass FormatSelectionAction extends EditorAction {\n constructor() {\n super({\n id: 'editor.action.formatSelection',\n label: nls.localize('formatSelection.label', \"Format Selection\"),\n alias: 'Format Selection',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasDocumentSelectionFormattingProvider),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* KeyMod.CtrlCmd */ | 41 /* KeyCode.KeyK */, 2048 /* KeyMod.CtrlCmd */ | 36 /* KeyCode.KeyF */),\n weight: 100 /* KeybindingWeight.EditorContrib */\n },\n contextMenuOpts: {\n when: EditorContextKeys.hasNonEmptySelection,\n group: '1_modification',\n order: 1.31\n }\n });\n }\n async run(accessor, editor) {\n if (!editor.hasModel()) {\n return;\n }\n const instaService = accessor.get(IInstantiationService);\n const model = editor.getModel();\n const ranges = editor.getSelections().map(range => {\n return range.isEmpty()\n ? new Range(range.startLineNumber, 1, range.startLineNumber, model.getLineMaxColumn(range.startLineNumber))\n : range;\n });\n const progressService = accessor.get(IEditorProgressService);\n await progressService.showWhile(instaService.invokeFunction(formatDocumentRangesWithSelectedProvider, editor, ranges, 1 /* FormattingMode.Explicit */, Progress.None, CancellationToken.None, true), 250);\n }\n}\nregisterEditorContribution(FormatOnType.ID, FormatOnType, 2 /* EditorContributionInstantiation.BeforeFirstInteraction */);\nregisterEditorContribution(FormatOnPaste.ID, FormatOnPaste, 2 /* EditorContributionInstantiation.BeforeFirstInteraction */);\nregisterEditorAction(FormatDocumentAction);\nregisterEditorAction(FormatSelectionAction);\n// this is the old format action that does both (format document OR format selection)\n// and we keep it here such that existing keybinding configurations etc will still work\nCommandsRegistry.registerCommand('editor.action.format', async (accessor) => {\n const editor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n if (!editor || !editor.hasModel()) {\n return;\n }\n const commandService = accessor.get(ICommandService);\n if (editor.getSelection().isEmpty()) {\n await commandService.executeCommand('editor.action.formatDocument');\n }\n else {\n await commandService.executeCommand('editor.action.formatSelection');\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { EditOperation } from '../../../common/core/editOperation.js';\nimport { Range } from '../../../common/core/range.js';\nimport { StableEditorScrollState } from '../../../browser/stableEditorScroll.js';\nexport class FormattingEdit {\n static _handleEolEdits(editor, edits) {\n let newEol = undefined;\n const singleEdits = [];\n for (const edit of edits) {\n if (typeof edit.eol === 'number') {\n newEol = edit.eol;\n }\n if (edit.range && typeof edit.text === 'string') {\n singleEdits.push(edit);\n }\n }\n if (typeof newEol === 'number') {\n if (editor.hasModel()) {\n editor.getModel().pushEOL(newEol);\n }\n }\n return singleEdits;\n }\n static _isFullModelReplaceEdit(editor, edit) {\n if (!editor.hasModel()) {\n return false;\n }\n const model = editor.getModel();\n const editRange = model.validateRange(edit.range);\n const fullModelRange = model.getFullModelRange();\n return fullModelRange.equalsRange(editRange);\n }\n static execute(editor, _edits, addUndoStops) {\n if (addUndoStops) {\n editor.pushUndoStop();\n }\n const scrollState = StableEditorScrollState.capture(editor);\n const edits = FormattingEdit._handleEolEdits(editor, _edits);\n if (edits.length === 1 && FormattingEdit._isFullModelReplaceEdit(editor, edits[0])) {\n // We use replace semantics and hope that markers stay put...\n editor.executeEdits('formatEditsCommand', edits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));\n }\n else {\n editor.executeEdits('formatEditsCommand', edits.map(edit => EditOperation.replaceMove(Range.lift(edit.range), edit.text)));\n }\n if (addUndoStops) {\n editor.pushUndoStop();\n }\n scrollState.restoreRelativeVerticalPositionOfCursor(editor);\n }\n}\n"],"names":["EditorFontZoomIn","constructor","super","id","label","alias","precondition","undefined","run","accessor","editor","EditorFontZoomOut","EditorFontZoomReset","getRealAndSyntheticDocumentFormattersOrdered","documentFormattingEditProvider","documentRangeFormattingEditProvider","model","result","seen","docFormatter","ordered","formatter","push","extensionId","add","rangeFormatter","has","displayName","provideDocumentFormattingEdits","options","token","provideDocumentRangeFormattingEdits","getFullModelRange","FormattingConflicts","setFormatterSelector","selector","dispose","_selectors","unshift","select","document","mode","kind","length","async","formatDocumentRangesWithSelectedProvider","editorOrModel","rangeOrRanges","progress","userGesture","instaService","get","documentRangeFormattingEditProviderRegistry","getModel","provider","selected","report","invokeFunction","formatDocumentRangesWithProvider","_a","_b","workerService","logService","accessibilitySignalService","cts","ranges","len","range","sort","getStartPosition","getEndPosition","computeEdits","trace","value","getFormattingOptions","hasIntersectingEdit","a","b","mergedA","reduce","acc","val","some","x","edit","otherEdit","allEdits","rawEditsList","provideDocumentRangesFormattingEdits","isCancellationRequested","i","j","mergedRange","edits","splice","rawEdits","minimalEdits","computeMoreMinimalEdits","uri","revealPositionInCenterIfOutsideViewport","getPosition","initialSelection","startLineNumber","startColumn","endLineNumber","endColumn","pushEditOperations","map","text","forceMoveMarkers","undoEdits","playSignal","formatDocumentWithSelectedProvider","languageFeaturesService","formatDocumentWithProvider","getOnTypeFormattingEdits","position","ch","providers","onTypeFormattingEditProvider","autoFormatTriggerCharacters","indexOf","Promise","resolve","provideOnTypeFormattingEdits","catch","then","args","resource","resolverService","reference","createModelReference","getDocumentRangeFormattingEditsUntilResult","object","textEditorModel","getDocumentFormattingEditsUntilResult","__decorate","decorators","target","key","desc","d","c","arguments","r","Object","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","FormatOnType","_editor","_languageFeaturesService","_workerService","_accessibilitySignalService","this","_disposables","_sessionDisposables","onDidChange","_update","onDidChangeModel","onDidChangeModelLanguage","onDidChangeConfiguration","e","hasChanged","clear","getOption","hasModel","support","triggerChars","charCodeAt","onDidType","lastCharCode","_trigger","String","fromCharCode","getSelections","getSelection","isEmpty","unbind","onDidChangeModelContent","isFlush","cancel","changes","lineNumber","finally","ID","FormatOnPaste","_instantiationService","_callOnDispose","_callOnModel","onDidPaste","FormatDocumentAction","kbOpts","kbExpr","primary","linux","weight","contextMenuOpts","group","order","progressService","showWhile","FormatSelectionAction","when","getLineMaxColumn","getFocusedCodeEditor","commandService","executeCommand","FormattingEdit","_handleEolEdits","newEol","singleEdits","eol","pushEOL","_isFullModelReplaceEdit","editRange","validateRange","equalsRange","execute","_edits","addUndoStops","pushUndoStop","scrollState","executeEdits","restoreRelativeVerticalPositionOfCursor"],"sourceRoot":""}