houdini-svelte 2.0.1 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89820,7 +89820,18 @@ var ListManager = class {
89820
89820
  }
89821
89821
  lists = /* @__PURE__ */ new Map();
89822
89822
  listsByField = /* @__PURE__ */ new Map();
89823
- get(listName, id2, allLists) {
89823
+ get(listName, id2, allLists, skipMatches) {
89824
+ const lists = this.getLists(listName, id2, allLists);
89825
+ if (!lists) {
89826
+ return null;
89827
+ }
89828
+ if (skipMatches) {
89829
+ return new ListCollection(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
89830
+ } else {
89831
+ return lists;
89832
+ }
89833
+ }
89834
+ getLists(listName, id2, allLists) {
89824
89835
  const matches = this.lists.get(listName);
89825
89836
  if (!matches || matches.size === 0) {
89826
89837
  return null;
@@ -89942,6 +89953,9 @@ var List = class {
89942
89953
  this.manager = manager;
89943
89954
  this.abstract = abstract;
89944
89955
  }
89956
+ get fieldRef() {
89957
+ return `${this.recordID}.${this.key}`;
89958
+ }
89945
89959
  when(when) {
89946
89960
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
89947
89961
  }
@@ -91086,8 +91100,8 @@ var Cache = class {
91086
91100
  variables
91087
91101
  );
91088
91102
  }
91089
- list(name, parentID, allLists) {
91090
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
91103
+ list(name, parentID, allLists, skipMatches) {
91104
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
91091
91105
  if (!handler) {
91092
91106
  throw new Error(
91093
91107
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -91502,6 +91516,7 @@ var CacheInternal = class {
91502
91516
  });
91503
91517
  }
91504
91518
  }
91519
+ const processedOperations = /* @__PURE__ */ new Set();
91505
91520
  for (const operation of operations || []) {
91506
91521
  let parentID;
91507
91522
  if (operation.parentID) {
@@ -91521,7 +91536,12 @@ var CacheInternal = class {
91521
91536
  const targets = Array.isArray(value) ? value : [value];
91522
91537
  for (const target of targets) {
91523
91538
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
91524
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
91539
+ this.cache.list(
91540
+ operation.list,
91541
+ parentID,
91542
+ operation.target === "all",
91543
+ processedOperations
91544
+ ).when(operation.when).addToList(
91525
91545
  fieldSelection,
91526
91546
  target,
91527
91547
  variables,
@@ -91529,7 +91549,12 @@ var CacheInternal = class {
91529
91549
  layer
91530
91550
  );
91531
91551
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
91532
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
91552
+ this.cache.list(
91553
+ operation.list,
91554
+ parentID,
91555
+ operation.target === "all",
91556
+ processedOperations
91557
+ ).when(operation.when).toggleElement({
91533
91558
  selection: fieldSelection,
91534
91559
  data: target,
91535
91560
  variables,
@@ -91537,7 +91562,12 @@ var CacheInternal = class {
91537
91562
  layer
91538
91563
  });
91539
91564
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
91540
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
91565
+ this.cache.list(
91566
+ operation.list,
91567
+ parentID,
91568
+ operation.target === "all",
91569
+ processedOperations
91570
+ ).when(operation.when).remove(target, variables, layer);
91541
91571
  } else if (operation.action === "delete" && operation.type && target) {
91542
91572
  const targetID = this.id(operation.type, target);
91543
91573
  if (!targetID) {
@@ -91549,6 +91579,16 @@ var CacheInternal = class {
91549
91579
  this.cache.delete(targetID, layer);
91550
91580
  }
91551
91581
  }
91582
+ if (operation.list) {
91583
+ const matchingLists = this.cache.list(
91584
+ operation.list,
91585
+ parentID,
91586
+ operation.target === "all"
91587
+ );
91588
+ for (const list3 of matchingLists.lists) {
91589
+ processedOperations.add(list3.fieldRef);
91590
+ }
91591
+ }
91552
91592
  }
91553
91593
  }
91554
91594
  return toNotify;
@@ -92057,8 +92097,9 @@ var Config = class {
92057
92097
  localSchema;
92058
92098
  projectRoot;
92059
92099
  schema;
92100
+ runtimeDir;
92060
92101
  schemaPath;
92061
- persistedQueriesPath = "./$houdini/persisted_queries.json";
92102
+ persistedQueriesPath;
92062
92103
  exclude;
92063
92104
  scalars;
92064
92105
  module = "esm";
@@ -92099,6 +92140,7 @@ var Config = class {
92099
92140
  let {
92100
92141
  schema,
92101
92142
  schemaPath = "./schema.graphql",
92143
+ runtimeDir = "$houdini",
92102
92144
  exclude = [],
92103
92145
  module: module2 = "esm",
92104
92146
  scalars,
@@ -92137,6 +92179,7 @@ var Config = class {
92137
92179
  this.projectRoot = dirname(
92138
92180
  projectDir ? join2(process.cwd(), projectDir) : filepath
92139
92181
  );
92182
+ this.runtimeDir = runtimeDir;
92140
92183
  this.scalars = scalars;
92141
92184
  this.cacheBufferSize = cacheBufferSize;
92142
92185
  this.defaultCachePolicy = defaultCachePolicy;
@@ -92151,11 +92194,9 @@ var Config = class {
92151
92194
  this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
92152
92195
  this.schemaPollTimeout = watchSchema?.timeout ?? 3e4;
92153
92196
  this.schemaPollHeaders = watchSchema?.headers ?? {};
92154
- this.rootDir = join2(this.projectRoot, "$houdini");
92197
+ this.rootDir = join2(this.projectRoot, this.runtimeDir);
92198
+ this.persistedQueriesPath = persistedQueriesPath ?? join2(this.rootDir, "persisted_queries.json");
92155
92199
  this.#fragmentVariableMaps = {};
92156
- if (persistedQueriesPath) {
92157
- this.persistedQueriesPath = persistedQueriesPath;
92158
- }
92159
92200
  if (defaultKeys) {
92160
92201
  this.defaultKeys = defaultKeys;
92161
92202
  }
@@ -93355,7 +93396,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
93355
93396
  }
93356
93397
 
93357
93398
  // src/plugin/transforms/index.ts
93358
- var recast20 = __toESM(require_main4(), 1);
93399
+ var recast21 = __toESM(require_main4(), 1);
93359
93400
 
93360
93401
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
93361
93402
  var WalkerBase2 = class {
@@ -129070,30 +129111,30 @@ var require_utils5 = __commonJS3({
129070
129111
  validate3.oneOf = values;
129071
129112
  return validate3;
129072
129113
  }
129073
- function assertNodeType(...types17) {
129114
+ function assertNodeType(...types18) {
129074
129115
  function validate3(node, key2, val) {
129075
- for (const type of types17) {
129116
+ for (const type of types18) {
129076
129117
  if ((0, _is.default)(type, val)) {
129077
129118
  (0, _validate.validateChild)(node, key2, val);
129078
129119
  return;
129079
129120
  }
129080
129121
  }
129081
- throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types17)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129122
+ throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129082
129123
  }
129083
- validate3.oneOfNodeTypes = types17;
129124
+ validate3.oneOfNodeTypes = types18;
129084
129125
  return validate3;
129085
129126
  }
129086
- function assertNodeOrValueType(...types17) {
129127
+ function assertNodeOrValueType(...types18) {
129087
129128
  function validate3(node, key2, val) {
129088
- for (const type of types17) {
129129
+ for (const type of types18) {
129089
129130
  if (getType(val) === type || (0, _is.default)(type, val)) {
129090
129131
  (0, _validate.validateChild)(node, key2, val);
129091
129132
  return;
129092
129133
  }
129093
129134
  }
129094
- throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types17)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129135
+ throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129095
129136
  }
129096
- validate3.oneOfNodeOrValueTypes = types17;
129137
+ validate3.oneOfNodeOrValueTypes = types18;
129097
129138
  return validate3;
129098
129139
  }
129099
129140
  function assertValueType(type) {
@@ -133497,10 +133538,10 @@ var require_generated22 = __commonJS3({
133497
133538
  body
133498
133539
  });
133499
133540
  }
133500
- function intersectionTypeAnnotation(types17) {
133541
+ function intersectionTypeAnnotation(types18) {
133501
133542
  return (0, _validateNode.default)({
133502
133543
  type: "IntersectionTypeAnnotation",
133503
- types: types17
133544
+ types: types18
133504
133545
  });
133505
133546
  }
133506
133547
  function mixedTypeAnnotation() {
@@ -133623,10 +133664,10 @@ var require_generated22 = __commonJS3({
133623
133664
  type: "ThisTypeAnnotation"
133624
133665
  };
133625
133666
  }
133626
- function tupleTypeAnnotation(types17) {
133667
+ function tupleTypeAnnotation(types18) {
133627
133668
  return (0, _validateNode.default)({
133628
133669
  type: "TupleTypeAnnotation",
133629
- types: types17
133670
+ types: types18
133630
133671
  });
133631
133672
  }
133632
133673
  function typeofTypeAnnotation(argument) {
@@ -133677,10 +133718,10 @@ var require_generated22 = __commonJS3({
133677
133718
  params
133678
133719
  });
133679
133720
  }
133680
- function unionTypeAnnotation(types17) {
133721
+ function unionTypeAnnotation(types18) {
133681
133722
  return (0, _validateNode.default)({
133682
133723
  type: "UnionTypeAnnotation",
133683
- types: types17
133724
+ types: types18
133684
133725
  });
133685
133726
  }
133686
133727
  function variance(kind) {
@@ -134193,16 +134234,16 @@ var require_generated22 = __commonJS3({
134193
134234
  optional
134194
134235
  });
134195
134236
  }
134196
- function tsUnionType(types17) {
134237
+ function tsUnionType(types18) {
134197
134238
  return (0, _validateNode.default)({
134198
134239
  type: "TSUnionType",
134199
- types: types17
134240
+ types: types18
134200
134241
  });
134201
134242
  }
134202
- function tsIntersectionType(types17) {
134243
+ function tsIntersectionType(types18) {
134203
134244
  return (0, _validateNode.default)({
134204
134245
  type: "TSIntersectionType",
134205
- types: types17
134246
+ types: types18
134206
134247
  });
134207
134248
  }
134208
134249
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -135803,12 +135844,12 @@ var require_removeTypeDuplicates3 = __commonJS3({
135803
135844
  const generics = /* @__PURE__ */ new Map();
135804
135845
  const bases = /* @__PURE__ */ new Map();
135805
135846
  const typeGroups = /* @__PURE__ */ new Set();
135806
- const types17 = [];
135847
+ const types18 = [];
135807
135848
  for (let i22 = 0; i22 < nodes.length; i22++) {
135808
135849
  const node = nodes[i22];
135809
135850
  if (!node)
135810
135851
  continue;
135811
- if (types17.indexOf(node) >= 0) {
135852
+ if (types18.indexOf(node) >= 0) {
135812
135853
  continue;
135813
135854
  }
135814
135855
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -135842,15 +135883,15 @@ var require_removeTypeDuplicates3 = __commonJS3({
135842
135883
  }
135843
135884
  continue;
135844
135885
  }
135845
- types17.push(node);
135886
+ types18.push(node);
135846
135887
  }
135847
135888
  for (const [, baseType] of bases) {
135848
- types17.push(baseType);
135889
+ types18.push(baseType);
135849
135890
  }
135850
135891
  for (const [, genericName] of generics) {
135851
- types17.push(genericName);
135892
+ types18.push(genericName);
135852
135893
  }
135853
- return types17;
135894
+ return types18;
135854
135895
  }
135855
135896
  }
135856
135897
  });
@@ -135863,8 +135904,8 @@ var require_createFlowUnionType2 = __commonJS3({
135863
135904
  exports.default = createFlowUnionType;
135864
135905
  var _generated = require_generated22();
135865
135906
  var _removeTypeDuplicates = require_removeTypeDuplicates3();
135866
- function createFlowUnionType(types17) {
135867
- const flattened = (0, _removeTypeDuplicates.default)(types17);
135907
+ function createFlowUnionType(types18) {
135908
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
135868
135909
  if (flattened.length === 1) {
135869
135910
  return flattened[0];
135870
135911
  } else {
@@ -135889,12 +135930,12 @@ var require_removeTypeDuplicates22 = __commonJS3({
135889
135930
  const generics = /* @__PURE__ */ new Map();
135890
135931
  const bases = /* @__PURE__ */ new Map();
135891
135932
  const typeGroups = /* @__PURE__ */ new Set();
135892
- const types17 = [];
135933
+ const types18 = [];
135893
135934
  for (let i22 = 0; i22 < nodes.length; i22++) {
135894
135935
  const node = nodes[i22];
135895
135936
  if (!node)
135896
135937
  continue;
135897
- if (types17.indexOf(node) >= 0) {
135938
+ if (types18.indexOf(node) >= 0) {
135898
135939
  continue;
135899
135940
  }
135900
135941
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -135928,15 +135969,15 @@ var require_removeTypeDuplicates22 = __commonJS3({
135928
135969
  }
135929
135970
  continue;
135930
135971
  }
135931
- types17.push(node);
135972
+ types18.push(node);
135932
135973
  }
135933
135974
  for (const [, baseType] of bases) {
135934
- types17.push(baseType);
135975
+ types18.push(baseType);
135935
135976
  }
135936
135977
  for (const [, genericName] of generics) {
135937
- types17.push(genericName);
135978
+ types18.push(genericName);
135938
135979
  }
135939
- return types17;
135980
+ return types18;
135940
135981
  }
135941
135982
  }
135942
135983
  });
@@ -135951,10 +135992,10 @@ var require_createTSUnionType2 = __commonJS3({
135951
135992
  var _removeTypeDuplicates = require_removeTypeDuplicates22();
135952
135993
  var _index = require_generated5();
135953
135994
  function createTSUnionType(typeAnnotations) {
135954
- const types17 = typeAnnotations.map((type) => {
135995
+ const types18 = typeAnnotations.map((type) => {
135955
135996
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
135956
135997
  });
135957
- const flattened = (0, _removeTypeDuplicates.default)(types17);
135998
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
135958
135999
  if (flattened.length === 1) {
135959
136000
  return flattened[0];
135960
136001
  } else {
@@ -140218,14 +140259,14 @@ var require_lib62 = __commonJS3({
140218
140259
  this.preserveSpace = !!preserveSpace;
140219
140260
  }
140220
140261
  };
140221
- var types17 = {
140262
+ var types18 = {
140222
140263
  brace: new TokContext3("{"),
140223
140264
  j_oTag: new TokContext3("<tag"),
140224
140265
  j_cTag: new TokContext3("</tag"),
140225
140266
  j_expr: new TokContext3("<tag>...</tag>", true)
140226
140267
  };
140227
140268
  {
140228
- types17.template = new TokContext3("`", true);
140269
+ types18.template = new TokContext3("`", true);
140229
140270
  }
140230
140271
  var beforeExpr2 = true;
140231
140272
  var startsExpr2 = true;
@@ -140763,17 +140804,17 @@ var require_lib62 = __commonJS3({
140763
140804
  context.pop();
140764
140805
  };
140765
140806
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
140766
- context.push(types17.brace);
140807
+ context.push(types18.brace);
140767
140808
  };
140768
140809
  tokenTypes[22].updateContext = (context) => {
140769
- if (context[context.length - 1] === types17.template) {
140810
+ if (context[context.length - 1] === types18.template) {
140770
140811
  context.pop();
140771
140812
  } else {
140772
- context.push(types17.template);
140813
+ context.push(types18.template);
140773
140814
  }
140774
140815
  };
140775
140816
  tokenTypes[142].updateContext = (context) => {
140776
- context.push(types17.j_expr, types17.j_oTag);
140817
+ context.push(types18.j_expr, types18.j_oTag);
140777
140818
  };
140778
140819
  }
140779
140820
  var nonASCIIidentifierStartChars2 = "\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";
@@ -141333,7 +141374,7 @@ var require_lib62 = __commonJS3({
141333
141374
  this.end = 0;
141334
141375
  this.lastTokEndLoc = null;
141335
141376
  this.lastTokStartLoc = null;
141336
- this.context = [types17.brace];
141377
+ this.context = [types18.brace];
141337
141378
  this.firstInvalidTemplateEscapePos = null;
141338
141379
  this.strictErrors = /* @__PURE__ */ new Map();
141339
141380
  this.tokensLength = 0;
@@ -145160,7 +145201,7 @@ var require_lib62 = __commonJS3({
145160
145201
  context
145161
145202
  } = this.state;
145162
145203
  const currentContext = context[context.length - 1];
145163
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
145204
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
145164
145205
  context.pop();
145165
145206
  }
145166
145207
  }
@@ -146182,9 +146223,9 @@ var require_lib62 = __commonJS3({
146182
146223
  switch (this.state.type) {
146183
146224
  case 5:
146184
146225
  node = this.startNode();
146185
- this.setContext(types17.brace);
146226
+ this.setContext(types18.brace);
146186
146227
  this.next();
146187
- node = this.jsxParseExpressionContainer(node, types17.j_oTag);
146228
+ node = this.jsxParseExpressionContainer(node, types18.j_oTag);
146188
146229
  if (node.expression.type === "JSXEmptyExpression") {
146189
146230
  this.raise(JsxErrors.AttributeIsEmpty, node);
146190
146231
  }
@@ -146203,7 +146244,7 @@ var require_lib62 = __commonJS3({
146203
146244
  jsxParseSpreadChild(node) {
146204
146245
  this.next();
146205
146246
  node.expression = this.parseExpression();
146206
- this.setContext(types17.j_expr);
146247
+ this.setContext(types18.j_expr);
146207
146248
  this.state.canStartJSXElement = true;
146208
146249
  this.expect(8);
146209
146250
  return this.finishNode(node, "JSXSpreadChild");
@@ -146223,11 +146264,11 @@ var require_lib62 = __commonJS3({
146223
146264
  jsxParseAttribute() {
146224
146265
  const node = this.startNode();
146225
146266
  if (this.match(5)) {
146226
- this.setContext(types17.brace);
146267
+ this.setContext(types18.brace);
146227
146268
  this.next();
146228
146269
  this.expect(21);
146229
146270
  node.argument = this.parseMaybeAssignAllowIn();
146230
- this.setContext(types17.j_oTag);
146271
+ this.setContext(types18.j_oTag);
146231
146272
  this.state.canStartJSXElement = true;
146232
146273
  this.expect(8);
146233
146274
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -146286,12 +146327,12 @@ var require_lib62 = __commonJS3({
146286
146327
  break;
146287
146328
  case 5: {
146288
146329
  const node2 = this.startNode();
146289
- this.setContext(types17.brace);
146330
+ this.setContext(types18.brace);
146290
146331
  this.next();
146291
146332
  if (this.match(21)) {
146292
146333
  children.push(this.jsxParseSpreadChild(node2));
146293
146334
  } else {
146294
- children.push(this.jsxParseExpressionContainer(node2, types17.j_expr));
146335
+ children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
146295
146336
  }
146296
146337
  break;
146297
146338
  }
@@ -146356,11 +146397,11 @@ var require_lib62 = __commonJS3({
146356
146397
  }
146357
146398
  getTokenFromCode(code2) {
146358
146399
  const context = this.curContext();
146359
- if (context === types17.j_expr) {
146400
+ if (context === types18.j_expr) {
146360
146401
  this.jsxReadToken();
146361
146402
  return;
146362
146403
  }
146363
- if (context === types17.j_oTag || context === types17.j_cTag) {
146404
+ if (context === types18.j_oTag || context === types18.j_cTag) {
146364
146405
  if (isIdentifierStart2(code2)) {
146365
146406
  this.jsxReadWord();
146366
146407
  return;
@@ -146370,7 +146411,7 @@ var require_lib62 = __commonJS3({
146370
146411
  this.finishToken(143);
146371
146412
  return;
146372
146413
  }
146373
- if ((code2 === 34 || code2 === 39) && context === types17.j_oTag) {
146414
+ if ((code2 === 34 || code2 === 39) && context === types18.j_oTag) {
146374
146415
  this.jsxReadString(code2);
146375
146416
  return;
146376
146417
  }
@@ -146388,17 +146429,17 @@ var require_lib62 = __commonJS3({
146388
146429
  type
146389
146430
  } = this.state;
146390
146431
  if (type === 56 && prevType === 142) {
146391
- context.splice(-2, 2, types17.j_cTag);
146432
+ context.splice(-2, 2, types18.j_cTag);
146392
146433
  this.state.canStartJSXElement = false;
146393
146434
  } else if (type === 142) {
146394
- context.push(types17.j_oTag);
146435
+ context.push(types18.j_oTag);
146395
146436
  } else if (type === 143) {
146396
146437
  const out = context[context.length - 1];
146397
- if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
146438
+ if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
146398
146439
  context.pop();
146399
- this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
146440
+ this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
146400
146441
  } else {
146401
- this.setContext(types17.j_expr);
146442
+ this.setContext(types18.j_expr);
146402
146443
  this.state.canStartJSXElement = true;
146403
146444
  }
146404
146445
  } else {
@@ -147773,14 +147814,14 @@ var require_lib62 = __commonJS3({
147773
147814
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
147774
147815
  const node = this.startNode();
147775
147816
  const hasLeadingOperator = this.eat(operator);
147776
- const types18 = [];
147817
+ const types19 = [];
147777
147818
  do {
147778
- types18.push(parseConstituentType());
147819
+ types19.push(parseConstituentType());
147779
147820
  } while (this.eat(operator));
147780
- if (types18.length === 1 && !hasLeadingOperator) {
147781
- return types18[0];
147821
+ if (types19.length === 1 && !hasLeadingOperator) {
147822
+ return types19[0];
147782
147823
  }
147783
- node.types = types18;
147824
+ node.types = types19;
147784
147825
  return this.finishNode(node, kind);
147785
147826
  }
147786
147827
  tsParseIntersectionTypeOrHigher() {
@@ -148344,7 +148385,7 @@ var require_lib62 = __commonJS3({
148344
148385
  }));
148345
148386
  if (node.params.length === 0) {
148346
148387
  this.raise(TSErrors.EmptyTypeArguments, node);
148347
- } else if (!this.state.inType && this.curContext() === types17.brace) {
148388
+ } else if (!this.state.inType && this.curContext() === types18.brace) {
148348
148389
  this.reScan_lt_gt();
148349
148390
  }
148350
148391
  this.expect(48);
@@ -148970,7 +149011,7 @@ var require_lib62 = __commonJS3({
148970
149011
  context
148971
149012
  } = this.state;
148972
149013
  const currentContext = context[context.length - 1];
148973
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
149014
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
148974
149015
  context.pop();
148975
149016
  }
148976
149017
  }
@@ -154098,9 +154139,9 @@ var require_shared3 = __commonJS3({
154098
154139
  var tslib_1 = require_tslib3();
154099
154140
  var types_1 = tslib_1.__importDefault(require_types3());
154100
154141
  function default_1(fork) {
154101
- var types17 = fork.use(types_1.default);
154102
- var Type = types17.Type;
154103
- var builtin = types17.builtInTypes;
154142
+ var types18 = fork.use(types_1.default);
154143
+ var Type = types18.Type;
154144
+ var builtin = types18.builtInTypes;
154104
154145
  var isNumber = builtin.number;
154105
154146
  function geq(than) {
154106
154147
  return Type.from(function(value) {
@@ -154248,9 +154289,9 @@ var require_types3 = __commonJS3({
154248
154289
  }(BaseType);
154249
154290
  var OrType = function(_super) {
154250
154291
  tslib_1.__extends(OrType2, _super);
154251
- function OrType2(types17) {
154292
+ function OrType2(types18) {
154252
154293
  var _this = _super.call(this) || this;
154253
- _this.types = types17;
154294
+ _this.types = types18;
154254
154295
  _this.kind = "OrType";
154255
154296
  return _this;
154256
154297
  }
@@ -154391,11 +154432,11 @@ var require_types3 = __commonJS3({
154391
154432
  function typesPlugin(_fork) {
154392
154433
  var Type = {
154393
154434
  or: function() {
154394
- var types17 = [];
154435
+ var types18 = [];
154395
154436
  for (var _i = 0; _i < arguments.length; _i++) {
154396
- types17[_i] = arguments[_i];
154437
+ types18[_i] = arguments[_i];
154397
154438
  }
154398
- return new OrType(types17.map(function(type) {
154439
+ return new OrType(types18.map(function(type) {
154399
154440
  return Type.from(type);
154400
154441
  }));
154401
154442
  },
@@ -154838,9 +154879,9 @@ var require_path22 = __commonJS3({
154838
154879
  var Op = Object.prototype;
154839
154880
  var hasOwn2 = Op.hasOwnProperty;
154840
154881
  function pathPlugin(fork) {
154841
- var types17 = fork.use(types_1.default);
154842
- var isArray2 = types17.builtInTypes.array;
154843
- var isNumber = types17.builtInTypes.number;
154882
+ var types18 = fork.use(types_1.default);
154883
+ var isArray2 = types18.builtInTypes.array;
154884
+ var isNumber = types18.builtInTypes.number;
154844
154885
  var Path = function Path2(value, parentPath, name) {
154845
154886
  if (!(this instanceof Path2)) {
154846
154887
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -155140,13 +155181,13 @@ var require_scope3 = __commonJS3({
155140
155181
  var types_1 = tslib_1.__importDefault(require_types3());
155141
155182
  var hasOwn2 = Object.prototype.hasOwnProperty;
155142
155183
  function scopePlugin(fork) {
155143
- var types17 = fork.use(types_1.default);
155144
- var Type = types17.Type;
155145
- var namedTypes = types17.namedTypes;
155184
+ var types18 = fork.use(types_1.default);
155185
+ var Type = types18.Type;
155186
+ var namedTypes = types18.namedTypes;
155146
155187
  var Node3 = namedTypes.Node;
155147
155188
  var Expression = namedTypes.Expression;
155148
- var isArray2 = types17.builtInTypes.array;
155149
- var b2 = types17.builders;
155189
+ var isArray2 = types18.builtInTypes.array;
155190
+ var b2 = types18.builders;
155150
155191
  var Scope4 = function Scope22(path32, parentScope) {
155151
155192
  if (!(this instanceof Scope22)) {
155152
155193
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -155209,7 +155250,7 @@ var require_scope3 = __commonJS3({
155209
155250
  ++index;
155210
155251
  }
155211
155252
  var name = prefix + index;
155212
- return this.bindings[name] = types17.builders.identifier(name);
155253
+ return this.bindings[name] = types18.builders.identifier(name);
155213
155254
  };
155214
155255
  Sp.injectTemporary = function(identifier, init2) {
155215
155256
  identifier || (identifier = this.declareTemporary());
@@ -155285,7 +155326,7 @@ var require_scope3 = __commonJS3({
155285
155326
  bindings
155286
155327
  );
155287
155328
  } else if (Node3.check(node) && !Expression.check(node)) {
155288
- types17.eachField(node, function(name, child) {
155329
+ types18.eachField(node, function(name, child) {
155289
155330
  var childPath = path32.get(name);
155290
155331
  if (!pathHasValue(childPath, child)) {
155291
155332
  throw new Error("");
@@ -155363,24 +155404,24 @@ var require_scope3 = __commonJS3({
155363
155404
  addPattern(patternPath.get("argument"), bindings);
155364
155405
  }
155365
155406
  }
155366
- function addTypePattern(patternPath, types18) {
155407
+ function addTypePattern(patternPath, types19) {
155367
155408
  var pattern = patternPath.value;
155368
155409
  namedTypes.Pattern.assert(pattern);
155369
155410
  if (namedTypes.Identifier.check(pattern)) {
155370
- if (hasOwn2.call(types18, pattern.name)) {
155371
- types18[pattern.name].push(patternPath);
155411
+ if (hasOwn2.call(types19, pattern.name)) {
155412
+ types19[pattern.name].push(patternPath);
155372
155413
  } else {
155373
- types18[pattern.name] = [patternPath];
155414
+ types19[pattern.name] = [patternPath];
155374
155415
  }
155375
155416
  }
155376
155417
  }
155377
- function addTypeParameter(parameterPath, types18) {
155418
+ function addTypeParameter(parameterPath, types19) {
155378
155419
  var parameter = parameterPath.value;
155379
155420
  FlowOrTSTypeParameterType.assert(parameter);
155380
- if (hasOwn2.call(types18, parameter.name)) {
155381
- types18[parameter.name].push(parameterPath);
155421
+ if (hasOwn2.call(types19, parameter.name)) {
155422
+ types19[parameter.name].push(parameterPath);
155382
155423
  } else {
155383
- types18[parameter.name] = [parameterPath];
155424
+ types19[parameter.name] = [parameterPath];
155384
155425
  }
155385
155426
  }
155386
155427
  Sp.lookup = function(name) {
@@ -155419,11 +155460,11 @@ var require_node_path3 = __commonJS3({
155419
155460
  var scope_1 = tslib_1.__importDefault(require_scope3());
155420
155461
  var shared_1 = require_shared3();
155421
155462
  function nodePathPlugin(fork) {
155422
- var types17 = fork.use(types_1.default);
155423
- var n2 = types17.namedTypes;
155424
- var b2 = types17.builders;
155425
- var isNumber = types17.builtInTypes.number;
155426
- var isArray2 = types17.builtInTypes.array;
155463
+ var types18 = fork.use(types_1.default);
155464
+ var n2 = types18.namedTypes;
155465
+ var b2 = types18.builders;
155466
+ var isNumber = types18.builtInTypes.number;
155467
+ var isArray2 = types18.builtInTypes.array;
155427
155468
  var Path = fork.use(path_1.default);
155428
155469
  var Scope4 = fork.use(scope_1.default);
155429
155470
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -155514,7 +155555,7 @@ var require_node_path3 = __commonJS3({
155514
155555
  return scope || null;
155515
155556
  };
155516
155557
  NPp.getValueProperty = function(name) {
155517
- return types17.getFieldValue(this.value, name);
155558
+ return types18.getFieldValue(this.value, name);
155518
155559
  };
155519
155560
  NPp.needsParens = function(assumeExpressionContext) {
155520
155561
  var pp2 = this.parentPath;
@@ -155656,7 +155697,7 @@ var require_node_path3 = __commonJS3({
155656
155697
  return node.some(containsCallExpression);
155657
155698
  }
155658
155699
  if (n2.Node.check(node)) {
155659
- return types17.someField(node, function(_name, child) {
155700
+ return types18.someField(node, function(_name, child) {
155660
155701
  return containsCallExpression(child);
155661
155702
  });
155662
155703
  }
@@ -155775,11 +155816,11 @@ var require_path_visitor3 = __commonJS3({
155775
155816
  var shared_1 = require_shared3();
155776
155817
  var hasOwn2 = Object.prototype.hasOwnProperty;
155777
155818
  function pathVisitorPlugin(fork) {
155778
- var types17 = fork.use(types_1.default);
155819
+ var types18 = fork.use(types_1.default);
155779
155820
  var NodePath = fork.use(node_path_1.default);
155780
- var isArray2 = types17.builtInTypes.array;
155781
- var isObject2 = types17.builtInTypes.object;
155782
- var isFunction = types17.builtInTypes.function;
155821
+ var isArray2 = types18.builtInTypes.array;
155822
+ var isObject2 = types18.builtInTypes.object;
155823
+ var isFunction = types18.builtInTypes.function;
155783
155824
  var undefined2;
155784
155825
  var PathVisitor = function PathVisitor2() {
155785
155826
  if (!(this instanceof PathVisitor2)) {
@@ -155799,7 +155840,7 @@ var require_path_visitor3 = __commonJS3({
155799
155840
  typeNames[methodName.slice("visit".length)] = true;
155800
155841
  }
155801
155842
  }
155802
- var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
155843
+ var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
155803
155844
  var methodNameTable = /* @__PURE__ */ Object.create(null);
155804
155845
  var typeNameKeys = Object.keys(supertypeTable);
155805
155846
  var typeNameCount = typeNameKeys.length;
@@ -155918,7 +155959,7 @@ var require_path_visitor3 = __commonJS3({
155918
155959
  path32.each(visitor.visitWithoutReset, visitor);
155919
155960
  } else if (!isObject2.check(value)) {
155920
155961
  } else {
155921
- var childNames = types17.getFieldNames(value);
155962
+ var childNames = types18.getFieldNames(value);
155922
155963
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
155923
155964
  childNames.push("comments");
155924
155965
  }
@@ -155927,7 +155968,7 @@ var require_path_visitor3 = __commonJS3({
155927
155968
  for (var i22 = 0; i22 < childCount; ++i22) {
155928
155969
  var childName = childNames[i22];
155929
155970
  if (!hasOwn2.call(value, childName)) {
155930
- value[childName] = types17.getFieldValue(value, childName);
155971
+ value[childName] = types18.getFieldValue(value, childName);
155931
155972
  }
155932
155973
  childPaths.push(path32.get(childName));
155933
155974
  }
@@ -156068,13 +156109,13 @@ var require_equiv3 = __commonJS3({
156068
156109
  var shared_1 = require_shared3();
156069
156110
  var types_1 = tslib_1.__importDefault(require_types3());
156070
156111
  function default_1(fork) {
156071
- var types17 = fork.use(types_1.default);
156072
- var getFieldNames = types17.getFieldNames;
156073
- var getFieldValue = types17.getFieldValue;
156074
- var isArray2 = types17.builtInTypes.array;
156075
- var isObject2 = types17.builtInTypes.object;
156076
- var isDate = types17.builtInTypes.Date;
156077
- var isRegExp = types17.builtInTypes.RegExp;
156112
+ var types18 = fork.use(types_1.default);
156113
+ var getFieldNames = types18.getFieldNames;
156114
+ var getFieldValue = types18.getFieldValue;
156115
+ var isArray2 = types18.builtInTypes.array;
156116
+ var isObject2 = types18.builtInTypes.object;
156117
+ var isDate = types18.builtInTypes.Date;
156118
+ var isRegExp = types18.builtInTypes.RegExp;
156078
156119
  var hasOwn2 = Object.prototype.hasOwnProperty;
156079
156120
  function astNodesAreEquivalent(a2, b2, problemPath) {
156080
156121
  if (isArray2.check(problemPath)) {
@@ -156225,24 +156266,24 @@ var require_fork3 = __commonJS3({
156225
156266
  var shared_1 = require_shared3();
156226
156267
  function default_1(plugins) {
156227
156268
  var fork = createFork();
156228
- var types17 = fork.use(types_1.default);
156269
+ var types18 = fork.use(types_1.default);
156229
156270
  plugins.forEach(fork.use);
156230
- types17.finalize();
156271
+ types18.finalize();
156231
156272
  var PathVisitor = fork.use(path_visitor_1.default);
156232
156273
  return {
156233
- Type: types17.Type,
156234
- builtInTypes: types17.builtInTypes,
156235
- namedTypes: types17.namedTypes,
156236
- builders: types17.builders,
156237
- defineMethod: types17.defineMethod,
156238
- getFieldNames: types17.getFieldNames,
156239
- getFieldValue: types17.getFieldValue,
156240
- eachField: types17.eachField,
156241
- someField: types17.someField,
156242
- getSupertypeNames: types17.getSupertypeNames,
156243
- getBuilderName: types17.getBuilderName,
156274
+ Type: types18.Type,
156275
+ builtInTypes: types18.builtInTypes,
156276
+ namedTypes: types18.namedTypes,
156277
+ builders: types18.builders,
156278
+ defineMethod: types18.defineMethod,
156279
+ getFieldNames: types18.getFieldNames,
156280
+ getFieldValue: types18.getFieldValue,
156281
+ eachField: types18.eachField,
156282
+ someField: types18.someField,
156283
+ getSupertypeNames: types18.getSupertypeNames,
156284
+ getBuilderName: types18.getBuilderName,
156244
156285
  astNodesAreEquivalent: fork.use(equiv_1.default),
156245
- finalize: types17.finalize,
156286
+ finalize: types18.finalize,
156246
156287
  Path: fork.use(path_1.default),
156247
156288
  NodePath: fork.use(node_path_1.default),
156248
156289
  PathVisitor,
@@ -156402,8 +156443,8 @@ var require_core32 = __commonJS3({
156402
156443
  var types_1 = tslib_1.__importDefault(require_types3());
156403
156444
  var shared_1 = tslib_1.__importStar(require_shared3());
156404
156445
  function default_1(fork) {
156405
- var types17 = fork.use(types_1.default);
156406
- var Type = types17.Type;
156446
+ var types18 = fork.use(types_1.default);
156447
+ var Type = types18.Type;
156407
156448
  var def = Type.def;
156408
156449
  var or = Type.or;
156409
156450
  var shared2 = fork.use(shared_1.default);
@@ -156493,9 +156534,9 @@ var require_es63 = __commonJS3({
156493
156534
  var shared_1 = tslib_1.__importStar(require_shared3());
156494
156535
  function default_1(fork) {
156495
156536
  fork.use(core_1.default);
156496
- var types17 = fork.use(types_1.default);
156497
- var def = types17.Type.def;
156498
- var or = types17.Type.or;
156537
+ var types18 = fork.use(types_1.default);
156538
+ var def = types18.Type.def;
156539
+ var or = types18.Type.or;
156499
156540
  var defaults = fork.use(shared_1.default).defaults;
156500
156541
  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"]);
156501
156542
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -156581,8 +156622,8 @@ var require_es20173 = __commonJS3({
156581
156622
  var shared_1 = tslib_1.__importStar(require_shared3());
156582
156623
  function default_1(fork) {
156583
156624
  fork.use(es2016_1.default);
156584
- var types17 = fork.use(types_1.default);
156585
- var def = types17.Type.def;
156625
+ var types18 = fork.use(types_1.default);
156626
+ var def = types18.Type.def;
156586
156627
  var defaults = fork.use(shared_1.default).defaults;
156587
156628
  def("Function").field("async", Boolean, defaults["false"]);
156588
156629
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -156603,9 +156644,9 @@ var require_es20183 = __commonJS3({
156603
156644
  var shared_1 = tslib_1.__importStar(require_shared3());
156604
156645
  function default_1(fork) {
156605
156646
  fork.use(es2017_1.default);
156606
- var types17 = fork.use(types_1.default);
156607
- var def = types17.Type.def;
156608
- var or = types17.Type.or;
156647
+ var types18 = fork.use(types_1.default);
156648
+ var def = types18.Type.def;
156649
+ var or = types18.Type.or;
156609
156650
  var defaults = fork.use(shared_1.default).defaults;
156610
156651
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
156611
156652
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -156634,9 +156675,9 @@ var require_es20193 = __commonJS3({
156634
156675
  var shared_1 = tslib_1.__importStar(require_shared3());
156635
156676
  function default_1(fork) {
156636
156677
  fork.use(es2018_1.default);
156637
- var types17 = fork.use(types_1.default);
156638
- var def = types17.Type.def;
156639
- var or = types17.Type.or;
156678
+ var types18 = fork.use(types_1.default);
156679
+ var def = types18.Type.def;
156680
+ var or = types18.Type.or;
156640
156681
  var defaults = fork.use(shared_1.default).defaults;
156641
156682
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
156642
156683
  }
@@ -156658,9 +156699,9 @@ var require_es202022 = __commonJS3({
156658
156699
  function default_1(fork) {
156659
156700
  fork.use(es2020_1.default);
156660
156701
  fork.use(es2019_1.default);
156661
- var types17 = fork.use(types_1.default);
156662
- var def = types17.Type.def;
156663
- var or = types17.Type.or;
156702
+ var types18 = fork.use(types_1.default);
156703
+ var def = types18.Type.def;
156704
+ var or = types18.Type.or;
156664
156705
  var shared2 = fork.use(shared_1.default);
156665
156706
  var defaults = shared2.defaults;
156666
156707
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -156706,8 +156747,8 @@ var require_es20223 = __commonJS3({
156706
156747
  var shared_1 = require_shared3();
156707
156748
  function default_1(fork) {
156708
156749
  fork.use(es2021_1.default);
156709
- var types17 = fork.use(types_1.default);
156710
- var def = types17.Type.def;
156750
+ var types18 = fork.use(types_1.default);
156751
+ var def = types18.Type.def;
156711
156752
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
156712
156753
  }
156713
156754
  exports.default = default_1;
@@ -156726,9 +156767,9 @@ var require_es_proposals3 = __commonJS3({
156726
156767
  var es2022_1 = tslib_1.__importDefault(require_es20223());
156727
156768
  function default_1(fork) {
156728
156769
  fork.use(es2022_1.default);
156729
- var types17 = fork.use(types_1.default);
156730
- var Type = types17.Type;
156731
- var def = types17.Type.def;
156770
+ var types18 = fork.use(types_1.default);
156771
+ var Type = types18.Type;
156772
+ var def = types18.Type.def;
156732
156773
  var or = Type.or;
156733
156774
  var shared2 = fork.use(shared_1.default);
156734
156775
  var defaults = shared2.defaults;
@@ -156766,9 +156807,9 @@ var require_jsx22 = __commonJS3({
156766
156807
  var shared_1 = tslib_1.__importStar(require_shared3());
156767
156808
  function default_1(fork) {
156768
156809
  fork.use(es_proposals_1.default);
156769
- var types17 = fork.use(types_1.default);
156770
- var def = types17.Type.def;
156771
- var or = types17.Type.or;
156810
+ var types18 = fork.use(types_1.default);
156811
+ var def = types18.Type.def;
156812
+ var or = types18.Type.or;
156772
156813
  var defaults = fork.use(shared_1.default).defaults;
156773
156814
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
156774
156815
  def("Literal"),
@@ -156824,9 +156865,9 @@ var require_type_annotations3 = __commonJS3({
156824
156865
  var types_1 = tslib_1.__importDefault(require_types3());
156825
156866
  var shared_1 = tslib_1.__importStar(require_shared3());
156826
156867
  function default_1(fork) {
156827
- var types17 = fork.use(types_1.default);
156828
- var def = types17.Type.def;
156829
- var or = types17.Type.or;
156868
+ var types18 = fork.use(types_1.default);
156869
+ var def = types18.Type.def;
156870
+ var or = types18.Type.or;
156830
156871
  var defaults = fork.use(shared_1.default).defaults;
156831
156872
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
156832
156873
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -156859,9 +156900,9 @@ var require_flow22 = __commonJS3({
156859
156900
  function default_1(fork) {
156860
156901
  fork.use(es_proposals_1.default);
156861
156902
  fork.use(type_annotations_1.default);
156862
- var types17 = fork.use(types_1.default);
156863
- var def = types17.Type.def;
156864
- var or = types17.Type.or;
156903
+ var types18 = fork.use(types_1.default);
156904
+ var def = types18.Type.def;
156905
+ var or = types18.Type.or;
156865
156906
  var defaults = fork.use(shared_1.default).defaults;
156866
156907
  def("Flow").bases("Node");
156867
156908
  def("FlowType").bases("Flow");
@@ -156973,10 +157014,10 @@ var require_esprima7 = __commonJS3({
156973
157014
  var shared_1 = tslib_1.__importStar(require_shared3());
156974
157015
  function default_1(fork) {
156975
157016
  fork.use(es_proposals_1.default);
156976
- var types17 = fork.use(types_1.default);
157017
+ var types18 = fork.use(types_1.default);
156977
157018
  var defaults = fork.use(shared_1.default).defaults;
156978
- var def = types17.Type.def;
156979
- var or = types17.Type.or;
157019
+ var def = types18.Type.def;
157020
+ var or = types18.Type.or;
156980
157021
  def("VariableDeclaration").field("declarations", [or(
156981
157022
  def("VariableDeclarator"),
156982
157023
  def("Identifier")
@@ -157019,11 +157060,11 @@ var require_babel_core3 = __commonJS3({
157019
157060
  function default_1(fork) {
157020
157061
  var _a, _b, _c, _d, _e;
157021
157062
  fork.use(es_proposals_1.default);
157022
- var types17 = fork.use(types_1.default);
157063
+ var types18 = fork.use(types_1.default);
157023
157064
  var defaults = fork.use(shared_1.default).defaults;
157024
- var def = types17.Type.def;
157025
- var or = types17.Type.or;
157026
- var isUndefined = types17.builtInTypes.undefined;
157065
+ var def = types18.Type.def;
157066
+ var or = types18.Type.or;
157067
+ var isUndefined = types18.builtInTypes.undefined;
157027
157068
  def("Noop").bases("Statement").build();
157028
157069
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
157029
157070
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -157048,7 +157089,7 @@ var require_babel_core3 = __commonJS3({
157048
157089
  raw: String
157049
157090
  },
157050
157091
  function getDefault() {
157051
- var value = types17.getFieldValue(this, "value");
157092
+ var value = types18.getFieldValue(this, "value");
157052
157093
  return {
157053
157094
  rawValue: value,
157054
157095
  raw: toRaw ? toRaw(value) : String(value)
@@ -157149,8 +157190,8 @@ var require_babel3 = __commonJS3({
157149
157190
  var flow_1 = tslib_1.__importDefault(require_flow22());
157150
157191
  var shared_1 = require_shared3();
157151
157192
  function default_1(fork) {
157152
- var types17 = fork.use(types_1.default);
157153
- var def = types17.Type.def;
157193
+ var types18 = fork.use(types_1.default);
157194
+ var def = types18.Type.def;
157154
157195
  fork.use(babel_core_1.default);
157155
157196
  fork.use(flow_1.default);
157156
157197
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -157174,12 +157215,12 @@ var require_typescript22 = __commonJS3({
157174
157215
  function default_1(fork) {
157175
157216
  fork.use(babel_core_1.default);
157176
157217
  fork.use(type_annotations_1.default);
157177
- var types17 = fork.use(types_1.default);
157178
- var n2 = types17.namedTypes;
157179
- var def = types17.Type.def;
157180
- var or = types17.Type.or;
157218
+ var types18 = fork.use(types_1.default);
157219
+ var n2 = types18.namedTypes;
157220
+ var def = types18.Type.def;
157221
+ var or = types18.Type.or;
157181
157222
  var defaults = fork.use(shared_1.default).defaults;
157182
- var StringLiteral = types17.Type.from(function(value, deep) {
157223
+ var StringLiteral = types18.Type.from(function(value, deep) {
157183
157224
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
157184
157225
  return true;
157185
157226
  }
@@ -159127,8 +159168,8 @@ var require_util22 = __commonJS3({
159127
159168
  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;
159128
159169
  var tslib_1 = require_tslib3();
159129
159170
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
159130
- var types17 = tslib_1.__importStar(require_main5());
159131
- var n2 = types17.namedTypes;
159171
+ var types18 = tslib_1.__importStar(require_main5());
159172
+ var n2 = types18.namedTypes;
159132
159173
  var source_map_1 = tslib_1.__importDefault(require_source_map3());
159133
159174
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
159134
159175
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -166434,10 +166475,10 @@ var require_comments3 = __commonJS3({
166434
166475
  exports.printComments = exports.attach = void 0;
166435
166476
  var tslib_1 = require_tslib3();
166436
166477
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
166437
- var types17 = tslib_1.__importStar(require_main5());
166438
- var n2 = types17.namedTypes;
166439
- var isArray2 = types17.builtInTypes.array;
166440
- var isObject2 = types17.builtInTypes.object;
166478
+ var types18 = tslib_1.__importStar(require_main5());
166479
+ var n2 = types18.namedTypes;
166480
+ var isArray2 = types18.builtInTypes.array;
166481
+ var isObject2 = types18.builtInTypes.object;
166441
166482
  var lines_1 = require_lines3();
166442
166483
  var util_1 = require_util22();
166443
166484
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -166468,7 +166509,7 @@ var require_comments3 = __commonJS3({
166468
166509
  if (isArray2.check(node)) {
166469
166510
  names = Object.keys(node);
166470
166511
  } else if (isObject2.check(node)) {
166471
- names = types17.getFieldNames(node);
166512
+ names = types18.getFieldNames(node);
166472
166513
  } else {
166473
166514
  return resultArray;
166474
166515
  }
@@ -166646,7 +166687,7 @@ var require_comments3 = __commonJS3({
166646
166687
  function printComments(path32, print132) {
166647
166688
  var value = path32.getValue();
166648
166689
  var innerLines = print132(path32);
166649
- var comments = n2.Node.check(value) && types17.getFieldValue(value, "comments");
166690
+ var comments = n2.Node.check(value) && types18.getFieldValue(value, "comments");
166650
166691
  if (!comments || comments.length === 0) {
166651
166692
  return innerLines;
166652
166693
  }
@@ -166654,8 +166695,8 @@ var require_comments3 = __commonJS3({
166654
166695
  var trailingParts = [innerLines];
166655
166696
  path32.each(function(commentPath) {
166656
166697
  var comment = commentPath.getValue();
166657
- var leading = types17.getFieldValue(comment, "leading");
166658
- var trailing = types17.getFieldValue(comment, "trailing");
166698
+ var leading = types18.getFieldValue(comment, "leading");
166699
+ var trailing = types18.getFieldValue(comment, "trailing");
166659
166700
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
166660
166701
  leadingParts.push(printLeadingComment(commentPath, print132));
166661
166702
  } else if (trailing) {
@@ -166675,10 +166716,10 @@ var require_parser3 = __commonJS3({
166675
166716
  exports.parse = void 0;
166676
166717
  var tslib_1 = require_tslib3();
166677
166718
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
166678
- var types17 = tslib_1.__importStar(require_main5());
166679
- var b2 = types17.builders;
166680
- var isObject2 = types17.builtInTypes.object;
166681
- var isArray2 = types17.builtInTypes.array;
166719
+ var types18 = tslib_1.__importStar(require_main5());
166720
+ var b2 = types18.builders;
166721
+ var isObject2 = types18.builtInTypes.object;
166722
+ var isArray2 = types18.builtInTypes.array;
166682
166723
  var options_1 = require_options3();
166683
166724
  var lines_1 = require_lines3();
166684
166725
  var comments_1 = require_comments3();
@@ -166862,11 +166903,11 @@ var require_fast_path3 = __commonJS3({
166862
166903
  Object.defineProperty(exports, "__esModule", { value: true });
166863
166904
  var tslib_1 = require_tslib3();
166864
166905
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
166865
- var types17 = tslib_1.__importStar(require_main5());
166906
+ var types18 = tslib_1.__importStar(require_main5());
166866
166907
  var util = tslib_1.__importStar(require_util22());
166867
- var n2 = types17.namedTypes;
166868
- var isArray2 = types17.builtInTypes.array;
166869
- var isNumber = types17.builtInTypes.number;
166908
+ var n2 = types18.namedTypes;
166909
+ var isArray2 = types18.builtInTypes.array;
166910
+ var isNumber = types18.builtInTypes.number;
166870
166911
  var PRECEDENCE = {};
166871
166912
  [
166872
166913
  ["??"],
@@ -166895,7 +166936,7 @@ var require_fast_path3 = __commonJS3({
166895
166936
  if (obj instanceof FastPath) {
166896
166937
  return obj.copy();
166897
166938
  }
166898
- if (obj instanceof types17.NodePath) {
166939
+ if (obj instanceof types18.NodePath) {
166899
166940
  var copy = Object.create(FastPath.prototype);
166900
166941
  var stack = [obj.value];
166901
166942
  for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
@@ -167206,7 +167247,7 @@ var require_fast_path3 = __commonJS3({
167206
167247
  return node.some(containsCallExpression);
167207
167248
  }
167208
167249
  if (n2.Node.check(node)) {
167209
- return types17.someField(node, function(_name, child) {
167250
+ return types18.someField(node, function(_name, child) {
167210
167251
  return containsCallExpression(child);
167211
167252
  });
167212
167253
  }
@@ -167294,16 +167335,16 @@ var require_patcher3 = __commonJS3({
167294
167335
  var tslib_1 = require_tslib3();
167295
167336
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
167296
167337
  var linesModule = tslib_1.__importStar(require_lines3());
167297
- var types17 = tslib_1.__importStar(require_main5());
167298
- var Printable = types17.namedTypes.Printable;
167299
- var Expression = types17.namedTypes.Expression;
167300
- var ReturnStatement = types17.namedTypes.ReturnStatement;
167301
- var SourceLocation3 = types17.namedTypes.SourceLocation;
167338
+ var types18 = tslib_1.__importStar(require_main5());
167339
+ var Printable = types18.namedTypes.Printable;
167340
+ var Expression = types18.namedTypes.Expression;
167341
+ var ReturnStatement = types18.namedTypes.ReturnStatement;
167342
+ var SourceLocation3 = types18.namedTypes.SourceLocation;
167302
167343
  var util_1 = require_util22();
167303
167344
  var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
167304
- var isObject2 = types17.builtInTypes.object;
167305
- var isArray2 = types17.builtInTypes.array;
167306
- var isString = types17.builtInTypes.string;
167345
+ var isObject2 = types18.builtInTypes.object;
167346
+ var isArray2 = types18.builtInTypes.array;
167347
+ var isString = types18.builtInTypes.string;
167307
167348
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
167308
167349
  var Patcher = function Patcher2(lines) {
167309
167350
  assert_1.default.ok(this instanceof Patcher2);
@@ -167573,8 +167614,8 @@ var require_patcher3 = __commonJS3({
167573
167614
  if (k2.charAt(0) === "_") {
167574
167615
  continue;
167575
167616
  }
167576
- newPath.stack.push(k2, types17.getFieldValue(newNode, k2));
167577
- oldPath.stack.push(k2, types17.getFieldValue(oldNode, k2));
167617
+ newPath.stack.push(k2, types18.getFieldValue(newNode, k2));
167618
+ oldPath.stack.push(k2, types18.getFieldValue(oldNode, k2));
167578
167619
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
167579
167620
  newPath.stack.length -= 2;
167580
167621
  oldPath.stack.length -= 2;
@@ -167596,16 +167637,16 @@ var require_printer3 = __commonJS3({
167596
167637
  exports.Printer = void 0;
167597
167638
  var tslib_1 = require_tslib3();
167598
167639
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
167599
- var types17 = tslib_1.__importStar(require_main5());
167640
+ var types18 = tslib_1.__importStar(require_main5());
167600
167641
  var comments_1 = require_comments3();
167601
167642
  var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
167602
167643
  var lines_1 = require_lines3();
167603
167644
  var options_1 = require_options3();
167604
167645
  var patcher_1 = require_patcher3();
167605
167646
  var util = tslib_1.__importStar(require_util22());
167606
- var namedTypes = types17.namedTypes;
167607
- var isString = types17.builtInTypes.string;
167608
- var isObject2 = types17.builtInTypes.object;
167647
+ var namedTypes = types18.namedTypes;
167648
+ var isString = types18.builtInTypes.string;
167649
+ var isObject2 = types18.builtInTypes.object;
167609
167650
  var PrintResult = function PrintResult2(code, sourceMap) {
167610
167651
  assert_1.default.ok(this instanceof PrintResult2);
167611
167652
  isString.assert(code);
@@ -167767,7 +167808,7 @@ var require_printer3 = __commonJS3({
167767
167808
  case "OptionalMemberExpression": {
167768
167809
  parts.push(path32.call(print132, "object"));
167769
167810
  var property = path32.call(print132, "property");
167770
- var optional = types17.getFieldValue(n2, "optional");
167811
+ var optional = types18.getFieldValue(n2, "optional");
167771
167812
  if (n2.computed) {
167772
167813
  parts.push(optional ? "?.[" : "[", property, "]");
167773
167814
  } else {
@@ -168038,7 +168079,7 @@ var require_printer3 = __commonJS3({
168038
168079
  if (n2.typeArguments) {
168039
168080
  parts.push(path32.call(print132, "typeArguments"));
168040
168081
  }
168041
- if (types17.getFieldValue(n2, "optional")) {
168082
+ if (types18.getFieldValue(n2, "optional")) {
168042
168083
  parts.push("?.");
168043
168084
  }
168044
168085
  parts.push(printArgumentsList(path32, options, print132));
@@ -169717,8 +169758,8 @@ var require_printer3 = __commonJS3({
169717
169758
  });
169718
169759
  }
169719
169760
  function getPossibleRaw(node) {
169720
- var value = types17.getFieldValue(node, "value");
169721
- var extra = types17.getFieldValue(node, "extra");
169761
+ var value = types18.getFieldValue(node, "value");
169762
+ var extra = types18.getFieldValue(node, "extra");
169722
169763
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
169723
169764
  return extra.raw;
169724
169765
  }
@@ -169764,8 +169805,8 @@ var require_main22 = __commonJS3({
169764
169805
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
169765
169806
  var tslib_1 = require_tslib3();
169766
169807
  var fs_1 = tslib_1.__importDefault(__require2("fs"));
169767
- var types17 = tslib_1.__importStar(require_main5());
169768
- exports.types = types17;
169808
+ var types18 = tslib_1.__importStar(require_main5());
169809
+ exports.types = types18;
169769
169810
  var parser_1 = require_parser3();
169770
169811
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
169771
169812
  return parser_1.parse;
@@ -170425,7 +170466,7 @@ var printDocASTReducer2 = {
170425
170466
  leave: ({ name, interfaces, directives, fields }) => join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block3(fields)], " ")
170426
170467
  },
170427
170468
  UnionTypeDefinition: {
170428
- leave: ({ name, directives, types: types17 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
170469
+ leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
170429
170470
  },
170430
170471
  EnumTypeDefinition: {
170431
170472
  leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block3(values)], " ")
@@ -170452,7 +170493,7 @@ var printDocASTReducer2 = {
170452
170493
  leave: ({ name, interfaces, directives, fields }) => join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block3(fields)], " ")
170453
170494
  },
170454
170495
  UnionTypeExtension: {
170455
- leave: ({ name, directives, types: types17 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
170496
+ leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
170456
170497
  },
170457
170498
  EnumTypeExtension: {
170458
170499
  leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block3(values)], " ")
@@ -171867,7 +171908,18 @@ var ListManager2 = class {
171867
171908
  }
171868
171909
  lists = /* @__PURE__ */ new Map();
171869
171910
  listsByField = /* @__PURE__ */ new Map();
171870
- get(listName, id2, allLists) {
171911
+ get(listName, id2, allLists, skipMatches) {
171912
+ const lists = this.getLists(listName, id2, allLists);
171913
+ if (!lists) {
171914
+ return null;
171915
+ }
171916
+ if (skipMatches) {
171917
+ return new ListCollection2(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
171918
+ } else {
171919
+ return lists;
171920
+ }
171921
+ }
171922
+ getLists(listName, id2, allLists) {
171871
171923
  const matches = this.lists.get(listName);
171872
171924
  if (!matches || matches.size === 0) {
171873
171925
  return null;
@@ -171989,6 +172041,9 @@ var List2 = class {
171989
172041
  this.manager = manager;
171990
172042
  this.abstract = abstract;
171991
172043
  }
172044
+ get fieldRef() {
172045
+ return `${this.recordID}.${this.key}`;
172046
+ }
171992
172047
  when(when) {
171993
172048
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
171994
172049
  }
@@ -173133,8 +173188,8 @@ var Cache2 = class {
173133
173188
  variables
173134
173189
  );
173135
173190
  }
173136
- list(name, parentID, allLists) {
173137
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
173191
+ list(name, parentID, allLists, skipMatches) {
173192
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
173138
173193
  if (!handler) {
173139
173194
  throw new Error(
173140
173195
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -173549,6 +173604,7 @@ var CacheInternal2 = class {
173549
173604
  });
173550
173605
  }
173551
173606
  }
173607
+ const processedOperations = /* @__PURE__ */ new Set();
173552
173608
  for (const operation of operations || []) {
173553
173609
  let parentID;
173554
173610
  if (operation.parentID) {
@@ -173568,7 +173624,12 @@ var CacheInternal2 = class {
173568
173624
  const targets = Array.isArray(value) ? value : [value];
173569
173625
  for (const target of targets) {
173570
173626
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
173571
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
173627
+ this.cache.list(
173628
+ operation.list,
173629
+ parentID,
173630
+ operation.target === "all",
173631
+ processedOperations
173632
+ ).when(operation.when).addToList(
173572
173633
  fieldSelection,
173573
173634
  target,
173574
173635
  variables,
@@ -173576,7 +173637,12 @@ var CacheInternal2 = class {
173576
173637
  layer
173577
173638
  );
173578
173639
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
173579
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
173640
+ this.cache.list(
173641
+ operation.list,
173642
+ parentID,
173643
+ operation.target === "all",
173644
+ processedOperations
173645
+ ).when(operation.when).toggleElement({
173580
173646
  selection: fieldSelection,
173581
173647
  data: target,
173582
173648
  variables,
@@ -173584,7 +173650,12 @@ var CacheInternal2 = class {
173584
173650
  layer
173585
173651
  });
173586
173652
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
173587
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
173653
+ this.cache.list(
173654
+ operation.list,
173655
+ parentID,
173656
+ operation.target === "all",
173657
+ processedOperations
173658
+ ).when(operation.when).remove(target, variables, layer);
173588
173659
  } else if (operation.action === "delete" && operation.type && target) {
173589
173660
  const targetID = this.id(operation.type, target);
173590
173661
  if (!targetID) {
@@ -173596,6 +173667,16 @@ var CacheInternal2 = class {
173596
173667
  this.cache.delete(targetID, layer);
173597
173668
  }
173598
173669
  }
173670
+ if (operation.list) {
173671
+ const matchingLists = this.cache.list(
173672
+ operation.list,
173673
+ parentID,
173674
+ operation.target === "all"
173675
+ );
173676
+ for (const list3 of matchingLists.lists) {
173677
+ processedOperations.add(list3.fieldRef);
173678
+ }
173679
+ }
173599
173680
  }
173600
173681
  }
173601
173682
  return toNotify;
@@ -174061,6 +174142,46 @@ var { keys } = Object;
174061
174142
  var recast4 = __toESM3(require_main22(), 1);
174062
174143
  var AST4 = recast4.types.builders;
174063
174144
  var pageInfoSelection = [
174145
+ {
174146
+ kind: graphql13.Kind.FIELD,
174147
+ name: {
174148
+ kind: graphql13.Kind.NAME,
174149
+ value: "pageInfo"
174150
+ },
174151
+ selectionSet: {
174152
+ kind: graphql13.Kind.SELECTION_SET,
174153
+ selections: [
174154
+ {
174155
+ kind: graphql13.Kind.FIELD,
174156
+ name: {
174157
+ kind: graphql13.Kind.NAME,
174158
+ value: "hasPreviousPage"
174159
+ }
174160
+ },
174161
+ {
174162
+ kind: graphql13.Kind.FIELD,
174163
+ name: {
174164
+ kind: graphql13.Kind.NAME,
174165
+ value: "hasNextPage"
174166
+ }
174167
+ },
174168
+ {
174169
+ kind: graphql13.Kind.FIELD,
174170
+ name: {
174171
+ kind: graphql13.Kind.NAME,
174172
+ value: "startCursor"
174173
+ }
174174
+ },
174175
+ {
174176
+ kind: graphql13.Kind.FIELD,
174177
+ name: {
174178
+ kind: graphql13.Kind.NAME,
174179
+ value: "endCursor"
174180
+ }
174181
+ }
174182
+ ]
174183
+ }
174184
+ },
174064
174185
  {
174065
174186
  kind: graphql13.Kind.FIELD,
174066
174187
  name: {
@@ -174331,7 +174452,7 @@ var printDocASTReducer22 = {
174331
174452
  ], " ")
174332
174453
  },
174333
174454
  UnionTypeDefinition: {
174334
- leave: ({ name, directives, types: types17 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
174455
+ leave: ({ name, directives, types: types18 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
174335
174456
  },
174336
174457
  EnumTypeDefinition: {
174337
174458
  leave: ({ name, directives, values }) => join32(["enum", name, join32(directives, " "), block22(values)], " ")
@@ -174370,7 +174491,7 @@ var printDocASTReducer22 = {
174370
174491
  ], " ")
174371
174492
  },
174372
174493
  UnionTypeExtension: {
174373
- leave: ({ name, directives, types: types17 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
174494
+ leave: ({ name, directives, types: types18 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
174374
174495
  },
174375
174496
  EnumTypeExtension: {
174376
174497
  leave: ({ name, directives, values }) => join32(["extend enum", name, join32(directives, " "), block22(values)], " ")
@@ -174407,6 +174528,8 @@ For more information, please visit these links:
174407
174528
  - https://graphql.org/learn/global-object-identification/
174408
174529
  - ${siteURL}/guides/caching-data#custom-ids
174409
174530
  `;
174531
+ var recast14 = __toESM3(require_main22(), 1);
174532
+ var AST14 = recast14.types.builders;
174410
174533
  function find_insert_index(script) {
174411
174534
  let insert_index = script.body.findIndex((statement) => {
174412
174535
  return statement.type !== "ImportDeclaration";
@@ -174425,7 +174548,7 @@ function find_exported_fn(body, name) {
174425
174548
  if (exportDeclaration.declaration?.type === "FunctionDeclaration") {
174426
174549
  const value = exportDeclaration.declaration;
174427
174550
  if (value.id?.name === name) {
174428
- return exportDeclaration.declaration;
174551
+ return { declaration: exportDeclaration.declaration, export: exportDeclaration };
174429
174552
  }
174430
174553
  } else if (exportDeclaration.declaration?.type === "VariableDeclaration") {
174431
174554
  const value = exportDeclaration.declaration;
@@ -174444,7 +174567,10 @@ function find_exported_fn(body, name) {
174444
174567
  init2 = init2.arguments[0];
174445
174568
  }
174446
174569
  if (init2.type === "FunctionExpression" || init2.type === "ArrowFunctionExpression") {
174447
- return init2;
174570
+ return { declaration: init2, export: exportDeclaration };
174571
+ }
174572
+ if (init2.type === "Identifier" || init2.type === "CallExpression") {
174573
+ return { declaration: init2, export: exportDeclaration };
174448
174574
  }
174449
174575
  } else {
174450
174576
  continue;
@@ -174456,10 +174582,10 @@ function find_exported_fn(body, name) {
174456
174582
  if (!exported) {
174457
174583
  return null;
174458
174584
  }
174459
- return exported.declaration;
174585
+ return { declaration: exported.declaration, export: exported };
174460
174586
  }
174461
- var recast14 = __toESM3(require_main22(), 1);
174462
- var AST14 = recast14.types.builders;
174587
+ var recast15 = __toESM3(require_main22(), 1);
174588
+ var AST15 = recast15.types.builders;
174463
174589
  function ensure_imports({
174464
174590
  config: config2,
174465
174591
  script,
@@ -174475,13 +174601,13 @@ function ensure_imports({
174475
174601
  if (!has_import) {
174476
174602
  script.body.unshift({
174477
174603
  type: "ImportDeclaration",
174478
- source: AST14.stringLiteral(sourceModule),
174604
+ source: AST15.stringLiteral(sourceModule),
174479
174605
  importKind
174480
174606
  });
174481
174607
  }
174482
174608
  return { ids: [], added: has_import ? 0 : 1 };
174483
174609
  }
174484
- const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST14.identifier(id2));
174610
+ const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST15.identifier(id2));
174485
174611
  const toImport = idList.filter(
174486
174612
  (identifier) => !script.body.find(
174487
174613
  (statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
@@ -174492,16 +174618,16 @@ function ensure_imports({
174492
174618
  if (toImport.length > 0) {
174493
174619
  script.body.unshift({
174494
174620
  type: "ImportDeclaration",
174495
- source: AST14.stringLiteral(sourceModule),
174621
+ source: AST15.stringLiteral(sourceModule),
174496
174622
  specifiers: toImport.map(
174497
- (identifier, i22) => !Array.isArray(importID) ? AST14.importDefaultSpecifier(identifier) : AST14.importSpecifier(identifier, as?.[i22] ? AST14.identifier(as[i22]) : identifier)
174623
+ (identifier, i22) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i22] ? AST15.identifier(as[i22]) : identifier)
174498
174624
  ),
174499
174625
  importKind
174500
174626
  });
174501
174627
  }
174502
174628
  for (const [i22, target] of (as ?? []).entries()) {
174503
174629
  if (target) {
174504
- idList[i22] = AST14.identifier(target);
174630
+ idList[i22] = AST15.identifier(target);
174505
174631
  }
174506
174632
  }
174507
174633
  return {
@@ -175044,14 +175170,14 @@ function findScriptInnerBounds({
175044
175170
  }
175045
175171
 
175046
175172
  // src/plugin/transforms/componentQuery.ts
175047
- var recast15 = __toESM(require_main4(), 1);
175048
- var AST15 = recast15.types.builders;
175173
+ var recast16 = __toESM(require_main4(), 1);
175174
+ var AST16 = recast16.types.builders;
175049
175175
  async function QueryProcessor(config, page) {
175050
175176
  if (!is_component(config, page.framework, page.filepath)) {
175051
175177
  return;
175052
175178
  }
175053
175179
  const store_id = (name) => {
175054
- return AST15.identifier(`_houdini_` + name);
175180
+ return AST16.identifier(`_houdini_` + name);
175055
175181
  };
175056
175182
  const queries = await find_inline_queries(page, page.script, store_id);
175057
175183
  if (queries.length === 0) {
@@ -175121,8 +175247,8 @@ async function QueryProcessor(config, page) {
175121
175247
  page.script.body.splice(
175122
175248
  find_insert_index(page.script),
175123
175249
  0,
175124
- AST15.variableDeclaration("const", [
175125
- AST15.variableDeclarator(store_id(query.name.value), AST15.newExpression(factory, []))
175250
+ AST16.variableDeclaration("const", [
175251
+ AST16.variableDeclarator(store_id(query.name.value), AST16.newExpression(factory, []))
175126
175252
  ])
175127
175253
  );
175128
175254
  }
@@ -175138,47 +175264,47 @@ async function QueryProcessor(config, page) {
175138
175264
  )}. maybe its not exported? `
175139
175265
  });
175140
175266
  }
175141
- const queryLoadExpression = AST15.callExpression(
175142
- AST15.memberExpression(store_id(query.name.value), AST15.identifier("fetch")),
175267
+ const queryLoadExpression = AST16.callExpression(
175268
+ AST16.memberExpression(store_id(query.name.value), AST16.identifier("fetch")),
175143
175269
  [
175144
- AST15.objectExpression([
175145
- AST15.objectProperty(
175146
- AST15.identifier("variables"),
175147
- AST15.callExpression(AST15.identifier("marshalInputs"), [
175148
- AST15.objectExpression([
175149
- AST15.objectProperty(
175150
- AST15.identifier("config"),
175151
- AST15.callExpression(AST15.identifier("getCurrentConfig"), [])
175270
+ AST16.objectExpression([
175271
+ AST16.objectProperty(
175272
+ AST16.identifier("variables"),
175273
+ AST16.callExpression(AST16.identifier("marshalInputs"), [
175274
+ AST16.objectExpression([
175275
+ AST16.objectProperty(
175276
+ AST16.identifier("config"),
175277
+ AST16.callExpression(AST16.identifier("getCurrentConfig"), [])
175152
175278
  ),
175153
- AST15.objectProperty(
175154
- AST15.identifier("artifact"),
175155
- AST15.memberExpression(
175279
+ AST16.objectProperty(
175280
+ AST16.identifier("artifact"),
175281
+ AST16.memberExpression(
175156
175282
  store_id(query.name.value),
175157
- AST15.identifier("artifact")
175283
+ AST16.identifier("artifact")
175158
175284
  )
175159
175285
  ),
175160
- AST15.objectProperty(
175161
- AST15.identifier("input"),
175162
- has_variables ? AST15.callExpression(
175163
- AST15.memberExpression(
175164
- AST15.identifier(variable_fn),
175165
- AST15.identifier("call")
175286
+ AST16.objectProperty(
175287
+ AST16.identifier("input"),
175288
+ has_variables ? AST16.callExpression(
175289
+ AST16.memberExpression(
175290
+ AST16.identifier(variable_fn),
175291
+ AST16.identifier("call")
175166
175292
  ),
175167
175293
  [
175168
- AST15.newExpression(
175169
- AST15.identifier("RequestContext"),
175294
+ AST16.newExpression(
175295
+ AST16.identifier("RequestContext"),
175170
175296
  []
175171
175297
  ),
175172
- AST15.objectExpression([
175173
- AST15.objectProperty(
175174
- AST15.identifier("props"),
175175
- AST15.objectExpression(
175298
+ AST16.objectExpression([
175299
+ AST16.objectProperty(
175300
+ AST16.identifier("props"),
175301
+ AST16.objectExpression(
175176
175302
  props.map(
175177
- (prop2) => AST15.objectProperty(
175178
- AST15.identifier(
175303
+ (prop2) => AST16.objectProperty(
175304
+ AST16.identifier(
175179
175305
  prop2
175180
175306
  ),
175181
- AST15.identifier(
175307
+ AST16.identifier(
175182
175308
  prop2
175183
175309
  )
175184
175310
  )
@@ -175187,7 +175313,7 @@ async function QueryProcessor(config, page) {
175187
175313
  )
175188
175314
  ])
175189
175315
  ]
175190
- ) : AST15.objectExpression([])
175316
+ ) : AST16.objectExpression([])
175191
175317
  )
175192
175318
  ])
175193
175319
  ])
@@ -175198,23 +175324,23 @@ async function QueryProcessor(config, page) {
175198
175324
  let finalExpression = [];
175199
175325
  if (page.svelte5Runes) {
175200
175326
  finalExpression = [
175201
- AST15.expressionStatement(
175202
- AST15.callExpression(AST15.identifier("$effect"), [
175203
- AST15.arrowFunctionExpression(
175327
+ AST16.expressionStatement(
175328
+ AST16.callExpression(AST16.identifier("$effect"), [
175329
+ AST16.arrowFunctionExpression(
175204
175330
  [],
175205
- AST15.blockStatement([AST15.expressionStatement(queryLoadExpression)])
175331
+ AST16.blockStatement([AST16.expressionStatement(queryLoadExpression)])
175206
175332
  )
175207
175333
  ])
175208
175334
  )
175209
175335
  ];
175210
175336
  } else {
175211
175337
  finalExpression = [
175212
- AST15.labeledStatement(
175213
- AST15.identifier("$"),
175214
- AST15.expressionStatement(
175215
- AST15.logicalExpression(
175338
+ AST16.labeledStatement(
175339
+ AST16.identifier("$"),
175340
+ AST16.expressionStatement(
175341
+ AST16.logicalExpression(
175216
175342
  "&&",
175217
- AST15.identifier("isBrowser"),
175343
+ AST16.identifier("isBrowser"),
175218
175344
  queryLoadExpression
175219
175345
  )
175220
175346
  )
@@ -175256,8 +175382,8 @@ async function find_inline_queries(page, parsed, store_id) {
175256
175382
  }
175257
175383
 
175258
175384
  // src/plugin/transforms/kit/init.ts
175259
- var recast16 = __toESM(require_main4(), 1);
175260
- var AST16 = recast16.types.builders;
175385
+ var recast17 = __toESM(require_main4(), 1);
175386
+ var AST17 = recast17.types.builders;
175261
175387
  async function kit_init(page) {
175262
175388
  if (!is_root_layout(page.config, page.filepath)) {
175263
175389
  return;
@@ -175281,9 +175407,9 @@ async function kit_init(page) {
175281
175407
  import: ["extractSession", "setClientSession"]
175282
175408
  }).ids;
175283
175409
  page.script.body.push(
175284
- AST16.expressionStatement(
175285
- AST16.callExpression(on_mount, [
175286
- AST16.arrowFunctionExpression([], AST16.callExpression(set_client_started, []))
175410
+ AST17.expressionStatement(
175411
+ AST17.callExpression(on_mount, [
175412
+ AST17.arrowFunctionExpression([], AST17.callExpression(set_client_started, []))
175287
175413
  ])
175288
175414
  )
175289
175415
  );
@@ -175294,17 +175420,17 @@ async function kit_init(page) {
175294
175420
  import: ["page"]
175295
175421
  }).ids[0];
175296
175422
  page.script.body.push(
175297
- AST16.expressionStatement(
175298
- AST16.callExpression(AST16.memberExpression(store_id, AST16.identifier("subscribe")), [
175299
- AST16.arrowFunctionExpression(
175300
- [AST16.identifier("val")],
175301
- AST16.blockStatement([
175302
- AST16.expressionStatement(
175303
- AST16.callExpression(set_session, [
175304
- AST16.callExpression(extract_session, [
175305
- AST16.memberExpression(
175306
- AST16.identifier("val"),
175307
- AST16.identifier("data")
175423
+ AST17.expressionStatement(
175424
+ AST17.callExpression(AST17.memberExpression(store_id, AST17.identifier("subscribe")), [
175425
+ AST17.arrowFunctionExpression(
175426
+ [AST17.identifier("val")],
175427
+ AST17.blockStatement([
175428
+ AST17.expressionStatement(
175429
+ AST17.callExpression(set_session, [
175430
+ AST17.callExpression(extract_session, [
175431
+ AST17.memberExpression(
175432
+ AST17.identifier("val"),
175433
+ AST17.identifier("data")
175308
175434
  )
175309
175435
  ])
175310
175436
  ])
@@ -175318,7 +175444,7 @@ async function kit_init(page) {
175318
175444
 
175319
175445
  // src/plugin/transforms/kit/load.ts
175320
175446
  var graphql36 = __toESM(require("graphql"), 1);
175321
- var recast17 = __toESM(require_main4(), 1);
175447
+ var recast18 = __toESM(require_main4(), 1);
175322
175448
 
175323
175449
  // src/plugin/routing.ts
175324
175450
  var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
@@ -175400,14 +175526,14 @@ function escape2(str) {
175400
175526
  }
175401
175527
 
175402
175528
  // src/plugin/transforms/kit/load.ts
175403
- var AST17 = recast17.types.builders;
175529
+ var AST18 = recast18.types.builders;
175404
175530
  async function kit_load_generator(page) {
175405
175531
  const route = is_route(page.config, page.framework, page.filepath);
175406
175532
  const script = is_route_script(page.framework, page.filepath);
175407
175533
  if (!route && !script) {
175408
175534
  return;
175409
175535
  }
175410
- const inline_query_store = (name) => route ? AST17.memberExpression(AST17.identifier("data"), AST17.identifier(name)) : artifact_import({
175536
+ const inline_query_store = (name) => route ? AST18.memberExpression(AST18.identifier("data"), AST18.identifier(name)) : artifact_import({
175411
175537
  config: page.config,
175412
175538
  script: page.script,
175413
175539
  page,
@@ -175459,8 +175585,8 @@ async function kit_load_generator(page) {
175459
175585
  find_insert_index(page.script),
175460
175586
  0,
175461
175587
  ...!has_data ? [
175462
- AST17.exportNamedDeclaration(
175463
- AST17.variableDeclaration("let", [AST17.identifier("data")])
175588
+ AST18.exportNamedDeclaration(
175589
+ AST18.variableDeclaration("let", [AST18.identifier("data")])
175464
175590
  )
175465
175591
  ] : []
175466
175592
  );
@@ -175507,43 +175633,43 @@ function add_load({
175507
175633
  let before_load = page_info.exports.includes(houdini_before_load_fn);
175508
175634
  let afterLoad = page_info.exports.includes(houdini_afterLoad_fn);
175509
175635
  let on_error = page_info.exports.includes(houdini_on_error_fn);
175510
- const request_context = AST17.identifier("houdini_context");
175511
- const promise_list = AST17.identifier("promises");
175512
- const return_value = AST17.memberExpression(request_context, AST17.identifier("returnValue"));
175513
- const result_obj = AST17.identifier("result");
175514
- const input_obj = AST17.identifier("inputs");
175515
- const preload_fn = AST17.functionDeclaration(
175516
- AST17.identifier("load"),
175517
- [AST17.identifier("context")],
175518
- AST17.blockStatement([
175519
- AST17.variableDeclaration("const", [
175520
- AST17.variableDeclarator(
175636
+ const request_context = AST18.identifier("houdini_context");
175637
+ const promise_list = AST18.identifier("promises");
175638
+ const return_value = AST18.memberExpression(request_context, AST18.identifier("returnValue"));
175639
+ const result_obj = AST18.identifier("result");
175640
+ const input_obj = AST18.identifier("inputs");
175641
+ const preload_fn = AST18.functionDeclaration(
175642
+ AST18.identifier("load"),
175643
+ [AST18.identifier("context")],
175644
+ AST18.blockStatement([
175645
+ AST18.variableDeclaration("const", [
175646
+ AST18.variableDeclarator(
175521
175647
  request_context,
175522
- AST17.newExpression(AST17.identifier("RequestContext"), [AST17.identifier("context")])
175648
+ AST18.newExpression(AST18.identifier("RequestContext"), [AST18.identifier("context")])
175523
175649
  )
175524
175650
  ]),
175525
- AST17.variableDeclaration("const", [
175526
- AST17.variableDeclarator(
175527
- AST17.identifier("houdiniConfig"),
175528
- AST17.callExpression(AST17.identifier("getCurrentConfig"), [])
175651
+ AST18.variableDeclaration("const", [
175652
+ AST18.variableDeclarator(
175653
+ AST18.identifier("houdiniConfig"),
175654
+ AST18.callExpression(AST18.identifier("getCurrentConfig"), [])
175529
175655
  )
175530
175656
  ]),
175531
- AST17.variableDeclaration("const", [
175532
- AST17.variableDeclarator(promise_list, AST17.arrayExpression([]))
175657
+ AST18.variableDeclaration("const", [
175658
+ AST18.variableDeclarator(promise_list, AST18.arrayExpression([]))
175533
175659
  ]),
175534
- AST17.variableDeclaration("const", [
175535
- AST17.variableDeclarator(input_obj, AST17.objectExpression([]))
175660
+ AST18.variableDeclaration("const", [
175661
+ AST18.variableDeclarator(input_obj, AST18.objectExpression([]))
175536
175662
  ]),
175537
- AST17.returnStatement(
175538
- AST17.objectExpression([
175539
- AST17.spreadElement(return_value),
175540
- AST17.spreadElement(result_obj)
175663
+ AST18.returnStatement(
175664
+ AST18.objectExpression([
175665
+ AST18.spreadElement(return_value),
175666
+ AST18.spreadElement(result_obj)
175541
175667
  ])
175542
175668
  )
175543
175669
  ])
175544
175670
  );
175545
175671
  preload_fn.async = true;
175546
- page.script.body.push(AST17.exportNamedDeclaration(preload_fn));
175672
+ page.script.body.push(AST18.exportNamedDeclaration(preload_fn));
175547
175673
  let insert_index = 4;
175548
175674
  for (const query of queries) {
175549
175675
  const { ids } = ensure_imports({
@@ -175553,19 +175679,19 @@ function add_load({
175553
175679
  sourceModule: store_import_path({ config: page.config, name: query.name.value })
175554
175680
  });
175555
175681
  const load_fn = ids[0];
175556
- const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST17.awaitExpression(
175557
- AST17.callExpression(AST17.identifier(__variable_fn_name(query.name.value)), [
175558
- AST17.identifier("houdiniConfig"),
175559
- AST17.identifier("context")
175682
+ const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST18.awaitExpression(
175683
+ AST18.callExpression(AST18.identifier(__variable_fn_name(query.name.value)), [
175684
+ AST18.identifier("houdiniConfig"),
175685
+ AST18.identifier("context")
175560
175686
  ])
175561
- ) : AST17.objectExpression([]);
175687
+ ) : AST18.objectExpression([]);
175562
175688
  preload_fn.body.body.splice(
175563
175689
  insert_index++,
175564
175690
  0,
175565
- AST17.expressionStatement(
175566
- AST17.assignmentExpression(
175691
+ AST18.expressionStatement(
175692
+ AST18.assignmentExpression(
175567
175693
  "=",
175568
- AST17.memberExpression(input_obj, AST17.literal(query.name.value)),
175694
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value)),
175569
175695
  variables
175570
175696
  )
175571
175697
  )
@@ -175573,18 +175699,18 @@ function add_load({
175573
175699
  preload_fn.body.body.splice(
175574
175700
  insert_index++,
175575
175701
  0,
175576
- AST17.expressionStatement(
175577
- AST17.callExpression(AST17.memberExpression(promise_list, AST17.identifier("push")), [
175578
- AST17.callExpression(load_fn, [
175579
- AST17.objectExpression([
175580
- AST17.objectProperty(
175581
- AST17.literal("variables"),
175582
- AST17.memberExpression(input_obj, AST17.literal(query.name.value))
175702
+ AST18.expressionStatement(
175703
+ AST18.callExpression(AST18.memberExpression(promise_list, AST18.identifier("push")), [
175704
+ AST18.callExpression(load_fn, [
175705
+ AST18.objectExpression([
175706
+ AST18.objectProperty(
175707
+ AST18.literal("variables"),
175708
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value))
175583
175709
  ),
175584
- AST17.objectProperty(AST17.literal("event"), AST17.identifier("context")),
175585
- AST17.objectProperty(
175586
- AST17.literal("blocking"),
175587
- afterLoad || on_error ? AST17.booleanLiteral(true) : AST17.identifier("undefined")
175710
+ AST18.objectProperty(AST18.literal("event"), AST18.identifier("context")),
175711
+ AST18.objectProperty(
175712
+ AST18.literal("blocking"),
175713
+ afterLoad || on_error ? AST18.booleanLiteral(true) : AST18.identifier("undefined")
175588
175714
  )
175589
175715
  ])
175590
175716
  ])
@@ -175596,28 +175722,28 @@ function add_load({
175596
175722
  preload_fn.body.body.splice(
175597
175723
  insert_index++,
175598
175724
  0,
175599
- AST17.variableDeclaration("let", [
175600
- AST17.variableDeclarator(result_obj, AST17.objectExpression([]))
175725
+ AST18.variableDeclaration("let", [
175726
+ AST18.variableDeclarator(result_obj, AST18.objectExpression([]))
175601
175727
  ]),
175602
- AST17.tryStatement(
175603
- AST17.blockStatement([
175604
- AST17.expressionStatement(
175605
- AST17.assignmentExpression(
175728
+ AST18.tryStatement(
175729
+ AST18.blockStatement([
175730
+ AST18.expressionStatement(
175731
+ AST18.assignmentExpression(
175606
175732
  "=",
175607
175733
  result_obj,
175608
- AST17.callExpression(
175609
- AST17.memberExpression(
175610
- AST17.identifier("Object"),
175611
- AST17.identifier("assign")
175734
+ AST18.callExpression(
175735
+ AST18.memberExpression(
175736
+ AST18.identifier("Object"),
175737
+ AST18.identifier("assign")
175612
175738
  ),
175613
175739
  [
175614
- AST17.objectExpression([]),
175615
- AST17.spreadElement(
175616
- AST17.awaitExpression(
175617
- AST17.callExpression(
175618
- AST17.memberExpression(
175619
- AST17.identifier("Promise"),
175620
- AST17.identifier("all")
175740
+ AST18.objectExpression([]),
175741
+ AST18.spreadElement(
175742
+ AST18.awaitExpression(
175743
+ AST18.callExpression(
175744
+ AST18.memberExpression(
175745
+ AST18.identifier("Promise"),
175746
+ AST18.identifier("all")
175621
175747
  ),
175622
175748
  [promise_list]
175623
175749
  )
@@ -175628,37 +175754,37 @@ function add_load({
175628
175754
  )
175629
175755
  )
175630
175756
  ]),
175631
- AST17.catchClause(
175632
- AST17.identifier("err"),
175757
+ AST18.catchClause(
175758
+ AST18.identifier("err"),
175633
175759
  null,
175634
- AST17.blockStatement([
175635
- on_error ? AST17.expressionStatement(
175636
- AST17.awaitExpression(
175637
- AST17.callExpression(
175638
- AST17.memberExpression(
175760
+ AST18.blockStatement([
175761
+ on_error ? AST18.expressionStatement(
175762
+ AST18.awaitExpression(
175763
+ AST18.callExpression(
175764
+ AST18.memberExpression(
175639
175765
  request_context,
175640
- AST17.identifier("invokeLoadHook")
175766
+ AST18.identifier("invokeLoadHook")
175641
175767
  ),
175642
175768
  [
175643
- AST17.objectExpression([
175644
- AST17.objectProperty(
175645
- AST17.literal("variant"),
175646
- AST17.stringLiteral("error")
175769
+ AST18.objectExpression([
175770
+ AST18.objectProperty(
175771
+ AST18.literal("variant"),
175772
+ AST18.stringLiteral("error")
175647
175773
  ),
175648
- AST17.objectProperty(
175649
- AST17.literal("hookFn"),
175650
- AST17.identifier(houdini_on_error_fn)
175774
+ AST18.objectProperty(
175775
+ AST18.literal("hookFn"),
175776
+ AST18.identifier(houdini_on_error_fn)
175651
175777
  ),
175652
- AST17.objectProperty(
175653
- AST17.literal("error"),
175654
- AST17.identifier("err")
175778
+ AST18.objectProperty(
175779
+ AST18.literal("error"),
175780
+ AST18.identifier("err")
175655
175781
  ),
175656
- AST17.objectProperty(AST17.literal("input"), input_obj)
175782
+ AST18.objectProperty(AST18.literal("input"), input_obj)
175657
175783
  ])
175658
175784
  ]
175659
175785
  )
175660
175786
  )
175661
- ) : AST17.throwStatement(AST17.identifier("err"))
175787
+ ) : AST18.throwStatement(AST18.identifier("err"))
175662
175788
  ])
175663
175789
  )
175664
175790
  )
@@ -175693,22 +175819,22 @@ async function find_special_query(type, page) {
175693
175819
  return definition;
175694
175820
  }
175695
175821
  function load_hook_statements(name, request_context, input_id, result_id) {
175696
- return AST17.expressionStatement(
175697
- AST17.awaitExpression(
175698
- AST17.callExpression(
175699
- AST17.memberExpression(request_context, AST17.identifier("invokeLoadHook")),
175822
+ return AST18.expressionStatement(
175823
+ AST18.awaitExpression(
175824
+ AST18.callExpression(
175825
+ AST18.memberExpression(request_context, AST18.identifier("invokeLoadHook")),
175700
175826
  [
175701
- AST17.objectExpression([
175702
- AST17.objectProperty(AST17.literal("variant"), AST17.stringLiteral(name)),
175703
- AST17.objectProperty(
175704
- AST17.literal("hookFn"),
175705
- AST17.identifier(
175827
+ AST18.objectExpression([
175828
+ AST18.objectProperty(AST18.literal("variant"), AST18.stringLiteral(name)),
175829
+ AST18.objectProperty(
175830
+ AST18.literal("hookFn"),
175831
+ AST18.identifier(
175706
175832
  name === "before" ? houdini_before_load_fn : houdini_afterLoad_fn
175707
175833
  )
175708
175834
  ),
175709
175835
  ...name === "after" ? [
175710
- AST17.objectProperty(AST17.literal("input"), input_id),
175711
- AST17.objectProperty(AST17.literal("data"), result_id)
175836
+ AST18.objectProperty(AST18.literal("input"), input_id),
175837
+ AST18.objectProperty(AST18.literal("data"), result_id)
175712
175838
  ] : []
175713
175839
  ])
175714
175840
  ]
@@ -175770,22 +175896,22 @@ function variable_function_for_query(page, query, has_local) {
175770
175896
  };
175771
175897
  }
175772
175898
  const fn_body = [
175773
- AST17.variableDeclaration("const", [
175774
- AST17.variableDeclarator(
175775
- AST17.identifier("result"),
175776
- AST17.objectExpression(
175899
+ AST18.variableDeclaration("const", [
175900
+ AST18.variableDeclarator(
175901
+ AST18.identifier("result"),
175902
+ AST18.objectExpression(
175777
175903
  Object.entries(has_args).map(([arg, type]) => {
175778
- return AST17.objectProperty(
175779
- AST17.identifier(arg),
175780
- AST17.callExpression(AST17.identifier("parseScalar"), [
175781
- AST17.identifier("config"),
175782
- AST17.stringLiteral(type),
175783
- AST17.memberExpression(
175784
- AST17.memberExpression(
175785
- AST17.identifier("event"),
175786
- AST17.identifier("params")
175904
+ return AST18.objectProperty(
175905
+ AST18.identifier(arg),
175906
+ AST18.callExpression(AST18.identifier("parseScalar"), [
175907
+ AST18.identifier("config"),
175908
+ AST18.stringLiteral(type),
175909
+ AST18.memberExpression(
175910
+ AST18.memberExpression(
175911
+ AST18.identifier("event"),
175912
+ AST18.identifier("params")
175787
175913
  ),
175788
- AST17.identifier(arg)
175914
+ AST18.identifier(arg)
175789
175915
  )
175790
175916
  ])
175791
175917
  );
@@ -175796,28 +175922,28 @@ function variable_function_for_query(page, query, has_local) {
175796
175922
  ];
175797
175923
  if (has_local) {
175798
175924
  fn_body.push(
175799
- AST17.expressionStatement(
175800
- AST17.callExpression(
175801
- AST17.memberExpression(AST17.identifier("Object"), AST17.identifier("assign")),
175925
+ AST18.expressionStatement(
175926
+ AST18.callExpression(
175927
+ AST18.memberExpression(AST18.identifier("Object"), AST18.identifier("assign")),
175802
175928
  [
175803
- AST17.identifier("result"),
175804
- AST17.callExpression(AST17.identifier("marshalInputs"), [
175805
- AST17.objectExpression([
175806
- AST17.objectProperty(
175807
- AST17.identifier("config"),
175808
- AST17.identifier("config")
175929
+ AST18.identifier("result"),
175930
+ AST18.callExpression(AST18.identifier("marshalInputs"), [
175931
+ AST18.objectExpression([
175932
+ AST18.objectProperty(
175933
+ AST18.identifier("config"),
175934
+ AST18.identifier("config")
175809
175935
  ),
175810
- AST17.objectProperty(
175811
- AST17.identifier("input"),
175812
- AST17.awaitExpression(
175813
- AST17.callExpression(
175814
- AST17.identifier(query_variable_fn(query.name.value)),
175815
- [AST17.identifier("event")]
175936
+ AST18.objectProperty(
175937
+ AST18.identifier("input"),
175938
+ AST18.awaitExpression(
175939
+ AST18.callExpression(
175940
+ AST18.identifier(query_variable_fn(query.name.value)),
175941
+ [AST18.identifier("event")]
175816
175942
  )
175817
175943
  )
175818
175944
  ),
175819
- AST17.objectProperty(
175820
- AST17.identifier("artifact"),
175945
+ AST18.objectProperty(
175946
+ AST18.identifier("artifact"),
175821
175947
  artifact_import({
175822
175948
  config: page.config,
175823
175949
  script: page.script,
@@ -175832,11 +175958,11 @@ function variable_function_for_query(page, query, has_local) {
175832
175958
  )
175833
175959
  );
175834
175960
  }
175835
- fn_body.push(AST17.returnStatement(AST17.identifier("result")));
175836
- const declaration2 = AST17.functionDeclaration(
175837
- AST17.identifier(__variable_fn_name(query.name.value)),
175838
- [AST17.identifier("config"), AST17.identifier("event")],
175839
- AST17.blockStatement(fn_body)
175961
+ fn_body.push(AST18.returnStatement(AST18.identifier("result")));
175962
+ const declaration2 = AST18.functionDeclaration(
175963
+ AST18.identifier(__variable_fn_name(query.name.value)),
175964
+ [AST18.identifier("config"), AST18.identifier("event")],
175965
+ AST18.blockStatement(fn_body)
175840
175966
  );
175841
175967
  declaration2.async = true;
175842
175968
  return declaration2;
@@ -175846,8 +175972,8 @@ function __variable_fn_name(name) {
175846
175972
  }
175847
175973
 
175848
175974
  // src/plugin/transforms/kit/session.ts
175849
- var recast18 = __toESM(require_main4(), 1);
175850
- var AST18 = recast18.types.builders;
175975
+ var recast19 = __toESM(require_main4(), 1);
175976
+ var AST19 = recast19.types.builders;
175851
175977
  function session_default(page) {
175852
175978
  if (is_root_layout_server(page.config, page.filepath)) {
175853
175979
  process_root_layout_server(page);
@@ -175863,12 +175989,12 @@ function process_root_layout_server(page) {
175863
175989
  sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
175864
175990
  }).ids[0];
175865
175991
  add_load_return(page, (event_id) => [
175866
- AST18.spreadElement(AST18.callExpression(build_session_object, [event_id]))
175992
+ AST19.spreadElement(AST19.callExpression(build_session_object, [event_id]))
175867
175993
  ]);
175868
175994
  }
175869
175995
  function process_root_layout_script(page) {
175870
175996
  add_load_return(page, (event_id) => [
175871
- AST18.spreadElement(AST18.memberExpression(event_id, AST18.identifier("data")))
175997
+ AST19.spreadElement(AST19.memberExpression(event_id, AST19.identifier("data")))
175872
175998
  ]);
175873
175999
  }
175874
176000
  function add_load_return(page, properties) {
@@ -175880,50 +176006,78 @@ function add_load_return(page, properties) {
175880
176006
  if (return_statement_index !== -1) {
175881
176007
  return_statement = body.body[return_statement_index];
175882
176008
  } else {
175883
- return_statement = AST18.returnStatement(AST18.objectExpression([]));
176009
+ return_statement = AST19.returnStatement(AST19.objectExpression([]));
175884
176010
  body.body.push(return_statement);
175885
- return_statement_index = body.body.length - 1;
175886
176011
  }
175887
- const local_return_var = AST18.identifier("__houdini__vite__plugin__return__value__");
175888
- body.body[return_statement_index] = AST18.variableDeclaration("const", [
175889
- AST18.variableDeclarator(local_return_var, return_statement.argument)
175890
- ]);
175891
- body.body.splice(
175892
- return_statement_index + 1,
175893
- 0,
175894
- AST18.returnStatement(
175895
- AST18.objectExpression([...properties(event_id), AST18.spreadElement(local_return_var)])
175896
- )
175897
- );
176012
+ return walk(body, {
176013
+ enter(node) {
176014
+ if (node.type === "ReturnStatement") {
176015
+ const returnedValue = node.argument;
176016
+ this.replace(
176017
+ AST19.returnStatement(
176018
+ AST19.objectExpression([
176019
+ ...properties(event_id),
176020
+ AST19.spreadElement(returnedValue ?? AST19.objectExpression([]))
176021
+ ])
176022
+ )
176023
+ );
176024
+ }
176025
+ }
176026
+ });
175898
176027
  });
175899
176028
  }
175900
176029
  function modify_load(page, cb) {
175901
- let load_fn = find_exported_fn(page.script.body, "load");
175902
- let event_id = AST18.identifier("event");
175903
- let body = AST18.blockStatement([]);
176030
+ let exported = find_exported_fn(page.script.body, "load");
176031
+ let event_id = AST19.identifier("event");
176032
+ let load_fn = exported?.declaration || null;
176033
+ let body = AST19.blockStatement([]);
175904
176034
  if (load_fn?.type === "ArrowFunctionExpression") {
175905
176035
  if (load_fn.body.type === "BlockStatement") {
175906
176036
  body = load_fn.body;
175907
176037
  } else {
175908
- body = AST18.blockStatement([AST18.returnStatement(load_fn.body)]);
176038
+ body = AST19.blockStatement([AST19.returnStatement(load_fn.body)]);
175909
176039
  load_fn.body = body;
175910
176040
  }
175911
- } else if (load_fn) {
176041
+ } else if (load_fn && "body" in load_fn) {
175912
176042
  body = load_fn.body;
175913
176043
  }
175914
176044
  if (!load_fn) {
175915
- load_fn = AST18.functionDeclaration(
175916
- AST18.identifier("load"),
176045
+ load_fn = AST19.functionDeclaration(
176046
+ AST19.identifier("load"),
175917
176047
  [event_id],
175918
- AST18.blockStatement([])
176048
+ AST19.blockStatement([])
175919
176049
  );
175920
176050
  load_fn.async = true;
175921
176051
  page.script.body.splice(
175922
176052
  find_insert_index(page.script),
175923
176053
  0,
175924
- AST18.exportNamedDeclaration(load_fn)
176054
+ AST19.exportNamedDeclaration(load_fn)
175925
176055
  );
175926
176056
  body = load_fn.body;
176057
+ } else if (load_fn.type === "CallExpression" || load_fn.type === "Identifier") {
176058
+ const exportStatement = exported?.export;
176059
+ if (!exportStatement) {
176060
+ return;
176061
+ }
176062
+ const intermediateID = AST19.identifier("houdini__intermediate__load__");
176063
+ page.script.body.push(
176064
+ AST19.variableDeclaration("const", [AST19.variableDeclarator(intermediateID, load_fn)])
176065
+ );
176066
+ const newLoad = AST19.arrowFunctionExpression(
176067
+ [AST19.identifier("event")],
176068
+ AST19.blockStatement([
176069
+ AST19.variableDeclaration("const", [
176070
+ AST19.variableDeclarator(
176071
+ AST19.identifier("result"),
176072
+ AST19.callExpression(intermediateID, [AST19.identifier("event")])
176073
+ )
176074
+ ]),
176075
+ AST19.returnStatement(AST19.identifier("result"))
176076
+ ])
176077
+ );
176078
+ exportStatement.declaration.declarations[0].init = newLoad;
176079
+ load_fn = newLoad;
176080
+ body = newLoad.body;
175927
176081
  } else {
175928
176082
  if (load_fn.params.length === 0) {
175929
176083
  load_fn.params.push(event_id);
@@ -175933,7 +176087,7 @@ function modify_load(page, cb) {
175933
176087
  const pattern = load_fn.params[0];
175934
176088
  load_fn.params[0] = event_id;
175935
176089
  body.body.unshift(
175936
- AST18.variableDeclaration("let", [AST18.variableDeclarator(pattern, event_id)])
176090
+ AST19.variableDeclaration("let", [AST19.variableDeclarator(pattern, event_id)])
175937
176091
  );
175938
176092
  } else {
175939
176093
  throw new Error(
@@ -175941,7 +176095,7 @@ function modify_load(page, cb) {
175941
176095
  );
175942
176096
  }
175943
176097
  }
175944
- cb(body, event_id);
176098
+ load_fn.body = cb(body, event_id);
175945
176099
  }
175946
176100
 
175947
176101
  // src/plugin/transforms/kit/index.ts
@@ -175954,8 +176108,8 @@ async function SvelteKitProcessor(config, page) {
175954
176108
  }
175955
176109
 
175956
176110
  // src/plugin/transforms/tags.ts
175957
- var recast19 = __toESM(require_main4(), 1);
175958
- var AST19 = recast19.types.builders;
176111
+ var recast20 = __toESM(require_main4(), 1);
176112
+ var AST20 = recast20.types.builders;
175959
176113
  async function GraphQLTagProcessor(config, page) {
175960
176114
  await find_graphql(config, page.script, {
175961
176115
  dependency: page.watch_file,
@@ -175963,7 +176117,7 @@ async function GraphQLTagProcessor(config, page) {
175963
176117
  const { node, parsedDocument } = tag2;
175964
176118
  const operation = config.extractDefinition(parsedDocument);
175965
176119
  const { id: id2 } = store_import({ page, artifact: { name: operation.name.value } });
175966
- node.replaceWith(AST19.newExpression(id2, []));
176120
+ node.replaceWith(AST20.newExpression(id2, []));
175967
176121
  }
175968
176122
  });
175969
176123
  }
@@ -175982,7 +176136,7 @@ async function apply_transforms(framework, page) {
175982
176136
  position = res.position;
175983
176137
  useRunes = res.useRunes;
175984
176138
  } else {
175985
- script = recast20.types.builders.program([]);
176139
+ script = recast21.types.builders.program([]);
175986
176140
  position = { start: 0, end: 0 };
175987
176141
  }
175988
176142
  } else {