react-dom 19.2.0-canary-63779030-20250328 → 19.2.0-canary-e5dd82a7-20250401

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.
@@ -475,1063 +475,1063 @@
475
475
  (pop(hostTransitionProviderCursor, fiber),
476
476
  (HostTransitionContext._currentValue = NotPendingTransition));
477
477
  }
478
- function typeName(value) {
479
- return (
480
- ("function" === typeof Symbol &&
481
- Symbol.toStringTag &&
482
- value[Symbol.toStringTag]) ||
483
- value.constructor.name ||
484
- "Object"
485
- );
486
- }
487
- function willCoercionThrow(value) {
488
- try {
489
- return testStringCoercion(value), !1;
490
- } catch (e) {
491
- return !0;
478
+ function disabledLog() {}
479
+ function disableLogs() {
480
+ if (0 === disabledDepth) {
481
+ prevLog = console.log;
482
+ prevInfo = console.info;
483
+ prevWarn = console.warn;
484
+ prevError = console.error;
485
+ prevGroup = console.group;
486
+ prevGroupCollapsed = console.groupCollapsed;
487
+ prevGroupEnd = console.groupEnd;
488
+ var props = {
489
+ configurable: !0,
490
+ enumerable: !0,
491
+ value: disabledLog,
492
+ writable: !0
493
+ };
494
+ Object.defineProperties(console, {
495
+ info: props,
496
+ log: props,
497
+ warn: props,
498
+ error: props,
499
+ group: props,
500
+ groupCollapsed: props,
501
+ groupEnd: props
502
+ });
492
503
  }
504
+ disabledDepth++;
493
505
  }
494
- function testStringCoercion(value) {
495
- return "" + value;
496
- }
497
- function checkAttributeStringCoercion(value, attributeName) {
498
- if (willCoercionThrow(value))
499
- return (
500
- console.error(
501
- "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
502
- attributeName,
503
- typeName(value)
504
- ),
505
- testStringCoercion(value)
506
- );
507
- }
508
- function checkCSSPropertyStringCoercion(value, propName) {
509
- if (willCoercionThrow(value))
510
- return (
511
- console.error(
512
- "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
513
- propName,
514
- typeName(value)
515
- ),
516
- testStringCoercion(value)
517
- );
518
- }
519
- function checkFormFieldValueStringCoercion(value) {
520
- if (willCoercionThrow(value))
521
- return (
522
- console.error(
523
- "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
524
- typeName(value)
525
- ),
526
- testStringCoercion(value)
527
- );
528
- }
529
- function injectInternals(internals) {
530
- if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
531
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
532
- if (hook.isDisabled) return !0;
533
- if (!hook.supportsFiber)
534
- return (
535
- console.error(
536
- "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
537
- ),
538
- !0
539
- );
540
- try {
541
- (rendererID = hook.inject(internals)), (injectedHook = hook);
542
- } catch (err) {
543
- console.error("React instrumentation encountered an error: %s.", err);
506
+ function reenableLogs() {
507
+ disabledDepth--;
508
+ if (0 === disabledDepth) {
509
+ var props = { configurable: !0, enumerable: !0, writable: !0 };
510
+ Object.defineProperties(console, {
511
+ log: assign({}, props, { value: prevLog }),
512
+ info: assign({}, props, { value: prevInfo }),
513
+ warn: assign({}, props, { value: prevWarn }),
514
+ error: assign({}, props, { value: prevError }),
515
+ group: assign({}, props, { value: prevGroup }),
516
+ groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
517
+ groupEnd: assign({}, props, { value: prevGroupEnd })
518
+ });
544
519
  }
545
- return hook.checkDCE ? !0 : !1;
520
+ 0 > disabledDepth &&
521
+ console.error(
522
+ "disabledDepth fell below zero. This is a bug in React. Please file an issue."
523
+ );
546
524
  }
547
- function setIsStrictModeForDevtools(newIsStrictMode) {
548
- "function" === typeof log$1 &&
549
- unstable_setDisableYieldValue(newIsStrictMode);
550
- if (injectedHook && "function" === typeof injectedHook.setStrictMode)
525
+ function describeBuiltInComponentFrame(name) {
526
+ if (void 0 === prefix)
551
527
  try {
552
- injectedHook.setStrictMode(rendererID, newIsStrictMode);
553
- } catch (err) {
554
- hasLoggedError ||
555
- ((hasLoggedError = !0),
556
- console.error(
557
- "React instrumentation encountered an error: %s",
558
- err
559
- ));
528
+ throw Error();
529
+ } catch (x) {
530
+ var match = x.stack.trim().match(/\n( *(at )?)/);
531
+ prefix = (match && match[1]) || "";
532
+ suffix =
533
+ -1 < x.stack.indexOf("\n at")
534
+ ? " (<anonymous>)"
535
+ : -1 < x.stack.indexOf("@")
536
+ ? "@unknown:0:0"
537
+ : "";
560
538
  }
539
+ return "\n" + prefix + name + suffix;
561
540
  }
562
- function injectProfilingHooks(profilingHooks) {
563
- injectedProfilingHooks = profilingHooks;
564
- }
565
- function markCommitStopped() {
566
- null !== injectedProfilingHooks &&
567
- "function" === typeof injectedProfilingHooks.markCommitStopped &&
568
- injectedProfilingHooks.markCommitStopped();
569
- }
570
- function markComponentRenderStarted(fiber) {
571
- null !== injectedProfilingHooks &&
572
- "function" ===
573
- typeof injectedProfilingHooks.markComponentRenderStarted &&
574
- injectedProfilingHooks.markComponentRenderStarted(fiber);
575
- }
576
- function markComponentRenderStopped() {
577
- null !== injectedProfilingHooks &&
578
- "function" ===
579
- typeof injectedProfilingHooks.markComponentRenderStopped &&
580
- injectedProfilingHooks.markComponentRenderStopped();
581
- }
582
- function markRenderStarted(lanes) {
583
- null !== injectedProfilingHooks &&
584
- "function" === typeof injectedProfilingHooks.markRenderStarted &&
585
- injectedProfilingHooks.markRenderStarted(lanes);
586
- }
587
- function markRenderStopped() {
588
- null !== injectedProfilingHooks &&
589
- "function" === typeof injectedProfilingHooks.markRenderStopped &&
590
- injectedProfilingHooks.markRenderStopped();
591
- }
592
- function markStateUpdateScheduled(fiber, lane) {
593
- null !== injectedProfilingHooks &&
594
- "function" === typeof injectedProfilingHooks.markStateUpdateScheduled &&
595
- injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
596
- }
597
- function clz32Fallback(x) {
598
- x >>>= 0;
599
- return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
600
- }
601
- function getLabelForLane(lane) {
602
- if (lane & 1) return "SyncHydrationLane";
603
- if (lane & 2) return "Sync";
604
- if (lane & 4) return "InputContinuousHydration";
605
- if (lane & 8) return "InputContinuous";
606
- if (lane & 16) return "DefaultHydration";
607
- if (lane & 32) return "Default";
608
- if (lane & 128) return "TransitionHydration";
609
- if (lane & 4194048) return "Transition";
610
- if (lane & 62914560) return "Retry";
611
- if (lane & 67108864) return "SelectiveHydration";
612
- if (lane & 134217728) return "IdleHydration";
613
- if (lane & 268435456) return "Idle";
614
- if (lane & 536870912) return "Offscreen";
615
- if (lane & 1073741824) return "Deferred";
616
- }
617
- function getHighestPriorityLanes(lanes) {
618
- var pendingSyncLanes = lanes & 42;
619
- if (0 !== pendingSyncLanes) return pendingSyncLanes;
620
- switch (lanes & -lanes) {
621
- case 1:
622
- return 1;
623
- case 2:
624
- return 2;
625
- case 4:
626
- return 4;
627
- case 8:
628
- return 8;
629
- case 16:
630
- return 16;
631
- case 32:
632
- return 32;
633
- case 64:
634
- return 64;
635
- case 128:
636
- return 128;
637
- case 256:
638
- case 512:
639
- case 1024:
640
- case 2048:
641
- case 4096:
642
- case 8192:
643
- case 16384:
644
- case 32768:
645
- case 65536:
646
- case 131072:
647
- case 262144:
648
- case 524288:
649
- case 1048576:
650
- case 2097152:
651
- return lanes & 4194048;
652
- case 4194304:
653
- case 8388608:
654
- case 16777216:
655
- case 33554432:
656
- return lanes & 62914560;
657
- case 67108864:
658
- return 67108864;
659
- case 134217728:
660
- return 134217728;
661
- case 268435456:
662
- return 268435456;
663
- case 536870912:
664
- return 536870912;
665
- case 1073741824:
666
- return 0;
667
- default:
668
- return (
669
- console.error(
670
- "Should have found matching lanes. This is a bug in React."
671
- ),
672
- lanes
673
- );
674
- }
675
- }
676
- function getNextLanes(root, wipLanes, rootHasPendingCommit) {
677
- var pendingLanes = root.pendingLanes;
678
- if (0 === pendingLanes) return 0;
679
- var nextLanes = 0,
680
- suspendedLanes = root.suspendedLanes,
681
- pingedLanes = root.pingedLanes;
682
- root = root.warmLanes;
683
- var nonIdlePendingLanes = pendingLanes & 134217727;
684
- 0 !== nonIdlePendingLanes
685
- ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
686
- 0 !== pendingLanes
687
- ? (nextLanes = getHighestPriorityLanes(pendingLanes))
688
- : ((pingedLanes &= nonIdlePendingLanes),
689
- 0 !== pingedLanes
690
- ? (nextLanes = getHighestPriorityLanes(pingedLanes))
691
- : rootHasPendingCommit ||
692
- ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
693
- 0 !== rootHasPendingCommit &&
694
- (nextLanes =
695
- getHighestPriorityLanes(rootHasPendingCommit)))))
696
- : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
697
- 0 !== nonIdlePendingLanes
698
- ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
699
- : 0 !== pingedLanes
700
- ? (nextLanes = getHighestPriorityLanes(pingedLanes))
701
- : rootHasPendingCommit ||
702
- ((rootHasPendingCommit = pendingLanes & ~root),
703
- 0 !== rootHasPendingCommit &&
704
- (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
705
- return 0 === nextLanes
706
- ? 0
707
- : 0 !== wipLanes &&
708
- wipLanes !== nextLanes &&
709
- 0 === (wipLanes & suspendedLanes) &&
710
- ((suspendedLanes = nextLanes & -nextLanes),
711
- (rootHasPendingCommit = wipLanes & -wipLanes),
712
- suspendedLanes >= rootHasPendingCommit ||
713
- (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
714
- ? wipLanes
715
- : nextLanes;
716
- }
717
- function checkIfRootIsPrerendering(root, renderLanes) {
718
- return (
719
- 0 ===
720
- (root.pendingLanes &
721
- ~(root.suspendedLanes & ~root.pingedLanes) &
722
- renderLanes)
723
- );
724
- }
725
- function computeExpirationTime(lane, currentTime) {
726
- switch (lane) {
727
- case 1:
728
- case 2:
729
- case 4:
730
- case 8:
731
- case 64:
732
- return currentTime + 250;
733
- case 16:
734
- case 32:
735
- case 128:
736
- case 256:
737
- case 512:
738
- case 1024:
739
- case 2048:
740
- case 4096:
741
- case 8192:
742
- case 16384:
743
- case 32768:
744
- case 65536:
745
- case 131072:
746
- case 262144:
747
- case 524288:
748
- case 1048576:
749
- case 2097152:
750
- return currentTime + 5e3;
751
- case 4194304:
752
- case 8388608:
753
- case 16777216:
754
- case 33554432:
755
- return -1;
756
- case 67108864:
757
- case 134217728:
758
- case 268435456:
759
- case 536870912:
760
- case 1073741824:
761
- return -1;
762
- default:
763
- return (
764
- console.error(
765
- "Should have found matching lanes. This is a bug in React."
766
- ),
767
- -1
541
+ function describeNativeComponentFrame(fn, construct) {
542
+ if (!fn || reentry) return "";
543
+ var frame = componentFrameCache.get(fn);
544
+ if (void 0 !== frame) return frame;
545
+ reentry = !0;
546
+ frame = Error.prepareStackTrace;
547
+ Error.prepareStackTrace = void 0;
548
+ var previousDispatcher = null;
549
+ previousDispatcher = ReactSharedInternals.H;
550
+ ReactSharedInternals.H = null;
551
+ disableLogs();
552
+ try {
553
+ var RunInRootFrame = {
554
+ DetermineComponentFrameRoot: function () {
555
+ try {
556
+ if (construct) {
557
+ var Fake = function () {
558
+ throw Error();
559
+ };
560
+ Object.defineProperty(Fake.prototype, "props", {
561
+ set: function () {
562
+ throw Error();
563
+ }
564
+ });
565
+ if ("object" === typeof Reflect && Reflect.construct) {
566
+ try {
567
+ Reflect.construct(Fake, []);
568
+ } catch (x) {
569
+ var control = x;
570
+ }
571
+ Reflect.construct(fn, [], Fake);
572
+ } else {
573
+ try {
574
+ Fake.call();
575
+ } catch (x$0) {
576
+ control = x$0;
577
+ }
578
+ fn.call(Fake.prototype);
579
+ }
580
+ } else {
581
+ try {
582
+ throw Error();
583
+ } catch (x$1) {
584
+ control = x$1;
585
+ }
586
+ (Fake = fn()) &&
587
+ "function" === typeof Fake.catch &&
588
+ Fake.catch(function () {});
589
+ }
590
+ } catch (sample) {
591
+ if (sample && control && "string" === typeof sample.stack)
592
+ return [sample.stack, control.stack];
593
+ }
594
+ return [null, null];
595
+ }
596
+ };
597
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
598
+ "DetermineComponentFrameRoot";
599
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
600
+ RunInRootFrame.DetermineComponentFrameRoot,
601
+ "name"
602
+ );
603
+ namePropDescriptor &&
604
+ namePropDescriptor.configurable &&
605
+ Object.defineProperty(
606
+ RunInRootFrame.DetermineComponentFrameRoot,
607
+ "name",
608
+ { value: "DetermineComponentFrameRoot" }
768
609
  );
769
- }
770
- }
771
- function claimNextTransitionLane() {
772
- var lane = nextTransitionLane;
773
- nextTransitionLane <<= 1;
774
- 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
775
- return lane;
776
- }
777
- function claimNextRetryLane() {
778
- var lane = nextRetryLane;
779
- nextRetryLane <<= 1;
780
- 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
781
- return lane;
782
- }
783
- function createLaneMap(initial) {
784
- for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
785
- return laneMap;
786
- }
787
- function markRootUpdated$1(root, updateLane) {
788
- root.pendingLanes |= updateLane;
789
- 268435456 !== updateLane &&
790
- ((root.suspendedLanes = 0),
791
- (root.pingedLanes = 0),
792
- (root.warmLanes = 0));
793
- }
794
- function markRootFinished(
795
- root,
796
- finishedLanes,
797
- remainingLanes,
798
- spawnedLane,
799
- updatedLanes,
800
- suspendedRetryLanes
801
- ) {
802
- var previouslyPendingLanes = root.pendingLanes;
803
- root.pendingLanes = remainingLanes;
804
- root.suspendedLanes = 0;
805
- root.pingedLanes = 0;
806
- root.warmLanes = 0;
807
- root.expiredLanes &= remainingLanes;
808
- root.entangledLanes &= remainingLanes;
809
- root.errorRecoveryDisabledLanes &= remainingLanes;
810
- root.shellSuspendCounter = 0;
811
- var entanglements = root.entanglements,
812
- expirationTimes = root.expirationTimes,
813
- hiddenUpdates = root.hiddenUpdates;
814
- for (
815
- remainingLanes = previouslyPendingLanes & ~remainingLanes;
816
- 0 < remainingLanes;
610
+ var _RunInRootFrame$Deter =
611
+ RunInRootFrame.DetermineComponentFrameRoot(),
612
+ sampleStack = _RunInRootFrame$Deter[0],
613
+ controlStack = _RunInRootFrame$Deter[1];
614
+ if (sampleStack && controlStack) {
615
+ var sampleLines = sampleStack.split("\n"),
616
+ controlLines = controlStack.split("\n");
617
+ for (
618
+ _RunInRootFrame$Deter = namePropDescriptor = 0;
619
+ namePropDescriptor < sampleLines.length &&
620
+ !sampleLines[namePropDescriptor].includes(
621
+ "DetermineComponentFrameRoot"
622
+ );
817
623
 
818
- ) {
819
- var index = 31 - clz32(remainingLanes),
820
- lane = 1 << index;
821
- entanglements[index] = 0;
822
- expirationTimes[index] = -1;
823
- var hiddenUpdatesForLane = hiddenUpdates[index];
824
- if (null !== hiddenUpdatesForLane)
624
+ )
625
+ namePropDescriptor++;
825
626
  for (
826
- hiddenUpdates[index] = null, index = 0;
827
- index < hiddenUpdatesForLane.length;
828
- index++
829
- ) {
830
- var update = hiddenUpdatesForLane[index];
831
- null !== update && (update.lane &= -536870913);
832
- }
833
- remainingLanes &= ~lane;
627
+ ;
628
+ _RunInRootFrame$Deter < controlLines.length &&
629
+ !controlLines[_RunInRootFrame$Deter].includes(
630
+ "DetermineComponentFrameRoot"
631
+ );
632
+
633
+ )
634
+ _RunInRootFrame$Deter++;
635
+ if (
636
+ namePropDescriptor === sampleLines.length ||
637
+ _RunInRootFrame$Deter === controlLines.length
638
+ )
639
+ for (
640
+ namePropDescriptor = sampleLines.length - 1,
641
+ _RunInRootFrame$Deter = controlLines.length - 1;
642
+ 1 <= namePropDescriptor &&
643
+ 0 <= _RunInRootFrame$Deter &&
644
+ sampleLines[namePropDescriptor] !==
645
+ controlLines[_RunInRootFrame$Deter];
646
+
647
+ )
648
+ _RunInRootFrame$Deter--;
649
+ for (
650
+ ;
651
+ 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
652
+ namePropDescriptor--, _RunInRootFrame$Deter--
653
+ )
654
+ if (
655
+ sampleLines[namePropDescriptor] !==
656
+ controlLines[_RunInRootFrame$Deter]
657
+ ) {
658
+ if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
659
+ do
660
+ if (
661
+ (namePropDescriptor--,
662
+ _RunInRootFrame$Deter--,
663
+ 0 > _RunInRootFrame$Deter ||
664
+ sampleLines[namePropDescriptor] !==
665
+ controlLines[_RunInRootFrame$Deter])
666
+ ) {
667
+ var _frame =
668
+ "\n" +
669
+ sampleLines[namePropDescriptor].replace(
670
+ " at new ",
671
+ " at "
672
+ );
673
+ fn.displayName &&
674
+ _frame.includes("<anonymous>") &&
675
+ (_frame = _frame.replace("<anonymous>", fn.displayName));
676
+ "function" === typeof fn &&
677
+ componentFrameCache.set(fn, _frame);
678
+ return _frame;
679
+ }
680
+ while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
681
+ }
682
+ break;
683
+ }
684
+ }
685
+ } finally {
686
+ (reentry = !1),
687
+ (ReactSharedInternals.H = previousDispatcher),
688
+ reenableLogs(),
689
+ (Error.prepareStackTrace = frame);
834
690
  }
835
- 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
836
- 0 !== suspendedRetryLanes &&
837
- 0 === updatedLanes &&
838
- 0 !== root.tag &&
839
- (root.suspendedLanes |=
840
- suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
691
+ sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
692
+ ? describeBuiltInComponentFrame(sampleLines)
693
+ : "";
694
+ "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
695
+ return sampleLines;
841
696
  }
842
- function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
843
- root.pendingLanes |= spawnedLane;
844
- root.suspendedLanes &= ~spawnedLane;
845
- var spawnedLaneIndex = 31 - clz32(spawnedLane);
846
- root.entangledLanes |= spawnedLane;
847
- root.entanglements[spawnedLaneIndex] =
848
- root.entanglements[spawnedLaneIndex] |
849
- 1073741824 |
850
- (entangledLanes & 4194090);
697
+ function formatOwnerStack(error) {
698
+ var prevPrepareStackTrace = Error.prepareStackTrace;
699
+ Error.prepareStackTrace = void 0;
700
+ error = error.stack;
701
+ Error.prepareStackTrace = prevPrepareStackTrace;
702
+ error.startsWith("Error: react-stack-top-frame\n") &&
703
+ (error = error.slice(29));
704
+ prevPrepareStackTrace = error.indexOf("\n");
705
+ -1 !== prevPrepareStackTrace &&
706
+ (error = error.slice(prevPrepareStackTrace + 1));
707
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
708
+ -1 !== prevPrepareStackTrace &&
709
+ (prevPrepareStackTrace = error.lastIndexOf(
710
+ "\n",
711
+ prevPrepareStackTrace
712
+ ));
713
+ if (-1 !== prevPrepareStackTrace)
714
+ error = error.slice(0, prevPrepareStackTrace);
715
+ else return "";
716
+ return error;
851
717
  }
852
- function markRootEntangled(root, entangledLanes) {
853
- var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
854
- for (root = root.entanglements; rootEntangledLanes; ) {
855
- var index = 31 - clz32(rootEntangledLanes),
856
- lane = 1 << index;
857
- (lane & entangledLanes) | (root[index] & entangledLanes) &&
858
- (root[index] |= entangledLanes);
859
- rootEntangledLanes &= ~lane;
718
+ function describeFiber(fiber) {
719
+ switch (fiber.tag) {
720
+ case 26:
721
+ case 27:
722
+ case 5:
723
+ return describeBuiltInComponentFrame(fiber.type);
724
+ case 16:
725
+ return describeBuiltInComponentFrame("Lazy");
726
+ case 13:
727
+ return describeBuiltInComponentFrame("Suspense");
728
+ case 19:
729
+ return describeBuiltInComponentFrame("SuspenseList");
730
+ case 0:
731
+ case 15:
732
+ return describeNativeComponentFrame(fiber.type, !1);
733
+ case 11:
734
+ return describeNativeComponentFrame(fiber.type.render, !1);
735
+ case 1:
736
+ return describeNativeComponentFrame(fiber.type, !0);
737
+ case 31:
738
+ return describeBuiltInComponentFrame("Activity");
739
+ default:
740
+ return "";
860
741
  }
861
742
  }
862
- function getBumpedLaneForHydrationByLane(lane) {
863
- switch (lane) {
864
- case 2:
865
- lane = 1;
866
- break;
867
- case 8:
868
- lane = 4;
869
- break;
870
- case 32:
871
- lane = 16;
872
- break;
873
- case 256:
874
- case 512:
875
- case 1024:
876
- case 2048:
877
- case 4096:
878
- case 8192:
879
- case 16384:
880
- case 32768:
881
- case 65536:
882
- case 131072:
883
- case 262144:
884
- case 524288:
885
- case 1048576:
886
- case 2097152:
887
- case 4194304:
888
- case 8388608:
889
- case 16777216:
890
- case 33554432:
891
- lane = 128;
892
- break;
893
- case 268435456:
894
- lane = 134217728;
895
- break;
896
- default:
897
- lane = 0;
743
+ function getStackByFiberInDevAndProd(workInProgress) {
744
+ try {
745
+ var info = "";
746
+ do {
747
+ info += describeFiber(workInProgress);
748
+ var debugInfo = workInProgress._debugInfo;
749
+ if (debugInfo)
750
+ for (var i = debugInfo.length - 1; 0 <= i; i--) {
751
+ var entry = debugInfo[i];
752
+ if ("string" === typeof entry.name) {
753
+ var JSCompiler_temp_const = info,
754
+ env = entry.env;
755
+ var JSCompiler_inline_result = describeBuiltInComponentFrame(
756
+ entry.name + (env ? " [" + env + "]" : "")
757
+ );
758
+ info = JSCompiler_temp_const + JSCompiler_inline_result;
759
+ }
760
+ }
761
+ workInProgress = workInProgress.return;
762
+ } while (workInProgress);
763
+ return info;
764
+ } catch (x) {
765
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
898
766
  }
899
- return lane;
900
767
  }
901
- function addFiberToLanesMap(root, fiber, lanes) {
902
- if (isDevToolsPresent)
903
- for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
904
- var index = 31 - clz32(lanes),
905
- lane = 1 << index;
906
- root[index].add(fiber);
907
- lanes &= ~lane;
908
- }
768
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
769
+ return (fn = fn ? fn.displayName || fn.name : "")
770
+ ? describeBuiltInComponentFrame(fn)
771
+ : "";
909
772
  }
910
- function movePendingFibersToMemoized(root, lanes) {
911
- if (isDevToolsPresent)
912
- for (
913
- var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
914
- memoizedUpdaters = root.memoizedUpdaters;
915
- 0 < lanes;
916
-
917
- ) {
918
- var index = 31 - clz32(lanes);
919
- root = 1 << index;
920
- index = pendingUpdatersLaneMap[index];
921
- 0 < index.size &&
922
- (index.forEach(function (fiber) {
923
- var alternate = fiber.alternate;
924
- (null !== alternate && memoizedUpdaters.has(alternate)) ||
925
- memoizedUpdaters.add(fiber);
926
- }),
927
- index.clear());
928
- lanes &= ~root;
773
+ function getCurrentFiberOwnerNameInDevOrNull() {
774
+ if (null === current) return null;
775
+ var owner = current._debugOwner;
776
+ return null != owner ? getComponentNameFromOwner(owner) : null;
777
+ }
778
+ function getCurrentFiberStackInDev() {
779
+ if (null === current) return "";
780
+ var workInProgress = current;
781
+ try {
782
+ var info = "";
783
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
784
+ switch (workInProgress.tag) {
785
+ case 26:
786
+ case 27:
787
+ case 5:
788
+ info += describeBuiltInComponentFrame(workInProgress.type);
789
+ break;
790
+ case 13:
791
+ info += describeBuiltInComponentFrame("Suspense");
792
+ break;
793
+ case 19:
794
+ info += describeBuiltInComponentFrame("SuspenseList");
795
+ break;
796
+ case 31:
797
+ info += describeBuiltInComponentFrame("Activity");
798
+ break;
799
+ case 30:
800
+ case 0:
801
+ case 15:
802
+ case 1:
803
+ workInProgress._debugOwner ||
804
+ "" !== info ||
805
+ (info += describeFunctionComponentFrameWithoutLineNumber(
806
+ workInProgress.type
807
+ ));
808
+ break;
809
+ case 11:
810
+ workInProgress._debugOwner ||
811
+ "" !== info ||
812
+ (info += describeFunctionComponentFrameWithoutLineNumber(
813
+ workInProgress.type.render
814
+ ));
929
815
  }
816
+ for (; workInProgress; )
817
+ if ("number" === typeof workInProgress.tag) {
818
+ var fiber = workInProgress;
819
+ workInProgress = fiber._debugOwner;
820
+ var debugStack = fiber._debugStack;
821
+ workInProgress &&
822
+ debugStack &&
823
+ ("string" !== typeof debugStack &&
824
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
825
+ "" !== debugStack && (info += "\n" + debugStack));
826
+ } else if (null != workInProgress.debugStack) {
827
+ var ownerStack = workInProgress.debugStack;
828
+ (workInProgress = workInProgress.owner) &&
829
+ ownerStack &&
830
+ (info += "\n" + formatOwnerStack(ownerStack));
831
+ } else break;
832
+ var JSCompiler_inline_result = info;
833
+ } catch (x) {
834
+ JSCompiler_inline_result =
835
+ "\nError generating stack: " + x.message + "\n" + x.stack;
836
+ }
837
+ return JSCompiler_inline_result;
930
838
  }
931
- function lanesToEventPriority(lanes) {
932
- lanes &= -lanes;
933
- return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
934
- ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes
935
- ? 0 !== (lanes & 134217727)
936
- ? DefaultEventPriority
937
- : IdleEventPriority
938
- : ContinuousEventPriority
939
- : DiscreteEventPriority;
940
- }
941
- function resolveUpdatePriority() {
942
- var updatePriority = ReactDOMSharedInternals.p;
943
- if (0 !== updatePriority) return updatePriority;
944
- updatePriority = window.event;
945
- return void 0 === updatePriority
946
- ? DefaultEventPriority
947
- : getEventPriority(updatePriority.type);
948
- }
949
- function runWithPriority(priority, fn) {
950
- var previousPriority = ReactDOMSharedInternals.p;
839
+ function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
840
+ var previousFiber = current;
841
+ setCurrentFiber(fiber);
951
842
  try {
952
- return (ReactDOMSharedInternals.p = priority), fn();
843
+ return null !== fiber && fiber._debugTask
844
+ ? fiber._debugTask.run(
845
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
846
+ )
847
+ : callback(arg0, arg1, arg2, arg3, arg4);
953
848
  } finally {
954
- ReactDOMSharedInternals.p = previousPriority;
849
+ setCurrentFiber(previousFiber);
955
850
  }
851
+ throw Error(
852
+ "runWithFiberInDEV should never be called in production. This is a bug in React."
853
+ );
956
854
  }
957
- function detachDeletedInstance(node) {
958
- delete node[internalInstanceKey];
959
- delete node[internalPropsKey];
960
- delete node[internalEventHandlersKey];
961
- delete node[internalEventHandlerListenersKey];
962
- delete node[internalEventHandlesSetKey];
855
+ function setCurrentFiber(fiber) {
856
+ ReactSharedInternals.getCurrentStack =
857
+ null === fiber ? null : getCurrentFiberStackInDev;
858
+ isRendering = !1;
859
+ current = fiber;
963
860
  }
964
- function getClosestInstanceFromNode(targetNode) {
965
- var targetInst = targetNode[internalInstanceKey];
966
- if (targetInst) return targetInst;
967
- for (var parentNode = targetNode.parentNode; parentNode; ) {
968
- if (
969
- (targetInst =
970
- parentNode[internalContainerInstanceKey] ||
971
- parentNode[internalInstanceKey])
972
- ) {
973
- parentNode = targetInst.alternate;
974
- if (
975
- null !== targetInst.child ||
976
- (null !== parentNode && null !== parentNode.child)
977
- )
978
- for (
979
- targetNode = getParentSuspenseInstance(targetNode);
980
- null !== targetNode;
981
-
982
- ) {
983
- if ((parentNode = targetNode[internalInstanceKey]))
984
- return parentNode;
985
- targetNode = getParentSuspenseInstance(targetNode);
986
- }
987
- return targetInst;
988
- }
989
- targetNode = parentNode;
990
- parentNode = targetNode.parentNode;
991
- }
992
- return null;
861
+ function typeName(value) {
862
+ return (
863
+ ("function" === typeof Symbol &&
864
+ Symbol.toStringTag &&
865
+ value[Symbol.toStringTag]) ||
866
+ value.constructor.name ||
867
+ "Object"
868
+ );
993
869
  }
994
- function getInstanceFromNode(node) {
995
- if (
996
- (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
997
- ) {
998
- var tag = node.tag;
999
- if (
1000
- 5 === tag ||
1001
- 6 === tag ||
1002
- 13 === tag ||
1003
- 26 === tag ||
1004
- 27 === tag ||
1005
- 3 === tag
1006
- )
1007
- return node;
870
+ function willCoercionThrow(value) {
871
+ try {
872
+ return testStringCoercion(value), !1;
873
+ } catch (e) {
874
+ return !0;
1008
875
  }
1009
- return null;
1010
876
  }
1011
- function getNodeFromInstance(inst) {
1012
- var tag = inst.tag;
1013
- if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1014
- return inst.stateNode;
1015
- throw Error("getNodeFromInstance: Invalid argument.");
877
+ function testStringCoercion(value) {
878
+ return "" + value;
1016
879
  }
1017
- function getResourcesFromRoot(root) {
1018
- var resources = root[internalRootNodeResourcesKey];
1019
- resources ||
1020
- (resources = root[internalRootNodeResourcesKey] =
1021
- { hoistableStyles: new Map(), hoistableScripts: new Map() });
1022
- return resources;
880
+ function checkAttributeStringCoercion(value, attributeName) {
881
+ if (willCoercionThrow(value))
882
+ return (
883
+ console.error(
884
+ "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
885
+ attributeName,
886
+ typeName(value)
887
+ ),
888
+ testStringCoercion(value)
889
+ );
1023
890
  }
1024
- function markNodeAsHoistable(node) {
1025
- node[internalHoistableMarker] = !0;
891
+ function checkCSSPropertyStringCoercion(value, propName) {
892
+ if (willCoercionThrow(value))
893
+ return (
894
+ console.error(
895
+ "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
896
+ propName,
897
+ typeName(value)
898
+ ),
899
+ testStringCoercion(value)
900
+ );
1026
901
  }
1027
- function registerTwoPhaseEvent(registrationName, dependencies) {
1028
- registerDirectEvent(registrationName, dependencies);
1029
- registerDirectEvent(registrationName + "Capture", dependencies);
902
+ function checkFormFieldValueStringCoercion(value) {
903
+ if (willCoercionThrow(value))
904
+ return (
905
+ console.error(
906
+ "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
907
+ typeName(value)
908
+ ),
909
+ testStringCoercion(value)
910
+ );
1030
911
  }
1031
- function registerDirectEvent(registrationName, dependencies) {
1032
- registrationNameDependencies[registrationName] &&
1033
- console.error(
1034
- "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1035
- registrationName
912
+ function injectInternals(internals) {
913
+ if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
914
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
915
+ if (hook.isDisabled) return !0;
916
+ if (!hook.supportsFiber)
917
+ return (
918
+ console.error(
919
+ "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
920
+ ),
921
+ !0
1036
922
  );
1037
- registrationNameDependencies[registrationName] = dependencies;
1038
- var lowerCasedName = registrationName.toLowerCase();
1039
- possibleRegistrationNames[lowerCasedName] = registrationName;
1040
- "onDoubleClick" === registrationName &&
1041
- (possibleRegistrationNames.ondblclick = registrationName);
1042
- for (
1043
- registrationName = 0;
1044
- registrationName < dependencies.length;
1045
- registrationName++
1046
- )
1047
- allNativeEvents.add(dependencies[registrationName]);
923
+ try {
924
+ (rendererID = hook.inject(internals)), (injectedHook = hook);
925
+ } catch (err) {
926
+ console.error("React instrumentation encountered an error: %s.", err);
927
+ }
928
+ return hook.checkDCE ? !0 : !1;
1048
929
  }
1049
- function checkControlledValueProps(tagName, props) {
1050
- hasReadOnlyValue[props.type] ||
1051
- props.onChange ||
1052
- props.onInput ||
1053
- props.readOnly ||
1054
- props.disabled ||
1055
- null == props.value ||
1056
- ("select" === tagName
1057
- ? console.error(
1058
- "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
1059
- )
1060
- : console.error(
1061
- "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
930
+ function setIsStrictModeForDevtools(newIsStrictMode) {
931
+ "function" === typeof log$1 &&
932
+ unstable_setDisableYieldValue(newIsStrictMode);
933
+ if (injectedHook && "function" === typeof injectedHook.setStrictMode)
934
+ try {
935
+ injectedHook.setStrictMode(rendererID, newIsStrictMode);
936
+ } catch (err) {
937
+ hasLoggedError ||
938
+ ((hasLoggedError = !0),
939
+ console.error(
940
+ "React instrumentation encountered an error: %s",
941
+ err
1062
942
  ));
1063
- props.onChange ||
1064
- props.readOnly ||
1065
- props.disabled ||
1066
- null == props.checked ||
1067
- console.error(
1068
- "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
1069
- );
943
+ }
944
+ }
945
+ function injectProfilingHooks(profilingHooks) {
946
+ injectedProfilingHooks = profilingHooks;
947
+ }
948
+ function markCommitStopped() {
949
+ null !== injectedProfilingHooks &&
950
+ "function" === typeof injectedProfilingHooks.markCommitStopped &&
951
+ injectedProfilingHooks.markCommitStopped();
952
+ }
953
+ function markComponentRenderStarted(fiber) {
954
+ null !== injectedProfilingHooks &&
955
+ "function" ===
956
+ typeof injectedProfilingHooks.markComponentRenderStarted &&
957
+ injectedProfilingHooks.markComponentRenderStarted(fiber);
958
+ }
959
+ function markComponentRenderStopped() {
960
+ null !== injectedProfilingHooks &&
961
+ "function" ===
962
+ typeof injectedProfilingHooks.markComponentRenderStopped &&
963
+ injectedProfilingHooks.markComponentRenderStopped();
1070
964
  }
1071
- function isAttributeNameSafe(attributeName) {
1072
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1073
- return !0;
1074
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1075
- return !1;
1076
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1077
- return (validatedAttributeNameCache[attributeName] = !0);
1078
- illegalAttributeNameCache[attributeName] = !0;
1079
- console.error("Invalid attribute name: `%s`", attributeName);
1080
- return !1;
965
+ function markRenderStarted(lanes) {
966
+ null !== injectedProfilingHooks &&
967
+ "function" === typeof injectedProfilingHooks.markRenderStarted &&
968
+ injectedProfilingHooks.markRenderStarted(lanes);
1081
969
  }
1082
- function getValueForAttributeOnCustomComponent(node, name, expected) {
1083
- if (isAttributeNameSafe(name)) {
1084
- if (!node.hasAttribute(name)) {
1085
- switch (typeof expected) {
1086
- case "symbol":
1087
- case "object":
1088
- return expected;
1089
- case "function":
1090
- return expected;
1091
- case "boolean":
1092
- if (!1 === expected) return expected;
1093
- }
1094
- return void 0 === expected ? void 0 : null;
1095
- }
1096
- node = node.getAttribute(name);
1097
- if ("" === node && !0 === expected) return !0;
1098
- checkAttributeStringCoercion(expected, name);
1099
- return node === "" + expected ? expected : node;
1100
- }
970
+ function markRenderStopped() {
971
+ null !== injectedProfilingHooks &&
972
+ "function" === typeof injectedProfilingHooks.markRenderStopped &&
973
+ injectedProfilingHooks.markRenderStopped();
1101
974
  }
1102
- function setValueForAttribute(node, name, value) {
1103
- if (isAttributeNameSafe(name))
1104
- if (null === value) node.removeAttribute(name);
1105
- else {
1106
- switch (typeof value) {
1107
- case "undefined":
1108
- case "function":
1109
- case "symbol":
1110
- node.removeAttribute(name);
1111
- return;
1112
- case "boolean":
1113
- var prefix = name.toLowerCase().slice(0, 5);
1114
- if ("data-" !== prefix && "aria-" !== prefix) {
1115
- node.removeAttribute(name);
1116
- return;
1117
- }
1118
- }
1119
- checkAttributeStringCoercion(value, name);
1120
- node.setAttribute(name, "" + value);
1121
- }
975
+ function markStateUpdateScheduled(fiber, lane) {
976
+ null !== injectedProfilingHooks &&
977
+ "function" === typeof injectedProfilingHooks.markStateUpdateScheduled &&
978
+ injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
1122
979
  }
1123
- function setValueForKnownAttribute(node, name, value) {
1124
- if (null === value) node.removeAttribute(name);
1125
- else {
1126
- switch (typeof value) {
1127
- case "undefined":
1128
- case "function":
1129
- case "symbol":
1130
- case "boolean":
1131
- node.removeAttribute(name);
1132
- return;
1133
- }
1134
- checkAttributeStringCoercion(value, name);
1135
- node.setAttribute(name, "" + value);
980
+ function clz32Fallback(x) {
981
+ x >>>= 0;
982
+ return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
983
+ }
984
+ function getLabelForLane(lane) {
985
+ if (lane & 1) return "SyncHydrationLane";
986
+ if (lane & 2) return "Sync";
987
+ if (lane & 4) return "InputContinuousHydration";
988
+ if (lane & 8) return "InputContinuous";
989
+ if (lane & 16) return "DefaultHydration";
990
+ if (lane & 32) return "Default";
991
+ if (lane & 128) return "TransitionHydration";
992
+ if (lane & 4194048) return "Transition";
993
+ if (lane & 62914560) return "Retry";
994
+ if (lane & 67108864) return "SelectiveHydration";
995
+ if (lane & 134217728) return "IdleHydration";
996
+ if (lane & 268435456) return "Idle";
997
+ if (lane & 536870912) return "Offscreen";
998
+ if (lane & 1073741824) return "Deferred";
999
+ }
1000
+ function getHighestPriorityLanes(lanes) {
1001
+ var pendingSyncLanes = lanes & 42;
1002
+ if (0 !== pendingSyncLanes) return pendingSyncLanes;
1003
+ switch (lanes & -lanes) {
1004
+ case 1:
1005
+ return 1;
1006
+ case 2:
1007
+ return 2;
1008
+ case 4:
1009
+ return 4;
1010
+ case 8:
1011
+ return 8;
1012
+ case 16:
1013
+ return 16;
1014
+ case 32:
1015
+ return 32;
1016
+ case 64:
1017
+ return 64;
1018
+ case 128:
1019
+ return 128;
1020
+ case 256:
1021
+ case 512:
1022
+ case 1024:
1023
+ case 2048:
1024
+ case 4096:
1025
+ case 8192:
1026
+ case 16384:
1027
+ case 32768:
1028
+ case 65536:
1029
+ case 131072:
1030
+ case 262144:
1031
+ case 524288:
1032
+ case 1048576:
1033
+ case 2097152:
1034
+ return lanes & 4194048;
1035
+ case 4194304:
1036
+ case 8388608:
1037
+ case 16777216:
1038
+ case 33554432:
1039
+ return lanes & 62914560;
1040
+ case 67108864:
1041
+ return 67108864;
1042
+ case 134217728:
1043
+ return 134217728;
1044
+ case 268435456:
1045
+ return 268435456;
1046
+ case 536870912:
1047
+ return 536870912;
1048
+ case 1073741824:
1049
+ return 0;
1050
+ default:
1051
+ return (
1052
+ console.error(
1053
+ "Should have found matching lanes. This is a bug in React."
1054
+ ),
1055
+ lanes
1056
+ );
1136
1057
  }
1137
1058
  }
1138
- function setValueForNamespacedAttribute(node, namespace, name, value) {
1139
- if (null === value) node.removeAttribute(name);
1140
- else {
1141
- switch (typeof value) {
1142
- case "undefined":
1143
- case "function":
1144
- case "symbol":
1145
- case "boolean":
1146
- node.removeAttribute(name);
1147
- return;
1148
- }
1149
- checkAttributeStringCoercion(value, name);
1150
- node.setAttributeNS(namespace, name, "" + value);
1059
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
1060
+ var pendingLanes = root.pendingLanes;
1061
+ if (0 === pendingLanes) return 0;
1062
+ var nextLanes = 0,
1063
+ suspendedLanes = root.suspendedLanes,
1064
+ pingedLanes = root.pingedLanes;
1065
+ root = root.warmLanes;
1066
+ var nonIdlePendingLanes = pendingLanes & 134217727;
1067
+ 0 !== nonIdlePendingLanes
1068
+ ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
1069
+ 0 !== pendingLanes
1070
+ ? (nextLanes = getHighestPriorityLanes(pendingLanes))
1071
+ : ((pingedLanes &= nonIdlePendingLanes),
1072
+ 0 !== pingedLanes
1073
+ ? (nextLanes = getHighestPriorityLanes(pingedLanes))
1074
+ : rootHasPendingCommit ||
1075
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
1076
+ 0 !== rootHasPendingCommit &&
1077
+ (nextLanes =
1078
+ getHighestPriorityLanes(rootHasPendingCommit)))))
1079
+ : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
1080
+ 0 !== nonIdlePendingLanes
1081
+ ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
1082
+ : 0 !== pingedLanes
1083
+ ? (nextLanes = getHighestPriorityLanes(pingedLanes))
1084
+ : rootHasPendingCommit ||
1085
+ ((rootHasPendingCommit = pendingLanes & ~root),
1086
+ 0 !== rootHasPendingCommit &&
1087
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
1088
+ return 0 === nextLanes
1089
+ ? 0
1090
+ : 0 !== wipLanes &&
1091
+ wipLanes !== nextLanes &&
1092
+ 0 === (wipLanes & suspendedLanes) &&
1093
+ ((suspendedLanes = nextLanes & -nextLanes),
1094
+ (rootHasPendingCommit = wipLanes & -wipLanes),
1095
+ suspendedLanes >= rootHasPendingCommit ||
1096
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
1097
+ ? wipLanes
1098
+ : nextLanes;
1099
+ }
1100
+ function checkIfRootIsPrerendering(root, renderLanes) {
1101
+ return (
1102
+ 0 ===
1103
+ (root.pendingLanes &
1104
+ ~(root.suspendedLanes & ~root.pingedLanes) &
1105
+ renderLanes)
1106
+ );
1107
+ }
1108
+ function computeExpirationTime(lane, currentTime) {
1109
+ switch (lane) {
1110
+ case 1:
1111
+ case 2:
1112
+ case 4:
1113
+ case 8:
1114
+ case 64:
1115
+ return currentTime + 250;
1116
+ case 16:
1117
+ case 32:
1118
+ case 128:
1119
+ case 256:
1120
+ case 512:
1121
+ case 1024:
1122
+ case 2048:
1123
+ case 4096:
1124
+ case 8192:
1125
+ case 16384:
1126
+ case 32768:
1127
+ case 65536:
1128
+ case 131072:
1129
+ case 262144:
1130
+ case 524288:
1131
+ case 1048576:
1132
+ case 2097152:
1133
+ return currentTime + 5e3;
1134
+ case 4194304:
1135
+ case 8388608:
1136
+ case 16777216:
1137
+ case 33554432:
1138
+ return -1;
1139
+ case 67108864:
1140
+ case 134217728:
1141
+ case 268435456:
1142
+ case 536870912:
1143
+ case 1073741824:
1144
+ return -1;
1145
+ default:
1146
+ return (
1147
+ console.error(
1148
+ "Should have found matching lanes. This is a bug in React."
1149
+ ),
1150
+ -1
1151
+ );
1151
1152
  }
1152
1153
  }
1153
- function disabledLog() {}
1154
- function disableLogs() {
1155
- if (0 === disabledDepth) {
1156
- prevLog = console.log;
1157
- prevInfo = console.info;
1158
- prevWarn = console.warn;
1159
- prevError = console.error;
1160
- prevGroup = console.group;
1161
- prevGroupCollapsed = console.groupCollapsed;
1162
- prevGroupEnd = console.groupEnd;
1163
- var props = {
1164
- configurable: !0,
1165
- enumerable: !0,
1166
- value: disabledLog,
1167
- writable: !0
1168
- };
1169
- Object.defineProperties(console, {
1170
- info: props,
1171
- log: props,
1172
- warn: props,
1173
- error: props,
1174
- group: props,
1175
- groupCollapsed: props,
1176
- groupEnd: props
1177
- });
1178
- }
1179
- disabledDepth++;
1154
+ function claimNextTransitionLane() {
1155
+ var lane = nextTransitionLane;
1156
+ nextTransitionLane <<= 1;
1157
+ 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
1158
+ return lane;
1180
1159
  }
1181
- function reenableLogs() {
1182
- disabledDepth--;
1183
- if (0 === disabledDepth) {
1184
- var props = { configurable: !0, enumerable: !0, writable: !0 };
1185
- Object.defineProperties(console, {
1186
- log: assign({}, props, { value: prevLog }),
1187
- info: assign({}, props, { value: prevInfo }),
1188
- warn: assign({}, props, { value: prevWarn }),
1189
- error: assign({}, props, { value: prevError }),
1190
- group: assign({}, props, { value: prevGroup }),
1191
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1192
- groupEnd: assign({}, props, { value: prevGroupEnd })
1193
- });
1194
- }
1195
- 0 > disabledDepth &&
1196
- console.error(
1197
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
1198
- );
1160
+ function claimNextRetryLane() {
1161
+ var lane = nextRetryLane;
1162
+ nextRetryLane <<= 1;
1163
+ 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
1164
+ return lane;
1199
1165
  }
1200
- function describeBuiltInComponentFrame(name) {
1201
- if (void 0 === prefix)
1202
- try {
1203
- throw Error();
1204
- } catch (x) {
1205
- var match = x.stack.trim().match(/\n( *(at )?)/);
1206
- prefix = (match && match[1]) || "";
1207
- suffix =
1208
- -1 < x.stack.indexOf("\n at")
1209
- ? " (<anonymous>)"
1210
- : -1 < x.stack.indexOf("@")
1211
- ? "@unknown:0:0"
1212
- : "";
1213
- }
1214
- return "\n" + prefix + name + suffix;
1166
+ function createLaneMap(initial) {
1167
+ for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1168
+ return laneMap;
1215
1169
  }
1216
- function describeNativeComponentFrame(fn, construct) {
1217
- if (!fn || reentry) return "";
1218
- var frame = componentFrameCache.get(fn);
1219
- if (void 0 !== frame) return frame;
1220
- reentry = !0;
1221
- frame = Error.prepareStackTrace;
1222
- Error.prepareStackTrace = void 0;
1223
- var previousDispatcher = null;
1224
- previousDispatcher = ReactSharedInternals.H;
1225
- ReactSharedInternals.H = null;
1226
- disableLogs();
1227
- try {
1228
- var RunInRootFrame = {
1229
- DetermineComponentFrameRoot: function () {
1230
- try {
1231
- if (construct) {
1232
- var Fake = function () {
1233
- throw Error();
1234
- };
1235
- Object.defineProperty(Fake.prototype, "props", {
1236
- set: function () {
1237
- throw Error();
1238
- }
1239
- });
1240
- if ("object" === typeof Reflect && Reflect.construct) {
1241
- try {
1242
- Reflect.construct(Fake, []);
1243
- } catch (x) {
1244
- var control = x;
1245
- }
1246
- Reflect.construct(fn, [], Fake);
1247
- } else {
1248
- try {
1249
- Fake.call();
1250
- } catch (x$0) {
1251
- control = x$0;
1252
- }
1253
- fn.call(Fake.prototype);
1254
- }
1255
- } else {
1256
- try {
1257
- throw Error();
1258
- } catch (x$1) {
1259
- control = x$1;
1260
- }
1261
- (Fake = fn()) &&
1262
- "function" === typeof Fake.catch &&
1263
- Fake.catch(function () {});
1264
- }
1265
- } catch (sample) {
1266
- if (sample && control && "string" === typeof sample.stack)
1267
- return [sample.stack, control.stack];
1268
- }
1269
- return [null, null];
1270
- }
1271
- };
1272
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
1273
- "DetermineComponentFrameRoot";
1274
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
1275
- RunInRootFrame.DetermineComponentFrameRoot,
1276
- "name"
1277
- );
1278
- namePropDescriptor &&
1279
- namePropDescriptor.configurable &&
1280
- Object.defineProperty(
1281
- RunInRootFrame.DetermineComponentFrameRoot,
1282
- "name",
1283
- { value: "DetermineComponentFrameRoot" }
1284
- );
1285
- var _RunInRootFrame$Deter =
1286
- RunInRootFrame.DetermineComponentFrameRoot(),
1287
- sampleStack = _RunInRootFrame$Deter[0],
1288
- controlStack = _RunInRootFrame$Deter[1];
1289
- if (sampleStack && controlStack) {
1290
- var sampleLines = sampleStack.split("\n"),
1291
- controlLines = controlStack.split("\n");
1292
- for (
1293
- _RunInRootFrame$Deter = namePropDescriptor = 0;
1294
- namePropDescriptor < sampleLines.length &&
1295
- !sampleLines[namePropDescriptor].includes(
1296
- "DetermineComponentFrameRoot"
1297
- );
1170
+ function markRootUpdated$1(root, updateLane) {
1171
+ root.pendingLanes |= updateLane;
1172
+ 268435456 !== updateLane &&
1173
+ ((root.suspendedLanes = 0),
1174
+ (root.pingedLanes = 0),
1175
+ (root.warmLanes = 0));
1176
+ }
1177
+ function markRootFinished(
1178
+ root,
1179
+ finishedLanes,
1180
+ remainingLanes,
1181
+ spawnedLane,
1182
+ updatedLanes,
1183
+ suspendedRetryLanes
1184
+ ) {
1185
+ var previouslyPendingLanes = root.pendingLanes;
1186
+ root.pendingLanes = remainingLanes;
1187
+ root.suspendedLanes = 0;
1188
+ root.pingedLanes = 0;
1189
+ root.warmLanes = 0;
1190
+ root.expiredLanes &= remainingLanes;
1191
+ root.entangledLanes &= remainingLanes;
1192
+ root.errorRecoveryDisabledLanes &= remainingLanes;
1193
+ root.shellSuspendCounter = 0;
1194
+ var entanglements = root.entanglements,
1195
+ expirationTimes = root.expirationTimes,
1196
+ hiddenUpdates = root.hiddenUpdates;
1197
+ for (
1198
+ remainingLanes = previouslyPendingLanes & ~remainingLanes;
1199
+ 0 < remainingLanes;
1298
1200
 
1299
- )
1300
- namePropDescriptor++;
1201
+ ) {
1202
+ var index = 31 - clz32(remainingLanes),
1203
+ lane = 1 << index;
1204
+ entanglements[index] = 0;
1205
+ expirationTimes[index] = -1;
1206
+ var hiddenUpdatesForLane = hiddenUpdates[index];
1207
+ if (null !== hiddenUpdatesForLane)
1301
1208
  for (
1302
- ;
1303
- _RunInRootFrame$Deter < controlLines.length &&
1304
- !controlLines[_RunInRootFrame$Deter].includes(
1305
- "DetermineComponentFrameRoot"
1306
- );
1209
+ hiddenUpdates[index] = null, index = 0;
1210
+ index < hiddenUpdatesForLane.length;
1211
+ index++
1212
+ ) {
1213
+ var update = hiddenUpdatesForLane[index];
1214
+ null !== update && (update.lane &= -536870913);
1215
+ }
1216
+ remainingLanes &= ~lane;
1217
+ }
1218
+ 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
1219
+ 0 !== suspendedRetryLanes &&
1220
+ 0 === updatedLanes &&
1221
+ 0 !== root.tag &&
1222
+ (root.suspendedLanes |=
1223
+ suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
1224
+ }
1225
+ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
1226
+ root.pendingLanes |= spawnedLane;
1227
+ root.suspendedLanes &= ~spawnedLane;
1228
+ var spawnedLaneIndex = 31 - clz32(spawnedLane);
1229
+ root.entangledLanes |= spawnedLane;
1230
+ root.entanglements[spawnedLaneIndex] =
1231
+ root.entanglements[spawnedLaneIndex] |
1232
+ 1073741824 |
1233
+ (entangledLanes & 4194090);
1234
+ }
1235
+ function markRootEntangled(root, entangledLanes) {
1236
+ var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
1237
+ for (root = root.entanglements; rootEntangledLanes; ) {
1238
+ var index = 31 - clz32(rootEntangledLanes),
1239
+ lane = 1 << index;
1240
+ (lane & entangledLanes) | (root[index] & entangledLanes) &&
1241
+ (root[index] |= entangledLanes);
1242
+ rootEntangledLanes &= ~lane;
1243
+ }
1244
+ }
1245
+ function getBumpedLaneForHydrationByLane(lane) {
1246
+ switch (lane) {
1247
+ case 2:
1248
+ lane = 1;
1249
+ break;
1250
+ case 8:
1251
+ lane = 4;
1252
+ break;
1253
+ case 32:
1254
+ lane = 16;
1255
+ break;
1256
+ case 256:
1257
+ case 512:
1258
+ case 1024:
1259
+ case 2048:
1260
+ case 4096:
1261
+ case 8192:
1262
+ case 16384:
1263
+ case 32768:
1264
+ case 65536:
1265
+ case 131072:
1266
+ case 262144:
1267
+ case 524288:
1268
+ case 1048576:
1269
+ case 2097152:
1270
+ case 4194304:
1271
+ case 8388608:
1272
+ case 16777216:
1273
+ case 33554432:
1274
+ lane = 128;
1275
+ break;
1276
+ case 268435456:
1277
+ lane = 134217728;
1278
+ break;
1279
+ default:
1280
+ lane = 0;
1281
+ }
1282
+ return lane;
1283
+ }
1284
+ function addFiberToLanesMap(root, fiber, lanes) {
1285
+ if (isDevToolsPresent)
1286
+ for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
1287
+ var index = 31 - clz32(lanes),
1288
+ lane = 1 << index;
1289
+ root[index].add(fiber);
1290
+ lanes &= ~lane;
1291
+ }
1292
+ }
1293
+ function movePendingFibersToMemoized(root, lanes) {
1294
+ if (isDevToolsPresent)
1295
+ for (
1296
+ var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
1297
+ memoizedUpdaters = root.memoizedUpdaters;
1298
+ 0 < lanes;
1307
1299
 
1308
- )
1309
- _RunInRootFrame$Deter++;
1300
+ ) {
1301
+ var index = 31 - clz32(lanes);
1302
+ root = 1 << index;
1303
+ index = pendingUpdatersLaneMap[index];
1304
+ 0 < index.size &&
1305
+ (index.forEach(function (fiber) {
1306
+ var alternate = fiber.alternate;
1307
+ (null !== alternate && memoizedUpdaters.has(alternate)) ||
1308
+ memoizedUpdaters.add(fiber);
1309
+ }),
1310
+ index.clear());
1311
+ lanes &= ~root;
1312
+ }
1313
+ }
1314
+ function lanesToEventPriority(lanes) {
1315
+ lanes &= -lanes;
1316
+ return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
1317
+ ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes
1318
+ ? 0 !== (lanes & 134217727)
1319
+ ? DefaultEventPriority
1320
+ : IdleEventPriority
1321
+ : ContinuousEventPriority
1322
+ : DiscreteEventPriority;
1323
+ }
1324
+ function resolveUpdatePriority() {
1325
+ var updatePriority = ReactDOMSharedInternals.p;
1326
+ if (0 !== updatePriority) return updatePriority;
1327
+ updatePriority = window.event;
1328
+ return void 0 === updatePriority
1329
+ ? DefaultEventPriority
1330
+ : getEventPriority(updatePriority.type);
1331
+ }
1332
+ function runWithPriority(priority, fn) {
1333
+ var previousPriority = ReactDOMSharedInternals.p;
1334
+ try {
1335
+ return (ReactDOMSharedInternals.p = priority), fn();
1336
+ } finally {
1337
+ ReactDOMSharedInternals.p = previousPriority;
1338
+ }
1339
+ }
1340
+ function detachDeletedInstance(node) {
1341
+ delete node[internalInstanceKey];
1342
+ delete node[internalPropsKey];
1343
+ delete node[internalEventHandlersKey];
1344
+ delete node[internalEventHandlerListenersKey];
1345
+ delete node[internalEventHandlesSetKey];
1346
+ }
1347
+ function getClosestInstanceFromNode(targetNode) {
1348
+ var targetInst = targetNode[internalInstanceKey];
1349
+ if (targetInst) return targetInst;
1350
+ for (var parentNode = targetNode.parentNode; parentNode; ) {
1351
+ if (
1352
+ (targetInst =
1353
+ parentNode[internalContainerInstanceKey] ||
1354
+ parentNode[internalInstanceKey])
1355
+ ) {
1356
+ parentNode = targetInst.alternate;
1310
1357
  if (
1311
- namePropDescriptor === sampleLines.length ||
1312
- _RunInRootFrame$Deter === controlLines.length
1358
+ null !== targetInst.child ||
1359
+ (null !== parentNode && null !== parentNode.child)
1313
1360
  )
1314
1361
  for (
1315
- namePropDescriptor = sampleLines.length - 1,
1316
- _RunInRootFrame$Deter = controlLines.length - 1;
1317
- 1 <= namePropDescriptor &&
1318
- 0 <= _RunInRootFrame$Deter &&
1319
- sampleLines[namePropDescriptor] !==
1320
- controlLines[_RunInRootFrame$Deter];
1362
+ targetNode = getParentSuspenseInstance(targetNode);
1363
+ null !== targetNode;
1321
1364
 
1322
- )
1323
- _RunInRootFrame$Deter--;
1324
- for (
1325
- ;
1326
- 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
1327
- namePropDescriptor--, _RunInRootFrame$Deter--
1328
- )
1329
- if (
1330
- sampleLines[namePropDescriptor] !==
1331
- controlLines[_RunInRootFrame$Deter]
1332
1365
  ) {
1333
- if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1334
- do
1335
- if (
1336
- (namePropDescriptor--,
1337
- _RunInRootFrame$Deter--,
1338
- 0 > _RunInRootFrame$Deter ||
1339
- sampleLines[namePropDescriptor] !==
1340
- controlLines[_RunInRootFrame$Deter])
1341
- ) {
1342
- var _frame =
1343
- "\n" +
1344
- sampleLines[namePropDescriptor].replace(
1345
- " at new ",
1346
- " at "
1347
- );
1348
- fn.displayName &&
1349
- _frame.includes("<anonymous>") &&
1350
- (_frame = _frame.replace("<anonymous>", fn.displayName));
1351
- "function" === typeof fn &&
1352
- componentFrameCache.set(fn, _frame);
1353
- return _frame;
1354
- }
1355
- while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1356
- }
1357
- break;
1366
+ if ((parentNode = targetNode[internalInstanceKey]))
1367
+ return parentNode;
1368
+ targetNode = getParentSuspenseInstance(targetNode);
1358
1369
  }
1370
+ return targetInst;
1359
1371
  }
1360
- } finally {
1361
- (reentry = !1),
1362
- (ReactSharedInternals.H = previousDispatcher),
1363
- reenableLogs(),
1364
- (Error.prepareStackTrace = frame);
1372
+ targetNode = parentNode;
1373
+ parentNode = targetNode.parentNode;
1365
1374
  }
1366
- sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
1367
- ? describeBuiltInComponentFrame(sampleLines)
1368
- : "";
1369
- "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1370
- return sampleLines;
1375
+ return null;
1371
1376
  }
1372
- function formatOwnerStack(error) {
1373
- var prevPrepareStackTrace = Error.prepareStackTrace;
1374
- Error.prepareStackTrace = void 0;
1375
- error = error.stack;
1376
- Error.prepareStackTrace = prevPrepareStackTrace;
1377
- error.startsWith("Error: react-stack-top-frame\n") &&
1378
- (error = error.slice(29));
1379
- prevPrepareStackTrace = error.indexOf("\n");
1380
- -1 !== prevPrepareStackTrace &&
1381
- (error = error.slice(prevPrepareStackTrace + 1));
1382
- prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
1383
- -1 !== prevPrepareStackTrace &&
1384
- (prevPrepareStackTrace = error.lastIndexOf(
1385
- "\n",
1386
- prevPrepareStackTrace
1387
- ));
1388
- if (-1 !== prevPrepareStackTrace)
1389
- error = error.slice(0, prevPrepareStackTrace);
1390
- else return "";
1391
- return error;
1377
+ function getInstanceFromNode(node) {
1378
+ if (
1379
+ (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
1380
+ ) {
1381
+ var tag = node.tag;
1382
+ if (
1383
+ 5 === tag ||
1384
+ 6 === tag ||
1385
+ 13 === tag ||
1386
+ 26 === tag ||
1387
+ 27 === tag ||
1388
+ 3 === tag
1389
+ )
1390
+ return node;
1391
+ }
1392
+ return null;
1393
+ }
1394
+ function getNodeFromInstance(inst) {
1395
+ var tag = inst.tag;
1396
+ if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1397
+ return inst.stateNode;
1398
+ throw Error("getNodeFromInstance: Invalid argument.");
1399
+ }
1400
+ function getResourcesFromRoot(root) {
1401
+ var resources = root[internalRootNodeResourcesKey];
1402
+ resources ||
1403
+ (resources = root[internalRootNodeResourcesKey] =
1404
+ { hoistableStyles: new Map(), hoistableScripts: new Map() });
1405
+ return resources;
1406
+ }
1407
+ function markNodeAsHoistable(node) {
1408
+ node[internalHoistableMarker] = !0;
1409
+ }
1410
+ function registerTwoPhaseEvent(registrationName, dependencies) {
1411
+ registerDirectEvent(registrationName, dependencies);
1412
+ registerDirectEvent(registrationName + "Capture", dependencies);
1413
+ }
1414
+ function registerDirectEvent(registrationName, dependencies) {
1415
+ registrationNameDependencies[registrationName] &&
1416
+ console.error(
1417
+ "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1418
+ registrationName
1419
+ );
1420
+ registrationNameDependencies[registrationName] = dependencies;
1421
+ var lowerCasedName = registrationName.toLowerCase();
1422
+ possibleRegistrationNames[lowerCasedName] = registrationName;
1423
+ "onDoubleClick" === registrationName &&
1424
+ (possibleRegistrationNames.ondblclick = registrationName);
1425
+ for (
1426
+ registrationName = 0;
1427
+ registrationName < dependencies.length;
1428
+ registrationName++
1429
+ )
1430
+ allNativeEvents.add(dependencies[registrationName]);
1431
+ }
1432
+ function checkControlledValueProps(tagName, props) {
1433
+ hasReadOnlyValue[props.type] ||
1434
+ props.onChange ||
1435
+ props.onInput ||
1436
+ props.readOnly ||
1437
+ props.disabled ||
1438
+ null == props.value ||
1439
+ ("select" === tagName
1440
+ ? console.error(
1441
+ "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
1442
+ )
1443
+ : console.error(
1444
+ "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
1445
+ ));
1446
+ props.onChange ||
1447
+ props.readOnly ||
1448
+ props.disabled ||
1449
+ null == props.checked ||
1450
+ console.error(
1451
+ "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
1452
+ );
1392
1453
  }
1393
- function describeFiber(fiber) {
1394
- switch (fiber.tag) {
1395
- case 26:
1396
- case 27:
1397
- case 5:
1398
- return describeBuiltInComponentFrame(fiber.type);
1399
- case 16:
1400
- return describeBuiltInComponentFrame("Lazy");
1401
- case 13:
1402
- return describeBuiltInComponentFrame("Suspense");
1403
- case 19:
1404
- return describeBuiltInComponentFrame("SuspenseList");
1405
- case 0:
1406
- case 15:
1407
- return describeNativeComponentFrame(fiber.type, !1);
1408
- case 11:
1409
- return describeNativeComponentFrame(fiber.type.render, !1);
1410
- case 1:
1411
- return describeNativeComponentFrame(fiber.type, !0);
1412
- case 31:
1413
- return describeBuiltInComponentFrame("Activity");
1414
- default:
1415
- return "";
1416
- }
1454
+ function isAttributeNameSafe(attributeName) {
1455
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1456
+ return !0;
1457
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1458
+ return !1;
1459
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1460
+ return (validatedAttributeNameCache[attributeName] = !0);
1461
+ illegalAttributeNameCache[attributeName] = !0;
1462
+ console.error("Invalid attribute name: `%s`", attributeName);
1463
+ return !1;
1417
1464
  }
1418
- function getStackByFiberInDevAndProd(workInProgress) {
1419
- try {
1420
- var info = "";
1421
- do {
1422
- info += describeFiber(workInProgress);
1423
- var debugInfo = workInProgress._debugInfo;
1424
- if (debugInfo)
1425
- for (var i = debugInfo.length - 1; 0 <= i; i--) {
1426
- var entry = debugInfo[i];
1427
- if ("string" === typeof entry.name) {
1428
- var JSCompiler_temp_const = info,
1429
- env = entry.env;
1430
- var JSCompiler_inline_result = describeBuiltInComponentFrame(
1431
- entry.name + (env ? " [" + env + "]" : "")
1432
- );
1433
- info = JSCompiler_temp_const + JSCompiler_inline_result;
1434
- }
1435
- }
1436
- workInProgress = workInProgress.return;
1437
- } while (workInProgress);
1438
- return info;
1439
- } catch (x) {
1440
- return "\nError generating stack: " + x.message + "\n" + x.stack;
1465
+ function getValueForAttributeOnCustomComponent(node, name, expected) {
1466
+ if (isAttributeNameSafe(name)) {
1467
+ if (!node.hasAttribute(name)) {
1468
+ switch (typeof expected) {
1469
+ case "symbol":
1470
+ case "object":
1471
+ return expected;
1472
+ case "function":
1473
+ return expected;
1474
+ case "boolean":
1475
+ if (!1 === expected) return expected;
1476
+ }
1477
+ return void 0 === expected ? void 0 : null;
1478
+ }
1479
+ node = node.getAttribute(name);
1480
+ if ("" === node && !0 === expected) return !0;
1481
+ checkAttributeStringCoercion(expected, name);
1482
+ return node === "" + expected ? expected : node;
1441
1483
  }
1442
1484
  }
1443
- function describeFunctionComponentFrameWithoutLineNumber(fn) {
1444
- return (fn = fn ? fn.displayName || fn.name : "")
1445
- ? describeBuiltInComponentFrame(fn)
1446
- : "";
1447
- }
1448
- function getCurrentFiberOwnerNameInDevOrNull() {
1449
- if (null === current) return null;
1450
- var owner = current._debugOwner;
1451
- return null != owner ? getComponentNameFromOwner(owner) : null;
1485
+ function setValueForAttribute(node, name, value) {
1486
+ if (isAttributeNameSafe(name))
1487
+ if (null === value) node.removeAttribute(name);
1488
+ else {
1489
+ switch (typeof value) {
1490
+ case "undefined":
1491
+ case "function":
1492
+ case "symbol":
1493
+ node.removeAttribute(name);
1494
+ return;
1495
+ case "boolean":
1496
+ var prefix = name.toLowerCase().slice(0, 5);
1497
+ if ("data-" !== prefix && "aria-" !== prefix) {
1498
+ node.removeAttribute(name);
1499
+ return;
1500
+ }
1501
+ }
1502
+ checkAttributeStringCoercion(value, name);
1503
+ node.setAttribute(name, "" + value);
1504
+ }
1452
1505
  }
1453
- function getCurrentFiberStackInDev() {
1454
- if (null === current) return "";
1455
- var workInProgress = current;
1456
- try {
1457
- var info = "";
1458
- 6 === workInProgress.tag && (workInProgress = workInProgress.return);
1459
- switch (workInProgress.tag) {
1460
- case 26:
1461
- case 27:
1462
- case 5:
1463
- info += describeBuiltInComponentFrame(workInProgress.type);
1464
- break;
1465
- case 13:
1466
- info += describeBuiltInComponentFrame("Suspense");
1467
- break;
1468
- case 19:
1469
- info += describeBuiltInComponentFrame("SuspenseList");
1470
- break;
1471
- case 31:
1472
- info += describeBuiltInComponentFrame("Activity");
1473
- break;
1474
- case 30:
1475
- case 0:
1476
- case 15:
1477
- case 1:
1478
- workInProgress._debugOwner ||
1479
- "" !== info ||
1480
- (info += describeFunctionComponentFrameWithoutLineNumber(
1481
- workInProgress.type
1482
- ));
1483
- break;
1484
- case 11:
1485
- workInProgress._debugOwner ||
1486
- "" !== info ||
1487
- (info += describeFunctionComponentFrameWithoutLineNumber(
1488
- workInProgress.type.render
1489
- ));
1506
+ function setValueForKnownAttribute(node, name, value) {
1507
+ if (null === value) node.removeAttribute(name);
1508
+ else {
1509
+ switch (typeof value) {
1510
+ case "undefined":
1511
+ case "function":
1512
+ case "symbol":
1513
+ case "boolean":
1514
+ node.removeAttribute(name);
1515
+ return;
1490
1516
  }
1491
- for (; workInProgress; )
1492
- if ("number" === typeof workInProgress.tag) {
1493
- var fiber = workInProgress;
1494
- workInProgress = fiber._debugOwner;
1495
- var debugStack = fiber._debugStack;
1496
- workInProgress &&
1497
- debugStack &&
1498
- ("string" !== typeof debugStack &&
1499
- (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
1500
- "" !== debugStack && (info += "\n" + debugStack));
1501
- } else if (null != workInProgress.debugStack) {
1502
- var ownerStack = workInProgress.debugStack;
1503
- (workInProgress = workInProgress.owner) &&
1504
- ownerStack &&
1505
- (info += "\n" + formatOwnerStack(ownerStack));
1506
- } else break;
1507
- var JSCompiler_inline_result = info;
1508
- } catch (x) {
1509
- JSCompiler_inline_result =
1510
- "\nError generating stack: " + x.message + "\n" + x.stack;
1517
+ checkAttributeStringCoercion(value, name);
1518
+ node.setAttribute(name, "" + value);
1511
1519
  }
1512
- return JSCompiler_inline_result;
1513
1520
  }
1514
- function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
1515
- var previousFiber = current;
1516
- setCurrentFiber(fiber);
1517
- try {
1518
- return null !== fiber && fiber._debugTask
1519
- ? fiber._debugTask.run(
1520
- callback.bind(null, arg0, arg1, arg2, arg3, arg4)
1521
- )
1522
- : callback(arg0, arg1, arg2, arg3, arg4);
1523
- } finally {
1524
- setCurrentFiber(previousFiber);
1521
+ function setValueForNamespacedAttribute(node, namespace, name, value) {
1522
+ if (null === value) node.removeAttribute(name);
1523
+ else {
1524
+ switch (typeof value) {
1525
+ case "undefined":
1526
+ case "function":
1527
+ case "symbol":
1528
+ case "boolean":
1529
+ node.removeAttribute(name);
1530
+ return;
1531
+ }
1532
+ checkAttributeStringCoercion(value, name);
1533
+ node.setAttributeNS(namespace, name, "" + value);
1525
1534
  }
1526
- throw Error(
1527
- "runWithFiberInDEV should never be called in production. This is a bug in React."
1528
- );
1529
- }
1530
- function setCurrentFiber(fiber) {
1531
- ReactSharedInternals.getCurrentStack =
1532
- null === fiber ? null : getCurrentFiberStackInDev;
1533
- isRendering = !1;
1534
- current = fiber;
1535
1535
  }
1536
1536
  function getToStringValue(value) {
1537
1537
  switch (typeof value) {
@@ -7005,6 +7005,7 @@
7005
7005
  {
7006
7006
  lane: 0,
7007
7007
  revertLane: 0,
7008
+ gesture: null,
7008
7009
  action: update.action,
7009
7010
  hasEagerState: update.hasEagerState,
7010
7011
  eagerState: update.eagerState,
@@ -7021,6 +7022,7 @@
7021
7022
  (updateLane = {
7022
7023
  lane: 0,
7023
7024
  revertLane: update.revertLane,
7025
+ gesture: null,
7024
7026
  action: update.action,
7025
7027
  hasEagerState: update.hasEagerState,
7026
7028
  eagerState: update.eagerState,
@@ -7042,6 +7044,7 @@
7042
7044
  (revertLane = {
7043
7045
  lane: updateLane,
7044
7046
  revertLane: update.revertLane,
7047
+ gesture: update.gesture,
7045
7048
  action: update.action,
7046
7049
  hasEagerState: update.hasEagerState,
7047
7050
  eagerState: update.eagerState,
@@ -7363,8 +7366,8 @@
7363
7366
  if (node.isTransition) {
7364
7367
  var prevTransition = ReactSharedInternals.T,
7365
7368
  currentTransition = {};
7369
+ currentTransition._updatedFibers = new Set();
7366
7370
  ReactSharedInternals.T = currentTransition;
7367
- ReactSharedInternals.T._updatedFibers = new Set();
7368
7371
  try {
7369
7372
  var returnValue = action(prevState, payload),
7370
7373
  onStartTransitionFinish = ReactSharedInternals.S;
@@ -7374,7 +7377,15 @@
7374
7377
  } catch (error) {
7375
7378
  onActionError(actionQueue, node, error);
7376
7379
  } finally {
7377
- (ReactSharedInternals.T = prevTransition),
7380
+ null !== prevTransition &&
7381
+ null !== currentTransition.types &&
7382
+ (null !== prevTransition.types &&
7383
+ prevTransition.types !== currentTransition.types &&
7384
+ console.error(
7385
+ "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
7386
+ ),
7387
+ (prevTransition.types = currentTransition.types)),
7388
+ (ReactSharedInternals.T = prevTransition),
7378
7389
  null === prevTransition &&
7379
7390
  currentTransition._updatedFibers &&
7380
7391
  ((actionQueue = currentTransition._updatedFibers.size),
@@ -7396,7 +7407,9 @@
7396
7407
  null !== returnValue &&
7397
7408
  "object" === typeof returnValue &&
7398
7409
  "function" === typeof returnValue.then
7399
- ? (returnValue.then(
7410
+ ? (ReactSharedInternals.asyncTransitions++,
7411
+ returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
7412
+ returnValue.then(
7400
7413
  function (nextState) {
7401
7414
  onActionSuccess(actionQueue, node, nextState);
7402
7415
  },
@@ -7795,6 +7808,9 @@
7795
7808
  workInProgressRootSkippedLanes |= hook;
7796
7809
  return prevValue;
7797
7810
  }
7811
+ function releaseAsyncTransition() {
7812
+ ReactSharedInternals.asyncTransitions--;
7813
+ }
7798
7814
  function startTransition(
7799
7815
  fiber,
7800
7816
  queue,
@@ -7809,9 +7825,9 @@
7809
7825
  : ContinuousEventPriority;
7810
7826
  var prevTransition = ReactSharedInternals.T,
7811
7827
  currentTransition = {};
7828
+ currentTransition._updatedFibers = new Set();
7812
7829
  ReactSharedInternals.T = currentTransition;
7813
7830
  dispatchOptimisticSetState(fiber, !1, queue, pendingState);
7814
- currentTransition._updatedFibers = new Set();
7815
7831
  try {
7816
7832
  var returnValue = callback(),
7817
7833
  onStartTransitionFinish = ReactSharedInternals.S;
@@ -7822,6 +7838,8 @@
7822
7838
  "object" === typeof returnValue &&
7823
7839
  "function" === typeof returnValue.then
7824
7840
  ) {
7841
+ ReactSharedInternals.asyncTransitions++;
7842
+ returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
7825
7843
  var thenableForFinishedState = chainThenableValue(
7826
7844
  returnValue,
7827
7845
  finishedState
@@ -7848,6 +7866,14 @@
7848
7866
  );
7849
7867
  } finally {
7850
7868
  (ReactDOMSharedInternals.p = previousPriority),
7869
+ null !== prevTransition &&
7870
+ null !== currentTransition.types &&
7871
+ (null !== prevTransition.types &&
7872
+ prevTransition.types !== currentTransition.types &&
7873
+ console.error(
7874
+ "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
7875
+ ),
7876
+ (prevTransition.types = currentTransition.types)),
7851
7877
  (ReactSharedInternals.T = prevTransition),
7852
7878
  null === prevTransition &&
7853
7879
  currentTransition._updatedFibers &&
@@ -8021,6 +8047,7 @@
8021
8047
  var update = {
8022
8048
  lane: args,
8023
8049
  revertLane: 0,
8050
+ gesture: null,
8024
8051
  action: action,
8025
8052
  hasEagerState: !1,
8026
8053
  eagerState: null,
@@ -8048,6 +8075,7 @@
8048
8075
  var update = {
8049
8076
  lane: lane,
8050
8077
  revertLane: 0,
8078
+ gesture: null,
8051
8079
  action: action,
8052
8080
  hasEagerState: !1,
8053
8081
  eagerState: null,
@@ -8104,6 +8132,7 @@
8104
8132
  action = {
8105
8133
  lane: 2,
8106
8134
  revertLane: requestTransitionLane(),
8135
+ gesture: null,
8107
8136
  action: action,
8108
8137
  hasEagerState: !1,
8109
8138
  eagerState: null,
@@ -12335,13 +12364,15 @@
12335
12364
  if (5 === tag || 6 === tag)
12336
12365
  (node = node.stateNode),
12337
12366
  before
12338
- ? (9 === parent.nodeType
12367
+ ? (warnForReactChildrenConflict(parent),
12368
+ (9 === parent.nodeType
12339
12369
  ? parent.body
12340
12370
  : "HTML" === parent.nodeName
12341
12371
  ? parent.ownerDocument.body
12342
12372
  : parent
12343
- ).insertBefore(node, before)
12344
- : ((before =
12373
+ ).insertBefore(node, before))
12374
+ : (warnForReactChildrenConflict(parent),
12375
+ (before =
12345
12376
  9 === parent.nodeType
12346
12377
  ? parent.body
12347
12378
  : "HTML" === parent.nodeName
@@ -19348,6 +19379,30 @@
19348
19379
  function commitTextUpdate(textInstance, oldText, newText) {
19349
19380
  textInstance.nodeValue = newText;
19350
19381
  }
19382
+ function warnForReactChildrenConflict(container) {
19383
+ if (!container.__reactWarnedAboutChildrenConflict) {
19384
+ var props = container[internalPropsKey] || null;
19385
+ if (null !== props) {
19386
+ var fiber = getInstanceFromNode(container);
19387
+ null !== fiber &&
19388
+ ("string" === typeof props.children ||
19389
+ "number" === typeof props.children
19390
+ ? ((container.__reactWarnedAboutChildrenConflict = !0),
19391
+ runWithFiberInDEV(fiber, function () {
19392
+ console.error(
19393
+ 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
19394
+ );
19395
+ }))
19396
+ : null != props.dangerouslySetInnerHTML &&
19397
+ ((container.__reactWarnedAboutChildrenConflict = !0),
19398
+ runWithFiberInDEV(fiber, function () {
19399
+ console.error(
19400
+ 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
19401
+ );
19402
+ })));
19403
+ }
19404
+ }
19405
+ }
19351
19406
  function isSingletonScope(type) {
19352
19407
  return "head" === type;
19353
19408
  }
@@ -21241,6 +21296,23 @@
21241
21296
  contextFiberStackCursor = createCursor(null),
21242
21297
  rootInstanceStackCursor = createCursor(null),
21243
21298
  hostTransitionProviderCursor = createCursor(null),
21299
+ disabledDepth = 0,
21300
+ prevLog,
21301
+ prevInfo,
21302
+ prevWarn,
21303
+ prevError,
21304
+ prevGroup,
21305
+ prevGroupCollapsed,
21306
+ prevGroupEnd;
21307
+ disabledLog.__reactDisabledLog = !0;
21308
+ var prefix,
21309
+ suffix,
21310
+ reentry = !1;
21311
+ var componentFrameCache = new (
21312
+ "function" === typeof WeakMap ? WeakMap : Map
21313
+ )();
21314
+ var current = null,
21315
+ isRendering = !1,
21244
21316
  hasOwnProperty = Object.prototype.hasOwnProperty,
21245
21317
  scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
21246
21318
  cancelCallback$1 = Scheduler.unstable_cancelCallback,
@@ -21295,23 +21367,6 @@
21295
21367
  ),
21296
21368
  illegalAttributeNameCache = {},
21297
21369
  validatedAttributeNameCache = {},
21298
- disabledDepth = 0,
21299
- prevLog,
21300
- prevInfo,
21301
- prevWarn,
21302
- prevError,
21303
- prevGroup,
21304
- prevGroupCollapsed,
21305
- prevGroupEnd;
21306
- disabledLog.__reactDisabledLog = !0;
21307
- var prefix,
21308
- suffix,
21309
- reentry = !1;
21310
- var componentFrameCache = new (
21311
- "function" === typeof WeakMap ? WeakMap : Map
21312
- )();
21313
- var current = null,
21314
- isRendering = !1,
21315
21370
  escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g,
21316
21371
  didWarnValueDefaultValue$1 = !1,
21317
21372
  didWarnCheckedDefaultChecked = !1,
@@ -24785,11 +24840,11 @@
24785
24840
  };
24786
24841
  (function () {
24787
24842
  var isomorphicReactPackageVersion = React.version;
24788
- if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion)
24843
+ if ("19.2.0-canary-e5dd82a7-20250401" !== isomorphicReactPackageVersion)
24789
24844
  throw Error(
24790
24845
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
24791
24846
  (isomorphicReactPackageVersion +
24792
- "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch")
24847
+ "\n - react-dom: 19.2.0-canary-e5dd82a7-20250401\nLearn more: https://react.dev/warnings/version-mismatch")
24793
24848
  );
24794
24849
  })();
24795
24850
  ("function" === typeof Map &&
@@ -24826,10 +24881,10 @@
24826
24881
  !(function () {
24827
24882
  var internals = {
24828
24883
  bundleType: 1,
24829
- version: "19.2.0-canary-63779030-20250328",
24884
+ version: "19.2.0-canary-e5dd82a7-20250401",
24830
24885
  rendererPackageName: "react-dom",
24831
24886
  currentDispatcherRef: ReactSharedInternals,
24832
- reconcilerVersion: "19.2.0-canary-63779030-20250328"
24887
+ reconcilerVersion: "19.2.0-canary-e5dd82a7-20250401"
24833
24888
  };
24834
24889
  internals.overrideHookState = overrideHookState;
24835
24890
  internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -24973,7 +25028,7 @@
24973
25028
  listenToAllSupportedEvents(container);
24974
25029
  return new ReactDOMHydrationRoot(initialChildren);
24975
25030
  };
24976
- exports.version = "19.2.0-canary-63779030-20250328";
25031
+ exports.version = "19.2.0-canary-e5dd82a7-20250401";
24977
25032
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
24978
25033
  "function" ===
24979
25034
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&