ses 0.14.4 → 0.15.3

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/ses.mjs CHANGED
@@ -1,1940 +1,8 @@
1
1
  'use strict';
2
- (functors => {
3
- function cell(name, value = undefined) {
4
- const observers = [];
5
- function set(newValue) {
6
- value = newValue;
7
- for (const observe of observers) {
8
- observe(value);
9
- }
10
- }
11
- function get() {
12
- return value;
13
- }
14
- function observe(observe) {
15
- observers.push(observe);
16
- observe(value);
17
- }
18
- return { get, set, observe, enumerable: true };
19
- }
20
-
21
- const cells = [{
22
- globalThis: cell("globalThis"),
23
- Array: cell("Array"),
24
- Date: cell("Date"),
25
- Float32Array: cell("Float32Array"),
26
- JSON: cell("JSON"),
27
- Map: cell("Map"),
28
- Math: cell("Math"),
29
- Object: cell("Object"),
30
- Promise: cell("Promise"),
31
- Proxy: cell("Proxy"),
32
- Reflect: cell("Reflect"),
33
- FERAL_REG_EXP: cell("FERAL_REG_EXP"),
34
- Set: cell("Set"),
35
- String: cell("String"),
36
- WeakMap: cell("WeakMap"),
37
- WeakSet: cell("WeakSet"),
38
- FERAL_ERROR: cell("FERAL_ERROR"),
39
- RangeError: cell("RangeError"),
40
- ReferenceError: cell("ReferenceError"),
41
- SyntaxError: cell("SyntaxError"),
42
- TypeError: cell("TypeError"),
43
- assign: cell("assign"),
44
- create: cell("create"),
45
- defineProperties: cell("defineProperties"),
46
- entries: cell("entries"),
47
- freeze: cell("freeze"),
48
- getOwnPropertyDescriptor: cell("getOwnPropertyDescriptor"),
49
- getOwnPropertyDescriptors: cell("getOwnPropertyDescriptors"),
50
- getOwnPropertyNames: cell("getOwnPropertyNames"),
51
- getPrototypeOf: cell("getPrototypeOf"),
52
- is: cell("is"),
53
- isExtensible: cell("isExtensible"),
54
- keys: cell("keys"),
55
- objectPrototype: cell("objectPrototype"),
56
- seal: cell("seal"),
57
- setPrototypeOf: cell("setPrototypeOf"),
58
- values: cell("values"),
59
- speciesSymbol: cell("speciesSymbol"),
60
- toStringTagSymbol: cell("toStringTagSymbol"),
61
- iteratorSymbol: cell("iteratorSymbol"),
62
- matchAllSymbol: cell("matchAllSymbol"),
63
- stringifyJson: cell("stringifyJson"),
64
- fromEntries: cell("fromEntries"),
65
- defineProperty: cell("defineProperty"),
66
- apply: cell("apply"),
67
- construct: cell("construct"),
68
- reflectGet: cell("reflectGet"),
69
- reflectGetOwnPropertyDescriptor: cell("reflectGetOwnPropertyDescriptor"),
70
- reflectHas: cell("reflectHas"),
71
- reflectIsExtensible: cell("reflectIsExtensible"),
72
- ownKeys: cell("ownKeys"),
73
- reflectPreventExtensions: cell("reflectPreventExtensions"),
74
- reflectSet: cell("reflectSet"),
75
- isArray: cell("isArray"),
76
- arrayPrototype: cell("arrayPrototype"),
77
- mapPrototype: cell("mapPrototype"),
78
- proxyRevocable: cell("proxyRevocable"),
79
- regexpPrototype: cell("regexpPrototype"),
80
- setPrototype: cell("setPrototype"),
81
- stringPrototype: cell("stringPrototype"),
82
- weakmapPrototype: cell("weakmapPrototype"),
83
- weaksetPrototype: cell("weaksetPrototype"),
84
- functionPrototype: cell("functionPrototype"),
85
- promisePrototype: cell("promisePrototype"),
86
- uncurryThis: cell("uncurryThis"),
87
- objectHasOwnProperty: cell("objectHasOwnProperty"),
88
- arrayFilter: cell("arrayFilter"),
89
- arrayForEach: cell("arrayForEach"),
90
- arrayIncludes: cell("arrayIncludes"),
91
- arrayJoin: cell("arrayJoin"),
92
- arrayMap: cell("arrayMap"),
93
- arrayPop: cell("arrayPop"),
94
- arrayPush: cell("arrayPush"),
95
- arraySlice: cell("arraySlice"),
96
- arraySome: cell("arraySome"),
97
- arraySort: cell("arraySort"),
98
- iterateArray: cell("iterateArray"),
99
- mapSet: cell("mapSet"),
100
- mapGet: cell("mapGet"),
101
- mapHas: cell("mapHas"),
102
- iterateMap: cell("iterateMap"),
103
- setAdd: cell("setAdd"),
104
- setForEach: cell("setForEach"),
105
- setHas: cell("setHas"),
106
- iterateSet: cell("iterateSet"),
107
- regexpTest: cell("regexpTest"),
108
- regexpExec: cell("regexpExec"),
109
- matchAllRegExp: cell("matchAllRegExp"),
110
- stringEndsWith: cell("stringEndsWith"),
111
- stringIncludes: cell("stringIncludes"),
112
- stringIndexOf: cell("stringIndexOf"),
113
- stringMatch: cell("stringMatch"),
114
- stringReplace: cell("stringReplace"),
115
- stringSearch: cell("stringSearch"),
116
- stringSlice: cell("stringSlice"),
117
- stringSplit: cell("stringSplit"),
118
- stringStartsWith: cell("stringStartsWith"),
119
- iterateString: cell("iterateString"),
120
- weakmapDelete: cell("weakmapDelete"),
121
- weakmapGet: cell("weakmapGet"),
122
- weakmapHas: cell("weakmapHas"),
123
- weakmapSet: cell("weakmapSet"),
124
- weaksetAdd: cell("weaksetAdd"),
125
- weaksetGet: cell("weaksetGet"),
126
- weaksetHas: cell("weaksetHas"),
127
- functionToString: cell("functionToString"),
128
- promiseAll: cell("promiseAll"),
129
- promiseCatch: cell("promiseCatch"),
130
- promiseThen: cell("promiseThen"),
131
- getConstructorOf: cell("getConstructorOf"),
132
- immutableObject: cell("immutableObject"),
133
- isObject: cell("isObject"),
134
- isError: cell("isError"),
135
- FERAL_EVAL: cell("FERAL_EVAL"),
136
- FERAL_FUNCTION: cell("FERAL_FUNCTION"),
137
-
138
-
139
- },{
140
-
141
-
142
- },{
143
- an: cell("an"),
144
- bestEffortStringify: cell("bestEffortStringify"),
145
-
146
-
147
- },{
148
-
149
-
150
- },{
151
- unredactedDetails: cell("unredactedDetails"),
152
- loggedErrorHandler: cell("loggedErrorHandler"),
153
- makeAssert: cell("makeAssert"),
154
- assert: cell("assert"),
155
-
156
-
157
- },{
158
- makeEvaluateFactory: cell("makeEvaluateFactory"),
159
-
160
-
161
- },{
162
- isValidIdentifierName: cell("isValidIdentifierName"),
163
- getScopeConstants: cell("getScopeConstants"),
164
-
165
-
166
- },{
167
- createScopeHandler: cell("createScopeHandler"),
168
-
169
-
170
- },{
171
- getSourceURL: cell("getSourceURL"),
172
-
173
-
174
- },{
175
- rejectHtmlComments: cell("rejectHtmlComments"),
176
- evadeHtmlCommentTest: cell("evadeHtmlCommentTest"),
177
- rejectImportExpressions: cell("rejectImportExpressions"),
178
- evadeImportExpressionTest: cell("evadeImportExpressionTest"),
179
- rejectSomeDirectEvalExpressions: cell("rejectSomeDirectEvalExpressions"),
180
- mandatoryTransforms: cell("mandatoryTransforms"),
181
- applyTransforms: cell("applyTransforms"),
182
-
183
-
184
- },{
185
- makeSafeEvaluator: cell("makeSafeEvaluator"),
186
-
187
-
188
- },{
189
- provideCompartmentEvaluator: cell("provideCompartmentEvaluator"),
190
- compartmentEvaluate: cell("compartmentEvaluate"),
191
-
192
-
193
- },{
194
- makeEvalFunction: cell("makeEvalFunction"),
195
-
196
-
197
- },{
198
- makeFunctionConstructor: cell("makeFunctionConstructor"),
199
-
200
-
201
- },{
202
- constantProperties: cell("constantProperties"),
203
- universalPropertyNames: cell("universalPropertyNames"),
204
- initialGlobalPropertyNames: cell("initialGlobalPropertyNames"),
205
- sharedGlobalPropertyNames: cell("sharedGlobalPropertyNames"),
206
- uniqueGlobalPropertyNames: cell("uniqueGlobalPropertyNames"),
207
- NativeErrors: cell("NativeErrors"),
208
- FunctionInstance: cell("FunctionInstance"),
209
- isAccessorPermit: cell("isAccessorPermit"),
210
- whitelist: cell("whitelist"),
211
-
212
-
213
- },{
214
- setGlobalObjectConstantProperties: cell("setGlobalObjectConstantProperties"),
215
- setGlobalObjectMutableProperties: cell("setGlobalObjectMutableProperties"),
216
-
217
-
218
- },{
219
- makeAlias: cell("makeAlias"),
220
- load: cell("load"),
221
-
222
-
223
- },{
224
- deferExports: cell("deferExports"),
225
- getDeferredExports: cell("getDeferredExports"),
226
-
227
-
228
- },{
229
- makeThirdPartyModuleInstance: cell("makeThirdPartyModuleInstance"),
230
- makeModuleInstance: cell("makeModuleInstance"),
231
-
232
-
233
- },{
234
- link: cell("link"),
235
- instantiate: cell("instantiate"),
236
-
237
-
238
- },{
239
- InertCompartment: cell("InertCompartment"),
240
- CompartmentPrototype: cell("CompartmentPrototype"),
241
- makeCompartmentConstructor: cell("makeCompartmentConstructor"),
242
-
243
-
244
- },{
245
- getAnonymousIntrinsics: cell("getAnonymousIntrinsics"),
246
-
247
-
248
- },{
249
- makeIntrinsicsCollector: cell("makeIntrinsicsCollector"),
250
- getGlobalIntrinsics: cell("getGlobalIntrinsics"),
251
-
252
-
253
- },{
254
- minEnablements: cell("minEnablements"),
255
- moderateEnablements: cell("moderateEnablements"),
256
- severeEnablements: cell("severeEnablements"),
257
-
258
-
259
- },{
260
- default: cell("default"),
261
-
262
-
263
- },{
264
- makeLoggingConsoleKit: cell("makeLoggingConsoleKit"),
265
- makeCausalConsole: cell("makeCausalConsole"),
266
- filterConsole: cell("filterConsole"),
267
- consoleWhitelist: cell("consoleWhitelist"),
268
- BASE_CONSOLE_LEVEL: cell("BASE_CONSOLE_LEVEL"),
269
-
270
-
271
- },{
272
- tameConsole: cell("tameConsole"),
273
-
274
-
275
- },{
276
- filterFileName: cell("filterFileName"),
277
- shortenCallSiteString: cell("shortenCallSiteString"),
278
- tameV8ErrorConstructor: cell("tameV8ErrorConstructor"),
279
-
280
-
281
- },{
282
- default: cell("default"),
283
-
284
-
285
- },{
286
- makeHardener: cell("makeHardener"),
287
-
288
-
289
- },{
290
- default: cell("default"),
291
-
292
-
293
- },{
294
- tameDomains: cell("tameDomains"),
295
-
296
-
297
- },{
298
- default: cell("default"),
299
-
300
-
301
- },{
302
- tameFunctionToString: cell("tameFunctionToString"),
303
-
304
-
305
- },{
306
- default: cell("default"),
307
-
308
-
309
- },{
310
- default: cell("default"),
311
-
312
-
313
- },{
314
- default: cell("default"),
315
-
316
-
317
- },{
318
- default: cell("default"),
319
-
320
-
321
- },{
322
- repairIntrinsics: cell("repairIntrinsics"),
323
- makeLockdown: cell("makeLockdown"),
324
-
325
-
326
- },{
327
-
328
-
329
- },];
330
-
331
-
332
-
333
- const namespaces = cells.map(cells => Object.create(null, cells));
334
-
335
- for (let index = 0; index < namespaces.length; index += 1) {
336
- cells[index]['*'] = cell('*', namespaces[index]);
337
- }
338
-
339
- functors[0]({
340
- imports(entries) {
341
- const map = new Map(entries);
342
-
343
- },
344
- liveVar: {
345
-
346
- },
347
- onceVar: {
348
- universalThis: cells[0].globalThis.set,
349
- Array: cells[0].Array.set,
350
- Date: cells[0].Date.set,
351
- Float32Array: cells[0].Float32Array.set,
352
- JSON: cells[0].JSON.set,
353
- Map: cells[0].Map.set,
354
- Math: cells[0].Math.set,
355
- Object: cells[0].Object.set,
356
- Promise: cells[0].Promise.set,
357
- Proxy: cells[0].Proxy.set,
358
- Reflect: cells[0].Reflect.set,
359
- FERAL_REG_EXP: cells[0].FERAL_REG_EXP.set,
360
- Set: cells[0].Set.set,
361
- String: cells[0].String.set,
362
- WeakMap: cells[0].WeakMap.set,
363
- WeakSet: cells[0].WeakSet.set,
364
- FERAL_ERROR: cells[0].FERAL_ERROR.set,
365
- RangeError: cells[0].RangeError.set,
366
- ReferenceError: cells[0].ReferenceError.set,
367
- SyntaxError: cells[0].SyntaxError.set,
368
- TypeError: cells[0].TypeError.set,
369
- assign: cells[0].assign.set,
370
- create: cells[0].create.set,
371
- defineProperties: cells[0].defineProperties.set,
372
- entries: cells[0].entries.set,
373
- freeze: cells[0].freeze.set,
374
- getOwnPropertyDescriptor: cells[0].getOwnPropertyDescriptor.set,
375
- getOwnPropertyDescriptors: cells[0].getOwnPropertyDescriptors.set,
376
- getOwnPropertyNames: cells[0].getOwnPropertyNames.set,
377
- getPrototypeOf: cells[0].getPrototypeOf.set,
378
- is: cells[0].is.set,
379
- isExtensible: cells[0].isExtensible.set,
380
- keys: cells[0].keys.set,
381
- objectPrototype: cells[0].objectPrototype.set,
382
- seal: cells[0].seal.set,
383
- setPrototypeOf: cells[0].setPrototypeOf.set,
384
- values: cells[0].values.set,
385
- speciesSymbol: cells[0].speciesSymbol.set,
386
- toStringTagSymbol: cells[0].toStringTagSymbol.set,
387
- iteratorSymbol: cells[0].iteratorSymbol.set,
388
- matchAllSymbol: cells[0].matchAllSymbol.set,
389
- stringifyJson: cells[0].stringifyJson.set,
390
- fromEntries: cells[0].fromEntries.set,
391
- defineProperty: cells[0].defineProperty.set,
392
- apply: cells[0].apply.set,
393
- construct: cells[0].construct.set,
394
- reflectGet: cells[0].reflectGet.set,
395
- reflectGetOwnPropertyDescriptor: cells[0].reflectGetOwnPropertyDescriptor.set,
396
- reflectHas: cells[0].reflectHas.set,
397
- reflectIsExtensible: cells[0].reflectIsExtensible.set,
398
- ownKeys: cells[0].ownKeys.set,
399
- reflectPreventExtensions: cells[0].reflectPreventExtensions.set,
400
- reflectSet: cells[0].reflectSet.set,
401
- isArray: cells[0].isArray.set,
402
- arrayPrototype: cells[0].arrayPrototype.set,
403
- mapPrototype: cells[0].mapPrototype.set,
404
- proxyRevocable: cells[0].proxyRevocable.set,
405
- regexpPrototype: cells[0].regexpPrototype.set,
406
- setPrototype: cells[0].setPrototype.set,
407
- stringPrototype: cells[0].stringPrototype.set,
408
- weakmapPrototype: cells[0].weakmapPrototype.set,
409
- weaksetPrototype: cells[0].weaksetPrototype.set,
410
- functionPrototype: cells[0].functionPrototype.set,
411
- promisePrototype: cells[0].promisePrototype.set,
412
- uncurryThis: cells[0].uncurryThis.set,
413
- objectHasOwnProperty: cells[0].objectHasOwnProperty.set,
414
- arrayFilter: cells[0].arrayFilter.set,
415
- arrayForEach: cells[0].arrayForEach.set,
416
- arrayIncludes: cells[0].arrayIncludes.set,
417
- arrayJoin: cells[0].arrayJoin.set,
418
- arrayMap: cells[0].arrayMap.set,
419
- arrayPop: cells[0].arrayPop.set,
420
- arrayPush: cells[0].arrayPush.set,
421
- arraySlice: cells[0].arraySlice.set,
422
- arraySome: cells[0].arraySome.set,
423
- arraySort: cells[0].arraySort.set,
424
- iterateArray: cells[0].iterateArray.set,
425
- mapSet: cells[0].mapSet.set,
426
- mapGet: cells[0].mapGet.set,
427
- mapHas: cells[0].mapHas.set,
428
- iterateMap: cells[0].iterateMap.set,
429
- setAdd: cells[0].setAdd.set,
430
- setForEach: cells[0].setForEach.set,
431
- setHas: cells[0].setHas.set,
432
- iterateSet: cells[0].iterateSet.set,
433
- regexpTest: cells[0].regexpTest.set,
434
- regexpExec: cells[0].regexpExec.set,
435
- matchAllRegExp: cells[0].matchAllRegExp.set,
436
- stringEndsWith: cells[0].stringEndsWith.set,
437
- stringIncludes: cells[0].stringIncludes.set,
438
- stringIndexOf: cells[0].stringIndexOf.set,
439
- stringMatch: cells[0].stringMatch.set,
440
- stringReplace: cells[0].stringReplace.set,
441
- stringSearch: cells[0].stringSearch.set,
442
- stringSlice: cells[0].stringSlice.set,
443
- stringSplit: cells[0].stringSplit.set,
444
- stringStartsWith: cells[0].stringStartsWith.set,
445
- iterateString: cells[0].iterateString.set,
446
- weakmapDelete: cells[0].weakmapDelete.set,
447
- weakmapGet: cells[0].weakmapGet.set,
448
- weakmapHas: cells[0].weakmapHas.set,
449
- weakmapSet: cells[0].weakmapSet.set,
450
- weaksetAdd: cells[0].weaksetAdd.set,
451
- weaksetGet: cells[0].weaksetGet.set,
452
- weaksetHas: cells[0].weaksetHas.set,
453
- functionToString: cells[0].functionToString.set,
454
- promiseAll: cells[0].promiseAll.set,
455
- promiseCatch: cells[0].promiseCatch.set,
456
- promiseThen: cells[0].promiseThen.set,
457
- getConstructorOf: cells[0].getConstructorOf.set,
458
- immutableObject: cells[0].immutableObject.set,
459
- isObject: cells[0].isObject.set,
460
- isError: cells[0].isError.set,
461
- FERAL_EVAL: cells[0].FERAL_EVAL.set,
462
- FERAL_FUNCTION: cells[0].FERAL_FUNCTION.set,
463
-
464
- },
465
- });
466
- functors[1]({
467
- imports(entries) {
468
- const map = new Map(entries);
469
-
470
- },
471
- liveVar: {
472
-
473
- },
474
- onceVar: {
475
-
476
- },
477
- });
478
- functors[2]({
479
- imports(entries) {
480
- const map = new Map(entries);
481
- for (const [name, observers] of map.get("../commons.js")) {
482
- const cell = cells[0][name];
483
- if (cell === undefined) {
484
- throw new ReferenceError(`Cannot import name ${name}`);
485
- }
486
- for (const observer of observers) {
487
- cell.observe(observer);
488
- }
489
- }
490
-
491
- },
492
- liveVar: {
493
-
494
- },
495
- onceVar: {
496
- an: cells[2].an.set,
497
- bestEffortStringify: cells[2].bestEffortStringify.set,
498
-
499
- },
500
- });
501
- functors[3]({
502
- imports(entries) {
503
- const map = new Map(entries);
504
-
505
- },
506
- liveVar: {
507
-
508
- },
509
- onceVar: {
510
-
511
- },
512
- });
513
- functors[4]({
514
- imports(entries) {
515
- const map = new Map(entries);
516
- for (const [name, observers] of map.get("../commons.js")) {
517
- const cell = cells[0][name];
518
- if (cell === undefined) {
519
- throw new ReferenceError(`Cannot import name ${name}`);
520
- }
521
- for (const observer of observers) {
522
- cell.observe(observer);
523
- }
524
- }
525
- for (const [name, observers] of map.get("./internal-types.js")) {
526
- const cell = cells[1][name];
527
- if (cell === undefined) {
528
- throw new ReferenceError(`Cannot import name ${name}`);
529
- }
530
- for (const observer of observers) {
531
- cell.observe(observer);
532
- }
533
- }
534
- for (const [name, observers] of map.get("./stringify-utils.js")) {
535
- const cell = cells[2][name];
536
- if (cell === undefined) {
537
- throw new ReferenceError(`Cannot import name ${name}`);
538
- }
539
- for (const observer of observers) {
540
- cell.observe(observer);
541
- }
542
- }
543
- for (const [name, observers] of map.get("./types.js")) {
544
- const cell = cells[3][name];
545
- if (cell === undefined) {
546
- throw new ReferenceError(`Cannot import name ${name}`);
547
- }
548
- for (const observer of observers) {
549
- cell.observe(observer);
550
- }
551
- }
552
-
553
- },
554
- liveVar: {
555
-
556
- },
557
- onceVar: {
558
- unredactedDetails: cells[4].unredactedDetails.set,
559
- loggedErrorHandler: cells[4].loggedErrorHandler.set,
560
- makeAssert: cells[4].makeAssert.set,
561
- assert: cells[4].assert.set,
562
-
563
- },
564
- });
565
- functors[5]({
566
- imports(entries) {
567
- const map = new Map(entries);
568
- for (const [name, observers] of map.get("./commons.js")) {
569
- const cell = cells[0][name];
570
- if (cell === undefined) {
571
- throw new ReferenceError(`Cannot import name ${name}`);
572
- }
573
- for (const observer of observers) {
574
- cell.observe(observer);
575
- }
576
- }
577
-
578
- },
579
- liveVar: {
580
-
581
- },
582
- onceVar: {
583
- makeEvaluateFactory: cells[5].makeEvaluateFactory.set,
584
-
585
- },
586
- });
587
- functors[6]({
588
- imports(entries) {
589
- const map = new Map(entries);
590
- for (const [name, observers] of map.get("./commons.js")) {
591
- const cell = cells[0][name];
592
- if (cell === undefined) {
593
- throw new ReferenceError(`Cannot import name ${name}`);
594
- }
595
- for (const observer of observers) {
596
- cell.observe(observer);
597
- }
598
- }
599
-
600
- },
601
- liveVar: {
602
-
603
- },
604
- onceVar: {
605
- isValidIdentifierName: cells[6].isValidIdentifierName.set,
606
- getScopeConstants: cells[6].getScopeConstants.set,
607
-
608
- },
609
- });
610
- functors[7]({
611
- imports(entries) {
612
- const map = new Map(entries);
613
- for (const [name, observers] of map.get("./commons.js")) {
614
- const cell = cells[0][name];
615
- if (cell === undefined) {
616
- throw new ReferenceError(`Cannot import name ${name}`);
617
- }
618
- for (const observer of observers) {
619
- cell.observe(observer);
620
- }
621
- }
622
- for (const [name, observers] of map.get("./error/assert.js")) {
623
- const cell = cells[4][name];
624
- if (cell === undefined) {
625
- throw new ReferenceError(`Cannot import name ${name}`);
626
- }
627
- for (const observer of observers) {
628
- cell.observe(observer);
629
- }
630
- }
631
-
632
- },
633
- liveVar: {
634
-
635
- },
636
- onceVar: {
637
- createScopeHandler: cells[7].createScopeHandler.set,
638
-
639
- },
640
- });
641
- functors[8]({
642
- imports(entries) {
643
- const map = new Map(entries);
644
- for (const [name, observers] of map.get("./commons.js")) {
645
- const cell = cells[0][name];
646
- if (cell === undefined) {
647
- throw new ReferenceError(`Cannot import name ${name}`);
648
- }
649
- for (const observer of observers) {
650
- cell.observe(observer);
651
- }
652
- }
653
-
654
- },
655
- liveVar: {
656
-
657
- },
658
- onceVar: {
659
- getSourceURL: cells[8].getSourceURL.set,
660
-
661
- },
662
- });
663
- functors[9]({
664
- imports(entries) {
665
- const map = new Map(entries);
666
- for (const [name, observers] of map.get("./commons.js")) {
667
- const cell = cells[0][name];
668
- if (cell === undefined) {
669
- throw new ReferenceError(`Cannot import name ${name}`);
670
- }
671
- for (const observer of observers) {
672
- cell.observe(observer);
673
- }
674
- }
675
- for (const [name, observers] of map.get("./get-source-url.js")) {
676
- const cell = cells[8][name];
677
- if (cell === undefined) {
678
- throw new ReferenceError(`Cannot import name ${name}`);
679
- }
680
- for (const observer of observers) {
681
- cell.observe(observer);
682
- }
683
- }
684
-
685
- },
686
- liveVar: {
687
-
688
- },
689
- onceVar: {
690
- rejectHtmlComments: cells[9].rejectHtmlComments.set,
691
- evadeHtmlCommentTest: cells[9].evadeHtmlCommentTest.set,
692
- rejectImportExpressions: cells[9].rejectImportExpressions.set,
693
- evadeImportExpressionTest: cells[9].evadeImportExpressionTest.set,
694
- rejectSomeDirectEvalExpressions: cells[9].rejectSomeDirectEvalExpressions.set,
695
- mandatoryTransforms: cells[9].mandatoryTransforms.set,
696
- applyTransforms: cells[9].applyTransforms.set,
697
-
698
- },
699
- });
700
- functors[10]({
701
- imports(entries) {
702
- const map = new Map(entries);
703
- for (const [name, observers] of map.get("./commons.js")) {
704
- const cell = cells[0][name];
705
- if (cell === undefined) {
706
- throw new ReferenceError(`Cannot import name ${name}`);
707
- }
708
- for (const observer of observers) {
709
- cell.observe(observer);
710
- }
711
- }
712
- for (const [name, observers] of map.get("./error/assert.js")) {
713
- const cell = cells[4][name];
714
- if (cell === undefined) {
715
- throw new ReferenceError(`Cannot import name ${name}`);
716
- }
717
- for (const observer of observers) {
718
- cell.observe(observer);
719
- }
720
- }
721
- for (const [name, observers] of map.get("./make-evaluate-factory.js")) {
722
- const cell = cells[5][name];
723
- if (cell === undefined) {
724
- throw new ReferenceError(`Cannot import name ${name}`);
725
- }
726
- for (const observer of observers) {
727
- cell.observe(observer);
728
- }
729
- }
730
- for (const [name, observers] of map.get("./scope-constants.js")) {
731
- const cell = cells[6][name];
732
- if (cell === undefined) {
733
- throw new ReferenceError(`Cannot import name ${name}`);
734
- }
735
- for (const observer of observers) {
736
- cell.observe(observer);
737
- }
738
- }
739
- for (const [name, observers] of map.get("./scope-handler.js")) {
740
- const cell = cells[7][name];
741
- if (cell === undefined) {
742
- throw new ReferenceError(`Cannot import name ${name}`);
743
- }
744
- for (const observer of observers) {
745
- cell.observe(observer);
746
- }
747
- }
748
- for (const [name, observers] of map.get("./transforms.js")) {
749
- const cell = cells[9][name];
750
- if (cell === undefined) {
751
- throw new ReferenceError(`Cannot import name ${name}`);
752
- }
753
- for (const observer of observers) {
754
- cell.observe(observer);
755
- }
756
- }
757
-
758
- },
759
- liveVar: {
760
-
761
- },
762
- onceVar: {
763
- makeSafeEvaluator: cells[10].makeSafeEvaluator.set,
764
-
765
- },
766
- });
767
- functors[11]({
768
- imports(entries) {
769
- const map = new Map(entries);
770
- for (const [name, observers] of map.get("./commons.js")) {
771
- const cell = cells[0][name];
772
- if (cell === undefined) {
773
- throw new ReferenceError(`Cannot import name ${name}`);
774
- }
775
- for (const observer of observers) {
776
- cell.observe(observer);
777
- }
778
- }
779
- for (const [name, observers] of map.get("./make-safe-evaluator.js")) {
780
- const cell = cells[10][name];
781
- if (cell === undefined) {
782
- throw new ReferenceError(`Cannot import name ${name}`);
783
- }
784
- for (const observer of observers) {
785
- cell.observe(observer);
786
- }
787
- }
788
- for (const [name, observers] of map.get("./transforms.js")) {
789
- const cell = cells[9][name];
790
- if (cell === undefined) {
791
- throw new ReferenceError(`Cannot import name ${name}`);
792
- }
793
- for (const observer of observers) {
794
- cell.observe(observer);
795
- }
796
- }
797
-
798
- },
799
- liveVar: {
800
-
801
- },
802
- onceVar: {
803
- provideCompartmentEvaluator: cells[11].provideCompartmentEvaluator.set,
804
- compartmentEvaluate: cells[11].compartmentEvaluate.set,
805
-
806
- },
807
- });
808
- functors[12]({
809
- imports(entries) {
810
- const map = new Map(entries);
811
-
812
- },
813
- liveVar: {
814
-
815
- },
816
- onceVar: {
817
- makeEvalFunction: cells[12].makeEvalFunction.set,
818
-
819
- },
820
- });
821
- functors[13]({
822
- imports(entries) {
823
- const map = new Map(entries);
824
- for (const [name, observers] of map.get("./commons.js")) {
825
- const cell = cells[0][name];
826
- if (cell === undefined) {
827
- throw new ReferenceError(`Cannot import name ${name}`);
828
- }
829
- for (const observer of observers) {
830
- cell.observe(observer);
831
- }
832
- }
833
- for (const [name, observers] of map.get("./error/assert.js")) {
834
- const cell = cells[4][name];
835
- if (cell === undefined) {
836
- throw new ReferenceError(`Cannot import name ${name}`);
837
- }
838
- for (const observer of observers) {
839
- cell.observe(observer);
840
- }
841
- }
842
-
843
- },
844
- liveVar: {
845
-
846
- },
847
- onceVar: {
848
- makeFunctionConstructor: cells[13].makeFunctionConstructor.set,
849
-
850
- },
851
- });
852
- functors[14]({
853
- imports(entries) {
854
- const map = new Map(entries);
855
-
856
- },
857
- liveVar: {
858
-
859
- },
860
- onceVar: {
861
- constantProperties: cells[14].constantProperties.set,
862
- universalPropertyNames: cells[14].universalPropertyNames.set,
863
- initialGlobalPropertyNames: cells[14].initialGlobalPropertyNames.set,
864
- sharedGlobalPropertyNames: cells[14].sharedGlobalPropertyNames.set,
865
- uniqueGlobalPropertyNames: cells[14].uniqueGlobalPropertyNames.set,
866
- NativeErrors: cells[14].NativeErrors.set,
867
- FunctionInstance: cells[14].FunctionInstance.set,
868
- isAccessorPermit: cells[14].isAccessorPermit.set,
869
- whitelist: cells[14].whitelist.set,
870
-
871
- },
872
- });
873
- functors[15]({
874
- imports(entries) {
875
- const map = new Map(entries);
876
- for (const [name, observers] of map.get("./commons.js")) {
877
- const cell = cells[0][name];
878
- if (cell === undefined) {
879
- throw new ReferenceError(`Cannot import name ${name}`);
880
- }
881
- for (const observer of observers) {
882
- cell.observe(observer);
883
- }
884
- }
885
- for (const [name, observers] of map.get("./make-eval-function.js")) {
886
- const cell = cells[12][name];
887
- if (cell === undefined) {
888
- throw new ReferenceError(`Cannot import name ${name}`);
889
- }
890
- for (const observer of observers) {
891
- cell.observe(observer);
892
- }
893
- }
894
- for (const [name, observers] of map.get("./make-function-constructor.js")) {
895
- const cell = cells[13][name];
896
- if (cell === undefined) {
897
- throw new ReferenceError(`Cannot import name ${name}`);
898
- }
899
- for (const observer of observers) {
900
- cell.observe(observer);
901
- }
902
- }
903
- for (const [name, observers] of map.get("./whitelist.js")) {
904
- const cell = cells[14][name];
905
- if (cell === undefined) {
906
- throw new ReferenceError(`Cannot import name ${name}`);
907
- }
908
- for (const observer of observers) {
909
- cell.observe(observer);
910
- }
911
- }
912
-
913
- },
914
- liveVar: {
915
-
916
- },
917
- onceVar: {
918
- setGlobalObjectConstantProperties: cells[15].setGlobalObjectConstantProperties.set,
919
- setGlobalObjectMutableProperties: cells[15].setGlobalObjectMutableProperties.set,
920
-
921
- },
922
- });
923
- functors[16]({
924
- imports(entries) {
925
- const map = new Map(entries);
926
- for (const [name, observers] of map.get("./commons.js")) {
927
- const cell = cells[0][name];
928
- if (cell === undefined) {
929
- throw new ReferenceError(`Cannot import name ${name}`);
930
- }
931
- for (const observer of observers) {
932
- cell.observe(observer);
933
- }
934
- }
935
- for (const [name, observers] of map.get("./error/assert.js")) {
936
- const cell = cells[4][name];
937
- if (cell === undefined) {
938
- throw new ReferenceError(`Cannot import name ${name}`);
939
- }
940
- for (const observer of observers) {
941
- cell.observe(observer);
942
- }
943
- }
944
-
945
- },
946
- liveVar: {
947
-
948
- },
949
- onceVar: {
950
- makeAlias: cells[16].makeAlias.set,
951
- load: cells[16].load.set,
952
-
953
- },
954
- });
955
- functors[17]({
956
- imports(entries) {
957
- const map = new Map(entries);
958
- for (const [name, observers] of map.get("./commons.js")) {
959
- const cell = cells[0][name];
960
- if (cell === undefined) {
961
- throw new ReferenceError(`Cannot import name ${name}`);
962
- }
963
- for (const observer of observers) {
964
- cell.observe(observer);
965
- }
966
- }
967
- for (const [name, observers] of map.get("./error/assert.js")) {
968
- const cell = cells[4][name];
969
- if (cell === undefined) {
970
- throw new ReferenceError(`Cannot import name ${name}`);
971
- }
972
- for (const observer of observers) {
973
- cell.observe(observer);
974
- }
975
- }
976
- for (const [name, observers] of map.get("./module-load.js")) {
977
- const cell = cells[16][name];
978
- if (cell === undefined) {
979
- throw new ReferenceError(`Cannot import name ${name}`);
980
- }
981
- for (const observer of observers) {
982
- cell.observe(observer);
983
- }
984
- }
985
-
986
- },
987
- liveVar: {
988
-
989
- },
990
- onceVar: {
991
- deferExports: cells[17].deferExports.set,
992
- getDeferredExports: cells[17].getDeferredExports.set,
993
-
994
- },
995
- });
996
- functors[18]({
997
- imports(entries) {
998
- const map = new Map(entries);
999
- for (const [name, observers] of map.get("./commons.js")) {
1000
- const cell = cells[0][name];
1001
- if (cell === undefined) {
1002
- throw new ReferenceError(`Cannot import name ${name}`);
1003
- }
1004
- for (const observer of observers) {
1005
- cell.observe(observer);
1006
- }
1007
- }
1008
- for (const [name, observers] of map.get("./compartment-evaluate.js")) {
1009
- const cell = cells[11][name];
1010
- if (cell === undefined) {
1011
- throw new ReferenceError(`Cannot import name ${name}`);
1012
- }
1013
- for (const observer of observers) {
1014
- cell.observe(observer);
1015
- }
1016
- }
1017
- for (const [name, observers] of map.get("./error/assert.js")) {
1018
- const cell = cells[4][name];
1019
- if (cell === undefined) {
1020
- throw new ReferenceError(`Cannot import name ${name}`);
1021
- }
1022
- for (const observer of observers) {
1023
- cell.observe(observer);
1024
- }
1025
- }
1026
- for (const [name, observers] of map.get("./module-proxy.js")) {
1027
- const cell = cells[17][name];
1028
- if (cell === undefined) {
1029
- throw new ReferenceError(`Cannot import name ${name}`);
1030
- }
1031
- for (const observer of observers) {
1032
- cell.observe(observer);
1033
- }
1034
- }
1035
-
1036
- },
1037
- liveVar: {
1038
-
1039
- },
1040
- onceVar: {
1041
- makeThirdPartyModuleInstance: cells[18].makeThirdPartyModuleInstance.set,
1042
- makeModuleInstance: cells[18].makeModuleInstance.set,
1043
-
1044
- },
1045
- });
1046
- functors[19]({
1047
- imports(entries) {
1048
- const map = new Map(entries);
1049
- for (const [name, observers] of map.get("./commons.js")) {
1050
- const cell = cells[0][name];
1051
- if (cell === undefined) {
1052
- throw new ReferenceError(`Cannot import name ${name}`);
1053
- }
1054
- for (const observer of observers) {
1055
- cell.observe(observer);
1056
- }
1057
- }
1058
- for (const [name, observers] of map.get("./error/assert.js")) {
1059
- const cell = cells[4][name];
1060
- if (cell === undefined) {
1061
- throw new ReferenceError(`Cannot import name ${name}`);
1062
- }
1063
- for (const observer of observers) {
1064
- cell.observe(observer);
1065
- }
1066
- }
1067
- for (const [name, observers] of map.get("./module-instance.js")) {
1068
- const cell = cells[18][name];
1069
- if (cell === undefined) {
1070
- throw new ReferenceError(`Cannot import name ${name}`);
1071
- }
1072
- for (const observer of observers) {
1073
- cell.observe(observer);
1074
- }
1075
- }
1076
-
1077
- },
1078
- liveVar: {
1079
-
1080
- },
1081
- onceVar: {
1082
- link: cells[19].link.set,
1083
- instantiate: cells[19].instantiate.set,
1084
-
1085
- },
1086
- });
1087
- functors[20]({
1088
- imports(entries) {
1089
- const map = new Map(entries);
1090
- for (const [name, observers] of map.get("./commons.js")) {
1091
- const cell = cells[0][name];
1092
- if (cell === undefined) {
1093
- throw new ReferenceError(`Cannot import name ${name}`);
1094
- }
1095
- for (const observer of observers) {
1096
- cell.observe(observer);
1097
- }
1098
- }
1099
- for (const [name, observers] of map.get("./compartment-evaluate.js")) {
1100
- const cell = cells[11][name];
1101
- if (cell === undefined) {
1102
- throw new ReferenceError(`Cannot import name ${name}`);
1103
- }
1104
- for (const observer of observers) {
1105
- cell.observe(observer);
1106
- }
1107
- }
1108
- for (const [name, observers] of map.get("./error/assert.js")) {
1109
- const cell = cells[4][name];
1110
- if (cell === undefined) {
1111
- throw new ReferenceError(`Cannot import name ${name}`);
1112
- }
1113
- for (const observer of observers) {
1114
- cell.observe(observer);
1115
- }
1116
- }
1117
- for (const [name, observers] of map.get("./global-object.js")) {
1118
- const cell = cells[15][name];
1119
- if (cell === undefined) {
1120
- throw new ReferenceError(`Cannot import name ${name}`);
1121
- }
1122
- for (const observer of observers) {
1123
- cell.observe(observer);
1124
- }
1125
- }
1126
- for (const [name, observers] of map.get("./make-safe-evaluator.js")) {
1127
- const cell = cells[10][name];
1128
- if (cell === undefined) {
1129
- throw new ReferenceError(`Cannot import name ${name}`);
1130
- }
1131
- for (const observer of observers) {
1132
- cell.observe(observer);
1133
- }
1134
- }
1135
- for (const [name, observers] of map.get("./module-link.js")) {
1136
- const cell = cells[19][name];
1137
- if (cell === undefined) {
1138
- throw new ReferenceError(`Cannot import name ${name}`);
1139
- }
1140
- for (const observer of observers) {
1141
- cell.observe(observer);
1142
- }
1143
- }
1144
- for (const [name, observers] of map.get("./module-load.js")) {
1145
- const cell = cells[16][name];
1146
- if (cell === undefined) {
1147
- throw new ReferenceError(`Cannot import name ${name}`);
1148
- }
1149
- for (const observer of observers) {
1150
- cell.observe(observer);
1151
- }
1152
- }
1153
- for (const [name, observers] of map.get("./module-proxy.js")) {
1154
- const cell = cells[17][name];
1155
- if (cell === undefined) {
1156
- throw new ReferenceError(`Cannot import name ${name}`);
1157
- }
1158
- for (const observer of observers) {
1159
- cell.observe(observer);
1160
- }
1161
- }
1162
- for (const [name, observers] of map.get("./scope-constants.js")) {
1163
- const cell = cells[6][name];
1164
- if (cell === undefined) {
1165
- throw new ReferenceError(`Cannot import name ${name}`);
1166
- }
1167
- for (const observer of observers) {
1168
- cell.observe(observer);
1169
- }
1170
- }
1171
- for (const [name, observers] of map.get("./whitelist.js")) {
1172
- const cell = cells[14][name];
1173
- if (cell === undefined) {
1174
- throw new ReferenceError(`Cannot import name ${name}`);
1175
- }
1176
- for (const observer of observers) {
1177
- cell.observe(observer);
1178
- }
1179
- }
1180
-
1181
- },
1182
- liveVar: {
1183
-
1184
- },
1185
- onceVar: {
1186
- InertCompartment: cells[20].InertCompartment.set,
1187
- CompartmentPrototype: cells[20].CompartmentPrototype.set,
1188
- makeCompartmentConstructor: cells[20].makeCompartmentConstructor.set,
1189
-
1190
- },
1191
- });
1192
- functors[21]({
1193
- imports(entries) {
1194
- const map = new Map(entries);
1195
- for (const [name, observers] of map.get("./commons.js")) {
1196
- const cell = cells[0][name];
1197
- if (cell === undefined) {
1198
- throw new ReferenceError(`Cannot import name ${name}`);
1199
- }
1200
- for (const observer of observers) {
1201
- cell.observe(observer);
1202
- }
1203
- }
1204
- for (const [name, observers] of map.get("./compartment-shim.js")) {
1205
- const cell = cells[20][name];
1206
- if (cell === undefined) {
1207
- throw new ReferenceError(`Cannot import name ${name}`);
1208
- }
1209
- for (const observer of observers) {
1210
- cell.observe(observer);
1211
- }
1212
- }
1213
-
1214
- },
1215
- liveVar: {
1216
-
1217
- },
1218
- onceVar: {
1219
- getAnonymousIntrinsics: cells[21].getAnonymousIntrinsics.set,
1220
-
1221
- },
1222
- });
1223
- functors[22]({
1224
- imports(entries) {
1225
- const map = new Map(entries);
1226
- for (const [name, observers] of map.get("./commons.js")) {
1227
- const cell = cells[0][name];
1228
- if (cell === undefined) {
1229
- throw new ReferenceError(`Cannot import name ${name}`);
1230
- }
1231
- for (const observer of observers) {
1232
- cell.observe(observer);
1233
- }
1234
- }
1235
- for (const [name, observers] of map.get("./whitelist.js")) {
1236
- const cell = cells[14][name];
1237
- if (cell === undefined) {
1238
- throw new ReferenceError(`Cannot import name ${name}`);
1239
- }
1240
- for (const observer of observers) {
1241
- cell.observe(observer);
1242
- }
1243
- }
1244
-
1245
- },
1246
- liveVar: {
1247
-
1248
- },
1249
- onceVar: {
1250
- makeIntrinsicsCollector: cells[22].makeIntrinsicsCollector.set,
1251
- getGlobalIntrinsics: cells[22].getGlobalIntrinsics.set,
1252
-
1253
- },
1254
- });
1255
- functors[23]({
1256
- imports(entries) {
1257
- const map = new Map(entries);
1258
-
1259
- },
1260
- liveVar: {
1261
-
1262
- },
1263
- onceVar: {
1264
- minEnablements: cells[23].minEnablements.set,
1265
- moderateEnablements: cells[23].moderateEnablements.set,
1266
- severeEnablements: cells[23].severeEnablements.set,
1267
-
1268
- },
1269
- });
1270
- functors[24]({
1271
- imports(entries) {
1272
- const map = new Map(entries);
1273
- for (const [name, observers] of map.get("./commons.js")) {
1274
- const cell = cells[0][name];
1275
- if (cell === undefined) {
1276
- throw new ReferenceError(`Cannot import name ${name}`);
1277
- }
1278
- for (const observer of observers) {
1279
- cell.observe(observer);
1280
- }
1281
- }
1282
- for (const [name, observers] of map.get("./enablements.js")) {
1283
- const cell = cells[23][name];
1284
- if (cell === undefined) {
1285
- throw new ReferenceError(`Cannot import name ${name}`);
1286
- }
1287
- for (const observer of observers) {
1288
- cell.observe(observer);
1289
- }
1290
- }
1291
-
1292
- },
1293
- liveVar: {
1294
-
1295
- },
1296
- onceVar: {
1297
- default: cells[24].default.set,
1298
-
1299
- },
1300
- });
1301
- functors[25]({
1302
- imports(entries) {
1303
- const map = new Map(entries);
1304
- for (const [name, observers] of map.get("../commons.js")) {
1305
- const cell = cells[0][name];
1306
- if (cell === undefined) {
1307
- throw new ReferenceError(`Cannot import name ${name}`);
1308
- }
1309
- for (const observer of observers) {
1310
- cell.observe(observer);
1311
- }
1312
- }
1313
- for (const [name, observers] of map.get("./internal-types.js")) {
1314
- const cell = cells[1][name];
1315
- if (cell === undefined) {
1316
- throw new ReferenceError(`Cannot import name ${name}`);
1317
- }
1318
- for (const observer of observers) {
1319
- cell.observe(observer);
1320
- }
1321
- }
1322
- for (const [name, observers] of map.get("./types.js")) {
1323
- const cell = cells[3][name];
1324
- if (cell === undefined) {
1325
- throw new ReferenceError(`Cannot import name ${name}`);
1326
- }
1327
- for (const observer of observers) {
1328
- cell.observe(observer);
1329
- }
1330
- }
1331
-
1332
- },
1333
- liveVar: {
1334
-
1335
- },
1336
- onceVar: {
1337
- makeLoggingConsoleKit: cells[25].makeLoggingConsoleKit.set,
1338
- makeCausalConsole: cells[25].makeCausalConsole.set,
1339
- filterConsole: cells[25].filterConsole.set,
1340
- consoleWhitelist: cells[25].consoleWhitelist.set,
1341
- BASE_CONSOLE_LEVEL: cells[25].BASE_CONSOLE_LEVEL.set,
1342
-
1343
- },
1344
- });
1345
- functors[26]({
1346
- imports(entries) {
1347
- const map = new Map(entries);
1348
- for (const [name, observers] of map.get("../commons.js")) {
1349
- const cell = cells[0][name];
1350
- if (cell === undefined) {
1351
- throw new ReferenceError(`Cannot import name ${name}`);
1352
- }
1353
- for (const observer of observers) {
1354
- cell.observe(observer);
1355
- }
1356
- }
1357
- for (const [name, observers] of map.get("./assert.js")) {
1358
- const cell = cells[4][name];
1359
- if (cell === undefined) {
1360
- throw new ReferenceError(`Cannot import name ${name}`);
1361
- }
1362
- for (const observer of observers) {
1363
- cell.observe(observer);
1364
- }
1365
- }
1366
- for (const [name, observers] of map.get("./console.js")) {
1367
- const cell = cells[25][name];
1368
- if (cell === undefined) {
1369
- throw new ReferenceError(`Cannot import name ${name}`);
1370
- }
1371
- for (const observer of observers) {
1372
- cell.observe(observer);
1373
- }
1374
- }
1375
- for (const [name, observers] of map.get("./internal-types.js")) {
1376
- const cell = cells[1][name];
1377
- if (cell === undefined) {
1378
- throw new ReferenceError(`Cannot import name ${name}`);
1379
- }
1380
- for (const observer of observers) {
1381
- cell.observe(observer);
1382
- }
1383
- }
1384
- for (const [name, observers] of map.get("./types.js")) {
1385
- const cell = cells[3][name];
1386
- if (cell === undefined) {
1387
- throw new ReferenceError(`Cannot import name ${name}`);
1388
- }
1389
- for (const observer of observers) {
1390
- cell.observe(observer);
1391
- }
1392
- }
1393
-
1394
- },
1395
- liveVar: {
1396
-
1397
- },
1398
- onceVar: {
1399
- tameConsole: cells[26].tameConsole.set,
1400
-
1401
- },
1402
- });
1403
- functors[27]({
1404
- imports(entries) {
1405
- const map = new Map(entries);
1406
- for (const [name, observers] of map.get("../commons.js")) {
1407
- const cell = cells[0][name];
1408
- if (cell === undefined) {
1409
- throw new ReferenceError(`Cannot import name ${name}`);
1410
- }
1411
- for (const observer of observers) {
1412
- cell.observe(observer);
1413
- }
1414
- }
1415
-
1416
- },
1417
- liveVar: {
1418
-
1419
- },
1420
- onceVar: {
1421
- filterFileName: cells[27].filterFileName.set,
1422
- shortenCallSiteString: cells[27].shortenCallSiteString.set,
1423
- tameV8ErrorConstructor: cells[27].tameV8ErrorConstructor.set,
1424
-
1425
- },
1426
- });
1427
- functors[28]({
1428
- imports(entries) {
1429
- const map = new Map(entries);
1430
- for (const [name, observers] of map.get("../commons.js")) {
1431
- const cell = cells[0][name];
1432
- if (cell === undefined) {
1433
- throw new ReferenceError(`Cannot import name ${name}`);
1434
- }
1435
- for (const observer of observers) {
1436
- cell.observe(observer);
1437
- }
1438
- }
1439
- for (const [name, observers] of map.get("../whitelist.js")) {
1440
- const cell = cells[14][name];
1441
- if (cell === undefined) {
1442
- throw new ReferenceError(`Cannot import name ${name}`);
1443
- }
1444
- for (const observer of observers) {
1445
- cell.observe(observer);
1446
- }
1447
- }
1448
- for (const [name, observers] of map.get("./tame-v8-error-constructor.js")) {
1449
- const cell = cells[27][name];
1450
- if (cell === undefined) {
1451
- throw new ReferenceError(`Cannot import name ${name}`);
1452
- }
1453
- for (const observer of observers) {
1454
- cell.observe(observer);
1455
- }
1456
- }
1457
-
1458
- },
1459
- liveVar: {
1460
-
1461
- },
1462
- onceVar: {
1463
- default: cells[28].default.set,
1464
-
1465
- },
1466
- });
1467
- functors[29]({
1468
- imports(entries) {
1469
- const map = new Map(entries);
1470
- for (const [name, observers] of map.get("./commons.js")) {
1471
- const cell = cells[0][name];
1472
- if (cell === undefined) {
1473
- throw new ReferenceError(`Cannot import name ${name}`);
1474
- }
1475
- for (const observer of observers) {
1476
- cell.observe(observer);
1477
- }
1478
- }
1479
-
1480
- },
1481
- liveVar: {
1482
-
1483
- },
1484
- onceVar: {
1485
- makeHardener: cells[29].makeHardener.set,
1486
-
1487
- },
1488
- });
1489
- functors[30]({
1490
- imports(entries) {
1491
- const map = new Map(entries);
1492
- for (const [name, observers] of map.get("./commons.js")) {
1493
- const cell = cells[0][name];
1494
- if (cell === undefined) {
1495
- throw new ReferenceError(`Cannot import name ${name}`);
1496
- }
1497
- for (const observer of observers) {
1498
- cell.observe(observer);
1499
- }
1500
- }
1501
-
1502
- },
1503
- liveVar: {
1504
-
1505
- },
1506
- onceVar: {
1507
- default: cells[30].default.set,
1508
-
1509
- },
1510
- });
1511
- functors[31]({
1512
- imports(entries) {
1513
- const map = new Map(entries);
1514
- for (const [name, observers] of map.get("./commons.js")) {
1515
- const cell = cells[0][name];
1516
- if (cell === undefined) {
1517
- throw new ReferenceError(`Cannot import name ${name}`);
1518
- }
1519
- for (const observer of observers) {
1520
- cell.observe(observer);
1521
- }
1522
- }
1523
-
1524
- },
1525
- liveVar: {
1526
-
1527
- },
1528
- onceVar: {
1529
- tameDomains: cells[31].tameDomains.set,
1530
-
1531
- },
1532
- });
1533
- functors[32]({
1534
- imports(entries) {
1535
- const map = new Map(entries);
1536
- for (const [name, observers] of map.get("./commons.js")) {
1537
- const cell = cells[0][name];
1538
- if (cell === undefined) {
1539
- throw new ReferenceError(`Cannot import name ${name}`);
1540
- }
1541
- for (const observer of observers) {
1542
- cell.observe(observer);
1543
- }
1544
- }
1545
-
1546
- },
1547
- liveVar: {
1548
-
1549
- },
1550
- onceVar: {
1551
- default: cells[32].default.set,
1552
-
1553
- },
1554
- });
1555
- functors[33]({
1556
- imports(entries) {
1557
- const map = new Map(entries);
1558
- for (const [name, observers] of map.get("./commons.js")) {
1559
- const cell = cells[0][name];
1560
- if (cell === undefined) {
1561
- throw new ReferenceError(`Cannot import name ${name}`);
1562
- }
1563
- for (const observer of observers) {
1564
- cell.observe(observer);
1565
- }
1566
- }
1567
-
1568
- },
1569
- liveVar: {
1570
-
1571
- },
1572
- onceVar: {
1573
- tameFunctionToString: cells[33].tameFunctionToString.set,
1574
-
1575
- },
1576
- });
1577
- functors[34]({
1578
- imports(entries) {
1579
- const map = new Map(entries);
1580
- for (const [name, observers] of map.get("./commons.js")) {
1581
- const cell = cells[0][name];
1582
- if (cell === undefined) {
1583
- throw new ReferenceError(`Cannot import name ${name}`);
1584
- }
1585
- for (const observer of observers) {
1586
- cell.observe(observer);
1587
- }
1588
- }
1589
- for (const [name, observers] of map.get("./error/assert.js")) {
1590
- const cell = cells[4][name];
1591
- if (cell === undefined) {
1592
- throw new ReferenceError(`Cannot import name ${name}`);
1593
- }
1594
- for (const observer of observers) {
1595
- cell.observe(observer);
1596
- }
1597
- }
1598
-
1599
- },
1600
- liveVar: {
1601
-
1602
- },
1603
- onceVar: {
1604
- default: cells[34].default.set,
1605
-
1606
- },
1607
- });
1608
- functors[35]({
1609
- imports(entries) {
1610
- const map = new Map(entries);
1611
- for (const [name, observers] of map.get("./commons.js")) {
1612
- const cell = cells[0][name];
1613
- if (cell === undefined) {
1614
- throw new ReferenceError(`Cannot import name ${name}`);
1615
- }
1616
- for (const observer of observers) {
1617
- cell.observe(observer);
1618
- }
1619
- }
1620
-
1621
- },
1622
- liveVar: {
1623
-
1624
- },
1625
- onceVar: {
1626
- default: cells[35].default.set,
1627
-
1628
- },
1629
- });
1630
- functors[36]({
1631
- imports(entries) {
1632
- const map = new Map(entries);
1633
- for (const [name, observers] of map.get("./commons.js")) {
1634
- const cell = cells[0][name];
1635
- if (cell === undefined) {
1636
- throw new ReferenceError(`Cannot import name ${name}`);
1637
- }
1638
- for (const observer of observers) {
1639
- cell.observe(observer);
1640
- }
1641
- }
1642
-
1643
- },
1644
- liveVar: {
1645
-
1646
- },
1647
- onceVar: {
1648
- default: cells[36].default.set,
1649
-
1650
- },
1651
- });
1652
- functors[37]({
1653
- imports(entries) {
1654
- const map = new Map(entries);
1655
- for (const [name, observers] of map.get("./commons.js")) {
1656
- const cell = cells[0][name];
1657
- if (cell === undefined) {
1658
- throw new ReferenceError(`Cannot import name ${name}`);
1659
- }
1660
- for (const observer of observers) {
1661
- cell.observe(observer);
1662
- }
1663
- }
1664
- for (const [name, observers] of map.get("./whitelist.js")) {
1665
- const cell = cells[14][name];
1666
- if (cell === undefined) {
1667
- throw new ReferenceError(`Cannot import name ${name}`);
1668
- }
1669
- for (const observer of observers) {
1670
- cell.observe(observer);
1671
- }
1672
- }
1673
-
1674
- },
1675
- liveVar: {
1676
-
1677
- },
1678
- onceVar: {
1679
- default: cells[37].default.set,
1680
-
1681
- },
1682
- });
1683
- functors[38]({
1684
- imports(entries) {
1685
- const map = new Map(entries);
1686
- for (const [name, observers] of map.get("./commons.js")) {
1687
- const cell = cells[0][name];
1688
- if (cell === undefined) {
1689
- throw new ReferenceError(`Cannot import name ${name}`);
1690
- }
1691
- for (const observer of observers) {
1692
- cell.observe(observer);
1693
- }
1694
- }
1695
- for (const [name, observers] of map.get("./enable-property-overrides.js")) {
1696
- const cell = cells[24][name];
1697
- if (cell === undefined) {
1698
- throw new ReferenceError(`Cannot import name ${name}`);
1699
- }
1700
- for (const observer of observers) {
1701
- cell.observe(observer);
1702
- }
1703
- }
1704
- for (const [name, observers] of map.get("./error/assert.js")) {
1705
- const cell = cells[4][name];
1706
- if (cell === undefined) {
1707
- throw new ReferenceError(`Cannot import name ${name}`);
1708
- }
1709
- for (const observer of observers) {
1710
- cell.observe(observer);
1711
- }
1712
- }
1713
- for (const [name, observers] of map.get("./error/tame-console.js")) {
1714
- const cell = cells[26][name];
1715
- if (cell === undefined) {
1716
- throw new ReferenceError(`Cannot import name ${name}`);
1717
- }
1718
- for (const observer of observers) {
1719
- cell.observe(observer);
1720
- }
1721
- }
1722
- for (const [name, observers] of map.get("./error/tame-error-constructor.js")) {
1723
- const cell = cells[28][name];
1724
- if (cell === undefined) {
1725
- throw new ReferenceError(`Cannot import name ${name}`);
1726
- }
1727
- for (const observer of observers) {
1728
- cell.observe(observer);
1729
- }
1730
- }
1731
- for (const [name, observers] of map.get("./global-object.js")) {
1732
- const cell = cells[15][name];
1733
- if (cell === undefined) {
1734
- throw new ReferenceError(`Cannot import name ${name}`);
1735
- }
1736
- for (const observer of observers) {
1737
- cell.observe(observer);
1738
- }
1739
- }
1740
- for (const [name, observers] of map.get("./intrinsics.js")) {
1741
- const cell = cells[22][name];
1742
- if (cell === undefined) {
1743
- throw new ReferenceError(`Cannot import name ${name}`);
1744
- }
1745
- for (const observer of observers) {
1746
- cell.observe(observer);
1747
- }
1748
- }
1749
- for (const [name, observers] of map.get("./make-hardener.js")) {
1750
- const cell = cells[29][name];
1751
- if (cell === undefined) {
1752
- throw new ReferenceError(`Cannot import name ${name}`);
1753
- }
1754
- for (const observer of observers) {
1755
- cell.observe(observer);
1756
- }
1757
- }
1758
- for (const [name, observers] of map.get("./make-safe-evaluator.js")) {
1759
- const cell = cells[10][name];
1760
- if (cell === undefined) {
1761
- throw new ReferenceError(`Cannot import name ${name}`);
1762
- }
1763
- for (const observer of observers) {
1764
- cell.observe(observer);
1765
- }
1766
- }
1767
- for (const [name, observers] of map.get("./tame-date-constructor.js")) {
1768
- const cell = cells[30][name];
1769
- if (cell === undefined) {
1770
- throw new ReferenceError(`Cannot import name ${name}`);
1771
- }
1772
- for (const observer of observers) {
1773
- cell.observe(observer);
1774
- }
1775
- }
1776
- for (const [name, observers] of map.get("./tame-domains.js")) {
1777
- const cell = cells[31][name];
1778
- if (cell === undefined) {
1779
- throw new ReferenceError(`Cannot import name ${name}`);
1780
- }
1781
- for (const observer of observers) {
1782
- cell.observe(observer);
1783
- }
1784
- }
1785
- for (const [name, observers] of map.get("./tame-function-constructors.js")) {
1786
- const cell = cells[32][name];
1787
- if (cell === undefined) {
1788
- throw new ReferenceError(`Cannot import name ${name}`);
1789
- }
1790
- for (const observer of observers) {
1791
- cell.observe(observer);
1792
- }
1793
- }
1794
- for (const [name, observers] of map.get("./tame-function-tostring.js")) {
1795
- const cell = cells[33][name];
1796
- if (cell === undefined) {
1797
- throw new ReferenceError(`Cannot import name ${name}`);
1798
- }
1799
- for (const observer of observers) {
1800
- cell.observe(observer);
1801
- }
1802
- }
1803
- for (const [name, observers] of map.get("./tame-locale-methods.js")) {
1804
- const cell = cells[34][name];
1805
- if (cell === undefined) {
1806
- throw new ReferenceError(`Cannot import name ${name}`);
1807
- }
1808
- for (const observer of observers) {
1809
- cell.observe(observer);
1810
- }
1811
- }
1812
- for (const [name, observers] of map.get("./tame-math-object.js")) {
1813
- const cell = cells[35][name];
1814
- if (cell === undefined) {
1815
- throw new ReferenceError(`Cannot import name ${name}`);
1816
- }
1817
- for (const observer of observers) {
1818
- cell.observe(observer);
1819
- }
1820
- }
1821
- for (const [name, observers] of map.get("./tame-regexp-constructor.js")) {
1822
- const cell = cells[36][name];
1823
- if (cell === undefined) {
1824
- throw new ReferenceError(`Cannot import name ${name}`);
1825
- }
1826
- for (const observer of observers) {
1827
- cell.observe(observer);
1828
- }
1829
- }
1830
- for (const [name, observers] of map.get("./whitelist-intrinsics.js")) {
1831
- const cell = cells[37][name];
1832
- if (cell === undefined) {
1833
- throw new ReferenceError(`Cannot import name ${name}`);
1834
- }
1835
- for (const observer of observers) {
1836
- cell.observe(observer);
1837
- }
1838
- }
1839
- for (const [name, observers] of map.get("./whitelist.js")) {
1840
- const cell = cells[14][name];
1841
- if (cell === undefined) {
1842
- throw new ReferenceError(`Cannot import name ${name}`);
1843
- }
1844
- for (const observer of observers) {
1845
- cell.observe(observer);
1846
- }
1847
- }
1848
-
1849
- },
1850
- liveVar: {
1851
-
1852
- },
1853
- onceVar: {
1854
- repairIntrinsics: cells[38].repairIntrinsics.set,
1855
- makeLockdown: cells[38].makeLockdown.set,
1856
-
1857
- },
1858
- });
1859
- functors[39]({
1860
- imports(entries) {
1861
- const map = new Map(entries);
1862
- for (const [name, observers] of map.get("./src/commons.js")) {
1863
- const cell = cells[0][name];
1864
- if (cell === undefined) {
1865
- throw new ReferenceError(`Cannot import name ${name}`);
1866
- }
1867
- for (const observer of observers) {
1868
- cell.observe(observer);
1869
- }
1870
- }
1871
- for (const [name, observers] of map.get("./src/compartment-shim.js")) {
1872
- const cell = cells[20][name];
1873
- if (cell === undefined) {
1874
- throw new ReferenceError(`Cannot import name ${name}`);
1875
- }
1876
- for (const observer of observers) {
1877
- cell.observe(observer);
1878
- }
1879
- }
1880
- for (const [name, observers] of map.get("./src/error/assert.js")) {
1881
- const cell = cells[4][name];
1882
- if (cell === undefined) {
1883
- throw new ReferenceError(`Cannot import name ${name}`);
1884
- }
1885
- for (const observer of observers) {
1886
- cell.observe(observer);
1887
- }
1888
- }
1889
- for (const [name, observers] of map.get("./src/get-anonymous-intrinsics.js")) {
1890
- const cell = cells[21][name];
1891
- if (cell === undefined) {
1892
- throw new ReferenceError(`Cannot import name ${name}`);
1893
- }
1894
- for (const observer of observers) {
1895
- cell.observe(observer);
1896
- }
1897
- }
1898
- for (const [name, observers] of map.get("./src/intrinsics.js")) {
1899
- const cell = cells[22][name];
1900
- if (cell === undefined) {
1901
- throw new ReferenceError(`Cannot import name ${name}`);
1902
- }
1903
- for (const observer of observers) {
1904
- cell.observe(observer);
1905
- }
1906
- }
1907
- for (const [name, observers] of map.get("./src/lockdown-shim.js")) {
1908
- const cell = cells[38][name];
1909
- if (cell === undefined) {
1910
- throw new ReferenceError(`Cannot import name ${name}`);
1911
- }
1912
- for (const observer of observers) {
1913
- cell.observe(observer);
1914
- }
1915
- }
1916
- for (const [name, observers] of map.get("./src/tame-function-tostring.js")) {
1917
- const cell = cells[33][name];
1918
- if (cell === undefined) {
1919
- throw new ReferenceError(`Cannot import name ${name}`);
1920
- }
1921
- for (const observer of observers) {
1922
- cell.observe(observer);
1923
- }
1924
- }
1925
-
1926
- },
1927
- liveVar: {
1928
-
1929
- },
1930
- onceVar: {
1931
-
1932
- },
1933
- });
1934
-
1935
-
1936
- })([
1937
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); /* global globalThis */
2
+ (() => {
3
+ const functors = [
4
+ // === functors[0] ===
5
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); /* global globalThis */
1938
6
  /* eslint-disable no-restricted-globals */
1939
7
 
1940
8
  /**
@@ -2008,7 +76,7 @@ const {
2008
76
  matchAll: matchAllSymbol } =
2009
77
  Symbol;$h‍_once.speciesSymbol(speciesSymbol);$h‍_once.toStringTagSymbol(toStringTagSymbol);$h‍_once.iteratorSymbol(iteratorSymbol);$h‍_once.matchAllSymbol(matchAllSymbol);
2010
78
 
2011
- const { stringify: stringifyJson } = JSON;
79
+ const { stringify: stringifyJson } = JSON;$h‍_once.stringifyJson(stringifyJson);
2012
80
 
2013
81
  // At time of this writing, we still support Node 10 which doesn't have
2014
82
  // `Object.fromEntries`. If it is absent, this should be an adequate
@@ -2016,7 +84,7 @@ const { stringify: stringifyJson } = JSON;
2016
84
  // By the terminology of https://ponyfoo.com/articles/polyfills-or-ponyfills
2017
85
  // it is a ponyfill rather than a polyfill or shim because we do not
2018
86
  // install it on `Object`.
2019
- $h‍_once.stringifyJson(stringifyJson);const objectFromEntries = (entryPairs) => {
87
+ const objectFromEntries = (entryPairs) => {
2020
88
  const result = {};
2021
89
  for (const [prop, val] of entryPairs) {
2022
90
  result[prop] = val;
@@ -2024,10 +92,10 @@ $h‍_once.stringifyJson(stringifyJson);const objectFromEntries = (entryPairs) =
2024
92
  return result;
2025
93
  };
2026
94
 
2027
- const fromEntries = Object.fromEntries || objectFromEntries;
95
+ const fromEntries = Object.fromEntries || objectFromEntries;$h‍_once.fromEntries(fromEntries);
2028
96
 
2029
97
  // Needed only for the Safari bug workaround below
2030
- $h‍_once.fromEntries(fromEntries);const { defineProperty: originalDefineProperty } = Object;
98
+ const { defineProperty: originalDefineProperty } = Object;
2031
99
 
2032
100
  const defineProperty = (object, prop, descriptor) => {
2033
101
  // We used to do the following, until we had to reopen Safari bug
@@ -2070,7 +138,7 @@ const { prototype: stringPrototype } = String;$h‍_once.stringPrototype(stringP
2070
138
  const { prototype: weakmapPrototype } = WeakMap;$h‍_once.weakmapPrototype(weakmapPrototype);
2071
139
  const { prototype: weaksetPrototype } = WeakSet;$h‍_once.weaksetPrototype(weaksetPrototype);
2072
140
  const { prototype: functionPrototype } = Function;$h‍_once.functionPrototype(functionPrototype);
2073
- const { prototype: promisePrototype } = Promise;
141
+ const { prototype: promisePrototype } = Promise;$h‍_once.promisePrototype(promisePrototype);
2074
142
 
2075
143
  /**
2076
144
  * uncurryThis()
@@ -2086,12 +154,12 @@ const { prototype: promisePrototype } = Promise;
2086
154
  * http://web.archive.org/web/20160805225710/http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming
2087
155
  *
2088
156
  * @param {(thisArg: Object, ...args: any[]) => any} fn
2089
- */$h‍_once.promisePrototype(promisePrototype);
157
+ */
2090
158
  const uncurryThis = (fn) => (thisArg, ...args) => apply(fn, thisArg, args);$h‍_once.uncurryThis(uncurryThis);
2091
159
 
2092
- const objectHasOwnProperty = uncurryThis(objectPrototype.hasOwnProperty);
160
+ const objectHasOwnProperty = uncurryThis(objectPrototype.hasOwnProperty);$h‍_once.objectHasOwnProperty(objectHasOwnProperty);
2093
161
  //
2094
- $h‍_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter = uncurryThis(arrayPrototype.filter);$h‍_once.arrayFilter(arrayFilter);
162
+ const arrayFilter = uncurryThis(arrayPrototype.filter);$h‍_once.arrayFilter(arrayFilter);
2095
163
  const arrayForEach = uncurryThis(arrayPrototype.forEach);$h‍_once.arrayForEach(arrayForEach);
2096
164
  const arrayIncludes = uncurryThis(arrayPrototype.includes);$h‍_once.arrayIncludes(arrayIncludes);
2097
165
  const arrayJoin = uncurryThis(arrayPrototype.join);$h‍_once.arrayJoin(arrayJoin);
@@ -2101,23 +169,23 @@ const arrayPush = uncurryThis(arrayPrototype.push);$h‍_once.arrayPush(arrayPus
2101
169
  const arraySlice = uncurryThis(arrayPrototype.slice);$h‍_once.arraySlice(arraySlice);
2102
170
  const arraySome = uncurryThis(arrayPrototype.some);$h‍_once.arraySome(arraySome);
2103
171
  const arraySort = uncurryThis(arrayPrototype.sort);$h‍_once.arraySort(arraySort);
2104
- const iterateArray = uncurryThis(arrayPrototype[iteratorSymbol]);
172
+ const iterateArray = uncurryThis(arrayPrototype[iteratorSymbol]);$h‍_once.iterateArray(iterateArray);
2105
173
  //
2106
- $h‍_once.iterateArray(iterateArray);const mapSet = uncurryThis(mapPrototype.set);$h‍_once.mapSet(mapSet);
174
+ const mapSet = uncurryThis(mapPrototype.set);$h‍_once.mapSet(mapSet);
2107
175
  const mapGet = uncurryThis(mapPrototype.get);$h‍_once.mapGet(mapGet);
2108
176
  const mapHas = uncurryThis(mapPrototype.has);$h‍_once.mapHas(mapHas);
2109
- const iterateMap = uncurryThis(mapPrototype[iteratorSymbol]);
177
+ const iterateMap = uncurryThis(mapPrototype[iteratorSymbol]);$h‍_once.iterateMap(iterateMap);
2110
178
  //
2111
- $h‍_once.iterateMap(iterateMap);const setAdd = uncurryThis(setPrototype.add);$h‍_once.setAdd(setAdd);
179
+ const setAdd = uncurryThis(setPrototype.add);$h‍_once.setAdd(setAdd);
2112
180
  const setForEach = uncurryThis(setPrototype.forEach);$h‍_once.setForEach(setForEach);
2113
181
  const setHas = uncurryThis(setPrototype.has);$h‍_once.setHas(setHas);
2114
- const iterateSet = uncurryThis(setPrototype[iteratorSymbol]);
182
+ const iterateSet = uncurryThis(setPrototype[iteratorSymbol]);$h‍_once.iterateSet(iterateSet);
2115
183
  //
2116
- $h‍_once.iterateSet(iterateSet);const regexpTest = uncurryThis(regexpPrototype.test);$h‍_once.regexpTest(regexpTest);
184
+ const regexpTest = uncurryThis(regexpPrototype.test);$h‍_once.regexpTest(regexpTest);
2117
185
  const regexpExec = uncurryThis(regexpPrototype.exec);$h‍_once.regexpExec(regexpExec);
2118
- const matchAllRegExp = uncurryThis(regexpPrototype[matchAllSymbol]);
186
+ const matchAllRegExp = uncurryThis(regexpPrototype[matchAllSymbol]);$h‍_once.matchAllRegExp(matchAllRegExp);
2119
187
  //
2120
- $h‍_once.matchAllRegExp(matchAllRegExp);const stringEndsWith = uncurryThis(stringPrototype.endsWith);$h‍_once.stringEndsWith(stringEndsWith);
188
+ const stringEndsWith = uncurryThis(stringPrototype.endsWith);$h‍_once.stringEndsWith(stringEndsWith);
2121
189
  const stringIncludes = uncurryThis(stringPrototype.includes);$h‍_once.stringIncludes(stringIncludes);
2122
190
  const stringIndexOf = uncurryThis(stringPrototype.indexOf);$h‍_once.stringIndexOf(stringIndexOf);
2123
191
  const stringMatch = uncurryThis(stringPrototype.match);$h‍_once.stringMatch(stringMatch);
@@ -2126,38 +194,38 @@ const stringSearch = uncurryThis(stringPrototype.search);$h‍_once.stringSearch
2126
194
  const stringSlice = uncurryThis(stringPrototype.slice);$h‍_once.stringSlice(stringSlice);
2127
195
  const stringSplit = uncurryThis(stringPrototype.split);$h‍_once.stringSplit(stringSplit);
2128
196
  const stringStartsWith = uncurryThis(stringPrototype.startsWith);$h‍_once.stringStartsWith(stringStartsWith);
2129
- const iterateString = uncurryThis(stringPrototype[iteratorSymbol]);
197
+ const iterateString = uncurryThis(stringPrototype[iteratorSymbol]);$h‍_once.iterateString(iterateString);
2130
198
  //
2131
- $h‍_once.iterateString(iterateString);const weakmapDelete = uncurryThis(weakmapPrototype.delete);$h‍_once.weakmapDelete(weakmapDelete);
199
+ const weakmapDelete = uncurryThis(weakmapPrototype.delete);$h‍_once.weakmapDelete(weakmapDelete);
2132
200
  const weakmapGet = uncurryThis(weakmapPrototype.get);$h‍_once.weakmapGet(weakmapGet);
2133
201
  const weakmapHas = uncurryThis(weakmapPrototype.has);$h‍_once.weakmapHas(weakmapHas);
2134
- const weakmapSet = uncurryThis(weakmapPrototype.set);
202
+ const weakmapSet = uncurryThis(weakmapPrototype.set);$h‍_once.weakmapSet(weakmapSet);
2135
203
  //
2136
- $h‍_once.weakmapSet(weakmapSet);const weaksetAdd = uncurryThis(weaksetPrototype.add);$h‍_once.weaksetAdd(weaksetAdd);
204
+ const weaksetAdd = uncurryThis(weaksetPrototype.add);$h‍_once.weaksetAdd(weaksetAdd);
2137
205
  const weaksetGet = uncurryThis(weaksetPrototype.get);$h‍_once.weaksetGet(weaksetGet);
2138
- const weaksetHas = uncurryThis(weaksetPrototype.has);
206
+ const weaksetHas = uncurryThis(weaksetPrototype.has);$h‍_once.weaksetHas(weaksetHas);
2139
207
  //
2140
- $h‍_once.weaksetHas(weaksetHas);const functionToString = uncurryThis(functionPrototype.toString);
208
+ const functionToString = uncurryThis(functionPrototype.toString);$h‍_once.functionToString(functionToString);
2141
209
  //
2142
- $h‍_once.functionToString(functionToString);const { all } = Promise;
210
+ const { all } = Promise;
2143
211
  const promiseAll = (promises) => apply(all, Promise, [promises]);$h‍_once.promiseAll(promiseAll);
2144
212
  const promiseCatch = uncurryThis(promisePrototype.catch);$h‍_once.promiseCatch(promiseCatch);
2145
- const promiseThen = uncurryThis(promisePrototype.then);
213
+ const promiseThen = uncurryThis(promisePrototype.then);$h‍_once.promiseThen(promiseThen);
2146
214
 
2147
215
  /**
2148
216
  * getConstructorOf()
2149
217
  * Return the constructor from an instance.
2150
218
  *
2151
219
  * @param {Function} fn
2152
- */$h‍_once.promiseThen(promiseThen);
220
+ */
2153
221
  const getConstructorOf = (fn) =>
2154
- reflectGet(getPrototypeOf(fn), 'constructor');
222
+ reflectGet(getPrototypeOf(fn), 'constructor');$h‍_once.getConstructorOf(getConstructorOf);
2155
223
 
2156
224
  /**
2157
225
  * immutableObject
2158
226
  * An immutable (frozen) empty object that is safe to share.
2159
- */$h‍_once.getConstructorOf(getConstructorOf);
2160
- const immutableObject = freeze(create(null));
227
+ */
228
+ const immutableObject = freeze(create(null));$h‍_once.immutableObject(immutableObject);
2161
229
 
2162
230
  /**
2163
231
  * isObject tests whether a value is an object.
@@ -2175,8 +243,8 @@ const immutableObject = freeze(create(null));
2175
243
  * attempting to box a primitive.
2176
244
  *
2177
245
  * @param {any} value
2178
- */$h‍_once.immutableObject(immutableObject);
2179
- const isObject = (value) => Object(value) === value;
246
+ */
247
+ const isObject = (value) => Object(value) === value;$h‍_once.isObject(isObject);
2180
248
 
2181
249
  /**
2182
250
  * isError tests whether an object inherits from the intrinsic
@@ -2188,22 +256,22 @@ const isObject = (value) => Object(value) === value;
2188
256
  * for such a trivial case outside commons.js, we provide a utility function.
2189
257
  *
2190
258
  * @param {any} value
2191
- */$h‍_once.isObject(isObject);
2192
- const isError = (value) => value instanceof FERAL_ERROR;
259
+ */
260
+ const isError = (value) => value instanceof FERAL_ERROR;$h‍_once.isError(isError);
2193
261
 
2194
262
  // The original unsafe untamed eval function, which must not escape.
2195
263
  // Sample at module initialization time, which is before lockdown can
2196
264
  // repair it. Use it only to build powerless abstractions.
2197
265
  // eslint-disable-next-line no-eval
2198
- $h‍_once.isError(isError);const FERAL_EVAL = eval;
266
+ const FERAL_EVAL = eval;$h‍_once.FERAL_EVAL(FERAL_EVAL);
2199
267
 
2200
268
  // The original unsafe untamed Function constructor, which must not escape.
2201
269
  // Sample at module initialization time, which is before lockdown can
2202
270
  // repair it. Use it only to build powerless abstractions.
2203
- $h‍_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION = Function;$h‍_once.FERAL_FUNCTION(FERAL_FUNCTION);
271
+ const FERAL_FUNCTION = Function;$h‍_once.FERAL_FUNCTION(FERAL_FUNCTION);
2204
272
  })
2205
-
2206
273
  ,
274
+ // === functors[1] ===
2207
275
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); // @ts-check
2208
276
 
2209
277
  /**
@@ -2294,9 +362,12 @@ $h‍_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION = Function;$h‍_once.FER
2294
362
  * @returns {VirtualConsole}
2295
363
  */
2296
364
  })
2297
-
2298
365
  ,
2299
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Set,String,freeze,is,isError,setAdd,setHas,stringStartsWith,stringIncludes,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
366
+ // === functors[2] ===
367
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Set,String,arrayJoin,arraySlice,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
368
+
369
+
370
+
2300
371
 
2301
372
 
2302
373
 
@@ -2311,6 +382,26 @@ $h‍_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION = Function;$h‍_once.FER
2311
382
 
2312
383
 
2313
384
 
385
+ /**
386
+ * Joins English terms with commas and an optional conjunction.
387
+ *
388
+ * @param {string[]} terms
389
+ * @param {"and" | "or"} conjunction
390
+ */
391
+ const enJoin = (terms, conjunction) => {
392
+ if (terms.length === 0) {
393
+ return '(none)';
394
+ } else if (terms.length === 1) {
395
+ return terms[0];
396
+ } else if (terms.length === 2) {
397
+ const [first, second] = terms;
398
+ return `${first} ${conjunction} ${second}`;
399
+ } else {
400
+ return `${arrayJoin(arraySlice(terms, 0, -1), ', ')}, ${conjunction} ${
401
+ terms[terms.length - 1]
402
+ }`;
403
+ }
404
+ };$h‍_once.enJoin(enJoin);
2314
405
 
2315
406
  /**
2316
407
  * Prepend the correct indefinite article onto a noun, typically a typeof
@@ -2442,8 +533,8 @@ const bestEffortStringify = (payload, spaces = undefined) => {
2442
533
  };$h‍_once.bestEffortStringify(bestEffortStringify);
2443
534
  freeze(bestEffortStringify);
2444
535
  })
2445
-
2446
536
  ,
537
+ // === functors[3] ===
2447
538
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); // @ts-check
2448
539
 
2449
540
  /**
@@ -2795,8 +886,8 @@ freeze(bestEffortStringify);
2795
886
  * @returns {VirtualConsole}
2796
887
  */
2797
888
  })
2798
-
2799
889
  ,
890
+ // === functors[4] ===
2800
891
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,globalThis,is,isError,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,an,bestEffortStringify;$h‍_imports([["../commons.js", [["RangeError", [$h‍_a => (RangeError = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["WeakMap", [$h‍_a => (WeakMap = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["arrayPop", [$h‍_a => (arrayPop = $h‍_a)]],["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["assign", [$h‍_a => (assign = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["stringIndexOf", [$h‍_a => (stringIndexOf = $h‍_a)]],["stringReplace", [$h‍_a => (stringReplace = $h‍_a)]],["stringSlice", [$h‍_a => (stringSlice = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["weakmapDelete", [$h‍_a => (weakmapDelete = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]],["weakmapHas", [$h‍_a => (weakmapHas = $h‍_a)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]]]],["./stringify-utils.js", [["an", [$h‍_a => (an = $h‍_a)]],["bestEffortStringify", [$h‍_a => (bestEffortStringify = $h‍_a)]]]],["./types.js", []],["./internal-types.js", []]]);
2801
892
 
2802
893
 
@@ -3243,8 +1334,8 @@ freeze(makeAssert);
3243
1334
  /** @type {Assert} */
3244
1335
  const assert = makeAssert();$h‍_once.assert(assert);
3245
1336
  })
3246
-
3247
1337
  ,
1338
+ // === functors[5] ===
3248
1339
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_FUNCTION,arrayJoin;$h‍_imports([["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]]]]]);
3249
1340
 
3250
1341
  /**
@@ -3317,8 +1408,8 @@ const makeEvaluateFactory = (constants = []) => {
3317
1408
  `);
3318
1409
  };$h‍_once.makeEvaluateFactory(makeEvaluateFactory);
3319
1410
  })
3320
-
3321
1411
  ,
1412
+ // === functors[6] ===
3322
1413
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,objectHasOwnProperty,regexpTest;$h‍_imports([["./commons.js", [["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["arrayIncludes", [$h‍_a => (arrayIncludes = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getOwnPropertyNames", [$h‍_a => (getOwnPropertyNames = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["regexpTest", [$h‍_a => (regexpTest = $h‍_a)]]]]]);
3323
1414
 
3324
1415
 
@@ -3427,11 +1518,11 @@ const isValidIdentifierName = (name) => {
3427
1518
  !arrayIncludes(keywords, name) &&
3428
1519
  regexpTest(identifierPattern, name));
3429
1520
 
3430
- };
1521
+ };$h‍_once.isValidIdentifierName(isValidIdentifierName);
3431
1522
 
3432
1523
  /*
3433
1524
  * isImmutableDataProperty
3434
- */$h‍_once.isValidIdentifierName(isValidIdentifierName);
1525
+ */
3435
1526
 
3436
1527
  function isImmutableDataProperty(obj, name) {
3437
1528
  const desc = getOwnPropertyDescriptor(obj, name);
@@ -3495,8 +1586,8 @@ const getScopeConstants = (globalObject, localObject = {}) => {
3495
1586
  return [...globalConstants, ...localConstants];
3496
1587
  };$h‍_once.getScopeConstants(getScopeConstants);
3497
1588
  })
3498
-
3499
1589
  ,
1590
+ // === functors[7] ===
3500
1591
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_EVAL,Proxy,String,TypeError,create,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,immutableObject,objectHasOwnProperty,reflectGet,reflectSet,assert;$h‍_imports([["./commons.js", [["FERAL_EVAL", [$h‍_a => (FERAL_EVAL = $h‍_a)]],["Proxy", [$h‍_a => (Proxy = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["immutableObject", [$h‍_a => (immutableObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["reflectGet", [$h‍_a => (reflectGet = $h‍_a)]],["reflectSet", [$h‍_a => (reflectSet = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
3501
1592
 
3502
1593
 
@@ -3711,8 +1802,8 @@ localObject = {},
3711
1802
 
3712
1803
  };$h‍_once.createScopeHandler(createScopeHandler);
3713
1804
  })
3714
-
3715
1805
  ,
1806
+ // === functors[8] ===
3716
1807
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_REG_EXP,regexpExec,stringSlice;$h‍_imports([["./commons.js", [["FERAL_REG_EXP", [$h‍_a => (FERAL_REG_EXP = $h‍_a)]],["regexpExec", [$h‍_a => (regexpExec = $h‍_a)]],["stringSlice", [$h‍_a => (stringSlice = $h‍_a)]]]]]);
3717
1808
 
3718
1809
  // Captures a key and value of the form #key=value or @key=value
@@ -3761,8 +1852,8 @@ const getSourceURL = (src) => {
3761
1852
  return sourceURL;
3762
1853
  };$h‍_once.getSourceURL(getSourceURL);
3763
1854
  })
3764
-
3765
1855
  ,
1856
+ // === functors[9] ===
3766
1857
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,getSourceURL;$h‍_imports([["./commons.js", [["FERAL_REG_EXP", [$h‍_a => (FERAL_REG_EXP = $h‍_a)]],["SyntaxError", [$h‍_a => (SyntaxError = $h‍_a)]],["stringReplace", [$h‍_a => (stringReplace = $h‍_a)]],["stringSearch", [$h‍_a => (stringSearch = $h‍_a)]],["stringSlice", [$h‍_a => (stringSlice = $h‍_a)]],["stringSplit", [$h‍_a => (stringSplit = $h‍_a)]]]],["./get-source-url.js", [["getSourceURL", [$h‍_a => (getSourceURL = $h‍_a)]]]]]);
3767
1858
 
3768
1859
 
@@ -3837,7 +1928,7 @@ const rejectHtmlComments = (src) => {
3837
1928
  throw new SyntaxError(
3838
1929
  `Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`);
3839
1930
 
3840
- };
1931
+ };$h‍_once.rejectHtmlComments(rejectHtmlComments);
3841
1932
 
3842
1933
  /**
3843
1934
  * An optional transform to place ahead of `rejectHtmlComments` to evade *that*
@@ -3860,14 +1951,14 @@ const rejectHtmlComments = (src) => {
3860
1951
  *
3861
1952
  * @param { string } src
3862
1953
  * @returns { string }
3863
- */$h‍_once.rejectHtmlComments(rejectHtmlComments);
1954
+ */
3864
1955
  const evadeHtmlCommentTest = (src) => {
3865
1956
  const replaceFn = (match) => match[0] === '<' ? '< ! --' : '-- >';
3866
1957
  return stringReplace(src, htmlCommentPattern, replaceFn);
3867
- };
1958
+ };$h‍_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
3868
1959
 
3869
1960
  // /////////////////////////////////////////////////////////////////////////////
3870
- $h‍_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
1961
+
3871
1962
  const importPattern = new FERAL_REG_EXP(
3872
1963
  '(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))',
3873
1964
  'g');
@@ -3912,7 +2003,7 @@ const rejectImportExpressions = (src) => {
3912
2003
  throw new SyntaxError(
3913
2004
  `Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`);
3914
2005
 
3915
- };
2006
+ };$h‍_once.rejectImportExpressions(rejectImportExpressions);
3916
2007
 
3917
2008
  /**
3918
2009
  * An optional transform to place ahead of `rejectImportExpressions` to evade
@@ -3929,14 +2020,14 @@ const rejectImportExpressions = (src) => {
3929
2020
  *
3930
2021
  * @param { string } src
3931
2022
  * @returns { string }
3932
- */$h‍_once.rejectImportExpressions(rejectImportExpressions);
2023
+ */
3933
2024
  const evadeImportExpressionTest = (src) => {
3934
2025
  const replaceFn = (_, p1, p2) => `${p1}__import__${p2}`;
3935
2026
  return stringReplace(src, importPattern, replaceFn);
3936
- };
2027
+ };$h‍_once.evadeImportExpressionTest(evadeImportExpressionTest);
3937
2028
 
3938
2029
  // /////////////////////////////////////////////////////////////////////////////
3939
- $h‍_once.evadeImportExpressionTest(evadeImportExpressionTest);
2030
+
3940
2031
  const someDirectEvalPattern = new FERAL_REG_EXP(
3941
2032
  '(^|[^.])\\beval(\\s*\\()',
3942
2033
  'g');
@@ -3983,7 +2074,7 @@ const rejectSomeDirectEvalExpressions = (src) => {
3983
2074
  throw new SyntaxError(
3984
2075
  `Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`);
3985
2076
 
3986
- };
2077
+ };$h‍_once.rejectSomeDirectEvalExpressions(rejectSomeDirectEvalExpressions);
3987
2078
 
3988
2079
  // /////////////////////////////////////////////////////////////////////////////
3989
2080
 
@@ -3993,12 +2084,12 @@ const rejectSomeDirectEvalExpressions = (src) => {
3993
2084
  *
3994
2085
  * @param {string} source
3995
2086
  * @returns {string}
3996
- */$h‍_once.rejectSomeDirectEvalExpressions(rejectSomeDirectEvalExpressions);
2087
+ */
3997
2088
  const mandatoryTransforms = (source) => {
3998
2089
  source = rejectHtmlComments(source);
3999
2090
  source = rejectImportExpressions(source);
4000
2091
  return source;
4001
- };
2092
+ };$h‍_once.mandatoryTransforms(mandatoryTransforms);
4002
2093
 
4003
2094
  /**
4004
2095
  * Starting with `source`, apply each transform to the result of the
@@ -4007,7 +2098,7 @@ const mandatoryTransforms = (source) => {
4007
2098
  * @param {string} source
4008
2099
  * @param {((str: string) => string)[]} transforms
4009
2100
  * @returns {string}
4010
- */$h‍_once.mandatoryTransforms(mandatoryTransforms);
2101
+ */
4011
2102
  const applyTransforms = (source, transforms) => {
4012
2103
  for (const transform of transforms) {
4013
2104
  source = transform(source);
@@ -4015,8 +2106,8 @@ const applyTransforms = (source, transforms) => {
4015
2106
  return source;
4016
2107
  };$h‍_once.applyTransforms(applyTransforms);
4017
2108
  })
4018
-
4019
2109
  ,
2110
+ // === functors[10] ===
4020
2111
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let WeakSet,apply,immutableObject,proxyRevocable,weaksetAdd,getScopeConstants,createScopeHandler,applyTransforms,mandatoryTransforms,makeEvaluateFactory,assert;$h‍_imports([["./commons.js", [["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["apply", [$h‍_a => (apply = $h‍_a)]],["immutableObject", [$h‍_a => (immutableObject = $h‍_a)]],["proxyRevocable", [$h‍_a => (proxyRevocable = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]]]],["./scope-constants.js", [["getScopeConstants", [$h‍_a => (getScopeConstants = $h‍_a)]]]],["./scope-handler.js", [["createScopeHandler", [$h‍_a => (createScopeHandler = $h‍_a)]]]],["./transforms.js", [["applyTransforms", [$h‍_a => (applyTransforms = $h‍_a)]],["mandatoryTransforms", [$h‍_a => (mandatoryTransforms = $h‍_a)]]]],["./make-evaluate-factory.js", [["makeEvaluateFactory", [$h‍_a => (makeEvaluateFactory = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
4021
2112
 
4022
2113
 
@@ -4135,8 +2226,8 @@ const makeSafeEvaluator = ({
4135
2226
  return { safeEvaluate };
4136
2227
  };$h‍_once.makeSafeEvaluator(makeSafeEvaluator);
4137
2228
  })
4138
-
4139
2229
  ,
2230
+ // === functors[11] ===
4140
2231
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let TypeError,arrayPush,create,defineProperties,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h‍_imports([["./commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]]]],["./transforms.js", [["evadeHtmlCommentTest", [$h‍_a => (evadeHtmlCommentTest = $h‍_a)]],["evadeImportExpressionTest", [$h‍_a => (evadeImportExpressionTest = $h‍_a)]],["rejectSomeDirectEvalExpressions", [$h‍_a => (rejectSomeDirectEvalExpressions = $h‍_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h‍_a => (makeSafeEvaluator = $h‍_a)]]]]]);
4141
2232
 
4142
2233
 
@@ -4240,8 +2331,8 @@ const compartmentEvaluate = (compartmentFields, source, options) => {
4240
2331
 
4241
2332
  };$h‍_once.compartmentEvaluate(compartmentEvaluate);
4242
2333
  })
4243
-
4244
2334
  ,
2335
+ // === functors[12] ===
4245
2336
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); /*
4246
2337
  * makeEvalFunction()
4247
2338
  * A safe version of the native eval function which relies on
@@ -4268,8 +2359,8 @@ const makeEvalFunction = (safeEvaluate) => {
4268
2359
  return newEval;
4269
2360
  };$h‍_once.makeEvalFunction(makeEvalFunction);
4270
2361
  })
4271
-
4272
2362
  ,
2363
+ // === functors[13] ===
4273
2364
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h‍_imports([["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arrayPop", [$h‍_a => (arrayPop = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
4274
2365
 
4275
2366
 
@@ -4351,8 +2442,8 @@ const makeFunctionConstructor = (safeEvaluate) => {
4351
2442
  return newFunction;
4352
2443
  };$h‍_once.makeFunctionConstructor(makeFunctionConstructor);
4353
2444
  })
4354
-
4355
2445
  ,
2446
+ // === functors[14] ===
4356
2447
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); /* eslint-disable no-restricted-globals */
4357
2448
  /**
4358
2449
  * @file Exports {@code whitelist}, a recursively defined
@@ -4376,7 +2467,7 @@ const constantProperties = {
4376
2467
 
4377
2468
  Infinity,
4378
2469
  NaN,
4379
- undefined };
2470
+ undefined };$h‍_once.constantProperties(constantProperties);
4380
2471
 
4381
2472
 
4382
2473
  /**
@@ -4384,7 +2475,7 @@ const constantProperties = {
4384
2475
  * Properties of all global objects.
4385
2476
  * Must be powerless.
4386
2477
  * Maps from property name to the intrinsic name in the whitelist.
4387
- */$h‍_once.constantProperties(constantProperties);
2478
+ */
4388
2479
  const universalPropertyNames = {
4389
2480
  // *** Function Properties of the Global Object
4390
2481
 
@@ -4448,7 +2539,7 @@ const universalPropertyNames = {
4448
2539
  lockdown: 'lockdown',
4449
2540
  harden: 'harden',
4450
2541
  HandledPromise: 'HandledPromise' // TODO: Until Promise.delegate (see below).
4451
- };
2542
+ };$h‍_once.universalPropertyNames(universalPropertyNames);
4452
2543
 
4453
2544
  /**
4454
2545
  * initialGlobalPropertyNames
@@ -4456,7 +2547,7 @@ const universalPropertyNames = {
4456
2547
  * start compartment, as well as any compartments created before lockdown.
4457
2548
  * These may provide much of the power provided by the original.
4458
2549
  * Maps from property name to the intrinsic name in the whitelist.
4459
- */$h‍_once.universalPropertyNames(universalPropertyNames);
2550
+ */
4460
2551
  const initialGlobalPropertyNames = {
4461
2552
  // *** Constructor Properties of the Global Object
4462
2553
 
@@ -4478,14 +2569,14 @@ const initialGlobalPropertyNames = {
4478
2569
  // TODO https://github.com/Agoric/SES-shim/issues/551
4479
2570
  // Need initial WeakRef and FinalizationGroup in
4480
2571
  // start compartment only.
4481
- };
2572
+ };$h‍_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
4482
2573
 
4483
2574
  /**
4484
2575
  * sharedGlobalPropertyNames
4485
2576
  * Those found only on the globals of new compartments created after lockdown,
4486
2577
  * which must therefore be powerless.
4487
2578
  * Maps from property name to the intrinsic name in the whitelist.
4488
- */$h‍_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
2579
+ */
4489
2580
  const sharedGlobalPropertyNames = {
4490
2581
  // *** Constructor Properties of the Global Object
4491
2582
 
@@ -4495,7 +2586,7 @@ const sharedGlobalPropertyNames = {
4495
2586
 
4496
2587
  // *** Other Properties of the Global Object
4497
2588
 
4498
- Math: '%SharedMath%' };
2589
+ Math: '%SharedMath%' };$h‍_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
4499
2590
 
4500
2591
 
4501
2592
  /**
@@ -4504,7 +2595,7 @@ const sharedGlobalPropertyNames = {
4504
2595
  * of the start compartment.
4505
2596
  * Maps from property name to the intrinsic name in the whitelist
4506
2597
  * (which is currently always the same).
4507
- */$h‍_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
2598
+ */
4508
2599
  const uniqueGlobalPropertyNames = {
4509
2600
  // *** Value Properties of the Global Object
4510
2601
 
@@ -4525,18 +2616,18 @@ const uniqueGlobalPropertyNames = {
4525
2616
  Compartment: '%UniqueCompartment%'
4526
2617
  // According to current agreements, eventually the Realm constructor too.
4527
2618
  // 'Realm',
4528
- };
2619
+ };$h‍_once.uniqueGlobalPropertyNames(uniqueGlobalPropertyNames);
4529
2620
 
4530
2621
  // All the "subclasses" of Error. These are collectively represented in the
4531
2622
  // ECMAScript spec by the meta variable NativeError.
4532
2623
  // TODO Add AggregateError https://github.com/Agoric/SES-shim/issues/550
4533
- $h‍_once.uniqueGlobalPropertyNames(uniqueGlobalPropertyNames);const NativeErrors = [
2624
+ const NativeErrors = [
4534
2625
  EvalError,
4535
2626
  RangeError,
4536
2627
  ReferenceError,
4537
2628
  SyntaxError,
4538
2629
  TypeError,
4539
- URIError];
2630
+ URIError];$h‍_once.NativeErrors(NativeErrors);
4540
2631
 
4541
2632
 
4542
2633
  /**
@@ -4583,17 +2674,17 @@ URIError];
4583
2674
  */
4584
2675
 
4585
2676
  // Function Instances
4586
- $h‍_once.NativeErrors(NativeErrors);const FunctionInstance = {
2677
+ const FunctionInstance = {
4587
2678
  '[[Proto]]': '%FunctionPrototype%',
4588
2679
  length: 'number',
4589
2680
  name: 'string'
4590
2681
  // Do not specify "prototype" here, since only Function instances that can
4591
2682
  // be used as a constructor have a prototype property. For constructors,
4592
2683
  // since prototype properties are instance-specific, we define it there.
4593
- };
2684
+ };$h‍_once.FunctionInstance(FunctionInstance);
4594
2685
 
4595
2686
  // AsyncFunction Instances
4596
- $h‍_once.FunctionInstance(FunctionInstance);const AsyncFunctionInstance = {
2687
+ const AsyncFunctionInstance = {
4597
2688
  // This property is not mentioned in ECMA 262, but is present in V8 and
4598
2689
  // necessary for lockdown to succeed.
4599
2690
  '[[Proto]]': '%AsyncFunctionPrototype%' };
@@ -4621,10 +2712,10 @@ const accessor = {
4621
2712
 
4622
2713
  const isAccessorPermit = (permit) => {
4623
2714
  return permit === getter || permit === accessor;
4624
- };
2715
+ };$h‍_once.isAccessorPermit(isAccessorPermit);
4625
2716
 
4626
2717
  // NativeError Object Structure
4627
- $h‍_once.isAccessorPermit(isAccessorPermit);function NativeError(prototype) {
2718
+ function NativeError(prototype) {
4628
2719
  return {
4629
2720
  // Properties of the NativeError Constructors
4630
2721
  '[[Proto]]': '%SharedError%',
@@ -4779,7 +2870,9 @@ const whitelist = {
4779
2870
  prototype: '%ObjectPrototype%',
4780
2871
  seal: fn,
4781
2872
  setPrototypeOf: fn,
4782
- values: fn },
2873
+ values: fn,
2874
+ // See https://github.com/tc39/proposal-accessible-object-hasownproperty
2875
+ hasOwn: fn },
4783
2876
 
4784
2877
 
4785
2878
  '%ObjectPrototype%': {
@@ -5276,7 +3369,10 @@ const whitelist = {
5276
3369
 
5277
3370
  // Failed tc39 proposal
5278
3371
  // Seen on FF Nightly 88.0a1
5279
- at: false },
3372
+ at: false,
3373
+ // See https://github.com/tc39/proposal-array-find-from-last
3374
+ findLast: fn,
3375
+ findLastIndex: fn },
5280
3376
 
5281
3377
 
5282
3378
  '%ArrayIteratorPrototype%': {
@@ -5332,7 +3428,10 @@ const whitelist = {
5332
3428
  '@@toStringTag': getter,
5333
3429
  // Failed tc39 proposal
5334
3430
  // Seen on FF Nightly 88.0a1
5335
- at: false },
3431
+ at: false,
3432
+ // See https://github.com/tc39/proposal-array-find-from-last
3433
+ findLast: fn,
3434
+ findLastIndex: fn },
5336
3435
 
5337
3436
 
5338
3437
  // The TypedArray Constructors
@@ -5471,7 +3570,12 @@ const whitelist = {
5471
3570
  slice: fn,
5472
3571
  '@@toStringTag': 'string',
5473
3572
  // See https://github.com/Moddable-OpenSource/moddable/issues/523
5474
- concat: false },
3573
+ concat: false,
3574
+ // See https://github.com/tc39/proposal-resizablearraybuffer
3575
+ transfer: fn,
3576
+ resize: fn,
3577
+ resizable: getter,
3578
+ maxByteLength: getter },
5475
3579
 
5476
3580
 
5477
3581
  // SharedArrayBuffer Objects
@@ -5707,8 +3811,8 @@ const whitelist = {
5707
3811
 
5708
3812
  '%InitialGetStackString%': fn };$h‍_once.whitelist(whitelist);
5709
3813
  })
5710
-
5711
3814
  ,
3815
+ // === functors[15] ===
5712
3816
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let defineProperty,objectHasOwnProperty,entries,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h‍_imports([["./commons.js", [["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["entries", [$h‍_a => (entries = $h‍_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h‍_a => (makeEvalFunction = $h‍_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h‍_a => (makeFunctionConstructor = $h‍_a)]]]],["./whitelist.js", [["constantProperties", [$h‍_a => (constantProperties = $h‍_a)]],["universalPropertyNames", [$h‍_a => (universalPropertyNames = $h‍_a)]]]]]);
5713
3817
 
5714
3818
 
@@ -5731,7 +3835,7 @@ const setGlobalObjectConstantProperties = (globalObject) => {
5731
3835
  configurable: false });
5732
3836
 
5733
3837
  }
5734
- };
3838
+ };$h‍_once.setGlobalObjectConstantProperties(setGlobalObjectConstantProperties);
5735
3839
 
5736
3840
  /**
5737
3841
  * setGlobalObjectMutableProperties()
@@ -5747,7 +3851,7 @@ const setGlobalObjectConstantProperties = (globalObject) => {
5747
3851
  * @param {Function} param1.makeCompartmentConstructor
5748
3852
  * @param {(string, Object?) => any} param1.safeEvaluate
5749
3853
  * @param {(Object) => void} param1.markVirtualizedNativeFunction
5750
- */$h‍_once.setGlobalObjectConstantProperties(setGlobalObjectConstantProperties);
3854
+ */
5751
3855
  const setGlobalObjectMutableProperties = (
5752
3856
  globalObject,
5753
3857
  {
@@ -5807,8 +3911,8 @@ globalObject,
5807
3911
  }
5808
3912
  };$h‍_once.setGlobalObjectMutableProperties(setGlobalObjectMutableProperties);
5809
3913
  })
5810
-
5811
3914
  ,
3915
+ // === functors[16] ===
5812
3916
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let ReferenceError,TypeError,Map,Set,arrayJoin,arrayMap,arrayPush,create,freeze,mapGet,mapHas,mapSet,setAdd,promiseCatch,promiseThen,values,weakmapGet,assert;$h‍_imports([["./commons.js", [["ReferenceError", [$h‍_a => (ReferenceError = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["Map", [$h‍_a => (Map = $h‍_a)]],["Set", [$h‍_a => (Set = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["mapGet", [$h‍_a => (mapGet = $h‍_a)]],["mapHas", [$h‍_a => (mapHas = $h‍_a)]],["mapSet", [$h‍_a => (mapSet = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["promiseCatch", [$h‍_a => (promiseCatch = $h‍_a)]],["promiseThen", [$h‍_a => (promiseThen = $h‍_a)]],["values", [$h‍_a => (values = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
5813
3917
 
5814
3918
 
@@ -5851,12 +3955,12 @@ const noop = () => {};
5851
3955
  const makeAlias = (compartment, specifier) =>
5852
3956
  freeze({
5853
3957
  compartment,
5854
- specifier });
3958
+ specifier });$h‍_once.makeAlias(makeAlias);
5855
3959
 
5856
3960
 
5857
3961
  // `resolveAll` pre-computes resolutions of all imports within the compartment
5858
3962
  // in which a module was loaded.
5859
- $h‍_once.makeAlias(makeAlias);const resolveAll = (imports, resolveHook, fullReferrerSpecifier) => {
3963
+ const resolveAll = (imports, resolveHook, fullReferrerSpecifier) => {
5860
3964
  const resolvedImports = create(null);
5861
3965
  for (const importSpecifier of imports) {
5862
3966
  const fullSpecifier = resolveHook(importSpecifier, fullReferrerSpecifier);
@@ -6135,8 +4239,8 @@ moduleSpecifier) =>
6135
4239
  }
6136
4240
  };$h‍_once.load(load);
6137
4241
  })
6138
-
6139
4242
  ,
4243
+ // === functors[17] ===
6140
4244
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,weakmapSet,assert;$h‍_imports([["./module-load.js", [["makeAlias", [$h‍_a => (makeAlias = $h‍_a)]]]],["./commons.js", [["Proxy", [$h‍_a => (Proxy = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["mapGet", [$h‍_a => (mapGet = $h‍_a)]],["mapHas", [$h‍_a => (mapHas = $h‍_a)]],["mapSet", [$h‍_a => (mapSet = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["reflectGet", [$h‍_a => (reflectGet = $h‍_a)]],["reflectGetOwnPropertyDescriptor", [$h‍_a => (reflectGetOwnPropertyDescriptor = $h‍_a)]],["reflectHas", [$h‍_a => (reflectHas = $h‍_a)]],["reflectIsExtensible", [$h‍_a => (reflectIsExtensible = $h‍_a)]],["reflectPreventExtensions", [$h‍_a => (reflectPreventExtensions = $h‍_a)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
6141
4245
 
6142
4246
 
@@ -6284,14 +4388,14 @@ const deferExports = () => {
6284
4388
  } }) });
6285
4389
 
6286
4390
 
6287
- };
4391
+ };$h‍_once.deferExports(deferExports);
6288
4392
 
6289
4393
  // `getDeferredExports` memoizes the creation of a deferred module exports
6290
4394
  // namespace proxy for any abritrary full specifier in a compartment.
6291
4395
  // It also records the compartment and specifier affiliated with that module
6292
4396
  // exports namespace proxy so it can be used as an alias into another
6293
4397
  // compartment when threaded through a compartment's `moduleMap` argument.
6294
- $h‍_once.deferExports(deferExports);const getDeferredExports = (
4398
+ const getDeferredExports = (
6295
4399
  compartment,
6296
4400
  compartmentPrivateFields,
6297
4401
  moduleAliases,
@@ -6310,8 +4414,8 @@ specifier) =>
6310
4414
  return mapGet(deferredExports, specifier);
6311
4415
  };$h‍_once.getDeferredExports(getDeferredExports);
6312
4416
  })
6313
-
6314
4417
  ,
4418
+ // === functors[18] ===
6315
4419
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,compartmentEvaluate;$h‍_imports([["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h‍_a => (getDeferredExports = $h‍_a)]]]],["./commons.js", [["ReferenceError", [$h‍_a => (ReferenceError = $h‍_a)]],["SyntaxError", [$h‍_a => (SyntaxError = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayForEach", [$h‍_a => (arrayForEach = $h‍_a)]],["arrayIncludes", [$h‍_a => (arrayIncludes = $h‍_a)]],["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["arraySome", [$h‍_a => (arraySome = $h‍_a)]],["arraySort", [$h‍_a => (arraySort = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["entries", [$h‍_a => (entries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["isArray", [$h‍_a => (isArray = $h‍_a)]],["keys", [$h‍_a => (keys = $h‍_a)]],["mapGet", [$h‍_a => (mapGet = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h‍_a => (compartmentEvaluate = $h‍_a)]]]]]);
6316
4420
 
6317
4421
 
@@ -6406,7 +4510,7 @@ resolvedImports) =>
6406
4510
  }
6407
4511
  } });
6408
4512
 
6409
- };
4513
+ };$h‍_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);
6410
4514
 
6411
4515
  // `makeModuleInstance` takes a module's compartment record, the live import
6412
4516
  // namespace, and a global object; and produces a module instance.
@@ -6415,7 +4519,7 @@ resolvedImports) =>
6415
4519
  // an idempotent execute function.
6416
4520
  // The module exports namespace is a proxy to the proxied exports namespace
6417
4521
  // that the execution of the module instance populates.
6418
- $h‍_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);const makeModuleInstance = (
4522
+ const makeModuleInstance = (
6419
4523
  privateFields,
6420
4524
  moduleAliases,
6421
4525
  moduleRecord,
@@ -6757,8 +4861,8 @@ importedInstances) =>
6757
4861
 
6758
4862
  };$h‍_once.makeModuleInstance(makeModuleInstance);
6759
4863
  })
6760
-
6761
4864
  ,
4865
+ // === functors[19] ===
6762
4866
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let assert,makeModuleInstance,makeThirdPartyModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isObject,mapGet,mapHas,mapSet,weakmapGet;$h‍_imports([["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]],["./module-instance.js", [["makeModuleInstance", [$h‍_a => (makeModuleInstance = $h‍_a)]],["makeThirdPartyModuleInstance", [$h‍_a => (makeThirdPartyModuleInstance = $h‍_a)]]]],["./commons.js", [["Map", [$h‍_a => (Map = $h‍_a)]],["ReferenceError", [$h‍_a => (ReferenceError = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["entries", [$h‍_a => (entries = $h‍_a)]],["isArray", [$h‍_a => (isArray = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["mapGet", [$h‍_a => (mapGet = $h‍_a)]],["mapHas", [$h‍_a => (mapHas = $h‍_a)]],["mapSet", [$h‍_a => (mapSet = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]]]]]);
6763
4867
 
6764
4868
 
@@ -6955,8 +5059,8 @@ moduleRecord) =>
6955
5059
  return moduleInstance;
6956
5060
  };$h‍_once.instantiate(instantiate);
6957
5061
  })
6958
-
6959
5062
  ,
5063
+ // === functors[20] ===
6960
5064
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Map,ReferenceError,TypeError,WeakMap,WeakSet,arrayFilter,arrayJoin,assign,defineProperties,entries,freeze,getOwnPropertyNames,promiseThen,weakmapGet,weakmapSet,weaksetHas,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,isValidIdentifierName,sharedGlobalPropertyNames,load,link,getDeferredExports,assert,compartmentEvaluate,makeSafeEvaluator;$h‍_imports([["./commons.js", [["Map", [$h‍_a => (Map = $h‍_a)]],["ReferenceError", [$h‍_a => (ReferenceError = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["WeakMap", [$h‍_a => (WeakMap = $h‍_a)]],["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["assign", [$h‍_a => (assign = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["entries", [$h‍_a => (entries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["getOwnPropertyNames", [$h‍_a => (getOwnPropertyNames = $h‍_a)]],["promiseThen", [$h‍_a => (promiseThen = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h‍_a => (setGlobalObjectConstantProperties = $h‍_a)]],["setGlobalObjectMutableProperties", [$h‍_a => (setGlobalObjectMutableProperties = $h‍_a)]]]],["./scope-constants.js", [["isValidIdentifierName", [$h‍_a => (isValidIdentifierName = $h‍_a)]]]],["./whitelist.js", [["sharedGlobalPropertyNames", [$h‍_a => (sharedGlobalPropertyNames = $h‍_a)]]]],["./module-load.js", [["load", [$h‍_a => (load = $h‍_a)]]]],["./module-link.js", [["link", [$h‍_a => (link = $h‍_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h‍_a => (getDeferredExports = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h‍_a => (compartmentEvaluate = $h‍_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h‍_a => (makeSafeEvaluator = $h‍_a)]]]]]);
6961
5065
 
6962
5066
 
@@ -7030,12 +5134,12 @@ _options = {})
7030
5134
  throw new TypeError(
7031
5135
  'Compartment.prototype.constructor is not a valid constructor.');
7032
5136
 
7033
- };
5137
+ };$h‍_once.InertCompartment(InertCompartment);
7034
5138
 
7035
5139
  /**
7036
5140
  * @param {Compartment} compartment
7037
5141
  * @param {string} specifier
7038
- */$h‍_once.InertCompartment(InertCompartment);
5142
+ */
7039
5143
  const compartmentImportNow = (compartment, specifier) => {
7040
5144
  const { execute, exportsProxy } = link(
7041
5145
  privateFields,
@@ -7280,150 +5384,9 @@ markVirtualizedNativeFunction) =>
7280
5384
  return Compartment;
7281
5385
  };$h‍_once.makeCompartmentConstructor(makeCompartmentConstructor);
7282
5386
  })
7283
-
7284
5387
  ,
7285
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,InertCompartment;$h‍_imports([["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["Float32Array", [$h‍_a => (Float32Array = $h‍_a)]],["Map", [$h‍_a => (Map = $h‍_a)]],["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]],["iterateArray", [$h‍_a => (iterateArray = $h‍_a)]],["iterateMap", [$h‍_a => (iterateMap = $h‍_a)]],["iterateSet", [$h‍_a => (iterateSet = $h‍_a)]],["iterateString", [$h‍_a => (iterateString = $h‍_a)]],["matchAllRegExp", [$h‍_a => (matchAllRegExp = $h‍_a)]],["matchAllSymbol", [$h‍_a => (matchAllSymbol = $h‍_a)]],["regexpPrototype", [$h‍_a => (regexpPrototype = $h‍_a)]]]],["./compartment-shim.js", [["InertCompartment", [$h‍_a => (InertCompartment = $h‍_a)]]]]]);
7286
-
7287
-
7288
-
7289
-
7290
-
7291
-
7292
-
7293
-
7294
-
7295
-
7296
-
7297
-
7298
-
7299
-
7300
-
7301
-
7302
-
7303
- /**
7304
- * Object.getConstructorOf()
7305
- * Helper function to improve readability, similar to Object.getPrototypeOf().
7306
- *
7307
- * @param {Object} obj
7308
- */
7309
- function getConstructorOf(obj) {
7310
- return getPrototypeOf(obj).constructor;
7311
- }
7312
-
7313
- // getAnonymousIntrinsics uses a utility function to construct an arguments
7314
- // object, since it cannot have one of its own and also be a const export.
7315
- function makeArguments() {
7316
- // eslint-disable-next-line prefer-rest-params
7317
- return arguments;
7318
- }
7319
-
7320
- /**
7321
- * getAnonymousIntrinsics()
7322
- * Get the intrinsics not otherwise reachable by named own property
7323
- * traversal from the global object.
7324
- *
7325
- * @returns {Object}
7326
- */
7327
- const getAnonymousIntrinsics = () => {
7328
- const InertFunction = FERAL_FUNCTION.prototype.constructor;
7329
-
7330
- // 9.2.4.1 %ThrowTypeError%
7331
-
7332
- const ThrowTypeError = getOwnPropertyDescriptor(makeArguments(), 'callee').
7333
- get;
7334
-
7335
- // 21.1.5.2 The %StringIteratorPrototype% Object
7336
-
7337
- // eslint-disable-next-line no-new-wrappers
7338
- const StringIteratorObject = iterateString(new String());
7339
- const StringIteratorPrototype = getPrototypeOf(StringIteratorObject);
7340
-
7341
- // 21.2.7.1 The %RegExpStringIteratorPrototype% Object
7342
- const RegExpStringIterator =
7343
- regexpPrototype[matchAllSymbol] && matchAllRegExp(/./);
7344
- const RegExpStringIteratorPrototype =
7345
- RegExpStringIterator && getPrototypeOf(RegExpStringIterator);
7346
-
7347
- // 22.1.5.2 The %ArrayIteratorPrototype% Object
7348
-
7349
- // eslint-disable-next-line no-array-constructor
7350
- const ArrayIteratorObject = iterateArray([]);
7351
- const ArrayIteratorPrototype = getPrototypeOf(ArrayIteratorObject);
7352
-
7353
- // 22.2.1 The %TypedArray% Intrinsic Object
7354
-
7355
- const TypedArray = getPrototypeOf(Float32Array);
7356
-
7357
- // 23.1.5.2 The %MapIteratorPrototype% Object
7358
-
7359
- const MapIteratorObject = iterateMap(new Map());
7360
- const MapIteratorPrototype = getPrototypeOf(MapIteratorObject);
7361
-
7362
- // 23.2.5.2 The %SetIteratorPrototype% Object
7363
-
7364
- const SetIteratorObject = iterateSet(new Set());
7365
- const SetIteratorPrototype = getPrototypeOf(SetIteratorObject);
7366
-
7367
- // 25.1.2 The %IteratorPrototype% Object
7368
-
7369
- const IteratorPrototype = getPrototypeOf(ArrayIteratorPrototype);
7370
-
7371
- // 25.2.1 The GeneratorFunction Constructor
7372
-
7373
- // eslint-disable-next-line no-empty-function
7374
- function* GeneratorFunctionInstance() {}
7375
- const GeneratorFunction = getConstructorOf(GeneratorFunctionInstance);
7376
-
7377
- // 25.2.3 Properties of the GeneratorFunction Prototype Object
7378
-
7379
- const Generator = GeneratorFunction.prototype;
7380
-
7381
- // 25.3.1 The AsyncGeneratorFunction Constructor
7382
-
7383
- // eslint-disable-next-line no-empty-function
7384
- async function* AsyncGeneratorFunctionInstance() {}
7385
- const AsyncGeneratorFunction = getConstructorOf(
7386
- AsyncGeneratorFunctionInstance);
7387
-
7388
-
7389
- // 25.3.2.2 AsyncGeneratorFunction.prototype
7390
- const AsyncGenerator = AsyncGeneratorFunction.prototype;
7391
- // 25.5.1 Properties of the AsyncGenerator Prototype Object
7392
- const AsyncGeneratorPrototype = AsyncGenerator.prototype;
7393
- const AsyncIteratorPrototype = getPrototypeOf(AsyncGeneratorPrototype);
7394
-
7395
- // 25.7.1 The AsyncFunction Constructor
7396
-
7397
- // eslint-disable-next-line no-empty-function
7398
- async function AsyncFunctionInstance() {}
7399
- const AsyncFunction = getConstructorOf(AsyncFunctionInstance);
7400
-
7401
- const intrinsics = {
7402
- '%InertFunction%': InertFunction,
7403
- '%ArrayIteratorPrototype%': ArrayIteratorPrototype,
7404
- '%InertAsyncFunction%': AsyncFunction,
7405
- '%AsyncGenerator%': AsyncGenerator,
7406
- '%InertAsyncGeneratorFunction%': AsyncGeneratorFunction,
7407
- '%AsyncGeneratorPrototype%': AsyncGeneratorPrototype,
7408
- '%AsyncIteratorPrototype%': AsyncIteratorPrototype,
7409
- '%Generator%': Generator,
7410
- '%InertGeneratorFunction%': GeneratorFunction,
7411
- '%IteratorPrototype%': IteratorPrototype,
7412
- '%MapIteratorPrototype%': MapIteratorPrototype,
7413
- '%RegExpStringIteratorPrototype%': RegExpStringIteratorPrototype,
7414
- '%SetIteratorPrototype%': SetIteratorPrototype,
7415
- '%StringIteratorPrototype%': StringIteratorPrototype,
7416
- '%ThrowTypeError%': ThrowTypeError,
7417
- '%TypedArray%': TypedArray,
7418
- '%InertCompartment%': InertCompartment };
7419
-
7420
-
7421
- return intrinsics;
7422
- };$h‍_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
7423
- })
7424
-
7425
- ,
7426
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let TypeError,WeakSet,arrayFilter,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,whitelist;$h‍_imports([["./commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["entries", [$h‍_a => (entries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["values", [$h‍_a => (values = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]],["./whitelist.js", [["constantProperties", [$h‍_a => (constantProperties = $h‍_a)]],["sharedGlobalPropertyNames", [$h‍_a => (sharedGlobalPropertyNames = $h‍_a)]],["universalPropertyNames", [$h‍_a => (universalPropertyNames = $h‍_a)]],["whitelist", [$h‍_a => (whitelist = $h‍_a)]]]]]);
5388
+ // === functors[21] ===
5389
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let TypeError,WeakSet,arrayFilter,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,whitelist;$h‍_imports([["./commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["entries", [$h‍_a => (entries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["values", [$h‍_a => (values = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]],["./whitelist.js", [["constantProperties", [$h‍_a => (constantProperties = $h‍_a)]],["sharedGlobalPropertyNames", [$h‍_a => (sharedGlobalPropertyNames = $h‍_a)]],["universalPropertyNames", [$h‍_a => (universalPropertyNames = $h‍_a)]],["whitelist", [$h‍_a => (whitelist = $h‍_a)]]]]]);
7427
5390
 
7428
5391
 
7429
5392
 
@@ -7572,7 +5535,7 @@ const makeIntrinsicsCollector = () => {
7572
5535
  addIntrinsics(sampleGlobals(globalThis, universalPropertyNames));
7573
5536
 
7574
5537
  return intrinsicsCollector;
7575
- };
5538
+ };$h‍_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
7576
5539
 
7577
5540
  /**
7578
5541
  * getGlobalIntrinsics()
@@ -7586,7 +5549,7 @@ const makeIntrinsicsCollector = () => {
7586
5549
  * *original* unsafe (feral, untamed) bindings of these global variables.
7587
5550
  *
7588
5551
  * @param {Object} globalObject
7589
- */$h‍_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
5552
+ */
7590
5553
  const getGlobalIntrinsics = (globalObject) => {
7591
5554
  const { addIntrinsics, finalIntrinsics } = makeIntrinsicsCollector();
7592
5555
 
@@ -7595,8 +5558,8 @@ const getGlobalIntrinsics = (globalObject) => {
7595
5558
  return finalIntrinsics();
7596
5559
  };$h‍_once.getGlobalIntrinsics(getGlobalIntrinsics);
7597
5560
  })
7598
-
7599
5561
  ,
5562
+ // === functors[22] ===
7600
5563
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { $h‍_imports([]); /**
7601
5564
  * @file Exports {@code enablements}, a recursively defined
7602
5565
  * JSON record defining the optimum set of intrinsics properties
@@ -7672,12 +5635,12 @@ const minEnablements = {
7672
5635
 
7673
5636
  '%ErrorPrototype%': {
7674
5637
  name: true // set by "precond", "ava", "node-fetch"
7675
- } };
5638
+ } };$h‍_once.minEnablements(minEnablements);
7676
5639
 
7677
5640
 
7678
5641
  /**
7679
5642
  * Moderate enablements are usually good enough for legacy compat.
7680
- */$h‍_once.minEnablements(minEnablements);
5643
+ */
7681
5644
  const moderateEnablements = {
7682
5645
  '%ObjectPrototype%': {
7683
5646
  toString: true,
@@ -7750,7 +5713,7 @@ const moderateEnablements = {
7750
5713
 
7751
5714
 
7752
5715
  '%IteratorPrototype%': {
7753
- toString: true } };
5716
+ toString: true } };$h‍_once.moderateEnablements(moderateEnablements);
7754
5717
 
7755
5718
 
7756
5719
 
@@ -7759,7 +5722,7 @@ const moderateEnablements = {
7759
5722
  * https://github.com/endojs/endo/issues/576
7760
5723
  *
7761
5724
  * They are like the `moderate` enablements except for the entries below.
7762
- */$h‍_once.moderateEnablements(moderateEnablements);
5725
+ */
7763
5726
  const severeEnablements = {
7764
5727
  ...moderateEnablements,
7765
5728
 
@@ -7801,8 +5764,8 @@ const severeEnablements = {
7801
5764
  */
7802
5765
  '%TypedArrayPrototype%': '*' };$h‍_once.severeEnablements(severeEnablements);
7803
5766
  })
7804
-
7805
5767
  ,
5768
+ // === functors[23] ===
7806
5769
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getOwnPropertyNames,isObject,objectHasOwnProperty,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h‍_imports([["./commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayForEach", [$h‍_a => (arrayForEach = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["getOwnPropertyNames", [$h‍_a => (getOwnPropertyNames = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]]]],["./enablements.js", [["minEnablements", [$h‍_a => (minEnablements = $h‍_a)]],["moderateEnablements", [$h‍_a => (moderateEnablements = $h‍_a)]],["severeEnablements", [$h‍_a => (severeEnablements = $h‍_a)]]]]]);
7807
5770
 
7808
5771
 
@@ -8008,8 +5971,136 @@ overrideDebug = [])
8008
5971
  enableProperties('root', intrinsics, plan);
8009
5972
  }$h‍_once.default(enablePropertyOverrides);
8010
5973
  })
5974
+ ,
5975
+ // === functors[24] ===
5976
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let arrayPush,arraySlice,freeze,assert;$h‍_imports([["./commons.js", [["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
5977
+
5978
+
5979
+
5980
+
5981
+
5982
+
5983
+ const { details: X, quote: q } = assert;
5984
+
5985
+ /**
5986
+ * JavaScript module semantics resists attempts to parameterize a module's
5987
+ * initialization behavior. A module initializes in order according to
5988
+ * the path by which it is first imported, and then the initialized module
5989
+ * is reused by all the other times it is imported. Compartments give us
5990
+ * the opportunity to bind the same import name to different imported
5991
+ * modules, depending on the package/compartment doing the import. Compartments
5992
+ * also address the difficulty of parameterizing a module's initialization
5993
+ * logic, but not in a pleasant manner.
5994
+ *
5995
+ * A pleasant parameterization would be for a static module to be function-like
5996
+ * with explicit parameters, and for the parameterization to be like
5997
+ * calling the static module with parameters in order to derive from it a
5998
+ * module instance. Compartments instead lets us parameterize the meaning
5999
+ * of a module instance derived from a static module according to the
6000
+ * three namespaces provided by the JavaScript semantics, affecting the
6001
+ * meaning of a module instance.
6002
+ * * The global variable namespaces.
6003
+ * * The global scope, aliased to properties of the global object.
6004
+ * This is necessarily compartment-wide, and therefore in our
6005
+ * recommened usage pattern, package-wide.
6006
+ * * The global lexical scope. The SES-shim compartments support
6007
+ * these both compartment-wide as well as per-module. But it is
6008
+ * not yet clear what we will propose in the Compartment proposal.
6009
+ * * The import namespace.
6010
+ * * The host hooks.
6011
+ *
6012
+ * This `environment-options.js` module looks for a setting of an
6013
+ * `optionName` parameter rooted in the global scope. If follows the Node
6014
+ * precedent for finding Unix environment variable settings, looking for a
6015
+ * global `process` object holding an `env` object,
6016
+ * optionally holding a property named for the `optionName` whose value is the
6017
+ * configuration setting of that option. For example, for the optionName
6018
+ * `ALLOW_IMPLICIT_REMOTABLES` it would look in
6019
+ * `globalThis.process.env.ALLOW_IMPLICIT_REMOTABLES`.
6020
+ *
6021
+ * If setting is either absent or `undefined`, that indicates that
6022
+ * this configuration option should have its default behavior, whatever that is.
6023
+ * Otherwise, reflecting Unix environment variables, the setting must be a
6024
+ * string. This also helps ensure that this channel is used only to pass data,
6025
+ * not authority beyond the ability to read this global state.
6026
+ */
6027
+
6028
+ /**
6029
+ * makeEnvironmentCaptor provides a mechanism for getting environment
6030
+ * variables, if they are needed, and a way to catalog the names of all
6031
+ * the environment variables that were captured.
6032
+ *
6033
+ * @param {Object} aGlobal
6034
+ */
6035
+ const makeEnvironmentCaptor = (aGlobal) => {
6036
+ const capturedEnvironmentOptionNames = [];
6037
+
6038
+ /**
6039
+ * Gets an environment option by name and returns the option value or the
6040
+ * given default.
6041
+ *
6042
+ * @param {string} optionName
6043
+ * @param {string} defaultSetting
6044
+ * @returns {string}
6045
+ */
6046
+ const getEnvironmentOption = (optionName, defaultSetting) => {
6047
+ // eslint-disable-next-line @endo/no-polymorphic-call
6048
+ assert.typeof(
6049
+ optionName,
6050
+ 'string',
6051
+ X`Environment option name ${q(optionName)} must be a string.`);
6052
+
6053
+ // eslint-disable-next-line @endo/no-polymorphic-call
6054
+ assert.typeof(
6055
+ defaultSetting,
6056
+ 'string',
6057
+ X`Environment option default setting ${q(
6058
+ defaultSetting)
6059
+ } must be a string.`);
6060
+
6061
+
6062
+ /** @type {string} */
6063
+ let setting = defaultSetting;
6064
+ const globalProcess = aGlobal.process;
6065
+ if (globalProcess && typeof globalProcess === 'object') {
6066
+ const globalEnv = globalProcess.env;
6067
+ if (globalEnv && typeof globalEnv === 'object') {
6068
+ if (optionName in globalEnv) {
6069
+ arrayPush(capturedEnvironmentOptionNames, optionName);
6070
+ const optionValue = globalEnv[optionName];
6071
+ // eslint-disable-next-line @endo/no-polymorphic-call
6072
+ assert.typeof(
6073
+ optionValue,
6074
+ 'string',
6075
+ X`Environment option named ${q(
6076
+ optionName)
6077
+ }, if present, must have a corresponding string value, got ${q(
6078
+ optionValue)
6079
+ }`);
6080
+
6081
+ setting = optionValue;
6082
+ }
6083
+ }
6084
+ }
6085
+ assert(
6086
+ setting === undefined || typeof setting === 'string',
6087
+ X`Environment option value ${q(setting)}, if present, must be a string.`);
6088
+
6089
+ return setting;
6090
+ };
6091
+ freeze(getEnvironmentOption);
8011
6092
 
6093
+ const getCapturedEnvironmentOptionNames = () => {
6094
+ return freeze(arraySlice(capturedEnvironmentOptionNames));
6095
+ };
6096
+ freeze(getCapturedEnvironmentOptionNames);
6097
+
6098
+ return { getEnvironmentOption, getCapturedEnvironmentOptionNames };
6099
+ };$h‍_once.makeEnvironmentCaptor(makeEnvironmentCaptor);
6100
+ freeze(makeEnvironmentCaptor);
6101
+ })
8012
6102
  ,
6103
+ // === functors[25] ===
8013
6104
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let WeakSet,arrayFilter,arrayMap,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,weaksetAdd,weaksetHas;$h‍_imports([["../commons.js", [["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["fromEntries", [$h‍_a => (fromEntries = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["stringEndsWith", [$h‍_a => (stringEndsWith = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]],["./types.js", []],["./internal-types.js", []]]);
8014
6105
 
8015
6106
 
@@ -8099,7 +6190,7 @@ const consoleOtherMethods = freeze([
8099
6190
  /** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */
8100
6191
  const consoleWhitelist = freeze([
8101
6192
  ...consoleLevelMethods,
8102
- ...consoleOtherMethods]);
6193
+ ...consoleOtherMethods]);$h‍_once.consoleWhitelist(consoleWhitelist);
8103
6194
 
8104
6195
 
8105
6196
  /**
@@ -8131,7 +6222,7 @@ const consoleWhitelist = freeze([
8131
6222
 
8132
6223
  // /////////////////////////////////////////////////////////////////////////////
8133
6224
 
8134
- /** @type {MakeLoggingConsoleKit} */$h‍_once.consoleWhitelist(consoleWhitelist);
6225
+ /** @type {MakeLoggingConsoleKit} */
8135
6226
  const makeLoggingConsoleKit = (
8136
6227
  loggedErrorHandler,
8137
6228
  { shouldResetForDebugging = false } = {}) =>
@@ -8191,9 +6282,9 @@ freeze(ErrorInfo);
8191
6282
  * so we can change our mind. (On Node, `debug`, `log`, and `info` are aliases
8192
6283
  * for the same function and so will behave the same there.)
8193
6284
  */
8194
- const BASE_CONSOLE_LEVEL = 'debug';
6285
+ const BASE_CONSOLE_LEVEL = 'debug';$h‍_once.BASE_CONSOLE_LEVEL(BASE_CONSOLE_LEVEL);
8195
6286
 
8196
- /** @type {MakeCausalConsole} */$h‍_once.BASE_CONSOLE_LEVEL(BASE_CONSOLE_LEVEL);
6287
+ /** @type {MakeCausalConsole} */
8197
6288
  const makeCausalConsole = (baseConsole, loggedErrorHandler) => {
8198
6289
  const {
8199
6290
  getStackString,
@@ -8391,8 +6482,8 @@ const filterConsole = (baseConsole, filter, _topic = undefined) => {
8391
6482
  };$h‍_once.filterConsole(filterConsole);
8392
6483
  freeze(filterConsole);
8393
6484
  })
8394
-
8395
6485
  ,
6486
+ // === functors[26] ===
8396
6487
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let TypeError,globalThis,defaultHandler,makeCausalConsole;$h‍_imports([["../commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]]]],["./assert.js", [["loggedErrorHandler", [$h‍_a => (defaultHandler = $h‍_a)]]]],["./console.js", [["makeCausalConsole", [$h‍_a => (makeCausalConsole = $h‍_a)]]]],["./types.js", []],["./internal-types.js", []]]);
8397
6488
 
8398
6489
 
@@ -8472,9 +6563,7 @@ optGetStackString = undefined) =>
8472
6563
  // eslint-disable-next-line @endo/no-polymorphic-call
8473
6564
  event.preventDefault();
8474
6565
  // eslint-disable-next-line @endo/no-polymorphic-call
8475
- const stackString = loggedErrorHandler.getStackString(event.error);
8476
- // eslint-disable-next-line @endo/no-polymorphic-call
8477
- causalConsole.error(stackString);
6566
+ causalConsole.error(event.error);
8478
6567
  if (errorTrapping === 'exit' || errorTrapping === 'abort') {
8479
6568
  globalThis.window.location.href = `about:blank`;
8480
6569
  }
@@ -8484,8 +6573,8 @@ optGetStackString = undefined) =>
8484
6573
  return { console: causalConsole };
8485
6574
  };$h‍_once.tameConsole(tameConsole);
8486
6575
  })
8487
-
8488
6576
  ,
6577
+ // === functors[27] ===
8489
6578
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapHas,weakmapSet,weaksetAdd,weaksetHas;$h‍_imports([["../commons.js", [["WeakMap", [$h‍_a => (WeakMap = $h‍_a)]],["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["apply", [$h‍_a => (apply = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["fromEntries", [$h‍_a => (fromEntries = $h‍_a)]],["reflectSet", [$h‍_a => (reflectSet = $h‍_a)]],["regexpExec", [$h‍_a => (regexpExec = $h‍_a)]],["regexpTest", [$h‍_a => (regexpTest = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]],["weakmapHas", [$h‍_a => (weakmapHas = $h‍_a)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]]]);
8490
6579
 
8491
6580
 
@@ -8596,7 +6685,7 @@ const filterFileName = (fileName) => {
8596
6685
  }
8597
6686
  }
8598
6687
  return true;
8599
- };
6688
+ };$h‍_once.filterFileName(filterFileName);
8600
6689
 
8601
6690
  // The ad-hoc rule of the current pattern is that any likely-file-path or
8602
6691
  // likely url-path prefix, ending in a `/.../` should get dropped.
@@ -8608,7 +6697,7 @@ const filterFileName = (fileName) => {
8608
6697
  //
8609
6698
  // See thread starting at
8610
6699
  // https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
8611
- $h‍_once.filterFileName(filterFileName);const CALLSITE_ELLIPSES_PATTERN = /^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/;
6700
+ const CALLSITE_ELLIPSES_PATTERN = /^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/;
8612
6701
 
8613
6702
  // The ad-hoc rule of the current pattern is that any likely-file-path or
8614
6703
  // likely url-path prefix, ending in a `/` and prior to `package/` should get
@@ -8790,8 +6879,8 @@ stackFiltering) =>
8790
6879
  return tamedMethods.getStackString;
8791
6880
  };$h‍_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
8792
6881
  })
8793
-
8794
6882
  ,
6883
+ // === functors[28] ===
8795
6884
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,NativeErrors,tameV8ErrorConstructor;$h‍_imports([["../commons.js", [["FERAL_ERROR", [$h‍_a => (FERAL_ERROR = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["apply", [$h‍_a => (apply = $h‍_a)]],["construct", [$h‍_a => (construct = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["setPrototypeOf", [$h‍_a => (setPrototypeOf = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]]]],["../whitelist.js", [["NativeErrors", [$h‍_a => (NativeErrors = $h‍_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor", [$h‍_a => (tameV8ErrorConstructor = $h‍_a)]]]]]);
8796
6885
 
8797
6886
 
@@ -8956,9 +7045,9 @@ stackFiltering = 'concise')
8956
7045
 
8957
7046
  }$h‍_once.default(tameErrorConstructor);
8958
7047
  })
8959
-
8960
7048
  ,
8961
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Set,String,TypeError,WeakMap,WeakSet,arrayForEach,freeze,getOwnPropertyDescriptors,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,setAdd,setForEach,setHas,weakmapGet,weakmapSet,weaksetAdd,weaksetHas;$h‍_imports([["./commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["WeakMap", [$h‍_a => (WeakMap = $h‍_a)]],["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["arrayForEach", [$h‍_a => (arrayForEach = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setForEach", [$h‍_a => (setForEach = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]]]);
7049
+ // === functors[29] ===
7050
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,InertCompartment;$h‍_imports([["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["Float32Array", [$h‍_a => (Float32Array = $h‍_a)]],["Map", [$h‍_a => (Map = $h‍_a)]],["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]],["iterateArray", [$h‍_a => (iterateArray = $h‍_a)]],["iterateMap", [$h‍_a => (iterateMap = $h‍_a)]],["iterateSet", [$h‍_a => (iterateSet = $h‍_a)]],["iterateString", [$h‍_a => (iterateString = $h‍_a)]],["matchAllRegExp", [$h‍_a => (matchAllRegExp = $h‍_a)]],["matchAllSymbol", [$h‍_a => (matchAllSymbol = $h‍_a)]],["regexpPrototype", [$h‍_a => (regexpPrototype = $h‍_a)]]]],["./compartment-shim.js", [["InertCompartment", [$h‍_a => (InertCompartment = $h‍_a)]]]]]);
8962
7051
 
8963
7052
 
8964
7053
 
@@ -8976,35 +7065,176 @@ stackFiltering = 'concise')
8976
7065
 
8977
7066
 
8978
7067
 
7068
+ /**
7069
+ * Object.getConstructorOf()
7070
+ * Helper function to improve readability, similar to Object.getPrototypeOf().
7071
+ *
7072
+ * @param {Object} obj
7073
+ */
7074
+ function getConstructorOf(obj) {
7075
+ return getPrototypeOf(obj).constructor;
7076
+ }
8979
7077
 
7078
+ // getAnonymousIntrinsics uses a utility function to construct an arguments
7079
+ // object, since it cannot have one of its own and also be a const export.
7080
+ function makeArguments() {
7081
+ // eslint-disable-next-line prefer-rest-params
7082
+ return arguments;
7083
+ }
8980
7084
 
7085
+ /**
7086
+ * getAnonymousIntrinsics()
7087
+ * Get the intrinsics not otherwise reachable by named own property
7088
+ * traversal from the global object.
7089
+ *
7090
+ * @returns {Object}
7091
+ */
7092
+ const getAnonymousIntrinsics = () => {
7093
+ const InertFunction = FERAL_FUNCTION.prototype.constructor;
8981
7094
 
7095
+ // 9.2.4.1 %ThrowTypeError%
8982
7096
 
7097
+ const ThrowTypeError = getOwnPropertyDescriptor(makeArguments(), 'callee').
7098
+ get;
8983
7099
 
7100
+ // 21.1.5.2 The %StringIteratorPrototype% Object
8984
7101
 
7102
+ // eslint-disable-next-line no-new-wrappers
7103
+ const StringIteratorObject = iterateString(new String());
7104
+ const StringIteratorPrototype = getPrototypeOf(StringIteratorObject);
8985
7105
 
7106
+ // 21.2.7.1 The %RegExpStringIteratorPrototype% Object
7107
+ const RegExpStringIterator =
7108
+ regexpPrototype[matchAllSymbol] && matchAllRegExp(/./);
7109
+ const RegExpStringIteratorPrototype =
7110
+ RegExpStringIterator && getPrototypeOf(RegExpStringIterator);
8986
7111
 
7112
+ // 22.1.5.2 The %ArrayIteratorPrototype% Object
8987
7113
 
7114
+ // eslint-disable-next-line no-array-constructor
7115
+ const ArrayIteratorObject = iterateArray([]);
7116
+ const ArrayIteratorPrototype = getPrototypeOf(ArrayIteratorObject);
8988
7117
 
7118
+ // 22.2.1 The %TypedArray% Intrinsic Object
8989
7119
 
7120
+ const TypedArray = getPrototypeOf(Float32Array);
8990
7121
 
7122
+ // 23.1.5.2 The %MapIteratorPrototype% Object
8991
7123
 
7124
+ const MapIteratorObject = iterateMap(new Map());
7125
+ const MapIteratorPrototype = getPrototypeOf(MapIteratorObject);
8992
7126
 
7127
+ // 23.2.5.2 The %SetIteratorPrototype% Object
8993
7128
 
7129
+ const SetIteratorObject = iterateSet(new Set());
7130
+ const SetIteratorPrototype = getPrototypeOf(SetIteratorObject);
8994
7131
 
7132
+ // 25.1.2 The %IteratorPrototype% Object
8995
7133
 
7134
+ const IteratorPrototype = getPrototypeOf(ArrayIteratorPrototype);
8996
7135
 
7136
+ // 25.2.1 The GeneratorFunction Constructor
8997
7137
 
7138
+ // eslint-disable-next-line no-empty-function
7139
+ function* GeneratorFunctionInstance() {}
7140
+ const GeneratorFunction = getConstructorOf(GeneratorFunctionInstance);
8998
7141
 
7142
+ // 25.2.3 Properties of the GeneratorFunction Prototype Object
8999
7143
 
7144
+ const Generator = GeneratorFunction.prototype;
9000
7145
 
7146
+ // 25.3.1 The AsyncGeneratorFunction Constructor
9001
7147
 
7148
+ // eslint-disable-next-line no-empty-function
7149
+ async function* AsyncGeneratorFunctionInstance() {}
7150
+ const AsyncGeneratorFunction = getConstructorOf(
7151
+ AsyncGeneratorFunctionInstance);
9002
7152
 
9003
7153
 
7154
+ // 25.3.2.2 AsyncGeneratorFunction.prototype
7155
+ const AsyncGenerator = AsyncGeneratorFunction.prototype;
7156
+ // 25.5.1 Properties of the AsyncGenerator Prototype Object
7157
+ const AsyncGeneratorPrototype = AsyncGenerator.prototype;
7158
+ const AsyncIteratorPrototype = getPrototypeOf(AsyncGeneratorPrototype);
9004
7159
 
7160
+ // 25.7.1 The AsyncFunction Constructor
9005
7161
 
9006
- /**
9007
- * @typedef {import('../index.js').Harden} Harden
7162
+ // eslint-disable-next-line no-empty-function
7163
+ async function AsyncFunctionInstance() {}
7164
+ const AsyncFunction = getConstructorOf(AsyncFunctionInstance);
7165
+
7166
+ const intrinsics = {
7167
+ '%InertFunction%': InertFunction,
7168
+ '%ArrayIteratorPrototype%': ArrayIteratorPrototype,
7169
+ '%InertAsyncFunction%': AsyncFunction,
7170
+ '%AsyncGenerator%': AsyncGenerator,
7171
+ '%InertAsyncGeneratorFunction%': AsyncGeneratorFunction,
7172
+ '%AsyncGeneratorPrototype%': AsyncGeneratorPrototype,
7173
+ '%AsyncIteratorPrototype%': AsyncIteratorPrototype,
7174
+ '%Generator%': Generator,
7175
+ '%InertGeneratorFunction%': GeneratorFunction,
7176
+ '%IteratorPrototype%': IteratorPrototype,
7177
+ '%MapIteratorPrototype%': MapIteratorPrototype,
7178
+ '%RegExpStringIteratorPrototype%': RegExpStringIteratorPrototype,
7179
+ '%SetIteratorPrototype%': SetIteratorPrototype,
7180
+ '%StringIteratorPrototype%': StringIteratorPrototype,
7181
+ '%ThrowTypeError%': ThrowTypeError,
7182
+ '%TypedArray%': TypedArray,
7183
+ '%InertCompartment%': InertCompartment };
7184
+
7185
+
7186
+ return intrinsics;
7187
+ };$h‍_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
7188
+ })
7189
+ ,
7190
+ // === functors[30] ===
7191
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Set,String,TypeError,WeakMap,WeakSet,arrayForEach,freeze,getOwnPropertyDescriptors,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,setAdd,setForEach,setHas,weakmapGet,weakmapSet,weaksetAdd,weaksetHas;$h‍_imports([["./commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["WeakMap", [$h‍_a => (WeakMap = $h‍_a)]],["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["arrayForEach", [$h‍_a => (arrayForEach = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setForEach", [$h‍_a => (setForEach = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["weakmapGet", [$h‍_a => (weakmapGet = $h‍_a)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]]]);
7192
+
7193
+
7194
+
7195
+
7196
+
7197
+
7198
+
7199
+
7200
+
7201
+
7202
+
7203
+
7204
+
7205
+
7206
+
7207
+
7208
+
7209
+
7210
+
7211
+
7212
+
7213
+
7214
+
7215
+
7216
+
7217
+
7218
+
7219
+
7220
+
7221
+
7222
+
7223
+
7224
+
7225
+
7226
+
7227
+
7228
+
7229
+
7230
+
7231
+
7232
+
7233
+
7234
+
7235
+
7236
+ /**
7237
+ * @typedef {import('../index.js').Harden} Harden
9008
7238
  */
9009
7239
 
9010
7240
  /**
@@ -9045,7 +7275,7 @@ const makeHardener = () => {
9045
7275
  // Ignore if this is an exit, or we've already visited it
9046
7276
  return;
9047
7277
  }
9048
- // console.log(`adding ${val} to toFreeze`, val);
7278
+ // console.warn(`adding ${val} to toFreeze`, val);
9049
7279
  setAdd(toFreeze, val);
9050
7280
  weakmapSet(paths, val, path);
9051
7281
  }
@@ -9110,7 +7340,7 @@ const makeHardener = () => {
9110
7340
 
9111
7341
  enqueue(root);
9112
7342
  dequeue();
9113
- // console.log("toFreeze set:", toFreeze);
7343
+ // console.warn("toFreeze set:", toFreeze);
9114
7344
  commit();
9115
7345
 
9116
7346
  return root;
@@ -9120,8 +7350,8 @@ const makeHardener = () => {
9120
7350
  return harden;
9121
7351
  };$h‍_once.makeHardener(makeHardener);
9122
7352
  })
9123
-
9124
7353
  ,
7354
+ // === functors[31] ===
9125
7355
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Date,TypeError,apply,construct,defineProperties;$h‍_imports([["./commons.js", [["Date", [$h‍_a => (Date = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["apply", [$h‍_a => (apply = $h‍_a)]],["construct", [$h‍_a => (construct = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]]]]]);
9126
7356
 
9127
7357
 
@@ -9237,8 +7467,8 @@ function tameDateConstructor(dateTaming = 'safe') {
9237
7467
 
9238
7468
  }$h‍_once.default(tameDateConstructor);
9239
7469
  })
9240
-
9241
7470
  ,
7471
+ // === functors[32] ===
9242
7472
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;$h‍_imports([["./commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]]]]]);Object.defineProperty(tameDomains, 'name', {value: "tameDomains"});$h‍_once.tameDomains(tameDomains);
9243
7473
 
9244
7474
 
@@ -9286,8 +7516,8 @@ function tameDomains(domainTaming = 'safe') {
9286
7516
  }
9287
7517
  }
9288
7518
  })
9289
-
9290
7519
  ,
7520
+ // === functors[33] ===
9291
7521
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf;$h‍_imports([["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["SyntaxError", [$h‍_a => (SyntaxError = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]],["setPrototypeOf", [$h‍_a => (setPrototypeOf = $h‍_a)]]]]]);
9292
7522
 
9293
7523
 
@@ -9424,8 +7654,8 @@ function tameFunctionConstructors() {
9424
7654
  return newIntrinsics;
9425
7655
  }$h‍_once.default(tameFunctionConstructors);
9426
7656
  })
9427
-
9428
7657
  ,
7658
+ // === functors[34] ===
9429
7659
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h‍_imports([["./commons.js", [["WeakSet", [$h‍_a => (WeakSet = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["functionPrototype", [$h‍_a => (functionPrototype = $h‍_a)]],["functionToString", [$h‍_a => (functionToString = $h‍_a)]],["stringEndsWith", [$h‍_a => (stringEndsWith = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]]]);
9430
7660
 
9431
7661
 
@@ -9477,8 +7707,8 @@ const tameFunctionToString = () => {
9477
7707
  return markVirtualizedNativeFunction;
9478
7708
  };$h‍_once.tameFunctionToString(tameFunctionToString);
9479
7709
  })
9480
-
9481
7710
  ,
7711
+ // === functors[35] ===
9482
7712
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let String,TypeError,defineProperty,getOwnPropertyNames,isObject,regexpExec,assert;$h‍_imports([["./commons.js", [["String", [$h‍_a => (String = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["getOwnPropertyNames", [$h‍_a => (getOwnPropertyNames = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["regexpExec", [$h‍_a => (regexpExec = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
9483
7713
 
9484
7714
 
@@ -9553,8 +7783,8 @@ function tameLocaleMethods(intrinsics, localeTaming = 'safe') {
9553
7783
  }
9554
7784
  }$h‍_once.default(tameLocaleMethods);
9555
7785
  })
9556
-
9557
7786
  ,
7787
+ // === functors[36] ===
9558
7788
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h‍_imports([["./commons.js", [["Math", [$h‍_a => (Math = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["create", [$h‍_a => (create = $h‍_a)]],["getOwnPropertyDescriptors", [$h‍_a => (getOwnPropertyDescriptors = $h‍_a)]],["objectPrototype", [$h‍_a => (objectPrototype = $h‍_a)]]]]]);
9559
7789
 
9560
7790
 
@@ -9582,8 +7812,8 @@ function tameMathObject(mathTaming = 'safe') {
9582
7812
 
9583
7813
  }$h‍_once.default(tameMathObject);
9584
7814
  })
9585
-
9586
7815
  ,
7816
+ // === functors[37] ===
9587
7817
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h‍_imports([["./commons.js", [["FERAL_REG_EXP", [$h‍_a => (FERAL_REG_EXP = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["construct", [$h‍_a => (construct = $h‍_a)]],["defineProperties", [$h‍_a => (defineProperties = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["speciesSymbol", [$h‍_a => (speciesSymbol = $h‍_a)]]]]]);
9588
7818
 
9589
7819
 
@@ -9637,8 +7867,8 @@ function tameRegExpConstructor(regExpTaming = 'safe') {
9637
7867
 
9638
7868
  }$h‍_once.default(tameRegExpConstructor);
9639
7869
  })
9640
-
9641
7870
  ,
7871
+ // === functors[38] ===
9642
7872
  (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let whitelist,FunctionInstance,isAccessorPermit,String,TypeError,arrayIncludes,getOwnPropertyDescriptor,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,stringSlice;$h‍_imports([["./whitelist.js", [["whitelist", [$h‍_a => (whitelist = $h‍_a)]],["FunctionInstance", [$h‍_a => (FunctionInstance = $h‍_a)]],["isAccessorPermit", [$h‍_a => (isAccessorPermit = $h‍_a)]]]],["./commons.js", [["String", [$h‍_a => (String = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayIncludes", [$h‍_a => (arrayIncludes = $h‍_a)]],["getOwnPropertyDescriptor", [$h‍_a => (getOwnPropertyDescriptor = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]],["isObject", [$h‍_a => (isObject = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["stringSlice", [$h‍_a => (stringSlice = $h‍_a)]]]]]);
9643
7873
 
9644
7874
 
@@ -9885,11 +8115,11 @@ markVirtualizedNativeFunction)
9885
8115
  // that we are removing it so we know to look into it, as happens when
9886
8116
  // the language evolves new features to existing intrinsics.
9887
8117
  if (subPermit !== false) {
9888
- // This call to `console.log` is intentional. It is not a vestige
9889
- // of a debugging attempt. See the comment at top of file for an
8118
+ // This call to `console.warn` is intentional. It is not a vestige of
8119
+ // a debugging attempt. See the comment at top of file for an
9890
8120
  // explanation.
9891
8121
  // eslint-disable-next-line @endo/no-polymorphic-call
9892
- console.log(`Removing ${subPath}`);
8122
+ console.warn(`Removing ${subPath}`);
9893
8123
  }
9894
8124
  try {
9895
8125
  delete obj[prop];
@@ -9912,9 +8142,21 @@ markVirtualizedNativeFunction)
9912
8142
  visitProperties('intrinsics', intrinsics, whitelist);
9913
8143
  }$h‍_once.default(whitelistIntrinsics);
9914
8144
  })
9915
-
9916
8145
  ,
9917
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let globalThis,is,keys,ownKeys,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert;$h‍_imports([["./commons.js", [["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["keys", [$h‍_a => (keys = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]]]],["./make-hardener.js", [["makeHardener", [$h‍_a => (makeHardener = $h‍_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h‍_a => (makeIntrinsicsCollector = $h‍_a)]]]],["./whitelist-intrinsics.js", [["default", [$h‍_a => (whitelistIntrinsics = $h‍_a)]]]],["./tame-function-constructors.js", [["default", [$h‍_a => (tameFunctionConstructors = $h‍_a)]]]],["./tame-date-constructor.js", [["default", [$h‍_a => (tameDateConstructor = $h‍_a)]]]],["./tame-math-object.js", [["default", [$h‍_a => (tameMathObject = $h‍_a)]]]],["./tame-regexp-constructor.js", [["default", [$h‍_a => (tameRegExpConstructor = $h‍_a)]]]],["./enable-property-overrides.js", [["default", [$h‍_a => (enablePropertyOverrides = $h‍_a)]]]],["./tame-locale-methods.js", [["default", [$h‍_a => (tameLocaleMethods = $h‍_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h‍_a => (setGlobalObjectConstantProperties = $h‍_a)]],["setGlobalObjectMutableProperties", [$h‍_a => (setGlobalObjectMutableProperties = $h‍_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h‍_a => (makeSafeEvaluator = $h‍_a)]]]],["./whitelist.js", [["initialGlobalPropertyNames", [$h‍_a => (initialGlobalPropertyNames = $h‍_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./tame-domains.js", [["tameDomains", [$h‍_a => (tameDomains = $h‍_a)]]]],["./error/tame-console.js", [["tameConsole", [$h‍_a => (tameConsole = $h‍_a)]]]],["./error/tame-error-constructor.js", [["default", [$h‍_a => (tameErrorConstructor = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]],["makeAssert", [$h‍_a => (makeAssert = $h‍_a)]]]]]);
8146
+ // === functors[39] ===
8147
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let TypeError,arrayFilter,arrayMap,globalThis,is,ownKeys,stringSplit,enJoin,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,makeEnvironmentCaptor,getAnonymousIntrinsics,makeCompartmentConstructor;$h‍_imports([["./commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["stringSplit", [$h‍_a => (stringSplit = $h‍_a)]]]],["./error/stringify-utils.js", [["enJoin", [$h‍_a => (enJoin = $h‍_a)]]]],["./make-hardener.js", [["makeHardener", [$h‍_a => (makeHardener = $h‍_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h‍_a => (makeIntrinsicsCollector = $h‍_a)]]]],["./whitelist-intrinsics.js", [["default", [$h‍_a => (whitelistIntrinsics = $h‍_a)]]]],["./tame-function-constructors.js", [["default", [$h‍_a => (tameFunctionConstructors = $h‍_a)]]]],["./tame-date-constructor.js", [["default", [$h‍_a => (tameDateConstructor = $h‍_a)]]]],["./tame-math-object.js", [["default", [$h‍_a => (tameMathObject = $h‍_a)]]]],["./tame-regexp-constructor.js", [["default", [$h‍_a => (tameRegExpConstructor = $h‍_a)]]]],["./enable-property-overrides.js", [["default", [$h‍_a => (enablePropertyOverrides = $h‍_a)]]]],["./tame-locale-methods.js", [["default", [$h‍_a => (tameLocaleMethods = $h‍_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h‍_a => (setGlobalObjectConstantProperties = $h‍_a)]],["setGlobalObjectMutableProperties", [$h‍_a => (setGlobalObjectMutableProperties = $h‍_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h‍_a => (makeSafeEvaluator = $h‍_a)]]]],["./whitelist.js", [["initialGlobalPropertyNames", [$h‍_a => (initialGlobalPropertyNames = $h‍_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./tame-domains.js", [["tameDomains", [$h‍_a => (tameDomains = $h‍_a)]]]],["./error/tame-console.js", [["tameConsole", [$h‍_a => (tameConsole = $h‍_a)]]]],["./error/tame-error-constructor.js", [["default", [$h‍_a => (tameErrorConstructor = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]],["makeAssert", [$h‍_a => (makeAssert = $h‍_a)]]]],["./environment-options.js", [["makeEnvironmentCaptor", [$h‍_a => (makeEnvironmentCaptor = $h‍_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h‍_a => (getAnonymousIntrinsics = $h‍_a)]]]],["./compartment-shim.js", [["makeCompartmentConstructor", [$h‍_a => (makeCompartmentConstructor = $h‍_a)]]]]]);
8148
+
8149
+
8150
+
8151
+
8152
+
8153
+
8154
+
8155
+
8156
+
8157
+
8158
+
8159
+
9918
8160
 
9919
8161
 
9920
8162
 
@@ -9957,7 +8199,8 @@ markVirtualizedNativeFunction)
9957
8199
 
9958
8200
  const { details: d, quote: q } = assert;
9959
8201
 
9960
- let firstOptions;
8202
+ /** @type {Error=} */
8203
+ let priorLockdown;
9961
8204
 
9962
8205
  // Build a harden() with an empty fringe.
9963
8206
  // Gate it on lockdown.
@@ -9968,8 +8211,6 @@ let firstOptions;
9968
8211
  */
9969
8212
  const harden = makeHardener();
9970
8213
 
9971
- const alreadyHardenedIntrinsics = () => false;
9972
-
9973
8214
  /**
9974
8215
  * @callback Transform
9975
8216
  * @param {string} source
@@ -9986,44 +8227,17 @@ const alreadyHardenedIntrinsics = () => false;
9986
8227
  * @param {Object} [options.globalLexicals]
9987
8228
  */
9988
8229
 
9989
- /**
9990
- * @callback CompartmentConstructorMaker
9991
- * @param {CompartmentConstructorMaker} targetMakeCompartmentConstructor
9992
- * @param {Object} intrinsics
9993
- * @param {(func: Function) => void} markVirtualizedNativeFunction
9994
- * @returns {CompartmentConstructor}
9995
- */
9996
-
9997
8230
  // TODO https://github.com/endojs/endo/issues/814
9998
8231
  // Lockdown currently allows multiple calls provided that the specified options
9999
8232
  // of every call agree. With experience, we have observed that lockdown should
10000
8233
  // only ever need to be called once and that simplifying lockdown will improve
10001
8234
  // the quality of audits.
10002
8235
 
10003
- // TODO https://github.com/endojs/endo/issues/815
10004
- // Lockdown receives makeCompartmentConstructor and compartmentPrototype.
10005
- // This is a vestige of an earlier version of SES where makeLockdown was called
10006
- // from two different entry points: one for a layer of SES that had a
10007
- // Compartment that only supported evaluating programs, and a second layer that
10008
- // extended Compartment to support modules, but at the expense of entraining a
10009
- // dependency on Babel.
10010
- // SES currently externalizes the dependency on Babel and one version of
10011
- // makeCompartmentConstructor is sufficient for all uses, so this can be
10012
- // simplified.
10013
-
10014
8236
  /**
10015
- * @param {CompartmentConstructorMaker} makeCompartmentConstructor
10016
- * @param {Object} compartmentPrototype
10017
- * @param {() => Object} getAnonymousIntrinsics
10018
8237
  * @param {LockdownOptions} [options]
10019
- * @returns {() => {}} repairIntrinsics
8238
+ * @returns {() => void} repairIntrinsics
10020
8239
  */
10021
- const repairIntrinsics = (
10022
- makeCompartmentConstructor,
10023
- compartmentPrototype,
10024
- getAnonymousIntrinsics,
10025
- options = {}) =>
10026
- {
8240
+ const repairIntrinsics = (options = {}) => {
10027
8241
  // First time, absent options default to 'safe'.
10028
8242
  // Subsequent times, absent options default to first options.
10029
8243
  // Thus, all present options must agree with first options.
@@ -10048,24 +8262,46 @@ options = {}) =>
10048
8262
  // is useful. See
10049
8263
  // [`stackFiltering` options](https://github.com/Agoric/SES-shim/blob/master/packages/ses/lockdown-options.md#stackfiltering-options)
10050
8264
  // for an explanation.
10051
- options = /** @type {LockdownOptions} */{ ...firstOptions, ...options };
8265
+
10052
8266
  const {
8267
+ getEnvironmentOption: getenv,
8268
+ getCapturedEnvironmentOptionNames } =
8269
+ makeEnvironmentCaptor(globalThis);
8270
+
8271
+ const {
8272
+ errorTaming = getenv('LOCKDOWN_ERROR_TAMING', 'safe'),
8273
+ errorTrapping = getenv('LOCKDOWN_ERROR_TRAPPING', 'platform'),
8274
+ regExpTaming = getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
8275
+ localeTaming = getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
8276
+ consoleTaming = getenv('LOCKDOWN_CONSOLE_TAMING', 'safe'),
8277
+ overrideTaming = getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate'),
8278
+ stackFiltering = getenv('LOCKDOWN_STACK_FILTERING', 'concise'),
8279
+ domainTaming = getenv('LOCKDOWN_DOMAIN_TAMING', 'safe'),
8280
+ overrideDebug = arrayFilter(
8281
+ stringSplit(getenv('LOCKDOWN_OVERRIDE_DEBUG', ''), ','),
8282
+ /** @param {string} debugName */
8283
+ (debugName) => debugName !== ''),
8284
+
8285
+ __allowUnsafeMonkeyPatching__ = getenv(
8286
+ '__LOCKDOWN_ALLOW_UNSAFE_MONKEY_PATCHING__',
8287
+ 'safe'),
8288
+
10053
8289
  dateTaming = 'safe', // deprecated
10054
- errorTaming = 'safe',
10055
8290
  mathTaming = 'safe', // deprecated
10056
- errorTrapping = 'platform',
10057
- regExpTaming = 'safe',
10058
- localeTaming = 'safe',
10059
- consoleTaming = 'safe',
10060
- overrideTaming = 'moderate',
10061
- overrideDebug = [],
10062
- stackFiltering = 'concise',
10063
- domainTaming = 'unsafe', // TODO become 'safe' by default in next-breaking-release.
10064
- __allowUnsafeMonkeyPatching__ = 'safe',
10065
-
10066
8291
  ...extraOptions } =
10067
8292
  options;
10068
8293
 
8294
+ const capturedEnvironmentOptionNames = getCapturedEnvironmentOptionNames();
8295
+ if (capturedEnvironmentOptionNames.length > 0) {
8296
+ // eslint-disable-next-line @endo/no-polymorphic-call
8297
+ console.warn(
8298
+ `SES Lockdown using options from environment variables ${enJoin(
8299
+ arrayMap(capturedEnvironmentOptionNames, q),
8300
+ 'and')
8301
+ }`);
8302
+
8303
+ }
8304
+
10069
8305
  // Assert that only supported options were passed.
10070
8306
  // Use Reflect.ownKeys to reject symbol-named properties as well.
10071
8307
  const extraOptionsNames = ownKeys(extraOptions);
@@ -10074,36 +8310,21 @@ options = {}) =>
10074
8310
  d`lockdown(): non supported option ${q(extraOptionsNames)}`);
10075
8311
 
10076
8312
 
10077
- // Asserts for multiple invocation of lockdown().
10078
- if (firstOptions) {
10079
- for (const name of keys(firstOptions)) {
10080
- assert(
10081
- options[name] === firstOptions[name],
10082
- d`lockdown(): cannot re-invoke with different option ${q(name)}`);
10083
-
10084
- }
10085
- return alreadyHardenedIntrinsics;
10086
- }
10087
-
10088
- firstOptions = {
10089
- dateTaming, // deprecated
10090
- errorTaming,
10091
- mathTaming, // deprecated
10092
- regExpTaming,
10093
- localeTaming,
10094
- consoleTaming,
10095
- overrideTaming,
10096
- overrideDebug,
10097
- stackFiltering,
10098
- domainTaming,
10099
- __allowUnsafeMonkeyPatching__ };
8313
+ assert(
8314
+ priorLockdown === undefined,
8315
+ `Already locked down at ${priorLockdown} (SES_ALREADY_LOCKED_DOWN)`,
8316
+ TypeError);
10100
8317
 
8318
+ priorLockdown = new TypeError('Prior lockdown (SES_ALREADY_LOCKED_DOWN)');
8319
+ // Tease V8 to generate the stack string and release the closures the stack
8320
+ // trace retained:
8321
+ priorLockdown.stack;
10101
8322
 
10102
8323
  /**
10103
8324
  * Because of packagers and bundlers, etc, multiple invocations of lockdown
10104
8325
  * might happen in separate instantiations of the source of this module.
10105
8326
  * In that case, each one sees its own `firstOptions` variable, so the test
10106
- * above will not detect that lockdown has already happened. Instead, we
8327
+ * above will not detect that lockdown has already happened. We
10107
8328
  * unreliably test some telltale signs that lockdown has run, to avoid
10108
8329
  * trying to lock down a locked down environment. Although the test is
10109
8330
  * unreliable, this is consistent with the SES threat model. SES provides
@@ -10114,12 +8335,7 @@ options = {}) =>
10114
8335
  * tests without actually locking down counts as corrupting code.
10115
8336
  *
10116
8337
  * The specifics of what this tests for may change over time, but it
10117
- * should be consistent with any setting of the lockdown options. We
10118
- * do no checking that the state is consistent with current lockdown
10119
- * options. So a call to lockdown with one set of options may silently
10120
- * succeed with a state not reflecting those options, but only
10121
- * if a previous lockdown happened from something other than this
10122
- * instance of this module.
8338
+ * should be consistent with any setting of the lockdown options.
10123
8339
  */
10124
8340
  const seemsToBeLockedDown = () => {
10125
8341
  return (
@@ -10136,8 +8352,9 @@ options = {}) =>
10136
8352
 
10137
8353
  if (seemsToBeLockedDown()) {
10138
8354
  // eslint-disable-next-line @endo/no-polymorphic-call
10139
- console.log('Seems to already be locked down. Skipping second lockdown');
10140
- return alreadyHardenedIntrinsics;
8355
+ throw new TypeError(
8356
+ `Already locked down but not by this SES instance (SES_MULTIPLE_INSTANCES)`);
8357
+
10141
8358
  }
10142
8359
 
10143
8360
  /**
@@ -10176,6 +8393,7 @@ options = {}) =>
10176
8393
  optGetStackString = intrinsics['%InitialGetStackString%'];
10177
8394
  }
10178
8395
  const consoleRecord = tameConsole(
8396
+ // @ts-ignore tameConsole does its own input validation
10179
8397
  consoleTaming,
10180
8398
  errorTrapping,
10181
8399
  optGetStackString);
@@ -10224,6 +8442,11 @@ options = {}) =>
10224
8442
 
10225
8443
  /**
10226
8444
  * 3. HARDEN to share the intrinsics.
8445
+ *
8446
+ * We define hardenIntrinsics here so that options are in scope, but return
8447
+ * it to the caller because we intend to eventually allow vetted shims to run
8448
+ * between repairs and the hardening of intrinsics and so we can benchmark
8449
+ * repair separately from hardening.
10227
8450
  */
10228
8451
 
10229
8452
  function hardenIntrinsics() {
@@ -10231,6 +8454,7 @@ options = {}) =>
10231
8454
  // TODO consider moving this to the end of the repair phase, and
10232
8455
  // therefore before vetted shims rather than afterwards. It is not
10233
8456
  // clear yet which is better.
8457
+ // @ts-ignore enablePropertyOverrides does its own input validation
10234
8458
  enablePropertyOverrides(intrinsics, overrideTaming, overrideDebug);
10235
8459
 
10236
8460
  if (__allowUnsafeMonkeyPatching__ !== 'unsafe') {
@@ -10253,41 +8477,19 @@ options = {}) =>
10253
8477
  }
10254
8478
 
10255
8479
  return hardenIntrinsics;
10256
- };
8480
+ };$h‍_once.repairIntrinsics(repairIntrinsics);
10257
8481
 
10258
8482
  /**
10259
- * @param {CompartmentConstructorMaker} makeCompartmentConstructor
10260
- * @param {Object} compartmentPrototype
10261
- * @param {() => Object} getAnonymousIntrinsics
10262
- * @returns {import('../index.js').Lockdown}
10263
- */$h‍_once.repairIntrinsics(repairIntrinsics);
10264
- const makeLockdown = (
10265
- makeCompartmentConstructor,
10266
- compartmentPrototype,
10267
- getAnonymousIntrinsics) =>
10268
- {
10269
- /**
10270
- * @param {LockdownOptions} [options]
10271
- */
10272
- const lockdown = (options = {}) => {
10273
- const maybeHardenIntrinsics = repairIntrinsics(
10274
- makeCompartmentConstructor,
10275
- compartmentPrototype,
10276
- getAnonymousIntrinsics,
10277
- options);
10278
-
10279
- return maybeHardenIntrinsics();
10280
- };
10281
- return lockdown;
10282
- };$h‍_once.makeLockdown(makeLockdown);
8483
+ * @param {LockdownOptions} [options]
8484
+ */
8485
+ const lockdown = (options = {}) => {
8486
+ const hardenIntrinsics = repairIntrinsics(options);
8487
+ hardenIntrinsics();
8488
+ };$h‍_once.lockdown(lockdown);
10283
8489
  })
10284
-
10285
8490
  ,
10286
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let globalThis,TypeError,assign,tameFunctionToString,getGlobalIntrinsics,getAnonymousIntrinsics,makeLockdown,makeCompartmentConstructor,CompartmentPrototype,assert;$h‍_imports([["./src/commons.js", [["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["assign", [$h‍_a => (assign = $h‍_a)]]]],["./src/tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./src/intrinsics.js", [["getGlobalIntrinsics", [$h‍_a => (getGlobalIntrinsics = $h‍_a)]]]],["./src/get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h‍_a => (getAnonymousIntrinsics = $h‍_a)]]]],["./src/lockdown-shim.js", [["makeLockdown", [$h‍_a => (makeLockdown = $h‍_a)]]]],["./src/compartment-shim.js", [["makeCompartmentConstructor", [$h‍_a => (makeCompartmentConstructor = $h‍_a)]],["CompartmentPrototype", [$h‍_a => (CompartmentPrototype = $h‍_a)]]]],["./src/error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
10287
-
10288
-
10289
-
10290
-
8491
+ // === functors[40] ===
8492
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, }) => { let globalThis,TypeError,assign,tameFunctionToString,getGlobalIntrinsics,lockdown,makeCompartmentConstructor,assert;$h‍_imports([["./src/commons.js", [["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["assign", [$h‍_a => (assign = $h‍_a)]]]],["./src/tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./src/intrinsics.js", [["getGlobalIntrinsics", [$h‍_a => (getGlobalIntrinsics = $h‍_a)]]]],["./src/lockdown-shim.js", [["lockdown", [$h‍_a => (lockdown = $h‍_a)]]]],["./src/compartment-shim.js", [["makeCompartmentConstructor", [$h‍_a => (makeCompartmentConstructor = $h‍_a)]]]],["./src/error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
10291
8493
 
10292
8494
 
10293
8495
 
@@ -10327,15 +8529,990 @@ markVirtualizedNativeFunction);
10327
8529
 
10328
8530
 
10329
8531
  assign(globalThis, {
10330
- lockdown: makeLockdown(
10331
- makeCompartmentConstructor,
10332
- CompartmentPrototype,
10333
- getAnonymousIntrinsics),
10334
-
8532
+ lockdown,
10335
8533
  Compartment,
10336
8534
  assert });
10337
8535
  })
10338
-
10339
8536
  ,
8537
+ ]; // functors end
10340
8538
 
10341
- ]);
8539
+ function cell(name, value = undefined) {
8540
+ const observers = [];
8541
+ function set(newValue) {
8542
+ value = newValue;
8543
+ for (const observe of observers) {
8544
+ observe(value);
8545
+ }
8546
+ }
8547
+ function get() {
8548
+ return value;
8549
+ }
8550
+ function observe(observe) {
8551
+ observers.push(observe);
8552
+ observe(value);
8553
+ }
8554
+ return { get, set, observe, enumerable: true };
8555
+ }
8556
+
8557
+ const cells = [
8558
+ {
8559
+ globalThis: cell("globalThis"),
8560
+ Array: cell("Array"),
8561
+ Date: cell("Date"),
8562
+ Float32Array: cell("Float32Array"),
8563
+ JSON: cell("JSON"),
8564
+ Map: cell("Map"),
8565
+ Math: cell("Math"),
8566
+ Object: cell("Object"),
8567
+ Promise: cell("Promise"),
8568
+ Proxy: cell("Proxy"),
8569
+ Reflect: cell("Reflect"),
8570
+ FERAL_REG_EXP: cell("FERAL_REG_EXP"),
8571
+ Set: cell("Set"),
8572
+ String: cell("String"),
8573
+ WeakMap: cell("WeakMap"),
8574
+ WeakSet: cell("WeakSet"),
8575
+ FERAL_ERROR: cell("FERAL_ERROR"),
8576
+ RangeError: cell("RangeError"),
8577
+ ReferenceError: cell("ReferenceError"),
8578
+ SyntaxError: cell("SyntaxError"),
8579
+ TypeError: cell("TypeError"),
8580
+ assign: cell("assign"),
8581
+ create: cell("create"),
8582
+ defineProperties: cell("defineProperties"),
8583
+ entries: cell("entries"),
8584
+ freeze: cell("freeze"),
8585
+ getOwnPropertyDescriptor: cell("getOwnPropertyDescriptor"),
8586
+ getOwnPropertyDescriptors: cell("getOwnPropertyDescriptors"),
8587
+ getOwnPropertyNames: cell("getOwnPropertyNames"),
8588
+ getPrototypeOf: cell("getPrototypeOf"),
8589
+ is: cell("is"),
8590
+ isExtensible: cell("isExtensible"),
8591
+ keys: cell("keys"),
8592
+ objectPrototype: cell("objectPrototype"),
8593
+ seal: cell("seal"),
8594
+ setPrototypeOf: cell("setPrototypeOf"),
8595
+ values: cell("values"),
8596
+ speciesSymbol: cell("speciesSymbol"),
8597
+ toStringTagSymbol: cell("toStringTagSymbol"),
8598
+ iteratorSymbol: cell("iteratorSymbol"),
8599
+ matchAllSymbol: cell("matchAllSymbol"),
8600
+ stringifyJson: cell("stringifyJson"),
8601
+ fromEntries: cell("fromEntries"),
8602
+ defineProperty: cell("defineProperty"),
8603
+ apply: cell("apply"),
8604
+ construct: cell("construct"),
8605
+ reflectGet: cell("reflectGet"),
8606
+ reflectGetOwnPropertyDescriptor: cell("reflectGetOwnPropertyDescriptor"),
8607
+ reflectHas: cell("reflectHas"),
8608
+ reflectIsExtensible: cell("reflectIsExtensible"),
8609
+ ownKeys: cell("ownKeys"),
8610
+ reflectPreventExtensions: cell("reflectPreventExtensions"),
8611
+ reflectSet: cell("reflectSet"),
8612
+ isArray: cell("isArray"),
8613
+ arrayPrototype: cell("arrayPrototype"),
8614
+ mapPrototype: cell("mapPrototype"),
8615
+ proxyRevocable: cell("proxyRevocable"),
8616
+ regexpPrototype: cell("regexpPrototype"),
8617
+ setPrototype: cell("setPrototype"),
8618
+ stringPrototype: cell("stringPrototype"),
8619
+ weakmapPrototype: cell("weakmapPrototype"),
8620
+ weaksetPrototype: cell("weaksetPrototype"),
8621
+ functionPrototype: cell("functionPrototype"),
8622
+ promisePrototype: cell("promisePrototype"),
8623
+ uncurryThis: cell("uncurryThis"),
8624
+ objectHasOwnProperty: cell("objectHasOwnProperty"),
8625
+ arrayFilter: cell("arrayFilter"),
8626
+ arrayForEach: cell("arrayForEach"),
8627
+ arrayIncludes: cell("arrayIncludes"),
8628
+ arrayJoin: cell("arrayJoin"),
8629
+ arrayMap: cell("arrayMap"),
8630
+ arrayPop: cell("arrayPop"),
8631
+ arrayPush: cell("arrayPush"),
8632
+ arraySlice: cell("arraySlice"),
8633
+ arraySome: cell("arraySome"),
8634
+ arraySort: cell("arraySort"),
8635
+ iterateArray: cell("iterateArray"),
8636
+ mapSet: cell("mapSet"),
8637
+ mapGet: cell("mapGet"),
8638
+ mapHas: cell("mapHas"),
8639
+ iterateMap: cell("iterateMap"),
8640
+ setAdd: cell("setAdd"),
8641
+ setForEach: cell("setForEach"),
8642
+ setHas: cell("setHas"),
8643
+ iterateSet: cell("iterateSet"),
8644
+ regexpTest: cell("regexpTest"),
8645
+ regexpExec: cell("regexpExec"),
8646
+ matchAllRegExp: cell("matchAllRegExp"),
8647
+ stringEndsWith: cell("stringEndsWith"),
8648
+ stringIncludes: cell("stringIncludes"),
8649
+ stringIndexOf: cell("stringIndexOf"),
8650
+ stringMatch: cell("stringMatch"),
8651
+ stringReplace: cell("stringReplace"),
8652
+ stringSearch: cell("stringSearch"),
8653
+ stringSlice: cell("stringSlice"),
8654
+ stringSplit: cell("stringSplit"),
8655
+ stringStartsWith: cell("stringStartsWith"),
8656
+ iterateString: cell("iterateString"),
8657
+ weakmapDelete: cell("weakmapDelete"),
8658
+ weakmapGet: cell("weakmapGet"),
8659
+ weakmapHas: cell("weakmapHas"),
8660
+ weakmapSet: cell("weakmapSet"),
8661
+ weaksetAdd: cell("weaksetAdd"),
8662
+ weaksetGet: cell("weaksetGet"),
8663
+ weaksetHas: cell("weaksetHas"),
8664
+ functionToString: cell("functionToString"),
8665
+ promiseAll: cell("promiseAll"),
8666
+ promiseCatch: cell("promiseCatch"),
8667
+ promiseThen: cell("promiseThen"),
8668
+ getConstructorOf: cell("getConstructorOf"),
8669
+ immutableObject: cell("immutableObject"),
8670
+ isObject: cell("isObject"),
8671
+ isError: cell("isError"),
8672
+ FERAL_EVAL: cell("FERAL_EVAL"),
8673
+ FERAL_FUNCTION: cell("FERAL_FUNCTION"),
8674
+ },
8675
+ {
8676
+ },
8677
+ {
8678
+ an: cell("an"),
8679
+ bestEffortStringify: cell("bestEffortStringify"),
8680
+ enJoin: cell("enJoin"),
8681
+ },
8682
+ {
8683
+ },
8684
+ {
8685
+ unredactedDetails: cell("unredactedDetails"),
8686
+ loggedErrorHandler: cell("loggedErrorHandler"),
8687
+ makeAssert: cell("makeAssert"),
8688
+ assert: cell("assert"),
8689
+ },
8690
+ {
8691
+ makeEvaluateFactory: cell("makeEvaluateFactory"),
8692
+ },
8693
+ {
8694
+ isValidIdentifierName: cell("isValidIdentifierName"),
8695
+ getScopeConstants: cell("getScopeConstants"),
8696
+ },
8697
+ {
8698
+ createScopeHandler: cell("createScopeHandler"),
8699
+ },
8700
+ {
8701
+ getSourceURL: cell("getSourceURL"),
8702
+ },
8703
+ {
8704
+ rejectHtmlComments: cell("rejectHtmlComments"),
8705
+ evadeHtmlCommentTest: cell("evadeHtmlCommentTest"),
8706
+ rejectImportExpressions: cell("rejectImportExpressions"),
8707
+ evadeImportExpressionTest: cell("evadeImportExpressionTest"),
8708
+ rejectSomeDirectEvalExpressions: cell("rejectSomeDirectEvalExpressions"),
8709
+ mandatoryTransforms: cell("mandatoryTransforms"),
8710
+ applyTransforms: cell("applyTransforms"),
8711
+ },
8712
+ {
8713
+ makeSafeEvaluator: cell("makeSafeEvaluator"),
8714
+ },
8715
+ {
8716
+ provideCompartmentEvaluator: cell("provideCompartmentEvaluator"),
8717
+ compartmentEvaluate: cell("compartmentEvaluate"),
8718
+ },
8719
+ {
8720
+ makeEvalFunction: cell("makeEvalFunction"),
8721
+ },
8722
+ {
8723
+ makeFunctionConstructor: cell("makeFunctionConstructor"),
8724
+ },
8725
+ {
8726
+ constantProperties: cell("constantProperties"),
8727
+ universalPropertyNames: cell("universalPropertyNames"),
8728
+ initialGlobalPropertyNames: cell("initialGlobalPropertyNames"),
8729
+ sharedGlobalPropertyNames: cell("sharedGlobalPropertyNames"),
8730
+ uniqueGlobalPropertyNames: cell("uniqueGlobalPropertyNames"),
8731
+ NativeErrors: cell("NativeErrors"),
8732
+ FunctionInstance: cell("FunctionInstance"),
8733
+ isAccessorPermit: cell("isAccessorPermit"),
8734
+ whitelist: cell("whitelist"),
8735
+ },
8736
+ {
8737
+ setGlobalObjectConstantProperties: cell("setGlobalObjectConstantProperties"),
8738
+ setGlobalObjectMutableProperties: cell("setGlobalObjectMutableProperties"),
8739
+ },
8740
+ {
8741
+ makeAlias: cell("makeAlias"),
8742
+ load: cell("load"),
8743
+ },
8744
+ {
8745
+ deferExports: cell("deferExports"),
8746
+ getDeferredExports: cell("getDeferredExports"),
8747
+ },
8748
+ {
8749
+ makeThirdPartyModuleInstance: cell("makeThirdPartyModuleInstance"),
8750
+ makeModuleInstance: cell("makeModuleInstance"),
8751
+ },
8752
+ {
8753
+ link: cell("link"),
8754
+ instantiate: cell("instantiate"),
8755
+ },
8756
+ {
8757
+ InertCompartment: cell("InertCompartment"),
8758
+ CompartmentPrototype: cell("CompartmentPrototype"),
8759
+ makeCompartmentConstructor: cell("makeCompartmentConstructor"),
8760
+ },
8761
+ {
8762
+ makeIntrinsicsCollector: cell("makeIntrinsicsCollector"),
8763
+ getGlobalIntrinsics: cell("getGlobalIntrinsics"),
8764
+ },
8765
+ {
8766
+ minEnablements: cell("minEnablements"),
8767
+ moderateEnablements: cell("moderateEnablements"),
8768
+ severeEnablements: cell("severeEnablements"),
8769
+ },
8770
+ {
8771
+ default: cell("default"),
8772
+ },
8773
+ {
8774
+ makeEnvironmentCaptor: cell("makeEnvironmentCaptor"),
8775
+ },
8776
+ {
8777
+ makeLoggingConsoleKit: cell("makeLoggingConsoleKit"),
8778
+ makeCausalConsole: cell("makeCausalConsole"),
8779
+ filterConsole: cell("filterConsole"),
8780
+ consoleWhitelist: cell("consoleWhitelist"),
8781
+ BASE_CONSOLE_LEVEL: cell("BASE_CONSOLE_LEVEL"),
8782
+ },
8783
+ {
8784
+ tameConsole: cell("tameConsole"),
8785
+ },
8786
+ {
8787
+ filterFileName: cell("filterFileName"),
8788
+ shortenCallSiteString: cell("shortenCallSiteString"),
8789
+ tameV8ErrorConstructor: cell("tameV8ErrorConstructor"),
8790
+ },
8791
+ {
8792
+ default: cell("default"),
8793
+ },
8794
+ {
8795
+ getAnonymousIntrinsics: cell("getAnonymousIntrinsics"),
8796
+ },
8797
+ {
8798
+ makeHardener: cell("makeHardener"),
8799
+ },
8800
+ {
8801
+ default: cell("default"),
8802
+ },
8803
+ {
8804
+ tameDomains: cell("tameDomains"),
8805
+ },
8806
+ {
8807
+ default: cell("default"),
8808
+ },
8809
+ {
8810
+ tameFunctionToString: cell("tameFunctionToString"),
8811
+ },
8812
+ {
8813
+ default: cell("default"),
8814
+ },
8815
+ {
8816
+ default: cell("default"),
8817
+ },
8818
+ {
8819
+ default: cell("default"),
8820
+ },
8821
+ {
8822
+ default: cell("default"),
8823
+ },
8824
+ {
8825
+ repairIntrinsics: cell("repairIntrinsics"),
8826
+ lockdown: cell("lockdown"),
8827
+ },
8828
+ {
8829
+ },
8830
+ ];
8831
+
8832
+
8833
+ const namespaces = cells.map(cells => Object.create(null, cells));
8834
+
8835
+ for (let index = 0; index < namespaces.length; index += 1) {
8836
+ cells[index]['*'] = cell('*', namespaces[index]);
8837
+ }
8838
+
8839
+ function observeImports(map, importName, importIndex) {
8840
+ for (const [name, observers] of map.get(importName)) {
8841
+ const cell = cells[importIndex][name];
8842
+ if (cell === undefined) {
8843
+ throw new ReferenceError(`Cannot import name ${name}`);
8844
+ }
8845
+ for (const observer of observers) {
8846
+ cell.observe(observer);
8847
+ }
8848
+ }
8849
+ }
8850
+
8851
+ functors[0]({
8852
+ imports(entries) {
8853
+ const map = new Map(entries);
8854
+ },
8855
+ liveVar: {
8856
+ },
8857
+ onceVar: {
8858
+ universalThis: cells[0].globalThis.set,
8859
+ Array: cells[0].Array.set,
8860
+ Date: cells[0].Date.set,
8861
+ Float32Array: cells[0].Float32Array.set,
8862
+ JSON: cells[0].JSON.set,
8863
+ Map: cells[0].Map.set,
8864
+ Math: cells[0].Math.set,
8865
+ Object: cells[0].Object.set,
8866
+ Promise: cells[0].Promise.set,
8867
+ Proxy: cells[0].Proxy.set,
8868
+ Reflect: cells[0].Reflect.set,
8869
+ FERAL_REG_EXP: cells[0].FERAL_REG_EXP.set,
8870
+ Set: cells[0].Set.set,
8871
+ String: cells[0].String.set,
8872
+ WeakMap: cells[0].WeakMap.set,
8873
+ WeakSet: cells[0].WeakSet.set,
8874
+ FERAL_ERROR: cells[0].FERAL_ERROR.set,
8875
+ RangeError: cells[0].RangeError.set,
8876
+ ReferenceError: cells[0].ReferenceError.set,
8877
+ SyntaxError: cells[0].SyntaxError.set,
8878
+ TypeError: cells[0].TypeError.set,
8879
+ assign: cells[0].assign.set,
8880
+ create: cells[0].create.set,
8881
+ defineProperties: cells[0].defineProperties.set,
8882
+ entries: cells[0].entries.set,
8883
+ freeze: cells[0].freeze.set,
8884
+ getOwnPropertyDescriptor: cells[0].getOwnPropertyDescriptor.set,
8885
+ getOwnPropertyDescriptors: cells[0].getOwnPropertyDescriptors.set,
8886
+ getOwnPropertyNames: cells[0].getOwnPropertyNames.set,
8887
+ getPrototypeOf: cells[0].getPrototypeOf.set,
8888
+ is: cells[0].is.set,
8889
+ isExtensible: cells[0].isExtensible.set,
8890
+ keys: cells[0].keys.set,
8891
+ objectPrototype: cells[0].objectPrototype.set,
8892
+ seal: cells[0].seal.set,
8893
+ setPrototypeOf: cells[0].setPrototypeOf.set,
8894
+ values: cells[0].values.set,
8895
+ speciesSymbol: cells[0].speciesSymbol.set,
8896
+ toStringTagSymbol: cells[0].toStringTagSymbol.set,
8897
+ iteratorSymbol: cells[0].iteratorSymbol.set,
8898
+ matchAllSymbol: cells[0].matchAllSymbol.set,
8899
+ stringifyJson: cells[0].stringifyJson.set,
8900
+ fromEntries: cells[0].fromEntries.set,
8901
+ defineProperty: cells[0].defineProperty.set,
8902
+ apply: cells[0].apply.set,
8903
+ construct: cells[0].construct.set,
8904
+ reflectGet: cells[0].reflectGet.set,
8905
+ reflectGetOwnPropertyDescriptor: cells[0].reflectGetOwnPropertyDescriptor.set,
8906
+ reflectHas: cells[0].reflectHas.set,
8907
+ reflectIsExtensible: cells[0].reflectIsExtensible.set,
8908
+ ownKeys: cells[0].ownKeys.set,
8909
+ reflectPreventExtensions: cells[0].reflectPreventExtensions.set,
8910
+ reflectSet: cells[0].reflectSet.set,
8911
+ isArray: cells[0].isArray.set,
8912
+ arrayPrototype: cells[0].arrayPrototype.set,
8913
+ mapPrototype: cells[0].mapPrototype.set,
8914
+ proxyRevocable: cells[0].proxyRevocable.set,
8915
+ regexpPrototype: cells[0].regexpPrototype.set,
8916
+ setPrototype: cells[0].setPrototype.set,
8917
+ stringPrototype: cells[0].stringPrototype.set,
8918
+ weakmapPrototype: cells[0].weakmapPrototype.set,
8919
+ weaksetPrototype: cells[0].weaksetPrototype.set,
8920
+ functionPrototype: cells[0].functionPrototype.set,
8921
+ promisePrototype: cells[0].promisePrototype.set,
8922
+ uncurryThis: cells[0].uncurryThis.set,
8923
+ objectHasOwnProperty: cells[0].objectHasOwnProperty.set,
8924
+ arrayFilter: cells[0].arrayFilter.set,
8925
+ arrayForEach: cells[0].arrayForEach.set,
8926
+ arrayIncludes: cells[0].arrayIncludes.set,
8927
+ arrayJoin: cells[0].arrayJoin.set,
8928
+ arrayMap: cells[0].arrayMap.set,
8929
+ arrayPop: cells[0].arrayPop.set,
8930
+ arrayPush: cells[0].arrayPush.set,
8931
+ arraySlice: cells[0].arraySlice.set,
8932
+ arraySome: cells[0].arraySome.set,
8933
+ arraySort: cells[0].arraySort.set,
8934
+ iterateArray: cells[0].iterateArray.set,
8935
+ mapSet: cells[0].mapSet.set,
8936
+ mapGet: cells[0].mapGet.set,
8937
+ mapHas: cells[0].mapHas.set,
8938
+ iterateMap: cells[0].iterateMap.set,
8939
+ setAdd: cells[0].setAdd.set,
8940
+ setForEach: cells[0].setForEach.set,
8941
+ setHas: cells[0].setHas.set,
8942
+ iterateSet: cells[0].iterateSet.set,
8943
+ regexpTest: cells[0].regexpTest.set,
8944
+ regexpExec: cells[0].regexpExec.set,
8945
+ matchAllRegExp: cells[0].matchAllRegExp.set,
8946
+ stringEndsWith: cells[0].stringEndsWith.set,
8947
+ stringIncludes: cells[0].stringIncludes.set,
8948
+ stringIndexOf: cells[0].stringIndexOf.set,
8949
+ stringMatch: cells[0].stringMatch.set,
8950
+ stringReplace: cells[0].stringReplace.set,
8951
+ stringSearch: cells[0].stringSearch.set,
8952
+ stringSlice: cells[0].stringSlice.set,
8953
+ stringSplit: cells[0].stringSplit.set,
8954
+ stringStartsWith: cells[0].stringStartsWith.set,
8955
+ iterateString: cells[0].iterateString.set,
8956
+ weakmapDelete: cells[0].weakmapDelete.set,
8957
+ weakmapGet: cells[0].weakmapGet.set,
8958
+ weakmapHas: cells[0].weakmapHas.set,
8959
+ weakmapSet: cells[0].weakmapSet.set,
8960
+ weaksetAdd: cells[0].weaksetAdd.set,
8961
+ weaksetGet: cells[0].weaksetGet.set,
8962
+ weaksetHas: cells[0].weaksetHas.set,
8963
+ functionToString: cells[0].functionToString.set,
8964
+ promiseAll: cells[0].promiseAll.set,
8965
+ promiseCatch: cells[0].promiseCatch.set,
8966
+ promiseThen: cells[0].promiseThen.set,
8967
+ getConstructorOf: cells[0].getConstructorOf.set,
8968
+ immutableObject: cells[0].immutableObject.set,
8969
+ isObject: cells[0].isObject.set,
8970
+ isError: cells[0].isError.set,
8971
+ FERAL_EVAL: cells[0].FERAL_EVAL.set,
8972
+ FERAL_FUNCTION: cells[0].FERAL_FUNCTION.set,
8973
+ },
8974
+ });
8975
+ functors[1]({
8976
+ imports(entries) {
8977
+ const map = new Map(entries);
8978
+ },
8979
+ liveVar: {
8980
+ },
8981
+ onceVar: {
8982
+ },
8983
+ });
8984
+ functors[2]({
8985
+ imports(entries) {
8986
+ const map = new Map(entries);
8987
+ observeImports(map, "../commons.js", 0);
8988
+ },
8989
+ liveVar: {
8990
+ },
8991
+ onceVar: {
8992
+ an: cells[2].an.set,
8993
+ bestEffortStringify: cells[2].bestEffortStringify.set,
8994
+ enJoin: cells[2].enJoin.set,
8995
+ },
8996
+ });
8997
+ functors[3]({
8998
+ imports(entries) {
8999
+ const map = new Map(entries);
9000
+ },
9001
+ liveVar: {
9002
+ },
9003
+ onceVar: {
9004
+ },
9005
+ });
9006
+ functors[4]({
9007
+ imports(entries) {
9008
+ const map = new Map(entries);
9009
+ observeImports(map, "../commons.js", 0);
9010
+ observeImports(map, "./internal-types.js", 1);
9011
+ observeImports(map, "./stringify-utils.js", 2);
9012
+ observeImports(map, "./types.js", 3);
9013
+ },
9014
+ liveVar: {
9015
+ },
9016
+ onceVar: {
9017
+ unredactedDetails: cells[4].unredactedDetails.set,
9018
+ loggedErrorHandler: cells[4].loggedErrorHandler.set,
9019
+ makeAssert: cells[4].makeAssert.set,
9020
+ assert: cells[4].assert.set,
9021
+ },
9022
+ });
9023
+ functors[5]({
9024
+ imports(entries) {
9025
+ const map = new Map(entries);
9026
+ observeImports(map, "./commons.js", 0);
9027
+ },
9028
+ liveVar: {
9029
+ },
9030
+ onceVar: {
9031
+ makeEvaluateFactory: cells[5].makeEvaluateFactory.set,
9032
+ },
9033
+ });
9034
+ functors[6]({
9035
+ imports(entries) {
9036
+ const map = new Map(entries);
9037
+ observeImports(map, "./commons.js", 0);
9038
+ },
9039
+ liveVar: {
9040
+ },
9041
+ onceVar: {
9042
+ isValidIdentifierName: cells[6].isValidIdentifierName.set,
9043
+ getScopeConstants: cells[6].getScopeConstants.set,
9044
+ },
9045
+ });
9046
+ functors[7]({
9047
+ imports(entries) {
9048
+ const map = new Map(entries);
9049
+ observeImports(map, "./commons.js", 0);
9050
+ observeImports(map, "./error/assert.js", 4);
9051
+ },
9052
+ liveVar: {
9053
+ },
9054
+ onceVar: {
9055
+ createScopeHandler: cells[7].createScopeHandler.set,
9056
+ },
9057
+ });
9058
+ functors[8]({
9059
+ imports(entries) {
9060
+ const map = new Map(entries);
9061
+ observeImports(map, "./commons.js", 0);
9062
+ },
9063
+ liveVar: {
9064
+ },
9065
+ onceVar: {
9066
+ getSourceURL: cells[8].getSourceURL.set,
9067
+ },
9068
+ });
9069
+ functors[9]({
9070
+ imports(entries) {
9071
+ const map = new Map(entries);
9072
+ observeImports(map, "./commons.js", 0);
9073
+ observeImports(map, "./get-source-url.js", 8);
9074
+ },
9075
+ liveVar: {
9076
+ },
9077
+ onceVar: {
9078
+ rejectHtmlComments: cells[9].rejectHtmlComments.set,
9079
+ evadeHtmlCommentTest: cells[9].evadeHtmlCommentTest.set,
9080
+ rejectImportExpressions: cells[9].rejectImportExpressions.set,
9081
+ evadeImportExpressionTest: cells[9].evadeImportExpressionTest.set,
9082
+ rejectSomeDirectEvalExpressions: cells[9].rejectSomeDirectEvalExpressions.set,
9083
+ mandatoryTransforms: cells[9].mandatoryTransforms.set,
9084
+ applyTransforms: cells[9].applyTransforms.set,
9085
+ },
9086
+ });
9087
+ functors[10]({
9088
+ imports(entries) {
9089
+ const map = new Map(entries);
9090
+ observeImports(map, "./commons.js", 0);
9091
+ observeImports(map, "./error/assert.js", 4);
9092
+ observeImports(map, "./make-evaluate-factory.js", 5);
9093
+ observeImports(map, "./scope-constants.js", 6);
9094
+ observeImports(map, "./scope-handler.js", 7);
9095
+ observeImports(map, "./transforms.js", 9);
9096
+ },
9097
+ liveVar: {
9098
+ },
9099
+ onceVar: {
9100
+ makeSafeEvaluator: cells[10].makeSafeEvaluator.set,
9101
+ },
9102
+ });
9103
+ functors[11]({
9104
+ imports(entries) {
9105
+ const map = new Map(entries);
9106
+ observeImports(map, "./commons.js", 0);
9107
+ observeImports(map, "./make-safe-evaluator.js", 10);
9108
+ observeImports(map, "./transforms.js", 9);
9109
+ },
9110
+ liveVar: {
9111
+ },
9112
+ onceVar: {
9113
+ provideCompartmentEvaluator: cells[11].provideCompartmentEvaluator.set,
9114
+ compartmentEvaluate: cells[11].compartmentEvaluate.set,
9115
+ },
9116
+ });
9117
+ functors[12]({
9118
+ imports(entries) {
9119
+ const map = new Map(entries);
9120
+ },
9121
+ liveVar: {
9122
+ },
9123
+ onceVar: {
9124
+ makeEvalFunction: cells[12].makeEvalFunction.set,
9125
+ },
9126
+ });
9127
+ functors[13]({
9128
+ imports(entries) {
9129
+ const map = new Map(entries);
9130
+ observeImports(map, "./commons.js", 0);
9131
+ observeImports(map, "./error/assert.js", 4);
9132
+ },
9133
+ liveVar: {
9134
+ },
9135
+ onceVar: {
9136
+ makeFunctionConstructor: cells[13].makeFunctionConstructor.set,
9137
+ },
9138
+ });
9139
+ functors[14]({
9140
+ imports(entries) {
9141
+ const map = new Map(entries);
9142
+ },
9143
+ liveVar: {
9144
+ },
9145
+ onceVar: {
9146
+ constantProperties: cells[14].constantProperties.set,
9147
+ universalPropertyNames: cells[14].universalPropertyNames.set,
9148
+ initialGlobalPropertyNames: cells[14].initialGlobalPropertyNames.set,
9149
+ sharedGlobalPropertyNames: cells[14].sharedGlobalPropertyNames.set,
9150
+ uniqueGlobalPropertyNames: cells[14].uniqueGlobalPropertyNames.set,
9151
+ NativeErrors: cells[14].NativeErrors.set,
9152
+ FunctionInstance: cells[14].FunctionInstance.set,
9153
+ isAccessorPermit: cells[14].isAccessorPermit.set,
9154
+ whitelist: cells[14].whitelist.set,
9155
+ },
9156
+ });
9157
+ functors[15]({
9158
+ imports(entries) {
9159
+ const map = new Map(entries);
9160
+ observeImports(map, "./commons.js", 0);
9161
+ observeImports(map, "./make-eval-function.js", 12);
9162
+ observeImports(map, "./make-function-constructor.js", 13);
9163
+ observeImports(map, "./whitelist.js", 14);
9164
+ },
9165
+ liveVar: {
9166
+ },
9167
+ onceVar: {
9168
+ setGlobalObjectConstantProperties: cells[15].setGlobalObjectConstantProperties.set,
9169
+ setGlobalObjectMutableProperties: cells[15].setGlobalObjectMutableProperties.set,
9170
+ },
9171
+ });
9172
+ functors[16]({
9173
+ imports(entries) {
9174
+ const map = new Map(entries);
9175
+ observeImports(map, "./commons.js", 0);
9176
+ observeImports(map, "./error/assert.js", 4);
9177
+ },
9178
+ liveVar: {
9179
+ },
9180
+ onceVar: {
9181
+ makeAlias: cells[16].makeAlias.set,
9182
+ load: cells[16].load.set,
9183
+ },
9184
+ });
9185
+ functors[17]({
9186
+ imports(entries) {
9187
+ const map = new Map(entries);
9188
+ observeImports(map, "./commons.js", 0);
9189
+ observeImports(map, "./error/assert.js", 4);
9190
+ observeImports(map, "./module-load.js", 16);
9191
+ },
9192
+ liveVar: {
9193
+ },
9194
+ onceVar: {
9195
+ deferExports: cells[17].deferExports.set,
9196
+ getDeferredExports: cells[17].getDeferredExports.set,
9197
+ },
9198
+ });
9199
+ functors[18]({
9200
+ imports(entries) {
9201
+ const map = new Map(entries);
9202
+ observeImports(map, "./commons.js", 0);
9203
+ observeImports(map, "./compartment-evaluate.js", 11);
9204
+ observeImports(map, "./error/assert.js", 4);
9205
+ observeImports(map, "./module-proxy.js", 17);
9206
+ },
9207
+ liveVar: {
9208
+ },
9209
+ onceVar: {
9210
+ makeThirdPartyModuleInstance: cells[18].makeThirdPartyModuleInstance.set,
9211
+ makeModuleInstance: cells[18].makeModuleInstance.set,
9212
+ },
9213
+ });
9214
+ functors[19]({
9215
+ imports(entries) {
9216
+ const map = new Map(entries);
9217
+ observeImports(map, "./commons.js", 0);
9218
+ observeImports(map, "./error/assert.js", 4);
9219
+ observeImports(map, "./module-instance.js", 18);
9220
+ },
9221
+ liveVar: {
9222
+ },
9223
+ onceVar: {
9224
+ link: cells[19].link.set,
9225
+ instantiate: cells[19].instantiate.set,
9226
+ },
9227
+ });
9228
+ functors[20]({
9229
+ imports(entries) {
9230
+ const map = new Map(entries);
9231
+ observeImports(map, "./commons.js", 0);
9232
+ observeImports(map, "./compartment-evaluate.js", 11);
9233
+ observeImports(map, "./error/assert.js", 4);
9234
+ observeImports(map, "./global-object.js", 15);
9235
+ observeImports(map, "./make-safe-evaluator.js", 10);
9236
+ observeImports(map, "./module-link.js", 19);
9237
+ observeImports(map, "./module-load.js", 16);
9238
+ observeImports(map, "./module-proxy.js", 17);
9239
+ observeImports(map, "./scope-constants.js", 6);
9240
+ observeImports(map, "./whitelist.js", 14);
9241
+ },
9242
+ liveVar: {
9243
+ },
9244
+ onceVar: {
9245
+ InertCompartment: cells[20].InertCompartment.set,
9246
+ CompartmentPrototype: cells[20].CompartmentPrototype.set,
9247
+ makeCompartmentConstructor: cells[20].makeCompartmentConstructor.set,
9248
+ },
9249
+ });
9250
+ functors[21]({
9251
+ imports(entries) {
9252
+ const map = new Map(entries);
9253
+ observeImports(map, "./commons.js", 0);
9254
+ observeImports(map, "./whitelist.js", 14);
9255
+ },
9256
+ liveVar: {
9257
+ },
9258
+ onceVar: {
9259
+ makeIntrinsicsCollector: cells[21].makeIntrinsicsCollector.set,
9260
+ getGlobalIntrinsics: cells[21].getGlobalIntrinsics.set,
9261
+ },
9262
+ });
9263
+ functors[22]({
9264
+ imports(entries) {
9265
+ const map = new Map(entries);
9266
+ },
9267
+ liveVar: {
9268
+ },
9269
+ onceVar: {
9270
+ minEnablements: cells[22].minEnablements.set,
9271
+ moderateEnablements: cells[22].moderateEnablements.set,
9272
+ severeEnablements: cells[22].severeEnablements.set,
9273
+ },
9274
+ });
9275
+ functors[23]({
9276
+ imports(entries) {
9277
+ const map = new Map(entries);
9278
+ observeImports(map, "./commons.js", 0);
9279
+ observeImports(map, "./enablements.js", 22);
9280
+ },
9281
+ liveVar: {
9282
+ },
9283
+ onceVar: {
9284
+ default: cells[23].default.set,
9285
+ },
9286
+ });
9287
+ functors[24]({
9288
+ imports(entries) {
9289
+ const map = new Map(entries);
9290
+ observeImports(map, "./commons.js", 0);
9291
+ observeImports(map, "./error/assert.js", 4);
9292
+ },
9293
+ liveVar: {
9294
+ },
9295
+ onceVar: {
9296
+ makeEnvironmentCaptor: cells[24].makeEnvironmentCaptor.set,
9297
+ },
9298
+ });
9299
+ functors[25]({
9300
+ imports(entries) {
9301
+ const map = new Map(entries);
9302
+ observeImports(map, "../commons.js", 0);
9303
+ observeImports(map, "./internal-types.js", 1);
9304
+ observeImports(map, "./types.js", 3);
9305
+ },
9306
+ liveVar: {
9307
+ },
9308
+ onceVar: {
9309
+ makeLoggingConsoleKit: cells[25].makeLoggingConsoleKit.set,
9310
+ makeCausalConsole: cells[25].makeCausalConsole.set,
9311
+ filterConsole: cells[25].filterConsole.set,
9312
+ consoleWhitelist: cells[25].consoleWhitelist.set,
9313
+ BASE_CONSOLE_LEVEL: cells[25].BASE_CONSOLE_LEVEL.set,
9314
+ },
9315
+ });
9316
+ functors[26]({
9317
+ imports(entries) {
9318
+ const map = new Map(entries);
9319
+ observeImports(map, "../commons.js", 0);
9320
+ observeImports(map, "./assert.js", 4);
9321
+ observeImports(map, "./console.js", 25);
9322
+ observeImports(map, "./internal-types.js", 1);
9323
+ observeImports(map, "./types.js", 3);
9324
+ },
9325
+ liveVar: {
9326
+ },
9327
+ onceVar: {
9328
+ tameConsole: cells[26].tameConsole.set,
9329
+ },
9330
+ });
9331
+ functors[27]({
9332
+ imports(entries) {
9333
+ const map = new Map(entries);
9334
+ observeImports(map, "../commons.js", 0);
9335
+ },
9336
+ liveVar: {
9337
+ },
9338
+ onceVar: {
9339
+ filterFileName: cells[27].filterFileName.set,
9340
+ shortenCallSiteString: cells[27].shortenCallSiteString.set,
9341
+ tameV8ErrorConstructor: cells[27].tameV8ErrorConstructor.set,
9342
+ },
9343
+ });
9344
+ functors[28]({
9345
+ imports(entries) {
9346
+ const map = new Map(entries);
9347
+ observeImports(map, "../commons.js", 0);
9348
+ observeImports(map, "../whitelist.js", 14);
9349
+ observeImports(map, "./tame-v8-error-constructor.js", 27);
9350
+ },
9351
+ liveVar: {
9352
+ },
9353
+ onceVar: {
9354
+ default: cells[28].default.set,
9355
+ },
9356
+ });
9357
+ functors[29]({
9358
+ imports(entries) {
9359
+ const map = new Map(entries);
9360
+ observeImports(map, "./commons.js", 0);
9361
+ observeImports(map, "./compartment-shim.js", 20);
9362
+ },
9363
+ liveVar: {
9364
+ },
9365
+ onceVar: {
9366
+ getAnonymousIntrinsics: cells[29].getAnonymousIntrinsics.set,
9367
+ },
9368
+ });
9369
+ functors[30]({
9370
+ imports(entries) {
9371
+ const map = new Map(entries);
9372
+ observeImports(map, "./commons.js", 0);
9373
+ },
9374
+ liveVar: {
9375
+ },
9376
+ onceVar: {
9377
+ makeHardener: cells[30].makeHardener.set,
9378
+ },
9379
+ });
9380
+ functors[31]({
9381
+ imports(entries) {
9382
+ const map = new Map(entries);
9383
+ observeImports(map, "./commons.js", 0);
9384
+ },
9385
+ liveVar: {
9386
+ },
9387
+ onceVar: {
9388
+ default: cells[31].default.set,
9389
+ },
9390
+ });
9391
+ functors[32]({
9392
+ imports(entries) {
9393
+ const map = new Map(entries);
9394
+ observeImports(map, "./commons.js", 0);
9395
+ },
9396
+ liveVar: {
9397
+ },
9398
+ onceVar: {
9399
+ tameDomains: cells[32].tameDomains.set,
9400
+ },
9401
+ });
9402
+ functors[33]({
9403
+ imports(entries) {
9404
+ const map = new Map(entries);
9405
+ observeImports(map, "./commons.js", 0);
9406
+ },
9407
+ liveVar: {
9408
+ },
9409
+ onceVar: {
9410
+ default: cells[33].default.set,
9411
+ },
9412
+ });
9413
+ functors[34]({
9414
+ imports(entries) {
9415
+ const map = new Map(entries);
9416
+ observeImports(map, "./commons.js", 0);
9417
+ },
9418
+ liveVar: {
9419
+ },
9420
+ onceVar: {
9421
+ tameFunctionToString: cells[34].tameFunctionToString.set,
9422
+ },
9423
+ });
9424
+ functors[35]({
9425
+ imports(entries) {
9426
+ const map = new Map(entries);
9427
+ observeImports(map, "./commons.js", 0);
9428
+ observeImports(map, "./error/assert.js", 4);
9429
+ },
9430
+ liveVar: {
9431
+ },
9432
+ onceVar: {
9433
+ default: cells[35].default.set,
9434
+ },
9435
+ });
9436
+ functors[36]({
9437
+ imports(entries) {
9438
+ const map = new Map(entries);
9439
+ observeImports(map, "./commons.js", 0);
9440
+ },
9441
+ liveVar: {
9442
+ },
9443
+ onceVar: {
9444
+ default: cells[36].default.set,
9445
+ },
9446
+ });
9447
+ functors[37]({
9448
+ imports(entries) {
9449
+ const map = new Map(entries);
9450
+ observeImports(map, "./commons.js", 0);
9451
+ },
9452
+ liveVar: {
9453
+ },
9454
+ onceVar: {
9455
+ default: cells[37].default.set,
9456
+ },
9457
+ });
9458
+ functors[38]({
9459
+ imports(entries) {
9460
+ const map = new Map(entries);
9461
+ observeImports(map, "./commons.js", 0);
9462
+ observeImports(map, "./whitelist.js", 14);
9463
+ },
9464
+ liveVar: {
9465
+ },
9466
+ onceVar: {
9467
+ default: cells[38].default.set,
9468
+ },
9469
+ });
9470
+ functors[39]({
9471
+ imports(entries) {
9472
+ const map = new Map(entries);
9473
+ observeImports(map, "./commons.js", 0);
9474
+ observeImports(map, "./compartment-shim.js", 20);
9475
+ observeImports(map, "./enable-property-overrides.js", 23);
9476
+ observeImports(map, "./environment-options.js", 24);
9477
+ observeImports(map, "./error/assert.js", 4);
9478
+ observeImports(map, "./error/stringify-utils.js", 2);
9479
+ observeImports(map, "./error/tame-console.js", 26);
9480
+ observeImports(map, "./error/tame-error-constructor.js", 28);
9481
+ observeImports(map, "./get-anonymous-intrinsics.js", 29);
9482
+ observeImports(map, "./global-object.js", 15);
9483
+ observeImports(map, "./intrinsics.js", 21);
9484
+ observeImports(map, "./make-hardener.js", 30);
9485
+ observeImports(map, "./make-safe-evaluator.js", 10);
9486
+ observeImports(map, "./tame-date-constructor.js", 31);
9487
+ observeImports(map, "./tame-domains.js", 32);
9488
+ observeImports(map, "./tame-function-constructors.js", 33);
9489
+ observeImports(map, "./tame-function-tostring.js", 34);
9490
+ observeImports(map, "./tame-locale-methods.js", 35);
9491
+ observeImports(map, "./tame-math-object.js", 36);
9492
+ observeImports(map, "./tame-regexp-constructor.js", 37);
9493
+ observeImports(map, "./whitelist-intrinsics.js", 38);
9494
+ observeImports(map, "./whitelist.js", 14);
9495
+ },
9496
+ liveVar: {
9497
+ },
9498
+ onceVar: {
9499
+ repairIntrinsics: cells[39].repairIntrinsics.set,
9500
+ lockdown: cells[39].lockdown.set,
9501
+ },
9502
+ });
9503
+ functors[40]({
9504
+ imports(entries) {
9505
+ const map = new Map(entries);
9506
+ observeImports(map, "./src/commons.js", 0);
9507
+ observeImports(map, "./src/compartment-shim.js", 20);
9508
+ observeImports(map, "./src/error/assert.js", 4);
9509
+ observeImports(map, "./src/intrinsics.js", 21);
9510
+ observeImports(map, "./src/lockdown-shim.js", 39);
9511
+ observeImports(map, "./src/tame-function-tostring.js", 34);
9512
+ },
9513
+ liveVar: {
9514
+ },
9515
+ onceVar: {
9516
+ },
9517
+ });
9518
+ })();