houdini-react 1.2.43 → 1.2.45

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.
@@ -13146,12 +13146,12 @@ var require_comments2 = __commonJS({
13146
13146
  comment.trailing = true;
13147
13147
  addCommentHelper(node, comment);
13148
13148
  }
13149
- function printLeadingComment(commentPath, print5) {
13149
+ function printLeadingComment(commentPath, print6) {
13150
13150
  var comment = commentPath.getValue();
13151
13151
  n.Comment.assert(comment);
13152
13152
  var loc = comment.loc;
13153
13153
  var lines = loc && loc.lines;
13154
- var parts = [print5(commentPath)];
13154
+ var parts = [print6(commentPath)];
13155
13155
  if (comment.trailing) {
13156
13156
  parts.push("\n");
13157
13157
  } else if (lines instanceof lines_1.Lines) {
@@ -13166,7 +13166,7 @@ var require_comments2 = __commonJS({
13166
13166
  }
13167
13167
  return (0, lines_1.concat)(parts);
13168
13168
  }
13169
- function printTrailingComment(commentPath, print5) {
13169
+ function printTrailingComment(commentPath, print6) {
13170
13170
  var comment = commentPath.getValue(commentPath);
13171
13171
  n.Comment.assert(comment);
13172
13172
  var loc = comment.loc;
@@ -13181,12 +13181,12 @@ var require_comments2 = __commonJS({
13181
13181
  parts.push(new Array(leadingSpace.length).join("\n"));
13182
13182
  }
13183
13183
  }
13184
- parts.push(print5(commentPath));
13184
+ parts.push(print6(commentPath));
13185
13185
  return (0, lines_1.concat)(parts);
13186
13186
  }
13187
- function printComments(path3, print5) {
13187
+ function printComments(path3, print6) {
13188
13188
  var value = path3.getValue();
13189
- var innerLines = print5(path3);
13189
+ var innerLines = print6(path3);
13190
13190
  var comments = n.Node.check(value) && types4.getFieldValue(value, "comments");
13191
13191
  if (!comments || comments.length === 0) {
13192
13192
  return innerLines;
@@ -13198,9 +13198,9 @@ var require_comments2 = __commonJS({
13198
13198
  var leading = types4.getFieldValue(comment, "leading");
13199
13199
  var trailing = types4.getFieldValue(comment, "trailing");
13200
13200
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
13201
- leadingParts.push(printLeadingComment(commentPath, print5));
13201
+ leadingParts.push(printLeadingComment(commentPath, print6));
13202
13202
  } else if (trailing) {
13203
- trailingParts.push(printTrailingComment(commentPath, print5));
13203
+ trailingParts.push(printTrailingComment(commentPath, print6));
13204
13204
  }
13205
13205
  }, "comments");
13206
13206
  leadingParts.push.apply(leadingParts, trailingParts);
@@ -13891,7 +13891,7 @@ var require_patcher2 = __commonJS({
13891
13891
  };
13892
13892
  exports.Patcher = Patcher;
13893
13893
  var Pp = Patcher.prototype;
13894
- Pp.tryToReprintComments = function(newNode, oldNode, print5) {
13894
+ Pp.tryToReprintComments = function(newNode, oldNode, print6) {
13895
13895
  var patcher = this;
13896
13896
  if (!newNode.comments && !oldNode.comments) {
13897
13897
  return true;
@@ -13908,7 +13908,7 @@ var require_patcher2 = __commonJS({
13908
13908
  assert_1.default.ok(oldComment.leading || oldComment.trailing);
13909
13909
  patcher.replace(
13910
13910
  oldComment.loc,
13911
- print5(reprint.newPath).indentTail(oldComment.loc.indent)
13911
+ print6(reprint.newPath).indentTail(oldComment.loc.indent)
13912
13912
  );
13913
13913
  });
13914
13914
  }
@@ -13955,17 +13955,17 @@ var require_patcher2 = __commonJS({
13955
13955
  var reprints = [];
13956
13956
  if (!lines || !findReprints(path3, reprints))
13957
13957
  return;
13958
- return function(print5) {
13958
+ return function(print6) {
13959
13959
  var patcher = new Patcher(lines);
13960
13960
  reprints.forEach(function(reprint) {
13961
13961
  var newNode = reprint.newPath.getValue();
13962
13962
  var oldNode = reprint.oldPath.getValue();
13963
13963
  SourceLocation.assert(oldNode.loc, true);
13964
- var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print5);
13964
+ var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print6);
13965
13965
  if (needToPrintNewPathWithComments) {
13966
13966
  patcher.deleteComments(oldNode);
13967
13967
  }
13968
- var newLines = print5(reprint.newPath, {
13968
+ var newLines = print6(reprint.newPath, {
13969
13969
  includeComments: needToPrintNewPathWithComments,
13970
13970
  avoidRootParens: oldNode.type === newNode.type && reprint.oldPath.hasParens()
13971
13971
  }).indentTail(oldNode.loc.indent);
@@ -14182,10 +14182,10 @@ var require_printer2 = __commonJS({
14182
14182
  function makePrintFunctionWith(options, overrides) {
14183
14183
  options = Object.assign({}, options, overrides);
14184
14184
  return function(path3) {
14185
- return print5(path3, options);
14185
+ return print6(path3, options);
14186
14186
  };
14187
14187
  }
14188
- function print5(path3, options) {
14188
+ function print6(path3, options) {
14189
14189
  assert_1.default.ok(path3 instanceof fast_path_1.default);
14190
14190
  options = options || {};
14191
14191
  if (options.includeComments) {
@@ -14201,7 +14201,7 @@ var require_printer2 = __commonJS({
14201
14201
  }
14202
14202
  }
14203
14203
  var reprinter = (0, patcher_1.getReprinter)(path3);
14204
- var lines = reprinter ? reprinter(print5) : genericPrint(path3, config, options, makePrintFunctionWith(options, {
14204
+ var lines = reprinter ? reprinter(print6) : genericPrint(path3, config, options, makePrintFunctionWith(options, {
14205
14205
  includeComments: true,
14206
14206
  avoidRootParens: false
14207
14207
  }));
@@ -14212,7 +14212,7 @@ var require_printer2 = __commonJS({
14212
14212
  if (!ast) {
14213
14213
  return emptyPrintResult;
14214
14214
  }
14215
- var lines = print5(fast_path_1.default.from(ast), {
14215
+ var lines = print6(fast_path_1.default.from(ast), {
14216
14216
  includeComments: true,
14217
14217
  avoidRootParens: false
14218
14218
  });
@@ -14265,7 +14265,7 @@ var require_printer2 = __commonJS({
14265
14265
  }
14266
14266
  return (0, lines_1.concat)(parts);
14267
14267
  }
14268
- function genericPrintNoParens(path3, options, print5) {
14268
+ function genericPrintNoParens(path3, options, print6) {
14269
14269
  var n = path3.getValue();
14270
14270
  if (!n) {
14271
14271
  return (0, lines_1.fromString)("");
@@ -14277,45 +14277,45 @@ var require_printer2 = __commonJS({
14277
14277
  var parts = [];
14278
14278
  switch (n.type) {
14279
14279
  case "File":
14280
- return path3.call(print5, "program");
14280
+ return path3.call(print6, "program");
14281
14281
  case "Program":
14282
14282
  if (n.directives) {
14283
14283
  path3.each(function(childPath) {
14284
- parts.push(print5(childPath), ";\n");
14284
+ parts.push(print6(childPath), ";\n");
14285
14285
  }, "directives");
14286
14286
  }
14287
14287
  if (n.interpreter) {
14288
- parts.push(path3.call(print5, "interpreter"));
14288
+ parts.push(path3.call(print6, "interpreter"));
14289
14289
  }
14290
14290
  parts.push(path3.call(function(bodyPath) {
14291
- return printStatementSequence(bodyPath, options, print5);
14291
+ return printStatementSequence(bodyPath, options, print6);
14292
14292
  }, "body"));
14293
14293
  return (0, lines_1.concat)(parts);
14294
14294
  case "Noop":
14295
14295
  case "EmptyStatement":
14296
14296
  return (0, lines_1.fromString)("");
14297
14297
  case "ExpressionStatement":
14298
- return (0, lines_1.concat)([path3.call(print5, "expression"), ";"]);
14298
+ return (0, lines_1.concat)([path3.call(print6, "expression"), ";"]);
14299
14299
  case "ParenthesizedExpression":
14300
- return (0, lines_1.concat)(["(", path3.call(print5, "expression"), ")"]);
14300
+ return (0, lines_1.concat)(["(", path3.call(print6, "expression"), ")"]);
14301
14301
  case "BinaryExpression":
14302
14302
  case "LogicalExpression":
14303
14303
  case "AssignmentExpression":
14304
14304
  return (0, lines_1.fromString)(" ").join([
14305
- path3.call(print5, "left"),
14305
+ path3.call(print6, "left"),
14306
14306
  n.operator,
14307
- path3.call(print5, "right")
14307
+ path3.call(print6, "right")
14308
14308
  ]);
14309
14309
  case "AssignmentPattern":
14310
14310
  return (0, lines_1.concat)([
14311
- path3.call(print5, "left"),
14311
+ path3.call(print6, "left"),
14312
14312
  " = ",
14313
- path3.call(print5, "right")
14313
+ path3.call(print6, "right")
14314
14314
  ]);
14315
14315
  case "MemberExpression":
14316
14316
  case "OptionalMemberExpression": {
14317
- parts.push(path3.call(print5, "object"));
14318
- var property = path3.call(print5, "property");
14317
+ parts.push(path3.call(print6, "object"));
14318
+ var property = path3.call(print6, "property");
14319
14319
  var optional = types4.getFieldValue(n, "optional");
14320
14320
  if (n.computed) {
14321
14321
  parts.push(optional ? "?.[" : "[", property, "]");
@@ -14325,18 +14325,18 @@ var require_printer2 = __commonJS({
14325
14325
  return (0, lines_1.concat)(parts);
14326
14326
  }
14327
14327
  case "ChainExpression":
14328
- return path3.call(print5, "expression");
14328
+ return path3.call(print6, "expression");
14329
14329
  case "MetaProperty":
14330
14330
  return (0, lines_1.concat)([
14331
- path3.call(print5, "meta"),
14331
+ path3.call(print6, "meta"),
14332
14332
  ".",
14333
- path3.call(print5, "property")
14333
+ path3.call(print6, "property")
14334
14334
  ]);
14335
14335
  case "BindExpression":
14336
14336
  if (n.object) {
14337
- parts.push(path3.call(print5, "object"));
14337
+ parts.push(path3.call(print6, "object"));
14338
14338
  }
14339
- parts.push("::", path3.call(print5, "callee"));
14339
+ parts.push("::", path3.call(print6, "callee"));
14340
14340
  return (0, lines_1.concat)(parts);
14341
14341
  case "Path":
14342
14342
  return (0, lines_1.fromString)(".").join(n.body);
@@ -14344,7 +14344,7 @@ var require_printer2 = __commonJS({
14344
14344
  return (0, lines_1.concat)([
14345
14345
  (0, lines_1.fromString)(n.name, options),
14346
14346
  n.optional ? "?" : "",
14347
- path3.call(print5, "typeAnnotation")
14347
+ path3.call(print6, "typeAnnotation")
14348
14348
  ]);
14349
14349
  case "SpreadElement":
14350
14350
  case "SpreadElementPattern":
@@ -14355,8 +14355,8 @@ var require_printer2 = __commonJS({
14355
14355
  case "RestElement":
14356
14356
  return (0, lines_1.concat)([
14357
14357
  "...",
14358
- path3.call(print5, "argument"),
14359
- path3.call(print5, "typeAnnotation")
14358
+ path3.call(print6, "argument"),
14359
+ path3.call(print6, "typeAnnotation")
14360
14360
  ]);
14361
14361
  case "FunctionDeclaration":
14362
14362
  case "FunctionExpression":
@@ -14371,15 +14371,15 @@ var require_printer2 = __commonJS({
14371
14371
  if (n.generator)
14372
14372
  parts.push("*");
14373
14373
  if (n.id) {
14374
- parts.push(" ", path3.call(print5, "id"), path3.call(print5, "typeParameters"));
14374
+ parts.push(" ", path3.call(print6, "id"), path3.call(print6, "typeParameters"));
14375
14375
  } else {
14376
14376
  if (n.typeParameters) {
14377
- parts.push(path3.call(print5, "typeParameters"));
14377
+ parts.push(path3.call(print6, "typeParameters"));
14378
14378
  }
14379
14379
  }
14380
- parts.push("(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "returnType"));
14380
+ parts.push("(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "returnType"));
14381
14381
  if (n.body) {
14382
- parts.push(" ", path3.call(print5, "body"));
14382
+ parts.push(" ", path3.call(print6, "body"));
14383
14383
  }
14384
14384
  return (0, lines_1.concat)(parts);
14385
14385
  case "ArrowFunctionExpression":
@@ -14387,44 +14387,44 @@ var require_printer2 = __commonJS({
14387
14387
  parts.push("async ");
14388
14388
  }
14389
14389
  if (n.typeParameters) {
14390
- parts.push(path3.call(print5, "typeParameters"));
14390
+ parts.push(path3.call(print6, "typeParameters"));
14391
14391
  }
14392
14392
  if (!options.arrowParensAlways && n.params.length === 1 && !n.rest && n.params[0].type === "Identifier" && !n.params[0].typeAnnotation && !n.returnType) {
14393
- parts.push(path3.call(print5, "params", 0));
14393
+ parts.push(path3.call(print6, "params", 0));
14394
14394
  } else {
14395
- parts.push("(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "returnType"));
14395
+ parts.push("(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "returnType"));
14396
14396
  }
14397
- parts.push(" => ", path3.call(print5, "body"));
14397
+ parts.push(" => ", path3.call(print6, "body"));
14398
14398
  return (0, lines_1.concat)(parts);
14399
14399
  case "MethodDefinition":
14400
- return printMethod(path3, options, print5);
14400
+ return printMethod(path3, options, print6);
14401
14401
  case "YieldExpression":
14402
14402
  parts.push("yield");
14403
14403
  if (n.delegate)
14404
14404
  parts.push("*");
14405
14405
  if (n.argument)
14406
- parts.push(" ", path3.call(print5, "argument"));
14406
+ parts.push(" ", path3.call(print6, "argument"));
14407
14407
  return (0, lines_1.concat)(parts);
14408
14408
  case "AwaitExpression":
14409
14409
  parts.push("await");
14410
14410
  if (n.all)
14411
14411
  parts.push("*");
14412
14412
  if (n.argument)
14413
- parts.push(" ", path3.call(print5, "argument"));
14413
+ parts.push(" ", path3.call(print6, "argument"));
14414
14414
  return (0, lines_1.concat)(parts);
14415
14415
  case "ModuleExpression":
14416
14416
  return (0, lines_1.concat)([
14417
14417
  "module {\n",
14418
- path3.call(print5, "body").indent(options.tabWidth),
14418
+ path3.call(print6, "body").indent(options.tabWidth),
14419
14419
  "\n}"
14420
14420
  ]);
14421
14421
  case "ModuleDeclaration":
14422
- parts.push("module", path3.call(print5, "id"));
14422
+ parts.push("module", path3.call(print6, "id"));
14423
14423
  if (n.source) {
14424
14424
  assert_1.default.ok(!n.body);
14425
- parts.push("from", path3.call(print5, "source"));
14425
+ parts.push("from", path3.call(print6, "source"));
14426
14426
  } else {
14427
- parts.push(path3.call(print5, "body"));
14427
+ parts.push(path3.call(print6, "body"));
14428
14428
  }
14429
14429
  return (0, lines_1.fromString)(" ").join(parts);
14430
14430
  case "ImportSpecifier":
@@ -14432,27 +14432,27 @@ var require_printer2 = __commonJS({
14432
14432
  parts.push(n.importKind + " ");
14433
14433
  }
14434
14434
  if (n.imported) {
14435
- parts.push(path3.call(print5, "imported"));
14435
+ parts.push(path3.call(print6, "imported"));
14436
14436
  if (n.local && n.local.name !== n.imported.name) {
14437
- parts.push(" as ", path3.call(print5, "local"));
14437
+ parts.push(" as ", path3.call(print6, "local"));
14438
14438
  }
14439
14439
  } else if (n.id) {
14440
- parts.push(path3.call(print5, "id"));
14440
+ parts.push(path3.call(print6, "id"));
14441
14441
  if (n.name) {
14442
- parts.push(" as ", path3.call(print5, "name"));
14442
+ parts.push(" as ", path3.call(print6, "name"));
14443
14443
  }
14444
14444
  }
14445
14445
  return (0, lines_1.concat)(parts);
14446
14446
  case "ExportSpecifier":
14447
14447
  if (n.local) {
14448
- parts.push(path3.call(print5, "local"));
14448
+ parts.push(path3.call(print6, "local"));
14449
14449
  if (n.exported && n.exported.name !== n.local.name) {
14450
- parts.push(" as ", path3.call(print5, "exported"));
14450
+ parts.push(" as ", path3.call(print6, "exported"));
14451
14451
  }
14452
14452
  } else if (n.id) {
14453
- parts.push(path3.call(print5, "id"));
14453
+ parts.push(path3.call(print6, "id"));
14454
14454
  if (n.name) {
14455
- parts.push(" as ", path3.call(print5, "name"));
14455
+ parts.push(" as ", path3.call(print6, "name"));
14456
14456
  }
14457
14457
  }
14458
14458
  return (0, lines_1.concat)(parts);
@@ -14461,40 +14461,40 @@ var require_printer2 = __commonJS({
14461
14461
  case "ImportNamespaceSpecifier":
14462
14462
  parts.push("* as ");
14463
14463
  if (n.local) {
14464
- parts.push(path3.call(print5, "local"));
14464
+ parts.push(path3.call(print6, "local"));
14465
14465
  } else if (n.id) {
14466
- parts.push(path3.call(print5, "id"));
14466
+ parts.push(path3.call(print6, "id"));
14467
14467
  }
14468
14468
  return (0, lines_1.concat)(parts);
14469
14469
  case "ImportDefaultSpecifier":
14470
14470
  if (n.local) {
14471
- return path3.call(print5, "local");
14471
+ return path3.call(print6, "local");
14472
14472
  }
14473
- return path3.call(print5, "id");
14473
+ return path3.call(print6, "id");
14474
14474
  case "TSExportAssignment":
14475
- return (0, lines_1.concat)(["export = ", path3.call(print5, "expression")]);
14475
+ return (0, lines_1.concat)(["export = ", path3.call(print6, "expression")]);
14476
14476
  case "ExportDeclaration":
14477
14477
  case "ExportDefaultDeclaration":
14478
14478
  case "ExportNamedDeclaration":
14479
- return printExportDeclaration(path3, options, print5);
14479
+ return printExportDeclaration(path3, options, print6);
14480
14480
  case "ExportAllDeclaration":
14481
14481
  parts.push("export *");
14482
14482
  if (n.exported) {
14483
- parts.push(" as ", path3.call(print5, "exported"));
14483
+ parts.push(" as ", path3.call(print6, "exported"));
14484
14484
  }
14485
- parts.push(" from ", path3.call(print5, "source"), ";");
14485
+ parts.push(" from ", path3.call(print6, "source"), ";");
14486
14486
  return (0, lines_1.concat)(parts);
14487
14487
  case "TSNamespaceExportDeclaration":
14488
- parts.push("export as namespace ", path3.call(print5, "id"));
14488
+ parts.push("export as namespace ", path3.call(print6, "id"));
14489
14489
  return maybeAddSemicolon((0, lines_1.concat)(parts));
14490
14490
  case "ExportNamespaceSpecifier":
14491
- return (0, lines_1.concat)(["* as ", path3.call(print5, "exported")]);
14491
+ return (0, lines_1.concat)(["* as ", path3.call(print6, "exported")]);
14492
14492
  case "ExportDefaultSpecifier":
14493
- return path3.call(print5, "exported");
14493
+ return path3.call(print6, "exported");
14494
14494
  case "Import":
14495
14495
  return (0, lines_1.fromString)("import", options);
14496
14496
  case "ImportExpression":
14497
- return (0, lines_1.concat)(["import(", path3.call(print5, "source"), ")"]);
14497
+ return (0, lines_1.concat)(["import(", path3.call(print6, "source"), ")"]);
14498
14498
  case "ImportDeclaration": {
14499
14499
  parts.push("import ");
14500
14500
  if (n.importKind && n.importKind !== "value") {
@@ -14506,9 +14506,9 @@ var require_printer2 = __commonJS({
14506
14506
  path3.each(function(specifierPath) {
14507
14507
  var spec = specifierPath.getValue();
14508
14508
  if (spec.type === "ImportSpecifier") {
14509
- bracedSpecifiers_1.push(print5(specifierPath));
14509
+ bracedSpecifiers_1.push(print6(specifierPath));
14510
14510
  } else if (spec.type === "ImportDefaultSpecifier" || spec.type === "ImportNamespaceSpecifier") {
14511
- unbracedSpecifiers_1.push(print5(specifierPath));
14511
+ unbracedSpecifiers_1.push(print6(specifierPath));
14512
14512
  }
14513
14513
  }, "specifiers");
14514
14514
  unbracedSpecifiers_1.forEach(function(lines2, i2) {
@@ -14538,16 +14538,16 @@ var require_printer2 = __commonJS({
14538
14538
  }
14539
14539
  parts.push(" from ");
14540
14540
  }
14541
- parts.push(path3.call(print5, "source"), maybePrintImportAssertions(path3, options, print5), ";");
14541
+ parts.push(path3.call(print6, "source"), maybePrintImportAssertions(path3, options, print6), ";");
14542
14542
  return (0, lines_1.concat)(parts);
14543
14543
  }
14544
14544
  case "ImportAttribute":
14545
- return (0, lines_1.concat)([path3.call(print5, "key"), ": ", path3.call(print5, "value")]);
14545
+ return (0, lines_1.concat)([path3.call(print6, "key"), ": ", path3.call(print6, "value")]);
14546
14546
  case "StaticBlock":
14547
14547
  parts.push("static ");
14548
14548
  case "BlockStatement": {
14549
14549
  var naked_1 = path3.call(function(bodyPath) {
14550
- return printStatementSequence(bodyPath, options, print5);
14550
+ return printStatementSequence(bodyPath, options, print6);
14551
14551
  }, "body");
14552
14552
  if (naked_1.isEmpty()) {
14553
14553
  if (!n.directives || n.directives.length === 0) {
@@ -14558,7 +14558,7 @@ var require_printer2 = __commonJS({
14558
14558
  parts.push("{\n");
14559
14559
  if (n.directives) {
14560
14560
  path3.each(function(childPath) {
14561
- parts.push(maybeAddSemicolon(print5(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
14561
+ parts.push(maybeAddSemicolon(print6(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
14562
14562
  }, "directives");
14563
14563
  }
14564
14564
  parts.push(naked_1.indent(options.tabWidth));
@@ -14568,7 +14568,7 @@ var require_printer2 = __commonJS({
14568
14568
  case "ReturnStatement": {
14569
14569
  parts.push("return");
14570
14570
  if (n.argument) {
14571
- var argLines = path3.call(print5, "argument");
14571
+ var argLines = path3.call(print6, "argument");
14572
14572
  if (argLines.startsWithComment() || argLines.length > 1 && namedTypes.JSXElement && namedTypes.JSXElement.check(n.argument)) {
14573
14573
  parts.push(" (\n", argLines.indent(options.tabWidth), "\n)");
14574
14574
  } else {
@@ -14580,17 +14580,17 @@ var require_printer2 = __commonJS({
14580
14580
  }
14581
14581
  case "CallExpression":
14582
14582
  case "OptionalCallExpression":
14583
- parts.push(path3.call(print5, "callee"));
14583
+ parts.push(path3.call(print6, "callee"));
14584
14584
  if (n.typeParameters) {
14585
- parts.push(path3.call(print5, "typeParameters"));
14585
+ parts.push(path3.call(print6, "typeParameters"));
14586
14586
  }
14587
14587
  if (n.typeArguments) {
14588
- parts.push(path3.call(print5, "typeArguments"));
14588
+ parts.push(path3.call(print6, "typeArguments"));
14589
14589
  }
14590
14590
  if (types4.getFieldValue(n, "optional")) {
14591
14591
  parts.push("?.");
14592
14592
  }
14593
- parts.push(printArgumentsList(path3, options, print5));
14593
+ parts.push(printArgumentsList(path3, options, print6));
14594
14594
  return (0, lines_1.concat)(parts);
14595
14595
  case "RecordExpression":
14596
14596
  parts.push("#");
@@ -14620,7 +14620,7 @@ var require_printer2 = __commonJS({
14620
14620
  var i_1 = 0;
14621
14621
  fields.forEach(function(field) {
14622
14622
  path3.each(function(childPath) {
14623
- var lines2 = print5(childPath);
14623
+ var lines2 = print6(childPath);
14624
14624
  if (!oneLine_1) {
14625
14625
  lines2 = lines2.indent(options.tabWidth);
14626
14626
  }
@@ -14657,32 +14657,32 @@ var require_printer2 = __commonJS({
14657
14657
  parts[parts.length - 1] = " " + rightBrace;
14658
14658
  }
14659
14659
  if (n.typeAnnotation) {
14660
- parts.push(path3.call(print5, "typeAnnotation"));
14660
+ parts.push(path3.call(print6, "typeAnnotation"));
14661
14661
  }
14662
14662
  return (0, lines_1.concat)(parts);
14663
14663
  }
14664
14664
  case "PropertyPattern":
14665
14665
  return (0, lines_1.concat)([
14666
- path3.call(print5, "key"),
14666
+ path3.call(print6, "key"),
14667
14667
  ": ",
14668
- path3.call(print5, "pattern")
14668
+ path3.call(print6, "pattern")
14669
14669
  ]);
14670
14670
  case "ObjectProperty":
14671
14671
  case "Property": {
14672
14672
  if (n.method || n.kind === "get" || n.kind === "set") {
14673
- return printMethod(path3, options, print5);
14673
+ return printMethod(path3, options, print6);
14674
14674
  }
14675
14675
  if (n.shorthand && n.value.type === "AssignmentPattern") {
14676
- return path3.call(print5, "value");
14676
+ return path3.call(print6, "value");
14677
14677
  }
14678
- var key = path3.call(print5, "key");
14678
+ var key = path3.call(print6, "key");
14679
14679
  if (n.computed) {
14680
14680
  parts.push("[", key, "]");
14681
14681
  } else {
14682
14682
  parts.push(key);
14683
14683
  }
14684
14684
  if (!n.shorthand || n.key.name !== n.value.name) {
14685
- parts.push(": ", path3.call(print5, "value"));
14685
+ parts.push(": ", path3.call(print6, "value"));
14686
14686
  }
14687
14687
  return (0, lines_1.concat)(parts);
14688
14688
  }
@@ -14690,18 +14690,18 @@ var require_printer2 = __commonJS({
14690
14690
  case "ObjectMethod":
14691
14691
  case "ClassPrivateMethod":
14692
14692
  case "TSDeclareMethod":
14693
- return printMethod(path3, options, print5);
14693
+ return printMethod(path3, options, print6);
14694
14694
  case "PrivateName":
14695
- return (0, lines_1.concat)(["#", path3.call(print5, "id")]);
14695
+ return (0, lines_1.concat)(["#", path3.call(print6, "id")]);
14696
14696
  case "Decorator":
14697
- return (0, lines_1.concat)(["@", path3.call(print5, "expression")]);
14697
+ return (0, lines_1.concat)(["@", path3.call(print6, "expression")]);
14698
14698
  case "TupleExpression":
14699
14699
  parts.push("#");
14700
14700
  case "ArrayExpression":
14701
14701
  case "ArrayPattern": {
14702
14702
  var elems = n.elements;
14703
14703
  var len_2 = elems.length;
14704
- var printed_1 = path3.map(print5, "elements");
14704
+ var printed_1 = path3.map(print6, "elements");
14705
14705
  var joined = (0, lines_1.fromString)(", ").join(printed_1);
14706
14706
  var oneLine_2 = joined.getLineLength(1) <= options.wrapColumn;
14707
14707
  if (oneLine_2) {
@@ -14739,12 +14739,12 @@ var require_printer2 = __commonJS({
14739
14739
  parts.push("]");
14740
14740
  }
14741
14741
  if (n.typeAnnotation) {
14742
- parts.push(path3.call(print5, "typeAnnotation"));
14742
+ parts.push(path3.call(print6, "typeAnnotation"));
14743
14743
  }
14744
14744
  return (0, lines_1.concat)(parts);
14745
14745
  }
14746
14746
  case "SequenceExpression":
14747
- return (0, lines_1.fromString)(", ").join(path3.map(print5, "expressions"));
14747
+ return (0, lines_1.fromString)(", ").join(path3.map(print6, "expressions"));
14748
14748
  case "ThisExpression":
14749
14749
  return (0, lines_1.fromString)("this");
14750
14750
  case "Super":
@@ -14765,7 +14765,7 @@ var require_printer2 = __commonJS({
14765
14765
  case "Literal":
14766
14766
  return (0, lines_1.fromString)(getPossibleRaw(n) || (typeof n.value === "string" ? nodeStr(n.value, options) : n.value), options);
14767
14767
  case "Directive":
14768
- return path3.call(print5, "value");
14768
+ return path3.call(print6, "value");
14769
14769
  case "DirectiveLiteral":
14770
14770
  return (0, lines_1.fromString)(getPossibleRaw(n) || nodeStr(n.value, options), options);
14771
14771
  case "InterpreterDirective":
@@ -14779,32 +14779,32 @@ var require_printer2 = __commonJS({
14779
14779
  parts.push(n.operator);
14780
14780
  if (/[a-z]$/.test(n.operator))
14781
14781
  parts.push(" ");
14782
- parts.push(path3.call(print5, "argument"));
14782
+ parts.push(path3.call(print6, "argument"));
14783
14783
  return (0, lines_1.concat)(parts);
14784
14784
  case "UpdateExpression":
14785
- parts.push(path3.call(print5, "argument"), n.operator);
14785
+ parts.push(path3.call(print6, "argument"), n.operator);
14786
14786
  if (n.prefix)
14787
14787
  parts.reverse();
14788
14788
  return (0, lines_1.concat)(parts);
14789
14789
  case "ConditionalExpression":
14790
14790
  return (0, lines_1.concat)([
14791
- path3.call(print5, "test"),
14791
+ path3.call(print6, "test"),
14792
14792
  " ? ",
14793
- path3.call(print5, "consequent"),
14793
+ path3.call(print6, "consequent"),
14794
14794
  " : ",
14795
- path3.call(print5, "alternate")
14795
+ path3.call(print6, "alternate")
14796
14796
  ]);
14797
14797
  case "NewExpression": {
14798
- parts.push("new ", path3.call(print5, "callee"));
14798
+ parts.push("new ", path3.call(print6, "callee"));
14799
14799
  if (n.typeParameters) {
14800
- parts.push(path3.call(print5, "typeParameters"));
14800
+ parts.push(path3.call(print6, "typeParameters"));
14801
14801
  }
14802
14802
  if (n.typeArguments) {
14803
- parts.push(path3.call(print5, "typeArguments"));
14803
+ parts.push(path3.call(print6, "typeArguments"));
14804
14804
  }
14805
14805
  var args = n.arguments;
14806
14806
  if (args) {
14807
- parts.push(printArgumentsList(path3, options, print5));
14807
+ parts.push(printArgumentsList(path3, options, print6));
14808
14808
  }
14809
14809
  return (0, lines_1.concat)(parts);
14810
14810
  }
@@ -14815,7 +14815,7 @@ var require_printer2 = __commonJS({
14815
14815
  parts.push(n.kind, " ");
14816
14816
  var maxLen_1 = 0;
14817
14817
  var printed = path3.map(function(childPath) {
14818
- var lines2 = print5(childPath);
14818
+ var lines2 = print6(childPath);
14819
14819
  maxLen_1 = Math.max(lines2.length, maxLen_1);
14820
14820
  return lines2;
14821
14821
  }, "declarations");
@@ -14834,30 +14834,30 @@ var require_printer2 = __commonJS({
14834
14834
  }
14835
14835
  case "VariableDeclarator":
14836
14836
  return n.init ? (0, lines_1.fromString)(" = ").join([
14837
- path3.call(print5, "id"),
14838
- path3.call(print5, "init")
14839
- ]) : path3.call(print5, "id");
14837
+ path3.call(print6, "id"),
14838
+ path3.call(print6, "init")
14839
+ ]) : path3.call(print6, "id");
14840
14840
  case "WithStatement":
14841
14841
  return (0, lines_1.concat)([
14842
14842
  "with (",
14843
- path3.call(print5, "object"),
14843
+ path3.call(print6, "object"),
14844
14844
  ") ",
14845
- path3.call(print5, "body")
14845
+ path3.call(print6, "body")
14846
14846
  ]);
14847
14847
  case "IfStatement": {
14848
- var con = adjustClause(path3.call(print5, "consequent"), options);
14849
- parts.push("if (", path3.call(print5, "test"), ")", con);
14848
+ var con = adjustClause(path3.call(print6, "consequent"), options);
14849
+ parts.push("if (", path3.call(print6, "test"), ")", con);
14850
14850
  if (n.alternate)
14851
- parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path3.call(print5, "alternate"), options));
14851
+ parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path3.call(print6, "alternate"), options));
14852
14852
  return (0, lines_1.concat)(parts);
14853
14853
  }
14854
14854
  case "ForStatement": {
14855
- var init = path3.call(print5, "init");
14855
+ var init = path3.call(print6, "init");
14856
14856
  var sep2 = init.length > 1 ? ";\n" : "; ";
14857
14857
  var forParen = "for (";
14858
- var indented = (0, lines_1.fromString)(sep2).join([init, path3.call(print5, "test"), path3.call(print5, "update")]).indentTail(forParen.length);
14858
+ var indented = (0, lines_1.fromString)(sep2).join([init, path3.call(print6, "test"), path3.call(print6, "update")]).indentTail(forParen.length);
14859
14859
  var head = (0, lines_1.concat)([forParen, indented, ")"]);
14860
- var clause = adjustClause(path3.call(print5, "body"), options);
14860
+ var clause = adjustClause(path3.call(print6, "body"), options);
14861
14861
  parts.push(head);
14862
14862
  if (head.length > 1) {
14863
14863
  parts.push("\n");
@@ -14869,18 +14869,18 @@ var require_printer2 = __commonJS({
14869
14869
  case "WhileStatement":
14870
14870
  return (0, lines_1.concat)([
14871
14871
  "while (",
14872
- path3.call(print5, "test"),
14872
+ path3.call(print6, "test"),
14873
14873
  ")",
14874
- adjustClause(path3.call(print5, "body"), options)
14874
+ adjustClause(path3.call(print6, "body"), options)
14875
14875
  ]);
14876
14876
  case "ForInStatement":
14877
14877
  return (0, lines_1.concat)([
14878
14878
  n.each ? "for each (" : "for (",
14879
- path3.call(print5, "left"),
14879
+ path3.call(print6, "left"),
14880
14880
  " in ",
14881
- path3.call(print5, "right"),
14881
+ path3.call(print6, "right"),
14882
14882
  ")",
14883
- adjustClause(path3.call(print5, "body"), options)
14883
+ adjustClause(path3.call(print6, "body"), options)
14884
14884
  ]);
14885
14885
  case "ForOfStatement":
14886
14886
  case "ForAwaitStatement":
@@ -14888,122 +14888,122 @@ var require_printer2 = __commonJS({
14888
14888
  if (n.await || n.type === "ForAwaitStatement") {
14889
14889
  parts.push("await ");
14890
14890
  }
14891
- parts.push("(", path3.call(print5, "left"), " of ", path3.call(print5, "right"), ")", adjustClause(path3.call(print5, "body"), options));
14891
+ parts.push("(", path3.call(print6, "left"), " of ", path3.call(print6, "right"), ")", adjustClause(path3.call(print6, "body"), options));
14892
14892
  return (0, lines_1.concat)(parts);
14893
14893
  case "DoWhileStatement": {
14894
14894
  var doBody = (0, lines_1.concat)([
14895
14895
  "do",
14896
- adjustClause(path3.call(print5, "body"), options)
14896
+ adjustClause(path3.call(print6, "body"), options)
14897
14897
  ]);
14898
14898
  parts.push(doBody);
14899
14899
  if (endsWithBrace(doBody))
14900
14900
  parts.push(" while");
14901
14901
  else
14902
14902
  parts.push("\nwhile");
14903
- parts.push(" (", path3.call(print5, "test"), ");");
14903
+ parts.push(" (", path3.call(print6, "test"), ");");
14904
14904
  return (0, lines_1.concat)(parts);
14905
14905
  }
14906
14906
  case "DoExpression": {
14907
14907
  var statements = path3.call(function(bodyPath) {
14908
- return printStatementSequence(bodyPath, options, print5);
14908
+ return printStatementSequence(bodyPath, options, print6);
14909
14909
  }, "body");
14910
14910
  return (0, lines_1.concat)(["do {\n", statements.indent(options.tabWidth), "\n}"]);
14911
14911
  }
14912
14912
  case "BreakStatement":
14913
14913
  parts.push("break");
14914
14914
  if (n.label)
14915
- parts.push(" ", path3.call(print5, "label"));
14915
+ parts.push(" ", path3.call(print6, "label"));
14916
14916
  parts.push(";");
14917
14917
  return (0, lines_1.concat)(parts);
14918
14918
  case "ContinueStatement":
14919
14919
  parts.push("continue");
14920
14920
  if (n.label)
14921
- parts.push(" ", path3.call(print5, "label"));
14921
+ parts.push(" ", path3.call(print6, "label"));
14922
14922
  parts.push(";");
14923
14923
  return (0, lines_1.concat)(parts);
14924
14924
  case "LabeledStatement":
14925
14925
  return (0, lines_1.concat)([
14926
- path3.call(print5, "label"),
14926
+ path3.call(print6, "label"),
14927
14927
  ":\n",
14928
- path3.call(print5, "body")
14928
+ path3.call(print6, "body")
14929
14929
  ]);
14930
14930
  case "TryStatement":
14931
- parts.push("try ", path3.call(print5, "block"));
14931
+ parts.push("try ", path3.call(print6, "block"));
14932
14932
  if (n.handler) {
14933
- parts.push(" ", path3.call(print5, "handler"));
14933
+ parts.push(" ", path3.call(print6, "handler"));
14934
14934
  } else if (n.handlers) {
14935
14935
  path3.each(function(handlerPath) {
14936
- parts.push(" ", print5(handlerPath));
14936
+ parts.push(" ", print6(handlerPath));
14937
14937
  }, "handlers");
14938
14938
  }
14939
14939
  if (n.finalizer) {
14940
- parts.push(" finally ", path3.call(print5, "finalizer"));
14940
+ parts.push(" finally ", path3.call(print6, "finalizer"));
14941
14941
  }
14942
14942
  return (0, lines_1.concat)(parts);
14943
14943
  case "CatchClause":
14944
14944
  parts.push("catch ");
14945
14945
  if (n.param) {
14946
- parts.push("(", path3.call(print5, "param"));
14946
+ parts.push("(", path3.call(print6, "param"));
14947
14947
  }
14948
14948
  if (n.guard) {
14949
- parts.push(" if ", path3.call(print5, "guard"));
14949
+ parts.push(" if ", path3.call(print6, "guard"));
14950
14950
  }
14951
14951
  if (n.param) {
14952
14952
  parts.push(") ");
14953
14953
  }
14954
- parts.push(path3.call(print5, "body"));
14954
+ parts.push(path3.call(print6, "body"));
14955
14955
  return (0, lines_1.concat)(parts);
14956
14956
  case "ThrowStatement":
14957
- return (0, lines_1.concat)(["throw ", path3.call(print5, "argument"), ";"]);
14957
+ return (0, lines_1.concat)(["throw ", path3.call(print6, "argument"), ";"]);
14958
14958
  case "SwitchStatement":
14959
14959
  return (0, lines_1.concat)([
14960
14960
  "switch (",
14961
- path3.call(print5, "discriminant"),
14961
+ path3.call(print6, "discriminant"),
14962
14962
  ") {\n",
14963
- (0, lines_1.fromString)("\n").join(path3.map(print5, "cases")),
14963
+ (0, lines_1.fromString)("\n").join(path3.map(print6, "cases")),
14964
14964
  "\n}"
14965
14965
  ]);
14966
14966
  case "SwitchCase":
14967
14967
  if (n.test)
14968
- parts.push("case ", path3.call(print5, "test"), ":");
14968
+ parts.push("case ", path3.call(print6, "test"), ":");
14969
14969
  else
14970
14970
  parts.push("default:");
14971
14971
  if (n.consequent.length > 0) {
14972
14972
  parts.push("\n", path3.call(function(consequentPath) {
14973
- return printStatementSequence(consequentPath, options, print5);
14973
+ return printStatementSequence(consequentPath, options, print6);
14974
14974
  }, "consequent").indent(options.tabWidth));
14975
14975
  }
14976
14976
  return (0, lines_1.concat)(parts);
14977
14977
  case "DebuggerStatement":
14978
14978
  return (0, lines_1.fromString)("debugger;");
14979
14979
  case "JSXAttribute":
14980
- parts.push(path3.call(print5, "name"));
14980
+ parts.push(path3.call(print6, "name"));
14981
14981
  if (n.value)
14982
- parts.push("=", path3.call(print5, "value"));
14982
+ parts.push("=", path3.call(print6, "value"));
14983
14983
  return (0, lines_1.concat)(parts);
14984
14984
  case "JSXIdentifier":
14985
14985
  return (0, lines_1.fromString)(n.name, options);
14986
14986
  case "JSXNamespacedName":
14987
14987
  return (0, lines_1.fromString)(":").join([
14988
- path3.call(print5, "namespace"),
14989
- path3.call(print5, "name")
14988
+ path3.call(print6, "namespace"),
14989
+ path3.call(print6, "name")
14990
14990
  ]);
14991
14991
  case "JSXMemberExpression":
14992
14992
  return (0, lines_1.fromString)(".").join([
14993
- path3.call(print5, "object"),
14994
- path3.call(print5, "property")
14993
+ path3.call(print6, "object"),
14994
+ path3.call(print6, "property")
14995
14995
  ]);
14996
14996
  case "JSXSpreadAttribute":
14997
- return (0, lines_1.concat)(["{...", path3.call(print5, "argument"), "}"]);
14997
+ return (0, lines_1.concat)(["{...", path3.call(print6, "argument"), "}"]);
14998
14998
  case "JSXSpreadChild":
14999
- return (0, lines_1.concat)(["{...", path3.call(print5, "expression"), "}"]);
14999
+ return (0, lines_1.concat)(["{...", path3.call(print6, "expression"), "}"]);
15000
15000
  case "JSXExpressionContainer":
15001
- return (0, lines_1.concat)(["{", path3.call(print5, "expression"), "}"]);
15001
+ return (0, lines_1.concat)(["{", path3.call(print6, "expression"), "}"]);
15002
15002
  case "JSXElement":
15003
15003
  case "JSXFragment": {
15004
15004
  var openingPropName = "opening" + (n.type === "JSXElement" ? "Element" : "Fragment");
15005
15005
  var closingPropName = "closing" + (n.type === "JSXElement" ? "Element" : "Fragment");
15006
- var openingLines = path3.call(print5, openingPropName);
15006
+ var openingLines = path3.call(print6, openingPropName);
15007
15007
  if (n[openingPropName].selfClosing) {
15008
15008
  assert_1.default.ok(!n[closingPropName], "unexpected " + closingPropName + " element in self-closing " + n.type);
15009
15009
  return openingLines;
@@ -15017,16 +15017,16 @@ var require_printer2 = __commonJS({
15017
15017
  return "\n";
15018
15018
  }
15019
15019
  }
15020
- return print5(childPath);
15020
+ return print6(childPath);
15021
15021
  }, "children")).indentTail(options.tabWidth);
15022
- var closingLines = path3.call(print5, closingPropName);
15022
+ var closingLines = path3.call(print6, closingPropName);
15023
15023
  return (0, lines_1.concat)([openingLines, childLines, closingLines]);
15024
15024
  }
15025
15025
  case "JSXOpeningElement": {
15026
- parts.push("<", path3.call(print5, "name"));
15026
+ parts.push("<", path3.call(print6, "name"));
15027
15027
  var attrParts_1 = [];
15028
15028
  path3.each(function(attrPath) {
15029
- attrParts_1.push(" ", print5(attrPath));
15029
+ attrParts_1.push(" ", print6(attrPath));
15030
15030
  }, "attributes");
15031
15031
  var attrLines = (0, lines_1.concat)(attrParts_1);
15032
15032
  var needLineWrap = attrLines.length > 1 || attrLines.getLineLength(1) > options.wrapColumn;
@@ -15043,7 +15043,7 @@ var require_printer2 = __commonJS({
15043
15043
  return (0, lines_1.concat)(parts);
15044
15044
  }
15045
15045
  case "JSXClosingElement":
15046
- return (0, lines_1.concat)(["</", path3.call(print5, "name"), ">"]);
15046
+ return (0, lines_1.concat)(["</", path3.call(print6, "name"), ">"]);
15047
15047
  case "JSXOpeningFragment":
15048
15048
  return (0, lines_1.fromString)("<>");
15049
15049
  case "JSXClosingFragment":
@@ -15054,9 +15054,9 @@ var require_printer2 = __commonJS({
15054
15054
  return (0, lines_1.fromString)("");
15055
15055
  case "TypeAnnotatedIdentifier":
15056
15056
  return (0, lines_1.concat)([
15057
- path3.call(print5, "annotation"),
15057
+ path3.call(print6, "annotation"),
15058
15058
  " ",
15059
- path3.call(print5, "identifier")
15059
+ path3.call(print6, "identifier")
15060
15060
  ]);
15061
15061
  case "ClassBody":
15062
15062
  if (n.body.length === 0) {
@@ -15065,12 +15065,12 @@ var require_printer2 = __commonJS({
15065
15065
  return (0, lines_1.concat)([
15066
15066
  "{\n",
15067
15067
  path3.call(function(bodyPath) {
15068
- return printStatementSequence(bodyPath, options, print5);
15068
+ return printStatementSequence(bodyPath, options, print6);
15069
15069
  }, "body").indent(options.tabWidth),
15070
15070
  "\n}"
15071
15071
  ]);
15072
15072
  case "ClassPropertyDefinition":
15073
- parts.push("static ", path3.call(print5, "definition"));
15073
+ parts.push("static ", path3.call(print6, "definition"));
15074
15074
  if (!namedTypes.MethodDefinition.check(n.definition))
15075
15075
  parts.push(";");
15076
15076
  return (0, lines_1.concat)(parts);
@@ -15091,12 +15091,12 @@ var require_printer2 = __commonJS({
15091
15091
  if (n.readonly) {
15092
15092
  parts.push("readonly ");
15093
15093
  }
15094
- var key = path3.call(print5, "key");
15094
+ var key = path3.call(print6, "key");
15095
15095
  if (n.computed) {
15096
15096
  key = (0, lines_1.concat)(["[", key, "]"]);
15097
15097
  }
15098
15098
  if (n.variance) {
15099
- key = (0, lines_1.concat)([printVariance(path3, print5), key]);
15099
+ key = (0, lines_1.concat)([printVariance(path3, print6), key]);
15100
15100
  }
15101
15101
  parts.push(key);
15102
15102
  if (n.optional) {
@@ -15106,10 +15106,10 @@ var require_printer2 = __commonJS({
15106
15106
  parts.push("!");
15107
15107
  }
15108
15108
  if (n.typeAnnotation) {
15109
- parts.push(path3.call(print5, "typeAnnotation"));
15109
+ parts.push(path3.call(print6, "typeAnnotation"));
15110
15110
  }
15111
15111
  if (n.value) {
15112
- parts.push(" = ", path3.call(print5, "value"));
15112
+ parts.push(" = ", path3.call(print6, "value"));
15113
15113
  }
15114
15114
  parts.push(";");
15115
15115
  return (0, lines_1.concat)(parts);
@@ -15118,21 +15118,21 @@ var require_printer2 = __commonJS({
15118
15118
  if (n.static) {
15119
15119
  parts.push("static ");
15120
15120
  }
15121
- parts.push(path3.call(print5, "key"));
15121
+ parts.push(path3.call(print6, "key"));
15122
15122
  if (n.typeAnnotation) {
15123
- parts.push(path3.call(print5, "typeAnnotation"));
15123
+ parts.push(path3.call(print6, "typeAnnotation"));
15124
15124
  }
15125
15125
  if (n.value) {
15126
- parts.push(" = ", path3.call(print5, "value"));
15126
+ parts.push(" = ", path3.call(print6, "value"));
15127
15127
  }
15128
15128
  parts.push(";");
15129
15129
  return (0, lines_1.concat)(parts);
15130
15130
  case "ClassAccessorProperty": {
15131
15131
  parts.push.apply(parts, tslib_1.__spreadArray(tslib_1.__spreadArray([], printClassMemberModifiers(n), false), ["accessor "], false));
15132
15132
  if (n.computed) {
15133
- parts.push("[", path3.call(print5, "key"), "]");
15133
+ parts.push("[", path3.call(print6, "key"), "]");
15134
15134
  } else {
15135
- parts.push(path3.call(print5, "key"));
15135
+ parts.push(path3.call(print6, "key"));
15136
15136
  }
15137
15137
  if (n.optional) {
15138
15138
  parts.push("?");
@@ -15141,10 +15141,10 @@ var require_printer2 = __commonJS({
15141
15141
  parts.push("!");
15142
15142
  }
15143
15143
  if (n.typeAnnotation) {
15144
- parts.push(path3.call(print5, "typeAnnotation"));
15144
+ parts.push(path3.call(print6, "typeAnnotation"));
15145
15145
  }
15146
15146
  if (n.value) {
15147
- parts.push(" = ", path3.call(print5, "value"));
15147
+ parts.push(" = ", path3.call(print6, "value"));
15148
15148
  }
15149
15149
  parts.push(";");
15150
15150
  return (0, lines_1.concat)(parts);
@@ -15160,21 +15160,21 @@ var require_printer2 = __commonJS({
15160
15160
  }
15161
15161
  parts.push("class");
15162
15162
  if (n.id) {
15163
- parts.push(" ", path3.call(print5, "id"));
15163
+ parts.push(" ", path3.call(print6, "id"));
15164
15164
  }
15165
15165
  if (n.typeParameters) {
15166
- parts.push(path3.call(print5, "typeParameters"));
15166
+ parts.push(path3.call(print6, "typeParameters"));
15167
15167
  }
15168
15168
  if (n.superClass) {
15169
- parts.push(" extends ", path3.call(print5, "superClass"), path3.call(print5, "superTypeParameters"));
15169
+ parts.push(" extends ", path3.call(print6, "superClass"), path3.call(print6, "superTypeParameters"));
15170
15170
  }
15171
15171
  if (n.extends && n.extends.length > 0) {
15172
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print5, "extends")));
15172
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print6, "extends")));
15173
15173
  }
15174
15174
  if (n["implements"] && n["implements"].length > 0) {
15175
- parts.push(" implements ", (0, lines_1.fromString)(", ").join(path3.map(print5, "implements")));
15175
+ parts.push(" implements ", (0, lines_1.fromString)(", ").join(path3.map(print6, "implements")));
15176
15176
  }
15177
- parts.push(" ", path3.call(print5, "body"));
15177
+ parts.push(" ", path3.call(print6, "body"));
15178
15178
  if (n.type === "DeclareClass") {
15179
15179
  return printFlowDeclaration(path3, parts);
15180
15180
  } else {
@@ -15183,11 +15183,11 @@ var require_printer2 = __commonJS({
15183
15183
  case "TemplateElement":
15184
15184
  return (0, lines_1.fromString)(n.value.raw, options).lockIndentTail();
15185
15185
  case "TemplateLiteral": {
15186
- var expressions_1 = path3.map(print5, "expressions");
15186
+ var expressions_1 = path3.map(print6, "expressions");
15187
15187
  parts.push("`");
15188
15188
  path3.each(function(childPath) {
15189
15189
  var i2 = childPath.getName();
15190
- parts.push(print5(childPath));
15190
+ parts.push(print6(childPath));
15191
15191
  if (i2 < expressions_1.length) {
15192
15192
  parts.push("${", expressions_1[i2], "}");
15193
15193
  }
@@ -15196,7 +15196,7 @@ var require_printer2 = __commonJS({
15196
15196
  return (0, lines_1.concat)(parts).lockIndentTail();
15197
15197
  }
15198
15198
  case "TaggedTemplateExpression":
15199
- return (0, lines_1.concat)([path3.call(print5, "tag"), path3.call(print5, "quasi")]);
15199
+ return (0, lines_1.concat)([path3.call(print6, "tag"), path3.call(print6, "quasi")]);
15200
15200
  case "Node":
15201
15201
  case "Printable":
15202
15202
  case "SourceLocation":
@@ -15230,7 +15230,7 @@ var require_printer2 = __commonJS({
15230
15230
  if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
15231
15231
  parts.push(": ");
15232
15232
  }
15233
- parts.push(path3.call(print5, "typeAnnotation"));
15233
+ parts.push(path3.call(print6, "typeAnnotation"));
15234
15234
  return (0, lines_1.concat)(parts);
15235
15235
  }
15236
15236
  return (0, lines_1.fromString)("");
@@ -15244,9 +15244,9 @@ var require_printer2 = __commonJS({
15244
15244
  case "MixedTypeAnnotation":
15245
15245
  return (0, lines_1.fromString)("mixed", options);
15246
15246
  case "ArrayTypeAnnotation":
15247
- return (0, lines_1.concat)([path3.call(print5, "elementType"), "[]"]);
15247
+ return (0, lines_1.concat)([path3.call(print6, "elementType"), "[]"]);
15248
15248
  case "TupleTypeAnnotation": {
15249
- var printed_2 = path3.map(print5, "types");
15249
+ var printed_2 = path3.map(print6, "types");
15250
15250
  var joined = (0, lines_1.fromString)(", ").join(printed_2);
15251
15251
  var oneLine_3 = joined.getLineLength(1) <= options.wrapColumn;
15252
15252
  if (oneLine_3) {
@@ -15293,38 +15293,38 @@ var require_printer2 = __commonJS({
15293
15293
  case "InterfaceTypeAnnotation":
15294
15294
  parts.push("interface");
15295
15295
  if (n.extends && n.extends.length > 0) {
15296
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print5, "extends")));
15296
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print6, "extends")));
15297
15297
  }
15298
- parts.push(" ", path3.call(print5, "body"));
15298
+ parts.push(" ", path3.call(print6, "body"));
15299
15299
  return (0, lines_1.concat)(parts);
15300
15300
  case "DeclareFunction":
15301
15301
  return printFlowDeclaration(path3, [
15302
15302
  "function ",
15303
- path3.call(print5, "id"),
15303
+ path3.call(print6, "id"),
15304
15304
  ";"
15305
15305
  ]);
15306
15306
  case "DeclareModule":
15307
15307
  return printFlowDeclaration(path3, [
15308
15308
  "module ",
15309
- path3.call(print5, "id"),
15309
+ path3.call(print6, "id"),
15310
15310
  " ",
15311
- path3.call(print5, "body")
15311
+ path3.call(print6, "body")
15312
15312
  ]);
15313
15313
  case "DeclareModuleExports":
15314
15314
  return printFlowDeclaration(path3, [
15315
15315
  "module.exports",
15316
- path3.call(print5, "typeAnnotation")
15316
+ path3.call(print6, "typeAnnotation")
15317
15317
  ]);
15318
15318
  case "DeclareVariable":
15319
- return printFlowDeclaration(path3, ["var ", path3.call(print5, "id"), ";"]);
15319
+ return printFlowDeclaration(path3, ["var ", path3.call(print6, "id"), ";"]);
15320
15320
  case "DeclareExportDeclaration":
15321
15321
  case "DeclareExportAllDeclaration":
15322
- return (0, lines_1.concat)(["declare ", printExportDeclaration(path3, options, print5)]);
15322
+ return (0, lines_1.concat)(["declare ", printExportDeclaration(path3, options, print6)]);
15323
15323
  case "EnumDeclaration":
15324
15324
  return (0, lines_1.concat)([
15325
15325
  "enum ",
15326
- path3.call(print5, "id"),
15327
- path3.call(print5, "body")
15326
+ path3.call(print6, "id"),
15327
+ path3.call(print6, "body")
15328
15328
  ]);
15329
15329
  case "EnumBooleanBody":
15330
15330
  case "EnumNumberBody":
@@ -15336,24 +15336,24 @@ var require_printer2 = __commonJS({
15336
15336
  n.type.slice(4, -4).toLowerCase()
15337
15337
  );
15338
15338
  }
15339
- parts.push(" {\n", (0, lines_1.fromString)("\n").join(path3.map(print5, "members")).indent(options.tabWidth), "\n}");
15339
+ parts.push(" {\n", (0, lines_1.fromString)("\n").join(path3.map(print6, "members")).indent(options.tabWidth), "\n}");
15340
15340
  return (0, lines_1.concat)(parts);
15341
15341
  }
15342
15342
  case "EnumDefaultedMember":
15343
- return (0, lines_1.concat)([path3.call(print5, "id"), ","]);
15343
+ return (0, lines_1.concat)([path3.call(print6, "id"), ","]);
15344
15344
  case "EnumBooleanMember":
15345
15345
  case "EnumNumberMember":
15346
15346
  case "EnumStringMember":
15347
15347
  return (0, lines_1.concat)([
15348
- path3.call(print5, "id"),
15348
+ path3.call(print6, "id"),
15349
15349
  " = ",
15350
- path3.call(print5, "init"),
15350
+ path3.call(print6, "init"),
15351
15351
  ","
15352
15352
  ]);
15353
15353
  case "InferredPredicate":
15354
15354
  return (0, lines_1.fromString)("%checks", options);
15355
15355
  case "DeclaredPredicate":
15356
- return (0, lines_1.concat)(["%checks(", path3.call(print5, "value"), ")"]);
15356
+ return (0, lines_1.concat)(["%checks(", path3.call(print6, "value"), ")"]);
15357
15357
  case "FunctionTypeAnnotation": {
15358
15358
  var parent = path3.getParentNode(0);
15359
15359
  var isArrowFunctionTypeAnnotation = !(namedTypes.ObjectTypeCallProperty.check(parent) || namedTypes.ObjectTypeInternalSlot.check(parent) && parent.method || namedTypes.DeclareFunction.check(path3.getParentNode(2)));
@@ -15363,14 +15363,14 @@ var require_printer2 = __commonJS({
15363
15363
  }
15364
15364
  var hasTypeParameters = !!n.typeParameters;
15365
15365
  var needsParens = hasTypeParameters || n.params.length !== 1 || n.params[0].name;
15366
- parts.push(hasTypeParameters ? path3.call(print5, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path3, options, print5), needsParens ? ")" : "");
15366
+ parts.push(hasTypeParameters ? path3.call(print6, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path3, options, print6), needsParens ? ")" : "");
15367
15367
  if (n.returnType) {
15368
- parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path3.call(print5, "returnType"));
15368
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path3.call(print6, "returnType"));
15369
15369
  }
15370
15370
  return (0, lines_1.concat)(parts);
15371
15371
  }
15372
15372
  case "FunctionTypeParam": {
15373
- var name = path3.call(print5, "name");
15373
+ var name = path3.call(print6, "name");
15374
15374
  parts.push(name);
15375
15375
  if (n.optional) {
15376
15376
  parts.push("?");
@@ -15378,13 +15378,13 @@ var require_printer2 = __commonJS({
15378
15378
  if (name.infos[0].line) {
15379
15379
  parts.push(": ");
15380
15380
  }
15381
- parts.push(path3.call(print5, "typeAnnotation"));
15381
+ parts.push(path3.call(print6, "typeAnnotation"));
15382
15382
  return (0, lines_1.concat)(parts);
15383
15383
  }
15384
15384
  case "GenericTypeAnnotation":
15385
15385
  return (0, lines_1.concat)([
15386
- path3.call(print5, "id"),
15387
- path3.call(print5, "typeParameters")
15386
+ path3.call(print6, "id"),
15387
+ path3.call(print6, "typeParameters")
15388
15388
  ]);
15389
15389
  case "DeclareInterface":
15390
15390
  parts.push("declare ");
@@ -15393,24 +15393,24 @@ var require_printer2 = __commonJS({
15393
15393
  if (n.declare) {
15394
15394
  parts.push("declare ");
15395
15395
  }
15396
- parts.push("interface ", path3.call(print5, "id"), path3.call(print5, "typeParameters"), " ");
15396
+ parts.push("interface ", path3.call(print6, "id"), path3.call(print6, "typeParameters"), " ");
15397
15397
  if (n["extends"] && n["extends"].length > 0) {
15398
- parts.push("extends ", (0, lines_1.fromString)(", ").join(path3.map(print5, "extends")), " ");
15398
+ parts.push("extends ", (0, lines_1.fromString)(", ").join(path3.map(print6, "extends")), " ");
15399
15399
  }
15400
15400
  if (n.body) {
15401
- parts.push(path3.call(print5, "body"));
15401
+ parts.push(path3.call(print6, "body"));
15402
15402
  }
15403
15403
  return (0, lines_1.concat)(parts);
15404
15404
  case "ClassImplements":
15405
15405
  case "InterfaceExtends":
15406
15406
  return (0, lines_1.concat)([
15407
- path3.call(print5, "id"),
15408
- path3.call(print5, "typeParameters")
15407
+ path3.call(print6, "id"),
15408
+ path3.call(print6, "typeParameters")
15409
15409
  ]);
15410
15410
  case "IntersectionTypeAnnotation":
15411
- return (0, lines_1.fromString)(" & ").join(path3.map(print5, "types"));
15411
+ return (0, lines_1.fromString)(" & ").join(path3.map(print6, "types"));
15412
15412
  case "NullableTypeAnnotation":
15413
- return (0, lines_1.concat)(["?", path3.call(print5, "typeAnnotation")]);
15413
+ return (0, lines_1.concat)(["?", path3.call(print6, "typeAnnotation")]);
15414
15414
  case "NullLiteralTypeAnnotation":
15415
15415
  return (0, lines_1.fromString)("null", options);
15416
15416
  case "ThisTypeAnnotation":
@@ -15418,40 +15418,40 @@ var require_printer2 = __commonJS({
15418
15418
  case "NumberTypeAnnotation":
15419
15419
  return (0, lines_1.fromString)("number", options);
15420
15420
  case "ObjectTypeCallProperty":
15421
- return path3.call(print5, "value");
15421
+ return path3.call(print6, "value");
15422
15422
  case "ObjectTypeIndexer":
15423
15423
  if (n.static) {
15424
15424
  parts.push("static ");
15425
15425
  }
15426
- parts.push(printVariance(path3, print5), "[");
15426
+ parts.push(printVariance(path3, print6), "[");
15427
15427
  if (n.id) {
15428
- parts.push(path3.call(print5, "id"), ": ");
15428
+ parts.push(path3.call(print6, "id"), ": ");
15429
15429
  }
15430
- parts.push(path3.call(print5, "key"), "]: ", path3.call(print5, "value"));
15430
+ parts.push(path3.call(print6, "key"), "]: ", path3.call(print6, "value"));
15431
15431
  return (0, lines_1.concat)(parts);
15432
15432
  case "ObjectTypeProperty":
15433
15433
  return (0, lines_1.concat)([
15434
- printVariance(path3, print5),
15435
- path3.call(print5, "key"),
15434
+ printVariance(path3, print6),
15435
+ path3.call(print6, "key"),
15436
15436
  n.optional ? "?" : "",
15437
15437
  ": ",
15438
- path3.call(print5, "value")
15438
+ path3.call(print6, "value")
15439
15439
  ]);
15440
15440
  case "ObjectTypeInternalSlot":
15441
15441
  return (0, lines_1.concat)([
15442
15442
  n.static ? "static " : "",
15443
15443
  "[[",
15444
- path3.call(print5, "id"),
15444
+ path3.call(print6, "id"),
15445
15445
  "]]",
15446
15446
  n.optional ? "?" : "",
15447
15447
  n.value.type !== "FunctionTypeAnnotation" ? ": " : "",
15448
- path3.call(print5, "value")
15448
+ path3.call(print6, "value")
15449
15449
  ]);
15450
15450
  case "QualifiedTypeIdentifier":
15451
15451
  return (0, lines_1.concat)([
15452
- path3.call(print5, "qualification"),
15452
+ path3.call(print6, "qualification"),
15453
15453
  ".",
15454
- path3.call(print5, "id")
15454
+ path3.call(print6, "id")
15455
15455
  ]);
15456
15456
  case "StringLiteralTypeAnnotation":
15457
15457
  return (0, lines_1.fromString)(nodeStr(n.value, options), options);
@@ -15468,36 +15468,36 @@ var require_printer2 = __commonJS({
15468
15468
  case "TypeAlias":
15469
15469
  return (0, lines_1.concat)([
15470
15470
  "type ",
15471
- path3.call(print5, "id"),
15472
- path3.call(print5, "typeParameters"),
15471
+ path3.call(print6, "id"),
15472
+ path3.call(print6, "typeParameters"),
15473
15473
  " = ",
15474
- path3.call(print5, "right"),
15474
+ path3.call(print6, "right"),
15475
15475
  ";"
15476
15476
  ]);
15477
15477
  case "DeclareOpaqueType":
15478
15478
  parts.push("declare ");
15479
15479
  case "OpaqueType":
15480
- parts.push("opaque type ", path3.call(print5, "id"), path3.call(print5, "typeParameters"));
15480
+ parts.push("opaque type ", path3.call(print6, "id"), path3.call(print6, "typeParameters"));
15481
15481
  if (n["supertype"]) {
15482
- parts.push(": ", path3.call(print5, "supertype"));
15482
+ parts.push(": ", path3.call(print6, "supertype"));
15483
15483
  }
15484
15484
  if (n["impltype"]) {
15485
- parts.push(" = ", path3.call(print5, "impltype"));
15485
+ parts.push(" = ", path3.call(print6, "impltype"));
15486
15486
  }
15487
15487
  parts.push(";");
15488
15488
  return (0, lines_1.concat)(parts);
15489
15489
  case "TypeCastExpression":
15490
15490
  return (0, lines_1.concat)([
15491
15491
  "(",
15492
- path3.call(print5, "expression"),
15493
- path3.call(print5, "typeAnnotation"),
15492
+ path3.call(print6, "expression"),
15493
+ path3.call(print6, "typeAnnotation"),
15494
15494
  ")"
15495
15495
  ]);
15496
15496
  case "TypeParameterDeclaration":
15497
15497
  case "TypeParameterInstantiation":
15498
15498
  return (0, lines_1.concat)([
15499
15499
  "<",
15500
- (0, lines_1.fromString)(", ").join(path3.map(print5, "params")),
15500
+ (0, lines_1.fromString)(", ").join(path3.map(print6, "params")),
15501
15501
  ">"
15502
15502
  ]);
15503
15503
  case "Variance":
@@ -15510,32 +15510,32 @@ var require_printer2 = __commonJS({
15510
15510
  return (0, lines_1.fromString)("");
15511
15511
  case "TypeParameter":
15512
15512
  if (n.variance) {
15513
- parts.push(printVariance(path3, print5));
15513
+ parts.push(printVariance(path3, print6));
15514
15514
  }
15515
- parts.push(path3.call(print5, "name"));
15515
+ parts.push(path3.call(print6, "name"));
15516
15516
  if (n.bound) {
15517
- parts.push(path3.call(print5, "bound"));
15517
+ parts.push(path3.call(print6, "bound"));
15518
15518
  }
15519
15519
  if (n["default"]) {
15520
- parts.push("=", path3.call(print5, "default"));
15520
+ parts.push("=", path3.call(print6, "default"));
15521
15521
  }
15522
15522
  return (0, lines_1.concat)(parts);
15523
15523
  case "TypeofTypeAnnotation":
15524
15524
  return (0, lines_1.concat)([
15525
15525
  (0, lines_1.fromString)("typeof ", options),
15526
- path3.call(print5, "argument")
15526
+ path3.call(print6, "argument")
15527
15527
  ]);
15528
15528
  case "IndexedAccessType":
15529
15529
  case "OptionalIndexedAccessType":
15530
15530
  return (0, lines_1.concat)([
15531
- path3.call(print5, "objectType"),
15531
+ path3.call(print6, "objectType"),
15532
15532
  n.optional ? "?." : "",
15533
15533
  "[",
15534
- path3.call(print5, "indexType"),
15534
+ path3.call(print6, "indexType"),
15535
15535
  "]"
15536
15536
  ]);
15537
15537
  case "UnionTypeAnnotation":
15538
- return (0, lines_1.fromString)(" | ").join(path3.map(print5, "types"));
15538
+ return (0, lines_1.fromString)(" | ").join(path3.map(print6, "types"));
15539
15539
  case "VoidTypeAnnotation":
15540
15540
  return (0, lines_1.fromString)("void", options);
15541
15541
  case "NullTypeAnnotation":
@@ -15575,77 +15575,77 @@ var require_printer2 = __commonJS({
15575
15575
  case "TSNeverKeyword":
15576
15576
  return (0, lines_1.fromString)("never", options);
15577
15577
  case "TSArrayType":
15578
- return (0, lines_1.concat)([path3.call(print5, "elementType"), "[]"]);
15578
+ return (0, lines_1.concat)([path3.call(print6, "elementType"), "[]"]);
15579
15579
  case "TSLiteralType":
15580
- return path3.call(print5, "literal");
15580
+ return path3.call(print6, "literal");
15581
15581
  case "TSUnionType":
15582
- return (0, lines_1.fromString)(" | ").join(path3.map(print5, "types"));
15582
+ return (0, lines_1.fromString)(" | ").join(path3.map(print6, "types"));
15583
15583
  case "TSIntersectionType":
15584
- return (0, lines_1.fromString)(" & ").join(path3.map(print5, "types"));
15584
+ return (0, lines_1.fromString)(" & ").join(path3.map(print6, "types"));
15585
15585
  case "TSConditionalType":
15586
- parts.push(path3.call(print5, "checkType"), " extends ", path3.call(print5, "extendsType"), " ? ", path3.call(print5, "trueType"), " : ", path3.call(print5, "falseType"));
15586
+ parts.push(path3.call(print6, "checkType"), " extends ", path3.call(print6, "extendsType"), " ? ", path3.call(print6, "trueType"), " : ", path3.call(print6, "falseType"));
15587
15587
  return (0, lines_1.concat)(parts);
15588
15588
  case "TSInferType":
15589
- parts.push("infer ", path3.call(print5, "typeParameter"));
15589
+ parts.push("infer ", path3.call(print6, "typeParameter"));
15590
15590
  return (0, lines_1.concat)(parts);
15591
15591
  case "TSParenthesizedType":
15592
- return (0, lines_1.concat)(["(", path3.call(print5, "typeAnnotation"), ")"]);
15592
+ return (0, lines_1.concat)(["(", path3.call(print6, "typeAnnotation"), ")"]);
15593
15593
  case "TSFunctionType":
15594
15594
  return (0, lines_1.concat)([
15595
- path3.call(print5, "typeParameters"),
15595
+ path3.call(print6, "typeParameters"),
15596
15596
  "(",
15597
- printFunctionParams(path3, options, print5),
15597
+ printFunctionParams(path3, options, print6),
15598
15598
  ") => ",
15599
- path3.call(print5, "typeAnnotation", "typeAnnotation")
15599
+ path3.call(print6, "typeAnnotation", "typeAnnotation")
15600
15600
  ]);
15601
15601
  case "TSConstructorType":
15602
15602
  return (0, lines_1.concat)([
15603
15603
  "new ",
15604
- path3.call(print5, "typeParameters"),
15604
+ path3.call(print6, "typeParameters"),
15605
15605
  "(",
15606
- printFunctionParams(path3, options, print5),
15606
+ printFunctionParams(path3, options, print6),
15607
15607
  ") => ",
15608
- path3.call(print5, "typeAnnotation", "typeAnnotation")
15608
+ path3.call(print6, "typeAnnotation", "typeAnnotation")
15609
15609
  ]);
15610
15610
  case "TSMappedType": {
15611
- parts.push(n.readonly ? "readonly " : "", "[", path3.call(print5, "typeParameter"), "]", n.optional ? "?" : "");
15611
+ parts.push(n.readonly ? "readonly " : "", "[", path3.call(print6, "typeParameter"), "]", n.optional ? "?" : "");
15612
15612
  if (n.typeAnnotation) {
15613
- parts.push(": ", path3.call(print5, "typeAnnotation"), ";");
15613
+ parts.push(": ", path3.call(print6, "typeAnnotation"), ";");
15614
15614
  }
15615
15615
  return (0, lines_1.concat)(["{\n", (0, lines_1.concat)(parts).indent(options.tabWidth), "\n}"]);
15616
15616
  }
15617
15617
  case "TSTupleType":
15618
15618
  return (0, lines_1.concat)([
15619
15619
  "[",
15620
- (0, lines_1.fromString)(", ").join(path3.map(print5, "elementTypes")),
15620
+ (0, lines_1.fromString)(", ").join(path3.map(print6, "elementTypes")),
15621
15621
  "]"
15622
15622
  ]);
15623
15623
  case "TSNamedTupleMember":
15624
- parts.push(path3.call(print5, "label"));
15624
+ parts.push(path3.call(print6, "label"));
15625
15625
  if (n.optional) {
15626
15626
  parts.push("?");
15627
15627
  }
15628
- parts.push(": ", path3.call(print5, "elementType"));
15628
+ parts.push(": ", path3.call(print6, "elementType"));
15629
15629
  return (0, lines_1.concat)(parts);
15630
15630
  case "TSRestType":
15631
- return (0, lines_1.concat)(["...", path3.call(print5, "typeAnnotation")]);
15631
+ return (0, lines_1.concat)(["...", path3.call(print6, "typeAnnotation")]);
15632
15632
  case "TSOptionalType":
15633
- return (0, lines_1.concat)([path3.call(print5, "typeAnnotation"), "?"]);
15633
+ return (0, lines_1.concat)([path3.call(print6, "typeAnnotation"), "?"]);
15634
15634
  case "TSIndexedAccessType":
15635
15635
  return (0, lines_1.concat)([
15636
- path3.call(print5, "objectType"),
15636
+ path3.call(print6, "objectType"),
15637
15637
  "[",
15638
- path3.call(print5, "indexType"),
15638
+ path3.call(print6, "indexType"),
15639
15639
  "]"
15640
15640
  ]);
15641
15641
  case "TSTypeOperator":
15642
15642
  return (0, lines_1.concat)([
15643
- path3.call(print5, "operator"),
15643
+ path3.call(print6, "operator"),
15644
15644
  " ",
15645
- path3.call(print5, "typeAnnotation")
15645
+ path3.call(print6, "typeAnnotation")
15646
15646
  ]);
15647
15647
  case "TSTypeLiteral": {
15648
- var members = (0, lines_1.fromString)("\n").join(path3.map(print5, "members").map(function(member) {
15648
+ var members = (0, lines_1.fromString)("\n").join(path3.map(print6, "members").map(function(member) {
15649
15649
  if (lastNonSpaceCharacter(member) !== ";") {
15650
15650
  return member.concat(";");
15651
15651
  }
@@ -15658,13 +15658,13 @@ var require_printer2 = __commonJS({
15658
15658
  return (0, lines_1.concat)(parts);
15659
15659
  }
15660
15660
  case "TSEnumMember":
15661
- parts.push(path3.call(print5, "id"));
15661
+ parts.push(path3.call(print6, "id"));
15662
15662
  if (n.initializer) {
15663
- parts.push(" = ", path3.call(print5, "initializer"));
15663
+ parts.push(" = ", path3.call(print6, "initializer"));
15664
15664
  }
15665
15665
  return (0, lines_1.concat)(parts);
15666
15666
  case "TSTypeQuery":
15667
- return (0, lines_1.concat)(["typeof ", path3.call(print5, "exprName")]);
15667
+ return (0, lines_1.concat)(["typeof ", path3.call(print6, "exprName")]);
15668
15668
  case "TSParameterProperty":
15669
15669
  if (n.accessibility) {
15670
15670
  parts.push(n.accessibility, " ");
@@ -15678,119 +15678,119 @@ var require_printer2 = __commonJS({
15678
15678
  if (n.readonly) {
15679
15679
  parts.push("readonly ");
15680
15680
  }
15681
- parts.push(path3.call(print5, "parameter"));
15681
+ parts.push(path3.call(print6, "parameter"));
15682
15682
  return (0, lines_1.concat)(parts);
15683
15683
  case "TSTypeReference":
15684
15684
  return (0, lines_1.concat)([
15685
- path3.call(print5, "typeName"),
15686
- path3.call(print5, "typeParameters")
15685
+ path3.call(print6, "typeName"),
15686
+ path3.call(print6, "typeParameters")
15687
15687
  ]);
15688
15688
  case "TSQualifiedName":
15689
- return (0, lines_1.concat)([path3.call(print5, "left"), ".", path3.call(print5, "right")]);
15689
+ return (0, lines_1.concat)([path3.call(print6, "left"), ".", path3.call(print6, "right")]);
15690
15690
  case "TSAsExpression":
15691
15691
  case "TSSatisfiesExpression": {
15692
- var expression = path3.call(print5, "expression");
15693
- parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path3.call(print5, "typeAnnotation"));
15692
+ var expression = path3.call(print6, "expression");
15693
+ parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path3.call(print6, "typeAnnotation"));
15694
15694
  return (0, lines_1.concat)(parts);
15695
15695
  }
15696
15696
  case "TSTypeCastExpression":
15697
15697
  return (0, lines_1.concat)([
15698
- path3.call(print5, "expression"),
15699
- path3.call(print5, "typeAnnotation")
15698
+ path3.call(print6, "expression"),
15699
+ path3.call(print6, "typeAnnotation")
15700
15700
  ]);
15701
15701
  case "TSNonNullExpression":
15702
- return (0, lines_1.concat)([path3.call(print5, "expression"), "!"]);
15702
+ return (0, lines_1.concat)([path3.call(print6, "expression"), "!"]);
15703
15703
  case "TSTypeAnnotation":
15704
- return (0, lines_1.concat)([": ", path3.call(print5, "typeAnnotation")]);
15704
+ return (0, lines_1.concat)([": ", path3.call(print6, "typeAnnotation")]);
15705
15705
  case "TSIndexSignature":
15706
15706
  return (0, lines_1.concat)([
15707
15707
  n.readonly ? "readonly " : "",
15708
15708
  "[",
15709
- path3.map(print5, "parameters"),
15709
+ path3.map(print6, "parameters"),
15710
15710
  "]",
15711
- path3.call(print5, "typeAnnotation")
15711
+ path3.call(print6, "typeAnnotation")
15712
15712
  ]);
15713
15713
  case "TSPropertySignature":
15714
- parts.push(printVariance(path3, print5), n.readonly ? "readonly " : "");
15714
+ parts.push(printVariance(path3, print6), n.readonly ? "readonly " : "");
15715
15715
  if (n.computed) {
15716
- parts.push("[", path3.call(print5, "key"), "]");
15716
+ parts.push("[", path3.call(print6, "key"), "]");
15717
15717
  } else {
15718
- parts.push(path3.call(print5, "key"));
15718
+ parts.push(path3.call(print6, "key"));
15719
15719
  }
15720
- parts.push(n.optional ? "?" : "", path3.call(print5, "typeAnnotation"));
15720
+ parts.push(n.optional ? "?" : "", path3.call(print6, "typeAnnotation"));
15721
15721
  return (0, lines_1.concat)(parts);
15722
15722
  case "TSMethodSignature":
15723
15723
  if (n.computed) {
15724
- parts.push("[", path3.call(print5, "key"), "]");
15724
+ parts.push("[", path3.call(print6, "key"), "]");
15725
15725
  } else {
15726
- parts.push(path3.call(print5, "key"));
15726
+ parts.push(path3.call(print6, "key"));
15727
15727
  }
15728
15728
  if (n.optional) {
15729
15729
  parts.push("?");
15730
15730
  }
15731
- parts.push(path3.call(print5, "typeParameters"), "(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "typeAnnotation"));
15731
+ parts.push(path3.call(print6, "typeParameters"), "(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "typeAnnotation"));
15732
15732
  return (0, lines_1.concat)(parts);
15733
15733
  case "TSTypePredicate":
15734
15734
  if (n.asserts) {
15735
15735
  parts.push("asserts ");
15736
15736
  }
15737
- parts.push(path3.call(print5, "parameterName"));
15737
+ parts.push(path3.call(print6, "parameterName"));
15738
15738
  if (n.typeAnnotation) {
15739
- parts.push(" is ", path3.call(print5, "typeAnnotation", "typeAnnotation"));
15739
+ parts.push(" is ", path3.call(print6, "typeAnnotation", "typeAnnotation"));
15740
15740
  }
15741
15741
  return (0, lines_1.concat)(parts);
15742
15742
  case "TSCallSignatureDeclaration":
15743
15743
  return (0, lines_1.concat)([
15744
- path3.call(print5, "typeParameters"),
15744
+ path3.call(print6, "typeParameters"),
15745
15745
  "(",
15746
- printFunctionParams(path3, options, print5),
15746
+ printFunctionParams(path3, options, print6),
15747
15747
  ")",
15748
- path3.call(print5, "typeAnnotation")
15748
+ path3.call(print6, "typeAnnotation")
15749
15749
  ]);
15750
15750
  case "TSConstructSignatureDeclaration":
15751
15751
  if (n.typeParameters) {
15752
- parts.push("new", path3.call(print5, "typeParameters"));
15752
+ parts.push("new", path3.call(print6, "typeParameters"));
15753
15753
  } else {
15754
15754
  parts.push("new ");
15755
15755
  }
15756
- parts.push("(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "typeAnnotation"));
15756
+ parts.push("(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "typeAnnotation"));
15757
15757
  return (0, lines_1.concat)(parts);
15758
15758
  case "TSTypeAliasDeclaration":
15759
15759
  return (0, lines_1.concat)([
15760
15760
  n.declare ? "declare " : "",
15761
15761
  "type ",
15762
- path3.call(print5, "id"),
15763
- path3.call(print5, "typeParameters"),
15762
+ path3.call(print6, "id"),
15763
+ path3.call(print6, "typeParameters"),
15764
15764
  " = ",
15765
- path3.call(print5, "typeAnnotation"),
15765
+ path3.call(print6, "typeAnnotation"),
15766
15766
  ";"
15767
15767
  ]);
15768
15768
  case "TSTypeParameter": {
15769
- parts.push(path3.call(print5, "name"));
15769
+ parts.push(path3.call(print6, "name"));
15770
15770
  var parent = path3.getParentNode(0);
15771
15771
  var isInMappedType = namedTypes.TSMappedType.check(parent);
15772
15772
  if (n.constraint) {
15773
- parts.push(isInMappedType ? " in " : " extends ", path3.call(print5, "constraint"));
15773
+ parts.push(isInMappedType ? " in " : " extends ", path3.call(print6, "constraint"));
15774
15774
  }
15775
15775
  if (n["default"]) {
15776
- parts.push(" = ", path3.call(print5, "default"));
15776
+ parts.push(" = ", path3.call(print6, "default"));
15777
15777
  }
15778
15778
  return (0, lines_1.concat)(parts);
15779
15779
  }
15780
15780
  case "TSTypeAssertion": {
15781
- parts.push("<", path3.call(print5, "typeAnnotation"), "> ", path3.call(print5, "expression"));
15781
+ parts.push("<", path3.call(print6, "typeAnnotation"), "> ", path3.call(print6, "expression"));
15782
15782
  return (0, lines_1.concat)(parts);
15783
15783
  }
15784
15784
  case "TSTypeParameterDeclaration":
15785
15785
  case "TSTypeParameterInstantiation":
15786
15786
  return (0, lines_1.concat)([
15787
15787
  "<",
15788
- (0, lines_1.fromString)(", ").join(path3.map(print5, "params")),
15788
+ (0, lines_1.fromString)(", ").join(path3.map(print6, "params")),
15789
15789
  ">"
15790
15790
  ]);
15791
15791
  case "TSEnumDeclaration": {
15792
- parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path3.call(print5, "id"));
15793
- var memberLines = (0, lines_1.fromString)(",\n").join(path3.map(print5, "members"));
15792
+ parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path3.call(print6, "id"));
15793
+ var memberLines = (0, lines_1.fromString)(",\n").join(path3.map(print6, "members"));
15794
15794
  if (memberLines.isEmpty()) {
15795
15795
  parts.push(" {}");
15796
15796
  } else {
@@ -15800,11 +15800,11 @@ var require_printer2 = __commonJS({
15800
15800
  }
15801
15801
  case "TSExpressionWithTypeArguments":
15802
15802
  return (0, lines_1.concat)([
15803
- path3.call(print5, "expression"),
15804
- path3.call(print5, "typeParameters")
15803
+ path3.call(print6, "expression"),
15804
+ path3.call(print6, "typeParameters")
15805
15805
  ]);
15806
15806
  case "TSInterfaceBody": {
15807
- var lines = (0, lines_1.fromString)("\n").join(path3.map(print5, "body").map(function(element) {
15807
+ var lines = (0, lines_1.fromString)("\n").join(path3.map(print6, "body").map(function(element) {
15808
15808
  if (lastNonSpaceCharacter(element) !== ";") {
15809
15809
  return element.concat(";");
15810
15810
  }
@@ -15816,22 +15816,22 @@ var require_printer2 = __commonJS({
15816
15816
  return (0, lines_1.concat)(["{\n", lines.indent(options.tabWidth), "\n}"]);
15817
15817
  }
15818
15818
  case "TSImportType":
15819
- parts.push("import(", path3.call(print5, "argument"), ")");
15819
+ parts.push("import(", path3.call(print6, "argument"), ")");
15820
15820
  if (n.qualifier) {
15821
- parts.push(".", path3.call(print5, "qualifier"));
15821
+ parts.push(".", path3.call(print6, "qualifier"));
15822
15822
  }
15823
15823
  if (n.typeParameters) {
15824
- parts.push(path3.call(print5, "typeParameters"));
15824
+ parts.push(path3.call(print6, "typeParameters"));
15825
15825
  }
15826
15826
  return (0, lines_1.concat)(parts);
15827
15827
  case "TSImportEqualsDeclaration":
15828
15828
  if (n.isExport) {
15829
15829
  parts.push("export ");
15830
15830
  }
15831
- parts.push("import ", path3.call(print5, "id"), " = ", path3.call(print5, "moduleReference"));
15831
+ parts.push("import ", path3.call(print6, "id"), " = ", path3.call(print6, "moduleReference"));
15832
15832
  return maybeAddSemicolon((0, lines_1.concat)(parts));
15833
15833
  case "TSExternalModuleReference":
15834
- return (0, lines_1.concat)(["require(", path3.call(print5, "expression"), ")"]);
15834
+ return (0, lines_1.concat)(["require(", path3.call(print6, "expression"), ")"]);
15835
15835
  case "TSModuleDeclaration": {
15836
15836
  var parent = path3.getParentNode();
15837
15837
  if (parent.type === "TSModuleDeclaration") {
@@ -15856,16 +15856,16 @@ var require_printer2 = __commonJS({
15856
15856
  }
15857
15857
  }
15858
15858
  }
15859
- parts.push(path3.call(print5, "id"));
15859
+ parts.push(path3.call(print6, "id"));
15860
15860
  if (n.body) {
15861
15861
  parts.push(" ");
15862
- parts.push(path3.call(print5, "body"));
15862
+ parts.push(path3.call(print6, "body"));
15863
15863
  }
15864
15864
  return (0, lines_1.concat)(parts);
15865
15865
  }
15866
15866
  case "TSModuleBlock": {
15867
15867
  var naked = path3.call(function(bodyPath) {
15868
- return printStatementSequence(bodyPath, options, print5);
15868
+ return printStatementSequence(bodyPath, options, print6);
15869
15869
  }, "body");
15870
15870
  if (naked.isEmpty()) {
15871
15871
  parts.push("{}");
@@ -15875,11 +15875,11 @@ var require_printer2 = __commonJS({
15875
15875
  return (0, lines_1.concat)(parts);
15876
15876
  }
15877
15877
  case "TSInstantiationExpression": {
15878
- parts.push(path3.call(print5, "expression"), path3.call(print5, "typeParameters"));
15878
+ parts.push(path3.call(print6, "expression"), path3.call(print6, "typeParameters"));
15879
15879
  return (0, lines_1.concat)(parts);
15880
15880
  }
15881
15881
  case "V8IntrinsicIdentifier":
15882
- return (0, lines_1.concat)(["%", path3.call(print5, "name")]);
15882
+ return (0, lines_1.concat)(["%", path3.call(print6, "name")]);
15883
15883
  case "TopicReference":
15884
15884
  return (0, lines_1.fromString)("#");
15885
15885
  case "ClassHeritage":
@@ -15929,7 +15929,7 @@ var require_printer2 = __commonJS({
15929
15929
  }
15930
15930
  return (0, lines_1.concat)(parts);
15931
15931
  }
15932
- function printStatementSequence(path3, options, print5) {
15932
+ function printStatementSequence(path3, options, print6) {
15933
15933
  var filtered = [];
15934
15934
  var sawComment = false;
15935
15935
  var sawStatement = false;
@@ -15950,7 +15950,7 @@ var require_printer2 = __commonJS({
15950
15950
  }
15951
15951
  filtered.push({
15952
15952
  node: stmt,
15953
- printed: print5(stmtPath)
15953
+ printed: print6(stmtPath)
15954
15954
  });
15955
15955
  });
15956
15956
  if (sawComment) {
@@ -16042,7 +16042,7 @@ var require_printer2 = __commonJS({
16042
16042
  }
16043
16043
  return parts;
16044
16044
  }
16045
- function printMethod(path3, options, print5) {
16045
+ function printMethod(path3, options, print6) {
16046
16046
  var node = path3.getNode();
16047
16047
  var kind = node.kind;
16048
16048
  var parts = [];
@@ -16060,7 +16060,7 @@ var require_printer2 = __commonJS({
16060
16060
  if (kind === "get" || kind === "set") {
16061
16061
  parts.push(kind, " ");
16062
16062
  }
16063
- var key = path3.call(print5, "key");
16063
+ var key = path3.call(print6, "key");
16064
16064
  if (node.computed) {
16065
16065
  key = (0, lines_1.concat)(["[", key, "]"]);
16066
16066
  }
@@ -16069,26 +16069,26 @@ var require_printer2 = __commonJS({
16069
16069
  parts.push("?");
16070
16070
  }
16071
16071
  if (node === nodeValue) {
16072
- parts.push(path3.call(print5, "typeParameters"), "(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "returnType"));
16072
+ parts.push(path3.call(print6, "typeParameters"), "(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "returnType"));
16073
16073
  if (node.body) {
16074
- parts.push(" ", path3.call(print5, "body"));
16074
+ parts.push(" ", path3.call(print6, "body"));
16075
16075
  } else {
16076
16076
  parts.push(";");
16077
16077
  }
16078
16078
  } else {
16079
- parts.push(path3.call(print5, "value", "typeParameters"), "(", path3.call(function(valuePath) {
16080
- return printFunctionParams(valuePath, options, print5);
16081
- }, "value"), ")", path3.call(print5, "value", "returnType"));
16079
+ parts.push(path3.call(print6, "value", "typeParameters"), "(", path3.call(function(valuePath) {
16080
+ return printFunctionParams(valuePath, options, print6);
16081
+ }, "value"), ")", path3.call(print6, "value", "returnType"));
16082
16082
  if (nodeValue.body) {
16083
- parts.push(" ", path3.call(print5, "value", "body"));
16083
+ parts.push(" ", path3.call(print6, "value", "body"));
16084
16084
  } else {
16085
16085
  parts.push(";");
16086
16086
  }
16087
16087
  }
16088
16088
  return (0, lines_1.concat)(parts);
16089
16089
  }
16090
- function printArgumentsList(path3, options, print5) {
16091
- var printed = path3.map(print5, "arguments");
16090
+ function printArgumentsList(path3, options, print6) {
16091
+ var printed = path3.map(print6, "arguments");
16092
16092
  var trailingComma = util.isTrailingCommaEnabled(options, "parameters");
16093
16093
  var joined = (0, lines_1.fromString)(", ").join(printed);
16094
16094
  if (joined.getLineLength(1) > options.wrapColumn) {
@@ -16101,28 +16101,28 @@ var require_printer2 = __commonJS({
16101
16101
  }
16102
16102
  return (0, lines_1.concat)(["(", joined, ")"]);
16103
16103
  }
16104
- function printFunctionParams(path3, options, print5) {
16104
+ function printFunctionParams(path3, options, print6) {
16105
16105
  var fun = path3.getValue();
16106
16106
  var params;
16107
16107
  var printed = [];
16108
16108
  if (fun.params) {
16109
16109
  params = fun.params;
16110
- printed = path3.map(print5, "params");
16110
+ printed = path3.map(print6, "params");
16111
16111
  } else if (fun.parameters) {
16112
16112
  params = fun.parameters;
16113
- printed = path3.map(print5, "parameters");
16113
+ printed = path3.map(print6, "parameters");
16114
16114
  }
16115
16115
  if (fun.defaults) {
16116
16116
  path3.each(function(defExprPath) {
16117
16117
  var i2 = defExprPath.getName();
16118
16118
  var p = printed[i2];
16119
16119
  if (p && defExprPath.getValue()) {
16120
- printed[i2] = (0, lines_1.concat)([p, " = ", print5(defExprPath)]);
16120
+ printed[i2] = (0, lines_1.concat)([p, " = ", print6(defExprPath)]);
16121
16121
  }
16122
16122
  }, "defaults");
16123
16123
  }
16124
16124
  if (fun.rest) {
16125
- printed.push((0, lines_1.concat)(["...", path3.call(print5, "rest")]));
16125
+ printed.push((0, lines_1.concat)(["...", path3.call(print6, "rest")]));
16126
16126
  }
16127
16127
  var joined = (0, lines_1.fromString)(", ").join(printed);
16128
16128
  if (joined.length > 1 || joined.getLineLength(1) > options.wrapColumn) {
@@ -16136,11 +16136,11 @@ var require_printer2 = __commonJS({
16136
16136
  }
16137
16137
  return joined;
16138
16138
  }
16139
- function maybePrintImportAssertions(path3, options, print5) {
16139
+ function maybePrintImportAssertions(path3, options, print6) {
16140
16140
  var n = path3.getValue();
16141
16141
  if (n.assertions && n.assertions.length > 0) {
16142
16142
  var parts = [" assert {"];
16143
- var printed = path3.map(print5, "assertions");
16143
+ var printed = path3.map(print6, "assertions");
16144
16144
  var flat = (0, lines_1.fromString)(", ").join(printed);
16145
16145
  if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {
16146
16146
  parts.push("\n", (0, lines_1.fromString)(",\n").join(printed).indent(options.tabWidth), "\n}");
@@ -16151,7 +16151,7 @@ var require_printer2 = __commonJS({
16151
16151
  }
16152
16152
  return (0, lines_1.fromString)("");
16153
16153
  }
16154
- function printExportDeclaration(path3, options, print5) {
16154
+ function printExportDeclaration(path3, options, print6) {
16155
16155
  var decl = path3.getValue();
16156
16156
  var parts = ["export "];
16157
16157
  if (decl.exportKind && decl.exportKind === "type") {
@@ -16165,7 +16165,7 @@ var require_printer2 = __commonJS({
16165
16165
  parts.push("default ");
16166
16166
  }
16167
16167
  if (decl.declaration) {
16168
- parts.push(path3.call(print5, "declaration"));
16168
+ parts.push(path3.call(print6, "declaration"));
16169
16169
  } else if (decl.specifiers) {
16170
16170
  if (decl.specifiers.length === 1 && decl.specifiers[0].type === "ExportBatchSpecifier") {
16171
16171
  parts.push("*");
@@ -16177,9 +16177,9 @@ var require_printer2 = __commonJS({
16177
16177
  path3.each(function(specifierPath) {
16178
16178
  var spec = specifierPath.getValue();
16179
16179
  if (spec.type === "ExportDefaultSpecifier") {
16180
- unbracedSpecifiers_2.push(print5(specifierPath));
16180
+ unbracedSpecifiers_2.push(print6(specifierPath));
16181
16181
  } else {
16182
- bracedSpecifiers_2.push(print5(specifierPath));
16182
+ bracedSpecifiers_2.push(print6(specifierPath));
16183
16183
  }
16184
16184
  }, "specifiers");
16185
16185
  unbracedSpecifiers_2.forEach(function(lines2, i2) {
@@ -16208,10 +16208,10 @@ var require_printer2 = __commonJS({
16208
16208
  }
16209
16209
  }
16210
16210
  } else {
16211
- parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path3.map(print5, "specifiers")), shouldPrintSpaces ? " }" : "}");
16211
+ parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path3.map(print6, "specifiers")), shouldPrintSpaces ? " }" : "}");
16212
16212
  }
16213
16213
  if (decl.source) {
16214
- parts.push(" from ", path3.call(print5, "source"), maybePrintImportAssertions(path3, options, print5));
16214
+ parts.push(" from ", path3.call(print6, "source"), maybePrintImportAssertions(path3, options, print6));
16215
16215
  }
16216
16216
  }
16217
16217
  var lines = (0, lines_1.concat)(parts);
@@ -16229,7 +16229,7 @@ var require_printer2 = __commonJS({
16229
16229
  }
16230
16230
  return (0, lines_1.concat)(parts);
16231
16231
  }
16232
- function printVariance(path3, print5) {
16232
+ function printVariance(path3, print6) {
16233
16233
  return path3.call(function(variancePath) {
16234
16234
  var value = variancePath.getValue();
16235
16235
  if (value) {
@@ -16239,7 +16239,7 @@ var require_printer2 = __commonJS({
16239
16239
  if (value === "minus") {
16240
16240
  return (0, lines_1.fromString)("-");
16241
16241
  }
16242
- return print5(variancePath);
16242
+ return print6(variancePath);
16243
16243
  }
16244
16244
  return (0, lines_1.fromString)("");
16245
16245
  }, "variance");
@@ -16326,10 +16326,10 @@ var require_main4 = __commonJS({
16326
16326
  Object.defineProperty(exports, "visit", { enumerable: true, get: function() {
16327
16327
  return ast_types_1.visit;
16328
16328
  } });
16329
- function print5(node, options) {
16329
+ function print6(node, options) {
16330
16330
  return new printer_1.Printer(options).print(node);
16331
16331
  }
16332
- exports.print = print5;
16332
+ exports.print = print6;
16333
16333
  function prettyPrint(node, options) {
16334
16334
  return new printer_1.Printer(options).printGenerically(node);
16335
16335
  }
@@ -16353,7 +16353,7 @@ var require_main4 = __commonJS({
16353
16353
  function runString(code, transformer, options) {
16354
16354
  var writeback = options && options.writeback || defaultWriteback;
16355
16355
  transformer((0, parser_1.parse)(code, options), function(node) {
16356
- writeback(print5(node, options).code);
16356
+ writeback(print6(node, options).code);
16357
16357
  });
16358
16358
  }
16359
16359
  }
@@ -16419,6 +16419,7 @@ var import_node_util4 = require("node:util");
16419
16419
  var graphql3 = __toESM(require("graphql"), 1);
16420
16420
  var graphql4 = __toESM(require("graphql"), 1);
16421
16421
  var graphql5 = __toESM(require("graphql"), 1);
16422
+ var graphql6 = __toESM(require("graphql"), 1);
16422
16423
  var import_meta = {};
16423
16424
  var require2 = (0, import_module.createRequire)(import_meta.url);
16424
16425
  var __create2 = Object.create;
@@ -29868,14 +29869,14 @@ var require_lib3 = __commonJS2({
29868
29869
  this.preserveSpace = !!preserveSpace;
29869
29870
  }
29870
29871
  };
29871
- var types4 = {
29872
+ var types5 = {
29872
29873
  brace: new TokContext("{"),
29873
29874
  j_oTag: new TokContext("<tag"),
29874
29875
  j_cTag: new TokContext("</tag"),
29875
29876
  j_expr: new TokContext("<tag>...</tag>", true)
29876
29877
  };
29877
29878
  {
29878
- types4.template = new TokContext("`", true);
29879
+ types5.template = new TokContext("`", true);
29879
29880
  }
29880
29881
  var beforeExpr = true;
29881
29882
  var startsExpr = true;
@@ -30413,17 +30414,17 @@ var require_lib3 = __commonJS2({
30413
30414
  context.pop();
30414
30415
  };
30415
30416
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
30416
- context.push(types4.brace);
30417
+ context.push(types5.brace);
30417
30418
  };
30418
30419
  tokenTypes[22].updateContext = (context) => {
30419
- if (context[context.length - 1] === types4.template) {
30420
+ if (context[context.length - 1] === types5.template) {
30420
30421
  context.pop();
30421
30422
  } else {
30422
- context.push(types4.template);
30423
+ context.push(types5.template);
30423
30424
  }
30424
30425
  };
30425
30426
  tokenTypes[142].updateContext = (context) => {
30426
- context.push(types4.j_expr, types4.j_oTag);
30427
+ context.push(types5.j_expr, types5.j_oTag);
30427
30428
  };
30428
30429
  }
30429
30430
  var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -30983,7 +30984,7 @@ var require_lib3 = __commonJS2({
30983
30984
  this.end = 0;
30984
30985
  this.lastTokEndLoc = null;
30985
30986
  this.lastTokStartLoc = null;
30986
- this.context = [types4.brace];
30987
+ this.context = [types5.brace];
30987
30988
  this.firstInvalidTemplateEscapePos = null;
30988
30989
  this.strictErrors = /* @__PURE__ */ new Map();
30989
30990
  this.tokensLength = 0;
@@ -34810,7 +34811,7 @@ var require_lib3 = __commonJS2({
34810
34811
  context
34811
34812
  } = this.state;
34812
34813
  const currentContext = context[context.length - 1];
34813
- if (currentContext === types4.j_oTag || currentContext === types4.j_expr) {
34814
+ if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
34814
34815
  context.pop();
34815
34816
  }
34816
34817
  }
@@ -35832,9 +35833,9 @@ var require_lib3 = __commonJS2({
35832
35833
  switch (this.state.type) {
35833
35834
  case 5:
35834
35835
  node = this.startNode();
35835
- this.setContext(types4.brace);
35836
+ this.setContext(types5.brace);
35836
35837
  this.next();
35837
- node = this.jsxParseExpressionContainer(node, types4.j_oTag);
35838
+ node = this.jsxParseExpressionContainer(node, types5.j_oTag);
35838
35839
  if (node.expression.type === "JSXEmptyExpression") {
35839
35840
  this.raise(JsxErrors.AttributeIsEmpty, node);
35840
35841
  }
@@ -35853,7 +35854,7 @@ var require_lib3 = __commonJS2({
35853
35854
  jsxParseSpreadChild(node) {
35854
35855
  this.next();
35855
35856
  node.expression = this.parseExpression();
35856
- this.setContext(types4.j_expr);
35857
+ this.setContext(types5.j_expr);
35857
35858
  this.state.canStartJSXElement = true;
35858
35859
  this.expect(8);
35859
35860
  return this.finishNode(node, "JSXSpreadChild");
@@ -35873,11 +35874,11 @@ var require_lib3 = __commonJS2({
35873
35874
  jsxParseAttribute() {
35874
35875
  const node = this.startNode();
35875
35876
  if (this.match(5)) {
35876
- this.setContext(types4.brace);
35877
+ this.setContext(types5.brace);
35877
35878
  this.next();
35878
35879
  this.expect(21);
35879
35880
  node.argument = this.parseMaybeAssignAllowIn();
35880
- this.setContext(types4.j_oTag);
35881
+ this.setContext(types5.j_oTag);
35881
35882
  this.state.canStartJSXElement = true;
35882
35883
  this.expect(8);
35883
35884
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -35936,12 +35937,12 @@ var require_lib3 = __commonJS2({
35936
35937
  break;
35937
35938
  case 5: {
35938
35939
  const node2 = this.startNode();
35939
- this.setContext(types4.brace);
35940
+ this.setContext(types5.brace);
35940
35941
  this.next();
35941
35942
  if (this.match(21)) {
35942
35943
  children.push(this.jsxParseSpreadChild(node2));
35943
35944
  } else {
35944
- children.push(this.jsxParseExpressionContainer(node2, types4.j_expr));
35945
+ children.push(this.jsxParseExpressionContainer(node2, types5.j_expr));
35945
35946
  }
35946
35947
  break;
35947
35948
  }
@@ -36006,11 +36007,11 @@ var require_lib3 = __commonJS2({
36006
36007
  }
36007
36008
  getTokenFromCode(code2) {
36008
36009
  const context = this.curContext();
36009
- if (context === types4.j_expr) {
36010
+ if (context === types5.j_expr) {
36010
36011
  this.jsxReadToken();
36011
36012
  return;
36012
36013
  }
36013
- if (context === types4.j_oTag || context === types4.j_cTag) {
36014
+ if (context === types5.j_oTag || context === types5.j_cTag) {
36014
36015
  if (isIdentifierStart(code2)) {
36015
36016
  this.jsxReadWord();
36016
36017
  return;
@@ -36020,7 +36021,7 @@ var require_lib3 = __commonJS2({
36020
36021
  this.finishToken(143);
36021
36022
  return;
36022
36023
  }
36023
- if ((code2 === 34 || code2 === 39) && context === types4.j_oTag) {
36024
+ if ((code2 === 34 || code2 === 39) && context === types5.j_oTag) {
36024
36025
  this.jsxReadString(code2);
36025
36026
  return;
36026
36027
  }
@@ -36038,17 +36039,17 @@ var require_lib3 = __commonJS2({
36038
36039
  type
36039
36040
  } = this.state;
36040
36041
  if (type === 56 && prevType === 142) {
36041
- context.splice(-2, 2, types4.j_cTag);
36042
+ context.splice(-2, 2, types5.j_cTag);
36042
36043
  this.state.canStartJSXElement = false;
36043
36044
  } else if (type === 142) {
36044
- context.push(types4.j_oTag);
36045
+ context.push(types5.j_oTag);
36045
36046
  } else if (type === 143) {
36046
36047
  const out = context[context.length - 1];
36047
- if (out === types4.j_oTag && prevType === 56 || out === types4.j_cTag) {
36048
+ if (out === types5.j_oTag && prevType === 56 || out === types5.j_cTag) {
36048
36049
  context.pop();
36049
- this.state.canStartJSXElement = context[context.length - 1] === types4.j_expr;
36050
+ this.state.canStartJSXElement = context[context.length - 1] === types5.j_expr;
36050
36051
  } else {
36051
- this.setContext(types4.j_expr);
36052
+ this.setContext(types5.j_expr);
36052
36053
  this.state.canStartJSXElement = true;
36053
36054
  }
36054
36055
  } else {
@@ -37423,14 +37424,14 @@ var require_lib3 = __commonJS2({
37423
37424
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
37424
37425
  const node = this.startNode();
37425
37426
  const hasLeadingOperator = this.eat(operator);
37426
- const types5 = [];
37427
+ const types6 = [];
37427
37428
  do {
37428
- types5.push(parseConstituentType());
37429
+ types6.push(parseConstituentType());
37429
37430
  } while (this.eat(operator));
37430
- if (types5.length === 1 && !hasLeadingOperator) {
37431
- return types5[0];
37431
+ if (types6.length === 1 && !hasLeadingOperator) {
37432
+ return types6[0];
37432
37433
  }
37433
- node.types = types5;
37434
+ node.types = types6;
37434
37435
  return this.finishNode(node, kind);
37435
37436
  }
37436
37437
  tsParseIntersectionTypeOrHigher() {
@@ -37994,7 +37995,7 @@ var require_lib3 = __commonJS2({
37994
37995
  }));
37995
37996
  if (node.params.length === 0) {
37996
37997
  this.raise(TSErrors.EmptyTypeArguments, node);
37997
- } else if (!this.state.inType && this.curContext() === types4.brace) {
37998
+ } else if (!this.state.inType && this.curContext() === types5.brace) {
37998
37999
  this.reScan_lt_gt();
37999
38000
  }
38000
38001
  this.expect(48);
@@ -38620,7 +38621,7 @@ var require_lib3 = __commonJS2({
38620
38621
  context
38621
38622
  } = this.state;
38622
38623
  const currentContext = context[context.length - 1];
38623
- if (currentContext === types4.j_oTag || currentContext === types4.j_expr) {
38624
+ if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
38624
38625
  context.pop();
38625
38626
  }
38626
38627
  }
@@ -43748,9 +43749,9 @@ var require_shared = __commonJS2({
43748
43749
  var tslib_1 = require_tslib();
43749
43750
  var types_1 = tslib_1.__importDefault(require_types());
43750
43751
  function default_1(fork) {
43751
- var types4 = fork.use(types_1.default);
43752
- var Type = types4.Type;
43753
- var builtin = types4.builtInTypes;
43752
+ var types5 = fork.use(types_1.default);
43753
+ var Type = types5.Type;
43754
+ var builtin = types5.builtInTypes;
43754
43755
  var isNumber = builtin.number;
43755
43756
  function geq(than) {
43756
43757
  return Type.from(function(value) {
@@ -43898,9 +43899,9 @@ var require_types = __commonJS2({
43898
43899
  }(BaseType);
43899
43900
  var OrType = function(_super) {
43900
43901
  tslib_1.__extends(OrType2, _super);
43901
- function OrType2(types4) {
43902
+ function OrType2(types5) {
43902
43903
  var _this = _super.call(this) || this;
43903
- _this.types = types4;
43904
+ _this.types = types5;
43904
43905
  _this.kind = "OrType";
43905
43906
  return _this;
43906
43907
  }
@@ -44041,11 +44042,11 @@ var require_types = __commonJS2({
44041
44042
  function typesPlugin(_fork) {
44042
44043
  var Type = {
44043
44044
  or: function() {
44044
- var types4 = [];
44045
+ var types5 = [];
44045
44046
  for (var _i = 0; _i < arguments.length; _i++) {
44046
- types4[_i] = arguments[_i];
44047
+ types5[_i] = arguments[_i];
44047
44048
  }
44048
- return new OrType(types4.map(function(type) {
44049
+ return new OrType(types5.map(function(type) {
44049
44050
  return Type.from(type);
44050
44051
  }));
44051
44052
  },
@@ -44488,9 +44489,9 @@ var require_path2 = __commonJS2({
44488
44489
  var Op = Object.prototype;
44489
44490
  var hasOwn = Op.hasOwnProperty;
44490
44491
  function pathPlugin(fork) {
44491
- var types4 = fork.use(types_1.default);
44492
- var isArray = types4.builtInTypes.array;
44493
- var isNumber = types4.builtInTypes.number;
44492
+ var types5 = fork.use(types_1.default);
44493
+ var isArray = types5.builtInTypes.array;
44494
+ var isNumber = types5.builtInTypes.number;
44494
44495
  var Path = function Path2(value, parentPath, name) {
44495
44496
  if (!(this instanceof Path2)) {
44496
44497
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -44790,13 +44791,13 @@ var require_scope = __commonJS2({
44790
44791
  var types_1 = tslib_1.__importDefault(require_types());
44791
44792
  var hasOwn = Object.prototype.hasOwnProperty;
44792
44793
  function scopePlugin(fork) {
44793
- var types4 = fork.use(types_1.default);
44794
- var Type = types4.Type;
44795
- var namedTypes = types4.namedTypes;
44794
+ var types5 = fork.use(types_1.default);
44795
+ var Type = types5.Type;
44796
+ var namedTypes = types5.namedTypes;
44796
44797
  var Node = namedTypes.Node;
44797
44798
  var Expression = namedTypes.Expression;
44798
- var isArray = types4.builtInTypes.array;
44799
- var b = types4.builders;
44799
+ var isArray = types5.builtInTypes.array;
44800
+ var b = types5.builders;
44800
44801
  var Scope = function Scope2(path3, parentScope) {
44801
44802
  if (!(this instanceof Scope2)) {
44802
44803
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -44859,7 +44860,7 @@ var require_scope = __commonJS2({
44859
44860
  ++index;
44860
44861
  }
44861
44862
  var name = prefix + index;
44862
- return this.bindings[name] = types4.builders.identifier(name);
44863
+ return this.bindings[name] = types5.builders.identifier(name);
44863
44864
  };
44864
44865
  Sp.injectTemporary = function(identifier, init) {
44865
44866
  identifier || (identifier = this.declareTemporary());
@@ -44935,7 +44936,7 @@ var require_scope = __commonJS2({
44935
44936
  bindings
44936
44937
  );
44937
44938
  } else if (Node.check(node) && !Expression.check(node)) {
44938
- types4.eachField(node, function(name, child) {
44939
+ types5.eachField(node, function(name, child) {
44939
44940
  var childPath = path3.get(name);
44940
44941
  if (!pathHasValue(childPath, child)) {
44941
44942
  throw new Error("");
@@ -45013,24 +45014,24 @@ var require_scope = __commonJS2({
45013
45014
  addPattern(patternPath.get("argument"), bindings);
45014
45015
  }
45015
45016
  }
45016
- function addTypePattern(patternPath, types5) {
45017
+ function addTypePattern(patternPath, types6) {
45017
45018
  var pattern = patternPath.value;
45018
45019
  namedTypes.Pattern.assert(pattern);
45019
45020
  if (namedTypes.Identifier.check(pattern)) {
45020
- if (hasOwn.call(types5, pattern.name)) {
45021
- types5[pattern.name].push(patternPath);
45021
+ if (hasOwn.call(types6, pattern.name)) {
45022
+ types6[pattern.name].push(patternPath);
45022
45023
  } else {
45023
- types5[pattern.name] = [patternPath];
45024
+ types6[pattern.name] = [patternPath];
45024
45025
  }
45025
45026
  }
45026
45027
  }
45027
- function addTypeParameter(parameterPath, types5) {
45028
+ function addTypeParameter(parameterPath, types6) {
45028
45029
  var parameter = parameterPath.value;
45029
45030
  FlowOrTSTypeParameterType.assert(parameter);
45030
- if (hasOwn.call(types5, parameter.name)) {
45031
- types5[parameter.name].push(parameterPath);
45031
+ if (hasOwn.call(types6, parameter.name)) {
45032
+ types6[parameter.name].push(parameterPath);
45032
45033
  } else {
45033
- types5[parameter.name] = [parameterPath];
45034
+ types6[parameter.name] = [parameterPath];
45034
45035
  }
45035
45036
  }
45036
45037
  Sp.lookup = function(name) {
@@ -45069,11 +45070,11 @@ var require_node_path = __commonJS2({
45069
45070
  var scope_1 = tslib_1.__importDefault(require_scope());
45070
45071
  var shared_1 = require_shared();
45071
45072
  function nodePathPlugin(fork) {
45072
- var types4 = fork.use(types_1.default);
45073
- var n = types4.namedTypes;
45074
- var b = types4.builders;
45075
- var isNumber = types4.builtInTypes.number;
45076
- var isArray = types4.builtInTypes.array;
45073
+ var types5 = fork.use(types_1.default);
45074
+ var n = types5.namedTypes;
45075
+ var b = types5.builders;
45076
+ var isNumber = types5.builtInTypes.number;
45077
+ var isArray = types5.builtInTypes.array;
45077
45078
  var Path = fork.use(path_1.default);
45078
45079
  var Scope = fork.use(scope_1.default);
45079
45080
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -45164,7 +45165,7 @@ var require_node_path = __commonJS2({
45164
45165
  return scope || null;
45165
45166
  };
45166
45167
  NPp.getValueProperty = function(name) {
45167
- return types4.getFieldValue(this.value, name);
45168
+ return types5.getFieldValue(this.value, name);
45168
45169
  };
45169
45170
  NPp.needsParens = function(assumeExpressionContext) {
45170
45171
  var pp = this.parentPath;
@@ -45306,7 +45307,7 @@ var require_node_path = __commonJS2({
45306
45307
  return node.some(containsCallExpression);
45307
45308
  }
45308
45309
  if (n.Node.check(node)) {
45309
- return types4.someField(node, function(_name, child) {
45310
+ return types5.someField(node, function(_name, child) {
45310
45311
  return containsCallExpression(child);
45311
45312
  });
45312
45313
  }
@@ -45425,11 +45426,11 @@ var require_path_visitor = __commonJS2({
45425
45426
  var shared_1 = require_shared();
45426
45427
  var hasOwn = Object.prototype.hasOwnProperty;
45427
45428
  function pathVisitorPlugin(fork) {
45428
- var types4 = fork.use(types_1.default);
45429
+ var types5 = fork.use(types_1.default);
45429
45430
  var NodePath = fork.use(node_path_1.default);
45430
- var isArray = types4.builtInTypes.array;
45431
- var isObject2 = types4.builtInTypes.object;
45432
- var isFunction = types4.builtInTypes.function;
45431
+ var isArray = types5.builtInTypes.array;
45432
+ var isObject2 = types5.builtInTypes.object;
45433
+ var isFunction = types5.builtInTypes.function;
45433
45434
  var undefined2;
45434
45435
  var PathVisitor = function PathVisitor2() {
45435
45436
  if (!(this instanceof PathVisitor2)) {
@@ -45449,7 +45450,7 @@ var require_path_visitor = __commonJS2({
45449
45450
  typeNames[methodName.slice("visit".length)] = true;
45450
45451
  }
45451
45452
  }
45452
- var supertypeTable = types4.computeSupertypeLookupTable(typeNames);
45453
+ var supertypeTable = types5.computeSupertypeLookupTable(typeNames);
45453
45454
  var methodNameTable = /* @__PURE__ */ Object.create(null);
45454
45455
  var typeNameKeys = Object.keys(supertypeTable);
45455
45456
  var typeNameCount = typeNameKeys.length;
@@ -45568,7 +45569,7 @@ var require_path_visitor = __commonJS2({
45568
45569
  path3.each(visitor.visitWithoutReset, visitor);
45569
45570
  } else if (!isObject2.check(value)) {
45570
45571
  } else {
45571
- var childNames = types4.getFieldNames(value);
45572
+ var childNames = types5.getFieldNames(value);
45572
45573
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
45573
45574
  childNames.push("comments");
45574
45575
  }
@@ -45577,7 +45578,7 @@ var require_path_visitor = __commonJS2({
45577
45578
  for (var i2 = 0; i2 < childCount; ++i2) {
45578
45579
  var childName = childNames[i2];
45579
45580
  if (!hasOwn.call(value, childName)) {
45580
- value[childName] = types4.getFieldValue(value, childName);
45581
+ value[childName] = types5.getFieldValue(value, childName);
45581
45582
  }
45582
45583
  childPaths.push(path3.get(childName));
45583
45584
  }
@@ -45718,13 +45719,13 @@ var require_equiv = __commonJS2({
45718
45719
  var shared_1 = require_shared();
45719
45720
  var types_1 = tslib_1.__importDefault(require_types());
45720
45721
  function default_1(fork) {
45721
- var types4 = fork.use(types_1.default);
45722
- var getFieldNames = types4.getFieldNames;
45723
- var getFieldValue = types4.getFieldValue;
45724
- var isArray = types4.builtInTypes.array;
45725
- var isObject2 = types4.builtInTypes.object;
45726
- var isDate = types4.builtInTypes.Date;
45727
- var isRegExp = types4.builtInTypes.RegExp;
45722
+ var types5 = fork.use(types_1.default);
45723
+ var getFieldNames = types5.getFieldNames;
45724
+ var getFieldValue = types5.getFieldValue;
45725
+ var isArray = types5.builtInTypes.array;
45726
+ var isObject2 = types5.builtInTypes.object;
45727
+ var isDate = types5.builtInTypes.Date;
45728
+ var isRegExp = types5.builtInTypes.RegExp;
45728
45729
  var hasOwn = Object.prototype.hasOwnProperty;
45729
45730
  function astNodesAreEquivalent(a, b, problemPath) {
45730
45731
  if (isArray.check(problemPath)) {
@@ -45875,24 +45876,24 @@ var require_fork = __commonJS2({
45875
45876
  var shared_1 = require_shared();
45876
45877
  function default_1(plugins2) {
45877
45878
  var fork = createFork();
45878
- var types4 = fork.use(types_1.default);
45879
+ var types5 = fork.use(types_1.default);
45879
45880
  plugins2.forEach(fork.use);
45880
- types4.finalize();
45881
+ types5.finalize();
45881
45882
  var PathVisitor = fork.use(path_visitor_1.default);
45882
45883
  return {
45883
- Type: types4.Type,
45884
- builtInTypes: types4.builtInTypes,
45885
- namedTypes: types4.namedTypes,
45886
- builders: types4.builders,
45887
- defineMethod: types4.defineMethod,
45888
- getFieldNames: types4.getFieldNames,
45889
- getFieldValue: types4.getFieldValue,
45890
- eachField: types4.eachField,
45891
- someField: types4.someField,
45892
- getSupertypeNames: types4.getSupertypeNames,
45893
- getBuilderName: types4.getBuilderName,
45884
+ Type: types5.Type,
45885
+ builtInTypes: types5.builtInTypes,
45886
+ namedTypes: types5.namedTypes,
45887
+ builders: types5.builders,
45888
+ defineMethod: types5.defineMethod,
45889
+ getFieldNames: types5.getFieldNames,
45890
+ getFieldValue: types5.getFieldValue,
45891
+ eachField: types5.eachField,
45892
+ someField: types5.someField,
45893
+ getSupertypeNames: types5.getSupertypeNames,
45894
+ getBuilderName: types5.getBuilderName,
45894
45895
  astNodesAreEquivalent: fork.use(equiv_1.default),
45895
- finalize: types4.finalize,
45896
+ finalize: types5.finalize,
45896
45897
  Path: fork.use(path_1.default),
45897
45898
  NodePath: fork.use(node_path_1.default),
45898
45899
  PathVisitor,
@@ -46052,8 +46053,8 @@ var require_core2 = __commonJS2({
46052
46053
  var types_1 = tslib_1.__importDefault(require_types());
46053
46054
  var shared_1 = tslib_1.__importStar(require_shared());
46054
46055
  function default_1(fork) {
46055
- var types4 = fork.use(types_1.default);
46056
- var Type = types4.Type;
46056
+ var types5 = fork.use(types_1.default);
46057
+ var Type = types5.Type;
46057
46058
  var def = Type.def;
46058
46059
  var or = Type.or;
46059
46060
  var shared = fork.use(shared_1.default);
@@ -46143,9 +46144,9 @@ var require_es6 = __commonJS2({
46143
46144
  var shared_1 = tslib_1.__importStar(require_shared());
46144
46145
  function default_1(fork) {
46145
46146
  fork.use(core_1.default);
46146
- var types4 = fork.use(types_1.default);
46147
- var def = types4.Type.def;
46148
- var or = types4.Type.or;
46147
+ var types5 = fork.use(types_1.default);
46148
+ var def = types5.Type.def;
46149
+ var or = types5.Type.or;
46149
46150
  var defaults = fork.use(shared_1.default).defaults;
46150
46151
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
46151
46152
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -46231,8 +46232,8 @@ var require_es2017 = __commonJS2({
46231
46232
  var shared_1 = tslib_1.__importStar(require_shared());
46232
46233
  function default_1(fork) {
46233
46234
  fork.use(es2016_1.default);
46234
- var types4 = fork.use(types_1.default);
46235
- var def = types4.Type.def;
46235
+ var types5 = fork.use(types_1.default);
46236
+ var def = types5.Type.def;
46236
46237
  var defaults = fork.use(shared_1.default).defaults;
46237
46238
  def("Function").field("async", Boolean, defaults["false"]);
46238
46239
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -46253,9 +46254,9 @@ var require_es2018 = __commonJS2({
46253
46254
  var shared_1 = tslib_1.__importStar(require_shared());
46254
46255
  function default_1(fork) {
46255
46256
  fork.use(es2017_1.default);
46256
- var types4 = fork.use(types_1.default);
46257
- var def = types4.Type.def;
46258
- var or = types4.Type.or;
46257
+ var types5 = fork.use(types_1.default);
46258
+ var def = types5.Type.def;
46259
+ var or = types5.Type.or;
46259
46260
  var defaults = fork.use(shared_1.default).defaults;
46260
46261
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
46261
46262
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -46284,9 +46285,9 @@ var require_es2019 = __commonJS2({
46284
46285
  var shared_1 = tslib_1.__importStar(require_shared());
46285
46286
  function default_1(fork) {
46286
46287
  fork.use(es2018_1.default);
46287
- var types4 = fork.use(types_1.default);
46288
- var def = types4.Type.def;
46289
- var or = types4.Type.or;
46288
+ var types5 = fork.use(types_1.default);
46289
+ var def = types5.Type.def;
46290
+ var or = types5.Type.or;
46290
46291
  var defaults = fork.use(shared_1.default).defaults;
46291
46292
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
46292
46293
  }
@@ -46308,9 +46309,9 @@ var require_es20202 = __commonJS2({
46308
46309
  function default_1(fork) {
46309
46310
  fork.use(es2020_1.default);
46310
46311
  fork.use(es2019_1.default);
46311
- var types4 = fork.use(types_1.default);
46312
- var def = types4.Type.def;
46313
- var or = types4.Type.or;
46312
+ var types5 = fork.use(types_1.default);
46313
+ var def = types5.Type.def;
46314
+ var or = types5.Type.or;
46314
46315
  var shared = fork.use(shared_1.default);
46315
46316
  var defaults = shared.defaults;
46316
46317
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -46356,8 +46357,8 @@ var require_es2022 = __commonJS2({
46356
46357
  var shared_1 = require_shared();
46357
46358
  function default_1(fork) {
46358
46359
  fork.use(es2021_1.default);
46359
- var types4 = fork.use(types_1.default);
46360
- var def = types4.Type.def;
46360
+ var types5 = fork.use(types_1.default);
46361
+ var def = types5.Type.def;
46361
46362
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
46362
46363
  }
46363
46364
  exports.default = default_1;
@@ -46376,9 +46377,9 @@ var require_es_proposals = __commonJS2({
46376
46377
  var es2022_1 = tslib_1.__importDefault(require_es2022());
46377
46378
  function default_1(fork) {
46378
46379
  fork.use(es2022_1.default);
46379
- var types4 = fork.use(types_1.default);
46380
- var Type = types4.Type;
46381
- var def = types4.Type.def;
46380
+ var types5 = fork.use(types_1.default);
46381
+ var Type = types5.Type;
46382
+ var def = types5.Type.def;
46382
46383
  var or = Type.or;
46383
46384
  var shared = fork.use(shared_1.default);
46384
46385
  var defaults = shared.defaults;
@@ -46416,9 +46417,9 @@ var require_jsx = __commonJS2({
46416
46417
  var shared_1 = tslib_1.__importStar(require_shared());
46417
46418
  function default_1(fork) {
46418
46419
  fork.use(es_proposals_1.default);
46419
- var types4 = fork.use(types_1.default);
46420
- var def = types4.Type.def;
46421
- var or = types4.Type.or;
46420
+ var types5 = fork.use(types_1.default);
46421
+ var def = types5.Type.def;
46422
+ var or = types5.Type.or;
46422
46423
  var defaults = fork.use(shared_1.default).defaults;
46423
46424
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
46424
46425
  def("Literal"),
@@ -46474,9 +46475,9 @@ var require_type_annotations = __commonJS2({
46474
46475
  var types_1 = tslib_1.__importDefault(require_types());
46475
46476
  var shared_1 = tslib_1.__importStar(require_shared());
46476
46477
  function default_1(fork) {
46477
- var types4 = fork.use(types_1.default);
46478
- var def = types4.Type.def;
46479
- var or = types4.Type.or;
46478
+ var types5 = fork.use(types_1.default);
46479
+ var def = types5.Type.def;
46480
+ var or = types5.Type.or;
46480
46481
  var defaults = fork.use(shared_1.default).defaults;
46481
46482
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
46482
46483
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -46509,9 +46510,9 @@ var require_flow = __commonJS2({
46509
46510
  function default_1(fork) {
46510
46511
  fork.use(es_proposals_1.default);
46511
46512
  fork.use(type_annotations_1.default);
46512
- var types4 = fork.use(types_1.default);
46513
- var def = types4.Type.def;
46514
- var or = types4.Type.or;
46513
+ var types5 = fork.use(types_1.default);
46514
+ var def = types5.Type.def;
46515
+ var or = types5.Type.or;
46515
46516
  var defaults = fork.use(shared_1.default).defaults;
46516
46517
  def("Flow").bases("Node");
46517
46518
  def("FlowType").bases("Flow");
@@ -46623,10 +46624,10 @@ var require_esprima = __commonJS2({
46623
46624
  var shared_1 = tslib_1.__importStar(require_shared());
46624
46625
  function default_1(fork) {
46625
46626
  fork.use(es_proposals_1.default);
46626
- var types4 = fork.use(types_1.default);
46627
+ var types5 = fork.use(types_1.default);
46627
46628
  var defaults = fork.use(shared_1.default).defaults;
46628
- var def = types4.Type.def;
46629
- var or = types4.Type.or;
46629
+ var def = types5.Type.def;
46630
+ var or = types5.Type.or;
46630
46631
  def("VariableDeclaration").field("declarations", [or(
46631
46632
  def("VariableDeclarator"),
46632
46633
  def("Identifier")
@@ -46669,11 +46670,11 @@ var require_babel_core = __commonJS2({
46669
46670
  function default_1(fork) {
46670
46671
  var _a, _b, _c, _d, _e;
46671
46672
  fork.use(es_proposals_1.default);
46672
- var types4 = fork.use(types_1.default);
46673
+ var types5 = fork.use(types_1.default);
46673
46674
  var defaults = fork.use(shared_1.default).defaults;
46674
- var def = types4.Type.def;
46675
- var or = types4.Type.or;
46676
- var isUndefined = types4.builtInTypes.undefined;
46675
+ var def = types5.Type.def;
46676
+ var or = types5.Type.or;
46677
+ var isUndefined = types5.builtInTypes.undefined;
46677
46678
  def("Noop").bases("Statement").build();
46678
46679
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
46679
46680
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -46698,7 +46699,7 @@ var require_babel_core = __commonJS2({
46698
46699
  raw: String
46699
46700
  },
46700
46701
  function getDefault() {
46701
- var value = types4.getFieldValue(this, "value");
46702
+ var value = types5.getFieldValue(this, "value");
46702
46703
  return {
46703
46704
  rawValue: value,
46704
46705
  raw: toRaw ? toRaw(value) : String(value)
@@ -46799,8 +46800,8 @@ var require_babel = __commonJS2({
46799
46800
  var flow_1 = tslib_1.__importDefault(require_flow());
46800
46801
  var shared_1 = require_shared();
46801
46802
  function default_1(fork) {
46802
- var types4 = fork.use(types_1.default);
46803
- var def = types4.Type.def;
46803
+ var types5 = fork.use(types_1.default);
46804
+ var def = types5.Type.def;
46804
46805
  fork.use(babel_core_1.default);
46805
46806
  fork.use(flow_1.default);
46806
46807
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -46824,12 +46825,12 @@ var require_typescript = __commonJS2({
46824
46825
  function default_1(fork) {
46825
46826
  fork.use(babel_core_1.default);
46826
46827
  fork.use(type_annotations_1.default);
46827
- var types4 = fork.use(types_1.default);
46828
- var n = types4.namedTypes;
46829
- var def = types4.Type.def;
46830
- var or = types4.Type.or;
46828
+ var types5 = fork.use(types_1.default);
46829
+ var n = types5.namedTypes;
46830
+ var def = types5.Type.def;
46831
+ var or = types5.Type.or;
46831
46832
  var defaults = fork.use(shared_1.default).defaults;
46832
- var StringLiteral = types4.Type.from(function(value, deep) {
46833
+ var StringLiteral = types5.Type.from(function(value, deep) {
46833
46834
  if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
46834
46835
  return true;
46835
46836
  }
@@ -48777,8 +48778,8 @@ var require_util2 = __commonJS2({
48777
48778
  exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
48778
48779
  var tslib_1 = require_tslib();
48779
48780
  var assert_1 = tslib_1.__importDefault(__require("assert"));
48780
- var types4 = tslib_1.__importStar(require_main());
48781
- var n = types4.namedTypes;
48781
+ var types5 = tslib_1.__importStar(require_main());
48782
+ var n = types5.namedTypes;
48782
48783
  var source_map_1 = tslib_1.__importDefault(require_source_map());
48783
48784
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
48784
48785
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -56084,10 +56085,10 @@ var require_comments = __commonJS2({
56084
56085
  exports.printComments = exports.attach = void 0;
56085
56086
  var tslib_1 = require_tslib();
56086
56087
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56087
- var types4 = tslib_1.__importStar(require_main());
56088
- var n = types4.namedTypes;
56089
- var isArray = types4.builtInTypes.array;
56090
- var isObject2 = types4.builtInTypes.object;
56088
+ var types5 = tslib_1.__importStar(require_main());
56089
+ var n = types5.namedTypes;
56090
+ var isArray = types5.builtInTypes.array;
56091
+ var isObject2 = types5.builtInTypes.object;
56091
56092
  var lines_1 = require_lines();
56092
56093
  var util_1 = require_util2();
56093
56094
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -56118,7 +56119,7 @@ var require_comments = __commonJS2({
56118
56119
  if (isArray.check(node)) {
56119
56120
  names = Object.keys(node);
56120
56121
  } else if (isObject2.check(node)) {
56121
- names = types4.getFieldNames(node);
56122
+ names = types5.getFieldNames(node);
56122
56123
  } else {
56123
56124
  return resultArray;
56124
56125
  }
@@ -56296,7 +56297,7 @@ var require_comments = __commonJS2({
56296
56297
  function printComments(path3, print6) {
56297
56298
  var value = path3.getValue();
56298
56299
  var innerLines = print6(path3);
56299
- var comments = n.Node.check(value) && types4.getFieldValue(value, "comments");
56300
+ var comments = n.Node.check(value) && types5.getFieldValue(value, "comments");
56300
56301
  if (!comments || comments.length === 0) {
56301
56302
  return innerLines;
56302
56303
  }
@@ -56304,8 +56305,8 @@ var require_comments = __commonJS2({
56304
56305
  var trailingParts = [innerLines];
56305
56306
  path3.each(function(commentPath) {
56306
56307
  var comment = commentPath.getValue();
56307
- var leading = types4.getFieldValue(comment, "leading");
56308
- var trailing = types4.getFieldValue(comment, "trailing");
56308
+ var leading = types5.getFieldValue(comment, "leading");
56309
+ var trailing = types5.getFieldValue(comment, "trailing");
56309
56310
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
56310
56311
  leadingParts.push(printLeadingComment(commentPath, print6));
56311
56312
  } else if (trailing) {
@@ -56325,10 +56326,10 @@ var require_parser = __commonJS2({
56325
56326
  exports.parse = void 0;
56326
56327
  var tslib_1 = require_tslib();
56327
56328
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56328
- var types4 = tslib_1.__importStar(require_main());
56329
- var b = types4.builders;
56330
- var isObject2 = types4.builtInTypes.object;
56331
- var isArray = types4.builtInTypes.array;
56329
+ var types5 = tslib_1.__importStar(require_main());
56330
+ var b = types5.builders;
56331
+ var isObject2 = types5.builtInTypes.object;
56332
+ var isArray = types5.builtInTypes.array;
56332
56333
  var options_1 = require_options();
56333
56334
  var lines_1 = require_lines();
56334
56335
  var comments_1 = require_comments();
@@ -56512,11 +56513,11 @@ var require_fast_path = __commonJS2({
56512
56513
  Object.defineProperty(exports, "__esModule", { value: true });
56513
56514
  var tslib_1 = require_tslib();
56514
56515
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56515
- var types4 = tslib_1.__importStar(require_main());
56516
+ var types5 = tslib_1.__importStar(require_main());
56516
56517
  var util = tslib_1.__importStar(require_util2());
56517
- var n = types4.namedTypes;
56518
- var isArray = types4.builtInTypes.array;
56519
- var isNumber = types4.builtInTypes.number;
56518
+ var n = types5.namedTypes;
56519
+ var isArray = types5.builtInTypes.array;
56520
+ var isNumber = types5.builtInTypes.number;
56520
56521
  var PRECEDENCE = {};
56521
56522
  [
56522
56523
  ["??"],
@@ -56545,7 +56546,7 @@ var require_fast_path = __commonJS2({
56545
56546
  if (obj instanceof FastPath) {
56546
56547
  return obj.copy();
56547
56548
  }
56548
- if (obj instanceof types4.NodePath) {
56549
+ if (obj instanceof types5.NodePath) {
56549
56550
  var copy = Object.create(FastPath.prototype);
56550
56551
  var stack = [obj.value];
56551
56552
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -56856,7 +56857,7 @@ var require_fast_path = __commonJS2({
56856
56857
  return node.some(containsCallExpression);
56857
56858
  }
56858
56859
  if (n.Node.check(node)) {
56859
- return types4.someField(node, function(_name, child) {
56860
+ return types5.someField(node, function(_name, child) {
56860
56861
  return containsCallExpression(child);
56861
56862
  });
56862
56863
  }
@@ -56944,16 +56945,16 @@ var require_patcher = __commonJS2({
56944
56945
  var tslib_1 = require_tslib();
56945
56946
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56946
56947
  var linesModule = tslib_1.__importStar(require_lines());
56947
- var types4 = tslib_1.__importStar(require_main());
56948
- var Printable = types4.namedTypes.Printable;
56949
- var Expression = types4.namedTypes.Expression;
56950
- var ReturnStatement = types4.namedTypes.ReturnStatement;
56951
- var SourceLocation = types4.namedTypes.SourceLocation;
56948
+ var types5 = tslib_1.__importStar(require_main());
56949
+ var Printable = types5.namedTypes.Printable;
56950
+ var Expression = types5.namedTypes.Expression;
56951
+ var ReturnStatement = types5.namedTypes.ReturnStatement;
56952
+ var SourceLocation = types5.namedTypes.SourceLocation;
56952
56953
  var util_1 = require_util2();
56953
56954
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
56954
- var isObject2 = types4.builtInTypes.object;
56955
- var isArray = types4.builtInTypes.array;
56956
- var isString = types4.builtInTypes.string;
56955
+ var isObject2 = types5.builtInTypes.object;
56956
+ var isArray = types5.builtInTypes.array;
56957
+ var isString = types5.builtInTypes.string;
56957
56958
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
56958
56959
  var Patcher = function Patcher2(lines) {
56959
56960
  assert_1.default.ok(this instanceof Patcher2);
@@ -57223,8 +57224,8 @@ var require_patcher = __commonJS2({
57223
57224
  if (k.charAt(0) === "_") {
57224
57225
  continue;
57225
57226
  }
57226
- newPath.stack.push(k, types4.getFieldValue(newNode, k));
57227
- oldPath.stack.push(k, types4.getFieldValue(oldNode, k));
57227
+ newPath.stack.push(k, types5.getFieldValue(newNode, k));
57228
+ oldPath.stack.push(k, types5.getFieldValue(oldNode, k));
57228
57229
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
57229
57230
  newPath.stack.length -= 2;
57230
57231
  oldPath.stack.length -= 2;
@@ -57246,16 +57247,16 @@ var require_printer = __commonJS2({
57246
57247
  exports.Printer = void 0;
57247
57248
  var tslib_1 = require_tslib();
57248
57249
  var assert_1 = tslib_1.__importDefault(__require("assert"));
57249
- var types4 = tslib_1.__importStar(require_main());
57250
+ var types5 = tslib_1.__importStar(require_main());
57250
57251
  var comments_1 = require_comments();
57251
57252
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
57252
57253
  var lines_1 = require_lines();
57253
57254
  var options_1 = require_options();
57254
57255
  var patcher_1 = require_patcher();
57255
57256
  var util = tslib_1.__importStar(require_util2());
57256
- var namedTypes = types4.namedTypes;
57257
- var isString = types4.builtInTypes.string;
57258
- var isObject2 = types4.builtInTypes.object;
57257
+ var namedTypes = types5.namedTypes;
57258
+ var isString = types5.builtInTypes.string;
57259
+ var isObject2 = types5.builtInTypes.object;
57259
57260
  var PrintResult = function PrintResult2(code, sourceMap) {
57260
57261
  assert_1.default.ok(this instanceof PrintResult2);
57261
57262
  isString.assert(code);
@@ -57417,7 +57418,7 @@ var require_printer = __commonJS2({
57417
57418
  case "OptionalMemberExpression": {
57418
57419
  parts.push(path3.call(print6, "object"));
57419
57420
  var property = path3.call(print6, "property");
57420
- var optional = types4.getFieldValue(n, "optional");
57421
+ var optional = types5.getFieldValue(n, "optional");
57421
57422
  if (n.computed) {
57422
57423
  parts.push(optional ? "?.[" : "[", property, "]");
57423
57424
  } else {
@@ -57688,7 +57689,7 @@ var require_printer = __commonJS2({
57688
57689
  if (n.typeArguments) {
57689
57690
  parts.push(path3.call(print6, "typeArguments"));
57690
57691
  }
57691
- if (types4.getFieldValue(n, "optional")) {
57692
+ if (types5.getFieldValue(n, "optional")) {
57692
57693
  parts.push("?.");
57693
57694
  }
57694
57695
  parts.push(printArgumentsList(path3, options, print6));
@@ -59367,8 +59368,8 @@ var require_printer = __commonJS2({
59367
59368
  });
59368
59369
  }
59369
59370
  function getPossibleRaw(node) {
59370
- var value = types4.getFieldValue(node, "value");
59371
- var extra = types4.getFieldValue(node, "extra");
59371
+ var value = types5.getFieldValue(node, "value");
59372
+ var extra = types5.getFieldValue(node, "extra");
59372
59373
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
59373
59374
  return extra.raw;
59374
59375
  }
@@ -59414,8 +59415,8 @@ var require_main2 = __commonJS2({
59414
59415
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
59415
59416
  var tslib_1 = require_tslib();
59416
59417
  var fs_1 = tslib_1.__importDefault(__require("fs"));
59417
- var types4 = tslib_1.__importStar(require_main());
59418
- exports.types = types4;
59418
+ var types5 = tslib_1.__importStar(require_main());
59419
+ exports.types = types5;
59419
59420
  var parser_1 = require_parser();
59420
59421
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
59421
59422
  return parser_1.parse;
@@ -63805,30 +63806,30 @@ var require_utils3 = __commonJS2({
63805
63806
  validate2.oneOf = values;
63806
63807
  return validate2;
63807
63808
  }
63808
- function assertNodeType(...types4) {
63809
+ function assertNodeType(...types5) {
63809
63810
  function validate2(node, key, val) {
63810
- for (const type of types4) {
63811
+ for (const type of types5) {
63811
63812
  if ((0, _is.default)(type, val)) {
63812
63813
  (0, _validate.validateChild)(node, key, val);
63813
63814
  return;
63814
63815
  }
63815
63816
  }
63816
- throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types4)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63817
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types5)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63817
63818
  }
63818
- validate2.oneOfNodeTypes = types4;
63819
+ validate2.oneOfNodeTypes = types5;
63819
63820
  return validate2;
63820
63821
  }
63821
- function assertNodeOrValueType(...types4) {
63822
+ function assertNodeOrValueType(...types5) {
63822
63823
  function validate2(node, key, val) {
63823
- for (const type of types4) {
63824
+ for (const type of types5) {
63824
63825
  if (getType(val) === type || (0, _is.default)(type, val)) {
63825
63826
  (0, _validate.validateChild)(node, key, val);
63826
63827
  return;
63827
63828
  }
63828
63829
  }
63829
- throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types4)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63830
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types5)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63830
63831
  }
63831
- validate2.oneOfNodeOrValueTypes = types4;
63832
+ validate2.oneOfNodeOrValueTypes = types5;
63832
63833
  return validate2;
63833
63834
  }
63834
63835
  function assertValueType(type) {
@@ -67406,7 +67407,7 @@ var require_generated2 = __commonJS2({
67406
67407
  exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
67407
67408
  exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
67408
67409
  exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
67409
- exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
67410
+ exports.tSTypeReference = exports.tsTypeReference = tsTypeReference2;
67410
67411
  exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
67411
67412
  exports.tSUnionType = exports.tsUnionType = tsUnionType;
67412
67413
  exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
@@ -68232,10 +68233,10 @@ var require_generated2 = __commonJS2({
68232
68233
  body
68233
68234
  });
68234
68235
  }
68235
- function intersectionTypeAnnotation(types4) {
68236
+ function intersectionTypeAnnotation(types5) {
68236
68237
  return (0, _validateNode.default)({
68237
68238
  type: "IntersectionTypeAnnotation",
68238
- types: types4
68239
+ types: types5
68239
68240
  });
68240
68241
  }
68241
68242
  function mixedTypeAnnotation() {
@@ -68358,10 +68359,10 @@ var require_generated2 = __commonJS2({
68358
68359
  type: "ThisTypeAnnotation"
68359
68360
  };
68360
68361
  }
68361
- function tupleTypeAnnotation(types4) {
68362
+ function tupleTypeAnnotation(types5) {
68362
68363
  return (0, _validateNode.default)({
68363
68364
  type: "TupleTypeAnnotation",
68364
- types: types4
68365
+ types: types5
68365
68366
  });
68366
68367
  }
68367
68368
  function typeofTypeAnnotation(argument) {
@@ -68412,10 +68413,10 @@ var require_generated2 = __commonJS2({
68412
68413
  params
68413
68414
  });
68414
68415
  }
68415
- function unionTypeAnnotation(types4) {
68416
+ function unionTypeAnnotation(types5) {
68416
68417
  return (0, _validateNode.default)({
68417
68418
  type: "UnionTypeAnnotation",
68418
- types: types4
68419
+ types: types5
68419
68420
  });
68420
68421
  }
68421
68422
  function variance(kind) {
@@ -68868,7 +68869,7 @@ var require_generated2 = __commonJS2({
68868
68869
  typeAnnotation: typeAnnotation2
68869
68870
  });
68870
68871
  }
68871
- function tsTypeReference(typeName, typeParameters = null) {
68872
+ function tsTypeReference2(typeName, typeParameters = null) {
68872
68873
  return (0, _validateNode.default)({
68873
68874
  type: "TSTypeReference",
68874
68875
  typeName,
@@ -68928,16 +68929,16 @@ var require_generated2 = __commonJS2({
68928
68929
  optional
68929
68930
  });
68930
68931
  }
68931
- function tsUnionType(types4) {
68932
+ function tsUnionType(types5) {
68932
68933
  return (0, _validateNode.default)({
68933
68934
  type: "TSUnionType",
68934
- types: types4
68935
+ types: types5
68935
68936
  });
68936
68937
  }
68937
- function tsIntersectionType(types4) {
68938
+ function tsIntersectionType(types5) {
68938
68939
  return (0, _validateNode.default)({
68939
68940
  type: "TSIntersectionType",
68940
- types: types4
68941
+ types: types5
68941
68942
  });
68942
68943
  }
68943
68944
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -70538,12 +70539,12 @@ var require_removeTypeDuplicates = __commonJS2({
70538
70539
  const generics = /* @__PURE__ */ new Map();
70539
70540
  const bases = /* @__PURE__ */ new Map();
70540
70541
  const typeGroups = /* @__PURE__ */ new Set();
70541
- const types4 = [];
70542
+ const types5 = [];
70542
70543
  for (let i2 = 0; i2 < nodes.length; i2++) {
70543
70544
  const node = nodes[i2];
70544
70545
  if (!node)
70545
70546
  continue;
70546
- if (types4.indexOf(node) >= 0) {
70547
+ if (types5.indexOf(node) >= 0) {
70547
70548
  continue;
70548
70549
  }
70549
70550
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -70577,15 +70578,15 @@ var require_removeTypeDuplicates = __commonJS2({
70577
70578
  }
70578
70579
  continue;
70579
70580
  }
70580
- types4.push(node);
70581
+ types5.push(node);
70581
70582
  }
70582
70583
  for (const [, baseType] of bases) {
70583
- types4.push(baseType);
70584
+ types5.push(baseType);
70584
70585
  }
70585
70586
  for (const [, genericName] of generics) {
70586
- types4.push(genericName);
70587
+ types5.push(genericName);
70587
70588
  }
70588
- return types4;
70589
+ return types5;
70589
70590
  }
70590
70591
  }
70591
70592
  });
@@ -70598,8 +70599,8 @@ var require_createFlowUnionType = __commonJS2({
70598
70599
  exports.default = createFlowUnionType;
70599
70600
  var _generated = require_generated2();
70600
70601
  var _removeTypeDuplicates = require_removeTypeDuplicates();
70601
- function createFlowUnionType(types4) {
70602
- const flattened = (0, _removeTypeDuplicates.default)(types4);
70602
+ function createFlowUnionType(types5) {
70603
+ const flattened = (0, _removeTypeDuplicates.default)(types5);
70603
70604
  if (flattened.length === 1) {
70604
70605
  return flattened[0];
70605
70606
  } else {
@@ -70624,12 +70625,12 @@ var require_removeTypeDuplicates2 = __commonJS2({
70624
70625
  const generics = /* @__PURE__ */ new Map();
70625
70626
  const bases = /* @__PURE__ */ new Map();
70626
70627
  const typeGroups = /* @__PURE__ */ new Set();
70627
- const types4 = [];
70628
+ const types5 = [];
70628
70629
  for (let i2 = 0; i2 < nodes.length; i2++) {
70629
70630
  const node = nodes[i2];
70630
70631
  if (!node)
70631
70632
  continue;
70632
- if (types4.indexOf(node) >= 0) {
70633
+ if (types5.indexOf(node) >= 0) {
70633
70634
  continue;
70634
70635
  }
70635
70636
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -70663,15 +70664,15 @@ var require_removeTypeDuplicates2 = __commonJS2({
70663
70664
  }
70664
70665
  continue;
70665
70666
  }
70666
- types4.push(node);
70667
+ types5.push(node);
70667
70668
  }
70668
70669
  for (const [, baseType] of bases) {
70669
- types4.push(baseType);
70670
+ types5.push(baseType);
70670
70671
  }
70671
70672
  for (const [, genericName] of generics) {
70672
- types4.push(genericName);
70673
+ types5.push(genericName);
70673
70674
  }
70674
- return types4;
70675
+ return types5;
70675
70676
  }
70676
70677
  }
70677
70678
  });
@@ -70686,10 +70687,10 @@ var require_createTSUnionType = __commonJS2({
70686
70687
  var _removeTypeDuplicates = require_removeTypeDuplicates2();
70687
70688
  var _index = require_generated();
70688
70689
  function createTSUnionType(typeAnnotations) {
70689
- const types4 = typeAnnotations.map((type) => {
70690
+ const types5 = typeAnnotations.map((type) => {
70690
70691
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
70691
70692
  });
70692
- const flattened = (0, _removeTypeDuplicates.default)(types4);
70693
+ const flattened = (0, _removeTypeDuplicates.default)(types5);
70693
70694
  if (flattened.length === 1) {
70694
70695
  return flattened[0];
70695
70696
  } else {
@@ -74372,7 +74373,7 @@ var printDocASTReducer = {
74372
74373
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
74373
74374
  },
74374
74375
  UnionTypeDefinition: {
74375
- leave: ({ name, directives, types: types4 }) => join(["union", name, join(directives, " "), wrap("= ", join(types4, " | "))], " ")
74376
+ leave: ({ name, directives, types: types5 }) => join(["union", name, join(directives, " "), wrap("= ", join(types5, " | "))], " ")
74376
74377
  },
74377
74378
  EnumTypeDefinition: {
74378
74379
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -74399,7 +74400,7 @@ var printDocASTReducer = {
74399
74400
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
74400
74401
  },
74401
74402
  UnionTypeExtension: {
74402
- leave: ({ name, directives, types: types4 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types4, " | "))], " ")
74403
+ leave: ({ name, directives, types: types5 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types5, " | "))], " ")
74403
74404
  },
74404
74405
  EnumTypeExtension: {
74405
74406
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -74569,45 +74570,6 @@ function deepMerge(...objects) {
74569
74570
  }
74570
74571
  return mergedObj;
74571
74572
  }
74572
- async function marshalSelection({
74573
- selection,
74574
- data
74575
- }) {
74576
- const config = getCurrentConfig();
74577
- if (data === null || typeof data === "undefined") {
74578
- return data;
74579
- }
74580
- if (Array.isArray(data)) {
74581
- return await Promise.all(data.map((val) => marshalSelection({ selection, data: val })));
74582
- }
74583
- const targetSelection = getFieldsForType(selection, data["__typename"], false);
74584
- return Object.fromEntries(
74585
- await Promise.all(
74586
- Object.entries(data).map(async ([fieldName, value]) => {
74587
- const { type, selection: selection2 } = targetSelection[fieldName];
74588
- if (!type) {
74589
- return [fieldName, value];
74590
- }
74591
- if (selection2) {
74592
- return [fieldName, await marshalSelection({ selection: selection2, data: value })];
74593
- }
74594
- if (config.scalars?.[type]) {
74595
- const marshalFn = config.scalars[type].marshal;
74596
- if (!marshalFn) {
74597
- throw new Error(
74598
- `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
74599
- );
74600
- }
74601
- if (Array.isArray(value)) {
74602
- return [fieldName, value.map(marshalFn)];
74603
- }
74604
- return [fieldName, marshalFn(value)];
74605
- }
74606
- return [fieldName, value];
74607
- })
74608
- )
74609
- );
74610
- }
74611
74573
  var ArtifactKind = {
74612
74574
  Query: "HoudiniQuery",
74613
74575
  Subscription: "HoudiniSubscription",
@@ -74618,11 +74580,6 @@ var CompiledFragmentKind = ArtifactKind.Fragment;
74618
74580
  var CompiledMutationKind = ArtifactKind.Mutation;
74619
74581
  var CompiledQueryKind = ArtifactKind.Query;
74620
74582
  var CompiledSubscriptionKind = ArtifactKind.Subscription;
74621
- var DataSource = {
74622
- Cache: "cache",
74623
- Network: "network",
74624
- Ssr: "ssr"
74625
- };
74626
74583
  var fragmentKey = " $fragments";
74627
74584
  var PendingValue = Symbol("houdini_loading");
74628
74585
  var computeKey = ({ field, args }) => {
@@ -77813,180 +77770,6 @@ function defaultComponentField({
77813
77770
  }
77814
77771
  var cache_default = new Cache();
77815
77772
  var serverSide = typeof globalThis.window === "undefined";
77816
- var documentPlugin = (kind, source) => {
77817
- return () => {
77818
- const sourceHandlers = source();
77819
- const enterWrapper = (handler) => {
77820
- return !handler ? void 0 : (ctx, handlers) => {
77821
- if (ctx.artifact.kind !== kind) {
77822
- return handlers.next(ctx);
77823
- }
77824
- return handler(ctx, handlers);
77825
- };
77826
- };
77827
- const exitWrapper = (handler) => {
77828
- return !handler ? void 0 : (ctx, handlers) => {
77829
- if (ctx.artifact.kind !== kind) {
77830
- return handlers.resolve(ctx);
77831
- }
77832
- return handler(ctx, handlers);
77833
- };
77834
- };
77835
- return {
77836
- start: enterWrapper(sourceHandlers.start),
77837
- network: enterWrapper(sourceHandlers.network),
77838
- afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
77839
- end: exitWrapper(sourceHandlers.end),
77840
- catch: sourceHandlers.catch ? (ctx, handlers) => sourceHandlers.catch(ctx, handlers) : void 0,
77841
- cleanup: (...args) => sourceHandlers.cleanup?.(...args)
77842
- };
77843
- };
77844
- };
77845
- var query = documentPlugin(ArtifactKind.Query, function() {
77846
- let subscriptionSpec = null;
77847
- let lastVariables = null;
77848
- return {
77849
- start(ctx, { next }) {
77850
- ctx.variables = {
77851
- ...lastVariables,
77852
- ...ctx.variables
77853
- };
77854
- next(ctx);
77855
- },
77856
- end(ctx, { resolve: resolve2, marshalVariables: marshalVariables2, variablesChanged: variablesChanged2 }) {
77857
- if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
77858
- if (subscriptionSpec) {
77859
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
77860
- }
77861
- lastVariables = { ...marshalVariables2(ctx) };
77862
- const variables = lastVariables;
77863
- subscriptionSpec = {
77864
- rootType: ctx.artifact.rootType,
77865
- selection: ctx.artifact.selection,
77866
- variables: () => variables,
77867
- set: (newValue) => {
77868
- resolve2(ctx, {
77869
- data: newValue,
77870
- errors: null,
77871
- fetching: false,
77872
- partial: false,
77873
- stale: false,
77874
- source: DataSource.Cache,
77875
- variables: ctx.variables ?? {}
77876
- });
77877
- }
77878
- };
77879
- cache_default.subscribe(subscriptionSpec, lastVariables);
77880
- }
77881
- resolve2(ctx);
77882
- },
77883
- cleanup() {
77884
- if (subscriptionSpec) {
77885
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
77886
- lastVariables = null;
77887
- }
77888
- }
77889
- };
77890
- });
77891
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
77892
- let subscriptionSpec = null;
77893
- let lastReference = null;
77894
- return {
77895
- start(ctx, { next, resolve: resolve2, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
77896
- if (!ctx.stuff.parentID) {
77897
- return next(ctx);
77898
- }
77899
- const currentReference = {
77900
- parent: ctx.stuff.parentID,
77901
- variables: marshalVariables2(ctx)
77902
- };
77903
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
77904
- if (subscriptionSpec) {
77905
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
77906
- }
77907
- const variables = marshalVariables2(ctx);
77908
- subscriptionSpec = {
77909
- rootType: ctx.artifact.rootType,
77910
- selection: ctx.artifact.selection,
77911
- variables: () => variables,
77912
- parentID: ctx.stuff.parentID,
77913
- set: (newValue) => {
77914
- resolve2(ctx, {
77915
- data: newValue,
77916
- errors: null,
77917
- fetching: false,
77918
- partial: false,
77919
- stale: false,
77920
- source: DataSource.Cache,
77921
- variables
77922
- });
77923
- }
77924
- };
77925
- cache_default.subscribe(subscriptionSpec, variables);
77926
- lastReference = currentReference;
77927
- }
77928
- next(ctx);
77929
- },
77930
- cleanup() {
77931
- if (subscriptionSpec) {
77932
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
77933
- }
77934
- }
77935
- };
77936
- });
77937
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
77938
- return {
77939
- async start(ctx, { next, marshalVariables: marshalVariables2 }) {
77940
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
77941
- const optimisticResponse = ctx.stuff.optimisticResponse;
77942
- let toNotify = [];
77943
- if (optimisticResponse) {
77944
- toNotify = cache_default.write({
77945
- selection: ctx.artifact.selection,
77946
- data: await marshalSelection({
77947
- selection: ctx.artifact.selection,
77948
- data: optimisticResponse
77949
- }),
77950
- variables: marshalVariables2(ctx),
77951
- layer: layerOptimistic.id
77952
- });
77953
- }
77954
- ctx.cacheParams = {
77955
- ...ctx.cacheParams,
77956
- layer: layerOptimistic,
77957
- notifySubscribers: toNotify,
77958
- forceNotify: true
77959
- };
77960
- next(ctx);
77961
- },
77962
- afterNetwork(ctx, { resolve: resolve2 }) {
77963
- if (ctx.cacheParams?.layer) {
77964
- cache_default.clearLayer(ctx.cacheParams.layer.id);
77965
- }
77966
- resolve2(ctx);
77967
- },
77968
- end(ctx, { resolve: resolve2, value }) {
77969
- const hasErrors = value.errors && value.errors.length > 0;
77970
- if (hasErrors) {
77971
- if (ctx.cacheParams?.layer) {
77972
- cache_default.clearLayer(ctx.cacheParams.layer.id);
77973
- }
77974
- }
77975
- if (ctx.cacheParams?.layer) {
77976
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
77977
- }
77978
- resolve2(ctx);
77979
- },
77980
- catch(ctx, { error }) {
77981
- if (ctx.cacheParams?.layer) {
77982
- const { layer } = ctx.cacheParams;
77983
- cache_default.clearLayer(layer.id);
77984
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
77985
- }
77986
- throw error;
77987
- }
77988
- };
77989
- });
77990
77773
  var currentDir = dirname((0, import_node_url.fileURLToPath)(import_meta.url));
77991
77774
  var DEFAULT_CONFIG_PATH = join2(process.cwd(), "houdini.config.js");
77992
77775
  var emptySchema = graphql2.buildSchema("type Query { hello: String }");
@@ -78024,6 +77807,39 @@ function processComponentFieldDirective(directive) {
78024
77807
  export: exportValue
78025
77808
  };
78026
77809
  }
77810
+ function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
77811
+ if (type.kind === "NonNullType") {
77812
+ return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
77813
+ }
77814
+ if (type instanceof graphql3.GraphQLNonNull) {
77815
+ return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
77816
+ }
77817
+ if (wrappers[0] !== TypeWrapper.NonNull) {
77818
+ wrappers.unshift(TypeWrapper.Nullable);
77819
+ }
77820
+ if (type.kind === "ListType") {
77821
+ return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
77822
+ }
77823
+ if (type instanceof graphql3.GraphQLList) {
77824
+ return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
77825
+ }
77826
+ if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
77827
+ type = config.schema.getType(
77828
+ config.configFile.features?.runtimeScalars?.[type.name.value].type
77829
+ );
77830
+ }
77831
+ const namedType = config.schema.getType(type.name.value || type.name);
77832
+ if (!namedType) {
77833
+ throw new Error("Unknown type: " + type.name.value || type.name);
77834
+ }
77835
+ return { type: namedType, wrappers };
77836
+ }
77837
+ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
77838
+ TypeWrapper2["Nullable"] = "Nullable";
77839
+ TypeWrapper2["List"] = "List";
77840
+ TypeWrapper2["NonNull"] = "NonNull";
77841
+ return TypeWrapper2;
77842
+ })(TypeWrapper || {});
78027
77843
  var import_parser = __toESM2(require_lib3(), 1);
78028
77844
  var import_recast = __toESM2(require_main2(), 1);
78029
77845
  var import_deepmerge = __toESM2(require_cjs(), 1);
@@ -78193,6 +78009,133 @@ function get_route_segments(route) {
78193
78009
  function escape2(str) {
78194
78010
  return str.normalize().replace(/[[\]]/g, "\\$&").replace(/%/g, "%25").replace(/\//g, "%2[Ff]").replace(/\?/g, "%3[Ff]").replace(/#/g, "%23").replace(/[.*+?^${}()|\\]/g, "\\$&");
78195
78011
  }
78012
+ var recast2 = __toESM2(require_main2(), 1);
78013
+ var AST2 = recast2.types.builders;
78014
+ function unwrappedTsTypeReference(config, filepath, missingScalars, {
78015
+ type,
78016
+ wrappers
78017
+ }, body) {
78018
+ let result;
78019
+ if (graphql4.isScalarType(type)) {
78020
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
78021
+ } else if (graphql4.isEnumType(type)) {
78022
+ result = enumReference(config, body, type.name);
78023
+ } else {
78024
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
78025
+ }
78026
+ for (const toWrap of wrappers) {
78027
+ if (toWrap === "NonNull") {
78028
+ continue;
78029
+ } else if (toWrap === "Nullable") {
78030
+ result = nullableField(result, true);
78031
+ } else if (toWrap === "List") {
78032
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
78033
+ }
78034
+ }
78035
+ return result;
78036
+ }
78037
+ function enumReference(config, body, name) {
78038
+ ensureImports({
78039
+ config,
78040
+ body,
78041
+ import: ["ValueOf"],
78042
+ importKind: "type",
78043
+ sourceModule: "$houdini/runtime/lib/types"
78044
+ });
78045
+ return AST2.tsTypeReference(
78046
+ AST2.identifier("ValueOf"),
78047
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
78048
+ );
78049
+ }
78050
+ function nullableField(inner, input = false) {
78051
+ const members = [inner, AST2.tsNullKeyword()];
78052
+ if (input) {
78053
+ members.push(AST2.tsUndefinedKeyword());
78054
+ }
78055
+ return AST2.tsUnionType(members);
78056
+ }
78057
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
78058
+ if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
78059
+ if (!field) {
78060
+ return AST2.tsNeverKeyword();
78061
+ }
78062
+ const component = config.componentFields[field.parent][field.field];
78063
+ const sourcePathRelative = path_exports.relative(
78064
+ path_exports.join(config.projectRoot, "src"),
78065
+ component.filepath
78066
+ );
78067
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
78068
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
78069
+ const localImport = ensureImports({
78070
+ config,
78071
+ body,
78072
+ import: "__component__" + component.fragment,
78073
+ sourceModule: path_exports.join(
78074
+ path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
78075
+ "src",
78076
+ sourcePath
78077
+ )
78078
+ }) ?? "__component__" + component.fragment;
78079
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
78080
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
78081
+ AST2.tsTypeQuery(AST2.identifier(localImport))
78082
+ ]);
78083
+ const indexed = AST2.tsIndexedAccessType(
78084
+ parameters,
78085
+ AST2.tsLiteralType(AST2.numericLiteral(0))
78086
+ );
78087
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
78088
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
78089
+ indexed,
78090
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
78091
+ ]);
78092
+ const arg = AST2.identifier("props");
78093
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
78094
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
78095
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
78096
+ AST2.tsTypeQuery(AST2.identifier(localImport))
78097
+ ]);
78098
+ const fnType = AST2.tsFunctionType([arg]);
78099
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
78100
+ return fnType;
78101
+ }
78102
+ switch (target.name) {
78103
+ case "String": {
78104
+ return AST2.tsStringKeyword();
78105
+ }
78106
+ case "Int": {
78107
+ return AST2.tsNumberKeyword();
78108
+ }
78109
+ case "Float": {
78110
+ return AST2.tsNumberKeyword();
78111
+ }
78112
+ case "Boolean": {
78113
+ return AST2.tsBooleanKeyword();
78114
+ }
78115
+ case "ID": {
78116
+ return AST2.tsStringKeyword();
78117
+ }
78118
+ default: {
78119
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
78120
+ return scalarPropertyValue(
78121
+ config,
78122
+ filepath,
78123
+ missingScalars,
78124
+ target.ofType,
78125
+ body,
78126
+ field
78127
+ );
78128
+ }
78129
+ if (config.scalars?.[target.name]) {
78130
+ return AST2.tsTypeReference(AST2.identifier(config.scalars?.[target.name].type));
78131
+ }
78132
+ if (target.name !== config.componentScalar) {
78133
+ missingScalars.add(target.name);
78134
+ }
78135
+ return AST2.tsAnyKeyword();
78136
+ }
78137
+ }
78138
+ }
78196
78139
  var WalkerBase = class {
78197
78140
  constructor() {
78198
78141
  this.should_skip = false;
@@ -78353,7 +78296,7 @@ async function find_graphql(config, parsedScript, walker) {
78353
78296
  } else if (!documentString) {
78354
78297
  return;
78355
78298
  }
78356
- const parsedTag = graphql4.parse(documentString);
78299
+ const parsedTag = graphql5.parse(documentString);
78357
78300
  if (walker.where && !walker.where(parsedTag, { node, parent })) {
78358
78301
  return;
78359
78302
  }
@@ -78485,7 +78428,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
78485
78428
  };
78486
78429
  return defs.concat([
78487
78430
  {
78488
- raw: graphql4.print(parsed),
78431
+ raw: graphql5.print(parsed),
78489
78432
  parsed
78490
78433
  }
78491
78434
  ]);
@@ -78638,7 +78581,8 @@ async function load_manifest(args) {
78638
78581
  local_yoga: false
78639
78582
  },
78640
78583
  queries: [],
78641
- layouts: []
78584
+ layouts: [],
78585
+ variables: {}
78642
78586
  });
78643
78587
  if (args.includeArtifacts) {
78644
78588
  try {
@@ -78669,6 +78613,7 @@ async function walk_routes(args) {
78669
78613
  const directory_contents = await fs_exports.readdir(args.filepath, {
78670
78614
  withFileTypes: true
78671
78615
  });
78616
+ const variables = { ...args.variables };
78672
78617
  let newLayouts = args.layouts;
78673
78618
  let newLayoutQueries = args.queries;
78674
78619
  let layout = null;
@@ -78692,7 +78637,8 @@ async function walk_routes(args) {
78692
78637
  url: args.url,
78693
78638
  project: args.project,
78694
78639
  type: "layout",
78695
- contents: layoutQueryContents
78640
+ contents: layoutQueryContents,
78641
+ variables
78696
78642
  });
78697
78643
  newLayoutQueries = [...args.queries, layoutQuery.name];
78698
78644
  }
@@ -78705,7 +78651,8 @@ async function walk_routes(args) {
78705
78651
  contents: layoutViewContents,
78706
78652
  layouts: args.layouts,
78707
78653
  queries: newLayoutQueries,
78708
- config: args.config
78654
+ config: args.config,
78655
+ variables
78709
78656
  });
78710
78657
  newLayouts = [...args.layouts, page_id(layout.url)];
78711
78658
  }
@@ -78716,7 +78663,8 @@ async function walk_routes(args) {
78716
78663
  url: args.url,
78717
78664
  project: args.project,
78718
78665
  type: "page",
78719
- contents: pageQueryContents
78666
+ contents: pageQueryContents,
78667
+ variables
78720
78668
  });
78721
78669
  }
78722
78670
  if (pageViewContents) {
@@ -78728,7 +78676,8 @@ async function walk_routes(args) {
78728
78676
  contents: pageViewContents,
78729
78677
  layouts: newLayouts,
78730
78678
  queries: pageQuery ? [...newLayoutQueries, pageQuery.name] : newLayoutQueries,
78731
- config: args.config
78679
+ config: args.config,
78680
+ variables
78732
78681
  });
78733
78682
  }
78734
78683
  await Promise.all(
@@ -78741,7 +78690,8 @@ async function walk_routes(args) {
78741
78690
  filepath: path_exports.join(args.filepath, dir.name),
78742
78691
  url: `${args.url}${dir.name}/`,
78743
78692
  queries: newLayoutQueries,
78744
- layouts: newLayouts
78693
+ layouts: newLayouts,
78694
+ variables
78745
78695
  });
78746
78696
  })
78747
78697
  );
@@ -78763,12 +78713,18 @@ async function add_view(args) {
78763
78713
  url: args.url,
78764
78714
  layouts: args.layouts,
78765
78715
  path: path_exports.relative(args.config.projectRoot, args.path),
78766
- query_options: args.queries
78716
+ query_options: args.queries,
78717
+ params: Object.fromEntries(
78718
+ parse_page_pattern(args.url).params.map((param) => [
78719
+ param.name,
78720
+ args.variables[param.name] ?? null
78721
+ ])
78722
+ )
78767
78723
  };
78768
78724
  return target[id];
78769
78725
  }
78770
78726
  async function add_query(args) {
78771
- const parsed = graphql5.parse(args.contents);
78727
+ const parsed = graphql6.parse(args.contents);
78772
78728
  const query2 = parsed.definitions.find(
78773
78729
  (def) => def.kind === "OperationDefinition" && def.operation === "query"
78774
78730
  );
@@ -78776,20 +78732,30 @@ async function add_query(args) {
78776
78732
  throw new Error("No query found");
78777
78733
  }
78778
78734
  let loading = false;
78779
- await graphql5.visit(parsed, {
78735
+ await graphql6.visit(parsed, {
78780
78736
  Directive(node) {
78781
78737
  if (node.name.value === args.config.loadingDirective) {
78782
78738
  loading = true;
78783
78739
  }
78784
78740
  }
78785
78741
  });
78742
+ const queryVariables = Object.fromEntries(
78743
+ query2.variableDefinitions?.map((variable) => {
78744
+ const { type, wrappers } = unwrapType(args.config, variable.type, [], true);
78745
+ return [
78746
+ variable.variable.name.value,
78747
+ { wrappers, type: type.name }
78748
+ ];
78749
+ }) ?? []
78750
+ );
78751
+ Object.assign(args.variables, queryVariables);
78786
78752
  const target = args.type === "page" ? args.project.page_queries : args.project.layout_queries;
78787
78753
  target[page_id(args.url)] = {
78788
78754
  path: path_exports.relative(args.config.routesDir, args.path),
78789
78755
  name: query2.name.value,
78790
78756
  url: args.url,
78791
78757
  loading,
78792
- variables: query2.variableDefinitions?.map((variable) => variable.variable.name.value) ?? []
78758
+ variables: queryVariables
78793
78759
  };
78794
78760
  return target[page_id(args.url)];
78795
78761
  }
@@ -78854,7 +78820,7 @@ var import_node_path2 = __toESM(require("node:path"));
78854
78820
  var import_vite2 = require("vite");
78855
78821
 
78856
78822
  // src/plugin/codegen/index.ts
78857
- var graphql6 = __toESM(require("graphql"));
78823
+ var graphql7 = __toESM(require("graphql"));
78858
78824
 
78859
78825
  // src/plugin/codegen/entries/documentWrappers.ts
78860
78826
  function generate_routing_document_wrappers({
@@ -78906,21 +78872,23 @@ async function generate_query_wrapper(args) {
78906
78872
  const relative_path = path_exports.relative(path_exports.dirname(unit_path), page_path);
78907
78873
  const component_name = "Component_" + page.id;
78908
78874
  let source = [
78909
- "import { useQueryResult } from '$houdini/plugins/houdini-react/runtime/routing'",
78875
+ "import { useQueryResult, PageContextProvider } from '$houdini/plugins/houdini-react/runtime/routing'",
78910
78876
  `import ${component_name} from "${relative_path}"`
78911
78877
  ];
78912
78878
  source.push(`export default ({ children }) => {
78913
78879
  ${""}
78914
- ${page.queries.map((query2) => `const [${query2}$data, ${query2}$handle] = useQueryResult("${query2}")`).join("\n")}
78880
+ ${page.queries.map((query) => `const [${query}$data, ${query}$handle] = useQueryResult("${query}")`).join("\n")}
78915
78881
 
78916
78882
  return (
78917
- <${component_name}
78918
- ${page.queries.map(
78919
- (query2) => [`${query2}={${query2}$data}`, `${query2}$handle={${query2}$handle}`].join(" ")
78883
+ <PageContextProvider keys={${JSON.stringify(Object.keys(page.params ?? {}))}}>
78884
+ <${component_name}
78885
+ ${page.queries.map(
78886
+ (query) => [`${query}={${query}$data}`, `${query}$handle={${query}$handle}`].join(" ")
78920
78887
  ).join("\n")}
78921
- >
78922
- {children}
78923
- </${component_name}>
78888
+ >
78889
+ {children}
78890
+ </${component_name}>
78891
+ </PageContextProvider>
78924
78892
  )
78925
78893
  }`);
78926
78894
  const formatted = (await printJS(parseJS(source.join("\n"), { plugins: ["jsx"] }))).code;
@@ -78993,7 +78961,7 @@ async function generate_fallbacks({
78993
78961
  project
78994
78962
  }) {
78995
78963
  const query_map = Object.values(project.layout_queries).concat(Object.values(project.page_queries)).reduce(
78996
- (prev, query2) => ({ ...prev, [query2.name]: query2 }),
78964
+ (prev, query) => ({ ...prev, [query.name]: query }),
78997
78965
  {}
78998
78966
  );
78999
78967
  for (const [id, page] of Object.entries(project.layouts).concat(
@@ -79002,11 +78970,11 @@ async function generate_fallbacks({
79002
78970
  const layout = conventions_exports.is_layout(page.path);
79003
78971
  const which = layout ? "layout" : "page";
79004
78972
  const { required_queries, loading_queries } = page.queries.reduce(
79005
- (prev, query2) => {
79006
- if (query_map[query2].loading) {
79007
- prev.loading_queries.push(query2);
78973
+ (prev, query) => {
78974
+ if (query_map[query].loading) {
78975
+ prev.loading_queries.push(query);
79008
78976
  } else {
79009
- prev.required_queries.push(query2);
78977
+ prev.required_queries.push(query);
79010
78978
  }
79011
78979
  return prev;
79012
78980
  },
@@ -79035,11 +79003,11 @@ async function generate_fallbacks({
79035
79003
  const { artifact_cache } = useRouterContext()
79036
79004
 
79037
79005
  ${""}
79038
- ${page.queries.map((query2) => `const ${query2}_artifact = artifact_cache.get("${query2}")`).join("\n")}
79006
+ ${page.queries.map((query) => `const ${query}_artifact = artifact_cache.get("${query}")`).join("\n")}
79039
79007
 
79040
79008
  ${""}
79041
79009
  ${required_queries.map(
79042
- (query2) => `const [${query2}_data, ${query2}_handle] = useQueryResult("${query2}")`
79010
+ (query) => `const [${query}_data, ${query}_handle] = useQueryResult("${query}")`
79043
79011
  ).join("\n")}
79044
79012
 
79045
79013
  return (
@@ -79356,6 +79324,9 @@ export function createServerAdapter(options) {
79356
79324
  ]);
79357
79325
  }
79358
79326
 
79327
+ // src/plugin/codegen/typeRoot.ts
79328
+ var recast3 = __toESM(require_main4());
79329
+
79359
79330
  // src/plugin/dedent.ts
79360
79331
  function dedent(indentString, input) {
79361
79332
  if (input === void 0) {
@@ -79395,34 +79366,32 @@ async function generate_type_root({
79395
79366
  const all_queries = (page?.query_options ?? []).concat(layout?.query_options ?? []);
79396
79367
  const relative2 = path_exports.relative(target_dir, config.rootDir);
79397
79368
  const definition = `
79398
- import { DocumentHandle } from '${relative2}/plugins/houdini-react/runtime'
79369
+ import { DocumentHandle, RouteProp } from '${relative2}/plugins/houdini-react/runtime'
79399
79370
  import React from 'react'
79400
-
79401
79371
  ${all_queries.map(
79402
- (query2) => dedent(`
79403
- import type { ${query2}$result, ${query2}$artifact, ${query2}$input } from '${config.artifactImportPath(query2).replace("$houdini", relative2)}'
79372
+ (query) => dedent(`
79373
+ import type { ${query}$result, ${query}$artifact, ${query}$input } from '${config.artifactImportPath(query).replace("$houdini", relative2)}'
79404
79374
 
79405
79375
  `)
79406
79376
  ).join("\n")}
79407
79377
 
79408
- ${`
79409
- export type PageProps = {
79410
- ${!page ? "" : page.query_options.map(
79411
- (query2) => ` ${query2}: ${query2}$result,
79412
- ${query2}$handle: DocumentHandle<${query2}$artifact, ${query2}$result, ${query2}$input>,`
79378
+ ${`export type PageProps = {
79379
+ Params: ${!page ? "{}" : paramsType(config, page.params)},
79380
+ ${!page ? "" : `
79381
+ ` + page.query_options.map(
79382
+ (query) => ` ${query}: ${query}$result,
79383
+ ${query}$handle: DocumentHandle<${query}$artifact, ${query}$result, ${query}$input>,`
79413
79384
  ).join("\n")}
79414
79385
  }
79415
79386
  `}
79416
79387
 
79417
- ${`
79418
- export type LayoutProps = {
79388
+ ${`export type LayoutProps = {
79389
+ Params: ${!page ? "{}" : paramsType(config, page.params)},
79419
79390
  children: React.ReactNode,
79420
79391
  ${!layout ? "" : layout.query_options.map(
79421
- (query2) => ` ${query2}: ${query2}$result,
79422
- ${query2}$handle: DocumentHandle<${query2}$artifact, ${query2}$result, ${query2}$input>,`
79423
- ).join("\n")}
79424
- }
79425
- `}
79392
+ (query) => ` ${query}: ${query}$result,
79393
+ ${query}$handle: DocumentHandle<${query}$artifact, ${query}$result, ${query}$input>,`
79394
+ ).join("\n")}}`}
79426
79395
  `;
79427
79396
  await fs_exports.writeFile(path_exports.join(target_dir, "$types.d.ts"), definition);
79428
79397
  })
@@ -79464,7 +79433,8 @@ async function writeTsconfig(config) {
79464
79433
  "../src/**/*.js",
79465
79434
  "../src/**/*.ts",
79466
79435
  "../src/**/*.jsx",
79467
- "../src/**/*.tsx"
79436
+ "../src/**/*.tsx",
79437
+ "../src/+app.d.ts"
79468
79438
  ],
79469
79439
  exclude: ["../node_modules/**", "./[!ambient.d.ts]**"]
79470
79440
  },
@@ -79473,6 +79443,28 @@ async function writeTsconfig(config) {
79473
79443
  )
79474
79444
  );
79475
79445
  }
79446
+ function paramsType(config, params) {
79447
+ return `{
79448
+ ${Object.entries(params ?? {}).map(([param, typeInfo]) => {
79449
+ let valueString = "string";
79450
+ if (typeInfo) {
79451
+ valueString = recast3.print(
79452
+ unwrappedTsTypeReference(
79453
+ config,
79454
+ "",
79455
+ /* @__PURE__ */ new Set(),
79456
+ {
79457
+ type: config.schema.getType(typeInfo.type),
79458
+ wrappers: typeInfo.wrappers
79459
+ },
79460
+ []
79461
+ )
79462
+ ).code;
79463
+ }
79464
+ return `${param}: ${valueString},`;
79465
+ }).join(", ")}
79466
+ }`;
79467
+ }
79476
79468
 
79477
79469
  // src/plugin/codegen/index.ts
79478
79470
  async function routerCodegen({
@@ -79485,10 +79477,10 @@ async function routerCodegen({
79485
79477
  if (!document.artifact?.hasComponents) {
79486
79478
  continue;
79487
79479
  }
79488
- const typeInfo = new graphql6.TypeInfo(config.schema);
79489
- graphql6.visit(
79480
+ const typeInfo = new graphql7.TypeInfo(config.schema);
79481
+ graphql7.visit(
79490
79482
  document.document,
79491
- graphql6.visitWithTypeInfo(typeInfo, {
79483
+ graphql7.visitWithTypeInfo(typeInfo, {
79492
79484
  FragmentSpread(node) {
79493
79485
  const directive = node.directives?.find(
79494
79486
  (directive2) => directive2.name.value === config.componentFieldDirective
@@ -79558,12 +79550,12 @@ ${Object.entries(manifest3.pages).map(([id, page]) => {
79558
79550
 
79559
79551
  ${""}
79560
79552
  documents: {
79561
- ${queries.map((query2) => {
79562
- const artifact_path = config.artifactImportPath(query2);
79563
- return `${query2}: {
79553
+ ${queries.map((query) => {
79554
+ const artifact_path = config.artifactImportPath(query);
79555
+ return `${query}: {
79564
79556
  artifact: () => import("${path_exports.relative(from, artifact_path)}"),
79565
- loading: ${JSON.stringify(query_name_map[query2]?.loading)},
79566
- variables: ${JSON.stringify(query_name_map[query2]?.variables)}
79557
+ loading: ${JSON.stringify(query_name_map[query]?.loading)},
79558
+ variables: ${JSON.stringify(query_name_map[query]?.variables)}
79567
79559
  }`;
79568
79560
  }).join(",\n ")}
79569
79561
  },
@@ -79611,8 +79603,8 @@ async function extractDocuments({
79611
79603
  }
79612
79604
 
79613
79605
  // src/plugin/transform.ts
79614
- var recast2 = __toESM(require_main4());
79615
- var AST2 = recast2.types.builders;
79606
+ var recast4 = __toESM(require_main4());
79607
+ var AST3 = recast4.types.builders;
79616
79608
  async function transformFile(page) {
79617
79609
  if (!page.filepath.endsWith(".tsx") && !page.filepath.endsWith(".jsx")) {
79618
79610
  return { code: page.content, map: page.map };
@@ -79627,7 +79619,7 @@ async function transformFile(page) {
79627
79619
  body: script.body
79628
79620
  });
79629
79621
  const properties = [
79630
- AST2.objectProperty(AST2.stringLiteral("artifact"), AST2.identifier(artifactID))
79622
+ AST3.objectProperty(AST3.stringLiteral("artifact"), AST3.identifier(artifactID))
79631
79623
  ];
79632
79624
  const { paginated, componentFields } = page.config.localDocumentData(parsedDocument);
79633
79625
  if (paginated) {
@@ -79643,9 +79635,9 @@ async function transformFile(page) {
79643
79635
  });
79644
79636
  }
79645
79637
  properties.push(
79646
- AST2.objectProperty(
79647
- AST2.stringLiteral("refetchArtifact"),
79648
- AST2.identifier(refetchArtifactName)
79638
+ AST3.objectProperty(
79639
+ AST3.stringLiteral("refetchArtifact"),
79640
+ AST3.identifier(refetchArtifactName)
79649
79641
  )
79650
79642
  );
79651
79643
  }
@@ -79664,7 +79656,7 @@ async function transformFile(page) {
79664
79656
  import: null
79665
79657
  });
79666
79658
  }
79667
- node.replaceWith(AST2.objectExpression(properties));
79659
+ node.replaceWith(AST3.objectExpression(properties));
79668
79660
  }
79669
79661
  });
79670
79662
  return printJS(script);
@@ -79787,12 +79779,12 @@ var vite_default = {
79787
79779
  const queryName = parsedPath.name;
79788
79780
  if (which === "pages") {
79789
79781
  const page = manifest.pages[queryName];
79790
- const pendingQueries = page.queries.filter((query2) => {
79791
- const page2 = Object.values(manifest.page_queries).find((q) => q.name === query2);
79782
+ const pendingQueries = page.queries.filter((query) => {
79783
+ const page2 = Object.values(manifest.page_queries).find((q) => q.name === query);
79792
79784
  if (page2) {
79793
79785
  return page2.loading;
79794
79786
  }
79795
- const layout = Object.values(manifest.layout_queries).find((q) => q.name === query2);
79787
+ const layout = Object.values(manifest.layout_queries).find((q) => q.name === query);
79796
79788
  return layout?.loading;
79797
79789
  });
79798
79790
  return `
@@ -79822,6 +79814,15 @@ var vite_default = {
79822
79814
  })
79823
79815
  window.__houdini__hydration__layer__ ??= window.__houdini__cache__._internal_unstable.storage.createLayer(true)
79824
79816
 
79817
+ // link up the cache we just created with the client
79818
+ window.__houdini__client__.setCache(window.__houdini__cache__)
79819
+
79820
+ // hydrate the cache with the information from the initial payload
79821
+ window.__houdini__cache__?.hydrate(
79822
+ window.__houdini__initial__cache__,
79823
+ window.__houdini__hydration__layer__
79824
+ )
79825
+
79825
79826
  // the artifacts are the source of the zip (without them, we can't prime either cache)
79826
79827
  for (const [artifactName, artifact] of Object.entries(window.__houdini__pending_artifacts__ ?? {})) {
79827
79828
  // save the value in the initial artifact cache
@@ -79830,13 +79831,14 @@ var vite_default = {
79830
79831
  // if we also have data for the artifact, save it in the initial data cache
79831
79832
  if (window.__houdini__pending_data__?.[artifactName]) {
79832
79833
  const variables = window.__houdini__pending_variables__[artifactName]
79834
+
79833
79835
  if (artifact.hasComponents) {
79834
79836
  // we need to walk down the artifacts selection and instantiate any component fields
79835
79837
  injectComponents({
79836
79838
  cache: window.__houdini__cache__,
79837
79839
  selection: artifact.selection,
79838
79840
  data: window.__houdini__pending_data__[artifactName],
79839
- variables: window.__houdini__pending_variables__[artifactName],
79841
+ variables,
79840
79842
  })
79841
79843
  }
79842
79844
 
@@ -79844,7 +79846,7 @@ var vite_default = {
79844
79846
  const observer = window.__houdini__client__.observe({
79845
79847
  artifact,
79846
79848
  cache: window.__houdini__cache__,
79847
- initialValue: window.__houdini__pending_data__[artifactName],
79849
+ initialValue: window.__houdini__cache__.read({selection: artifact.selection, variables}).data,
79848
79850
  initialVariables: variables,
79849
79851
  })
79850
79852
 
@@ -79868,12 +79870,6 @@ var vite_default = {
79868
79870
  })
79869
79871
  }
79870
79872
 
79871
- // hydrate the cache with the information from the initial payload
79872
- window.__houdini__cache__?.hydrate(
79873
- window.__houdini__initial__cache__,
79874
- window.__houdini__hydration__layer__
79875
- )
79876
-
79877
79873
  // get the initial url from the window
79878
79874
  const url = window.location.pathname
79879
79875
 
@@ -79931,37 +79927,42 @@ if (window.__houdini__nav_caches__ && window.__houdini__nav_caches__.artifact_ca
79931
79927
  for (const [key, value] of Object.entries(req.headers)) {
79932
79928
  request.headers.set(key, value);
79933
79929
  }
79934
- const result = await createServerAdapter({
79935
- production: false,
79936
- manifest: router_manifest,
79937
- assetPrefix: "/virtual:houdini",
79938
- pipe: res,
79939
- documentPremable: `<script type="module" src="/@vite/client" async=""><\/script>`
79940
- })(request);
79941
- if (result && result.status === 404) {
79942
- return next();
79943
- }
79944
- if (result && typeof result !== "boolean") {
79945
- if (res.closed) {
79946
- return;
79947
- }
79948
- for (const header of Object.entries(result.headers ?? {})) {
79949
- res.setHeader(header[0], header[1]);
79950
- }
79951
- if (result.status >= 300 && result.status < 400) {
79952
- res.writeHead(result.status, {
79953
- Location: result.headers.get("Location") ?? "",
79954
- ...[...result.headers.entries()].reduce(
79955
- (headers, [key, value]) => ({
79956
- ...headers,
79957
- [key]: value
79958
- }),
79959
- {}
79960
- )
79961
- });
79962
- } else {
79963
- res.write(await result.text());
79930
+ try {
79931
+ const result = await createServerAdapter({
79932
+ production: false,
79933
+ manifest: router_manifest,
79934
+ assetPrefix: "/virtual:houdini",
79935
+ pipe: res,
79936
+ documentPremable: `<script type="module" src="/@vite/client" async=""><\/script>`
79937
+ })(request);
79938
+ if (result && result.status === 404) {
79939
+ return next();
79940
+ }
79941
+ if (result && typeof result !== "boolean") {
79942
+ if (res.closed) {
79943
+ return;
79944
+ }
79945
+ for (const header of result.headers ?? []) {
79946
+ res.setHeader(header[0], header[1]);
79947
+ }
79948
+ if (result.status >= 300 && result.status < 400) {
79949
+ res.writeHead(result.status, {
79950
+ Location: result.headers.get("Location") ?? "",
79951
+ ...[...result.headers].reduce(
79952
+ (headers, [key, value]) => ({
79953
+ ...headers,
79954
+ [key]: value
79955
+ }),
79956
+ {}
79957
+ )
79958
+ });
79959
+ } else {
79960
+ res.write(await result.text());
79961
+ }
79962
+ res.end();
79964
79963
  }
79964
+ } catch (e2) {
79965
+ console.error(e2);
79965
79966
  res.end();
79966
79967
  }
79967
79968
  });