@putout/bundle 2.1.3 → 3.0.1

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/bundle/putout.js CHANGED
@@ -71154,447 +71154,457 @@ function isValidIdentifier$8(name, reserved = true) {
71154
71154
 
71155
71155
  var lib$m = {};
71156
71156
 
71157
- Object.defineProperty(lib$m, "__esModule", {
71158
- value: true
71159
- });
71160
- lib$m.readCodePoint = readCodePoint$2;
71161
- lib$m.readInt = readInt$2;
71162
- lib$m.readStringContents = readStringContents$2;
71163
- var _isDigit$2 = function isDigit(code) {
71164
- return code >= 48 && code <= 57;
71165
- };
71166
- const forbiddenNumericSeparatorSiblings$2 = {
71167
- decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
71168
- hex: new Set([46, 88, 95, 120])
71169
- };
71170
- const isAllowedNumericSeparatorSibling$2 = {
71171
- bin: ch => ch === 48 || ch === 49,
71172
- oct: ch => ch >= 48 && ch <= 55,
71173
- dec: ch => ch >= 48 && ch <= 57,
71174
- hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
71175
- };
71176
- function readStringContents$2(type, input, pos, lineStart, curLine, errors) {
71177
- const initialPos = pos;
71178
- const initialLineStart = lineStart;
71179
- const initialCurLine = curLine;
71180
- let out = "";
71181
- let firstInvalidLoc = null;
71182
- let chunkStart = pos;
71183
- const {
71184
- length
71185
- } = input;
71186
- for (;;) {
71187
- if (pos >= length) {
71188
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
71189
- out += input.slice(chunkStart, pos);
71190
- break;
71191
- }
71192
- const ch = input.charCodeAt(pos);
71193
- if (isStringEnd$2(type, ch, input, pos)) {
71194
- out += input.slice(chunkStart, pos);
71195
- break;
71196
- }
71197
- if (ch === 92) {
71198
- out += input.slice(chunkStart, pos);
71199
- const res = readEscapedChar$2(input, pos, lineStart, curLine, type === "template", errors);
71200
- if (res.ch === null && !firstInvalidLoc) {
71201
- firstInvalidLoc = {
71202
- pos,
71203
- lineStart,
71204
- curLine
71205
- };
71206
- } else {
71207
- out += res.ch;
71208
- }
71209
- ({
71210
- pos,
71211
- lineStart,
71212
- curLine
71213
- } = res);
71214
- chunkStart = pos;
71215
- } else if (ch === 8232 || ch === 8233) {
71216
- ++pos;
71217
- ++curLine;
71218
- lineStart = pos;
71219
- } else if (ch === 10 || ch === 13) {
71220
- if (type === "template") {
71221
- out += input.slice(chunkStart, pos) + "\n";
71222
- ++pos;
71223
- if (ch === 13 && input.charCodeAt(pos) === 10) {
71224
- ++pos;
71225
- }
71226
- ++curLine;
71227
- chunkStart = lineStart = pos;
71228
- } else {
71229
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
71230
- }
71231
- } else {
71232
- ++pos;
71233
- }
71234
- }
71235
- return {
71236
- pos,
71237
- str: out,
71238
- firstInvalidLoc,
71239
- lineStart,
71240
- curLine,
71241
- containsInvalid: !!firstInvalidLoc
71242
- };
71243
- }
71244
- function isStringEnd$2(type, ch, input, pos) {
71245
- if (type === "template") {
71246
- return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
71247
- }
71248
- return ch === (type === "double" ? 34 : 39);
71249
- }
71250
- function readEscapedChar$2(input, pos, lineStart, curLine, inTemplate, errors) {
71251
- const throwOnInvalid = !inTemplate;
71252
- pos++;
71253
- const res = ch => ({
71254
- pos,
71255
- ch,
71256
- lineStart,
71257
- curLine
71258
- });
71259
- const ch = input.charCodeAt(pos++);
71260
- switch (ch) {
71261
- case 110:
71262
- return res("\n");
71263
- case 114:
71264
- return res("\r");
71265
- case 120:
71266
- {
71267
- let code;
71268
- ({
71269
- code,
71270
- pos
71271
- } = readHexChar$2(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
71272
- return res(code === null ? null : String.fromCharCode(code));
71273
- }
71274
- case 117:
71275
- {
71276
- let code;
71277
- ({
71278
- code,
71279
- pos
71280
- } = readCodePoint$2(input, pos, lineStart, curLine, throwOnInvalid, errors));
71281
- return res(code === null ? null : String.fromCodePoint(code));
71282
- }
71283
- case 116:
71284
- return res("\t");
71285
- case 98:
71286
- return res("\b");
71287
- case 118:
71288
- return res("\u000b");
71289
- case 102:
71290
- return res("\f");
71291
- case 13:
71292
- if (input.charCodeAt(pos) === 10) {
71293
- ++pos;
71294
- }
71295
- case 10:
71296
- lineStart = pos;
71297
- ++curLine;
71298
- case 8232:
71299
- case 8233:
71300
- return res("");
71301
- case 56:
71302
- case 57:
71303
- if (inTemplate) {
71304
- return res(null);
71305
- } else {
71306
- errors.strictNumericEscape(pos - 1, lineStart, curLine);
71307
- }
71308
- default:
71309
- if (ch >= 48 && ch <= 55) {
71310
- const startPos = pos - 1;
71311
- const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
71312
- let octalStr = match[0];
71313
- let octal = parseInt(octalStr, 8);
71314
- if (octal > 255) {
71315
- octalStr = octalStr.slice(0, -1);
71316
- octal = parseInt(octalStr, 8);
71317
- }
71318
- pos += octalStr.length - 1;
71319
- const next = input.charCodeAt(pos);
71320
- if (octalStr !== "0" || next === 56 || next === 57) {
71321
- if (inTemplate) {
71322
- return res(null);
71323
- } else {
71324
- errors.strictNumericEscape(startPos, lineStart, curLine);
71325
- }
71326
- }
71327
- return res(String.fromCharCode(octal));
71328
- }
71329
- return res(String.fromCharCode(ch));
71330
- }
71331
- }
71332
- function readHexChar$2(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
71333
- const initialPos = pos;
71334
- let n;
71335
- ({
71336
- n,
71337
- pos
71338
- } = readInt$2(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
71339
- if (n === null) {
71340
- if (throwOnInvalid) {
71341
- errors.invalidEscapeSequence(initialPos, lineStart, curLine);
71342
- } else {
71343
- pos = initialPos - 1;
71344
- }
71345
- }
71346
- return {
71347
- code: n,
71348
- pos
71349
- };
71350
- }
71351
- function readInt$2(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
71352
- const start = pos;
71353
- const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings$2.hex : forbiddenNumericSeparatorSiblings$2.decBinOct;
71354
- const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling$2.hex : radix === 10 ? isAllowedNumericSeparatorSibling$2.dec : radix === 8 ? isAllowedNumericSeparatorSibling$2.oct : isAllowedNumericSeparatorSibling$2.bin;
71355
- let invalid = false;
71356
- let total = 0;
71357
- for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
71358
- const code = input.charCodeAt(pos);
71359
- let val;
71360
- if (code === 95 && allowNumSeparator !== "bail") {
71361
- const prev = input.charCodeAt(pos - 1);
71362
- const next = input.charCodeAt(pos + 1);
71363
- if (!allowNumSeparator) {
71364
- if (bailOnError) return {
71365
- n: null,
71366
- pos
71367
- };
71368
- errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
71369
- } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
71370
- if (bailOnError) return {
71371
- n: null,
71372
- pos
71373
- };
71374
- errors.unexpectedNumericSeparator(pos, lineStart, curLine);
71375
- }
71376
- ++pos;
71377
- continue;
71378
- }
71379
- if (code >= 97) {
71380
- val = code - 97 + 10;
71381
- } else if (code >= 65) {
71382
- val = code - 65 + 10;
71383
- } else if (_isDigit$2(code)) {
71384
- val = code - 48;
71385
- } else {
71386
- val = Infinity;
71387
- }
71388
- if (val >= radix) {
71389
- if (val <= 9 && bailOnError) {
71390
- return {
71391
- n: null,
71392
- pos
71393
- };
71394
- } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
71395
- val = 0;
71396
- } else if (forceLen) {
71397
- val = 0;
71398
- invalid = true;
71399
- } else {
71400
- break;
71401
- }
71402
- }
71403
- ++pos;
71404
- total = total * radix + val;
71405
- }
71406
- if (pos === start || len != null && pos - start !== len || invalid) {
71407
- return {
71408
- n: null,
71409
- pos
71410
- };
71411
- }
71412
- return {
71413
- n: total,
71414
- pos
71415
- };
71416
- }
71417
- function readCodePoint$2(input, pos, lineStart, curLine, throwOnInvalid, errors) {
71418
- const ch = input.charCodeAt(pos);
71419
- let code;
71420
- if (ch === 123) {
71421
- ++pos;
71422
- ({
71423
- code,
71424
- pos
71425
- } = readHexChar$2(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
71426
- ++pos;
71427
- if (code !== null && code > 0x10ffff) {
71428
- if (throwOnInvalid) {
71429
- errors.invalidCodePoint(pos, lineStart, curLine);
71430
- } else {
71431
- return {
71432
- code: null,
71433
- pos
71434
- };
71435
- }
71436
- }
71437
- } else {
71438
- ({
71439
- code,
71440
- pos
71441
- } = readHexChar$2(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
71442
- }
71443
- return {
71444
- code,
71445
- pos
71446
- };
71447
- }
71448
-
71449
- var constants$4 = {};
71450
-
71451
- Object.defineProperty(constants$4, "__esModule", {
71452
- value: true
71453
- });
71454
- constants$4.UPDATE_OPERATORS = constants$4.UNARY_OPERATORS = constants$4.STRING_UNARY_OPERATORS = constants$4.STATEMENT_OR_BLOCK_KEYS = constants$4.NUMBER_UNARY_OPERATORS = constants$4.NUMBER_BINARY_OPERATORS = constants$4.NOT_LOCAL_BINDING = constants$4.LOGICAL_OPERATORS = constants$4.INHERIT_KEYS = constants$4.FOR_INIT_KEYS = constants$4.FLATTENABLE_KEYS = constants$4.EQUALITY_BINARY_OPERATORS = constants$4.COMPARISON_BINARY_OPERATORS = constants$4.COMMENT_KEYS = constants$4.BOOLEAN_UNARY_OPERATORS = constants$4.BOOLEAN_NUMBER_BINARY_OPERATORS = constants$4.BOOLEAN_BINARY_OPERATORS = constants$4.BLOCK_SCOPED_SYMBOL = constants$4.BINARY_OPERATORS = constants$4.ASSIGNMENT_OPERATORS = void 0;
71455
- const STATEMENT_OR_BLOCK_KEYS$5 = ["consequent", "body", "alternate"];
71456
- constants$4.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS$5;
71457
- const FLATTENABLE_KEYS$4 = ["body", "expressions"];
71458
- constants$4.FLATTENABLE_KEYS = FLATTENABLE_KEYS$4;
71459
- const FOR_INIT_KEYS$4 = ["left", "init"];
71460
- constants$4.FOR_INIT_KEYS = FOR_INIT_KEYS$4;
71461
- const COMMENT_KEYS$4 = ["leadingComments", "trailingComments", "innerComments"];
71462
- constants$4.COMMENT_KEYS = COMMENT_KEYS$4;
71463
- const LOGICAL_OPERATORS$5 = ["||", "&&", "??"];
71464
- constants$4.LOGICAL_OPERATORS = LOGICAL_OPERATORS$5;
71465
- const UPDATE_OPERATORS$4 = ["++", "--"];
71466
- constants$4.UPDATE_OPERATORS = UPDATE_OPERATORS$4;
71467
- const BOOLEAN_NUMBER_BINARY_OPERATORS$5 = [">", "<", ">=", "<="];
71468
- constants$4.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS$5;
71469
- const EQUALITY_BINARY_OPERATORS$4 = ["==", "===", "!=", "!=="];
71470
- constants$4.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS$4;
71471
- const COMPARISON_BINARY_OPERATORS$4 = [...EQUALITY_BINARY_OPERATORS$4, "in", "instanceof"];
71472
- constants$4.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS$4;
71473
- const BOOLEAN_BINARY_OPERATORS$4 = [...COMPARISON_BINARY_OPERATORS$4, ...BOOLEAN_NUMBER_BINARY_OPERATORS$5];
71474
- constants$4.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS$4;
71475
- const NUMBER_BINARY_OPERATORS$4 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
71476
- constants$4.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS$4;
71477
- const BINARY_OPERATORS$4 = ["+", ...NUMBER_BINARY_OPERATORS$4, ...BOOLEAN_BINARY_OPERATORS$4, "|>"];
71478
- constants$4.BINARY_OPERATORS = BINARY_OPERATORS$4;
71479
- const ASSIGNMENT_OPERATORS$4 = ["=", "+=", ...NUMBER_BINARY_OPERATORS$4.map(op => op + "="), ...LOGICAL_OPERATORS$5.map(op => op + "=")];
71480
- constants$4.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS$4;
71481
- const BOOLEAN_UNARY_OPERATORS$4 = ["delete", "!"];
71482
- constants$4.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS$4;
71483
- const NUMBER_UNARY_OPERATORS$4 = ["+", "-", "~"];
71484
- constants$4.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS$4;
71485
- const STRING_UNARY_OPERATORS$4 = ["typeof"];
71486
- constants$4.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS$4;
71487
- const UNARY_OPERATORS$4 = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS$4, ...NUMBER_UNARY_OPERATORS$4, ...STRING_UNARY_OPERATORS$4];
71488
- constants$4.UNARY_OPERATORS = UNARY_OPERATORS$4;
71489
- const INHERIT_KEYS$4 = {
71490
- optional: ["typeAnnotation", "typeParameters", "returnType"],
71491
- force: ["start", "loc", "end"]
71492
- };
71493
- constants$4.INHERIT_KEYS = INHERIT_KEYS$4;
71494
- const BLOCK_SCOPED_SYMBOL$4 = Symbol.for("var used to be block scoped");
71495
- constants$4.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL$4;
71496
- const NOT_LOCAL_BINDING$5 = Symbol.for("should not be considered a local binding");
71497
- constants$4.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING$5;
71498
-
71499
- var utils$5 = {};
71500
-
71501
- var hasRequiredUtils$4;
71157
+ var hasRequiredLib$8;
71502
71158
 
71503
- function requireUtils$4 () {
71504
- if (hasRequiredUtils$4) return utils$5;
71505
- hasRequiredUtils$4 = 1;
71159
+ function requireLib$8 () {
71160
+ if (hasRequiredLib$8) return lib$m;
71161
+ hasRequiredLib$8 = 1;
71506
71162
 
71507
- Object.defineProperty(utils$5, "__esModule", {
71163
+ Object.defineProperty(lib$m, "__esModule", {
71508
71164
  value: true
71509
71165
  });
71510
- utils$5.VISITOR_KEYS = utils$5.NODE_PARENT_VALIDATIONS = utils$5.NODE_FIELDS = utils$5.FLIPPED_ALIAS_KEYS = utils$5.DEPRECATED_KEYS = utils$5.BUILDER_KEYS = utils$5.ALIAS_KEYS = void 0;
71511
- utils$5.arrayOf = arrayOf;
71512
- utils$5.arrayOfType = arrayOfType;
71513
- utils$5.assertEach = assertEach;
71514
- utils$5.assertNodeOrValueType = assertNodeOrValueType;
71515
- utils$5.assertNodeType = assertNodeType;
71516
- utils$5.assertOneOf = assertOneOf;
71517
- utils$5.assertOptionalChainStart = assertOptionalChainStart;
71518
- utils$5.assertShape = assertShape;
71519
- utils$5.assertValueType = assertValueType;
71520
- utils$5.chain = chain;
71521
- utils$5.default = defineType;
71522
- utils$5.defineAliasedType = defineAliasedType;
71523
- utils$5.typeIs = typeIs;
71524
- utils$5.validate = validate;
71525
- utils$5.validateArrayOfType = validateArrayOfType;
71526
- utils$5.validateOptional = validateOptional;
71527
- utils$5.validateOptionalType = validateOptionalType;
71528
- utils$5.validateType = validateType;
71529
- var _is = requireIs$4();
71530
- var _validate = requireValidate$4();
71531
- const VISITOR_KEYS = {};
71532
- utils$5.VISITOR_KEYS = VISITOR_KEYS;
71533
- const ALIAS_KEYS = {};
71534
- utils$5.ALIAS_KEYS = ALIAS_KEYS;
71535
- const FLIPPED_ALIAS_KEYS = {};
71536
- utils$5.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
71537
- const NODE_FIELDS = {};
71538
- utils$5.NODE_FIELDS = NODE_FIELDS;
71539
- const BUILDER_KEYS = {};
71540
- utils$5.BUILDER_KEYS = BUILDER_KEYS;
71541
- const DEPRECATED_KEYS = {};
71542
- utils$5.DEPRECATED_KEYS = DEPRECATED_KEYS;
71543
- const NODE_PARENT_VALIDATIONS = {};
71544
- utils$5.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
71545
- function getType(val) {
71546
- if (Array.isArray(val)) {
71547
- return "array";
71548
- } else if (val === null) {
71549
- return "null";
71550
- } else {
71551
- return typeof val;
71166
+ lib$m.readCodePoint = readCodePoint;
71167
+ lib$m.readInt = readInt;
71168
+ lib$m.readStringContents = readStringContents;
71169
+ var _isDigit = function isDigit(code) {
71170
+ return code >= 48 && code <= 57;
71171
+ };
71172
+ const forbiddenNumericSeparatorSiblings = {
71173
+ decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
71174
+ hex: new Set([46, 88, 95, 120])
71175
+ };
71176
+ const isAllowedNumericSeparatorSibling = {
71177
+ bin: ch => ch === 48 || ch === 49,
71178
+ oct: ch => ch >= 48 && ch <= 55,
71179
+ dec: ch => ch >= 48 && ch <= 57,
71180
+ hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
71181
+ };
71182
+ function readStringContents(type, input, pos, lineStart, curLine, errors) {
71183
+ const initialPos = pos;
71184
+ const initialLineStart = lineStart;
71185
+ const initialCurLine = curLine;
71186
+ let out = "";
71187
+ let firstInvalidLoc = null;
71188
+ let chunkStart = pos;
71189
+ const {
71190
+ length
71191
+ } = input;
71192
+ for (;;) {
71193
+ if (pos >= length) {
71194
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
71195
+ out += input.slice(chunkStart, pos);
71196
+ break;
71197
+ }
71198
+ const ch = input.charCodeAt(pos);
71199
+ if (isStringEnd(type, ch, input, pos)) {
71200
+ out += input.slice(chunkStart, pos);
71201
+ break;
71202
+ }
71203
+ if (ch === 92) {
71204
+ out += input.slice(chunkStart, pos);
71205
+ const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
71206
+ if (res.ch === null && !firstInvalidLoc) {
71207
+ firstInvalidLoc = {
71208
+ pos,
71209
+ lineStart,
71210
+ curLine
71211
+ };
71212
+ } else {
71213
+ out += res.ch;
71214
+ }
71215
+ ({
71216
+ pos,
71217
+ lineStart,
71218
+ curLine
71219
+ } = res);
71220
+ chunkStart = pos;
71221
+ } else if (ch === 8232 || ch === 8233) {
71222
+ ++pos;
71223
+ ++curLine;
71224
+ lineStart = pos;
71225
+ } else if (ch === 10 || ch === 13) {
71226
+ if (type === "template") {
71227
+ out += input.slice(chunkStart, pos) + "\n";
71228
+ ++pos;
71229
+ if (ch === 13 && input.charCodeAt(pos) === 10) {
71230
+ ++pos;
71231
+ }
71232
+ ++curLine;
71233
+ chunkStart = lineStart = pos;
71234
+ } else {
71235
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
71236
+ }
71237
+ } else {
71238
+ ++pos;
71239
+ }
71552
71240
  }
71553
- }
71554
- function validate(validate) {
71555
- return {
71556
- validate
71557
- };
71558
- }
71559
- function typeIs(typeName) {
71560
- return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
71561
- }
71562
- function validateType(typeName) {
71563
- return validate(typeIs(typeName));
71564
- }
71565
- function validateOptional(validate) {
71566
- return {
71567
- validate,
71568
- optional: true
71569
- };
71570
- }
71571
- function validateOptionalType(typeName) {
71572
71241
  return {
71573
- validate: typeIs(typeName),
71574
- optional: true
71242
+ pos,
71243
+ str: out,
71244
+ firstInvalidLoc,
71245
+ lineStart,
71246
+ curLine,
71247
+ containsInvalid: !!firstInvalidLoc
71575
71248
  };
71576
71249
  }
71577
- function arrayOf(elementType) {
71578
- return chain(assertValueType("array"), assertEach(elementType));
71579
- }
71580
- function arrayOfType(typeName) {
71581
- return arrayOf(typeIs(typeName));
71582
- }
71583
- function validateArrayOfType(typeName) {
71584
- return validate(arrayOfType(typeName));
71585
- }
71586
- function assertEach(callback) {
71587
- function validator(node, key, val) {
71588
- if (!Array.isArray(val)) return;
71589
- for (let i = 0; i < val.length; i++) {
71590
- const subkey = `${key}[${i}]`;
71591
- const v = val[i];
71592
- callback(node, subkey, v);
71593
- (0, _validate.validateChild)(node, subkey, v);
71594
- }
71250
+ function isStringEnd(type, ch, input, pos) {
71251
+ if (type === "template") {
71252
+ return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
71595
71253
  }
71596
- validator.each = callback;
71597
- return validator;
71254
+ return ch === (type === "double" ? 34 : 39);
71255
+ }
71256
+ function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
71257
+ const throwOnInvalid = !inTemplate;
71258
+ pos++;
71259
+ const res = ch => ({
71260
+ pos,
71261
+ ch,
71262
+ lineStart,
71263
+ curLine
71264
+ });
71265
+ const ch = input.charCodeAt(pos++);
71266
+ switch (ch) {
71267
+ case 110:
71268
+ return res("\n");
71269
+ case 114:
71270
+ return res("\r");
71271
+ case 120:
71272
+ {
71273
+ let code;
71274
+ ({
71275
+ code,
71276
+ pos
71277
+ } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
71278
+ return res(code === null ? null : String.fromCharCode(code));
71279
+ }
71280
+ case 117:
71281
+ {
71282
+ let code;
71283
+ ({
71284
+ code,
71285
+ pos
71286
+ } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
71287
+ return res(code === null ? null : String.fromCodePoint(code));
71288
+ }
71289
+ case 116:
71290
+ return res("\t");
71291
+ case 98:
71292
+ return res("\b");
71293
+ case 118:
71294
+ return res("\u000b");
71295
+ case 102:
71296
+ return res("\f");
71297
+ case 13:
71298
+ if (input.charCodeAt(pos) === 10) {
71299
+ ++pos;
71300
+ }
71301
+ case 10:
71302
+ lineStart = pos;
71303
+ ++curLine;
71304
+ case 8232:
71305
+ case 8233:
71306
+ return res("");
71307
+ case 56:
71308
+ case 57:
71309
+ if (inTemplate) {
71310
+ return res(null);
71311
+ } else {
71312
+ errors.strictNumericEscape(pos - 1, lineStart, curLine);
71313
+ }
71314
+ default:
71315
+ if (ch >= 48 && ch <= 55) {
71316
+ const startPos = pos - 1;
71317
+ const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
71318
+ let octalStr = match[0];
71319
+ let octal = parseInt(octalStr, 8);
71320
+ if (octal > 255) {
71321
+ octalStr = octalStr.slice(0, -1);
71322
+ octal = parseInt(octalStr, 8);
71323
+ }
71324
+ pos += octalStr.length - 1;
71325
+ const next = input.charCodeAt(pos);
71326
+ if (octalStr !== "0" || next === 56 || next === 57) {
71327
+ if (inTemplate) {
71328
+ return res(null);
71329
+ } else {
71330
+ errors.strictNumericEscape(startPos, lineStart, curLine);
71331
+ }
71332
+ }
71333
+ return res(String.fromCharCode(octal));
71334
+ }
71335
+ return res(String.fromCharCode(ch));
71336
+ }
71337
+ }
71338
+ function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
71339
+ const initialPos = pos;
71340
+ let n;
71341
+ ({
71342
+ n,
71343
+ pos
71344
+ } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
71345
+ if (n === null) {
71346
+ if (throwOnInvalid) {
71347
+ errors.invalidEscapeSequence(initialPos, lineStart, curLine);
71348
+ } else {
71349
+ pos = initialPos - 1;
71350
+ }
71351
+ }
71352
+ return {
71353
+ code: n,
71354
+ pos
71355
+ };
71356
+ }
71357
+ function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
71358
+ const start = pos;
71359
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
71360
+ const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
71361
+ let invalid = false;
71362
+ let total = 0;
71363
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
71364
+ const code = input.charCodeAt(pos);
71365
+ let val;
71366
+ if (code === 95 && allowNumSeparator !== "bail") {
71367
+ const prev = input.charCodeAt(pos - 1);
71368
+ const next = input.charCodeAt(pos + 1);
71369
+ if (!allowNumSeparator) {
71370
+ if (bailOnError) return {
71371
+ n: null,
71372
+ pos
71373
+ };
71374
+ errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
71375
+ } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
71376
+ if (bailOnError) return {
71377
+ n: null,
71378
+ pos
71379
+ };
71380
+ errors.unexpectedNumericSeparator(pos, lineStart, curLine);
71381
+ }
71382
+ ++pos;
71383
+ continue;
71384
+ }
71385
+ if (code >= 97) {
71386
+ val = code - 97 + 10;
71387
+ } else if (code >= 65) {
71388
+ val = code - 65 + 10;
71389
+ } else if (_isDigit(code)) {
71390
+ val = code - 48;
71391
+ } else {
71392
+ val = Infinity;
71393
+ }
71394
+ if (val >= radix) {
71395
+ if (val <= 9 && bailOnError) {
71396
+ return {
71397
+ n: null,
71398
+ pos
71399
+ };
71400
+ } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
71401
+ val = 0;
71402
+ } else if (forceLen) {
71403
+ val = 0;
71404
+ invalid = true;
71405
+ } else {
71406
+ break;
71407
+ }
71408
+ }
71409
+ ++pos;
71410
+ total = total * radix + val;
71411
+ }
71412
+ if (pos === start || len != null && pos - start !== len || invalid) {
71413
+ return {
71414
+ n: null,
71415
+ pos
71416
+ };
71417
+ }
71418
+ return {
71419
+ n: total,
71420
+ pos
71421
+ };
71422
+ }
71423
+ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
71424
+ const ch = input.charCodeAt(pos);
71425
+ let code;
71426
+ if (ch === 123) {
71427
+ ++pos;
71428
+ ({
71429
+ code,
71430
+ pos
71431
+ } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
71432
+ ++pos;
71433
+ if (code !== null && code > 0x10ffff) {
71434
+ if (throwOnInvalid) {
71435
+ errors.invalidCodePoint(pos, lineStart, curLine);
71436
+ } else {
71437
+ return {
71438
+ code: null,
71439
+ pos
71440
+ };
71441
+ }
71442
+ }
71443
+ } else {
71444
+ ({
71445
+ code,
71446
+ pos
71447
+ } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
71448
+ }
71449
+ return {
71450
+ code,
71451
+ pos
71452
+ };
71453
+ }
71454
+
71455
+
71456
+ return lib$m;
71457
+ }
71458
+
71459
+ var constants$4 = {};
71460
+
71461
+ Object.defineProperty(constants$4, "__esModule", {
71462
+ value: true
71463
+ });
71464
+ constants$4.UPDATE_OPERATORS = constants$4.UNARY_OPERATORS = constants$4.STRING_UNARY_OPERATORS = constants$4.STATEMENT_OR_BLOCK_KEYS = constants$4.NUMBER_UNARY_OPERATORS = constants$4.NUMBER_BINARY_OPERATORS = constants$4.NOT_LOCAL_BINDING = constants$4.LOGICAL_OPERATORS = constants$4.INHERIT_KEYS = constants$4.FOR_INIT_KEYS = constants$4.FLATTENABLE_KEYS = constants$4.EQUALITY_BINARY_OPERATORS = constants$4.COMPARISON_BINARY_OPERATORS = constants$4.COMMENT_KEYS = constants$4.BOOLEAN_UNARY_OPERATORS = constants$4.BOOLEAN_NUMBER_BINARY_OPERATORS = constants$4.BOOLEAN_BINARY_OPERATORS = constants$4.BLOCK_SCOPED_SYMBOL = constants$4.BINARY_OPERATORS = constants$4.ASSIGNMENT_OPERATORS = void 0;
71465
+ const STATEMENT_OR_BLOCK_KEYS$5 = ["consequent", "body", "alternate"];
71466
+ constants$4.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS$5;
71467
+ const FLATTENABLE_KEYS$4 = ["body", "expressions"];
71468
+ constants$4.FLATTENABLE_KEYS = FLATTENABLE_KEYS$4;
71469
+ const FOR_INIT_KEYS$4 = ["left", "init"];
71470
+ constants$4.FOR_INIT_KEYS = FOR_INIT_KEYS$4;
71471
+ const COMMENT_KEYS$4 = ["leadingComments", "trailingComments", "innerComments"];
71472
+ constants$4.COMMENT_KEYS = COMMENT_KEYS$4;
71473
+ const LOGICAL_OPERATORS$5 = ["||", "&&", "??"];
71474
+ constants$4.LOGICAL_OPERATORS = LOGICAL_OPERATORS$5;
71475
+ const UPDATE_OPERATORS$4 = ["++", "--"];
71476
+ constants$4.UPDATE_OPERATORS = UPDATE_OPERATORS$4;
71477
+ const BOOLEAN_NUMBER_BINARY_OPERATORS$5 = [">", "<", ">=", "<="];
71478
+ constants$4.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS$5;
71479
+ const EQUALITY_BINARY_OPERATORS$4 = ["==", "===", "!=", "!=="];
71480
+ constants$4.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS$4;
71481
+ const COMPARISON_BINARY_OPERATORS$4 = [...EQUALITY_BINARY_OPERATORS$4, "in", "instanceof"];
71482
+ constants$4.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS$4;
71483
+ const BOOLEAN_BINARY_OPERATORS$4 = [...COMPARISON_BINARY_OPERATORS$4, ...BOOLEAN_NUMBER_BINARY_OPERATORS$5];
71484
+ constants$4.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS$4;
71485
+ const NUMBER_BINARY_OPERATORS$4 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
71486
+ constants$4.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS$4;
71487
+ const BINARY_OPERATORS$4 = ["+", ...NUMBER_BINARY_OPERATORS$4, ...BOOLEAN_BINARY_OPERATORS$4, "|>"];
71488
+ constants$4.BINARY_OPERATORS = BINARY_OPERATORS$4;
71489
+ const ASSIGNMENT_OPERATORS$4 = ["=", "+=", ...NUMBER_BINARY_OPERATORS$4.map(op => op + "="), ...LOGICAL_OPERATORS$5.map(op => op + "=")];
71490
+ constants$4.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS$4;
71491
+ const BOOLEAN_UNARY_OPERATORS$4 = ["delete", "!"];
71492
+ constants$4.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS$4;
71493
+ const NUMBER_UNARY_OPERATORS$4 = ["+", "-", "~"];
71494
+ constants$4.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS$4;
71495
+ const STRING_UNARY_OPERATORS$4 = ["typeof"];
71496
+ constants$4.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS$4;
71497
+ const UNARY_OPERATORS$4 = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS$4, ...NUMBER_UNARY_OPERATORS$4, ...STRING_UNARY_OPERATORS$4];
71498
+ constants$4.UNARY_OPERATORS = UNARY_OPERATORS$4;
71499
+ const INHERIT_KEYS$4 = {
71500
+ optional: ["typeAnnotation", "typeParameters", "returnType"],
71501
+ force: ["start", "loc", "end"]
71502
+ };
71503
+ constants$4.INHERIT_KEYS = INHERIT_KEYS$4;
71504
+ const BLOCK_SCOPED_SYMBOL$4 = Symbol.for("var used to be block scoped");
71505
+ constants$4.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL$4;
71506
+ const NOT_LOCAL_BINDING$5 = Symbol.for("should not be considered a local binding");
71507
+ constants$4.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING$5;
71508
+
71509
+ var utils$5 = {};
71510
+
71511
+ var hasRequiredUtils$4;
71512
+
71513
+ function requireUtils$4 () {
71514
+ if (hasRequiredUtils$4) return utils$5;
71515
+ hasRequiredUtils$4 = 1;
71516
+
71517
+ Object.defineProperty(utils$5, "__esModule", {
71518
+ value: true
71519
+ });
71520
+ utils$5.VISITOR_KEYS = utils$5.NODE_PARENT_VALIDATIONS = utils$5.NODE_FIELDS = utils$5.FLIPPED_ALIAS_KEYS = utils$5.DEPRECATED_KEYS = utils$5.BUILDER_KEYS = utils$5.ALIAS_KEYS = void 0;
71521
+ utils$5.arrayOf = arrayOf;
71522
+ utils$5.arrayOfType = arrayOfType;
71523
+ utils$5.assertEach = assertEach;
71524
+ utils$5.assertNodeOrValueType = assertNodeOrValueType;
71525
+ utils$5.assertNodeType = assertNodeType;
71526
+ utils$5.assertOneOf = assertOneOf;
71527
+ utils$5.assertOptionalChainStart = assertOptionalChainStart;
71528
+ utils$5.assertShape = assertShape;
71529
+ utils$5.assertValueType = assertValueType;
71530
+ utils$5.chain = chain;
71531
+ utils$5.default = defineType;
71532
+ utils$5.defineAliasedType = defineAliasedType;
71533
+ utils$5.typeIs = typeIs;
71534
+ utils$5.validate = validate;
71535
+ utils$5.validateArrayOfType = validateArrayOfType;
71536
+ utils$5.validateOptional = validateOptional;
71537
+ utils$5.validateOptionalType = validateOptionalType;
71538
+ utils$5.validateType = validateType;
71539
+ var _is = requireIs$4();
71540
+ var _validate = requireValidate$4();
71541
+ const VISITOR_KEYS = {};
71542
+ utils$5.VISITOR_KEYS = VISITOR_KEYS;
71543
+ const ALIAS_KEYS = {};
71544
+ utils$5.ALIAS_KEYS = ALIAS_KEYS;
71545
+ const FLIPPED_ALIAS_KEYS = {};
71546
+ utils$5.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
71547
+ const NODE_FIELDS = {};
71548
+ utils$5.NODE_FIELDS = NODE_FIELDS;
71549
+ const BUILDER_KEYS = {};
71550
+ utils$5.BUILDER_KEYS = BUILDER_KEYS;
71551
+ const DEPRECATED_KEYS = {};
71552
+ utils$5.DEPRECATED_KEYS = DEPRECATED_KEYS;
71553
+ const NODE_PARENT_VALIDATIONS = {};
71554
+ utils$5.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
71555
+ function getType(val) {
71556
+ if (Array.isArray(val)) {
71557
+ return "array";
71558
+ } else if (val === null) {
71559
+ return "null";
71560
+ } else {
71561
+ return typeof val;
71562
+ }
71563
+ }
71564
+ function validate(validate) {
71565
+ return {
71566
+ validate
71567
+ };
71568
+ }
71569
+ function typeIs(typeName) {
71570
+ return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
71571
+ }
71572
+ function validateType(typeName) {
71573
+ return validate(typeIs(typeName));
71574
+ }
71575
+ function validateOptional(validate) {
71576
+ return {
71577
+ validate,
71578
+ optional: true
71579
+ };
71580
+ }
71581
+ function validateOptionalType(typeName) {
71582
+ return {
71583
+ validate: typeIs(typeName),
71584
+ optional: true
71585
+ };
71586
+ }
71587
+ function arrayOf(elementType) {
71588
+ return chain(assertValueType("array"), assertEach(elementType));
71589
+ }
71590
+ function arrayOfType(typeName) {
71591
+ return arrayOf(typeIs(typeName));
71592
+ }
71593
+ function validateArrayOfType(typeName) {
71594
+ return validate(arrayOfType(typeName));
71595
+ }
71596
+ function assertEach(callback) {
71597
+ function validator(node, key, val) {
71598
+ if (!Array.isArray(val)) return;
71599
+ for (let i = 0; i < val.length; i++) {
71600
+ const subkey = `${key}[${i}]`;
71601
+ const v = val[i];
71602
+ callback(node, subkey, v);
71603
+ (0, _validate.validateChild)(node, subkey, v);
71604
+ }
71605
+ }
71606
+ validator.each = callback;
71607
+ return validator;
71598
71608
  }
71599
71609
  function assertOneOf(...values) {
71600
71610
  function validate(node, key, val) {
@@ -71798,7 +71808,7 @@ function requireCore$4 () {
71798
71808
  var _is = requireIs$4();
71799
71809
  var _isValidIdentifier = isValidIdentifier$9;
71800
71810
  var _helperValidatorIdentifier = lib$n;
71801
- var _helperStringParser = lib$m;
71811
+ var _helperStringParser = requireLib$8();
71802
71812
  var _constants = constants$4;
71803
71813
  var _utils = requireUtils$4();
71804
71814
  const defineType = (0, _utils.defineAliasedType)("Standardized");
@@ -74957,7 +74967,7 @@ function requireValidateNode$4 () {
74957
74967
  });
74958
74968
  validateNode$4.default = validateNode;
74959
74969
  var _validate = requireValidate$4();
74960
- var _ = requireLib$8();
74970
+ var _ = requireLib$7();
74961
74971
  function validateNode(node) {
74962
74972
  const keys = _.BUILDER_KEYS[node.type];
74963
74973
  for (const key of keys) {
@@ -76973,7 +76983,7 @@ function requireCleanJSXElementLiteralChild$4 () {
76973
76983
  });
76974
76984
  cleanJSXElementLiteralChild$4.default = cleanJSXElementLiteralChild;
76975
76985
  var _generated = requireGenerated$4();
76976
- var _ = requireLib$8();
76986
+ var _ = requireLib$7();
76977
76987
  function cleanJSXElementLiteralChild(child, args) {
76978
76988
  const lines = child.value.split(/\r\n|\n|\r/);
76979
76989
  let lastNonEmptyLine = 0;
@@ -81059,7 +81069,7 @@ function requirePrependToMemberExpression$4 () {
81059
81069
  });
81060
81070
  prependToMemberExpression$4.default = prependToMemberExpression;
81061
81071
  var _generated = requireGenerated$4();
81062
- var _ = requireLib$8();
81072
+ var _ = requireLib$7();
81063
81073
  function prependToMemberExpression(member, prepend) {
81064
81074
  if ((0, _.isSuper)(member.object)) {
81065
81075
  throw new Error("Cannot prepend node to super property access (`super.foo`).");
@@ -81411,11 +81421,11 @@ function isVar$9(node) {
81411
81421
  }) && !node[_constants$k.BLOCK_SCOPED_SYMBOL];
81412
81422
  }
81413
81423
 
81414
- var hasRequiredLib$8;
81424
+ var hasRequiredLib$7;
81415
81425
 
81416
- function requireLib$8 () {
81417
- if (hasRequiredLib$8) return lib$o;
81418
- hasRequiredLib$8 = 1;
81426
+ function requireLib$7 () {
81427
+ if (hasRequiredLib$7) return lib$o;
81428
+ hasRequiredLib$7 = 1;
81419
81429
  (function (exports) {
81420
81430
 
81421
81431
  Object.defineProperty(exports, "__esModule", {
@@ -81998,7 +82008,7 @@ visitors.isExplodedVisitor = isExplodedVisitor;
81998
82008
  visitors.merge = merge$4;
81999
82009
  visitors.verify = verify;
82000
82010
  var virtualTypes = virtualTypes$1;
82001
- var _t$p = requireLib$8();
82011
+ var _t$p = requireLib$7();
82002
82012
  const {
82003
82013
  DEPRECATED_KEYS,
82004
82014
  DEPRECATED_ALIASES: DEPRECATED_ALIASES$4,
@@ -82265,7 +82275,7 @@ Object.defineProperty(lib$l, "__esModule", {
82265
82275
  value: true
82266
82276
  });
82267
82277
  lib$l.default = splitExportDeclaration;
82268
- var _t$o = requireLib$8();
82278
+ var _t$o = requireLib$7();
82269
82279
  const {
82270
82280
  cloneNode: cloneNode$b,
82271
82281
  exportNamedDeclaration,
@@ -82383,7 +82393,7 @@ function requireRenamer () {
82383
82393
  });
82384
82394
  renamer.default = void 0;
82385
82395
  var _helperSplitExportDeclaration = lib$l;
82386
- var t = requireLib$8();
82396
+ var t = requireLib$7();
82387
82397
  var _helperEnvironmentVisitor = lib$k;
82388
82398
  var _traverseNode = requireTraverseNode();
82389
82399
  var _visitors = visitors;
@@ -84183,10 +84193,10 @@ function requireScope () {
84183
84193
  });
84184
84194
  scope.default = void 0;
84185
84195
  var _renamer = requireRenamer();
84186
- var _index = requireLib$4();
84196
+ var _index = requireLib$3();
84187
84197
  var _binding = binding;
84188
84198
  var _globals = globals;
84189
- var _t = requireLib$8();
84199
+ var _t = requireLib$7();
84190
84200
  var t = _t;
84191
84201
  var _cache = cache;
84192
84202
  var _visitors = visitors;
@@ -86791,7 +86801,7 @@ Object.defineProperty(whitespace$1, "__esModule", {
86791
86801
  value: true
86792
86802
  });
86793
86803
  whitespace$1.nodes = void 0;
86794
- var _t$n = requireLib$8();
86804
+ var _t$n = requireLib$7();
86795
86805
  const {
86796
86806
  FLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS$1,
86797
86807
  isArrayExpression: isArrayExpression$6,
@@ -86959,7 +86969,7 @@ parentheses.UnaryLike = UnaryLike;
86959
86969
  parentheses.IntersectionTypeAnnotation = parentheses.UnionTypeAnnotation = UnionTypeAnnotation;
86960
86970
  parentheses.UpdateExpression = UpdateExpression$1;
86961
86971
  parentheses.AwaitExpression = parentheses.YieldExpression = YieldExpression$1;
86962
- var _t$m = requireLib$8();
86972
+ var _t$m = requireLib$7();
86963
86973
  const {
86964
86974
  isArrayTypeAnnotation: isArrayTypeAnnotation$5,
86965
86975
  isArrowFunctionExpression: isArrowFunctionExpression$6,
@@ -87243,7 +87253,7 @@ node.needsWhitespaceAfter = needsWhitespaceAfter;
87243
87253
  node.needsWhitespaceBefore = needsWhitespaceBefore;
87244
87254
  var whitespace = whitespace$1;
87245
87255
  var parens$2 = parentheses;
87246
- var _t$l = requireLib$8();
87256
+ var _t$l = requireLib$7();
87247
87257
  const {
87248
87258
  FLIPPED_ALIAS_KEYS,
87249
87259
  isCallExpression: isCallExpression$8,
@@ -87372,7 +87382,7 @@ expressions$2.UpdateExpression = UpdateExpression;
87372
87382
  expressions$2.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
87373
87383
  expressions$2.YieldExpression = YieldExpression;
87374
87384
  expressions$2._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport;
87375
- var _t$k = requireLib$8();
87385
+ var _t$k = requireLib$7();
87376
87386
  var n$1 = node;
87377
87387
  const {
87378
87388
  isCallExpression: isCallExpression$7,
@@ -87671,7 +87681,7 @@ statements$4.VariableDeclaration = VariableDeclaration$1;
87671
87681
  statements$4.VariableDeclarator = VariableDeclarator;
87672
87682
  statements$4.WhileStatement = WhileStatement$1;
87673
87683
  statements$4.WithStatement = WithStatement;
87674
- var _t$j = requireLib$8();
87684
+ var _t$j = requireLib$7();
87675
87685
  const {
87676
87686
  isFor: isFor$4,
87677
87687
  isForStatement: isForStatement$5,
@@ -87938,7 +87948,7 @@ classes.ClassPrivateProperty = ClassPrivateProperty$1;
87938
87948
  classes.ClassProperty = ClassProperty$2;
87939
87949
  classes.StaticBlock = StaticBlock$1;
87940
87950
  classes._classMethodHead = _classMethodHead;
87941
- var _t$i = requireLib$8();
87951
+ var _t$i = requireLib$7();
87942
87952
  const {
87943
87953
  isExportDefaultDeclaration: isExportDefaultDeclaration$4,
87944
87954
  isExportNamedDeclaration: isExportNamedDeclaration$4
@@ -88113,7 +88123,7 @@ methods._param = _param;
88113
88123
  methods._parameters = _parameters;
88114
88124
  methods._params = _params;
88115
88125
  methods._predicate = _predicate;
88116
- var _t$h = requireLib$8();
88126
+ var _t$h = requireLib$7();
88117
88127
  const {
88118
88128
  isIdentifier: isIdentifier$k
88119
88129
  } = _t$h;
@@ -88289,7 +88299,7 @@ modules.ImportDefaultSpecifier = ImportDefaultSpecifier;
88289
88299
  modules.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
88290
88300
  modules.ImportSpecifier = ImportSpecifier;
88291
88301
  modules._printAttributes = _printAttributes;
88292
- var _t$g = requireLib$8();
88302
+ var _t$g = requireLib$7();
88293
88303
  const {
88294
88304
  isClassDeclaration: isClassDeclaration$4,
88295
88305
  isExportDefaultSpecifier: isExportDefaultSpecifier$4,
@@ -88878,7 +88888,7 @@ types$l.SpreadElement = types$l.RestElement = RestElement$1;
88878
88888
  types$l.StringLiteral = StringLiteral$1;
88879
88889
  types$l.TopicReference = TopicReference;
88880
88890
  types$l.TupleExpression = TupleExpression$1;
88881
- var _t$f = requireLib$8();
88891
+ var _t$f = requireLib$7();
88882
88892
  var _jsesc = jsesc_1;
88883
88893
  const {
88884
88894
  isAssignmentPattern: isAssignmentPattern$6,
@@ -89153,7 +89163,7 @@ var flow$5 = {};
89153
89163
  exports.VoidTypeAnnotation = VoidTypeAnnotation;
89154
89164
  exports._interfaceish = _interfaceish;
89155
89165
  exports._variance = _variance;
89156
- var _t = requireLib$8();
89166
+ var _t = requireLib$7();
89157
89167
  var _modules = modules;
89158
89168
  var _types2 = types$l;
89159
89169
  const {
@@ -90790,7 +90800,7 @@ Object.defineProperty(printer, "__esModule", {
90790
90800
  printer.default = void 0;
90791
90801
  var _buffer = buffer;
90792
90802
  var n = node;
90793
- var _t$e = requireLib$8();
90803
+ var _t$e = requireLib$7();
90794
90804
  var generatorFunctions = generators;
90795
90805
  const {
90796
90806
  isFunction: isFunction$8,
@@ -91538,7 +91548,7 @@ ancestry.getStatementParent = getStatementParent;
91538
91548
  ancestry.inType = inType;
91539
91549
  ancestry.isAncestor = isAncestor;
91540
91550
  ancestry.isDescendant = isDescendant;
91541
- var _t$d = requireLib$8();
91551
+ var _t$d = requireLib$7();
91542
91552
  const {
91543
91553
  VISITOR_KEYS: VISITOR_KEYS$1
91544
91554
  } = _t$d;
@@ -91675,7 +91685,7 @@ Object.defineProperty(util, "__esModule", {
91675
91685
  value: true
91676
91686
  });
91677
91687
  util.createUnionType = createUnionType;
91678
- var _t$c = requireLib$8();
91688
+ var _t$c = requireLib$7();
91679
91689
  const {
91680
91690
  createFlowUnionType: createFlowUnionType$4,
91681
91691
  createTSUnionType: createTSUnionType$4,
@@ -91702,7 +91712,7 @@ Object.defineProperty(infererReference, "__esModule", {
91702
91712
  value: true
91703
91713
  });
91704
91714
  infererReference.default = _default$f;
91705
- var _t$b = requireLib$8();
91715
+ var _t$b = requireLib$7();
91706
91716
  var _util = util;
91707
91717
  const {
91708
91718
  BOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS$4,
@@ -91882,7 +91892,7 @@ function getConditionalAnnotation(binding, path, name) {
91882
91892
  exports.UnaryExpression = UnaryExpression;
91883
91893
  exports.UpdateExpression = UpdateExpression;
91884
91894
  exports.VariableDeclarator = VariableDeclarator;
91885
- var _t = requireLib$8();
91895
+ var _t = requireLib$7();
91886
91896
  var _infererReference = infererReference;
91887
91897
  var _util = util;
91888
91898
  const {
@@ -92067,7 +92077,7 @@ inference.getTypeAnnotation = getTypeAnnotation;
92067
92077
  inference.isBaseType = isBaseType;
92068
92078
  inference.isGenericType = isGenericType;
92069
92079
  var inferers = inferers$1;
92070
- var _t$a = requireLib$8();
92080
+ var _t$a = requireLib$7();
92071
92081
  const {
92072
92082
  anyTypeAnnotation,
92073
92083
  isAnyTypeAnnotation: isAnyTypeAnnotation$4,
@@ -94544,20 +94554,20 @@ let State$2 = class State {
94544
94554
  return state;
94545
94555
  }
94546
94556
  };
94547
- var _isDigit$1 = function isDigit(code) {
94557
+ var _isDigit$2 = function isDigit(code) {
94548
94558
  return code >= 48 && code <= 57;
94549
94559
  };
94550
- const forbiddenNumericSeparatorSiblings$1 = {
94560
+ const forbiddenNumericSeparatorSiblings$2 = {
94551
94561
  decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
94552
94562
  hex: new Set([46, 88, 95, 120])
94553
94563
  };
94554
- const isAllowedNumericSeparatorSibling$1 = {
94564
+ const isAllowedNumericSeparatorSibling$2 = {
94555
94565
  bin: ch => ch === 48 || ch === 49,
94556
94566
  oct: ch => ch >= 48 && ch <= 55,
94557
94567
  dec: ch => ch >= 48 && ch <= 57,
94558
94568
  hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
94559
94569
  };
94560
- function readStringContents$1(type, input, pos, lineStart, curLine, errors) {
94570
+ function readStringContents$2(type, input, pos, lineStart, curLine, errors) {
94561
94571
  const initialPos = pos;
94562
94572
  const initialLineStart = lineStart;
94563
94573
  const initialCurLine = curLine;
@@ -94574,13 +94584,13 @@ function readStringContents$1(type, input, pos, lineStart, curLine, errors) {
94574
94584
  break;
94575
94585
  }
94576
94586
  const ch = input.charCodeAt(pos);
94577
- if (isStringEnd$1(type, ch, input, pos)) {
94587
+ if (isStringEnd$2(type, ch, input, pos)) {
94578
94588
  out += input.slice(chunkStart, pos);
94579
94589
  break;
94580
94590
  }
94581
94591
  if (ch === 92) {
94582
94592
  out += input.slice(chunkStart, pos);
94583
- const res = readEscapedChar$1(input, pos, lineStart, curLine, type === "template", errors);
94593
+ const res = readEscapedChar$2(input, pos, lineStart, curLine, type === "template", errors);
94584
94594
  if (res.ch === null && !firstInvalidLoc) {
94585
94595
  firstInvalidLoc = {
94586
94596
  pos,
@@ -94625,13 +94635,13 @@ function readStringContents$1(type, input, pos, lineStart, curLine, errors) {
94625
94635
  containsInvalid: !!firstInvalidLoc
94626
94636
  };
94627
94637
  }
94628
- function isStringEnd$1(type, ch, input, pos) {
94638
+ function isStringEnd$2(type, ch, input, pos) {
94629
94639
  if (type === "template") {
94630
94640
  return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
94631
94641
  }
94632
94642
  return ch === (type === "double" ? 34 : 39);
94633
94643
  }
94634
- function readEscapedChar$1(input, pos, lineStart, curLine, inTemplate, errors) {
94644
+ function readEscapedChar$2(input, pos, lineStart, curLine, inTemplate, errors) {
94635
94645
  const throwOnInvalid = !inTemplate;
94636
94646
  pos++;
94637
94647
  const res = ch => ({
@@ -94652,7 +94662,7 @@ function readEscapedChar$1(input, pos, lineStart, curLine, inTemplate, errors) {
94652
94662
  ({
94653
94663
  code,
94654
94664
  pos
94655
- } = readHexChar$1(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
94665
+ } = readHexChar$2(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
94656
94666
  return res(code === null ? null : String.fromCharCode(code));
94657
94667
  }
94658
94668
  case 117:
@@ -94661,7 +94671,7 @@ function readEscapedChar$1(input, pos, lineStart, curLine, inTemplate, errors) {
94661
94671
  ({
94662
94672
  code,
94663
94673
  pos
94664
- } = readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors));
94674
+ } = readCodePoint$2(input, pos, lineStart, curLine, throwOnInvalid, errors));
94665
94675
  return res(code === null ? null : String.fromCodePoint(code));
94666
94676
  }
94667
94677
  case 116:
@@ -94713,13 +94723,13 @@ function readEscapedChar$1(input, pos, lineStart, curLine, inTemplate, errors) {
94713
94723
  return res(String.fromCharCode(ch));
94714
94724
  }
94715
94725
  }
94716
- function readHexChar$1(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
94726
+ function readHexChar$2(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
94717
94727
  const initialPos = pos;
94718
94728
  let n;
94719
94729
  ({
94720
94730
  n,
94721
94731
  pos
94722
- } = readInt$1(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
94732
+ } = readInt$2(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
94723
94733
  if (n === null) {
94724
94734
  if (throwOnInvalid) {
94725
94735
  errors.invalidEscapeSequence(initialPos, lineStart, curLine);
@@ -94732,10 +94742,10 @@ function readHexChar$1(input, pos, lineStart, curLine, len, forceLen, throwOnInv
94732
94742
  pos
94733
94743
  };
94734
94744
  }
94735
- function readInt$1(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
94745
+ function readInt$2(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
94736
94746
  const start = pos;
94737
- const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings$1.hex : forbiddenNumericSeparatorSiblings$1.decBinOct;
94738
- const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling$1.hex : radix === 10 ? isAllowedNumericSeparatorSibling$1.dec : radix === 8 ? isAllowedNumericSeparatorSibling$1.oct : isAllowedNumericSeparatorSibling$1.bin;
94747
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings$2.hex : forbiddenNumericSeparatorSiblings$2.decBinOct;
94748
+ const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling$2.hex : radix === 10 ? isAllowedNumericSeparatorSibling$2.dec : radix === 8 ? isAllowedNumericSeparatorSibling$2.oct : isAllowedNumericSeparatorSibling$2.bin;
94739
94749
  let invalid = false;
94740
94750
  let total = 0;
94741
94751
  for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
@@ -94764,7 +94774,7 @@ function readInt$1(input, pos, lineStart, curLine, radix, len, forceLen, allowNu
94764
94774
  val = code - 97 + 10;
94765
94775
  } else if (code >= 65) {
94766
94776
  val = code - 65 + 10;
94767
- } else if (_isDigit$1(code)) {
94777
+ } else if (_isDigit$2(code)) {
94768
94778
  val = code - 48;
94769
94779
  } else {
94770
94780
  val = Infinity;
@@ -94798,7 +94808,7 @@ function readInt$1(input, pos, lineStart, curLine, radix, len, forceLen, allowNu
94798
94808
  pos
94799
94809
  };
94800
94810
  }
94801
- function readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors) {
94811
+ function readCodePoint$2(input, pos, lineStart, curLine, throwOnInvalid, errors) {
94802
94812
  const ch = input.charCodeAt(pos);
94803
94813
  let code;
94804
94814
  if (ch === 123) {
@@ -94806,7 +94816,7 @@ function readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors)
94806
94816
  ({
94807
94817
  code,
94808
94818
  pos
94809
- } = readHexChar$1(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
94819
+ } = readHexChar$2(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
94810
94820
  ++pos;
94811
94821
  if (code !== null && code > 0x10ffff) {
94812
94822
  if (throwOnInvalid) {
@@ -94822,7 +94832,7 @@ function readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors)
94822
94832
  ({
94823
94833
  code,
94824
94834
  pos
94825
- } = readHexChar$1(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
94835
+ } = readHexChar$2(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
94826
94836
  }
94827
94837
  return {
94828
94838
  code,
@@ -95619,7 +95629,7 @@ class Tokenizer extends CommentsParser {
95619
95629
  const {
95620
95630
  n,
95621
95631
  pos
95622
- } = readInt$1(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false);
95632
+ } = readInt$2(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false);
95623
95633
  this.state.pos = pos;
95624
95634
  return n;
95625
95635
  }
@@ -95745,7 +95755,7 @@ class Tokenizer extends CommentsParser {
95745
95755
  const {
95746
95756
  code,
95747
95757
  pos
95748
- } = readCodePoint$1(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint);
95758
+ } = readCodePoint$2(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint);
95749
95759
  this.state.pos = pos;
95750
95760
  return code;
95751
95761
  }
@@ -95755,7 +95765,7 @@ class Tokenizer extends CommentsParser {
95755
95765
  pos,
95756
95766
  curLine,
95757
95767
  lineStart
95758
- } = readStringContents$1(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
95768
+ } = readStringContents$2(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
95759
95769
  this.state.pos = pos + 1;
95760
95770
  this.state.lineStart = lineStart;
95761
95771
  this.state.curLine = curLine;
@@ -95776,7 +95786,7 @@ class Tokenizer extends CommentsParser {
95776
95786
  pos,
95777
95787
  curLine,
95778
95788
  lineStart
95779
- } = readStringContents$1("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
95789
+ } = readStringContents$2("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
95780
95790
  this.state.pos = pos + 1;
95781
95791
  this.state.lineStart = lineStart;
95782
95792
  this.state.curLine = curLine;
@@ -110241,407 +110251,417 @@ function isValidIdentifier$6(name, reserved = true) {
110241
110251
 
110242
110252
  var lib$b = {};
110243
110253
 
110244
- Object.defineProperty(lib$b, "__esModule", {
110245
- value: true
110246
- });
110247
- lib$b.readCodePoint = readCodePoint;
110248
- lib$b.readInt = readInt;
110249
- lib$b.readStringContents = readStringContents;
110250
- var _isDigit = function isDigit(code) {
110251
- return code >= 48 && code <= 57;
110252
- };
110253
- const forbiddenNumericSeparatorSiblings = {
110254
- decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
110255
- hex: new Set([46, 88, 95, 120])
110256
- };
110257
- const isAllowedNumericSeparatorSibling = {
110258
- bin: ch => ch === 48 || ch === 49,
110259
- oct: ch => ch >= 48 && ch <= 55,
110260
- dec: ch => ch >= 48 && ch <= 57,
110261
- hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
110262
- };
110263
- function readStringContents(type, input, pos, lineStart, curLine, errors) {
110264
- const initialPos = pos;
110265
- const initialLineStart = lineStart;
110266
- const initialCurLine = curLine;
110267
- let out = "";
110268
- let firstInvalidLoc = null;
110269
- let chunkStart = pos;
110270
- const {
110271
- length
110272
- } = input;
110273
- for (;;) {
110274
- if (pos >= length) {
110275
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
110276
- out += input.slice(chunkStart, pos);
110277
- break;
110278
- }
110279
- const ch = input.charCodeAt(pos);
110280
- if (isStringEnd(type, ch, input, pos)) {
110281
- out += input.slice(chunkStart, pos);
110282
- break;
110283
- }
110284
- if (ch === 92) {
110285
- out += input.slice(chunkStart, pos);
110286
- const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
110287
- if (res.ch === null && !firstInvalidLoc) {
110288
- firstInvalidLoc = {
110289
- pos,
110290
- lineStart,
110291
- curLine
110292
- };
110293
- } else {
110294
- out += res.ch;
110295
- }
110296
- ({
110297
- pos,
110298
- lineStart,
110299
- curLine
110300
- } = res);
110301
- chunkStart = pos;
110302
- } else if (ch === 8232 || ch === 8233) {
110303
- ++pos;
110304
- ++curLine;
110305
- lineStart = pos;
110306
- } else if (ch === 10 || ch === 13) {
110307
- if (type === "template") {
110308
- out += input.slice(chunkStart, pos) + "\n";
110309
- ++pos;
110310
- if (ch === 13 && input.charCodeAt(pos) === 10) {
110311
- ++pos;
110312
- }
110313
- ++curLine;
110314
- chunkStart = lineStart = pos;
110315
- } else {
110316
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
110317
- }
110318
- } else {
110319
- ++pos;
110320
- }
110321
- }
110322
- return {
110323
- pos,
110324
- str: out,
110325
- firstInvalidLoc,
110326
- lineStart,
110327
- curLine,
110328
- containsInvalid: !!firstInvalidLoc
110329
- };
110330
- }
110331
- function isStringEnd(type, ch, input, pos) {
110332
- if (type === "template") {
110333
- return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
110334
- }
110335
- return ch === (type === "double" ? 34 : 39);
110336
- }
110337
- function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
110338
- const throwOnInvalid = !inTemplate;
110339
- pos++;
110340
- const res = ch => ({
110341
- pos,
110342
- ch,
110343
- lineStart,
110344
- curLine
110345
- });
110346
- const ch = input.charCodeAt(pos++);
110347
- switch (ch) {
110348
- case 110:
110349
- return res("\n");
110350
- case 114:
110351
- return res("\r");
110352
- case 120:
110353
- {
110354
- let code;
110355
- ({
110356
- code,
110357
- pos
110358
- } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
110359
- return res(code === null ? null : String.fromCharCode(code));
110360
- }
110361
- case 117:
110362
- {
110363
- let code;
110364
- ({
110365
- code,
110366
- pos
110367
- } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
110368
- return res(code === null ? null : String.fromCodePoint(code));
110369
- }
110370
- case 116:
110371
- return res("\t");
110372
- case 98:
110373
- return res("\b");
110374
- case 118:
110375
- return res("\u000b");
110376
- case 102:
110377
- return res("\f");
110378
- case 13:
110379
- if (input.charCodeAt(pos) === 10) {
110380
- ++pos;
110381
- }
110382
- case 10:
110383
- lineStart = pos;
110384
- ++curLine;
110385
- case 8232:
110386
- case 8233:
110387
- return res("");
110388
- case 56:
110389
- case 57:
110390
- if (inTemplate) {
110391
- return res(null);
110392
- } else {
110393
- errors.strictNumericEscape(pos - 1, lineStart, curLine);
110394
- }
110395
- default:
110396
- if (ch >= 48 && ch <= 55) {
110397
- const startPos = pos - 1;
110398
- const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
110399
- let octalStr = match[0];
110400
- let octal = parseInt(octalStr, 8);
110401
- if (octal > 255) {
110402
- octalStr = octalStr.slice(0, -1);
110403
- octal = parseInt(octalStr, 8);
110404
- }
110405
- pos += octalStr.length - 1;
110406
- const next = input.charCodeAt(pos);
110407
- if (octalStr !== "0" || next === 56 || next === 57) {
110408
- if (inTemplate) {
110409
- return res(null);
110410
- } else {
110411
- errors.strictNumericEscape(startPos, lineStart, curLine);
110412
- }
110413
- }
110414
- return res(String.fromCharCode(octal));
110415
- }
110416
- return res(String.fromCharCode(ch));
110417
- }
110418
- }
110419
- function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
110420
- const initialPos = pos;
110421
- let n;
110422
- ({
110423
- n,
110424
- pos
110425
- } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
110426
- if (n === null) {
110427
- if (throwOnInvalid) {
110428
- errors.invalidEscapeSequence(initialPos, lineStart, curLine);
110429
- } else {
110430
- pos = initialPos - 1;
110431
- }
110432
- }
110433
- return {
110434
- code: n,
110435
- pos
110436
- };
110437
- }
110438
- function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
110439
- const start = pos;
110440
- const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
110441
- const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
110442
- let invalid = false;
110443
- let total = 0;
110444
- for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
110445
- const code = input.charCodeAt(pos);
110446
- let val;
110447
- if (code === 95 && allowNumSeparator !== "bail") {
110448
- const prev = input.charCodeAt(pos - 1);
110449
- const next = input.charCodeAt(pos + 1);
110450
- if (!allowNumSeparator) {
110451
- if (bailOnError) return {
110452
- n: null,
110453
- pos
110454
- };
110455
- errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
110456
- } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
110457
- if (bailOnError) return {
110458
- n: null,
110459
- pos
110460
- };
110461
- errors.unexpectedNumericSeparator(pos, lineStart, curLine);
110462
- }
110463
- ++pos;
110464
- continue;
110465
- }
110466
- if (code >= 97) {
110467
- val = code - 97 + 10;
110468
- } else if (code >= 65) {
110469
- val = code - 65 + 10;
110470
- } else if (_isDigit(code)) {
110471
- val = code - 48;
110472
- } else {
110473
- val = Infinity;
110474
- }
110475
- if (val >= radix) {
110476
- if (val <= 9 && bailOnError) {
110477
- return {
110478
- n: null,
110479
- pos
110480
- };
110481
- } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
110482
- val = 0;
110483
- } else if (forceLen) {
110484
- val = 0;
110485
- invalid = true;
110486
- } else {
110487
- break;
110488
- }
110489
- }
110490
- ++pos;
110491
- total = total * radix + val;
110492
- }
110493
- if (pos === start || len != null && pos - start !== len || invalid) {
110494
- return {
110495
- n: null,
110496
- pos
110497
- };
110498
- }
110499
- return {
110500
- n: total,
110501
- pos
110502
- };
110503
- }
110504
- function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
110505
- const ch = input.charCodeAt(pos);
110506
- let code;
110507
- if (ch === 123) {
110508
- ++pos;
110509
- ({
110510
- code,
110511
- pos
110512
- } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
110513
- ++pos;
110514
- if (code !== null && code > 0x10ffff) {
110515
- if (throwOnInvalid) {
110516
- errors.invalidCodePoint(pos, lineStart, curLine);
110517
- } else {
110518
- return {
110519
- code: null,
110520
- pos
110521
- };
110522
- }
110523
- }
110524
- } else {
110525
- ({
110526
- code,
110527
- pos
110528
- } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
110529
- }
110530
- return {
110531
- code,
110532
- pos
110533
- };
110534
- }
110535
-
110536
- var constants$3 = {};
110537
-
110538
- Object.defineProperty(constants$3, "__esModule", {
110539
- value: true
110540
- });
110541
- constants$3.UPDATE_OPERATORS = constants$3.UNARY_OPERATORS = constants$3.STRING_UNARY_OPERATORS = constants$3.STATEMENT_OR_BLOCK_KEYS = constants$3.NUMBER_UNARY_OPERATORS = constants$3.NUMBER_BINARY_OPERATORS = constants$3.NOT_LOCAL_BINDING = constants$3.LOGICAL_OPERATORS = constants$3.INHERIT_KEYS = constants$3.FOR_INIT_KEYS = constants$3.FLATTENABLE_KEYS = constants$3.EQUALITY_BINARY_OPERATORS = constants$3.COMPARISON_BINARY_OPERATORS = constants$3.COMMENT_KEYS = constants$3.BOOLEAN_UNARY_OPERATORS = constants$3.BOOLEAN_NUMBER_BINARY_OPERATORS = constants$3.BOOLEAN_BINARY_OPERATORS = constants$3.BLOCK_SCOPED_SYMBOL = constants$3.BINARY_OPERATORS = constants$3.ASSIGNMENT_OPERATORS = void 0;
110542
- const STATEMENT_OR_BLOCK_KEYS$4 = ["consequent", "body", "alternate"];
110543
- constants$3.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS$4;
110544
- const FLATTENABLE_KEYS$3 = ["body", "expressions"];
110545
- constants$3.FLATTENABLE_KEYS = FLATTENABLE_KEYS$3;
110546
- const FOR_INIT_KEYS$3 = ["left", "init"];
110547
- constants$3.FOR_INIT_KEYS = FOR_INIT_KEYS$3;
110548
- const COMMENT_KEYS$3 = ["leadingComments", "trailingComments", "innerComments"];
110549
- constants$3.COMMENT_KEYS = COMMENT_KEYS$3;
110550
- const LOGICAL_OPERATORS$4 = ["||", "&&", "??"];
110551
- constants$3.LOGICAL_OPERATORS = LOGICAL_OPERATORS$4;
110552
- const UPDATE_OPERATORS$3 = ["++", "--"];
110553
- constants$3.UPDATE_OPERATORS = UPDATE_OPERATORS$3;
110554
- const BOOLEAN_NUMBER_BINARY_OPERATORS$3 = [">", "<", ">=", "<="];
110555
- constants$3.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS$3;
110556
- const EQUALITY_BINARY_OPERATORS$3 = ["==", "===", "!=", "!=="];
110557
- constants$3.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS$3;
110558
- const COMPARISON_BINARY_OPERATORS$3 = [...EQUALITY_BINARY_OPERATORS$3, "in", "instanceof"];
110559
- constants$3.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS$3;
110560
- const BOOLEAN_BINARY_OPERATORS$3 = [...COMPARISON_BINARY_OPERATORS$3, ...BOOLEAN_NUMBER_BINARY_OPERATORS$3];
110561
- constants$3.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS$3;
110562
- const NUMBER_BINARY_OPERATORS$3 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
110563
- constants$3.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS$3;
110564
- const BINARY_OPERATORS$3 = ["+", ...NUMBER_BINARY_OPERATORS$3, ...BOOLEAN_BINARY_OPERATORS$3, "|>"];
110565
- constants$3.BINARY_OPERATORS = BINARY_OPERATORS$3;
110566
- const ASSIGNMENT_OPERATORS$3 = ["=", "+=", ...NUMBER_BINARY_OPERATORS$3.map(op => op + "="), ...LOGICAL_OPERATORS$4.map(op => op + "=")];
110567
- constants$3.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS$3;
110568
- const BOOLEAN_UNARY_OPERATORS$3 = ["delete", "!"];
110569
- constants$3.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS$3;
110570
- const NUMBER_UNARY_OPERATORS$3 = ["+", "-", "~"];
110571
- constants$3.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS$3;
110572
- const STRING_UNARY_OPERATORS$3 = ["typeof"];
110573
- constants$3.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS$3;
110574
- const UNARY_OPERATORS$3 = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS$3, ...NUMBER_UNARY_OPERATORS$3, ...STRING_UNARY_OPERATORS$3];
110575
- constants$3.UNARY_OPERATORS = UNARY_OPERATORS$3;
110576
- const INHERIT_KEYS$3 = {
110577
- optional: ["typeAnnotation", "typeParameters", "returnType"],
110578
- force: ["start", "loc", "end"]
110579
- };
110580
- constants$3.INHERIT_KEYS = INHERIT_KEYS$3;
110581
- const BLOCK_SCOPED_SYMBOL$3 = Symbol.for("var used to be block scoped");
110582
- constants$3.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL$3;
110583
- const NOT_LOCAL_BINDING$4 = Symbol.for("should not be considered a local binding");
110584
- constants$3.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING$4;
110585
-
110586
- var utils$4 = {};
110587
-
110588
- var hasRequiredUtils$3;
110254
+ var hasRequiredLib$6;
110589
110255
 
110590
- function requireUtils$3 () {
110591
- if (hasRequiredUtils$3) return utils$4;
110592
- hasRequiredUtils$3 = 1;
110256
+ function requireLib$6 () {
110257
+ if (hasRequiredLib$6) return lib$b;
110258
+ hasRequiredLib$6 = 1;
110593
110259
 
110594
- Object.defineProperty(utils$4, "__esModule", {
110260
+ Object.defineProperty(lib$b, "__esModule", {
110595
110261
  value: true
110596
110262
  });
110597
- utils$4.VISITOR_KEYS = utils$4.NODE_PARENT_VALIDATIONS = utils$4.NODE_FIELDS = utils$4.FLIPPED_ALIAS_KEYS = utils$4.DEPRECATED_KEYS = utils$4.BUILDER_KEYS = utils$4.ALIAS_KEYS = void 0;
110598
- utils$4.arrayOf = arrayOf;
110599
- utils$4.arrayOfType = arrayOfType;
110600
- utils$4.assertEach = assertEach;
110601
- utils$4.assertNodeOrValueType = assertNodeOrValueType;
110602
- utils$4.assertNodeType = assertNodeType;
110603
- utils$4.assertOneOf = assertOneOf;
110604
- utils$4.assertOptionalChainStart = assertOptionalChainStart;
110605
- utils$4.assertShape = assertShape;
110606
- utils$4.assertValueType = assertValueType;
110607
- utils$4.chain = chain;
110608
- utils$4.default = defineType;
110609
- utils$4.defineAliasedType = defineAliasedType;
110610
- utils$4.typeIs = typeIs;
110611
- utils$4.validate = validate;
110612
- utils$4.validateArrayOfType = validateArrayOfType;
110613
- utils$4.validateOptional = validateOptional;
110614
- utils$4.validateOptionalType = validateOptionalType;
110615
- utils$4.validateType = validateType;
110616
- var _is = requireIs$3();
110617
- var _validate = requireValidate$3();
110618
- const VISITOR_KEYS = {};
110619
- utils$4.VISITOR_KEYS = VISITOR_KEYS;
110620
- const ALIAS_KEYS = {};
110621
- utils$4.ALIAS_KEYS = ALIAS_KEYS;
110622
- const FLIPPED_ALIAS_KEYS = {};
110623
- utils$4.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
110624
- const NODE_FIELDS = {};
110625
- utils$4.NODE_FIELDS = NODE_FIELDS;
110626
- const BUILDER_KEYS = {};
110627
- utils$4.BUILDER_KEYS = BUILDER_KEYS;
110628
- const DEPRECATED_KEYS = {};
110629
- utils$4.DEPRECATED_KEYS = DEPRECATED_KEYS;
110630
- const NODE_PARENT_VALIDATIONS = {};
110631
- utils$4.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
110632
- function getType(val) {
110633
- if (Array.isArray(val)) {
110634
- return "array";
110635
- } else if (val === null) {
110636
- return "null";
110637
- } else {
110638
- return typeof val;
110263
+ lib$b.readCodePoint = readCodePoint;
110264
+ lib$b.readInt = readInt;
110265
+ lib$b.readStringContents = readStringContents;
110266
+ var _isDigit = function isDigit(code) {
110267
+ return code >= 48 && code <= 57;
110268
+ };
110269
+ const forbiddenNumericSeparatorSiblings = {
110270
+ decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
110271
+ hex: new Set([46, 88, 95, 120])
110272
+ };
110273
+ const isAllowedNumericSeparatorSibling = {
110274
+ bin: ch => ch === 48 || ch === 49,
110275
+ oct: ch => ch >= 48 && ch <= 55,
110276
+ dec: ch => ch >= 48 && ch <= 57,
110277
+ hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
110278
+ };
110279
+ function readStringContents(type, input, pos, lineStart, curLine, errors) {
110280
+ const initialPos = pos;
110281
+ const initialLineStart = lineStart;
110282
+ const initialCurLine = curLine;
110283
+ let out = "";
110284
+ let firstInvalidLoc = null;
110285
+ let chunkStart = pos;
110286
+ const {
110287
+ length
110288
+ } = input;
110289
+ for (;;) {
110290
+ if (pos >= length) {
110291
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
110292
+ out += input.slice(chunkStart, pos);
110293
+ break;
110294
+ }
110295
+ const ch = input.charCodeAt(pos);
110296
+ if (isStringEnd(type, ch, input, pos)) {
110297
+ out += input.slice(chunkStart, pos);
110298
+ break;
110299
+ }
110300
+ if (ch === 92) {
110301
+ out += input.slice(chunkStart, pos);
110302
+ const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
110303
+ if (res.ch === null && !firstInvalidLoc) {
110304
+ firstInvalidLoc = {
110305
+ pos,
110306
+ lineStart,
110307
+ curLine
110308
+ };
110309
+ } else {
110310
+ out += res.ch;
110311
+ }
110312
+ ({
110313
+ pos,
110314
+ lineStart,
110315
+ curLine
110316
+ } = res);
110317
+ chunkStart = pos;
110318
+ } else if (ch === 8232 || ch === 8233) {
110319
+ ++pos;
110320
+ ++curLine;
110321
+ lineStart = pos;
110322
+ } else if (ch === 10 || ch === 13) {
110323
+ if (type === "template") {
110324
+ out += input.slice(chunkStart, pos) + "\n";
110325
+ ++pos;
110326
+ if (ch === 13 && input.charCodeAt(pos) === 10) {
110327
+ ++pos;
110328
+ }
110329
+ ++curLine;
110330
+ chunkStart = lineStart = pos;
110331
+ } else {
110332
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
110333
+ }
110334
+ } else {
110335
+ ++pos;
110336
+ }
110639
110337
  }
110640
- }
110641
- function validate(validate) {
110642
110338
  return {
110643
- validate
110644
- };
110339
+ pos,
110340
+ str: out,
110341
+ firstInvalidLoc,
110342
+ lineStart,
110343
+ curLine,
110344
+ containsInvalid: !!firstInvalidLoc
110345
+ };
110346
+ }
110347
+ function isStringEnd(type, ch, input, pos) {
110348
+ if (type === "template") {
110349
+ return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
110350
+ }
110351
+ return ch === (type === "double" ? 34 : 39);
110352
+ }
110353
+ function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
110354
+ const throwOnInvalid = !inTemplate;
110355
+ pos++;
110356
+ const res = ch => ({
110357
+ pos,
110358
+ ch,
110359
+ lineStart,
110360
+ curLine
110361
+ });
110362
+ const ch = input.charCodeAt(pos++);
110363
+ switch (ch) {
110364
+ case 110:
110365
+ return res("\n");
110366
+ case 114:
110367
+ return res("\r");
110368
+ case 120:
110369
+ {
110370
+ let code;
110371
+ ({
110372
+ code,
110373
+ pos
110374
+ } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
110375
+ return res(code === null ? null : String.fromCharCode(code));
110376
+ }
110377
+ case 117:
110378
+ {
110379
+ let code;
110380
+ ({
110381
+ code,
110382
+ pos
110383
+ } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
110384
+ return res(code === null ? null : String.fromCodePoint(code));
110385
+ }
110386
+ case 116:
110387
+ return res("\t");
110388
+ case 98:
110389
+ return res("\b");
110390
+ case 118:
110391
+ return res("\u000b");
110392
+ case 102:
110393
+ return res("\f");
110394
+ case 13:
110395
+ if (input.charCodeAt(pos) === 10) {
110396
+ ++pos;
110397
+ }
110398
+ case 10:
110399
+ lineStart = pos;
110400
+ ++curLine;
110401
+ case 8232:
110402
+ case 8233:
110403
+ return res("");
110404
+ case 56:
110405
+ case 57:
110406
+ if (inTemplate) {
110407
+ return res(null);
110408
+ } else {
110409
+ errors.strictNumericEscape(pos - 1, lineStart, curLine);
110410
+ }
110411
+ default:
110412
+ if (ch >= 48 && ch <= 55) {
110413
+ const startPos = pos - 1;
110414
+ const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
110415
+ let octalStr = match[0];
110416
+ let octal = parseInt(octalStr, 8);
110417
+ if (octal > 255) {
110418
+ octalStr = octalStr.slice(0, -1);
110419
+ octal = parseInt(octalStr, 8);
110420
+ }
110421
+ pos += octalStr.length - 1;
110422
+ const next = input.charCodeAt(pos);
110423
+ if (octalStr !== "0" || next === 56 || next === 57) {
110424
+ if (inTemplate) {
110425
+ return res(null);
110426
+ } else {
110427
+ errors.strictNumericEscape(startPos, lineStart, curLine);
110428
+ }
110429
+ }
110430
+ return res(String.fromCharCode(octal));
110431
+ }
110432
+ return res(String.fromCharCode(ch));
110433
+ }
110434
+ }
110435
+ function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
110436
+ const initialPos = pos;
110437
+ let n;
110438
+ ({
110439
+ n,
110440
+ pos
110441
+ } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
110442
+ if (n === null) {
110443
+ if (throwOnInvalid) {
110444
+ errors.invalidEscapeSequence(initialPos, lineStart, curLine);
110445
+ } else {
110446
+ pos = initialPos - 1;
110447
+ }
110448
+ }
110449
+ return {
110450
+ code: n,
110451
+ pos
110452
+ };
110453
+ }
110454
+ function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
110455
+ const start = pos;
110456
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
110457
+ const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
110458
+ let invalid = false;
110459
+ let total = 0;
110460
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
110461
+ const code = input.charCodeAt(pos);
110462
+ let val;
110463
+ if (code === 95 && allowNumSeparator !== "bail") {
110464
+ const prev = input.charCodeAt(pos - 1);
110465
+ const next = input.charCodeAt(pos + 1);
110466
+ if (!allowNumSeparator) {
110467
+ if (bailOnError) return {
110468
+ n: null,
110469
+ pos
110470
+ };
110471
+ errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
110472
+ } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
110473
+ if (bailOnError) return {
110474
+ n: null,
110475
+ pos
110476
+ };
110477
+ errors.unexpectedNumericSeparator(pos, lineStart, curLine);
110478
+ }
110479
+ ++pos;
110480
+ continue;
110481
+ }
110482
+ if (code >= 97) {
110483
+ val = code - 97 + 10;
110484
+ } else if (code >= 65) {
110485
+ val = code - 65 + 10;
110486
+ } else if (_isDigit(code)) {
110487
+ val = code - 48;
110488
+ } else {
110489
+ val = Infinity;
110490
+ }
110491
+ if (val >= radix) {
110492
+ if (val <= 9 && bailOnError) {
110493
+ return {
110494
+ n: null,
110495
+ pos
110496
+ };
110497
+ } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
110498
+ val = 0;
110499
+ } else if (forceLen) {
110500
+ val = 0;
110501
+ invalid = true;
110502
+ } else {
110503
+ break;
110504
+ }
110505
+ }
110506
+ ++pos;
110507
+ total = total * radix + val;
110508
+ }
110509
+ if (pos === start || len != null && pos - start !== len || invalid) {
110510
+ return {
110511
+ n: null,
110512
+ pos
110513
+ };
110514
+ }
110515
+ return {
110516
+ n: total,
110517
+ pos
110518
+ };
110519
+ }
110520
+ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
110521
+ const ch = input.charCodeAt(pos);
110522
+ let code;
110523
+ if (ch === 123) {
110524
+ ++pos;
110525
+ ({
110526
+ code,
110527
+ pos
110528
+ } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
110529
+ ++pos;
110530
+ if (code !== null && code > 0x10ffff) {
110531
+ if (throwOnInvalid) {
110532
+ errors.invalidCodePoint(pos, lineStart, curLine);
110533
+ } else {
110534
+ return {
110535
+ code: null,
110536
+ pos
110537
+ };
110538
+ }
110539
+ }
110540
+ } else {
110541
+ ({
110542
+ code,
110543
+ pos
110544
+ } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
110545
+ }
110546
+ return {
110547
+ code,
110548
+ pos
110549
+ };
110550
+ }
110551
+
110552
+
110553
+ return lib$b;
110554
+ }
110555
+
110556
+ var constants$3 = {};
110557
+
110558
+ Object.defineProperty(constants$3, "__esModule", {
110559
+ value: true
110560
+ });
110561
+ constants$3.UPDATE_OPERATORS = constants$3.UNARY_OPERATORS = constants$3.STRING_UNARY_OPERATORS = constants$3.STATEMENT_OR_BLOCK_KEYS = constants$3.NUMBER_UNARY_OPERATORS = constants$3.NUMBER_BINARY_OPERATORS = constants$3.NOT_LOCAL_BINDING = constants$3.LOGICAL_OPERATORS = constants$3.INHERIT_KEYS = constants$3.FOR_INIT_KEYS = constants$3.FLATTENABLE_KEYS = constants$3.EQUALITY_BINARY_OPERATORS = constants$3.COMPARISON_BINARY_OPERATORS = constants$3.COMMENT_KEYS = constants$3.BOOLEAN_UNARY_OPERATORS = constants$3.BOOLEAN_NUMBER_BINARY_OPERATORS = constants$3.BOOLEAN_BINARY_OPERATORS = constants$3.BLOCK_SCOPED_SYMBOL = constants$3.BINARY_OPERATORS = constants$3.ASSIGNMENT_OPERATORS = void 0;
110562
+ const STATEMENT_OR_BLOCK_KEYS$4 = ["consequent", "body", "alternate"];
110563
+ constants$3.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS$4;
110564
+ const FLATTENABLE_KEYS$3 = ["body", "expressions"];
110565
+ constants$3.FLATTENABLE_KEYS = FLATTENABLE_KEYS$3;
110566
+ const FOR_INIT_KEYS$3 = ["left", "init"];
110567
+ constants$3.FOR_INIT_KEYS = FOR_INIT_KEYS$3;
110568
+ const COMMENT_KEYS$3 = ["leadingComments", "trailingComments", "innerComments"];
110569
+ constants$3.COMMENT_KEYS = COMMENT_KEYS$3;
110570
+ const LOGICAL_OPERATORS$4 = ["||", "&&", "??"];
110571
+ constants$3.LOGICAL_OPERATORS = LOGICAL_OPERATORS$4;
110572
+ const UPDATE_OPERATORS$3 = ["++", "--"];
110573
+ constants$3.UPDATE_OPERATORS = UPDATE_OPERATORS$3;
110574
+ const BOOLEAN_NUMBER_BINARY_OPERATORS$3 = [">", "<", ">=", "<="];
110575
+ constants$3.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS$3;
110576
+ const EQUALITY_BINARY_OPERATORS$3 = ["==", "===", "!=", "!=="];
110577
+ constants$3.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS$3;
110578
+ const COMPARISON_BINARY_OPERATORS$3 = [...EQUALITY_BINARY_OPERATORS$3, "in", "instanceof"];
110579
+ constants$3.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS$3;
110580
+ const BOOLEAN_BINARY_OPERATORS$3 = [...COMPARISON_BINARY_OPERATORS$3, ...BOOLEAN_NUMBER_BINARY_OPERATORS$3];
110581
+ constants$3.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS$3;
110582
+ const NUMBER_BINARY_OPERATORS$3 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
110583
+ constants$3.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS$3;
110584
+ const BINARY_OPERATORS$3 = ["+", ...NUMBER_BINARY_OPERATORS$3, ...BOOLEAN_BINARY_OPERATORS$3, "|>"];
110585
+ constants$3.BINARY_OPERATORS = BINARY_OPERATORS$3;
110586
+ const ASSIGNMENT_OPERATORS$3 = ["=", "+=", ...NUMBER_BINARY_OPERATORS$3.map(op => op + "="), ...LOGICAL_OPERATORS$4.map(op => op + "=")];
110587
+ constants$3.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS$3;
110588
+ const BOOLEAN_UNARY_OPERATORS$3 = ["delete", "!"];
110589
+ constants$3.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS$3;
110590
+ const NUMBER_UNARY_OPERATORS$3 = ["+", "-", "~"];
110591
+ constants$3.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS$3;
110592
+ const STRING_UNARY_OPERATORS$3 = ["typeof"];
110593
+ constants$3.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS$3;
110594
+ const UNARY_OPERATORS$3 = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS$3, ...NUMBER_UNARY_OPERATORS$3, ...STRING_UNARY_OPERATORS$3];
110595
+ constants$3.UNARY_OPERATORS = UNARY_OPERATORS$3;
110596
+ const INHERIT_KEYS$3 = {
110597
+ optional: ["typeAnnotation", "typeParameters", "returnType"],
110598
+ force: ["start", "loc", "end"]
110599
+ };
110600
+ constants$3.INHERIT_KEYS = INHERIT_KEYS$3;
110601
+ const BLOCK_SCOPED_SYMBOL$3 = Symbol.for("var used to be block scoped");
110602
+ constants$3.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL$3;
110603
+ const NOT_LOCAL_BINDING$4 = Symbol.for("should not be considered a local binding");
110604
+ constants$3.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING$4;
110605
+
110606
+ var utils$4 = {};
110607
+
110608
+ var hasRequiredUtils$3;
110609
+
110610
+ function requireUtils$3 () {
110611
+ if (hasRequiredUtils$3) return utils$4;
110612
+ hasRequiredUtils$3 = 1;
110613
+
110614
+ Object.defineProperty(utils$4, "__esModule", {
110615
+ value: true
110616
+ });
110617
+ utils$4.VISITOR_KEYS = utils$4.NODE_PARENT_VALIDATIONS = utils$4.NODE_FIELDS = utils$4.FLIPPED_ALIAS_KEYS = utils$4.DEPRECATED_KEYS = utils$4.BUILDER_KEYS = utils$4.ALIAS_KEYS = void 0;
110618
+ utils$4.arrayOf = arrayOf;
110619
+ utils$4.arrayOfType = arrayOfType;
110620
+ utils$4.assertEach = assertEach;
110621
+ utils$4.assertNodeOrValueType = assertNodeOrValueType;
110622
+ utils$4.assertNodeType = assertNodeType;
110623
+ utils$4.assertOneOf = assertOneOf;
110624
+ utils$4.assertOptionalChainStart = assertOptionalChainStart;
110625
+ utils$4.assertShape = assertShape;
110626
+ utils$4.assertValueType = assertValueType;
110627
+ utils$4.chain = chain;
110628
+ utils$4.default = defineType;
110629
+ utils$4.defineAliasedType = defineAliasedType;
110630
+ utils$4.typeIs = typeIs;
110631
+ utils$4.validate = validate;
110632
+ utils$4.validateArrayOfType = validateArrayOfType;
110633
+ utils$4.validateOptional = validateOptional;
110634
+ utils$4.validateOptionalType = validateOptionalType;
110635
+ utils$4.validateType = validateType;
110636
+ var _is = requireIs$3();
110637
+ var _validate = requireValidate$3();
110638
+ const VISITOR_KEYS = {};
110639
+ utils$4.VISITOR_KEYS = VISITOR_KEYS;
110640
+ const ALIAS_KEYS = {};
110641
+ utils$4.ALIAS_KEYS = ALIAS_KEYS;
110642
+ const FLIPPED_ALIAS_KEYS = {};
110643
+ utils$4.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
110644
+ const NODE_FIELDS = {};
110645
+ utils$4.NODE_FIELDS = NODE_FIELDS;
110646
+ const BUILDER_KEYS = {};
110647
+ utils$4.BUILDER_KEYS = BUILDER_KEYS;
110648
+ const DEPRECATED_KEYS = {};
110649
+ utils$4.DEPRECATED_KEYS = DEPRECATED_KEYS;
110650
+ const NODE_PARENT_VALIDATIONS = {};
110651
+ utils$4.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
110652
+ function getType(val) {
110653
+ if (Array.isArray(val)) {
110654
+ return "array";
110655
+ } else if (val === null) {
110656
+ return "null";
110657
+ } else {
110658
+ return typeof val;
110659
+ }
110660
+ }
110661
+ function validate(validate) {
110662
+ return {
110663
+ validate
110664
+ };
110645
110665
  }
110646
110666
  function typeIs(typeName) {
110647
110667
  return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
@@ -110885,7 +110905,7 @@ function requireCore$3 () {
110885
110905
  var _is = requireIs$3();
110886
110906
  var _isValidIdentifier = isValidIdentifier$7;
110887
110907
  var _helperValidatorIdentifier = lib$c;
110888
- var _helperStringParser = lib$b;
110908
+ var _helperStringParser = requireLib$6();
110889
110909
  var _constants = constants$3;
110890
110910
  var _utils = requireUtils$3();
110891
110911
  const defineType = (0, _utils.defineAliasedType)("Standardized");
@@ -114044,7 +114064,7 @@ function requireValidateNode$3 () {
114044
114064
  });
114045
114065
  validateNode$3.default = validateNode;
114046
114066
  var _validate = requireValidate$3();
114047
- var _ = requireLib$7();
114067
+ var _ = requireLib$5();
114048
114068
  function validateNode(node) {
114049
114069
  const keys = _.BUILDER_KEYS[node.type];
114050
114070
  for (const key of keys) {
@@ -116060,7 +116080,7 @@ function requireCleanJSXElementLiteralChild$3 () {
116060
116080
  });
116061
116081
  cleanJSXElementLiteralChild$3.default = cleanJSXElementLiteralChild;
116062
116082
  var _generated = requireGenerated$3();
116063
- var _ = requireLib$7();
116083
+ var _ = requireLib$5();
116064
116084
  function cleanJSXElementLiteralChild(child, args) {
116065
116085
  const lines = child.value.split(/\r\n|\n|\r/);
116066
116086
  let lastNonEmptyLine = 0;
@@ -120146,7 +120166,7 @@ function requirePrependToMemberExpression$3 () {
120146
120166
  });
120147
120167
  prependToMemberExpression$3.default = prependToMemberExpression;
120148
120168
  var _generated = requireGenerated$3();
120149
- var _ = requireLib$7();
120169
+ var _ = requireLib$5();
120150
120170
  function prependToMemberExpression(member, prepend) {
120151
120171
  if ((0, _.isSuper)(member.object)) {
120152
120172
  throw new Error("Cannot prepend node to super property access (`super.foo`).");
@@ -120498,11 +120518,11 @@ function isVar$7(node) {
120498
120518
  }) && !node[_constants$f.BLOCK_SCOPED_SYMBOL];
120499
120519
  }
120500
120520
 
120501
- var hasRequiredLib$7;
120521
+ var hasRequiredLib$5;
120502
120522
 
120503
- function requireLib$7 () {
120504
- if (hasRequiredLib$7) return lib$d;
120505
- hasRequiredLib$7 = 1;
120523
+ function requireLib$5 () {
120524
+ if (hasRequiredLib$5) return lib$d;
120525
+ hasRequiredLib$5 = 1;
120506
120526
  (function (exports) {
120507
120527
 
120508
120528
  Object.defineProperty(exports, "__esModule", {
@@ -121081,7 +121101,7 @@ Object.defineProperty(lib$e, "__esModule", {
121081
121101
  value: true
121082
121102
  });
121083
121103
  lib$e.default = hoistVariables;
121084
- var _t$9 = requireLib$7();
121104
+ var _t$9 = requireLib$5();
121085
121105
  const {
121086
121106
  assignmentExpression: assignmentExpression$2,
121087
121107
  expressionStatement: expressionStatement$3,
@@ -121140,11 +121160,11 @@ function requireReplacement () {
121140
121160
  replacement.replaceWithMultiple = replaceWithMultiple;
121141
121161
  replacement.replaceWithSourceString = replaceWithSourceString;
121142
121162
  var _codeFrame = lib$i;
121143
- var _index = requireLib$4();
121163
+ var _index = requireLib$3();
121144
121164
  var _index2 = requirePath();
121145
121165
  var _cache = cache;
121146
121166
  var _parser = lib$f;
121147
- var _t = requireLib$8();
121167
+ var _t = requireLib$7();
121148
121168
  var _helperHoistVariables = lib$e;
121149
121169
  const {
121150
121170
  FUNCTION_TYPES,
@@ -124875,420 +124895,410 @@ function isValidIdentifier$4(name, reserved = true) {
124875
124895
 
124876
124896
  var lib$6 = {};
124877
124897
 
124878
- var hasRequiredLib$6;
124898
+ Object.defineProperty(lib$6, "__esModule", {
124899
+ value: true
124900
+ });
124901
+ lib$6.readCodePoint = readCodePoint$1;
124902
+ lib$6.readInt = readInt$1;
124903
+ lib$6.readStringContents = readStringContents$1;
124904
+ var _isDigit$1 = function isDigit(code) {
124905
+ return code >= 48 && code <= 57;
124906
+ };
124907
+ const forbiddenNumericSeparatorSiblings$1 = {
124908
+ decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
124909
+ hex: new Set([46, 88, 95, 120])
124910
+ };
124911
+ const isAllowedNumericSeparatorSibling$1 = {
124912
+ bin: ch => ch === 48 || ch === 49,
124913
+ oct: ch => ch >= 48 && ch <= 55,
124914
+ dec: ch => ch >= 48 && ch <= 57,
124915
+ hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
124916
+ };
124917
+ function readStringContents$1(type, input, pos, lineStart, curLine, errors) {
124918
+ const initialPos = pos;
124919
+ const initialLineStart = lineStart;
124920
+ const initialCurLine = curLine;
124921
+ let out = "";
124922
+ let firstInvalidLoc = null;
124923
+ let chunkStart = pos;
124924
+ const {
124925
+ length
124926
+ } = input;
124927
+ for (;;) {
124928
+ if (pos >= length) {
124929
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
124930
+ out += input.slice(chunkStart, pos);
124931
+ break;
124932
+ }
124933
+ const ch = input.charCodeAt(pos);
124934
+ if (isStringEnd$1(type, ch, input, pos)) {
124935
+ out += input.slice(chunkStart, pos);
124936
+ break;
124937
+ }
124938
+ if (ch === 92) {
124939
+ out += input.slice(chunkStart, pos);
124940
+ const res = readEscapedChar$1(input, pos, lineStart, curLine, type === "template", errors);
124941
+ if (res.ch === null && !firstInvalidLoc) {
124942
+ firstInvalidLoc = {
124943
+ pos,
124944
+ lineStart,
124945
+ curLine
124946
+ };
124947
+ } else {
124948
+ out += res.ch;
124949
+ }
124950
+ ({
124951
+ pos,
124952
+ lineStart,
124953
+ curLine
124954
+ } = res);
124955
+ chunkStart = pos;
124956
+ } else if (ch === 8232 || ch === 8233) {
124957
+ ++pos;
124958
+ ++curLine;
124959
+ lineStart = pos;
124960
+ } else if (ch === 10 || ch === 13) {
124961
+ if (type === "template") {
124962
+ out += input.slice(chunkStart, pos) + "\n";
124963
+ ++pos;
124964
+ if (ch === 13 && input.charCodeAt(pos) === 10) {
124965
+ ++pos;
124966
+ }
124967
+ ++curLine;
124968
+ chunkStart = lineStart = pos;
124969
+ } else {
124970
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
124971
+ }
124972
+ } else {
124973
+ ++pos;
124974
+ }
124975
+ }
124976
+ return {
124977
+ pos,
124978
+ str: out,
124979
+ firstInvalidLoc,
124980
+ lineStart,
124981
+ curLine,
124982
+ containsInvalid: !!firstInvalidLoc
124983
+ };
124984
+ }
124985
+ function isStringEnd$1(type, ch, input, pos) {
124986
+ if (type === "template") {
124987
+ return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
124988
+ }
124989
+ return ch === (type === "double" ? 34 : 39);
124990
+ }
124991
+ function readEscapedChar$1(input, pos, lineStart, curLine, inTemplate, errors) {
124992
+ const throwOnInvalid = !inTemplate;
124993
+ pos++;
124994
+ const res = ch => ({
124995
+ pos,
124996
+ ch,
124997
+ lineStart,
124998
+ curLine
124999
+ });
125000
+ const ch = input.charCodeAt(pos++);
125001
+ switch (ch) {
125002
+ case 110:
125003
+ return res("\n");
125004
+ case 114:
125005
+ return res("\r");
125006
+ case 120:
125007
+ {
125008
+ let code;
125009
+ ({
125010
+ code,
125011
+ pos
125012
+ } = readHexChar$1(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
125013
+ return res(code === null ? null : String.fromCharCode(code));
125014
+ }
125015
+ case 117:
125016
+ {
125017
+ let code;
125018
+ ({
125019
+ code,
125020
+ pos
125021
+ } = readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors));
125022
+ return res(code === null ? null : String.fromCodePoint(code));
125023
+ }
125024
+ case 116:
125025
+ return res("\t");
125026
+ case 98:
125027
+ return res("\b");
125028
+ case 118:
125029
+ return res("\u000b");
125030
+ case 102:
125031
+ return res("\f");
125032
+ case 13:
125033
+ if (input.charCodeAt(pos) === 10) {
125034
+ ++pos;
125035
+ }
125036
+ case 10:
125037
+ lineStart = pos;
125038
+ ++curLine;
125039
+ case 8232:
125040
+ case 8233:
125041
+ return res("");
125042
+ case 56:
125043
+ case 57:
125044
+ if (inTemplate) {
125045
+ return res(null);
125046
+ } else {
125047
+ errors.strictNumericEscape(pos - 1, lineStart, curLine);
125048
+ }
125049
+ default:
125050
+ if (ch >= 48 && ch <= 55) {
125051
+ const startPos = pos - 1;
125052
+ const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
125053
+ let octalStr = match[0];
125054
+ let octal = parseInt(octalStr, 8);
125055
+ if (octal > 255) {
125056
+ octalStr = octalStr.slice(0, -1);
125057
+ octal = parseInt(octalStr, 8);
125058
+ }
125059
+ pos += octalStr.length - 1;
125060
+ const next = input.charCodeAt(pos);
125061
+ if (octalStr !== "0" || next === 56 || next === 57) {
125062
+ if (inTemplate) {
125063
+ return res(null);
125064
+ } else {
125065
+ errors.strictNumericEscape(startPos, lineStart, curLine);
125066
+ }
125067
+ }
125068
+ return res(String.fromCharCode(octal));
125069
+ }
125070
+ return res(String.fromCharCode(ch));
125071
+ }
125072
+ }
125073
+ function readHexChar$1(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
125074
+ const initialPos = pos;
125075
+ let n;
125076
+ ({
125077
+ n,
125078
+ pos
125079
+ } = readInt$1(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
125080
+ if (n === null) {
125081
+ if (throwOnInvalid) {
125082
+ errors.invalidEscapeSequence(initialPos, lineStart, curLine);
125083
+ } else {
125084
+ pos = initialPos - 1;
125085
+ }
125086
+ }
125087
+ return {
125088
+ code: n,
125089
+ pos
125090
+ };
125091
+ }
125092
+ function readInt$1(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
125093
+ const start = pos;
125094
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings$1.hex : forbiddenNumericSeparatorSiblings$1.decBinOct;
125095
+ const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling$1.hex : radix === 10 ? isAllowedNumericSeparatorSibling$1.dec : radix === 8 ? isAllowedNumericSeparatorSibling$1.oct : isAllowedNumericSeparatorSibling$1.bin;
125096
+ let invalid = false;
125097
+ let total = 0;
125098
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
125099
+ const code = input.charCodeAt(pos);
125100
+ let val;
125101
+ if (code === 95 && allowNumSeparator !== "bail") {
125102
+ const prev = input.charCodeAt(pos - 1);
125103
+ const next = input.charCodeAt(pos + 1);
125104
+ if (!allowNumSeparator) {
125105
+ if (bailOnError) return {
125106
+ n: null,
125107
+ pos
125108
+ };
125109
+ errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
125110
+ } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
125111
+ if (bailOnError) return {
125112
+ n: null,
125113
+ pos
125114
+ };
125115
+ errors.unexpectedNumericSeparator(pos, lineStart, curLine);
125116
+ }
125117
+ ++pos;
125118
+ continue;
125119
+ }
125120
+ if (code >= 97) {
125121
+ val = code - 97 + 10;
125122
+ } else if (code >= 65) {
125123
+ val = code - 65 + 10;
125124
+ } else if (_isDigit$1(code)) {
125125
+ val = code - 48;
125126
+ } else {
125127
+ val = Infinity;
125128
+ }
125129
+ if (val >= radix) {
125130
+ if (val <= 9 && bailOnError) {
125131
+ return {
125132
+ n: null,
125133
+ pos
125134
+ };
125135
+ } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
125136
+ val = 0;
125137
+ } else if (forceLen) {
125138
+ val = 0;
125139
+ invalid = true;
125140
+ } else {
125141
+ break;
125142
+ }
125143
+ }
125144
+ ++pos;
125145
+ total = total * radix + val;
125146
+ }
125147
+ if (pos === start || len != null && pos - start !== len || invalid) {
125148
+ return {
125149
+ n: null,
125150
+ pos
125151
+ };
125152
+ }
125153
+ return {
125154
+ n: total,
125155
+ pos
125156
+ };
125157
+ }
125158
+ function readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors) {
125159
+ const ch = input.charCodeAt(pos);
125160
+ let code;
125161
+ if (ch === 123) {
125162
+ ++pos;
125163
+ ({
125164
+ code,
125165
+ pos
125166
+ } = readHexChar$1(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
125167
+ ++pos;
125168
+ if (code !== null && code > 0x10ffff) {
125169
+ if (throwOnInvalid) {
125170
+ errors.invalidCodePoint(pos, lineStart, curLine);
125171
+ } else {
125172
+ return {
125173
+ code: null,
125174
+ pos
125175
+ };
125176
+ }
125177
+ }
125178
+ } else {
125179
+ ({
125180
+ code,
125181
+ pos
125182
+ } = readHexChar$1(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
125183
+ }
125184
+ return {
125185
+ code,
125186
+ pos
125187
+ };
125188
+ }
124879
125189
 
124880
- function requireLib$6 () {
124881
- if (hasRequiredLib$6) return lib$6;
124882
- hasRequiredLib$6 = 1;
125190
+ var constants$2 = {};
125191
+
125192
+ Object.defineProperty(constants$2, "__esModule", {
125193
+ value: true
125194
+ });
125195
+ constants$2.UPDATE_OPERATORS = constants$2.UNARY_OPERATORS = constants$2.STRING_UNARY_OPERATORS = constants$2.STATEMENT_OR_BLOCK_KEYS = constants$2.NUMBER_UNARY_OPERATORS = constants$2.NUMBER_BINARY_OPERATORS = constants$2.NOT_LOCAL_BINDING = constants$2.LOGICAL_OPERATORS = constants$2.INHERIT_KEYS = constants$2.FOR_INIT_KEYS = constants$2.FLATTENABLE_KEYS = constants$2.EQUALITY_BINARY_OPERATORS = constants$2.COMPARISON_BINARY_OPERATORS = constants$2.COMMENT_KEYS = constants$2.BOOLEAN_UNARY_OPERATORS = constants$2.BOOLEAN_NUMBER_BINARY_OPERATORS = constants$2.BOOLEAN_BINARY_OPERATORS = constants$2.BLOCK_SCOPED_SYMBOL = constants$2.BINARY_OPERATORS = constants$2.ASSIGNMENT_OPERATORS = void 0;
125196
+ const STATEMENT_OR_BLOCK_KEYS$3 = ["consequent", "body", "alternate"];
125197
+ constants$2.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS$3;
125198
+ const FLATTENABLE_KEYS$2 = ["body", "expressions"];
125199
+ constants$2.FLATTENABLE_KEYS = FLATTENABLE_KEYS$2;
125200
+ const FOR_INIT_KEYS$2 = ["left", "init"];
125201
+ constants$2.FOR_INIT_KEYS = FOR_INIT_KEYS$2;
125202
+ const COMMENT_KEYS$2 = ["leadingComments", "trailingComments", "innerComments"];
125203
+ constants$2.COMMENT_KEYS = COMMENT_KEYS$2;
125204
+ const LOGICAL_OPERATORS$3 = ["||", "&&", "??"];
125205
+ constants$2.LOGICAL_OPERATORS = LOGICAL_OPERATORS$3;
125206
+ const UPDATE_OPERATORS$2 = ["++", "--"];
125207
+ constants$2.UPDATE_OPERATORS = UPDATE_OPERATORS$2;
125208
+ const BOOLEAN_NUMBER_BINARY_OPERATORS$2 = [">", "<", ">=", "<="];
125209
+ constants$2.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS$2;
125210
+ const EQUALITY_BINARY_OPERATORS$2 = ["==", "===", "!=", "!=="];
125211
+ constants$2.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS$2;
125212
+ const COMPARISON_BINARY_OPERATORS$2 = [...EQUALITY_BINARY_OPERATORS$2, "in", "instanceof"];
125213
+ constants$2.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS$2;
125214
+ const BOOLEAN_BINARY_OPERATORS$2 = [...COMPARISON_BINARY_OPERATORS$2, ...BOOLEAN_NUMBER_BINARY_OPERATORS$2];
125215
+ constants$2.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS$2;
125216
+ const NUMBER_BINARY_OPERATORS$2 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
125217
+ constants$2.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS$2;
125218
+ const BINARY_OPERATORS$2 = ["+", ...NUMBER_BINARY_OPERATORS$2, ...BOOLEAN_BINARY_OPERATORS$2, "|>"];
125219
+ constants$2.BINARY_OPERATORS = BINARY_OPERATORS$2;
125220
+ const ASSIGNMENT_OPERATORS$2 = ["=", "+=", ...NUMBER_BINARY_OPERATORS$2.map(op => op + "="), ...LOGICAL_OPERATORS$3.map(op => op + "=")];
125221
+ constants$2.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS$2;
125222
+ const BOOLEAN_UNARY_OPERATORS$2 = ["delete", "!"];
125223
+ constants$2.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS$2;
125224
+ const NUMBER_UNARY_OPERATORS$2 = ["+", "-", "~"];
125225
+ constants$2.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS$2;
125226
+ const STRING_UNARY_OPERATORS$2 = ["typeof"];
125227
+ constants$2.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS$2;
125228
+ const UNARY_OPERATORS$2 = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS$2, ...NUMBER_UNARY_OPERATORS$2, ...STRING_UNARY_OPERATORS$2];
125229
+ constants$2.UNARY_OPERATORS = UNARY_OPERATORS$2;
125230
+ const INHERIT_KEYS$2 = {
125231
+ optional: ["typeAnnotation", "typeParameters", "returnType"],
125232
+ force: ["start", "loc", "end"]
125233
+ };
125234
+ constants$2.INHERIT_KEYS = INHERIT_KEYS$2;
125235
+ const BLOCK_SCOPED_SYMBOL$2 = Symbol.for("var used to be block scoped");
125236
+ constants$2.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL$2;
125237
+ const NOT_LOCAL_BINDING$3 = Symbol.for("should not be considered a local binding");
125238
+ constants$2.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING$3;
125239
+
125240
+ var utils$3 = {};
125241
+
125242
+ var hasRequiredUtils$2;
125243
+
125244
+ function requireUtils$2 () {
125245
+ if (hasRequiredUtils$2) return utils$3;
125246
+ hasRequiredUtils$2 = 1;
124883
125247
 
124884
- Object.defineProperty(lib$6, "__esModule", {
125248
+ Object.defineProperty(utils$3, "__esModule", {
124885
125249
  value: true
124886
125250
  });
124887
- lib$6.readCodePoint = readCodePoint;
124888
- lib$6.readInt = readInt;
124889
- lib$6.readStringContents = readStringContents;
124890
- var _isDigit = function isDigit(code) {
124891
- return code >= 48 && code <= 57;
124892
- };
124893
- const forbiddenNumericSeparatorSiblings = {
124894
- decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
124895
- hex: new Set([46, 88, 95, 120])
124896
- };
124897
- const isAllowedNumericSeparatorSibling = {
124898
- bin: ch => ch === 48 || ch === 49,
124899
- oct: ch => ch >= 48 && ch <= 55,
124900
- dec: ch => ch >= 48 && ch <= 57,
124901
- hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
124902
- };
124903
- function readStringContents(type, input, pos, lineStart, curLine, errors) {
124904
- const initialPos = pos;
124905
- const initialLineStart = lineStart;
124906
- const initialCurLine = curLine;
124907
- let out = "";
124908
- let firstInvalidLoc = null;
124909
- let chunkStart = pos;
124910
- const {
124911
- length
124912
- } = input;
124913
- for (;;) {
124914
- if (pos >= length) {
124915
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
124916
- out += input.slice(chunkStart, pos);
124917
- break;
124918
- }
124919
- const ch = input.charCodeAt(pos);
124920
- if (isStringEnd(type, ch, input, pos)) {
124921
- out += input.slice(chunkStart, pos);
124922
- break;
124923
- }
124924
- if (ch === 92) {
124925
- out += input.slice(chunkStart, pos);
124926
- const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
124927
- if (res.ch === null && !firstInvalidLoc) {
124928
- firstInvalidLoc = {
124929
- pos,
124930
- lineStart,
124931
- curLine
124932
- };
124933
- } else {
124934
- out += res.ch;
124935
- }
124936
- ({
124937
- pos,
124938
- lineStart,
124939
- curLine
124940
- } = res);
124941
- chunkStart = pos;
124942
- } else if (ch === 8232 || ch === 8233) {
124943
- ++pos;
124944
- ++curLine;
124945
- lineStart = pos;
124946
- } else if (ch === 10 || ch === 13) {
124947
- if (type === "template") {
124948
- out += input.slice(chunkStart, pos) + "\n";
124949
- ++pos;
124950
- if (ch === 13 && input.charCodeAt(pos) === 10) {
124951
- ++pos;
124952
- }
124953
- ++curLine;
124954
- chunkStart = lineStart = pos;
124955
- } else {
124956
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
124957
- }
124958
- } else {
124959
- ++pos;
124960
- }
125251
+ utils$3.VISITOR_KEYS = utils$3.NODE_PARENT_VALIDATIONS = utils$3.NODE_FIELDS = utils$3.FLIPPED_ALIAS_KEYS = utils$3.DEPRECATED_KEYS = utils$3.BUILDER_KEYS = utils$3.ALIAS_KEYS = void 0;
125252
+ utils$3.arrayOf = arrayOf;
125253
+ utils$3.arrayOfType = arrayOfType;
125254
+ utils$3.assertEach = assertEach;
125255
+ utils$3.assertNodeOrValueType = assertNodeOrValueType;
125256
+ utils$3.assertNodeType = assertNodeType;
125257
+ utils$3.assertOneOf = assertOneOf;
125258
+ utils$3.assertOptionalChainStart = assertOptionalChainStart;
125259
+ utils$3.assertShape = assertShape;
125260
+ utils$3.assertValueType = assertValueType;
125261
+ utils$3.chain = chain;
125262
+ utils$3.default = defineType;
125263
+ utils$3.defineAliasedType = defineAliasedType;
125264
+ utils$3.typeIs = typeIs;
125265
+ utils$3.validate = validate;
125266
+ utils$3.validateArrayOfType = validateArrayOfType;
125267
+ utils$3.validateOptional = validateOptional;
125268
+ utils$3.validateOptionalType = validateOptionalType;
125269
+ utils$3.validateType = validateType;
125270
+ var _is = requireIs$2();
125271
+ var _validate = requireValidate$2();
125272
+ const VISITOR_KEYS = {};
125273
+ utils$3.VISITOR_KEYS = VISITOR_KEYS;
125274
+ const ALIAS_KEYS = {};
125275
+ utils$3.ALIAS_KEYS = ALIAS_KEYS;
125276
+ const FLIPPED_ALIAS_KEYS = {};
125277
+ utils$3.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
125278
+ const NODE_FIELDS = {};
125279
+ utils$3.NODE_FIELDS = NODE_FIELDS;
125280
+ const BUILDER_KEYS = {};
125281
+ utils$3.BUILDER_KEYS = BUILDER_KEYS;
125282
+ const DEPRECATED_KEYS = {};
125283
+ utils$3.DEPRECATED_KEYS = DEPRECATED_KEYS;
125284
+ const NODE_PARENT_VALIDATIONS = {};
125285
+ utils$3.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
125286
+ function getType(val) {
125287
+ if (Array.isArray(val)) {
125288
+ return "array";
125289
+ } else if (val === null) {
125290
+ return "null";
125291
+ } else {
125292
+ return typeof val;
124961
125293
  }
125294
+ }
125295
+ function validate(validate) {
124962
125296
  return {
124963
- pos,
124964
- str: out,
124965
- firstInvalidLoc,
124966
- lineStart,
124967
- curLine,
124968
- containsInvalid: !!firstInvalidLoc
125297
+ validate
124969
125298
  };
124970
125299
  }
124971
- function isStringEnd(type, ch, input, pos) {
124972
- if (type === "template") {
124973
- return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
124974
- }
124975
- return ch === (type === "double" ? 34 : 39);
124976
- }
124977
- function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
124978
- const throwOnInvalid = !inTemplate;
124979
- pos++;
124980
- const res = ch => ({
124981
- pos,
124982
- ch,
124983
- lineStart,
124984
- curLine
124985
- });
124986
- const ch = input.charCodeAt(pos++);
124987
- switch (ch) {
124988
- case 110:
124989
- return res("\n");
124990
- case 114:
124991
- return res("\r");
124992
- case 120:
124993
- {
124994
- let code;
124995
- ({
124996
- code,
124997
- pos
124998
- } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
124999
- return res(code === null ? null : String.fromCharCode(code));
125000
- }
125001
- case 117:
125002
- {
125003
- let code;
125004
- ({
125005
- code,
125006
- pos
125007
- } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
125008
- return res(code === null ? null : String.fromCodePoint(code));
125009
- }
125010
- case 116:
125011
- return res("\t");
125012
- case 98:
125013
- return res("\b");
125014
- case 118:
125015
- return res("\u000b");
125016
- case 102:
125017
- return res("\f");
125018
- case 13:
125019
- if (input.charCodeAt(pos) === 10) {
125020
- ++pos;
125021
- }
125022
- case 10:
125023
- lineStart = pos;
125024
- ++curLine;
125025
- case 8232:
125026
- case 8233:
125027
- return res("");
125028
- case 56:
125029
- case 57:
125030
- if (inTemplate) {
125031
- return res(null);
125032
- } else {
125033
- errors.strictNumericEscape(pos - 1, lineStart, curLine);
125034
- }
125035
- default:
125036
- if (ch >= 48 && ch <= 55) {
125037
- const startPos = pos - 1;
125038
- const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
125039
- let octalStr = match[0];
125040
- let octal = parseInt(octalStr, 8);
125041
- if (octal > 255) {
125042
- octalStr = octalStr.slice(0, -1);
125043
- octal = parseInt(octalStr, 8);
125044
- }
125045
- pos += octalStr.length - 1;
125046
- const next = input.charCodeAt(pos);
125047
- if (octalStr !== "0" || next === 56 || next === 57) {
125048
- if (inTemplate) {
125049
- return res(null);
125050
- } else {
125051
- errors.strictNumericEscape(startPos, lineStart, curLine);
125052
- }
125053
- }
125054
- return res(String.fromCharCode(octal));
125055
- }
125056
- return res(String.fromCharCode(ch));
125057
- }
125058
- }
125059
- function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
125060
- const initialPos = pos;
125061
- let n;
125062
- ({
125063
- n,
125064
- pos
125065
- } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
125066
- if (n === null) {
125067
- if (throwOnInvalid) {
125068
- errors.invalidEscapeSequence(initialPos, lineStart, curLine);
125069
- } else {
125070
- pos = initialPos - 1;
125071
- }
125072
- }
125073
- return {
125074
- code: n,
125075
- pos
125076
- };
125077
- }
125078
- function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
125079
- const start = pos;
125080
- const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
125081
- const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
125082
- let invalid = false;
125083
- let total = 0;
125084
- for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
125085
- const code = input.charCodeAt(pos);
125086
- let val;
125087
- if (code === 95 && allowNumSeparator !== "bail") {
125088
- const prev = input.charCodeAt(pos - 1);
125089
- const next = input.charCodeAt(pos + 1);
125090
- if (!allowNumSeparator) {
125091
- if (bailOnError) return {
125092
- n: null,
125093
- pos
125094
- };
125095
- errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
125096
- } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
125097
- if (bailOnError) return {
125098
- n: null,
125099
- pos
125100
- };
125101
- errors.unexpectedNumericSeparator(pos, lineStart, curLine);
125102
- }
125103
- ++pos;
125104
- continue;
125105
- }
125106
- if (code >= 97) {
125107
- val = code - 97 + 10;
125108
- } else if (code >= 65) {
125109
- val = code - 65 + 10;
125110
- } else if (_isDigit(code)) {
125111
- val = code - 48;
125112
- } else {
125113
- val = Infinity;
125114
- }
125115
- if (val >= radix) {
125116
- if (val <= 9 && bailOnError) {
125117
- return {
125118
- n: null,
125119
- pos
125120
- };
125121
- } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
125122
- val = 0;
125123
- } else if (forceLen) {
125124
- val = 0;
125125
- invalid = true;
125126
- } else {
125127
- break;
125128
- }
125129
- }
125130
- ++pos;
125131
- total = total * radix + val;
125132
- }
125133
- if (pos === start || len != null && pos - start !== len || invalid) {
125134
- return {
125135
- n: null,
125136
- pos
125137
- };
125138
- }
125139
- return {
125140
- n: total,
125141
- pos
125142
- };
125143
- }
125144
- function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
125145
- const ch = input.charCodeAt(pos);
125146
- let code;
125147
- if (ch === 123) {
125148
- ++pos;
125149
- ({
125150
- code,
125151
- pos
125152
- } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
125153
- ++pos;
125154
- if (code !== null && code > 0x10ffff) {
125155
- if (throwOnInvalid) {
125156
- errors.invalidCodePoint(pos, lineStart, curLine);
125157
- } else {
125158
- return {
125159
- code: null,
125160
- pos
125161
- };
125162
- }
125163
- }
125164
- } else {
125165
- ({
125166
- code,
125167
- pos
125168
- } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
125169
- }
125170
- return {
125171
- code,
125172
- pos
125173
- };
125174
- }
125175
-
125176
-
125177
- return lib$6;
125178
- }
125179
-
125180
- var constants$2 = {};
125181
-
125182
- Object.defineProperty(constants$2, "__esModule", {
125183
- value: true
125184
- });
125185
- constants$2.UPDATE_OPERATORS = constants$2.UNARY_OPERATORS = constants$2.STRING_UNARY_OPERATORS = constants$2.STATEMENT_OR_BLOCK_KEYS = constants$2.NUMBER_UNARY_OPERATORS = constants$2.NUMBER_BINARY_OPERATORS = constants$2.NOT_LOCAL_BINDING = constants$2.LOGICAL_OPERATORS = constants$2.INHERIT_KEYS = constants$2.FOR_INIT_KEYS = constants$2.FLATTENABLE_KEYS = constants$2.EQUALITY_BINARY_OPERATORS = constants$2.COMPARISON_BINARY_OPERATORS = constants$2.COMMENT_KEYS = constants$2.BOOLEAN_UNARY_OPERATORS = constants$2.BOOLEAN_NUMBER_BINARY_OPERATORS = constants$2.BOOLEAN_BINARY_OPERATORS = constants$2.BLOCK_SCOPED_SYMBOL = constants$2.BINARY_OPERATORS = constants$2.ASSIGNMENT_OPERATORS = void 0;
125186
- const STATEMENT_OR_BLOCK_KEYS$3 = ["consequent", "body", "alternate"];
125187
- constants$2.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS$3;
125188
- const FLATTENABLE_KEYS$2 = ["body", "expressions"];
125189
- constants$2.FLATTENABLE_KEYS = FLATTENABLE_KEYS$2;
125190
- const FOR_INIT_KEYS$2 = ["left", "init"];
125191
- constants$2.FOR_INIT_KEYS = FOR_INIT_KEYS$2;
125192
- const COMMENT_KEYS$2 = ["leadingComments", "trailingComments", "innerComments"];
125193
- constants$2.COMMENT_KEYS = COMMENT_KEYS$2;
125194
- const LOGICAL_OPERATORS$3 = ["||", "&&", "??"];
125195
- constants$2.LOGICAL_OPERATORS = LOGICAL_OPERATORS$3;
125196
- const UPDATE_OPERATORS$2 = ["++", "--"];
125197
- constants$2.UPDATE_OPERATORS = UPDATE_OPERATORS$2;
125198
- const BOOLEAN_NUMBER_BINARY_OPERATORS$2 = [">", "<", ">=", "<="];
125199
- constants$2.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS$2;
125200
- const EQUALITY_BINARY_OPERATORS$2 = ["==", "===", "!=", "!=="];
125201
- constants$2.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS$2;
125202
- const COMPARISON_BINARY_OPERATORS$2 = [...EQUALITY_BINARY_OPERATORS$2, "in", "instanceof"];
125203
- constants$2.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS$2;
125204
- const BOOLEAN_BINARY_OPERATORS$2 = [...COMPARISON_BINARY_OPERATORS$2, ...BOOLEAN_NUMBER_BINARY_OPERATORS$2];
125205
- constants$2.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS$2;
125206
- const NUMBER_BINARY_OPERATORS$2 = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
125207
- constants$2.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS$2;
125208
- const BINARY_OPERATORS$2 = ["+", ...NUMBER_BINARY_OPERATORS$2, ...BOOLEAN_BINARY_OPERATORS$2, "|>"];
125209
- constants$2.BINARY_OPERATORS = BINARY_OPERATORS$2;
125210
- const ASSIGNMENT_OPERATORS$2 = ["=", "+=", ...NUMBER_BINARY_OPERATORS$2.map(op => op + "="), ...LOGICAL_OPERATORS$3.map(op => op + "=")];
125211
- constants$2.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS$2;
125212
- const BOOLEAN_UNARY_OPERATORS$2 = ["delete", "!"];
125213
- constants$2.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS$2;
125214
- const NUMBER_UNARY_OPERATORS$2 = ["+", "-", "~"];
125215
- constants$2.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS$2;
125216
- const STRING_UNARY_OPERATORS$2 = ["typeof"];
125217
- constants$2.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS$2;
125218
- const UNARY_OPERATORS$2 = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS$2, ...NUMBER_UNARY_OPERATORS$2, ...STRING_UNARY_OPERATORS$2];
125219
- constants$2.UNARY_OPERATORS = UNARY_OPERATORS$2;
125220
- const INHERIT_KEYS$2 = {
125221
- optional: ["typeAnnotation", "typeParameters", "returnType"],
125222
- force: ["start", "loc", "end"]
125223
- };
125224
- constants$2.INHERIT_KEYS = INHERIT_KEYS$2;
125225
- const BLOCK_SCOPED_SYMBOL$2 = Symbol.for("var used to be block scoped");
125226
- constants$2.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL$2;
125227
- const NOT_LOCAL_BINDING$3 = Symbol.for("should not be considered a local binding");
125228
- constants$2.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING$3;
125229
-
125230
- var utils$3 = {};
125231
-
125232
- var hasRequiredUtils$2;
125233
-
125234
- function requireUtils$2 () {
125235
- if (hasRequiredUtils$2) return utils$3;
125236
- hasRequiredUtils$2 = 1;
125237
-
125238
- Object.defineProperty(utils$3, "__esModule", {
125239
- value: true
125240
- });
125241
- utils$3.VISITOR_KEYS = utils$3.NODE_PARENT_VALIDATIONS = utils$3.NODE_FIELDS = utils$3.FLIPPED_ALIAS_KEYS = utils$3.DEPRECATED_KEYS = utils$3.BUILDER_KEYS = utils$3.ALIAS_KEYS = void 0;
125242
- utils$3.arrayOf = arrayOf;
125243
- utils$3.arrayOfType = arrayOfType;
125244
- utils$3.assertEach = assertEach;
125245
- utils$3.assertNodeOrValueType = assertNodeOrValueType;
125246
- utils$3.assertNodeType = assertNodeType;
125247
- utils$3.assertOneOf = assertOneOf;
125248
- utils$3.assertOptionalChainStart = assertOptionalChainStart;
125249
- utils$3.assertShape = assertShape;
125250
- utils$3.assertValueType = assertValueType;
125251
- utils$3.chain = chain;
125252
- utils$3.default = defineType;
125253
- utils$3.defineAliasedType = defineAliasedType;
125254
- utils$3.typeIs = typeIs;
125255
- utils$3.validate = validate;
125256
- utils$3.validateArrayOfType = validateArrayOfType;
125257
- utils$3.validateOptional = validateOptional;
125258
- utils$3.validateOptionalType = validateOptionalType;
125259
- utils$3.validateType = validateType;
125260
- var _is = requireIs$2();
125261
- var _validate = requireValidate$2();
125262
- const VISITOR_KEYS = {};
125263
- utils$3.VISITOR_KEYS = VISITOR_KEYS;
125264
- const ALIAS_KEYS = {};
125265
- utils$3.ALIAS_KEYS = ALIAS_KEYS;
125266
- const FLIPPED_ALIAS_KEYS = {};
125267
- utils$3.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
125268
- const NODE_FIELDS = {};
125269
- utils$3.NODE_FIELDS = NODE_FIELDS;
125270
- const BUILDER_KEYS = {};
125271
- utils$3.BUILDER_KEYS = BUILDER_KEYS;
125272
- const DEPRECATED_KEYS = {};
125273
- utils$3.DEPRECATED_KEYS = DEPRECATED_KEYS;
125274
- const NODE_PARENT_VALIDATIONS = {};
125275
- utils$3.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
125276
- function getType(val) {
125277
- if (Array.isArray(val)) {
125278
- return "array";
125279
- } else if (val === null) {
125280
- return "null";
125281
- } else {
125282
- return typeof val;
125283
- }
125284
- }
125285
- function validate(validate) {
125286
- return {
125287
- validate
125288
- };
125289
- }
125290
- function typeIs(typeName) {
125291
- return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
125300
+ function typeIs(typeName) {
125301
+ return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
125292
125302
  }
125293
125303
  function validateType(typeName) {
125294
125304
  return validate(typeIs(typeName));
@@ -125529,7 +125539,7 @@ function requireCore$2 () {
125529
125539
  var _is = requireIs$2();
125530
125540
  var _isValidIdentifier = isValidIdentifier$5;
125531
125541
  var _helperValidatorIdentifier = lib$7;
125532
- var _helperStringParser = requireLib$6();
125542
+ var _helperStringParser = lib$6;
125533
125543
  var _constants = constants$2;
125534
125544
  var _utils = requireUtils$2();
125535
125545
  const defineType = (0, _utils.defineAliasedType)("Standardized");
@@ -128688,7 +128698,7 @@ function requireValidateNode$2 () {
128688
128698
  });
128689
128699
  validateNode$2.default = validateNode;
128690
128700
  var _validate = requireValidate$2();
128691
- var _ = requireLib$5();
128701
+ var _ = requireLib$4();
128692
128702
  function validateNode(node) {
128693
128703
  const keys = _.BUILDER_KEYS[node.type];
128694
128704
  for (const key of keys) {
@@ -130704,7 +130714,7 @@ function requireCleanJSXElementLiteralChild$2 () {
130704
130714
  });
130705
130715
  cleanJSXElementLiteralChild$2.default = cleanJSXElementLiteralChild;
130706
130716
  var _generated = requireGenerated$2();
130707
- var _ = requireLib$5();
130717
+ var _ = requireLib$4();
130708
130718
  function cleanJSXElementLiteralChild(child, args) {
130709
130719
  const lines = child.value.split(/\r\n|\n|\r/);
130710
130720
  let lastNonEmptyLine = 0;
@@ -134790,7 +134800,7 @@ function requirePrependToMemberExpression$2 () {
134790
134800
  });
134791
134801
  prependToMemberExpression$2.default = prependToMemberExpression;
134792
134802
  var _generated = requireGenerated$2();
134793
- var _ = requireLib$5();
134803
+ var _ = requireLib$4();
134794
134804
  function prependToMemberExpression(member, prepend) {
134795
134805
  if ((0, _.isSuper)(member.object)) {
134796
134806
  throw new Error("Cannot prepend node to super property access (`super.foo`).");
@@ -135142,11 +135152,11 @@ function isVar$5(node) {
135142
135152
  }) && !node[_constants$a.BLOCK_SCOPED_SYMBOL];
135143
135153
  }
135144
135154
 
135145
- var hasRequiredLib$5;
135155
+ var hasRequiredLib$4;
135146
135156
 
135147
- function requireLib$5 () {
135148
- if (hasRequiredLib$5) return lib$8;
135149
- hasRequiredLib$5 = 1;
135157
+ function requireLib$4 () {
135158
+ if (hasRequiredLib$4) return lib$8;
135159
+ hasRequiredLib$4 = 1;
135150
135160
  (function (exports) {
135151
135161
 
135152
135162
  Object.defineProperty(exports, "__esModule", {
@@ -135725,7 +135735,7 @@ Object.defineProperty(formatters$1, "__esModule", {
135725
135735
  value: true
135726
135736
  });
135727
135737
  formatters$1.statements = formatters$1.statement = formatters$1.smart = formatters$1.program = formatters$1.expression = void 0;
135728
- var _t$8 = requireLib$5();
135738
+ var _t$8 = requireLib$4();
135729
135739
  const {
135730
135740
  assertExpressionStatement: assertExpressionStatement$2
135731
135741
  } = _t$8;
@@ -135866,7 +135876,7 @@ Object.defineProperty(parse$5, "__esModule", {
135866
135876
  value: true
135867
135877
  });
135868
135878
  parse$5.default = parseAndBuildMetadata;
135869
- var _t$7 = requireLib$5();
135879
+ var _t$7 = requireLib$4();
135870
135880
  var _parser = lib$f;
135871
135881
  var _codeFrame = lib$i;
135872
135882
  const {
@@ -136025,7 +136035,7 @@ Object.defineProperty(populate, "__esModule", {
136025
136035
  value: true
136026
136036
  });
136027
136037
  populate.default = populatePlaceholders;
136028
- var _t$6 = requireLib$5();
136038
+ var _t$6 = requireLib$4();
136029
136039
  const {
136030
136040
  blockStatement: blockStatement$2,
136031
136041
  cloneNode: cloneNode$6,
@@ -136322,7 +136332,7 @@ Object.defineProperty(lib$a, "__esModule", {
136322
136332
  });
136323
136333
  lib$a.default = _default$6;
136324
136334
  var _template = lib$9;
136325
- var _t$5 = requireLib$5();
136335
+ var _t$5 = requireLib$4();
136326
136336
  const {
136327
136337
  NOT_LOCAL_BINDING: NOT_LOCAL_BINDING$2,
136328
136338
  cloneNode: cloneNode$5,
@@ -136491,7 +136501,7 @@ conversion.arrowFunctionToExpression = arrowFunctionToExpression;
136491
136501
  conversion.ensureBlock = ensureBlock$2;
136492
136502
  conversion.toComputedKey = toComputedKey$2;
136493
136503
  conversion.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
136494
- var _t$4 = requireLib$8();
136504
+ var _t$4 = requireLib$7();
136495
136505
  var _helperEnvironmentVisitor = lib$k;
136496
136506
  var _helperFunctionName = lib$a;
136497
136507
  var _visitors = visitors;
@@ -136975,7 +136985,7 @@ introspection.matchesPattern = matchesPattern$5;
136975
136985
  introspection.referencesImport = referencesImport;
136976
136986
  introspection.resolve = resolve$1;
136977
136987
  introspection.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
136978
- var _t$3 = requireLib$8();
136988
+ var _t$3 = requireLib$7();
136979
136989
  const {
136980
136990
  STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS$2,
136981
136991
  VISITOR_KEYS,
@@ -137679,7 +137689,7 @@ Object.defineProperty(hoister, "__esModule", {
137679
137689
  value: true
137680
137690
  });
137681
137691
  hoister.default = void 0;
137682
- var _t$2 = requireLib$8();
137692
+ var _t$2 = requireLib$7();
137683
137693
  var _t2 = _t$2;
137684
137694
  const {
137685
137695
  react: react$1
@@ -137865,7 +137875,7 @@ function requireModification () {
137865
137875
  var _cache = cache;
137866
137876
  var _hoister = hoister;
137867
137877
  var _index = requirePath();
137868
- var _t = requireLib$8();
137878
+ var _t = requireLib$7();
137869
137879
  const {
137870
137880
  arrowFunctionExpression,
137871
137881
  assertExpression,
@@ -138101,7 +138111,7 @@ function requireFamily () {
138101
138111
  family.getPrevSibling = getPrevSibling;
138102
138112
  family.getSibling = getSibling;
138103
138113
  var _index = requirePath();
138104
- var _t = requireLib$8();
138114
+ var _t = requireLib$7();
138105
138115
  const {
138106
138116
  getBindingIdentifiers: _getBindingIdentifiers,
138107
138117
  getOuterBindingIdentifiers: _getOuterBindingIdentifiers,
@@ -138428,7 +138438,7 @@ Object.defineProperty(comments$1, "__esModule", {
138428
138438
  comments$1.addComment = addComment$4;
138429
138439
  comments$1.addComments = addComments$4;
138430
138440
  comments$1.shareCommentsWithSiblings = shareCommentsWithSiblings;
138431
- var _t$1 = requireLib$8();
138441
+ var _t$1 = requireLib$7();
138432
138442
  const {
138433
138443
  addComment: _addComment,
138434
138444
  addComments: _addComments$2
@@ -138494,7 +138504,7 @@ virtualTypesValidator.isSpreadProperty = isSpreadProperty$2;
138494
138504
  virtualTypesValidator.isStatement = isStatement$7;
138495
138505
  virtualTypesValidator.isUser = isUser;
138496
138506
  virtualTypesValidator.isVar = isVar$4;
138497
- var _t = requireLib$8();
138507
+ var _t = requireLib$7();
138498
138508
  const {
138499
138509
  isBinding: isBinding$5,
138500
138510
  isBlockScoped: nodeIsBlockScoped,
@@ -138647,9 +138657,9 @@ function requirePath () {
138647
138657
  path.default = path.SHOULD_STOP = path.SHOULD_SKIP = path.REMOVED = void 0;
138648
138658
  var virtualTypes = virtualTypes$1;
138649
138659
  var _debug = browserExports;
138650
- var _index = requireLib$4();
138660
+ var _index = requireLib$3();
138651
138661
  var _scope = requireScope();
138652
- var _t = requireLib$8();
138662
+ var _t = requireLib$7();
138653
138663
  var t = _t;
138654
138664
  var cache$1 = cache;
138655
138665
  var _generator = lib$j;
@@ -138846,7 +138856,7 @@ function requireContext () {
138846
138856
  });
138847
138857
  context$1.default = void 0;
138848
138858
  var _path = requirePath();
138849
- var _t = requireLib$8();
138859
+ var _t = requireLib$7();
138850
138860
  const {
138851
138861
  VISITOR_KEYS
138852
138862
  } = _t;
@@ -138968,7 +138978,7 @@ function requireTraverseNode () {
138968
138978
  });
138969
138979
  traverseNode.traverseNode = traverseNode$1;
138970
138980
  var _context = requireContext();
138971
- var _t = requireLib$8();
138981
+ var _t = requireLib$7();
138972
138982
  const {
138973
138983
  VISITOR_KEYS
138974
138984
  } = _t;
@@ -139011,11 +139021,11 @@ class Hub {
139011
139021
  }
139012
139022
  hub.default = Hub;
139013
139023
 
139014
- var hasRequiredLib$4;
139024
+ var hasRequiredLib$3;
139015
139025
 
139016
- function requireLib$4 () {
139017
- if (hasRequiredLib$4) return lib$p;
139018
- hasRequiredLib$4 = 1;
139026
+ function requireLib$3 () {
139027
+ if (hasRequiredLib$3) return lib$p;
139028
+ hasRequiredLib$3 = 1;
139019
139029
  (function (exports) {
139020
139030
 
139021
139031
  Object.defineProperty(exports, "__esModule", {
@@ -139042,7 +139052,7 @@ function requireLib$4 () {
139042
139052
  exports.visitors = exports.default = void 0;
139043
139053
  var visitors$1 = visitors;
139044
139054
  exports.visitors = visitors$1;
139045
- var _t = requireLib$8();
139055
+ var _t = requireLib$7();
139046
139056
  var cache$1 = cache;
139047
139057
  var _traverseNode = requireTraverseNode();
139048
139058
  var _path = requirePath();
@@ -142313,306 +142323,296 @@ function isValidIdentifier$2(name, reserved = true) {
142313
142323
 
142314
142324
  var lib$3 = {};
142315
142325
 
142316
- var hasRequiredLib$3;
142317
-
142318
- function requireLib$3 () {
142319
- if (hasRequiredLib$3) return lib$3;
142320
- hasRequiredLib$3 = 1;
142321
-
142322
- Object.defineProperty(lib$3, "__esModule", {
142323
- value: true
142324
- });
142325
- lib$3.readCodePoint = readCodePoint;
142326
- lib$3.readInt = readInt;
142327
- lib$3.readStringContents = readStringContents;
142328
- var _isDigit = function isDigit(code) {
142329
- return code >= 48 && code <= 57;
142330
- };
142331
- const forbiddenNumericSeparatorSiblings = {
142332
- decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
142333
- hex: new Set([46, 88, 95, 120])
142334
- };
142335
- const isAllowedNumericSeparatorSibling = {
142336
- bin: ch => ch === 48 || ch === 49,
142337
- oct: ch => ch >= 48 && ch <= 55,
142338
- dec: ch => ch >= 48 && ch <= 57,
142339
- hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
142340
- };
142341
- function readStringContents(type, input, pos, lineStart, curLine, errors) {
142342
- const initialPos = pos;
142343
- const initialLineStart = lineStart;
142344
- const initialCurLine = curLine;
142345
- let out = "";
142346
- let firstInvalidLoc = null;
142347
- let chunkStart = pos;
142348
- const {
142349
- length
142350
- } = input;
142351
- for (;;) {
142352
- if (pos >= length) {
142353
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
142354
- out += input.slice(chunkStart, pos);
142355
- break;
142356
- }
142357
- const ch = input.charCodeAt(pos);
142358
- if (isStringEnd(type, ch, input, pos)) {
142359
- out += input.slice(chunkStart, pos);
142360
- break;
142361
- }
142362
- if (ch === 92) {
142363
- out += input.slice(chunkStart, pos);
142364
- const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
142365
- if (res.ch === null && !firstInvalidLoc) {
142366
- firstInvalidLoc = {
142367
- pos,
142368
- lineStart,
142369
- curLine
142370
- };
142371
- } else {
142372
- out += res.ch;
142373
- }
142374
- ({
142375
- pos,
142376
- lineStart,
142377
- curLine
142378
- } = res);
142379
- chunkStart = pos;
142380
- } else if (ch === 8232 || ch === 8233) {
142381
- ++pos;
142382
- ++curLine;
142383
- lineStart = pos;
142384
- } else if (ch === 10 || ch === 13) {
142385
- if (type === "template") {
142386
- out += input.slice(chunkStart, pos) + "\n";
142387
- ++pos;
142388
- if (ch === 13 && input.charCodeAt(pos) === 10) {
142389
- ++pos;
142390
- }
142391
- ++curLine;
142392
- chunkStart = lineStart = pos;
142393
- } else {
142394
- errors.unterminated(initialPos, initialLineStart, initialCurLine);
142395
- }
142396
- } else {
142397
- ++pos;
142398
- }
142399
- }
142400
- return {
142401
- pos,
142402
- str: out,
142403
- firstInvalidLoc,
142404
- lineStart,
142405
- curLine,
142406
- containsInvalid: !!firstInvalidLoc
142407
- };
142408
- }
142409
- function isStringEnd(type, ch, input, pos) {
142410
- if (type === "template") {
142411
- return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
142412
- }
142413
- return ch === (type === "double" ? 34 : 39);
142414
- }
142415
- function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
142416
- const throwOnInvalid = !inTemplate;
142417
- pos++;
142418
- const res = ch => ({
142419
- pos,
142420
- ch,
142421
- lineStart,
142422
- curLine
142423
- });
142424
- const ch = input.charCodeAt(pos++);
142425
- switch (ch) {
142426
- case 110:
142427
- return res("\n");
142428
- case 114:
142429
- return res("\r");
142430
- case 120:
142431
- {
142432
- let code;
142433
- ({
142434
- code,
142435
- pos
142436
- } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
142437
- return res(code === null ? null : String.fromCharCode(code));
142438
- }
142439
- case 117:
142440
- {
142441
- let code;
142442
- ({
142443
- code,
142444
- pos
142445
- } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
142446
- return res(code === null ? null : String.fromCodePoint(code));
142447
- }
142448
- case 116:
142449
- return res("\t");
142450
- case 98:
142451
- return res("\b");
142452
- case 118:
142453
- return res("\u000b");
142454
- case 102:
142455
- return res("\f");
142456
- case 13:
142457
- if (input.charCodeAt(pos) === 10) {
142458
- ++pos;
142459
- }
142460
- case 10:
142461
- lineStart = pos;
142462
- ++curLine;
142463
- case 8232:
142464
- case 8233:
142465
- return res("");
142466
- case 56:
142467
- case 57:
142468
- if (inTemplate) {
142469
- return res(null);
142470
- } else {
142471
- errors.strictNumericEscape(pos - 1, lineStart, curLine);
142472
- }
142473
- default:
142474
- if (ch >= 48 && ch <= 55) {
142475
- const startPos = pos - 1;
142476
- const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
142477
- let octalStr = match[0];
142478
- let octal = parseInt(octalStr, 8);
142479
- if (octal > 255) {
142480
- octalStr = octalStr.slice(0, -1);
142481
- octal = parseInt(octalStr, 8);
142482
- }
142483
- pos += octalStr.length - 1;
142484
- const next = input.charCodeAt(pos);
142485
- if (octalStr !== "0" || next === 56 || next === 57) {
142486
- if (inTemplate) {
142487
- return res(null);
142488
- } else {
142489
- errors.strictNumericEscape(startPos, lineStart, curLine);
142490
- }
142491
- }
142492
- return res(String.fromCharCode(octal));
142493
- }
142494
- return res(String.fromCharCode(ch));
142495
- }
142496
- }
142497
- function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
142498
- const initialPos = pos;
142499
- let n;
142500
- ({
142501
- n,
142502
- pos
142503
- } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
142504
- if (n === null) {
142505
- if (throwOnInvalid) {
142506
- errors.invalidEscapeSequence(initialPos, lineStart, curLine);
142507
- } else {
142508
- pos = initialPos - 1;
142509
- }
142510
- }
142511
- return {
142512
- code: n,
142513
- pos
142514
- };
142515
- }
142516
- function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
142517
- const start = pos;
142518
- const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
142519
- const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
142520
- let invalid = false;
142521
- let total = 0;
142522
- for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
142523
- const code = input.charCodeAt(pos);
142524
- let val;
142525
- if (code === 95 && allowNumSeparator !== "bail") {
142526
- const prev = input.charCodeAt(pos - 1);
142527
- const next = input.charCodeAt(pos + 1);
142528
- if (!allowNumSeparator) {
142529
- if (bailOnError) return {
142530
- n: null,
142531
- pos
142532
- };
142533
- errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
142534
- } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
142535
- if (bailOnError) return {
142536
- n: null,
142537
- pos
142538
- };
142539
- errors.unexpectedNumericSeparator(pos, lineStart, curLine);
142540
- }
142541
- ++pos;
142542
- continue;
142543
- }
142544
- if (code >= 97) {
142545
- val = code - 97 + 10;
142546
- } else if (code >= 65) {
142547
- val = code - 65 + 10;
142548
- } else if (_isDigit(code)) {
142549
- val = code - 48;
142550
- } else {
142551
- val = Infinity;
142552
- }
142553
- if (val >= radix) {
142554
- if (val <= 9 && bailOnError) {
142555
- return {
142556
- n: null,
142557
- pos
142558
- };
142559
- } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
142560
- val = 0;
142561
- } else if (forceLen) {
142562
- val = 0;
142563
- invalid = true;
142564
- } else {
142565
- break;
142566
- }
142567
- }
142568
- ++pos;
142569
- total = total * radix + val;
142570
- }
142571
- if (pos === start || len != null && pos - start !== len || invalid) {
142572
- return {
142573
- n: null,
142574
- pos
142575
- };
142576
- }
142577
- return {
142578
- n: total,
142579
- pos
142580
- };
142581
- }
142582
- function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
142583
- const ch = input.charCodeAt(pos);
142584
- let code;
142585
- if (ch === 123) {
142586
- ++pos;
142587
- ({
142588
- code,
142589
- pos
142590
- } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
142591
- ++pos;
142592
- if (code !== null && code > 0x10ffff) {
142593
- if (throwOnInvalid) {
142594
- errors.invalidCodePoint(pos, lineStart, curLine);
142595
- } else {
142596
- return {
142597
- code: null,
142598
- pos
142599
- };
142600
- }
142601
- }
142602
- } else {
142603
- ({
142604
- code,
142605
- pos
142606
- } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
142607
- }
142608
- return {
142609
- code,
142610
- pos
142611
- };
142612
- }
142613
-
142614
-
142615
- return lib$3;
142326
+ Object.defineProperty(lib$3, "__esModule", {
142327
+ value: true
142328
+ });
142329
+ lib$3.readCodePoint = readCodePoint;
142330
+ lib$3.readInt = readInt;
142331
+ lib$3.readStringContents = readStringContents;
142332
+ var _isDigit = function isDigit(code) {
142333
+ return code >= 48 && code <= 57;
142334
+ };
142335
+ const forbiddenNumericSeparatorSiblings = {
142336
+ decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
142337
+ hex: new Set([46, 88, 95, 120])
142338
+ };
142339
+ const isAllowedNumericSeparatorSibling = {
142340
+ bin: ch => ch === 48 || ch === 49,
142341
+ oct: ch => ch >= 48 && ch <= 55,
142342
+ dec: ch => ch >= 48 && ch <= 57,
142343
+ hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
142344
+ };
142345
+ function readStringContents(type, input, pos, lineStart, curLine, errors) {
142346
+ const initialPos = pos;
142347
+ const initialLineStart = lineStart;
142348
+ const initialCurLine = curLine;
142349
+ let out = "";
142350
+ let firstInvalidLoc = null;
142351
+ let chunkStart = pos;
142352
+ const {
142353
+ length
142354
+ } = input;
142355
+ for (;;) {
142356
+ if (pos >= length) {
142357
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
142358
+ out += input.slice(chunkStart, pos);
142359
+ break;
142360
+ }
142361
+ const ch = input.charCodeAt(pos);
142362
+ if (isStringEnd(type, ch, input, pos)) {
142363
+ out += input.slice(chunkStart, pos);
142364
+ break;
142365
+ }
142366
+ if (ch === 92) {
142367
+ out += input.slice(chunkStart, pos);
142368
+ const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
142369
+ if (res.ch === null && !firstInvalidLoc) {
142370
+ firstInvalidLoc = {
142371
+ pos,
142372
+ lineStart,
142373
+ curLine
142374
+ };
142375
+ } else {
142376
+ out += res.ch;
142377
+ }
142378
+ ({
142379
+ pos,
142380
+ lineStart,
142381
+ curLine
142382
+ } = res);
142383
+ chunkStart = pos;
142384
+ } else if (ch === 8232 || ch === 8233) {
142385
+ ++pos;
142386
+ ++curLine;
142387
+ lineStart = pos;
142388
+ } else if (ch === 10 || ch === 13) {
142389
+ if (type === "template") {
142390
+ out += input.slice(chunkStart, pos) + "\n";
142391
+ ++pos;
142392
+ if (ch === 13 && input.charCodeAt(pos) === 10) {
142393
+ ++pos;
142394
+ }
142395
+ ++curLine;
142396
+ chunkStart = lineStart = pos;
142397
+ } else {
142398
+ errors.unterminated(initialPos, initialLineStart, initialCurLine);
142399
+ }
142400
+ } else {
142401
+ ++pos;
142402
+ }
142403
+ }
142404
+ return {
142405
+ pos,
142406
+ str: out,
142407
+ firstInvalidLoc,
142408
+ lineStart,
142409
+ curLine,
142410
+ containsInvalid: !!firstInvalidLoc
142411
+ };
142412
+ }
142413
+ function isStringEnd(type, ch, input, pos) {
142414
+ if (type === "template") {
142415
+ return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
142416
+ }
142417
+ return ch === (type === "double" ? 34 : 39);
142418
+ }
142419
+ function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
142420
+ const throwOnInvalid = !inTemplate;
142421
+ pos++;
142422
+ const res = ch => ({
142423
+ pos,
142424
+ ch,
142425
+ lineStart,
142426
+ curLine
142427
+ });
142428
+ const ch = input.charCodeAt(pos++);
142429
+ switch (ch) {
142430
+ case 110:
142431
+ return res("\n");
142432
+ case 114:
142433
+ return res("\r");
142434
+ case 120:
142435
+ {
142436
+ let code;
142437
+ ({
142438
+ code,
142439
+ pos
142440
+ } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
142441
+ return res(code === null ? null : String.fromCharCode(code));
142442
+ }
142443
+ case 117:
142444
+ {
142445
+ let code;
142446
+ ({
142447
+ code,
142448
+ pos
142449
+ } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
142450
+ return res(code === null ? null : String.fromCodePoint(code));
142451
+ }
142452
+ case 116:
142453
+ return res("\t");
142454
+ case 98:
142455
+ return res("\b");
142456
+ case 118:
142457
+ return res("\u000b");
142458
+ case 102:
142459
+ return res("\f");
142460
+ case 13:
142461
+ if (input.charCodeAt(pos) === 10) {
142462
+ ++pos;
142463
+ }
142464
+ case 10:
142465
+ lineStart = pos;
142466
+ ++curLine;
142467
+ case 8232:
142468
+ case 8233:
142469
+ return res("");
142470
+ case 56:
142471
+ case 57:
142472
+ if (inTemplate) {
142473
+ return res(null);
142474
+ } else {
142475
+ errors.strictNumericEscape(pos - 1, lineStart, curLine);
142476
+ }
142477
+ default:
142478
+ if (ch >= 48 && ch <= 55) {
142479
+ const startPos = pos - 1;
142480
+ const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
142481
+ let octalStr = match[0];
142482
+ let octal = parseInt(octalStr, 8);
142483
+ if (octal > 255) {
142484
+ octalStr = octalStr.slice(0, -1);
142485
+ octal = parseInt(octalStr, 8);
142486
+ }
142487
+ pos += octalStr.length - 1;
142488
+ const next = input.charCodeAt(pos);
142489
+ if (octalStr !== "0" || next === 56 || next === 57) {
142490
+ if (inTemplate) {
142491
+ return res(null);
142492
+ } else {
142493
+ errors.strictNumericEscape(startPos, lineStart, curLine);
142494
+ }
142495
+ }
142496
+ return res(String.fromCharCode(octal));
142497
+ }
142498
+ return res(String.fromCharCode(ch));
142499
+ }
142500
+ }
142501
+ function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
142502
+ const initialPos = pos;
142503
+ let n;
142504
+ ({
142505
+ n,
142506
+ pos
142507
+ } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
142508
+ if (n === null) {
142509
+ if (throwOnInvalid) {
142510
+ errors.invalidEscapeSequence(initialPos, lineStart, curLine);
142511
+ } else {
142512
+ pos = initialPos - 1;
142513
+ }
142514
+ }
142515
+ return {
142516
+ code: n,
142517
+ pos
142518
+ };
142519
+ }
142520
+ function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
142521
+ const start = pos;
142522
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
142523
+ const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
142524
+ let invalid = false;
142525
+ let total = 0;
142526
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
142527
+ const code = input.charCodeAt(pos);
142528
+ let val;
142529
+ if (code === 95 && allowNumSeparator !== "bail") {
142530
+ const prev = input.charCodeAt(pos - 1);
142531
+ const next = input.charCodeAt(pos + 1);
142532
+ if (!allowNumSeparator) {
142533
+ if (bailOnError) return {
142534
+ n: null,
142535
+ pos
142536
+ };
142537
+ errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
142538
+ } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
142539
+ if (bailOnError) return {
142540
+ n: null,
142541
+ pos
142542
+ };
142543
+ errors.unexpectedNumericSeparator(pos, lineStart, curLine);
142544
+ }
142545
+ ++pos;
142546
+ continue;
142547
+ }
142548
+ if (code >= 97) {
142549
+ val = code - 97 + 10;
142550
+ } else if (code >= 65) {
142551
+ val = code - 65 + 10;
142552
+ } else if (_isDigit(code)) {
142553
+ val = code - 48;
142554
+ } else {
142555
+ val = Infinity;
142556
+ }
142557
+ if (val >= radix) {
142558
+ if (val <= 9 && bailOnError) {
142559
+ return {
142560
+ n: null,
142561
+ pos
142562
+ };
142563
+ } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
142564
+ val = 0;
142565
+ } else if (forceLen) {
142566
+ val = 0;
142567
+ invalid = true;
142568
+ } else {
142569
+ break;
142570
+ }
142571
+ }
142572
+ ++pos;
142573
+ total = total * radix + val;
142574
+ }
142575
+ if (pos === start || len != null && pos - start !== len || invalid) {
142576
+ return {
142577
+ n: null,
142578
+ pos
142579
+ };
142580
+ }
142581
+ return {
142582
+ n: total,
142583
+ pos
142584
+ };
142585
+ }
142586
+ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
142587
+ const ch = input.charCodeAt(pos);
142588
+ let code;
142589
+ if (ch === 123) {
142590
+ ++pos;
142591
+ ({
142592
+ code,
142593
+ pos
142594
+ } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
142595
+ ++pos;
142596
+ if (code !== null && code > 0x10ffff) {
142597
+ if (throwOnInvalid) {
142598
+ errors.invalidCodePoint(pos, lineStart, curLine);
142599
+ } else {
142600
+ return {
142601
+ code: null,
142602
+ pos
142603
+ };
142604
+ }
142605
+ }
142606
+ } else {
142607
+ ({
142608
+ code,
142609
+ pos
142610
+ } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
142611
+ }
142612
+ return {
142613
+ code,
142614
+ pos
142615
+ };
142616
142616
  }
142617
142617
 
142618
142618
  var constants$1 = {};
@@ -142967,7 +142967,7 @@ function requireCore$1 () {
142967
142967
  var _is = requireIs$1();
142968
142968
  var _isValidIdentifier = isValidIdentifier$3;
142969
142969
  var _helperValidatorIdentifier = lib$4;
142970
- var _helperStringParser = requireLib$3();
142970
+ var _helperStringParser = lib$3;
142971
142971
  var _constants = constants$1;
142972
142972
  var _utils = requireUtils$1();
142973
142973
  const defineType = (0, _utils.defineAliasedType)("Standardized");
@@ -158811,7 +158811,7 @@ function initSemantics(semantics = {}) {
158811
158811
  const {round} = Math;
158812
158812
  const fullstore = fullstore$1;
158813
158813
  const isObject$3 = (a) => a && typeof a === 'object';
158814
- const babelTraverse$2 = requireLib$4().default;
158814
+ const babelTraverse$2 = requireLib$3().default;
158815
158815
  const expressions = expressions$1;
158816
158816
  const statements = statements$1;
158817
158817
  const literals = literals$1;
@@ -173614,7 +173614,7 @@ var getAst = (node) => {
173614
173614
  return ast;
173615
173615
  };
173616
173616
 
173617
- const traverse$b = requireLib$4().default;
173617
+ const traverse$b = requireLib$3().default;
173618
173618
  const {
173619
173619
  isObjectExpression,
173620
173620
  isExportDeclaration,