@explorable-viz/fluid 0.7.103 → 0.7.104
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/dist/fluid/shared/fluid.mjs +186 -245
- package/dist/fluid/shared/load-figure.js +207 -266
- package/dist/fluid/shared/webtest-lib.js +596 -596
- package/package.json +1 -1
- package/script/bundle-website.sh +6 -10
@@ -2241,10 +2241,10 @@ var init_rxjs = __esm({
|
|
2241
2241
|
return this;
|
2242
2242
|
}
|
2243
2243
|
this.state = state;
|
2244
|
-
var
|
2244
|
+
var id = this.id;
|
2245
2245
|
var scheduler = this.scheduler;
|
2246
|
-
if (
|
2247
|
-
this.id = this.recycleAsyncId(scheduler,
|
2246
|
+
if (id != null) {
|
2247
|
+
this.id = this.recycleAsyncId(scheduler, id, delay2);
|
2248
2248
|
}
|
2249
2249
|
this.pending = true;
|
2250
2250
|
this.delay = delay2;
|
@@ -2257,15 +2257,15 @@ var init_rxjs = __esm({
|
|
2257
2257
|
}
|
2258
2258
|
return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay2);
|
2259
2259
|
};
|
2260
|
-
AsyncAction2.prototype.recycleAsyncId = function(_scheduler,
|
2260
|
+
AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay2) {
|
2261
2261
|
if (delay2 === void 0) {
|
2262
2262
|
delay2 = 0;
|
2263
2263
|
}
|
2264
2264
|
if (delay2 != null && this.delay === delay2 && this.pending === false) {
|
2265
|
-
return
|
2265
|
+
return id;
|
2266
2266
|
}
|
2267
|
-
if (
|
2268
|
-
intervalProvider.clearInterval(
|
2267
|
+
if (id != null) {
|
2268
|
+
intervalProvider.clearInterval(id);
|
2269
2269
|
}
|
2270
2270
|
return void 0;
|
2271
2271
|
};
|
@@ -2297,13 +2297,13 @@ var init_rxjs = __esm({
|
|
2297
2297
|
};
|
2298
2298
|
AsyncAction2.prototype.unsubscribe = function() {
|
2299
2299
|
if (!this.closed) {
|
2300
|
-
var _a4 = this,
|
2300
|
+
var _a4 = this, id = _a4.id, scheduler = _a4.scheduler;
|
2301
2301
|
var actions = scheduler.actions;
|
2302
2302
|
this.work = this.state = this.scheduler = null;
|
2303
2303
|
this.pending = false;
|
2304
2304
|
arrRemove(actions, this);
|
2305
|
-
if (
|
2306
|
-
this.id = this.recycleAsyncId(scheduler,
|
2305
|
+
if (id != null) {
|
2306
|
+
this.id = this.recycleAsyncId(scheduler, id, null);
|
2307
2307
|
}
|
2308
2308
|
this.delay = null;
|
2309
2309
|
_super.prototype.unsubscribe.call(this);
|
@@ -4922,7 +4922,7 @@ function* flatten(node, parent) {
|
|
4922
4922
|
yield [node, parent];
|
4923
4923
|
}
|
4924
4924
|
}
|
4925
|
-
function
|
4925
|
+
function stringify(listOrNode) {
|
4926
4926
|
let tokens;
|
4927
4927
|
if (Array.isArray(listOrNode)) {
|
4928
4928
|
tokens = listOrNode;
|
@@ -4980,7 +4980,7 @@ function parsePSelectors(selector2) {
|
|
4980
4980
|
case ">>>":
|
4981
4981
|
isPureCSS = false;
|
4982
4982
|
if (storage.length) {
|
4983
|
-
compoundSelector.push(
|
4983
|
+
compoundSelector.push(stringify(storage));
|
4984
4984
|
storage.splice(0);
|
4985
4985
|
}
|
4986
4986
|
compoundSelector = [];
|
@@ -4990,7 +4990,7 @@ function parsePSelectors(selector2) {
|
|
4990
4990
|
case ">>>>":
|
4991
4991
|
isPureCSS = false;
|
4992
4992
|
if (storage.length) {
|
4993
|
-
compoundSelector.push(
|
4993
|
+
compoundSelector.push(stringify(storage));
|
4994
4994
|
storage.splice(0);
|
4995
4995
|
}
|
4996
4996
|
compoundSelector = [];
|
@@ -5005,7 +5005,7 @@ function parsePSelectors(selector2) {
|
|
5005
5005
|
}
|
5006
5006
|
isPureCSS = false;
|
5007
5007
|
if (storage.length) {
|
5008
|
-
compoundSelector.push(
|
5008
|
+
compoundSelector.push(stringify(storage));
|
5009
5009
|
storage.splice(0);
|
5010
5010
|
}
|
5011
5011
|
const name2 = token.name.slice(3);
|
@@ -5022,7 +5022,7 @@ function parsePSelectors(selector2) {
|
|
5022
5022
|
break;
|
5023
5023
|
case "comma":
|
5024
5024
|
if (storage.length) {
|
5025
|
-
compoundSelector.push(
|
5025
|
+
compoundSelector.push(stringify(storage));
|
5026
5026
|
storage.splice(0);
|
5027
5027
|
}
|
5028
5028
|
compoundSelector = [];
|
@@ -5033,7 +5033,7 @@ function parsePSelectors(selector2) {
|
|
5033
5033
|
storage.push(token);
|
5034
5034
|
}
|
5035
5035
|
if (storage.length) {
|
5036
|
-
compoundSelector.push(
|
5036
|
+
compoundSelector.push(stringify(storage));
|
5037
5037
|
}
|
5038
5038
|
return [selectors, isPureCSS, hasPseudoClasses, hasAria];
|
5039
5039
|
}
|
@@ -7321,7 +7321,7 @@ var init_Frame = __esm({
|
|
7321
7321
|
content += `//# sourceURL=${path10.replace(/\n/g, "")}`;
|
7322
7322
|
}
|
7323
7323
|
type = type ?? "text/javascript";
|
7324
|
-
return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, id
|
7324
|
+
return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, id, type: type2, content: content2 }) => {
|
7325
7325
|
return await new Promise((resolve5, reject) => {
|
7326
7326
|
const script = document.createElement("script");
|
7327
7327
|
script.type = type2;
|
@@ -7329,8 +7329,8 @@ var init_Frame = __esm({
|
|
7329
7329
|
script.addEventListener("error", (event) => {
|
7330
7330
|
reject(new Error(event.message ?? "Could not load script"));
|
7331
7331
|
}, { once: true });
|
7332
|
-
if (
|
7333
|
-
script.id =
|
7332
|
+
if (id) {
|
7333
|
+
script.id = id;
|
7334
7334
|
}
|
7335
7335
|
if (url) {
|
7336
7336
|
script.src = url;
|
@@ -8979,9 +8979,9 @@ var init_Accessibility = __esm({
|
|
8979
8979
|
|
8980
8980
|
// node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js
|
8981
8981
|
function createIncrementalIdGenerator() {
|
8982
|
-
let
|
8982
|
+
let id = 0;
|
8983
8983
|
return () => {
|
8984
|
-
return ++
|
8984
|
+
return ++id;
|
8985
8985
|
};
|
8986
8986
|
}
|
8987
8987
|
var CallbackRegistry, Callback;
|
@@ -9010,8 +9010,8 @@ var init_CallbackRegistry = __esm({
|
|
9010
9010
|
this.#callbacks.delete(callback.id);
|
9011
9011
|
});
|
9012
9012
|
}
|
9013
|
-
reject(
|
9014
|
-
const callback = this.#callbacks.get(
|
9013
|
+
reject(id, message2, originalMessage) {
|
9014
|
+
const callback = this.#callbacks.get(id);
|
9015
9015
|
if (!callback) {
|
9016
9016
|
return;
|
9017
9017
|
}
|
@@ -9030,8 +9030,8 @@ var init_CallbackRegistry = __esm({
|
|
9030
9030
|
}
|
9031
9031
|
callback.reject(rewriteError(error3, `Protocol error (${callback.label}): ${message2}`, originalMessage));
|
9032
9032
|
}
|
9033
|
-
resolve(
|
9034
|
-
const callback = this.#callbacks.get(
|
9033
|
+
resolve(id, value) {
|
9034
|
+
const callback = this.#callbacks.get(id);
|
9035
9035
|
if (!callback) {
|
9036
9036
|
return;
|
9037
9037
|
}
|
@@ -9057,8 +9057,8 @@ var init_CallbackRegistry = __esm({
|
|
9057
9057
|
#deferred = Deferred.create();
|
9058
9058
|
#timer;
|
9059
9059
|
#label;
|
9060
|
-
constructor(
|
9061
|
-
this.#id =
|
9060
|
+
constructor(id, label, timeout3) {
|
9061
|
+
this.#id = id;
|
9062
9062
|
this.#label = label;
|
9063
9063
|
if (timeout3) {
|
9064
9064
|
this.#timer = setTimeout(() => {
|
@@ -10643,9 +10643,9 @@ var require_BrowserProcessor = __commonJS({
|
|
10643
10643
|
{
|
10644
10644
|
userContext: "default"
|
10645
10645
|
},
|
10646
|
-
...result.browserContextIds.map((
|
10646
|
+
...result.browserContextIds.map((id) => {
|
10647
10647
|
return {
|
10648
|
-
userContext:
|
10648
|
+
userContext: id
|
10649
10649
|
};
|
10650
10650
|
})
|
10651
10651
|
]
|
@@ -10960,7 +10960,7 @@ var require_InputSource = __commonJS({
|
|
10960
10960
|
exports.KeySource = KeySource;
|
10961
10961
|
var _clickContexts;
|
10962
10962
|
var PointerSource = class {
|
10963
|
-
constructor(
|
10963
|
+
constructor(id, subtype) {
|
10964
10964
|
__publicField(this, "type", "pointer");
|
10965
10965
|
__publicField(this, "subtype");
|
10966
10966
|
__publicField(this, "pointerId");
|
@@ -10971,7 +10971,7 @@ var require_InputSource = __commonJS({
|
|
10971
10971
|
__publicField(this, "radiusY");
|
10972
10972
|
__publicField(this, "force");
|
10973
10973
|
__privateAdd(this, _clickContexts, /* @__PURE__ */ new Map());
|
10974
|
-
this.pointerId =
|
10974
|
+
this.pointerId = id;
|
10975
10975
|
this.subtype = subtype;
|
10976
10976
|
}
|
10977
10977
|
get buttons() {
|
@@ -11847,14 +11847,14 @@ var require_ActionDispatcher = __commonJS({
|
|
11847
11847
|
_context = new WeakMap();
|
11848
11848
|
_isMacOS = new WeakMap();
|
11849
11849
|
_dispatchAction = new WeakSet();
|
11850
|
-
dispatchAction_fn = async function({ id
|
11851
|
-
const source3 = __privateGet(this, _inputState).get(
|
11850
|
+
dispatchAction_fn = async function({ id, action }) {
|
11851
|
+
const source3 = __privateGet(this, _inputState).get(id);
|
11852
11852
|
const keyState = __privateGet(this, _inputState).getGlobalKeyState();
|
11853
11853
|
switch (action.type) {
|
11854
11854
|
case "keyDown": {
|
11855
11855
|
await __privateMethod(this, _dispatchKeyDownAction, dispatchKeyDownAction_fn).call(this, source3, action);
|
11856
11856
|
__privateGet(this, _inputState).cancelList.push({
|
11857
|
-
id
|
11857
|
+
id,
|
11858
11858
|
action: {
|
11859
11859
|
...action,
|
11860
11860
|
type: "keyUp"
|
@@ -11872,7 +11872,7 @@ var require_ActionDispatcher = __commonJS({
|
|
11872
11872
|
case "pointerDown": {
|
11873
11873
|
await __privateMethod(this, _dispatchPointerDownAction, dispatchPointerDownAction_fn).call(this, source3, keyState, action);
|
11874
11874
|
__privateGet(this, _inputState).cancelList.push({
|
11875
|
-
id
|
11875
|
+
id,
|
11876
11876
|
action: {
|
11877
11877
|
...action,
|
11878
11878
|
type: "pointerUp"
|
@@ -12487,8 +12487,8 @@ var require_InputState = __commonJS({
|
|
12487
12487
|
cancelList = [];
|
12488
12488
|
#sources = /* @__PURE__ */ new Map();
|
12489
12489
|
#mutex = new Mutex_js_1.Mutex();
|
12490
|
-
getOrCreate(
|
12491
|
-
let source3 = this.#sources.get(
|
12490
|
+
getOrCreate(id, type, subtype) {
|
12491
|
+
let source3 = this.#sources.get(id);
|
12492
12492
|
if (!source3) {
|
12493
12493
|
switch (type) {
|
12494
12494
|
case "none":
|
@@ -12517,16 +12517,16 @@ var require_InputState = __commonJS({
|
|
12517
12517
|
default:
|
12518
12518
|
throw new protocol_js_1.InvalidArgumentException(`Expected "${"none"}", "${"key"}", "${"pointer"}", or "${"wheel"}". Found unknown source type ${type}.`);
|
12519
12519
|
}
|
12520
|
-
this.#sources.set(
|
12520
|
+
this.#sources.set(id, source3);
|
12521
12521
|
return source3;
|
12522
12522
|
}
|
12523
12523
|
if (source3.type !== type) {
|
12524
|
-
throw new protocol_js_1.InvalidArgumentException(`Input source type of ${
|
12524
|
+
throw new protocol_js_1.InvalidArgumentException(`Input source type of ${id} is ${source3.type}, but received ${type}.`);
|
12525
12525
|
}
|
12526
12526
|
return source3;
|
12527
12527
|
}
|
12528
|
-
get(
|
12529
|
-
const source3 = this.#sources.get(
|
12528
|
+
get(id) {
|
12529
|
+
const source3 = this.#sources.get(id);
|
12530
12530
|
if (!source3) {
|
12531
12531
|
throw new protocol_js_1.UnknownErrorException(`Internal error.`);
|
12532
12532
|
}
|
@@ -12852,20 +12852,20 @@ var require_NetworkProcessor = __commonJS({
|
|
12852
12852
|
}));
|
12853
12853
|
return {};
|
12854
12854
|
}
|
12855
|
-
#getRequestOrFail(
|
12856
|
-
const request3 = this.#networkStorage.getRequestById(
|
12855
|
+
#getRequestOrFail(id) {
|
12856
|
+
const request3 = this.#networkStorage.getRequestById(id);
|
12857
12857
|
if (!request3) {
|
12858
|
-
throw new protocol_js_1.NoSuchRequestException(`Network request with ID '${
|
12858
|
+
throw new protocol_js_1.NoSuchRequestException(`Network request with ID '${id}' doesn't exist`);
|
12859
12859
|
}
|
12860
12860
|
return request3;
|
12861
12861
|
}
|
12862
|
-
#getBlockedRequestOrFail(
|
12863
|
-
const request3 = this.#getRequestOrFail(
|
12862
|
+
#getBlockedRequestOrFail(id, phases) {
|
12863
|
+
const request3 = this.#getRequestOrFail(id);
|
12864
12864
|
if (!request3.interceptPhase) {
|
12865
|
-
throw new protocol_js_1.NoSuchRequestException(`No blocked request found for network id '${
|
12865
|
+
throw new protocol_js_1.NoSuchRequestException(`No blocked request found for network id '${id}'`);
|
12866
12866
|
}
|
12867
12867
|
if (request3.interceptPhase && !phases.includes(request3.interceptPhase)) {
|
12868
|
-
throw new protocol_js_1.InvalidArgumentException(`Blocked request for network id '${
|
12868
|
+
throw new protocol_js_1.InvalidArgumentException(`Blocked request for network id '${id}' is in '${request3.interceptPhase}' phase`);
|
12869
12869
|
}
|
12870
12870
|
return request3;
|
12871
12871
|
}
|
@@ -13097,13 +13097,13 @@ var require_ChannelProxy = __commonJS({
|
|
13097
13097
|
}
|
13098
13098
|
getEvalInWindowStr() {
|
13099
13099
|
var _a4;
|
13100
|
-
const delegate = String((
|
13100
|
+
const delegate = String((id, channelProxy) => {
|
13101
13101
|
const w = window;
|
13102
|
-
if (w[
|
13103
|
-
w[
|
13102
|
+
if (w[id] === void 0) {
|
13103
|
+
w[id] = channelProxy;
|
13104
13104
|
} else {
|
13105
|
-
w[
|
13106
|
-
delete w[
|
13105
|
+
w[id](channelProxy);
|
13106
|
+
delete w[id];
|
13107
13107
|
}
|
13108
13108
|
return channelProxy.sendMessage;
|
13109
13109
|
});
|
@@ -13211,13 +13211,13 @@ var require_ChannelProxy = __commonJS({
|
|
13211
13211
|
_getHandleFromWindow = new WeakSet();
|
13212
13212
|
getHandleFromWindow_fn = async function(realm) {
|
13213
13213
|
const channelHandleResult = await realm.cdpClient.sendCommand("Runtime.callFunctionOn", {
|
13214
|
-
functionDeclaration: String((
|
13214
|
+
functionDeclaration: String((id) => {
|
13215
13215
|
const w = window;
|
13216
|
-
if (w[
|
13217
|
-
return new Promise((resolve5) => w[
|
13216
|
+
if (w[id] === void 0) {
|
13217
|
+
return new Promise((resolve5) => w[id] = resolve5);
|
13218
13218
|
}
|
13219
|
-
const channelProxy = w[
|
13220
|
-
delete w[
|
13219
|
+
const channelProxy = w[id];
|
13220
|
+
delete w[id];
|
13221
13221
|
return channelProxy;
|
13222
13222
|
}),
|
13223
13223
|
arguments: [{ value: __privateGet(this, _id) }],
|
@@ -13342,13 +13342,13 @@ var require_ScriptProcessor = __commonJS({
|
|
13342
13342
|
};
|
13343
13343
|
}
|
13344
13344
|
async removePreloadScript(params) {
|
13345
|
-
const { script:
|
13346
|
-
const scripts = this.#preloadScriptStorage.find({ id
|
13345
|
+
const { script: id } = params;
|
13346
|
+
const scripts = this.#preloadScriptStorage.find({ id });
|
13347
13347
|
if (scripts.length === 0) {
|
13348
|
-
throw new protocol_js_1.NoSuchScriptException(`No preload script with id '${
|
13348
|
+
throw new protocol_js_1.NoSuchScriptException(`No preload script with id '${id}'`);
|
13349
13349
|
}
|
13350
13350
|
await Promise.all(scripts.map((script) => script.remove()));
|
13351
|
-
this.#preloadScriptStorage.remove({ id
|
13351
|
+
this.#preloadScriptStorage.remove({ id });
|
13352
13352
|
return {};
|
13353
13353
|
}
|
13354
13354
|
async callFunction(params) {
|
@@ -15643,7 +15643,7 @@ var require_BrowsingContextImpl = __commonJS({
|
|
15643
15643
|
var WindowRealm_js_1 = require_WindowRealm();
|
15644
15644
|
var _id, _parentId, _children, _browsingContextStorage, _lifecycle, _navigation, _url, _eventManager, _realmStorage, _loaderId, _cdpTarget, _defaultRealmDeferred, _logger, _previousViewport, _pendingNavigationUrl, _virtualNavigationId, _originalOpener, _lastUserPromptType, _unhandledPromptBehavior, _deleteAllChildren, deleteAllChildren_fn, _initListeners, initListeners_fn, _getPromptType, getPromptType_fn, _getPromptHandler, getPromptHandler_fn, _documentChanged, documentChanged_fn, _resetLifecycleIfFinished, resetLifecycleIfFinished_fn, _failLifecycleIfNotFinished, failLifecycleIfNotFinished_fn, _parseRect, parseRect_fn, _getLocatorDelegate, getLocatorDelegate_fn, _locateNodesByLocator, locateNodesByLocator_fn;
|
15645
15645
|
var _BrowsingContextImpl = class {
|
15646
|
-
constructor(
|
15646
|
+
constructor(id, parentId, userContext, cdpTarget, eventManager, browsingContextStorage, realmStorage, url, originalOpener, unhandledPromptBehavior, logger) {
|
15647
15647
|
__privateAdd(this, _deleteAllChildren);
|
15648
15648
|
__privateAdd(this, _initListeners);
|
15649
15649
|
__privateAdd(this, _getPromptHandler);
|
@@ -15679,7 +15679,7 @@ var require_BrowsingContextImpl = __commonJS({
|
|
15679
15679
|
__privateAdd(this, _lastUserPromptType, void 0);
|
15680
15680
|
__privateAdd(this, _unhandledPromptBehavior, void 0);
|
15681
15681
|
__privateSet(this, _cdpTarget, cdpTarget);
|
15682
|
-
__privateSet(this, _id,
|
15682
|
+
__privateSet(this, _id, id);
|
15683
15683
|
__privateSet(this, _parentId, parentId);
|
15684
15684
|
this.userContext = userContext;
|
15685
15685
|
__privateSet(this, _eventManager, eventManager);
|
@@ -15690,9 +15690,9 @@ var require_BrowsingContextImpl = __commonJS({
|
|
15690
15690
|
__privateSet(this, _url, url);
|
15691
15691
|
__privateSet(this, _originalOpener, originalOpener);
|
15692
15692
|
}
|
15693
|
-
static create(
|
15693
|
+
static create(id, parentId, userContext, cdpTarget, eventManager, browsingContextStorage, realmStorage, url, originalOpener, unhandledPromptBehavior, logger) {
|
15694
15694
|
var _a4;
|
15695
|
-
const context2 = new _BrowsingContextImpl(
|
15695
|
+
const context2 = new _BrowsingContextImpl(id, parentId, userContext, cdpTarget, eventManager, browsingContextStorage, realmStorage, url, originalOpener, unhandledPromptBehavior, logger);
|
15696
15696
|
__privateMethod(_a4 = context2, _initListeners, initListeners_fn).call(_a4);
|
15697
15697
|
browsingContextStorage.addContext(context2);
|
15698
15698
|
if (!context2.isTopLevelContext()) {
|
@@ -15764,7 +15764,7 @@ var require_BrowsingContextImpl = __commonJS({
|
|
15764
15764
|
return __privateGet(this, _browsingContextStorage).getContext(this.parentId);
|
15765
15765
|
}
|
15766
15766
|
get directChildren() {
|
15767
|
-
return [...__privateGet(this, _children)].map((
|
15767
|
+
return [...__privateGet(this, _children)].map((id) => __privateGet(this, _browsingContextStorage).getContext(id));
|
15768
15768
|
}
|
15769
15769
|
get allChildren() {
|
15770
15770
|
const children = this.directChildren;
|
@@ -16235,7 +16235,7 @@ var require_BrowsingContextImpl = __commonJS({
|
|
16235
16235
|
});
|
16236
16236
|
__privateGet(this, _cdpTarget).cdpClient.on("Runtime.executionContextCreated", (params) => {
|
16237
16237
|
var _a4;
|
16238
|
-
const { auxData, name: name2, uniqueId, id
|
16238
|
+
const { auxData, name: name2, uniqueId, id } = params.context;
|
16239
16239
|
if (!auxData || auxData.frameId !== this.id) {
|
16240
16240
|
return;
|
16241
16241
|
}
|
@@ -16255,7 +16255,7 @@ var require_BrowsingContextImpl = __commonJS({
|
|
16255
16255
|
default:
|
16256
16256
|
return;
|
16257
16257
|
}
|
16258
|
-
const realm = new WindowRealm_js_1.WindowRealm(this.id, __privateGet(this, _browsingContextStorage), __privateGet(this, _cdpTarget).cdpClient, __privateGet(this, _eventManager),
|
16258
|
+
const realm = new WindowRealm_js_1.WindowRealm(this.id, __privateGet(this, _browsingContextStorage), __privateGet(this, _cdpTarget).cdpClient, __privateGet(this, _eventManager), id, __privateGet(this, _logger), origin, uniqueId, __privateGet(this, _realmStorage), sandbox);
|
16259
16259
|
if (auxData.isDefault) {
|
16260
16260
|
__privateGet(this, _defaultRealmDeferred).resolve(realm);
|
16261
16261
|
void Promise.all(__privateGet(this, _cdpTarget).getChannels().map((channel) => channel.startListenerFromWindow(realm, __privateGet(this, _eventManager))));
|
@@ -17394,8 +17394,8 @@ var require_CdpTargetManager = __commonJS({
|
|
17394
17394
|
#workers = /* @__PURE__ */ new Map();
|
17395
17395
|
#handleWorkerTarget(realmType, cdpTarget, ownerRealm) {
|
17396
17396
|
cdpTarget.cdpClient.on("Runtime.executionContextCreated", (params) => {
|
17397
|
-
const { uniqueId, id
|
17398
|
-
const workerRealm = new WorkerRealm_js_1.WorkerRealm(cdpTarget.cdpClient, this.#eventManager,
|
17397
|
+
const { uniqueId, id, origin } = params.context;
|
17398
|
+
const workerRealm = new WorkerRealm_js_1.WorkerRealm(cdpTarget.cdpClient, this.#eventManager, id, this.#logger, (0, BrowsingContextImpl_js_1.serializeOrigin)(origin), ownerRealm ? [ownerRealm] : [], uniqueId, this.#realmStorage, realmType);
|
17399
17399
|
this.#workers.set(cdpTarget.cdpSessionId, workerRealm);
|
17400
17400
|
});
|
17401
17401
|
}
|
@@ -17451,8 +17451,8 @@ var require_BrowsingContextStorage = __commonJS({
|
|
17451
17451
|
getAllContexts() {
|
17452
17452
|
return Array.from(this.#contexts.values());
|
17453
17453
|
}
|
17454
|
-
deleteContextById(
|
17455
|
-
this.#contexts.delete(
|
17454
|
+
deleteContextById(id) {
|
17455
|
+
this.#contexts.delete(id);
|
17456
17456
|
}
|
17457
17457
|
deleteContext(context2) {
|
17458
17458
|
this.#contexts.delete(context2.id);
|
@@ -17460,20 +17460,20 @@ var require_BrowsingContextStorage = __commonJS({
|
|
17460
17460
|
addContext(context2) {
|
17461
17461
|
this.#contexts.set(context2.id, context2);
|
17462
17462
|
}
|
17463
|
-
hasContext(
|
17464
|
-
return this.#contexts.has(
|
17463
|
+
hasContext(id) {
|
17464
|
+
return this.#contexts.has(id);
|
17465
17465
|
}
|
17466
|
-
findContext(
|
17467
|
-
return this.#contexts.get(
|
17466
|
+
findContext(id) {
|
17467
|
+
return this.#contexts.get(id);
|
17468
17468
|
}
|
17469
|
-
findTopLevelContextId(
|
17470
|
-
if (
|
17469
|
+
findTopLevelContextId(id) {
|
17470
|
+
if (id === null) {
|
17471
17471
|
return null;
|
17472
17472
|
}
|
17473
|
-
const maybeContext = this.findContext(
|
17473
|
+
const maybeContext = this.findContext(id);
|
17474
17474
|
const parentId = maybeContext?.parentId ?? null;
|
17475
17475
|
if (parentId === null) {
|
17476
|
-
return
|
17476
|
+
return id;
|
17477
17477
|
}
|
17478
17478
|
return this.findTopLevelContextId(parentId);
|
17479
17479
|
}
|
@@ -17485,10 +17485,10 @@ var require_BrowsingContextStorage = __commonJS({
|
|
17485
17485
|
}
|
17486
17486
|
return;
|
17487
17487
|
}
|
17488
|
-
getContext(
|
17489
|
-
const result = this.findContext(
|
17488
|
+
getContext(id) {
|
17489
|
+
const result = this.findContext(id);
|
17490
17490
|
if (result === void 0) {
|
17491
|
-
throw new protocol_js_1.NoSuchFrameException(`Context ${
|
17491
|
+
throw new protocol_js_1.NoSuchFrameException(`Context ${id} not found`);
|
17492
17492
|
}
|
17493
17493
|
return result;
|
17494
17494
|
}
|
@@ -17526,7 +17526,7 @@ var require_NetworkRequest = __commonJS({
|
|
17526
17526
|
var REALM_REGEX = /(?<=realm=").*(?=")/;
|
17527
17527
|
var _id, _fetchId, _interceptPhase, _servedFromCache, _redirectCount, _request, _requestOverrides, _response, _eventManager, _networkStorage, _cdpTarget, _logger, _emittedEvents, _isDataUrl, isDataUrl_fn, _method, method_get, _navigationId, navigationId_get, _cookies, cookies_get, _bodySize, bodySize_get, _context, context_get, _statusCode, statusCode_get, _requestHeaders, requestHeaders_get, _authChallenges, authChallenges_get, _timings, timings_get, _phaseChanged, phaseChanged_fn, _interceptsInPhase, interceptsInPhase_fn, _isBlockedInPhase, isBlockedInPhase_fn, _emitEventsIfReady, emitEventsIfReady_fn, _continueRequest, continueRequest_fn, _continueResponse, continueResponse_fn, _continueWithAuth, continueWithAuth_fn, _emitEvent, emitEvent_fn, _getBaseEventParams, getBaseEventParams_fn, _getResponseEventParams, getResponseEventParams_fn, _getRequestData, getRequestData_fn, _getBeforeRequestEvent, getBeforeRequestEvent_fn, _getResponseStartedEvent, getResponseStartedEvent_fn, _getResponseReceivedEvent, getResponseReceivedEvent_fn, _isIgnoredEvent, isIgnoredEvent_fn, _getOverrideHeader, getOverrideHeader_fn, _getInitiatorType, getInitiatorType_fn;
|
17528
17528
|
var _NetworkRequest = class {
|
17529
|
-
constructor(
|
17529
|
+
constructor(id, eventManager, networkStorage, cdpTarget, redirectCount = 0, logger) {
|
17530
17530
|
__privateAdd(this, _isDataUrl);
|
17531
17531
|
__privateAdd(this, _method);
|
17532
17532
|
__privateAdd(this, _navigationId);
|
@@ -17573,7 +17573,7 @@ var require_NetworkRequest = __commonJS({
|
|
17573
17573
|
[protocol_js_1.ChromiumBidi.Network.EventNames.ResponseStarted]: false
|
17574
17574
|
});
|
17575
17575
|
__publicField(this, "waitNextPhase", new Deferred_js_1.Deferred());
|
17576
|
-
__privateSet(this, _id,
|
17576
|
+
__privateSet(this, _id, id);
|
17577
17577
|
__privateSet(this, _eventManager, eventManager);
|
17578
17578
|
__privateSet(this, _networkStorage, networkStorage);
|
17579
17579
|
__privateSet(this, _cdpTarget, cdpTarget);
|
@@ -18161,12 +18161,12 @@ var require_NetworkStorage = __commonJS({
|
|
18161
18161
|
});
|
18162
18162
|
this.#logger = logger;
|
18163
18163
|
}
|
18164
|
-
#getOrCreateNetworkRequest(
|
18165
|
-
let request3 = this.getRequestById(
|
18164
|
+
#getOrCreateNetworkRequest(id, cdpTarget, redirectCount) {
|
18165
|
+
let request3 = this.getRequestById(id);
|
18166
18166
|
if (request3) {
|
18167
18167
|
return request3;
|
18168
18168
|
}
|
18169
|
-
request3 = new NetworkRequest_js_1.NetworkRequest(
|
18169
|
+
request3 = new NetworkRequest_js_1.NetworkRequest(id, this.#eventManager, this, cdpTarget, redirectCount, this.#logger);
|
18170
18170
|
this.addRequest(request3);
|
18171
18171
|
return request3;
|
18172
18172
|
}
|
@@ -18296,8 +18296,8 @@ var require_NetworkStorage = __commonJS({
|
|
18296
18296
|
}
|
18297
18297
|
this.#intercepts.delete(intercept);
|
18298
18298
|
}
|
18299
|
-
getRequestById(
|
18300
|
-
return this.#requests.get(
|
18299
|
+
getRequestById(id) {
|
18300
|
+
return this.#requests.get(id);
|
18301
18301
|
}
|
18302
18302
|
getRequestByFetchId(fetchId) {
|
18303
18303
|
for (const request3 of this.#requests.values()) {
|
@@ -18310,8 +18310,8 @@ var require_NetworkStorage = __commonJS({
|
|
18310
18310
|
addRequest(request3) {
|
18311
18311
|
this.#requests.set(request3.id, request3);
|
18312
18312
|
}
|
18313
|
-
deleteRequest(
|
18314
|
-
this.#requests.delete(
|
18313
|
+
deleteRequest(id) {
|
18314
|
+
this.#requests.delete(id);
|
18315
18315
|
}
|
18316
18316
|
getVirtualNavigationId(contextId) {
|
18317
18317
|
if (contextId === void 0) {
|
@@ -18636,8 +18636,8 @@ var require_SubscriptionManager = __commonJS({
|
|
18636
18636
|
isSubscribedTo(moduleOrEvent, contextId = null) {
|
18637
18637
|
const topLevelContext = this.#browsingContextStorage.findTopLevelContextId(contextId);
|
18638
18638
|
for (const browserContextToEventMap of this.#channelToContextToEventMap.values()) {
|
18639
|
-
for (const [
|
18640
|
-
if (topLevelContext !==
|
18639
|
+
for (const [id, eventMap] of browserContextToEventMap.entries()) {
|
18640
|
+
if (topLevelContext !== id && id !== null) {
|
18641
18641
|
continue;
|
18642
18642
|
}
|
18643
18643
|
for (const event of eventMap.keys()) {
|
@@ -19142,9 +19142,9 @@ var init_Connection = __esm({
|
|
19142
19142
|
}
|
19143
19143
|
send(method, params, timeout3) {
|
19144
19144
|
assert(!this.#closed, "Protocol error: Connection closed.");
|
19145
|
-
return this.#callbacks.create(method, timeout3 ?? this.#timeout, (
|
19145
|
+
return this.#callbacks.create(method, timeout3 ?? this.#timeout, (id) => {
|
19146
19146
|
const stringifiedMessage = JSON.stringify({
|
19147
|
-
id
|
19147
|
+
id,
|
19148
19148
|
method,
|
19149
19149
|
params
|
19150
19150
|
});
|
@@ -19258,13 +19258,13 @@ var init_BidiOverCdp = __esm({
|
|
19258
19258
|
browserClient() {
|
19259
19259
|
return this.#browserCdpConnection;
|
19260
19260
|
}
|
19261
|
-
getCdpClient(
|
19262
|
-
const session = this.#cdp.session(
|
19261
|
+
getCdpClient(id) {
|
19262
|
+
const session = this.#cdp.session(id);
|
19263
19263
|
if (!session) {
|
19264
|
-
throw new Error(`Unknown CDP session with id ${
|
19264
|
+
throw new Error(`Unknown CDP session with id ${id}`);
|
19265
19265
|
}
|
19266
19266
|
if (!this.#adapters.has(session)) {
|
19267
|
-
const adapter = new CDPClientAdapter(session,
|
19267
|
+
const adapter = new CDPClientAdapter(session, id, this.#browserCdpConnection);
|
19268
19268
|
this.#adapters.set(session, adapter);
|
19269
19269
|
return adapter;
|
19270
19270
|
}
|
@@ -19593,9 +19593,9 @@ var init_Realm2 = __esm({
|
|
19593
19593
|
id;
|
19594
19594
|
origin;
|
19595
19595
|
executionContextId;
|
19596
|
-
constructor(
|
19596
|
+
constructor(id, origin) {
|
19597
19597
|
super();
|
19598
|
-
this.id =
|
19598
|
+
this.id = id;
|
19599
19599
|
this.origin = origin;
|
19600
19600
|
}
|
19601
19601
|
get disposed() {
|
@@ -19709,15 +19709,15 @@ var init_Realm2 = __esm({
|
|
19709
19709
|
}
|
19710
19710
|
};
|
19711
19711
|
DedicatedWorkerRealm = class extends Realm2 {
|
19712
|
-
static from(owner,
|
19713
|
-
const realm = new _a(owner,
|
19712
|
+
static from(owner, id, origin) {
|
19713
|
+
const realm = new _a(owner, id, origin);
|
19714
19714
|
realm.#initialize();
|
19715
19715
|
return realm;
|
19716
19716
|
}
|
19717
19717
|
#workers = /* @__PURE__ */ new Map();
|
19718
19718
|
owners;
|
19719
|
-
constructor(owner,
|
19720
|
-
super(
|
19719
|
+
constructor(owner, id, origin) {
|
19720
|
+
super(id, origin);
|
19721
19721
|
this.owners = /* @__PURE__ */ new Set([owner]);
|
19722
19722
|
}
|
19723
19723
|
#initialize() {
|
@@ -19750,15 +19750,15 @@ var init_Realm2 = __esm({
|
|
19750
19750
|
};
|
19751
19751
|
_a = DedicatedWorkerRealm;
|
19752
19752
|
SharedWorkerRealm = class extends Realm2 {
|
19753
|
-
static from(browser,
|
19754
|
-
const realm = new SharedWorkerRealm(browser,
|
19753
|
+
static from(browser, id, origin) {
|
19754
|
+
const realm = new SharedWorkerRealm(browser, id, origin);
|
19755
19755
|
realm.#initialize();
|
19756
19756
|
return realm;
|
19757
19757
|
}
|
19758
19758
|
#workers = /* @__PURE__ */ new Map();
|
19759
19759
|
browser;
|
19760
|
-
constructor(browser,
|
19761
|
-
super(
|
19760
|
+
constructor(browser, id, origin) {
|
19761
|
+
super(id, origin);
|
19762
19762
|
this.browser = browser;
|
19763
19763
|
}
|
19764
19764
|
#initialize() {
|
@@ -20298,8 +20298,8 @@ var init_BrowsingContext = __esm({
|
|
20298
20298
|
if (_metadata)
|
20299
20299
|
Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
20300
20300
|
}
|
20301
|
-
static from(userContext, parent,
|
20302
|
-
const browsingContext = new BrowsingContext2(userContext, parent,
|
20301
|
+
static from(userContext, parent, id, url, originalOpener) {
|
20302
|
+
const browsingContext = new BrowsingContext2(userContext, parent, id, url, originalOpener);
|
20303
20303
|
browsingContext.#initialize();
|
20304
20304
|
return browsingContext;
|
20305
20305
|
}
|
@@ -20315,10 +20315,10 @@ var init_BrowsingContext = __esm({
|
|
20315
20315
|
parent;
|
20316
20316
|
userContext;
|
20317
20317
|
originalOpener;
|
20318
|
-
constructor(context2, parent,
|
20318
|
+
constructor(context2, parent, id, url, originalOpener) {
|
20319
20319
|
super();
|
20320
20320
|
this.#url = url;
|
20321
|
-
this.id =
|
20321
|
+
this.id = id;
|
20322
20322
|
this.parent = parent;
|
20323
20323
|
this.userContext = context2;
|
20324
20324
|
this.originalOpener = originalOpener;
|
@@ -20367,9 +20367,9 @@ var init_BrowsingContext = __esm({
|
|
20367
20367
|
if (info2.context !== this.id) {
|
20368
20368
|
return;
|
20369
20369
|
}
|
20370
|
-
for (const [
|
20370
|
+
for (const [id, request3] of this.#requests) {
|
20371
20371
|
if (request3.disposed) {
|
20372
|
-
this.#requests.delete(
|
20372
|
+
this.#requests.delete(id);
|
20373
20373
|
}
|
20374
20374
|
}
|
20375
20375
|
if (this.#navigation !== void 0 && !this.#navigation.disposed) {
|
@@ -20731,8 +20731,8 @@ var init_UserContext = __esm({
|
|
20731
20731
|
Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
20732
20732
|
}
|
20733
20733
|
static DEFAULT = "default";
|
20734
|
-
static create(browser,
|
20735
|
-
const context2 = new UserContext2(browser,
|
20734
|
+
static create(browser, id) {
|
20735
|
+
const context2 = new UserContext2(browser, id);
|
20736
20736
|
context2.#initialize();
|
20737
20737
|
return context2;
|
20738
20738
|
}
|
@@ -20741,9 +20741,9 @@ var init_UserContext = __esm({
|
|
20741
20741
|
#disposables = new DisposableStack();
|
20742
20742
|
#id;
|
20743
20743
|
browser;
|
20744
|
-
constructor(browser,
|
20744
|
+
constructor(browser, id) {
|
20745
20745
|
super();
|
20746
|
-
this.#id =
|
20746
|
+
this.#id = id;
|
20747
20747
|
this.browser = browser;
|
20748
20748
|
}
|
20749
20749
|
#initialize() {
|
@@ -21441,10 +21441,10 @@ var init_ExposedFunction = __esm({
|
|
21441
21441
|
}
|
21442
21442
|
return frame.realm(source3.realm);
|
21443
21443
|
}
|
21444
|
-
#findFrame(
|
21444
|
+
#findFrame(id) {
|
21445
21445
|
const frames = [this.#frame];
|
21446
21446
|
for (const frame of frames) {
|
21447
|
-
if (frame._id ===
|
21447
|
+
if (frame._id === id) {
|
21448
21448
|
return frame;
|
21449
21449
|
}
|
21450
21450
|
frames.push(...frame.childFrames());
|
@@ -22233,10 +22233,10 @@ ${sourceUrlComment}
|
|
22233
22233
|
if (this.disposed) {
|
22234
22234
|
return;
|
22235
22235
|
}
|
22236
|
-
const handleIds = handles.map(({ id
|
22237
|
-
return
|
22238
|
-
}).filter((
|
22239
|
-
return
|
22236
|
+
const handleIds = handles.map(({ id }) => {
|
22237
|
+
return id;
|
22238
|
+
}).filter((id) => {
|
22239
|
+
return id !== void 0;
|
22240
22240
|
});
|
22241
22241
|
if (handleIds.length === 0) {
|
22242
22242
|
return;
|
@@ -22682,9 +22682,9 @@ var init_Frame2 = __esm({
|
|
22682
22682
|
isolatedRealm() {
|
22683
22683
|
return this.realms.internal;
|
22684
22684
|
}
|
22685
|
-
realm(
|
22685
|
+
realm(id) {
|
22686
22686
|
for (const realm of Object.values(this.realms)) {
|
22687
|
-
if (realm.realm.id ===
|
22687
|
+
if (realm.realm.id === id) {
|
22688
22688
|
return realm;
|
22689
22689
|
}
|
22690
22690
|
}
|
@@ -23954,8 +23954,8 @@ var init_Page2 = __esm({
|
|
23954
23954
|
const script = await this.#frame.browsingContext.addPreloadScript(expression);
|
23955
23955
|
return { identifier: script };
|
23956
23956
|
}
|
23957
|
-
async removeScriptToEvaluateOnNewDocument(
|
23958
|
-
await this.#frame.browsingContext.removePreloadScript(
|
23957
|
+
async removeScriptToEvaluateOnNewDocument(id) {
|
23958
|
+
await this.#frame.browsingContext.removePreloadScript(id);
|
23959
23959
|
}
|
23960
23960
|
async exposeFunction(name2, pptrFunction) {
|
23961
23961
|
return await this.mainFrame().exposeFunction(name2, "default" in pptrFunction ? pptrFunction.default : pptrFunction);
|
@@ -24814,8 +24814,8 @@ var init_Browser2 = __esm({
|
|
24814
24814
|
}
|
24815
24815
|
}
|
24816
24816
|
}
|
24817
|
-
#createUserContext(
|
24818
|
-
const userContext = UserContext.create(this,
|
24817
|
+
#createUserContext(id) {
|
24818
|
+
const userContext = UserContext.create(this, id);
|
24819
24819
|
this.#userContexts.set(userContext.id, userContext);
|
24820
24820
|
const userContextEmitter = this.#disposables.use(new EventEmitter(userContext));
|
24821
24821
|
userContextEmitter.once("closed", () => {
|
@@ -28701,14 +28701,14 @@ var require_semver = __commonJS({
|
|
28701
28701
|
if (!m[4]) {
|
28702
28702
|
this.prerelease = [];
|
28703
28703
|
} else {
|
28704
|
-
this.prerelease = m[4].split(".").map((
|
28705
|
-
if (/^[0-9]+$/.test(
|
28706
|
-
const num = +
|
28704
|
+
this.prerelease = m[4].split(".").map((id) => {
|
28705
|
+
if (/^[0-9]+$/.test(id)) {
|
28706
|
+
const num = +id;
|
28707
28707
|
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
28708
28708
|
return num;
|
28709
28709
|
}
|
28710
28710
|
}
|
28711
|
-
return
|
28711
|
+
return id;
|
28712
28712
|
});
|
28713
28713
|
}
|
28714
28714
|
this.build = m[5] ? m[5].split(".") : [];
|
@@ -29468,7 +29468,7 @@ var require_range = __commonJS({
|
|
29468
29468
|
debug6("stars", comp);
|
29469
29469
|
return comp;
|
29470
29470
|
};
|
29471
|
-
var isX = (
|
29471
|
+
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
29472
29472
|
var replaceTildes = (comp, options) => {
|
29473
29473
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
29474
29474
|
};
|
@@ -38808,7 +38808,7 @@ var require_ensure = __commonJS({
|
|
38808
38808
|
// node_modules/jsonfile/utils.js
|
38809
38809
|
var require_utils3 = __commonJS({
|
38810
38810
|
"node_modules/jsonfile/utils.js"(exports, module2) {
|
38811
|
-
function
|
38811
|
+
function stringify2(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
38812
38812
|
const EOF = finalEOL ? EOL : "";
|
38813
38813
|
const str = JSON.stringify(obj, replacer, spaces);
|
38814
38814
|
return str.replace(/\n/g, EOL) + EOF;
|
@@ -38818,7 +38818,7 @@ var require_utils3 = __commonJS({
|
|
38818
38818
|
content = content.toString("utf8");
|
38819
38819
|
return content.replace(/^\uFEFF/, "");
|
38820
38820
|
}
|
38821
|
-
module2.exports = { stringify:
|
38821
|
+
module2.exports = { stringify: stringify2, stripBom };
|
38822
38822
|
}
|
38823
38823
|
});
|
38824
38824
|
|
@@ -38832,7 +38832,7 @@ var require_jsonfile = __commonJS({
|
|
38832
38832
|
_fs = require("fs");
|
38833
38833
|
}
|
38834
38834
|
var universalify = require_universalify();
|
38835
|
-
var { stringify:
|
38835
|
+
var { stringify: stringify2, stripBom } = require_utils3();
|
38836
38836
|
async function _readFile(file, options = {}) {
|
38837
38837
|
if (typeof options === "string") {
|
38838
38838
|
options = { encoding: options };
|
@@ -38876,13 +38876,13 @@ var require_jsonfile = __commonJS({
|
|
38876
38876
|
}
|
38877
38877
|
async function _writeFile(file, obj, options = {}) {
|
38878
38878
|
const fs6 = options.fs || _fs;
|
38879
|
-
const str =
|
38879
|
+
const str = stringify2(obj, options);
|
38880
38880
|
await universalify.fromCallback(fs6.writeFile)(file, str, options);
|
38881
38881
|
}
|
38882
38882
|
var writeFile2 = universalify.fromPromise(_writeFile);
|
38883
38883
|
function writeFileSync(file, obj, options = {}) {
|
38884
38884
|
const fs6 = options.fs || _fs;
|
38885
|
-
const str =
|
38885
|
+
const str = stringify2(obj, options);
|
38886
38886
|
return fs6.writeFileSync(file, str, options);
|
38887
38887
|
}
|
38888
38888
|
var jsonfile = {
|
@@ -38943,10 +38943,10 @@ var require_output_file = __commonJS({
|
|
38943
38943
|
var require_output_json = __commonJS({
|
38944
38944
|
"node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
|
38945
38945
|
"use strict";
|
38946
|
-
var { stringify:
|
38946
|
+
var { stringify: stringify2 } = require_utils3();
|
38947
38947
|
var { outputFile } = require_output_file();
|
38948
38948
|
async function outputJson(file, data, options = {}) {
|
38949
|
-
const str =
|
38949
|
+
const str = stringify2(data, options);
|
38950
38950
|
await outputFile(file, str, options);
|
38951
38951
|
}
|
38952
38952
|
module2.exports = outputJson;
|
@@ -38957,10 +38957,10 @@ var require_output_json = __commonJS({
|
|
38957
38957
|
var require_output_json_sync = __commonJS({
|
38958
38958
|
"node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
|
38959
38959
|
"use strict";
|
38960
|
-
var { stringify:
|
38960
|
+
var { stringify: stringify2 } = require_utils3();
|
38961
38961
|
var { outputFileSync } = require_output_file();
|
38962
38962
|
function outputJsonSync(file, data, options) {
|
38963
|
-
const str =
|
38963
|
+
const str = stringify2(data, options);
|
38964
38964
|
outputFileSync(file, str, options);
|
38965
38965
|
}
|
38966
38966
|
module2.exports = outputJsonSync;
|
@@ -39909,9 +39909,9 @@ var require_ProgressTracker = __commonJS({
|
|
39909
39909
|
};
|
39910
39910
|
exports.ProgressTracker = ProgressTracker;
|
39911
39911
|
function poll(intervalMs, updateFunc) {
|
39912
|
-
const
|
39912
|
+
const id = setInterval(updateFunc, intervalMs);
|
39913
39913
|
const stopFunc = (stopWithUpdate) => {
|
39914
|
-
clearInterval(
|
39914
|
+
clearInterval(id);
|
39915
39915
|
if (stopWithUpdate) {
|
39916
39916
|
updateFunc();
|
39917
39917
|
}
|
@@ -41884,8 +41884,8 @@ var require_keyword = __commonJS({
|
|
41884
41884
|
(function() {
|
41885
41885
|
"use strict";
|
41886
41886
|
var code = require_code();
|
41887
|
-
function isStrictModeReservedWordES6(
|
41888
|
-
switch (
|
41887
|
+
function isStrictModeReservedWordES6(id) {
|
41888
|
+
switch (id) {
|
41889
41889
|
case "implements":
|
41890
41890
|
case "interface":
|
41891
41891
|
case "package":
|
@@ -41899,57 +41899,57 @@ var require_keyword = __commonJS({
|
|
41899
41899
|
return false;
|
41900
41900
|
}
|
41901
41901
|
}
|
41902
|
-
function isKeywordES5(
|
41903
|
-
if (!strict &&
|
41902
|
+
function isKeywordES5(id, strict) {
|
41903
|
+
if (!strict && id === "yield") {
|
41904
41904
|
return false;
|
41905
41905
|
}
|
41906
|
-
return isKeywordES6(
|
41906
|
+
return isKeywordES6(id, strict);
|
41907
41907
|
}
|
41908
|
-
function isKeywordES6(
|
41909
|
-
if (strict && isStrictModeReservedWordES6(
|
41908
|
+
function isKeywordES6(id, strict) {
|
41909
|
+
if (strict && isStrictModeReservedWordES6(id)) {
|
41910
41910
|
return true;
|
41911
41911
|
}
|
41912
|
-
switch (
|
41912
|
+
switch (id.length) {
|
41913
41913
|
case 2:
|
41914
|
-
return
|
41914
|
+
return id === "if" || id === "in" || id === "do";
|
41915
41915
|
case 3:
|
41916
|
-
return
|
41916
|
+
return id === "var" || id === "for" || id === "new" || id === "try";
|
41917
41917
|
case 4:
|
41918
|
-
return
|
41918
|
+
return id === "this" || id === "else" || id === "case" || id === "void" || id === "with" || id === "enum";
|
41919
41919
|
case 5:
|
41920
|
-
return
|
41920
|
+
return id === "while" || id === "break" || id === "catch" || id === "throw" || id === "const" || id === "yield" || id === "class" || id === "super";
|
41921
41921
|
case 6:
|
41922
|
-
return
|
41922
|
+
return id === "return" || id === "typeof" || id === "delete" || id === "switch" || id === "export" || id === "import";
|
41923
41923
|
case 7:
|
41924
|
-
return
|
41924
|
+
return id === "default" || id === "finally" || id === "extends";
|
41925
41925
|
case 8:
|
41926
|
-
return
|
41926
|
+
return id === "function" || id === "continue" || id === "debugger";
|
41927
41927
|
case 10:
|
41928
|
-
return
|
41928
|
+
return id === "instanceof";
|
41929
41929
|
default:
|
41930
41930
|
return false;
|
41931
41931
|
}
|
41932
41932
|
}
|
41933
|
-
function isReservedWordES5(
|
41934
|
-
return
|
41933
|
+
function isReservedWordES5(id, strict) {
|
41934
|
+
return id === "null" || id === "true" || id === "false" || isKeywordES5(id, strict);
|
41935
41935
|
}
|
41936
|
-
function isReservedWordES6(
|
41937
|
-
return
|
41936
|
+
function isReservedWordES6(id, strict) {
|
41937
|
+
return id === "null" || id === "true" || id === "false" || isKeywordES6(id, strict);
|
41938
41938
|
}
|
41939
|
-
function isRestrictedWord(
|
41940
|
-
return
|
41939
|
+
function isRestrictedWord(id) {
|
41940
|
+
return id === "eval" || id === "arguments";
|
41941
41941
|
}
|
41942
|
-
function isIdentifierNameES5(
|
41942
|
+
function isIdentifierNameES5(id) {
|
41943
41943
|
var i, iz, ch;
|
41944
|
-
if (
|
41944
|
+
if (id.length === 0) {
|
41945
41945
|
return false;
|
41946
41946
|
}
|
41947
|
-
ch =
|
41947
|
+
ch = id.charCodeAt(0);
|
41948
41948
|
if (!code.isIdentifierStartES5(ch)) {
|
41949
41949
|
return false;
|
41950
41950
|
}
|
41951
|
-
for (i = 1, iz =
|
41952
|
-
ch =
|
41951
|
+
for (i = 1, iz = id.length; i < iz; ++i) {
|
41952
|
+
ch = id.charCodeAt(i);
|
41953
41953
|
if (!code.isIdentifierPartES5(ch)) {
|
41954
41954
|
return false;
|
41955
41955
|
}
|
@@ -41959,20 +41959,20 @@ var require_keyword = __commonJS({
|
|
41959
41959
|
function decodeUtf16(lead, trail) {
|
41960
41960
|
return (lead - 55296) * 1024 + (trail - 56320) + 65536;
|
41961
41961
|
}
|
41962
|
-
function isIdentifierNameES6(
|
41962
|
+
function isIdentifierNameES6(id) {
|
41963
41963
|
var i, iz, ch, lowCh, check2;
|
41964
|
-
if (
|
41964
|
+
if (id.length === 0) {
|
41965
41965
|
return false;
|
41966
41966
|
}
|
41967
41967
|
check2 = code.isIdentifierStartES6;
|
41968
|
-
for (i = 0, iz =
|
41969
|
-
ch =
|
41968
|
+
for (i = 0, iz = id.length; i < iz; ++i) {
|
41969
|
+
ch = id.charCodeAt(i);
|
41970
41970
|
if (55296 <= ch && ch <= 56319) {
|
41971
41971
|
++i;
|
41972
41972
|
if (i >= iz) {
|
41973
41973
|
return false;
|
41974
41974
|
}
|
41975
|
-
lowCh =
|
41975
|
+
lowCh = id.charCodeAt(i);
|
41976
41976
|
if (!(56320 <= lowCh && lowCh <= 57343)) {
|
41977
41977
|
return false;
|
41978
41978
|
}
|
@@ -41985,11 +41985,11 @@ var require_keyword = __commonJS({
|
|
41985
41985
|
}
|
41986
41986
|
return true;
|
41987
41987
|
}
|
41988
|
-
function isIdentifierES5(
|
41989
|
-
return isIdentifierNameES5(
|
41988
|
+
function isIdentifierES5(id, strict) {
|
41989
|
+
return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
|
41990
41990
|
}
|
41991
|
-
function isIdentifierES6(
|
41992
|
-
return isIdentifierNameES6(
|
41991
|
+
function isIdentifierES6(id, strict) {
|
41992
|
+
return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
|
41993
41993
|
}
|
41994
41994
|
module2.exports = {
|
41995
41995
|
isKeywordES5,
|
@@ -45630,9 +45630,9 @@ var require_escodegen = __commonJS({
|
|
45630
45630
|
},
|
45631
45631
|
ImportNamespaceSpecifier: function(expr, precedence, flags) {
|
45632
45632
|
var result = ["*"];
|
45633
|
-
var
|
45634
|
-
if (
|
45635
|
-
result.push(space2 + "as" + noEmptySpace() + generateIdentifier(
|
45633
|
+
var id = expr.id || expr.local;
|
45634
|
+
if (id) {
|
45635
|
+
result.push(space2 + "as" + noEmptySpace() + generateIdentifier(id));
|
45636
45636
|
}
|
45637
45637
|
return result;
|
45638
45638
|
},
|
@@ -46287,8 +46287,8 @@ var require_esprima = __commonJS({
|
|
46287
46287
|
var qualifiedName;
|
46288
46288
|
switch (elementName.type) {
|
46289
46289
|
case jsx_syntax_1.JSXSyntax.JSXIdentifier:
|
46290
|
-
var
|
46291
|
-
qualifiedName =
|
46290
|
+
var id = elementName;
|
46291
|
+
qualifiedName = id.name;
|
46292
46292
|
break;
|
46293
46293
|
case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
|
46294
46294
|
var ns = elementName;
|
@@ -46460,10 +46460,10 @@ var require_esprima = __commonJS({
|
|
46460
46460
|
break;
|
46461
46461
|
}
|
46462
46462
|
}
|
46463
|
-
var
|
46463
|
+
var id = this.scanner.source.slice(start, this.scanner.index);
|
46464
46464
|
return {
|
46465
46465
|
type: 100,
|
46466
|
-
value:
|
46466
|
+
value: id,
|
46467
46467
|
lineNumber: this.scanner.lineNumber,
|
46468
46468
|
lineStart: this.scanner.lineStart,
|
46469
46469
|
start,
|
@@ -46981,9 +46981,9 @@ var require_esprima = __commonJS({
|
|
46981
46981
|
}();
|
46982
46982
|
exports2.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
|
46983
46983
|
var AsyncFunctionDeclaration = function() {
|
46984
|
-
function AsyncFunctionDeclaration2(
|
46984
|
+
function AsyncFunctionDeclaration2(id, params, body) {
|
46985
46985
|
this.type = syntax_1.Syntax.FunctionDeclaration;
|
46986
|
-
this.id =
|
46986
|
+
this.id = id;
|
46987
46987
|
this.params = params;
|
46988
46988
|
this.body = body;
|
46989
46989
|
this.generator = false;
|
@@ -46994,9 +46994,9 @@ var require_esprima = __commonJS({
|
|
46994
46994
|
}();
|
46995
46995
|
exports2.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
|
46996
46996
|
var AsyncFunctionExpression = function() {
|
46997
|
-
function AsyncFunctionExpression2(
|
46997
|
+
function AsyncFunctionExpression2(id, params, body) {
|
46998
46998
|
this.type = syntax_1.Syntax.FunctionExpression;
|
46999
|
-
this.id =
|
46999
|
+
this.id = id;
|
47000
47000
|
this.params = params;
|
47001
47001
|
this.body = body;
|
47002
47002
|
this.generator = false;
|
@@ -47068,9 +47068,9 @@ var require_esprima = __commonJS({
|
|
47068
47068
|
}();
|
47069
47069
|
exports2.ClassBody = ClassBody;
|
47070
47070
|
var ClassDeclaration = function() {
|
47071
|
-
function ClassDeclaration2(
|
47071
|
+
function ClassDeclaration2(id, superClass, body) {
|
47072
47072
|
this.type = syntax_1.Syntax.ClassDeclaration;
|
47073
|
-
this.id =
|
47073
|
+
this.id = id;
|
47074
47074
|
this.superClass = superClass;
|
47075
47075
|
this.body = body;
|
47076
47076
|
}
|
@@ -47078,9 +47078,9 @@ var require_esprima = __commonJS({
|
|
47078
47078
|
}();
|
47079
47079
|
exports2.ClassDeclaration = ClassDeclaration;
|
47080
47080
|
var ClassExpression = function() {
|
47081
|
-
function ClassExpression2(
|
47081
|
+
function ClassExpression2(id, superClass, body) {
|
47082
47082
|
this.type = syntax_1.Syntax.ClassExpression;
|
47083
|
-
this.id =
|
47083
|
+
this.id = id;
|
47084
47084
|
this.superClass = superClass;
|
47085
47085
|
this.body = body;
|
47086
47086
|
}
|
@@ -47223,9 +47223,9 @@ var require_esprima = __commonJS({
|
|
47223
47223
|
}();
|
47224
47224
|
exports2.ForStatement = ForStatement;
|
47225
47225
|
var FunctionDeclaration = function() {
|
47226
|
-
function FunctionDeclaration2(
|
47226
|
+
function FunctionDeclaration2(id, params, body, generator) {
|
47227
47227
|
this.type = syntax_1.Syntax.FunctionDeclaration;
|
47228
|
-
this.id =
|
47228
|
+
this.id = id;
|
47229
47229
|
this.params = params;
|
47230
47230
|
this.body = body;
|
47231
47231
|
this.generator = generator;
|
@@ -47236,9 +47236,9 @@ var require_esprima = __commonJS({
|
|
47236
47236
|
}();
|
47237
47237
|
exports2.FunctionDeclaration = FunctionDeclaration;
|
47238
47238
|
var FunctionExpression = function() {
|
47239
|
-
function FunctionExpression2(
|
47239
|
+
function FunctionExpression2(id, params, body, generator) {
|
47240
47240
|
this.type = syntax_1.Syntax.FunctionExpression;
|
47241
|
-
this.id =
|
47241
|
+
this.id = id;
|
47242
47242
|
this.params = params;
|
47243
47243
|
this.body = body;
|
47244
47244
|
this.generator = generator;
|
@@ -47554,9 +47554,9 @@ var require_esprima = __commonJS({
|
|
47554
47554
|
}();
|
47555
47555
|
exports2.VariableDeclaration = VariableDeclaration;
|
47556
47556
|
var VariableDeclarator = function() {
|
47557
|
-
function VariableDeclarator2(
|
47557
|
+
function VariableDeclarator2(id, init4) {
|
47558
47558
|
this.type = syntax_1.Syntax.VariableDeclarator;
|
47559
|
-
this.id =
|
47559
|
+
this.id = id;
|
47560
47560
|
this.init = init4;
|
47561
47561
|
}
|
47562
47562
|
return VariableDeclarator2;
|
@@ -48210,11 +48210,11 @@ var require_esprima = __commonJS({
|
|
48210
48210
|
var shorthand = false;
|
48211
48211
|
var isAsync = false;
|
48212
48212
|
if (token.type === 3) {
|
48213
|
-
var
|
48213
|
+
var id = token.value;
|
48214
48214
|
this.nextToken();
|
48215
48215
|
computed = this.match("[");
|
48216
|
-
isAsync = !this.hasLineTerminator &&
|
48217
|
-
key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node2.Identifier(
|
48216
|
+
isAsync = !this.hasLineTerminator && id === "async" && !this.match(":") && !this.match("(") && !this.match("*") && !this.match(",");
|
48217
|
+
key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node2.Identifier(id));
|
48218
48218
|
} else if (this.match("*")) {
|
48219
48219
|
this.nextToken();
|
48220
48220
|
} else {
|
@@ -48257,16 +48257,16 @@ var require_esprima = __commonJS({
|
|
48257
48257
|
value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
|
48258
48258
|
method = true;
|
48259
48259
|
} else if (token.type === 3) {
|
48260
|
-
var
|
48260
|
+
var id = this.finalize(node, new Node2.Identifier(token.value));
|
48261
48261
|
if (this.match("=")) {
|
48262
48262
|
this.context.firstCoverInitializedNameError = this.lookahead;
|
48263
48263
|
this.nextToken();
|
48264
48264
|
shorthand = true;
|
48265
48265
|
var init4 = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
48266
|
-
value = this.finalize(node, new Node2.AssignmentPattern(
|
48266
|
+
value = this.finalize(node, new Node2.AssignmentPattern(id, init4));
|
48267
48267
|
} else {
|
48268
48268
|
shorthand = true;
|
48269
|
-
value =
|
48269
|
+
value = id;
|
48270
48270
|
}
|
48271
48271
|
} else {
|
48272
48272
|
this.throwUnexpectedToken(this.nextToken());
|
@@ -48502,14 +48502,14 @@ var require_esprima = __commonJS({
|
|
48502
48502
|
};
|
48503
48503
|
Parser4.prototype.parseNewExpression = function() {
|
48504
48504
|
var node = this.createNode();
|
48505
|
-
var
|
48506
|
-
assert_1.assert(
|
48505
|
+
var id = this.parseIdentifierName();
|
48506
|
+
assert_1.assert(id.name === "new", "New expression must start with `new`");
|
48507
48507
|
var expr;
|
48508
48508
|
if (this.match(".")) {
|
48509
48509
|
this.nextToken();
|
48510
48510
|
if (this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === "target") {
|
48511
48511
|
var property = this.parseIdentifierName();
|
48512
|
-
expr = new Node2.MetaProperty(
|
48512
|
+
expr = new Node2.MetaProperty(id, property);
|
48513
48513
|
} else {
|
48514
48514
|
this.throwUnexpectedToken(this.lookahead);
|
48515
48515
|
}
|
@@ -48939,11 +48939,11 @@ var require_esprima = __commonJS({
|
|
48939
48939
|
this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
|
48940
48940
|
}
|
48941
48941
|
if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {
|
48942
|
-
var
|
48943
|
-
if (this.scanner.isRestrictedWord(
|
48942
|
+
var id = expr;
|
48943
|
+
if (this.scanner.isRestrictedWord(id.name)) {
|
48944
48944
|
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);
|
48945
48945
|
}
|
48946
|
-
if (this.scanner.isStrictModeReservedWord(
|
48946
|
+
if (this.scanner.isStrictModeReservedWord(id.name)) {
|
48947
48947
|
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
|
48948
48948
|
}
|
48949
48949
|
}
|
@@ -49035,9 +49035,9 @@ var require_esprima = __commonJS({
|
|
49035
49035
|
Parser4.prototype.parseLexicalBinding = function(kind, options) {
|
49036
49036
|
var node = this.createNode();
|
49037
49037
|
var params = [];
|
49038
|
-
var
|
49039
|
-
if (this.context.strict &&
|
49040
|
-
if (this.scanner.isRestrictedWord(
|
49038
|
+
var id = this.parsePattern(params, kind);
|
49039
|
+
if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
|
49040
|
+
if (this.scanner.isRestrictedWord(id.name)) {
|
49041
49041
|
this.tolerateError(messages_1.Messages.StrictVarName);
|
49042
49042
|
}
|
49043
49043
|
}
|
@@ -49051,11 +49051,11 @@ var require_esprima = __commonJS({
|
|
49051
49051
|
this.throwError(messages_1.Messages.DeclarationMissingInitializer, "const");
|
49052
49052
|
}
|
49053
49053
|
}
|
49054
|
-
} else if (!options.inFor &&
|
49054
|
+
} else if (!options.inFor && id.type !== syntax_1.Syntax.Identifier || this.match("=")) {
|
49055
49055
|
this.expect("=");
|
49056
49056
|
init4 = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
49057
49057
|
}
|
49058
|
-
return this.finalize(node, new Node2.VariableDeclarator(
|
49058
|
+
return this.finalize(node, new Node2.VariableDeclarator(id, init4));
|
49059
49059
|
};
|
49060
49060
|
Parser4.prototype.parseBindingList = function(kind, options) {
|
49061
49061
|
var list = [this.parseLexicalBinding(kind, options)];
|
@@ -49208,9 +49208,9 @@ var require_esprima = __commonJS({
|
|
49208
49208
|
Parser4.prototype.parseVariableDeclaration = function(options) {
|
49209
49209
|
var node = this.createNode();
|
49210
49210
|
var params = [];
|
49211
|
-
var
|
49212
|
-
if (this.context.strict &&
|
49213
|
-
if (this.scanner.isRestrictedWord(
|
49211
|
+
var id = this.parsePattern(params, "var");
|
49212
|
+
if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
|
49213
|
+
if (this.scanner.isRestrictedWord(id.name)) {
|
49214
49214
|
this.tolerateError(messages_1.Messages.StrictVarName);
|
49215
49215
|
}
|
49216
49216
|
}
|
@@ -49218,10 +49218,10 @@ var require_esprima = __commonJS({
|
|
49218
49218
|
if (this.match("=")) {
|
49219
49219
|
this.nextToken();
|
49220
49220
|
init4 = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
49221
|
-
} else if (
|
49221
|
+
} else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) {
|
49222
49222
|
this.expect("=");
|
49223
49223
|
}
|
49224
|
-
return this.finalize(node, new Node2.VariableDeclarator(
|
49224
|
+
return this.finalize(node, new Node2.VariableDeclarator(id, init4));
|
49225
49225
|
};
|
49226
49226
|
Parser4.prototype.parseVariableDeclarationList = function(options) {
|
49227
49227
|
var opt = { inFor: options.inFor };
|
@@ -49452,11 +49452,11 @@ var require_esprima = __commonJS({
|
|
49452
49452
|
this.expectKeyword("continue");
|
49453
49453
|
var label = null;
|
49454
49454
|
if (this.lookahead.type === 3 && !this.hasLineTerminator) {
|
49455
|
-
var
|
49456
|
-
label =
|
49457
|
-
var key = "$" +
|
49455
|
+
var id = this.parseVariableIdentifier();
|
49456
|
+
label = id;
|
49457
|
+
var key = "$" + id.name;
|
49458
49458
|
if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
|
49459
|
-
this.throwError(messages_1.Messages.UnknownLabel,
|
49459
|
+
this.throwError(messages_1.Messages.UnknownLabel, id.name);
|
49460
49460
|
}
|
49461
49461
|
}
|
49462
49462
|
this.consumeSemicolon();
|
@@ -49470,12 +49470,12 @@ var require_esprima = __commonJS({
|
|
49470
49470
|
this.expectKeyword("break");
|
49471
49471
|
var label = null;
|
49472
49472
|
if (this.lookahead.type === 3 && !this.hasLineTerminator) {
|
49473
|
-
var
|
49474
|
-
var key = "$" +
|
49473
|
+
var id = this.parseVariableIdentifier();
|
49474
|
+
var key = "$" + id.name;
|
49475
49475
|
if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
|
49476
|
-
this.throwError(messages_1.Messages.UnknownLabel,
|
49476
|
+
this.throwError(messages_1.Messages.UnknownLabel, id.name);
|
49477
49477
|
}
|
49478
|
-
label =
|
49478
|
+
label = id;
|
49479
49479
|
}
|
49480
49480
|
this.consumeSemicolon();
|
49481
49481
|
if (label === null && !this.context.inIteration && !this.context.inSwitch) {
|
@@ -49566,10 +49566,10 @@ var require_esprima = __commonJS({
|
|
49566
49566
|
var statement;
|
49567
49567
|
if (expr.type === syntax_1.Syntax.Identifier && this.match(":")) {
|
49568
49568
|
this.nextToken();
|
49569
|
-
var
|
49570
|
-
var key = "$" +
|
49569
|
+
var id = expr;
|
49570
|
+
var key = "$" + id.name;
|
49571
49571
|
if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
|
49572
|
-
this.throwError(messages_1.Messages.Redeclaration, "Label",
|
49572
|
+
this.throwError(messages_1.Messages.Redeclaration, "Label", id.name);
|
49573
49573
|
}
|
49574
49574
|
this.context.labelSet[key] = true;
|
49575
49575
|
var body = void 0;
|
@@ -49589,7 +49589,7 @@ var require_esprima = __commonJS({
|
|
49589
49589
|
body = this.parseStatement();
|
49590
49590
|
}
|
49591
49591
|
delete this.context.labelSet[key];
|
49592
|
-
statement = new Node2.LabeledStatement(
|
49592
|
+
statement = new Node2.LabeledStatement(id, body);
|
49593
49593
|
} else {
|
49594
49594
|
this.consumeSemicolon();
|
49595
49595
|
statement = new Node2.ExpressionStatement(expr);
|
@@ -49861,11 +49861,11 @@ var require_esprima = __commonJS({
|
|
49861
49861
|
this.nextToken();
|
49862
49862
|
}
|
49863
49863
|
var message2;
|
49864
|
-
var
|
49864
|
+
var id = null;
|
49865
49865
|
var firstRestricted = null;
|
49866
49866
|
if (!identifierIsOptional || !this.match("(")) {
|
49867
49867
|
var token = this.lookahead;
|
49868
|
-
|
49868
|
+
id = this.parseVariableIdentifier();
|
49869
49869
|
if (this.context.strict) {
|
49870
49870
|
if (this.scanner.isRestrictedWord(token.value)) {
|
49871
49871
|
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
|
@@ -49905,7 +49905,7 @@ var require_esprima = __commonJS({
|
|
49905
49905
|
this.context.allowStrictDirective = previousAllowStrictDirective;
|
49906
49906
|
this.context.await = previousAllowAwait;
|
49907
49907
|
this.context.allowYield = previousAllowYield;
|
49908
|
-
return isAsync ? this.finalize(node, new Node2.AsyncFunctionDeclaration(
|
49908
|
+
return isAsync ? this.finalize(node, new Node2.AsyncFunctionDeclaration(id, params, body)) : this.finalize(node, new Node2.FunctionDeclaration(id, params, body, isGenerator));
|
49909
49909
|
};
|
49910
49910
|
Parser4.prototype.parseFunctionExpression = function() {
|
49911
49911
|
var node = this.createNode();
|
@@ -49919,7 +49919,7 @@ var require_esprima = __commonJS({
|
|
49919
49919
|
this.nextToken();
|
49920
49920
|
}
|
49921
49921
|
var message2;
|
49922
|
-
var
|
49922
|
+
var id = null;
|
49923
49923
|
var firstRestricted;
|
49924
49924
|
var previousAllowAwait = this.context.await;
|
49925
49925
|
var previousAllowYield = this.context.allowYield;
|
@@ -49927,7 +49927,7 @@ var require_esprima = __commonJS({
|
|
49927
49927
|
this.context.allowYield = !isGenerator;
|
49928
49928
|
if (!this.match("(")) {
|
49929
49929
|
var token = this.lookahead;
|
49930
|
-
|
49930
|
+
id = !this.context.strict && !isGenerator && this.matchKeyword("yield") ? this.parseIdentifierName() : this.parseVariableIdentifier();
|
49931
49931
|
if (this.context.strict) {
|
49932
49932
|
if (this.scanner.isRestrictedWord(token.value)) {
|
49933
49933
|
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
|
@@ -49963,7 +49963,7 @@ var require_esprima = __commonJS({
|
|
49963
49963
|
this.context.allowStrictDirective = previousAllowStrictDirective;
|
49964
49964
|
this.context.await = previousAllowAwait;
|
49965
49965
|
this.context.allowYield = previousAllowYield;
|
49966
|
-
return isAsync ? this.finalize(node, new Node2.AsyncFunctionExpression(
|
49966
|
+
return isAsync ? this.finalize(node, new Node2.AsyncFunctionExpression(id, params, body)) : this.finalize(node, new Node2.FunctionExpression(id, params, body, isGenerator));
|
49967
49967
|
};
|
49968
49968
|
Parser4.prototype.parseDirective = function() {
|
49969
49969
|
var token = this.lookahead;
|
@@ -50107,8 +50107,8 @@ var require_esprima = __commonJS({
|
|
50107
50107
|
} else {
|
50108
50108
|
computed = this.match("[");
|
50109
50109
|
key = this.parseObjectPropertyKey();
|
50110
|
-
var
|
50111
|
-
if (
|
50110
|
+
var id = key;
|
50111
|
+
if (id.name === "static" && (this.qualifiedPropertyName(this.lookahead) || this.match("*"))) {
|
50112
50112
|
token = this.lookahead;
|
50113
50113
|
isStatic = true;
|
50114
50114
|
computed = this.match("[");
|
@@ -50204,7 +50204,7 @@ var require_esprima = __commonJS({
|
|
50204
50204
|
var previousStrict = this.context.strict;
|
50205
50205
|
this.context.strict = true;
|
50206
50206
|
this.expectKeyword("class");
|
50207
|
-
var
|
50207
|
+
var id = identifierIsOptional && this.lookahead.type !== 3 ? null : this.parseVariableIdentifier();
|
50208
50208
|
var superClass = null;
|
50209
50209
|
if (this.matchKeyword("extends")) {
|
50210
50210
|
this.nextToken();
|
@@ -50212,14 +50212,14 @@ var require_esprima = __commonJS({
|
|
50212
50212
|
}
|
50213
50213
|
var classBody = this.parseClassBody();
|
50214
50214
|
this.context.strict = previousStrict;
|
50215
|
-
return this.finalize(node, new Node2.ClassDeclaration(
|
50215
|
+
return this.finalize(node, new Node2.ClassDeclaration(id, superClass, classBody));
|
50216
50216
|
};
|
50217
50217
|
Parser4.prototype.parseClassExpression = function() {
|
50218
50218
|
var node = this.createNode();
|
50219
50219
|
var previousStrict = this.context.strict;
|
50220
50220
|
this.context.strict = true;
|
50221
50221
|
this.expectKeyword("class");
|
50222
|
-
var
|
50222
|
+
var id = this.lookahead.type === 3 ? this.parseVariableIdentifier() : null;
|
50223
50223
|
var superClass = null;
|
50224
50224
|
if (this.matchKeyword("extends")) {
|
50225
50225
|
this.nextToken();
|
@@ -50227,7 +50227,7 @@ var require_esprima = __commonJS({
|
|
50227
50227
|
}
|
50228
50228
|
var classBody = this.parseClassBody();
|
50229
50229
|
this.context.strict = previousStrict;
|
50230
|
-
return this.finalize(node, new Node2.ClassExpression(
|
50230
|
+
return this.finalize(node, new Node2.ClassExpression(id, superClass, classBody));
|
50231
50231
|
};
|
50232
50232
|
Parser4.prototype.parseModule = function() {
|
50233
50233
|
this.context.strict = true;
|
@@ -50799,8 +50799,8 @@ var require_esprima = __commonJS({
|
|
50799
50799
|
}
|
50800
50800
|
return comments;
|
50801
50801
|
};
|
50802
|
-
Scanner2.prototype.isFutureReservedWord = function(
|
50803
|
-
switch (
|
50802
|
+
Scanner2.prototype.isFutureReservedWord = function(id) {
|
50803
|
+
switch (id) {
|
50804
50804
|
case "enum":
|
50805
50805
|
case "export":
|
50806
50806
|
case "import":
|
@@ -50810,8 +50810,8 @@ var require_esprima = __commonJS({
|
|
50810
50810
|
return false;
|
50811
50811
|
}
|
50812
50812
|
};
|
50813
|
-
Scanner2.prototype.isStrictModeReservedWord = function(
|
50814
|
-
switch (
|
50813
|
+
Scanner2.prototype.isStrictModeReservedWord = function(id) {
|
50814
|
+
switch (id) {
|
50815
50815
|
case "implements":
|
50816
50816
|
case "interface":
|
50817
50817
|
case "package":
|
@@ -50826,27 +50826,27 @@ var require_esprima = __commonJS({
|
|
50826
50826
|
return false;
|
50827
50827
|
}
|
50828
50828
|
};
|
50829
|
-
Scanner2.prototype.isRestrictedWord = function(
|
50830
|
-
return
|
50829
|
+
Scanner2.prototype.isRestrictedWord = function(id) {
|
50830
|
+
return id === "eval" || id === "arguments";
|
50831
50831
|
};
|
50832
|
-
Scanner2.prototype.isKeyword = function(
|
50833
|
-
switch (
|
50832
|
+
Scanner2.prototype.isKeyword = function(id) {
|
50833
|
+
switch (id.length) {
|
50834
50834
|
case 2:
|
50835
|
-
return
|
50835
|
+
return id === "if" || id === "in" || id === "do";
|
50836
50836
|
case 3:
|
50837
|
-
return
|
50837
|
+
return id === "var" || id === "for" || id === "new" || id === "try" || id === "let";
|
50838
50838
|
case 4:
|
50839
|
-
return
|
50839
|
+
return id === "this" || id === "else" || id === "case" || id === "void" || id === "with" || id === "enum";
|
50840
50840
|
case 5:
|
50841
|
-
return
|
50841
|
+
return id === "while" || id === "break" || id === "catch" || id === "throw" || id === "const" || id === "yield" || id === "class" || id === "super";
|
50842
50842
|
case 6:
|
50843
|
-
return
|
50843
|
+
return id === "return" || id === "typeof" || id === "delete" || id === "switch" || id === "export" || id === "import";
|
50844
50844
|
case 7:
|
50845
|
-
return
|
50845
|
+
return id === "default" || id === "finally" || id === "extends";
|
50846
50846
|
case 8:
|
50847
|
-
return
|
50847
|
+
return id === "function" || id === "continue" || id === "debugger";
|
50848
50848
|
case 10:
|
50849
|
-
return
|
50849
|
+
return id === "instanceof";
|
50850
50850
|
default:
|
50851
50851
|
return false;
|
50852
50852
|
}
|
@@ -50913,8 +50913,8 @@ var require_esprima = __commonJS({
|
|
50913
50913
|
};
|
50914
50914
|
Scanner2.prototype.getComplexIdentifier = function() {
|
50915
50915
|
var cp = this.codePointAt(this.index);
|
50916
|
-
var
|
50917
|
-
this.index +=
|
50916
|
+
var id = character_1.Character.fromCodePoint(cp);
|
50917
|
+
this.index += id.length;
|
50918
50918
|
var ch;
|
50919
50919
|
if (cp === 92) {
|
50920
50920
|
if (this.source.charCodeAt(this.index) !== 117) {
|
@@ -50930,7 +50930,7 @@ var require_esprima = __commonJS({
|
|
50930
50930
|
this.throwUnexpectedToken();
|
50931
50931
|
}
|
50932
50932
|
}
|
50933
|
-
|
50933
|
+
id = ch;
|
50934
50934
|
}
|
50935
50935
|
while (!this.eof()) {
|
50936
50936
|
cp = this.codePointAt(this.index);
|
@@ -50938,10 +50938,10 @@ var require_esprima = __commonJS({
|
|
50938
50938
|
break;
|
50939
50939
|
}
|
50940
50940
|
ch = character_1.Character.fromCodePoint(cp);
|
50941
|
-
|
50941
|
+
id += ch;
|
50942
50942
|
this.index += ch.length;
|
50943
50943
|
if (cp === 92) {
|
50944
|
-
|
50944
|
+
id = id.substr(0, id.length - 1);
|
50945
50945
|
if (this.source.charCodeAt(this.index) !== 117) {
|
50946
50946
|
this.throwUnexpectedToken();
|
50947
50947
|
}
|
@@ -50955,10 +50955,10 @@ var require_esprima = __commonJS({
|
|
50955
50955
|
this.throwUnexpectedToken();
|
50956
50956
|
}
|
50957
50957
|
}
|
50958
|
-
|
50958
|
+
id += ch;
|
50959
50959
|
}
|
50960
50960
|
}
|
50961
|
-
return
|
50961
|
+
return id;
|
50962
50962
|
};
|
50963
50963
|
Scanner2.prototype.octalToDecimal = function(ch) {
|
50964
50964
|
var octal = ch !== "0";
|
@@ -50978,19 +50978,19 @@ var require_esprima = __commonJS({
|
|
50978
50978
|
Scanner2.prototype.scanIdentifier = function() {
|
50979
50979
|
var type;
|
50980
50980
|
var start = this.index;
|
50981
|
-
var
|
50982
|
-
if (
|
50981
|
+
var id = this.source.charCodeAt(start) === 92 ? this.getComplexIdentifier() : this.getIdentifier();
|
50982
|
+
if (id.length === 1) {
|
50983
50983
|
type = 3;
|
50984
|
-
} else if (this.isKeyword(
|
50984
|
+
} else if (this.isKeyword(id)) {
|
50985
50985
|
type = 4;
|
50986
|
-
} else if (
|
50986
|
+
} else if (id === "null") {
|
50987
50987
|
type = 5;
|
50988
|
-
} else if (
|
50988
|
+
} else if (id === "true" || id === "false") {
|
50989
50989
|
type = 1;
|
50990
50990
|
} else {
|
50991
50991
|
type = 3;
|
50992
50992
|
}
|
50993
|
-
if (type !== 3 && start +
|
50993
|
+
if (type !== 3 && start + id.length !== this.index) {
|
50994
50994
|
var restore = this.index;
|
50995
50995
|
this.index = start;
|
50996
50996
|
this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);
|
@@ -50998,7 +50998,7 @@ var require_esprima = __commonJS({
|
|
50998
50998
|
}
|
50999
50999
|
return {
|
51000
51000
|
type,
|
51001
|
-
value:
|
51001
|
+
value: id,
|
51002
51002
|
lineNumber: this.lineNumber,
|
51003
51003
|
lineStart: this.lineStart,
|
51004
51004
|
start,
|
@@ -52116,8 +52116,8 @@ var require_tslib = __commonJS({
|
|
52116
52116
|
exports2.__esModule = true;
|
52117
52117
|
}
|
52118
52118
|
}
|
52119
|
-
return function(
|
52120
|
-
return exports2[
|
52119
|
+
return function(id, v) {
|
52120
|
+
return exports2[id] = previous ? previous(id, v) : v;
|
52121
52121
|
};
|
52122
52122
|
}
|
52123
52123
|
})(function(exporter) {
|
@@ -70793,7 +70793,7 @@ var require_json_parse_even_better_errors = __commonJS({
|
|
70793
70793
|
var kNewline = Symbol.for("newline");
|
70794
70794
|
var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
|
70795
70795
|
var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
|
70796
|
-
var
|
70796
|
+
var parseJson = (txt, reviver, context2) => {
|
70797
70797
|
const parseText = stripBOM(txt);
|
70798
70798
|
context2 = context2 || 20;
|
70799
70799
|
try {
|
@@ -70814,13 +70814,13 @@ var require_json_parse_even_better_errors = __commonJS({
|
|
70814
70814
|
systemError: e
|
70815
70815
|
});
|
70816
70816
|
}
|
70817
|
-
throw new JSONParseError(e, parseText, context2,
|
70817
|
+
throw new JSONParseError(e, parseText, context2, parseJson);
|
70818
70818
|
}
|
70819
70819
|
};
|
70820
70820
|
var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
|
70821
|
-
module2.exports =
|
70822
|
-
|
70823
|
-
|
70821
|
+
module2.exports = parseJson;
|
70822
|
+
parseJson.JSONParseError = JSONParseError;
|
70823
|
+
parseJson.noExceptions = (txt, reviver) => {
|
70824
70824
|
try {
|
70825
70825
|
return JSON.parse(stripBOM(txt), reviver);
|
70826
70826
|
} catch (e) {
|
@@ -73041,7 +73041,7 @@ var require_parse_json = __commonJS({
|
|
73041
73041
|
fileName: errorEx.append("in %s"),
|
73042
73042
|
codeFrame: errorEx.append("\n\n%s\n")
|
73043
73043
|
});
|
73044
|
-
var
|
73044
|
+
var parseJson = (string3, reviver, filename) => {
|
73045
73045
|
if (typeof reviver === "string") {
|
73046
73046
|
filename = reviver;
|
73047
73047
|
reviver = null;
|
@@ -73074,8 +73074,8 @@ var require_parse_json = __commonJS({
|
|
73074
73074
|
throw jsonError;
|
73075
73075
|
}
|
73076
73076
|
};
|
73077
|
-
|
73078
|
-
module2.exports =
|
73077
|
+
parseJson.JSONError = JSONError;
|
73078
|
+
module2.exports = parseJson;
|
73079
73079
|
}
|
73080
73080
|
});
|
73081
73081
|
|
@@ -79196,31 +79196,31 @@ var require_typescript2 = __commonJS({
|
|
79196
79196
|
}
|
79197
79197
|
function clone(object) {
|
79198
79198
|
const result = {};
|
79199
|
-
for (const
|
79200
|
-
if (hasOwnProperty2.call(object,
|
79201
|
-
result[
|
79199
|
+
for (const id in object) {
|
79200
|
+
if (hasOwnProperty2.call(object, id)) {
|
79201
|
+
result[id] = object[id];
|
79202
79202
|
}
|
79203
79203
|
}
|
79204
79204
|
return result;
|
79205
79205
|
}
|
79206
79206
|
function extend(first22, second) {
|
79207
79207
|
const result = {};
|
79208
|
-
for (const
|
79209
|
-
if (hasOwnProperty2.call(second,
|
79210
|
-
result[
|
79208
|
+
for (const id in second) {
|
79209
|
+
if (hasOwnProperty2.call(second, id)) {
|
79210
|
+
result[id] = second[id];
|
79211
79211
|
}
|
79212
79212
|
}
|
79213
|
-
for (const
|
79214
|
-
if (hasOwnProperty2.call(first22,
|
79215
|
-
result[
|
79213
|
+
for (const id in first22) {
|
79214
|
+
if (hasOwnProperty2.call(first22, id)) {
|
79215
|
+
result[id] = first22[id];
|
79216
79216
|
}
|
79217
79217
|
}
|
79218
79218
|
return result;
|
79219
79219
|
}
|
79220
79220
|
function copyProperties(first22, second) {
|
79221
|
-
for (const
|
79222
|
-
if (hasOwnProperty2.call(second,
|
79223
|
-
first22[
|
79221
|
+
for (const id in second) {
|
79222
|
+
if (hasOwnProperty2.call(second, id)) {
|
79223
|
+
first22[id] = second[id];
|
79224
79224
|
}
|
79225
79225
|
}
|
79226
79226
|
}
|
@@ -80638,8 +80638,8 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;
|
|
80638
80638
|
return parents;
|
80639
80639
|
}
|
80640
80640
|
function buildGraphNode(flowNode2, seen) {
|
80641
|
-
const
|
80642
|
-
let graphNode = links[
|
80641
|
+
const id = getDebugFlowNodeId(flowNode2);
|
80642
|
+
let graphNode = links[id];
|
80643
80643
|
if (graphNode && seen.has(flowNode2)) {
|
80644
80644
|
graphNode.circular = true;
|
80645
80645
|
graphNode = {
|
@@ -80657,7 +80657,7 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;
|
|
80657
80657
|
}
|
80658
80658
|
seen.add(flowNode2);
|
80659
80659
|
if (!graphNode) {
|
80660
|
-
links[
|
80660
|
+
links[id] = graphNode = { id, flowNode: flowNode2, edges: [], text: "", lane: -1, endLane: -1, level: -1, circular: false };
|
80661
80661
|
nodes.push(graphNode);
|
80662
80662
|
if (hasAntecedents(flowNode2)) {
|
80663
80663
|
for (const antecedent of flowNode2.antecedent) {
|
@@ -90849,8 +90849,8 @@ ${lanes.join("\n")}
|
|
90849
90849
|
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
|
90850
90850
|
}
|
90851
90851
|
function unescapeLeadingUnderscores(identifier) {
|
90852
|
-
const
|
90853
|
-
return
|
90852
|
+
const id = identifier;
|
90853
|
+
return id.length >= 3 && id.charCodeAt(0) === 95 && id.charCodeAt(1) === 95 && id.charCodeAt(2) === 95 ? id.substr(1) : id;
|
90854
90854
|
}
|
90855
90855
|
function idText(identifierOrPrivateName) {
|
90856
90856
|
return unescapeLeadingUnderscores(identifierOrPrivateName.escapedText);
|
@@ -94478,8 +94478,8 @@ ${lanes.join("\n")}
|
|
94478
94478
|
while (!isIdentifier(nextToLast.expression)) {
|
94479
94479
|
nextToLast = nextToLast.expression;
|
94480
94480
|
}
|
94481
|
-
const
|
94482
|
-
if ((
|
94481
|
+
const id = nextToLast.expression;
|
94482
|
+
if ((id.escapedText === "exports" || id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && isBindableStaticAccessExpression(lhs)) {
|
94483
94483
|
return 1;
|
94484
94484
|
}
|
94485
94485
|
if (isBindableStaticNameExpression(
|
@@ -96152,8 +96152,8 @@ ${lanes.join("\n")}
|
|
96152
96152
|
}
|
96153
96153
|
return node.parent.kind === 186;
|
96154
96154
|
}
|
96155
|
-
function identifierIsThisKeyword(
|
96156
|
-
return
|
96155
|
+
function identifierIsThisKeyword(id) {
|
96156
|
+
return id.escapedText === "this";
|
96157
96157
|
}
|
96158
96158
|
function getAllAccessorDeclarations(declarations, accessor) {
|
96159
96159
|
let firstAccessor;
|
@@ -110688,10 +110688,10 @@ ${lanes.join("\n")}
|
|
110688
110688
|
}
|
110689
110689
|
}
|
110690
110690
|
function parseTypePredicatePrefix() {
|
110691
|
-
const
|
110691
|
+
const id = parseIdentifier();
|
110692
110692
|
if (token() === 142 && !scanner2.hasPrecedingLineBreak()) {
|
110693
110693
|
nextToken();
|
110694
|
-
return
|
110694
|
+
return id;
|
110695
110695
|
}
|
110696
110696
|
}
|
110697
110697
|
function parseAssertsTypePredicate() {
|
@@ -118169,12 +118169,12 @@ ${lanes.join("\n")}
|
|
118169
118169
|
if (!jsonOptions) {
|
118170
118170
|
return;
|
118171
118171
|
}
|
118172
|
-
for (const
|
118173
|
-
const opt = optionsNameMap.get(
|
118172
|
+
for (const id in jsonOptions) {
|
118173
|
+
const opt = optionsNameMap.get(id);
|
118174
118174
|
if (opt) {
|
118175
|
-
(defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[
|
118175
|
+
(defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
|
118176
118176
|
} else {
|
118177
|
-
errors.push(createUnknownOptionError(
|
118177
|
+
errors.push(createUnknownOptionError(id, diagnostics));
|
118178
118178
|
}
|
118179
118179
|
}
|
118180
118180
|
return defaultOptions;
|
@@ -123401,9 +123401,9 @@ ${lanes.join("\n")}
|
|
123401
123401
|
const symbol = forEachIdentifierInEntityName(
|
123402
123402
|
node.arguments[0],
|
123403
123403
|
void 0,
|
123404
|
-
(
|
123404
|
+
(id, symbol2) => {
|
123405
123405
|
if (symbol2) {
|
123406
|
-
addDeclarationToSymbol(symbol2,
|
123406
|
+
addDeclarationToSymbol(symbol2, id, 1536 | 67108864);
|
123407
123407
|
}
|
123408
123408
|
return symbol2;
|
123409
123409
|
}
|
@@ -123420,9 +123420,9 @@ ${lanes.join("\n")}
|
|
123420
123420
|
const symbol = forEachIdentifierInEntityName(
|
123421
123421
|
node.left.expression,
|
123422
123422
|
void 0,
|
123423
|
-
(
|
123423
|
+
(id, symbol2) => {
|
123424
123424
|
if (symbol2) {
|
123425
|
-
addDeclarationToSymbol(symbol2,
|
123425
|
+
addDeclarationToSymbol(symbol2, id, 1536 | 67108864);
|
123426
123426
|
}
|
123427
123427
|
return symbol2;
|
123428
123428
|
}
|
@@ -123643,13 +123643,13 @@ ${lanes.join("\n")}
|
|
123643
123643
|
if (isToplevel && !isPrototypeProperty) {
|
123644
123644
|
const flags = 1536 | 67108864;
|
123645
123645
|
const excludeFlags = 110735 & ~67108864;
|
123646
|
-
namespaceSymbol = forEachIdentifierInEntityName(entityName, namespaceSymbol, (
|
123646
|
+
namespaceSymbol = forEachIdentifierInEntityName(entityName, namespaceSymbol, (id, symbol, parent3) => {
|
123647
123647
|
if (symbol) {
|
123648
|
-
addDeclarationToSymbol(symbol,
|
123648
|
+
addDeclarationToSymbol(symbol, id, flags);
|
123649
123649
|
return symbol;
|
123650
123650
|
} else {
|
123651
123651
|
const table = parent3 ? parent3.exports : file.jsGlobalAugmentations || (file.jsGlobalAugmentations = createSymbolTable());
|
123652
|
-
return declareSymbol(table, parent3,
|
123652
|
+
return declareSymbol(table, parent3, id, flags, excludeFlags);
|
123653
123653
|
}
|
123654
123654
|
});
|
123655
123655
|
}
|
@@ -123670,15 +123670,15 @@ ${lanes.join("\n")}
|
|
123670
123670
|
excludes = 103359;
|
123671
123671
|
} else if (isCallExpression(declaration) && isBindableObjectDefinePropertyCall(declaration)) {
|
123672
123672
|
if (some4(declaration.arguments[2].properties, (p) => {
|
123673
|
-
const
|
123674
|
-
return !!
|
123673
|
+
const id = getNameOfDeclaration(p);
|
123674
|
+
return !!id && isIdentifier(id) && idText(id) === "set";
|
123675
123675
|
})) {
|
123676
123676
|
includes |= 65536 | 4;
|
123677
123677
|
excludes |= 78783;
|
123678
123678
|
}
|
123679
123679
|
if (some4(declaration.arguments[2].properties, (p) => {
|
123680
|
-
const
|
123681
|
-
return !!
|
123680
|
+
const id = getNameOfDeclaration(p);
|
123681
|
+
return !!id && isIdentifier(id) && idText(id) === "get";
|
123682
123682
|
})) {
|
123683
123683
|
includes |= 32768 | 4;
|
123684
123684
|
excludes |= 46015;
|
@@ -126554,9 +126554,9 @@ ${lanes.join("\n")}
|
|
126554
126554
|
return combined;
|
126555
126555
|
}
|
126556
126556
|
function mergeSymbolTable(target, source3, unidirectional = false) {
|
126557
|
-
source3.forEach((sourceSymbol,
|
126558
|
-
const targetSymbol = target.get(
|
126559
|
-
target.set(
|
126557
|
+
source3.forEach((sourceSymbol, id) => {
|
126558
|
+
const targetSymbol = target.get(id);
|
126559
|
+
target.set(id, targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol));
|
126560
126560
|
});
|
126561
126561
|
}
|
126562
126562
|
function mergeModuleAugmentation(moduleName) {
|
@@ -126623,8 +126623,8 @@ ${lanes.join("\n")}
|
|
126623
126623
|
function getSymbolLinks(symbol) {
|
126624
126624
|
if (symbol.flags & 33554432)
|
126625
126625
|
return symbol.links;
|
126626
|
-
const
|
126627
|
-
return symbolLinks[
|
126626
|
+
const id = getSymbolId(symbol);
|
126627
|
+
return symbolLinks[id] ?? (symbolLinks[id] = new SymbolLinks());
|
126628
126628
|
}
|
126629
126629
|
function getNodeLinks(node) {
|
126630
126630
|
const nodeId = getNodeId(node);
|
@@ -128444,19 +128444,19 @@ ${lanes.join("\n")}
|
|
128444
128444
|
function extendExportSymbols(target, source3, lookupTable, exportNode) {
|
128445
128445
|
if (!source3)
|
128446
128446
|
return;
|
128447
|
-
source3.forEach((sourceSymbol,
|
128448
|
-
if (
|
128447
|
+
source3.forEach((sourceSymbol, id) => {
|
128448
|
+
if (id === "default")
|
128449
128449
|
return;
|
128450
|
-
const targetSymbol = target.get(
|
128450
|
+
const targetSymbol = target.get(id);
|
128451
128451
|
if (!targetSymbol) {
|
128452
|
-
target.set(
|
128452
|
+
target.set(id, sourceSymbol);
|
128453
128453
|
if (lookupTable && exportNode) {
|
128454
|
-
lookupTable.set(
|
128454
|
+
lookupTable.set(id, {
|
128455
128455
|
specifierText: getTextOfNode(exportNode.moduleSpecifier)
|
128456
128456
|
});
|
128457
128457
|
}
|
128458
128458
|
} else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {
|
128459
|
-
const collisionTracker = lookupTable.get(
|
128459
|
+
const collisionTracker = lookupTable.get(id);
|
128460
128460
|
if (!collisionTracker.exportsWithDuplicate) {
|
128461
128461
|
collisionTracker.exportsWithDuplicate = [exportNode];
|
128462
128462
|
} else {
|
@@ -128502,16 +128502,16 @@ ${lanes.join("\n")}
|
|
128502
128502
|
);
|
128503
128503
|
}
|
128504
128504
|
}
|
128505
|
-
lookupTable.forEach(({ exportsWithDuplicate },
|
128506
|
-
if (
|
128505
|
+
lookupTable.forEach(({ exportsWithDuplicate }, id) => {
|
128506
|
+
if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {
|
128507
128507
|
return;
|
128508
128508
|
}
|
128509
128509
|
for (const node of exportsWithDuplicate) {
|
128510
128510
|
diagnostics.add(createDiagnosticForNode(
|
128511
128511
|
node,
|
128512
128512
|
Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,
|
128513
|
-
lookupTable.get(
|
128514
|
-
unescapeLeadingUnderscores(
|
128513
|
+
lookupTable.get(id).specifierText,
|
128514
|
+
unescapeLeadingUnderscores(id)
|
128515
128515
|
));
|
128516
128516
|
}
|
128517
128517
|
});
|
@@ -128548,10 +128548,10 @@ ${lanes.join("\n")}
|
|
128548
128548
|
}
|
128549
128549
|
function getAlternativeContainingModules(symbol, enclosingDeclaration) {
|
128550
128550
|
const containingFile = getSourceFileOfNode(enclosingDeclaration);
|
128551
|
-
const
|
128551
|
+
const id = getNodeId(containingFile);
|
128552
128552
|
const links = getSymbolLinks(symbol);
|
128553
128553
|
let results;
|
128554
|
-
if (links.extendedContainersByFile && (results = links.extendedContainersByFile.get(
|
128554
|
+
if (links.extendedContainersByFile && (results = links.extendedContainersByFile.get(id))) {
|
128555
128555
|
return results;
|
128556
128556
|
}
|
128557
128557
|
if (containingFile && containingFile.imports) {
|
@@ -128571,7 +128571,7 @@ ${lanes.join("\n")}
|
|
128571
128571
|
results = append(results, resolvedModule);
|
128572
128572
|
}
|
128573
128573
|
if (length4(results)) {
|
128574
|
-
(links.extendedContainersByFile || (links.extendedContainersByFile = /* @__PURE__ */ new Map())).set(
|
128574
|
+
(links.extendedContainersByFile || (links.extendedContainersByFile = /* @__PURE__ */ new Map())).set(id, results);
|
128575
128575
|
return results;
|
128576
128576
|
}
|
128577
128577
|
}
|
@@ -128747,8 +128747,8 @@ ${lanes.join("\n")}
|
|
128747
128747
|
}
|
128748
128748
|
function getNamedMembers(members) {
|
128749
128749
|
let result;
|
128750
|
-
members.forEach((symbol,
|
128751
|
-
if (isNamedMember(symbol,
|
128750
|
+
members.forEach((symbol, id) => {
|
128751
|
+
if (isNamedMember(symbol, id)) {
|
128752
128752
|
(result || (result = [])).push(symbol);
|
128753
128753
|
}
|
128754
128754
|
});
|
@@ -128864,10 +128864,10 @@ ${lanes.join("\n")}
|
|
128864
128864
|
if (cache.has(key)) {
|
128865
128865
|
return cache.get(key);
|
128866
128866
|
}
|
128867
|
-
const
|
128868
|
-
let visitedSymbolTables = visitedSymbolTablesMap.get(
|
128867
|
+
const id = getSymbolId(symbol);
|
128868
|
+
let visitedSymbolTables = visitedSymbolTablesMap.get(id);
|
128869
128869
|
if (!visitedSymbolTables) {
|
128870
|
-
visitedSymbolTablesMap.set(
|
128870
|
+
visitedSymbolTablesMap.set(id, visitedSymbolTables = []);
|
128871
128871
|
}
|
128872
128872
|
const result = forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);
|
128873
128873
|
cache.set(key, result);
|
@@ -129877,11 +129877,11 @@ ${lanes.join("\n")}
|
|
129877
129877
|
var _a22, _b22, _c2;
|
129878
129878
|
const typeId = type2.id;
|
129879
129879
|
const isConstructorObject = getObjectFlags(type2) & 16 && type2.symbol && type2.symbol.flags & 32;
|
129880
|
-
const
|
129880
|
+
const id = getObjectFlags(type2) & 4 && type2.node ? "N" + getNodeId(type2.node) : type2.flags & 16777216 ? "N" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type2.symbol) : void 0;
|
129881
129881
|
if (!context2.visitedTypes) {
|
129882
129882
|
context2.visitedTypes = /* @__PURE__ */ new Set();
|
129883
129883
|
}
|
129884
|
-
if (
|
129884
|
+
if (id && !context2.symbolDepth) {
|
129885
129885
|
context2.symbolDepth = /* @__PURE__ */ new Map();
|
129886
129886
|
}
|
129887
129887
|
const links = context2.enclosingDeclaration && getNodeLinks(context2.enclosingDeclaration);
|
@@ -129905,12 +129905,12 @@ ${lanes.join("\n")}
|
|
129905
129905
|
return deepCloneOrReuseNode(cachedResult.node);
|
129906
129906
|
}
|
129907
129907
|
let depth;
|
129908
|
-
if (
|
129909
|
-
depth = context2.symbolDepth.get(
|
129908
|
+
if (id) {
|
129909
|
+
depth = context2.symbolDepth.get(id) || 0;
|
129910
129910
|
if (depth > 10) {
|
129911
129911
|
return createElidedInformationPlaceholder(context2);
|
129912
129912
|
}
|
129913
|
-
context2.symbolDepth.set(
|
129913
|
+
context2.symbolDepth.set(id, depth + 1);
|
129914
129914
|
}
|
129915
129915
|
context2.visitedTypes.add(typeId);
|
129916
129916
|
const prevTrackedSymbols = context2.trackedSymbols;
|
@@ -129927,8 +129927,8 @@ ${lanes.join("\n")}
|
|
129927
129927
|
});
|
129928
129928
|
}
|
129929
129929
|
context2.visitedTypes.delete(typeId);
|
129930
|
-
if (
|
129931
|
-
context2.symbolDepth.set(
|
129930
|
+
if (id) {
|
129931
|
+
context2.symbolDepth.set(id, depth);
|
129932
129932
|
}
|
129933
129933
|
context2.trackedSymbols = prevTrackedSymbols;
|
129934
129934
|
return result;
|
@@ -130089,8 +130089,8 @@ ${lanes.join("\n")}
|
|
130089
130089
|
}
|
130090
130090
|
typeArguments = ref.typeArguments;
|
130091
130091
|
const ids = getAccessStack(ref);
|
130092
|
-
for (const
|
130093
|
-
qualifier = qualifier ? factory.createQualifiedName(qualifier,
|
130092
|
+
for (const id of ids) {
|
130093
|
+
qualifier = qualifier ? factory.createQualifiedName(qualifier, id) : id;
|
130094
130094
|
}
|
130095
130095
|
return factory.updateImportTypeNode(
|
130096
130096
|
root,
|
@@ -130114,8 +130114,8 @@ ${lanes.join("\n")}
|
|
130114
130114
|
}
|
130115
130115
|
typeArguments = ref.typeArguments;
|
130116
130116
|
const ids = getAccessStack(ref);
|
130117
|
-
for (const
|
130118
|
-
typeName = factory.createQualifiedName(typeName,
|
130117
|
+
for (const id of ids) {
|
130118
|
+
typeName = factory.createQualifiedName(typeName, id);
|
130119
130119
|
}
|
130120
130120
|
return factory.updateTypeReferenceNode(
|
130121
130121
|
root,
|
@@ -132050,10 +132050,10 @@ ${lanes.join("\n")}
|
|
132050
132050
|
factory.createExportDeclaration(
|
132051
132051
|
void 0,
|
132052
132052
|
false,
|
132053
|
-
factory.createNamedExports(map3(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (
|
132053
|
+
factory.createNamedExports(map3(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier(
|
132054
132054
|
false,
|
132055
132055
|
void 0,
|
132056
|
-
|
132056
|
+
id
|
132057
132057
|
))),
|
132058
132058
|
void 0
|
132059
132059
|
)
|
@@ -133081,8 +133081,8 @@ ${lanes.join("\n")}
|
|
133081
133081
|
}
|
133082
133082
|
if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) {
|
133083
133083
|
return forEach(d.arguments[2].properties, (propDecl) => {
|
133084
|
-
const
|
133085
|
-
if (!!
|
133084
|
+
const id = getNameOfDeclaration(propDecl);
|
133085
|
+
if (!!id && isIdentifier(id) && idText(id) === "set") {
|
133086
133086
|
return propDecl;
|
133087
133087
|
}
|
133088
133088
|
});
|
@@ -133317,10 +133317,10 @@ ${lanes.join("\n")}
|
|
133317
133317
|
}
|
133318
133318
|
function getUnusedName(input, symbol) {
|
133319
133319
|
var _a22, _b2;
|
133320
|
-
const
|
133321
|
-
if (
|
133322
|
-
if (context2.remappedSymbolNames.has(
|
133323
|
-
return context2.remappedSymbolNames.get(
|
133320
|
+
const id = symbol ? getSymbolId(symbol) : void 0;
|
133321
|
+
if (id) {
|
133322
|
+
if (context2.remappedSymbolNames.has(id)) {
|
133323
|
+
return context2.remappedSymbolNames.get(id);
|
133324
133324
|
}
|
133325
133325
|
}
|
133326
133326
|
if (symbol) {
|
@@ -133333,8 +133333,8 @@ ${lanes.join("\n")}
|
|
133333
133333
|
input = `${original}_${i}`;
|
133334
133334
|
}
|
133335
133335
|
(_b2 = context2.usedSymbolNames) == null ? void 0 : _b2.add(input);
|
133336
|
-
if (
|
133337
|
-
context2.remappedSymbolNames.set(
|
133336
|
+
if (id) {
|
133337
|
+
context2.remappedSymbolNames.set(id, input);
|
133338
133338
|
}
|
133339
133339
|
return input;
|
133340
133340
|
}
|
@@ -133355,12 +133355,12 @@ ${lanes.join("\n")}
|
|
133355
133355
|
return localName;
|
133356
133356
|
}
|
133357
133357
|
function getInternalSymbolName(symbol, localName) {
|
133358
|
-
const
|
133359
|
-
if (context2.remappedSymbolNames.has(
|
133360
|
-
return context2.remappedSymbolNames.get(
|
133358
|
+
const id = getSymbolId(symbol);
|
133359
|
+
if (context2.remappedSymbolNames.has(id)) {
|
133360
|
+
return context2.remappedSymbolNames.get(id);
|
133361
133361
|
}
|
133362
133362
|
localName = getNameCandidateWorker(symbol, localName);
|
133363
|
-
context2.remappedSymbolNames.set(
|
133363
|
+
context2.remappedSymbolNames.set(id, localName);
|
133364
133364
|
return localName;
|
133365
133365
|
}
|
133366
133366
|
}
|
@@ -136893,9 +136893,9 @@ ${lanes.join("\n")}
|
|
136893
136893
|
propSet = /* @__PURE__ */ new Map();
|
136894
136894
|
propSet.set(getSymbolId(singleProp), singleProp);
|
136895
136895
|
}
|
136896
|
-
const
|
136897
|
-
if (!propSet.has(
|
136898
|
-
propSet.set(
|
136896
|
+
const id = getSymbolId(prop);
|
136897
|
+
if (!propSet.has(id)) {
|
136898
|
+
propSet.set(id, prop);
|
136899
136899
|
}
|
136900
136900
|
}
|
136901
136901
|
}
|
@@ -137240,8 +137240,8 @@ ${lanes.join("\n")}
|
|
137240
137240
|
}
|
137241
137241
|
function symbolsToArray(symbols) {
|
137242
137242
|
const result = [];
|
137243
|
-
symbols.forEach((symbol,
|
137244
|
-
if (!isReservedMemberName(
|
137243
|
+
symbols.forEach((symbol, id) => {
|
137244
|
+
if (!isReservedMemberName(id)) {
|
137245
137245
|
result.push(symbol);
|
137246
137246
|
}
|
137247
137247
|
});
|
@@ -137649,10 +137649,10 @@ ${lanes.join("\n")}
|
|
137649
137649
|
}
|
137650
137650
|
function getSignatureInstantiationWithoutFillingInTypeArguments(signature, typeArguments) {
|
137651
137651
|
const instantiations = signature.instantiations || (signature.instantiations = /* @__PURE__ */ new Map());
|
137652
|
-
const
|
137653
|
-
let instantiation = instantiations.get(
|
137652
|
+
const id = getTypeListId(typeArguments);
|
137653
|
+
let instantiation = instantiations.get(id);
|
137654
137654
|
if (!instantiation) {
|
137655
|
-
instantiations.set(
|
137655
|
+
instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));
|
137656
137656
|
}
|
137657
137657
|
return instantiation;
|
137658
137658
|
}
|
@@ -137886,11 +137886,11 @@ ${lanes.join("\n")}
|
|
137886
137886
|
return createTypeReference(target, typeArguments);
|
137887
137887
|
}
|
137888
137888
|
function createTypeReference(target, typeArguments) {
|
137889
|
-
const
|
137890
|
-
let type = target.instantiations.get(
|
137889
|
+
const id = getTypeListId(typeArguments);
|
137890
|
+
let type = target.instantiations.get(id);
|
137891
137891
|
if (!type) {
|
137892
137892
|
type = createObjectType(4, target.symbol);
|
137893
|
-
target.instantiations.set(
|
137893
|
+
target.instantiations.set(id, type);
|
137894
137894
|
type.objectFlags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments) : 0;
|
137895
137895
|
type.target = target;
|
137896
137896
|
type.resolvedTypeArguments = typeArguments;
|
@@ -137985,28 +137985,28 @@ ${lanes.join("\n")}
|
|
137985
137985
|
}
|
137986
137986
|
const links = getSymbolLinks(symbol);
|
137987
137987
|
const typeParameters = links.typeParameters;
|
137988
|
-
const
|
137989
|
-
let instantiation = links.instantiations.get(
|
137988
|
+
const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
|
137989
|
+
let instantiation = links.instantiations.get(id);
|
137990
137990
|
if (!instantiation) {
|
137991
|
-
links.instantiations.set(
|
137991
|
+
links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments));
|
137992
137992
|
}
|
137993
137993
|
return instantiation;
|
137994
137994
|
}
|
137995
137995
|
function getTypeFromTypeAliasReference(node, symbol) {
|
137996
137996
|
if (getCheckFlags(symbol) & 1048576) {
|
137997
137997
|
const typeArguments = typeArgumentsFromTypeReferenceNode(node);
|
137998
|
-
const
|
137999
|
-
let errorType2 = errorTypes.get(
|
137998
|
+
const id = getAliasId(symbol, typeArguments);
|
137999
|
+
let errorType2 = errorTypes.get(id);
|
138000
138000
|
if (!errorType2) {
|
138001
138001
|
errorType2 = createIntrinsicType(
|
138002
138002
|
1,
|
138003
138003
|
"error",
|
138004
138004
|
void 0,
|
138005
|
-
`alias ${
|
138005
|
+
`alias ${id}`
|
138006
138006
|
);
|
138007
138007
|
errorType2.aliasSymbol = symbol;
|
138008
138008
|
errorType2.aliasTypeArguments = typeArguments;
|
138009
|
-
errorTypes.set(
|
138009
|
+
errorTypes.set(id, errorType2);
|
138010
138010
|
}
|
138011
138011
|
return errorType2;
|
138012
138012
|
}
|
@@ -138146,15 +138146,15 @@ ${lanes.join("\n")}
|
|
138146
138146
|
return constraint.flags & 3 || constraint === baseType || baseType.flags & 1 ? baseType : getOrCreateSubstitutionType(baseType, constraint);
|
138147
138147
|
}
|
138148
138148
|
function getOrCreateSubstitutionType(baseType, constraint) {
|
138149
|
-
const
|
138150
|
-
const cached = substitutionTypes.get(
|
138149
|
+
const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;
|
138150
|
+
const cached = substitutionTypes.get(id);
|
138151
138151
|
if (cached) {
|
138152
138152
|
return cached;
|
138153
138153
|
}
|
138154
138154
|
const result = createType(33554432);
|
138155
138155
|
result.baseType = baseType;
|
138156
138156
|
result.constraint = constraint;
|
138157
|
-
substitutionTypes.set(
|
138157
|
+
substitutionTypes.set(id, result);
|
138158
138158
|
return result;
|
138159
138159
|
}
|
138160
138160
|
function getSubstitutionIntersection(substitutionType) {
|
@@ -138997,8 +138997,8 @@ ${lanes.join("\n")}
|
|
138997
138997
|
if (types.length < 2) {
|
138998
138998
|
return types;
|
138999
138999
|
}
|
139000
|
-
const
|
139001
|
-
const match3 = subtypeReductionCache.get(
|
139000
|
+
const id = getTypeListId(types);
|
139001
|
+
const match3 = subtypeReductionCache.get(id);
|
139002
139002
|
if (match3) {
|
139003
139003
|
return match3;
|
139004
139004
|
}
|
@@ -139043,7 +139043,7 @@ ${lanes.join("\n")}
|
|
139043
139043
|
}
|
139044
139044
|
}
|
139045
139045
|
}
|
139046
|
-
subtypeReductionCache.set(
|
139046
|
+
subtypeReductionCache.set(id, types);
|
139047
139047
|
return types;
|
139048
139048
|
}
|
139049
139049
|
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
|
@@ -139139,8 +139139,8 @@ ${lanes.join("\n")}
|
|
139139
139139
|
if (types.length === 2 && !origin && (types[0].flags & 1048576 || types[1].flags & 1048576)) {
|
139140
139140
|
const infix = unionReduction === 0 ? "N" : unionReduction === 2 ? "S" : "L";
|
139141
139141
|
const index3 = types[0].id < types[1].id ? 0 : 1;
|
139142
|
-
const
|
139143
|
-
let type = unionOfUnionTypes.get(
|
139142
|
+
const id = types[index3].id + infix + types[1 - index3].id + getAliasId(aliasSymbol, aliasTypeArguments);
|
139143
|
+
let type = unionOfUnionTypes.get(id);
|
139144
139144
|
if (!type) {
|
139145
139145
|
type = getUnionTypeWorker(
|
139146
139146
|
types,
|
@@ -139149,7 +139149,7 @@ ${lanes.join("\n")}
|
|
139149
139149
|
aliasTypeArguments,
|
139150
139150
|
void 0
|
139151
139151
|
);
|
139152
|
-
unionOfUnionTypes.set(
|
139152
|
+
unionOfUnionTypes.set(id, type);
|
139153
139153
|
}
|
139154
139154
|
return type;
|
139155
139155
|
}
|
@@ -139244,8 +139244,8 @@ ${lanes.join("\n")}
|
|
139244
139244
|
return types[0];
|
139245
139245
|
}
|
139246
139246
|
const typeKey = !origin ? getTypeListId(types) : origin.flags & 1048576 ? `|${getTypeListId(origin.types)}` : origin.flags & 2097152 ? `&${getTypeListId(origin.types)}` : `#${origin.type.id}|${getTypeListId(types)}`;
|
139247
|
-
const
|
139248
|
-
let type = unionTypes.get(
|
139247
|
+
const id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
139248
|
+
let type = unionTypes.get(id);
|
139249
139249
|
if (!type) {
|
139250
139250
|
type = createType(1048576);
|
139251
139251
|
type.objectFlags = precomputedObjectFlags | getPropagatingFlagsOfTypes(
|
@@ -139260,7 +139260,7 @@ ${lanes.join("\n")}
|
|
139260
139260
|
type.flags |= 16;
|
139261
139261
|
type.intrinsicName = "boolean";
|
139262
139262
|
}
|
139263
|
-
unionTypes.set(
|
139263
|
+
unionTypes.set(id, type);
|
139264
139264
|
}
|
139265
139265
|
return type;
|
139266
139266
|
}
|
@@ -139452,8 +139452,8 @@ ${lanes.join("\n")}
|
|
139452
139452
|
}
|
139453
139453
|
}
|
139454
139454
|
}
|
139455
|
-
const
|
139456
|
-
let result = intersectionTypes.get(
|
139455
|
+
const id = getTypeListId(typeSet) + (flags & 2 ? "*" : getAliasId(aliasSymbol, aliasTypeArguments));
|
139456
|
+
let result = intersectionTypes.get(id);
|
139457
139457
|
if (!result) {
|
139458
139458
|
if (includes & 1048576) {
|
139459
139459
|
if (intersectUnionsOfPrimitiveTypes(typeSet)) {
|
@@ -139479,7 +139479,7 @@ ${lanes.join("\n")}
|
|
139479
139479
|
} else {
|
139480
139480
|
result = createIntersectionType(typeSet, objectFlags, aliasSymbol, aliasTypeArguments);
|
139481
139481
|
}
|
139482
|
-
intersectionTypes.set(
|
139482
|
+
intersectionTypes.set(id, result);
|
139483
139483
|
}
|
139484
139484
|
return result;
|
139485
139485
|
}
|
@@ -139701,10 +139701,10 @@ ${lanes.join("\n")}
|
|
139701
139701
|
return newTypes[0];
|
139702
139702
|
}
|
139703
139703
|
}
|
139704
|
-
const
|
139705
|
-
let type = templateLiteralTypes.get(
|
139704
|
+
const id = `${getTypeListId(newTypes)}|${map3(newTexts, (t) => t.length).join(",")}|${newTexts.join("")}`;
|
139705
|
+
let type = templateLiteralTypes.get(id);
|
139706
139706
|
if (!type) {
|
139707
|
-
templateLiteralTypes.set(
|
139707
|
+
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
139708
139708
|
}
|
139709
139709
|
return type;
|
139710
139710
|
function addSpans(texts2, types2) {
|
@@ -139768,10 +139768,10 @@ ${lanes.join("\n")}
|
|
139768
139768
|
return [texts, types];
|
139769
139769
|
}
|
139770
139770
|
function getStringMappingTypeForGenericType(symbol, type) {
|
139771
|
-
const
|
139772
|
-
let result = stringMappingTypes.get(
|
139771
|
+
const id = `${getSymbolId(symbol)},${getTypeId(type)}`;
|
139772
|
+
let result = stringMappingTypes.get(id);
|
139773
139773
|
if (!result) {
|
139774
|
-
stringMappingTypes.set(
|
139774
|
+
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
139775
139775
|
}
|
139776
139776
|
return result;
|
139777
139777
|
}
|
@@ -140175,10 +140175,10 @@ ${lanes.join("\n")}
|
|
140175
140175
|
return objectType;
|
140176
140176
|
}
|
140177
140177
|
const persistentAccessFlags = accessFlags & 1;
|
140178
|
-
const
|
140179
|
-
let type = indexedAccessTypes.get(
|
140178
|
+
const id = objectType.id + "," + indexType.id + "," + persistentAccessFlags + getAliasId(aliasSymbol, aliasTypeArguments);
|
140179
|
+
let type = indexedAccessTypes.get(id);
|
140180
140180
|
if (!type) {
|
140181
|
-
indexedAccessTypes.set(
|
140181
|
+
indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, persistentAccessFlags, aliasSymbol, aliasTypeArguments));
|
140182
140182
|
}
|
140183
140183
|
return type;
|
140184
140184
|
}
|
@@ -141061,21 +141061,21 @@ ${lanes.join("\n")}
|
|
141061
141061
|
const typeArguments = map3(typeParameters, (t) => getMappedType(t, combinedMapper));
|
141062
141062
|
const newAliasSymbol = aliasSymbol || type.aliasSymbol;
|
141063
141063
|
const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
|
141064
|
-
const
|
141064
|
+
const id = (type.objectFlags & 134217728 ? "S" : "") + getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments);
|
141065
141065
|
if (!target.instantiations) {
|
141066
141066
|
target.instantiations = /* @__PURE__ */ new Map();
|
141067
141067
|
target.instantiations.set(getTypeListId(typeParameters) + getAliasId(target.aliasSymbol, target.aliasTypeArguments), target);
|
141068
141068
|
}
|
141069
|
-
let result = target.instantiations.get(
|
141069
|
+
let result = target.instantiations.get(id);
|
141070
141070
|
if (!result) {
|
141071
141071
|
if (type.objectFlags & 134217728) {
|
141072
141072
|
result = instantiateAnonymousType(type, mapper);
|
141073
|
-
target.instantiations.set(
|
141073
|
+
target.instantiations.set(id, result);
|
141074
141074
|
return result;
|
141075
141075
|
}
|
141076
141076
|
const newMapper = createTypeMapper(typeParameters, typeArguments);
|
141077
141077
|
result = target.objectFlags & 4 ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
|
141078
|
-
target.instantiations.set(
|
141078
|
+
target.instantiations.set(id, result);
|
141079
141079
|
const resultObjectFlags = getObjectFlags(result);
|
141080
141080
|
if (result.flags & 3899393 && !(resultObjectFlags & 524288)) {
|
141081
141081
|
const resultCouldContainTypeVariables = some4(typeArguments, couldContainTypeVariables);
|
@@ -141231,14 +141231,14 @@ ${lanes.join("\n")}
|
|
141231
141231
|
const root = type.root;
|
141232
141232
|
if (root.outerTypeParameters) {
|
141233
141233
|
const typeArguments = map3(root.outerTypeParameters, (t) => getMappedType(t, mapper));
|
141234
|
-
const
|
141235
|
-
let result = root.instantiations.get(
|
141234
|
+
const id = (forConstraint ? "C" : "") + getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
|
141235
|
+
let result = root.instantiations.get(id);
|
141236
141236
|
if (!result) {
|
141237
141237
|
const newMapper = createTypeMapper(root.outerTypeParameters, typeArguments);
|
141238
141238
|
const checkType = root.checkType;
|
141239
141239
|
const distributionType = root.isDistributive ? getReducedType(getMappedType(checkType, newMapper)) : void 0;
|
141240
141240
|
result = distributionType && checkType !== distributionType && distributionType.flags & (1048576 | 131072) ? mapTypeWithAlias(distributionType, (t) => getConditionalType(root, prependTypeMapping(checkType, t, newMapper), forConstraint), aliasSymbol, aliasTypeArguments) : getConditionalType(root, newMapper, forConstraint, aliasSymbol, aliasTypeArguments);
|
141241
|
-
root.instantiations.set(
|
141241
|
+
root.instantiations.set(id, result);
|
141242
141242
|
}
|
141243
141243
|
return result;
|
141244
141244
|
}
|
@@ -142211,8 +142211,8 @@ ${lanes.join("\n")}
|
|
142211
142211
|
if (sourceSymbol.escapedName !== targetSymbol.escapedName || !(sourceSymbol.flags & 256) || !(targetSymbol.flags & 256)) {
|
142212
142212
|
return false;
|
142213
142213
|
}
|
142214
|
-
const
|
142215
|
-
const entry = enumRelation.get(
|
142214
|
+
const id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
|
142215
|
+
const entry = enumRelation.get(id);
|
142216
142216
|
if (entry !== void 0 && !(!(entry & 4) && entry & 2 && errorReporter)) {
|
142217
142217
|
return !!(entry & 1);
|
142218
142218
|
}
|
@@ -142227,9 +142227,9 @@ ${lanes.join("\n")}
|
|
142227
142227
|
void 0,
|
142228
142228
|
64
|
142229
142229
|
));
|
142230
|
-
enumRelation.set(
|
142230
|
+
enumRelation.set(id, 2 | 4);
|
142231
142231
|
} else {
|
142232
|
-
enumRelation.set(
|
142232
|
+
enumRelation.set(id, 2);
|
142233
142233
|
}
|
142234
142234
|
return false;
|
142235
142235
|
}
|
@@ -142240,31 +142240,31 @@ ${lanes.join("\n")}
|
|
142240
142240
|
const targetIsString = typeof targetValue === "string";
|
142241
142241
|
if (sourceValue !== void 0 && targetValue !== void 0) {
|
142242
142242
|
if (!errorReporter) {
|
142243
|
-
enumRelation.set(
|
142243
|
+
enumRelation.set(id, 2);
|
142244
142244
|
} else {
|
142245
142245
|
const escapedSource = sourceIsString ? `"${escapeString(sourceValue)}"` : sourceValue;
|
142246
142246
|
const escapedTarget = targetIsString ? `"${escapeString(targetValue)}"` : targetValue;
|
142247
142247
|
errorReporter(Diagnostics.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, symbolName(targetSymbol), symbolName(targetProperty), escapedTarget, escapedSource);
|
142248
|
-
enumRelation.set(
|
142248
|
+
enumRelation.set(id, 2 | 4);
|
142249
142249
|
}
|
142250
142250
|
return false;
|
142251
142251
|
}
|
142252
142252
|
if (sourceIsString || targetIsString) {
|
142253
142253
|
if (!errorReporter) {
|
142254
|
-
enumRelation.set(
|
142254
|
+
enumRelation.set(id, 2);
|
142255
142255
|
} else {
|
142256
142256
|
const knownStringValue = sourceValue ?? targetValue;
|
142257
142257
|
Debug.assert(typeof knownStringValue === "string");
|
142258
142258
|
const escapedValue = `"${escapeString(knownStringValue)}"`;
|
142259
142259
|
errorReporter(Diagnostics.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, symbolName(targetSymbol), symbolName(targetProperty), escapedValue);
|
142260
|
-
enumRelation.set(
|
142260
|
+
enumRelation.set(id, 2 | 4);
|
142261
142261
|
}
|
142262
142262
|
return false;
|
142263
142263
|
}
|
142264
142264
|
}
|
142265
142265
|
}
|
142266
142266
|
}
|
142267
|
-
enumRelation.set(
|
142267
|
+
enumRelation.set(id, 1);
|
142268
142268
|
return true;
|
142269
142269
|
}
|
142270
142270
|
function isSimpleTypeRelatedTo(source3, target, relation, errorReporter) {
|
@@ -142428,14 +142428,14 @@ ${lanes.join("\n")}
|
|
142428
142428
|
reportIncompatibleStack();
|
142429
142429
|
}
|
142430
142430
|
if (overflow) {
|
142431
|
-
const
|
142431
|
+
const id = getRelationKey(
|
142432
142432
|
source3,
|
142433
142433
|
target,
|
142434
142434
|
0,
|
142435
142435
|
relation,
|
142436
142436
|
false
|
142437
142437
|
);
|
142438
|
-
relation.set(
|
142438
|
+
relation.set(id, 4 | 2);
|
142439
142439
|
(_a4 = tracing) == null ? void 0 : _a4.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source3.id, targetId: target.id, depth: sourceDepth, targetDepth });
|
142440
142440
|
const message2 = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;
|
142441
142441
|
const diag2 = error22(errorNode || currentNode, message2, typeToString(source3), typeToString(target));
|
@@ -143255,14 +143255,14 @@ ${lanes.join("\n")}
|
|
143255
143255
|
if (overflow) {
|
143256
143256
|
return 0;
|
143257
143257
|
}
|
143258
|
-
const
|
143258
|
+
const id = getRelationKey(
|
143259
143259
|
source22,
|
143260
143260
|
target2,
|
143261
143261
|
intersectionState,
|
143262
143262
|
relation,
|
143263
143263
|
false
|
143264
143264
|
);
|
143265
|
-
const entry = relation.get(
|
143265
|
+
const entry = relation.get(id);
|
143266
143266
|
if (entry !== void 0) {
|
143267
143267
|
if (reportErrors2 && entry & 2 && !(entry & 4)) {
|
143268
143268
|
} else {
|
@@ -143288,10 +143288,10 @@ ${lanes.join("\n")}
|
|
143288
143288
|
sourceStack = [];
|
143289
143289
|
targetStack = [];
|
143290
143290
|
} else {
|
143291
|
-
if (maybeKeysSet.has(
|
143291
|
+
if (maybeKeysSet.has(id)) {
|
143292
143292
|
return 3;
|
143293
143293
|
}
|
143294
|
-
const broadestEquivalentId =
|
143294
|
+
const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
|
143295
143295
|
source22,
|
143296
143296
|
target2,
|
143297
143297
|
intersectionState,
|
@@ -143307,8 +143307,8 @@ ${lanes.join("\n")}
|
|
143307
143307
|
}
|
143308
143308
|
}
|
143309
143309
|
const maybeStart = maybeCount;
|
143310
|
-
maybeKeys[maybeCount] =
|
143311
|
-
maybeKeysSet.add(
|
143310
|
+
maybeKeys[maybeCount] = id;
|
143311
|
+
maybeKeysSet.add(id);
|
143312
143312
|
maybeCount++;
|
143313
143313
|
const saveExpandingFlags = expandingFlags;
|
143314
143314
|
if (recursionFlags & 1) {
|
@@ -143371,7 +143371,7 @@ ${lanes.join("\n")}
|
|
143371
143371
|
}
|
143372
143372
|
}
|
143373
143373
|
} else {
|
143374
|
-
relation.set(
|
143374
|
+
relation.set(id, (reportErrors2 ? 4 : 0) | 2 | propagatingVarianceFlags);
|
143375
143375
|
relationCount--;
|
143376
143376
|
resetMaybeStack(
|
143377
143377
|
false
|
@@ -146963,12 +146963,12 @@ ${lanes.join("\n")}
|
|
146963
146963
|
}
|
146964
146964
|
let duplicate = false;
|
146965
146965
|
forEachType(discriminant, (t) => {
|
146966
|
-
const
|
146967
|
-
const existing = map22.get(
|
146966
|
+
const id = getTypeId(getRegularTypeOfLiteralType(t));
|
146967
|
+
const existing = map22.get(id);
|
146968
146968
|
if (!existing) {
|
146969
|
-
map22.set(
|
146969
|
+
map22.set(id, type);
|
146970
146970
|
} else if (existing !== unknownType) {
|
146971
|
-
map22.set(
|
146971
|
+
map22.set(id, unknownType);
|
146972
146972
|
duplicate = true;
|
146973
146973
|
}
|
146974
146974
|
});
|
@@ -147623,9 +147623,9 @@ ${lanes.join("\n")}
|
|
147623
147623
|
const flags = flow.flags;
|
147624
147624
|
if (flags & 4096) {
|
147625
147625
|
if (!noCacheCheck) {
|
147626
|
-
const
|
147627
|
-
const reachable = flowNodeReachable[
|
147628
|
-
return reachable !== void 0 ? reachable : flowNodeReachable[
|
147626
|
+
const id = getFlowNodeId(flow);
|
147627
|
+
const reachable = flowNodeReachable[id];
|
147628
|
+
return reachable !== void 0 ? reachable : flowNodeReachable[id] = isReachableFlowNodeWorker(
|
147629
147629
|
flow,
|
147630
147630
|
true
|
147631
147631
|
);
|
@@ -147687,9 +147687,9 @@ ${lanes.join("\n")}
|
|
147687
147687
|
const flags = flow.flags;
|
147688
147688
|
if (flags & 4096) {
|
147689
147689
|
if (!noCacheCheck) {
|
147690
|
-
const
|
147691
|
-
const postSuper = flowNodePostSuper[
|
147692
|
-
return postSuper !== void 0 ? postSuper : flowNodePostSuper[
|
147690
|
+
const id = getFlowNodeId(flow);
|
147691
|
+
const postSuper = flowNodePostSuper[id];
|
147692
|
+
return postSuper !== void 0 ? postSuper : flowNodePostSuper[id] = isPostSuperFlowNode(
|
147693
147693
|
flow,
|
147694
147694
|
true
|
147695
147695
|
);
|
@@ -148043,8 +148043,8 @@ ${lanes.join("\n")}
|
|
148043
148043
|
return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 : 1), seenIncomplete);
|
148044
148044
|
}
|
148045
148045
|
function getTypeAtFlowLoopLabel(flow) {
|
148046
|
-
const
|
148047
|
-
const cache = flowLoopCaches[
|
148046
|
+
const id = getFlowNodeId(flow);
|
148047
|
+
const cache = flowLoopCaches[id] || (flowLoopCaches[id] = /* @__PURE__ */ new Map());
|
148048
148048
|
const key2 = getOrSetCacheKey();
|
148049
148049
|
if (!key2) {
|
148050
148050
|
return declaredType;
|
@@ -149055,16 +149055,16 @@ ${lanes.join("\n")}
|
|
149055
149055
|
}
|
149056
149056
|
function markExportAssignmentAliasReferenced(location) {
|
149057
149057
|
if (isIdentifier(location.expression)) {
|
149058
|
-
const
|
149058
|
+
const id = location.expression;
|
149059
149059
|
const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName(
|
149060
|
-
|
149060
|
+
id,
|
149061
149061
|
-1,
|
149062
149062
|
true,
|
149063
149063
|
true,
|
149064
149064
|
location
|
149065
149065
|
));
|
149066
149066
|
if (sym) {
|
149067
|
-
markAliasReferenced(sym,
|
149067
|
+
markAliasReferenced(sym, id);
|
149068
149068
|
}
|
149069
149069
|
}
|
149070
149070
|
}
|
@@ -150205,8 +150205,8 @@ ${lanes.join("\n")}
|
|
150205
150205
|
return getPropertyOfType(lhsType, getPropertyNameFromType(propType));
|
150206
150206
|
}
|
150207
150207
|
return void 0;
|
150208
|
-
function tryGetPrivateIdentifierPropertyOfType(type,
|
150209
|
-
const lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(
|
150208
|
+
function tryGetPrivateIdentifierPropertyOfType(type, id) {
|
150209
|
+
const lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(id.escapedText, id);
|
150210
150210
|
return lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(type, lexicallyScopedSymbol);
|
150211
150211
|
}
|
150212
150212
|
}
|
@@ -150241,10 +150241,10 @@ ${lanes.join("\n")}
|
|
150241
150241
|
if (overallAnnotation) {
|
150242
150242
|
return getTypeFromTypeNode(overallAnnotation);
|
150243
150243
|
} else if (isIdentifier(lhs.expression)) {
|
150244
|
-
const
|
150244
|
+
const id = lhs.expression;
|
150245
150245
|
const parentSymbol = resolveName(
|
150246
|
-
|
150247
|
-
|
150246
|
+
id,
|
150247
|
+
id.escapedText,
|
150248
150248
|
111551,
|
150249
150249
|
void 0,
|
150250
150250
|
true
|
@@ -160530,11 +160530,11 @@ ${lanes.join("\n")}
|
|
160530
160530
|
}
|
160531
160531
|
function createIterationTypes(yieldType = neverType, returnType = neverType, nextType = unknownType) {
|
160532
160532
|
if (yieldType.flags & 67359327 && returnType.flags & (1 | 131072 | 2 | 16384 | 32768) && nextType.flags & (1 | 131072 | 2 | 16384 | 32768)) {
|
160533
|
-
const
|
160534
|
-
let iterationTypes = iterationTypesCache.get(
|
160533
|
+
const id = getTypeListId([yieldType, returnType, nextType]);
|
160534
|
+
let iterationTypes = iterationTypesCache.get(id);
|
160535
160535
|
if (!iterationTypes) {
|
160536
160536
|
iterationTypes = { yieldType, returnType, nextType };
|
160537
|
-
iterationTypesCache.set(
|
160537
|
+
iterationTypesCache.set(id, iterationTypes);
|
160538
160538
|
}
|
160539
160539
|
return iterationTypes;
|
160540
160540
|
}
|
@@ -162746,9 +162746,9 @@ ${lanes.join("\n")}
|
|
162746
162746
|
}
|
162747
162747
|
const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 || getSourceFileOfNode(node).impliedNodeFormat === 1);
|
162748
162748
|
if (node.expression.kind === 80) {
|
162749
|
-
const
|
162749
|
+
const id = node.expression;
|
162750
162750
|
const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName(
|
162751
|
-
|
162751
|
+
id,
|
162752
162752
|
-1,
|
162753
162753
|
true,
|
162754
162754
|
true,
|
@@ -162758,19 +162758,19 @@ ${lanes.join("\n")}
|
|
162758
162758
|
markLinkedReferences(node, 3);
|
162759
162759
|
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(sym, 111551);
|
162760
162760
|
if (getSymbolFlags(sym) & 111551) {
|
162761
|
-
checkExpressionCached(
|
162761
|
+
checkExpressionCached(id);
|
162762
162762
|
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432) && compilerOptions.verbatimModuleSyntax && typeOnlyDeclaration) {
|
162763
162763
|
error22(
|
162764
|
-
|
162764
|
+
id,
|
162765
162765
|
node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,
|
162766
|
-
idText(
|
162766
|
+
idText(id)
|
162767
162767
|
);
|
162768
162768
|
}
|
162769
162769
|
} else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432) && compilerOptions.verbatimModuleSyntax) {
|
162770
162770
|
error22(
|
162771
|
-
|
162771
|
+
id,
|
162772
162772
|
node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,
|
162773
|
-
idText(
|
162773
|
+
idText(id)
|
162774
162774
|
);
|
162775
162775
|
}
|
162776
162776
|
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551)) {
|
@@ -162781,30 +162781,30 @@ ${lanes.join("\n")}
|
|
162781
162781
|
);
|
162782
162782
|
if (sym.flags & 2097152 && nonLocalMeanings & 788968 && !(nonLocalMeanings & 111551) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
162783
162783
|
error22(
|
162784
|
-
|
162784
|
+
id,
|
162785
162785
|
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
162786
|
-
idText(
|
162786
|
+
idText(id),
|
162787
162787
|
isolatedModulesLikeFlagName
|
162788
162788
|
);
|
162789
162789
|
} else if (typeOnlyDeclaration && getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node)) {
|
162790
162790
|
addTypeOnlyDeclarationRelatedInfo(
|
162791
162791
|
error22(
|
162792
|
-
|
162792
|
+
id,
|
162793
162793
|
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
162794
|
-
idText(
|
162794
|
+
idText(id),
|
162795
162795
|
isolatedModulesLikeFlagName
|
162796
162796
|
),
|
162797
162797
|
typeOnlyDeclaration,
|
162798
|
-
idText(
|
162798
|
+
idText(id)
|
162799
162799
|
);
|
162800
162800
|
}
|
162801
162801
|
}
|
162802
162802
|
} else {
|
162803
|
-
checkExpressionCached(
|
162803
|
+
checkExpressionCached(id);
|
162804
162804
|
}
|
162805
162805
|
if (getEmitDeclarations(compilerOptions)) {
|
162806
162806
|
collectLinkedAliases(
|
162807
|
-
|
162807
|
+
id,
|
162808
162808
|
true
|
162809
162809
|
);
|
162810
162810
|
}
|
@@ -162827,7 +162827,7 @@ ${lanes.join("\n")}
|
|
162827
162827
|
}
|
162828
162828
|
}
|
162829
162829
|
function hasExportedMembers(moduleSymbol) {
|
162830
|
-
return forEachEntry(moduleSymbol.exports, (_,
|
162830
|
+
return forEachEntry(moduleSymbol.exports, (_, id) => id !== "export=");
|
162831
162831
|
}
|
162832
162832
|
function checkExternalModuleExports(node) {
|
162833
162833
|
const moduleSymbol = getSymbolOfDeclaration(node);
|
@@ -162842,8 +162842,8 @@ ${lanes.join("\n")}
|
|
162842
162842
|
}
|
162843
162843
|
const exports2 = getExportsOfModule(moduleSymbol);
|
162844
162844
|
if (exports2) {
|
162845
|
-
exports2.forEach(({ declarations, flags },
|
162846
|
-
if (
|
162845
|
+
exports2.forEach(({ declarations, flags }, id) => {
|
162846
|
+
if (id === "__export") {
|
162847
162847
|
return;
|
162848
162848
|
}
|
162849
162849
|
if (flags & (1920 | 384)) {
|
@@ -162857,7 +162857,7 @@ ${lanes.join("\n")}
|
|
162857
162857
|
if (!isDuplicatedCommonJSExport(declarations)) {
|
162858
162858
|
for (const declaration of declarations) {
|
162859
162859
|
if (isNotOverload(declaration)) {
|
162860
|
-
diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Cannot_redeclare_exported_variable_0, unescapeLeadingUnderscores(
|
162860
|
+
diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Cannot_redeclare_exported_variable_0, unescapeLeadingUnderscores(id)));
|
162861
162861
|
}
|
162862
162862
|
}
|
162863
162863
|
}
|
@@ -163401,9 +163401,9 @@ ${lanes.join("\n")}
|
|
163401
163401
|
}
|
163402
163402
|
function copySymbol(symbol, meaning2) {
|
163403
163403
|
if (getCombinedLocalAndExportSymbolFlags(symbol) & meaning2) {
|
163404
|
-
const
|
163405
|
-
if (!symbols.has(
|
163406
|
-
symbols.set(
|
163404
|
+
const id = symbol.escapedName;
|
163405
|
+
if (!symbols.has(id)) {
|
163406
|
+
symbols.set(id, symbol);
|
163407
163407
|
}
|
163408
163408
|
}
|
163409
163409
|
}
|
@@ -164873,9 +164873,9 @@ ${lanes.join("\n")}
|
|
164873
164873
|
}
|
164874
164874
|
if (file.symbol && file.symbol.globalExports) {
|
164875
164875
|
const source3 = file.symbol.globalExports;
|
164876
|
-
source3.forEach((sourceSymbol,
|
164877
|
-
if (!globals.has(
|
164878
|
-
globals.set(
|
164876
|
+
source3.forEach((sourceSymbol, id) => {
|
164877
|
+
if (!globals.has(id)) {
|
164878
|
+
globals.set(id, sourceSymbol);
|
164879
164879
|
}
|
164880
164880
|
});
|
164881
164881
|
}
|
@@ -169421,8 +169421,8 @@ ${lanes.join("\n")}
|
|
169421
169421
|
flattenContext.emitBindingOrAssignment(flattenContext.createArrayBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
169422
169422
|
}
|
169423
169423
|
if (restContainingElements) {
|
169424
|
-
for (const [
|
169425
|
-
flattenBindingOrAssignmentElement(flattenContext, element,
|
169424
|
+
for (const [id, element] of restContainingElements) {
|
169425
|
+
flattenBindingOrAssignmentElement(flattenContext, element, id, element);
|
169426
169426
|
}
|
169427
169427
|
}
|
169428
169428
|
}
|
@@ -186910,13 +186910,13 @@ ${lanes.join("\n")}
|
|
186910
186910
|
if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 8388608)) {
|
186911
186911
|
return node;
|
186912
186912
|
}
|
186913
|
-
const
|
186913
|
+
const id = getOriginalNodeId(node);
|
186914
186914
|
currentSourceFile = node;
|
186915
186915
|
enclosingBlockScopedContainer = node;
|
186916
|
-
moduleInfo = moduleInfoMap[
|
186916
|
+
moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context2, node);
|
186917
186917
|
exportFunction = factory2.createUniqueName("exports");
|
186918
|
-
exportFunctionsMap[
|
186919
|
-
contextObject = contextObjectMap[
|
186918
|
+
exportFunctionsMap[id] = exportFunction;
|
186919
|
+
contextObject = contextObjectMap[id] = factory2.createUniqueName("context");
|
186920
186920
|
const dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
|
186921
186921
|
const moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
|
186922
186922
|
const moduleBodyFunction = factory2.createFunctionExpression(
|
@@ -186963,7 +186963,7 @@ ${lanes.join("\n")}
|
|
186963
186963
|
moveEmitHelpers(updated, moduleBodyBlock, (helper) => !helper.scoped);
|
186964
186964
|
}
|
186965
186965
|
if (noSubstitution) {
|
186966
|
-
noSubstitutionMap[
|
186966
|
+
noSubstitutionMap[id] = noSubstitution;
|
186967
186967
|
noSubstitution = void 0;
|
186968
186968
|
}
|
186969
186969
|
currentSourceFile = void 0;
|
@@ -187933,14 +187933,14 @@ ${lanes.join("\n")}
|
|
187933
187933
|
}
|
187934
187934
|
function onEmitNode(hint, node, emitCallback) {
|
187935
187935
|
if (node.kind === 307) {
|
187936
|
-
const
|
187936
|
+
const id = getOriginalNodeId(node);
|
187937
187937
|
currentSourceFile = node;
|
187938
|
-
moduleInfo = moduleInfoMap[
|
187939
|
-
exportFunction = exportFunctionsMap[
|
187940
|
-
noSubstitution = noSubstitutionMap[
|
187941
|
-
contextObject = contextObjectMap[
|
187938
|
+
moduleInfo = moduleInfoMap[id];
|
187939
|
+
exportFunction = exportFunctionsMap[id];
|
187940
|
+
noSubstitution = noSubstitutionMap[id];
|
187941
|
+
contextObject = contextObjectMap[id];
|
187942
187942
|
if (noSubstitution) {
|
187943
|
-
delete noSubstitutionMap[
|
187943
|
+
delete noSubstitutionMap[id];
|
187944
187944
|
}
|
187945
187945
|
previousOnEmitNode(hint, node, emitCallback);
|
187946
187946
|
currentSourceFile = void 0;
|
@@ -190130,9 +190130,9 @@ ${lanes.join("\n")}
|
|
190130
190130
|
const mods = ensureModifiers(input);
|
190131
190131
|
needsDeclare = false;
|
190132
190132
|
visitNode(inner, visitDeclarationStatements);
|
190133
|
-
const
|
190134
|
-
const body = lateStatementReplacementMap.get(
|
190135
|
-
lateStatementReplacementMap.delete(
|
190133
|
+
const id = getOriginalNodeId(inner);
|
190134
|
+
const body = lateStatementReplacementMap.get(id);
|
190135
|
+
lateStatementReplacementMap.delete(id);
|
190136
190136
|
return cleanup(updateModuleDeclarationAndKeyword(
|
190137
190137
|
input,
|
190138
190138
|
mods,
|
@@ -210028,8 +210028,8 @@ ${lanes.join("\n")}
|
|
210028
210028
|
function nodeSeenTracker() {
|
210029
210029
|
const seen = [];
|
210030
210030
|
return (node) => {
|
210031
|
-
const
|
210032
|
-
return !seen[
|
210031
|
+
const id = getNodeId(node);
|
210032
|
+
return !seen[id] && (seen[id] = true);
|
210033
210033
|
};
|
210034
210034
|
}
|
210035
210035
|
function getSnapshotText(snap) {
|
@@ -211523,14 +211523,14 @@ ${lanes.join("\n")}
|
|
211523
211523
|
const symbolName2 = typeof names === "string" ? names : names[0];
|
211524
211524
|
const capitalizedSymbolName = typeof names === "string" ? void 0 : names[1];
|
211525
211525
|
const moduleName = stripQuotes2(moduleSymbol.name);
|
211526
|
-
const
|
211526
|
+
const id = exportInfoId++;
|
211527
211527
|
const target = skipAlias(symbol, checker);
|
211528
211528
|
const storedSymbol = symbol.flags & 33554432 ? void 0 : symbol;
|
211529
211529
|
const storedModuleSymbol = moduleSymbol.flags & 33554432 ? void 0 : moduleSymbol;
|
211530
211530
|
if (!storedSymbol || !storedModuleSymbol)
|
211531
|
-
symbols.set(
|
211531
|
+
symbols.set(id, [symbol, moduleSymbol]);
|
211532
211532
|
exportInfo.add(key(symbolName2, symbol, isExternalModuleNameRelative(moduleName) ? void 0 : moduleName, checker), {
|
211533
|
-
id
|
211533
|
+
id,
|
211534
211534
|
symbolTableKey,
|
211535
211535
|
symbolName: symbolName2,
|
211536
211536
|
capitalizedSymbolName,
|
@@ -211590,8 +211590,8 @@ ${lanes.join("\n")}
|
|
211590
211590
|
function rehydrateCachedInfo(info2) {
|
211591
211591
|
if (info2.symbol && info2.moduleSymbol)
|
211592
211592
|
return info2;
|
211593
|
-
const { id
|
211594
|
-
const [cachedSymbol, cachedModuleSymbol] = symbols.get(
|
211593
|
+
const { id, exportKind, targetFlags, isFromPackageJson, moduleFileName } = info2;
|
211594
|
+
const [cachedSymbol, cachedModuleSymbol] = symbols.get(id) || emptyArray;
|
211595
211595
|
if (cachedSymbol && cachedModuleSymbol) {
|
211596
211596
|
return {
|
211597
211597
|
symbol: cachedSymbol,
|
@@ -211610,7 +211610,7 @@ ${lanes.join("\n")}
|
|
211610
211610
|
exportKind === 2 ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(unescapeLeadingUnderscores(info2.symbolTableKey), moduleSymbol),
|
211611
211611
|
`Could not find symbol '${info2.symbolName}' by key '${info2.symbolTableKey}' in module ${moduleSymbol.name}`
|
211612
211612
|
);
|
211613
|
-
symbols.set(
|
211613
|
+
symbols.set(id, [symbol, moduleSymbol]);
|
211614
211614
|
return {
|
211615
211615
|
symbol,
|
211616
211616
|
moduleSymbol,
|
@@ -215705,7 +215705,7 @@ interface Symbol {
|
|
215705
215705
|
if (!(flags & 32) || !wasDefault && exportingModuleSymbol.exports.has("default")) {
|
215706
215706
|
return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) };
|
215707
215707
|
}
|
215708
|
-
const noSymbolError = (
|
215708
|
+
const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) };
|
215709
215709
|
switch (exportNode.kind) {
|
215710
215710
|
case 262:
|
215711
215711
|
case 263:
|
@@ -215970,21 +215970,21 @@ interface Symbol {
|
|
215970
215970
|
let usedAsNamespaceOrDefault = false;
|
215971
215971
|
const nodesToReplace = [];
|
215972
215972
|
const conflictingNames = /* @__PURE__ */ new Map();
|
215973
|
-
ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(toConvert.name, checker, sourceFile, (
|
215974
|
-
if (!isPropertyAccessOrQualifiedName(
|
215973
|
+
ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(toConvert.name, checker, sourceFile, (id) => {
|
215974
|
+
if (!isPropertyAccessOrQualifiedName(id.parent)) {
|
215975
215975
|
usedAsNamespaceOrDefault = true;
|
215976
215976
|
} else {
|
215977
|
-
const exportName = getRightOfPropertyAccessOrQualifiedName(
|
215977
|
+
const exportName = getRightOfPropertyAccessOrQualifiedName(id.parent).text;
|
215978
215978
|
if (checker.resolveName(
|
215979
215979
|
exportName,
|
215980
|
-
|
215980
|
+
id,
|
215981
215981
|
-1,
|
215982
215982
|
true
|
215983
215983
|
)) {
|
215984
215984
|
conflictingNames.set(exportName, true);
|
215985
215985
|
}
|
215986
|
-
Debug.assert(getLeftOfPropertyAccessOrQualifiedName(
|
215987
|
-
nodesToReplace.push(
|
215986
|
+
Debug.assert(getLeftOfPropertyAccessOrQualifiedName(id.parent) === id, "Parent expression should match id");
|
215987
|
+
nodesToReplace.push(id.parent);
|
215988
215988
|
}
|
215989
215989
|
});
|
215990
215990
|
const exportNameToImportName = /* @__PURE__ */ new Map();
|
@@ -216035,16 +216035,16 @@ interface Symbol {
|
|
216035
216035
|
});
|
216036
216036
|
const preferredName = moduleSpecifier && isStringLiteral(moduleSpecifier) ? moduleSpecifierToValidIdentifier(moduleSpecifier.text, 99) : "module";
|
216037
216037
|
function hasNamespaceNameConflict(namedImport) {
|
216038
|
-
return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(namedImport.name, checker, sourceFile, (
|
216038
|
+
return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(namedImport.name, checker, sourceFile, (id) => {
|
216039
216039
|
const symbol = checker.resolveName(
|
216040
216040
|
preferredName,
|
216041
|
-
|
216041
|
+
id,
|
216042
216042
|
-1,
|
216043
216043
|
true
|
216044
216044
|
);
|
216045
216045
|
if (symbol) {
|
216046
216046
|
if (toConvertSymbols.has(symbol)) {
|
216047
|
-
return isExportSpecifier(
|
216047
|
+
return isExportSpecifier(id.parent);
|
216048
216048
|
}
|
216049
216049
|
return true;
|
216050
216050
|
}
|
@@ -216056,14 +216056,14 @@ interface Symbol {
|
|
216056
216056
|
const neededNamedImports = /* @__PURE__ */ new Set();
|
216057
216057
|
for (const element of toConvert.elements) {
|
216058
216058
|
const propertyName = (element.propertyName || element.name).text;
|
216059
|
-
ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, (
|
216059
|
+
ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, (id) => {
|
216060
216060
|
const access = factory.createPropertyAccessExpression(factory.createIdentifier(namespaceImportName), propertyName);
|
216061
|
-
if (isShorthandPropertyAssignment(
|
216062
|
-
changes.replaceNode(sourceFile,
|
216063
|
-
} else if (isExportSpecifier(
|
216061
|
+
if (isShorthandPropertyAssignment(id.parent)) {
|
216062
|
+
changes.replaceNode(sourceFile, id.parent, factory.createPropertyAssignment(id.text, access));
|
216063
|
+
} else if (isExportSpecifier(id.parent)) {
|
216064
216064
|
neededNamedImports.add(element);
|
216065
216065
|
} else {
|
216066
|
-
changes.replaceNode(sourceFile,
|
216066
|
+
changes.replaceNode(sourceFile, id, access);
|
216067
216067
|
}
|
216068
216068
|
});
|
216069
216069
|
}
|
@@ -216339,11 +216339,11 @@ interface Symbol {
|
|
216339
216339
|
const newTypeDeclaration = factory.createTypeAliasDeclaration(
|
216340
216340
|
void 0,
|
216341
216341
|
name2,
|
216342
|
-
typeParameters.map((
|
216343
|
-
|
216344
|
-
|
216345
|
-
|
216346
|
-
|
216342
|
+
typeParameters.map((id) => factory.updateTypeParameterDeclaration(
|
216343
|
+
id,
|
216344
|
+
id.modifiers,
|
216345
|
+
id.name,
|
216346
|
+
id.constraint,
|
216347
216347
|
void 0
|
216348
216348
|
)),
|
216349
216349
|
newTypeNode
|
@@ -216354,8 +216354,8 @@ interface Symbol {
|
|
216354
216354
|
ignoreSourceNewlines(newTypeDeclaration),
|
216355
216355
|
true
|
216356
216356
|
);
|
216357
|
-
changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name2, typeParameters.map((
|
216358
|
-
|
216357
|
+
changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name2, typeParameters.map((id) => factory.createTypeReferenceNode(
|
216358
|
+
id.name,
|
216359
216359
|
void 0
|
216360
216360
|
))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });
|
216361
216361
|
}
|
@@ -216377,8 +216377,8 @@ interface Symbol {
|
|
216377
216377
|
true
|
216378
216378
|
);
|
216379
216379
|
const { firstTypeNode, lastTypeNode } = getNodesToEdit(info2);
|
216380
|
-
changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name2, typeParameters.map((
|
216381
|
-
|
216380
|
+
changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name2, typeParameters.map((id) => factory.createTypeReferenceNode(
|
216381
|
+
id.name,
|
216382
216382
|
void 0
|
216383
216383
|
))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });
|
216384
216384
|
}
|
@@ -216426,8 +216426,8 @@ interface Symbol {
|
|
216426
216426
|
true
|
216427
216427
|
);
|
216428
216428
|
}
|
216429
|
-
changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name2, typeParameters.map((
|
216430
|
-
|
216429
|
+
changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name2, typeParameters.map((id) => factory.createTypeReferenceNode(
|
216430
|
+
id.name,
|
216431
216431
|
void 0
|
216432
216432
|
))));
|
216433
216433
|
}
|
@@ -220274,8 +220274,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
220274
220274
|
let i = 0;
|
220275
220275
|
for (let curr = unmodifiedNode; curr !== void 0 && i < scopes.length; curr = curr.parent) {
|
220276
220276
|
if (curr === scopes[i]) {
|
220277
|
-
seenTypeParameterUsages.forEach((typeParameter,
|
220278
|
-
usagesPerScope[i].typeParameterUsages.set(
|
220277
|
+
seenTypeParameterUsages.forEach((typeParameter, id) => {
|
220278
|
+
usagesPerScope[i].typeParameterUsages.set(id, typeParameter);
|
220279
220279
|
});
|
220280
220280
|
i++;
|
220281
220281
|
}
|
@@ -226271,7 +226271,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
226271
226271
|
}
|
226272
226272
|
function collectFreeIdentifiers(file) {
|
226273
226273
|
const map22 = createMultiMap();
|
226274
|
-
forEachFreeIdentifier(file, (
|
226274
|
+
forEachFreeIdentifier(file, (id) => map22.add(id.text, id));
|
226275
226275
|
return map22;
|
226276
226276
|
}
|
226277
226277
|
function forEachFreeIdentifier(node, cb) {
|
@@ -239988,10 +239988,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
239988
239988
|
forEachImport(sourceFile, (importDecl, moduleSpecifier) => {
|
239989
239989
|
const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
|
239990
239990
|
if (moduleSymbol) {
|
239991
|
-
const
|
239992
|
-
let imports = map22.get(
|
239991
|
+
const id = getSymbolId(moduleSymbol).toString();
|
239992
|
+
let imports = map22.get(id);
|
239993
239993
|
if (!imports) {
|
239994
|
-
map22.set(
|
239994
|
+
map22.set(id, imports = []);
|
239995
239995
|
}
|
239996
239996
|
imports.push(importDecl);
|
239997
239997
|
}
|
@@ -253131,7 +253131,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
253131
253131
|
}
|
253132
253132
|
}
|
253133
253133
|
installPackage(req2) {
|
253134
|
-
const { fileName, packageName, projectName, projectRootPath, id
|
253134
|
+
const { fileName, packageName, projectName, projectRootPath, id } = req2;
|
253135
253135
|
const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
|
253136
253136
|
if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
|
253137
253137
|
return directory;
|
@@ -253143,7 +253143,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
253143
253143
|
const response = {
|
253144
253144
|
kind: ActionPackageInstalled,
|
253145
253145
|
projectName,
|
253146
|
-
id
|
253146
|
+
id,
|
253147
253147
|
success,
|
253148
253148
|
message: message2
|
253149
253149
|
};
|
@@ -253153,7 +253153,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
253153
253153
|
const response = {
|
253154
253154
|
kind: ActionPackageInstalled,
|
253155
253155
|
projectName,
|
253156
|
-
id
|
253156
|
+
id,
|
253157
253157
|
success: false,
|
253158
253158
|
message: "Could not determine a project root path."
|
253159
253159
|
};
|
@@ -256534,10 +256534,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
256534
256534
|
return protocolOptions;
|
256535
256535
|
}
|
256536
256536
|
function convertCompilerOptions(protocolOptions) {
|
256537
|
-
compilerOptionConverters.forEach((mappedValues,
|
256538
|
-
const propertyValue = protocolOptions[
|
256537
|
+
compilerOptionConverters.forEach((mappedValues, id) => {
|
256538
|
+
const propertyValue = protocolOptions[id];
|
256539
256539
|
if (isString2(propertyValue)) {
|
256540
|
-
protocolOptions[
|
256540
|
+
protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase());
|
256541
256541
|
}
|
256542
256542
|
});
|
256543
256543
|
return protocolOptions;
|
@@ -256847,7 +256847,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
256847
256847
|
watchedFiles,
|
256848
256848
|
path10,
|
256849
256849
|
callback,
|
256850
|
-
(
|
256850
|
+
(id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path10 } })
|
256851
256851
|
);
|
256852
256852
|
}
|
256853
256853
|
function watchDirectory(path10, callback, recursive) {
|
@@ -256855,10 +256855,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
256855
256855
|
recursive ? watchedDirectoriesRecursive : watchedDirectories,
|
256856
256856
|
path10,
|
256857
256857
|
callback,
|
256858
|
-
(
|
256858
|
+
(id) => ({
|
256859
256859
|
eventName: CreateDirectoryWatcherEvent,
|
256860
256860
|
data: {
|
256861
|
-
id
|
256861
|
+
id,
|
256862
256862
|
path: path10,
|
256863
256863
|
recursive: !!recursive,
|
256864
256864
|
ignoreUpdate: !path10.endsWith("/node_modules") ? true : void 0
|
@@ -256868,25 +256868,25 @@ ${options.prefix}` : "\n" : options.prefix
|
|
256868
256868
|
}
|
256869
256869
|
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path10, callback, event) {
|
256870
256870
|
const key = service.toPath(path10);
|
256871
|
-
let
|
256872
|
-
if (!
|
256873
|
-
pathToId.set(key,
|
256874
|
-
let callbacks = idToCallbacks.get(
|
256871
|
+
let id = pathToId.get(key);
|
256872
|
+
if (!id)
|
256873
|
+
pathToId.set(key, id = ids++);
|
256874
|
+
let callbacks = idToCallbacks.get(id);
|
256875
256875
|
if (!callbacks) {
|
256876
|
-
idToCallbacks.set(
|
256877
|
-
service.eventHandler(event(
|
256876
|
+
idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set());
|
256877
|
+
service.eventHandler(event(id));
|
256878
256878
|
}
|
256879
256879
|
callbacks.add(callback);
|
256880
256880
|
return {
|
256881
256881
|
close() {
|
256882
|
-
const callbacks2 = idToCallbacks.get(
|
256882
|
+
const callbacks2 = idToCallbacks.get(id);
|
256883
256883
|
if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback)))
|
256884
256884
|
return;
|
256885
256885
|
if (callbacks2.size)
|
256886
256886
|
return;
|
256887
|
-
idToCallbacks.delete(
|
256887
|
+
idToCallbacks.delete(id);
|
256888
256888
|
pathToId.delete(key);
|
256889
|
-
service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id
|
256889
|
+
service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } });
|
256890
256890
|
}
|
256891
256891
|
};
|
256892
256892
|
}
|
@@ -256896,21 +256896,21 @@ ${options.prefix}` : "\n" : options.prefix
|
|
256896
256896
|
else
|
256897
256897
|
onWatchChangeRequestArgs(args);
|
256898
256898
|
}
|
256899
|
-
function onWatchChangeRequestArgs({ id
|
256900
|
-
onWatchEventType(
|
256901
|
-
onWatchEventType(
|
256902
|
-
onWatchEventType(
|
256899
|
+
function onWatchChangeRequestArgs({ id, created, deleted, updated }) {
|
256900
|
+
onWatchEventType(id, created, 0);
|
256901
|
+
onWatchEventType(id, deleted, 2);
|
256902
|
+
onWatchEventType(id, updated, 1);
|
256903
256903
|
}
|
256904
|
-
function onWatchEventType(
|
256904
|
+
function onWatchEventType(id, paths, eventKind) {
|
256905
256905
|
if (!(paths == null ? void 0 : paths.length))
|
256906
256906
|
return;
|
256907
|
-
forEachCallback(watchedFiles,
|
256908
|
-
forEachCallback(watchedDirectories,
|
256909
|
-
forEachCallback(watchedDirectoriesRecursive,
|
256907
|
+
forEachCallback(watchedFiles, id, paths, (callback, eventPath) => callback(eventPath, eventKind));
|
256908
|
+
forEachCallback(watchedDirectories, id, paths, (callback, eventPath) => callback(eventPath));
|
256909
|
+
forEachCallback(watchedDirectoriesRecursive, id, paths, (callback, eventPath) => callback(eventPath));
|
256910
256910
|
}
|
256911
|
-
function forEachCallback(hostWatcherMap,
|
256911
|
+
function forEachCallback(hostWatcherMap, id, eventPaths, cb) {
|
256912
256912
|
var _a4;
|
256913
|
-
(_a4 = hostWatcherMap.idToCallbacks.get(
|
256913
|
+
(_a4 = hostWatcherMap.idToCallbacks.get(id)) == null ? void 0 : _a4.forEach((callback) => {
|
256914
256914
|
eventPaths.forEach((eventPath) => cb(callback, normalizeSlashes(eventPath)));
|
256915
256915
|
});
|
256916
256916
|
}
|
@@ -264297,13 +264297,13 @@ var require_loaders = __commonJS({
|
|
264297
264297
|
}
|
264298
264298
|
};
|
264299
264299
|
exports.loadJs = loadJs;
|
264300
|
-
var
|
264300
|
+
var parseJson;
|
264301
264301
|
var loadJson = function loadJson2(filepath, content) {
|
264302
|
-
if (
|
264303
|
-
|
264302
|
+
if (parseJson === void 0) {
|
264303
|
+
parseJson = require_parse_json();
|
264304
264304
|
}
|
264305
264305
|
try {
|
264306
|
-
return
|
264306
|
+
return parseJson(content);
|
264307
264307
|
} catch (error3) {
|
264308
264308
|
error3.message = `JSON Error in ${filepath}:
|
264309
264309
|
${error3.message}`;
|
@@ -267077,7 +267077,7 @@ var Binding = class {
|
|
267077
267077
|
get initSource() {
|
267078
267078
|
return this.#initSource;
|
267079
267079
|
}
|
267080
|
-
async run(context2,
|
267080
|
+
async run(context2, id, args, isTrivial) {
|
267081
267081
|
const stack = new DisposableStack();
|
267082
267082
|
try {
|
267083
267083
|
if (!isTrivial) {
|
@@ -267085,7 +267085,7 @@ var Binding = class {
|
|
267085
267085
|
try {
|
267086
267086
|
const handles = __addDisposableResource9(env_1, await context2.evaluateHandle((name2, seq) => {
|
267087
267087
|
return globalThis[name2].args.get(seq);
|
267088
|
-
}, this.#name,
|
267088
|
+
}, this.#name, id), false);
|
267089
267089
|
const properties = await handles.getProperties();
|
267090
267090
|
for (const [index3, handle] of properties) {
|
267091
267091
|
if (index3 in args) {
|
@@ -267111,7 +267111,7 @@ var Binding = class {
|
|
267111
267111
|
const callbacks = globalThis[name2].callbacks;
|
267112
267112
|
callbacks.get(seq).resolve(result);
|
267113
267113
|
callbacks.delete(seq);
|
267114
|
-
}, this.#name,
|
267114
|
+
}, this.#name, id, await this.#fn(...args));
|
267115
267115
|
for (const arg of args) {
|
267116
267116
|
if (arg instanceof JSHandle) {
|
267117
267117
|
stack.use(arg);
|
@@ -267125,13 +267125,13 @@ var Binding = class {
|
|
267125
267125
|
const callbacks = globalThis[name2].callbacks;
|
267126
267126
|
callbacks.get(seq).reject(error4);
|
267127
267127
|
callbacks.delete(seq);
|
267128
|
-
}, this.#name,
|
267128
|
+
}, this.#name, id, error3.message, error3.stack).catch(debugError);
|
267129
267129
|
} else {
|
267130
267130
|
await context2.evaluate((name2, seq, error4) => {
|
267131
267131
|
const callbacks = globalThis[name2].callbacks;
|
267132
267132
|
callbacks.get(seq).reject(error4);
|
267133
267133
|
callbacks.delete(seq);
|
267134
|
-
}, this.#name,
|
267134
|
+
}, this.#name, id, error3).catch(debugError);
|
267135
267135
|
}
|
267136
267136
|
}
|
267137
267137
|
}
|
@@ -267460,11 +267460,11 @@ var Connection = class extends EventEmitter {
|
|
267460
267460
|
if (this.#closed) {
|
267461
267461
|
return Promise.reject(new Error("Protocol error: Connection closed."));
|
267462
267462
|
}
|
267463
|
-
return callbacks.create(method, options?.timeout ?? this.#timeout, (
|
267463
|
+
return callbacks.create(method, options?.timeout ?? this.#timeout, (id) => {
|
267464
267464
|
const stringifiedMessage = JSON.stringify({
|
267465
267465
|
method,
|
267466
267466
|
params,
|
267467
|
-
id
|
267467
|
+
id,
|
267468
267468
|
sessionId
|
267469
267469
|
});
|
267470
267470
|
debugProtocolSend(stringifiedMessage);
|
@@ -267720,10 +267720,10 @@ var CdpPreloadScript = class {
|
|
267720
267720
|
#id;
|
267721
267721
|
#source;
|
267722
267722
|
#frameToId = /* @__PURE__ */ new WeakMap();
|
267723
|
-
constructor(mainFrame,
|
267724
|
-
this.#id =
|
267723
|
+
constructor(mainFrame, id, source3) {
|
267724
|
+
this.#id = id;
|
267725
267725
|
this.#source = source3;
|
267726
|
-
this.#frameToId.set(mainFrame,
|
267726
|
+
this.#frameToId.set(mainFrame, id);
|
267727
267727
|
}
|
267728
267728
|
get id() {
|
267729
267729
|
return this.#id;
|
@@ -267745,8 +267745,8 @@ init_Deferred();
|
|
267745
267745
|
var DeviceRequestPromptDevice = class {
|
267746
267746
|
id;
|
267747
267747
|
name;
|
267748
|
-
constructor(
|
267749
|
-
this.id =
|
267748
|
+
constructor(id, name2) {
|
267749
|
+
this.id = id;
|
267750
267750
|
this.name = name2;
|
267751
267751
|
}
|
267752
267752
|
};
|
@@ -269056,8 +269056,8 @@ var CdpFrame = (() => {
|
|
269056
269056
|
_client() {
|
269057
269057
|
return this.#client;
|
269058
269058
|
}
|
269059
|
-
updateId(
|
269060
|
-
this._id =
|
269059
|
+
updateId(id) {
|
269060
|
+
this._id = id;
|
269061
269061
|
}
|
269062
269062
|
updateClient(client) {
|
269063
269063
|
this.#client = client;
|
@@ -269298,8 +269298,8 @@ var FrameTree = class {
|
|
269298
269298
|
if (!childIds) {
|
269299
269299
|
return [];
|
269300
269300
|
}
|
269301
|
-
return Array.from(childIds).map((
|
269302
|
-
return this.getById(
|
269301
|
+
return Array.from(childIds).map((id) => {
|
269302
|
+
return this.getById(id);
|
269303
269303
|
}).filter((frame) => {
|
269304
269304
|
return frame !== void 0;
|
269305
269305
|
});
|