@my-react/react-reconciler-compact 0.0.12 → 0.0.14

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.
Files changed (34) hide show
  1. package/dist/cjs/index.development.js +922 -730
  2. package/dist/cjs/index.production.js +755 -660
  3. package/dist/esm/index.mjs +1676 -1394
  4. package/dist/types/api/append.d.ts.map +1 -1
  5. package/dist/types/api/create.d.ts.map +1 -1
  6. package/dist/types/api/position.d.ts.map +1 -1
  7. package/dist/types/api/ref.d.ts.map +1 -1
  8. package/dist/types/api/remove.d.ts.map +1 -1
  9. package/dist/types/api/update.d.ts.map +1 -1
  10. package/dist/types/config.d.ts +5 -0
  11. package/dist/types/config.d.ts.map +1 -0
  12. package/dist/types/constants.d.ts.map +1 -1
  13. package/dist/types/devtool.d.ts.map +1 -1
  14. package/dist/types/{dispatchFiber.d.ts → dispatch-fiber.d.ts} +1 -1
  15. package/dist/types/dispatch-fiber.d.ts.map +1 -0
  16. package/dist/types/{dispatchMap.d.ts → dispatch-map.d.ts} +1 -1
  17. package/dist/types/dispatch-map.d.ts.map +1 -0
  18. package/dist/types/{dispatchMount.d.ts → dispatch-mount.d.ts} +1 -1
  19. package/dist/types/dispatch-mount.d.ts.map +1 -0
  20. package/dist/types/{dispatchUpdate.d.ts → dispatch-update.d.ts} +1 -1
  21. package/dist/types/dispatch-update.d.ts.map +1 -0
  22. package/dist/types/dispatch.d.ts +34 -211
  23. package/dist/types/dispatch.d.ts.map +1 -1
  24. package/dist/types/feature.d.ts +35 -211
  25. package/dist/types/feature.d.ts.map +1 -1
  26. package/dist/types/hmr.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +1 -0
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/types/portal.d.ts.map +1 -1
  30. package/package.json +5 -5
  31. package/dist/types/dispatchFiber.d.ts.map +0 -1
  32. package/dist/types/dispatchMap.d.ts.map +0 -1
  33. package/dist/types/dispatchMount.d.ts.map +0 -1
  34. package/dist/types/dispatchUpdate.d.ts.map +0 -1
@@ -108,7 +108,7 @@ var hasRequiredIndex_development;
108
108
  function requireIndex_development () {
109
109
  if (hasRequiredIndex_development) return index_development;
110
110
  hasRequiredIndex_development = 1;
111
- (function (exports) {
111
+ (function (exports$1) {
112
112
 
113
113
  var react = require$$0;
114
114
 
@@ -153,6 +153,10 @@ function requireIndex_development () {
153
153
  var Comment = Symbol.for("react.comment");
154
154
  var Activity = Symbol.for("react.activity");
155
155
  var Profiler = Symbol.for("react.profiler");
156
+ /**
157
+ * Symbol for server reference type
158
+ */
159
+ var SERVER_REFERENCE_SYMBOL = Symbol.for("react.server.reference");
156
160
 
157
161
  function isObject(target) {
158
162
  return typeof target === "object" && target !== null;
@@ -348,8 +352,10 @@ function requireIndex_development () {
348
352
  return ListTreeNode;
349
353
  }());
350
354
  var ListTree = /** @class */ (function () {
351
- function ListTree() {
355
+ function ListTree(max) {
352
356
  this.length = 0;
357
+ this.maxLength = Infinity;
358
+ this.maxLength = max || Infinity;
353
359
  var _stickyHead = null;
354
360
  Object.defineProperty(this, "stickyHead", {
355
361
  get: function () {
@@ -388,6 +394,9 @@ function requireIndex_development () {
388
394
  });
389
395
  }
390
396
  ListTree.prototype.push = function (node) {
397
+ while (this.length >= this.maxLength) {
398
+ this.pop();
399
+ }
391
400
  var listNode = new ListTreeNode(node);
392
401
  this.length++;
393
402
  if (!this.foot) {
@@ -405,6 +414,7 @@ function requireIndex_development () {
405
414
  var node_1 = this.stickyFoot;
406
415
  this.push(node_1.value);
407
416
  this.stickyFoot = null;
417
+ this.length--;
408
418
  }
409
419
  else {
410
420
  this.length++;
@@ -417,6 +427,7 @@ function requireIndex_development () {
417
427
  var node_2 = this.stickyHead;
418
428
  this.unshift(node_2.value);
419
429
  this.stickyHead = null;
430
+ this.length--;
420
431
  }
421
432
  else {
422
433
  this.length++;
@@ -435,6 +446,9 @@ function requireIndex_development () {
435
446
  }
436
447
  };
437
448
  ListTree.prototype.unshift = function (node) {
449
+ while (this.length >= this.maxLength) {
450
+ this.shift();
451
+ }
438
452
  var listNode = new ListTreeNode(node);
439
453
  this.length++;
440
454
  if (!this.head) {
@@ -452,6 +466,7 @@ function requireIndex_development () {
452
466
  var node_3 = this.stickyHead;
453
467
  this.unshift(node_3.value);
454
468
  this.stickyHead = null;
469
+ this.length--;
455
470
  }
456
471
  else {
457
472
  this.length++;
@@ -464,6 +479,7 @@ function requireIndex_development () {
464
479
  var node_4 = this.stickyFoot;
465
480
  this.push(node_4.value);
466
481
  this.stickyFoot = null;
482
+ this.length--;
467
483
  }
468
484
  else {
469
485
  this.length++;
@@ -615,7 +631,7 @@ function requireIndex_development () {
615
631
  return newList;
616
632
  };
617
633
  ListTree.prototype.clone = function () {
618
- var newList = new ListTree();
634
+ var newList = new ListTree(this.maxLength);
619
635
  this.listToFoot(function (v) { return newList.push(v); });
620
636
  return newList;
621
637
  };
@@ -743,7 +759,7 @@ function requireIndex_development () {
743
759
  var enableValidMyReactElement = react.createRef(false);
744
760
  var enableLogForCurrentFlowIsRunning = react.createRef(false);
745
761
 
746
- exports.NODE_TYPE = void 0;
762
+ exports$1.NODE_TYPE = void 0;
747
763
  (function (NODE_TYPE) {
748
764
  NODE_TYPE[NODE_TYPE["__initial__"] = 0] = "__initial__";
749
765
  NODE_TYPE[NODE_TYPE["__class__"] = 1] = "__class__";
@@ -769,24 +785,25 @@ function requireIndex_development () {
769
785
  NODE_TYPE[NODE_TYPE["__scopeLazy__"] = 1048576] = "__scopeLazy__";
770
786
  NODE_TYPE[NODE_TYPE["__scopeSuspense__"] = 2097152] = "__scopeSuspense__";
771
787
  NODE_TYPE[NODE_TYPE["__activity__"] = 4194304] = "__activity__";
772
- })(exports.NODE_TYPE || (exports.NODE_TYPE = {}));
788
+ NODE_TYPE[NODE_TYPE["__serverComponent__"] = 8388608] = "__serverComponent__";
789
+ })(exports$1.NODE_TYPE || (exports$1.NODE_TYPE = {}));
773
790
 
774
791
  var enableSyncFlush$1 = react.__my_react_shared__.enableSyncFlush;
775
792
  /**
776
793
  * @deprecated
777
794
  */
778
- exports.syncFlush = false;
795
+ exports$1.syncFlush = false;
779
796
  /**
780
797
  * @deprecated
781
798
  */
782
799
  var beforeSyncFlush = function () {
783
- exports.syncFlush = true;
800
+ exports$1.syncFlush = true;
784
801
  };
785
802
  /**
786
803
  * @deprecated
787
804
  */
788
805
  var afterSyncFlush = function () {
789
- exports.syncFlush = false;
806
+ exports$1.syncFlush = false;
790
807
  };
791
808
  var stack = [enableSyncFlush$1.current];
792
809
  var beforeSyncUpdate = function () {
@@ -1018,7 +1035,7 @@ function requireIndex_development () {
1018
1035
  if (owner) {
1019
1036
  var ownerFiber = owner;
1020
1037
  var ownerFiberElementType = ownerFiber.elementType;
1021
- if (include(ownerFiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1038
+ if (include(ownerFiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1022
1039
  var ownerElement = ownerFiber._debugElement;
1023
1040
  var typedOwnerElementType = ownerFiberElementType;
1024
1041
  var name_1 = typedOwnerElementType.displayName || typedOwnerElementType.name;
@@ -1030,48 +1047,50 @@ function requireIndex_development () {
1030
1047
  }
1031
1048
  };
1032
1049
  var shouldIncludeLog = function (fiber) {
1033
- if (include(fiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1050
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1034
1051
  return true;
1035
1052
  }
1036
1053
  return false;
1037
1054
  };
1038
1055
  var getFiberTagName = function (fiber) {
1039
1056
  var tag = [];
1040
- if (fiber.type & exports.NODE_TYPE.__memo__) {
1057
+ if (fiber.type & exports$1.NODE_TYPE.__memo__) {
1041
1058
  tag.push("memo");
1042
1059
  }
1043
- if (fiber.type & exports.NODE_TYPE.__forwardRef__) {
1060
+ if (fiber.type & exports$1.NODE_TYPE.__forwardRef__) {
1044
1061
  tag.push("forwardRef");
1045
1062
  }
1046
- if (fiber.type & exports.NODE_TYPE.__lazy__) {
1063
+ if (fiber.type & exports$1.NODE_TYPE.__lazy__) {
1047
1064
  tag.push("lazy");
1048
1065
  }
1049
- if (fiber.type & exports.NODE_TYPE.__fragment__ && fiber.pendingProps["wrap"]) {
1066
+ if (fiber.type & exports$1.NODE_TYPE.__fragment__ && fiber.pendingProps["wrap"]) {
1050
1067
  tag.push("auto-wrap");
1051
1068
  }
1052
1069
  return tag.join("-");
1053
1070
  };
1054
1071
  var getPlainFiberName = function (fiber) {
1055
1072
  var typedFiber = fiber;
1056
- if (fiber.type & exports.NODE_TYPE.__provider__) {
1073
+ if (fiber.type & exports$1.NODE_TYPE.__provider__) {
1057
1074
  var typedElementType = fiber.elementType;
1058
1075
  var name_2 = typedElementType.Context.displayName;
1059
1076
  return "".concat(name_2 || "Context", ".Provider");
1060
1077
  }
1061
- if (fiber.type & exports.NODE_TYPE.__context__) {
1078
+ if (fiber.type & exports$1.NODE_TYPE.__context__) {
1062
1079
  var typedElementType = fiber.elementType;
1063
1080
  var name_3 = typedElementType.displayName;
1064
1081
  return "".concat(name_3 || "Context");
1065
1082
  }
1066
- if (fiber.type & exports.NODE_TYPE.__consumer__) {
1083
+ if (fiber.type & exports$1.NODE_TYPE.__consumer__) {
1067
1084
  var typedElementType = fiber.elementType;
1068
1085
  var name_4 = typedElementType.Context.displayName;
1069
1086
  return "".concat(name_4 || "Context", ".Consumer");
1070
1087
  }
1071
- if (fiber.type & exports.NODE_TYPE.__lazy__) {
1088
+ if (fiber.type & exports$1.NODE_TYPE.__lazy__) {
1072
1089
  var typedElementType = fiber.elementType;
1073
1090
  var typedRender = typedElementType === null || typedElementType === void 0 ? void 0 : typedElementType.render;
1074
1091
  var name_5 = (typedRender === null || typedRender === void 0 ? void 0 : typedRender.displayName) || (typedRender === null || typedRender === void 0 ? void 0 : typedRender.name) || "";
1092
+ var loader = typedElementType.loader;
1093
+ name_5 = loader["displayName"] || name_5;
1075
1094
  {
1076
1095
  var element = typedFiber._debugElement;
1077
1096
  // may be a Suspense element
@@ -1080,31 +1099,31 @@ function requireIndex_development () {
1080
1099
  }
1081
1100
  return "".concat(name_5 || "Anonymous");
1082
1101
  }
1083
- if (fiber.type & exports.NODE_TYPE.__portal__)
1102
+ if (fiber.type & exports$1.NODE_TYPE.__portal__)
1084
1103
  return "Portal";
1085
- if (fiber.type & exports.NODE_TYPE.__null__)
1104
+ if (fiber.type & exports$1.NODE_TYPE.__null__)
1086
1105
  return "Null";
1087
- if (fiber.type & exports.NODE_TYPE.__empty__)
1106
+ if (fiber.type & exports$1.NODE_TYPE.__empty__)
1088
1107
  return "Empty";
1089
- if (fiber.type & exports.NODE_TYPE.__scope__)
1108
+ if (fiber.type & exports$1.NODE_TYPE.__scope__)
1090
1109
  return "Scope";
1091
- if (fiber.type & exports.NODE_TYPE.__scopeLazy__)
1110
+ if (fiber.type & exports$1.NODE_TYPE.__scopeLazy__)
1092
1111
  return "ScopeLazy";
1093
- if (fiber.type & exports.NODE_TYPE.__scopeSuspense__)
1112
+ if (fiber.type & exports$1.NODE_TYPE.__scopeSuspense__)
1094
1113
  return "ScopeSuspense";
1095
- if (fiber.type & exports.NODE_TYPE.__strict__)
1114
+ if (fiber.type & exports$1.NODE_TYPE.__strict__)
1096
1115
  return "Strict";
1097
- if (fiber.type & exports.NODE_TYPE.__profiler__)
1116
+ if (fiber.type & exports$1.NODE_TYPE.__profiler__)
1098
1117
  return "Profiler";
1099
- if (fiber.type & exports.NODE_TYPE.__suspense__)
1118
+ if (fiber.type & exports$1.NODE_TYPE.__suspense__)
1100
1119
  return "Suspense";
1101
- if (fiber.type & exports.NODE_TYPE.__comment__)
1120
+ if (fiber.type & exports$1.NODE_TYPE.__comment__)
1102
1121
  return "Comment";
1103
- if (fiber.type & exports.NODE_TYPE.__root__)
1122
+ if (fiber.type & exports$1.NODE_TYPE.__root__)
1104
1123
  return "Root";
1105
- if (fiber.type & exports.NODE_TYPE.__fragment__)
1124
+ if (fiber.type & exports$1.NODE_TYPE.__fragment__)
1106
1125
  return "Fragment";
1107
- if (fiber.type & exports.NODE_TYPE.__text__)
1126
+ if (fiber.type & exports$1.NODE_TYPE.__text__)
1108
1127
  return "text";
1109
1128
  if (typeof fiber.elementType === "string")
1110
1129
  return "".concat(fiber.elementType);
@@ -1169,7 +1188,7 @@ function requireIndex_development () {
1169
1188
  while (temp) {
1170
1189
  res ? (res += "\n".concat(preString).concat(getFiberNodeNameWithFiber(temp))) : (res = "".concat(preString).concat(getFiberNodeNameWithFiber(temp)));
1171
1190
  var isMount = temp._debugIsMount;
1172
- var isPlain = temp.type & exports.NODE_TYPE.__plain__;
1191
+ var isPlain = temp.type & exports$1.NODE_TYPE.__plain__;
1173
1192
  arr.push("color: white;background-color: ".concat(isMount ? (isPlain ? typeColor.plain : typeColor.normal) : typeColor.unmount, "; border-radius: 2px; padding: 1px 5px; margin: 1px 0px"));
1174
1193
  arr.push("");
1175
1194
  arr.push(temp);
@@ -1244,7 +1263,7 @@ function requireIndex_development () {
1244
1263
  return type;
1245
1264
  };
1246
1265
  var getTypeFromElementNode = function (element) {
1247
- var nodeType = exports.NODE_TYPE.__initial__;
1266
+ var nodeType = exports$1.NODE_TYPE.__initial__;
1248
1267
  if (enableValidMyReactElement.current) {
1249
1268
  checkIsMyReactElement(element);
1250
1269
  }
@@ -1256,17 +1275,17 @@ function requireIndex_development () {
1256
1275
  {
1257
1276
  devWarn("[@my-react/react] invalid object element type \"".concat(JSON.stringify(element), "\""));
1258
1277
  }
1259
- nodeType = merge(nodeType, exports.NODE_TYPE.__empty__);
1278
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__empty__);
1260
1279
  }
1261
1280
  else if (element === null || element === undefined || typeof element === "boolean" || typeof element === "function" || element === "") {
1262
- nodeType = merge(nodeType, exports.NODE_TYPE.__null__);
1281
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__null__);
1263
1282
  }
1264
1283
  else {
1265
1284
  // text element
1266
1285
  return {
1267
1286
  key: null,
1268
1287
  ref: null,
1269
- nodeType: exports.NODE_TYPE.__text__,
1288
+ nodeType: exports$1.NODE_TYPE.__text__,
1270
1289
  elementType: String(element),
1271
1290
  pendingProps: emptyProps$1,
1272
1291
  finalElement: element,
@@ -1278,7 +1297,7 @@ function requireIndex_development () {
1278
1297
  };
1279
1298
  var getTypeFromElement = function (element) {
1280
1299
  var _a, _b, _c, _d, _e, _f, _g;
1281
- var nodeType = exports.NODE_TYPE.__initial__;
1300
+ var nodeType = exports$1.NODE_TYPE.__initial__;
1282
1301
  var elementType = element.type;
1283
1302
  var finalElement = element;
1284
1303
  var pendingProps = element.props;
@@ -1295,108 +1314,108 @@ function requireIndex_development () {
1295
1314
  var typedElementType = elementType;
1296
1315
  switch (typedElementType[TYPEKEY]) {
1297
1316
  case Provider:
1298
- nodeType = merge(nodeType, exports.NODE_TYPE.__provider__);
1317
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__provider__);
1299
1318
  break;
1300
1319
  // support react 19 context api
1301
1320
  case Context:
1302
- nodeType = merge(nodeType, exports.NODE_TYPE.__context__);
1321
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__context__);
1303
1322
  break;
1304
1323
  case Consumer:
1305
- nodeType = merge(nodeType, exports.NODE_TYPE.__consumer__);
1324
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__consumer__);
1306
1325
  break;
1307
1326
  case Memo:
1308
- nodeType = merge(nodeType, exports.NODE_TYPE.__memo__);
1327
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__memo__);
1309
1328
  elementType = typedElementType.render;
1310
1329
  break;
1311
1330
  case ForwardRef:
1312
- nodeType = merge(nodeType, exports.NODE_TYPE.__forwardRef__);
1331
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__forwardRef__);
1313
1332
  elementType = typedElementType.render;
1314
1333
  break;
1315
1334
  case Lazy:
1316
- nodeType = merge(nodeType, exports.NODE_TYPE.__lazy__);
1335
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__lazy__);
1317
1336
  break;
1318
1337
  default:
1319
1338
  throw new Error("[@my-react/react] invalid object element type \"".concat((_e = typedElementType[TYPEKEY]) === null || _e === void 0 ? void 0 : _e.toString(), "\""));
1320
1339
  }
1321
1340
  if (typeof elementType === "object") {
1322
1341
  if (elementType[TYPEKEY] === ForwardRef) {
1323
- nodeType = merge(nodeType, exports.NODE_TYPE.__forwardRef__);
1342
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__forwardRef__);
1324
1343
  elementType = elementType.render;
1325
1344
  }
1326
1345
  if (elementType[TYPEKEY] === Provider) {
1327
- nodeType = merge(nodeType, exports.NODE_TYPE.__provider__);
1346
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__provider__);
1328
1347
  }
1329
1348
  if (elementType[TYPEKEY] === Context) {
1330
- nodeType = merge(nodeType, exports.NODE_TYPE.__context__);
1349
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__context__);
1331
1350
  }
1332
1351
  if (elementType[TYPEKEY] === Consumer) {
1333
- nodeType = merge(nodeType, exports.NODE_TYPE.__consumer__);
1352
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__consumer__);
1334
1353
  }
1335
1354
  }
1336
1355
  if (typeof elementType === "function") {
1337
1356
  if ((_f = elementType.prototype) === null || _f === void 0 ? void 0 : _f.isMyReactComponent) {
1338
- nodeType = merge(nodeType, exports.NODE_TYPE.__class__);
1357
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__class__);
1339
1358
  }
1340
1359
  else {
1341
- nodeType = merge(nodeType, exports.NODE_TYPE.__function__);
1360
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__function__);
1342
1361
  }
1343
1362
  }
1344
1363
  }
1345
1364
  else if (typeof elementType === "function") {
1346
1365
  if ((_g = elementType.prototype) === null || _g === void 0 ? void 0 : _g.isMyReactComponent) {
1347
- nodeType = merge(nodeType, exports.NODE_TYPE.__class__);
1366
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__class__);
1348
1367
  }
1349
1368
  else {
1350
- nodeType = merge(nodeType, exports.NODE_TYPE.__function__);
1369
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__function__);
1351
1370
  }
1352
1371
  }
1353
1372
  else if (typeof elementType === "symbol") {
1354
1373
  switch (elementType) {
1355
1374
  case Root:
1356
- nodeType = merge(nodeType, exports.NODE_TYPE.__root__);
1375
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__root__);
1357
1376
  break;
1358
1377
  case Fragment:
1359
- nodeType = merge(nodeType, exports.NODE_TYPE.__fragment__);
1378
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__fragment__);
1360
1379
  break;
1361
1380
  case Strict:
1362
- nodeType = merge(nodeType, exports.NODE_TYPE.__strict__);
1381
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__strict__);
1363
1382
  break;
1364
1383
  case Suspense:
1365
- nodeType = merge(nodeType, exports.NODE_TYPE.__suspense__);
1384
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__suspense__);
1366
1385
  break;
1367
1386
  case Scope:
1368
- nodeType = merge(nodeType, exports.NODE_TYPE.__scope__);
1387
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__scope__);
1369
1388
  break;
1370
1389
  case ScopeLazy:
1371
- nodeType = merge(nodeType, exports.NODE_TYPE.__scopeLazy__);
1390
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__scopeLazy__);
1372
1391
  break;
1373
1392
  case ScopeSuspense:
1374
- nodeType = merge(nodeType, exports.NODE_TYPE.__scopeSuspense__);
1393
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__scopeSuspense__);
1375
1394
  break;
1376
1395
  case Comment:
1377
- nodeType = merge(nodeType, exports.NODE_TYPE.__comment__);
1396
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__comment__);
1378
1397
  break;
1379
1398
  case Portal:
1380
- nodeType = merge(nodeType, exports.NODE_TYPE.__portal__);
1399
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__portal__);
1381
1400
  break;
1382
1401
  case Profiler:
1383
- nodeType = merge(nodeType, exports.NODE_TYPE.__profiler__);
1402
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__profiler__);
1384
1403
  break;
1385
1404
  case Activity:
1386
- nodeType = merge(nodeType, exports.NODE_TYPE.__activity__);
1405
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__activity__);
1387
1406
  break;
1388
1407
  default:
1389
1408
  throw new Error("[@my-react/react] invalid symbol element type \"".concat(elementType === null || elementType === void 0 ? void 0 : elementType.toString(), "\""));
1390
1409
  }
1391
1410
  }
1392
1411
  else if (typeof elementType === "string" && elementType !== "") {
1393
- nodeType = merge(nodeType, exports.NODE_TYPE.__plain__);
1412
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__plain__);
1394
1413
  }
1395
1414
  else {
1396
1415
  {
1397
1416
  devWarn("[@my-react/react] invalid element type \"".concat(elementType === null || elementType === void 0 ? void 0 : elementType.toString(), "\""));
1398
1417
  }
1399
- nodeType = merge(nodeType, exports.NODE_TYPE.__empty__);
1418
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__empty__);
1400
1419
  }
1401
1420
  return { key: key, ref: ref, nodeType: nodeType, elementType: elementType, pendingProps: pendingProps, finalElement: finalElement };
1402
1421
  };
@@ -1414,7 +1433,7 @@ function requireIndex_development () {
1414
1433
  }
1415
1434
  };
1416
1435
  var setRefreshTypeMap = function (fiber) {
1417
- if (include(fiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1436
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1418
1437
  var elementType = fiber.elementType;
1419
1438
  var exist = typeToFibersMap.get(elementType) || new Set();
1420
1439
  exist.add(fiber);
@@ -1603,7 +1622,7 @@ function requireIndex_development () {
1603
1622
  var _a = getTypeFromElementNode(element), nodeType = _a.nodeType, elementType = _a.elementType;
1604
1623
  if (p.type === nodeType) {
1605
1624
  if (react.isValidElement(element)) {
1606
- if (enableHMRForDev.current && include(nodeType, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1625
+ if (enableHMRForDev.current && include(nodeType, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1607
1626
  // type error
1608
1627
  return Object.is(getCurrentTypeFromRefresh(p.elementType), getCurrentTypeFromRefresh(elementType));
1609
1628
  }
@@ -1626,7 +1645,7 @@ function requireIndex_development () {
1626
1645
  if (react.isValidElement(element)) {
1627
1646
  var typedExistElement = p;
1628
1647
  var typedIncomingElement = element;
1629
- if (enableHMRForDev.current && include(existElementType.nodeType, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1648
+ if (enableHMRForDev.current && include(existElementType.nodeType, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1630
1649
  return Object.is(getCurrentTypeFromRefresh(typedIncomingElement.type), getCurrentTypeFromRefresh(typedExistElement.type));
1631
1650
  }
1632
1651
  else {
@@ -1835,7 +1854,7 @@ function requireIndex_development () {
1835
1854
  var _a;
1836
1855
  var parent = fiber.parent;
1837
1856
  while (parent) {
1838
- if (include(parent.type, exports.NODE_TYPE.__suspense__)) {
1857
+ if (include(parent.type, exports$1.NODE_TYPE.__suspense__)) {
1839
1858
  return (_a = parent.pendingProps) === null || _a === void 0 ? void 0 : _a["fallback"];
1840
1859
  }
1841
1860
  parent = parent.parent;
@@ -1845,7 +1864,7 @@ function requireIndex_development () {
1845
1864
  var defaultResolveSuspenseFiber = function (fiber) {
1846
1865
  var parent = fiber.parent;
1847
1866
  while (parent) {
1848
- if (include(parent.type, exports.NODE_TYPE.__suspense__)) {
1867
+ if (include(parent.type, exports$1.NODE_TYPE.__suspense__)) {
1849
1868
  return parent;
1850
1869
  }
1851
1870
  parent = parent.parent;
@@ -1854,7 +1873,7 @@ function requireIndex_development () {
1854
1873
  };
1855
1874
  var defaultResolveAliveSuspenseFiber = function (fiber) {
1856
1875
  while (fiber) {
1857
- if (include(fiber.type, exports.NODE_TYPE.__suspense__) && exclude(fiber.state, STATE_TYPE.__unmount__)) {
1876
+ if (include(fiber.type, exports$1.NODE_TYPE.__suspense__) && exclude(fiber.state, STATE_TYPE.__unmount__)) {
1858
1877
  return fiber;
1859
1878
  }
1860
1879
  fiber = fiber.parent;
@@ -2016,7 +2035,6 @@ function requireIndex_development () {
2016
2035
  case 0:
2017
2036
  node = renderDispatch.pendingSuspenseFiberArray.uniShift();
2018
2037
  suspenseField = getInstanceFieldByInstance(node.instance);
2019
- renderDispatch.pendingSuspenseFiberArray.clear();
2020
2038
  list = suspenseField.asyncLoadList.getAll();
2021
2039
  return [4 /*yield*/, Promise.all(list.map(function (item) { return __awaiter(void 0, void 0, void 0, function () {
2022
2040
  var set;
@@ -2101,8 +2119,9 @@ function requireIndex_development () {
2101
2119
  }); };
2102
2120
  var processAsyncLoadListOnSyncMount = function (renderDispatch) {
2103
2121
  var _a;
2104
- if ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2122
+ var _loop_2 = function () {
2105
2123
  var allPendingSuspenseFiberArray = renderDispatch.pendingSuspenseFiberArray.getAll();
2124
+ renderDispatch.pendingSuspenseFiberArray.clear();
2106
2125
  if (renderDispatch.enableAsyncLoad) {
2107
2126
  var allField_1 = [];
2108
2127
  allPendingSuspenseFiberArray.forEach(function (node) {
@@ -2113,7 +2132,9 @@ function requireIndex_development () {
2113
2132
  return typeof item.status !== "string";
2114
2133
  }
2115
2134
  else {
2116
- return !item._loading && !item._loaded && !item._error;
2135
+ // return !item._loading && !item._loaded && !item._error;
2136
+ // return !item._loading;
2137
+ return true;
2117
2138
  }
2118
2139
  });
2119
2140
  if (allPendingLoadArray.length) {
@@ -2161,11 +2182,13 @@ function requireIndex_development () {
2161
2182
  // TODO use hide tree to improve
2162
2183
  mountLoopAll(renderDispatch, root);
2163
2184
  allField_1.forEach(function (field) { return (field.isHidden = false); });
2164
- renderDispatch.pendingSuspenseFiberArray.clear();
2165
2185
  }
2166
2186
  else {
2167
2187
  throw new Error("[@my-react/reconciler] should not process async load list on sync mount without enableAsyncLoad, you may use a wrong renderDispatch instance");
2168
2188
  }
2189
+ };
2190
+ while ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2191
+ _loop_2();
2169
2192
  }
2170
2193
  if (enableSuspenseRoot$3.current) {
2171
2194
  var suspenseField_2 = getInstanceFieldByInstance(renderDispatch);
@@ -2228,13 +2251,13 @@ function requireIndex_development () {
2228
2251
 
2229
2252
  var enableSuspenseRoot$2 = react.__my_react_shared__.enableSuspenseRoot;
2230
2253
  var currentScheduler$d = react.__my_react_internal__.currentScheduler;
2231
- exports.updateTypeEnum = void 0;
2254
+ exports$1.updateTypeEnum = void 0;
2232
2255
  (function (updateTypeEnum) {
2233
2256
  updateTypeEnum[updateTypeEnum["syncFromRoot"] = 0] = "syncFromRoot";
2234
2257
  updateTypeEnum[updateTypeEnum["syncFromTrigger"] = 1] = "syncFromTrigger";
2235
2258
  updateTypeEnum[updateTypeEnum["concurrentFromRoot"] = 2] = "concurrentFromRoot";
2236
2259
  updateTypeEnum[updateTypeEnum["concurrentFromTrigger"] = 3] = "concurrentFromTrigger";
2237
- })(exports.updateTypeEnum || (exports.updateTypeEnum = {}));
2260
+ })(exports$1.updateTypeEnum || (exports$1.updateTypeEnum = {}));
2238
2261
  var triggerFiberUpdateListener = function (renderDispatch, fiber) {
2239
2262
  safeCallWithCurrentFiber({
2240
2263
  fiber: fiber,
@@ -2275,8 +2298,9 @@ function requireIndex_development () {
2275
2298
  };
2276
2299
  var processAsyncLoadListOnUpdate = function (renderDispatch) {
2277
2300
  var _a;
2278
- if ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2301
+ var _loop_1 = function () {
2279
2302
  var allPendingSuspenseFiberArray = renderDispatch.pendingSuspenseFiberArray.getAll();
2303
+ renderDispatch.pendingSuspenseFiberArray.clear();
2280
2304
  if (renderDispatch.enableAsyncLoad) {
2281
2305
  var allField_1 = [];
2282
2306
  allPendingSuspenseFiberArray.forEach(function (node) {
@@ -2287,7 +2311,9 @@ function requireIndex_development () {
2287
2311
  return typeof item.status !== "string";
2288
2312
  }
2289
2313
  else {
2290
- return !item._loading && !item._loaded && !item._error;
2314
+ // return !item._loading && !item._loaded && !item._error;
2315
+ // return !item._loading;
2316
+ return true;
2291
2317
  }
2292
2318
  });
2293
2319
  if (allPendingLoadArray.length) {
@@ -2336,20 +2362,62 @@ function requireIndex_development () {
2336
2362
  // TODO use hide tree to improve
2337
2363
  mountLoopAll(renderDispatch, root);
2338
2364
  allField_1.forEach(function (field) { return (field.isHidden = false); });
2339
- renderDispatch.pendingSuspenseFiberArray.clear();
2340
2365
  }
2341
2366
  else {
2342
2367
  throw new Error("[@my-react/reconciler] should not process async load list on sync mount without enableAsyncLoad, you may use a wrong renderDispatch instance");
2343
2368
  }
2369
+ };
2370
+ while ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2371
+ _loop_1();
2344
2372
  }
2345
2373
  // TODO update flow
2346
2374
  if (enableSuspenseRoot$2.current) {
2347
- var suspenseField = getInstanceFieldByInstance(renderDispatch);
2348
- var list = suspenseField.asyncLoadList.getAll();
2375
+ var suspenseField_1 = getInstanceFieldByInstance(renderDispatch);
2376
+ var list = suspenseField_1.asyncLoadList.getAll();
2349
2377
  if (list.length === 0)
2350
2378
  return;
2351
2379
  if (renderDispatch.enableAsyncLoad) {
2352
- throw new Error("[@my-react/reconciler] not implemented yet");
2380
+ var allPendingLoadArray = list.filter(function (item) {
2381
+ if (isPromise(item)) {
2382
+ return typeof item.status !== "string";
2383
+ }
2384
+ else {
2385
+ return !item._loading && !item._loaded && !item._error;
2386
+ }
2387
+ });
2388
+ if (allPendingLoadArray.length) {
2389
+ Promise.all(allPendingLoadArray.map(function (item) { return __awaiter(void 0, void 0, void 0, function () {
2390
+ var allNode;
2391
+ var _a;
2392
+ return __generator(this, function (_b) {
2393
+ switch (_b.label) {
2394
+ case 0:
2395
+ if (!isPromise(item)) return [3 /*break*/, 2];
2396
+ return [4 /*yield*/, renderDispatch.processPromise(item)];
2397
+ case 1:
2398
+ _b.sent();
2399
+ return [3 /*break*/, 4];
2400
+ case 2: return [4 /*yield*/, renderDispatch.processLazy(item)];
2401
+ case 3:
2402
+ _b.sent();
2403
+ _b.label = 4;
2404
+ case 4:
2405
+ allNode = Array.from(item._list);
2406
+ (_a = item._list) === null || _a === void 0 ? void 0 : _a.clear();
2407
+ allNode.forEach(function (node) {
2408
+ node.state = STATE_TYPE.__reschedule__;
2409
+ });
2410
+ suspenseField_1.asyncLoadList.uniDelete(item);
2411
+ return [2 /*return*/];
2412
+ }
2413
+ });
2414
+ }); }));
2415
+ var root = renderDispatch.rootFiber;
2416
+ root.state = remove(root.state, STATE_TYPE.__stable__);
2417
+ root.state = merge(root.state, STATE_TYPE.__retrigger__);
2418
+ // TODO use hide tree to improve
2419
+ mountLoopAll(renderDispatch, root);
2420
+ }
2353
2421
  }
2354
2422
  else {
2355
2423
  throw new Error("[@my-react/reconciler] should not process async load list on sync mount without enableAsyncLoad, you may use a wrong renderDispatch instance");
@@ -2361,7 +2429,7 @@ function requireIndex_development () {
2361
2429
  return typeof instance.componentDidCatch === "function" || typeof Component.getDerivedStateFromError === "function";
2362
2430
  };
2363
2431
  var isErrorBoundariesComponent = function (fiber) {
2364
- if (include(fiber.type, exports.NODE_TYPE.__class__) && include(fiber.state, STATE_TYPE.__stable__)) {
2432
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__) && include(fiber.state, STATE_TYPE.__stable__)) {
2365
2433
  var Component = fiber.elementType;
2366
2434
  var typedComponent = Component;
2367
2435
  var typedInstance = fiber.instance;
@@ -2401,7 +2469,6 @@ function requireIndex_development () {
2401
2469
  return field;
2402
2470
  };
2403
2471
 
2404
- /* eslint-disable max-lines */
2405
2472
  var enableLegacyLifeCycle = react.__my_react_shared__.enableLegacyLifeCycle;
2406
2473
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2407
2474
  // @ts-ignore
@@ -2489,7 +2556,7 @@ function requireIndex_development () {
2489
2556
  var processComponentDidMountOnMount = function (renderDispatch, fiber) {
2490
2557
  var typedInstance = fiber.instance;
2491
2558
  var effect = getInstanceEffectState(typedInstance);
2492
- if (exclude(effect, Effect_TYPE.__effect__)) {
2559
+ if (typeof effect === "number" && exclude(effect, Effect_TYPE.__effect__)) {
2493
2560
  setEffectForInstance(typedInstance, Effect_TYPE.__effect__);
2494
2561
  renderDispatch.pendingLayoutEffect(fiber, function invokeComponentDidMountOnInstance() {
2495
2562
  var _a;
@@ -2558,7 +2625,7 @@ function requireIndex_development () {
2558
2625
  var baseState = _a.baseState, baseProps = _a.baseProps, snapshot = _a.snapshot;
2559
2626
  var typedInstance = fiber.instance;
2560
2627
  var effect = getInstanceEffectState(typedInstance);
2561
- if (typedInstance.componentDidUpdate && exclude(effect, Effect_TYPE.__effect__)) {
2628
+ if (typedInstance.componentDidUpdate && typeof effect === "number" && exclude(effect, Effect_TYPE.__effect__)) {
2562
2629
  setEffectForInstance(typedInstance, Effect_TYPE.__effect__);
2563
2630
  renderDispatch.pendingLayoutEffect(fiber, function invokeComponentDidUpdateOnInstance() {
2564
2631
  var _a;
@@ -2710,7 +2777,7 @@ function requireIndex_development () {
2710
2777
  var nextContext = processComponentContextOnUpdate(renderDispatch, fiber);
2711
2778
  var shouldUpdate = Boolean(include(fiber.state, STATE_TYPE.__triggerSyncForce__ | STATE_TYPE.__triggerConcurrentForce__));
2712
2779
  if (!shouldUpdate) {
2713
- shouldUpdate = processComponentShouldUpdateOnUpdate(fiber, {
2780
+ shouldUpdate = !!processComponentShouldUpdateOnUpdate(fiber, {
2714
2781
  nextState: nextState,
2715
2782
  nextProps: nextProps,
2716
2783
  nextContext: nextContext,
@@ -2769,13 +2836,13 @@ function requireIndex_development () {
2769
2836
  };
2770
2837
 
2771
2838
  /* eslint-disable max-lines */
2772
- var enableDebugFiled$8 = react.__my_react_shared__.enableDebugFiled;
2839
+ var enableDebugFiled$a = react.__my_react_shared__.enableDebugFiled;
2773
2840
  var currentScheduler$c = react.__my_react_internal__.currentScheduler;
2774
2841
  // TODO 整合
2775
2842
  var processClassComponentUpdateQueueLatest = function (renderDispatch, fiber, enableTaskPriority) {
2776
2843
  if (include(fiber.state, STATE_TYPE.__unmount__))
2777
2844
  return;
2778
- if (exclude(fiber.type, exports.NODE_TYPE.__class__))
2845
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__class__))
2779
2846
  throw new Error("[@my-react/react] current fiber is not a class component, look like a bug for @my-react");
2780
2847
  var renderScheduler = currentScheduler$c.current;
2781
2848
  var allQueue = fiber.updateQueue;
@@ -2792,6 +2859,9 @@ function requireIndex_development () {
2792
2859
  var baseState = Object.assign({}, fiber.pendingState);
2793
2860
  var baseProps = Object.assign({}, typedInstance.props);
2794
2861
  var pendingState = Object.assign({}, fiber.pendingState);
2862
+ if (enableDebugFiled$a.current && enableDebugUpdateQueue.current) {
2863
+ typedFiber._debugLatestUpdateQueue = new ListTree();
2864
+ }
2795
2865
  if (enableTaskPriority && allQueue.some(function (l) { return l.isSync; })) {
2796
2866
  var _loop_1 = function () {
2797
2867
  var updater = node.value;
@@ -2817,15 +2887,16 @@ function requireIndex_development () {
2817
2887
  isImmediate = isImmediate || updater.isImmediate;
2818
2888
  isRetrigger = isRetrigger || updater.isRetrigger;
2819
2889
  updater.callback && callbacks.push(updater.callback);
2820
- if (enableDebugFiled$8.current) {
2890
+ if (enableDebugFiled$a.current) {
2821
2891
  var typedNode = updater;
2822
2892
  typedNode._debugRunTime = Date.now();
2823
2893
  typedNode._debugBeforeValue = pendingState;
2824
2894
  typedNode._debugBaseValue = baseState;
2825
2895
  typedNode._debugAfterValue = fiber.pendingState;
2826
2896
  if (enableDebugUpdateQueue.current) {
2827
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
2897
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
2828
2898
  typedFiber._debugUpdateQueue.push(typedNode);
2899
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
2829
2900
  }
2830
2901
  }
2831
2902
  }
@@ -2837,15 +2908,16 @@ function requireIndex_development () {
2837
2908
  isImmediate = isImmediate || updater.isImmediate;
2838
2909
  isRetrigger = isRetrigger || updater.isRetrigger;
2839
2910
  updater.callback && callbacks.push(updater.callback);
2840
- if (enableDebugFiled$8.current) {
2911
+ if (enableDebugFiled$a.current) {
2841
2912
  var typedNode = updater;
2842
2913
  typedNode._debugRunTime = Date.now();
2843
2914
  typedNode._debugBeforeValue = pendingState;
2844
2915
  typedNode._debugBaseValue = baseState;
2845
2916
  typedNode._debugAfterValue = fiber.pendingState;
2846
2917
  if (enableDebugUpdateQueue.current) {
2847
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
2918
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
2848
2919
  typedFiber._debugUpdateQueue.push(typedNode);
2920
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
2849
2921
  }
2850
2922
  }
2851
2923
  }
@@ -2898,15 +2970,16 @@ function requireIndex_development () {
2898
2970
  isImmediate = isImmediate || updater.isImmediate;
2899
2971
  isRetrigger = isRetrigger || updater.isRetrigger;
2900
2972
  updater.callback && callbacks.push(updater.callback);
2901
- if (enableDebugFiled$8.current) {
2973
+ if (enableDebugFiled$a.current) {
2902
2974
  var typedNode = updater;
2903
2975
  typedNode._debugRunTime = Date.now();
2904
2976
  typedNode._debugBeforeValue = pendingState;
2905
2977
  typedNode._debugBaseValue = baseState;
2906
2978
  typedNode._debugAfterValue = fiber.pendingState;
2907
2979
  if (enableDebugUpdateQueue.current) {
2908
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
2980
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
2909
2981
  typedFiber._debugUpdateQueue.push(typedNode);
2982
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
2910
2983
  }
2911
2984
  }
2912
2985
  }
@@ -2918,15 +2991,16 @@ function requireIndex_development () {
2918
2991
  isImmediate = isImmediate || updater.isImmediate;
2919
2992
  isRetrigger = isRetrigger || updater.isRetrigger;
2920
2993
  updater.callback && callbacks.push(updater.callback);
2921
- if (enableDebugFiled$8.current) {
2994
+ if (enableDebugFiled$a.current) {
2922
2995
  var typedNode = updater;
2923
2996
  typedNode._debugRunTime = Date.now();
2924
2997
  typedNode._debugBeforeValue = pendingState;
2925
2998
  typedNode._debugBaseValue = baseState;
2926
2999
  typedNode._debugAfterValue = fiber.pendingState;
2927
3000
  if (enableDebugUpdateQueue.current) {
2928
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3001
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
2929
3002
  typedFiber._debugUpdateQueue.push(typedNode);
3003
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
2930
3004
  }
2931
3005
  }
2932
3006
  }
@@ -2954,7 +3028,7 @@ function requireIndex_development () {
2954
3028
  var processClassComponentUpdateQueueLegacy = function (renderDispatch, fiber) {
2955
3029
  if (include(fiber.state, STATE_TYPE.__unmount__))
2956
3030
  return;
2957
- if (exclude(fiber.type, exports.NODE_TYPE.__class__))
3031
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__class__))
2958
3032
  throw new Error("[@my-react/react] current fiber is not a class component, look like a bug for @my-react");
2959
3033
  var renderScheduler = currentScheduler$c.current;
2960
3034
  var allQueue = fiber.updateQueue;
@@ -2971,6 +3045,9 @@ function requireIndex_development () {
2971
3045
  var baseState = Object.assign({}, fiber.pendingState);
2972
3046
  var baseProps = Object.assign({}, typedInstance.props);
2973
3047
  var pendingState = Object.assign({}, fiber.pendingState);
3048
+ if (enableDebugFiled$a.current && enableDebugUpdateQueue.current) {
3049
+ typedFiber._debugLatestUpdateQueue = new ListTree();
3050
+ }
2974
3051
  if (node) {
2975
3052
  var updater = node.value;
2976
3053
  if (updater.type === UpdateQueueType.component) {
@@ -2993,15 +3070,16 @@ function requireIndex_development () {
2993
3070
  isImmediate = isImmediate || updater.isImmediate;
2994
3071
  isRetrigger = isRetrigger || updater.isRetrigger;
2995
3072
  updater.callback && callbacks.push(updater.callback);
2996
- if (enableDebugFiled$8.current) {
3073
+ if (enableDebugFiled$a.current) {
2997
3074
  var typedNode = updater;
2998
3075
  typedNode._debugRunTime = Date.now();
2999
3076
  typedNode._debugBeforeValue = pendingState;
3000
3077
  typedNode._debugBaseValue = baseState;
3001
3078
  typedNode._debugAfterValue = fiber.pendingState;
3002
3079
  if (enableDebugUpdateQueue.current) {
3003
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3080
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3004
3081
  typedFiber._debugUpdateQueue.push(typedNode);
3082
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3005
3083
  }
3006
3084
  }
3007
3085
  }
@@ -3013,15 +3091,16 @@ function requireIndex_development () {
3013
3091
  isImmediate = isImmediate || updater.isImmediate;
3014
3092
  isRetrigger = isRetrigger || updater.isRetrigger;
3015
3093
  updater.callback && callbacks.push(updater.callback);
3016
- if (enableDebugFiled$8.current) {
3094
+ if (enableDebugFiled$a.current) {
3017
3095
  var typedNode = updater;
3018
3096
  typedNode._debugRunTime = Date.now();
3019
3097
  typedNode._debugBeforeValue = pendingState;
3020
3098
  typedNode._debugBaseValue = baseState;
3021
3099
  typedNode._debugAfterValue = fiber.pendingState;
3022
3100
  if (enableDebugUpdateQueue.current) {
3023
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3101
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3024
3102
  typedFiber._debugUpdateQueue.push(typedNode);
3103
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3025
3104
  }
3026
3105
  }
3027
3106
  }
@@ -3050,7 +3129,7 @@ function requireIndex_development () {
3050
3129
  var _a, _b;
3051
3130
  if (include(fiber.state, STATE_TYPE.__unmount__))
3052
3131
  return;
3053
- if (exclude(fiber.type, exports.NODE_TYPE.__function__)) {
3132
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__function__)) {
3054
3133
  throw new Error("[@my-react/react] current fiber is not a function component, look like a bug for @my-react");
3055
3134
  }
3056
3135
  var renderScheduler = currentScheduler$c.current;
@@ -3064,6 +3143,9 @@ function requireIndex_development () {
3064
3143
  var isRetrigger = false;
3065
3144
  var processedNodes = [];
3066
3145
  var callbacks = [];
3146
+ if (enableDebugFiled$a.current && enableDebugUpdateQueue.current) {
3147
+ typedFiber._debugLatestUpdateQueue = new ListTree();
3148
+ }
3067
3149
  if (enableTaskPriority && allQueue.some(function (l) { return l.isSync; })) {
3068
3150
  var _loop_3 = function () {
3069
3151
  var updater = node.value;
@@ -3103,15 +3185,16 @@ function requireIndex_development () {
3103
3185
  updater.callback && callbacks.push(updater.callback);
3104
3186
  if (!needUpdate && (isForce || hasError_1 || callbacks.length || !Object.is(lastResult_1, typedTrigger_1.result)))
3105
3187
  needUpdate = true;
3106
- if (enableDebugFiled$8.current) {
3188
+ if (enableDebugFiled$a.current) {
3107
3189
  var typedNode = updater;
3108
3190
  typedNode._debugRunTime = Date.now();
3109
3191
  typedNode._debugBeforeValue = lastResult_1;
3110
3192
  typedNode._debugAfterValue = typedTrigger_1.result;
3111
3193
  if (enableDebugUpdateQueue.current) {
3112
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3194
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3113
3195
  typedFiber._debugUpdateQueue.push(typedNode);
3114
- typedTrigger_1._debugUpdateQueue = typedTrigger_1._debugUpdateQueue || new ListTree();
3196
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3197
+ typedTrigger_1._debugUpdateQueue = typedTrigger_1._debugUpdateQueue || new ListTree(10);
3115
3198
  typedTrigger_1._debugUpdateQueue.push(typedNode);
3116
3199
  }
3117
3200
  }
@@ -3126,14 +3209,15 @@ function requireIndex_development () {
3126
3209
  isRetrigger = isRetrigger || updater.isRetrigger;
3127
3210
  updater.callback && callbacks.push(updater.callback);
3128
3211
  needUpdate = true;
3129
- if (enableDebugFiled$8.current) {
3212
+ if (enableDebugFiled$a.current) {
3130
3213
  var typedNode = updater;
3131
3214
  typedNode._debugRunTime = Date.now();
3132
3215
  typedNode._debugBeforeValue = undefined;
3133
3216
  typedNode._debugAfterValue = payLoad;
3134
3217
  if (enableDebugUpdateQueue.current) {
3135
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3218
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3136
3219
  typedFiber._debugUpdateQueue.push(typedNode);
3220
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3137
3221
  }
3138
3222
  }
3139
3223
  }
@@ -3201,15 +3285,16 @@ function requireIndex_development () {
3201
3285
  updater.callback && callbacks.push(updater.callback);
3202
3286
  if (!needUpdate && (isForce || hasError_2 || callbacks.length || !Object.is(lastResult_2, typedTrigger_2.result)))
3203
3287
  needUpdate = true;
3204
- if (enableDebugFiled$8.current) {
3288
+ if (enableDebugFiled$a.current) {
3205
3289
  var typedNode = updater;
3206
3290
  typedNode._debugRunTime = Date.now();
3207
3291
  typedNode._debugBeforeValue = lastResult_2;
3208
3292
  typedNode._debugAfterValue = typedTrigger_2.result;
3209
3293
  if (enableDebugUpdateQueue.current) {
3210
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3294
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3211
3295
  typedFiber._debugUpdateQueue.push(typedNode);
3212
- typedTrigger_2._debugUpdateQueue = typedTrigger_2._debugUpdateQueue || new ListTree();
3296
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3297
+ typedTrigger_2._debugUpdateQueue = typedTrigger_2._debugUpdateQueue || new ListTree(10);
3213
3298
  typedTrigger_2._debugUpdateQueue.push(typedNode);
3214
3299
  }
3215
3300
  }
@@ -3224,14 +3309,15 @@ function requireIndex_development () {
3224
3309
  isRetrigger = isRetrigger || updater.isRetrigger;
3225
3310
  updater.callback && callbacks.push(updater.callback);
3226
3311
  needUpdate = true;
3227
- if (enableDebugFiled$8.current) {
3312
+ if (enableDebugFiled$a.current) {
3228
3313
  var typedNode = updater;
3229
3314
  typedNode._debugRunTime = Date.now();
3230
3315
  typedNode._debugBeforeValue = undefined;
3231
3316
  typedNode._debugAfterValue = payLoad;
3232
3317
  if (enableDebugUpdateQueue.current) {
3233
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3318
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3234
3319
  typedFiber._debugUpdateQueue.push(typedNode);
3320
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3235
3321
  }
3236
3322
  }
3237
3323
  }
@@ -3260,7 +3346,7 @@ function requireIndex_development () {
3260
3346
  var _a;
3261
3347
  if (include(fiber.state, STATE_TYPE.__unmount__))
3262
3348
  return;
3263
- if (exclude(fiber.type, exports.NODE_TYPE.__function__)) {
3349
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__function__)) {
3264
3350
  throw new Error("[@my-react/react] current fiber is not a function component, look like a bug for @my-react");
3265
3351
  }
3266
3352
  var renderScheduler = currentScheduler$c.current;
@@ -3274,6 +3360,9 @@ function requireIndex_development () {
3274
3360
  var isRetrigger = false;
3275
3361
  var processedNodes = [];
3276
3362
  var callbacks = [];
3363
+ if (enableDebugFiled$a.current && enableDebugUpdateQueue.current) {
3364
+ typedFiber._debugLatestUpdateQueue = new ListTree();
3365
+ }
3277
3366
  if (node) {
3278
3367
  var updater = node.value;
3279
3368
  if (updater.type === UpdateQueueType.hook) {
@@ -3311,15 +3400,16 @@ function requireIndex_development () {
3311
3400
  updater.callback && callbacks.push(updater.callback);
3312
3401
  if (!needUpdate && (isForce || hasError_3 || callbacks.length || !Object.is(lastResult_3, typedTrigger_3.result)))
3313
3402
  needUpdate = true;
3314
- if (enableDebugFiled$8.current) {
3403
+ if (enableDebugFiled$a.current) {
3315
3404
  var typedNode = updater;
3316
3405
  typedNode._debugRunTime = Date.now();
3317
3406
  typedNode._debugBeforeValue = lastResult_3;
3318
3407
  typedNode._debugAfterValue = typedTrigger_3.result;
3319
3408
  if (enableDebugUpdateQueue.current) {
3320
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3409
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3321
3410
  typedFiber._debugUpdateQueue.push(typedNode);
3322
- typedTrigger_3._debugUpdateQueue = typedTrigger_3._debugUpdateQueue || new ListTree();
3411
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3412
+ typedTrigger_3._debugUpdateQueue = typedTrigger_3._debugUpdateQueue || new ListTree(10);
3323
3413
  typedTrigger_3._debugUpdateQueue.push(typedNode);
3324
3414
  }
3325
3415
  }
@@ -3334,14 +3424,15 @@ function requireIndex_development () {
3334
3424
  isRetrigger = isRetrigger || updater.isRetrigger;
3335
3425
  updater.callback && callbacks.push(updater.callback);
3336
3426
  needUpdate = true;
3337
- if (enableDebugFiled$8.current) {
3427
+ if (enableDebugFiled$a.current) {
3338
3428
  var typedNode = updater;
3339
3429
  typedNode._debugRunTime = Date.now();
3340
3430
  typedNode._debugBeforeValue = undefined;
3341
3431
  typedNode._debugAfterValue = payLoad;
3342
3432
  if (enableDebugUpdateQueue.current) {
3343
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3433
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3344
3434
  typedFiber._debugUpdateQueue.push(typedNode);
3435
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3345
3436
  }
3346
3437
  }
3347
3438
  }
@@ -3379,6 +3470,9 @@ function requireIndex_development () {
3379
3470
  var isRetrigger = false;
3380
3471
  var processedNodes = [];
3381
3472
  var callbacks = [];
3473
+ if (enableDebugFiled$a.current && enableDebugUpdateQueue.current) {
3474
+ typedFiber._debugLatestUpdateQueue = new ListTree();
3475
+ }
3382
3476
  while (node) {
3383
3477
  var updater = node.value;
3384
3478
  var nextNode = node.next;
@@ -3390,14 +3484,15 @@ function requireIndex_development () {
3390
3484
  isImmediate = isImmediate || updater.isImmediate;
3391
3485
  isRetrigger = isRetrigger || updater.isRetrigger;
3392
3486
  updater.callback && callbacks.push(updater.callback);
3393
- if (enableDebugFiled$8.current) {
3487
+ if (enableDebugFiled$a.current) {
3394
3488
  var typedNode = updater;
3395
3489
  typedNode._debugRunTime = Date.now();
3396
3490
  typedNode._debugBeforeValue = undefined;
3397
3491
  typedNode._debugAfterValue = payLoad;
3398
3492
  if (enableDebugUpdateQueue.current) {
3399
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3493
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3400
3494
  typedFiber._debugUpdateQueue.push(typedNode);
3495
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3401
3496
  }
3402
3497
  }
3403
3498
  node = nextNode;
@@ -3431,6 +3526,9 @@ function requireIndex_development () {
3431
3526
  var isRetrigger = false;
3432
3527
  var processedNodes = [];
3433
3528
  var callbacks = [];
3529
+ if (enableDebugFiled$a.current && enableDebugUpdateQueue.current) {
3530
+ typedFiber._debugLatestUpdateQueue = new ListTree();
3531
+ }
3434
3532
  if (node) {
3435
3533
  var updater = node.value;
3436
3534
  allQueue.delete(node);
@@ -3441,14 +3539,15 @@ function requireIndex_development () {
3441
3539
  isImmediate = isImmediate || updater.isImmediate;
3442
3540
  isRetrigger = isRetrigger || updater.isRetrigger;
3443
3541
  updater.callback && callbacks.push(updater.callback);
3444
- if (enableDebugFiled$8.current) {
3542
+ if (enableDebugFiled$a.current) {
3445
3543
  var typedNode = updater;
3446
3544
  typedNode._debugRunTime = Date.now();
3447
3545
  typedNode._debugBeforeValue = undefined;
3448
3546
  typedNode._debugAfterValue = payLoad;
3449
3547
  if (enableDebugUpdateQueue.current) {
3450
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
3548
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
3451
3549
  typedFiber._debugUpdateQueue.push(typedNode);
3550
+ typedFiber._debugLatestUpdateQueue.push(typedNode);
3452
3551
  }
3453
3552
  }
3454
3553
  }
@@ -3491,13 +3590,13 @@ function requireIndex_development () {
3491
3590
  };
3492
3591
 
3493
3592
  var currentComponentFiber$4 = react.__my_react_internal__.currentComponentFiber, currentRunningFiber$1 = react.__my_react_internal__.currentRunningFiber;
3494
- var enableDebugFiled$7 = react.__my_react_shared__.enableDebugFiled;
3593
+ var enableDebugFiled$9 = react.__my_react_shared__.enableDebugFiled;
3495
3594
  var MAX_UPDATE_COUNT = 25;
3496
3595
  var lastRenderComponentFiber = null;
3497
3596
  var lastRenderComponentTimeStep = null;
3498
3597
  var renderCount = 0;
3499
3598
  var processState = function (renderDispatch, _params) {
3500
- if (enableDebugFiled$7.current) {
3599
+ if (enableDebugFiled$9.current) {
3501
3600
  var typedUpdateQueue = _params;
3502
3601
  typedUpdateQueue._debugCreateTime = Date.now();
3503
3602
  typedUpdateQueue._debugType = UpdateQueueType[_params.type];
@@ -3521,7 +3620,7 @@ function requireIndex_development () {
3521
3620
  if (_params.type === UpdateQueueType.component) {
3522
3621
  if (!ownerFiber || include(ownerFiber.state, STATE_TYPE.__unmount__))
3523
3622
  return;
3524
- if (!exports.syncFlush && currentComponentFiber$4.current) {
3623
+ if (!exports$1.syncFlush && currentComponentFiber$4.current) {
3525
3624
  var currentRFiber = currentRunningFiber$1.current;
3526
3625
  var currentCFiber = currentComponentFiber$4.current;
3527
3626
  var now = Date.now();
@@ -3540,12 +3639,10 @@ function requireIndex_development () {
3540
3639
  renderCount = 0;
3541
3640
  throw new Error("[@my-react/react] look like there are infinity update for current component ".concat(currentComponentFiber$4.current && getElementName(currentComponentFiber$4.current)));
3542
3641
  }
3543
- else if (!isErrorBoundariesComponent(ownerFiber)) {
3642
+ else if (enableLogForCurrentFlowIsRunning.current && !isErrorBoundariesComponent(ownerFiber)) {
3544
3643
  var triggeredElementName = getElementName(ownerFiber);
3545
3644
  var currentElementName = getElementName(currentCFiber);
3546
- if (enableLogForCurrentFlowIsRunning.current) {
3547
- onceWarnWithKeyAndFiber(currentRFiber, "updateWhenCurrentFlowIsRunning-".concat(triggeredElementName), "[@my-react/react] trigger an update for ".concat(triggeredElementName, " when current update flow is running, this is a unexpected behavior, please make sure current render function for ").concat(currentElementName, " is a pure function"));
3548
- }
3645
+ onceWarnWithKeyAndFiber(currentRFiber, "updateWhenCurrentFlowIsRunning-".concat(triggeredElementName), "[@my-react/react] trigger an update for ".concat(triggeredElementName, " when current update flow is running, this is a unexpected behavior, please make sure current render function for ").concat(currentElementName, " is a pure function"));
3549
3646
  }
3550
3647
  lastRenderComponentFiber = currentCFiber;
3551
3648
  lastRenderComponentTimeStep = now;
@@ -3564,7 +3661,7 @@ function requireIndex_development () {
3564
3661
  else if (_params.type === UpdateQueueType.hook) {
3565
3662
  if (!ownerFiber || include(ownerFiber === null || ownerFiber === void 0 ? void 0 : ownerFiber.state, STATE_TYPE.__unmount__))
3566
3663
  return;
3567
- if (!exports.syncFlush && currentComponentFiber$4.current) {
3664
+ if (!exports$1.syncFlush && currentComponentFiber$4.current) {
3568
3665
  var currentRFiber = currentRunningFiber$1.current;
3569
3666
  var currentCFiber = currentComponentFiber$4.current;
3570
3667
  var now = Date.now();
@@ -3583,12 +3680,10 @@ function requireIndex_development () {
3583
3680
  renderCount = 0;
3584
3681
  throw new Error("[@my-react/react] look like there are infinity update for current component ".concat(currentComponentFiber$4.current && getElementName(currentComponentFiber$4.current)));
3585
3682
  }
3586
- else if (!isErrorBoundariesComponent(ownerFiber)) {
3683
+ else if (enableLogForCurrentFlowIsRunning.current && !isErrorBoundariesComponent(ownerFiber)) {
3587
3684
  var triggeredElementName = getElementName(ownerFiber);
3588
3685
  var currentElementName = getElementName(currentCFiber);
3589
- if (enableLogForCurrentFlowIsRunning.current) {
3590
- onceWarnWithKeyAndFiber(currentRFiber, "updateWhenCurrentFlowIsRunning-".concat(triggeredElementName), "[@my-react/react] trigger an update for ".concat(triggeredElementName, " when current update flow is running, this is a unexpected behavior, please make sure current render function for ").concat(currentElementName, " is a pure function"));
3591
- }
3686
+ onceWarnWithKeyAndFiber(currentRFiber, "updateWhenCurrentFlowIsRunning-".concat(triggeredElementName), "[@my-react/react] trigger an update for ".concat(triggeredElementName, " when current update flow is running, this is a unexpected behavior, please make sure current render function for ").concat(currentElementName, " is a pure function"));
3592
3687
  }
3593
3688
  lastRenderComponentFiber = currentCFiber;
3594
3689
  lastRenderComponentTimeStep = now;
@@ -3666,12 +3761,11 @@ function requireIndex_development () {
3666
3761
  currentTriggerFiber.current = null;
3667
3762
  };
3668
3763
  var clearContainer = function (renderDispatch) {
3669
- var _a, _b, _c, _d;
3764
+ var _a, _b, _c;
3670
3765
  renderDispatch.pendingCommitFiberPatch = PATCH_TYPE.__initial__;
3671
3766
  (_a = renderDispatch.pendingUpdateFiberArray) === null || _a === void 0 ? void 0 : _a.clear();
3672
3767
  (_b = renderDispatch.pendingSuspenseFiberArray) === null || _b === void 0 ? void 0 : _b.clear();
3673
3768
  (_c = renderDispatch.pendingCommitFiberList) === null || _c === void 0 ? void 0 : _c.clear();
3674
- (_d = renderDispatch.pendingChangedFiberList) === null || _d === void 0 ? void 0 : _d.clear();
3675
3769
  renderDispatch.resetUpdateFlowRuntimeFiber();
3676
3770
  renderDispatch.isAppMounted = false;
3677
3771
  renderDispatch.isAppUnmounted = true;
@@ -3681,7 +3775,7 @@ function requireIndex_development () {
3681
3775
  var applyTriggerFiberCb = function (renderDispatch, fiber) {
3682
3776
  var _a, _b;
3683
3777
  var cbArray = renderDispatch.runtimeMap.triggerCallbackMap.get(fiber);
3684
- if (include(fiber.type, exports.NODE_TYPE.__class__)) {
3778
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__)) {
3685
3779
  (_a = cbArray === null || cbArray === void 0 ? void 0 : cbArray.listToFoot) === null || _a === void 0 ? void 0 : _a.call(cbArray, function (cb) {
3686
3780
  renderDispatch.pendingLayoutEffect(fiber, cb, { stickyToFoot: true });
3687
3781
  });
@@ -3832,6 +3926,11 @@ function requireIndex_development () {
3832
3926
  };
3833
3927
 
3834
3928
  var globalLoop$2 = react.__my_react_internal__.globalLoop, currentScheduler$a = react.__my_react_internal__.currentScheduler;
3929
+ var clearLatestUpdateQueue = function (fiber) {
3930
+ var _a;
3931
+ var typedFiber = fiber;
3932
+ (_a = typedFiber._debugLatestUpdateQueue) === null || _a === void 0 ? void 0 : _a.clear();
3933
+ };
3835
3934
  var scheduleUpdateFromRoot = function (renderDispatch) {
3836
3935
  flushEffectCallback();
3837
3936
  var allLive = renderDispatch.pendingUpdateFiberArray.getAll().filter(function (f) { return exclude(f.state, STATE_TYPE.__unmount__); });
@@ -3845,6 +3944,7 @@ function requireIndex_development () {
3845
3944
  {
3846
3945
  safeCall(function safeCallBeforeDispatchUpdate() {
3847
3946
  renderDispatch.callOnBeforeDispatchUpdate(renderDispatch, allLive);
3947
+ allLive.forEach(clearLatestUpdateQueue);
3848
3948
  });
3849
3949
  }
3850
3950
  updateSyncFromRoot(renderDispatch);
@@ -3854,6 +3954,7 @@ function requireIndex_development () {
3854
3954
  {
3855
3955
  safeCall(function safeCallBeforeDispatchUpdate() {
3856
3956
  renderDispatch.callOnBeforeDispatchUpdate(renderDispatch, allLive);
3957
+ allLive.forEach(clearLatestUpdateQueue);
3857
3958
  });
3858
3959
  }
3859
3960
  updateConcurrentFromRoot(renderDispatch);
@@ -3913,19 +4014,17 @@ function requireIndex_development () {
3913
4014
  var enableScopeTreeLog$3 = react.__my_react_shared__.enableScopeTreeLog;
3914
4015
  function finishUpdateSyncFromRoot(renderDispatch) {
3915
4016
  var commitList = renderDispatch.pendingCommitFiberList;
3916
- var changedList = renderDispatch.pendingChangedFiberList;
3917
4017
  renderDispatch.resetUpdateFlowRuntimeFiber();
3918
4018
  renderDispatch.pendingCommitFiberList = null;
3919
- renderDispatch.pendingChangedFiberList = null;
3920
4019
  enableScopeTreeLog$3.current && setLogScope();
3921
4020
  (commitList === null || commitList === void 0 ? void 0 : commitList.length) && renderDispatch.reconcileUpdate(commitList, true);
3922
4021
  enableScopeTreeLog$3.current && resetLogScope();
3923
4022
  safeCall(function safeCallAfterDispatchUpdate() {
3924
4023
  renderDispatch.callOnAfterDispatchUpdate(renderDispatch);
3925
4024
  });
3926
- (changedList === null || changedList === void 0 ? void 0 : changedList.length) &&
4025
+ (commitList === null || commitList === void 0 ? void 0 : commitList.length) &&
3927
4026
  safeCall(function safeCallFiberHasChangeListener() {
3928
- renderDispatch.callOnFiberChange(changedList);
4027
+ renderDispatch.callOnFiberChange(commitList);
3929
4028
  });
3930
4029
  }
3931
4030
  var updateSyncFromRoot = function (renderDispatch) {
@@ -3943,19 +4042,17 @@ function requireIndex_development () {
3943
4042
  };
3944
4043
  function finishUpdateConcurrentFromRoot(renderDispatch) {
3945
4044
  var commitList = renderDispatch.pendingCommitFiberList;
3946
- var changedList = renderDispatch.pendingChangedFiberList;
3947
4045
  renderDispatch.resetUpdateFlowRuntimeFiber();
3948
4046
  renderDispatch.pendingCommitFiberList = null;
3949
- renderDispatch.pendingChangedFiberList = null;
3950
4047
  enableScopeTreeLog$3.current && setLogScope();
3951
4048
  (commitList === null || commitList === void 0 ? void 0 : commitList.length) && renderDispatch.reconcileUpdate(commitList);
3952
4049
  enableScopeTreeLog$3.current && setLogScope();
3953
4050
  safeCall(function safeCallAfterDispatchUpdate() {
3954
4051
  renderDispatch.callOnAfterDispatchUpdate(renderDispatch);
3955
4052
  });
3956
- (changedList === null || changedList === void 0 ? void 0 : changedList.length) &&
4053
+ (commitList === null || commitList === void 0 ? void 0 : commitList.length) &&
3957
4054
  safeCall(function safeCallFiberHasChangeListener() {
3958
- renderDispatch.callOnFiberChange(changedList);
4055
+ renderDispatch.callOnFiberChange(commitList);
3959
4056
  });
3960
4057
  }
3961
4058
  function checkNextFiberIsSync(renderDispatch) {
@@ -4120,7 +4217,7 @@ function requireIndex_development () {
4120
4217
  return MyReactSignal;
4121
4218
  }());
4122
4219
 
4123
- var enableDebugLog$1 = react.__my_react_shared__.enableDebugLog, enableDebugFiled$6 = react.__my_react_shared__.enableDebugFiled;
4220
+ var enableDebugLog$1 = react.__my_react_shared__.enableDebugLog, enableDebugFiled$8 = react.__my_react_shared__.enableDebugFiled;
4124
4221
  var currentHookTreeNode$2 = react.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$2 = react.__my_react_internal__.currentHookNodeIndex;
4125
4222
  var defaultReducer = function (state, action) {
4126
4223
  return typeof action === "function" ? action(state) : action;
@@ -4137,8 +4234,9 @@ function requireIndex_development () {
4137
4234
  if (currentHookIndex === 0) {
4138
4235
  defaultDeleteChildEffect(renderDispatch, fiber);
4139
4236
  defaultDeleteCurrentEffect(renderDispatch, fiber);
4140
- fiber.hookList.clear();
4141
4237
  }
4238
+ return currentHook;
4239
+ // fiber.hookList.clear();
4142
4240
  }
4143
4241
  else {
4144
4242
  throw new Error("[@my-react/react] should not have a hookList for current node, this is a bug for @my-react");
@@ -4297,7 +4395,7 @@ function requireIndex_development () {
4297
4395
  };
4298
4396
  }
4299
4397
  var typedHook = hookNode;
4300
- if (enableDebugFiled$6.current) {
4398
+ if (enableDebugFiled$8.current) {
4301
4399
  var typedFiber = fiber;
4302
4400
  typedFiber._debugHookTypes = typedFiber._debugHookTypes || [];
4303
4401
  typedFiber._debugHookTypes.push(HOOK_TYPE[hookNode.type]);
@@ -4585,7 +4683,7 @@ function requireIndex_development () {
4585
4683
  });
4586
4684
  };
4587
4685
 
4588
- var enableDebugFiled$5 = react.__my_react_shared__.enableDebugFiled;
4686
+ var enableDebugFiled$7 = react.__my_react_shared__.enableDebugFiled;
4589
4687
  var clearFiberNode = function (renderDispatch, fiber) {
4590
4688
  hookListUnmount(renderDispatch, fiber);
4591
4689
  processClassComponentUnmount(renderDispatch, fiber);
@@ -4594,7 +4692,7 @@ function requireIndex_development () {
4594
4692
  fiber.hookList = null;
4595
4693
  fiber.updateQueue = null;
4596
4694
  renderDispatch.commitUnsetRef(fiber);
4597
- if (enableDebugFiled$5.current) {
4695
+ if (enableDebugFiled$7.current) {
4598
4696
  var typedFiber = fiber;
4599
4697
  typedFiber._debugHookTypes = [];
4600
4698
  }
@@ -4670,10 +4768,10 @@ function requireIndex_development () {
4670
4768
  var renderScheduler = currentScheduler$5.current;
4671
4769
  var flag = renderDispatch.enableConcurrentMode;
4672
4770
  var updateState = null;
4673
- if (include(fiber.type, exports.NODE_TYPE.__class__)) {
4771
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__)) {
4674
4772
  updateState = flag ? processClassComponentUpdateQueueLatest(renderDispatch, fiber, flag) : processClassComponentUpdateQueueLegacy(renderDispatch, fiber);
4675
4773
  }
4676
- else if (include(fiber.type, exports.NODE_TYPE.__function__)) {
4774
+ else if (include(fiber.type, exports$1.NODE_TYPE.__function__)) {
4677
4775
  updateState = flag
4678
4776
  ? processFunctionComponentUpdateQueueLatest(renderDispatch, fiber, flag)
4679
4777
  : processFunctionComponentUpdateQueueLegacy(renderDispatch, fiber);
@@ -4759,7 +4857,7 @@ function requireIndex_development () {
4759
4857
  function MyReactFiberNode(element) {
4760
4858
  this.state = STATE_TYPE.__initial__;
4761
4859
  this.patch = PATCH_TYPE.__initial__;
4762
- this.type = exports.NODE_TYPE.__initial__;
4860
+ this.type = exports$1.NODE_TYPE.__initial__;
4763
4861
  this.child = null;
4764
4862
  this.parent = null;
4765
4863
  this.sibling = null;
@@ -4774,7 +4872,7 @@ function requireIndex_development () {
4774
4872
  this.key = key;
4775
4873
  this.type = nodeType;
4776
4874
  this.elementType = elementType;
4777
- if (include(nodeType, exports.NODE_TYPE.__function__)) {
4875
+ if (include(nodeType, exports$1.NODE_TYPE.__function__)) {
4778
4876
  this.elementRawType = element === null || element === void 0 ? void 0 : element.type;
4779
4877
  }
4780
4878
  this.pendingProps = pendingProps;
@@ -4882,7 +4980,7 @@ function requireIndex_development () {
4882
4980
  var nextProps = fiber.pendingProps;
4883
4981
  var nextRef = fiber.ref;
4884
4982
  if (prevElementType !== nextElementType || prevProps !== nextProps) {
4885
- if (include(fiber.type, exports.NODE_TYPE.__memo__)) {
4983
+ if (include(fiber.type, exports$1.NODE_TYPE.__memo__)) {
4886
4984
  var typedElement = nextElement;
4887
4985
  var typedElementType = typedElement.type;
4888
4986
  var compare = typedElementType.compare || isNormalEquals;
@@ -4901,12 +4999,12 @@ function requireIndex_development () {
4901
4999
  }
4902
5000
  }
4903
5001
  if (fiber.state !== STATE_TYPE.__stable__) {
4904
- if (include(fiber.type, exports.NODE_TYPE.__plain__)) {
5002
+ if (include(fiber.type, exports$1.NODE_TYPE.__plain__)) {
4905
5003
  if (!isNormalEquals(fiber.pendingProps, fiber.memoizedProps, function (key) { return key === "children"; })) {
4906
5004
  renderDispatch.pendingUpdate(fiber);
4907
5005
  }
4908
5006
  }
4909
- if (include(fiber.type, exports.NODE_TYPE.__text__)) {
5007
+ if (include(fiber.type, exports$1.NODE_TYPE.__text__)) {
4910
5008
  renderDispatch.pendingUpdate(fiber);
4911
5009
  }
4912
5010
  }
@@ -4948,7 +5046,7 @@ function requireIndex_development () {
4948
5046
  return fiber;
4949
5047
  };
4950
5048
 
4951
- var enableDebugFiled$4 = react.__my_react_shared__.enableDebugFiled;
5049
+ var enableDebugFiled$6 = react.__my_react_shared__.enableDebugFiled;
4952
5050
  var unmountFiberNode = function (renderDispatch, fiber) {
4953
5051
  if (include(fiber.state, STATE_TYPE.__unmount__))
4954
5052
  return;
@@ -4984,7 +5082,6 @@ function requireIndex_development () {
4984
5082
  renderDispatch.runtimeMap.effectMap.delete(fiber);
4985
5083
  renderDispatch.runtimeMap.layoutEffectMap.delete(fiber);
4986
5084
  renderDispatch.runtimeMap.unmountMap.delete(fiber);
4987
- renderDispatch.runtimeMap.eventMap.delete(fiber);
4988
5085
  renderDispatch.runtimeMap.triggerCallbackMap.delete(fiber);
4989
5086
  if (Boolean(true) === false) {
4990
5087
  // fiber.child = null;
@@ -4998,7 +5095,7 @@ function requireIndex_development () {
4998
5095
  }
4999
5096
  fiber.patch = PATCH_TYPE.__initial__;
5000
5097
  fiber.state = STATE_TYPE.__unmount__;
5001
- if (enableDebugFiled$4.current) {
5098
+ if (enableDebugFiled$6.current) {
5002
5099
  var typedFiber = fiber;
5003
5100
  typedFiber._debugIsMount = false;
5004
5101
  delete typedFiber._debugStrict;
@@ -5007,7 +5104,7 @@ function requireIndex_development () {
5007
5104
  }
5008
5105
  };
5009
5106
 
5010
- var enableDebugFiled$3 = react.__my_react_shared__.enableDebugFiled;
5107
+ var enableDebugFiled$5 = react.__my_react_shared__.enableDebugFiled;
5011
5108
  var getIsSameTypeNode = function (newChild, draftFiber) {
5012
5109
  if (!draftFiber)
5013
5110
  return false;
@@ -5049,7 +5146,6 @@ function requireIndex_development () {
5049
5146
  renderDispatch.pendingUnmount(parentFiber, f);
5050
5147
  });
5051
5148
  });
5052
- renderDispatch.generateChangedList(parentFiber, true);
5053
5149
  }
5054
5150
  };
5055
5151
  var getNewFiberWithUpdate = function (renderDispatch, newChild, parentFiber, existingChildren, prevFiberChild, index) {
@@ -5061,13 +5157,11 @@ function requireIndex_development () {
5061
5157
  existingChildren.delete(index);
5062
5158
  }
5063
5159
  // same type
5064
- if (include(draftFiber_1 === null || draftFiber_1 === void 0 ? void 0 : draftFiber_1.type, exports.NODE_TYPE.__fragment__)) {
5160
+ if (include(draftFiber_1 === null || draftFiber_1 === void 0 ? void 0 : draftFiber_1.type, exports$1.NODE_TYPE.__fragment__)) {
5065
5161
  var newElement = react.createElement(Fragment, dynamicFragmentProps, newChild);
5066
- draftFiber_1 !== prevFiberChild && renderDispatch.generateChangedList(parentFiber);
5067
5162
  return updateFiberNode(renderDispatch, { fiber: draftFiber_1, parent: parentFiber, prevFiber: prevFiberChild }, newElement);
5068
5163
  }
5069
5164
  else {
5070
- draftFiber_1 && renderDispatch.generateChangedList(parentFiber);
5071
5165
  draftFiber_1 && renderDispatch.pendingUnmount(parentFiber, draftFiber_1);
5072
5166
  return createFragmentWithUpdate(renderDispatch, newChild, parentFiber);
5073
5167
  }
@@ -5080,12 +5174,10 @@ function requireIndex_development () {
5080
5174
  }
5081
5175
  var isSameType = getIsSameTypeNode(newChild, draftFiber);
5082
5176
  if (isSameType) {
5083
- draftFiber !== prevFiberChild && renderDispatch.generateChangedList(parentFiber);
5084
5177
  return updateFiberNode(renderDispatch, { fiber: draftFiber, parent: parentFiber, prevFiber: prevFiberChild }, newChild);
5085
5178
  }
5086
5179
  else {
5087
5180
  draftFiber && renderDispatch.pendingUnmount(parentFiber, draftFiber);
5088
- draftFiber && renderDispatch.generateChangedList(parentFiber);
5089
5181
  return createFiberNode(renderDispatch, { parent: parentFiber, type: "position" }, newChild);
5090
5182
  }
5091
5183
  };
@@ -5111,7 +5203,7 @@ function requireIndex_development () {
5111
5203
  var _a = getExistingChildren(parentFiber), existingChildrenMap = _a.existingChildrenMap, existingChildrenArray = _a.existingChildrenArray;
5112
5204
  parentFiber.child = null;
5113
5205
  var typedParentFiber = parentFiber;
5114
- if (enableDebugFiled$3.current) {
5206
+ if (enableDebugFiled$5.current) {
5115
5207
  typedParentFiber._debugRenderChildrenCurrent && (typedParentFiber._debugRenderChildrenPrevious = typedParentFiber._debugRenderChildrenCurrent);
5116
5208
  typedParentFiber._debugRenderChildrenCurrent = [];
5117
5209
  }
@@ -5124,24 +5216,23 @@ function requireIndex_development () {
5124
5216
  var newFiber = getNewFiberWithUpdate(renderDispatch, newChild, parentFiber, existingChildrenMap, existingChildrenArray[index] || null, index);
5125
5217
  lastFiber && (lastFiber.sibling = newFiber);
5126
5218
  lastFiber = newFiber;
5127
- if (enableDebugFiled$3.current)
5219
+ if (enableDebugFiled$5.current)
5128
5220
  typedParentFiber._debugRenderChildrenCurrent.push(newChild);
5129
5221
  index++;
5130
5222
  }
5131
5223
  }
5132
5224
  else {
5133
5225
  getNewFiberWithUpdate(renderDispatch, children, parentFiber, existingChildrenMap, existingChildrenArray[0], 0);
5134
- if (enableDebugFiled$3.current)
5226
+ if (enableDebugFiled$5.current)
5135
5227
  typedParentFiber._debugRenderChildrenCurrent.push(children);
5136
5228
  }
5137
5229
  deleteIfNeed(renderDispatch, parentFiber, existingChildrenMap);
5138
5230
  }
5139
5231
  else {
5140
- renderDispatch.generateChangedList(parentFiber);
5141
5232
  var existingChildrenMap = getExistingChildren(parentFiber).existingChildrenMap;
5142
5233
  deleteIfNeed(renderDispatch, parentFiber, existingChildrenMap);
5143
5234
  var typedParentFiber = parentFiber;
5144
- if (enableDebugFiled$3.current) {
5235
+ if (enableDebugFiled$5.current) {
5145
5236
  typedParentFiber._debugRenderChildrenCurrent && (typedParentFiber._debugRenderChildrenPrevious = typedParentFiber._debugRenderChildrenCurrent);
5146
5237
  typedParentFiber._debugRenderChildrenCurrent = [];
5147
5238
  }
@@ -5155,14 +5246,14 @@ function requireIndex_development () {
5155
5246
  var newFiber = getNewFiberWithInitial(renderDispatch, newChild, parentFiber);
5156
5247
  lastFiber && (lastFiber.sibling = newFiber);
5157
5248
  lastFiber = newFiber;
5158
- if (enableDebugFiled$3.current)
5249
+ if (enableDebugFiled$5.current)
5159
5250
  typedParentFiber._debugRenderChildrenCurrent.push(newChild);
5160
5251
  index++;
5161
5252
  }
5162
5253
  }
5163
5254
  else {
5164
5255
  getNewFiberWithInitial(renderDispatch, children, parentFiber);
5165
- if (enableDebugFiled$3.current)
5256
+ if (enableDebugFiled$5.current)
5166
5257
  typedParentFiber._debugRenderChildrenCurrent.push(children);
5167
5258
  }
5168
5259
  }
@@ -5217,7 +5308,7 @@ function requireIndex_development () {
5217
5308
  return children;
5218
5309
  };
5219
5310
 
5220
- var currentHookTreeNode = react.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$1 = react.__my_react_internal__.currentHookNodeIndex, currentScheduler$4 = react.__my_react_internal__.currentScheduler;
5311
+ var currentHookTreeNode = react.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$1 = react.__my_react_internal__.currentHookNodeIndex, currentScheduler$4 = react.__my_react_internal__.currentScheduler, cacheLazy = react.__my_react_internal__.cacheLazy;
5221
5312
  var triggerState = STATE_TYPE.__triggerSync__ |
5222
5313
  STATE_TYPE.__triggerSyncForce__ |
5223
5314
  STATE_TYPE.__triggerConcurrent__ |
@@ -5229,7 +5320,7 @@ function requireIndex_development () {
5229
5320
  currentHookNodeIndex$1.current = 0;
5230
5321
  var typedElementType = fiber.elementType;
5231
5322
  var children = null;
5232
- if (include(fiber.type, exports.NODE_TYPE.__forwardRef__)) {
5323
+ if (include(fiber.type, exports$1.NODE_TYPE.__forwardRef__)) {
5233
5324
  var typedElementTypeWithRef_1 = typedElementType;
5234
5325
  children = safeCallWithCurrentFiber({
5235
5326
  fiber: fiber,
@@ -5237,7 +5328,17 @@ function requireIndex_development () {
5237
5328
  var _a, _b, _c, _d;
5238
5329
  var re = undefined;
5239
5330
  try {
5240
- re = typedElementTypeWithRef_1(fiber.pendingProps, fiber.ref);
5331
+ if (typedElementTypeWithRef_1[TYPEKEY] === SERVER_REFERENCE_SYMBOL) {
5332
+ var cacheFun = react.cache(typedElementTypeWithRef_1);
5333
+ re = cacheFun(fiber.pendingProps, fiber.ref);
5334
+ // support rsc
5335
+ // rsc return promise, so we transform promise to lazy, and try to keep the lazy stable
5336
+ if (isPromise(re))
5337
+ return react.createElement(cacheLazy(re));
5338
+ }
5339
+ else {
5340
+ re = typedElementTypeWithRef_1(fiber.pendingProps, fiber.ref);
5341
+ }
5241
5342
  }
5242
5343
  catch (e) {
5243
5344
  if (isPromise(e)) {
@@ -5264,7 +5365,16 @@ function requireIndex_development () {
5264
5365
  var _a, _b, _c, _d;
5265
5366
  var re = undefined;
5266
5367
  try {
5267
- re = typedElementType(fiber.pendingProps);
5368
+ if (typedElementType[TYPEKEY] === SERVER_REFERENCE_SYMBOL) {
5369
+ var cacheFun = react.cache(typedElementType);
5370
+ re = cacheFun(fiber.pendingProps);
5371
+ // support rsc
5372
+ if (isPromise(re))
5373
+ return react.createElement(cacheLazy(re));
5374
+ }
5375
+ else {
5376
+ re = typedElementType(fiber.pendingProps);
5377
+ }
5268
5378
  }
5269
5379
  catch (e) {
5270
5380
  if (isPromise(e)) {
@@ -5293,7 +5403,7 @@ function requireIndex_development () {
5293
5403
  var WrapperBySuspenseScope = function (children) {
5294
5404
  return react.createElement(ScopeSuspense, null, react.createElement(Comment, { mode: "s" }), children, react.createElement(Comment, { mode: "e" }));
5295
5405
  };
5296
- var isCommentElement = function (fiber) { return include(fiber.type, exports.NODE_TYPE.__comment__); };
5406
+ var isCommentElement = function (fiber) { return include(fiber.type, exports$1.NODE_TYPE.__comment__); };
5297
5407
  var isCommentStartElement = function (fiber) {
5298
5408
  if (isCommentElement(fiber)) {
5299
5409
  return fiber.pendingProps["mode"] === "s";
@@ -5307,7 +5417,7 @@ function requireIndex_development () {
5307
5417
  return false;
5308
5418
  };
5309
5419
 
5310
- var enableSuspenseRoot$1 = react.__my_react_shared__.enableSuspenseRoot;
5420
+ var enableSuspenseRoot$1 = react.__my_react_shared__.enableSuspenseRoot, enableDebugFiled$4 = react.__my_react_shared__.enableDebugFiled;
5311
5421
  var currentScheduler$3 = react.__my_react_internal__.currentScheduler;
5312
5422
  var loadLazy = function (renderDispatch, typedElementType) { return __awaiter(void 0, void 0, void 0, function () {
5313
5423
  var loadedPromise, loaded, render, e_1;
@@ -5337,6 +5447,9 @@ function requireIndex_development () {
5337
5447
  case 4:
5338
5448
  typedElementType._loaded = true;
5339
5449
  typedElementType._loading = false;
5450
+ if (enableDebugFiled$4.current) {
5451
+ typedElementType._debugResolveTime = typedElementType._debugResolveTime || Date.now();
5452
+ }
5340
5453
  return [7 /*endfinally*/];
5341
5454
  case 5: return [2 /*return*/];
5342
5455
  }
@@ -5351,7 +5464,15 @@ function requireIndex_development () {
5351
5464
  }
5352
5465
  if (typedElementType._loaded === true) {
5353
5466
  var render = typedElementType.render;
5354
- return WrapperByLazyScope(react.createElement(render, fiber.pendingProps));
5467
+ if (react.isValidElement(render)) {
5468
+ return WrapperByLazyScope(react.cloneElement(render));
5469
+ }
5470
+ else {
5471
+ return WrapperByLazyScope(react.createElement(render, fiber.pendingProps));
5472
+ }
5473
+ }
5474
+ if (enableDebugFiled$4.current) {
5475
+ typedElementType._debugCreateTime = typedElementType._debugCreateTime || Date.now();
5355
5476
  }
5356
5477
  typedElementType._list = typedElementType._list || new Set();
5357
5478
  typedElementType._list.add(fiber);
@@ -5527,7 +5648,7 @@ function requireIndex_development () {
5527
5648
  }
5528
5649
 
5529
5650
  var currentComponentFiber$1 = react.__my_react_internal__.currentComponentFiber, MyReactInternalInstance$1 = react.__my_react_internal__.MyReactInternalInstance;
5530
- var enablePerformanceLog = react.__my_react_shared__.enablePerformanceLog, enableDebugFiled$2 = react.__my_react_shared__.enableDebugFiled;
5651
+ var enablePerformanceLog = react.__my_react_shared__.enablePerformanceLog, enableDebugFiled$3 = react.__my_react_shared__.enableDebugFiled;
5531
5652
  var nextWorkCommon = function (renderDispatch, fiber, children) {
5532
5653
  if (isPromise(children)) {
5533
5654
  console.error("[@my-react/react] render function should not return a promise, please check your code");
@@ -5570,7 +5691,7 @@ function requireIndex_development () {
5570
5691
  nextWorkCommon(renderDispatch, fiber, children);
5571
5692
  };
5572
5693
  var nextWorkComponent = function (renderDispatch, fiber) {
5573
- if (include(fiber.type, exports.NODE_TYPE.__function__)) {
5694
+ if (include(fiber.type, exports$1.NODE_TYPE.__function__)) {
5574
5695
  currentComponentFiber$1.current = fiber;
5575
5696
  nextWorkFunctionComponent(renderDispatch, fiber);
5576
5697
  currentComponentFiber$1.current = null;
@@ -5644,7 +5765,7 @@ function requireIndex_development () {
5644
5765
  });
5645
5766
  }
5646
5767
  var timeNow = end;
5647
- if (enableDebugFiled$2.current) {
5768
+ if (enableDebugFiled$3.current) {
5648
5769
  if (typedFiber.state === STATE_TYPE.__create__) {
5649
5770
  typedFiber._debugRenderState = {
5650
5771
  mountTimeStep: timeNow,
@@ -5675,7 +5796,7 @@ function requireIndex_development () {
5675
5796
  });
5676
5797
  };
5677
5798
 
5678
- var enableDebugFiled$1 = react.__my_react_shared__.enableDebugFiled;
5799
+ var enableDebugFiled$2 = react.__my_react_shared__.enableDebugFiled;
5679
5800
  var currentRunningFiber = react.__my_react_internal__.currentRunningFiber, MyReactInternalInstance = react.__my_react_internal__.MyReactInternalInstance;
5680
5801
  var defaultGetContextValue = function (fiber, ContextObject) {
5681
5802
  var _a;
@@ -5690,14 +5811,14 @@ function requireIndex_development () {
5690
5811
  if ((fiber === null || fiber === void 0 ? void 0 : fiber.parent) && ContextObject) {
5691
5812
  var parent_1 = fiber.parent;
5692
5813
  while (parent_1) {
5693
- if (include(parent_1.type, exports.NODE_TYPE.__provider__)) {
5814
+ if (include(parent_1.type, exports$1.NODE_TYPE.__provider__)) {
5694
5815
  var typedElementType = parent_1.elementType;
5695
5816
  var contextObj = typedElementType["Context"];
5696
5817
  if (contextObj === ContextObject) {
5697
5818
  return parent_1;
5698
5819
  }
5699
5820
  }
5700
- if (include(parent_1.type, exports.NODE_TYPE.__context__)) {
5821
+ if (include(parent_1.type, exports$1.NODE_TYPE.__context__)) {
5701
5822
  var typedElementType = parent_1.elementType;
5702
5823
  var contextObj = typedElementType;
5703
5824
  if (contextObj === ContextObject) {
@@ -5747,7 +5868,7 @@ function requireIndex_development () {
5747
5868
  isImmediate: true,
5748
5869
  isRetrigger: true,
5749
5870
  };
5750
- if (enableDebugFiled$1.current) {
5871
+ if (enableDebugFiled$2.current) {
5751
5872
  var now = Date.now();
5752
5873
  updater._debugBeforeValue = beforeValue;
5753
5874
  updater._debugAfterValue = afterValue;
@@ -5755,8 +5876,10 @@ function requireIndex_development () {
5755
5876
  updater._debugRunTime = now;
5756
5877
  updater._debugType = UpdateQueueType[UpdateQueueType.context];
5757
5878
  if (enableDebugUpdateQueue.current) {
5758
- typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree();
5879
+ typedFiber._debugUpdateQueue = typedFiber._debugUpdateQueue || new ListTree(10);
5759
5880
  typedFiber._debugUpdateQueue.push(updater);
5881
+ typedFiber._debugLatestUpdateQueue = new ListTree();
5882
+ typedFiber._debugLatestUpdateQueue.push(updater);
5760
5883
  }
5761
5884
  }
5762
5885
  processedNodes.push(updater);
@@ -5843,7 +5966,7 @@ function requireIndex_development () {
5843
5966
  var defaultResolveScope = function (fiber) {
5844
5967
  var parent = fiber.parent;
5845
5968
  while (parent) {
5846
- if (include(parent.type, exports.NODE_TYPE.__scope__) || include(parent.type, exports.NODE_TYPE.__scopeSuspense__)) {
5969
+ if (include(parent.type, exports$1.NODE_TYPE.__scope__) || include(parent.type, exports$1.NODE_TYPE.__scopeSuspense__)) {
5847
5970
  return parent;
5848
5971
  }
5849
5972
  parent = parent.parent;
@@ -5851,21 +5974,21 @@ function requireIndex_development () {
5851
5974
  return null;
5852
5975
  };
5853
5976
 
5854
- var enableDebugFiled = react.__my_react_shared__.enableDebugFiled;
5977
+ var enableDebugFiled$1 = react.__my_react_shared__.enableDebugFiled;
5855
5978
  var defaultGenerateStrict = function (fiber) {
5856
5979
  {
5857
5980
  var parent_1 = fiber.parent;
5858
5981
  var isStrict = false;
5859
5982
  var typedParent = parent_1;
5860
5983
  if (parent_1) {
5861
- if (include(parent_1.type, exports.NODE_TYPE.__strict__)) {
5984
+ if (include(parent_1.type, exports$1.NODE_TYPE.__strict__)) {
5862
5985
  isStrict = true;
5863
5986
  }
5864
5987
  if (typedParent._debugStrict) {
5865
5988
  isStrict = true;
5866
5989
  }
5867
5990
  }
5868
- if (enableDebugFiled.current) {
5991
+ if (enableDebugFiled$1.current) {
5869
5992
  var typedFiber = fiber;
5870
5993
  typedFiber._debugStrict = isStrict;
5871
5994
  }
@@ -5900,22 +6023,22 @@ function requireIndex_development () {
5900
6023
  });
5901
6024
  }
5902
6025
  });
5903
- _list.listToHead(function invokePositionList(_fiber) {
6026
+ _list.listToFoot(function invokeAppendList(_fiber) {
5904
6027
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
5905
6028
  safeCallWithCurrentFiber({
5906
6029
  fiber: _fiber,
5907
- action: function safeCallPosition() {
5908
- _dispatch.commitPosition(_fiber);
6030
+ action: function safeCallAppendList() {
6031
+ _dispatch.commitAppend(_fiber);
5909
6032
  },
5910
6033
  });
5911
6034
  }
5912
6035
  });
5913
- _list.listToFoot(function invokeAppendList(_fiber) {
6036
+ _list.listToHead(function invokePositionList(_fiber) {
5914
6037
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
5915
6038
  safeCallWithCurrentFiber({
5916
6039
  fiber: _fiber,
5917
- action: function safeCallAppendList() {
5918
- _dispatch.commitAppend(_fiber);
6040
+ action: function safeCallPosition() {
6041
+ _dispatch.commitPosition(_fiber);
5919
6042
  },
5920
6043
  });
5921
6044
  }
@@ -6013,7 +6136,7 @@ function requireIndex_development () {
6013
6136
  return resolveHookValue(currentHook, field);
6014
6137
  };
6015
6138
 
6016
- var enableSuspenseRoot = react.__my_react_shared__.enableSuspenseRoot;
6139
+ var enableSuspenseRoot = react.__my_react_shared__.enableSuspenseRoot, enableDebugFiled = react.__my_react_shared__.enableDebugFiled;
6017
6140
  var currentScheduler = react.__my_react_internal__.currentScheduler;
6018
6141
  var loadPromise = function (renderDispatch, promise) { return __awaiter(void 0, void 0, void 0, function () {
6019
6142
  var value, reason_1;
@@ -6024,20 +6147,25 @@ function requireIndex_development () {
6024
6147
  return [2 /*return*/];
6025
6148
  _a.label = 1;
6026
6149
  case 1:
6027
- _a.trys.push([1, 3, , 4]);
6150
+ _a.trys.push([1, 3, 4, 5]);
6028
6151
  promise.status = "pending";
6029
6152
  return [4 /*yield*/, Promise.resolve(promise)];
6030
6153
  case 2:
6031
6154
  value = _a.sent();
6032
6155
  promise.status = "fulfilled";
6033
6156
  promise._value = value;
6034
- return [3 /*break*/, 4];
6157
+ return [3 /*break*/, 5];
6035
6158
  case 3:
6036
6159
  reason_1 = _a.sent();
6037
6160
  promise.status = "rejected";
6038
6161
  promise._reason = reason_1;
6039
- return [3 /*break*/, 4];
6040
- case 4: return [2 /*return*/];
6162
+ return [3 /*break*/, 5];
6163
+ case 4:
6164
+ if (enableDebugFiled.current) {
6165
+ promise._debugResolveTime = promise._debugResolveTime || Date.now();
6166
+ }
6167
+ return [7 /*endfinally*/];
6168
+ case 5: return [2 /*return*/];
6041
6169
  }
6042
6170
  });
6043
6171
  }); };
@@ -6053,6 +6181,9 @@ function requireIndex_development () {
6053
6181
  console.warn("[@my-react/react] throw a promise what has already fulfilled, this is not a valid usage");
6054
6182
  }
6055
6183
  }
6184
+ if (enableDebugFiled.current) {
6185
+ promise._debugCreateTime = promise._debugCreateTime || Date.now();
6186
+ }
6056
6187
  promise._list = promise._list || new Set();
6057
6188
  promise._list.add(fiber);
6058
6189
  var suspenseFiber = renderDispatch.resolveSuspenseFiber(fiber);
@@ -6107,6 +6238,9 @@ function requireIndex_development () {
6107
6238
  console.warn("[@my-react/react] throw a promise what has already fulfilled, this is not a valid usage");
6108
6239
  }
6109
6240
  }
6241
+ if (enableDebugFiled.current) {
6242
+ promise._debugCreateTime = promise._debugCreateTime || Date.now();
6243
+ }
6110
6244
  promise._list = promise._list || new Set();
6111
6245
  promise._list.add(fiber);
6112
6246
  if (promise._loading)
@@ -6175,7 +6309,6 @@ function requireIndex_development () {
6175
6309
  layoutEffectMap: new MyWeakMap(),
6176
6310
  insertionEffectMap: new MyWeakMap(),
6177
6311
  unmountMap: new MyWeakMap(),
6178
- eventMap: new MyWeakMap(),
6179
6312
  triggerCallbackMap: new MyWeakMap(),
6180
6313
  }); };
6181
6314
  var getInitialFiber = function () { return ({
@@ -6185,11 +6318,11 @@ function requireIndex_development () {
6185
6318
  retriggerFiber: null,
6186
6319
  }); };
6187
6320
  var initialRef = {
6188
- typeForRef: exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__class__,
6189
- typeForCreate: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__portal__ | exports.NODE_TYPE.__comment__,
6190
- typeForUpdate: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__comment__,
6191
- typeForAppend: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__comment__,
6192
- typeForNativeNode: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__portal__ | exports.NODE_TYPE.__comment__,
6321
+ typeForRef: exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__class__,
6322
+ typeForCreate: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__portal__ | exports$1.NODE_TYPE.__comment__,
6323
+ typeForUpdate: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__comment__,
6324
+ typeForAppend: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__comment__,
6325
+ typeForNativeNode: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__portal__ | exports$1.NODE_TYPE.__comment__,
6193
6326
  };
6194
6327
  var listenerMap = dispatchToListenerMap;
6195
6328
  var RenderDispatchEvent = /** @class */ (function (_super) {
@@ -6293,628 +6426,668 @@ function requireIndex_development () {
6293
6426
  RenderDispatchEvent.prototype.resetYield = function () {
6294
6427
  };
6295
6428
  RenderDispatchEvent.prototype.onFiberInitial = function (cb) {
6296
- var set = listenerMap.get(this).fiberInitial;
6297
- set.add(cb);
6298
- return function () { return set.delete(cb); };
6429
+ var _a;
6430
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberInitial;
6431
+ set === null || set === void 0 ? void 0 : set.add(cb);
6432
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6299
6433
  };
6300
6434
  RenderDispatchEvent.prototype.onceFiberInitial = function (cb) {
6301
- var set = listenerMap.get(this).fiberInitial;
6435
+ var _a;
6436
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberInitial;
6302
6437
  var onceCb = function (_fiber) {
6303
6438
  cb(_fiber);
6304
- set.delete(onceCb);
6439
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6305
6440
  };
6306
- set.add(onceCb);
6441
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6307
6442
  };
6308
6443
  RenderDispatchEvent.prototype.callOnFiberInitial = function (_fiber) {
6309
- var _a;
6310
- var set = listenerMap.get(this).fiberInitial;
6311
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6444
+ var _a, _b;
6445
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberInitial;
6446
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
6312
6447
  };
6313
6448
  RenderDispatchEvent.prototype.onFiberUpdate = function (cb) {
6314
- var set = listenerMap.get(this).fiberUpdate;
6315
- set.add(cb);
6316
- return function () { return set.delete(cb); };
6449
+ var _a;
6450
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUpdate;
6451
+ set === null || set === void 0 ? void 0 : set.add(cb);
6452
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6317
6453
  };
6318
6454
  RenderDispatchEvent.prototype.onceFiberUpdate = function (cb) {
6319
- var set = listenerMap.get(this).fiberUpdate;
6455
+ var _a;
6456
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUpdate;
6320
6457
  var onceCb = function (_fiber) {
6321
6458
  cb(_fiber);
6322
- set.delete(onceCb);
6459
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6323
6460
  };
6324
- set.add(onceCb);
6461
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6325
6462
  };
6326
6463
  RenderDispatchEvent.prototype.callOnFiberUpdate = function (_fiber) {
6327
- var _a;
6328
- var set = listenerMap.get(this).fiberUpdate;
6329
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6464
+ var _a, _b;
6465
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUpdate;
6466
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
6330
6467
  };
6331
6468
  RenderDispatchEvent.prototype.onFiberChange = function (cb) {
6332
- var set = listenerMap.get(this).fiberHasChange;
6333
- set.add(cb);
6334
- return function () { return set.delete(cb); };
6469
+ var _a;
6470
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHasChange;
6471
+ set === null || set === void 0 ? void 0 : set.add(cb);
6472
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6335
6473
  };
6336
6474
  RenderDispatchEvent.prototype.onceFiberChange = function (cb) {
6337
- var set = listenerMap.get(this).fiberHasChange;
6475
+ var _a;
6476
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHasChange;
6338
6477
  var onceCb = function (_list) {
6339
6478
  cb(_list);
6340
- set.delete(onceCb);
6479
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6341
6480
  };
6342
- set.add(onceCb);
6481
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6343
6482
  };
6344
6483
  RenderDispatchEvent.prototype.callOnFiberChange = function (_list) {
6345
- var _a;
6346
- var set = listenerMap.get(this).fiberHasChange;
6347
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_list); });
6484
+ var _a, _b;
6485
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHasChange;
6486
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_list); });
6348
6487
  };
6349
6488
  RenderDispatchEvent.prototype.onFiberUnmount = function (cb) {
6350
- var set = listenerMap.get(this).fiberUnmount;
6351
- set.add(cb);
6352
- return function () { return set.delete(cb); };
6489
+ var _a;
6490
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUnmount;
6491
+ set === null || set === void 0 ? void 0 : set.add(cb);
6492
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6353
6493
  };
6354
6494
  RenderDispatchEvent.prototype.onceFiberUnmount = function (cb) {
6355
- var set = listenerMap.get(this).fiberUnmount;
6495
+ var _a;
6496
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUnmount;
6356
6497
  var onceCb = function (_fiber) {
6357
6498
  cb(_fiber);
6358
- set.delete(onceCb);
6499
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6359
6500
  };
6360
- set.add(onceCb);
6501
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6361
6502
  };
6362
6503
  RenderDispatchEvent.prototype.callOnFiberUnmount = function (_fiber) {
6363
- var _a;
6364
- var set = listenerMap.get(this).fiberUnmount;
6365
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6504
+ var _a, _b;
6505
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUnmount;
6506
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
6366
6507
  };
6367
6508
  RenderDispatchEvent.prototype.onFiberState = function (cb) {
6368
- var set = listenerMap.get(this).fiberState;
6369
- set.add(cb);
6370
- return function () { return set.delete(cb); };
6509
+ var _a;
6510
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberState;
6511
+ set === null || set === void 0 ? void 0 : set.add(cb);
6512
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6371
6513
  };
6372
6514
  RenderDispatchEvent.prototype.onceFiberState = function (cb) {
6373
- var set = listenerMap.get(this).fiberState;
6515
+ var _a;
6516
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberState;
6374
6517
  var onceCb = function (_fiber, _updater) {
6375
6518
  cb(_fiber, _updater);
6376
- set.delete(onceCb);
6519
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6377
6520
  };
6378
- set.add(onceCb);
6521
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6379
6522
  };
6380
6523
  RenderDispatchEvent.prototype.callOnFiberState = function (_fiber, _updater) {
6381
- var _a;
6382
- var set = listenerMap.get(this).fiberState;
6383
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _updater); });
6524
+ var _a, _b;
6525
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberState;
6526
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _updater); });
6384
6527
  };
6385
6528
  RenderDispatchEvent.prototype.onFiberTrigger = function (cb) {
6386
- var set = listenerMap.get(this).fiberTrigger;
6387
- set.add(cb);
6388
- return function () { return set.delete(cb); };
6529
+ var _a;
6530
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberTrigger;
6531
+ set === null || set === void 0 ? void 0 : set.add(cb);
6532
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6389
6533
  };
6390
6534
  RenderDispatchEvent.prototype.onceFiberTrigger = function (cb) {
6391
- var set = listenerMap.get(this).fiberTrigger;
6535
+ var _a;
6536
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberTrigger;
6392
6537
  var onceCb = function (_fiber, _state) {
6393
6538
  cb(_fiber, _state);
6394
- set.delete(onceCb);
6539
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6395
6540
  };
6396
- set.add(onceCb);
6541
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6397
6542
  };
6398
6543
  RenderDispatchEvent.prototype.callOnFiberTrigger = function (_fiber, _state) {
6399
- var _a;
6400
- var set = listenerMap.get(this).fiberTrigger;
6401
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _state); });
6544
+ var _a, _b;
6545
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberTrigger;
6546
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _state); });
6402
6547
  };
6403
6548
  RenderDispatchEvent.prototype.onFiberHMR = function (cb) {
6404
- var _a;
6405
- var set = listenerMap.get(this).fiberHMR;
6406
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6549
+ var _a, _b;
6550
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHMR;
6551
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6407
6552
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6408
6553
  };
6409
6554
  RenderDispatchEvent.prototype.onceFiberHMR = function (cb) {
6410
- var _a;
6411
- var set = listenerMap.get(this).fiberHMR;
6555
+ var _a, _b;
6556
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHMR;
6412
6557
  var onceCb = function (_fiber, _forceRefresh) {
6413
6558
  var _a;
6414
6559
  cb(_fiber, _forceRefresh);
6415
6560
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6416
6561
  };
6417
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6562
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6418
6563
  };
6419
6564
  RenderDispatchEvent.prototype.callOnFiberHMR = function (_fiber, _forceRefresh) {
6420
- var _a;
6421
- var set = listenerMap.get(this).fiberHMR;
6422
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _forceRefresh); });
6565
+ var _a, _b;
6566
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHMR;
6567
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _forceRefresh); });
6423
6568
  };
6424
6569
  RenderDispatchEvent.prototype.onFiberWarn = function (cb) {
6425
- var _a;
6426
- var set = listenerMap.get(this).fiberWarn;
6427
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6570
+ var _a, _b;
6571
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberWarn;
6572
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6428
6573
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6429
6574
  };
6430
6575
  RenderDispatchEvent.prototype.onceFiberWarn = function (cb) {
6431
- var _a;
6432
- var set = listenerMap.get(this).fiberWarn;
6576
+ var _a, _b;
6577
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberWarn;
6433
6578
  var onceCb = function (_fiber) {
6434
6579
  var _a;
6435
6580
  cb(_fiber);
6436
6581
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6437
6582
  };
6438
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6583
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6439
6584
  };
6440
6585
  RenderDispatchEvent.prototype.callOnFiberWarn = function (_fiber) {
6441
- var _a;
6586
+ var _a, _b;
6442
6587
  var args = [];
6443
6588
  for (var _i = 1; _i < arguments.length; _i++) {
6444
6589
  args[_i - 1] = arguments[_i];
6445
6590
  }
6446
- var set = listenerMap.get(this).fiberWarn;
6447
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
6591
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberWarn;
6592
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
6448
6593
  };
6449
6594
  RenderDispatchEvent.prototype.onFiberError = function (cb) {
6450
- var _a;
6451
- var set = listenerMap.get(this).fiberError;
6452
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6595
+ var _a, _b;
6596
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberError;
6597
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6453
6598
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6454
6599
  };
6455
6600
  RenderDispatchEvent.prototype.onceFiberError = function (cb) {
6456
- var _a;
6457
- var set = listenerMap.get(this).fiberError;
6601
+ var _a, _b;
6602
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberError;
6458
6603
  var onceCb = function (_fiber) {
6459
6604
  var _a;
6460
6605
  cb(_fiber);
6461
6606
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6462
6607
  };
6463
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6608
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6464
6609
  };
6465
6610
  RenderDispatchEvent.prototype.callOnFiberError = function (_fiber) {
6466
- var _a;
6611
+ var _a, _b;
6467
6612
  var args = [];
6468
6613
  for (var _i = 1; _i < arguments.length; _i++) {
6469
6614
  args[_i - 1] = arguments[_i];
6470
6615
  }
6471
- var set = listenerMap.get(this).fiberError;
6472
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
6616
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberError;
6617
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
6473
6618
  };
6474
6619
  RenderDispatchEvent.prototype.onPerformanceWarn = function (cb) {
6475
- var _a;
6476
- var set = listenerMap.get(this).performanceWarn;
6477
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6620
+ var _a, _b;
6621
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.performanceWarn;
6622
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6478
6623
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6479
6624
  };
6480
6625
  RenderDispatchEvent.prototype.oncePerformanceWarn = function (cb) {
6481
- var _a;
6482
- var set = listenerMap.get(this).performanceWarn;
6626
+ var _a, _b;
6627
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.performanceWarn;
6483
6628
  var onceCb = function (_fiber, _renderTime) {
6484
6629
  var _a;
6485
6630
  cb(_fiber, _renderTime);
6486
6631
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6487
6632
  };
6488
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6633
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6489
6634
  };
6490
6635
  RenderDispatchEvent.prototype.callOnPerformanceWarn = function (_fiber, _renderTime) {
6491
- var _a;
6492
- var set = listenerMap.get(this).performanceWarn;
6493
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _renderTime); });
6636
+ var _a, _b;
6637
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.performanceWarn;
6638
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _renderTime); });
6494
6639
  };
6495
6640
  RenderDispatchEvent.prototype.onBeforeFiberRun = function (cb) {
6496
- var _a;
6497
- var set = listenerMap.get(this).beforeFiberRun;
6498
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6641
+ var _a, _b;
6642
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeFiberRun;
6643
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6499
6644
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6500
6645
  };
6501
6646
  RenderDispatchEvent.prototype.onceBeforeFiberRun = function (cb) {
6502
- var _a;
6503
- var set = listenerMap.get(this).beforeFiberRun;
6647
+ var _a, _b;
6648
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeFiberRun;
6504
6649
  var onceCb = function (_fiber) {
6505
6650
  var _a;
6506
6651
  cb(_fiber);
6507
6652
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6508
6653
  };
6509
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6654
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6510
6655
  };
6511
6656
  RenderDispatchEvent.prototype.callOnBeforeFiberRun = function (_fiber) {
6512
- var _a;
6513
- var set = listenerMap.get(this).beforeFiberRun;
6514
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6657
+ var _a, _b;
6658
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeFiberRun;
6659
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
6515
6660
  };
6516
6661
  RenderDispatchEvent.prototype.onAfterFiberRun = function (cb) {
6517
- var _a;
6518
- var set = listenerMap.get(this).afterFiberRun;
6519
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6662
+ var _a, _b;
6663
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberRun;
6664
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6520
6665
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6521
6666
  };
6522
6667
  RenderDispatchEvent.prototype.onceAfterFiberRun = function (cb) {
6523
- var _a;
6524
- var set = listenerMap.get(this).afterFiberRun;
6668
+ var _a, _b;
6669
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberRun;
6525
6670
  var onceCb = function (_fiber) {
6526
6671
  var _a;
6527
6672
  cb(_fiber);
6528
6673
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6529
6674
  };
6530
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6675
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6531
6676
  };
6532
6677
  RenderDispatchEvent.prototype.callOnAfterFiberRun = function (_fiber) {
6533
- var _a;
6534
- var set = listenerMap.get(this).afterFiberRun;
6535
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6678
+ var _a, _b;
6679
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberRun;
6680
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
6536
6681
  };
6537
6682
  RenderDispatchEvent.prototype.onAfterFiberDone = function (cb) {
6538
- var _a;
6539
- var set = listenerMap.get(this).afterFiberDone;
6540
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6683
+ var _a, _b;
6684
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberDone;
6685
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6541
6686
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6542
6687
  };
6543
6688
  RenderDispatchEvent.prototype.onceAfterFiberDone = function (cb) {
6544
- var _a;
6545
- var set = listenerMap.get(this).afterFiberDone;
6689
+ var _a, _b;
6690
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberDone;
6546
6691
  var onceCb = function (_fiber) {
6547
6692
  var _a;
6548
6693
  cb(_fiber);
6549
6694
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6550
6695
  };
6551
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6696
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6552
6697
  };
6553
6698
  RenderDispatchEvent.prototype.callOnAfterFiberDone = function (_fiber) {
6554
- var _a;
6555
- var set = listenerMap.get(this).afterFiberDone;
6556
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6699
+ var _a, _b;
6700
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberDone;
6701
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
6557
6702
  };
6558
6703
  RenderDispatchEvent.prototype.onBeforeDispatchRender = function (cb) {
6559
- var _a;
6560
- var set = listenerMap.get(this).beforeDispatchRender;
6561
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6704
+ var _a, _b;
6705
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchRender;
6706
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6562
6707
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6563
6708
  };
6564
6709
  RenderDispatchEvent.prototype.onceBeforeDispatchRender = function (cb) {
6565
- var _a;
6566
- var set = listenerMap.get(this).beforeDispatchRender;
6710
+ var _a, _b;
6711
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchRender;
6567
6712
  var onceCb = function (renderDispatch, fiber) {
6568
6713
  var _a;
6569
6714
  cb(renderDispatch, fiber);
6570
6715
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6571
6716
  };
6572
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6717
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6573
6718
  };
6574
6719
  RenderDispatchEvent.prototype.callOnBeforeDispatchRender = function (renderDispatch, fiber) {
6575
- var _a;
6576
- var set = listenerMap.get(this).beforeDispatchRender;
6577
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch, fiber); });
6720
+ var _a, _b;
6721
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchRender;
6722
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch, fiber); });
6578
6723
  };
6579
6724
  RenderDispatchEvent.prototype.onAfterDispatchRender = function (cb) {
6580
- var _a;
6581
- var set = listenerMap.get(this).afterDispatchRender;
6582
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6725
+ var _a, _b;
6726
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchRender;
6727
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6583
6728
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6584
6729
  };
6585
6730
  RenderDispatchEvent.prototype.onceAfterDispatchRender = function (cb) {
6586
- var _a;
6587
- var set = listenerMap.get(this).afterDispatchRender;
6731
+ var _a, _b;
6732
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchRender;
6588
6733
  var onceCb = function (renderDispatch) {
6589
6734
  var _a;
6590
6735
  cb(renderDispatch);
6591
6736
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6592
6737
  };
6593
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6738
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6594
6739
  };
6595
6740
  RenderDispatchEvent.prototype.callOnAfterDispatchRender = function (renderDispatch) {
6596
- var _a;
6597
- var set = listenerMap.get(this).afterDispatchRender;
6598
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6741
+ var _a, _b;
6742
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchRender;
6743
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6599
6744
  };
6600
6745
  RenderDispatchEvent.prototype.onBeforeDispatchUpdate = function (cb) {
6601
- var _a;
6602
- var set = listenerMap.get(this).beforeDispatchUpdate;
6603
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6746
+ var _a, _b;
6747
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchUpdate;
6748
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6604
6749
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6605
6750
  };
6606
6751
  RenderDispatchEvent.prototype.onceBeforeDispatchUpdate = function (cb) {
6607
- var _a;
6608
- var set = listenerMap.get(this).beforeDispatchUpdate;
6752
+ var _a, _b;
6753
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchUpdate;
6609
6754
  var onceCb = function (renderDispatch, list) {
6610
6755
  var _a;
6611
6756
  cb(renderDispatch, list);
6612
6757
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6613
6758
  };
6614
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6759
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6615
6760
  };
6616
6761
  RenderDispatchEvent.prototype.callOnBeforeDispatchUpdate = function (renderDispatch, list) {
6617
- var _a;
6618
- var set = listenerMap.get(this).beforeDispatchUpdate;
6619
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch, list); });
6762
+ var _a, _b;
6763
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchUpdate;
6764
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch, list); });
6620
6765
  };
6621
6766
  RenderDispatchEvent.prototype.onAfterDispatchUpdate = function (cb) {
6622
- var _a;
6623
- var set = listenerMap.get(this).afterDispatchUpdate;
6624
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6767
+ var _a, _b;
6768
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchUpdate;
6769
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6625
6770
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6626
6771
  };
6627
6772
  RenderDispatchEvent.prototype.onceAfterDispatchUpdate = function (cb) {
6628
- var _a;
6629
- var set = listenerMap.get(this).afterDispatchUpdate;
6773
+ var _a, _b;
6774
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchUpdate;
6630
6775
  var onceCb = function (renderDispatch) {
6631
6776
  var _a;
6632
6777
  cb(renderDispatch);
6633
6778
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6634
6779
  };
6635
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6780
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6636
6781
  };
6637
6782
  RenderDispatchEvent.prototype.callOnAfterDispatchUpdate = function (renderDispatch) {
6638
- var _a;
6639
- var set = listenerMap.get(this).afterDispatchUpdate;
6640
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6783
+ var _a, _b;
6784
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchUpdate;
6785
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6641
6786
  };
6642
6787
  RenderDispatchEvent.prototype.onInstanceInitial = function (cb) {
6643
- var set = listenerMap.get(this).instanceInitial;
6644
- set.add(cb);
6645
- return function () { return set.delete(cb); };
6788
+ var _a;
6789
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceInitial;
6790
+ set === null || set === void 0 ? void 0 : set.add(cb);
6791
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6646
6792
  };
6647
6793
  RenderDispatchEvent.prototype.onceInstanceInitial = function (cb) {
6648
- var set = listenerMap.get(this).instanceInitial;
6794
+ var _a;
6795
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceInitial;
6649
6796
  var onceCb = function (_instance, _fiber) {
6650
6797
  cb(_instance, _fiber);
6651
- set.delete(onceCb);
6798
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6652
6799
  };
6653
- set.add(onceCb);
6800
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6654
6801
  };
6655
6802
  RenderDispatchEvent.prototype.callOnInstanceInitial = function (_instance, _fiber) {
6656
- var _a;
6657
- var set = listenerMap.get(this).instanceInitial;
6658
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber); });
6803
+ var _a, _b;
6804
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceInitial;
6805
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber); });
6659
6806
  };
6660
6807
  RenderDispatchEvent.prototype.onInstanceUpdate = function (cb) {
6661
- var set = listenerMap.get(this).instanceUpdate;
6662
- set.add(cb);
6663
- return function () { return set.delete(cb); };
6808
+ var _a;
6809
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUpdate;
6810
+ set === null || set === void 0 ? void 0 : set.add(cb);
6811
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6664
6812
  };
6665
6813
  RenderDispatchEvent.prototype.onceInstanceUpdate = function (cb) {
6666
- var set = listenerMap.get(this).instanceUpdate;
6814
+ var _a;
6815
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUpdate;
6667
6816
  var onceCb = function (_instance, _fiber) {
6668
6817
  cb(_instance, _fiber);
6669
- set.delete(onceCb);
6818
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6670
6819
  };
6671
- set.add(onceCb);
6820
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6672
6821
  };
6673
6822
  RenderDispatchEvent.prototype.callOnInstanceUpdate = function (_instance, _fiber) {
6674
- var _a;
6675
- var set = listenerMap.get(this).instanceUpdate;
6676
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber); });
6823
+ var _a, _b;
6824
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUpdate;
6825
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber); });
6677
6826
  };
6678
6827
  RenderDispatchEvent.prototype.onInstanceState = function (cb) {
6679
- var set = listenerMap.get(this).instanceState;
6680
- set.add(cb);
6681
- return function () { return set.delete(cb); };
6828
+ var _a;
6829
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceState;
6830
+ set === null || set === void 0 ? void 0 : set.add(cb);
6831
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6682
6832
  };
6683
6833
  RenderDispatchEvent.prototype.onceInstanceState = function (cb) {
6684
- var set = listenerMap.get(this).instanceState;
6834
+ var _a;
6835
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceState;
6685
6836
  var onceCb = function (_instance, _fiber, _updater) {
6686
6837
  cb(_instance, _fiber, _updater);
6687
- set.delete(onceCb);
6838
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6688
6839
  };
6689
- set.add(onceCb);
6840
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6690
6841
  };
6691
6842
  RenderDispatchEvent.prototype.callOnInstanceState = function (_instance, _fiber, _updater) {
6692
- var _a;
6693
- var set = listenerMap.get(this).instanceState;
6694
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber, _updater); });
6843
+ var _a, _b;
6844
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceState;
6845
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber, _updater); });
6695
6846
  };
6696
6847
  RenderDispatchEvent.prototype.onInstanceUnmount = function (cb) {
6697
- var set = listenerMap.get(this).instanceUnmount;
6698
- set.add(cb);
6699
- return function () { return set.delete(cb); };
6848
+ var _a;
6849
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUnmount;
6850
+ set === null || set === void 0 ? void 0 : set.add(cb);
6851
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6700
6852
  };
6701
6853
  RenderDispatchEvent.prototype.onceInstanceUnmount = function (cb) {
6702
- var set = listenerMap.get(this).instanceUnmount;
6854
+ var _a;
6855
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUnmount;
6703
6856
  var onceCb = function (_instance, _fiber) {
6704
6857
  cb(_instance, _fiber);
6705
- set.delete(onceCb);
6858
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6706
6859
  };
6707
- set.add(onceCb);
6860
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6708
6861
  };
6709
6862
  RenderDispatchEvent.prototype.callOnInstanceUnmount = function (_instance, _fiber) {
6710
- var _a;
6711
- var set = listenerMap.get(this).instanceUnmount;
6712
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber); });
6863
+ var _a, _b;
6864
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUnmount;
6865
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber); });
6713
6866
  };
6714
6867
  RenderDispatchEvent.prototype.onHookInitial = function (cb) {
6715
- var set = listenerMap.get(this).hookInitial;
6716
- set.add(cb);
6717
- return function () { return set.delete(cb); };
6868
+ var _a;
6869
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookInitial;
6870
+ set === null || set === void 0 ? void 0 : set.add(cb);
6871
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6718
6872
  };
6719
6873
  RenderDispatchEvent.prototype.onceHookInitial = function (cb) {
6720
- var set = listenerMap.get(this).hookInitial;
6874
+ var _a;
6875
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookInitial;
6721
6876
  var onceCb = function (_hook, _fiber) {
6722
6877
  cb(_hook, _fiber);
6723
- set.delete(onceCb);
6878
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6724
6879
  };
6725
- set.add(onceCb);
6880
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6726
6881
  };
6727
6882
  RenderDispatchEvent.prototype.callOnHookInitial = function (_hook, _fiber) {
6728
- var _a;
6729
- var set = listenerMap.get(this).hookInitial;
6730
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber); });
6883
+ var _a, _b;
6884
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookInitial;
6885
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber); });
6731
6886
  };
6732
6887
  RenderDispatchEvent.prototype.onHookUpdate = function (cb) {
6733
- var set = listenerMap.get(this).hookUpdate;
6734
- set.add(cb);
6735
- return function () { return set.delete(cb); };
6888
+ var _a;
6889
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUpdate;
6890
+ set === null || set === void 0 ? void 0 : set.add(cb);
6891
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6736
6892
  };
6737
6893
  RenderDispatchEvent.prototype.onceHookUpdate = function (cb) {
6738
- var set = listenerMap.get(this).hookUpdate;
6894
+ var _a;
6895
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUpdate;
6739
6896
  var onceCb = function (_hook, _fiber) {
6740
6897
  cb(_hook, _fiber);
6741
- set.delete(onceCb);
6898
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6742
6899
  };
6743
- set.add(onceCb);
6900
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6744
6901
  };
6745
6902
  RenderDispatchEvent.prototype.callOnHookUpdate = function (_hook, _fiber) {
6746
- var _a;
6747
- var set = listenerMap.get(this).hookUpdate;
6748
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber); });
6903
+ var _a, _b;
6904
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUpdate;
6905
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber); });
6749
6906
  };
6750
6907
  RenderDispatchEvent.prototype.onHookUnmount = function (cb) {
6751
- var set = listenerMap.get(this).hookUnmount;
6752
- set.add(cb);
6753
- return function () { return set.delete(cb); };
6908
+ var _a;
6909
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUnmount;
6910
+ set === null || set === void 0 ? void 0 : set.add(cb);
6911
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6754
6912
  };
6755
6913
  RenderDispatchEvent.prototype.onceHookUnmount = function (cb) {
6756
- var set = listenerMap.get(this).hookUnmount;
6914
+ var _a;
6915
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUnmount;
6757
6916
  var onceCb = function (_hook, _fiber) {
6758
6917
  cb(_hook, _fiber);
6759
- set.delete(onceCb);
6918
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6760
6919
  };
6761
- set.add(onceCb);
6920
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6762
6921
  };
6763
6922
  RenderDispatchEvent.prototype.callOnHookUnmount = function (_hook, _fiber) {
6764
- var _a;
6765
- var set = listenerMap.get(this).hookUnmount;
6766
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber); });
6923
+ var _a, _b;
6924
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUnmount;
6925
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber); });
6767
6926
  };
6768
6927
  RenderDispatchEvent.prototype.onHookState = function (cb) {
6769
- var set = listenerMap.get(this).hookState;
6770
- set.add(cb);
6771
- return function () { return set.delete(cb); };
6928
+ var _a;
6929
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookState;
6930
+ set === null || set === void 0 ? void 0 : set.add(cb);
6931
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6772
6932
  };
6773
6933
  RenderDispatchEvent.prototype.onceHookTrigger = function (cb) {
6774
- var set = listenerMap.get(this).hookState;
6934
+ var _a;
6935
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookState;
6775
6936
  var onceCb = function (_hook, _fiber, _updater) {
6776
6937
  cb(_hook, _fiber, _updater);
6777
- set.delete(onceCb);
6938
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6778
6939
  };
6779
- set.add(onceCb);
6940
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6780
6941
  };
6781
6942
  RenderDispatchEvent.prototype.callOnHookState = function (_hook, _fiber, _updater) {
6782
- var _a;
6783
- var set = listenerMap.get(this).hookState;
6784
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber, _updater); });
6943
+ var _a, _b;
6944
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookState;
6945
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber, _updater); });
6785
6946
  };
6786
6947
  RenderDispatchEvent.prototype.onBeforeCommitMount = function (cb) {
6787
- var set = listenerMap.get(this).beforeCommitMount;
6788
- set.add(cb);
6789
- return function () { return set.delete(cb); };
6948
+ var _a;
6949
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitMount;
6950
+ set === null || set === void 0 ? void 0 : set.add(cb);
6951
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6790
6952
  };
6791
6953
  RenderDispatchEvent.prototype.onceBeforeCommitMount = function (cb) {
6792
- var set = listenerMap.get(this).beforeCommitMount;
6954
+ var _a;
6955
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitMount;
6793
6956
  var onceCb = function (renderDispatch) {
6794
6957
  cb(renderDispatch);
6795
- set.delete(onceCb);
6958
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6796
6959
  };
6797
- set.add(onceCb);
6960
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6798
6961
  };
6799
6962
  RenderDispatchEvent.prototype.callOnBeforeCommitMount = function (renderDispatch) {
6800
- var _a;
6801
- var set = listenerMap.get(this).beforeCommitMount;
6802
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6963
+ var _a, _b;
6964
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitMount;
6965
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6803
6966
  };
6804
6967
  RenderDispatchEvent.prototype.onAfterCommitMount = function (cb) {
6805
- var set = listenerMap.get(this).afterCommitMount;
6806
- set.add(cb);
6807
- return function () { return set.delete(cb); };
6968
+ var _a;
6969
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitMount;
6970
+ set === null || set === void 0 ? void 0 : set.add(cb);
6971
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6808
6972
  };
6809
6973
  RenderDispatchEvent.prototype.onceAfterCommitMount = function (cb) {
6810
- var set = listenerMap.get(this).afterCommitMount;
6974
+ var _a;
6975
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitMount;
6811
6976
  var onceCb = function (renderDispatch) {
6812
6977
  cb(renderDispatch);
6813
- set.delete(onceCb);
6978
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6814
6979
  };
6815
- set.add(onceCb);
6980
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6816
6981
  };
6817
6982
  RenderDispatchEvent.prototype.callOnAfterCommitMount = function (renderDispatch) {
6818
- var _a;
6819
- var set = listenerMap.get(this).afterCommitMount;
6820
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6983
+ var _a, _b;
6984
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitMount;
6985
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6821
6986
  };
6822
6987
  RenderDispatchEvent.prototype.onBeforeCommitUpdate = function (cb) {
6823
- var set = listenerMap.get(this).beforeCommitUpdate;
6824
- set.add(cb);
6825
- return function () { return set.delete(cb); };
6988
+ var _a;
6989
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUpdate;
6990
+ set === null || set === void 0 ? void 0 : set.add(cb);
6991
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6826
6992
  };
6827
6993
  RenderDispatchEvent.prototype.onceBeforeCommitUpdate = function (cb) {
6828
- var set = listenerMap.get(this).beforeCommitUpdate;
6994
+ var _a;
6995
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUpdate;
6829
6996
  var onceCb = function (renderDispatch) {
6830
6997
  cb(renderDispatch);
6831
- set.delete(onceCb);
6998
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6832
6999
  };
6833
- set.add(onceCb);
7000
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6834
7001
  };
6835
7002
  RenderDispatchEvent.prototype.callOnBeforeCommitUpdate = function (renderDispatch) {
6836
- var _a;
6837
- var set = listenerMap.get(this).beforeCommitUpdate;
6838
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
7003
+ var _a, _b;
7004
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUpdate;
7005
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6839
7006
  };
6840
7007
  RenderDispatchEvent.prototype.onAfterCommitUpdate = function (cb) {
6841
- var set = listenerMap.get(this).afterCommitUpdate;
6842
- set.add(cb);
6843
- return function () { return set.delete(cb); };
7008
+ var _a;
7009
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUpdate;
7010
+ set === null || set === void 0 ? void 0 : set.add(cb);
7011
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6844
7012
  };
6845
7013
  RenderDispatchEvent.prototype.onceAfterCommitUpdate = function (cb) {
6846
- var set = listenerMap.get(this).afterCommitUpdate;
7014
+ var _a;
7015
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUpdate;
6847
7016
  var onceCb = function (renderDispatch) {
6848
7017
  cb(renderDispatch);
6849
- set.delete(onceCb);
7018
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6850
7019
  };
6851
- set.add(onceCb);
7020
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6852
7021
  };
6853
7022
  RenderDispatchEvent.prototype.callOnAfterCommitUpdate = function (renderDispatch) {
6854
- var _a;
6855
- var set = listenerMap.get(this).afterCommitUpdate;
6856
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
7023
+ var _a, _b;
7024
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUpdate;
7025
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6857
7026
  };
6858
7027
  RenderDispatchEvent.prototype.onBeforeCommitUnmount = function (cb) {
6859
- var set = listenerMap.get(this).beforeCommitUnmount;
6860
- set.add(cb);
6861
- return function () { return set.delete(cb); };
7028
+ var _a;
7029
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUnmount;
7030
+ set === null || set === void 0 ? void 0 : set.add(cb);
7031
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6862
7032
  };
6863
7033
  RenderDispatchEvent.prototype.onceBeforeCommitUnmount = function (cb) {
6864
- var set = listenerMap.get(this).beforeCommitUnmount;
7034
+ var _a;
7035
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUnmount;
6865
7036
  var onceCb = function (renderDispatch) {
6866
7037
  cb(renderDispatch);
6867
- set.delete(onceCb);
7038
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6868
7039
  };
6869
- set.add(onceCb);
7040
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6870
7041
  };
6871
7042
  RenderDispatchEvent.prototype.callOnBeforeCommitUnmount = function (renderDispatch) {
6872
- var _a;
6873
- var set = listenerMap.get(this).beforeCommitUnmount;
6874
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
7043
+ var _a, _b;
7044
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUnmount;
7045
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6875
7046
  };
6876
7047
  RenderDispatchEvent.prototype.onAfterCommitUnmount = function (cb) {
6877
- var set = listenerMap.get(this).afterCommitUnmount;
6878
- set.add(cb);
6879
- return function () { return set.delete(cb); };
7048
+ var _a;
7049
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUnmount;
7050
+ set === null || set === void 0 ? void 0 : set.add(cb);
7051
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6880
7052
  };
6881
7053
  RenderDispatchEvent.prototype.onceAfterCommitUnmount = function (cb) {
6882
- var set = listenerMap.get(this).afterCommitUnmount;
7054
+ var _a;
7055
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUnmount;
6883
7056
  var onceCb = function (renderDispatch) {
6884
7057
  cb(renderDispatch);
6885
- set.delete(onceCb);
7058
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6886
7059
  };
6887
- set.add(onceCb);
7060
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6888
7061
  };
6889
7062
  RenderDispatchEvent.prototype.callOnAfterCommitUnmount = function (renderDispatch) {
6890
- var _a;
6891
- var set = listenerMap.get(this).afterCommitUnmount;
6892
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
7063
+ var _a, _b;
7064
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUnmount;
7065
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6893
7066
  };
6894
7067
  return RenderDispatchEvent;
6895
7068
  }(MyReactInternalInstanceClass));
6896
7069
 
6897
7070
  var defaultDispatchFiber = function (renderDispatch, fiber) {
6898
- if (include(fiber.type, exports.NODE_TYPE.__root__)) {
7071
+ if (include(fiber.type, exports$1.NODE_TYPE.__root__)) {
6899
7072
  // TODO
6900
7073
  nextWorkRoot(renderDispatch, fiber);
6901
7074
  }
6902
- else if (include(fiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
7075
+ else if (include(fiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
6903
7076
  nextWorkComponent(renderDispatch, fiber);
6904
7077
  }
6905
- else if (include(fiber.type, exports.NODE_TYPE.__lazy__)) {
7078
+ else if (include(fiber.type, exports$1.NODE_TYPE.__lazy__)) {
6906
7079
  nextWorkLazy(renderDispatch, fiber);
6907
7080
  }
6908
- else if (include(fiber.type, exports.NODE_TYPE.__suspense__)) {
7081
+ else if (include(fiber.type, exports$1.NODE_TYPE.__suspense__)) {
6909
7082
  nextWorkSuspense(renderDispatch, fiber);
6910
7083
  }
6911
- else if (include(fiber.type, exports.NODE_TYPE.__consumer__)) {
7084
+ else if (include(fiber.type, exports$1.NODE_TYPE.__consumer__)) {
6912
7085
  nextWorkConsumer(renderDispatch, fiber);
6913
7086
  }
6914
- else if (include(fiber.type, exports.NODE_TYPE.__provider__ | exports.NODE_TYPE.__context__)) {
7087
+ else if (include(fiber.type, exports$1.NODE_TYPE.__provider__ | exports$1.NODE_TYPE.__context__)) {
6915
7088
  nextWorkProvider(renderDispatch, fiber);
6916
7089
  }
6917
- else if (include(fiber.type, exports.NODE_TYPE.__activity__)) {
7090
+ else if (include(fiber.type, exports$1.NODE_TYPE.__activity__)) {
6918
7091
  nextWorkActivity(renderDispatch, fiber);
6919
7092
  }
6920
7093
  else {
@@ -6931,13 +7104,12 @@ function requireIndex_development () {
6931
7104
  _this.isAppMounted = false;
6932
7105
  _this.isAppCrashed = false;
6933
7106
  _this.isAppUnmounted = false;
6934
- _this.version = "0.3.21";
7107
+ _this.version = "0.3.23";
6935
7108
  _this.id = Math.random().toString(16).slice(2);
6936
7109
  _this.mode = "development" ;
6937
7110
  _this.renderMode = "render";
6938
7111
  _this.pendingCommitFiberList = null;
6939
7112
  _this.pendingCommitFiberPatch = PATCH_TYPE.__initial__;
6940
- _this.pendingChangedFiberList = null;
6941
7113
  _this.pendingUpdateFiberArray = new UniqueArray();
6942
7114
  _this.pendingSuspenseFiberArray = new UniqueArray();
6943
7115
  _this.uniqueIdCount = 0;
@@ -6955,17 +7127,6 @@ function requireIndex_development () {
6955
7127
  this.pendingCommitFiberList.push(_fiber);
6956
7128
  }
6957
7129
  };
6958
- CustomRenderDispatch.prototype.generateChangedList = function (_fiber, withCheck) {
6959
- if (!_fiber)
6960
- return;
6961
- if (!this.isAppMounted)
6962
- return;
6963
- this.pendingChangedFiberList = this.pendingChangedFiberList || new ListTree();
6964
- if (withCheck && this.pendingChangedFiberList.hasValue(_fiber)) {
6965
- return;
6966
- }
6967
- this.pendingChangedFiberList.push(_fiber);
6968
- };
6969
7130
  CustomRenderDispatch.prototype.pendingCreate = function (_fiber) {
6970
7131
  if (include(_fiber.type, this.runtimeRef.typeForCreate)) {
6971
7132
  _fiber.patch = merge(_fiber.patch, PATCH_TYPE.__create__);
@@ -6989,7 +7150,7 @@ function requireIndex_development () {
6989
7150
  if (include(_fiber.type, this.runtimeRef.typeForRef)) {
6990
7151
  _fiber.patch = merge(_fiber.patch, PATCH_TYPE.__ref__);
6991
7152
  }
6992
- else if (exclude(_fiber.type, exports.NODE_TYPE.__forwardRef__)) {
7153
+ else if (exclude(_fiber.type, exports$1.NODE_TYPE.__forwardRef__)) {
6993
7154
  onceWarnWithKeyAndFiber(_fiber, "ref", "[@my-react/react] set ref for current element will be ignored");
6994
7155
  }
6995
7156
  }
@@ -7151,18 +7312,9 @@ function requireIndex_development () {
7151
7312
  function finishMountSync(renderDispatch, fiber) {
7152
7313
  enableScopeTreeLog.current && setLogScope();
7153
7314
  renderDispatch.reconcileCommit(fiber);
7154
- var changedList = renderDispatch.pendingChangedFiberList;
7155
7315
  renderDispatch.resetUpdateFlowRuntimeFiber();
7156
7316
  renderDispatch.pendingCommitFiberList = null;
7157
- renderDispatch.pendingChangedFiberList = null;
7158
7317
  enableScopeTreeLog.current && resetLogScope();
7159
- (changedList === null || changedList === void 0 ? void 0 : changedList.length) &&
7160
- safeCallWithCurrentFiber({
7161
- fiber: fiber,
7162
- action: function safeCallFiberHasChangeListener() {
7163
- renderDispatch.callOnFiberChange(changedList);
7164
- },
7165
- });
7166
7318
  }
7167
7319
  var mountSync = function (renderDispatch, fiber) {
7168
7320
  safeCall(function safeCallBeforeDispatchRender() {
@@ -7182,18 +7334,9 @@ function requireIndex_development () {
7182
7334
  function finishMountAsync(renderDispatch, fiber) {
7183
7335
  enableScopeTreeLog.current && setLogScope();
7184
7336
  renderDispatch.reconcileCommit(fiber);
7185
- var changedList = renderDispatch.pendingChangedFiberList;
7186
7337
  renderDispatch.resetUpdateFlowRuntimeFiber();
7187
7338
  renderDispatch.pendingCommitFiberList = null;
7188
- renderDispatch.pendingChangedFiberList = null;
7189
7339
  enableScopeTreeLog.current && resetLogScope();
7190
- (changedList === null || changedList === void 0 ? void 0 : changedList.length) &&
7191
- safeCallWithCurrentFiber({
7192
- fiber: fiber,
7193
- action: function safeCallFiberHasChangeListener() {
7194
- renderDispatch.callOnFiberChange(changedList);
7195
- },
7196
- });
7197
7340
  }
7198
7341
  var mountAsync = function (renderDispatch, fiber) { return __awaiter(void 0, void 0, void 0, function () {
7199
7342
  return __generator(this, function (_a) {
@@ -7219,192 +7362,192 @@ function requireIndex_development () {
7219
7362
  });
7220
7363
  }); };
7221
7364
 
7222
- var version = "0.3.21";
7365
+ var version = "0.3.23";
7223
7366
 
7224
- exports.CustomRenderDispatch = CustomRenderDispatch;
7225
- exports.MyReactFiberNode = MyReactFiberNode;
7226
- exports.MyReactHookNode = MyReactHookNode;
7227
- exports.MyWeakMap = MyWeakMap;
7228
- exports.RenderDispatchEvent = RenderDispatchEvent;
7229
- exports.WrapperByLazyScope = WrapperByLazyScope;
7230
- exports.WrapperBySuspenseScope = WrapperBySuspenseScope;
7231
- exports.addEffectCallback = addEffectCallback;
7232
- exports.afterSyncFlush = afterSyncFlush;
7233
- exports.afterSyncUpdate = afterSyncUpdate;
7234
- exports.applyTriggerFiberCb = applyTriggerFiberCb;
7235
- exports.beforeSyncFlush = beforeSyncFlush;
7236
- exports.beforeSyncUpdate = beforeSyncUpdate;
7237
- exports.callWithFiber = callWithFiber;
7238
- exports.checkIsMyReactFiberNode = checkIsMyReactFiberNode;
7239
- exports.checkIsSameType = checkIsSameType;
7240
- exports.clearContainer = clearContainer;
7241
- exports.clearFiberNode = clearFiberNode;
7242
- exports.createFiberNode = createFiberNode;
7243
- exports.createHookNode = createHookNode;
7244
- exports.currentRefreshHandler = currentRefreshHandler;
7245
- exports.currentTriggerFiber = currentTriggerFiber;
7246
- exports.debugWithNode = debugWithNode;
7247
- exports.defaultDeleteChildEffect = defaultDeleteChildEffect;
7248
- exports.defaultDeleteCurrentEffect = defaultDeleteCurrentEffect;
7249
- exports.defaultDispatchMount = defaultDispatchMount;
7250
- exports.defaultDispatchMountLatest = defaultDispatchMountLatest;
7251
- exports.defaultDispatchUnmount = defaultDispatchUnmount;
7252
- exports.defaultDispatchUpdate = defaultDispatchUpdate;
7253
- exports.defaultGenerateEffectMap = defaultGenerateEffectMap;
7254
- exports.defaultGenerateStrict = defaultGenerateStrict;
7255
- exports.defaultGenerateUnmountMap = defaultGenerateUnmountMap;
7256
- exports.defaultGetContextFiber = defaultGetContextFiber;
7257
- exports.defaultGetContextValue = defaultGetContextValue;
7258
- exports.defaultInvokeEffect = defaultInvokeEffect;
7259
- exports.defaultInvokeInsertionEffect = defaultInvokeInsertionEffect;
7260
- exports.defaultInvokeLayoutEffect = defaultInvokeLayoutEffect;
7261
- exports.defaultInvokeUnmountList = defaultInvokeUnmountList;
7262
- exports.defaultReadContext = defaultReadContext;
7263
- exports.defaultReadPromise = defaultReadPromise;
7264
- exports.defaultResolveAliveSuspenseFiber = defaultResolveAliveSuspenseFiber;
7265
- exports.defaultResolveErrorBoundaries = defaultResolveErrorBoundaries;
7266
- exports.defaultResolveScope = defaultResolveScope;
7267
- exports.defaultResolveSuspenseFiber = defaultResolveSuspenseFiber;
7268
- exports.defaultResolveSuspenseValue = defaultResolveSuspenseValue;
7269
- exports.devError = devError;
7270
- exports.devErrorWithFiber = devErrorWithFiber;
7271
- exports.devWarn = devWarn;
7272
- exports.devWarnWithFiber = devWarnWithFiber;
7273
- exports.effect = effect;
7274
- exports.effectHookNode = effectHookNode;
7275
- exports.emptyProps = emptyProps;
7276
- exports.enableDebugUpdateQueue = enableDebugUpdateQueue;
7277
- exports.enableFiberForLog = enableFiberForLog;
7278
- exports.enableLogForCurrentFlowIsRunning = enableLogForCurrentFlowIsRunning;
7279
- exports.enableValidMyReactElement = enableValidMyReactElement;
7280
- exports.fiberToDispatchMap = fiberToDispatchMap;
7281
- exports.flushEffectCallback = flushEffectCallback;
7282
- exports.generateFiberToListWithAction = generateFiberToListWithAction;
7283
- exports.generateFiberToMountList = generateFiberToMountList;
7284
- exports.generateFiberToUnmountList = generateFiberToUnmountList;
7285
- exports.getClassInstanceFieldByInstance = getClassInstanceFieldByInstance;
7286
- exports.getCurrentDispatchFromFiber = getCurrentDispatchFromFiber;
7287
- exports.getCurrentDispatchFromType = getCurrentDispatchFromType;
7288
- exports.getCurrentFibersFromType = getCurrentFibersFromType;
7289
- exports.getCurrentTypeFromRefresh = getCurrentTypeFromRefresh;
7290
- exports.getCurrentTypeFromRefreshOnly = getCurrentTypeFromRefreshOnly;
7291
- exports.getElementFromRefreshIfExist = getElementFromRefreshIfExist;
7292
- exports.getElementName = getElementName;
7293
- exports.getElementTypeFromType = getElementTypeFromType;
7294
- exports.getFiberTree = getFiberTree$1;
7295
- exports.getFiberTreeWithFiber = getFiberTreeWithFiber;
7296
- exports.getHookTree = getHookTree;
7297
- exports.getInstanceContextFiber = getInstanceContextFiber;
7298
- exports.getInstanceEffectState = getInstanceEffectState;
7299
- exports.getInstanceFieldByInstance = getInstanceFieldByInstance;
7300
- exports.getInstanceOwnerFiber = getInstanceOwnerFiber;
7301
- exports.getPlainFiberName = getPlainFiberName;
7302
- exports.getStackTree = getStackTree;
7303
- exports.getTypeFromElement = getTypeFromElement;
7304
- exports.getTypeFromElementNode = getTypeFromElementNode;
7305
- exports.hmr = hmr;
7306
- exports.hmrRevert = hmrRevert;
7307
- exports.hmrUpdate = hmrUpdate;
7308
- exports.hookListUnmount = hookListUnmount;
7309
- exports.initClassInstance = initClassInstance;
7310
- exports.initHMR = initHMR;
7311
- exports.initHookInstance = initHookInstance;
7312
- exports.initInstance = initInstance;
7313
- exports.initScheduler = initScheduler;
7314
- exports.initSuspenseInstance = initSuspenseInstance;
7315
- exports.initVisibleInstance = initVisibleInstance;
7316
- exports.initialFiberNode = initialFiberNode;
7317
- exports.insertionEffect = insertionEffect;
7318
- exports.isCommentElement = isCommentElement;
7319
- exports.isCommentEndElement = isCommentEndElement;
7320
- exports.isCommentStartElement = isCommentStartElement;
7321
- exports.isErrorBoundariesComponent = isErrorBoundariesComponent;
7322
- exports.isErrorBoundariesInstance = isErrorBoundariesInstance;
7323
- exports.layoutEffect = layoutEffect;
7324
- exports.loadLazy = loadLazy;
7325
- exports.loadPromise = loadPromise;
7326
- exports.mountAsync = mountAsync;
7327
- exports.mountClassInstance = mountClassInstance;
7328
- exports.mountLoopAll = mountLoopAll;
7329
- exports.mountLoopAllFromScheduler = mountLoopAllFromScheduler;
7330
- exports.mountSync = mountSync;
7331
- exports.mountToNextFiberFromRoot = mountToNextFiberFromRoot;
7332
- exports.nextWorkActivity = nextWorkActivity;
7333
- exports.nextWorkClassComponent = nextWorkClassComponent;
7334
- exports.nextWorkCommon = nextWorkCommon;
7335
- exports.nextWorkComponent = nextWorkComponent;
7336
- exports.nextWorkConsumer = nextWorkConsumer;
7337
- exports.nextWorkFunctionComponent = nextWorkFunctionComponent;
7338
- exports.nextWorkLazy = nextWorkLazy;
7339
- exports.nextWorkNormal = nextWorkNormal;
7340
- exports.nextWorkProvider = nextWorkProvider;
7341
- exports.nextWorkRoot = nextWorkRoot;
7342
- exports.nextWorkSuspense = nextWorkSuspense;
7343
- exports.onceErrorWithKeyAndFiber = onceErrorWithKeyAndFiber;
7344
- exports.onceWarnWithKeyAndFiber = onceWarnWithKeyAndFiber;
7345
- exports.originalError = originalError;
7346
- exports.originalWarn = originalWarn;
7347
- exports.performToNextFiberFromRoot = performToNextFiberFromRoot;
7348
- exports.prepareUpdateAllDependence = prepareUpdateAllDependence;
7349
- exports.prepareUpdateOnFiber = prepareUpdateOnFiber;
7350
- exports.processAsyncLoadListOnAsyncMount = processAsyncLoadListOnAsyncMount;
7351
- exports.processAsyncLoadListOnSyncMount = processAsyncLoadListOnSyncMount;
7352
- exports.processAsyncLoadListOnUpdate = processAsyncLoadListOnUpdate;
7353
- exports.processClassComponentActive = processClassComponentActive;
7354
- exports.processClassComponentMount = processClassComponentMount;
7355
- exports.processClassComponentUnmount = processClassComponentUnmount;
7356
- exports.processClassComponentUpdate = processClassComponentUpdate;
7357
- exports.processClassComponentUpdateQueueLatest = processClassComponentUpdateQueueLatest;
7358
- exports.processClassComponentUpdateQueueLegacy = processClassComponentUpdateQueueLegacy;
7359
- exports.processConsumer = processConsumer;
7360
- exports.processFunction = processFunction;
7361
- exports.processFunctionComponentUpdateQueueLatest = processFunctionComponentUpdateQueueLatest;
7362
- exports.processFunctionComponentUpdateQueueLegacy = processFunctionComponentUpdateQueueLegacy;
7363
- exports.processHook = processHook;
7364
- exports.processLazy = processLazy;
7365
- exports.processNormalComponentUpdateLatest = processNormalComponentUpdateLatest;
7366
- exports.processNormalComponentUpdateLegacy = processNormalComponentUpdateLegacy;
7367
- exports.processPromise = processPromise;
7368
- exports.processProvider = processProvider;
7369
- exports.processState = processState;
7370
- exports.processSuspense = processSuspense;
7371
- exports.processSuspensePromise = processSuspensePromise;
7372
- exports.resetLogScope = resetLogScope;
7373
- exports.runtimeNextWork = runtimeNextWork;
7374
- exports.runtimeNextWorkDev = runtimeNextWorkDev;
7375
- exports.safeCall = safeCall;
7376
- exports.safeCallWithCurrentFiber = safeCallWithCurrentFiber;
7377
- exports.safeCallWithSync = safeCallWithSync;
7378
- exports.scheduleNext = scheduleNext;
7379
- exports.scheduleUpdate = scheduleUpdate;
7380
- exports.setContextForInstance = setContextForInstance;
7381
- exports.setEffectForInstance = setEffectForInstance;
7382
- exports.setLogScope = setLogScope;
7383
- exports.setOwnerForInstance = setOwnerForInstance;
7384
- exports.setRefreshHandler = setRefreshHandler;
7385
- exports.setRefreshTypeMap = setRefreshTypeMap;
7386
- exports.setSubscribeForInstance = setSubscribeForInstance;
7387
- exports.syncComponentStateToFiber = syncComponentStateToFiber;
7388
- exports.syncFiberStateToComponent = syncFiberStateToComponent;
7389
- exports.syncFlushComponentQueue = syncFlushComponentQueue;
7390
- exports.transformChildrenFiber = transformChildrenFiber;
7391
- exports.triggerError = triggerError;
7392
- exports.triggerFiberUpdateListener = triggerFiberUpdateListener;
7393
- exports.triggerRevert = triggerRevert;
7394
- exports.triggerUpdate = triggerUpdate;
7395
- exports.triggerUpdateOnFiber = triggerUpdateOnFiber;
7396
- exports.typeToFibersMap = typeToFibersMap;
7397
- exports.unmountContainer = unmountContainer;
7398
- exports.unmountFiber = unmountFiber;
7399
- exports.unmountFiberNode = unmountFiberNode;
7400
- exports.unmountInstance = unmountInstance;
7401
- exports.updateConcurrentFromRoot = updateConcurrentFromRoot;
7402
- exports.updateFiberNode = updateFiberNode;
7403
- exports.updateHookNode = updateHookNode;
7404
- exports.updateLoopConcurrentFromRoot = updateLoopConcurrentFromRoot;
7405
- exports.updateLoopSyncFromRoot = updateLoopSyncFromRoot;
7406
- exports.updateSyncFromRoot = updateSyncFromRoot;
7407
- exports.version = version;
7367
+ exports$1.CustomRenderDispatch = CustomRenderDispatch;
7368
+ exports$1.MyReactFiberNode = MyReactFiberNode;
7369
+ exports$1.MyReactHookNode = MyReactHookNode;
7370
+ exports$1.MyWeakMap = MyWeakMap;
7371
+ exports$1.RenderDispatchEvent = RenderDispatchEvent;
7372
+ exports$1.WrapperByLazyScope = WrapperByLazyScope;
7373
+ exports$1.WrapperBySuspenseScope = WrapperBySuspenseScope;
7374
+ exports$1.addEffectCallback = addEffectCallback;
7375
+ exports$1.afterSyncFlush = afterSyncFlush;
7376
+ exports$1.afterSyncUpdate = afterSyncUpdate;
7377
+ exports$1.applyTriggerFiberCb = applyTriggerFiberCb;
7378
+ exports$1.beforeSyncFlush = beforeSyncFlush;
7379
+ exports$1.beforeSyncUpdate = beforeSyncUpdate;
7380
+ exports$1.callWithFiber = callWithFiber;
7381
+ exports$1.checkIsMyReactFiberNode = checkIsMyReactFiberNode;
7382
+ exports$1.checkIsSameType = checkIsSameType;
7383
+ exports$1.clearContainer = clearContainer;
7384
+ exports$1.clearFiberNode = clearFiberNode;
7385
+ exports$1.createFiberNode = createFiberNode;
7386
+ exports$1.createHookNode = createHookNode;
7387
+ exports$1.currentRefreshHandler = currentRefreshHandler;
7388
+ exports$1.currentTriggerFiber = currentTriggerFiber;
7389
+ exports$1.debugWithNode = debugWithNode;
7390
+ exports$1.defaultDeleteChildEffect = defaultDeleteChildEffect;
7391
+ exports$1.defaultDeleteCurrentEffect = defaultDeleteCurrentEffect;
7392
+ exports$1.defaultDispatchMount = defaultDispatchMount;
7393
+ exports$1.defaultDispatchMountLatest = defaultDispatchMountLatest;
7394
+ exports$1.defaultDispatchUnmount = defaultDispatchUnmount;
7395
+ exports$1.defaultDispatchUpdate = defaultDispatchUpdate;
7396
+ exports$1.defaultGenerateEffectMap = defaultGenerateEffectMap;
7397
+ exports$1.defaultGenerateStrict = defaultGenerateStrict;
7398
+ exports$1.defaultGenerateUnmountMap = defaultGenerateUnmountMap;
7399
+ exports$1.defaultGetContextFiber = defaultGetContextFiber;
7400
+ exports$1.defaultGetContextValue = defaultGetContextValue;
7401
+ exports$1.defaultInvokeEffect = defaultInvokeEffect;
7402
+ exports$1.defaultInvokeInsertionEffect = defaultInvokeInsertionEffect;
7403
+ exports$1.defaultInvokeLayoutEffect = defaultInvokeLayoutEffect;
7404
+ exports$1.defaultInvokeUnmountList = defaultInvokeUnmountList;
7405
+ exports$1.defaultReadContext = defaultReadContext;
7406
+ exports$1.defaultReadPromise = defaultReadPromise;
7407
+ exports$1.defaultResolveAliveSuspenseFiber = defaultResolveAliveSuspenseFiber;
7408
+ exports$1.defaultResolveErrorBoundaries = defaultResolveErrorBoundaries;
7409
+ exports$1.defaultResolveScope = defaultResolveScope;
7410
+ exports$1.defaultResolveSuspenseFiber = defaultResolveSuspenseFiber;
7411
+ exports$1.defaultResolveSuspenseValue = defaultResolveSuspenseValue;
7412
+ exports$1.devError = devError;
7413
+ exports$1.devErrorWithFiber = devErrorWithFiber;
7414
+ exports$1.devWarn = devWarn;
7415
+ exports$1.devWarnWithFiber = devWarnWithFiber;
7416
+ exports$1.effect = effect;
7417
+ exports$1.effectHookNode = effectHookNode;
7418
+ exports$1.emptyProps = emptyProps;
7419
+ exports$1.enableDebugUpdateQueue = enableDebugUpdateQueue;
7420
+ exports$1.enableFiberForLog = enableFiberForLog;
7421
+ exports$1.enableLogForCurrentFlowIsRunning = enableLogForCurrentFlowIsRunning;
7422
+ exports$1.enableValidMyReactElement = enableValidMyReactElement;
7423
+ exports$1.fiberToDispatchMap = fiberToDispatchMap;
7424
+ exports$1.flushEffectCallback = flushEffectCallback;
7425
+ exports$1.generateFiberToListWithAction = generateFiberToListWithAction;
7426
+ exports$1.generateFiberToMountList = generateFiberToMountList;
7427
+ exports$1.generateFiberToUnmountList = generateFiberToUnmountList;
7428
+ exports$1.getClassInstanceFieldByInstance = getClassInstanceFieldByInstance;
7429
+ exports$1.getCurrentDispatchFromFiber = getCurrentDispatchFromFiber;
7430
+ exports$1.getCurrentDispatchFromType = getCurrentDispatchFromType;
7431
+ exports$1.getCurrentFibersFromType = getCurrentFibersFromType;
7432
+ exports$1.getCurrentTypeFromRefresh = getCurrentTypeFromRefresh;
7433
+ exports$1.getCurrentTypeFromRefreshOnly = getCurrentTypeFromRefreshOnly;
7434
+ exports$1.getElementFromRefreshIfExist = getElementFromRefreshIfExist;
7435
+ exports$1.getElementName = getElementName;
7436
+ exports$1.getElementTypeFromType = getElementTypeFromType;
7437
+ exports$1.getFiberTree = getFiberTree$1;
7438
+ exports$1.getFiberTreeWithFiber = getFiberTreeWithFiber;
7439
+ exports$1.getHookTree = getHookTree;
7440
+ exports$1.getInstanceContextFiber = getInstanceContextFiber;
7441
+ exports$1.getInstanceEffectState = getInstanceEffectState;
7442
+ exports$1.getInstanceFieldByInstance = getInstanceFieldByInstance;
7443
+ exports$1.getInstanceOwnerFiber = getInstanceOwnerFiber;
7444
+ exports$1.getPlainFiberName = getPlainFiberName;
7445
+ exports$1.getStackTree = getStackTree;
7446
+ exports$1.getTypeFromElement = getTypeFromElement;
7447
+ exports$1.getTypeFromElementNode = getTypeFromElementNode;
7448
+ exports$1.hmr = hmr;
7449
+ exports$1.hmrRevert = hmrRevert;
7450
+ exports$1.hmrUpdate = hmrUpdate;
7451
+ exports$1.hookListUnmount = hookListUnmount;
7452
+ exports$1.initClassInstance = initClassInstance;
7453
+ exports$1.initHMR = initHMR;
7454
+ exports$1.initHookInstance = initHookInstance;
7455
+ exports$1.initInstance = initInstance;
7456
+ exports$1.initScheduler = initScheduler;
7457
+ exports$1.initSuspenseInstance = initSuspenseInstance;
7458
+ exports$1.initVisibleInstance = initVisibleInstance;
7459
+ exports$1.initialFiberNode = initialFiberNode;
7460
+ exports$1.insertionEffect = insertionEffect;
7461
+ exports$1.isCommentElement = isCommentElement;
7462
+ exports$1.isCommentEndElement = isCommentEndElement;
7463
+ exports$1.isCommentStartElement = isCommentStartElement;
7464
+ exports$1.isErrorBoundariesComponent = isErrorBoundariesComponent;
7465
+ exports$1.isErrorBoundariesInstance = isErrorBoundariesInstance;
7466
+ exports$1.layoutEffect = layoutEffect;
7467
+ exports$1.loadLazy = loadLazy;
7468
+ exports$1.loadPromise = loadPromise;
7469
+ exports$1.mountAsync = mountAsync;
7470
+ exports$1.mountClassInstance = mountClassInstance;
7471
+ exports$1.mountLoopAll = mountLoopAll;
7472
+ exports$1.mountLoopAllFromScheduler = mountLoopAllFromScheduler;
7473
+ exports$1.mountSync = mountSync;
7474
+ exports$1.mountToNextFiberFromRoot = mountToNextFiberFromRoot;
7475
+ exports$1.nextWorkActivity = nextWorkActivity;
7476
+ exports$1.nextWorkClassComponent = nextWorkClassComponent;
7477
+ exports$1.nextWorkCommon = nextWorkCommon;
7478
+ exports$1.nextWorkComponent = nextWorkComponent;
7479
+ exports$1.nextWorkConsumer = nextWorkConsumer;
7480
+ exports$1.nextWorkFunctionComponent = nextWorkFunctionComponent;
7481
+ exports$1.nextWorkLazy = nextWorkLazy;
7482
+ exports$1.nextWorkNormal = nextWorkNormal;
7483
+ exports$1.nextWorkProvider = nextWorkProvider;
7484
+ exports$1.nextWorkRoot = nextWorkRoot;
7485
+ exports$1.nextWorkSuspense = nextWorkSuspense;
7486
+ exports$1.onceErrorWithKeyAndFiber = onceErrorWithKeyAndFiber;
7487
+ exports$1.onceWarnWithKeyAndFiber = onceWarnWithKeyAndFiber;
7488
+ exports$1.originalError = originalError;
7489
+ exports$1.originalWarn = originalWarn;
7490
+ exports$1.performToNextFiberFromRoot = performToNextFiberFromRoot;
7491
+ exports$1.prepareUpdateAllDependence = prepareUpdateAllDependence;
7492
+ exports$1.prepareUpdateOnFiber = prepareUpdateOnFiber;
7493
+ exports$1.processAsyncLoadListOnAsyncMount = processAsyncLoadListOnAsyncMount;
7494
+ exports$1.processAsyncLoadListOnSyncMount = processAsyncLoadListOnSyncMount;
7495
+ exports$1.processAsyncLoadListOnUpdate = processAsyncLoadListOnUpdate;
7496
+ exports$1.processClassComponentActive = processClassComponentActive;
7497
+ exports$1.processClassComponentMount = processClassComponentMount;
7498
+ exports$1.processClassComponentUnmount = processClassComponentUnmount;
7499
+ exports$1.processClassComponentUpdate = processClassComponentUpdate;
7500
+ exports$1.processClassComponentUpdateQueueLatest = processClassComponentUpdateQueueLatest;
7501
+ exports$1.processClassComponentUpdateQueueLegacy = processClassComponentUpdateQueueLegacy;
7502
+ exports$1.processConsumer = processConsumer;
7503
+ exports$1.processFunction = processFunction;
7504
+ exports$1.processFunctionComponentUpdateQueueLatest = processFunctionComponentUpdateQueueLatest;
7505
+ exports$1.processFunctionComponentUpdateQueueLegacy = processFunctionComponentUpdateQueueLegacy;
7506
+ exports$1.processHook = processHook;
7507
+ exports$1.processLazy = processLazy;
7508
+ exports$1.processNormalComponentUpdateLatest = processNormalComponentUpdateLatest;
7509
+ exports$1.processNormalComponentUpdateLegacy = processNormalComponentUpdateLegacy;
7510
+ exports$1.processPromise = processPromise;
7511
+ exports$1.processProvider = processProvider;
7512
+ exports$1.processState = processState;
7513
+ exports$1.processSuspense = processSuspense;
7514
+ exports$1.processSuspensePromise = processSuspensePromise;
7515
+ exports$1.resetLogScope = resetLogScope;
7516
+ exports$1.runtimeNextWork = runtimeNextWork;
7517
+ exports$1.runtimeNextWorkDev = runtimeNextWorkDev;
7518
+ exports$1.safeCall = safeCall;
7519
+ exports$1.safeCallWithCurrentFiber = safeCallWithCurrentFiber;
7520
+ exports$1.safeCallWithSync = safeCallWithSync;
7521
+ exports$1.scheduleNext = scheduleNext;
7522
+ exports$1.scheduleUpdate = scheduleUpdate;
7523
+ exports$1.setContextForInstance = setContextForInstance;
7524
+ exports$1.setEffectForInstance = setEffectForInstance;
7525
+ exports$1.setLogScope = setLogScope;
7526
+ exports$1.setOwnerForInstance = setOwnerForInstance;
7527
+ exports$1.setRefreshHandler = setRefreshHandler;
7528
+ exports$1.setRefreshTypeMap = setRefreshTypeMap;
7529
+ exports$1.setSubscribeForInstance = setSubscribeForInstance;
7530
+ exports$1.syncComponentStateToFiber = syncComponentStateToFiber;
7531
+ exports$1.syncFiberStateToComponent = syncFiberStateToComponent;
7532
+ exports$1.syncFlushComponentQueue = syncFlushComponentQueue;
7533
+ exports$1.transformChildrenFiber = transformChildrenFiber;
7534
+ exports$1.triggerError = triggerError;
7535
+ exports$1.triggerFiberUpdateListener = triggerFiberUpdateListener;
7536
+ exports$1.triggerRevert = triggerRevert;
7537
+ exports$1.triggerUpdate = triggerUpdate;
7538
+ exports$1.triggerUpdateOnFiber = triggerUpdateOnFiber;
7539
+ exports$1.typeToFibersMap = typeToFibersMap;
7540
+ exports$1.unmountContainer = unmountContainer;
7541
+ exports$1.unmountFiber = unmountFiber;
7542
+ exports$1.unmountFiberNode = unmountFiberNode;
7543
+ exports$1.unmountInstance = unmountInstance;
7544
+ exports$1.updateConcurrentFromRoot = updateConcurrentFromRoot;
7545
+ exports$1.updateFiberNode = updateFiberNode;
7546
+ exports$1.updateHookNode = updateHookNode;
7547
+ exports$1.updateLoopConcurrentFromRoot = updateLoopConcurrentFromRoot;
7548
+ exports$1.updateLoopSyncFromRoot = updateLoopSyncFromRoot;
7549
+ exports$1.updateSyncFromRoot = updateSyncFromRoot;
7550
+ exports$1.version = version;
7408
7551
  } (index_development));
7409
7552
  return index_development;
7410
7553
  }
@@ -7526,8 +7669,10 @@ var ListTreeNode = /** @class */ (function () {
7526
7669
  return ListTreeNode;
7527
7670
  }());
7528
7671
  var ListTree = /** @class */ (function () {
7529
- function ListTree() {
7672
+ function ListTree(max) {
7530
7673
  this.length = 0;
7674
+ this.maxLength = Infinity;
7675
+ this.maxLength = max || Infinity;
7531
7676
  var _stickyHead = null;
7532
7677
  Object.defineProperty(this, "stickyHead", {
7533
7678
  get: function () {
@@ -7566,6 +7711,9 @@ var ListTree = /** @class */ (function () {
7566
7711
  });
7567
7712
  }
7568
7713
  ListTree.prototype.push = function (node) {
7714
+ while (this.length >= this.maxLength) {
7715
+ this.pop();
7716
+ }
7569
7717
  var listNode = new ListTreeNode(node);
7570
7718
  this.length++;
7571
7719
  if (!this.foot) {
@@ -7583,6 +7731,7 @@ var ListTree = /** @class */ (function () {
7583
7731
  var node_1 = this.stickyFoot;
7584
7732
  this.push(node_1.value);
7585
7733
  this.stickyFoot = null;
7734
+ this.length--;
7586
7735
  }
7587
7736
  else {
7588
7737
  this.length++;
@@ -7595,6 +7744,7 @@ var ListTree = /** @class */ (function () {
7595
7744
  var node_2 = this.stickyHead;
7596
7745
  this.unshift(node_2.value);
7597
7746
  this.stickyHead = null;
7747
+ this.length--;
7598
7748
  }
7599
7749
  else {
7600
7750
  this.length++;
@@ -7613,6 +7763,9 @@ var ListTree = /** @class */ (function () {
7613
7763
  }
7614
7764
  };
7615
7765
  ListTree.prototype.unshift = function (node) {
7766
+ while (this.length >= this.maxLength) {
7767
+ this.shift();
7768
+ }
7616
7769
  var listNode = new ListTreeNode(node);
7617
7770
  this.length++;
7618
7771
  if (!this.head) {
@@ -7630,6 +7783,7 @@ var ListTree = /** @class */ (function () {
7630
7783
  var node_3 = this.stickyHead;
7631
7784
  this.unshift(node_3.value);
7632
7785
  this.stickyHead = null;
7786
+ this.length--;
7633
7787
  }
7634
7788
  else {
7635
7789
  this.length++;
@@ -7642,6 +7796,7 @@ var ListTree = /** @class */ (function () {
7642
7796
  var node_4 = this.stickyFoot;
7643
7797
  this.push(node_4.value);
7644
7798
  this.stickyFoot = null;
7799
+ this.length--;
7645
7800
  }
7646
7801
  else {
7647
7802
  this.length++;
@@ -7793,7 +7948,7 @@ var ListTree = /** @class */ (function () {
7793
7948
  return newList;
7794
7949
  };
7795
7950
  ListTree.prototype.clone = function () {
7796
- var newList = new ListTree();
7951
+ var newList = new ListTree(this.maxLength);
7797
7952
  this.listToFoot(function (v) { return newList.push(v); });
7798
7953
  return newList;
7799
7954
  };
@@ -7814,6 +7969,38 @@ var ListTree = /** @class */ (function () {
7814
7969
  });
7815
7970
  }
7816
7971
 
7972
+ var enableKnownConfigLog = require$$0.createRef(false);
7973
+ var knownConfigKeys = [
7974
+ "prepareForCommit",
7975
+ "resetAfterCommit",
7976
+ "appendChildToContainer",
7977
+ "appendInitialChild",
7978
+ "appendChild",
7979
+ "shouldSetTextContent",
7980
+ "createTextInstance",
7981
+ "createInstance",
7982
+ "preparePortalMount",
7983
+ "insertInContainerBefore",
7984
+ "insertBefore",
7985
+ "getPublicInstance",
7986
+ "removeChildFromContainer",
7987
+ "removeChild",
7988
+ "commitTextUpdate",
7989
+ "prepareUpdate",
7990
+ "commitUpdate",
7991
+ "getRootHostContext",
7992
+ "getChildHostContext",
7993
+ "finalizeInitialChildren",
7994
+ "commitMount",
7995
+ ];
7996
+ var knownConfig = function (config) {
7997
+ Object.keys(config).forEach(function (key) {
7998
+ if (!knownConfigKeys.includes(key)) {
7999
+ console.warn("not used config key ".concat(key, " with %o value"), config[key]);
8000
+ }
8001
+ });
8002
+ };
8003
+
7817
8004
  var DISPATCH_FIELD = "__@my-react/dispatch__";
7818
8005
  var DEV_TOOL_FIELD = "__@my-react/react-devtool-inject__";
7819
8006
  var addGlobalDispatch = function (dispatch) {
@@ -8450,24 +8637,24 @@ var ReconcilerDispatchUpdate = function (_dispatch, _list, config, sync) {
8450
8637
  }
8451
8638
  }
8452
8639
  });
8453
- _list.listToHead(function invokePositionList(_fiber) {
8640
+ _list.listToFoot(function invokeAppendList(_fiber) {
8454
8641
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
8455
8642
  myreactReconcilerExports.safeCallWithCurrentFiber({
8456
8643
  fiber: _fiber,
8457
- action: function safeCallPosition() {
8458
- _dispatch.commitPosition(_fiber);
8644
+ action: function safeCallAppendList() {
8645
+ _dispatch.commitAppend(_fiber);
8459
8646
  var parentFiber = getValidParentFiberWithNode(_dispatch, _fiber);
8460
8647
  parentFiber && pendingFinalizeInitialChildrenFiberSet.add(parentFiber);
8461
8648
  },
8462
8649
  });
8463
8650
  }
8464
8651
  });
8465
- _list.listToFoot(function invokeAppendList(_fiber) {
8652
+ _list.listToHead(function invokePositionList(_fiber) {
8466
8653
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
8467
8654
  myreactReconcilerExports.safeCallWithCurrentFiber({
8468
8655
  fiber: _fiber,
8469
- action: function safeCallAppendList() {
8470
- _dispatch.commitAppend(_fiber);
8656
+ action: function safeCallPosition() {
8657
+ _dispatch.commitPosition(_fiber);
8471
8658
  var parentFiber = getValidParentFiberWithNode(_dispatch, _fiber);
8472
8659
  parentFiber && pendingFinalizeInitialChildrenFiberSet.add(parentFiber);
8473
8660
  },
@@ -8689,10 +8876,10 @@ var autoSetDevHMR = function (dispatch) {
8689
8876
 
8690
8877
  /* eslint-disable @typescript-eslint/no-unused-vars */
8691
8878
  /* eslint-disable @typescript-eslint/ban-ts-comment */
8692
- function loadRemoteScript(url, options) {
8693
- if (options === void 0) { options = {}; }
8694
- return __awaiter(this, void 0, void 0, function () {
8879
+ function loadRemoteScript(url_1) {
8880
+ return __awaiter(this, arguments, void 0, function (url, options) {
8695
8881
  var _a, timeout, _b, context, _c, useEval, controller_1, timeoutId, response, code, error_1, errorMsg;
8882
+ if (options === void 0) { options = {}; }
8696
8883
  return __generator(this, function (_d) {
8697
8884
  switch (_d.label) {
8698
8885
  case 0:
@@ -9042,10 +9229,10 @@ function createSafeRequire() {
9042
9229
  };
9043
9230
  }
9044
9231
  // 增强的模块加载版本(支持导出)
9045
- function loadRemoteModule(url, options) {
9046
- if (options === void 0) { options = {}; }
9047
- return __awaiter(this, void 0, void 0, function () {
9232
+ function loadRemoteModule(url_1) {
9233
+ return __awaiter(this, arguments, void 0, function (url, options) {
9048
9234
  var _a, context, moduleExports, moduleContext;
9235
+ if (options === void 0) { options = {}; }
9049
9236
  return __generator(this, function (_b) {
9050
9237
  switch (_b.label) {
9051
9238
  case 0:
@@ -9079,6 +9266,9 @@ var currentScheduler = require$$0.__my_react_internal__.currentScheduler;
9079
9266
  var Reconciler = function (_config) {
9080
9267
  var rendererPackageName = "@my-react";
9081
9268
  var ReconcilerSet = new Set();
9269
+ if (enableKnownConfigLog.current) {
9270
+ knownConfig(_config);
9271
+ }
9082
9272
  var createContainer = function (_container, flag) {
9083
9273
  prepareScheduler();
9084
9274
  if (flag === 0) {
@@ -9090,6 +9280,7 @@ var Reconciler = function (_config) {
9090
9280
  _container.__flag__ = 1;
9091
9281
  }
9092
9282
  enableDebugFiled.current = true;
9283
+ myreactReconcilerExports.enableDebugUpdateQueue.current = true;
9093
9284
  enableScopeTreeLog.current = false;
9094
9285
  myreactReconcilerExports.enableFiberForLog.current = false;
9095
9286
  return _container;
@@ -9185,14 +9376,15 @@ var Reconciler = function (_config) {
9185
9376
  getPublicRootInstance: getPublicRootInstance,
9186
9377
  injectIntoDevToolsWithSocketIO: injectIntoDevToolsWithSocketIO,
9187
9378
  flushSync: myreactReconcilerExports.safeCallWithSync,
9379
+ flushSyncWork: myreactReconcilerExports.safeCallWithSync,
9188
9380
  batchedUpdates: myreactReconcilerExports.safeCallWithSync,
9189
9381
  };
9190
9382
  };
9191
9383
 
9192
- /* eslint-disable import/export */
9193
- var version = "0.0.12";
9384
+ var version = "0.0.14";
9194
9385
  var createReconciler = Reconciler;
9195
9386
 
9196
9387
  exports.createReconciler = createReconciler;
9197
9388
  exports.default = createReconciler;
9389
+ exports.enableKnownConfigLog = enableKnownConfigLog;
9198
9390
  exports.version = version;