@codingame/monaco-vscode-api 1.69.4 → 1.69.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/configuration.js +2 -1
- package/dist/contextkey.js +128 -1
- package/dist/dialogs.d.ts +7 -0
- package/dist/dialogs.js +97 -0
- package/dist/extHost.js +4 -3
- package/dist/files.js +2 -2
- package/dist/keybindings.js +3 -3
- package/dist/languageConfiguration.js +1 -1
- package/dist/languageService.js +2 -2
- package/dist/languages.js +1 -1
- package/dist/layout.js +1318 -0
- package/dist/messages.d.ts +3 -0
- package/dist/messages.js +4 -3619
- package/dist/missing-services.js +771 -816
- package/dist/modelEditor.js +3 -2
- package/dist/notifications.d.ts +7 -0
- package/dist/notifications.js +2577 -0
- package/dist/polyfill.js +5815 -0
- package/dist/services.js +2 -2
- package/dist/services2.js +1 -128
- package/dist/snippets.js +2 -1
- package/dist/textmate.js +2 -2
- package/dist/theme.js +1 -1
- package/dist/tokenClassification.js +1 -1
- package/dist/tools.js +1 -1
- package/dist/types.js +46 -0
- package/package.json +15 -1
package/dist/missing-services.js
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
|
+
import { R as RawContextKey, N as NoOpNotification$1, s as shuffle, _ as __decorate, a as __param } from './contextkey.js';
|
|
1
2
|
import { VSBuffer as VSBuffer$1 } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
2
|
-
import { Themable as Themable$1 } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
3
3
|
import { Disposable, DisposableStore, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
+
import { onUnexpectedError, ErrorHandler as ErrorHandler$1, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
5
|
+
import { Themable as Themable$1 } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
4
6
|
import { ProgressBar as ProgressBar$1 } from 'monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js';
|
|
5
7
|
import { mixin, equals, deepClone, deepFreeze } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
6
|
-
import { RunOnceScheduler,
|
|
7
|
-
import {
|
|
8
|
-
import { isNumber, isObject
|
|
8
|
+
import { RunOnceScheduler, timeout, Promises } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
9
|
+
import { show, hide, createStyleSheet, trackFocus } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
10
|
+
import { isNumber, isObject, isUndefinedOrNull } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
9
11
|
import { Color as Color$1 } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
10
12
|
import { LanguageService as LanguageService$1 } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
13
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
11
14
|
import { LanguagesRegistry as LanguagesRegistry$1 } from 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
|
|
12
15
|
import { firstOrDefault, distinct, equals as equals$1, binarySearch, range } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
13
16
|
import { PLAINTEXT_LANGUAGE_ID, ModesRegistry } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
|
14
17
|
import { TokenizationRegistry } from 'monaco-editor/esm/vs/editor/common/languages.js';
|
|
15
18
|
import { NoOpNotification } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
16
|
-
import {
|
|
17
|
-
import { StandaloneServices, StandaloneConfigurationService as StandaloneConfigurationService$1 } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
19
|
+
import { StandaloneConfigurationService as StandaloneConfigurationService$1, StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
18
20
|
import { Configuration as Configuration$1, ConfigurationModel as ConfigurationModel$1, ConfigurationChangeEvent } from 'monaco-editor/esm/vs/platform/configuration/common/configurationModels.js';
|
|
19
21
|
import { DefaultConfigurationModel } from 'monaco-editor/esm/vs/platform/configuration/common/configurations.js';
|
|
20
22
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
21
23
|
import { TernarySearchTree as TernarySearchTree$1, ResourceMap as ResourceMap$1 } from 'monaco-editor/esm/vs/base/common/map.js';
|
|
22
|
-
import {
|
|
23
|
-
import { ContextKeyExpr, ContextKeyDefinedExpr, RawContextKey as RawContextKey$1, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
24
|
-
import { _ as __decorate, a as __param, R as RawContextKey } from './contextkey.js';
|
|
25
|
-
import { onUnexpectedError, ErrorHandler as ErrorHandler$1, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
26
|
-
import { clearPlatformLanguageAssociations, registerPlatformLanguageAssociation, getLanguageIds } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
|
|
27
|
-
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
24
|
+
import { regExpLeadsToEndlessLoop, compareIgnoreCase, compareSubstring, compareSubstringIgnoreCase, compare as compare$1 } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
28
25
|
import { Extensions as Extensions$2, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
29
|
-
import {
|
|
30
|
-
import { List as List$1 } from 'monaco-editor/esm/vs/base/browser/ui/list/listWidget.js';
|
|
26
|
+
import { getConfigurationValue, addToValueTree, removeFromValueTree, toValuesTree } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
31
27
|
import { Event, EventBufferer } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
28
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
29
|
+
import { RawContextKey as RawContextKey$1, ContextKeyExpr, ContextKeyDefinedExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
30
|
+
import { clearPlatformLanguageAssociations, registerPlatformLanguageAssociation, getLanguageIds } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
|
|
31
|
+
import { WorkspaceFolder as WorkspaceFolder$1, isSingleFolderWorkspaceIdentifier } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
32
|
+
import { joinPath, ExtUri, extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
33
|
+
import { List as List$1 } from 'monaco-editor/esm/vs/base/browser/ui/list/listWidget.js';
|
|
32
34
|
import { ListView } from 'monaco-editor/esm/vs/base/browser/ui/list/listView.js';
|
|
33
35
|
import { CombinedSpliceable } from 'monaco-editor/esm/vs/base/browser/ui/list/splice.js';
|
|
34
36
|
import { DomEmitter, stopEvent } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
35
37
|
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
36
38
|
import { ListError } from 'monaco-editor/esm/vs/base/browser/ui/list/list.js';
|
|
37
39
|
import { clamp } from 'monaco-editor/esm/vs/base/common/numbers.js';
|
|
38
|
-
import {
|
|
40
|
+
import { isMacintosh, OS } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
39
41
|
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
40
42
|
import { matchesPrefix } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
41
43
|
import { Gesture } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
@@ -43,12 +45,11 @@ import { SnippetParser } from 'monaco-editor/esm/vs/editor/contrib/snippet/brows
|
|
|
43
45
|
import { QuickInputController } from 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
44
46
|
import { getSingletonServiceDescriptors, registerSingleton } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
45
47
|
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
46
|
-
import
|
|
48
|
+
import { I as IFileService, b as IUriIdentityService, r as refineServiceDecorator, p as productSchemaId, c as IEditorService, d as IPaneCompositePartService, e as ITextFileService, f as IEditorGroupsService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, S as Services, j as IProductService, k as ILanguageStatusService, l as IHostService, m as ISnippetsService } from './services2.js';
|
|
47
49
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
48
50
|
import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
|
|
49
51
|
import { USLayoutResolvedKeybinding } from 'monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js';
|
|
50
52
|
import { SimpleKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
|
|
51
|
-
import { ExtUri, joinPath, extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
52
53
|
import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
|
|
53
54
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
54
55
|
import { hash } from 'monaco-editor/esm/vs/base/common/hash.js';
|
|
@@ -56,7 +57,6 @@ import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
|
|
|
56
57
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
57
58
|
import { Lazy } from 'monaco-editor/esm/vs/base/common/lazy.js';
|
|
58
59
|
import { LRUCachedFunction } from 'monaco-editor/esm/vs/base/common/cache.js';
|
|
59
|
-
import { getConfigurationValue, addToValueTree, removeFromValueTree, toValuesTree } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
60
60
|
import { Extensions as Extensions$3 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
61
61
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
62
62
|
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
@@ -682,587 +682,266 @@ class Themable extends Disposable {
|
|
|
682
682
|
const Extensions = {
|
|
683
683
|
JSONContribution: 'base.contributions.json'
|
|
684
684
|
};
|
|
685
|
-
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
685
|
+
const CSS_DONE = 'done';
|
|
686
|
+
const CSS_ACTIVE = 'active';
|
|
687
|
+
const CSS_INFINITE = 'infinite';
|
|
688
|
+
const CSS_INFINITE_LONG_RUNNING = 'infinite-long-running';
|
|
689
|
+
const CSS_DISCRETE = 'discrete';
|
|
690
|
+
const defaultOpts = {
|
|
691
|
+
progressBarBackground: ( (Color$1.fromHex('#0E70C0')))
|
|
692
|
+
};
|
|
693
|
+
class ProgressBar extends Disposable {
|
|
694
|
+
constructor(container, options) {
|
|
695
|
+
super();
|
|
696
|
+
this.options = options || Object.create(null);
|
|
697
|
+
mixin(this.options, defaultOpts, false);
|
|
698
|
+
this.workedVal = 0;
|
|
699
|
+
this.progressBarBackground = this.options.progressBarBackground;
|
|
700
|
+
this.showDelayedScheduler = this._register(( (new RunOnceScheduler(() => show(this.element), 0))));
|
|
701
|
+
this.longRunningScheduler = this._register(( (new RunOnceScheduler(
|
|
702
|
+
() => this.infiniteLongRunning(),
|
|
703
|
+
ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD
|
|
704
|
+
))));
|
|
705
|
+
this.create(container);
|
|
702
706
|
}
|
|
703
|
-
|
|
704
|
-
|
|
707
|
+
create(container) {
|
|
708
|
+
this.element = document.createElement('div');
|
|
709
|
+
this.element.classList.add('monaco-progress-container');
|
|
710
|
+
this.element.setAttribute('role', 'progressbar');
|
|
711
|
+
this.element.setAttribute('aria-valuemin', '0');
|
|
712
|
+
container.appendChild(this.element);
|
|
713
|
+
this.bit = document.createElement('div');
|
|
714
|
+
this.bit.classList.add('progress-bit');
|
|
715
|
+
this.element.appendChild(this.bit);
|
|
716
|
+
this.applyStyles();
|
|
705
717
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
);
|
|
718
|
+
off() {
|
|
719
|
+
this.bit.style.width = 'inherit';
|
|
720
|
+
this.bit.style.opacity = '1';
|
|
721
|
+
this.element.classList.remove(CSS_ACTIVE, CSS_INFINITE, CSS_INFINITE_LONG_RUNNING, CSS_DISCRETE);
|
|
722
|
+
this.workedVal = 0;
|
|
723
|
+
this.totalWork = undefined;
|
|
724
|
+
this.longRunningScheduler.cancel();
|
|
710
725
|
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
AmbiguousCharacters.ambiguousCharacterData = ( (new Lazy(() => {
|
|
714
|
-
return JSON.parse('{\"_common\":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],\"_default\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"cs\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"de\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"es\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"fr\":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"it\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ja\":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],\"ko\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pl\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pt-BR\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"qps-ploc\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ru\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"tr\":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"zh-hans\":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],\"zh-hant\":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}');
|
|
715
|
-
})));
|
|
716
|
-
AmbiguousCharacters.cache = ( (new LRUCachedFunction((locales) => {
|
|
717
|
-
function arrayToMap(arr) {
|
|
718
|
-
const result = ( (new Map()));
|
|
719
|
-
for (let i = 0; i < arr.length; i += 2) {
|
|
720
|
-
result.set(arr[i], arr[i + 1]);
|
|
721
|
-
}
|
|
722
|
-
return result;
|
|
726
|
+
done() {
|
|
727
|
+
return this.doDone(true);
|
|
723
728
|
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
for (const [key, value] of map2) {
|
|
727
|
-
result.set(key, value);
|
|
728
|
-
}
|
|
729
|
-
return result;
|
|
729
|
+
stop() {
|
|
730
|
+
return this.doDone(false);
|
|
730
731
|
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
732
|
+
doDone(delayed) {
|
|
733
|
+
this.element.classList.add(CSS_DONE);
|
|
734
|
+
if (!this.element.classList.contains(CSS_INFINITE)) {
|
|
735
|
+
this.bit.style.width = 'inherit';
|
|
736
|
+
if (delayed) {
|
|
737
|
+
setTimeout(() => this.off(), 200);
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
this.off();
|
|
741
|
+
}
|
|
734
742
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
if (
|
|
738
|
-
|
|
743
|
+
else {
|
|
744
|
+
this.bit.style.opacity = '0';
|
|
745
|
+
if (delayed) {
|
|
746
|
+
setTimeout(() => this.off(), 200);
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
this.off();
|
|
739
750
|
}
|
|
740
751
|
}
|
|
741
|
-
return
|
|
742
|
-
}
|
|
743
|
-
const data = _a$2.ambiguousCharacterData.getValue();
|
|
744
|
-
let filteredLocales = locales.filter((l) => !l.startsWith('_') && l in data);
|
|
745
|
-
if (filteredLocales.length === 0) {
|
|
746
|
-
filteredLocales = ['_default'];
|
|
747
|
-
}
|
|
748
|
-
let languageSpecificMap = undefined;
|
|
749
|
-
for (const locale of filteredLocales) {
|
|
750
|
-
const map = arrayToMap(data[locale]);
|
|
751
|
-
languageSpecificMap = intersectMaps(languageSpecificMap, map);
|
|
752
|
+
return this;
|
|
752
753
|
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
() => ( (Object.keys(AmbiguousCharacters.ambiguousCharacterData.getValue()))).filter((k) => !k.startsWith('_'))
|
|
761
|
-
)));
|
|
762
|
-
function isString(str) {
|
|
763
|
-
return (typeof str === 'string');
|
|
764
|
-
}
|
|
765
|
-
function isStringArray(value) {
|
|
766
|
-
return Array.isArray(value) && value.every(elem => isString(elem));
|
|
767
|
-
}
|
|
768
|
-
function isObject(obj) {
|
|
769
|
-
return typeof obj === 'object'
|
|
770
|
-
&& obj !== null
|
|
771
|
-
&& !Array.isArray(obj)
|
|
772
|
-
&& !(obj instanceof RegExp)
|
|
773
|
-
&& !(obj instanceof Date);
|
|
774
|
-
}
|
|
775
|
-
function isUndefined(obj) {
|
|
776
|
-
return (typeof obj === 'undefined');
|
|
777
|
-
}
|
|
778
|
-
function isUndefinedOrNull(obj) {
|
|
779
|
-
return (isUndefined(obj) || obj === null);
|
|
780
|
-
}
|
|
781
|
-
function assertAllDefined(...args) {
|
|
782
|
-
const result = [];
|
|
783
|
-
for (let i = 0; i < args.length; i++) {
|
|
784
|
-
const arg = args[i];
|
|
785
|
-
if (isUndefinedOrNull(arg)) {
|
|
786
|
-
throw new Error(`Assertion Failed: argument at index ${i} is undefined or null`);
|
|
787
|
-
}
|
|
788
|
-
result.push(arg);
|
|
754
|
+
infinite() {
|
|
755
|
+
this.bit.style.width = '2%';
|
|
756
|
+
this.bit.style.opacity = '1';
|
|
757
|
+
this.element.classList.remove(CSS_DISCRETE, CSS_DONE, CSS_INFINITE_LONG_RUNNING);
|
|
758
|
+
this.element.classList.add(CSS_ACTIVE, CSS_INFINITE);
|
|
759
|
+
this.longRunningScheduler.schedule();
|
|
760
|
+
return this;
|
|
789
761
|
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
793
|
-
function isEmptyObject(obj) {
|
|
794
|
-
if (!isObject(obj)) {
|
|
795
|
-
return false;
|
|
762
|
+
infiniteLongRunning() {
|
|
763
|
+
this.element.classList.add(CSS_INFINITE_LONG_RUNNING);
|
|
796
764
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
765
|
+
total(value) {
|
|
766
|
+
this.workedVal = 0;
|
|
767
|
+
this.totalWork = value;
|
|
768
|
+
this.element.setAttribute('aria-valuemax', ( (value.toString())));
|
|
769
|
+
return this;
|
|
801
770
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
function withUndefinedAsNull(x) {
|
|
805
|
-
return typeof x === 'undefined' ? null : x;
|
|
806
|
-
}
|
|
807
|
-
function raceCancellationError(promise, token) {
|
|
808
|
-
return (
|
|
809
|
-
(new Promise((resolve, reject) => {
|
|
810
|
-
const ref = token.onCancellationRequested(() => {
|
|
811
|
-
ref.dispose();
|
|
812
|
-
reject(( (new CancellationError())));
|
|
813
|
-
});
|
|
814
|
-
promise.then(resolve, reject).finally(() => ref.dispose());
|
|
815
|
-
}))
|
|
816
|
-
);
|
|
817
|
-
}
|
|
818
|
-
class Sequencer {
|
|
819
|
-
constructor() {
|
|
820
|
-
this.current = Promise.resolve(null);
|
|
771
|
+
hasTotal() {
|
|
772
|
+
return isNumber(this.totalWork);
|
|
821
773
|
}
|
|
822
|
-
|
|
823
|
-
|
|
774
|
+
worked(value) {
|
|
775
|
+
value = Math.max(1, Number(value));
|
|
776
|
+
return this.doSetWorked(this.workedVal + value);
|
|
824
777
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
this._isOpen = false;
|
|
829
|
-
this._promise = ( (new Promise((c, e) => {
|
|
830
|
-
this._completePromise = c;
|
|
831
|
-
})));
|
|
778
|
+
setWorked(value) {
|
|
779
|
+
value = Math.max(1, Number(value));
|
|
780
|
+
return this.doSetWorked(value);
|
|
832
781
|
}
|
|
833
|
-
|
|
834
|
-
|
|
782
|
+
doSetWorked(value) {
|
|
783
|
+
const totalWork = this.totalWork || 100;
|
|
784
|
+
this.workedVal = value;
|
|
785
|
+
this.workedVal = Math.min(totalWork, this.workedVal);
|
|
786
|
+
this.element.classList.remove(CSS_INFINITE, CSS_INFINITE_LONG_RUNNING, CSS_DONE);
|
|
787
|
+
this.element.classList.add(CSS_ACTIVE, CSS_DISCRETE);
|
|
788
|
+
this.element.setAttribute('aria-valuenow', ( (value.toString())));
|
|
789
|
+
this.bit.style.width = 100 * (this.workedVal / (totalWork)) + '%';
|
|
790
|
+
return this;
|
|
835
791
|
}
|
|
836
|
-
|
|
837
|
-
this.
|
|
838
|
-
this._completePromise(true);
|
|
792
|
+
getContainer() {
|
|
793
|
+
return this.element;
|
|
839
794
|
}
|
|
840
|
-
|
|
841
|
-
|
|
795
|
+
show(delay) {
|
|
796
|
+
this.showDelayedScheduler.cancel();
|
|
797
|
+
if (typeof delay === 'number') {
|
|
798
|
+
this.showDelayedScheduler.schedule(delay);
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
show(this.element);
|
|
802
|
+
}
|
|
842
803
|
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
this._size = 0;
|
|
847
|
-
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
|
848
|
-
this.outstandingPromises = [];
|
|
849
|
-
this.runningPromises = 0;
|
|
850
|
-
this._onDrained = ( (new Emitter()));
|
|
804
|
+
hide() {
|
|
805
|
+
hide(this.element);
|
|
806
|
+
this.showDelayedScheduler.cancel();
|
|
851
807
|
}
|
|
852
|
-
|
|
853
|
-
|
|
808
|
+
style(styles) {
|
|
809
|
+
this.progressBarBackground = styles.progressBarBackground;
|
|
810
|
+
this.applyStyles();
|
|
854
811
|
}
|
|
855
|
-
|
|
856
|
-
|
|
812
|
+
applyStyles() {
|
|
813
|
+
if (this.bit) {
|
|
814
|
+
const background = this.progressBarBackground ? ( (this.progressBarBackground.toString())) : '';
|
|
815
|
+
this.bit.style.backgroundColor = background;
|
|
816
|
+
}
|
|
857
817
|
}
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
consumed() {
|
|
877
|
-
this._size--;
|
|
878
|
-
this.runningPromises--;
|
|
879
|
-
if (this.outstandingPromises.length > 0) {
|
|
880
|
-
this.consume();
|
|
881
|
-
}
|
|
882
|
-
else {
|
|
883
|
-
this._onDrained.fire();
|
|
884
|
-
}
|
|
818
|
+
}
|
|
819
|
+
ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD = 10000;
|
|
820
|
+
class LanguageService extends Disposable {
|
|
821
|
+
constructor(warnOnOverwrite = false) {
|
|
822
|
+
super();
|
|
823
|
+
this._onDidEncounterLanguage = this._register(( (new Emitter())));
|
|
824
|
+
this.onDidEncounterLanguage = this._onDidEncounterLanguage.event;
|
|
825
|
+
this._onDidChange = this._register(( (new Emitter(
|
|
826
|
+
{ leakWarningThreshold: 200 }
|
|
827
|
+
))));
|
|
828
|
+
this.onDidChange = this._onDidChange.event;
|
|
829
|
+
LanguageService.instanceCount++;
|
|
830
|
+
this._encounteredLanguages = ( (new Set()));
|
|
831
|
+
this._registry = this._register(( (new LanguagesRegistry$1(true, warnOnOverwrite))));
|
|
832
|
+
this.languageIdCodec = this._registry.languageIdCodec;
|
|
833
|
+
this._register(this._registry.onDidChange(() => this._onDidChange.fire()));
|
|
885
834
|
}
|
|
886
835
|
dispose() {
|
|
887
|
-
|
|
836
|
+
LanguageService.instanceCount--;
|
|
837
|
+
super.dispose();
|
|
888
838
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
constructor() {
|
|
892
|
-
super(1);
|
|
839
|
+
registerLanguage(def) {
|
|
840
|
+
return this._registry.registerLanguage(def);
|
|
893
841
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
constructor() {
|
|
897
|
-
this.queues = ( (new Map()));
|
|
898
|
-
this.drainers = ( (new Set()));
|
|
842
|
+
isRegisteredLanguageId(languageId) {
|
|
843
|
+
return this._registry.isRegisteredLanguageId(languageId);
|
|
899
844
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
return;
|
|
903
|
-
}
|
|
904
|
-
const promise = ( (new DeferredPromise()));
|
|
905
|
-
this.drainers.add(promise);
|
|
906
|
-
return promise.p;
|
|
845
|
+
getRegisteredLanguageIds() {
|
|
846
|
+
return this._registry.getRegisteredLanguageIds();
|
|
907
847
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
if (queue.size > 0) {
|
|
911
|
-
return false;
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
return true;
|
|
848
|
+
getSortedRegisteredLanguageNames() {
|
|
849
|
+
return this._registry.getSortedRegisteredLanguageNames();
|
|
915
850
|
}
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
let queue = this.queues.get(key);
|
|
919
|
-
if (!queue) {
|
|
920
|
-
queue = ( (new Queue()));
|
|
921
|
-
Event.once(queue.onDrained)(() => {
|
|
922
|
-
queue?.dispose();
|
|
923
|
-
this.queues.delete(key);
|
|
924
|
-
this.onDidQueueDrain();
|
|
925
|
-
});
|
|
926
|
-
this.queues.set(key, queue);
|
|
927
|
-
}
|
|
928
|
-
return queue;
|
|
851
|
+
getLanguageName(languageId) {
|
|
852
|
+
return this._registry.getLanguageName(languageId);
|
|
929
853
|
}
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
this.releaseDrainers();
|
|
854
|
+
getMimeType(languageId) {
|
|
855
|
+
return this._registry.getMimeType(languageId);
|
|
935
856
|
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
drainer.complete();
|
|
939
|
-
}
|
|
940
|
-
this.drainers.clear();
|
|
857
|
+
getIcon(languageId) {
|
|
858
|
+
return this._registry.getIcon(languageId);
|
|
941
859
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
queue.dispose();
|
|
945
|
-
}
|
|
946
|
-
this.queues.clear();
|
|
947
|
-
this.releaseDrainers();
|
|
860
|
+
getExtensions(languageId) {
|
|
861
|
+
return this._registry.getExtensions(languageId);
|
|
948
862
|
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
constructor(interval, nowFn = () => Date.now()) {
|
|
952
|
-
this.interval = interval;
|
|
953
|
-
this.nowFn = nowFn;
|
|
954
|
-
this.lastIncrementTime = 0;
|
|
955
|
-
this.value = 0;
|
|
863
|
+
getFilenames(languageId) {
|
|
864
|
+
return this._registry.getFilenames(languageId);
|
|
956
865
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
if (now - this.lastIncrementTime > this.interval) {
|
|
960
|
-
this.lastIncrementTime = now;
|
|
961
|
-
this.value = 0;
|
|
962
|
-
}
|
|
963
|
-
this.value++;
|
|
964
|
-
return this.value;
|
|
866
|
+
getConfigurationFiles(languageId) {
|
|
867
|
+
return this._registry.getConfigurationFiles(languageId);
|
|
965
868
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
constructor() {
|
|
969
|
-
this.rejected = false;
|
|
970
|
-
this.resolved = false;
|
|
971
|
-
this.p = ( (new Promise((c, e) => {
|
|
972
|
-
this.completeCallback = c;
|
|
973
|
-
this.errorCallback = e;
|
|
974
|
-
})));
|
|
869
|
+
getLanguageIdByLanguageName(languageName) {
|
|
870
|
+
return this._registry.getLanguageIdByLanguageName(languageName);
|
|
975
871
|
}
|
|
976
|
-
|
|
977
|
-
return this.
|
|
872
|
+
getLanguageIdByMimeType(mimeType) {
|
|
873
|
+
return this._registry.getLanguageIdByMimeType(mimeType);
|
|
978
874
|
}
|
|
979
|
-
|
|
980
|
-
|
|
875
|
+
guessLanguageIdByFilepathOrFirstLine(resource, firstLine) {
|
|
876
|
+
const languageIds = this._registry.guessLanguageIdByFilepathOrFirstLine(resource, firstLine);
|
|
877
|
+
return firstOrDefault(languageIds, null);
|
|
981
878
|
}
|
|
982
|
-
|
|
983
|
-
return
|
|
879
|
+
createById(languageId) {
|
|
880
|
+
return (
|
|
881
|
+
(new LanguageSelection(this.onDidChange, () => {
|
|
882
|
+
return this._createAndGetLanguageIdentifier(languageId);
|
|
883
|
+
}))
|
|
884
|
+
);
|
|
984
885
|
}
|
|
985
|
-
|
|
886
|
+
createByMimeType(mimeType) {
|
|
986
887
|
return (
|
|
987
|
-
(new
|
|
988
|
-
this.
|
|
989
|
-
this.
|
|
990
|
-
resolve();
|
|
888
|
+
(new LanguageSelection(this.onDidChange, () => {
|
|
889
|
+
const languageId = this.getLanguageIdByMimeType(mimeType);
|
|
890
|
+
return this._createAndGetLanguageIdentifier(languageId);
|
|
991
891
|
}))
|
|
992
892
|
);
|
|
993
893
|
}
|
|
994
|
-
|
|
894
|
+
createByFilepathOrFirstLine(resource, firstLine) {
|
|
995
895
|
return (
|
|
996
|
-
(new
|
|
997
|
-
this.
|
|
998
|
-
this.
|
|
999
|
-
resolve();
|
|
896
|
+
(new LanguageSelection(this.onDidChange, () => {
|
|
897
|
+
const languageId = this.guessLanguageIdByFilepathOrFirstLine(resource, firstLine);
|
|
898
|
+
return this._createAndGetLanguageIdentifier(languageId);
|
|
1000
899
|
}))
|
|
1001
900
|
);
|
|
1002
901
|
}
|
|
1003
|
-
|
|
902
|
+
_createAndGetLanguageIdentifier(languageId) {
|
|
903
|
+
if (!languageId || !this.isRegisteredLanguageId(languageId)) {
|
|
904
|
+
languageId = PLAINTEXT_LANGUAGE_ID;
|
|
905
|
+
}
|
|
906
|
+
if (!this._encounteredLanguages.has(languageId)) {
|
|
907
|
+
this._encounteredLanguages.add(languageId);
|
|
908
|
+
TokenizationRegistry.getOrCreate(languageId);
|
|
909
|
+
this._onDidEncounterLanguage.fire(languageId);
|
|
910
|
+
}
|
|
911
|
+
return languageId;
|
|
1004
912
|
}
|
|
1005
913
|
}
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
class ProgressBar extends Disposable {
|
|
1015
|
-
constructor(container, options) {
|
|
1016
|
-
super();
|
|
1017
|
-
this.options = options || Object.create(null);
|
|
1018
|
-
mixin(this.options, defaultOpts, false);
|
|
1019
|
-
this.workedVal = 0;
|
|
1020
|
-
this.progressBarBackground = this.options.progressBarBackground;
|
|
1021
|
-
this.showDelayedScheduler = this._register(( (new RunOnceScheduler(() => show(this.element), 0))));
|
|
1022
|
-
this.longRunningScheduler = this._register(( (new RunOnceScheduler(
|
|
1023
|
-
() => this.infiniteLongRunning(),
|
|
1024
|
-
ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD
|
|
1025
|
-
))));
|
|
1026
|
-
this.create(container);
|
|
1027
|
-
}
|
|
1028
|
-
create(container) {
|
|
1029
|
-
this.element = document.createElement('div');
|
|
1030
|
-
this.element.classList.add('monaco-progress-container');
|
|
1031
|
-
this.element.setAttribute('role', 'progressbar');
|
|
1032
|
-
this.element.setAttribute('aria-valuemin', '0');
|
|
1033
|
-
container.appendChild(this.element);
|
|
1034
|
-
this.bit = document.createElement('div');
|
|
1035
|
-
this.bit.classList.add('progress-bit');
|
|
1036
|
-
this.element.appendChild(this.bit);
|
|
1037
|
-
this.applyStyles();
|
|
1038
|
-
}
|
|
1039
|
-
off() {
|
|
1040
|
-
this.bit.style.width = 'inherit';
|
|
1041
|
-
this.bit.style.opacity = '1';
|
|
1042
|
-
this.element.classList.remove(CSS_ACTIVE, CSS_INFINITE, CSS_INFINITE_LONG_RUNNING, CSS_DISCRETE);
|
|
1043
|
-
this.workedVal = 0;
|
|
1044
|
-
this.totalWork = undefined;
|
|
1045
|
-
this.longRunningScheduler.cancel();
|
|
914
|
+
LanguageService.instanceCount = 0;
|
|
915
|
+
class LanguageSelection {
|
|
916
|
+
constructor(_onDidChangeLanguages, _selector) {
|
|
917
|
+
this._onDidChangeLanguages = _onDidChangeLanguages;
|
|
918
|
+
this._selector = _selector;
|
|
919
|
+
this._listener = null;
|
|
920
|
+
this._emitter = null;
|
|
921
|
+
this.languageId = this._selector();
|
|
1046
922
|
}
|
|
1047
|
-
|
|
1048
|
-
|
|
923
|
+
_dispose() {
|
|
924
|
+
if (this._listener) {
|
|
925
|
+
this._listener.dispose();
|
|
926
|
+
this._listener = null;
|
|
927
|
+
}
|
|
928
|
+
if (this._emitter) {
|
|
929
|
+
this._emitter.dispose();
|
|
930
|
+
this._emitter = null;
|
|
931
|
+
}
|
|
1049
932
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
this.
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
else {
|
|
1065
|
-
this.bit.style.opacity = '0';
|
|
1066
|
-
if (delayed) {
|
|
1067
|
-
setTimeout(() => this.off(), 200);
|
|
1068
|
-
}
|
|
1069
|
-
else {
|
|
1070
|
-
this.off();
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
return this;
|
|
1074
|
-
}
|
|
1075
|
-
infinite() {
|
|
1076
|
-
this.bit.style.width = '2%';
|
|
1077
|
-
this.bit.style.opacity = '1';
|
|
1078
|
-
this.element.classList.remove(CSS_DISCRETE, CSS_DONE, CSS_INFINITE_LONG_RUNNING);
|
|
1079
|
-
this.element.classList.add(CSS_ACTIVE, CSS_INFINITE);
|
|
1080
|
-
this.longRunningScheduler.schedule();
|
|
1081
|
-
return this;
|
|
1082
|
-
}
|
|
1083
|
-
infiniteLongRunning() {
|
|
1084
|
-
this.element.classList.add(CSS_INFINITE_LONG_RUNNING);
|
|
1085
|
-
}
|
|
1086
|
-
total(value) {
|
|
1087
|
-
this.workedVal = 0;
|
|
1088
|
-
this.totalWork = value;
|
|
1089
|
-
this.element.setAttribute('aria-valuemax', ( (value.toString())));
|
|
1090
|
-
return this;
|
|
1091
|
-
}
|
|
1092
|
-
hasTotal() {
|
|
1093
|
-
return isNumber(this.totalWork);
|
|
1094
|
-
}
|
|
1095
|
-
worked(value) {
|
|
1096
|
-
value = Math.max(1, Number(value));
|
|
1097
|
-
return this.doSetWorked(this.workedVal + value);
|
|
1098
|
-
}
|
|
1099
|
-
setWorked(value) {
|
|
1100
|
-
value = Math.max(1, Number(value));
|
|
1101
|
-
return this.doSetWorked(value);
|
|
1102
|
-
}
|
|
1103
|
-
doSetWorked(value) {
|
|
1104
|
-
const totalWork = this.totalWork || 100;
|
|
1105
|
-
this.workedVal = value;
|
|
1106
|
-
this.workedVal = Math.min(totalWork, this.workedVal);
|
|
1107
|
-
this.element.classList.remove(CSS_INFINITE, CSS_INFINITE_LONG_RUNNING, CSS_DONE);
|
|
1108
|
-
this.element.classList.add(CSS_ACTIVE, CSS_DISCRETE);
|
|
1109
|
-
this.element.setAttribute('aria-valuenow', ( (value.toString())));
|
|
1110
|
-
this.bit.style.width = 100 * (this.workedVal / (totalWork)) + '%';
|
|
1111
|
-
return this;
|
|
1112
|
-
}
|
|
1113
|
-
getContainer() {
|
|
1114
|
-
return this.element;
|
|
1115
|
-
}
|
|
1116
|
-
show(delay) {
|
|
1117
|
-
this.showDelayedScheduler.cancel();
|
|
1118
|
-
if (typeof delay === 'number') {
|
|
1119
|
-
this.showDelayedScheduler.schedule(delay);
|
|
1120
|
-
}
|
|
1121
|
-
else {
|
|
1122
|
-
show(this.element);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
hide() {
|
|
1126
|
-
hide(this.element);
|
|
1127
|
-
this.showDelayedScheduler.cancel();
|
|
1128
|
-
}
|
|
1129
|
-
style(styles) {
|
|
1130
|
-
this.progressBarBackground = styles.progressBarBackground;
|
|
1131
|
-
this.applyStyles();
|
|
1132
|
-
}
|
|
1133
|
-
applyStyles() {
|
|
1134
|
-
if (this.bit) {
|
|
1135
|
-
const background = this.progressBarBackground ? ( (this.progressBarBackground.toString())) : '';
|
|
1136
|
-
this.bit.style.backgroundColor = background;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD = 10000;
|
|
1141
|
-
class LanguageService extends Disposable {
|
|
1142
|
-
constructor(warnOnOverwrite = false) {
|
|
1143
|
-
super();
|
|
1144
|
-
this._onDidEncounterLanguage = this._register(( (new Emitter())));
|
|
1145
|
-
this.onDidEncounterLanguage = this._onDidEncounterLanguage.event;
|
|
1146
|
-
this._onDidChange = this._register(( (new Emitter(
|
|
1147
|
-
{ leakWarningThreshold: 200 }
|
|
1148
|
-
))));
|
|
1149
|
-
this.onDidChange = this._onDidChange.event;
|
|
1150
|
-
LanguageService.instanceCount++;
|
|
1151
|
-
this._encounteredLanguages = ( (new Set()));
|
|
1152
|
-
this._registry = this._register(( (new LanguagesRegistry$1(true, warnOnOverwrite))));
|
|
1153
|
-
this.languageIdCodec = this._registry.languageIdCodec;
|
|
1154
|
-
this._register(this._registry.onDidChange(() => this._onDidChange.fire()));
|
|
1155
|
-
}
|
|
1156
|
-
dispose() {
|
|
1157
|
-
LanguageService.instanceCount--;
|
|
1158
|
-
super.dispose();
|
|
1159
|
-
}
|
|
1160
|
-
registerLanguage(def) {
|
|
1161
|
-
return this._registry.registerLanguage(def);
|
|
1162
|
-
}
|
|
1163
|
-
isRegisteredLanguageId(languageId) {
|
|
1164
|
-
return this._registry.isRegisteredLanguageId(languageId);
|
|
1165
|
-
}
|
|
1166
|
-
getRegisteredLanguageIds() {
|
|
1167
|
-
return this._registry.getRegisteredLanguageIds();
|
|
1168
|
-
}
|
|
1169
|
-
getSortedRegisteredLanguageNames() {
|
|
1170
|
-
return this._registry.getSortedRegisteredLanguageNames();
|
|
1171
|
-
}
|
|
1172
|
-
getLanguageName(languageId) {
|
|
1173
|
-
return this._registry.getLanguageName(languageId);
|
|
1174
|
-
}
|
|
1175
|
-
getMimeType(languageId) {
|
|
1176
|
-
return this._registry.getMimeType(languageId);
|
|
1177
|
-
}
|
|
1178
|
-
getIcon(languageId) {
|
|
1179
|
-
return this._registry.getIcon(languageId);
|
|
1180
|
-
}
|
|
1181
|
-
getExtensions(languageId) {
|
|
1182
|
-
return this._registry.getExtensions(languageId);
|
|
1183
|
-
}
|
|
1184
|
-
getFilenames(languageId) {
|
|
1185
|
-
return this._registry.getFilenames(languageId);
|
|
1186
|
-
}
|
|
1187
|
-
getConfigurationFiles(languageId) {
|
|
1188
|
-
return this._registry.getConfigurationFiles(languageId);
|
|
1189
|
-
}
|
|
1190
|
-
getLanguageIdByLanguageName(languageName) {
|
|
1191
|
-
return this._registry.getLanguageIdByLanguageName(languageName);
|
|
1192
|
-
}
|
|
1193
|
-
getLanguageIdByMimeType(mimeType) {
|
|
1194
|
-
return this._registry.getLanguageIdByMimeType(mimeType);
|
|
1195
|
-
}
|
|
1196
|
-
guessLanguageIdByFilepathOrFirstLine(resource, firstLine) {
|
|
1197
|
-
const languageIds = this._registry.guessLanguageIdByFilepathOrFirstLine(resource, firstLine);
|
|
1198
|
-
return firstOrDefault(languageIds, null);
|
|
1199
|
-
}
|
|
1200
|
-
createById(languageId) {
|
|
1201
|
-
return (
|
|
1202
|
-
(new LanguageSelection(this.onDidChange, () => {
|
|
1203
|
-
return this._createAndGetLanguageIdentifier(languageId);
|
|
1204
|
-
}))
|
|
1205
|
-
);
|
|
1206
|
-
}
|
|
1207
|
-
createByMimeType(mimeType) {
|
|
1208
|
-
return (
|
|
1209
|
-
(new LanguageSelection(this.onDidChange, () => {
|
|
1210
|
-
const languageId = this.getLanguageIdByMimeType(mimeType);
|
|
1211
|
-
return this._createAndGetLanguageIdentifier(languageId);
|
|
1212
|
-
}))
|
|
1213
|
-
);
|
|
1214
|
-
}
|
|
1215
|
-
createByFilepathOrFirstLine(resource, firstLine) {
|
|
1216
|
-
return (
|
|
1217
|
-
(new LanguageSelection(this.onDidChange, () => {
|
|
1218
|
-
const languageId = this.guessLanguageIdByFilepathOrFirstLine(resource, firstLine);
|
|
1219
|
-
return this._createAndGetLanguageIdentifier(languageId);
|
|
1220
|
-
}))
|
|
1221
|
-
);
|
|
1222
|
-
}
|
|
1223
|
-
_createAndGetLanguageIdentifier(languageId) {
|
|
1224
|
-
if (!languageId || !this.isRegisteredLanguageId(languageId)) {
|
|
1225
|
-
languageId = PLAINTEXT_LANGUAGE_ID;
|
|
1226
|
-
}
|
|
1227
|
-
if (!this._encounteredLanguages.has(languageId)) {
|
|
1228
|
-
this._encounteredLanguages.add(languageId);
|
|
1229
|
-
TokenizationRegistry.getOrCreate(languageId);
|
|
1230
|
-
this._onDidEncounterLanguage.fire(languageId);
|
|
1231
|
-
}
|
|
1232
|
-
return languageId;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
LanguageService.instanceCount = 0;
|
|
1236
|
-
class LanguageSelection {
|
|
1237
|
-
constructor(_onDidChangeLanguages, _selector) {
|
|
1238
|
-
this._onDidChangeLanguages = _onDidChangeLanguages;
|
|
1239
|
-
this._selector = _selector;
|
|
1240
|
-
this._listener = null;
|
|
1241
|
-
this._emitter = null;
|
|
1242
|
-
this.languageId = this._selector();
|
|
1243
|
-
}
|
|
1244
|
-
_dispose() {
|
|
1245
|
-
if (this._listener) {
|
|
1246
|
-
this._listener.dispose();
|
|
1247
|
-
this._listener = null;
|
|
1248
|
-
}
|
|
1249
|
-
if (this._emitter) {
|
|
1250
|
-
this._emitter.dispose();
|
|
1251
|
-
this._emitter = null;
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
get onDidChange() {
|
|
1255
|
-
if (!this._listener) {
|
|
1256
|
-
this._listener = this._onDidChangeLanguages(() => this._evaluate());
|
|
1257
|
-
}
|
|
1258
|
-
if (!this._emitter) {
|
|
1259
|
-
this._emitter = ( (new Emitter({
|
|
1260
|
-
onLastListenerRemove: () => {
|
|
1261
|
-
this._dispose();
|
|
1262
|
-
}
|
|
1263
|
-
})));
|
|
1264
|
-
}
|
|
1265
|
-
return this._emitter.event;
|
|
933
|
+
get onDidChange() {
|
|
934
|
+
if (!this._listener) {
|
|
935
|
+
this._listener = this._onDidChangeLanguages(() => this._evaluate());
|
|
936
|
+
}
|
|
937
|
+
if (!this._emitter) {
|
|
938
|
+
this._emitter = ( (new Emitter({
|
|
939
|
+
onLastListenerRemove: () => {
|
|
940
|
+
this._dispose();
|
|
941
|
+
}
|
|
942
|
+
})));
|
|
943
|
+
}
|
|
944
|
+
return this._emitter.event;
|
|
1266
945
|
}
|
|
1267
946
|
_evaluate() {
|
|
1268
947
|
const languageId = this._selector();
|
|
@@ -2070,10 +1749,10 @@ class UriIterator {
|
|
|
2070
1749
|
return this._pathIterator.cmp(a);
|
|
2071
1750
|
}
|
|
2072
1751
|
else if (this._states[this._stateIdx] === 4 ) {
|
|
2073
|
-
return compare(a, this._value.query);
|
|
1752
|
+
return compare$1(a, this._value.query);
|
|
2074
1753
|
}
|
|
2075
1754
|
else if (this._states[this._stateIdx] === 5 ) {
|
|
2076
|
-
return compare(a, this._value.fragment);
|
|
1755
|
+
return compare$1(a, this._value.fragment);
|
|
2077
1756
|
}
|
|
2078
1757
|
throw new Error();
|
|
2079
1758
|
}
|
|
@@ -2739,7 +2418,7 @@ class ConfigurationModel {
|
|
|
2739
2418
|
mergeContents(source, target) {
|
|
2740
2419
|
for (const key of ( (Object.keys(target)))) {
|
|
2741
2420
|
if (key in source) {
|
|
2742
|
-
if (isObject
|
|
2421
|
+
if (isObject(source[key]) && isObject(target[key])) {
|
|
2743
2422
|
this.mergeContents(source[key], target[key]);
|
|
2744
2423
|
continue;
|
|
2745
2424
|
}
|
|
@@ -2829,7 +2508,7 @@ class ConfigurationModelParser {
|
|
|
2829
2508
|
return this._parseErrors;
|
|
2830
2509
|
}
|
|
2831
2510
|
parse(content, options) {
|
|
2832
|
-
if (!isUndefinedOrNull
|
|
2511
|
+
if (!isUndefinedOrNull(content)) {
|
|
2833
2512
|
const raw = this.doParseContent(content);
|
|
2834
2513
|
this.parseRaw(raw, options);
|
|
2835
2514
|
}
|
|
@@ -3116,7 +2795,7 @@ class Configuration {
|
|
|
3116
2795
|
compareAndUpdateDefaultConfiguration(defaults, keys) {
|
|
3117
2796
|
const overrides = [];
|
|
3118
2797
|
if (!keys) {
|
|
3119
|
-
const { added, updated, removed } = compare
|
|
2798
|
+
const { added, updated, removed } = compare(this._defaultConfiguration, defaults);
|
|
3120
2799
|
keys = [...added, ...updated, ...removed];
|
|
3121
2800
|
}
|
|
3122
2801
|
for (const key of keys) {
|
|
@@ -3135,7 +2814,7 @@ class Configuration {
|
|
|
3135
2814
|
return { keys, overrides };
|
|
3136
2815
|
}
|
|
3137
2816
|
compareAndUpdatePolicyConfiguration(policyConfiguration) {
|
|
3138
|
-
const { added, updated, removed } = compare
|
|
2817
|
+
const { added, updated, removed } = compare(this._policyConfiguration, policyConfiguration);
|
|
3139
2818
|
const keys = [...added, ...updated, ...removed];
|
|
3140
2819
|
if (keys.length) {
|
|
3141
2820
|
this.updatePolicyConfiguration(policyConfiguration);
|
|
@@ -3143,7 +2822,7 @@ class Configuration {
|
|
|
3143
2822
|
return { keys, overrides: [] };
|
|
3144
2823
|
}
|
|
3145
2824
|
compareAndUpdateApplicationConfiguration(application) {
|
|
3146
|
-
const { added, updated, removed, overrides } = compare
|
|
2825
|
+
const { added, updated, removed, overrides } = compare(this.applicationConfiguration, application);
|
|
3147
2826
|
const keys = [...added, ...updated, ...removed];
|
|
3148
2827
|
if (keys.length) {
|
|
3149
2828
|
this.updateApplicationConfiguration(application);
|
|
@@ -3151,7 +2830,7 @@ class Configuration {
|
|
|
3151
2830
|
return { keys, overrides };
|
|
3152
2831
|
}
|
|
3153
2832
|
compareAndUpdateLocalUserConfiguration(user) {
|
|
3154
|
-
const { added, updated, removed, overrides } = compare
|
|
2833
|
+
const { added, updated, removed, overrides } = compare(this.localUserConfiguration, user);
|
|
3155
2834
|
const keys = [...added, ...updated, ...removed];
|
|
3156
2835
|
if (keys.length) {
|
|
3157
2836
|
this.updateLocalUserConfiguration(user);
|
|
@@ -3159,7 +2838,7 @@ class Configuration {
|
|
|
3159
2838
|
return { keys, overrides };
|
|
3160
2839
|
}
|
|
3161
2840
|
compareAndUpdateRemoteUserConfiguration(user) {
|
|
3162
|
-
const { added, updated, removed, overrides } = compare
|
|
2841
|
+
const { added, updated, removed, overrides } = compare(this.remoteUserConfiguration, user);
|
|
3163
2842
|
const keys = [...added, ...updated, ...removed];
|
|
3164
2843
|
if (keys.length) {
|
|
3165
2844
|
this.updateRemoteUserConfiguration(user);
|
|
@@ -3167,7 +2846,7 @@ class Configuration {
|
|
|
3167
2846
|
return { keys, overrides };
|
|
3168
2847
|
}
|
|
3169
2848
|
compareAndUpdateWorkspaceConfiguration(workspaceConfiguration) {
|
|
3170
|
-
const { added, updated, removed, overrides } = compare
|
|
2849
|
+
const { added, updated, removed, overrides } = compare(this.workspaceConfiguration, workspaceConfiguration);
|
|
3171
2850
|
const keys = [...added, ...updated, ...removed];
|
|
3172
2851
|
if (keys.length) {
|
|
3173
2852
|
this.updateWorkspaceConfiguration(workspaceConfiguration);
|
|
@@ -3176,7 +2855,7 @@ class Configuration {
|
|
|
3176
2855
|
}
|
|
3177
2856
|
compareAndUpdateFolderConfiguration(resource, folderConfiguration) {
|
|
3178
2857
|
const currentFolderConfiguration = this.folderConfigurations.get(resource);
|
|
3179
|
-
const { added, updated, removed, overrides } = compare
|
|
2858
|
+
const { added, updated, removed, overrides } = compare(currentFolderConfiguration, folderConfiguration);
|
|
3180
2859
|
const keys = [...added, ...updated, ...removed];
|
|
3181
2860
|
if (keys.length || !currentFolderConfiguration) {
|
|
3182
2861
|
this.updateFolderConfiguration(resource, folderConfiguration);
|
|
@@ -3189,7 +2868,7 @@ class Configuration {
|
|
|
3189
2868
|
throw new Error('Unknown folder');
|
|
3190
2869
|
}
|
|
3191
2870
|
this.deleteFolderConfiguration(folder);
|
|
3192
|
-
const { added, updated, removed, overrides } = compare
|
|
2871
|
+
const { added, updated, removed, overrides } = compare(folderConfig, undefined);
|
|
3193
2872
|
return { keys: [...added, ...updated, ...removed], overrides };
|
|
3194
2873
|
}
|
|
3195
2874
|
get defaults() {
|
|
@@ -3366,7 +3045,7 @@ class Configuration {
|
|
|
3366
3045
|
return ( (new ConfigurationModel(model.contents, model.keys, model.overrides))).freeze();
|
|
3367
3046
|
}
|
|
3368
3047
|
}
|
|
3369
|
-
function compare
|
|
3048
|
+
function compare(from, to) {
|
|
3370
3049
|
const { added, removed, updated } = compareConfigurationContents(to, from);
|
|
3371
3050
|
const overrides = [];
|
|
3372
3051
|
const fromOverrideIdentifiers = from?.getAllOverrideIdentifiers() || [];
|
|
@@ -3433,255 +3112,11 @@ class WorkspaceFolder {
|
|
|
3433
3112
|
return { uri: this.uri, name: this.name, index: this.index };
|
|
3434
3113
|
}
|
|
3435
3114
|
}
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
const IUserDataProfilesService = ( (createDecorator('IUserDataProfilesService')));
|
|
3442
|
-
const EXTENSIONS_RESOURCE_NAME = 'extensions.json';
|
|
3443
|
-
function toUserDataProfile(name, location, useDefaultFlags) {
|
|
3444
|
-
return {
|
|
3445
|
-
id: ( (hash(location.path).toString(16))),
|
|
3446
|
-
name: name,
|
|
3447
|
-
location: location,
|
|
3448
|
-
isDefault: false,
|
|
3449
|
-
globalStorageHome: joinPath(location, 'globalStorage'),
|
|
3450
|
-
settingsResource: joinPath(location, 'settings.json'),
|
|
3451
|
-
keybindingsResource: joinPath(location, 'keybindings.json'),
|
|
3452
|
-
tasksResource: joinPath(location, 'tasks.json'),
|
|
3453
|
-
snippetsHome: joinPath(location, 'snippets'),
|
|
3454
|
-
extensionsResource: joinPath(location, EXTENSIONS_RESOURCE_NAME),
|
|
3455
|
-
useDefaultFlags
|
|
3456
|
-
};
|
|
3457
|
-
}
|
|
3458
|
-
let UserDataProfilesService = class UserDataProfilesService extends Disposable {
|
|
3459
|
-
constructor(environmentService, fileService, uriIdentityService, logService) {
|
|
3460
|
-
super();
|
|
3461
|
-
this.environmentService = environmentService;
|
|
3462
|
-
this.fileService = fileService;
|
|
3463
|
-
this.uriIdentityService = uriIdentityService;
|
|
3464
|
-
this.logService = logService;
|
|
3465
|
-
this.enabled = false;
|
|
3466
|
-
this.defaultProfileShouldIncludeExtensionsResourceAlways = false;
|
|
3467
|
-
this._onDidChangeProfiles = this._register(( (new Emitter())));
|
|
3468
|
-
this.onDidChangeProfiles = this._onDidChangeProfiles.event;
|
|
3469
|
-
this._onWillCreateProfile = this._register(( (new Emitter())));
|
|
3470
|
-
this.onWillCreateProfile = this._onWillCreateProfile.event;
|
|
3471
|
-
this._onWillRemoveProfile = this._register(( (new Emitter())));
|
|
3472
|
-
this.onWillRemoveProfile = this._onWillRemoveProfile.event;
|
|
3473
|
-
this.profilesHome = joinPath(this.environmentService.userRoamingDataHome, 'profiles');
|
|
3474
|
-
}
|
|
3475
|
-
get defaultProfile() { return this.profiles[0]; }
|
|
3476
|
-
get profiles() { return this.profilesObject.profiles; }
|
|
3477
|
-
setEnablement(enabled) {
|
|
3478
|
-
if (this.enabled !== enabled) {
|
|
3479
|
-
this._profilesObject = undefined;
|
|
3480
|
-
this.enabled = enabled;
|
|
3481
|
-
}
|
|
3482
|
-
}
|
|
3483
|
-
get profilesObject() {
|
|
3484
|
-
if (!this._profilesObject) {
|
|
3485
|
-
const profiles = this.enabled ? this.getStoredProfiles().map(storedProfile => toUserDataProfile(storedProfile.name, storedProfile.location, storedProfile.useDefaultFlags)) : [];
|
|
3486
|
-
let emptyWindow;
|
|
3487
|
-
const workspaces = ( (new ResourceMap$1()));
|
|
3488
|
-
if (profiles.length) {
|
|
3489
|
-
const profileAssicaitions = this.getStoredProfileAssociations();
|
|
3490
|
-
if (profileAssicaitions.workspaces) {
|
|
3491
|
-
for (const [workspacePath, profilePath] of Object.entries(profileAssicaitions.workspaces)) {
|
|
3492
|
-
const workspace = ( (URI.parse(workspacePath)));
|
|
3493
|
-
const profileLocation = ( (URI.parse(profilePath)));
|
|
3494
|
-
const profile = profiles.find(p => this.uriIdentityService.extUri.isEqual(p.location, profileLocation));
|
|
3495
|
-
if (profile) {
|
|
3496
|
-
workspaces.set(workspace, profile);
|
|
3497
|
-
}
|
|
3498
|
-
}
|
|
3499
|
-
}
|
|
3500
|
-
if (profileAssicaitions.emptyWindow) {
|
|
3501
|
-
const emptyWindowProfileLocation = ( (URI.parse(profileAssicaitions.emptyWindow)));
|
|
3502
|
-
emptyWindow = profiles.find(p => this.uriIdentityService.extUri.isEqual(p.location, emptyWindowProfileLocation));
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
const profile = toUserDataProfile(( (localize('defaultProfile', "Default"))), this.environmentService.userRoamingDataHome);
|
|
3506
|
-
profiles.unshift({ ...profile, isDefault: true, extensionsResource: this.defaultProfileShouldIncludeExtensionsResourceAlways || profiles.length > 0 ? profile.extensionsResource : undefined });
|
|
3507
|
-
this._profilesObject = { profiles, workspaces, emptyWindow };
|
|
3508
|
-
}
|
|
3509
|
-
return this._profilesObject;
|
|
3510
|
-
}
|
|
3511
|
-
getProfile(workspaceIdentifier) {
|
|
3512
|
-
const workspace = this.getWorkspace(workspaceIdentifier);
|
|
3513
|
-
const profile = URI.isUri(workspace) ? this.profilesObject.workspaces.get(workspace) : this.profilesObject.emptyWindow;
|
|
3514
|
-
return profile ?? this.defaultProfile;
|
|
3515
|
-
}
|
|
3516
|
-
getWorkspace(workspaceIdentifier) {
|
|
3517
|
-
if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier)) {
|
|
3518
|
-
return workspaceIdentifier.uri;
|
|
3519
|
-
}
|
|
3520
|
-
if (isWorkspaceIdentifier(workspaceIdentifier)) {
|
|
3521
|
-
return workspaceIdentifier.configPath;
|
|
3522
|
-
}
|
|
3523
|
-
return 'empty-window';
|
|
3524
|
-
}
|
|
3525
|
-
async createProfile(name, useDefaultFlags, workspaceIdentifier) {
|
|
3526
|
-
if (!this.enabled) {
|
|
3527
|
-
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
3528
|
-
}
|
|
3529
|
-
if (this.getStoredProfiles().some(p => p.name === name)) {
|
|
3530
|
-
throw new Error(`Profile with name ${name} already exists`);
|
|
3531
|
-
}
|
|
3532
|
-
const profile = toUserDataProfile(name, joinPath(this.profilesHome, ( (hash(generateUuid()).toString(16)))), useDefaultFlags);
|
|
3533
|
-
await this.fileService.createFolder(profile.location);
|
|
3534
|
-
const joiners = [];
|
|
3535
|
-
this._onWillCreateProfile.fire({
|
|
3536
|
-
profile,
|
|
3537
|
-
join(promise) {
|
|
3538
|
-
joiners.push(promise);
|
|
3539
|
-
}
|
|
3540
|
-
});
|
|
3541
|
-
await Promises.settled(joiners);
|
|
3542
|
-
this.updateProfiles([profile], [], []);
|
|
3543
|
-
if (workspaceIdentifier) {
|
|
3544
|
-
await this.setProfileForWorkspace(profile, workspaceIdentifier);
|
|
3545
|
-
}
|
|
3546
|
-
return profile;
|
|
3547
|
-
}
|
|
3548
|
-
async updateProfile(profileToUpdate, name, useDefaultFlags) {
|
|
3549
|
-
if (!this.enabled) {
|
|
3550
|
-
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
3551
|
-
}
|
|
3552
|
-
let profile = this.profiles.find(p => p.id === profileToUpdate.id);
|
|
3553
|
-
if (!profile) {
|
|
3554
|
-
throw new Error(`Profile '${profileToUpdate.name}' does not exist`);
|
|
3555
|
-
}
|
|
3556
|
-
profile = toUserDataProfile(name, profile.location, useDefaultFlags);
|
|
3557
|
-
this.updateProfiles([], [], [profile]);
|
|
3558
|
-
return profile;
|
|
3559
|
-
}
|
|
3560
|
-
async setProfileForWorkspace(profileToSet, workspaceIdentifier) {
|
|
3561
|
-
if (!this.enabled) {
|
|
3562
|
-
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
3563
|
-
}
|
|
3564
|
-
const profile = this.profiles.find(p => p.id === profileToSet.id);
|
|
3565
|
-
if (!profile) {
|
|
3566
|
-
throw new Error(`Profile '${profileToSet.name}' does not exist`);
|
|
3567
|
-
}
|
|
3568
|
-
this.updateWorkspaceAssociation(workspaceIdentifier, profile);
|
|
3569
|
-
}
|
|
3570
|
-
async unsetWorkspace(workspaceIdentifier) {
|
|
3571
|
-
if (!this.enabled) {
|
|
3572
|
-
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
3573
|
-
}
|
|
3574
|
-
this.updateWorkspaceAssociation(workspaceIdentifier);
|
|
3575
|
-
}
|
|
3576
|
-
async removeProfile(profileToRemove) {
|
|
3577
|
-
if (!this.enabled) {
|
|
3578
|
-
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
3579
|
-
}
|
|
3580
|
-
if (profileToRemove.isDefault) {
|
|
3581
|
-
throw new Error('Cannot remove default profile');
|
|
3582
|
-
}
|
|
3583
|
-
const profile = this.profiles.find(p => p.id === profileToRemove.id);
|
|
3584
|
-
if (!profile) {
|
|
3585
|
-
throw new Error(`Profile '${profileToRemove.name}' does not exist`);
|
|
3586
|
-
}
|
|
3587
|
-
const joiners = [];
|
|
3588
|
-
this._onWillRemoveProfile.fire({
|
|
3589
|
-
profile,
|
|
3590
|
-
join(promise) {
|
|
3591
|
-
joiners.push(promise);
|
|
3592
|
-
}
|
|
3593
|
-
});
|
|
3594
|
-
await Promises.settled(joiners);
|
|
3595
|
-
if (profile.id === this.profilesObject.emptyWindow?.id) {
|
|
3596
|
-
this.profilesObject.emptyWindow = undefined;
|
|
3597
|
-
}
|
|
3598
|
-
for (const workspace of [...( (this.profilesObject.workspaces.keys()))]) {
|
|
3599
|
-
if (profile.id === this.profilesObject.workspaces.get(workspace)?.id) {
|
|
3600
|
-
this.profilesObject.workspaces.delete(workspace);
|
|
3601
|
-
}
|
|
3602
|
-
}
|
|
3603
|
-
this.updateStoredProfileAssociations();
|
|
3604
|
-
this.updateProfiles([], [profile], []);
|
|
3605
|
-
try {
|
|
3606
|
-
if (this.profiles.length === 1) {
|
|
3607
|
-
await this.fileService.del(this.profilesHome, { recursive: true });
|
|
3608
|
-
}
|
|
3609
|
-
else {
|
|
3610
|
-
await this.fileService.del(profile.location, { recursive: true });
|
|
3611
|
-
}
|
|
3612
|
-
}
|
|
3613
|
-
catch (error) {
|
|
3614
|
-
this.logService.error(error);
|
|
3615
|
-
}
|
|
3616
|
-
}
|
|
3617
|
-
updateProfiles(added, removed, updated) {
|
|
3618
|
-
const storedProfiles = [];
|
|
3619
|
-
for (let profile of [...this.profilesObject.profiles, ...added]) {
|
|
3620
|
-
if (profile.isDefault) {
|
|
3621
|
-
continue;
|
|
3622
|
-
}
|
|
3623
|
-
if (removed.some(p => profile.id === p.id)) {
|
|
3624
|
-
continue;
|
|
3625
|
-
}
|
|
3626
|
-
profile = updated.find(p => profile.id === p.id) ?? profile;
|
|
3627
|
-
storedProfiles.push({ location: profile.location, name: profile.name, useDefaultFlags: profile.useDefaultFlags });
|
|
3628
|
-
}
|
|
3629
|
-
this.saveStoredProfiles(storedProfiles);
|
|
3630
|
-
this._profilesObject = undefined;
|
|
3631
|
-
this.triggerProfilesChanges(added, removed, updated);
|
|
3632
|
-
}
|
|
3633
|
-
triggerProfilesChanges(added, removed, updated) {
|
|
3634
|
-
this._onDidChangeProfiles.fire({ added, removed, updated, all: this.profiles });
|
|
3635
|
-
}
|
|
3636
|
-
updateWorkspaceAssociation(workspaceIdentifier, newProfile) {
|
|
3637
|
-
const workspace = this.getWorkspace(workspaceIdentifier);
|
|
3638
|
-
if (URI.isUri(workspace)) {
|
|
3639
|
-
this.profilesObject.workspaces.delete(workspace);
|
|
3640
|
-
if (newProfile && !newProfile.isDefault) {
|
|
3641
|
-
this.profilesObject.workspaces.set(workspace, newProfile);
|
|
3642
|
-
}
|
|
3643
|
-
}
|
|
3644
|
-
else {
|
|
3645
|
-
this.profilesObject.emptyWindow = !newProfile?.isDefault ? newProfile : undefined;
|
|
3646
|
-
}
|
|
3647
|
-
this.updateStoredProfileAssociations();
|
|
3648
|
-
}
|
|
3649
|
-
updateStoredProfileAssociations() {
|
|
3650
|
-
const workspaces = {};
|
|
3651
|
-
for (const [workspace, profile] of this.profilesObject.workspaces.entries()) {
|
|
3652
|
-
workspaces[( (workspace.toString()))] = ( (profile.location.toString()));
|
|
3653
|
-
}
|
|
3654
|
-
const emptyWindow = this.profilesObject.emptyWindow?.location.toString();
|
|
3655
|
-
this.saveStoredProfileAssociations({ workspaces, emptyWindow });
|
|
3656
|
-
this._profilesObject = undefined;
|
|
3657
|
-
}
|
|
3658
|
-
getStoredProfiles() { return []; }
|
|
3659
|
-
saveStoredProfiles(storedProfiles) { throw new Error('not implemented'); }
|
|
3660
|
-
getStoredProfileAssociations() { return {}; }
|
|
3661
|
-
saveStoredProfileAssociations(storedProfileAssociations) { throw new Error('not implemented'); }
|
|
3662
|
-
};
|
|
3663
|
-
UserDataProfilesService.PROFILES_KEY = 'userDataProfiles';
|
|
3664
|
-
UserDataProfilesService.PROFILE_ASSOCIATIONS_KEY = 'profileAssociations';
|
|
3665
|
-
UserDataProfilesService = ( (__decorate([
|
|
3666
|
-
( (__param(0, IEnvironmentService))),
|
|
3667
|
-
( (__param(1, IFileService))),
|
|
3668
|
-
( (__param(2, IUriIdentityService))),
|
|
3669
|
-
( (__param(3, ILogService)))
|
|
3670
|
-
], UserDataProfilesService)));
|
|
3671
|
-
const IPolicyService = ( (createDecorator('policy')));
|
|
3672
|
-
class NullPolicyService {
|
|
3673
|
-
constructor() {
|
|
3674
|
-
this.onDidChange = Event.None;
|
|
3675
|
-
}
|
|
3676
|
-
async registerPolicyDefinitions() { return {}; }
|
|
3677
|
-
getPolicyValue() { return undefined; }
|
|
3678
|
-
serialize() { return undefined; }
|
|
3679
|
-
}
|
|
3680
|
-
function isConfigurationOverrides(thing) {
|
|
3681
|
-
return thing
|
|
3682
|
-
&& typeof thing === 'object'
|
|
3683
|
-
&& (!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string')
|
|
3684
|
-
&& (!thing.resource || thing.resource instanceof URI);
|
|
3115
|
+
function isConfigurationOverrides(thing) {
|
|
3116
|
+
return thing
|
|
3117
|
+
&& typeof thing === 'object'
|
|
3118
|
+
&& (!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string')
|
|
3119
|
+
&& (!thing.resource || thing.resource instanceof URI);
|
|
3685
3120
|
}
|
|
3686
3121
|
class StandaloneConfigurationService {
|
|
3687
3122
|
constructor() {
|
|
@@ -5841,7 +5276,7 @@ Color.transparent = ( (new Color( (new RGBA(0, 0, 0, 0)))));
|
|
|
5841
5276
|
})(Format.CSS || (Format.CSS = {}))));
|
|
5842
5277
|
})(Color.Format || (Color.Format = {}))));
|
|
5843
5278
|
})(Color || (Color = {}))));
|
|
5844
|
-
var _a, _b;
|
|
5279
|
+
var _a$2, _b;
|
|
5845
5280
|
if (SnippetParser.prototype.text == null) {
|
|
5846
5281
|
SnippetParser.prototype.text = function (value) {
|
|
5847
5282
|
return ( this.parse(value).toString());
|
|
@@ -5887,7 +5322,7 @@ configurationRegistry.onDidSchemaChange ?? (configurationRegistry.onDidSchemaCha
|
|
|
5887
5322
|
configurationRegistry.notifyConfigurationSchemaUpdated ?? (configurationRegistry.notifyConfigurationSchemaUpdated = () => {
|
|
5888
5323
|
configurationRegistry._onDidSchemaChange.fire();
|
|
5889
5324
|
});
|
|
5890
|
-
(_a = NoOpNotification.prototype).onDidClose ?? (_a.onDidClose = Event.None);
|
|
5325
|
+
(_a$2 = NoOpNotification.prototype).onDidClose ?? (_a$2.onDidClose = Event.None);
|
|
5891
5326
|
function polyfillQuickInput(fn) {
|
|
5892
5327
|
return function () {
|
|
5893
5328
|
const quickInput = fn.call(this);
|
|
@@ -5933,6 +5368,526 @@ function toVSCodeColor(value) {
|
|
|
5933
5368
|
return value;
|
|
5934
5369
|
}
|
|
5935
5370
|
polyfillPrototype(Color$1.prototype, Color.prototype, toMonacoColor, toVSCodeColor);
|
|
5371
|
+
var _a;
|
|
5372
|
+
const _format2Regexp = /{([^}]+)}/g;
|
|
5373
|
+
function format2(template, values) {
|
|
5374
|
+
return template.replace(_format2Regexp, (match, group) => (values[group] ?? match));
|
|
5375
|
+
}
|
|
5376
|
+
class AmbiguousCharacters {
|
|
5377
|
+
constructor(confusableDictionary) {
|
|
5378
|
+
this.confusableDictionary = confusableDictionary;
|
|
5379
|
+
}
|
|
5380
|
+
static getInstance(locales) {
|
|
5381
|
+
return AmbiguousCharacters.cache.get(Array.from(locales));
|
|
5382
|
+
}
|
|
5383
|
+
static getLocales() {
|
|
5384
|
+
return AmbiguousCharacters._locales.getValue();
|
|
5385
|
+
}
|
|
5386
|
+
isAmbiguous(codePoint) {
|
|
5387
|
+
return this.confusableDictionary.has(codePoint);
|
|
5388
|
+
}
|
|
5389
|
+
getPrimaryConfusable(codePoint) {
|
|
5390
|
+
return this.confusableDictionary.get(codePoint);
|
|
5391
|
+
}
|
|
5392
|
+
getConfusableCodePoints() {
|
|
5393
|
+
return (
|
|
5394
|
+
(new Set( (this.confusableDictionary.keys())))
|
|
5395
|
+
);
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5398
|
+
_a = AmbiguousCharacters;
|
|
5399
|
+
AmbiguousCharacters.ambiguousCharacterData = ( (new Lazy(() => {
|
|
5400
|
+
return JSON.parse('{\"_common\":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],\"_default\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"cs\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"de\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"es\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"fr\":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"it\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ja\":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],\"ko\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pl\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pt-BR\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"qps-ploc\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ru\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"tr\":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"zh-hans\":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],\"zh-hant\":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}');
|
|
5401
|
+
})));
|
|
5402
|
+
AmbiguousCharacters.cache = ( (new LRUCachedFunction((locales) => {
|
|
5403
|
+
function arrayToMap(arr) {
|
|
5404
|
+
const result = ( (new Map()));
|
|
5405
|
+
for (let i = 0; i < arr.length; i += 2) {
|
|
5406
|
+
result.set(arr[i], arr[i + 1]);
|
|
5407
|
+
}
|
|
5408
|
+
return result;
|
|
5409
|
+
}
|
|
5410
|
+
function mergeMaps(map1, map2) {
|
|
5411
|
+
const result = ( (new Map(map1)));
|
|
5412
|
+
for (const [key, value] of map2) {
|
|
5413
|
+
result.set(key, value);
|
|
5414
|
+
}
|
|
5415
|
+
return result;
|
|
5416
|
+
}
|
|
5417
|
+
function intersectMaps(map1, map2) {
|
|
5418
|
+
if (!map1) {
|
|
5419
|
+
return map2;
|
|
5420
|
+
}
|
|
5421
|
+
const result = ( (new Map()));
|
|
5422
|
+
for (const [key, value] of map1) {
|
|
5423
|
+
if (map2.has(key)) {
|
|
5424
|
+
result.set(key, value);
|
|
5425
|
+
}
|
|
5426
|
+
}
|
|
5427
|
+
return result;
|
|
5428
|
+
}
|
|
5429
|
+
const data = _a.ambiguousCharacterData.getValue();
|
|
5430
|
+
let filteredLocales = locales.filter((l) => !l.startsWith('_') && l in data);
|
|
5431
|
+
if (filteredLocales.length === 0) {
|
|
5432
|
+
filteredLocales = ['_default'];
|
|
5433
|
+
}
|
|
5434
|
+
let languageSpecificMap = undefined;
|
|
5435
|
+
for (const locale of filteredLocales) {
|
|
5436
|
+
const map = arrayToMap(data[locale]);
|
|
5437
|
+
languageSpecificMap = intersectMaps(languageSpecificMap, map);
|
|
5438
|
+
}
|
|
5439
|
+
const commonMap = arrayToMap(data['_common']);
|
|
5440
|
+
const map = mergeMaps(commonMap, languageSpecificMap);
|
|
5441
|
+
return (
|
|
5442
|
+
(new AmbiguousCharacters(map))
|
|
5443
|
+
);
|
|
5444
|
+
})));
|
|
5445
|
+
AmbiguousCharacters._locales = ( (new Lazy(
|
|
5446
|
+
() => ( (Object.keys(AmbiguousCharacters.ambiguousCharacterData.getValue()))).filter((k) => !k.startsWith('_'))
|
|
5447
|
+
)));
|
|
5448
|
+
function raceCancellationError(promise, token) {
|
|
5449
|
+
return (
|
|
5450
|
+
(new Promise((resolve, reject) => {
|
|
5451
|
+
const ref = token.onCancellationRequested(() => {
|
|
5452
|
+
ref.dispose();
|
|
5453
|
+
reject(( (new CancellationError())));
|
|
5454
|
+
});
|
|
5455
|
+
promise.then(resolve, reject).finally(() => ref.dispose());
|
|
5456
|
+
}))
|
|
5457
|
+
);
|
|
5458
|
+
}
|
|
5459
|
+
class Sequencer {
|
|
5460
|
+
constructor() {
|
|
5461
|
+
this.current = Promise.resolve(null);
|
|
5462
|
+
}
|
|
5463
|
+
queue(promiseTask) {
|
|
5464
|
+
return this.current = this.current.then(() => promiseTask(), () => promiseTask());
|
|
5465
|
+
}
|
|
5466
|
+
}
|
|
5467
|
+
class Barrier {
|
|
5468
|
+
constructor() {
|
|
5469
|
+
this._isOpen = false;
|
|
5470
|
+
this._promise = ( (new Promise((c, e) => {
|
|
5471
|
+
this._completePromise = c;
|
|
5472
|
+
})));
|
|
5473
|
+
}
|
|
5474
|
+
isOpen() {
|
|
5475
|
+
return this._isOpen;
|
|
5476
|
+
}
|
|
5477
|
+
open() {
|
|
5478
|
+
this._isOpen = true;
|
|
5479
|
+
this._completePromise(true);
|
|
5480
|
+
}
|
|
5481
|
+
wait() {
|
|
5482
|
+
return this._promise;
|
|
5483
|
+
}
|
|
5484
|
+
}
|
|
5485
|
+
class Limiter {
|
|
5486
|
+
constructor(maxDegreeOfParalellism) {
|
|
5487
|
+
this._size = 0;
|
|
5488
|
+
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
|
5489
|
+
this.outstandingPromises = [];
|
|
5490
|
+
this.runningPromises = 0;
|
|
5491
|
+
this._onDrained = ( (new Emitter()));
|
|
5492
|
+
}
|
|
5493
|
+
get onDrained() {
|
|
5494
|
+
return this._onDrained.event;
|
|
5495
|
+
}
|
|
5496
|
+
get size() {
|
|
5497
|
+
return this._size;
|
|
5498
|
+
}
|
|
5499
|
+
queue(factory) {
|
|
5500
|
+
this._size++;
|
|
5501
|
+
return (
|
|
5502
|
+
(new Promise((c, e) => {
|
|
5503
|
+
this.outstandingPromises.push({ factory, c, e });
|
|
5504
|
+
this.consume();
|
|
5505
|
+
}))
|
|
5506
|
+
);
|
|
5507
|
+
}
|
|
5508
|
+
consume() {
|
|
5509
|
+
while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) {
|
|
5510
|
+
const iLimitedTask = this.outstandingPromises.shift();
|
|
5511
|
+
this.runningPromises++;
|
|
5512
|
+
const promise = iLimitedTask.factory();
|
|
5513
|
+
promise.then(iLimitedTask.c, iLimitedTask.e);
|
|
5514
|
+
promise.then(() => this.consumed(), () => this.consumed());
|
|
5515
|
+
}
|
|
5516
|
+
}
|
|
5517
|
+
consumed() {
|
|
5518
|
+
this._size--;
|
|
5519
|
+
this.runningPromises--;
|
|
5520
|
+
if (this.outstandingPromises.length > 0) {
|
|
5521
|
+
this.consume();
|
|
5522
|
+
}
|
|
5523
|
+
else {
|
|
5524
|
+
this._onDrained.fire();
|
|
5525
|
+
}
|
|
5526
|
+
}
|
|
5527
|
+
dispose() {
|
|
5528
|
+
this._onDrained.dispose();
|
|
5529
|
+
}
|
|
5530
|
+
}
|
|
5531
|
+
class Queue extends Limiter {
|
|
5532
|
+
constructor() {
|
|
5533
|
+
super(1);
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
class ResourceQueue {
|
|
5537
|
+
constructor() {
|
|
5538
|
+
this.queues = ( (new Map()));
|
|
5539
|
+
this.drainers = ( (new Set()));
|
|
5540
|
+
}
|
|
5541
|
+
async whenDrained() {
|
|
5542
|
+
if (this.isDrained()) {
|
|
5543
|
+
return;
|
|
5544
|
+
}
|
|
5545
|
+
const promise = ( (new DeferredPromise()));
|
|
5546
|
+
this.drainers.add(promise);
|
|
5547
|
+
return promise.p;
|
|
5548
|
+
}
|
|
5549
|
+
isDrained() {
|
|
5550
|
+
for (const [, queue] of this.queues) {
|
|
5551
|
+
if (queue.size > 0) {
|
|
5552
|
+
return false;
|
|
5553
|
+
}
|
|
5554
|
+
}
|
|
5555
|
+
return true;
|
|
5556
|
+
}
|
|
5557
|
+
queueFor(resource, extUri$1 = extUri) {
|
|
5558
|
+
const key = extUri$1.getComparisonKey(resource);
|
|
5559
|
+
let queue = this.queues.get(key);
|
|
5560
|
+
if (!queue) {
|
|
5561
|
+
queue = ( (new Queue()));
|
|
5562
|
+
Event.once(queue.onDrained)(() => {
|
|
5563
|
+
queue?.dispose();
|
|
5564
|
+
this.queues.delete(key);
|
|
5565
|
+
this.onDidQueueDrain();
|
|
5566
|
+
});
|
|
5567
|
+
this.queues.set(key, queue);
|
|
5568
|
+
}
|
|
5569
|
+
return queue;
|
|
5570
|
+
}
|
|
5571
|
+
onDidQueueDrain() {
|
|
5572
|
+
if (!this.isDrained()) {
|
|
5573
|
+
return;
|
|
5574
|
+
}
|
|
5575
|
+
this.releaseDrainers();
|
|
5576
|
+
}
|
|
5577
|
+
releaseDrainers() {
|
|
5578
|
+
for (const drainer of this.drainers) {
|
|
5579
|
+
drainer.complete();
|
|
5580
|
+
}
|
|
5581
|
+
this.drainers.clear();
|
|
5582
|
+
}
|
|
5583
|
+
dispose() {
|
|
5584
|
+
for (const [, queue] of this.queues) {
|
|
5585
|
+
queue.dispose();
|
|
5586
|
+
}
|
|
5587
|
+
this.queues.clear();
|
|
5588
|
+
this.releaseDrainers();
|
|
5589
|
+
}
|
|
5590
|
+
}
|
|
5591
|
+
class IntervalCounter {
|
|
5592
|
+
constructor(interval, nowFn = () => Date.now()) {
|
|
5593
|
+
this.interval = interval;
|
|
5594
|
+
this.nowFn = nowFn;
|
|
5595
|
+
this.lastIncrementTime = 0;
|
|
5596
|
+
this.value = 0;
|
|
5597
|
+
}
|
|
5598
|
+
increment() {
|
|
5599
|
+
const now = this.nowFn();
|
|
5600
|
+
if (now - this.lastIncrementTime > this.interval) {
|
|
5601
|
+
this.lastIncrementTime = now;
|
|
5602
|
+
this.value = 0;
|
|
5603
|
+
}
|
|
5604
|
+
this.value++;
|
|
5605
|
+
return this.value;
|
|
5606
|
+
}
|
|
5607
|
+
}
|
|
5608
|
+
class DeferredPromise {
|
|
5609
|
+
constructor() {
|
|
5610
|
+
this.rejected = false;
|
|
5611
|
+
this.resolved = false;
|
|
5612
|
+
this.p = ( (new Promise((c, e) => {
|
|
5613
|
+
this.completeCallback = c;
|
|
5614
|
+
this.errorCallback = e;
|
|
5615
|
+
})));
|
|
5616
|
+
}
|
|
5617
|
+
get isRejected() {
|
|
5618
|
+
return this.rejected;
|
|
5619
|
+
}
|
|
5620
|
+
get isResolved() {
|
|
5621
|
+
return this.resolved;
|
|
5622
|
+
}
|
|
5623
|
+
get isSettled() {
|
|
5624
|
+
return this.rejected || this.resolved;
|
|
5625
|
+
}
|
|
5626
|
+
complete(value) {
|
|
5627
|
+
return (
|
|
5628
|
+
(new Promise(resolve => {
|
|
5629
|
+
this.completeCallback(value);
|
|
5630
|
+
this.resolved = true;
|
|
5631
|
+
resolve();
|
|
5632
|
+
}))
|
|
5633
|
+
);
|
|
5634
|
+
}
|
|
5635
|
+
error(err) {
|
|
5636
|
+
return (
|
|
5637
|
+
(new Promise(resolve => {
|
|
5638
|
+
this.errorCallback(err);
|
|
5639
|
+
this.rejected = true;
|
|
5640
|
+
resolve();
|
|
5641
|
+
}))
|
|
5642
|
+
);
|
|
5643
|
+
}
|
|
5644
|
+
cancel() {
|
|
5645
|
+
}
|
|
5646
|
+
}
|
|
5647
|
+
const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
5648
|
+
function isUUID(value) {
|
|
5649
|
+
return _UUIDPattern.test(value);
|
|
5650
|
+
}
|
|
5651
|
+
const PROFILES_ENABLEMENT_CONFIG = 'workbench.experimental.settingsProfiles.enabled';
|
|
5652
|
+
const IUserDataProfilesService = ( (createDecorator('IUserDataProfilesService')));
|
|
5653
|
+
const EXTENSIONS_RESOURCE_NAME = 'extensions.json';
|
|
5654
|
+
function toUserDataProfile(name, location, useDefaultFlags) {
|
|
5655
|
+
return {
|
|
5656
|
+
id: ( (hash(location.path).toString(16))),
|
|
5657
|
+
name: name,
|
|
5658
|
+
location: location,
|
|
5659
|
+
isDefault: false,
|
|
5660
|
+
globalStorageHome: joinPath(location, 'globalStorage'),
|
|
5661
|
+
settingsResource: joinPath(location, 'settings.json'),
|
|
5662
|
+
keybindingsResource: joinPath(location, 'keybindings.json'),
|
|
5663
|
+
tasksResource: joinPath(location, 'tasks.json'),
|
|
5664
|
+
snippetsHome: joinPath(location, 'snippets'),
|
|
5665
|
+
extensionsResource: joinPath(location, EXTENSIONS_RESOURCE_NAME),
|
|
5666
|
+
useDefaultFlags
|
|
5667
|
+
};
|
|
5668
|
+
}
|
|
5669
|
+
let UserDataProfilesService = class UserDataProfilesService extends Disposable {
|
|
5670
|
+
constructor(environmentService, fileService, uriIdentityService, logService) {
|
|
5671
|
+
super();
|
|
5672
|
+
this.environmentService = environmentService;
|
|
5673
|
+
this.fileService = fileService;
|
|
5674
|
+
this.uriIdentityService = uriIdentityService;
|
|
5675
|
+
this.logService = logService;
|
|
5676
|
+
this.enabled = false;
|
|
5677
|
+
this.defaultProfileShouldIncludeExtensionsResourceAlways = false;
|
|
5678
|
+
this._onDidChangeProfiles = this._register(( (new Emitter())));
|
|
5679
|
+
this.onDidChangeProfiles = this._onDidChangeProfiles.event;
|
|
5680
|
+
this._onWillCreateProfile = this._register(( (new Emitter())));
|
|
5681
|
+
this.onWillCreateProfile = this._onWillCreateProfile.event;
|
|
5682
|
+
this._onWillRemoveProfile = this._register(( (new Emitter())));
|
|
5683
|
+
this.onWillRemoveProfile = this._onWillRemoveProfile.event;
|
|
5684
|
+
this.profilesHome = joinPath(this.environmentService.userRoamingDataHome, 'profiles');
|
|
5685
|
+
}
|
|
5686
|
+
get defaultProfile() { return this.profiles[0]; }
|
|
5687
|
+
get profiles() { return this.profilesObject.profiles; }
|
|
5688
|
+
setEnablement(enabled) {
|
|
5689
|
+
if (this.enabled !== enabled) {
|
|
5690
|
+
this._profilesObject = undefined;
|
|
5691
|
+
this.enabled = enabled;
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5694
|
+
get profilesObject() {
|
|
5695
|
+
if (!this._profilesObject) {
|
|
5696
|
+
const profiles = this.enabled ? this.getStoredProfiles().map(storedProfile => toUserDataProfile(storedProfile.name, storedProfile.location, storedProfile.useDefaultFlags)) : [];
|
|
5697
|
+
let emptyWindow;
|
|
5698
|
+
const workspaces = ( (new ResourceMap$1()));
|
|
5699
|
+
if (profiles.length) {
|
|
5700
|
+
const profileAssicaitions = this.getStoredProfileAssociations();
|
|
5701
|
+
if (profileAssicaitions.workspaces) {
|
|
5702
|
+
for (const [workspacePath, profilePath] of Object.entries(profileAssicaitions.workspaces)) {
|
|
5703
|
+
const workspace = ( (URI.parse(workspacePath)));
|
|
5704
|
+
const profileLocation = ( (URI.parse(profilePath)));
|
|
5705
|
+
const profile = profiles.find(p => this.uriIdentityService.extUri.isEqual(p.location, profileLocation));
|
|
5706
|
+
if (profile) {
|
|
5707
|
+
workspaces.set(workspace, profile);
|
|
5708
|
+
}
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
5711
|
+
if (profileAssicaitions.emptyWindow) {
|
|
5712
|
+
const emptyWindowProfileLocation = ( (URI.parse(profileAssicaitions.emptyWindow)));
|
|
5713
|
+
emptyWindow = profiles.find(p => this.uriIdentityService.extUri.isEqual(p.location, emptyWindowProfileLocation));
|
|
5714
|
+
}
|
|
5715
|
+
}
|
|
5716
|
+
const profile = toUserDataProfile(( (localize('defaultProfile', "Default"))), this.environmentService.userRoamingDataHome);
|
|
5717
|
+
profiles.unshift({ ...profile, isDefault: true, extensionsResource: this.defaultProfileShouldIncludeExtensionsResourceAlways || profiles.length > 0 ? profile.extensionsResource : undefined });
|
|
5718
|
+
this._profilesObject = { profiles, workspaces, emptyWindow };
|
|
5719
|
+
}
|
|
5720
|
+
return this._profilesObject;
|
|
5721
|
+
}
|
|
5722
|
+
getProfile(workspaceIdentifier) {
|
|
5723
|
+
const workspace = this.getWorkspace(workspaceIdentifier);
|
|
5724
|
+
const profile = URI.isUri(workspace) ? this.profilesObject.workspaces.get(workspace) : this.profilesObject.emptyWindow;
|
|
5725
|
+
return profile ?? this.defaultProfile;
|
|
5726
|
+
}
|
|
5727
|
+
getWorkspace(workspaceIdentifier) {
|
|
5728
|
+
if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier)) {
|
|
5729
|
+
return workspaceIdentifier.uri;
|
|
5730
|
+
}
|
|
5731
|
+
if (isWorkspaceIdentifier(workspaceIdentifier)) {
|
|
5732
|
+
return workspaceIdentifier.configPath;
|
|
5733
|
+
}
|
|
5734
|
+
return 'empty-window';
|
|
5735
|
+
}
|
|
5736
|
+
async createProfile(name, useDefaultFlags, workspaceIdentifier) {
|
|
5737
|
+
if (!this.enabled) {
|
|
5738
|
+
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
5739
|
+
}
|
|
5740
|
+
if (this.getStoredProfiles().some(p => p.name === name)) {
|
|
5741
|
+
throw new Error(`Profile with name ${name} already exists`);
|
|
5742
|
+
}
|
|
5743
|
+
const profile = toUserDataProfile(name, joinPath(this.profilesHome, ( (hash(generateUuid()).toString(16)))), useDefaultFlags);
|
|
5744
|
+
await this.fileService.createFolder(profile.location);
|
|
5745
|
+
const joiners = [];
|
|
5746
|
+
this._onWillCreateProfile.fire({
|
|
5747
|
+
profile,
|
|
5748
|
+
join(promise) {
|
|
5749
|
+
joiners.push(promise);
|
|
5750
|
+
}
|
|
5751
|
+
});
|
|
5752
|
+
await Promises.settled(joiners);
|
|
5753
|
+
this.updateProfiles([profile], [], []);
|
|
5754
|
+
if (workspaceIdentifier) {
|
|
5755
|
+
await this.setProfileForWorkspace(profile, workspaceIdentifier);
|
|
5756
|
+
}
|
|
5757
|
+
return profile;
|
|
5758
|
+
}
|
|
5759
|
+
async updateProfile(profileToUpdate, name, useDefaultFlags) {
|
|
5760
|
+
if (!this.enabled) {
|
|
5761
|
+
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
5762
|
+
}
|
|
5763
|
+
let profile = this.profiles.find(p => p.id === profileToUpdate.id);
|
|
5764
|
+
if (!profile) {
|
|
5765
|
+
throw new Error(`Profile '${profileToUpdate.name}' does not exist`);
|
|
5766
|
+
}
|
|
5767
|
+
profile = toUserDataProfile(name, profile.location, useDefaultFlags);
|
|
5768
|
+
this.updateProfiles([], [], [profile]);
|
|
5769
|
+
return profile;
|
|
5770
|
+
}
|
|
5771
|
+
async setProfileForWorkspace(profileToSet, workspaceIdentifier) {
|
|
5772
|
+
if (!this.enabled) {
|
|
5773
|
+
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
5774
|
+
}
|
|
5775
|
+
const profile = this.profiles.find(p => p.id === profileToSet.id);
|
|
5776
|
+
if (!profile) {
|
|
5777
|
+
throw new Error(`Profile '${profileToSet.name}' does not exist`);
|
|
5778
|
+
}
|
|
5779
|
+
this.updateWorkspaceAssociation(workspaceIdentifier, profile);
|
|
5780
|
+
}
|
|
5781
|
+
async unsetWorkspace(workspaceIdentifier) {
|
|
5782
|
+
if (!this.enabled) {
|
|
5783
|
+
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
5784
|
+
}
|
|
5785
|
+
this.updateWorkspaceAssociation(workspaceIdentifier);
|
|
5786
|
+
}
|
|
5787
|
+
async removeProfile(profileToRemove) {
|
|
5788
|
+
if (!this.enabled) {
|
|
5789
|
+
throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
|
|
5790
|
+
}
|
|
5791
|
+
if (profileToRemove.isDefault) {
|
|
5792
|
+
throw new Error('Cannot remove default profile');
|
|
5793
|
+
}
|
|
5794
|
+
const profile = this.profiles.find(p => p.id === profileToRemove.id);
|
|
5795
|
+
if (!profile) {
|
|
5796
|
+
throw new Error(`Profile '${profileToRemove.name}' does not exist`);
|
|
5797
|
+
}
|
|
5798
|
+
const joiners = [];
|
|
5799
|
+
this._onWillRemoveProfile.fire({
|
|
5800
|
+
profile,
|
|
5801
|
+
join(promise) {
|
|
5802
|
+
joiners.push(promise);
|
|
5803
|
+
}
|
|
5804
|
+
});
|
|
5805
|
+
await Promises.settled(joiners);
|
|
5806
|
+
if (profile.id === this.profilesObject.emptyWindow?.id) {
|
|
5807
|
+
this.profilesObject.emptyWindow = undefined;
|
|
5808
|
+
}
|
|
5809
|
+
for (const workspace of [...( (this.profilesObject.workspaces.keys()))]) {
|
|
5810
|
+
if (profile.id === this.profilesObject.workspaces.get(workspace)?.id) {
|
|
5811
|
+
this.profilesObject.workspaces.delete(workspace);
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5814
|
+
this.updateStoredProfileAssociations();
|
|
5815
|
+
this.updateProfiles([], [profile], []);
|
|
5816
|
+
try {
|
|
5817
|
+
if (this.profiles.length === 1) {
|
|
5818
|
+
await this.fileService.del(this.profilesHome, { recursive: true });
|
|
5819
|
+
}
|
|
5820
|
+
else {
|
|
5821
|
+
await this.fileService.del(profile.location, { recursive: true });
|
|
5822
|
+
}
|
|
5823
|
+
}
|
|
5824
|
+
catch (error) {
|
|
5825
|
+
this.logService.error(error);
|
|
5826
|
+
}
|
|
5827
|
+
}
|
|
5828
|
+
updateProfiles(added, removed, updated) {
|
|
5829
|
+
const storedProfiles = [];
|
|
5830
|
+
for (let profile of [...this.profilesObject.profiles, ...added]) {
|
|
5831
|
+
if (profile.isDefault) {
|
|
5832
|
+
continue;
|
|
5833
|
+
}
|
|
5834
|
+
if (removed.some(p => profile.id === p.id)) {
|
|
5835
|
+
continue;
|
|
5836
|
+
}
|
|
5837
|
+
profile = updated.find(p => profile.id === p.id) ?? profile;
|
|
5838
|
+
storedProfiles.push({ location: profile.location, name: profile.name, useDefaultFlags: profile.useDefaultFlags });
|
|
5839
|
+
}
|
|
5840
|
+
this.saveStoredProfiles(storedProfiles);
|
|
5841
|
+
this._profilesObject = undefined;
|
|
5842
|
+
this.triggerProfilesChanges(added, removed, updated);
|
|
5843
|
+
}
|
|
5844
|
+
triggerProfilesChanges(added, removed, updated) {
|
|
5845
|
+
this._onDidChangeProfiles.fire({ added, removed, updated, all: this.profiles });
|
|
5846
|
+
}
|
|
5847
|
+
updateWorkspaceAssociation(workspaceIdentifier, newProfile) {
|
|
5848
|
+
const workspace = this.getWorkspace(workspaceIdentifier);
|
|
5849
|
+
if (URI.isUri(workspace)) {
|
|
5850
|
+
this.profilesObject.workspaces.delete(workspace);
|
|
5851
|
+
if (newProfile && !newProfile.isDefault) {
|
|
5852
|
+
this.profilesObject.workspaces.set(workspace, newProfile);
|
|
5853
|
+
}
|
|
5854
|
+
}
|
|
5855
|
+
else {
|
|
5856
|
+
this.profilesObject.emptyWindow = !newProfile?.isDefault ? newProfile : undefined;
|
|
5857
|
+
}
|
|
5858
|
+
this.updateStoredProfileAssociations();
|
|
5859
|
+
}
|
|
5860
|
+
updateStoredProfileAssociations() {
|
|
5861
|
+
const workspaces = {};
|
|
5862
|
+
for (const [workspace, profile] of this.profilesObject.workspaces.entries()) {
|
|
5863
|
+
workspaces[( (workspace.toString()))] = ( (profile.location.toString()));
|
|
5864
|
+
}
|
|
5865
|
+
const emptyWindow = this.profilesObject.emptyWindow?.location.toString();
|
|
5866
|
+
this.saveStoredProfileAssociations({ workspaces, emptyWindow });
|
|
5867
|
+
this._profilesObject = undefined;
|
|
5868
|
+
}
|
|
5869
|
+
getStoredProfiles() { return []; }
|
|
5870
|
+
saveStoredProfiles(storedProfiles) { throw new Error('not implemented'); }
|
|
5871
|
+
getStoredProfileAssociations() { return {}; }
|
|
5872
|
+
saveStoredProfileAssociations(storedProfileAssociations) { throw new Error('not implemented'); }
|
|
5873
|
+
};
|
|
5874
|
+
UserDataProfilesService.PROFILES_KEY = 'userDataProfiles';
|
|
5875
|
+
UserDataProfilesService.PROFILE_ASSOCIATIONS_KEY = 'profileAssociations';
|
|
5876
|
+
UserDataProfilesService = ( (__decorate([
|
|
5877
|
+
( (__param(0, IEnvironmentService))),
|
|
5878
|
+
( (__param(1, IFileService))),
|
|
5879
|
+
( (__param(2, IUriIdentityService))),
|
|
5880
|
+
( (__param(3, ILogService)))
|
|
5881
|
+
], UserDataProfilesService)));
|
|
5882
|
+
const IPolicyService = ( (createDecorator('policy')));
|
|
5883
|
+
class NullPolicyService {
|
|
5884
|
+
constructor() {
|
|
5885
|
+
this.onDidChange = Event.None;
|
|
5886
|
+
}
|
|
5887
|
+
async registerPolicyDefinitions() { return {}; }
|
|
5888
|
+
getPolicyValue() { return undefined; }
|
|
5889
|
+
serialize() { return undefined; }
|
|
5890
|
+
}
|
|
5936
5891
|
const EXTENSION_CATEGORIES = [
|
|
5937
5892
|
'Azure',
|
|
5938
5893
|
'Data Science',
|
|
@@ -7275,10 +7230,10 @@ registerSingleton(ILanguageStatusService, class LanguageStatusServiceImpl {
|
|
|
7275
7230
|
return this._provider.ordered(model).sort((a, b) => {
|
|
7276
7231
|
let res = b.severity - a.severity;
|
|
7277
7232
|
if (res === 0) {
|
|
7278
|
-
res = compare(a.source, b.source);
|
|
7233
|
+
res = compare$1(a.source, b.source);
|
|
7279
7234
|
}
|
|
7280
7235
|
if (res === 0) {
|
|
7281
|
-
res = compare(a.id, b.id);
|
|
7236
|
+
res = compare$1(a.id, b.id);
|
|
7282
7237
|
}
|
|
7283
7238
|
return res;
|
|
7284
7239
|
});
|
|
@@ -7437,4 +7392,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
|
|
|
7437
7392
|
this.getSnippetsSync = unsupported;
|
|
7438
7393
|
}
|
|
7439
7394
|
});
|
|
7440
|
-
export {
|
|
7395
|
+
export { readableToBuffer as A, Barrier as B, newWriteableBufferStream as C, newWriteableStream as D, Emitter as E, IUserDataProfileService as F, IKeyboardLayoutService as G, IPreferencesService as H, IExtensionService as I, ExtensionMessageCollector as J, parse as K, ITextMateService as L, getNodeType as M, NotImplementedError as N, IBrowserWorkbenchEnvironmentService as O, IHostColorSchemeService as P, IUserDataInitializationService as Q, ResourceSet as R, Sequencer as S, UserSettings as U, readonly as a, ILifecycleService as b, checkProposedApiEnabled as c, disposed as d, IntervalCounter as e, ExtensionsRegistry as f, ILanguageDetectionService as g, IPolicyService as h, isProposedApiEnabled as i, IUserDataProfilesService as j, NullPolicyService as k, format2 as l, getServiceMachineId as m, ResourceQueue as n, isReadableStream as o, peekStream as p, peekReadable as q, raceCancellationError as r, bufferToReadable as s, streamToBuffer as t, unsupported as u, consumeStream as v, transform as w, isReadableBufferedStream as x, listenStream as y, bufferedStreamToBuffer as z };
|