@putout/babel 5.2.6 → 5.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/index.js CHANGED
@@ -676,9 +676,6 @@ __export(lib_exports, {
676
676
  PROPERTY_TYPES: () => PROPERTY_TYPES,
677
677
  PUREISH_TYPES: () => PUREISH_TYPES,
678
678
  ParenthesizedExpression: () => ParenthesizedExpression,
679
- PipelineBareFunction: () => PipelineBareFunction,
680
- PipelinePrimaryTopicReference: () => PipelinePrimaryTopicReference,
681
- PipelineTopicExpression: () => PipelineTopicExpression,
682
679
  Placeholder: () => Placeholder,
683
680
  PrivateName: () => PrivateName,
684
681
  Program: () => Program,
@@ -992,9 +989,6 @@ __export(lib_exports, {
992
989
  assertParenthesizedExpression: () => assertParenthesizedExpression,
993
990
  assertPattern: () => assertPattern,
994
991
  assertPatternLike: () => assertPatternLike,
995
- assertPipelineBareFunction: () => assertPipelineBareFunction,
996
- assertPipelinePrimaryTopicReference: () => assertPipelinePrimaryTopicReference,
997
- assertPipelineTopicExpression: () => assertPipelineTopicExpression,
998
992
  assertPlaceholder: () => assertPlaceholder,
999
993
  assertPrivate: () => assertPrivate,
1000
994
  assertPrivateName: () => assertPrivateName,
@@ -1409,9 +1403,6 @@ __export(lib_exports, {
1409
1403
  isParenthesizedExpression: () => isParenthesizedExpression,
1410
1404
  isPattern: () => isPattern,
1411
1405
  isPatternLike: () => isPatternLike,
1412
- isPipelineBareFunction: () => isPipelineBareFunction,
1413
- isPipelinePrimaryTopicReference: () => isPipelinePrimaryTopicReference,
1414
- isPipelineTopicExpression: () => isPipelineTopicExpression,
1415
1406
  isPlaceholder: () => isPlaceholder,
1416
1407
  isPlaceholderType: () => isPlaceholderType,
1417
1408
  isPrivate: () => isPrivate,
@@ -1596,9 +1587,6 @@ __export(lib_exports, {
1596
1587
  optionalIndexedAccessType: () => optionalIndexedAccessType,
1597
1588
  optionalMemberExpression: () => optionalMemberExpression,
1598
1589
  parenthesizedExpression: () => parenthesizedExpression,
1599
- pipelineBareFunction: () => pipelineBareFunction,
1600
- pipelinePrimaryTopicReference: () => pipelinePrimaryTopicReference,
1601
- pipelineTopicExpression: () => pipelineTopicExpression,
1602
1590
  placeholder: () => placeholder,
1603
1591
  prependToMemberExpression: () => prependToMemberExpression,
1604
1592
  privateName: () => privateName,
@@ -4102,16 +4090,6 @@ function isClassProperty(node, opts) {
4102
4090
  return opts == null || shallowEqual(node, opts);
4103
4091
  }
4104
4092
 
4105
- function isClassAccessorProperty(node, opts) {
4106
- if (!node)
4107
- return false;
4108
-
4109
- if (node.type !== 'ClassAccessorProperty')
4110
- return false;
4111
-
4112
- return opts == null || shallowEqual(node, opts);
4113
- }
4114
-
4115
4093
  function isClassPrivateProperty(node, opts) {
4116
4094
  if (!node)
4117
4095
  return false;
@@ -5002,6 +4980,16 @@ function isBindExpression(node, opts) {
5002
4980
  return opts == null || shallowEqual(node, opts);
5003
4981
  }
5004
4982
 
4983
+ function isClassAccessorProperty(node, opts) {
4984
+ if (!node)
4985
+ return false;
4986
+
4987
+ if (node.type !== 'ClassAccessorProperty')
4988
+ return false;
4989
+
4990
+ return opts == null || shallowEqual(node, opts);
4991
+ }
4992
+
5005
4993
  function isDecorator(node, opts) {
5006
4994
  if (!node)
5007
4995
  return false;
@@ -5052,36 +5040,6 @@ function isTopicReference(node, opts) {
5052
5040
  return opts == null || shallowEqual(node, opts);
5053
5041
  }
5054
5042
 
5055
- function isPipelineTopicExpression(node, opts) {
5056
- if (!node)
5057
- return false;
5058
-
5059
- if (node.type !== 'PipelineTopicExpression')
5060
- return false;
5061
-
5062
- return opts == null || shallowEqual(node, opts);
5063
- }
5064
-
5065
- function isPipelineBareFunction(node, opts) {
5066
- if (!node)
5067
- return false;
5068
-
5069
- if (node.type !== 'PipelineBareFunction')
5070
- return false;
5071
-
5072
- return opts == null || shallowEqual(node, opts);
5073
- }
5074
-
5075
- function isPipelinePrimaryTopicReference(node, opts) {
5076
- if (!node)
5077
- return false;
5078
-
5079
- if (node.type !== 'PipelinePrimaryTopicReference')
5080
- return false;
5081
-
5082
- return opts == null || shallowEqual(node, opts);
5083
- }
5084
-
5085
5043
  function isVoidPattern(node, opts) {
5086
5044
  if (!node)
5087
5045
  return false;
@@ -5860,7 +5818,6 @@ function isStandardized(node, opts) {
5860
5818
  case 'OptionalMemberExpression':
5861
5819
  case 'OptionalCallExpression':
5862
5820
  case 'ClassProperty':
5863
- case 'ClassAccessorProperty':
5864
5821
  case 'ClassPrivateProperty':
5865
5822
  case 'ClassPrivateMethod':
5866
5823
  case 'PrivateName':
@@ -5935,9 +5892,6 @@ function isExpression(node, opts) {
5935
5892
  case 'DoExpression':
5936
5893
  case 'ModuleExpression':
5937
5894
  case 'TopicReference':
5938
- case 'PipelineTopicExpression':
5939
- case 'PipelineBareFunction':
5940
- case 'PipelinePrimaryTopicReference':
5941
5895
  case 'TSInstantiationExpression':
5942
5896
  case 'TSAsExpression':
5943
5897
  case 'TSSatisfiesExpression':
@@ -6629,8 +6583,8 @@ function isProperty(node, opts) {
6629
6583
  switch(node.type) {
6630
6584
  case 'ObjectProperty':
6631
6585
  case 'ClassProperty':
6632
- case 'ClassAccessorProperty':
6633
- case 'ClassPrivateProperty':
6586
+ case 'ClassPrivateProperty':
6587
+ case 'ClassAccessorProperty':
6634
6588
  break;
6635
6589
 
6636
6590
  default:
@@ -6756,22 +6710,6 @@ function isModuleSpecifier(node, opts) {
6756
6710
  return opts == null || shallowEqual(node, opts);
6757
6711
  }
6758
6712
 
6759
- function isAccessor(node, opts) {
6760
- if (!node)
6761
- return false;
6762
-
6763
- switch(node.type) {
6764
- case 'ClassAccessorProperty':
6765
- break;
6766
-
6767
- default:
6768
- return false;
6769
- }
6770
-
6771
-
6772
- return opts == null || shallowEqual(node, opts);
6773
- }
6774
-
6775
6713
  function isPrivate(node, opts) {
6776
6714
  if (!node)
6777
6715
  return false;
@@ -6885,6 +6823,22 @@ function isMiscellaneous(node, opts) {
6885
6823
  return opts == null || shallowEqual(node, opts);
6886
6824
  }
6887
6825
 
6826
+ function isAccessor(node, opts) {
6827
+ if (!node)
6828
+ return false;
6829
+
6830
+ switch(node.type) {
6831
+ case 'ClassAccessorProperty':
6832
+ break;
6833
+
6834
+ default:
6835
+ return false;
6836
+ }
6837
+
6838
+
6839
+ return opts == null || shallowEqual(node, opts);
6840
+ }
6841
+
6888
6842
  function isTypeScript(node, opts) {
6889
6843
  if (!node)
6890
6844
  return false;
@@ -9177,6 +9131,7 @@ defineType$4('ExportNamedDeclaration', {
9177
9131
  'declaration',
9178
9132
  'specifiers',
9179
9133
  'source',
9134
+ 'attributes',
9180
9135
  ],
9181
9136
  visitor: [
9182
9137
  'declaration',
@@ -9306,7 +9261,11 @@ defineType$4('ForOfStatement', {
9306
9261
  },
9307
9262
  });
9308
9263
  defineType$4('ImportDeclaration', {
9309
- builder: ['specifiers', 'source'],
9264
+ builder: [
9265
+ 'specifiers',
9266
+ 'source',
9267
+ 'attributes',
9268
+ ],
9310
9269
  visitor: [
9311
9270
  'specifiers',
9312
9271
  'source',
@@ -9792,66 +9751,6 @@ defineType$4('ClassProperty', {
9792
9751
  },
9793
9752
  },
9794
9753
  });
9795
- defineType$4('ClassAccessorProperty', {
9796
- visitor: [
9797
- 'decorators',
9798
- 'key',
9799
- 'typeAnnotation',
9800
- 'value',
9801
- ],
9802
- builder: [
9803
- 'key',
9804
- 'value',
9805
- 'typeAnnotation',
9806
- 'decorators',
9807
- 'computed',
9808
- 'static',
9809
- ],
9810
- aliases: ['Property', 'Accessor'],
9811
- ...classMethodOrPropertyUnionShapeCommon(true),
9812
- fields: {
9813
- ...classMethodOrPropertyCommon(),
9814
- key: {
9815
- validate: chain((function() {
9816
- const normal = assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName');
9817
- const computed = assertNodeType('Expression');
9818
-
9819
- return function(node, key, val) {
9820
- const validator = node.computed ? computed : normal;
9821
- validator(node, key, val);
9822
- };
9823
- })(), assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'Expression', 'PrivateName')),
9824
- },
9825
- value: {
9826
- validate: assertNodeType('Expression'),
9827
- optional: true,
9828
- },
9829
- definite: {
9830
- validate: assertValueType('boolean'),
9831
- optional: true,
9832
- },
9833
- typeAnnotation: {
9834
- validate: assertNodeType('TypeAnnotation', 'TSTypeAnnotation'),
9835
- optional: true,
9836
- },
9837
- decorators: {
9838
- validate: arrayOfType('Decorator'),
9839
- optional: true,
9840
- },
9841
- readonly: {
9842
- validate: assertValueType('boolean'),
9843
- optional: true,
9844
- },
9845
- declare: {
9846
- validate: assertValueType('boolean'),
9847
- optional: true,
9848
- },
9849
- variance: {
9850
- validate: assertNodeType('Variance'),
9851
- optional: true,
9852
- },
9853
- },
9854
- });
9855
9754
  defineType$4('ClassPrivateProperty', {
9856
9755
  visitor: [
9857
9756
  'decorators',
@@ -10845,6 +10744,66 @@ defineType$5('BindExpression', {
10845
10744
  },
10846
10745
  },
10847
10746
  });
10747
+ defineType$5('ClassAccessorProperty', {
10748
+ visitor: [
10749
+ 'decorators',
10750
+ 'key',
10751
+ 'typeAnnotation',
10752
+ 'value',
10753
+ ],
10754
+ builder: [
10755
+ 'key',
10756
+ 'value',
10757
+ 'typeAnnotation',
10758
+ 'decorators',
10759
+ 'computed',
10760
+ 'static',
10761
+ ],
10762
+ aliases: ['Property', 'Accessor'],
10763
+ ...classMethodOrPropertyUnionShapeCommon(true),
10764
+ fields: {
10765
+ ...classMethodOrPropertyCommon(),
10766
+ key: {
10767
+ validate: chain((function() {
10768
+ const normal = assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName');
10769
+ const computed = assertNodeType('Expression');
10770
+
10771
+ return function(node, key, val) {
10772
+ const validator = node.computed ? computed : normal;
10773
+ validator(node, key, val);
10774
+ };
10775
+ })(), assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'Expression', 'PrivateName')),
10776
+ },
10777
+ value: {
10778
+ validate: assertNodeType('Expression'),
10779
+ optional: true,
10780
+ },
10781
+ definite: {
10782
+ validate: assertValueType('boolean'),
10783
+ optional: true,
10784
+ },
10785
+ typeAnnotation: {
10786
+ validate: assertNodeType('TypeAnnotation', 'TSTypeAnnotation'),
10787
+ optional: true,
10788
+ },
10789
+ decorators: {
10790
+ validate: arrayOfType('Decorator'),
10791
+ optional: true,
10792
+ },
10793
+ readonly: {
10794
+ validate: assertValueType('boolean'),
10795
+ optional: true,
10796
+ },
10797
+ declare: {
10798
+ validate: assertValueType('boolean'),
10799
+ optional: true,
10800
+ },
10801
+ variance: {
10802
+ validate: assertNodeType('Variance'),
10803
+ optional: true,
10804
+ },
10805
+ },
10806
+ });
10848
10807
  defineType$5('Decorator', {
10849
10808
  visitor: ['expression'],
10850
10809
  fields: {
@@ -10888,29 +10847,6 @@ defineType$5('ModuleExpression', {
10888
10847
  defineType$5('TopicReference', {
10889
10848
  aliases: ['Expression'],
10890
10849
  });
10891
- defineType$5('PipelineTopicExpression', {
10892
- builder: ['expression'],
10893
- visitor: ['expression'],
10894
- fields: {
10895
- expression: {
10896
- validate: assertNodeType('Expression'),
10897
- },
10898
- },
10899
- aliases: ['Expression'],
10900
- });
10901
- defineType$5('PipelineBareFunction', {
10902
- builder: ['callee'],
10903
- visitor: ['callee'],
10904
- fields: {
10905
- callee: {
10906
- validate: assertNodeType('Expression'),
10907
- },
10908
- },
10909
- aliases: ['Expression'],
10910
- });
10911
- defineType$5('PipelinePrimaryTopicReference', {
10912
- aliases: ['Expression'],
10913
- });
10914
10850
  defineType$5('VoidPattern', {
10915
10851
  aliases: [
10916
10852
  'Pattern',
@@ -12437,18 +12373,20 @@ function exportDefaultDeclaration(declaration) {
12437
12373
  return node;
12438
12374
  }
12439
12375
 
12440
- function exportNamedDeclaration(declaration = null, specifiers = [], source = null) {
12376
+ function exportNamedDeclaration(declaration = null, specifiers = [], source = null, attributes = null) {
12441
12377
  const node = {
12442
12378
  type: 'ExportNamedDeclaration',
12443
12379
  declaration,
12444
12380
  specifiers,
12445
12381
  source,
12382
+ attributes,
12446
12383
  };
12447
12384
 
12448
12385
  const defs = NODE_FIELDS.ExportNamedDeclaration;
12449
12386
  validate(defs.declaration, node, 'declaration', declaration, 1);
12450
12387
  validate(defs.specifiers, node, 'specifiers', specifiers, 1);
12451
12388
  validate(defs.source, node, 'source', source, 1);
12389
+ validate(defs.attributes, node, 'attributes', attributes, 1);
12452
12390
  return node;
12453
12391
  }
12454
12392
 
@@ -12482,16 +12420,18 @@ function forOfStatement(left, right, body, _await = false) {
12482
12420
  return node;
12483
12421
  }
12484
12422
 
12485
- function importDeclaration(specifiers, source) {
12423
+ function importDeclaration(specifiers, source, attributes = null) {
12486
12424
  const node = {
12487
12425
  type: 'ImportDeclaration',
12488
12426
  specifiers,
12489
12427
  source,
12428
+ attributes,
12490
12429
  };
12491
12430
 
12492
12431
  const defs = NODE_FIELDS.ImportDeclaration;
12493
12432
  validate(defs.specifiers, node, 'specifiers', specifiers, 1);
12494
12433
  validate(defs.source, node, 'source', source, 1);
12434
+ validate(defs.attributes, node, 'attributes', attributes, 1);
12495
12435
  return node;
12496
12436
  }
12497
12437
 
@@ -12753,27 +12693,6 @@ function classProperty(key, value = null, typeAnnotation2 = null, decorators = n
12753
12693
  return node;
12754
12694
  }
12755
12695
 
12756
- function classAccessorProperty(key, value = null, typeAnnotation2 = null, decorators = null, computed = false, _static = false) {
12757
- const node = {
12758
- type: 'ClassAccessorProperty',
12759
- key,
12760
- value,
12761
- typeAnnotation: typeAnnotation2,
12762
- decorators,
12763
- computed,
12764
- static: _static,
12765
- };
12766
-
12767
- const defs = NODE_FIELDS.ClassAccessorProperty;
12768
- validate(defs.key, node, 'key', key, 1);
12769
- validate(defs.value, node, 'value', value, 1);
12770
- validate(defs.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
12771
- validate(defs.decorators, node, 'decorators', decorators, 1);
12772
- validate(defs.computed, node, 'computed', computed);
12773
- validate(defs.static, node, 'static', _static);
12774
- return node;
12775
- }
12776
-
12777
12696
  function classPrivateProperty(key, value = null, decorators = null, _static = false) {
12778
12697
  const node = {
12779
12698
  type: 'ClassPrivateProperty',
@@ -13841,6 +13760,27 @@ function bindExpression(object, callee) {
13841
13760
  return node;
13842
13761
  }
13843
13762
 
13763
+ function classAccessorProperty(key, value = null, typeAnnotation2 = null, decorators = null, computed = false, _static = false) {
13764
+ const node = {
13765
+ type: 'ClassAccessorProperty',
13766
+ key,
13767
+ value,
13768
+ typeAnnotation: typeAnnotation2,
13769
+ decorators,
13770
+ computed,
13771
+ static: _static,
13772
+ };
13773
+
13774
+ const defs = NODE_FIELDS.ClassAccessorProperty;
13775
+ validate(defs.key, node, 'key', key, 1);
13776
+ validate(defs.value, node, 'value', value, 1);
13777
+ validate(defs.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
13778
+ validate(defs.decorators, node, 'decorators', decorators, 1);
13779
+ validate(defs.computed, node, 'computed', computed);
13780
+ validate(defs.static, node, 'static', _static);
13781
+ return node;
13782
+ }
13783
+
13844
13784
  function decorator(expression2) {
13845
13785
  const node = {
13846
13786
  type: 'Decorator',
@@ -13893,34 +13833,6 @@ function topicReference() {
13893
13833
  };
13894
13834
  }
13895
13835
 
13896
- function pipelineTopicExpression(expression2) {
13897
- const node = {
13898
- type: 'PipelineTopicExpression',
13899
- expression: expression2,
13900
- };
13901
-
13902
- const defs = NODE_FIELDS.PipelineTopicExpression;
13903
- validate(defs.expression, node, 'expression', expression2, 1);
13904
- return node;
13905
- }
13906
-
13907
- function pipelineBareFunction(callee) {
13908
- const node = {
13909
- type: 'PipelineBareFunction',
13910
- callee,
13911
- };
13912
-
13913
- const defs = NODE_FIELDS.PipelineBareFunction;
13914
- validate(defs.callee, node, 'callee', callee, 1);
13915
- return node;
13916
- }
13917
-
13918
- function pipelinePrimaryTopicReference() {
13919
- return {
13920
- type: 'PipelinePrimaryTopicReference',
13921
- };
13922
- }
13923
-
13924
13836
  function voidPattern() {
13925
13837
  return {
13926
13838
  type: 'VoidPattern',
@@ -14883,9 +14795,6 @@ var b = /* @__PURE__ */Object.freeze({
14883
14795
  optionalIndexedAccessType,
14884
14796
  optionalMemberExpression,
14885
14797
  parenthesizedExpression,
14886
- pipelineBareFunction,
14887
- pipelinePrimaryTopicReference,
14888
- pipelineTopicExpression,
14889
14798
  placeholder,
14890
14799
  privateName,
14891
14800
  program,
@@ -15094,7 +15003,6 @@ var ExportNamespaceSpecifier = alias('exportNamespaceSpecifier');
15094
15003
  var OptionalMemberExpression = alias('optionalMemberExpression');
15095
15004
  var OptionalCallExpression = alias('optionalCallExpression');
15096
15005
  var ClassProperty = alias('classProperty');
15097
- var ClassAccessorProperty = alias('classAccessorProperty');
15098
15006
  var ClassPrivateProperty = alias('classPrivateProperty');
15099
15007
  var ClassPrivateMethod = alias('classPrivateMethod');
15100
15008
  var PrivateName = alias('privateName');
@@ -15184,14 +15092,12 @@ var Placeholder = alias('placeholder');
15184
15092
  var V8IntrinsicIdentifier = alias('v8IntrinsicIdentifier');
15185
15093
  var ArgumentPlaceholder = alias('argumentPlaceholder');
15186
15094
  var BindExpression = alias('bindExpression');
15095
+ var ClassAccessorProperty = alias('classAccessorProperty');
15187
15096
  var Decorator = alias('decorator');
15188
15097
  var DoExpression = alias('doExpression');
15189
15098
  var ExportDefaultSpecifier = alias('exportDefaultSpecifier');
15190
15099
  var ModuleExpression = alias('moduleExpression');
15191
15100
  var TopicReference = alias('topicReference');
15192
- var PipelineTopicExpression = alias('pipelineTopicExpression');
15193
- var PipelineBareFunction = alias('pipelineBareFunction');
15194
- var PipelinePrimaryTopicReference = alias('pipelinePrimaryTopicReference');
15195
15101
  var VoidPattern = alias('voidPattern');
15196
15102
  var TSParameterProperty = alias('tsParameterProperty');
15197
15103
  var TSDeclareFunction = alias('tsDeclareFunction');
@@ -15674,10 +15580,6 @@ function assertClassProperty(node, opts) {
15674
15580
  assert('ClassProperty', node, opts);
15675
15581
  }
15676
15582
 
15677
- function assertClassAccessorProperty(node, opts) {
15678
- assert('ClassAccessorProperty', node, opts);
15679
- }
15680
-
15681
15583
  function assertClassPrivateProperty(node, opts) {
15682
15584
  assert('ClassPrivateProperty', node, opts);
15683
15585
  }
@@ -16034,6 +15936,10 @@ function assertBindExpression(node, opts) {
16034
15936
  assert('BindExpression', node, opts);
16035
15937
  }
16036
15938
 
15939
+ function assertClassAccessorProperty(node, opts) {
15940
+ assert('ClassAccessorProperty', node, opts);
15941
+ }
15942
+
16037
15943
  function assertDecorator(node, opts) {
16038
15944
  assert('Decorator', node, opts);
16039
15945
  }
@@ -16054,18 +15960,6 @@ function assertTopicReference(node, opts) {
16054
15960
  assert('TopicReference', node, opts);
16055
15961
  }
16056
15962
 
16057
- function assertPipelineTopicExpression(node, opts) {
16058
- assert('PipelineTopicExpression', node, opts);
16059
- }
16060
-
16061
- function assertPipelineBareFunction(node, opts) {
16062
- assert('PipelineBareFunction', node, opts);
16063
- }
16064
-
16065
- function assertPipelinePrimaryTopicReference(node, opts) {
16066
- assert('PipelinePrimaryTopicReference', node, opts);
16067
- }
16068
-
16069
15963
  function assertVoidPattern(node, opts) {
16070
15964
  assert('VoidPattern', node, opts);
16071
15965
  }
@@ -16482,10 +16376,6 @@ function assertModuleSpecifier(node, opts) {
16482
16376
  assert('ModuleSpecifier', node, opts);
16483
16377
  }
16484
16378
 
16485
- function assertAccessor(node, opts) {
16486
- assert('Accessor', node, opts);
16487
- }
16488
-
16489
16379
  function assertPrivate(node, opts) {
16490
16380
  assert('Private', node, opts);
16491
16381
  }
@@ -16526,6 +16416,10 @@ function assertMiscellaneous(node, opts) {
16526
16416
  assert('Miscellaneous', node, opts);
16527
16417
  }
16528
16418
 
16419
+ function assertAccessor(node, opts) {
16420
+ assert('Accessor', node, opts);
16421
+ }
16422
+
16529
16423
  function assertTypeScript(node, opts) {
16530
16424
  assert('TypeScript', node, opts);
16531
16425
  }
@@ -17007,7 +16901,6 @@ var CLASS_TYPES = FLIPPED_ALIAS_KEYS['Class'];
17007
16901
  var IMPORTOREXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS['ImportOrExportDeclaration'];
17008
16902
  var EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS['ExportDeclaration'];
17009
16903
  var MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS['ModuleSpecifier'];
17010
- var ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS['Accessor'];
17011
16904
  var PRIVATE_TYPES = FLIPPED_ALIAS_KEYS['Private'];
17012
16905
  var FLOW_TYPES = FLIPPED_ALIAS_KEYS['Flow'];
17013
16906
  var FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS['FlowType'];
@@ -17018,6 +16911,7 @@ var ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS['EnumBody'];
17018
16911
  var ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS['EnumMember'];
17019
16912
  var JSX_TYPES = FLIPPED_ALIAS_KEYS['JSX'];
17020
16913
  var MISCELLANEOUS_TYPES = FLIPPED_ALIAS_KEYS['Miscellaneous'];
16914
+ var ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS['Accessor'];
17021
16915
  var TYPESCRIPT_TYPES = FLIPPED_ALIAS_KEYS['TypeScript'];
17022
16916
  var TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS['TSTypeElement'];
17023
16917
  var TSTYPE_TYPES = FLIPPED_ALIAS_KEYS['TSType'];
@@ -21104,7 +20998,7 @@ function isWhitespace(code2) {
21104
20998
  }
21105
20999
  }
21106
21000
 
21107
- var JsxErrors = ParseErrorEnum`jsx`({
21001
+ var JsxErrorTemplates = {
21108
21002
  AttributeIsEmpty: 'JSX attributes must only be assigned a non-empty expression.',
21109
21003
  MissingClosingTagElement: ({openingTagName}) => `Expected corresponding JSX closing tag for <${openingTagName}>.`,
21110
21004
  MissingClosingTagFragment: 'Expected corresponding JSX closing tag for <>.',
@@ -21113,7 +21007,9 @@ var JsxErrors = ParseErrorEnum`jsx`({
21113
21007
  UnsupportedJsxValue: 'JSX value should be either an expression or a quoted JSX text.',
21114
21008
  UnterminatedJsxContent: 'Unterminated JSX contents.',
21115
21009
  UnwrappedAdjacentJSXElements: 'Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?',
21116
- });
21010
+ };
21011
+
21012
+ var JsxErrors = ParseErrorEnum`jsx`(JsxErrorTemplates);
21117
21013
 
21118
21014
  function isFragment(object) {
21119
21015
  return object ? object.type === 'JSXOpeningFragment' || object.type === 'JSXClosingFragment' : false;
@@ -25044,7 +24940,7 @@ function assert2(x) {
25044
24940
  }
25045
24941
  }
25046
24942
 
25047
- var TSErrors = ParseErrorEnum`typescript`({
24943
+ var TSErrorTemplates = {
25048
24944
  AbstractMethodHasImplementation: ({methodName}) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`,
25049
24945
  AbstractPropertyHasInitializer: ({propertyName}) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,
25050
24946
  AccessorCannotBeOptional: 'An \'accessor\' property cannot be declared optional.',
@@ -25110,7 +25006,9 @@ var TSErrors = ParseErrorEnum`typescript`({
25110
25006
  UnsupportedParameterPropertyKind: 'A parameter property may not be declared using a binding pattern.',
25111
25007
  UnsupportedSignatureParameterKind: ({type}) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`,
25112
25008
  UsingDeclarationInAmbientContext: (kind) => `'${kind}' declarations are not allowed in ambient contexts.`,
25113
- });
25009
+ };
25010
+
25011
+ var TSErrors = ParseErrorEnum`typescript`(TSErrorTemplates);
25114
25012
 
25115
25013
  function keywordTypeFromName(value) {
25116
25014
  switch(value) {
@@ -27855,12 +27753,12 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
27855
27753
  }
27856
27754
  }
27857
27755
 
27858
- parseAsyncArrowFromCallExpression(node, call2) {
27756
+ parseAsyncArrowFromCallExpression(node, call) {
27859
27757
  if (this.match(10)) {
27860
27758
  node.returnType = this.tsParseTypeAnnotation();
27861
27759
  }
27862
27760
 
27863
- return super.parseAsyncArrowFromCallExpression(node, call2);
27761
+ return super.parseAsyncArrowFromCallExpression(node, call);
27864
27762
  }
27865
27763
 
27866
27764
  parseMaybeAssign(refExpressionErrors, afterLeftParse) {
@@ -28118,10 +28016,10 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
28118
28016
  const typeArguments = this.tsParseTypeArgumentsInExpression();
28119
28017
 
28120
28018
  if (this.match(6)) {
28121
- const call2 = super.parseMaybeDecoratorArguments(expr, startLoc);
28019
+ const call = super.parseMaybeDecoratorArguments(expr, startLoc);
28122
28020
 
28123
- call2.typeArguments = typeArguments;
28124
- return call2;
28021
+ call.typeArguments = typeArguments;
28022
+ return call;
28125
28023
  }
28126
28024
 
28127
28025
  this.unexpected(null, 6);
@@ -28681,10 +28579,12 @@ function isUncomputedMemberExpressionChain(expression2) {
28681
28579
  return isUncomputedMemberExpressionChain(expression2.object);
28682
28580
  }
28683
28581
 
28684
- var PlaceholderErrors = ParseErrorEnum`placeholders`({
28582
+ var PlaceholderErrorTemplates = {
28685
28583
  ClassNameIsRequired: 'A class name is required.',
28686
28584
  UnexpectedSpace: 'Unexpected space in placeholder.',
28687
- });
28585
+ };
28586
+
28587
+ var PlaceholderErrors = ParseErrorEnum`placeholders`(PlaceholderErrorTemplates);
28688
28588
 
28689
28589
  var placeholders = (superClass) => class PlaceholdersParserMixin extends superClass {
28690
28590
  parsePlaceholder(expectedNode) {
@@ -29742,17 +29642,17 @@ var ExpressionParser = class extends LValParser {
29742
29642
  return this.match(15) && !this.canInsertSemicolon();
29743
29643
  }
29744
29644
 
29745
- parseAsyncArrowFromCallExpression(node, call2) {
29746
- this.resetPreviousNodeTrailingComments(call2);
29645
+ parseAsyncArrowFromCallExpression(node, call) {
29646
+ this.resetPreviousNodeTrailingComments(call);
29747
29647
  this.expect(15);
29748
- this.parseArrowExpression(node, call2.arguments, true, call2.extra?.trailingCommaLoc);
29648
+ this.parseArrowExpression(node, call.arguments, true, call.extra?.trailingCommaLoc);
29749
29649
 
29750
- if (call2.innerComments) {
29751
- setInnerComments(node, call2.innerComments);
29650
+ if (call.innerComments) {
29651
+ setInnerComments(node, call.innerComments);
29752
29652
  }
29753
29653
 
29754
- if (call2.callee.trailingComments) {
29755
- setInnerComments(node, call2.callee.trailingComments);
29654
+ if (call.callee.trailingComments) {
29655
+ setInnerComments(node, call.callee.trailingComments);
29756
29656
  }
29757
29657
 
29758
29658
  return node;
@@ -33449,7 +33349,7 @@ var Parser = class extends StatementParser {
33449
33349
  const program3 = this.startNode();
33450
33350
 
33451
33351
  this.nextToken();
33452
- file2.errors = null;
33352
+ file2.errors = [];
33453
33353
  const result = this.parseTopLevel(file2, program3);
33454
33354
 
33455
33355
  result.errors = this.state.errors;
@@ -34261,7 +34161,7 @@ function highlight(text) {
34261
34161
 
34262
34162
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
34263
34163
 
34264
- function getMarkerLines(loc, source, opts) {
34164
+ function getMarkerLines(loc, source, opts, startLineBaseZero) {
34265
34165
  const startLoc = {
34266
34166
  column: 0,
34267
34167
  line: -1,
@@ -34275,9 +34175,9 @@ function getMarkerLines(loc, source, opts) {
34275
34175
 
34276
34176
  const {linesAbove = 2, linesBelow = 3} = opts || {};
34277
34177
 
34278
- const startLine = startLoc.line;
34178
+ const startLine = startLoc.line - startLineBaseZero;
34279
34179
  const startColumn = startLoc.column;
34280
- const endLine = endLoc.line;
34180
+ const endLine = endLoc.line - startLineBaseZero;
34281
34181
  const endColumn = endLoc.column;
34282
34182
  let start = Math.max(startLine - (linesAbove + 1), 0);
34283
34183
  let end = Math.min(source.length, endLine + linesBelow);
@@ -34337,6 +34237,7 @@ function getMarkerLines(loc, source, opts) {
34337
34237
 
34338
34238
  function codeFrameColumns(rawLines, loc, opts = {}) {
34339
34239
  const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
34240
+ const startLineBaseZero = (opts.startLine || 1) - 1;
34340
34241
  const defs = getDefs(shouldHighlight);
34341
34242
  const lines = rawLines.split(NEWLINE);
34342
34243
 
@@ -34344,10 +34245,10 @@ function codeFrameColumns(rawLines, loc, opts = {}) {
34344
34245
  start,
34345
34246
  end,
34346
34247
  markerLines,
34347
- } = getMarkerLines(loc, lines, opts);
34248
+ } = getMarkerLines(loc, lines, opts, startLineBaseZero);
34348
34249
 
34349
34250
  const hasColumns = loc.start && typeof loc.start.column === 'number';
34350
- const numberMaxWidth = String(end).length;
34251
+ const numberMaxWidth = String(end + startLineBaseZero).length;
34351
34252
  const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
34352
34253
 
34353
34254
  let frame = highlightedLines
@@ -34355,7 +34256,7 @@ function codeFrameColumns(rawLines, loc, opts = {}) {
34355
34256
  .slice(start, end)
34356
34257
  .map((line, index3) => {
34357
34258
  const number = start + 1 + index3;
34358
- const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
34259
+ const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);
34359
34260
  const gutter = ` ${paddedNumber} |`;
34360
34261
  const hasMarker = markerLines[number];
34361
34262
  const lastMarkerLine = !markerLines[number + 1];
@@ -35015,28 +34916,18 @@ function createTemplateBuilder(formatter, defaultOpts) {
35015
34916
  }
35016
34917
 
35017
34918
  function extendedTrace(fn) {
35018
- let rootStack = '';
34919
+ const rootErr = new Error();
35019
34920
 
35020
- try {
35021
- throw new Error();
35022
- } catch(error) {
35023
- if (error.stack) {
35024
- rootStack = error.stack
35025
- .split('\n')
35026
- .slice(3)
35027
- .join('\n');
35028
- }
35029
- }
35030
-
35031
-
35032
-
35033
34921
  return (arg) => {
35034
34922
  try {
35035
34923
  return fn(arg);
35036
34924
  } catch(err) {
35037
34925
  err.stack += `
35038
34926
  =============
35039
- ${rootStack}`;
34927
+ ${rootErr.stack
34928
+ .split('\n')
34929
+ .slice(3)
34930
+ .join('\n')}`;
35040
34931
  throw err;
35041
34932
  }
35042
34933
  };
@@ -36492,7 +36383,7 @@ var PRECEDENCE = /* @__PURE__ */new Map([
36492
36383
  ]);
36493
36384
 
36494
36385
  function isTSTypeExpression(nodeId) {
36495
- return nodeId === 156 || nodeId === 201 || nodeId === 209;
36386
+ return nodeId === 153 || nodeId === 198 || nodeId === 206;
36496
36387
  }
36497
36388
 
36498
36389
  var isClassExtendsClause = (node, parent, parentId) => {
@@ -36510,10 +36401,10 @@ var hasPostfixPart = (node, parent, parentId) => {
36510
36401
  case 112:
36511
36402
  return parent.callee === node;
36512
36403
 
36513
- case 222:
36404
+ case 219:
36514
36405
  return parent.tag === node;
36515
36406
 
36516
- case 191:
36407
+ case 188:
36517
36408
  return true;
36518
36409
  }
36519
36410
 
@@ -36525,7 +36416,7 @@ function NullableTypeAnnotation$1(node, parent, parentId) {
36525
36416
  }
36526
36417
 
36527
36418
  function FunctionTypeAnnotation$1(node, parent, parentId, tokenContext) {
36528
- return parentId === 239
36419
+ return parentId === 236
36529
36420
  || parentId === 90
36530
36421
  || parentId === 4
36531
36422
  || (tokenContext & 8) > 0;
@@ -36552,7 +36443,7 @@ function BinaryLike(node, parent, parentId, nodeType) {
36552
36443
  return true;
36553
36444
  }
36554
36445
 
36555
- if (hasPostfixPart(node, parent, parentId) || parentId === 238 || parentId === 145 || parentId === 8) {
36446
+ if (hasPostfixPart(node, parent, parentId) || parentId === 235 || parentId === 142 || parentId === 8) {
36556
36447
  return true;
36557
36448
  }
36558
36449
 
@@ -36564,8 +36455,8 @@ function BinaryLike(node, parent, parentId, nodeType) {
36564
36455
  parentPos = PRECEDENCE.get(parent.operator);
36565
36456
  break;
36566
36457
 
36567
- case 156:
36568
- case 201:
36458
+ case 153:
36459
+ case 198:
36569
36460
  parentPos = 7;
36570
36461
  }
36571
36462
 
@@ -36592,7 +36483,7 @@ function UnionTypeAnnotation$1(node, parent, parentId) {
36592
36483
  case 4:
36593
36484
  case 115:
36594
36485
  case 90:
36595
- case 239:
36486
+ case 236:
36596
36487
  return true;
36597
36488
  }
36598
36489
 
@@ -36617,18 +36508,18 @@ function TSAsExpression$1(node, parent, parentId) {
36617
36508
 
36618
36509
  function TSConditionalType$1(node, parent, parentId) {
36619
36510
  switch(parentId) {
36620
- case 155:
36621
- case 195:
36622
- case 211:
36623
- case 212:
36624
- case 181:
36625
- case 219:
36511
+ case 152:
36512
+ case 192:
36513
+ case 208:
36514
+ case 209:
36515
+ case 178:
36516
+ case 216:
36626
36517
  return true;
36627
36518
 
36628
- case 175:
36519
+ case 172:
36629
36520
  return parent.objectType === node;
36630
36521
 
36631
- case 161:
36522
+ case 158:
36632
36523
  return parent.checkType === node || parent.extendsType === node;
36633
36524
  }
36634
36525
 
@@ -36637,13 +36528,13 @@ function TSConditionalType$1(node, parent, parentId) {
36637
36528
 
36638
36529
  function TSUnionType$1(node, parent, parentId) {
36639
36530
  switch(parentId) {
36640
- case 181:
36641
- case 211:
36642
- case 155:
36643
- case 195:
36531
+ case 178:
36532
+ case 208:
36533
+ case 152:
36534
+ case 192:
36644
36535
  return true;
36645
36536
 
36646
- case 175:
36537
+ case 172:
36647
36538
  return parent.objectType === node;
36648
36539
  }
36649
36540
 
@@ -36651,7 +36542,7 @@ function TSUnionType$1(node, parent, parentId) {
36651
36542
  }
36652
36543
 
36653
36544
  function TSIntersectionType$1(node, parent, parentId) {
36654
- return parentId === 211 || TSTypeOperator$1(node, parent, parentId);
36545
+ return parentId === 208 || TSTypeOperator$1(node, parent, parentId);
36655
36546
  }
36656
36547
 
36657
36548
  function TSInferType$1(node, parent, parentId) {
@@ -36659,7 +36550,7 @@ function TSInferType$1(node, parent, parentId) {
36659
36550
  return true;
36660
36551
  }
36661
36552
 
36662
- if ((parentId === 181 || parentId === 219) && node.typeParameter.constraint != null) {
36553
+ if ((parentId === 178 || parentId === 216) && node.typeParameter.constraint != null) {
36663
36554
  return true;
36664
36555
  }
36665
36556
 
@@ -36668,11 +36559,11 @@ function TSInferType$1(node, parent, parentId) {
36668
36559
 
36669
36560
  function TSTypeOperator$1(node, parent, parentId) {
36670
36561
  switch(parentId) {
36671
- case 155:
36672
- case 195:
36562
+ case 152:
36563
+ case 192:
36673
36564
  return true;
36674
36565
 
36675
- case 175:
36566
+ case 172:
36676
36567
  if (parent.objectType === node) {
36677
36568
  return true;
36678
36569
  }
@@ -36686,7 +36577,7 @@ function TSInstantiationExpression$1(node, parent, parentId) {
36686
36577
  case 17:
36687
36578
  case 130:
36688
36579
  case 112:
36689
- case 177:
36580
+ case 174:
36690
36581
  return parent.typeArguments != null;
36691
36582
  }
36692
36583
 
@@ -36697,8 +36588,8 @@ function TSFunctionType$1(node, parent, parentId) {
36697
36588
  if (TSUnionType$1(node, parent, parentId))
36698
36589
  return true;
36699
36590
 
36700
- return parentId === 219
36701
- || parentId === 161
36591
+ return parentId === 216
36592
+ || parentId === 158
36702
36593
  && (parent.checkType === node
36703
36594
  || parent.extendsType === node);
36704
36595
  }
@@ -36715,7 +36606,7 @@ function LogicalExpression2(node, parent, parentId) {
36715
36606
  }
36716
36607
 
36717
36608
  function SequenceExpression$1(node, parent, parentId) {
36718
- if (parentId === 144 || parentId === 133 || parentId === 108 && parent.property === node || parentId === 132 && parent.property === node || parentId === 224) {
36609
+ if (parentId === 141 || parentId === 133 || parentId === 108 && parent.property === node || parentId === 132 && parent.property === node || parentId === 221) {
36719
36610
  return false;
36720
36611
  }
36721
36612
 
@@ -36737,8 +36628,8 @@ function SequenceExpression$1(node, parent, parentId) {
36737
36628
  function YieldExpression$1(node, parent, parentId) {
36738
36629
  return parentId === 10
36739
36630
  || parentId === 107
36740
- || parentId === 238
36741
- || parentId === 145
36631
+ || parentId === 235
36632
+ || parentId === 142
36742
36633
  || hasPostfixPart(node, parent, parentId)
36743
36634
  || parentId === 8
36744
36635
  && isYieldExpression2(node)
@@ -36766,8 +36657,8 @@ function FunctionExpression$1(node, parent, parentId, tokenContext) {
36766
36657
 
36767
36658
  function ConditionalExpression$1(node, parent, parentId) {
36768
36659
  switch(parentId) {
36769
- case 238:
36770
- case 145:
36660
+ case 235:
36661
+ case 142:
36771
36662
  case 10:
36772
36663
  case 107:
36773
36664
  case 8:
@@ -39022,18 +38913,6 @@ function TopicReference2() {
39022
38913
  }
39023
38914
  }
39024
38915
 
39025
- function PipelineTopicExpression2(node) {
39026
- this.print(node.expression);
39027
- }
39028
-
39029
- function PipelineBareFunction2(node) {
39030
- this.print(node.callee);
39031
- }
39032
-
39033
- function PipelinePrimaryTopicReference2() {
39034
- this.tokenChar(35);
39035
- }
39036
-
39037
38916
  function VoidPattern2() {
39038
38917
  this.word('void');
39039
38918
  }
@@ -40305,9 +40184,6 @@ var generatorFunctions = /* @__PURE__ */Object.freeze({
40305
40184
  OptionalIndexedAccessType: OptionalIndexedAccessType2,
40306
40185
  OptionalMemberExpression: OptionalMemberExpression2,
40307
40186
  ParenthesizedExpression: ParenthesizedExpression2,
40308
- PipelineBareFunction: PipelineBareFunction2,
40309
- PipelinePrimaryTopicReference: PipelinePrimaryTopicReference2,
40310
- PipelineTopicExpression: PipelineTopicExpression2,
40311
40187
  Placeholder: Placeholder2,
40312
40188
  PrivateName: PrivateName2,
40313
40189
  Program: Program2,
@@ -41295,9 +41171,9 @@ var Printer = class {
41295
41171
  if (!shouldPrintParens && parenthesized && node.leadingComments?.length && node.leadingComments[0].type === 'CommentBlock') {
41296
41172
  switch(parentId) {
41297
41173
  case 65:
41298
- case 243:
41174
+ case 240:
41299
41175
  case 6:
41300
- case 143:
41176
+ case 140:
41301
41177
  break;
41302
41178
 
41303
41179
  case 17:
@@ -41355,7 +41231,7 @@ var Printer = class {
41355
41231
  }
41356
41232
 
41357
41233
  this._printLeadingComments(node, parent);
41358
- this.exactSource(nodeId === 139 || nodeId === 66 ? null : loc, printMethod.bind(this, node, parent));
41234
+ this.exactSource(nodeId === 136 || nodeId === 66 ? null : loc, printMethod.bind(this, node, parent));
41359
41235
 
41360
41236
  if (shouldPrintParens) {
41361
41237
  this._printTrailingComments(node, parent);
@@ -42174,6 +42050,180 @@ var virtualTypes = /* @__PURE__ */Object.freeze({
42174
42050
  Var,
42175
42051
  });
42176
42052
 
42053
+ var TraversalContext = class {
42054
+ constructor(opts, state) {
42055
+ this.state = state;
42056
+ this.opts = opts;
42057
+ }
42058
+
42059
+ queue = null;
42060
+ priorityQueue = null;
42061
+ maybeQueue(path, notPriority) {
42062
+ if (this.queue) {
42063
+ if (notPriority) {
42064
+ this.queue.push(path);
42065
+ } else {
42066
+ this.priorityQueue.push(path);
42067
+ }
42068
+ }
42069
+ }
42070
+ };
42071
+
42072
+ var {VISITOR_KEYS: VISITOR_KEYS$4} = lib_exports;
42073
+
42074
+ function _visitPaths(ctx, paths) {
42075
+ ctx.queue = paths;
42076
+ ctx.priorityQueue = [];
42077
+ const visited = /* @__PURE__ */new Set();
42078
+ let stop2 = false;
42079
+ let visitIndex = 0;
42080
+
42081
+ for (; visitIndex < paths.length;) {
42082
+ const path = paths[visitIndex];
42083
+ visitIndex++;
42084
+ resync.call(path);
42085
+
42086
+ if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== ctx) {
42087
+ pushContext.call(path, ctx);
42088
+ }
42089
+
42090
+ if (path.key === null)
42091
+ continue;
42092
+
42093
+ const {node} = path;
42094
+
42095
+ if (visited.has(node))
42096
+ continue;
42097
+
42098
+ if (node)
42099
+ visited.add(node);
42100
+
42101
+ if (_visit(ctx, path)) {
42102
+ stop2 = true;
42103
+ break;
42104
+ }
42105
+
42106
+ if (ctx.priorityQueue.length) {
42107
+ stop2 = _visitPaths(ctx, ctx.priorityQueue);
42108
+ ctx.priorityQueue = [];
42109
+ ctx.queue = paths;
42110
+
42111
+ if (stop2)
42112
+ break;
42113
+ }
42114
+ }
42115
+
42116
+ for (let i = 0; i < visitIndex; i++) {
42117
+ popContext.call(paths[i]);
42118
+ }
42119
+
42120
+ ctx.queue = null;
42121
+
42122
+ return stop2;
42123
+ }
42124
+
42125
+ function _visit(ctx, path) {
42126
+ const node = path.node;
42127
+
42128
+ if (!node) {
42129
+ return false;
42130
+ }
42131
+
42132
+ const opts = ctx.opts;
42133
+ const denylist = opts.denylist;
42134
+
42135
+ if (denylist?.includes(node.type)) {
42136
+ return false;
42137
+ }
42138
+
42139
+ if (opts.shouldSkip?.(path)) {
42140
+ return false;
42141
+ }
42142
+
42143
+ if (path.shouldSkip)
42144
+ return path.shouldStop;
42145
+
42146
+ if (_call.call(path, opts.enter))
42147
+ return path.shouldStop;
42148
+
42149
+ if (path.node) {
42150
+ if (_call.call(path, opts[node.type]?.enter))
42151
+ return path.shouldStop;
42152
+ }
42153
+
42154
+ path.shouldStop = traverseNode(path.node, opts, path.scope, ctx.state, path, path.skipKeys);
42155
+
42156
+ if (path.node) {
42157
+ if (_call.call(path, opts.exit))
42158
+ return true;
42159
+ }
42160
+
42161
+ if (path.node) {
42162
+ _call.call(path, opts[node.type]?.exit);
42163
+ }
42164
+
42165
+ return path.shouldStop;
42166
+ }
42167
+
42168
+ function traverseNode(node, opts, scope2, state, path, skipKeys, visitSelf) {
42169
+ const keys2 = VISITOR_KEYS$4[node.type];
42170
+
42171
+ if (!keys2?.length)
42172
+ return false;
42173
+
42174
+ const ctx = new TraversalContext(opts, state);
42175
+
42176
+ if (visitSelf) {
42177
+ if (skipKeys?.[path.parentKey])
42178
+ return false;
42179
+
42180
+ return _visitPaths(ctx, [path]);
42181
+ }
42182
+
42183
+ const hub = path == null ? node.type === 'Program' || node.type === 'File' ? new Hub() : void 0 : path.hub;
42184
+
42185
+ for (const key of keys2) {
42186
+ if (skipKeys?.[key])
42187
+ continue;
42188
+
42189
+ const prop = node[key];
42190
+
42191
+ if (!prop)
42192
+ continue;
42193
+
42194
+ if (Array.isArray(prop)) {
42195
+ if (!prop.length)
42196
+ continue;
42197
+
42198
+ const paths = [];
42199
+
42200
+ for (let i = 0; i < prop.length; i++) {
42201
+ const childPath = NodePath_Final.get({
42202
+ parentPath: path,
42203
+ parent: node,
42204
+ container: prop,
42205
+ key: i,
42206
+ listKey: key,
42207
+ hub,
42208
+ });
42209
+
42210
+ paths.push(childPath);
42211
+ }
42212
+
42213
+ if (_visitPaths(ctx, paths))
42214
+ return true;
42215
+ } else {
42216
+ if (_visitPaths(ctx, [
42217
+ NodePath_Final.get({parentPath: path, parent: node, container: node, key, listKey: null, hub}),
42218
+ ])) {
42219
+ return true;
42220
+ }
42221
+ }
42222
+ }
42223
+
42224
+ return false;
42225
+ }
42226
+
42177
42227
  var {
42178
42228
  isBinding: isBinding2,
42179
42229
  isBlockScoped: nodeIsBlockScoped,
@@ -42778,7 +42828,7 @@ var Renamer = class {
42778
42828
  }
42779
42829
  };
42780
42830
 
42781
- var {VISITOR_KEYS: VISITOR_KEYS$5} = lib_exports;
42831
+ var {VISITOR_KEYS: VISITOR_KEYS$3} = lib_exports;
42782
42832
 
42783
42833
  function traverseForScope(path, visitors2, state) {
42784
42834
  const exploded = explode$1(visitors2);
@@ -42806,8 +42856,8 @@ function traverseForScope(path, visitors2, state) {
42806
42856
  const visitor = exploded[node.type];
42807
42857
 
42808
42858
  if (visitor?.enter) {
42809
- for (const visit2 of visitor.enter) {
42810
- visit2.call(state, path2, state);
42859
+ for (const visit of visitor.enter) {
42860
+ visit.call(state, path2, state);
42811
42861
  }
42812
42862
  }
42813
42863
 
@@ -42815,7 +42865,7 @@ function traverseForScope(path, visitors2, state) {
42815
42865
  return;
42816
42866
  }
42817
42867
 
42818
- const keys2 = VISITOR_KEYS$5[node.type];
42868
+ const keys2 = VISITOR_KEYS$3[node.type];
42819
42869
 
42820
42870
  if (!keys2?.length) {
42821
42871
  return;
@@ -42838,8 +42888,8 @@ function traverseForScope(path, visitors2, state) {
42838
42888
  }
42839
42889
 
42840
42890
  if (visitor?.exit) {
42841
- for (const visit2 of visitor.exit) {
42842
- visit2.call(state, path2, state);
42891
+ for (const visit of visitor.exit) {
42892
+ visit.call(state, path2, state);
42843
42893
  }
42844
42894
  }
42845
42895
  }
@@ -43852,8 +43902,8 @@ collectorVisitor]);
43852
43902
  const typeVisitors = scopeVisitor[path.type];
43853
43903
 
43854
43904
  if (typeVisitors) {
43855
- for (const visit2 of typeVisitors.enter) {
43856
- visit2.call(state, path, state);
43905
+ for (const visit of typeVisitors.enter) {
43906
+ visit.call(state, path, state);
43857
43907
  }
43858
43908
  }
43859
43909
  }
@@ -44165,7 +44215,7 @@ collectorVisitor]);
44165
44215
  }
44166
44216
  };
44167
44217
 
44168
- var {VISITOR_KEYS: VISITOR_KEYS$4} = lib_exports;
44218
+ var {VISITOR_KEYS: VISITOR_KEYS$2} = lib_exports;
44169
44219
 
44170
44220
  function findParent(callback) {
44171
44221
  let path = this;
@@ -44213,7 +44263,7 @@ function getStatementParent() {
44213
44263
  function getEarliestCommonAncestorFrom(paths) {
44214
44264
  return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
44215
44265
  let earliest;
44216
- const keys2 = VISITOR_KEYS$4[deepest.type];
44266
+ const keys2 = VISITOR_KEYS$2[deepest.type];
44217
44267
 
44218
44268
  for (const ancestry of ancestries) {
44219
44269
  const path = ancestry[i + 1];
@@ -46435,20 +46485,20 @@ function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow =
46435
46485
  args.push(value);
46436
46486
  }
46437
46487
 
46438
- const call2 = callExpression2(identifier3(superBinding), args);
46488
+ const call = callExpression2(identifier3(superBinding), args);
46439
46489
 
46440
46490
  if (isCall) {
46441
46491
  superParentPath.unshiftContainer('arguments', thisExpression2());
46442
- superProp.replaceWith(memberExpression2(call2, identifier3('call')));
46492
+ superProp.replaceWith(memberExpression2(call, identifier3('call')));
46443
46493
  thisPaths.push(superParentPath.get('arguments.0'));
46444
46494
  } else if (isAssignment) {
46445
- superParentPath.replaceWith(call2);
46495
+ superParentPath.replaceWith(call);
46446
46496
  } else if (isTaggedTemplate) {
46447
46497
  thisPaths.push(superProp
46448
- .replaceWith(callExpression2(memberExpression2(call2, identifier3('bind'), false), [thisExpression2()]))[0]
46498
+ .replaceWith(callExpression2(memberExpression2(call, identifier3('bind'), false), [thisExpression2()]))[0]
46449
46499
  .get('arguments.0'));
46450
46500
  } else {
46451
- superProp.replaceWith(call2);
46501
+ superProp.replaceWith(call);
46452
46502
  }
46453
46503
 
46454
46504
  });
@@ -46838,7 +46888,7 @@ function ensureFunctionName(supportUnicodeId) {
46838
46888
  params.push(scope2.generateUidIdentifier('x'));
46839
46889
  }
46840
46890
 
46841
- const call2 = index.expression.ast`
46891
+ const call = index.expression.ast`
46842
46892
  (function (${key}) {
46843
46893
  function ${id}(${params}) {
46844
46894
  return ${cloneNode3(key)}.apply(this, arguments);
@@ -46853,7 +46903,7 @@ function ensureFunctionName(supportUnicodeId) {
46853
46903
  `;
46854
46904
 
46855
46905
  return this
46856
- .replaceWith(call2)[0]
46906
+ .replaceWith(call)[0]
46857
46907
  .get('arguments.0');
46858
46908
  }
46859
46909
 
@@ -46864,7 +46914,7 @@ function getFunctionArity(node) {
46864
46914
 
46865
46915
  var {
46866
46916
  STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS2,
46867
- VISITOR_KEYS: VISITOR_KEYS$3,
46917
+ VISITOR_KEYS: VISITOR_KEYS$12,
46868
46918
  isBlockStatement: isBlockStatement2,
46869
46919
  isExpression: isExpression3,
46870
46920
  isIdentifier: isIdentifier4,
@@ -47110,7 +47160,7 @@ function _guessExecutionStatusRelativeToCached(base, target, cache2) {
47110
47160
  return divergence.target.key > divergence.this.key ? 'before' : 'after';
47111
47161
  }
47112
47162
 
47113
- const keys2 = VISITOR_KEYS$3[commonPath.type];
47163
+ const keys2 = VISITOR_KEYS$12[commonPath.type];
47114
47164
 
47115
47165
  const keyPosition = {
47116
47166
  this: keys2.indexOf(divergence.this.parentKey),
@@ -48048,7 +48098,6 @@ var methods = {
48048
48098
  isConstantExpression,
48049
48099
  isInStrictMode,
48050
48100
  isDenylisted,
48051
- visit,
48052
48101
  skip,
48053
48102
  skipKey,
48054
48103
  stop,
@@ -48102,325 +48151,6 @@ for (const type of Object.keys(virtualTypes)) {
48102
48151
  TYPES.push(type);
48103
48152
  }
48104
48153
 
48105
- var {VISITOR_KEYS: VISITOR_KEYS$2} = lib_exports;
48106
-
48107
- var TraversalContext = class {
48108
- constructor(scope2, opts, state, parentPath) {
48109
- this.parentPath = parentPath;
48110
- this.scope = scope2;
48111
- this.state = state;
48112
- this.opts = opts;
48113
- }
48114
-
48115
- queue = null;
48116
- priorityQueue = null;
48117
- shouldVisit(node) {
48118
- const opts = this.opts;
48119
-
48120
- if (opts.enter || opts.exit)
48121
- return true;
48122
-
48123
- if (opts[node.type])
48124
- return true;
48125
-
48126
- const keys2 = VISITOR_KEYS$2[node.type];
48127
-
48128
- if (!keys2?.length)
48129
- return false;
48130
-
48131
- for (const key of keys2) {
48132
- if (node[key]) {
48133
- return true;
48134
- }
48135
- }
48136
-
48137
- return false;
48138
- }
48139
-
48140
- create(node, container, key, listKey) {
48141
- return NodePath_Final.get({
48142
- parentPath: this.parentPath,
48143
- parent: node,
48144
- container,
48145
- key,
48146
- listKey,
48147
- });
48148
- }
48149
-
48150
- maybeQueue(path, notPriority) {
48151
- if (this.queue) {
48152
- if (notPriority) {
48153
- this.queue.push(path);
48154
- } else {
48155
- this.priorityQueue.push(path);
48156
- }
48157
- }
48158
- }
48159
-
48160
- visitMultiple(container, parent, listKey) {
48161
- if (container.length === 0)
48162
- return false;
48163
-
48164
- const queue = [];
48165
-
48166
- for (let key = 0; key < container.length; key++) {
48167
- const node = container[key];
48168
-
48169
- if (node && this.shouldVisit(node)) {
48170
- queue.push(this.create(parent, container, key, listKey));
48171
- }
48172
- }
48173
-
48174
- return this.visitQueue(queue);
48175
- }
48176
-
48177
- visitSingle(node, key) {
48178
- if (this.shouldVisit(node[key])) {
48179
- return this.visitQueue([this.create(node, node, key)]);
48180
- } else {
48181
- return false;
48182
- }
48183
- }
48184
-
48185
- visitQueue(queue) {
48186
- this.queue = queue;
48187
- this.priorityQueue = [];
48188
- const visited = /* @__PURE__ */new WeakSet();
48189
- let stop2 = false;
48190
- let visitIndex = 0;
48191
-
48192
- for (; visitIndex < queue.length;) {
48193
- const path = queue[visitIndex];
48194
- visitIndex++;
48195
- resync.call(path);
48196
-
48197
- if (path.key === null)
48198
- continue;
48199
-
48200
- if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
48201
- pushContext.call(path, this);
48202
- }
48203
-
48204
- const {node} = path;
48205
-
48206
- if (visited.has(node))
48207
- continue;
48208
-
48209
- if (node)
48210
- visited.add(node);
48211
-
48212
- if (path.visit()) {
48213
- stop2 = true;
48214
- break;
48215
- }
48216
-
48217
- if (this.priorityQueue.length) {
48218
- stop2 = this.visitQueue(this.priorityQueue);
48219
- this.priorityQueue = [];
48220
- this.queue = queue;
48221
-
48222
- if (stop2)
48223
- break;
48224
- }
48225
- }
48226
-
48227
- for (let i = 0; i < visitIndex; i++) {
48228
- if (queue[i].key === null)
48229
- continue;
48230
-
48231
- popContext.call(queue[i]);
48232
- }
48233
-
48234
- this.queue = null;
48235
-
48236
- return stop2;
48237
- }
48238
-
48239
- visit(node, key) {
48240
- const nodes = node[key];
48241
-
48242
- if (!nodes)
48243
- return false;
48244
-
48245
- if (Array.isArray(nodes)) {
48246
- return this.visitMultiple(nodes, node, key);
48247
- } else {
48248
- return this.visitSingle(node, key);
48249
- }
48250
- }
48251
- };
48252
-
48253
- var {VISITOR_KEYS: VISITOR_KEYS$12} = lib_exports;
48254
-
48255
- function _visitPaths(ctx, paths) {
48256
- ctx.queue = paths;
48257
- ctx.priorityQueue = [];
48258
- const visited = /* @__PURE__ */new Set();
48259
- let stop2 = false;
48260
- let visitIndex = 0;
48261
-
48262
- for (; visitIndex < paths.length;) {
48263
- const path = paths[visitIndex];
48264
- visitIndex++;
48265
- resync.call(path);
48266
-
48267
- if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== ctx) {
48268
- pushContext.call(path, ctx);
48269
- }
48270
-
48271
- if (path.key === null)
48272
- continue;
48273
-
48274
- const {node} = path;
48275
-
48276
- if (visited.has(node))
48277
- continue;
48278
-
48279
- if (node)
48280
- visited.add(node);
48281
-
48282
- if (_visit(ctx, path)) {
48283
- stop2 = true;
48284
- break;
48285
- }
48286
-
48287
- if (ctx.priorityQueue.length) {
48288
- stop2 = _visitPaths(ctx, ctx.priorityQueue);
48289
- ctx.priorityQueue = [];
48290
- ctx.queue = paths;
48291
-
48292
- if (stop2)
48293
- break;
48294
- }
48295
- }
48296
-
48297
- for (let i = 0; i < visitIndex; i++) {
48298
- popContext.call(paths[i]);
48299
- }
48300
-
48301
- ctx.queue = null;
48302
-
48303
- return stop2;
48304
- }
48305
-
48306
- function _visit(ctx, path) {
48307
- const node = path.node;
48308
-
48309
- if (!node) {
48310
- return false;
48311
- }
48312
-
48313
- const opts = ctx.opts;
48314
- const denylist = opts.denylist;
48315
-
48316
- if (denylist?.includes(node.type)) {
48317
- return false;
48318
- }
48319
-
48320
- if (opts.shouldSkip?.(path)) {
48321
- return false;
48322
- }
48323
-
48324
- if (path.shouldSkip)
48325
- return path.shouldStop;
48326
-
48327
- if (_call.call(path, opts.enter))
48328
- return path.shouldStop;
48329
-
48330
- if (path.node) {
48331
- if (_call.call(path, opts[node.type]?.enter))
48332
- return path.shouldStop;
48333
- }
48334
-
48335
- path.shouldStop = traverseNode(path.node, opts, path.scope, ctx.state, path, path.skipKeys);
48336
-
48337
- if (path.node) {
48338
- if (_call.call(path, opts.exit))
48339
- return true;
48340
- }
48341
-
48342
- if (path.node) {
48343
- _call.call(path, opts[node.type]?.exit);
48344
- }
48345
-
48346
- return path.shouldStop;
48347
- }
48348
-
48349
- function traverseNode(node, opts, scope2, state, path, skipKeys, visitSelf) {
48350
- const keys2 = VISITOR_KEYS$12[node.type];
48351
-
48352
- if (!keys2?.length)
48353
- return false;
48354
-
48355
- const ctx = new TraversalContext(scope2, opts, state, path);
48356
-
48357
- if (visitSelf) {
48358
- if (skipKeys?.[path.parentKey])
48359
- return false;
48360
-
48361
- return _visitPaths(ctx, [path]);
48362
- }
48363
-
48364
- const hub = path == null ? node.type === 'Program' || node.type === 'File' ? new Hub() : void 0 : path.hub;
48365
-
48366
- for (const key of keys2) {
48367
- if (skipKeys?.[key])
48368
- continue;
48369
-
48370
- const prop = node[key];
48371
-
48372
- if (!prop)
48373
- continue;
48374
-
48375
- if (Array.isArray(prop)) {
48376
- if (!prop.length)
48377
- continue;
48378
-
48379
- const paths = [];
48380
-
48381
- for (let i = 0; i < prop.length; i++) {
48382
- const childPath = NodePath_Final.get({
48383
- parentPath: path,
48384
- parent: node,
48385
- container: prop,
48386
- key: i,
48387
- listKey: key,
48388
- hub,
48389
- });
48390
-
48391
- paths.push(childPath);
48392
- }
48393
-
48394
- if (_visitPaths(ctx, paths))
48395
- return true;
48396
- } else {
48397
- if (_visitPaths(ctx, [
48398
- NodePath_Final.get({parentPath: path, parent: node, container: node, key, listKey: null, hub}),
48399
- ])) {
48400
- return true;
48401
- }
48402
- }
48403
- }
48404
-
48405
- return false;
48406
- }
48407
-
48408
- function call(key) {
48409
- const opts = this.opts;
48410
- this.debug(key);
48411
-
48412
- if (this.node) {
48413
- if (_call.call(this, opts[key]))
48414
- return true;
48415
- }
48416
-
48417
- if (this.node) {
48418
- return _call.call(this, opts[this.node.type]?.[key]);
48419
- }
48420
-
48421
- return false;
48422
- }
48423
-
48424
48154
  function _call(fns) {
48425
48155
  if (!fns)
48426
48156
  return false;
@@ -48458,42 +48188,6 @@ function isDenylisted() {
48458
48188
  return !!this.opts.denylist?.includes(this.node.type);
48459
48189
  }
48460
48190
 
48461
- function restoreContext(path, context) {
48462
- if (path.context !== context) {
48463
- path.context = context;
48464
- path.state = context.state;
48465
- path.opts = context.opts;
48466
- }
48467
- }
48468
-
48469
- function visit() {
48470
- if (!this.node) {
48471
- return false;
48472
- }
48473
-
48474
- if (this.isDenylisted()) {
48475
- return false;
48476
- }
48477
-
48478
- if (this.opts.shouldSkip?.(this)) {
48479
- return false;
48480
- }
48481
-
48482
- const currentContext = this.context;
48483
-
48484
- if (this.shouldSkip || call.call(this, 'enter')) {
48485
- this.debug('Skip...');
48486
- return this.shouldStop;
48487
- }
48488
-
48489
- restoreContext(this, currentContext);
48490
- this.debug('Recursing into...');
48491
- this.shouldStop = traverseNode(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
48492
- restoreContext(this, currentContext);
48493
- call.call(this, 'exit');
48494
- return this.shouldStop;
48495
- }
48496
-
48497
48191
  function skip() {
48498
48192
  this.shouldSkip = true;
48499
48193
  }