@vscode/component-explorer-cli 0.1.1-7 → 0.1.1-8

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.
Files changed (65) hide show
  1. package/dist/commands/mcpCommand.d.ts +2 -0
  2. package/dist/commands/mcpCommand.d.ts.map +1 -1
  3. package/dist/commands/mcpCommand.js +35 -6
  4. package/dist/commands/mcpCommand.js.map +1 -1
  5. package/dist/commands/serveCommand.d.ts +3 -0
  6. package/dist/commands/serveCommand.d.ts.map +1 -1
  7. package/dist/commands/serveCommand.js +52 -3
  8. package/dist/commands/serveCommand.js.map +1 -1
  9. package/dist/component-explorer-config.schema.json +183 -0
  10. package/dist/componentExplorer.d.ts +10 -0
  11. package/dist/componentExplorer.d.ts.map +1 -1
  12. package/dist/componentExplorer.js +48 -2
  13. package/dist/componentExplorer.js.map +1 -1
  14. package/dist/daemon/DaemonService.d.ts +26 -4
  15. package/dist/daemon/DaemonService.d.ts.map +1 -1
  16. package/dist/daemon/DaemonService.js +39 -3
  17. package/dist/daemon/DaemonService.js.map +1 -1
  18. package/dist/daemon/lifecycle.js +2 -2
  19. package/dist/daemon/lifecycle.js.map +1 -1
  20. package/dist/daemon/pipeClient.js +3 -3
  21. package/dist/daemon/pipeClient.js.map +1 -1
  22. package/dist/daemon/pipeServer.js +2 -2
  23. package/dist/daemon/pipeServer.js.map +1 -1
  24. package/dist/dependencyInstaller.js +1 -1
  25. package/dist/dependencyInstaller.js.map +1 -1
  26. package/dist/external/vscode-observables/observables/dist/disposables.js +24 -1
  27. package/dist/external/vscode-observables/observables/dist/disposables.js.map +1 -1
  28. package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js +1 -4
  29. package/dist/external/vscode-observables/observables/dist/observableInternal/commonFacade/deps.js.map +1 -1
  30. package/dist/external/vscode-observables/observables/dist/observableInternal/index.js +2 -5
  31. package/dist/external/vscode-observables/observables/dist/observableInternal/index.js.map +1 -1
  32. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js +30 -6
  33. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  34. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js +1 -1
  35. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/baseObservable.js.map +1 -1
  36. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js +12 -1
  37. package/dist/external/vscode-observables/observables/dist/observableInternal/observables/derived.js.map +1 -1
  38. package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js +55 -0
  39. package/dist/external/vscode-observables/observables/dist/observableInternal/utils/utilsCancellation.js.map +1 -0
  40. package/dist/git/gitUtils.js +1 -1
  41. package/dist/git/gitUtils.js.map +1 -1
  42. package/dist/mcp/McpServer.d.ts +29 -4
  43. package/dist/mcp/McpServer.d.ts.map +1 -1
  44. package/dist/mcp/McpServer.js +393 -81
  45. package/dist/mcp/McpServer.js.map +1 -1
  46. package/dist/packages/simple-api/dist/{chunk-A5PE72HI.js → chunk-Q24JOMNK.js} +7 -1
  47. package/dist/packages/simple-api/dist/chunk-Q24JOMNK.js.map +1 -0
  48. package/dist/utils.d.ts +20 -0
  49. package/dist/utils.d.ts.map +1 -1
  50. package/dist/utils.js +22 -1
  51. package/dist/utils.js.map +1 -1
  52. package/dist/watchConfig.d.ts +36 -0
  53. package/dist/watchConfig.d.ts.map +1 -1
  54. package/dist/watchConfig.js +32 -22
  55. package/dist/watchConfig.js.map +1 -1
  56. package/package.json +6 -4
  57. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js +0 -72
  58. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/debuggerRpc.js.map +0 -1
  59. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js +0 -447
  60. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js.map +0 -1
  61. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js +0 -64
  62. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js.map +0 -1
  63. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js +0 -52
  64. package/dist/external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js.map +0 -1
  65. package/dist/packages/simple-api/dist/chunk-A5PE72HI.js.map +0 -1
@@ -1,447 +0,0 @@
1
- import { AutorunObserver } from '../../reactions/autorunImpl.js';
2
- import { formatValue } from '../consoleObservableLogger.js';
3
- import { registerDebugChannel } from './debuggerRpc.js';
4
- import { Throttler, deepAssignDeleteNulls, deepAssign } from './utils.js';
5
- import { FromEventObservable } from '../../observables/observableFromEvent.js';
6
- import { onUnexpectedError, BugIndicatingError, isDefined } from '../../commonFacade/deps.js';
7
- import { Derived } from '../../observables/derivedImpl.js';
8
- import { ObservableValue } from '../../observables/observableValue.js';
9
- import { DebugLocation } from '../../debugLocation.js';
10
-
11
- /*---------------------------------------------------------------------------------------------
12
- * Copyright (c) Microsoft Corporation. All rights reserved.
13
- * Licensed under the MIT License. See License.txt in the project root for license information.
14
- *--------------------------------------------------------------------------------------------*/
15
-
16
- /*---------------------------------------------------------------------------------------------
17
- * Copyright (c) Microsoft Corporation. All rights reserved.
18
- * Licensed under the MIT License. See License.txt in the project root for license information.
19
- *--------------------------------------------------------------------------------------------*/
20
- class DevToolsLogger {
21
- static getInstance() {
22
- if (DevToolsLogger._instance === undefined) {
23
- DevToolsLogger._instance = new DevToolsLogger();
24
- }
25
- return DevToolsLogger._instance;
26
- }
27
- getTransactionState() {
28
- const affected = [];
29
- const txs = [...this._activeTransactions];
30
- if (txs.length === 0) {
31
- return undefined;
32
- }
33
- const observerQueue = txs.flatMap(t => t.debugGetUpdatingObservers() ?? []).map(o => o.observer);
34
- const processedObservers = new Set();
35
- while (observerQueue.length > 0) {
36
- const observer = observerQueue.shift();
37
- if (processedObservers.has(observer)) {
38
- continue;
39
- }
40
- processedObservers.add(observer);
41
- const state = this._getInfo(observer, d => {
42
- if (!processedObservers.has(d)) {
43
- observerQueue.push(d);
44
- }
45
- });
46
- if (state) {
47
- affected.push(state);
48
- }
49
- }
50
- return { names: txs.map(t => t.getDebugName() ?? 'tx'), affected };
51
- }
52
- _getObservableInfo(observable) {
53
- const info = this._instanceInfos.get(observable);
54
- if (!info) {
55
- onUnexpectedError(new BugIndicatingError('No info found'));
56
- return undefined;
57
- }
58
- return info;
59
- }
60
- _getAutorunInfo(autorun) {
61
- const info = this._instanceInfos.get(autorun);
62
- if (!info) {
63
- onUnexpectedError(new BugIndicatingError('No info found'));
64
- return undefined;
65
- }
66
- return info;
67
- }
68
- _getInfo(observer, queue) {
69
- if (observer instanceof Derived) {
70
- const observersToUpdate = [...observer.debugGetObservers()];
71
- for (const o of observersToUpdate) {
72
- queue(o);
73
- }
74
- const info = this._getObservableInfo(observer);
75
- if (!info) {
76
- return;
77
- }
78
- const observerState = observer.debugGetState();
79
- const base = { name: observer.debugName, instanceId: info.instanceId, updateCount: observerState.updateCount };
80
- const changedDependencies = [...info.changedObservables].map(o => this._instanceInfos.get(o)?.instanceId).filter(isDefined);
81
- if (observerState.isComputing) {
82
- return { ...base, type: 'observable/derived', state: 'updating', changedDependencies, initialComputation: false };
83
- }
84
- switch (observerState.state) {
85
- case 0 /* DerivedState.initial */:
86
- return { ...base, type: 'observable/derived', state: 'noValue' };
87
- case 3 /* DerivedState.upToDate */:
88
- return { ...base, type: 'observable/derived', state: 'upToDate' };
89
- case 2 /* DerivedState.stale */:
90
- return { ...base, type: 'observable/derived', state: 'stale', changedDependencies };
91
- case 1 /* DerivedState.dependenciesMightHaveChanged */:
92
- return { ...base, type: 'observable/derived', state: 'possiblyStale' };
93
- }
94
- }
95
- else if (observer instanceof AutorunObserver) {
96
- const info = this._getAutorunInfo(observer);
97
- if (!info) {
98
- return undefined;
99
- }
100
- const base = { name: observer.debugName, instanceId: info.instanceId, updateCount: info.updateCount };
101
- const changedDependencies = [...info.changedObservables].map(o => this._instanceInfos.get(o).instanceId);
102
- if (observer.debugGetState().isRunning) {
103
- return { ...base, type: 'autorun', state: 'updating', changedDependencies };
104
- }
105
- switch (observer.debugGetState().state) {
106
- case 3 /* AutorunState.upToDate */:
107
- return { ...base, type: 'autorun', state: 'upToDate' };
108
- case 2 /* AutorunState.stale */:
109
- return { ...base, type: 'autorun', state: 'stale', changedDependencies };
110
- case 1 /* AutorunState.dependenciesMightHaveChanged */:
111
- return { ...base, type: 'autorun', state: 'possiblyStale' };
112
- }
113
- }
114
- return undefined;
115
- }
116
- _formatObservable(obs) {
117
- const info = this._getObservableInfo(obs);
118
- if (!info) {
119
- return undefined;
120
- }
121
- return { name: obs.debugName, instanceId: info.instanceId };
122
- }
123
- _formatObserver(obs) {
124
- if (obs instanceof Derived) {
125
- return { name: obs.toString(), instanceId: this._getObservableInfo(obs)?.instanceId };
126
- }
127
- const autorunInfo = this._getAutorunInfo(obs);
128
- if (autorunInfo) {
129
- return { name: obs.toString(), instanceId: autorunInfo.instanceId };
130
- }
131
- return undefined;
132
- }
133
- constructor() {
134
- this._declarationId = 0;
135
- this._instanceId = 0;
136
- this._declarations = new Map();
137
- this._instanceInfos = new WeakMap();
138
- this._aliveInstances = new Map();
139
- this._activeTransactions = new Set();
140
- this._channel = registerDebugChannel('observableDevTools', () => {
141
- return {
142
- notifications: {
143
- setDeclarationIdFilter: declarationIds => {
144
- },
145
- logObservableValue: (observableId) => {
146
- console.log('logObservableValue', observableId);
147
- },
148
- flushUpdates: () => {
149
- this._flushUpdates();
150
- },
151
- resetUpdates: () => {
152
- this._pendingChanges = null;
153
- this._channel.api.notifications.handleChange(this._fullState, true);
154
- },
155
- },
156
- requests: {
157
- getDeclarations: () => {
158
- const result = {};
159
- for (const decl of this._declarations.values()) {
160
- result[decl.id] = decl;
161
- }
162
- return { decls: result };
163
- },
164
- getSummarizedInstances: () => {
165
- return null;
166
- },
167
- getObservableValueInfo: instanceId => {
168
- const obs = this._aliveInstances.get(instanceId);
169
- return {
170
- observers: [...obs.debugGetObservers()].map(d => this._formatObserver(d)).filter(isDefined),
171
- };
172
- },
173
- getDerivedInfo: instanceId => {
174
- const d = this._aliveInstances.get(instanceId);
175
- return {
176
- dependencies: [...d.debugGetState().dependencies].map(d => this._formatObservable(d)).filter(isDefined),
177
- observers: [...d.debugGetObservers()].map(d => this._formatObserver(d)).filter(isDefined),
178
- };
179
- },
180
- getAutorunInfo: instanceId => {
181
- const obs = this._aliveInstances.get(instanceId);
182
- return {
183
- dependencies: [...obs.debugGetState().dependencies].map(d => this._formatObservable(d)).filter(isDefined),
184
- };
185
- },
186
- getTransactionState: () => {
187
- return this.getTransactionState();
188
- },
189
- setValue: (instanceId, jsonValue) => {
190
- const obs = this._aliveInstances.get(instanceId);
191
- if (obs instanceof Derived) {
192
- obs.debugSetValue(jsonValue);
193
- }
194
- else if (obs instanceof ObservableValue) {
195
- obs.debugSetValue(jsonValue);
196
- }
197
- else if (obs instanceof FromEventObservable) {
198
- obs.debugSetValue(jsonValue);
199
- }
200
- else {
201
- throw new BugIndicatingError('Observable is not supported');
202
- }
203
- const observers = [...obs.debugGetObservers()];
204
- for (const d of observers) {
205
- d.beginUpdate(obs);
206
- }
207
- for (const d of observers) {
208
- d.handleChange(obs, undefined);
209
- }
210
- for (const d of observers) {
211
- d.endUpdate(obs);
212
- }
213
- },
214
- getValue: instanceId => {
215
- const obs = this._aliveInstances.get(instanceId);
216
- if (obs instanceof Derived) {
217
- return formatValue(obs.debugGetState().value, 200);
218
- }
219
- else if (obs instanceof ObservableValue) {
220
- return formatValue(obs.debugGetState().value, 200);
221
- }
222
- return undefined;
223
- },
224
- logValue: (instanceId) => {
225
- const obs = this._aliveInstances.get(instanceId);
226
- if (obs && 'get' in obs) {
227
- console.log('Logged Value:', obs.get());
228
- }
229
- else {
230
- throw new BugIndicatingError('Observable is not supported');
231
- }
232
- },
233
- rerun: (instanceId) => {
234
- const obs = this._aliveInstances.get(instanceId);
235
- if (obs instanceof Derived) {
236
- obs.debugRecompute();
237
- }
238
- else if (obs instanceof AutorunObserver) {
239
- obs.debugRerun();
240
- }
241
- else {
242
- throw new BugIndicatingError('Observable is not supported');
243
- }
244
- },
245
- }
246
- };
247
- });
248
- this._pendingChanges = null;
249
- this._changeThrottler = new Throttler();
250
- this._fullState = {};
251
- this._flushUpdates = () => {
252
- if (this._pendingChanges !== null) {
253
- this._channel.api.notifications.handleChange(this._pendingChanges, false);
254
- this._pendingChanges = null;
255
- }
256
- };
257
- DebugLocation.enable();
258
- }
259
- _handleChange(update) {
260
- deepAssignDeleteNulls(this._fullState, update);
261
- if (this._pendingChanges === null) {
262
- this._pendingChanges = update;
263
- }
264
- else {
265
- deepAssign(this._pendingChanges, update);
266
- }
267
- this._changeThrottler.throttle(this._flushUpdates, 10);
268
- }
269
- _getDeclarationId(type, location) {
270
- if (!location) {
271
- return -1;
272
- }
273
- let decInfo = this._declarations.get(location.id);
274
- if (decInfo === undefined) {
275
- decInfo = {
276
- id: this._declarationId++,
277
- type,
278
- url: location.fileName,
279
- line: location.line,
280
- column: location.column,
281
- };
282
- this._declarations.set(location.id, decInfo);
283
- this._handleChange({ decls: { [decInfo.id]: decInfo } });
284
- }
285
- return decInfo.id;
286
- }
287
- handleObservableCreated(observable, location) {
288
- const declarationId = this._getDeclarationId('observable/value', location);
289
- const info = {
290
- declarationId,
291
- instanceId: this._instanceId++,
292
- listenerCount: 0,
293
- lastValue: undefined,
294
- updateCount: 0,
295
- changedObservables: new Set(),
296
- };
297
- this._instanceInfos.set(observable, info);
298
- }
299
- handleOnListenerCountChanged(observable, newCount) {
300
- const info = this._getObservableInfo(observable);
301
- if (!info) {
302
- return;
303
- }
304
- if (info.listenerCount === 0 && newCount > 0) {
305
- const type = observable instanceof Derived ? 'observable/derived' : 'observable/value';
306
- this._aliveInstances.set(info.instanceId, observable);
307
- this._handleChange({
308
- instances: {
309
- [info.instanceId]: {
310
- instanceId: info.instanceId,
311
- declarationId: info.declarationId,
312
- formattedValue: info.lastValue,
313
- type,
314
- name: observable.debugName,
315
- }
316
- }
317
- });
318
- }
319
- else if (info.listenerCount > 0 && newCount === 0) {
320
- this._handleChange({
321
- instances: { [info.instanceId]: null }
322
- });
323
- this._aliveInstances.delete(info.instanceId);
324
- }
325
- info.listenerCount = newCount;
326
- }
327
- handleObservableUpdated(observable, changeInfo) {
328
- if (observable instanceof Derived) {
329
- this._handleDerivedRecomputed(observable, changeInfo);
330
- return;
331
- }
332
- const info = this._getObservableInfo(observable);
333
- if (info) {
334
- if (changeInfo.didChange) {
335
- info.lastValue = formatValue(changeInfo.newValue, 30);
336
- if (info.listenerCount > 0) {
337
- this._handleChange({
338
- instances: { [info.instanceId]: { formattedValue: info.lastValue } }
339
- });
340
- }
341
- }
342
- }
343
- }
344
- handleAutorunCreated(autorun, location) {
345
- const declarationId = this._getDeclarationId('autorun', location);
346
- const info = {
347
- declarationId,
348
- instanceId: this._instanceId++,
349
- updateCount: 0,
350
- changedObservables: new Set(),
351
- };
352
- this._instanceInfos.set(autorun, info);
353
- this._aliveInstances.set(info.instanceId, autorun);
354
- if (info) {
355
- this._handleChange({
356
- instances: {
357
- [info.instanceId]: {
358
- instanceId: info.instanceId,
359
- declarationId: info.declarationId,
360
- runCount: 0,
361
- type: 'autorun',
362
- name: autorun.debugName,
363
- }
364
- }
365
- });
366
- }
367
- }
368
- handleAutorunDisposed(autorun) {
369
- const info = this._getAutorunInfo(autorun);
370
- if (!info) {
371
- return;
372
- }
373
- this._handleChange({
374
- instances: { [info.instanceId]: null }
375
- });
376
- this._instanceInfos.delete(autorun);
377
- this._aliveInstances.delete(info.instanceId);
378
- }
379
- handleAutorunDependencyChanged(autorun, observable, change) {
380
- const info = this._getAutorunInfo(autorun);
381
- if (!info) {
382
- return;
383
- }
384
- info.changedObservables.add(observable);
385
- }
386
- handleAutorunStarted(autorun) {
387
- }
388
- handleAutorunFinished(autorun) {
389
- const info = this._getAutorunInfo(autorun);
390
- if (!info) {
391
- return;
392
- }
393
- info.changedObservables.clear();
394
- info.updateCount++;
395
- this._handleChange({
396
- instances: { [info.instanceId]: { runCount: info.updateCount } }
397
- });
398
- }
399
- handleDerivedDependencyChanged(derived, observable, change) {
400
- const info = this._getObservableInfo(derived);
401
- if (info) {
402
- info.changedObservables.add(observable);
403
- }
404
- }
405
- _handleDerivedRecomputed(observable, changeInfo) {
406
- const info = this._getObservableInfo(observable);
407
- if (!info) {
408
- return;
409
- }
410
- const formattedValue = formatValue(changeInfo.newValue, 30);
411
- info.updateCount++;
412
- info.changedObservables.clear();
413
- info.lastValue = formattedValue;
414
- if (info.listenerCount > 0) {
415
- this._handleChange({
416
- instances: { [info.instanceId]: { formattedValue: formattedValue, recomputationCount: info.updateCount } }
417
- });
418
- }
419
- }
420
- handleDerivedCleared(observable) {
421
- const info = this._getObservableInfo(observable);
422
- if (!info) {
423
- return;
424
- }
425
- info.lastValue = undefined;
426
- info.changedObservables.clear();
427
- if (info.listenerCount > 0) {
428
- this._handleChange({
429
- instances: {
430
- [info.instanceId]: {
431
- formattedValue: undefined,
432
- }
433
- }
434
- });
435
- }
436
- }
437
- handleBeginTransaction(transaction) {
438
- this._activeTransactions.add(transaction);
439
- }
440
- handleEndTransaction(transaction) {
441
- this._activeTransactions.delete(transaction);
442
- }
443
- }
444
- DevToolsLogger._instance = undefined;
445
-
446
- export { DevToolsLogger };
447
- //# sourceMappingURL=devToolsLogger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"devToolsLogger.js","sources":["../../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugger/devToolsLogger.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { AutorunObserver } from '../../reactions/autorunImpl.js';\nimport { formatValue } from '../consoleObservableLogger.js';\nimport { registerDebugChannel } from './debuggerRpc.js';\nimport { Throttler, deepAssignDeleteNulls, deepAssign } from './utils.js';\nimport { FromEventObservable } from '../../observables/observableFromEvent.js';\nimport { onUnexpectedError, BugIndicatingError, isDefined } from '../../commonFacade/deps.js';\nimport { Derived } from '../../observables/derivedImpl.js';\nimport { ObservableValue } from '../../observables/observableValue.js';\nimport { DebugLocation } from '../../debugLocation.js';\n\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass DevToolsLogger {\n static getInstance() {\n if (DevToolsLogger._instance === undefined) {\n DevToolsLogger._instance = new DevToolsLogger();\n }\n return DevToolsLogger._instance;\n }\n getTransactionState() {\n const affected = [];\n const txs = [...this._activeTransactions];\n if (txs.length === 0) {\n return undefined;\n }\n const observerQueue = txs.flatMap(t => t.debugGetUpdatingObservers() ?? []).map(o => o.observer);\n const processedObservers = new Set();\n while (observerQueue.length > 0) {\n const observer = observerQueue.shift();\n if (processedObservers.has(observer)) {\n continue;\n }\n processedObservers.add(observer);\n const state = this._getInfo(observer, d => {\n if (!processedObservers.has(d)) {\n observerQueue.push(d);\n }\n });\n if (state) {\n affected.push(state);\n }\n }\n return { names: txs.map(t => t.getDebugName() ?? 'tx'), affected };\n }\n _getObservableInfo(observable) {\n const info = this._instanceInfos.get(observable);\n if (!info) {\n onUnexpectedError(new BugIndicatingError('No info found'));\n return undefined;\n }\n return info;\n }\n _getAutorunInfo(autorun) {\n const info = this._instanceInfos.get(autorun);\n if (!info) {\n onUnexpectedError(new BugIndicatingError('No info found'));\n return undefined;\n }\n return info;\n }\n _getInfo(observer, queue) {\n if (observer instanceof Derived) {\n const observersToUpdate = [...observer.debugGetObservers()];\n for (const o of observersToUpdate) {\n queue(o);\n }\n const info = this._getObservableInfo(observer);\n if (!info) {\n return;\n }\n const observerState = observer.debugGetState();\n const base = { name: observer.debugName, instanceId: info.instanceId, updateCount: observerState.updateCount };\n const changedDependencies = [...info.changedObservables].map(o => this._instanceInfos.get(o)?.instanceId).filter(isDefined);\n if (observerState.isComputing) {\n return { ...base, type: 'observable/derived', state: 'updating', changedDependencies, initialComputation: false };\n }\n switch (observerState.state) {\n case 0 /* DerivedState.initial */:\n return { ...base, type: 'observable/derived', state: 'noValue' };\n case 3 /* DerivedState.upToDate */:\n return { ...base, type: 'observable/derived', state: 'upToDate' };\n case 2 /* DerivedState.stale */:\n return { ...base, type: 'observable/derived', state: 'stale', changedDependencies };\n case 1 /* DerivedState.dependenciesMightHaveChanged */:\n return { ...base, type: 'observable/derived', state: 'possiblyStale' };\n }\n }\n else if (observer instanceof AutorunObserver) {\n const info = this._getAutorunInfo(observer);\n if (!info) {\n return undefined;\n }\n const base = { name: observer.debugName, instanceId: info.instanceId, updateCount: info.updateCount };\n const changedDependencies = [...info.changedObservables].map(o => this._instanceInfos.get(o).instanceId);\n if (observer.debugGetState().isRunning) {\n return { ...base, type: 'autorun', state: 'updating', changedDependencies };\n }\n switch (observer.debugGetState().state) {\n case 3 /* AutorunState.upToDate */:\n return { ...base, type: 'autorun', state: 'upToDate' };\n case 2 /* AutorunState.stale */:\n return { ...base, type: 'autorun', state: 'stale', changedDependencies };\n case 1 /* AutorunState.dependenciesMightHaveChanged */:\n return { ...base, type: 'autorun', state: 'possiblyStale' };\n }\n }\n return undefined;\n }\n _formatObservable(obs) {\n const info = this._getObservableInfo(obs);\n if (!info) {\n return undefined;\n }\n return { name: obs.debugName, instanceId: info.instanceId };\n }\n _formatObserver(obs) {\n if (obs instanceof Derived) {\n return { name: obs.toString(), instanceId: this._getObservableInfo(obs)?.instanceId };\n }\n const autorunInfo = this._getAutorunInfo(obs);\n if (autorunInfo) {\n return { name: obs.toString(), instanceId: autorunInfo.instanceId };\n }\n return undefined;\n }\n constructor() {\n this._declarationId = 0;\n this._instanceId = 0;\n this._declarations = new Map();\n this._instanceInfos = new WeakMap();\n this._aliveInstances = new Map();\n this._activeTransactions = new Set();\n this._channel = registerDebugChannel('observableDevTools', () => {\n return {\n notifications: {\n setDeclarationIdFilter: declarationIds => {\n },\n logObservableValue: (observableId) => {\n console.log('logObservableValue', observableId);\n },\n flushUpdates: () => {\n this._flushUpdates();\n },\n resetUpdates: () => {\n this._pendingChanges = null;\n this._channel.api.notifications.handleChange(this._fullState, true);\n },\n },\n requests: {\n getDeclarations: () => {\n const result = {};\n for (const decl of this._declarations.values()) {\n result[decl.id] = decl;\n }\n return { decls: result };\n },\n getSummarizedInstances: () => {\n return null;\n },\n getObservableValueInfo: instanceId => {\n const obs = this._aliveInstances.get(instanceId);\n return {\n observers: [...obs.debugGetObservers()].map(d => this._formatObserver(d)).filter(isDefined),\n };\n },\n getDerivedInfo: instanceId => {\n const d = this._aliveInstances.get(instanceId);\n return {\n dependencies: [...d.debugGetState().dependencies].map(d => this._formatObservable(d)).filter(isDefined),\n observers: [...d.debugGetObservers()].map(d => this._formatObserver(d)).filter(isDefined),\n };\n },\n getAutorunInfo: instanceId => {\n const obs = this._aliveInstances.get(instanceId);\n return {\n dependencies: [...obs.debugGetState().dependencies].map(d => this._formatObservable(d)).filter(isDefined),\n };\n },\n getTransactionState: () => {\n return this.getTransactionState();\n },\n setValue: (instanceId, jsonValue) => {\n const obs = this._aliveInstances.get(instanceId);\n if (obs instanceof Derived) {\n obs.debugSetValue(jsonValue);\n }\n else if (obs instanceof ObservableValue) {\n obs.debugSetValue(jsonValue);\n }\n else if (obs instanceof FromEventObservable) {\n obs.debugSetValue(jsonValue);\n }\n else {\n throw new BugIndicatingError('Observable is not supported');\n }\n const observers = [...obs.debugGetObservers()];\n for (const d of observers) {\n d.beginUpdate(obs);\n }\n for (const d of observers) {\n d.handleChange(obs, undefined);\n }\n for (const d of observers) {\n d.endUpdate(obs);\n }\n },\n getValue: instanceId => {\n const obs = this._aliveInstances.get(instanceId);\n if (obs instanceof Derived) {\n return formatValue(obs.debugGetState().value, 200);\n }\n else if (obs instanceof ObservableValue) {\n return formatValue(obs.debugGetState().value, 200);\n }\n return undefined;\n },\n logValue: (instanceId) => {\n const obs = this._aliveInstances.get(instanceId);\n if (obs && 'get' in obs) {\n console.log('Logged Value:', obs.get());\n }\n else {\n throw new BugIndicatingError('Observable is not supported');\n }\n },\n rerun: (instanceId) => {\n const obs = this._aliveInstances.get(instanceId);\n if (obs instanceof Derived) {\n obs.debugRecompute();\n }\n else if (obs instanceof AutorunObserver) {\n obs.debugRerun();\n }\n else {\n throw new BugIndicatingError('Observable is not supported');\n }\n },\n }\n };\n });\n this._pendingChanges = null;\n this._changeThrottler = new Throttler();\n this._fullState = {};\n this._flushUpdates = () => {\n if (this._pendingChanges !== null) {\n this._channel.api.notifications.handleChange(this._pendingChanges, false);\n this._pendingChanges = null;\n }\n };\n DebugLocation.enable();\n }\n _handleChange(update) {\n deepAssignDeleteNulls(this._fullState, update);\n if (this._pendingChanges === null) {\n this._pendingChanges = update;\n }\n else {\n deepAssign(this._pendingChanges, update);\n }\n this._changeThrottler.throttle(this._flushUpdates, 10);\n }\n _getDeclarationId(type, location) {\n if (!location) {\n return -1;\n }\n let decInfo = this._declarations.get(location.id);\n if (decInfo === undefined) {\n decInfo = {\n id: this._declarationId++,\n type,\n url: location.fileName,\n line: location.line,\n column: location.column,\n };\n this._declarations.set(location.id, decInfo);\n this._handleChange({ decls: { [decInfo.id]: decInfo } });\n }\n return decInfo.id;\n }\n handleObservableCreated(observable, location) {\n const declarationId = this._getDeclarationId('observable/value', location);\n const info = {\n declarationId,\n instanceId: this._instanceId++,\n listenerCount: 0,\n lastValue: undefined,\n updateCount: 0,\n changedObservables: new Set(),\n };\n this._instanceInfos.set(observable, info);\n }\n handleOnListenerCountChanged(observable, newCount) {\n const info = this._getObservableInfo(observable);\n if (!info) {\n return;\n }\n if (info.listenerCount === 0 && newCount > 0) {\n const type = observable instanceof Derived ? 'observable/derived' : 'observable/value';\n this._aliveInstances.set(info.instanceId, observable);\n this._handleChange({\n instances: {\n [info.instanceId]: {\n instanceId: info.instanceId,\n declarationId: info.declarationId,\n formattedValue: info.lastValue,\n type,\n name: observable.debugName,\n }\n }\n });\n }\n else if (info.listenerCount > 0 && newCount === 0) {\n this._handleChange({\n instances: { [info.instanceId]: null }\n });\n this._aliveInstances.delete(info.instanceId);\n }\n info.listenerCount = newCount;\n }\n handleObservableUpdated(observable, changeInfo) {\n if (observable instanceof Derived) {\n this._handleDerivedRecomputed(observable, changeInfo);\n return;\n }\n const info = this._getObservableInfo(observable);\n if (info) {\n if (changeInfo.didChange) {\n info.lastValue = formatValue(changeInfo.newValue, 30);\n if (info.listenerCount > 0) {\n this._handleChange({\n instances: { [info.instanceId]: { formattedValue: info.lastValue } }\n });\n }\n }\n }\n }\n handleAutorunCreated(autorun, location) {\n const declarationId = this._getDeclarationId('autorun', location);\n const info = {\n declarationId,\n instanceId: this._instanceId++,\n updateCount: 0,\n changedObservables: new Set(),\n };\n this._instanceInfos.set(autorun, info);\n this._aliveInstances.set(info.instanceId, autorun);\n if (info) {\n this._handleChange({\n instances: {\n [info.instanceId]: {\n instanceId: info.instanceId,\n declarationId: info.declarationId,\n runCount: 0,\n type: 'autorun',\n name: autorun.debugName,\n }\n }\n });\n }\n }\n handleAutorunDisposed(autorun) {\n const info = this._getAutorunInfo(autorun);\n if (!info) {\n return;\n }\n this._handleChange({\n instances: { [info.instanceId]: null }\n });\n this._instanceInfos.delete(autorun);\n this._aliveInstances.delete(info.instanceId);\n }\n handleAutorunDependencyChanged(autorun, observable, change) {\n const info = this._getAutorunInfo(autorun);\n if (!info) {\n return;\n }\n info.changedObservables.add(observable);\n }\n handleAutorunStarted(autorun) {\n }\n handleAutorunFinished(autorun) {\n const info = this._getAutorunInfo(autorun);\n if (!info) {\n return;\n }\n info.changedObservables.clear();\n info.updateCount++;\n this._handleChange({\n instances: { [info.instanceId]: { runCount: info.updateCount } }\n });\n }\n handleDerivedDependencyChanged(derived, observable, change) {\n const info = this._getObservableInfo(derived);\n if (info) {\n info.changedObservables.add(observable);\n }\n }\n _handleDerivedRecomputed(observable, changeInfo) {\n const info = this._getObservableInfo(observable);\n if (!info) {\n return;\n }\n const formattedValue = formatValue(changeInfo.newValue, 30);\n info.updateCount++;\n info.changedObservables.clear();\n info.lastValue = formattedValue;\n if (info.listenerCount > 0) {\n this._handleChange({\n instances: { [info.instanceId]: { formattedValue: formattedValue, recomputationCount: info.updateCount } }\n });\n }\n }\n handleDerivedCleared(observable) {\n const info = this._getObservableInfo(observable);\n if (!info) {\n return;\n }\n info.lastValue = undefined;\n info.changedObservables.clear();\n if (info.listenerCount > 0) {\n this._handleChange({\n instances: {\n [info.instanceId]: {\n formattedValue: undefined,\n }\n }\n });\n }\n }\n handleBeginTransaction(transaction) {\n this._activeTransactions.add(transaction);\n }\n handleEndTransaction(transaction) {\n this._activeTransactions.delete(transaction);\n }\n}\nDevToolsLogger._instance = undefined;\n\nexport { DevToolsLogger };\n//# sourceMappingURL=devToolsLogger.js.map\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA,MAAM,cAAc,CAAC;AACrB,IAAI,OAAO,WAAW,GAAG;AACzB,QAAQ,IAAI,cAAc,CAAC,SAAS,KAAK,SAAS,EAAE;AACpD,YAAY,cAAc,CAAC,SAAS,GAAG,IAAI,cAAc,EAAE;AAC3D,QAAQ;AACR,QAAQ,OAAO,cAAc,CAAC,SAAS;AACvC,IAAI;AACJ,IAAI,mBAAmB,GAAG;AAC1B,QAAQ,MAAM,QAAQ,GAAG,EAAE;AAC3B,QAAQ,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC;AACjD,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC9B,YAAY,OAAO,SAAS;AAC5B,QAAQ;AACR,QAAQ,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;AACxG,QAAQ,MAAM,kBA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ACvC,wBAAwB,cAAc,EAAE,SAAS;AACjD;AACA;AACA,aAAa,CAAC;AACd,QAAQ;AACR,IAAI;AACJ,IAAI,sBAAsB,CAAC,WAAW,EAAE;AACxC,QAAQ,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC;AACjD,IAAI;AACJ,IAAI,oBAAoB,CAAC,WAAW,EAAE;AACtC,QAAQ,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,WAAW,CAAC;AACpD,IAAI;AACJ;AACA,cAAc,CAAC,SAAS,GAAG,SAAS;;;;"}
@@ -1,64 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- /*---------------------------------------------------------------------------------------------
6
- * Copyright (c) Microsoft Corporation. All rights reserved.
7
- * Licensed under the MIT License. See License.txt in the project root for license information.
8
- *--------------------------------------------------------------------------------------------*/
9
- class SimpleTypedRpcConnection {
10
- static createHost(channelFactory, getHandler) {
11
- return new SimpleTypedRpcConnection(channelFactory, getHandler);
12
- }
13
- static createClient(channelFactory, getHandler) {
14
- return new SimpleTypedRpcConnection(channelFactory, getHandler);
15
- }
16
- constructor(_channelFactory, _getHandler) {
17
- this._channelFactory = _channelFactory;
18
- this._getHandler = _getHandler;
19
- this._channel = this._channelFactory({
20
- handleNotification: (notificationData) => {
21
- const m = notificationData;
22
- const fn = this._getHandler().notifications[m[0]];
23
- if (!fn) {
24
- throw new Error(`Unknown notification "${m[0]}"!`);
25
- }
26
- fn(...m[1]);
27
- },
28
- handleRequest: (requestData) => {
29
- const m = requestData;
30
- try {
31
- const result = this._getHandler().requests[m[0]](...m[1]);
32
- return { type: 'result', value: result };
33
- }
34
- catch (e) {
35
- return { type: 'error', value: e };
36
- }
37
- },
38
- });
39
- const requests = new Proxy({}, {
40
- get: (target, key) => {
41
- return async (...args) => {
42
- const result = await this._channel.sendRequest([key, args]);
43
- if (result.type === 'error') {
44
- throw result.value;
45
- }
46
- else {
47
- return result.value;
48
- }
49
- };
50
- }
51
- });
52
- const notifications = new Proxy({}, {
53
- get: (target, key) => {
54
- return (...args) => {
55
- this._channel.sendNotification([key, args]);
56
- };
57
- }
58
- });
59
- this.api = { notifications: notifications, requests: requests };
60
- }
61
- }
62
-
63
- export { SimpleTypedRpcConnection };
64
- //# sourceMappingURL=rpc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc.js","sources":["../../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugger/rpc.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass SimpleTypedRpcConnection {\n static createHost(channelFactory, getHandler) {\n return new SimpleTypedRpcConnection(channelFactory, getHandler);\n }\n static createClient(channelFactory, getHandler) {\n return new SimpleTypedRpcConnection(channelFactory, getHandler);\n }\n constructor(_channelFactory, _getHandler) {\n this._channelFactory = _channelFactory;\n this._getHandler = _getHandler;\n this._channel = this._channelFactory({\n handleNotification: (notificationData) => {\n const m = notificationData;\n const fn = this._getHandler().notifications[m[0]];\n if (!fn) {\n throw new Error(`Unknown notification \"${m[0]}\"!`);\n }\n fn(...m[1]);\n },\n handleRequest: (requestData) => {\n const m = requestData;\n try {\n const result = this._getHandler().requests[m[0]](...m[1]);\n return { type: 'result', value: result };\n }\n catch (e) {\n return { type: 'error', value: e };\n }\n },\n });\n const requests = new Proxy({}, {\n get: (target, key) => {\n return async (...args) => {\n const result = await this._channel.sendRequest([key, args]);\n if (result.type === 'error') {\n throw result.value;\n }\n else {\n return result.value;\n }\n };\n }\n });\n const notifications = new Proxy({}, {\n get: (target, key) => {\n return (...args) => {\n this._channel.sendNotification([key, args]);\n };\n }\n });\n this.api = { notifications: notifications, requests: requests };\n }\n}\n\nexport { SimpleTypedRpcConnection };\n//# sourceMappingURL=rpc.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB,CAAC;AAC/B,IAAI,OAAO,UAAU,CAAC,cAAc,EAAE,UAAU,EAAE;AAClD,QAAQ,OAAO,IAAI,wBAAwB,CAAC,cAAc,EAAE,UAAU,CAAC;AACvE,IAAI;AACJ,IAAI,OAAO,YAAY,CAAC,cAAc,EAAE,UAAU,EAAE;AACpD,QAAQ,OAAO,IAAI,wBAAwB,CAAC,cAAc,EAAE,UAAU,CAAC;AACvE,IAAI;AACJ,IAAI,WAAW,CAAC,eAAe,EAAE,WAAW,EAAE;AAC9C,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe;AAC9C,QAAQ,IAAI,CAAC,WAAW,GAAG,WAAW;AACtC,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC;AAC7C,YAAY,kBAAkB,EAAE,CAAC,gBAAgB,KAAK;AACtD,gBAAgB,MAAM,CAAC,GAAG,gBAAgB;AAC1C,gBAAgB,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,gBAAgB,IAAI,CAAC,EAAE,EAAE;AACzB,oBAAoB,MAAM,IAAI,KAAK,CAAC,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtE,gBAAgB;AAChB,gBAAgB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,YAAY,CAAC;AACb,YAAY,aAAa,EAAE,CAAC,WAAW,KAAK;AAC5C,gBAAgB,MAAM,CAAC,GAAG,WAAW;AACrC,gBAAgB,IAAI;AACpB,oBAAoB,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aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACvE,IAAI;AACJ;;;;"}
@@ -1,52 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- /*---------------------------------------------------------------------------------------------
6
- * Copyright (c) Microsoft Corporation. All rights reserved.
7
- * Licensed under the MIT License. See License.txt in the project root for license information.
8
- *--------------------------------------------------------------------------------------------*/
9
- class Throttler {
10
- constructor() {
11
- this._timeout = undefined;
12
- }
13
- throttle(fn, timeoutMs) {
14
- if (this._timeout === undefined) {
15
- this._timeout = setTimeout(() => {
16
- this._timeout = undefined;
17
- fn();
18
- }, timeoutMs);
19
- }
20
- }
21
- dispose() {
22
- if (this._timeout !== undefined) {
23
- clearTimeout(this._timeout);
24
- }
25
- }
26
- }
27
- function deepAssign(target, source) {
28
- for (const key in source) {
29
- if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {
30
- deepAssign(target[key], source[key]);
31
- }
32
- else {
33
- target[key] = source[key];
34
- }
35
- }
36
- }
37
- function deepAssignDeleteNulls(target, source) {
38
- for (const key in source) {
39
- if (source[key] === null) {
40
- delete target[key];
41
- }
42
- else if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {
43
- deepAssignDeleteNulls(target[key], source[key]);
44
- }
45
- else {
46
- target[key] = source[key];
47
- }
48
- }
49
- }
50
-
51
- export { Throttler, deepAssign, deepAssignDeleteNulls };
52
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../../../../../external/vscode-observables/observables/dist/observableInternal/logging/debugger/utils.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nclass Throttler {\n constructor() {\n this._timeout = undefined;\n }\n throttle(fn, timeoutMs) {\n if (this._timeout === undefined) {\n this._timeout = setTimeout(() => {\n this._timeout = undefined;\n fn();\n }, timeoutMs);\n }\n }\n dispose() {\n if (this._timeout !== undefined) {\n clearTimeout(this._timeout);\n }\n }\n}\nfunction deepAssign(target, source) {\n for (const key in source) {\n if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {\n deepAssign(target[key], source[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n}\nfunction deepAssignDeleteNulls(target, source) {\n for (const key in source) {\n if (source[key] === null) {\n delete target[key];\n }\n else if (!!target[key] && typeof target[key] === 'object' && !!source[key] && typeof source[key] === 'object') {\n deepAssignDeleteNulls(target[key], source[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n}\n\nexport { Throttler, deepAssign, deepAssignDeleteNulls };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,CAAC;AAChB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,QAAQ,GAAG,SAAS;AACjC,IAAI;AACJ,IAAI,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE;AAC5B,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;AACzC,YAAY,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,MAAM;AAC7C,gBAAgB,IAAI,CAAC,QAAQ,GAAG,SAAS;AACzC,gBAAgB,EAAE,EAAE;AACpB,YAAY,CAAC,EAAE,SAAS,CAAC;AACzB,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;AACzC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