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.
@@ -89817,7 +89817,18 @@ var ListManager = class {
89817
89817
  }
89818
89818
  lists = /* @__PURE__ */ new Map();
89819
89819
  listsByField = /* @__PURE__ */ new Map();
89820
- get(listName, id2, allLists) {
89820
+ get(listName, id2, allLists, skipMatches) {
89821
+ const lists = this.getLists(listName, id2, allLists);
89822
+ if (!lists) {
89823
+ return null;
89824
+ }
89825
+ if (skipMatches) {
89826
+ return new ListCollection(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
89827
+ } else {
89828
+ return lists;
89829
+ }
89830
+ }
89831
+ getLists(listName, id2, allLists) {
89821
89832
  const matches = this.lists.get(listName);
89822
89833
  if (!matches || matches.size === 0) {
89823
89834
  return null;
@@ -89939,6 +89950,9 @@ var List = class {
89939
89950
  this.manager = manager;
89940
89951
  this.abstract = abstract;
89941
89952
  }
89953
+ get fieldRef() {
89954
+ return `${this.recordID}.${this.key}`;
89955
+ }
89942
89956
  when(when) {
89943
89957
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
89944
89958
  }
@@ -91083,8 +91097,8 @@ var Cache = class {
91083
91097
  variables
91084
91098
  );
91085
91099
  }
91086
- list(name, parentID, allLists) {
91087
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
91100
+ list(name, parentID, allLists, skipMatches) {
91101
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
91088
91102
  if (!handler) {
91089
91103
  throw new Error(
91090
91104
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -91499,6 +91513,7 @@ var CacheInternal = class {
91499
91513
  });
91500
91514
  }
91501
91515
  }
91516
+ const processedOperations = /* @__PURE__ */ new Set();
91502
91517
  for (const operation of operations || []) {
91503
91518
  let parentID;
91504
91519
  if (operation.parentID) {
@@ -91518,7 +91533,12 @@ var CacheInternal = class {
91518
91533
  const targets = Array.isArray(value) ? value : [value];
91519
91534
  for (const target of targets) {
91520
91535
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
91521
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
91536
+ this.cache.list(
91537
+ operation.list,
91538
+ parentID,
91539
+ operation.target === "all",
91540
+ processedOperations
91541
+ ).when(operation.when).addToList(
91522
91542
  fieldSelection,
91523
91543
  target,
91524
91544
  variables,
@@ -91526,7 +91546,12 @@ var CacheInternal = class {
91526
91546
  layer
91527
91547
  );
91528
91548
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
91529
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
91549
+ this.cache.list(
91550
+ operation.list,
91551
+ parentID,
91552
+ operation.target === "all",
91553
+ processedOperations
91554
+ ).when(operation.when).toggleElement({
91530
91555
  selection: fieldSelection,
91531
91556
  data: target,
91532
91557
  variables,
@@ -91534,7 +91559,12 @@ var CacheInternal = class {
91534
91559
  layer
91535
91560
  });
91536
91561
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
91537
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
91562
+ this.cache.list(
91563
+ operation.list,
91564
+ parentID,
91565
+ operation.target === "all",
91566
+ processedOperations
91567
+ ).when(operation.when).remove(target, variables, layer);
91538
91568
  } else if (operation.action === "delete" && operation.type && target) {
91539
91569
  const targetID = this.id(operation.type, target);
91540
91570
  if (!targetID) {
@@ -91546,6 +91576,16 @@ var CacheInternal = class {
91546
91576
  this.cache.delete(targetID, layer);
91547
91577
  }
91548
91578
  }
91579
+ if (operation.list) {
91580
+ const matchingLists = this.cache.list(
91581
+ operation.list,
91582
+ parentID,
91583
+ operation.target === "all"
91584
+ );
91585
+ for (const list3 of matchingLists.lists) {
91586
+ processedOperations.add(list3.fieldRef);
91587
+ }
91588
+ }
91549
91589
  }
91550
91590
  }
91551
91591
  return toNotify;
@@ -92054,8 +92094,9 @@ var Config = class {
92054
92094
  localSchema;
92055
92095
  projectRoot;
92056
92096
  schema;
92097
+ runtimeDir;
92057
92098
  schemaPath;
92058
- persistedQueriesPath = "./$houdini/persisted_queries.json";
92099
+ persistedQueriesPath;
92059
92100
  exclude;
92060
92101
  scalars;
92061
92102
  module = "esm";
@@ -92096,6 +92137,7 @@ var Config = class {
92096
92137
  let {
92097
92138
  schema,
92098
92139
  schemaPath = "./schema.graphql",
92140
+ runtimeDir = "$houdini",
92099
92141
  exclude = [],
92100
92142
  module = "esm",
92101
92143
  scalars,
@@ -92134,6 +92176,7 @@ var Config = class {
92134
92176
  this.projectRoot = dirname(
92135
92177
  projectDir ? join2(process.cwd(), projectDir) : filepath
92136
92178
  );
92179
+ this.runtimeDir = runtimeDir;
92137
92180
  this.scalars = scalars;
92138
92181
  this.cacheBufferSize = cacheBufferSize;
92139
92182
  this.defaultCachePolicy = defaultCachePolicy;
@@ -92148,11 +92191,9 @@ var Config = class {
92148
92191
  this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
92149
92192
  this.schemaPollTimeout = watchSchema?.timeout ?? 3e4;
92150
92193
  this.schemaPollHeaders = watchSchema?.headers ?? {};
92151
- this.rootDir = join2(this.projectRoot, "$houdini");
92194
+ this.rootDir = join2(this.projectRoot, this.runtimeDir);
92195
+ this.persistedQueriesPath = persistedQueriesPath ?? join2(this.rootDir, "persisted_queries.json");
92152
92196
  this.#fragmentVariableMaps = {};
92153
- if (persistedQueriesPath) {
92154
- this.persistedQueriesPath = persistedQueriesPath;
92155
- }
92156
92197
  if (defaultKeys) {
92157
92198
  this.defaultKeys = defaultKeys;
92158
92199
  }
@@ -93352,7 +93393,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
93352
93393
  }
93353
93394
 
93354
93395
  // src/plugin/transforms/index.ts
93355
- var recast20 = __toESM(require_main4(), 1);
93396
+ var recast21 = __toESM(require_main4(), 1);
93356
93397
 
93357
93398
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
93358
93399
  var WalkerBase2 = class {
@@ -129066,30 +129107,30 @@ var require_utils5 = __commonJS3({
129066
129107
  validate3.oneOf = values;
129067
129108
  return validate3;
129068
129109
  }
129069
- function assertNodeType(...types17) {
129110
+ function assertNodeType(...types18) {
129070
129111
  function validate3(node, key2, val) {
129071
- for (const type of types17) {
129112
+ for (const type of types18) {
129072
129113
  if ((0, _is.default)(type, val)) {
129073
129114
  (0, _validate.validateChild)(node, key2, val);
129074
129115
  return;
129075
129116
  }
129076
129117
  }
129077
- 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)}`);
129118
+ 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)}`);
129078
129119
  }
129079
- validate3.oneOfNodeTypes = types17;
129120
+ validate3.oneOfNodeTypes = types18;
129080
129121
  return validate3;
129081
129122
  }
129082
- function assertNodeOrValueType(...types17) {
129123
+ function assertNodeOrValueType(...types18) {
129083
129124
  function validate3(node, key2, val) {
129084
- for (const type of types17) {
129125
+ for (const type of types18) {
129085
129126
  if (getType(val) === type || (0, _is.default)(type, val)) {
129086
129127
  (0, _validate.validateChild)(node, key2, val);
129087
129128
  return;
129088
129129
  }
129089
129130
  }
129090
- 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)}`);
129131
+ 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)}`);
129091
129132
  }
129092
- validate3.oneOfNodeOrValueTypes = types17;
129133
+ validate3.oneOfNodeOrValueTypes = types18;
129093
129134
  return validate3;
129094
129135
  }
129095
129136
  function assertValueType(type) {
@@ -133493,10 +133534,10 @@ var require_generated22 = __commonJS3({
133493
133534
  body
133494
133535
  });
133495
133536
  }
133496
- function intersectionTypeAnnotation(types17) {
133537
+ function intersectionTypeAnnotation(types18) {
133497
133538
  return (0, _validateNode.default)({
133498
133539
  type: "IntersectionTypeAnnotation",
133499
- types: types17
133540
+ types: types18
133500
133541
  });
133501
133542
  }
133502
133543
  function mixedTypeAnnotation() {
@@ -133619,10 +133660,10 @@ var require_generated22 = __commonJS3({
133619
133660
  type: "ThisTypeAnnotation"
133620
133661
  };
133621
133662
  }
133622
- function tupleTypeAnnotation(types17) {
133663
+ function tupleTypeAnnotation(types18) {
133623
133664
  return (0, _validateNode.default)({
133624
133665
  type: "TupleTypeAnnotation",
133625
- types: types17
133666
+ types: types18
133626
133667
  });
133627
133668
  }
133628
133669
  function typeofTypeAnnotation(argument) {
@@ -133673,10 +133714,10 @@ var require_generated22 = __commonJS3({
133673
133714
  params
133674
133715
  });
133675
133716
  }
133676
- function unionTypeAnnotation(types17) {
133717
+ function unionTypeAnnotation(types18) {
133677
133718
  return (0, _validateNode.default)({
133678
133719
  type: "UnionTypeAnnotation",
133679
- types: types17
133720
+ types: types18
133680
133721
  });
133681
133722
  }
133682
133723
  function variance(kind) {
@@ -134189,16 +134230,16 @@ var require_generated22 = __commonJS3({
134189
134230
  optional
134190
134231
  });
134191
134232
  }
134192
- function tsUnionType(types17) {
134233
+ function tsUnionType(types18) {
134193
134234
  return (0, _validateNode.default)({
134194
134235
  type: "TSUnionType",
134195
- types: types17
134236
+ types: types18
134196
134237
  });
134197
134238
  }
134198
- function tsIntersectionType(types17) {
134239
+ function tsIntersectionType(types18) {
134199
134240
  return (0, _validateNode.default)({
134200
134241
  type: "TSIntersectionType",
134201
- types: types17
134242
+ types: types18
134202
134243
  });
134203
134244
  }
134204
134245
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -135799,12 +135840,12 @@ var require_removeTypeDuplicates3 = __commonJS3({
135799
135840
  const generics = /* @__PURE__ */ new Map();
135800
135841
  const bases = /* @__PURE__ */ new Map();
135801
135842
  const typeGroups = /* @__PURE__ */ new Set();
135802
- const types17 = [];
135843
+ const types18 = [];
135803
135844
  for (let i22 = 0; i22 < nodes.length; i22++) {
135804
135845
  const node = nodes[i22];
135805
135846
  if (!node)
135806
135847
  continue;
135807
- if (types17.indexOf(node) >= 0) {
135848
+ if (types18.indexOf(node) >= 0) {
135808
135849
  continue;
135809
135850
  }
135810
135851
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -135838,15 +135879,15 @@ var require_removeTypeDuplicates3 = __commonJS3({
135838
135879
  }
135839
135880
  continue;
135840
135881
  }
135841
- types17.push(node);
135882
+ types18.push(node);
135842
135883
  }
135843
135884
  for (const [, baseType] of bases) {
135844
- types17.push(baseType);
135885
+ types18.push(baseType);
135845
135886
  }
135846
135887
  for (const [, genericName] of generics) {
135847
- types17.push(genericName);
135888
+ types18.push(genericName);
135848
135889
  }
135849
- return types17;
135890
+ return types18;
135850
135891
  }
135851
135892
  }
135852
135893
  });
@@ -135859,8 +135900,8 @@ var require_createFlowUnionType2 = __commonJS3({
135859
135900
  exports.default = createFlowUnionType;
135860
135901
  var _generated = require_generated22();
135861
135902
  var _removeTypeDuplicates = require_removeTypeDuplicates3();
135862
- function createFlowUnionType(types17) {
135863
- const flattened = (0, _removeTypeDuplicates.default)(types17);
135903
+ function createFlowUnionType(types18) {
135904
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
135864
135905
  if (flattened.length === 1) {
135865
135906
  return flattened[0];
135866
135907
  } else {
@@ -135885,12 +135926,12 @@ var require_removeTypeDuplicates22 = __commonJS3({
135885
135926
  const generics = /* @__PURE__ */ new Map();
135886
135927
  const bases = /* @__PURE__ */ new Map();
135887
135928
  const typeGroups = /* @__PURE__ */ new Set();
135888
- const types17 = [];
135929
+ const types18 = [];
135889
135930
  for (let i22 = 0; i22 < nodes.length; i22++) {
135890
135931
  const node = nodes[i22];
135891
135932
  if (!node)
135892
135933
  continue;
135893
- if (types17.indexOf(node) >= 0) {
135934
+ if (types18.indexOf(node) >= 0) {
135894
135935
  continue;
135895
135936
  }
135896
135937
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -135924,15 +135965,15 @@ var require_removeTypeDuplicates22 = __commonJS3({
135924
135965
  }
135925
135966
  continue;
135926
135967
  }
135927
- types17.push(node);
135968
+ types18.push(node);
135928
135969
  }
135929
135970
  for (const [, baseType] of bases) {
135930
- types17.push(baseType);
135971
+ types18.push(baseType);
135931
135972
  }
135932
135973
  for (const [, genericName] of generics) {
135933
- types17.push(genericName);
135974
+ types18.push(genericName);
135934
135975
  }
135935
- return types17;
135976
+ return types18;
135936
135977
  }
135937
135978
  }
135938
135979
  });
@@ -135947,10 +135988,10 @@ var require_createTSUnionType2 = __commonJS3({
135947
135988
  var _removeTypeDuplicates = require_removeTypeDuplicates22();
135948
135989
  var _index = require_generated5();
135949
135990
  function createTSUnionType(typeAnnotations) {
135950
- const types17 = typeAnnotations.map((type) => {
135991
+ const types18 = typeAnnotations.map((type) => {
135951
135992
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
135952
135993
  });
135953
- const flattened = (0, _removeTypeDuplicates.default)(types17);
135994
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
135954
135995
  if (flattened.length === 1) {
135955
135996
  return flattened[0];
135956
135997
  } else {
@@ -140214,14 +140255,14 @@ var require_lib62 = __commonJS3({
140214
140255
  this.preserveSpace = !!preserveSpace;
140215
140256
  }
140216
140257
  };
140217
- var types17 = {
140258
+ var types18 = {
140218
140259
  brace: new TokContext3("{"),
140219
140260
  j_oTag: new TokContext3("<tag"),
140220
140261
  j_cTag: new TokContext3("</tag"),
140221
140262
  j_expr: new TokContext3("<tag>...</tag>", true)
140222
140263
  };
140223
140264
  {
140224
- types17.template = new TokContext3("`", true);
140265
+ types18.template = new TokContext3("`", true);
140225
140266
  }
140226
140267
  var beforeExpr2 = true;
140227
140268
  var startsExpr2 = true;
@@ -140759,17 +140800,17 @@ var require_lib62 = __commonJS3({
140759
140800
  context.pop();
140760
140801
  };
140761
140802
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
140762
- context.push(types17.brace);
140803
+ context.push(types18.brace);
140763
140804
  };
140764
140805
  tokenTypes[22].updateContext = (context) => {
140765
- if (context[context.length - 1] === types17.template) {
140806
+ if (context[context.length - 1] === types18.template) {
140766
140807
  context.pop();
140767
140808
  } else {
140768
- context.push(types17.template);
140809
+ context.push(types18.template);
140769
140810
  }
140770
140811
  };
140771
140812
  tokenTypes[142].updateContext = (context) => {
140772
- context.push(types17.j_expr, types17.j_oTag);
140813
+ context.push(types18.j_expr, types18.j_oTag);
140773
140814
  };
140774
140815
  }
140775
140816
  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";
@@ -141329,7 +141370,7 @@ var require_lib62 = __commonJS3({
141329
141370
  this.end = 0;
141330
141371
  this.lastTokEndLoc = null;
141331
141372
  this.lastTokStartLoc = null;
141332
- this.context = [types17.brace];
141373
+ this.context = [types18.brace];
141333
141374
  this.firstInvalidTemplateEscapePos = null;
141334
141375
  this.strictErrors = /* @__PURE__ */ new Map();
141335
141376
  this.tokensLength = 0;
@@ -145156,7 +145197,7 @@ var require_lib62 = __commonJS3({
145156
145197
  context
145157
145198
  } = this.state;
145158
145199
  const currentContext = context[context.length - 1];
145159
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
145200
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
145160
145201
  context.pop();
145161
145202
  }
145162
145203
  }
@@ -146178,9 +146219,9 @@ var require_lib62 = __commonJS3({
146178
146219
  switch (this.state.type) {
146179
146220
  case 5:
146180
146221
  node = this.startNode();
146181
- this.setContext(types17.brace);
146222
+ this.setContext(types18.brace);
146182
146223
  this.next();
146183
- node = this.jsxParseExpressionContainer(node, types17.j_oTag);
146224
+ node = this.jsxParseExpressionContainer(node, types18.j_oTag);
146184
146225
  if (node.expression.type === "JSXEmptyExpression") {
146185
146226
  this.raise(JsxErrors.AttributeIsEmpty, node);
146186
146227
  }
@@ -146199,7 +146240,7 @@ var require_lib62 = __commonJS3({
146199
146240
  jsxParseSpreadChild(node) {
146200
146241
  this.next();
146201
146242
  node.expression = this.parseExpression();
146202
- this.setContext(types17.j_expr);
146243
+ this.setContext(types18.j_expr);
146203
146244
  this.state.canStartJSXElement = true;
146204
146245
  this.expect(8);
146205
146246
  return this.finishNode(node, "JSXSpreadChild");
@@ -146219,11 +146260,11 @@ var require_lib62 = __commonJS3({
146219
146260
  jsxParseAttribute() {
146220
146261
  const node = this.startNode();
146221
146262
  if (this.match(5)) {
146222
- this.setContext(types17.brace);
146263
+ this.setContext(types18.brace);
146223
146264
  this.next();
146224
146265
  this.expect(21);
146225
146266
  node.argument = this.parseMaybeAssignAllowIn();
146226
- this.setContext(types17.j_oTag);
146267
+ this.setContext(types18.j_oTag);
146227
146268
  this.state.canStartJSXElement = true;
146228
146269
  this.expect(8);
146229
146270
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -146282,12 +146323,12 @@ var require_lib62 = __commonJS3({
146282
146323
  break;
146283
146324
  case 5: {
146284
146325
  const node2 = this.startNode();
146285
- this.setContext(types17.brace);
146326
+ this.setContext(types18.brace);
146286
146327
  this.next();
146287
146328
  if (this.match(21)) {
146288
146329
  children.push(this.jsxParseSpreadChild(node2));
146289
146330
  } else {
146290
- children.push(this.jsxParseExpressionContainer(node2, types17.j_expr));
146331
+ children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
146291
146332
  }
146292
146333
  break;
146293
146334
  }
@@ -146352,11 +146393,11 @@ var require_lib62 = __commonJS3({
146352
146393
  }
146353
146394
  getTokenFromCode(code2) {
146354
146395
  const context = this.curContext();
146355
- if (context === types17.j_expr) {
146396
+ if (context === types18.j_expr) {
146356
146397
  this.jsxReadToken();
146357
146398
  return;
146358
146399
  }
146359
- if (context === types17.j_oTag || context === types17.j_cTag) {
146400
+ if (context === types18.j_oTag || context === types18.j_cTag) {
146360
146401
  if (isIdentifierStart2(code2)) {
146361
146402
  this.jsxReadWord();
146362
146403
  return;
@@ -146366,7 +146407,7 @@ var require_lib62 = __commonJS3({
146366
146407
  this.finishToken(143);
146367
146408
  return;
146368
146409
  }
146369
- if ((code2 === 34 || code2 === 39) && context === types17.j_oTag) {
146410
+ if ((code2 === 34 || code2 === 39) && context === types18.j_oTag) {
146370
146411
  this.jsxReadString(code2);
146371
146412
  return;
146372
146413
  }
@@ -146384,17 +146425,17 @@ var require_lib62 = __commonJS3({
146384
146425
  type
146385
146426
  } = this.state;
146386
146427
  if (type === 56 && prevType === 142) {
146387
- context.splice(-2, 2, types17.j_cTag);
146428
+ context.splice(-2, 2, types18.j_cTag);
146388
146429
  this.state.canStartJSXElement = false;
146389
146430
  } else if (type === 142) {
146390
- context.push(types17.j_oTag);
146431
+ context.push(types18.j_oTag);
146391
146432
  } else if (type === 143) {
146392
146433
  const out = context[context.length - 1];
146393
- if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
146434
+ if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
146394
146435
  context.pop();
146395
- this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
146436
+ this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
146396
146437
  } else {
146397
- this.setContext(types17.j_expr);
146438
+ this.setContext(types18.j_expr);
146398
146439
  this.state.canStartJSXElement = true;
146399
146440
  }
146400
146441
  } else {
@@ -147769,14 +147810,14 @@ var require_lib62 = __commonJS3({
147769
147810
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
147770
147811
  const node = this.startNode();
147771
147812
  const hasLeadingOperator = this.eat(operator);
147772
- const types18 = [];
147813
+ const types19 = [];
147773
147814
  do {
147774
- types18.push(parseConstituentType());
147815
+ types19.push(parseConstituentType());
147775
147816
  } while (this.eat(operator));
147776
- if (types18.length === 1 && !hasLeadingOperator) {
147777
- return types18[0];
147817
+ if (types19.length === 1 && !hasLeadingOperator) {
147818
+ return types19[0];
147778
147819
  }
147779
- node.types = types18;
147820
+ node.types = types19;
147780
147821
  return this.finishNode(node, kind);
147781
147822
  }
147782
147823
  tsParseIntersectionTypeOrHigher() {
@@ -148340,7 +148381,7 @@ var require_lib62 = __commonJS3({
148340
148381
  }));
148341
148382
  if (node.params.length === 0) {
148342
148383
  this.raise(TSErrors.EmptyTypeArguments, node);
148343
- } else if (!this.state.inType && this.curContext() === types17.brace) {
148384
+ } else if (!this.state.inType && this.curContext() === types18.brace) {
148344
148385
  this.reScan_lt_gt();
148345
148386
  }
148346
148387
  this.expect(48);
@@ -148966,7 +149007,7 @@ var require_lib62 = __commonJS3({
148966
149007
  context
148967
149008
  } = this.state;
148968
149009
  const currentContext = context[context.length - 1];
148969
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
149010
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
148970
149011
  context.pop();
148971
149012
  }
148972
149013
  }
@@ -154094,9 +154135,9 @@ var require_shared3 = __commonJS3({
154094
154135
  var tslib_1 = require_tslib3();
154095
154136
  var types_1 = tslib_1.__importDefault(require_types3());
154096
154137
  function default_1(fork) {
154097
- var types17 = fork.use(types_1.default);
154098
- var Type = types17.Type;
154099
- var builtin = types17.builtInTypes;
154138
+ var types18 = fork.use(types_1.default);
154139
+ var Type = types18.Type;
154140
+ var builtin = types18.builtInTypes;
154100
154141
  var isNumber = builtin.number;
154101
154142
  function geq(than) {
154102
154143
  return Type.from(function(value) {
@@ -154244,9 +154285,9 @@ var require_types3 = __commonJS3({
154244
154285
  }(BaseType);
154245
154286
  var OrType = function(_super) {
154246
154287
  tslib_1.__extends(OrType2, _super);
154247
- function OrType2(types17) {
154288
+ function OrType2(types18) {
154248
154289
  var _this = _super.call(this) || this;
154249
- _this.types = types17;
154290
+ _this.types = types18;
154250
154291
  _this.kind = "OrType";
154251
154292
  return _this;
154252
154293
  }
@@ -154387,11 +154428,11 @@ var require_types3 = __commonJS3({
154387
154428
  function typesPlugin(_fork) {
154388
154429
  var Type = {
154389
154430
  or: function() {
154390
- var types17 = [];
154431
+ var types18 = [];
154391
154432
  for (var _i = 0; _i < arguments.length; _i++) {
154392
- types17[_i] = arguments[_i];
154433
+ types18[_i] = arguments[_i];
154393
154434
  }
154394
- return new OrType(types17.map(function(type) {
154435
+ return new OrType(types18.map(function(type) {
154395
154436
  return Type.from(type);
154396
154437
  }));
154397
154438
  },
@@ -154834,9 +154875,9 @@ var require_path22 = __commonJS3({
154834
154875
  var Op = Object.prototype;
154835
154876
  var hasOwn2 = Op.hasOwnProperty;
154836
154877
  function pathPlugin(fork) {
154837
- var types17 = fork.use(types_1.default);
154838
- var isArray2 = types17.builtInTypes.array;
154839
- var isNumber = types17.builtInTypes.number;
154878
+ var types18 = fork.use(types_1.default);
154879
+ var isArray2 = types18.builtInTypes.array;
154880
+ var isNumber = types18.builtInTypes.number;
154840
154881
  var Path = function Path2(value, parentPath, name) {
154841
154882
  if (!(this instanceof Path2)) {
154842
154883
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -155136,13 +155177,13 @@ var require_scope3 = __commonJS3({
155136
155177
  var types_1 = tslib_1.__importDefault(require_types3());
155137
155178
  var hasOwn2 = Object.prototype.hasOwnProperty;
155138
155179
  function scopePlugin(fork) {
155139
- var types17 = fork.use(types_1.default);
155140
- var Type = types17.Type;
155141
- var namedTypes = types17.namedTypes;
155180
+ var types18 = fork.use(types_1.default);
155181
+ var Type = types18.Type;
155182
+ var namedTypes = types18.namedTypes;
155142
155183
  var Node3 = namedTypes.Node;
155143
155184
  var Expression = namedTypes.Expression;
155144
- var isArray2 = types17.builtInTypes.array;
155145
- var b2 = types17.builders;
155185
+ var isArray2 = types18.builtInTypes.array;
155186
+ var b2 = types18.builders;
155146
155187
  var Scope4 = function Scope22(path32, parentScope) {
155147
155188
  if (!(this instanceof Scope22)) {
155148
155189
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -155205,7 +155246,7 @@ var require_scope3 = __commonJS3({
155205
155246
  ++index;
155206
155247
  }
155207
155248
  var name = prefix + index;
155208
- return this.bindings[name] = types17.builders.identifier(name);
155249
+ return this.bindings[name] = types18.builders.identifier(name);
155209
155250
  };
155210
155251
  Sp.injectTemporary = function(identifier, init2) {
155211
155252
  identifier || (identifier = this.declareTemporary());
@@ -155281,7 +155322,7 @@ var require_scope3 = __commonJS3({
155281
155322
  bindings
155282
155323
  );
155283
155324
  } else if (Node3.check(node) && !Expression.check(node)) {
155284
- types17.eachField(node, function(name, child) {
155325
+ types18.eachField(node, function(name, child) {
155285
155326
  var childPath = path32.get(name);
155286
155327
  if (!pathHasValue(childPath, child)) {
155287
155328
  throw new Error("");
@@ -155359,24 +155400,24 @@ var require_scope3 = __commonJS3({
155359
155400
  addPattern(patternPath.get("argument"), bindings);
155360
155401
  }
155361
155402
  }
155362
- function addTypePattern(patternPath, types18) {
155403
+ function addTypePattern(patternPath, types19) {
155363
155404
  var pattern = patternPath.value;
155364
155405
  namedTypes.Pattern.assert(pattern);
155365
155406
  if (namedTypes.Identifier.check(pattern)) {
155366
- if (hasOwn2.call(types18, pattern.name)) {
155367
- types18[pattern.name].push(patternPath);
155407
+ if (hasOwn2.call(types19, pattern.name)) {
155408
+ types19[pattern.name].push(patternPath);
155368
155409
  } else {
155369
- types18[pattern.name] = [patternPath];
155410
+ types19[pattern.name] = [patternPath];
155370
155411
  }
155371
155412
  }
155372
155413
  }
155373
- function addTypeParameter(parameterPath, types18) {
155414
+ function addTypeParameter(parameterPath, types19) {
155374
155415
  var parameter = parameterPath.value;
155375
155416
  FlowOrTSTypeParameterType.assert(parameter);
155376
- if (hasOwn2.call(types18, parameter.name)) {
155377
- types18[parameter.name].push(parameterPath);
155417
+ if (hasOwn2.call(types19, parameter.name)) {
155418
+ types19[parameter.name].push(parameterPath);
155378
155419
  } else {
155379
- types18[parameter.name] = [parameterPath];
155420
+ types19[parameter.name] = [parameterPath];
155380
155421
  }
155381
155422
  }
155382
155423
  Sp.lookup = function(name) {
@@ -155415,11 +155456,11 @@ var require_node_path3 = __commonJS3({
155415
155456
  var scope_1 = tslib_1.__importDefault(require_scope3());
155416
155457
  var shared_1 = require_shared3();
155417
155458
  function nodePathPlugin(fork) {
155418
- var types17 = fork.use(types_1.default);
155419
- var n2 = types17.namedTypes;
155420
- var b2 = types17.builders;
155421
- var isNumber = types17.builtInTypes.number;
155422
- var isArray2 = types17.builtInTypes.array;
155459
+ var types18 = fork.use(types_1.default);
155460
+ var n2 = types18.namedTypes;
155461
+ var b2 = types18.builders;
155462
+ var isNumber = types18.builtInTypes.number;
155463
+ var isArray2 = types18.builtInTypes.array;
155423
155464
  var Path = fork.use(path_1.default);
155424
155465
  var Scope4 = fork.use(scope_1.default);
155425
155466
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -155510,7 +155551,7 @@ var require_node_path3 = __commonJS3({
155510
155551
  return scope || null;
155511
155552
  };
155512
155553
  NPp.getValueProperty = function(name) {
155513
- return types17.getFieldValue(this.value, name);
155554
+ return types18.getFieldValue(this.value, name);
155514
155555
  };
155515
155556
  NPp.needsParens = function(assumeExpressionContext) {
155516
155557
  var pp2 = this.parentPath;
@@ -155652,7 +155693,7 @@ var require_node_path3 = __commonJS3({
155652
155693
  return node.some(containsCallExpression);
155653
155694
  }
155654
155695
  if (n2.Node.check(node)) {
155655
- return types17.someField(node, function(_name, child) {
155696
+ return types18.someField(node, function(_name, child) {
155656
155697
  return containsCallExpression(child);
155657
155698
  });
155658
155699
  }
@@ -155771,11 +155812,11 @@ var require_path_visitor3 = __commonJS3({
155771
155812
  var shared_1 = require_shared3();
155772
155813
  var hasOwn2 = Object.prototype.hasOwnProperty;
155773
155814
  function pathVisitorPlugin(fork) {
155774
- var types17 = fork.use(types_1.default);
155815
+ var types18 = fork.use(types_1.default);
155775
155816
  var NodePath = fork.use(node_path_1.default);
155776
- var isArray2 = types17.builtInTypes.array;
155777
- var isObject2 = types17.builtInTypes.object;
155778
- var isFunction = types17.builtInTypes.function;
155817
+ var isArray2 = types18.builtInTypes.array;
155818
+ var isObject2 = types18.builtInTypes.object;
155819
+ var isFunction = types18.builtInTypes.function;
155779
155820
  var undefined2;
155780
155821
  var PathVisitor = function PathVisitor2() {
155781
155822
  if (!(this instanceof PathVisitor2)) {
@@ -155795,7 +155836,7 @@ var require_path_visitor3 = __commonJS3({
155795
155836
  typeNames[methodName.slice("visit".length)] = true;
155796
155837
  }
155797
155838
  }
155798
- var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
155839
+ var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
155799
155840
  var methodNameTable = /* @__PURE__ */ Object.create(null);
155800
155841
  var typeNameKeys = Object.keys(supertypeTable);
155801
155842
  var typeNameCount = typeNameKeys.length;
@@ -155914,7 +155955,7 @@ var require_path_visitor3 = __commonJS3({
155914
155955
  path32.each(visitor.visitWithoutReset, visitor);
155915
155956
  } else if (!isObject2.check(value)) {
155916
155957
  } else {
155917
- var childNames = types17.getFieldNames(value);
155958
+ var childNames = types18.getFieldNames(value);
155918
155959
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
155919
155960
  childNames.push("comments");
155920
155961
  }
@@ -155923,7 +155964,7 @@ var require_path_visitor3 = __commonJS3({
155923
155964
  for (var i22 = 0; i22 < childCount; ++i22) {
155924
155965
  var childName = childNames[i22];
155925
155966
  if (!hasOwn2.call(value, childName)) {
155926
- value[childName] = types17.getFieldValue(value, childName);
155967
+ value[childName] = types18.getFieldValue(value, childName);
155927
155968
  }
155928
155969
  childPaths.push(path32.get(childName));
155929
155970
  }
@@ -156064,13 +156105,13 @@ var require_equiv3 = __commonJS3({
156064
156105
  var shared_1 = require_shared3();
156065
156106
  var types_1 = tslib_1.__importDefault(require_types3());
156066
156107
  function default_1(fork) {
156067
- var types17 = fork.use(types_1.default);
156068
- var getFieldNames = types17.getFieldNames;
156069
- var getFieldValue = types17.getFieldValue;
156070
- var isArray2 = types17.builtInTypes.array;
156071
- var isObject2 = types17.builtInTypes.object;
156072
- var isDate = types17.builtInTypes.Date;
156073
- var isRegExp = types17.builtInTypes.RegExp;
156108
+ var types18 = fork.use(types_1.default);
156109
+ var getFieldNames = types18.getFieldNames;
156110
+ var getFieldValue = types18.getFieldValue;
156111
+ var isArray2 = types18.builtInTypes.array;
156112
+ var isObject2 = types18.builtInTypes.object;
156113
+ var isDate = types18.builtInTypes.Date;
156114
+ var isRegExp = types18.builtInTypes.RegExp;
156074
156115
  var hasOwn2 = Object.prototype.hasOwnProperty;
156075
156116
  function astNodesAreEquivalent(a2, b2, problemPath) {
156076
156117
  if (isArray2.check(problemPath)) {
@@ -156221,24 +156262,24 @@ var require_fork3 = __commonJS3({
156221
156262
  var shared_1 = require_shared3();
156222
156263
  function default_1(plugins) {
156223
156264
  var fork = createFork();
156224
- var types17 = fork.use(types_1.default);
156265
+ var types18 = fork.use(types_1.default);
156225
156266
  plugins.forEach(fork.use);
156226
- types17.finalize();
156267
+ types18.finalize();
156227
156268
  var PathVisitor = fork.use(path_visitor_1.default);
156228
156269
  return {
156229
- Type: types17.Type,
156230
- builtInTypes: types17.builtInTypes,
156231
- namedTypes: types17.namedTypes,
156232
- builders: types17.builders,
156233
- defineMethod: types17.defineMethod,
156234
- getFieldNames: types17.getFieldNames,
156235
- getFieldValue: types17.getFieldValue,
156236
- eachField: types17.eachField,
156237
- someField: types17.someField,
156238
- getSupertypeNames: types17.getSupertypeNames,
156239
- getBuilderName: types17.getBuilderName,
156270
+ Type: types18.Type,
156271
+ builtInTypes: types18.builtInTypes,
156272
+ namedTypes: types18.namedTypes,
156273
+ builders: types18.builders,
156274
+ defineMethod: types18.defineMethod,
156275
+ getFieldNames: types18.getFieldNames,
156276
+ getFieldValue: types18.getFieldValue,
156277
+ eachField: types18.eachField,
156278
+ someField: types18.someField,
156279
+ getSupertypeNames: types18.getSupertypeNames,
156280
+ getBuilderName: types18.getBuilderName,
156240
156281
  astNodesAreEquivalent: fork.use(equiv_1.default),
156241
- finalize: types17.finalize,
156282
+ finalize: types18.finalize,
156242
156283
  Path: fork.use(path_1.default),
156243
156284
  NodePath: fork.use(node_path_1.default),
156244
156285
  PathVisitor,
@@ -156398,8 +156439,8 @@ var require_core32 = __commonJS3({
156398
156439
  var types_1 = tslib_1.__importDefault(require_types3());
156399
156440
  var shared_1 = tslib_1.__importStar(require_shared3());
156400
156441
  function default_1(fork) {
156401
- var types17 = fork.use(types_1.default);
156402
- var Type = types17.Type;
156442
+ var types18 = fork.use(types_1.default);
156443
+ var Type = types18.Type;
156403
156444
  var def = Type.def;
156404
156445
  var or = Type.or;
156405
156446
  var shared2 = fork.use(shared_1.default);
@@ -156489,9 +156530,9 @@ var require_es63 = __commonJS3({
156489
156530
  var shared_1 = tslib_1.__importStar(require_shared3());
156490
156531
  function default_1(fork) {
156491
156532
  fork.use(core_1.default);
156492
- var types17 = fork.use(types_1.default);
156493
- var def = types17.Type.def;
156494
- var or = types17.Type.or;
156533
+ var types18 = fork.use(types_1.default);
156534
+ var def = types18.Type.def;
156535
+ var or = types18.Type.or;
156495
156536
  var defaults = fork.use(shared_1.default).defaults;
156496
156537
  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"]);
156497
156538
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -156577,8 +156618,8 @@ var require_es20173 = __commonJS3({
156577
156618
  var shared_1 = tslib_1.__importStar(require_shared3());
156578
156619
  function default_1(fork) {
156579
156620
  fork.use(es2016_1.default);
156580
- var types17 = fork.use(types_1.default);
156581
- var def = types17.Type.def;
156621
+ var types18 = fork.use(types_1.default);
156622
+ var def = types18.Type.def;
156582
156623
  var defaults = fork.use(shared_1.default).defaults;
156583
156624
  def("Function").field("async", Boolean, defaults["false"]);
156584
156625
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -156599,9 +156640,9 @@ var require_es20183 = __commonJS3({
156599
156640
  var shared_1 = tslib_1.__importStar(require_shared3());
156600
156641
  function default_1(fork) {
156601
156642
  fork.use(es2017_1.default);
156602
- var types17 = fork.use(types_1.default);
156603
- var def = types17.Type.def;
156604
- var or = types17.Type.or;
156643
+ var types18 = fork.use(types_1.default);
156644
+ var def = types18.Type.def;
156645
+ var or = types18.Type.or;
156605
156646
  var defaults = fork.use(shared_1.default).defaults;
156606
156647
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
156607
156648
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -156630,9 +156671,9 @@ var require_es20193 = __commonJS3({
156630
156671
  var shared_1 = tslib_1.__importStar(require_shared3());
156631
156672
  function default_1(fork) {
156632
156673
  fork.use(es2018_1.default);
156633
- var types17 = fork.use(types_1.default);
156634
- var def = types17.Type.def;
156635
- var or = types17.Type.or;
156674
+ var types18 = fork.use(types_1.default);
156675
+ var def = types18.Type.def;
156676
+ var or = types18.Type.or;
156636
156677
  var defaults = fork.use(shared_1.default).defaults;
156637
156678
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
156638
156679
  }
@@ -156654,9 +156695,9 @@ var require_es202022 = __commonJS3({
156654
156695
  function default_1(fork) {
156655
156696
  fork.use(es2020_1.default);
156656
156697
  fork.use(es2019_1.default);
156657
- var types17 = fork.use(types_1.default);
156658
- var def = types17.Type.def;
156659
- var or = types17.Type.or;
156698
+ var types18 = fork.use(types_1.default);
156699
+ var def = types18.Type.def;
156700
+ var or = types18.Type.or;
156660
156701
  var shared2 = fork.use(shared_1.default);
156661
156702
  var defaults = shared2.defaults;
156662
156703
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -156702,8 +156743,8 @@ var require_es20223 = __commonJS3({
156702
156743
  var shared_1 = require_shared3();
156703
156744
  function default_1(fork) {
156704
156745
  fork.use(es2021_1.default);
156705
- var types17 = fork.use(types_1.default);
156706
- var def = types17.Type.def;
156746
+ var types18 = fork.use(types_1.default);
156747
+ var def = types18.Type.def;
156707
156748
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
156708
156749
  }
156709
156750
  exports.default = default_1;
@@ -156722,9 +156763,9 @@ var require_es_proposals3 = __commonJS3({
156722
156763
  var es2022_1 = tslib_1.__importDefault(require_es20223());
156723
156764
  function default_1(fork) {
156724
156765
  fork.use(es2022_1.default);
156725
- var types17 = fork.use(types_1.default);
156726
- var Type = types17.Type;
156727
- var def = types17.Type.def;
156766
+ var types18 = fork.use(types_1.default);
156767
+ var Type = types18.Type;
156768
+ var def = types18.Type.def;
156728
156769
  var or = Type.or;
156729
156770
  var shared2 = fork.use(shared_1.default);
156730
156771
  var defaults = shared2.defaults;
@@ -156762,9 +156803,9 @@ var require_jsx22 = __commonJS3({
156762
156803
  var shared_1 = tslib_1.__importStar(require_shared3());
156763
156804
  function default_1(fork) {
156764
156805
  fork.use(es_proposals_1.default);
156765
- var types17 = fork.use(types_1.default);
156766
- var def = types17.Type.def;
156767
- var or = types17.Type.or;
156806
+ var types18 = fork.use(types_1.default);
156807
+ var def = types18.Type.def;
156808
+ var or = types18.Type.or;
156768
156809
  var defaults = fork.use(shared_1.default).defaults;
156769
156810
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
156770
156811
  def("Literal"),
@@ -156820,9 +156861,9 @@ var require_type_annotations3 = __commonJS3({
156820
156861
  var types_1 = tslib_1.__importDefault(require_types3());
156821
156862
  var shared_1 = tslib_1.__importStar(require_shared3());
156822
156863
  function default_1(fork) {
156823
- var types17 = fork.use(types_1.default);
156824
- var def = types17.Type.def;
156825
- var or = types17.Type.or;
156864
+ var types18 = fork.use(types_1.default);
156865
+ var def = types18.Type.def;
156866
+ var or = types18.Type.or;
156826
156867
  var defaults = fork.use(shared_1.default).defaults;
156827
156868
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
156828
156869
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -156855,9 +156896,9 @@ var require_flow22 = __commonJS3({
156855
156896
  function default_1(fork) {
156856
156897
  fork.use(es_proposals_1.default);
156857
156898
  fork.use(type_annotations_1.default);
156858
- var types17 = fork.use(types_1.default);
156859
- var def = types17.Type.def;
156860
- var or = types17.Type.or;
156899
+ var types18 = fork.use(types_1.default);
156900
+ var def = types18.Type.def;
156901
+ var or = types18.Type.or;
156861
156902
  var defaults = fork.use(shared_1.default).defaults;
156862
156903
  def("Flow").bases("Node");
156863
156904
  def("FlowType").bases("Flow");
@@ -156969,10 +157010,10 @@ var require_esprima7 = __commonJS3({
156969
157010
  var shared_1 = tslib_1.__importStar(require_shared3());
156970
157011
  function default_1(fork) {
156971
157012
  fork.use(es_proposals_1.default);
156972
- var types17 = fork.use(types_1.default);
157013
+ var types18 = fork.use(types_1.default);
156973
157014
  var defaults = fork.use(shared_1.default).defaults;
156974
- var def = types17.Type.def;
156975
- var or = types17.Type.or;
157015
+ var def = types18.Type.def;
157016
+ var or = types18.Type.or;
156976
157017
  def("VariableDeclaration").field("declarations", [or(
156977
157018
  def("VariableDeclarator"),
156978
157019
  def("Identifier")
@@ -157015,11 +157056,11 @@ var require_babel_core3 = __commonJS3({
157015
157056
  function default_1(fork) {
157016
157057
  var _a, _b, _c, _d, _e;
157017
157058
  fork.use(es_proposals_1.default);
157018
- var types17 = fork.use(types_1.default);
157059
+ var types18 = fork.use(types_1.default);
157019
157060
  var defaults = fork.use(shared_1.default).defaults;
157020
- var def = types17.Type.def;
157021
- var or = types17.Type.or;
157022
- var isUndefined = types17.builtInTypes.undefined;
157061
+ var def = types18.Type.def;
157062
+ var or = types18.Type.or;
157063
+ var isUndefined = types18.builtInTypes.undefined;
157023
157064
  def("Noop").bases("Statement").build();
157024
157065
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
157025
157066
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -157044,7 +157085,7 @@ var require_babel_core3 = __commonJS3({
157044
157085
  raw: String
157045
157086
  },
157046
157087
  function getDefault() {
157047
- var value = types17.getFieldValue(this, "value");
157088
+ var value = types18.getFieldValue(this, "value");
157048
157089
  return {
157049
157090
  rawValue: value,
157050
157091
  raw: toRaw ? toRaw(value) : String(value)
@@ -157145,8 +157186,8 @@ var require_babel3 = __commonJS3({
157145
157186
  var flow_1 = tslib_1.__importDefault(require_flow22());
157146
157187
  var shared_1 = require_shared3();
157147
157188
  function default_1(fork) {
157148
- var types17 = fork.use(types_1.default);
157149
- var def = types17.Type.def;
157189
+ var types18 = fork.use(types_1.default);
157190
+ var def = types18.Type.def;
157150
157191
  fork.use(babel_core_1.default);
157151
157192
  fork.use(flow_1.default);
157152
157193
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -157170,12 +157211,12 @@ var require_typescript22 = __commonJS3({
157170
157211
  function default_1(fork) {
157171
157212
  fork.use(babel_core_1.default);
157172
157213
  fork.use(type_annotations_1.default);
157173
- var types17 = fork.use(types_1.default);
157174
- var n2 = types17.namedTypes;
157175
- var def = types17.Type.def;
157176
- var or = types17.Type.or;
157214
+ var types18 = fork.use(types_1.default);
157215
+ var n2 = types18.namedTypes;
157216
+ var def = types18.Type.def;
157217
+ var or = types18.Type.or;
157177
157218
  var defaults = fork.use(shared_1.default).defaults;
157178
- var StringLiteral = types17.Type.from(function(value, deep) {
157219
+ var StringLiteral = types18.Type.from(function(value, deep) {
157179
157220
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
157180
157221
  return true;
157181
157222
  }
@@ -159123,8 +159164,8 @@ var require_util22 = __commonJS3({
159123
159164
  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;
159124
159165
  var tslib_1 = require_tslib3();
159125
159166
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
159126
- var types17 = tslib_1.__importStar(require_main5());
159127
- var n2 = types17.namedTypes;
159167
+ var types18 = tslib_1.__importStar(require_main5());
159168
+ var n2 = types18.namedTypes;
159128
159169
  var source_map_1 = tslib_1.__importDefault(require_source_map3());
159129
159170
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
159130
159171
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -166430,10 +166471,10 @@ var require_comments3 = __commonJS3({
166430
166471
  exports.printComments = exports.attach = void 0;
166431
166472
  var tslib_1 = require_tslib3();
166432
166473
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
166433
- var types17 = tslib_1.__importStar(require_main5());
166434
- var n2 = types17.namedTypes;
166435
- var isArray2 = types17.builtInTypes.array;
166436
- var isObject2 = types17.builtInTypes.object;
166474
+ var types18 = tslib_1.__importStar(require_main5());
166475
+ var n2 = types18.namedTypes;
166476
+ var isArray2 = types18.builtInTypes.array;
166477
+ var isObject2 = types18.builtInTypes.object;
166437
166478
  var lines_1 = require_lines3();
166438
166479
  var util_1 = require_util22();
166439
166480
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -166464,7 +166505,7 @@ var require_comments3 = __commonJS3({
166464
166505
  if (isArray2.check(node)) {
166465
166506
  names = Object.keys(node);
166466
166507
  } else if (isObject2.check(node)) {
166467
- names = types17.getFieldNames(node);
166508
+ names = types18.getFieldNames(node);
166468
166509
  } else {
166469
166510
  return resultArray;
166470
166511
  }
@@ -166642,7 +166683,7 @@ var require_comments3 = __commonJS3({
166642
166683
  function printComments(path32, print132) {
166643
166684
  var value = path32.getValue();
166644
166685
  var innerLines = print132(path32);
166645
- var comments = n2.Node.check(value) && types17.getFieldValue(value, "comments");
166686
+ var comments = n2.Node.check(value) && types18.getFieldValue(value, "comments");
166646
166687
  if (!comments || comments.length === 0) {
166647
166688
  return innerLines;
166648
166689
  }
@@ -166650,8 +166691,8 @@ var require_comments3 = __commonJS3({
166650
166691
  var trailingParts = [innerLines];
166651
166692
  path32.each(function(commentPath) {
166652
166693
  var comment = commentPath.getValue();
166653
- var leading = types17.getFieldValue(comment, "leading");
166654
- var trailing = types17.getFieldValue(comment, "trailing");
166694
+ var leading = types18.getFieldValue(comment, "leading");
166695
+ var trailing = types18.getFieldValue(comment, "trailing");
166655
166696
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
166656
166697
  leadingParts.push(printLeadingComment(commentPath, print132));
166657
166698
  } else if (trailing) {
@@ -166671,10 +166712,10 @@ var require_parser3 = __commonJS3({
166671
166712
  exports.parse = void 0;
166672
166713
  var tslib_1 = require_tslib3();
166673
166714
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
166674
- var types17 = tslib_1.__importStar(require_main5());
166675
- var b2 = types17.builders;
166676
- var isObject2 = types17.builtInTypes.object;
166677
- var isArray2 = types17.builtInTypes.array;
166715
+ var types18 = tslib_1.__importStar(require_main5());
166716
+ var b2 = types18.builders;
166717
+ var isObject2 = types18.builtInTypes.object;
166718
+ var isArray2 = types18.builtInTypes.array;
166678
166719
  var options_1 = require_options3();
166679
166720
  var lines_1 = require_lines3();
166680
166721
  var comments_1 = require_comments3();
@@ -166858,11 +166899,11 @@ var require_fast_path3 = __commonJS3({
166858
166899
  Object.defineProperty(exports, "__esModule", { value: true });
166859
166900
  var tslib_1 = require_tslib3();
166860
166901
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
166861
- var types17 = tslib_1.__importStar(require_main5());
166902
+ var types18 = tslib_1.__importStar(require_main5());
166862
166903
  var util = tslib_1.__importStar(require_util22());
166863
- var n2 = types17.namedTypes;
166864
- var isArray2 = types17.builtInTypes.array;
166865
- var isNumber = types17.builtInTypes.number;
166904
+ var n2 = types18.namedTypes;
166905
+ var isArray2 = types18.builtInTypes.array;
166906
+ var isNumber = types18.builtInTypes.number;
166866
166907
  var PRECEDENCE = {};
166867
166908
  [
166868
166909
  ["??"],
@@ -166891,7 +166932,7 @@ var require_fast_path3 = __commonJS3({
166891
166932
  if (obj instanceof FastPath) {
166892
166933
  return obj.copy();
166893
166934
  }
166894
- if (obj instanceof types17.NodePath) {
166935
+ if (obj instanceof types18.NodePath) {
166895
166936
  var copy = Object.create(FastPath.prototype);
166896
166937
  var stack = [obj.value];
166897
166938
  for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
@@ -167202,7 +167243,7 @@ var require_fast_path3 = __commonJS3({
167202
167243
  return node.some(containsCallExpression);
167203
167244
  }
167204
167245
  if (n2.Node.check(node)) {
167205
- return types17.someField(node, function(_name, child) {
167246
+ return types18.someField(node, function(_name, child) {
167206
167247
  return containsCallExpression(child);
167207
167248
  });
167208
167249
  }
@@ -167290,16 +167331,16 @@ var require_patcher3 = __commonJS3({
167290
167331
  var tslib_1 = require_tslib3();
167291
167332
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
167292
167333
  var linesModule = tslib_1.__importStar(require_lines3());
167293
- var types17 = tslib_1.__importStar(require_main5());
167294
- var Printable = types17.namedTypes.Printable;
167295
- var Expression = types17.namedTypes.Expression;
167296
- var ReturnStatement = types17.namedTypes.ReturnStatement;
167297
- var SourceLocation3 = types17.namedTypes.SourceLocation;
167334
+ var types18 = tslib_1.__importStar(require_main5());
167335
+ var Printable = types18.namedTypes.Printable;
167336
+ var Expression = types18.namedTypes.Expression;
167337
+ var ReturnStatement = types18.namedTypes.ReturnStatement;
167338
+ var SourceLocation3 = types18.namedTypes.SourceLocation;
167298
167339
  var util_1 = require_util22();
167299
167340
  var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
167300
- var isObject2 = types17.builtInTypes.object;
167301
- var isArray2 = types17.builtInTypes.array;
167302
- var isString = types17.builtInTypes.string;
167341
+ var isObject2 = types18.builtInTypes.object;
167342
+ var isArray2 = types18.builtInTypes.array;
167343
+ var isString = types18.builtInTypes.string;
167303
167344
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
167304
167345
  var Patcher = function Patcher2(lines) {
167305
167346
  assert_1.default.ok(this instanceof Patcher2);
@@ -167569,8 +167610,8 @@ var require_patcher3 = __commonJS3({
167569
167610
  if (k2.charAt(0) === "_") {
167570
167611
  continue;
167571
167612
  }
167572
- newPath.stack.push(k2, types17.getFieldValue(newNode, k2));
167573
- oldPath.stack.push(k2, types17.getFieldValue(oldNode, k2));
167613
+ newPath.stack.push(k2, types18.getFieldValue(newNode, k2));
167614
+ oldPath.stack.push(k2, types18.getFieldValue(oldNode, k2));
167574
167615
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
167575
167616
  newPath.stack.length -= 2;
167576
167617
  oldPath.stack.length -= 2;
@@ -167592,16 +167633,16 @@ var require_printer3 = __commonJS3({
167592
167633
  exports.Printer = void 0;
167593
167634
  var tslib_1 = require_tslib3();
167594
167635
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
167595
- var types17 = tslib_1.__importStar(require_main5());
167636
+ var types18 = tslib_1.__importStar(require_main5());
167596
167637
  var comments_1 = require_comments3();
167597
167638
  var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
167598
167639
  var lines_1 = require_lines3();
167599
167640
  var options_1 = require_options3();
167600
167641
  var patcher_1 = require_patcher3();
167601
167642
  var util = tslib_1.__importStar(require_util22());
167602
- var namedTypes = types17.namedTypes;
167603
- var isString = types17.builtInTypes.string;
167604
- var isObject2 = types17.builtInTypes.object;
167643
+ var namedTypes = types18.namedTypes;
167644
+ var isString = types18.builtInTypes.string;
167645
+ var isObject2 = types18.builtInTypes.object;
167605
167646
  var PrintResult = function PrintResult2(code, sourceMap) {
167606
167647
  assert_1.default.ok(this instanceof PrintResult2);
167607
167648
  isString.assert(code);
@@ -167763,7 +167804,7 @@ var require_printer3 = __commonJS3({
167763
167804
  case "OptionalMemberExpression": {
167764
167805
  parts.push(path32.call(print132, "object"));
167765
167806
  var property = path32.call(print132, "property");
167766
- var optional = types17.getFieldValue(n2, "optional");
167807
+ var optional = types18.getFieldValue(n2, "optional");
167767
167808
  if (n2.computed) {
167768
167809
  parts.push(optional ? "?.[" : "[", property, "]");
167769
167810
  } else {
@@ -168034,7 +168075,7 @@ var require_printer3 = __commonJS3({
168034
168075
  if (n2.typeArguments) {
168035
168076
  parts.push(path32.call(print132, "typeArguments"));
168036
168077
  }
168037
- if (types17.getFieldValue(n2, "optional")) {
168078
+ if (types18.getFieldValue(n2, "optional")) {
168038
168079
  parts.push("?.");
168039
168080
  }
168040
168081
  parts.push(printArgumentsList(path32, options, print132));
@@ -169713,8 +169754,8 @@ var require_printer3 = __commonJS3({
169713
169754
  });
169714
169755
  }
169715
169756
  function getPossibleRaw(node) {
169716
- var value = types17.getFieldValue(node, "value");
169717
- var extra = types17.getFieldValue(node, "extra");
169757
+ var value = types18.getFieldValue(node, "value");
169758
+ var extra = types18.getFieldValue(node, "extra");
169718
169759
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
169719
169760
  return extra.raw;
169720
169761
  }
@@ -169760,8 +169801,8 @@ var require_main22 = __commonJS3({
169760
169801
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
169761
169802
  var tslib_1 = require_tslib3();
169762
169803
  var fs_1 = tslib_1.__importDefault(__require3("fs"));
169763
- var types17 = tslib_1.__importStar(require_main5());
169764
- exports.types = types17;
169804
+ var types18 = tslib_1.__importStar(require_main5());
169805
+ exports.types = types18;
169765
169806
  var parser_1 = require_parser3();
169766
169807
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
169767
169808
  return parser_1.parse;
@@ -170421,7 +170462,7 @@ var printDocASTReducer2 = {
170421
170462
  leave: ({ name, interfaces, directives, fields }) => join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block3(fields)], " ")
170422
170463
  },
170423
170464
  UnionTypeDefinition: {
170424
- leave: ({ name, directives, types: types17 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
170465
+ leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
170425
170466
  },
170426
170467
  EnumTypeDefinition: {
170427
170468
  leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block3(values)], " ")
@@ -170448,7 +170489,7 @@ var printDocASTReducer2 = {
170448
170489
  leave: ({ name, interfaces, directives, fields }) => join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block3(fields)], " ")
170449
170490
  },
170450
170491
  UnionTypeExtension: {
170451
- leave: ({ name, directives, types: types17 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
170492
+ leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
170452
170493
  },
170453
170494
  EnumTypeExtension: {
170454
170495
  leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block3(values)], " ")
@@ -171863,7 +171904,18 @@ var ListManager2 = class {
171863
171904
  }
171864
171905
  lists = /* @__PURE__ */ new Map();
171865
171906
  listsByField = /* @__PURE__ */ new Map();
171866
- get(listName, id2, allLists) {
171907
+ get(listName, id2, allLists, skipMatches) {
171908
+ const lists = this.getLists(listName, id2, allLists);
171909
+ if (!lists) {
171910
+ return null;
171911
+ }
171912
+ if (skipMatches) {
171913
+ return new ListCollection2(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
171914
+ } else {
171915
+ return lists;
171916
+ }
171917
+ }
171918
+ getLists(listName, id2, allLists) {
171867
171919
  const matches = this.lists.get(listName);
171868
171920
  if (!matches || matches.size === 0) {
171869
171921
  return null;
@@ -171985,6 +172037,9 @@ var List2 = class {
171985
172037
  this.manager = manager;
171986
172038
  this.abstract = abstract;
171987
172039
  }
172040
+ get fieldRef() {
172041
+ return `${this.recordID}.${this.key}`;
172042
+ }
171988
172043
  when(when) {
171989
172044
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
171990
172045
  }
@@ -173129,8 +173184,8 @@ var Cache2 = class {
173129
173184
  variables
173130
173185
  );
173131
173186
  }
173132
- list(name, parentID, allLists) {
173133
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
173187
+ list(name, parentID, allLists, skipMatches) {
173188
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
173134
173189
  if (!handler) {
173135
173190
  throw new Error(
173136
173191
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -173545,6 +173600,7 @@ var CacheInternal2 = class {
173545
173600
  });
173546
173601
  }
173547
173602
  }
173603
+ const processedOperations = /* @__PURE__ */ new Set();
173548
173604
  for (const operation of operations || []) {
173549
173605
  let parentID;
173550
173606
  if (operation.parentID) {
@@ -173564,7 +173620,12 @@ var CacheInternal2 = class {
173564
173620
  const targets = Array.isArray(value) ? value : [value];
173565
173621
  for (const target of targets) {
173566
173622
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
173567
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
173623
+ this.cache.list(
173624
+ operation.list,
173625
+ parentID,
173626
+ operation.target === "all",
173627
+ processedOperations
173628
+ ).when(operation.when).addToList(
173568
173629
  fieldSelection,
173569
173630
  target,
173570
173631
  variables,
@@ -173572,7 +173633,12 @@ var CacheInternal2 = class {
173572
173633
  layer
173573
173634
  );
173574
173635
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
173575
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
173636
+ this.cache.list(
173637
+ operation.list,
173638
+ parentID,
173639
+ operation.target === "all",
173640
+ processedOperations
173641
+ ).when(operation.when).toggleElement({
173576
173642
  selection: fieldSelection,
173577
173643
  data: target,
173578
173644
  variables,
@@ -173580,7 +173646,12 @@ var CacheInternal2 = class {
173580
173646
  layer
173581
173647
  });
173582
173648
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
173583
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
173649
+ this.cache.list(
173650
+ operation.list,
173651
+ parentID,
173652
+ operation.target === "all",
173653
+ processedOperations
173654
+ ).when(operation.when).remove(target, variables, layer);
173584
173655
  } else if (operation.action === "delete" && operation.type && target) {
173585
173656
  const targetID = this.id(operation.type, target);
173586
173657
  if (!targetID) {
@@ -173592,6 +173663,16 @@ var CacheInternal2 = class {
173592
173663
  this.cache.delete(targetID, layer);
173593
173664
  }
173594
173665
  }
173666
+ if (operation.list) {
173667
+ const matchingLists = this.cache.list(
173668
+ operation.list,
173669
+ parentID,
173670
+ operation.target === "all"
173671
+ );
173672
+ for (const list3 of matchingLists.lists) {
173673
+ processedOperations.add(list3.fieldRef);
173674
+ }
173675
+ }
173595
173676
  }
173596
173677
  }
173597
173678
  return toNotify;
@@ -174057,6 +174138,46 @@ var { keys } = Object;
174057
174138
  var recast4 = __toESM3(require_main22(), 1);
174058
174139
  var AST4 = recast4.types.builders;
174059
174140
  var pageInfoSelection = [
174141
+ {
174142
+ kind: graphql13.Kind.FIELD,
174143
+ name: {
174144
+ kind: graphql13.Kind.NAME,
174145
+ value: "pageInfo"
174146
+ },
174147
+ selectionSet: {
174148
+ kind: graphql13.Kind.SELECTION_SET,
174149
+ selections: [
174150
+ {
174151
+ kind: graphql13.Kind.FIELD,
174152
+ name: {
174153
+ kind: graphql13.Kind.NAME,
174154
+ value: "hasPreviousPage"
174155
+ }
174156
+ },
174157
+ {
174158
+ kind: graphql13.Kind.FIELD,
174159
+ name: {
174160
+ kind: graphql13.Kind.NAME,
174161
+ value: "hasNextPage"
174162
+ }
174163
+ },
174164
+ {
174165
+ kind: graphql13.Kind.FIELD,
174166
+ name: {
174167
+ kind: graphql13.Kind.NAME,
174168
+ value: "startCursor"
174169
+ }
174170
+ },
174171
+ {
174172
+ kind: graphql13.Kind.FIELD,
174173
+ name: {
174174
+ kind: graphql13.Kind.NAME,
174175
+ value: "endCursor"
174176
+ }
174177
+ }
174178
+ ]
174179
+ }
174180
+ },
174060
174181
  {
174061
174182
  kind: graphql13.Kind.FIELD,
174062
174183
  name: {
@@ -174327,7 +174448,7 @@ var printDocASTReducer22 = {
174327
174448
  ], " ")
174328
174449
  },
174329
174450
  UnionTypeDefinition: {
174330
- leave: ({ name, directives, types: types17 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
174451
+ leave: ({ name, directives, types: types18 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
174331
174452
  },
174332
174453
  EnumTypeDefinition: {
174333
174454
  leave: ({ name, directives, values }) => join32(["enum", name, join32(directives, " "), block22(values)], " ")
@@ -174366,7 +174487,7 @@ var printDocASTReducer22 = {
174366
174487
  ], " ")
174367
174488
  },
174368
174489
  UnionTypeExtension: {
174369
- leave: ({ name, directives, types: types17 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
174490
+ leave: ({ name, directives, types: types18 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
174370
174491
  },
174371
174492
  EnumTypeExtension: {
174372
174493
  leave: ({ name, directives, values }) => join32(["extend enum", name, join32(directives, " "), block22(values)], " ")
@@ -174403,6 +174524,8 @@ For more information, please visit these links:
174403
174524
  - https://graphql.org/learn/global-object-identification/
174404
174525
  - ${siteURL}/guides/caching-data#custom-ids
174405
174526
  `;
174527
+ var recast14 = __toESM3(require_main22(), 1);
174528
+ var AST14 = recast14.types.builders;
174406
174529
  function find_insert_index(script) {
174407
174530
  let insert_index = script.body.findIndex((statement) => {
174408
174531
  return statement.type !== "ImportDeclaration";
@@ -174421,7 +174544,7 @@ function find_exported_fn(body, name) {
174421
174544
  if (exportDeclaration.declaration?.type === "FunctionDeclaration") {
174422
174545
  const value = exportDeclaration.declaration;
174423
174546
  if (value.id?.name === name) {
174424
- return exportDeclaration.declaration;
174547
+ return { declaration: exportDeclaration.declaration, export: exportDeclaration };
174425
174548
  }
174426
174549
  } else if (exportDeclaration.declaration?.type === "VariableDeclaration") {
174427
174550
  const value = exportDeclaration.declaration;
@@ -174440,7 +174563,10 @@ function find_exported_fn(body, name) {
174440
174563
  init2 = init2.arguments[0];
174441
174564
  }
174442
174565
  if (init2.type === "FunctionExpression" || init2.type === "ArrowFunctionExpression") {
174443
- return init2;
174566
+ return { declaration: init2, export: exportDeclaration };
174567
+ }
174568
+ if (init2.type === "Identifier" || init2.type === "CallExpression") {
174569
+ return { declaration: init2, export: exportDeclaration };
174444
174570
  }
174445
174571
  } else {
174446
174572
  continue;
@@ -174452,10 +174578,10 @@ function find_exported_fn(body, name) {
174452
174578
  if (!exported) {
174453
174579
  return null;
174454
174580
  }
174455
- return exported.declaration;
174581
+ return { declaration: exported.declaration, export: exported };
174456
174582
  }
174457
- var recast14 = __toESM3(require_main22(), 1);
174458
- var AST14 = recast14.types.builders;
174583
+ var recast15 = __toESM3(require_main22(), 1);
174584
+ var AST15 = recast15.types.builders;
174459
174585
  function ensure_imports({
174460
174586
  config: config2,
174461
174587
  script,
@@ -174471,13 +174597,13 @@ function ensure_imports({
174471
174597
  if (!has_import) {
174472
174598
  script.body.unshift({
174473
174599
  type: "ImportDeclaration",
174474
- source: AST14.stringLiteral(sourceModule),
174600
+ source: AST15.stringLiteral(sourceModule),
174475
174601
  importKind
174476
174602
  });
174477
174603
  }
174478
174604
  return { ids: [], added: has_import ? 0 : 1 };
174479
174605
  }
174480
- const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST14.identifier(id2));
174606
+ const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST15.identifier(id2));
174481
174607
  const toImport = idList.filter(
174482
174608
  (identifier) => !script.body.find(
174483
174609
  (statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
@@ -174488,16 +174614,16 @@ function ensure_imports({
174488
174614
  if (toImport.length > 0) {
174489
174615
  script.body.unshift({
174490
174616
  type: "ImportDeclaration",
174491
- source: AST14.stringLiteral(sourceModule),
174617
+ source: AST15.stringLiteral(sourceModule),
174492
174618
  specifiers: toImport.map(
174493
- (identifier, i22) => !Array.isArray(importID) ? AST14.importDefaultSpecifier(identifier) : AST14.importSpecifier(identifier, as?.[i22] ? AST14.identifier(as[i22]) : identifier)
174619
+ (identifier, i22) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i22] ? AST15.identifier(as[i22]) : identifier)
174494
174620
  ),
174495
174621
  importKind
174496
174622
  });
174497
174623
  }
174498
174624
  for (const [i22, target] of (as ?? []).entries()) {
174499
174625
  if (target) {
174500
- idList[i22] = AST14.identifier(target);
174626
+ idList[i22] = AST15.identifier(target);
174501
174627
  }
174502
174628
  }
174503
174629
  return {
@@ -175040,14 +175166,14 @@ function findScriptInnerBounds({
175040
175166
  }
175041
175167
 
175042
175168
  // src/plugin/transforms/componentQuery.ts
175043
- var recast15 = __toESM(require_main4(), 1);
175044
- var AST15 = recast15.types.builders;
175169
+ var recast16 = __toESM(require_main4(), 1);
175170
+ var AST16 = recast16.types.builders;
175045
175171
  async function QueryProcessor(config, page) {
175046
175172
  if (!is_component(config, page.framework, page.filepath)) {
175047
175173
  return;
175048
175174
  }
175049
175175
  const store_id = (name) => {
175050
- return AST15.identifier(`_houdini_` + name);
175176
+ return AST16.identifier(`_houdini_` + name);
175051
175177
  };
175052
175178
  const queries = await find_inline_queries(page, page.script, store_id);
175053
175179
  if (queries.length === 0) {
@@ -175117,8 +175243,8 @@ async function QueryProcessor(config, page) {
175117
175243
  page.script.body.splice(
175118
175244
  find_insert_index(page.script),
175119
175245
  0,
175120
- AST15.variableDeclaration("const", [
175121
- AST15.variableDeclarator(store_id(query.name.value), AST15.newExpression(factory, []))
175246
+ AST16.variableDeclaration("const", [
175247
+ AST16.variableDeclarator(store_id(query.name.value), AST16.newExpression(factory, []))
175122
175248
  ])
175123
175249
  );
175124
175250
  }
@@ -175134,47 +175260,47 @@ async function QueryProcessor(config, page) {
175134
175260
  )}. maybe its not exported? `
175135
175261
  });
175136
175262
  }
175137
- const queryLoadExpression = AST15.callExpression(
175138
- AST15.memberExpression(store_id(query.name.value), AST15.identifier("fetch")),
175263
+ const queryLoadExpression = AST16.callExpression(
175264
+ AST16.memberExpression(store_id(query.name.value), AST16.identifier("fetch")),
175139
175265
  [
175140
- AST15.objectExpression([
175141
- AST15.objectProperty(
175142
- AST15.identifier("variables"),
175143
- AST15.callExpression(AST15.identifier("marshalInputs"), [
175144
- AST15.objectExpression([
175145
- AST15.objectProperty(
175146
- AST15.identifier("config"),
175147
- AST15.callExpression(AST15.identifier("getCurrentConfig"), [])
175266
+ AST16.objectExpression([
175267
+ AST16.objectProperty(
175268
+ AST16.identifier("variables"),
175269
+ AST16.callExpression(AST16.identifier("marshalInputs"), [
175270
+ AST16.objectExpression([
175271
+ AST16.objectProperty(
175272
+ AST16.identifier("config"),
175273
+ AST16.callExpression(AST16.identifier("getCurrentConfig"), [])
175148
175274
  ),
175149
- AST15.objectProperty(
175150
- AST15.identifier("artifact"),
175151
- AST15.memberExpression(
175275
+ AST16.objectProperty(
175276
+ AST16.identifier("artifact"),
175277
+ AST16.memberExpression(
175152
175278
  store_id(query.name.value),
175153
- AST15.identifier("artifact")
175279
+ AST16.identifier("artifact")
175154
175280
  )
175155
175281
  ),
175156
- AST15.objectProperty(
175157
- AST15.identifier("input"),
175158
- has_variables ? AST15.callExpression(
175159
- AST15.memberExpression(
175160
- AST15.identifier(variable_fn),
175161
- AST15.identifier("call")
175282
+ AST16.objectProperty(
175283
+ AST16.identifier("input"),
175284
+ has_variables ? AST16.callExpression(
175285
+ AST16.memberExpression(
175286
+ AST16.identifier(variable_fn),
175287
+ AST16.identifier("call")
175162
175288
  ),
175163
175289
  [
175164
- AST15.newExpression(
175165
- AST15.identifier("RequestContext"),
175290
+ AST16.newExpression(
175291
+ AST16.identifier("RequestContext"),
175166
175292
  []
175167
175293
  ),
175168
- AST15.objectExpression([
175169
- AST15.objectProperty(
175170
- AST15.identifier("props"),
175171
- AST15.objectExpression(
175294
+ AST16.objectExpression([
175295
+ AST16.objectProperty(
175296
+ AST16.identifier("props"),
175297
+ AST16.objectExpression(
175172
175298
  props.map(
175173
- (prop2) => AST15.objectProperty(
175174
- AST15.identifier(
175299
+ (prop2) => AST16.objectProperty(
175300
+ AST16.identifier(
175175
175301
  prop2
175176
175302
  ),
175177
- AST15.identifier(
175303
+ AST16.identifier(
175178
175304
  prop2
175179
175305
  )
175180
175306
  )
@@ -175183,7 +175309,7 @@ async function QueryProcessor(config, page) {
175183
175309
  )
175184
175310
  ])
175185
175311
  ]
175186
- ) : AST15.objectExpression([])
175312
+ ) : AST16.objectExpression([])
175187
175313
  )
175188
175314
  ])
175189
175315
  ])
@@ -175194,23 +175320,23 @@ async function QueryProcessor(config, page) {
175194
175320
  let finalExpression = [];
175195
175321
  if (page.svelte5Runes) {
175196
175322
  finalExpression = [
175197
- AST15.expressionStatement(
175198
- AST15.callExpression(AST15.identifier("$effect"), [
175199
- AST15.arrowFunctionExpression(
175323
+ AST16.expressionStatement(
175324
+ AST16.callExpression(AST16.identifier("$effect"), [
175325
+ AST16.arrowFunctionExpression(
175200
175326
  [],
175201
- AST15.blockStatement([AST15.expressionStatement(queryLoadExpression)])
175327
+ AST16.blockStatement([AST16.expressionStatement(queryLoadExpression)])
175202
175328
  )
175203
175329
  ])
175204
175330
  )
175205
175331
  ];
175206
175332
  } else {
175207
175333
  finalExpression = [
175208
- AST15.labeledStatement(
175209
- AST15.identifier("$"),
175210
- AST15.expressionStatement(
175211
- AST15.logicalExpression(
175334
+ AST16.labeledStatement(
175335
+ AST16.identifier("$"),
175336
+ AST16.expressionStatement(
175337
+ AST16.logicalExpression(
175212
175338
  "&&",
175213
- AST15.identifier("isBrowser"),
175339
+ AST16.identifier("isBrowser"),
175214
175340
  queryLoadExpression
175215
175341
  )
175216
175342
  )
@@ -175252,8 +175378,8 @@ async function find_inline_queries(page, parsed, store_id) {
175252
175378
  }
175253
175379
 
175254
175380
  // src/plugin/transforms/kit/init.ts
175255
- var recast16 = __toESM(require_main4(), 1);
175256
- var AST16 = recast16.types.builders;
175381
+ var recast17 = __toESM(require_main4(), 1);
175382
+ var AST17 = recast17.types.builders;
175257
175383
  async function kit_init(page) {
175258
175384
  if (!is_root_layout(page.config, page.filepath)) {
175259
175385
  return;
@@ -175277,9 +175403,9 @@ async function kit_init(page) {
175277
175403
  import: ["extractSession", "setClientSession"]
175278
175404
  }).ids;
175279
175405
  page.script.body.push(
175280
- AST16.expressionStatement(
175281
- AST16.callExpression(on_mount, [
175282
- AST16.arrowFunctionExpression([], AST16.callExpression(set_client_started, []))
175406
+ AST17.expressionStatement(
175407
+ AST17.callExpression(on_mount, [
175408
+ AST17.arrowFunctionExpression([], AST17.callExpression(set_client_started, []))
175283
175409
  ])
175284
175410
  )
175285
175411
  );
@@ -175290,17 +175416,17 @@ async function kit_init(page) {
175290
175416
  import: ["page"]
175291
175417
  }).ids[0];
175292
175418
  page.script.body.push(
175293
- AST16.expressionStatement(
175294
- AST16.callExpression(AST16.memberExpression(store_id, AST16.identifier("subscribe")), [
175295
- AST16.arrowFunctionExpression(
175296
- [AST16.identifier("val")],
175297
- AST16.blockStatement([
175298
- AST16.expressionStatement(
175299
- AST16.callExpression(set_session, [
175300
- AST16.callExpression(extract_session, [
175301
- AST16.memberExpression(
175302
- AST16.identifier("val"),
175303
- AST16.identifier("data")
175419
+ AST17.expressionStatement(
175420
+ AST17.callExpression(AST17.memberExpression(store_id, AST17.identifier("subscribe")), [
175421
+ AST17.arrowFunctionExpression(
175422
+ [AST17.identifier("val")],
175423
+ AST17.blockStatement([
175424
+ AST17.expressionStatement(
175425
+ AST17.callExpression(set_session, [
175426
+ AST17.callExpression(extract_session, [
175427
+ AST17.memberExpression(
175428
+ AST17.identifier("val"),
175429
+ AST17.identifier("data")
175304
175430
  )
175305
175431
  ])
175306
175432
  ])
@@ -175314,7 +175440,7 @@ async function kit_init(page) {
175314
175440
 
175315
175441
  // src/plugin/transforms/kit/load.ts
175316
175442
  import * as graphql36 from "graphql";
175317
- var recast17 = __toESM(require_main4(), 1);
175443
+ var recast18 = __toESM(require_main4(), 1);
175318
175444
 
175319
175445
  // src/plugin/routing.ts
175320
175446
  var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
@@ -175396,14 +175522,14 @@ function escape2(str) {
175396
175522
  }
175397
175523
 
175398
175524
  // src/plugin/transforms/kit/load.ts
175399
- var AST17 = recast17.types.builders;
175525
+ var AST18 = recast18.types.builders;
175400
175526
  async function kit_load_generator(page) {
175401
175527
  const route = is_route(page.config, page.framework, page.filepath);
175402
175528
  const script = is_route_script(page.framework, page.filepath);
175403
175529
  if (!route && !script) {
175404
175530
  return;
175405
175531
  }
175406
- const inline_query_store = (name) => route ? AST17.memberExpression(AST17.identifier("data"), AST17.identifier(name)) : artifact_import({
175532
+ const inline_query_store = (name) => route ? AST18.memberExpression(AST18.identifier("data"), AST18.identifier(name)) : artifact_import({
175407
175533
  config: page.config,
175408
175534
  script: page.script,
175409
175535
  page,
@@ -175455,8 +175581,8 @@ async function kit_load_generator(page) {
175455
175581
  find_insert_index(page.script),
175456
175582
  0,
175457
175583
  ...!has_data ? [
175458
- AST17.exportNamedDeclaration(
175459
- AST17.variableDeclaration("let", [AST17.identifier("data")])
175584
+ AST18.exportNamedDeclaration(
175585
+ AST18.variableDeclaration("let", [AST18.identifier("data")])
175460
175586
  )
175461
175587
  ] : []
175462
175588
  );
@@ -175503,43 +175629,43 @@ function add_load({
175503
175629
  let before_load = page_info.exports.includes(houdini_before_load_fn);
175504
175630
  let afterLoad = page_info.exports.includes(houdini_afterLoad_fn);
175505
175631
  let on_error = page_info.exports.includes(houdini_on_error_fn);
175506
- const request_context = AST17.identifier("houdini_context");
175507
- const promise_list = AST17.identifier("promises");
175508
- const return_value = AST17.memberExpression(request_context, AST17.identifier("returnValue"));
175509
- const result_obj = AST17.identifier("result");
175510
- const input_obj = AST17.identifier("inputs");
175511
- const preload_fn = AST17.functionDeclaration(
175512
- AST17.identifier("load"),
175513
- [AST17.identifier("context")],
175514
- AST17.blockStatement([
175515
- AST17.variableDeclaration("const", [
175516
- AST17.variableDeclarator(
175632
+ const request_context = AST18.identifier("houdini_context");
175633
+ const promise_list = AST18.identifier("promises");
175634
+ const return_value = AST18.memberExpression(request_context, AST18.identifier("returnValue"));
175635
+ const result_obj = AST18.identifier("result");
175636
+ const input_obj = AST18.identifier("inputs");
175637
+ const preload_fn = AST18.functionDeclaration(
175638
+ AST18.identifier("load"),
175639
+ [AST18.identifier("context")],
175640
+ AST18.blockStatement([
175641
+ AST18.variableDeclaration("const", [
175642
+ AST18.variableDeclarator(
175517
175643
  request_context,
175518
- AST17.newExpression(AST17.identifier("RequestContext"), [AST17.identifier("context")])
175644
+ AST18.newExpression(AST18.identifier("RequestContext"), [AST18.identifier("context")])
175519
175645
  )
175520
175646
  ]),
175521
- AST17.variableDeclaration("const", [
175522
- AST17.variableDeclarator(
175523
- AST17.identifier("houdiniConfig"),
175524
- AST17.callExpression(AST17.identifier("getCurrentConfig"), [])
175647
+ AST18.variableDeclaration("const", [
175648
+ AST18.variableDeclarator(
175649
+ AST18.identifier("houdiniConfig"),
175650
+ AST18.callExpression(AST18.identifier("getCurrentConfig"), [])
175525
175651
  )
175526
175652
  ]),
175527
- AST17.variableDeclaration("const", [
175528
- AST17.variableDeclarator(promise_list, AST17.arrayExpression([]))
175653
+ AST18.variableDeclaration("const", [
175654
+ AST18.variableDeclarator(promise_list, AST18.arrayExpression([]))
175529
175655
  ]),
175530
- AST17.variableDeclaration("const", [
175531
- AST17.variableDeclarator(input_obj, AST17.objectExpression([]))
175656
+ AST18.variableDeclaration("const", [
175657
+ AST18.variableDeclarator(input_obj, AST18.objectExpression([]))
175532
175658
  ]),
175533
- AST17.returnStatement(
175534
- AST17.objectExpression([
175535
- AST17.spreadElement(return_value),
175536
- AST17.spreadElement(result_obj)
175659
+ AST18.returnStatement(
175660
+ AST18.objectExpression([
175661
+ AST18.spreadElement(return_value),
175662
+ AST18.spreadElement(result_obj)
175537
175663
  ])
175538
175664
  )
175539
175665
  ])
175540
175666
  );
175541
175667
  preload_fn.async = true;
175542
- page.script.body.push(AST17.exportNamedDeclaration(preload_fn));
175668
+ page.script.body.push(AST18.exportNamedDeclaration(preload_fn));
175543
175669
  let insert_index = 4;
175544
175670
  for (const query of queries) {
175545
175671
  const { ids } = ensure_imports({
@@ -175549,19 +175675,19 @@ function add_load({
175549
175675
  sourceModule: store_import_path({ config: page.config, name: query.name.value })
175550
175676
  });
175551
175677
  const load_fn = ids[0];
175552
- const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST17.awaitExpression(
175553
- AST17.callExpression(AST17.identifier(__variable_fn_name(query.name.value)), [
175554
- AST17.identifier("houdiniConfig"),
175555
- AST17.identifier("context")
175678
+ const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST18.awaitExpression(
175679
+ AST18.callExpression(AST18.identifier(__variable_fn_name(query.name.value)), [
175680
+ AST18.identifier("houdiniConfig"),
175681
+ AST18.identifier("context")
175556
175682
  ])
175557
- ) : AST17.objectExpression([]);
175683
+ ) : AST18.objectExpression([]);
175558
175684
  preload_fn.body.body.splice(
175559
175685
  insert_index++,
175560
175686
  0,
175561
- AST17.expressionStatement(
175562
- AST17.assignmentExpression(
175687
+ AST18.expressionStatement(
175688
+ AST18.assignmentExpression(
175563
175689
  "=",
175564
- AST17.memberExpression(input_obj, AST17.literal(query.name.value)),
175690
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value)),
175565
175691
  variables
175566
175692
  )
175567
175693
  )
@@ -175569,18 +175695,18 @@ function add_load({
175569
175695
  preload_fn.body.body.splice(
175570
175696
  insert_index++,
175571
175697
  0,
175572
- AST17.expressionStatement(
175573
- AST17.callExpression(AST17.memberExpression(promise_list, AST17.identifier("push")), [
175574
- AST17.callExpression(load_fn, [
175575
- AST17.objectExpression([
175576
- AST17.objectProperty(
175577
- AST17.literal("variables"),
175578
- AST17.memberExpression(input_obj, AST17.literal(query.name.value))
175698
+ AST18.expressionStatement(
175699
+ AST18.callExpression(AST18.memberExpression(promise_list, AST18.identifier("push")), [
175700
+ AST18.callExpression(load_fn, [
175701
+ AST18.objectExpression([
175702
+ AST18.objectProperty(
175703
+ AST18.literal("variables"),
175704
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value))
175579
175705
  ),
175580
- AST17.objectProperty(AST17.literal("event"), AST17.identifier("context")),
175581
- AST17.objectProperty(
175582
- AST17.literal("blocking"),
175583
- afterLoad || on_error ? AST17.booleanLiteral(true) : AST17.identifier("undefined")
175706
+ AST18.objectProperty(AST18.literal("event"), AST18.identifier("context")),
175707
+ AST18.objectProperty(
175708
+ AST18.literal("blocking"),
175709
+ afterLoad || on_error ? AST18.booleanLiteral(true) : AST18.identifier("undefined")
175584
175710
  )
175585
175711
  ])
175586
175712
  ])
@@ -175592,28 +175718,28 @@ function add_load({
175592
175718
  preload_fn.body.body.splice(
175593
175719
  insert_index++,
175594
175720
  0,
175595
- AST17.variableDeclaration("let", [
175596
- AST17.variableDeclarator(result_obj, AST17.objectExpression([]))
175721
+ AST18.variableDeclaration("let", [
175722
+ AST18.variableDeclarator(result_obj, AST18.objectExpression([]))
175597
175723
  ]),
175598
- AST17.tryStatement(
175599
- AST17.blockStatement([
175600
- AST17.expressionStatement(
175601
- AST17.assignmentExpression(
175724
+ AST18.tryStatement(
175725
+ AST18.blockStatement([
175726
+ AST18.expressionStatement(
175727
+ AST18.assignmentExpression(
175602
175728
  "=",
175603
175729
  result_obj,
175604
- AST17.callExpression(
175605
- AST17.memberExpression(
175606
- AST17.identifier("Object"),
175607
- AST17.identifier("assign")
175730
+ AST18.callExpression(
175731
+ AST18.memberExpression(
175732
+ AST18.identifier("Object"),
175733
+ AST18.identifier("assign")
175608
175734
  ),
175609
175735
  [
175610
- AST17.objectExpression([]),
175611
- AST17.spreadElement(
175612
- AST17.awaitExpression(
175613
- AST17.callExpression(
175614
- AST17.memberExpression(
175615
- AST17.identifier("Promise"),
175616
- AST17.identifier("all")
175736
+ AST18.objectExpression([]),
175737
+ AST18.spreadElement(
175738
+ AST18.awaitExpression(
175739
+ AST18.callExpression(
175740
+ AST18.memberExpression(
175741
+ AST18.identifier("Promise"),
175742
+ AST18.identifier("all")
175617
175743
  ),
175618
175744
  [promise_list]
175619
175745
  )
@@ -175624,37 +175750,37 @@ function add_load({
175624
175750
  )
175625
175751
  )
175626
175752
  ]),
175627
- AST17.catchClause(
175628
- AST17.identifier("err"),
175753
+ AST18.catchClause(
175754
+ AST18.identifier("err"),
175629
175755
  null,
175630
- AST17.blockStatement([
175631
- on_error ? AST17.expressionStatement(
175632
- AST17.awaitExpression(
175633
- AST17.callExpression(
175634
- AST17.memberExpression(
175756
+ AST18.blockStatement([
175757
+ on_error ? AST18.expressionStatement(
175758
+ AST18.awaitExpression(
175759
+ AST18.callExpression(
175760
+ AST18.memberExpression(
175635
175761
  request_context,
175636
- AST17.identifier("invokeLoadHook")
175762
+ AST18.identifier("invokeLoadHook")
175637
175763
  ),
175638
175764
  [
175639
- AST17.objectExpression([
175640
- AST17.objectProperty(
175641
- AST17.literal("variant"),
175642
- AST17.stringLiteral("error")
175765
+ AST18.objectExpression([
175766
+ AST18.objectProperty(
175767
+ AST18.literal("variant"),
175768
+ AST18.stringLiteral("error")
175643
175769
  ),
175644
- AST17.objectProperty(
175645
- AST17.literal("hookFn"),
175646
- AST17.identifier(houdini_on_error_fn)
175770
+ AST18.objectProperty(
175771
+ AST18.literal("hookFn"),
175772
+ AST18.identifier(houdini_on_error_fn)
175647
175773
  ),
175648
- AST17.objectProperty(
175649
- AST17.literal("error"),
175650
- AST17.identifier("err")
175774
+ AST18.objectProperty(
175775
+ AST18.literal("error"),
175776
+ AST18.identifier("err")
175651
175777
  ),
175652
- AST17.objectProperty(AST17.literal("input"), input_obj)
175778
+ AST18.objectProperty(AST18.literal("input"), input_obj)
175653
175779
  ])
175654
175780
  ]
175655
175781
  )
175656
175782
  )
175657
- ) : AST17.throwStatement(AST17.identifier("err"))
175783
+ ) : AST18.throwStatement(AST18.identifier("err"))
175658
175784
  ])
175659
175785
  )
175660
175786
  )
@@ -175689,22 +175815,22 @@ async function find_special_query(type, page) {
175689
175815
  return definition;
175690
175816
  }
175691
175817
  function load_hook_statements(name, request_context, input_id, result_id) {
175692
- return AST17.expressionStatement(
175693
- AST17.awaitExpression(
175694
- AST17.callExpression(
175695
- AST17.memberExpression(request_context, AST17.identifier("invokeLoadHook")),
175818
+ return AST18.expressionStatement(
175819
+ AST18.awaitExpression(
175820
+ AST18.callExpression(
175821
+ AST18.memberExpression(request_context, AST18.identifier("invokeLoadHook")),
175696
175822
  [
175697
- AST17.objectExpression([
175698
- AST17.objectProperty(AST17.literal("variant"), AST17.stringLiteral(name)),
175699
- AST17.objectProperty(
175700
- AST17.literal("hookFn"),
175701
- AST17.identifier(
175823
+ AST18.objectExpression([
175824
+ AST18.objectProperty(AST18.literal("variant"), AST18.stringLiteral(name)),
175825
+ AST18.objectProperty(
175826
+ AST18.literal("hookFn"),
175827
+ AST18.identifier(
175702
175828
  name === "before" ? houdini_before_load_fn : houdini_afterLoad_fn
175703
175829
  )
175704
175830
  ),
175705
175831
  ...name === "after" ? [
175706
- AST17.objectProperty(AST17.literal("input"), input_id),
175707
- AST17.objectProperty(AST17.literal("data"), result_id)
175832
+ AST18.objectProperty(AST18.literal("input"), input_id),
175833
+ AST18.objectProperty(AST18.literal("data"), result_id)
175708
175834
  ] : []
175709
175835
  ])
175710
175836
  ]
@@ -175766,22 +175892,22 @@ function variable_function_for_query(page, query, has_local) {
175766
175892
  };
175767
175893
  }
175768
175894
  const fn_body = [
175769
- AST17.variableDeclaration("const", [
175770
- AST17.variableDeclarator(
175771
- AST17.identifier("result"),
175772
- AST17.objectExpression(
175895
+ AST18.variableDeclaration("const", [
175896
+ AST18.variableDeclarator(
175897
+ AST18.identifier("result"),
175898
+ AST18.objectExpression(
175773
175899
  Object.entries(has_args).map(([arg, type]) => {
175774
- return AST17.objectProperty(
175775
- AST17.identifier(arg),
175776
- AST17.callExpression(AST17.identifier("parseScalar"), [
175777
- AST17.identifier("config"),
175778
- AST17.stringLiteral(type),
175779
- AST17.memberExpression(
175780
- AST17.memberExpression(
175781
- AST17.identifier("event"),
175782
- AST17.identifier("params")
175900
+ return AST18.objectProperty(
175901
+ AST18.identifier(arg),
175902
+ AST18.callExpression(AST18.identifier("parseScalar"), [
175903
+ AST18.identifier("config"),
175904
+ AST18.stringLiteral(type),
175905
+ AST18.memberExpression(
175906
+ AST18.memberExpression(
175907
+ AST18.identifier("event"),
175908
+ AST18.identifier("params")
175783
175909
  ),
175784
- AST17.identifier(arg)
175910
+ AST18.identifier(arg)
175785
175911
  )
175786
175912
  ])
175787
175913
  );
@@ -175792,28 +175918,28 @@ function variable_function_for_query(page, query, has_local) {
175792
175918
  ];
175793
175919
  if (has_local) {
175794
175920
  fn_body.push(
175795
- AST17.expressionStatement(
175796
- AST17.callExpression(
175797
- AST17.memberExpression(AST17.identifier("Object"), AST17.identifier("assign")),
175921
+ AST18.expressionStatement(
175922
+ AST18.callExpression(
175923
+ AST18.memberExpression(AST18.identifier("Object"), AST18.identifier("assign")),
175798
175924
  [
175799
- AST17.identifier("result"),
175800
- AST17.callExpression(AST17.identifier("marshalInputs"), [
175801
- AST17.objectExpression([
175802
- AST17.objectProperty(
175803
- AST17.identifier("config"),
175804
- AST17.identifier("config")
175925
+ AST18.identifier("result"),
175926
+ AST18.callExpression(AST18.identifier("marshalInputs"), [
175927
+ AST18.objectExpression([
175928
+ AST18.objectProperty(
175929
+ AST18.identifier("config"),
175930
+ AST18.identifier("config")
175805
175931
  ),
175806
- AST17.objectProperty(
175807
- AST17.identifier("input"),
175808
- AST17.awaitExpression(
175809
- AST17.callExpression(
175810
- AST17.identifier(query_variable_fn(query.name.value)),
175811
- [AST17.identifier("event")]
175932
+ AST18.objectProperty(
175933
+ AST18.identifier("input"),
175934
+ AST18.awaitExpression(
175935
+ AST18.callExpression(
175936
+ AST18.identifier(query_variable_fn(query.name.value)),
175937
+ [AST18.identifier("event")]
175812
175938
  )
175813
175939
  )
175814
175940
  ),
175815
- AST17.objectProperty(
175816
- AST17.identifier("artifact"),
175941
+ AST18.objectProperty(
175942
+ AST18.identifier("artifact"),
175817
175943
  artifact_import({
175818
175944
  config: page.config,
175819
175945
  script: page.script,
@@ -175828,11 +175954,11 @@ function variable_function_for_query(page, query, has_local) {
175828
175954
  )
175829
175955
  );
175830
175956
  }
175831
- fn_body.push(AST17.returnStatement(AST17.identifier("result")));
175832
- const declaration2 = AST17.functionDeclaration(
175833
- AST17.identifier(__variable_fn_name(query.name.value)),
175834
- [AST17.identifier("config"), AST17.identifier("event")],
175835
- AST17.blockStatement(fn_body)
175957
+ fn_body.push(AST18.returnStatement(AST18.identifier("result")));
175958
+ const declaration2 = AST18.functionDeclaration(
175959
+ AST18.identifier(__variable_fn_name(query.name.value)),
175960
+ [AST18.identifier("config"), AST18.identifier("event")],
175961
+ AST18.blockStatement(fn_body)
175836
175962
  );
175837
175963
  declaration2.async = true;
175838
175964
  return declaration2;
@@ -175842,8 +175968,8 @@ function __variable_fn_name(name) {
175842
175968
  }
175843
175969
 
175844
175970
  // src/plugin/transforms/kit/session.ts
175845
- var recast18 = __toESM(require_main4(), 1);
175846
- var AST18 = recast18.types.builders;
175971
+ var recast19 = __toESM(require_main4(), 1);
175972
+ var AST19 = recast19.types.builders;
175847
175973
  function session_default(page) {
175848
175974
  if (is_root_layout_server(page.config, page.filepath)) {
175849
175975
  process_root_layout_server(page);
@@ -175859,12 +175985,12 @@ function process_root_layout_server(page) {
175859
175985
  sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
175860
175986
  }).ids[0];
175861
175987
  add_load_return(page, (event_id) => [
175862
- AST18.spreadElement(AST18.callExpression(build_session_object, [event_id]))
175988
+ AST19.spreadElement(AST19.callExpression(build_session_object, [event_id]))
175863
175989
  ]);
175864
175990
  }
175865
175991
  function process_root_layout_script(page) {
175866
175992
  add_load_return(page, (event_id) => [
175867
- AST18.spreadElement(AST18.memberExpression(event_id, AST18.identifier("data")))
175993
+ AST19.spreadElement(AST19.memberExpression(event_id, AST19.identifier("data")))
175868
175994
  ]);
175869
175995
  }
175870
175996
  function add_load_return(page, properties) {
@@ -175876,50 +176002,78 @@ function add_load_return(page, properties) {
175876
176002
  if (return_statement_index !== -1) {
175877
176003
  return_statement = body.body[return_statement_index];
175878
176004
  } else {
175879
- return_statement = AST18.returnStatement(AST18.objectExpression([]));
176005
+ return_statement = AST19.returnStatement(AST19.objectExpression([]));
175880
176006
  body.body.push(return_statement);
175881
- return_statement_index = body.body.length - 1;
175882
176007
  }
175883
- const local_return_var = AST18.identifier("__houdini__vite__plugin__return__value__");
175884
- body.body[return_statement_index] = AST18.variableDeclaration("const", [
175885
- AST18.variableDeclarator(local_return_var, return_statement.argument)
175886
- ]);
175887
- body.body.splice(
175888
- return_statement_index + 1,
175889
- 0,
175890
- AST18.returnStatement(
175891
- AST18.objectExpression([...properties(event_id), AST18.spreadElement(local_return_var)])
175892
- )
175893
- );
176008
+ return walk(body, {
176009
+ enter(node) {
176010
+ if (node.type === "ReturnStatement") {
176011
+ const returnedValue = node.argument;
176012
+ this.replace(
176013
+ AST19.returnStatement(
176014
+ AST19.objectExpression([
176015
+ ...properties(event_id),
176016
+ AST19.spreadElement(returnedValue ?? AST19.objectExpression([]))
176017
+ ])
176018
+ )
176019
+ );
176020
+ }
176021
+ }
176022
+ });
175894
176023
  });
175895
176024
  }
175896
176025
  function modify_load(page, cb) {
175897
- let load_fn = find_exported_fn(page.script.body, "load");
175898
- let event_id = AST18.identifier("event");
175899
- let body = AST18.blockStatement([]);
176026
+ let exported = find_exported_fn(page.script.body, "load");
176027
+ let event_id = AST19.identifier("event");
176028
+ let load_fn = exported?.declaration || null;
176029
+ let body = AST19.blockStatement([]);
175900
176030
  if (load_fn?.type === "ArrowFunctionExpression") {
175901
176031
  if (load_fn.body.type === "BlockStatement") {
175902
176032
  body = load_fn.body;
175903
176033
  } else {
175904
- body = AST18.blockStatement([AST18.returnStatement(load_fn.body)]);
176034
+ body = AST19.blockStatement([AST19.returnStatement(load_fn.body)]);
175905
176035
  load_fn.body = body;
175906
176036
  }
175907
- } else if (load_fn) {
176037
+ } else if (load_fn && "body" in load_fn) {
175908
176038
  body = load_fn.body;
175909
176039
  }
175910
176040
  if (!load_fn) {
175911
- load_fn = AST18.functionDeclaration(
175912
- AST18.identifier("load"),
176041
+ load_fn = AST19.functionDeclaration(
176042
+ AST19.identifier("load"),
175913
176043
  [event_id],
175914
- AST18.blockStatement([])
176044
+ AST19.blockStatement([])
175915
176045
  );
175916
176046
  load_fn.async = true;
175917
176047
  page.script.body.splice(
175918
176048
  find_insert_index(page.script),
175919
176049
  0,
175920
- AST18.exportNamedDeclaration(load_fn)
176050
+ AST19.exportNamedDeclaration(load_fn)
175921
176051
  );
175922
176052
  body = load_fn.body;
176053
+ } else if (load_fn.type === "CallExpression" || load_fn.type === "Identifier") {
176054
+ const exportStatement = exported?.export;
176055
+ if (!exportStatement) {
176056
+ return;
176057
+ }
176058
+ const intermediateID = AST19.identifier("houdini__intermediate__load__");
176059
+ page.script.body.push(
176060
+ AST19.variableDeclaration("const", [AST19.variableDeclarator(intermediateID, load_fn)])
176061
+ );
176062
+ const newLoad = AST19.arrowFunctionExpression(
176063
+ [AST19.identifier("event")],
176064
+ AST19.blockStatement([
176065
+ AST19.variableDeclaration("const", [
176066
+ AST19.variableDeclarator(
176067
+ AST19.identifier("result"),
176068
+ AST19.callExpression(intermediateID, [AST19.identifier("event")])
176069
+ )
176070
+ ]),
176071
+ AST19.returnStatement(AST19.identifier("result"))
176072
+ ])
176073
+ );
176074
+ exportStatement.declaration.declarations[0].init = newLoad;
176075
+ load_fn = newLoad;
176076
+ body = newLoad.body;
175923
176077
  } else {
175924
176078
  if (load_fn.params.length === 0) {
175925
176079
  load_fn.params.push(event_id);
@@ -175929,7 +176083,7 @@ function modify_load(page, cb) {
175929
176083
  const pattern = load_fn.params[0];
175930
176084
  load_fn.params[0] = event_id;
175931
176085
  body.body.unshift(
175932
- AST18.variableDeclaration("let", [AST18.variableDeclarator(pattern, event_id)])
176086
+ AST19.variableDeclaration("let", [AST19.variableDeclarator(pattern, event_id)])
175933
176087
  );
175934
176088
  } else {
175935
176089
  throw new Error(
@@ -175937,7 +176091,7 @@ function modify_load(page, cb) {
175937
176091
  );
175938
176092
  }
175939
176093
  }
175940
- cb(body, event_id);
176094
+ load_fn.body = cb(body, event_id);
175941
176095
  }
175942
176096
 
175943
176097
  // src/plugin/transforms/kit/index.ts
@@ -175950,8 +176104,8 @@ async function SvelteKitProcessor(config, page) {
175950
176104
  }
175951
176105
 
175952
176106
  // src/plugin/transforms/tags.ts
175953
- var recast19 = __toESM(require_main4(), 1);
175954
- var AST19 = recast19.types.builders;
176107
+ var recast20 = __toESM(require_main4(), 1);
176108
+ var AST20 = recast20.types.builders;
175955
176109
  async function GraphQLTagProcessor(config, page) {
175956
176110
  await find_graphql(config, page.script, {
175957
176111
  dependency: page.watch_file,
@@ -175959,7 +176113,7 @@ async function GraphQLTagProcessor(config, page) {
175959
176113
  const { node, parsedDocument } = tag2;
175960
176114
  const operation = config.extractDefinition(parsedDocument);
175961
176115
  const { id: id2 } = store_import({ page, artifact: { name: operation.name.value } });
175962
- node.replaceWith(AST19.newExpression(id2, []));
176116
+ node.replaceWith(AST20.newExpression(id2, []));
175963
176117
  }
175964
176118
  });
175965
176119
  }
@@ -175978,7 +176132,7 @@ async function apply_transforms(framework, page) {
175978
176132
  position = res.position;
175979
176133
  useRunes = res.useRunes;
175980
176134
  } else {
175981
- script = recast20.types.builders.program([]);
176135
+ script = recast21.types.builders.program([]);
175982
176136
  position = { start: 0, end: 0 };
175983
176137
  }
175984
176138
  } else {