comparison react_games/public/games/Games.js @ 37:fb9bcd3145cb

[ReactGames] Few games I made using react just to practice few things.
author MrJuneJune <me@mrjunejune.com>
date Mon, 01 Dec 2025 20:22:47 -0800
parents
children
comparison
equal deleted inserted replaced
36:84672efec192 37:fb9bcd3145cb
1 import {
2 __commonJS,
3 __toESM,
4 require_jsx_runtime,
5 require_react
6 } from "./chunk-AX5M7HF6.js";
7
8 // node_modules/scheduler/cjs/scheduler.development.js
9 var require_scheduler_development = __commonJS({
10 "node_modules/scheduler/cjs/scheduler.development.js"(exports) {
11 "use strict";
12 (function() {
13 function performWorkUntilDeadline() {
14 needsPaint = false;
15 if (isMessageLoopRunning) {
16 var currentTime = exports.unstable_now();
17 startTime = currentTime;
18 var hasMoreWork = true;
19 try {
20 a: {
21 isHostCallbackScheduled = false;
22 isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
23 isPerformingWork = true;
24 var previousPriorityLevel = currentPriorityLevel;
25 try {
26 b: {
27 advanceTimers(currentTime);
28 for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
29 var callback = currentTask.callback;
30 if ("function" === typeof callback) {
31 currentTask.callback = null;
32 currentPriorityLevel = currentTask.priorityLevel;
33 var continuationCallback = callback(
34 currentTask.expirationTime <= currentTime
35 );
36 currentTime = exports.unstable_now();
37 if ("function" === typeof continuationCallback) {
38 currentTask.callback = continuationCallback;
39 advanceTimers(currentTime);
40 hasMoreWork = true;
41 break b;
42 }
43 currentTask === peek(taskQueue) && pop(taskQueue);
44 advanceTimers(currentTime);
45 } else pop(taskQueue);
46 currentTask = peek(taskQueue);
47 }
48 if (null !== currentTask) hasMoreWork = true;
49 else {
50 var firstTimer = peek(timerQueue);
51 null !== firstTimer && requestHostTimeout(
52 handleTimeout,
53 firstTimer.startTime - currentTime
54 );
55 hasMoreWork = false;
56 }
57 }
58 break a;
59 } finally {
60 currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
61 }
62 hasMoreWork = void 0;
63 }
64 } finally {
65 hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
66 }
67 }
68 }
69 function push(heap, node) {
70 var index = heap.length;
71 heap.push(node);
72 a: for (; 0 < index; ) {
73 var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
74 if (0 < compare(parent, node))
75 heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
76 else break a;
77 }
78 }
79 function peek(heap) {
80 return 0 === heap.length ? null : heap[0];
81 }
82 function pop(heap) {
83 if (0 === heap.length) return null;
84 var first = heap[0], last = heap.pop();
85 if (last !== first) {
86 heap[0] = last;
87 a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
88 var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
89 if (0 > compare(left, last))
90 rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
91 else if (rightIndex < length && 0 > compare(right, last))
92 heap[index] = right, heap[rightIndex] = last, index = rightIndex;
93 else break a;
94 }
95 }
96 return first;
97 }
98 function compare(a, b) {
99 var diff = a.sortIndex - b.sortIndex;
100 return 0 !== diff ? diff : a.id - b.id;
101 }
102 function advanceTimers(currentTime) {
103 for (var timer = peek(timerQueue); null !== timer; ) {
104 if (null === timer.callback) pop(timerQueue);
105 else if (timer.startTime <= currentTime)
106 pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
107 else break;
108 timer = peek(timerQueue);
109 }
110 }
111 function handleTimeout(currentTime) {
112 isHostTimeoutScheduled = false;
113 advanceTimers(currentTime);
114 if (!isHostCallbackScheduled)
115 if (null !== peek(taskQueue))
116 isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
117 else {
118 var firstTimer = peek(timerQueue);
119 null !== firstTimer && requestHostTimeout(
120 handleTimeout,
121 firstTimer.startTime - currentTime
122 );
123 }
124 }
125 function shouldYieldToHost() {
126 return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
127 }
128 function requestHostTimeout(callback, ms) {
129 taskTimeoutID = localSetTimeout(function() {
130 callback(exports.unstable_now());
131 }, ms);
132 }
133 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
134 exports.unstable_now = void 0;
135 if ("object" === typeof performance && "function" === typeof performance.now) {
136 var localPerformance = performance;
137 exports.unstable_now = function() {
138 return localPerformance.now();
139 };
140 } else {
141 var localDate = Date, initialTime = localDate.now();
142 exports.unstable_now = function() {
143 return localDate.now() - initialTime;
144 };
145 }
146 var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
147 if ("function" === typeof localSetImmediate)
148 var schedulePerformWorkUntilDeadline = function() {
149 localSetImmediate(performWorkUntilDeadline);
150 };
151 else if ("undefined" !== typeof MessageChannel) {
152 var channel = new MessageChannel(), port = channel.port2;
153 channel.port1.onmessage = performWorkUntilDeadline;
154 schedulePerformWorkUntilDeadline = function() {
155 port.postMessage(null);
156 };
157 } else
158 schedulePerformWorkUntilDeadline = function() {
159 localSetTimeout(performWorkUntilDeadline, 0);
160 };
161 exports.unstable_IdlePriority = 5;
162 exports.unstable_ImmediatePriority = 1;
163 exports.unstable_LowPriority = 4;
164 exports.unstable_NormalPriority = 3;
165 exports.unstable_Profiling = null;
166 exports.unstable_UserBlockingPriority = 2;
167 exports.unstable_cancelCallback = function(task) {
168 task.callback = null;
169 };
170 exports.unstable_forceFrameRate = function(fps) {
171 0 > fps || 125 < fps ? console.error(
172 "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
173 ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
174 };
175 exports.unstable_getCurrentPriorityLevel = function() {
176 return currentPriorityLevel;
177 };
178 exports.unstable_next = function(eventHandler) {
179 switch (currentPriorityLevel) {
180 case 1:
181 case 2:
182 case 3:
183 var priorityLevel = 3;
184 break;
185 default:
186 priorityLevel = currentPriorityLevel;
187 }
188 var previousPriorityLevel = currentPriorityLevel;
189 currentPriorityLevel = priorityLevel;
190 try {
191 return eventHandler();
192 } finally {
193 currentPriorityLevel = previousPriorityLevel;
194 }
195 };
196 exports.unstable_requestPaint = function() {
197 needsPaint = true;
198 };
199 exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
200 switch (priorityLevel) {
201 case 1:
202 case 2:
203 case 3:
204 case 4:
205 case 5:
206 break;
207 default:
208 priorityLevel = 3;
209 }
210 var previousPriorityLevel = currentPriorityLevel;
211 currentPriorityLevel = priorityLevel;
212 try {
213 return eventHandler();
214 } finally {
215 currentPriorityLevel = previousPriorityLevel;
216 }
217 };
218 exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
219 var currentTime = exports.unstable_now();
220 "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
221 switch (priorityLevel) {
222 case 1:
223 var timeout = -1;
224 break;
225 case 2:
226 timeout = 250;
227 break;
228 case 5:
229 timeout = 1073741823;
230 break;
231 case 4:
232 timeout = 1e4;
233 break;
234 default:
235 timeout = 5e3;
236 }
237 timeout = options + timeout;
238 priorityLevel = {
239 id: taskIdCounter++,
240 callback,
241 priorityLevel,
242 startTime: options,
243 expirationTime: timeout,
244 sortIndex: -1
245 };
246 options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
247 return priorityLevel;
248 };
249 exports.unstable_shouldYield = shouldYieldToHost;
250 exports.unstable_wrapCallback = function(callback) {
251 var parentPriorityLevel = currentPriorityLevel;
252 return function() {
253 var previousPriorityLevel = currentPriorityLevel;
254 currentPriorityLevel = parentPriorityLevel;
255 try {
256 return callback.apply(this, arguments);
257 } finally {
258 currentPriorityLevel = previousPriorityLevel;
259 }
260 };
261 };
262 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
263 })();
264 }
265 });
266
267 // node_modules/scheduler/index.js
268 var require_scheduler = __commonJS({
269 "node_modules/scheduler/index.js"(exports, module) {
270 "use strict";
271 if (false) {
272 module.exports = null;
273 } else {
274 module.exports = require_scheduler_development();
275 }
276 }
277 });
278
279 // node_modules/react-dom/cjs/react-dom.development.js
280 var require_react_dom_development = __commonJS({
281 "node_modules/react-dom/cjs/react-dom.development.js"(exports) {
282 "use strict";
283 (function() {
284 function noop() {
285 }
286 function testStringCoercion(value) {
287 return "" + value;
288 }
289 function createPortal$1(children, containerInfo, implementation) {
290 var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
291 try {
292 testStringCoercion(key);
293 var JSCompiler_inline_result = false;
294 } catch (e) {
295 JSCompiler_inline_result = true;
296 }
297 JSCompiler_inline_result && (console.error(
298 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
299 "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
300 ), testStringCoercion(key));
301 return {
302 $$typeof: REACT_PORTAL_TYPE,
303 key: null == key ? null : "" + key,
304 children,
305 containerInfo,
306 implementation
307 };
308 }
309 function getCrossOriginStringAs(as, input) {
310 if ("font" === as) return "";
311 if ("string" === typeof input)
312 return "use-credentials" === input ? input : "";
313 }
314 function getValueDescriptorExpectingObjectForWarning(thing) {
315 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
316 }
317 function getValueDescriptorExpectingEnumForWarning(thing) {
318 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
319 }
320 function resolveDispatcher() {
321 var dispatcher = ReactSharedInternals.H;
322 null === dispatcher && console.error(
323 "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
324 );
325 return dispatcher;
326 }
327 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
328 var React2 = require_react(), Internals = {
329 d: {
330 f: noop,
331 r: function() {
332 throw Error(
333 "Invalid form element. requestFormReset must be passed a form that was rendered by React."
334 );
335 },
336 D: noop,
337 C: noop,
338 L: noop,
339 m: noop,
340 X: noop,
341 S: noop,
342 M: noop
343 },
344 p: 0,
345 findDOMNode: null
346 }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
347 "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
348 "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
349 );
350 exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
351 exports.createPortal = function(children, container) {
352 var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
353 if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
354 throw Error("Target container is not a DOM element.");
355 return createPortal$1(children, container, null, key);
356 };
357 exports.flushSync = function(fn) {
358 var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
359 try {
360 if (ReactSharedInternals.T = null, Internals.p = 2, fn)
361 return fn();
362 } finally {
363 ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
364 "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
365 );
366 }
367 };
368 exports.preconnect = function(href, options) {
369 "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
370 "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
371 getValueDescriptorExpectingEnumForWarning(options)
372 ) : null != options && "string" !== typeof options.crossOrigin && console.error(
373 "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
374 getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
375 ) : console.error(
376 "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
377 getValueDescriptorExpectingObjectForWarning(href)
378 );
379 "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
380 };
381 exports.prefetchDNS = function(href) {
382 if ("string" !== typeof href || !href)
383 console.error(
384 "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
385 getValueDescriptorExpectingObjectForWarning(href)
386 );
387 else if (1 < arguments.length) {
388 var options = arguments[1];
389 "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
390 "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
391 getValueDescriptorExpectingEnumForWarning(options)
392 ) : console.error(
393 "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
394 getValueDescriptorExpectingEnumForWarning(options)
395 );
396 }
397 "string" === typeof href && Internals.d.D(href);
398 };
399 exports.preinit = function(href, options) {
400 "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
401 "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
402 getValueDescriptorExpectingEnumForWarning(options)
403 ) : "style" !== options.as && "script" !== options.as && console.error(
404 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
405 getValueDescriptorExpectingEnumForWarning(options.as)
406 ) : console.error(
407 "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
408 getValueDescriptorExpectingObjectForWarning(href)
409 );
410 if ("string" === typeof href && options && "string" === typeof options.as) {
411 var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
412 "style" === as ? Internals.d.S(
413 href,
414 "string" === typeof options.precedence ? options.precedence : void 0,
415 {
416 crossOrigin,
417 integrity,
418 fetchPriority
419 }
420 ) : "script" === as && Internals.d.X(href, {
421 crossOrigin,
422 integrity,
423 fetchPriority,
424 nonce: "string" === typeof options.nonce ? options.nonce : void 0
425 });
426 }
427 };
428 exports.preinitModule = function(href, options) {
429 var encountered = "";
430 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
431 void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
432 if (encountered)
433 console.error(
434 "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
435 encountered
436 );
437 else
438 switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
439 case "script":
440 break;
441 default:
442 encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
443 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
444 encountered,
445 href
446 );
447 }
448 if ("string" === typeof href)
449 if ("object" === typeof options && null !== options) {
450 if (null == options.as || "script" === options.as)
451 encountered = getCrossOriginStringAs(
452 options.as,
453 options.crossOrigin
454 ), Internals.d.M(href, {
455 crossOrigin: encountered,
456 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
457 nonce: "string" === typeof options.nonce ? options.nonce : void 0
458 });
459 } else null == options && Internals.d.M(href);
460 };
461 exports.preload = function(href, options) {
462 var encountered = "";
463 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
464 null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
465 encountered && console.error(
466 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
467 encountered
468 );
469 if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
470 encountered = options.as;
471 var crossOrigin = getCrossOriginStringAs(
472 encountered,
473 options.crossOrigin
474 );
475 Internals.d.L(href, encountered, {
476 crossOrigin,
477 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
478 nonce: "string" === typeof options.nonce ? options.nonce : void 0,
479 type: "string" === typeof options.type ? options.type : void 0,
480 fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
481 referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
482 imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
483 imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
484 media: "string" === typeof options.media ? options.media : void 0
485 });
486 }
487 };
488 exports.preloadModule = function(href, options) {
489 var encountered = "";
490 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
491 void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
492 encountered && console.error(
493 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
494 encountered
495 );
496 "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
497 options.as,
498 options.crossOrigin
499 ), Internals.d.m(href, {
500 as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
501 crossOrigin: encountered,
502 integrity: "string" === typeof options.integrity ? options.integrity : void 0
503 })) : Internals.d.m(href));
504 };
505 exports.requestFormReset = function(form) {
506 Internals.d.r(form);
507 };
508 exports.unstable_batchedUpdates = function(fn, a) {
509 return fn(a);
510 };
511 exports.useFormState = function(action, initialState, permalink) {
512 return resolveDispatcher().useFormState(action, initialState, permalink);
513 };
514 exports.useFormStatus = function() {
515 return resolveDispatcher().useHostTransitionStatus();
516 };
517 exports.version = "19.1.1";
518 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
519 })();
520 }
521 });
522
523 // node_modules/react-dom/index.js
524 var require_react_dom = __commonJS({
525 "node_modules/react-dom/index.js"(exports, module) {
526 "use strict";
527 if (false) {
528 checkDCE();
529 module.exports = null;
530 } else {
531 module.exports = require_react_dom_development();
532 }
533 }
534 });
535
536 // node_modules/react-dom/cjs/react-dom-client.development.js
537 var require_react_dom_client_development = __commonJS({
538 "node_modules/react-dom/cjs/react-dom-client.development.js"(exports) {
539 "use strict";
540 (function() {
541 function findHook(fiber, id) {
542 for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
543 fiber = fiber.next, id--;
544 return fiber;
545 }
546 function copyWithSetImpl(obj, path, index, value) {
547 if (index >= path.length) return value;
548 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
549 updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
550 return updated;
551 }
552 function copyWithRename(obj, oldPath, newPath) {
553 if (oldPath.length !== newPath.length)
554 console.warn("copyWithRename() expects paths of the same length");
555 else {
556 for (var i = 0; i < newPath.length - 1; i++)
557 if (oldPath[i] !== newPath[i]) {
558 console.warn(
559 "copyWithRename() expects paths to be the same except for the deepest key"
560 );
561 return;
562 }
563 return copyWithRenameImpl(obj, oldPath, newPath, 0);
564 }
565 }
566 function copyWithRenameImpl(obj, oldPath, newPath, index) {
567 var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
568 index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(
569 obj[oldKey],
570 oldPath,
571 newPath,
572 index + 1
573 );
574 return updated;
575 }
576 function copyWithDeleteImpl(obj, path, index) {
577 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
578 if (index + 1 === path.length)
579 return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
580 updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
581 return updated;
582 }
583 function shouldSuspendImpl() {
584 return false;
585 }
586 function shouldErrorImpl() {
587 return null;
588 }
589 function warnForMissingKey() {
590 }
591 function warnInvalidHookAccess() {
592 console.error(
593 "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
594 );
595 }
596 function warnInvalidContextAccess() {
597 console.error(
598 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
599 );
600 }
601 function noop$2() {
602 }
603 function setToSortedString(set) {
604 var array = [];
605 set.forEach(function(value) {
606 array.push(value);
607 });
608 return array.sort().join(", ");
609 }
610 function createFiber(tag, pendingProps, key, mode) {
611 return new FiberNode(tag, pendingProps, key, mode);
612 }
613 function scheduleRoot(root2, element) {
614 root2.context === emptyContextObject && (updateContainerImpl(root2.current, 2, element, root2, null, null), flushSyncWork$1());
615 }
616 function scheduleRefresh(root2, update) {
617 if (null !== resolveFamily) {
618 var staleFamilies = update.staleFamilies;
619 update = update.updatedFamilies;
620 flushPendingEffects();
621 scheduleFibersWithFamiliesRecursively(
622 root2.current,
623 update,
624 staleFamilies
625 );
626 flushSyncWork$1();
627 }
628 }
629 function setRefreshHandler(handler) {
630 resolveFamily = handler;
631 }
632 function isValidContainer(node) {
633 return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType);
634 }
635 function getNearestMountedFiber(fiber) {
636 var node = fiber, nearestMounted = fiber;
637 if (fiber.alternate) for (; node.return; ) node = node.return;
638 else {
639 fiber = node;
640 do
641 node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
642 while (fiber);
643 }
644 return 3 === node.tag ? nearestMounted : null;
645 }
646 function getSuspenseInstanceFromFiber(fiber) {
647 if (13 === fiber.tag) {
648 var suspenseState = fiber.memoizedState;
649 null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState));
650 if (null !== suspenseState) return suspenseState.dehydrated;
651 }
652 return null;
653 }
654 function assertIsMounted(fiber) {
655 if (getNearestMountedFiber(fiber) !== fiber)
656 throw Error("Unable to find node on an unmounted component.");
657 }
658 function findCurrentFiberUsingSlowPath(fiber) {
659 var alternate = fiber.alternate;
660 if (!alternate) {
661 alternate = getNearestMountedFiber(fiber);
662 if (null === alternate)
663 throw Error("Unable to find node on an unmounted component.");
664 return alternate !== fiber ? null : fiber;
665 }
666 for (var a = fiber, b = alternate; ; ) {
667 var parentA = a.return;
668 if (null === parentA) break;
669 var parentB = parentA.alternate;
670 if (null === parentB) {
671 b = parentA.return;
672 if (null !== b) {
673 a = b;
674 continue;
675 }
676 break;
677 }
678 if (parentA.child === parentB.child) {
679 for (parentB = parentA.child; parentB; ) {
680 if (parentB === a) return assertIsMounted(parentA), fiber;
681 if (parentB === b) return assertIsMounted(parentA), alternate;
682 parentB = parentB.sibling;
683 }
684 throw Error("Unable to find node on an unmounted component.");
685 }
686 if (a.return !== b.return) a = parentA, b = parentB;
687 else {
688 for (var didFindChild = false, _child = parentA.child; _child; ) {
689 if (_child === a) {
690 didFindChild = true;
691 a = parentA;
692 b = parentB;
693 break;
694 }
695 if (_child === b) {
696 didFindChild = true;
697 b = parentA;
698 a = parentB;
699 break;
700 }
701 _child = _child.sibling;
702 }
703 if (!didFindChild) {
704 for (_child = parentB.child; _child; ) {
705 if (_child === a) {
706 didFindChild = true;
707 a = parentB;
708 b = parentA;
709 break;
710 }
711 if (_child === b) {
712 didFindChild = true;
713 b = parentB;
714 a = parentA;
715 break;
716 }
717 _child = _child.sibling;
718 }
719 if (!didFindChild)
720 throw Error(
721 "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
722 );
723 }
724 }
725 if (a.alternate !== b)
726 throw Error(
727 "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
728 );
729 }
730 if (3 !== a.tag)
731 throw Error("Unable to find node on an unmounted component.");
732 return a.stateNode.current === a ? fiber : alternate;
733 }
734 function findCurrentHostFiberImpl(node) {
735 var tag = node.tag;
736 if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
737 for (node = node.child; null !== node; ) {
738 tag = findCurrentHostFiberImpl(node);
739 if (null !== tag) return tag;
740 node = node.sibling;
741 }
742 return null;
743 }
744 function getIteratorFn(maybeIterable) {
745 if (null === maybeIterable || "object" !== typeof maybeIterable)
746 return null;
747 maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
748 return "function" === typeof maybeIterable ? maybeIterable : null;
749 }
750 function getComponentNameFromType(type) {
751 if (null == type) return null;
752 if ("function" === typeof type)
753 return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
754 if ("string" === typeof type) return type;
755 switch (type) {
756 case REACT_FRAGMENT_TYPE:
757 return "Fragment";
758 case REACT_PROFILER_TYPE:
759 return "Profiler";
760 case REACT_STRICT_MODE_TYPE:
761 return "StrictMode";
762 case REACT_SUSPENSE_TYPE:
763 return "Suspense";
764 case REACT_SUSPENSE_LIST_TYPE:
765 return "SuspenseList";
766 case REACT_ACTIVITY_TYPE:
767 return "Activity";
768 }
769 if ("object" === typeof type)
770 switch ("number" === typeof type.tag && console.error(
771 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
772 ), type.$$typeof) {
773 case REACT_PORTAL_TYPE:
774 return "Portal";
775 case REACT_CONTEXT_TYPE:
776 return (type.displayName || "Context") + ".Provider";
777 case REACT_CONSUMER_TYPE:
778 return (type._context.displayName || "Context") + ".Consumer";
779 case REACT_FORWARD_REF_TYPE:
780 var innerType = type.render;
781 type = type.displayName;
782 type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
783 return type;
784 case REACT_MEMO_TYPE:
785 return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
786 case REACT_LAZY_TYPE:
787 innerType = type._payload;
788 type = type._init;
789 try {
790 return getComponentNameFromType(type(innerType));
791 } catch (x) {
792 }
793 }
794 return null;
795 }
796 function getComponentNameFromOwner(owner) {
797 return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null;
798 }
799 function getComponentNameFromFiber(fiber) {
800 var type = fiber.type;
801 switch (fiber.tag) {
802 case 31:
803 return "Activity";
804 case 24:
805 return "Cache";
806 case 9:
807 return (type._context.displayName || "Context") + ".Consumer";
808 case 10:
809 return (type.displayName || "Context") + ".Provider";
810 case 18:
811 return "DehydratedFragment";
812 case 11:
813 return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
814 case 7:
815 return "Fragment";
816 case 26:
817 case 27:
818 case 5:
819 return type;
820 case 4:
821 return "Portal";
822 case 3:
823 return "Root";
824 case 6:
825 return "Text";
826 case 16:
827 return getComponentNameFromType(type);
828 case 8:
829 return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
830 case 22:
831 return "Offscreen";
832 case 12:
833 return "Profiler";
834 case 21:
835 return "Scope";
836 case 13:
837 return "Suspense";
838 case 19:
839 return "SuspenseList";
840 case 25:
841 return "TracingMarker";
842 case 1:
843 case 0:
844 case 14:
845 case 15:
846 if ("function" === typeof type)
847 return type.displayName || type.name || null;
848 if ("string" === typeof type) return type;
849 break;
850 case 29:
851 type = fiber._debugInfo;
852 if (null != type) {
853 for (var i = type.length - 1; 0 <= i; i--)
854 if ("string" === typeof type[i].name) return type[i].name;
855 }
856 if (null !== fiber.return)
857 return getComponentNameFromFiber(fiber.return);
858 }
859 return null;
860 }
861 function createCursor(defaultValue) {
862 return { current: defaultValue };
863 }
864 function pop(cursor, fiber) {
865 0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--);
866 }
867 function push(cursor, value, fiber) {
868 index$jscomp$0++;
869 valueStack[index$jscomp$0] = cursor.current;
870 fiberStack[index$jscomp$0] = fiber;
871 cursor.current = value;
872 }
873 function requiredContext(c) {
874 null === c && console.error(
875 "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
876 );
877 return c;
878 }
879 function pushHostContainer(fiber, nextRootInstance) {
880 push(rootInstanceStackCursor, nextRootInstance, fiber);
881 push(contextFiberStackCursor, fiber, fiber);
882 push(contextStackCursor, null, fiber);
883 var nextRootContext = nextRootInstance.nodeType;
884 switch (nextRootContext) {
885 case 9:
886 case 11:
887 nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
888 nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone;
889 break;
890 default:
891 if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI)
892 nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd(
893 nextRootInstance,
894 nextRootContext
895 );
896 else
897 switch (nextRootContext) {
898 case "svg":
899 nextRootInstance = HostContextNamespaceSvg;
900 break;
901 case "math":
902 nextRootInstance = HostContextNamespaceMath;
903 break;
904 default:
905 nextRootInstance = HostContextNamespaceNone;
906 }
907 }
908 nextRootContext = nextRootContext.toLowerCase();
909 nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
910 nextRootContext = {
911 context: nextRootInstance,
912 ancestorInfo: nextRootContext
913 };
914 pop(contextStackCursor, fiber);
915 push(contextStackCursor, nextRootContext, fiber);
916 }
917 function popHostContainer(fiber) {
918 pop(contextStackCursor, fiber);
919 pop(contextFiberStackCursor, fiber);
920 pop(rootInstanceStackCursor, fiber);
921 }
922 function getHostContext() {
923 return requiredContext(contextStackCursor.current);
924 }
925 function pushHostContext(fiber) {
926 null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber, fiber);
927 var context = requiredContext(contextStackCursor.current);
928 var type = fiber.type;
929 var nextContext = getChildHostContextProd(context.context, type);
930 type = updatedAncestorInfoDev(context.ancestorInfo, type);
931 nextContext = { context: nextContext, ancestorInfo: type };
932 context !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber));
933 }
934 function popHostContext(fiber) {
935 contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
936 hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition);
937 }
938 function typeName(value) {
939 return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
940 }
941 function willCoercionThrow(value) {
942 try {
943 return testStringCoercion(value), false;
944 } catch (e) {
945 return true;
946 }
947 }
948 function testStringCoercion(value) {
949 return "" + value;
950 }
951 function checkAttributeStringCoercion(value, attributeName) {
952 if (willCoercionThrow(value))
953 return console.error(
954 "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
955 attributeName,
956 typeName(value)
957 ), testStringCoercion(value);
958 }
959 function checkCSSPropertyStringCoercion(value, propName) {
960 if (willCoercionThrow(value))
961 return console.error(
962 "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
963 propName,
964 typeName(value)
965 ), testStringCoercion(value);
966 }
967 function checkFormFieldValueStringCoercion(value) {
968 if (willCoercionThrow(value))
969 return console.error(
970 "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.",
971 typeName(value)
972 ), testStringCoercion(value);
973 }
974 function injectInternals(internals) {
975 if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
976 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
977 if (hook.isDisabled) return true;
978 if (!hook.supportsFiber)
979 return console.error(
980 "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"
981 ), true;
982 try {
983 rendererID = hook.inject(internals), injectedHook = hook;
984 } catch (err) {
985 console.error("React instrumentation encountered an error: %s.", err);
986 }
987 return hook.checkDCE ? true : false;
988 }
989 function setIsStrictModeForDevtools(newIsStrictMode) {
990 "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
991 if (injectedHook && "function" === typeof injectedHook.setStrictMode)
992 try {
993 injectedHook.setStrictMode(rendererID, newIsStrictMode);
994 } catch (err) {
995 hasLoggedError || (hasLoggedError = true, console.error(
996 "React instrumentation encountered an error: %s",
997 err
998 ));
999 }
1000 }
1001 function injectProfilingHooks(profilingHooks) {
1002 injectedProfilingHooks = profilingHooks;
1003 }
1004 function markCommitStopped() {
1005 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStopped && injectedProfilingHooks.markCommitStopped();
1006 }
1007 function markComponentRenderStarted(fiber) {
1008 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentRenderStarted && injectedProfilingHooks.markComponentRenderStarted(fiber);
1009 }
1010 function markComponentRenderStopped() {
1011 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped();
1012 }
1013 function markRenderStarted(lanes) {
1014 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markRenderStarted && injectedProfilingHooks.markRenderStarted(lanes);
1015 }
1016 function markRenderStopped() {
1017 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markRenderStopped && injectedProfilingHooks.markRenderStopped();
1018 }
1019 function markStateUpdateScheduled(fiber, lane) {
1020 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
1021 }
1022 function clz32Fallback(x) {
1023 x >>>= 0;
1024 return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0;
1025 }
1026 function getLabelForLane(lane) {
1027 if (lane & 1) return "SyncHydrationLane";
1028 if (lane & 2) return "Sync";
1029 if (lane & 4) return "InputContinuousHydration";
1030 if (lane & 8) return "InputContinuous";
1031 if (lane & 16) return "DefaultHydration";
1032 if (lane & 32) return "Default";
1033 if (lane & 128) return "TransitionHydration";
1034 if (lane & 4194048) return "Transition";
1035 if (lane & 62914560) return "Retry";
1036 if (lane & 67108864) return "SelectiveHydration";
1037 if (lane & 134217728) return "IdleHydration";
1038 if (lane & 268435456) return "Idle";
1039 if (lane & 536870912) return "Offscreen";
1040 if (lane & 1073741824) return "Deferred";
1041 }
1042 function getHighestPriorityLanes(lanes) {
1043 var pendingSyncLanes = lanes & 42;
1044 if (0 !== pendingSyncLanes) return pendingSyncLanes;
1045 switch (lanes & -lanes) {
1046 case 1:
1047 return 1;
1048 case 2:
1049 return 2;
1050 case 4:
1051 return 4;
1052 case 8:
1053 return 8;
1054 case 16:
1055 return 16;
1056 case 32:
1057 return 32;
1058 case 64:
1059 return 64;
1060 case 128:
1061 return 128;
1062 case 256:
1063 case 512:
1064 case 1024:
1065 case 2048:
1066 case 4096:
1067 case 8192:
1068 case 16384:
1069 case 32768:
1070 case 65536:
1071 case 131072:
1072 case 262144:
1073 case 524288:
1074 case 1048576:
1075 case 2097152:
1076 return lanes & 4194048;
1077 case 4194304:
1078 case 8388608:
1079 case 16777216:
1080 case 33554432:
1081 return lanes & 62914560;
1082 case 67108864:
1083 return 67108864;
1084 case 134217728:
1085 return 134217728;
1086 case 268435456:
1087 return 268435456;
1088 case 536870912:
1089 return 536870912;
1090 case 1073741824:
1091 return 0;
1092 default:
1093 return console.error(
1094 "Should have found matching lanes. This is a bug in React."
1095 ), lanes;
1096 }
1097 }
1098 function getNextLanes(root2, wipLanes, rootHasPendingCommit) {
1099 var pendingLanes = root2.pendingLanes;
1100 if (0 === pendingLanes) return 0;
1101 var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
1102 root2 = root2.warmLanes;
1103 var nonIdlePendingLanes = pendingLanes & 134217727;
1104 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
1105 return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
1106 }
1107 function checkIfRootIsPrerendering(root2, renderLanes2) {
1108 return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2);
1109 }
1110 function computeExpirationTime(lane, currentTime) {
1111 switch (lane) {
1112 case 1:
1113 case 2:
1114 case 4:
1115 case 8:
1116 case 64:
1117 return currentTime + 250;
1118 case 16:
1119 case 32:
1120 case 128:
1121 case 256:
1122 case 512:
1123 case 1024:
1124 case 2048:
1125 case 4096:
1126 case 8192:
1127 case 16384:
1128 case 32768:
1129 case 65536:
1130 case 131072:
1131 case 262144:
1132 case 524288:
1133 case 1048576:
1134 case 2097152:
1135 return currentTime + 5e3;
1136 case 4194304:
1137 case 8388608:
1138 case 16777216:
1139 case 33554432:
1140 return -1;
1141 case 67108864:
1142 case 134217728:
1143 case 268435456:
1144 case 536870912:
1145 case 1073741824:
1146 return -1;
1147 default:
1148 return console.error(
1149 "Should have found matching lanes. This is a bug in React."
1150 ), -1;
1151 }
1152 }
1153 function claimNextTransitionLane() {
1154 var lane = nextTransitionLane;
1155 nextTransitionLane <<= 1;
1156 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
1157 return lane;
1158 }
1159 function claimNextRetryLane() {
1160 var lane = nextRetryLane;
1161 nextRetryLane <<= 1;
1162 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
1163 return lane;
1164 }
1165 function createLaneMap(initial) {
1166 for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1167 return laneMap;
1168 }
1169 function markRootUpdated$1(root2, updateLane) {
1170 root2.pendingLanes |= updateLane;
1171 268435456 !== updateLane && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0);
1172 }
1173 function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
1174 var previouslyPendingLanes = root2.pendingLanes;
1175 root2.pendingLanes = remainingLanes;
1176 root2.suspendedLanes = 0;
1177 root2.pingedLanes = 0;
1178 root2.warmLanes = 0;
1179 root2.expiredLanes &= remainingLanes;
1180 root2.entangledLanes &= remainingLanes;
1181 root2.errorRecoveryDisabledLanes &= remainingLanes;
1182 root2.shellSuspendCounter = 0;
1183 var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates;
1184 for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
1185 var index = 31 - clz32(remainingLanes), lane = 1 << index;
1186 entanglements[index] = 0;
1187 expirationTimes[index] = -1;
1188 var hiddenUpdatesForLane = hiddenUpdates[index];
1189 if (null !== hiddenUpdatesForLane)
1190 for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) {
1191 var update = hiddenUpdatesForLane[index];
1192 null !== update && (update.lane &= -536870913);
1193 }
1194 remainingLanes &= ~lane;
1195 }
1196 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, 0);
1197 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root2.tag && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
1198 }
1199 function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) {
1200 root2.pendingLanes |= spawnedLane;
1201 root2.suspendedLanes &= ~spawnedLane;
1202 var spawnedLaneIndex = 31 - clz32(spawnedLane);
1203 root2.entangledLanes |= spawnedLane;
1204 root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194090;
1205 }
1206 function markRootEntangled(root2, entangledLanes) {
1207 var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
1208 for (root2 = root2.entanglements; rootEntangledLanes; ) {
1209 var index = 31 - clz32(rootEntangledLanes), lane = 1 << index;
1210 lane & entangledLanes | root2[index] & entangledLanes && (root2[index] |= entangledLanes);
1211 rootEntangledLanes &= ~lane;
1212 }
1213 }
1214 function getBumpedLaneForHydrationByLane(lane) {
1215 switch (lane) {
1216 case 2:
1217 lane = 1;
1218 break;
1219 case 8:
1220 lane = 4;
1221 break;
1222 case 32:
1223 lane = 16;
1224 break;
1225 case 256:
1226 case 512:
1227 case 1024:
1228 case 2048:
1229 case 4096:
1230 case 8192:
1231 case 16384:
1232 case 32768:
1233 case 65536:
1234 case 131072:
1235 case 262144:
1236 case 524288:
1237 case 1048576:
1238 case 2097152:
1239 case 4194304:
1240 case 8388608:
1241 case 16777216:
1242 case 33554432:
1243 lane = 128;
1244 break;
1245 case 268435456:
1246 lane = 134217728;
1247 break;
1248 default:
1249 lane = 0;
1250 }
1251 return lane;
1252 }
1253 function addFiberToLanesMap(root2, fiber, lanes) {
1254 if (isDevToolsPresent)
1255 for (root2 = root2.pendingUpdatersLaneMap; 0 < lanes; ) {
1256 var index = 31 - clz32(lanes), lane = 1 << index;
1257 root2[index].add(fiber);
1258 lanes &= ~lane;
1259 }
1260 }
1261 function movePendingFibersToMemoized(root2, lanes) {
1262 if (isDevToolsPresent)
1263 for (var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap, memoizedUpdaters = root2.memoizedUpdaters; 0 < lanes; ) {
1264 var index = 31 - clz32(lanes);
1265 root2 = 1 << index;
1266 index = pendingUpdatersLaneMap[index];
1267 0 < index.size && (index.forEach(function(fiber) {
1268 var alternate = fiber.alternate;
1269 null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber);
1270 }), index.clear());
1271 lanes &= ~root2;
1272 }
1273 }
1274 function lanesToEventPriority(lanes) {
1275 lanes &= -lanes;
1276 return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority;
1277 }
1278 function resolveUpdatePriority() {
1279 var updatePriority = ReactDOMSharedInternals.p;
1280 if (0 !== updatePriority) return updatePriority;
1281 updatePriority = window.event;
1282 return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type);
1283 }
1284 function runWithPriority(priority, fn) {
1285 var previousPriority = ReactDOMSharedInternals.p;
1286 try {
1287 return ReactDOMSharedInternals.p = priority, fn();
1288 } finally {
1289 ReactDOMSharedInternals.p = previousPriority;
1290 }
1291 }
1292 function detachDeletedInstance(node) {
1293 delete node[internalInstanceKey];
1294 delete node[internalPropsKey];
1295 delete node[internalEventHandlersKey];
1296 delete node[internalEventHandlerListenersKey];
1297 delete node[internalEventHandlesSetKey];
1298 }
1299 function getClosestInstanceFromNode(targetNode) {
1300 var targetInst = targetNode[internalInstanceKey];
1301 if (targetInst) return targetInst;
1302 for (var parentNode = targetNode.parentNode; parentNode; ) {
1303 if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) {
1304 parentNode = targetInst.alternate;
1305 if (null !== targetInst.child || null !== parentNode && null !== parentNode.child)
1306 for (targetNode = getParentSuspenseInstance(targetNode); null !== targetNode; ) {
1307 if (parentNode = targetNode[internalInstanceKey])
1308 return parentNode;
1309 targetNode = getParentSuspenseInstance(targetNode);
1310 }
1311 return targetInst;
1312 }
1313 targetNode = parentNode;
1314 parentNode = targetNode.parentNode;
1315 }
1316 return null;
1317 }
1318 function getInstanceFromNode(node) {
1319 if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) {
1320 var tag = node.tag;
1321 if (5 === tag || 6 === tag || 13 === tag || 26 === tag || 27 === tag || 3 === tag)
1322 return node;
1323 }
1324 return null;
1325 }
1326 function getNodeFromInstance(inst) {
1327 var tag = inst.tag;
1328 if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1329 return inst.stateNode;
1330 throw Error("getNodeFromInstance: Invalid argument.");
1331 }
1332 function getResourcesFromRoot(root2) {
1333 var resources = root2[internalRootNodeResourcesKey];
1334 resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() });
1335 return resources;
1336 }
1337 function markNodeAsHoistable(node) {
1338 node[internalHoistableMarker] = true;
1339 }
1340 function registerTwoPhaseEvent(registrationName, dependencies) {
1341 registerDirectEvent(registrationName, dependencies);
1342 registerDirectEvent(registrationName + "Capture", dependencies);
1343 }
1344 function registerDirectEvent(registrationName, dependencies) {
1345 registrationNameDependencies[registrationName] && console.error(
1346 "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1347 registrationName
1348 );
1349 registrationNameDependencies[registrationName] = dependencies;
1350 var lowerCasedName = registrationName.toLowerCase();
1351 possibleRegistrationNames[lowerCasedName] = registrationName;
1352 "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName);
1353 for (registrationName = 0; registrationName < dependencies.length; registrationName++)
1354 allNativeEvents.add(dependencies[registrationName]);
1355 }
1356 function checkControlledValueProps(tagName, props) {
1357 hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error(
1358 "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`."
1359 ) : console.error(
1360 "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`."
1361 ));
1362 props.onChange || props.readOnly || props.disabled || null == props.checked || console.error(
1363 "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`."
1364 );
1365 }
1366 function isAttributeNameSafe(attributeName) {
1367 if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1368 return true;
1369 if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1370 return false;
1371 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1372 return validatedAttributeNameCache[attributeName] = true;
1373 illegalAttributeNameCache[attributeName] = true;
1374 console.error("Invalid attribute name: `%s`", attributeName);
1375 return false;
1376 }
1377 function getValueForAttributeOnCustomComponent(node, name, expected) {
1378 if (isAttributeNameSafe(name)) {
1379 if (!node.hasAttribute(name)) {
1380 switch (typeof expected) {
1381 case "symbol":
1382 case "object":
1383 return expected;
1384 case "function":
1385 return expected;
1386 case "boolean":
1387 if (false === expected) return expected;
1388 }
1389 return void 0 === expected ? void 0 : null;
1390 }
1391 node = node.getAttribute(name);
1392 if ("" === node && true === expected) return true;
1393 checkAttributeStringCoercion(expected, name);
1394 return node === "" + expected ? expected : node;
1395 }
1396 }
1397 function setValueForAttribute(node, name, value) {
1398 if (isAttributeNameSafe(name))
1399 if (null === value) node.removeAttribute(name);
1400 else {
1401 switch (typeof value) {
1402 case "undefined":
1403 case "function":
1404 case "symbol":
1405 node.removeAttribute(name);
1406 return;
1407 case "boolean":
1408 var prefix2 = name.toLowerCase().slice(0, 5);
1409 if ("data-" !== prefix2 && "aria-" !== prefix2) {
1410 node.removeAttribute(name);
1411 return;
1412 }
1413 }
1414 checkAttributeStringCoercion(value, name);
1415 node.setAttribute(name, "" + value);
1416 }
1417 }
1418 function setValueForKnownAttribute(node, name, value) {
1419 if (null === value) node.removeAttribute(name);
1420 else {
1421 switch (typeof value) {
1422 case "undefined":
1423 case "function":
1424 case "symbol":
1425 case "boolean":
1426 node.removeAttribute(name);
1427 return;
1428 }
1429 checkAttributeStringCoercion(value, name);
1430 node.setAttribute(name, "" + value);
1431 }
1432 }
1433 function setValueForNamespacedAttribute(node, namespace, name, value) {
1434 if (null === value) node.removeAttribute(name);
1435 else {
1436 switch (typeof value) {
1437 case "undefined":
1438 case "function":
1439 case "symbol":
1440 case "boolean":
1441 node.removeAttribute(name);
1442 return;
1443 }
1444 checkAttributeStringCoercion(value, name);
1445 node.setAttributeNS(namespace, name, "" + value);
1446 }
1447 }
1448 function disabledLog() {
1449 }
1450 function disableLogs() {
1451 if (0 === disabledDepth) {
1452 prevLog = console.log;
1453 prevInfo = console.info;
1454 prevWarn = console.warn;
1455 prevError = console.error;
1456 prevGroup = console.group;
1457 prevGroupCollapsed = console.groupCollapsed;
1458 prevGroupEnd = console.groupEnd;
1459 var props = {
1460 configurable: true,
1461 enumerable: true,
1462 value: disabledLog,
1463 writable: true
1464 };
1465 Object.defineProperties(console, {
1466 info: props,
1467 log: props,
1468 warn: props,
1469 error: props,
1470 group: props,
1471 groupCollapsed: props,
1472 groupEnd: props
1473 });
1474 }
1475 disabledDepth++;
1476 }
1477 function reenableLogs() {
1478 disabledDepth--;
1479 if (0 === disabledDepth) {
1480 var props = { configurable: true, enumerable: true, writable: true };
1481 Object.defineProperties(console, {
1482 log: assign({}, props, { value: prevLog }),
1483 info: assign({}, props, { value: prevInfo }),
1484 warn: assign({}, props, { value: prevWarn }),
1485 error: assign({}, props, { value: prevError }),
1486 group: assign({}, props, { value: prevGroup }),
1487 groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1488 groupEnd: assign({}, props, { value: prevGroupEnd })
1489 });
1490 }
1491 0 > disabledDepth && console.error(
1492 "disabledDepth fell below zero. This is a bug in React. Please file an issue."
1493 );
1494 }
1495 function describeBuiltInComponentFrame(name) {
1496 if (void 0 === prefix)
1497 try {
1498 throw Error();
1499 } catch (x) {
1500 var match = x.stack.trim().match(/\n( *(at )?)/);
1501 prefix = match && match[1] || "";
1502 suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
1503 }
1504 return "\n" + prefix + name + suffix;
1505 }
1506 function describeNativeComponentFrame(fn, construct) {
1507 if (!fn || reentry) return "";
1508 var frame = componentFrameCache.get(fn);
1509 if (void 0 !== frame) return frame;
1510 reentry = true;
1511 frame = Error.prepareStackTrace;
1512 Error.prepareStackTrace = void 0;
1513 var previousDispatcher2 = null;
1514 previousDispatcher2 = ReactSharedInternals.H;
1515 ReactSharedInternals.H = null;
1516 disableLogs();
1517 try {
1518 var RunInRootFrame = {
1519 DetermineComponentFrameRoot: function() {
1520 try {
1521 if (construct) {
1522 var Fake = function() {
1523 throw Error();
1524 };
1525 Object.defineProperty(Fake.prototype, "props", {
1526 set: function() {
1527 throw Error();
1528 }
1529 });
1530 if ("object" === typeof Reflect && Reflect.construct) {
1531 try {
1532 Reflect.construct(Fake, []);
1533 } catch (x) {
1534 var control = x;
1535 }
1536 Reflect.construct(fn, [], Fake);
1537 } else {
1538 try {
1539 Fake.call();
1540 } catch (x$0) {
1541 control = x$0;
1542 }
1543 fn.call(Fake.prototype);
1544 }
1545 } else {
1546 try {
1547 throw Error();
1548 } catch (x$1) {
1549 control = x$1;
1550 }
1551 (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
1552 });
1553 }
1554 } catch (sample) {
1555 if (sample && control && "string" === typeof sample.stack)
1556 return [sample.stack, control.stack];
1557 }
1558 return [null, null];
1559 }
1560 };
1561 RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
1562 var namePropDescriptor = Object.getOwnPropertyDescriptor(
1563 RunInRootFrame.DetermineComponentFrameRoot,
1564 "name"
1565 );
1566 namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
1567 RunInRootFrame.DetermineComponentFrameRoot,
1568 "name",
1569 { value: "DetermineComponentFrameRoot" }
1570 );
1571 var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
1572 if (sampleStack && controlStack) {
1573 var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
1574 for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
1575 "DetermineComponentFrameRoot"
1576 ); )
1577 namePropDescriptor++;
1578 for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
1579 "DetermineComponentFrameRoot"
1580 ); )
1581 _RunInRootFrame$Deter++;
1582 if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
1583 for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
1584 _RunInRootFrame$Deter--;
1585 for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
1586 if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1587 if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1588 do
1589 if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1590 var _frame = "\n" + sampleLines[namePropDescriptor].replace(
1591 " at new ",
1592 " at "
1593 );
1594 fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
1595 "function" === typeof fn && componentFrameCache.set(fn, _frame);
1596 return _frame;
1597 }
1598 while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1599 }
1600 break;
1601 }
1602 }
1603 } finally {
1604 reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
1605 }
1606 sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
1607 "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1608 return sampleLines;
1609 }
1610 function formatOwnerStack(error) {
1611 var prevPrepareStackTrace = Error.prepareStackTrace;
1612 Error.prepareStackTrace = void 0;
1613 error = error.stack;
1614 Error.prepareStackTrace = prevPrepareStackTrace;
1615 error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
1616 prevPrepareStackTrace = error.indexOf("\n");
1617 -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
1618 prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
1619 -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
1620 "\n",
1621 prevPrepareStackTrace
1622 ));
1623 if (-1 !== prevPrepareStackTrace)
1624 error = error.slice(0, prevPrepareStackTrace);
1625 else return "";
1626 return error;
1627 }
1628 function describeFiber(fiber) {
1629 switch (fiber.tag) {
1630 case 26:
1631 case 27:
1632 case 5:
1633 return describeBuiltInComponentFrame(fiber.type);
1634 case 16:
1635 return describeBuiltInComponentFrame("Lazy");
1636 case 13:
1637 return describeBuiltInComponentFrame("Suspense");
1638 case 19:
1639 return describeBuiltInComponentFrame("SuspenseList");
1640 case 0:
1641 case 15:
1642 return describeNativeComponentFrame(fiber.type, false);
1643 case 11:
1644 return describeNativeComponentFrame(fiber.type.render, false);
1645 case 1:
1646 return describeNativeComponentFrame(fiber.type, true);
1647 case 31:
1648 return describeBuiltInComponentFrame("Activity");
1649 default:
1650 return "";
1651 }
1652 }
1653 function getStackByFiberInDevAndProd(workInProgress2) {
1654 try {
1655 var info = "";
1656 do {
1657 info += describeFiber(workInProgress2);
1658 var debugInfo = workInProgress2._debugInfo;
1659 if (debugInfo)
1660 for (var i = debugInfo.length - 1; 0 <= i; i--) {
1661 var entry = debugInfo[i];
1662 if ("string" === typeof entry.name) {
1663 var JSCompiler_temp_const = info, env = entry.env;
1664 var JSCompiler_inline_result = describeBuiltInComponentFrame(
1665 entry.name + (env ? " [" + env + "]" : "")
1666 );
1667 info = JSCompiler_temp_const + JSCompiler_inline_result;
1668 }
1669 }
1670 workInProgress2 = workInProgress2.return;
1671 } while (workInProgress2);
1672 return info;
1673 } catch (x) {
1674 return "\nError generating stack: " + x.message + "\n" + x.stack;
1675 }
1676 }
1677 function describeFunctionComponentFrameWithoutLineNumber(fn) {
1678 return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : "";
1679 }
1680 function getCurrentFiberOwnerNameInDevOrNull() {
1681 if (null === current) return null;
1682 var owner = current._debugOwner;
1683 return null != owner ? getComponentNameFromOwner(owner) : null;
1684 }
1685 function getCurrentFiberStackInDev() {
1686 if (null === current) return "";
1687 var workInProgress2 = current;
1688 try {
1689 var info = "";
1690 6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return);
1691 switch (workInProgress2.tag) {
1692 case 26:
1693 case 27:
1694 case 5:
1695 info += describeBuiltInComponentFrame(workInProgress2.type);
1696 break;
1697 case 13:
1698 info += describeBuiltInComponentFrame("Suspense");
1699 break;
1700 case 19:
1701 info += describeBuiltInComponentFrame("SuspenseList");
1702 break;
1703 case 31:
1704 info += describeBuiltInComponentFrame("Activity");
1705 break;
1706 case 30:
1707 case 0:
1708 case 15:
1709 case 1:
1710 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1711 workInProgress2.type
1712 ));
1713 break;
1714 case 11:
1715 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1716 workInProgress2.type.render
1717 ));
1718 }
1719 for (; workInProgress2; )
1720 if ("number" === typeof workInProgress2.tag) {
1721 var fiber = workInProgress2;
1722 workInProgress2 = fiber._debugOwner;
1723 var debugStack = fiber._debugStack;
1724 workInProgress2 && debugStack && ("string" !== typeof debugStack && (fiber._debugStack = debugStack = formatOwnerStack(debugStack)), "" !== debugStack && (info += "\n" + debugStack));
1725 } else if (null != workInProgress2.debugStack) {
1726 var ownerStack = workInProgress2.debugStack;
1727 (workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
1728 } else break;
1729 var JSCompiler_inline_result = info;
1730 } catch (x) {
1731 JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack;
1732 }
1733 return JSCompiler_inline_result;
1734 }
1735 function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
1736 var previousFiber = current;
1737 setCurrentFiber(fiber);
1738 try {
1739 return null !== fiber && fiber._debugTask ? fiber._debugTask.run(
1740 callback.bind(null, arg0, arg1, arg2, arg3, arg4)
1741 ) : callback(arg0, arg1, arg2, arg3, arg4);
1742 } finally {
1743 setCurrentFiber(previousFiber);
1744 }
1745 throw Error(
1746 "runWithFiberInDEV should never be called in production. This is a bug in React."
1747 );
1748 }
1749 function setCurrentFiber(fiber) {
1750 ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev;
1751 isRendering = false;
1752 current = fiber;
1753 }
1754 function getToStringValue(value) {
1755 switch (typeof value) {
1756 case "bigint":
1757 case "boolean":
1758 case "number":
1759 case "string":
1760 case "undefined":
1761 return value;
1762 case "object":
1763 return checkFormFieldValueStringCoercion(value), value;
1764 default:
1765 return "";
1766 }
1767 }
1768 function isCheckable(elem) {
1769 var type = elem.type;
1770 return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type);
1771 }
1772 function trackValueOnNode(node) {
1773 var valueField = isCheckable(node) ? "checked" : "value", descriptor = Object.getOwnPropertyDescriptor(
1774 node.constructor.prototype,
1775 valueField
1776 );
1777 checkFormFieldValueStringCoercion(node[valueField]);
1778 var currentValue = "" + node[valueField];
1779 if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) {
1780 var get = descriptor.get, set = descriptor.set;
1781 Object.defineProperty(node, valueField, {
1782 configurable: true,
1783 get: function() {
1784 return get.call(this);
1785 },
1786 set: function(value) {
1787 checkFormFieldValueStringCoercion(value);
1788 currentValue = "" + value;
1789 set.call(this, value);
1790 }
1791 });
1792 Object.defineProperty(node, valueField, {
1793 enumerable: descriptor.enumerable
1794 });
1795 return {
1796 getValue: function() {
1797 return currentValue;
1798 },
1799 setValue: function(value) {
1800 checkFormFieldValueStringCoercion(value);
1801 currentValue = "" + value;
1802 },
1803 stopTracking: function() {
1804 node._valueTracker = null;
1805 delete node[valueField];
1806 }
1807 };
1808 }
1809 }
1810 function track(node) {
1811 node._valueTracker || (node._valueTracker = trackValueOnNode(node));
1812 }
1813 function updateValueIfChanged(node) {
1814 if (!node) return false;
1815 var tracker = node._valueTracker;
1816 if (!tracker) return true;
1817 var lastValue = tracker.getValue();
1818 var value = "";
1819 node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value);
1820 node = value;
1821 return node !== lastValue ? (tracker.setValue(node), true) : false;
1822 }
1823 function getActiveElement(doc) {
1824 doc = doc || ("undefined" !== typeof document ? document : void 0);
1825 if ("undefined" === typeof doc) return null;
1826 try {
1827 return doc.activeElement || doc.body;
1828 } catch (e) {
1829 return doc.body;
1830 }
1831 }
1832 function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
1833 return value.replace(
1834 escapeSelectorAttributeValueInsideDoubleQuotesRegex,
1835 function(ch) {
1836 return "\\" + ch.charCodeAt(0).toString(16) + " ";
1837 }
1838 );
1839 }
1840 function validateInputProps(element, props) {
1841 void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error(
1842 "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
1843 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1844 props.type
1845 ), didWarnCheckedDefaultChecked = true);
1846 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error(
1847 "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
1848 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1849 props.type
1850 ), didWarnValueDefaultValue$1 = true);
1851 }
1852 function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {
1853 element.name = "";
1854 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type");
1855 if (null != value)
1856 if ("number" === type) {
1857 if (0 === value && "" === element.value || element.value != value)
1858 element.value = "" + getToStringValue(value);
1859 } else
1860 element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value));
1861 else
1862 "submit" !== type && "reset" !== type || element.removeAttribute("value");
1863 null != value ? setDefaultValue(element, type, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, type, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value");
1864 null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked);
1865 null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked);
1866 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name");
1867 }
1868 function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) {
1869 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type);
1870 if (null != value || null != defaultValue) {
1871 if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value))
1872 return;
1873 defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1874 value = null != value ? "" + getToStringValue(value) : defaultValue;
1875 isHydrating2 || value === element.value || (element.value = value);
1876 element.defaultValue = value;
1877 }
1878 checked = null != checked ? checked : defaultChecked;
1879 checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
1880 element.checked = isHydrating2 ? element.checked : !!checked;
1881 element.defaultChecked = !!checked;
1882 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name);
1883 }
1884 function setDefaultValue(node, type, value) {
1885 "number" === type && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
1886 }
1887 function validateOptionProps(element, props) {
1888 null == props.value && ("object" === typeof props.children && null !== props.children ? React2.Children.forEach(props.children, function(child) {
1889 null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error(
1890 "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
1891 ));
1892 }) : null == props.dangerouslySetInnerHTML || didWarnInvalidInnerHTML || (didWarnInvalidInnerHTML = true, console.error(
1893 "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
1894 )));
1895 null == props.selected || didWarnSelectedSetOnOption || (console.error(
1896 "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
1897 ), didWarnSelectedSetOnOption = true);
1898 }
1899 function getDeclarationErrorAddendum() {
1900 var ownerName = getCurrentFiberOwnerNameInDevOrNull();
1901 return ownerName ? "\n\nCheck the render method of `" + ownerName + "`." : "";
1902 }
1903 function updateOptions(node, multiple, propValue, setDefaultSelected) {
1904 node = node.options;
1905 if (multiple) {
1906 multiple = {};
1907 for (var i = 0; i < propValue.length; i++)
1908 multiple["$" + propValue[i]] = true;
1909 for (propValue = 0; propValue < node.length; propValue++)
1910 i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = true);
1911 } else {
1912 propValue = "" + getToStringValue(propValue);
1913 multiple = null;
1914 for (i = 0; i < node.length; i++) {
1915 if (node[i].value === propValue) {
1916 node[i].selected = true;
1917 setDefaultSelected && (node[i].defaultSelected = true);
1918 return;
1919 }
1920 null !== multiple || node[i].disabled || (multiple = node[i]);
1921 }
1922 null !== multiple && (multiple.selected = true);
1923 }
1924 }
1925 function validateSelectProps(element, props) {
1926 for (element = 0; element < valuePropNames.length; element++) {
1927 var propName = valuePropNames[element];
1928 if (null != props[propName]) {
1929 var propNameIsArray = isArrayImpl(props[propName]);
1930 props.multiple && !propNameIsArray ? console.error(
1931 "The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",
1932 propName,
1933 getDeclarationErrorAddendum()
1934 ) : !props.multiple && propNameIsArray && console.error(
1935 "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
1936 propName,
1937 getDeclarationErrorAddendum()
1938 );
1939 }
1940 }
1941 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (console.error(
1942 "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"
1943 ), didWarnValueDefaultValue = true);
1944 }
1945 function validateTextareaProps(element, props) {
1946 void 0 === props.value || void 0 === props.defaultValue || didWarnValDefaultVal || (console.error(
1947 "%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",
1948 getCurrentFiberOwnerNameInDevOrNull() || "A component"
1949 ), didWarnValDefaultVal = true);
1950 null != props.children && null == props.value && console.error(
1951 "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
1952 );
1953 }
1954 function updateTextarea(element, value, defaultValue) {
1955 if (null != value && (value = "" + getToStringValue(value), value !== element.value && (element.value = value), null == defaultValue)) {
1956 element.defaultValue !== value && (element.defaultValue = value);
1957 return;
1958 }
1959 element.defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1960 }
1961 function initTextarea(element, value, defaultValue, children) {
1962 if (null == value) {
1963 if (null != children) {
1964 if (null != defaultValue)
1965 throw Error(
1966 "If you supply `defaultValue` on a <textarea>, do not pass children."
1967 );
1968 if (isArrayImpl(children)) {
1969 if (1 < children.length)
1970 throw Error("<textarea> can only have at most one child.");
1971 children = children[0];
1972 }
1973 defaultValue = children;
1974 }
1975 null == defaultValue && (defaultValue = "");
1976 value = defaultValue;
1977 }
1978 defaultValue = getToStringValue(value);
1979 element.defaultValue = defaultValue;
1980 children = element.textContent;
1981 children === defaultValue && "" !== children && null !== children && (element.value = children);
1982 }
1983 function findNotableNode(node, indent) {
1984 return void 0 === node.serverProps && 0 === node.serverTail.length && 1 === node.children.length && 3 < node.distanceFromLeaf && node.distanceFromLeaf > 15 - indent ? findNotableNode(node.children[0], indent) : node;
1985 }
1986 function indentation(indent) {
1987 return " " + " ".repeat(indent);
1988 }
1989 function added(indent) {
1990 return "+ " + " ".repeat(indent);
1991 }
1992 function removed(indent) {
1993 return "- " + " ".repeat(indent);
1994 }
1995 function describeFiberType(fiber) {
1996 switch (fiber.tag) {
1997 case 26:
1998 case 27:
1999 case 5:
2000 return fiber.type;
2001 case 16:
2002 return "Lazy";
2003 case 13:
2004 return "Suspense";
2005 case 19:
2006 return "SuspenseList";
2007 case 0:
2008 case 15:
2009 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2010 case 11:
2011 return fiber = fiber.type.render, fiber.displayName || fiber.name || null;
2012 case 1:
2013 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2014 default:
2015 return null;
2016 }
2017 }
2018 function describeTextNode(content, maxLength) {
2019 return needsEscaping.test(content) ? (content = JSON.stringify(content), content.length > maxLength - 2 ? 8 > maxLength ? '{"..."}' : "{" + content.slice(0, maxLength - 7) + '..."}' : "{" + content + "}") : content.length > maxLength ? 5 > maxLength ? '{"..."}' : content.slice(0, maxLength - 3) + "..." : content;
2020 }
2021 function describeTextDiff(clientText, serverProps, indent) {
2022 var maxLength = 120 - 2 * indent;
2023 if (null === serverProps)
2024 return added(indent) + describeTextNode(clientText, maxLength) + "\n";
2025 if ("string" === typeof serverProps) {
2026 for (var firstDiff = 0; firstDiff < serverProps.length && firstDiff < clientText.length && serverProps.charCodeAt(firstDiff) === clientText.charCodeAt(firstDiff); firstDiff++) ;
2027 firstDiff > maxLength - 8 && 10 < firstDiff && (clientText = "..." + clientText.slice(firstDiff - 8), serverProps = "..." + serverProps.slice(firstDiff - 8));
2028 return added(indent) + describeTextNode(clientText, maxLength) + "\n" + removed(indent) + describeTextNode(serverProps, maxLength) + "\n";
2029 }
2030 return indentation(indent) + describeTextNode(clientText, maxLength) + "\n";
2031 }
2032 function objectName(object) {
2033 return Object.prototype.toString.call(object).replace(/^\[object (.*)\]$/, function(m, p0) {
2034 return p0;
2035 });
2036 }
2037 function describeValue(value, maxLength) {
2038 switch (typeof value) {
2039 case "string":
2040 return value = JSON.stringify(value), value.length > maxLength ? 5 > maxLength ? '"..."' : value.slice(0, maxLength - 4) + '..."' : value;
2041 case "object":
2042 if (null === value) return "null";
2043 if (isArrayImpl(value)) return "[...]";
2044 if (value.$$typeof === REACT_ELEMENT_TYPE)
2045 return (maxLength = getComponentNameFromType(value.type)) ? "<" + maxLength + ">" : "<...>";
2046 var name = objectName(value);
2047 if ("Object" === name) {
2048 name = "";
2049 maxLength -= 2;
2050 for (var propName in value)
2051 if (value.hasOwnProperty(propName)) {
2052 var jsonPropName = JSON.stringify(propName);
2053 jsonPropName !== '"' + propName + '"' && (propName = jsonPropName);
2054 maxLength -= propName.length - 2;
2055 jsonPropName = describeValue(
2056 value[propName],
2057 15 > maxLength ? maxLength : 15
2058 );
2059 maxLength -= jsonPropName.length;
2060 if (0 > maxLength) {
2061 name += "" === name ? "..." : ", ...";
2062 break;
2063 }
2064 name += ("" === name ? "" : ",") + propName + ":" + jsonPropName;
2065 }
2066 return "{" + name + "}";
2067 }
2068 return name;
2069 case "function":
2070 return (maxLength = value.displayName || value.name) ? "function " + maxLength : "function";
2071 default:
2072 return String(value);
2073 }
2074 }
2075 function describePropValue(value, maxLength) {
2076 return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
2077 }
2078 function describeExpandedElement(type, props, rowPrefix) {
2079 var remainingRowLength = 120 - rowPrefix.length - type.length, properties = [], propName;
2080 for (propName in props)
2081 if (props.hasOwnProperty(propName) && "children" !== propName) {
2082 var propValue = describePropValue(
2083 props[propName],
2084 120 - rowPrefix.length - propName.length - 1
2085 );
2086 remainingRowLength -= propName.length + propValue.length + 2;
2087 properties.push(propName + "=" + propValue);
2088 }
2089 return 0 === properties.length ? rowPrefix + "<" + type + ">\n" : 0 < remainingRowLength ? rowPrefix + "<" + type + " " + properties.join(" ") + ">\n" : rowPrefix + "<" + type + "\n" + rowPrefix + " " + properties.join("\n" + rowPrefix + " ") + "\n" + rowPrefix + ">\n";
2090 }
2091 function describePropertiesDiff(clientObject, serverObject, indent) {
2092 var properties = "", remainingServerProperties = assign({}, serverObject), propName;
2093 for (propName in clientObject)
2094 if (clientObject.hasOwnProperty(propName)) {
2095 delete remainingServerProperties[propName];
2096 var maxLength = 120 - 2 * indent - propName.length - 2, clientPropValue = describeValue(clientObject[propName], maxLength);
2097 serverObject.hasOwnProperty(propName) ? (maxLength = describeValue(serverObject[propName], maxLength), properties += added(indent) + propName + ": " + clientPropValue + "\n", properties += removed(indent) + propName + ": " + maxLength + "\n") : properties += added(indent) + propName + ": " + clientPropValue + "\n";
2098 }
2099 for (var _propName in remainingServerProperties)
2100 remainingServerProperties.hasOwnProperty(_propName) && (clientObject = describeValue(
2101 remainingServerProperties[_propName],
2102 120 - 2 * indent - _propName.length - 2
2103 ), properties += removed(indent) + _propName + ": " + clientObject + "\n");
2104 return properties;
2105 }
2106 function describeElementDiff(type, clientProps, serverProps, indent) {
2107 var content = "", serverPropNames = /* @__PURE__ */ new Map();
2108 for (propName$jscomp$0 in serverProps)
2109 serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
2110 propName$jscomp$0.toLowerCase(),
2111 propName$jscomp$0
2112 );
2113 if (1 === serverPropNames.size && serverPropNames.has("children"))
2114 content += describeExpandedElement(
2115 type,
2116 clientProps,
2117 indentation(indent)
2118 );
2119 else {
2120 for (var _propName2 in clientProps)
2121 if (clientProps.hasOwnProperty(_propName2) && "children" !== _propName2) {
2122 var maxLength$jscomp$0 = 120 - 2 * (indent + 1) - _propName2.length - 1, serverPropName = serverPropNames.get(_propName2.toLowerCase());
2123 if (void 0 !== serverPropName) {
2124 serverPropNames.delete(_propName2.toLowerCase());
2125 var propName$jscomp$0 = clientProps[_propName2];
2126 serverPropName = serverProps[serverPropName];
2127 var clientPropValue = describePropValue(
2128 propName$jscomp$0,
2129 maxLength$jscomp$0
2130 );
2131 maxLength$jscomp$0 = describePropValue(
2132 serverPropName,
2133 maxLength$jscomp$0
2134 );
2135 "object" === typeof propName$jscomp$0 && null !== propName$jscomp$0 && "object" === typeof serverPropName && null !== serverPropName && "Object" === objectName(propName$jscomp$0) && "Object" === objectName(serverPropName) && (2 < Object.keys(propName$jscomp$0).length || 2 < Object.keys(serverPropName).length || -1 < clientPropValue.indexOf("...") || -1 < maxLength$jscomp$0.indexOf("...")) ? content += indentation(indent + 1) + _propName2 + "={{\n" + describePropertiesDiff(
2136 propName$jscomp$0,
2137 serverPropName,
2138 indent + 2
2139 ) + indentation(indent + 1) + "}}\n" : (content += added(indent + 1) + _propName2 + "=" + clientPropValue + "\n", content += removed(indent + 1) + _propName2 + "=" + maxLength$jscomp$0 + "\n");
2140 } else
2141 content += indentation(indent + 1) + _propName2 + "=" + describePropValue(clientProps[_propName2], maxLength$jscomp$0) + "\n";
2142 }
2143 serverPropNames.forEach(function(propName) {
2144 if ("children" !== propName) {
2145 var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
2146 content += removed(indent + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
2147 }
2148 });
2149 content = "" === content ? indentation(indent) + "<" + type + ">\n" : indentation(indent) + "<" + type + "\n" + content + indentation(indent) + ">\n";
2150 }
2151 type = serverProps.children;
2152 clientProps = clientProps.children;
2153 if ("string" === typeof type || "number" === typeof type || "bigint" === typeof type) {
2154 serverPropNames = "";
2155 if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2156 serverPropNames = "" + clientProps;
2157 content += describeTextDiff(serverPropNames, "" + type, indent + 1);
2158 } else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2159 content = null == type ? content + describeTextDiff("" + clientProps, null, indent + 1) : content + describeTextDiff("" + clientProps, void 0, indent + 1);
2160 return content;
2161 }
2162 function describeSiblingFiber(fiber, indent) {
2163 var type = describeFiberType(fiber);
2164 if (null === type) {
2165 type = "";
2166 for (fiber = fiber.child; fiber; )
2167 type += describeSiblingFiber(fiber, indent), fiber = fiber.sibling;
2168 return type;
2169 }
2170 return indentation(indent) + "<" + type + ">\n";
2171 }
2172 function describeNode(node, indent) {
2173 var skipToNode = findNotableNode(node, indent);
2174 if (skipToNode !== node && (1 !== node.children.length || node.children[0] !== skipToNode))
2175 return indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1);
2176 skipToNode = "";
2177 var debugInfo = node.fiber._debugInfo;
2178 if (debugInfo)
2179 for (var i = 0; i < debugInfo.length; i++) {
2180 var serverComponentName = debugInfo[i].name;
2181 "string" === typeof serverComponentName && (skipToNode += indentation(indent) + "<" + serverComponentName + ">\n", indent++);
2182 }
2183 debugInfo = "";
2184 i = node.fiber.pendingProps;
2185 if (6 === node.fiber.tag)
2186 debugInfo = describeTextDiff(i, node.serverProps, indent), indent++;
2187 else if (serverComponentName = describeFiberType(node.fiber), null !== serverComponentName)
2188 if (void 0 === node.serverProps) {
2189 debugInfo = indent;
2190 var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2, content = "";
2191 for (propName in i)
2192 if (i.hasOwnProperty(propName) && "children" !== propName) {
2193 var propValue = describePropValue(i[propName], 15);
2194 maxLength -= propName.length + propValue.length + 2;
2195 if (0 > maxLength) {
2196 content += " ...";
2197 break;
2198 }
2199 content += " " + propName + "=" + propValue;
2200 }
2201 debugInfo = indentation(debugInfo) + "<" + serverComponentName + content + ">\n";
2202 indent++;
2203 } else
2204 null === node.serverProps ? (debugInfo = describeExpandedElement(
2205 serverComponentName,
2206 i,
2207 added(indent)
2208 ), indent++) : "string" === typeof node.serverProps ? console.error(
2209 "Should not have matched a non HostText fiber to a Text node. This is a bug in React."
2210 ) : (debugInfo = describeElementDiff(
2211 serverComponentName,
2212 i,
2213 node.serverProps,
2214 indent
2215 ), indent++);
2216 var propName = "";
2217 i = node.fiber.child;
2218 for (serverComponentName = 0; i && serverComponentName < node.children.length; )
2219 maxLength = node.children[serverComponentName], maxLength.fiber === i ? (propName += describeNode(maxLength, indent), serverComponentName++) : propName += describeSiblingFiber(i, indent), i = i.sibling;
2220 i && 0 < node.children.length && (propName += indentation(indent) + "...\n");
2221 i = node.serverTail;
2222 null === node.serverProps && indent--;
2223 for (node = 0; node < i.length; node++)
2224 serverComponentName = i[node], propName = "string" === typeof serverComponentName ? propName + (removed(indent) + describeTextNode(serverComponentName, 120 - 2 * indent) + "\n") : propName + describeExpandedElement(
2225 serverComponentName.type,
2226 serverComponentName.props,
2227 removed(indent)
2228 );
2229 return skipToNode + debugInfo + propName;
2230 }
2231 function describeDiff(rootNode) {
2232 try {
2233 return "\n\n" + describeNode(rootNode, 0);
2234 } catch (x) {
2235 return "";
2236 }
2237 }
2238 function describeAncestors(ancestor, child, props) {
2239 for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
2240 fiber === ancestor && (distanceFromLeaf = 0), node = {
2241 fiber,
2242 children: null !== node ? [node] : [],
2243 serverProps: fiber === child ? props : fiber === ancestor ? null : void 0,
2244 serverTail: [],
2245 distanceFromLeaf
2246 }, distanceFromLeaf++, fiber = fiber.return;
2247 return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
2248 }
2249 function updatedAncestorInfoDev(oldInfo, tag) {
2250 var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev), info = { tag };
2251 -1 !== inScopeTags.indexOf(tag) && (ancestorInfo.aTagInScope = null, ancestorInfo.buttonTagInScope = null, ancestorInfo.nobrTagInScope = null);
2252 -1 !== buttonScopeTags.indexOf(tag) && (ancestorInfo.pTagInButtonScope = null);
2253 -1 !== specialTags.indexOf(tag) && "address" !== tag && "div" !== tag && "p" !== tag && (ancestorInfo.listItemTagAutoclosing = null, ancestorInfo.dlItemTagAutoclosing = null);
2254 ancestorInfo.current = info;
2255 "form" === tag && (ancestorInfo.formTag = info);
2256 "a" === tag && (ancestorInfo.aTagInScope = info);
2257 "button" === tag && (ancestorInfo.buttonTagInScope = info);
2258 "nobr" === tag && (ancestorInfo.nobrTagInScope = info);
2259 "p" === tag && (ancestorInfo.pTagInButtonScope = info);
2260 "li" === tag && (ancestorInfo.listItemTagAutoclosing = info);
2261 if ("dd" === tag || "dt" === tag)
2262 ancestorInfo.dlItemTagAutoclosing = info;
2263 "#document" === tag || "html" === tag ? ancestorInfo.containerTagInScope = null : ancestorInfo.containerTagInScope || (ancestorInfo.containerTagInScope = info);
2264 null !== oldInfo || "#document" !== tag && "html" !== tag && "body" !== tag ? true === ancestorInfo.implicitRootScope && (ancestorInfo.implicitRootScope = false) : ancestorInfo.implicitRootScope = true;
2265 return ancestorInfo;
2266 }
2267 function isTagValidWithParent(tag, parentTag, implicitRootScope) {
2268 switch (parentTag) {
2269 case "select":
2270 return "hr" === tag || "option" === tag || "optgroup" === tag || "script" === tag || "template" === tag || "#text" === tag;
2271 case "optgroup":
2272 return "option" === tag || "#text" === tag;
2273 case "option":
2274 return "#text" === tag;
2275 case "tr":
2276 return "th" === tag || "td" === tag || "style" === tag || "script" === tag || "template" === tag;
2277 case "tbody":
2278 case "thead":
2279 case "tfoot":
2280 return "tr" === tag || "style" === tag || "script" === tag || "template" === tag;
2281 case "colgroup":
2282 return "col" === tag || "template" === tag;
2283 case "table":
2284 return "caption" === tag || "colgroup" === tag || "tbody" === tag || "tfoot" === tag || "thead" === tag || "style" === tag || "script" === tag || "template" === tag;
2285 case "head":
2286 return "base" === tag || "basefont" === tag || "bgsound" === tag || "link" === tag || "meta" === tag || "title" === tag || "noscript" === tag || "noframes" === tag || "style" === tag || "script" === tag || "template" === tag;
2287 case "html":
2288 if (implicitRootScope) break;
2289 return "head" === tag || "body" === tag || "frameset" === tag;
2290 case "frameset":
2291 return "frame" === tag;
2292 case "#document":
2293 if (!implicitRootScope) return "html" === tag;
2294 }
2295 switch (tag) {
2296 case "h1":
2297 case "h2":
2298 case "h3":
2299 case "h4":
2300 case "h5":
2301 case "h6":
2302 return "h1" !== parentTag && "h2" !== parentTag && "h3" !== parentTag && "h4" !== parentTag && "h5" !== parentTag && "h6" !== parentTag;
2303 case "rp":
2304 case "rt":
2305 return -1 === impliedEndTags.indexOf(parentTag);
2306 case "caption":
2307 case "col":
2308 case "colgroup":
2309 case "frameset":
2310 case "frame":
2311 case "tbody":
2312 case "td":
2313 case "tfoot":
2314 case "th":
2315 case "thead":
2316 case "tr":
2317 return null == parentTag;
2318 case "head":
2319 return implicitRootScope || null === parentTag;
2320 case "html":
2321 return implicitRootScope && "#document" === parentTag || null === parentTag;
2322 case "body":
2323 return implicitRootScope && ("#document" === parentTag || "html" === parentTag) || null === parentTag;
2324 }
2325 return true;
2326 }
2327 function findInvalidAncestorForTag(tag, ancestorInfo) {
2328 switch (tag) {
2329 case "address":
2330 case "article":
2331 case "aside":
2332 case "blockquote":
2333 case "center":
2334 case "details":
2335 case "dialog":
2336 case "dir":
2337 case "div":
2338 case "dl":
2339 case "fieldset":
2340 case "figcaption":
2341 case "figure":
2342 case "footer":
2343 case "header":
2344 case "hgroup":
2345 case "main":
2346 case "menu":
2347 case "nav":
2348 case "ol":
2349 case "p":
2350 case "section":
2351 case "summary":
2352 case "ul":
2353 case "pre":
2354 case "listing":
2355 case "table":
2356 case "hr":
2357 case "xmp":
2358 case "h1":
2359 case "h2":
2360 case "h3":
2361 case "h4":
2362 case "h5":
2363 case "h6":
2364 return ancestorInfo.pTagInButtonScope;
2365 case "form":
2366 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
2367 case "li":
2368 return ancestorInfo.listItemTagAutoclosing;
2369 case "dd":
2370 case "dt":
2371 return ancestorInfo.dlItemTagAutoclosing;
2372 case "button":
2373 return ancestorInfo.buttonTagInScope;
2374 case "a":
2375 return ancestorInfo.aTagInScope;
2376 case "nobr":
2377 return ancestorInfo.nobrTagInScope;
2378 }
2379 return null;
2380 }
2381 function findAncestor(parent, tagName) {
2382 for (; parent; ) {
2383 switch (parent.tag) {
2384 case 5:
2385 case 26:
2386 case 27:
2387 if (parent.type === tagName) return parent;
2388 }
2389 parent = parent.return;
2390 }
2391 return null;
2392 }
2393 function validateDOMNesting(childTag, ancestorInfo) {
2394 ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
2395 var parentInfo = ancestorInfo.current;
2396 ancestorInfo = (parentInfo = isTagValidWithParent(
2397 childTag,
2398 parentInfo && parentInfo.tag,
2399 ancestorInfo.implicitRootScope
2400 ) ? null : parentInfo) ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
2401 ancestorInfo = parentInfo || ancestorInfo;
2402 if (!ancestorInfo) return true;
2403 var ancestorTag = ancestorInfo.tag;
2404 ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
2405 if (didWarn[ancestorInfo]) return false;
2406 didWarn[ancestorInfo] = true;
2407 var ancestor = (ancestorInfo = current) ? findAncestor(ancestorInfo.return, ancestorTag) : null, ancestorDescription = null !== ancestorInfo && null !== ancestor ? describeAncestors(ancestor, ancestorInfo, null) : "", tagDisplayName = "<" + childTag + ">";
2408 parentInfo ? (parentInfo = "", "table" === ancestorTag && "tr" === childTag && (parentInfo += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."), console.error(
2409 "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
2410 tagDisplayName,
2411 ancestorTag,
2412 parentInfo,
2413 ancestorDescription
2414 )) : console.error(
2415 "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
2416 tagDisplayName,
2417 ancestorTag,
2418 ancestorDescription
2419 );
2420 ancestorInfo && (childTag = ancestorInfo.return, null === ancestor || null === childTag || ancestor === childTag && childTag._debugOwner === ancestorInfo._debugOwner || runWithFiberInDEV(ancestor, function() {
2421 console.error(
2422 "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
2423 ancestorTag,
2424 tagDisplayName
2425 );
2426 }));
2427 return false;
2428 }
2429 function validateTextNesting(childText, parentTag, implicitRootScope) {
2430 if (implicitRootScope || isTagValidWithParent("#text", parentTag, false))
2431 return true;
2432 implicitRootScope = "#text|" + parentTag;
2433 if (didWarn[implicitRootScope]) return false;
2434 didWarn[implicitRootScope] = true;
2435 var ancestor = (implicitRootScope = current) ? findAncestor(implicitRootScope, parentTag) : null;
2436 implicitRootScope = null !== implicitRootScope && null !== ancestor ? describeAncestors(
2437 ancestor,
2438 implicitRootScope,
2439 6 !== implicitRootScope.tag ? { children: null } : null
2440 ) : "";
2441 /\S/.test(childText) ? console.error(
2442 "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s",
2443 parentTag,
2444 implicitRootScope
2445 ) : console.error(
2446 "In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s",
2447 parentTag,
2448 implicitRootScope
2449 );
2450 return false;
2451 }
2452 function setTextContent(node, text) {
2453 if (text) {
2454 var firstChild = node.firstChild;
2455 if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) {
2456 firstChild.nodeValue = text;
2457 return;
2458 }
2459 }
2460 node.textContent = text;
2461 }
2462 function camelize(string) {
2463 return string.replace(hyphenPattern, function(_, character) {
2464 return character.toUpperCase();
2465 });
2466 }
2467 function setValueForStyle(style2, styleName, value) {
2468 var isCustomProperty = 0 === styleName.indexOf("--");
2469 isCustomProperty || (-1 < styleName.indexOf("-") ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2470 "Unsupported style property %s. Did you mean %s?",
2471 styleName,
2472 camelize(styleName.replace(msPattern, "ms-"))
2473 )) : badVendoredStyleNamePattern.test(styleName) ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2474 "Unsupported vendor-prefixed style property %s. Did you mean %s?",
2475 styleName,
2476 styleName.charAt(0).toUpperCase() + styleName.slice(1)
2477 )) : !badStyleValueWithSemicolonPattern.test(value) || warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value] || (warnedStyleValues[value] = true, console.error(
2478 `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
2479 styleName,
2480 value.replace(badStyleValueWithSemicolonPattern, "")
2481 )), "number" === typeof value && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error(
2482 "`NaN` is an invalid value for the `%s` css style property.",
2483 styleName
2484 )) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error(
2485 "`Infinity` is an invalid value for the `%s` css style property.",
2486 styleName
2487 ))));
2488 null == value || "boolean" === typeof value || "" === value ? isCustomProperty ? style2.setProperty(styleName, "") : "float" === styleName ? style2.cssFloat = "" : style2[styleName] = "" : isCustomProperty ? style2.setProperty(styleName, value) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? "float" === styleName ? style2.cssFloat = value : (checkCSSPropertyStringCoercion(value, styleName), style2[styleName] = ("" + value).trim()) : style2[styleName] = value + "px";
2489 }
2490 function setValueForStyles(node, styles, prevStyles) {
2491 if (null != styles && "object" !== typeof styles)
2492 throw Error(
2493 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
2494 );
2495 styles && Object.freeze(styles);
2496 node = node.style;
2497 if (null != prevStyles) {
2498 if (styles) {
2499 var expandedUpdates = {};
2500 if (prevStyles) {
2501 for (var key in prevStyles)
2502 if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))
2503 for (var longhands = shorthandToLonghand[key] || [key], i = 0; i < longhands.length; i++)
2504 expandedUpdates[longhands[i]] = key;
2505 }
2506 for (var _key in styles)
2507 if (styles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== styles[_key]))
2508 for (key = shorthandToLonghand[_key] || [_key], longhands = 0; longhands < key.length; longhands++)
2509 expandedUpdates[key[longhands]] = _key;
2510 _key = {};
2511 for (var key$jscomp$0 in styles)
2512 for (key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0], longhands = 0; longhands < key.length; longhands++)
2513 _key[key[longhands]] = key$jscomp$0;
2514 key$jscomp$0 = {};
2515 for (var _key2 in expandedUpdates)
2516 if (key = expandedUpdates[_key2], (longhands = _key[_key2]) && key !== longhands && (i = key + "," + longhands, !key$jscomp$0[i])) {
2517 key$jscomp$0[i] = true;
2518 i = console;
2519 var value = styles[key];
2520 i.error.call(
2521 i,
2522 "%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",
2523 null == value || "boolean" === typeof value || "" === value ? "Removing" : "Updating",
2524 key,
2525 longhands
2526 );
2527 }
2528 }
2529 for (var styleName in prevStyles)
2530 !prevStyles.hasOwnProperty(styleName) || null != styles && styles.hasOwnProperty(styleName) || (0 === styleName.indexOf("--") ? node.setProperty(styleName, "") : "float" === styleName ? node.cssFloat = "" : node[styleName] = "");
2531 for (var _styleName in styles)
2532 _key2 = styles[_styleName], styles.hasOwnProperty(_styleName) && prevStyles[_styleName] !== _key2 && setValueForStyle(node, _styleName, _key2);
2533 } else
2534 for (expandedUpdates in styles)
2535 styles.hasOwnProperty(expandedUpdates) && setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);
2536 }
2537 function isCustomElement(tagName) {
2538 if (-1 === tagName.indexOf("-")) return false;
2539 switch (tagName) {
2540 case "annotation-xml":
2541 case "color-profile":
2542 case "font-face":
2543 case "font-face-src":
2544 case "font-face-uri":
2545 case "font-face-format":
2546 case "font-face-name":
2547 case "missing-glyph":
2548 return false;
2549 default:
2550 return true;
2551 }
2552 }
2553 function getAttributeAlias(name) {
2554 return aliases.get(name) || name;
2555 }
2556 function validateProperty$1(tagName, name) {
2557 if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name])
2558 return true;
2559 if (rARIACamel$1.test(name)) {
2560 tagName = "aria-" + name.slice(4).toLowerCase();
2561 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2562 if (null == tagName)
2563 return console.error(
2564 "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
2565 name
2566 ), warnedProperties$1[name] = true;
2567 if (name !== tagName)
2568 return console.error(
2569 "Invalid ARIA attribute `%s`. Did you mean `%s`?",
2570 name,
2571 tagName
2572 ), warnedProperties$1[name] = true;
2573 }
2574 if (rARIA$1.test(name)) {
2575 tagName = name.toLowerCase();
2576 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2577 if (null == tagName) return warnedProperties$1[name] = true, false;
2578 name !== tagName && (console.error(
2579 "Unknown ARIA attribute `%s`. Did you mean `%s`?",
2580 name,
2581 tagName
2582 ), warnedProperties$1[name] = true);
2583 }
2584 return true;
2585 }
2586 function validateProperties$2(type, props) {
2587 var invalidProps = [], key;
2588 for (key in props)
2589 validateProperty$1(type, key) || invalidProps.push(key);
2590 props = invalidProps.map(function(prop) {
2591 return "`" + prop + "`";
2592 }).join(", ");
2593 1 === invalidProps.length ? console.error(
2594 "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2595 props,
2596 type
2597 ) : 1 < invalidProps.length && console.error(
2598 "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2599 props,
2600 type
2601 );
2602 }
2603 function validateProperty(tagName, name, value, eventRegistry) {
2604 if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
2605 return true;
2606 var lowerCasedName = name.toLowerCase();
2607 if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
2608 return console.error(
2609 "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."
2610 ), warnedProperties[name] = true;
2611 if ("function" === typeof value && ("form" === tagName && "action" === name || "input" === tagName && "formAction" === name || "button" === tagName && "formAction" === name))
2612 return true;
2613 if (null != eventRegistry) {
2614 tagName = eventRegistry.possibleRegistrationNames;
2615 if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
2616 return true;
2617 eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
2618 if (null != eventRegistry)
2619 return console.error(
2620 "Invalid event handler property `%s`. Did you mean `%s`?",
2621 name,
2622 eventRegistry
2623 ), warnedProperties[name] = true;
2624 if (EVENT_NAME_REGEX.test(name))
2625 return console.error(
2626 "Unknown event handler property `%s`. It will be ignored.",
2627 name
2628 ), warnedProperties[name] = true;
2629 } else if (EVENT_NAME_REGEX.test(name))
2630 return INVALID_EVENT_NAME_REGEX.test(name) && console.error(
2631 "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
2632 name
2633 ), warnedProperties[name] = true;
2634 if (rARIA.test(name) || rARIACamel.test(name)) return true;
2635 if ("innerhtml" === lowerCasedName)
2636 return console.error(
2637 "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
2638 ), warnedProperties[name] = true;
2639 if ("aria" === lowerCasedName)
2640 return console.error(
2641 "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
2642 ), warnedProperties[name] = true;
2643 if ("is" === lowerCasedName && null !== value && void 0 !== value && "string" !== typeof value)
2644 return console.error(
2645 "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
2646 typeof value
2647 ), warnedProperties[name] = true;
2648 if ("number" === typeof value && isNaN(value))
2649 return console.error(
2650 "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
2651 name
2652 ), warnedProperties[name] = true;
2653 if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
2654 if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name)
2655 return console.error(
2656 "Invalid DOM property `%s`. Did you mean `%s`?",
2657 name,
2658 lowerCasedName
2659 ), warnedProperties[name] = true;
2660 } else if (name !== lowerCasedName)
2661 return console.error(
2662 "React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",
2663 name,
2664 lowerCasedName
2665 ), warnedProperties[name] = true;
2666 switch (name) {
2667 case "dangerouslySetInnerHTML":
2668 case "children":
2669 case "style":
2670 case "suppressContentEditableWarning":
2671 case "suppressHydrationWarning":
2672 case "defaultValue":
2673 case "defaultChecked":
2674 case "innerHTML":
2675 case "ref":
2676 return true;
2677 case "innerText":
2678 case "textContent":
2679 return true;
2680 }
2681 switch (typeof value) {
2682 case "boolean":
2683 switch (name) {
2684 case "autoFocus":
2685 case "checked":
2686 case "multiple":
2687 case "muted":
2688 case "selected":
2689 case "contentEditable":
2690 case "spellCheck":
2691 case "draggable":
2692 case "value":
2693 case "autoReverse":
2694 case "externalResourcesRequired":
2695 case "focusable":
2696 case "preserveAlpha":
2697 case "allowFullScreen":
2698 case "async":
2699 case "autoPlay":
2700 case "controls":
2701 case "default":
2702 case "defer":
2703 case "disabled":
2704 case "disablePictureInPicture":
2705 case "disableRemotePlayback":
2706 case "formNoValidate":
2707 case "hidden":
2708 case "loop":
2709 case "noModule":
2710 case "noValidate":
2711 case "open":
2712 case "playsInline":
2713 case "readOnly":
2714 case "required":
2715 case "reversed":
2716 case "scoped":
2717 case "seamless":
2718 case "itemScope":
2719 case "capture":
2720 case "download":
2721 case "inert":
2722 return true;
2723 default:
2724 lowerCasedName = name.toLowerCase().slice(0, 5);
2725 if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
2726 return true;
2727 value ? console.error(
2728 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',
2729 value,
2730 name,
2731 name,
2732 value,
2733 name
2734 ) : console.error(
2735 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
2736 value,
2737 name,
2738 name,
2739 value,
2740 name,
2741 name,
2742 name
2743 );
2744 return warnedProperties[name] = true;
2745 }
2746 case "function":
2747 case "symbol":
2748 return warnedProperties[name] = true, false;
2749 case "string":
2750 if ("false" === value || "true" === value) {
2751 switch (name) {
2752 case "checked":
2753 case "selected":
2754 case "multiple":
2755 case "muted":
2756 case "allowFullScreen":
2757 case "async":
2758 case "autoPlay":
2759 case "controls":
2760 case "default":
2761 case "defer":
2762 case "disabled":
2763 case "disablePictureInPicture":
2764 case "disableRemotePlayback":
2765 case "formNoValidate":
2766 case "hidden":
2767 case "loop":
2768 case "noModule":
2769 case "noValidate":
2770 case "open":
2771 case "playsInline":
2772 case "readOnly":
2773 case "required":
2774 case "reversed":
2775 case "scoped":
2776 case "seamless":
2777 case "itemScope":
2778 case "inert":
2779 break;
2780 default:
2781 return true;
2782 }
2783 console.error(
2784 "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
2785 value,
2786 name,
2787 "false" === value ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".',
2788 name,
2789 value
2790 );
2791 warnedProperties[name] = true;
2792 }
2793 }
2794 return true;
2795 }
2796 function warnUnknownProperties(type, props, eventRegistry) {
2797 var unknownProps = [], key;
2798 for (key in props)
2799 validateProperty(type, key, props[key], eventRegistry) || unknownProps.push(key);
2800 props = unknownProps.map(function(prop) {
2801 return "`" + prop + "`";
2802 }).join(", ");
2803 1 === unknownProps.length ? console.error(
2804 "Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",
2805 props,
2806 type
2807 ) : 1 < unknownProps.length && console.error(
2808 "Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",
2809 props,
2810 type
2811 );
2812 }
2813 function sanitizeURL(url) {
2814 return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url;
2815 }
2816 function getEventTarget(nativeEvent) {
2817 nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
2818 nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement);
2819 return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
2820 }
2821 function restoreStateOfTarget(target) {
2822 var internalInstance = getInstanceFromNode(target);
2823 if (internalInstance && (target = internalInstance.stateNode)) {
2824 var props = target[internalPropsKey] || null;
2825 a: switch (target = internalInstance.stateNode, internalInstance.type) {
2826 case "input":
2827 updateInput(
2828 target,
2829 props.value,
2830 props.defaultValue,
2831 props.defaultValue,
2832 props.checked,
2833 props.defaultChecked,
2834 props.type,
2835 props.name
2836 );
2837 internalInstance = props.name;
2838 if ("radio" === props.type && null != internalInstance) {
2839 for (props = target; props.parentNode; ) props = props.parentNode;
2840 checkAttributeStringCoercion(internalInstance, "name");
2841 props = props.querySelectorAll(
2842 'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes(
2843 "" + internalInstance
2844 ) + '"][type="radio"]'
2845 );
2846 for (internalInstance = 0; internalInstance < props.length; internalInstance++) {
2847 var otherNode = props[internalInstance];
2848 if (otherNode !== target && otherNode.form === target.form) {
2849 var otherProps = otherNode[internalPropsKey] || null;
2850 if (!otherProps)
2851 throw Error(
2852 "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."
2853 );
2854 updateInput(
2855 otherNode,
2856 otherProps.value,
2857 otherProps.defaultValue,
2858 otherProps.defaultValue,
2859 otherProps.checked,
2860 otherProps.defaultChecked,
2861 otherProps.type,
2862 otherProps.name
2863 );
2864 }
2865 }
2866 for (internalInstance = 0; internalInstance < props.length; internalInstance++)
2867 otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode);
2868 }
2869 break a;
2870 case "textarea":
2871 updateTextarea(target, props.value, props.defaultValue);
2872 break a;
2873 case "select":
2874 internalInstance = props.value, null != internalInstance && updateOptions(target, !!props.multiple, internalInstance, false);
2875 }
2876 }
2877 }
2878 function batchedUpdates$1(fn, a, b) {
2879 if (isInsideEventHandler) return fn(a, b);
2880 isInsideEventHandler = true;
2881 try {
2882 var JSCompiler_inline_result = fn(a);
2883 return JSCompiler_inline_result;
2884 } finally {
2885 if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) {
2886 if (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn))
2887 for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
2888 }
2889 }
2890 }
2891 function getListener(inst, registrationName) {
2892 var stateNode = inst.stateNode;
2893 if (null === stateNode) return null;
2894 var props = stateNode[internalPropsKey] || null;
2895 if (null === props) return null;
2896 stateNode = props[registrationName];
2897 a: switch (registrationName) {
2898 case "onClick":
2899 case "onClickCapture":
2900 case "onDoubleClick":
2901 case "onDoubleClickCapture":
2902 case "onMouseDown":
2903 case "onMouseDownCapture":
2904 case "onMouseMove":
2905 case "onMouseMoveCapture":
2906 case "onMouseUp":
2907 case "onMouseUpCapture":
2908 case "onMouseEnter":
2909 (props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst));
2910 inst = !props;
2911 break a;
2912 default:
2913 inst = false;
2914 }
2915 if (inst) return null;
2916 if (stateNode && "function" !== typeof stateNode)
2917 throw Error(
2918 "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof stateNode + "` type."
2919 );
2920 return stateNode;
2921 }
2922 function getData() {
2923 if (fallbackText) return fallbackText;
2924 var start, startValue = startText, startLength = startValue.length, end, endValue = "value" in root ? root.value : root.textContent, endLength = endValue.length;
2925 for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
2926 var minEnd = startLength - start;
2927 for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
2928 return fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0);
2929 }
2930 function getEventCharCode(nativeEvent) {
2931 var keyCode = nativeEvent.keyCode;
2932 "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13)) : nativeEvent = keyCode;
2933 10 === nativeEvent && (nativeEvent = 13);
2934 return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
2935 }
2936 function functionThatReturnsTrue() {
2937 return true;
2938 }
2939 function functionThatReturnsFalse() {
2940 return false;
2941 }
2942 function createSyntheticEvent(Interface) {
2943 function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
2944 this._reactName = reactName;
2945 this._targetInst = targetInst;
2946 this.type = reactEventType;
2947 this.nativeEvent = nativeEvent;
2948 this.target = nativeEventTarget;
2949 this.currentTarget = null;
2950 for (var propName in Interface)
2951 Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]);
2952 this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse;
2953 this.isPropagationStopped = functionThatReturnsFalse;
2954 return this;
2955 }
2956 assign(SyntheticBaseEvent.prototype, {
2957 preventDefault: function() {
2958 this.defaultPrevented = true;
2959 var event = this.nativeEvent;
2960 event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue);
2961 },
2962 stopPropagation: function() {
2963 var event = this.nativeEvent;
2964 event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue);
2965 },
2966 persist: function() {
2967 },
2968 isPersistent: functionThatReturnsTrue
2969 });
2970 return SyntheticBaseEvent;
2971 }
2972 function modifierStateGetter(keyArg) {
2973 var nativeEvent = this.nativeEvent;
2974 return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : false;
2975 }
2976 function getEventModifierState() {
2977 return modifierStateGetter;
2978 }
2979 function isFallbackCompositionEnd(domEventName, nativeEvent) {
2980 switch (domEventName) {
2981 case "keyup":
2982 return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
2983 case "keydown":
2984 return nativeEvent.keyCode !== START_KEYCODE;
2985 case "keypress":
2986 case "mousedown":
2987 case "focusout":
2988 return true;
2989 default:
2990 return false;
2991 }
2992 }
2993 function getDataFromCustomEvent(nativeEvent) {
2994 nativeEvent = nativeEvent.detail;
2995 return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null;
2996 }
2997 function getNativeBeforeInputChars(domEventName, nativeEvent) {
2998 switch (domEventName) {
2999 case "compositionend":
3000 return getDataFromCustomEvent(nativeEvent);
3001 case "keypress":
3002 if (nativeEvent.which !== SPACEBAR_CODE) return null;
3003 hasSpaceKeypress = true;
3004 return SPACEBAR_CHAR;
3005 case "textInput":
3006 return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName;
3007 default:
3008 return null;
3009 }
3010 }
3011 function getFallbackBeforeInputChars(domEventName, nativeEvent) {
3012 if (isComposing)
3013 return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root = null, isComposing = false, domEventName) : null;
3014 switch (domEventName) {
3015 case "paste":
3016 return null;
3017 case "keypress":
3018 if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) {
3019 if (nativeEvent.char && 1 < nativeEvent.char.length)
3020 return nativeEvent.char;
3021 if (nativeEvent.which)
3022 return String.fromCharCode(nativeEvent.which);
3023 }
3024 return null;
3025 case "compositionend":
3026 return useFallbackCompositionData && "ko" !== nativeEvent.locale ? null : nativeEvent.data;
3027 default:
3028 return null;
3029 }
3030 }
3031 function isTextInputElement(elem) {
3032 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3033 return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName ? true : false;
3034 }
3035 function isEventSupported(eventNameSuffix) {
3036 if (!canUseDOM) return false;
3037 eventNameSuffix = "on" + eventNameSuffix;
3038 var isSupported = eventNameSuffix in document;
3039 isSupported || (isSupported = document.createElement("div"), isSupported.setAttribute(eventNameSuffix, "return;"), isSupported = "function" === typeof isSupported[eventNameSuffix]);
3040 return isSupported;
3041 }
3042 function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
3043 restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target;
3044 inst = accumulateTwoPhaseListeners(inst, "onChange");
3045 0 < inst.length && (nativeEvent = new SyntheticEvent(
3046 "onChange",
3047 "change",
3048 null,
3049 nativeEvent,
3050 target
3051 ), dispatchQueue.push({ event: nativeEvent, listeners: inst }));
3052 }
3053 function runEventInBatch(dispatchQueue) {
3054 processDispatchQueue(dispatchQueue, 0);
3055 }
3056 function getInstIfValueChanged(targetInst) {
3057 var targetNode = getNodeFromInstance(targetInst);
3058 if (updateValueIfChanged(targetNode)) return targetInst;
3059 }
3060 function getTargetInstForChangeEvent(domEventName, targetInst) {
3061 if ("change" === domEventName) return targetInst;
3062 }
3063 function stopWatchingForValueChange() {
3064 activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null);
3065 }
3066 function handlePropertyChange(nativeEvent) {
3067 if ("value" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst$1)) {
3068 var dispatchQueue = [];
3069 createAndAccumulateChangeEvent(
3070 dispatchQueue,
3071 activeElementInst$1,
3072 nativeEvent,
3073 getEventTarget(nativeEvent)
3074 );
3075 batchedUpdates$1(runEventInBatch, dispatchQueue);
3076 }
3077 }
3078 function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
3079 "focusin" === domEventName ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : "focusout" === domEventName && stopWatchingForValueChange();
3080 }
3081 function getTargetInstForInputEventPolyfill(domEventName) {
3082 if ("selectionchange" === domEventName || "keyup" === domEventName || "keydown" === domEventName)
3083 return getInstIfValueChanged(activeElementInst$1);
3084 }
3085 function getTargetInstForClickEvent(domEventName, targetInst) {
3086 if ("click" === domEventName) return getInstIfValueChanged(targetInst);
3087 }
3088 function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
3089 if ("input" === domEventName || "change" === domEventName)
3090 return getInstIfValueChanged(targetInst);
3091 }
3092 function is(x, y) {
3093 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
3094 }
3095 function shallowEqual(objA, objB) {
3096 if (objectIs(objA, objB)) return true;
3097 if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
3098 return false;
3099 var keysA = Object.keys(objA), keysB = Object.keys(objB);
3100 if (keysA.length !== keysB.length) return false;
3101 for (keysB = 0; keysB < keysA.length; keysB++) {
3102 var currentKey = keysA[keysB];
3103 if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
3104 return false;
3105 }
3106 return true;
3107 }
3108 function getLeafNode(node) {
3109 for (; node && node.firstChild; ) node = node.firstChild;
3110 return node;
3111 }
3112 function getNodeForCharacterOffset(root2, offset) {
3113 var node = getLeafNode(root2);
3114 root2 = 0;
3115 for (var nodeEnd; node; ) {
3116 if (3 === node.nodeType) {
3117 nodeEnd = root2 + node.textContent.length;
3118 if (root2 <= offset && nodeEnd >= offset)
3119 return { node, offset: offset - root2 };
3120 root2 = nodeEnd;
3121 }
3122 a: {
3123 for (; node; ) {
3124 if (node.nextSibling) {
3125 node = node.nextSibling;
3126 break a;
3127 }
3128 node = node.parentNode;
3129 }
3130 node = void 0;
3131 }
3132 node = getLeafNode(node);
3133 }
3134 }
3135 function containsNode(outerNode, innerNode) {
3136 return outerNode && innerNode ? outerNode === innerNode ? true : outerNode && 3 === outerNode.nodeType ? false : innerNode && 3 === innerNode.nodeType ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : outerNode.compareDocumentPosition ? !!(outerNode.compareDocumentPosition(innerNode) & 16) : false : false;
3137 }
3138 function getActiveElementDeep(containerInfo) {
3139 containerInfo = null != containerInfo && null != containerInfo.ownerDocument && null != containerInfo.ownerDocument.defaultView ? containerInfo.ownerDocument.defaultView : window;
3140 for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) {
3141 try {
3142 var JSCompiler_inline_result = "string" === typeof element.contentWindow.location.href;
3143 } catch (err) {
3144 JSCompiler_inline_result = false;
3145 }
3146 if (JSCompiler_inline_result) containerInfo = element.contentWindow;
3147 else break;
3148 element = getActiveElement(containerInfo.document);
3149 }
3150 return element;
3151 }
3152 function hasSelectionCapabilities(elem) {
3153 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3154 return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable);
3155 }
3156 function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
3157 var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument;
3158 mouseDown || null == activeElement || activeElement !== getActiveElement(doc) || (doc = activeElement, "selectionStart" in doc && hasSelectionCapabilities(doc) ? doc = { start: doc.selectionStart, end: doc.selectionEnd } : (doc = (doc.ownerDocument && doc.ownerDocument.defaultView || window).getSelection(), doc = {
3159 anchorNode: doc.anchorNode,
3160 anchorOffset: doc.anchorOffset,
3161 focusNode: doc.focusNode,
3162 focusOffset: doc.focusOffset
3163 }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent(
3164 "onSelect",
3165 "select",
3166 null,
3167 nativeEvent,
3168 nativeEventTarget
3169 ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement)));
3170 }
3171 function makePrefixMap(styleProp, eventName) {
3172 var prefixes = {};
3173 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
3174 prefixes["Webkit" + styleProp] = "webkit" + eventName;
3175 prefixes["Moz" + styleProp] = "moz" + eventName;
3176 return prefixes;
3177 }
3178 function getVendorPrefixedEventName(eventName) {
3179 if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
3180 if (!vendorPrefixes[eventName]) return eventName;
3181 var prefixMap = vendorPrefixes[eventName], styleProp;
3182 for (styleProp in prefixMap)
3183 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
3184 return prefixedEventNames[eventName] = prefixMap[styleProp];
3185 return eventName;
3186 }
3187 function registerSimpleEvent(domEventName, reactName) {
3188 topLevelEventsToReactNames.set(domEventName, reactName);
3189 registerTwoPhaseEvent(reactName, [domEventName]);
3190 }
3191 function createCapturedValueAtFiber(value, source) {
3192 if ("object" === typeof value && null !== value) {
3193 var existing = CapturedStacks.get(value);
3194 if (void 0 !== existing) return existing;
3195 source = {
3196 value,
3197 source,
3198 stack: getStackByFiberInDevAndProd(source)
3199 };
3200 CapturedStacks.set(value, source);
3201 return source;
3202 }
3203 return {
3204 value,
3205 source,
3206 stack: getStackByFiberInDevAndProd(source)
3207 };
3208 }
3209 function finishQueueingConcurrentUpdates() {
3210 for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) {
3211 var fiber = concurrentQueues[i];
3212 concurrentQueues[i++] = null;
3213 var queue = concurrentQueues[i];
3214 concurrentQueues[i++] = null;
3215 var update = concurrentQueues[i];
3216 concurrentQueues[i++] = null;
3217 var lane = concurrentQueues[i];
3218 concurrentQueues[i++] = null;
3219 if (null !== queue && null !== update) {
3220 var pending = queue.pending;
3221 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
3222 queue.pending = update;
3223 }
3224 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
3225 }
3226 }
3227 function enqueueUpdate$1(fiber, queue, update, lane) {
3228 concurrentQueues[concurrentQueuesIndex++] = fiber;
3229 concurrentQueues[concurrentQueuesIndex++] = queue;
3230 concurrentQueues[concurrentQueuesIndex++] = update;
3231 concurrentQueues[concurrentQueuesIndex++] = lane;
3232 concurrentlyUpdatedLanes |= lane;
3233 fiber.lanes |= lane;
3234 fiber = fiber.alternate;
3235 null !== fiber && (fiber.lanes |= lane);
3236 }
3237 function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
3238 enqueueUpdate$1(fiber, queue, update, lane);
3239 return getRootForUpdatedFiber(fiber);
3240 }
3241 function enqueueConcurrentRenderForLane(fiber, lane) {
3242 enqueueUpdate$1(fiber, null, null, lane);
3243 return getRootForUpdatedFiber(fiber);
3244 }
3245 function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
3246 sourceFiber.lanes |= lane;
3247 var alternate = sourceFiber.alternate;
3248 null !== alternate && (alternate.lanes |= lane);
3249 for (var isHidden = false, parent = sourceFiber.return; null !== parent; )
3250 parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & OffscreenVisible || (isHidden = true)), sourceFiber = parent, parent = parent.return;
3251 return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden && null !== update && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], null === alternate ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
3252 }
3253 function getRootForUpdatedFiber(sourceFiber) {
3254 if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
3255 throw nestedPassiveUpdateCount = nestedUpdateCount = 0, rootWithPassiveNestedUpdates = rootWithNestedUpdates = null, Error(
3256 "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
3257 );
3258 nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, console.error(
3259 "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."
3260 ));
3261 null === sourceFiber.alternate && 0 !== (sourceFiber.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
3262 for (var node = sourceFiber, parent = node.return; null !== parent; )
3263 null === node.alternate && 0 !== (node.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = node.return;
3264 return 3 === node.tag ? node.stateNode : null;
3265 }
3266 function resolveFunctionForHotReloading(type) {
3267 if (null === resolveFamily) return type;
3268 var family = resolveFamily(type);
3269 return void 0 === family ? type : family.current;
3270 }
3271 function resolveForwardRefForHotReloading(type) {
3272 if (null === resolveFamily) return type;
3273 var family = resolveFamily(type);
3274 return void 0 === family ? null !== type && void 0 !== type && "function" === typeof type.render && (family = resolveFunctionForHotReloading(type.render), type.render !== family) ? (family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }, void 0 !== type.displayName && (family.displayName = type.displayName), family) : type : family.current;
3275 }
3276 function isCompatibleFamilyForHotReloading(fiber, element) {
3277 if (null === resolveFamily) return false;
3278 var prevType = fiber.elementType;
3279 element = element.type;
3280 var needsCompareFamilies = false, $$typeofNextType = "object" === typeof element && null !== element ? element.$$typeof : null;
3281 switch (fiber.tag) {
3282 case 1:
3283 "function" === typeof element && (needsCompareFamilies = true);
3284 break;
3285 case 0:
3286 "function" === typeof element ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3287 break;
3288 case 11:
3289 $$typeofNextType === REACT_FORWARD_REF_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3290 break;
3291 case 14:
3292 case 15:
3293 $$typeofNextType === REACT_MEMO_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3294 break;
3295 default:
3296 return false;
3297 }
3298 return needsCompareFamilies && (fiber = resolveFamily(prevType), void 0 !== fiber && fiber === resolveFamily(element)) ? true : false;
3299 }
3300 function markFailedErrorBoundaryForHotReloading(fiber) {
3301 null !== resolveFamily && "function" === typeof WeakSet && (null === failedBoundaries && (failedBoundaries = /* @__PURE__ */ new WeakSet()), failedBoundaries.add(fiber));
3302 }
3303 function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
3304 var alternate = fiber.alternate, child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null;
3305 switch (tag) {
3306 case 0:
3307 case 15:
3308 case 1:
3309 candidateType = type;
3310 break;
3311 case 11:
3312 candidateType = type.render;
3313 }
3314 if (null === resolveFamily)
3315 throw Error("Expected resolveFamily to be set during hot reload.");
3316 var needsRender = false;
3317 type = false;
3318 null !== candidateType && (candidateType = resolveFamily(candidateType), void 0 !== candidateType && (staleFamilies.has(candidateType) ? type = true : updatedFamilies.has(candidateType) && (1 === tag ? type = true : needsRender = true)));
3319 null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (type = true);
3320 type && (fiber._debugNeedsRemount = true);
3321 if (type || needsRender)
3322 alternate = enqueueConcurrentRenderForLane(fiber, 2), null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);
3323 null === child || type || scheduleFibersWithFamiliesRecursively(
3324 child,
3325 updatedFamilies,
3326 staleFamilies
3327 );
3328 null !== sibling && scheduleFibersWithFamiliesRecursively(
3329 sibling,
3330 updatedFamilies,
3331 staleFamilies
3332 );
3333 }
3334 function FiberNode(tag, pendingProps, key, mode) {
3335 this.tag = tag;
3336 this.key = key;
3337 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
3338 this.index = 0;
3339 this.refCleanup = this.ref = null;
3340 this.pendingProps = pendingProps;
3341 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
3342 this.mode = mode;
3343 this.subtreeFlags = this.flags = 0;
3344 this.deletions = null;
3345 this.childLanes = this.lanes = 0;
3346 this.alternate = null;
3347 this.actualDuration = -0;
3348 this.actualStartTime = -1.1;
3349 this.treeBaseDuration = this.selfBaseDuration = -0;
3350 this._debugTask = this._debugStack = this._debugOwner = this._debugInfo = null;
3351 this._debugNeedsRemount = false;
3352 this._debugHookTypes = null;
3353 hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(this);
3354 }
3355 function shouldConstruct(Component) {
3356 Component = Component.prototype;
3357 return !(!Component || !Component.isReactComponent);
3358 }
3359 function createWorkInProgress(current2, pendingProps) {
3360 var workInProgress2 = current2.alternate;
3361 null === workInProgress2 ? (workInProgress2 = createFiber(
3362 current2.tag,
3363 pendingProps,
3364 current2.key,
3365 current2.mode
3366 ), workInProgress2.elementType = current2.elementType, workInProgress2.type = current2.type, workInProgress2.stateNode = current2.stateNode, workInProgress2._debugOwner = current2._debugOwner, workInProgress2._debugStack = current2._debugStack, workInProgress2._debugTask = current2._debugTask, workInProgress2._debugHookTypes = current2._debugHookTypes, workInProgress2.alternate = current2, current2.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current2.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.actualDuration = -0, workInProgress2.actualStartTime = -1.1);
3367 workInProgress2.flags = current2.flags & 65011712;
3368 workInProgress2.childLanes = current2.childLanes;
3369 workInProgress2.lanes = current2.lanes;
3370 workInProgress2.child = current2.child;
3371 workInProgress2.memoizedProps = current2.memoizedProps;
3372 workInProgress2.memoizedState = current2.memoizedState;
3373 workInProgress2.updateQueue = current2.updateQueue;
3374 pendingProps = current2.dependencies;
3375 workInProgress2.dependencies = null === pendingProps ? null : {
3376 lanes: pendingProps.lanes,
3377 firstContext: pendingProps.firstContext,
3378 _debugThenableState: pendingProps._debugThenableState
3379 };
3380 workInProgress2.sibling = current2.sibling;
3381 workInProgress2.index = current2.index;
3382 workInProgress2.ref = current2.ref;
3383 workInProgress2.refCleanup = current2.refCleanup;
3384 workInProgress2.selfBaseDuration = current2.selfBaseDuration;
3385 workInProgress2.treeBaseDuration = current2.treeBaseDuration;
3386 workInProgress2._debugInfo = current2._debugInfo;
3387 workInProgress2._debugNeedsRemount = current2._debugNeedsRemount;
3388 switch (workInProgress2.tag) {
3389 case 0:
3390 case 15:
3391 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3392 break;
3393 case 1:
3394 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3395 break;
3396 case 11:
3397 workInProgress2.type = resolveForwardRefForHotReloading(current2.type);
3398 }
3399 return workInProgress2;
3400 }
3401 function resetWorkInProgress(workInProgress2, renderLanes2) {
3402 workInProgress2.flags &= 65011714;
3403 var current2 = workInProgress2.alternate;
3404 null === current2 ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null, workInProgress2.selfBaseDuration = 0, workInProgress2.treeBaseDuration = 0) : (workInProgress2.childLanes = current2.childLanes, workInProgress2.lanes = current2.lanes, workInProgress2.child = current2.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current2.memoizedProps, workInProgress2.memoizedState = current2.memoizedState, workInProgress2.updateQueue = current2.updateQueue, workInProgress2.type = current2.type, renderLanes2 = current2.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : {
3405 lanes: renderLanes2.lanes,
3406 firstContext: renderLanes2.firstContext,
3407 _debugThenableState: renderLanes2._debugThenableState
3408 }, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
3409 return workInProgress2;
3410 }
3411 function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
3412 var fiberTag = 0, resolvedType = type;
3413 if ("function" === typeof type)
3414 shouldConstruct(type) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
3415 else if ("string" === typeof type)
3416 fiberTag = getHostContext(), fiberTag = isHostHoistableType(type, pendingProps, fiberTag) ? 26 : "html" === type || "head" === type || "body" === type ? 27 : 5;
3417 else
3418 a: switch (type) {
3419 case REACT_ACTIVITY_TYPE:
3420 return key = createFiber(31, pendingProps, key, mode), key.elementType = REACT_ACTIVITY_TYPE, key.lanes = lanes, key;
3421 case REACT_FRAGMENT_TYPE:
3422 return createFiberFromFragment(
3423 pendingProps.children,
3424 mode,
3425 lanes,
3426 key
3427 );
3428 case REACT_STRICT_MODE_TYPE:
3429 fiberTag = 8;
3430 mode |= StrictLegacyMode;
3431 mode |= StrictEffectsMode;
3432 break;
3433 case REACT_PROFILER_TYPE:
3434 return type = pendingProps, owner = mode, "string" !== typeof type.id && console.error(
3435 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
3436 typeof type.id
3437 ), key = createFiber(12, type, key, owner | ProfileMode), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
3438 case REACT_SUSPENSE_TYPE:
3439 return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
3440 case REACT_SUSPENSE_LIST_TYPE:
3441 return key = createFiber(19, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_LIST_TYPE, key.lanes = lanes, key;
3442 default:
3443 if ("object" === typeof type && null !== type)
3444 switch (type.$$typeof) {
3445 case REACT_PROVIDER_TYPE:
3446 case REACT_CONTEXT_TYPE:
3447 fiberTag = 10;
3448 break a;
3449 case REACT_CONSUMER_TYPE:
3450 fiberTag = 9;
3451 break a;
3452 case REACT_FORWARD_REF_TYPE:
3453 fiberTag = 11;
3454 resolvedType = resolveForwardRefForHotReloading(resolvedType);
3455 break a;
3456 case REACT_MEMO_TYPE:
3457 fiberTag = 14;
3458 break a;
3459 case REACT_LAZY_TYPE:
3460 fiberTag = 16;
3461 resolvedType = null;
3462 break a;
3463 }
3464 resolvedType = "";
3465 if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
3466 resolvedType += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
3467 null === type ? pendingProps = "null" : isArrayImpl(type) ? pendingProps = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (pendingProps = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", resolvedType = " Did you accidentally export a JSX literal instead of a component?") : pendingProps = typeof type;
3468 (fiberTag = owner ? getComponentNameFromOwner(owner) : null) && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
3469 fiberTag = 29;
3470 pendingProps = Error(
3471 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (pendingProps + "." + resolvedType)
3472 );
3473 resolvedType = null;
3474 }
3475 key = createFiber(fiberTag, pendingProps, key, mode);
3476 key.elementType = type;
3477 key.type = resolvedType;
3478 key.lanes = lanes;
3479 key._debugOwner = owner;
3480 return key;
3481 }
3482 function createFiberFromElement(element, mode, lanes) {
3483 mode = createFiberFromTypeAndProps(
3484 element.type,
3485 element.key,
3486 element.props,
3487 element._owner,
3488 mode,
3489 lanes
3490 );
3491 mode._debugOwner = element._owner;
3492 mode._debugStack = element._debugStack;
3493 mode._debugTask = element._debugTask;
3494 return mode;
3495 }
3496 function createFiberFromFragment(elements, mode, lanes, key) {
3497 elements = createFiber(7, elements, key, mode);
3498 elements.lanes = lanes;
3499 return elements;
3500 }
3501 function createFiberFromText(content, mode, lanes) {
3502 content = createFiber(6, content, null, mode);
3503 content.lanes = lanes;
3504 return content;
3505 }
3506 function createFiberFromPortal(portal, mode, lanes) {
3507 mode = createFiber(
3508 4,
3509 null !== portal.children ? portal.children : [],
3510 portal.key,
3511 mode
3512 );
3513 mode.lanes = lanes;
3514 mode.stateNode = {
3515 containerInfo: portal.containerInfo,
3516 pendingChildren: null,
3517 implementation: portal.implementation
3518 };
3519 return mode;
3520 }
3521 function pushTreeFork(workInProgress2, totalChildren) {
3522 warnIfNotHydrating();
3523 forkStack[forkStackIndex++] = treeForkCount;
3524 forkStack[forkStackIndex++] = treeForkProvider;
3525 treeForkProvider = workInProgress2;
3526 treeForkCount = totalChildren;
3527 }
3528 function pushTreeId(workInProgress2, totalChildren, index) {
3529 warnIfNotHydrating();
3530 idStack[idStackIndex++] = treeContextId;
3531 idStack[idStackIndex++] = treeContextOverflow;
3532 idStack[idStackIndex++] = treeContextProvider;
3533 treeContextProvider = workInProgress2;
3534 var baseIdWithLeadingBit = treeContextId;
3535 workInProgress2 = treeContextOverflow;
3536 var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
3537 baseIdWithLeadingBit &= ~(1 << baseLength);
3538 index += 1;
3539 var length = 32 - clz32(totalChildren) + baseLength;
3540 if (30 < length) {
3541 var numberOfOverflowBits = baseLength - baseLength % 5;
3542 length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
3543 baseIdWithLeadingBit >>= numberOfOverflowBits;
3544 baseLength -= numberOfOverflowBits;
3545 treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
3546 treeContextOverflow = length + workInProgress2;
3547 } else
3548 treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
3549 }
3550 function pushMaterializedTreeId(workInProgress2) {
3551 warnIfNotHydrating();
3552 null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
3553 }
3554 function popTreeContext(workInProgress2) {
3555 for (; workInProgress2 === treeForkProvider; )
3556 treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
3557 for (; workInProgress2 === treeContextProvider; )
3558 treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
3559 }
3560 function warnIfNotHydrating() {
3561 isHydrating || console.error(
3562 "Expected to be hydrating. This is a bug in React. Please file an issue."
3563 );
3564 }
3565 function buildHydrationDiffNode(fiber, distanceFromLeaf) {
3566 if (null === fiber.return) {
3567 if (null === hydrationDiffRootDEV)
3568 hydrationDiffRootDEV = {
3569 fiber,
3570 children: [],
3571 serverProps: void 0,
3572 serverTail: [],
3573 distanceFromLeaf
3574 };
3575 else {
3576 if (hydrationDiffRootDEV.fiber !== fiber)
3577 throw Error(
3578 "Saw multiple hydration diff roots in a pass. This is a bug in React."
3579 );
3580 hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
3581 }
3582 return hydrationDiffRootDEV;
3583 }
3584 var siblings = buildHydrationDiffNode(
3585 fiber.return,
3586 distanceFromLeaf + 1
3587 ).children;
3588 if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
3589 return siblings = siblings[siblings.length - 1], siblings.distanceFromLeaf > distanceFromLeaf && (siblings.distanceFromLeaf = distanceFromLeaf), siblings;
3590 distanceFromLeaf = {
3591 fiber,
3592 children: [],
3593 serverProps: void 0,
3594 serverTail: [],
3595 distanceFromLeaf
3596 };
3597 siblings.push(distanceFromLeaf);
3598 return distanceFromLeaf;
3599 }
3600 function warnNonHydratedInstance(fiber, rejectedCandidate) {
3601 didSuspendOrErrorDEV || (fiber = buildHydrationDiffNode(fiber, 0), fiber.serverProps = null, null !== rejectedCandidate && (rejectedCandidate = describeHydratableInstanceForDevWarnings(rejectedCandidate), fiber.serverTail.push(rejectedCandidate)));
3602 }
3603 function throwOnHydrationMismatch(fiber) {
3604 var diff = "", diffRoot = hydrationDiffRootDEV;
3605 null !== diffRoot && (hydrationDiffRootDEV = null, diff = describeDiff(diffRoot));
3606 queueHydrationError(
3607 createCapturedValueAtFiber(
3608 Error(
3609 "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" + diff
3610 ),
3611 fiber
3612 )
3613 );
3614 throw HydrationMismatchException;
3615 }
3616 function prepareToHydrateHostInstance(fiber) {
3617 var didHydrate = fiber.stateNode;
3618 var type = fiber.type, props = fiber.memoizedProps;
3619 didHydrate[internalInstanceKey] = fiber;
3620 didHydrate[internalPropsKey] = props;
3621 validatePropertiesInDevelopment(type, props);
3622 switch (type) {
3623 case "dialog":
3624 listenToNonDelegatedEvent("cancel", didHydrate);
3625 listenToNonDelegatedEvent("close", didHydrate);
3626 break;
3627 case "iframe":
3628 case "object":
3629 case "embed":
3630 listenToNonDelegatedEvent("load", didHydrate);
3631 break;
3632 case "video":
3633 case "audio":
3634 for (type = 0; type < mediaEventTypes.length; type++)
3635 listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);
3636 break;
3637 case "source":
3638 listenToNonDelegatedEvent("error", didHydrate);
3639 break;
3640 case "img":
3641 case "image":
3642 case "link":
3643 listenToNonDelegatedEvent("error", didHydrate);
3644 listenToNonDelegatedEvent("load", didHydrate);
3645 break;
3646 case "details":
3647 listenToNonDelegatedEvent("toggle", didHydrate);
3648 break;
3649 case "input":
3650 checkControlledValueProps("input", props);
3651 listenToNonDelegatedEvent("invalid", didHydrate);
3652 validateInputProps(didHydrate, props);
3653 initInput(
3654 didHydrate,
3655 props.value,
3656 props.defaultValue,
3657 props.checked,
3658 props.defaultChecked,
3659 props.type,
3660 props.name,
3661 true
3662 );
3663 track(didHydrate);
3664 break;
3665 case "option":
3666 validateOptionProps(didHydrate, props);
3667 break;
3668 case "select":
3669 checkControlledValueProps("select", props);
3670 listenToNonDelegatedEvent("invalid", didHydrate);
3671 validateSelectProps(didHydrate, props);
3672 break;
3673 case "textarea":
3674 checkControlledValueProps("textarea", props), listenToNonDelegatedEvent("invalid", didHydrate), validateTextareaProps(didHydrate, props), initTextarea(
3675 didHydrate,
3676 props.value,
3677 props.defaultValue,
3678 props.children
3679 ), track(didHydrate);
3680 }
3681 type = props.children;
3682 "string" !== typeof type && "number" !== typeof type && "bigint" !== typeof type || didHydrate.textContent === "" + type || true === props.suppressHydrationWarning || checkForUnmatchedText(didHydrate.textContent, type) ? (null != props.popover && (listenToNonDelegatedEvent("beforetoggle", didHydrate), listenToNonDelegatedEvent("toggle", didHydrate)), null != props.onScroll && listenToNonDelegatedEvent("scroll", didHydrate), null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", didHydrate), null != props.onClick && (didHydrate.onclick = noop$1), didHydrate = true) : didHydrate = false;
3683 didHydrate || throwOnHydrationMismatch(fiber);
3684 }
3685 function popToNextHostParent(fiber) {
3686 for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
3687 switch (hydrationParentFiber.tag) {
3688 case 5:
3689 case 13:
3690 rootOrSingletonContext = false;
3691 return;
3692 case 27:
3693 case 3:
3694 rootOrSingletonContext = true;
3695 return;
3696 default:
3697 hydrationParentFiber = hydrationParentFiber.return;
3698 }
3699 }
3700 function popHydrationState(fiber) {
3701 if (fiber !== hydrationParentFiber) return false;
3702 if (!isHydrating)
3703 return popToNextHostParent(fiber), isHydrating = true, false;
3704 var tag = fiber.tag, JSCompiler_temp;
3705 if (JSCompiler_temp = 3 !== tag && 27 !== tag) {
3706 if (JSCompiler_temp = 5 === tag)
3707 JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps);
3708 JSCompiler_temp = !JSCompiler_temp;
3709 }
3710 if (JSCompiler_temp && nextHydratableInstance) {
3711 for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {
3712 var diffNode = buildHydrationDiffNode(fiber, 0), description = describeHydratableInstanceForDevWarnings(JSCompiler_temp);
3713 diffNode.serverTail.push(description);
3714 JSCompiler_temp = "Suspense" === description.type ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling);
3715 }
3716 throwOnHydrationMismatch(fiber);
3717 }
3718 popToNextHostParent(fiber);
3719 if (13 === tag) {
3720 fiber = fiber.memoizedState;
3721 fiber = null !== fiber ? fiber.dehydrated : null;
3722 if (!fiber)
3723 throw Error(
3724 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
3725 );
3726 nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber);
3727 } else
3728 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null;
3729 return true;
3730 }
3731 function resetHydrationState() {
3732 nextHydratableInstance = hydrationParentFiber = null;
3733 didSuspendOrErrorDEV = isHydrating = false;
3734 }
3735 function upgradeHydrationErrorsToRecoverable() {
3736 var queuedErrors = hydrationErrors;
3737 null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
3738 workInProgressRootRecoverableErrors,
3739 queuedErrors
3740 ), hydrationErrors = null);
3741 return queuedErrors;
3742 }
3743 function queueHydrationError(error) {
3744 null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
3745 }
3746 function emitPendingHydrationWarnings() {
3747 var diffRoot = hydrationDiffRootDEV;
3748 if (null !== diffRoot) {
3749 hydrationDiffRootDEV = null;
3750 for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )
3751 diffRoot = diffRoot.children[0];
3752 runWithFiberInDEV(diffRoot.fiber, function() {
3753 console.error(
3754 "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s",
3755 "https://react.dev/link/hydration-mismatch",
3756 diff
3757 );
3758 });
3759 }
3760 }
3761 function resetContextDependencies() {
3762 lastContextDependency = currentlyRenderingFiber$1 = null;
3763 isDisallowedContextReadInDEV = false;
3764 }
3765 function pushProvider(providerFiber, context, nextValue) {
3766 push(valueCursor, context._currentValue, providerFiber);
3767 context._currentValue = nextValue;
3768 push(rendererCursorDEV, context._currentRenderer, providerFiber);
3769 void 0 !== context._currentRenderer && null !== context._currentRenderer && context._currentRenderer !== rendererSigil && console.error(
3770 "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
3771 );
3772 context._currentRenderer = rendererSigil;
3773 }
3774 function popProvider(context, providerFiber) {
3775 context._currentValue = valueCursor.current;
3776 var currentRenderer = rendererCursorDEV.current;
3777 pop(rendererCursorDEV, providerFiber);
3778 context._currentRenderer = currentRenderer;
3779 pop(valueCursor, providerFiber);
3780 }
3781 function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
3782 for (; null !== parent; ) {
3783 var alternate = parent.alternate;
3784 (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
3785 if (parent === propagationRoot) break;
3786 parent = parent.return;
3787 }
3788 parent !== propagationRoot && console.error(
3789 "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
3790 );
3791 }
3792 function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
3793 var fiber = workInProgress2.child;
3794 null !== fiber && (fiber.return = workInProgress2);
3795 for (; null !== fiber; ) {
3796 var list = fiber.dependencies;
3797 if (null !== list) {
3798 var nextFiber = fiber.child;
3799 list = list.firstContext;
3800 a: for (; null !== list; ) {
3801 var dependency = list;
3802 list = fiber;
3803 for (var i = 0; i < contexts.length; i++)
3804 if (dependency.context === contexts[i]) {
3805 list.lanes |= renderLanes2;
3806 dependency = list.alternate;
3807 null !== dependency && (dependency.lanes |= renderLanes2);
3808 scheduleContextWorkOnParentPath(
3809 list.return,
3810 renderLanes2,
3811 workInProgress2
3812 );
3813 forcePropagateEntireTree || (nextFiber = null);
3814 break a;
3815 }
3816 list = dependency.next;
3817 }
3818 } else if (18 === fiber.tag) {
3819 nextFiber = fiber.return;
3820 if (null === nextFiber)
3821 throw Error(
3822 "We just came from a parent so we must have had a parent. This is a bug in React."
3823 );
3824 nextFiber.lanes |= renderLanes2;
3825 list = nextFiber.alternate;
3826 null !== list && (list.lanes |= renderLanes2);
3827 scheduleContextWorkOnParentPath(
3828 nextFiber,
3829 renderLanes2,
3830 workInProgress2
3831 );
3832 nextFiber = null;
3833 } else nextFiber = fiber.child;
3834 if (null !== nextFiber) nextFiber.return = fiber;
3835 else
3836 for (nextFiber = fiber; null !== nextFiber; ) {
3837 if (nextFiber === workInProgress2) {
3838 nextFiber = null;
3839 break;
3840 }
3841 fiber = nextFiber.sibling;
3842 if (null !== fiber) {
3843 fiber.return = nextFiber.return;
3844 nextFiber = fiber;
3845 break;
3846 }
3847 nextFiber = nextFiber.return;
3848 }
3849 fiber = nextFiber;
3850 }
3851 }
3852 function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) {
3853 current2 = null;
3854 for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
3855 if (!isInsidePropagationBailout) {
3856 if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
3857 else if (0 !== (parent.flags & 262144)) break;
3858 }
3859 if (10 === parent.tag) {
3860 var currentParent = parent.alternate;
3861 if (null === currentParent)
3862 throw Error("Should have a current fiber. This is a bug in React.");
3863 currentParent = currentParent.memoizedProps;
3864 if (null !== currentParent) {
3865 var context = parent.type;
3866 objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]);
3867 }
3868 } else if (parent === hostTransitionProviderCursor.current) {
3869 currentParent = parent.alternate;
3870 if (null === currentParent)
3871 throw Error("Should have a current fiber. This is a bug in React.");
3872 currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]);
3873 }
3874 parent = parent.return;
3875 }
3876 null !== current2 && propagateContextChanges(
3877 workInProgress2,
3878 current2,
3879 renderLanes2,
3880 forcePropagateEntireTree
3881 );
3882 workInProgress2.flags |= 262144;
3883 }
3884 function checkIfContextChanged(currentDependencies) {
3885 for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
3886 if (!objectIs(
3887 currentDependencies.context._currentValue,
3888 currentDependencies.memoizedValue
3889 ))
3890 return true;
3891 currentDependencies = currentDependencies.next;
3892 }
3893 return false;
3894 }
3895 function prepareToReadContext(workInProgress2) {
3896 currentlyRenderingFiber$1 = workInProgress2;
3897 lastContextDependency = null;
3898 workInProgress2 = workInProgress2.dependencies;
3899 null !== workInProgress2 && (workInProgress2.firstContext = null);
3900 }
3901 function readContext(context) {
3902 isDisallowedContextReadInDEV && console.error(
3903 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
3904 );
3905 return readContextForConsumer(currentlyRenderingFiber$1, context);
3906 }
3907 function readContextDuringReconciliation(consumer, context) {
3908 null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
3909 return readContextForConsumer(consumer, context);
3910 }
3911 function readContextForConsumer(consumer, context) {
3912 var value = context._currentValue;
3913 context = { context, memoizedValue: value, next: null };
3914 if (null === lastContextDependency) {
3915 if (null === consumer)
3916 throw Error(
3917 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
3918 );
3919 lastContextDependency = context;
3920 consumer.dependencies = {
3921 lanes: 0,
3922 firstContext: context,
3923 _debugThenableState: null
3924 };
3925 consumer.flags |= 524288;
3926 } else lastContextDependency = lastContextDependency.next = context;
3927 return value;
3928 }
3929 function createCache() {
3930 return {
3931 controller: new AbortControllerLocal(),
3932 data: /* @__PURE__ */ new Map(),
3933 refCount: 0
3934 };
3935 }
3936 function retainCache(cache) {
3937 cache.controller.signal.aborted && console.warn(
3938 "A cache instance was retained after it was already freed. This likely indicates a bug in React."
3939 );
3940 cache.refCount++;
3941 }
3942 function releaseCache(cache) {
3943 cache.refCount--;
3944 0 > cache.refCount && console.warn(
3945 "A cache instance was released after it was already freed. This likely indicates a bug in React."
3946 );
3947 0 === cache.refCount && scheduleCallback$2(NormalPriority, function() {
3948 cache.controller.abort();
3949 });
3950 }
3951 function pushNestedEffectDurations() {
3952 var prevEffectDuration = profilerEffectDuration;
3953 profilerEffectDuration = 0;
3954 return prevEffectDuration;
3955 }
3956 function popNestedEffectDurations(prevEffectDuration) {
3957 var elapsedTime = profilerEffectDuration;
3958 profilerEffectDuration = prevEffectDuration;
3959 return elapsedTime;
3960 }
3961 function bubbleNestedEffectDurations(prevEffectDuration) {
3962 var elapsedTime = profilerEffectDuration;
3963 profilerEffectDuration += prevEffectDuration;
3964 return elapsedTime;
3965 }
3966 function startProfilerTimer(fiber) {
3967 profilerStartTime = now();
3968 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
3969 }
3970 function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
3971 if (0 <= profilerStartTime) {
3972 var elapsedTime = now() - profilerStartTime;
3973 fiber.actualDuration += elapsedTime;
3974 fiber.selfBaseDuration = elapsedTime;
3975 profilerStartTime = -1;
3976 }
3977 }
3978 function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
3979 if (0 <= profilerStartTime) {
3980 var elapsedTime = now() - profilerStartTime;
3981 fiber.actualDuration += elapsedTime;
3982 profilerStartTime = -1;
3983 }
3984 }
3985 function recordEffectDuration() {
3986 if (0 <= profilerStartTime) {
3987 var elapsedTime = now() - profilerStartTime;
3988 profilerStartTime = -1;
3989 profilerEffectDuration += elapsedTime;
3990 }
3991 }
3992 function startEffectTimer() {
3993 profilerStartTime = now();
3994 }
3995 function transferActualDuration(fiber) {
3996 for (var child = fiber.child; child; )
3997 fiber.actualDuration += child.actualDuration, child = child.sibling;
3998 }
3999 function entangleAsyncAction(transition, thenable) {
4000 if (null === currentEntangledListeners) {
4001 var entangledListeners = currentEntangledListeners = [];
4002 currentEntangledPendingCount = 0;
4003 currentEntangledLane = requestTransitionLane();
4004 currentEntangledActionThenable = {
4005 status: "pending",
4006 value: void 0,
4007 then: function(resolve) {
4008 entangledListeners.push(resolve);
4009 }
4010 };
4011 }
4012 currentEntangledPendingCount++;
4013 thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
4014 return thenable;
4015 }
4016 function pingEngtangledActionScope() {
4017 if (0 === --currentEntangledPendingCount && null !== currentEntangledListeners) {
4018 null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
4019 var listeners = currentEntangledListeners;
4020 currentEntangledListeners = null;
4021 currentEntangledLane = 0;
4022 currentEntangledActionThenable = null;
4023 for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
4024 }
4025 }
4026 function chainThenableValue(thenable, result) {
4027 var listeners = [], thenableWithOverride = {
4028 status: "pending",
4029 value: null,
4030 reason: null,
4031 then: function(resolve) {
4032 listeners.push(resolve);
4033 }
4034 };
4035 thenable.then(
4036 function() {
4037 thenableWithOverride.status = "fulfilled";
4038 thenableWithOverride.value = result;
4039 for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
4040 },
4041 function(error) {
4042 thenableWithOverride.status = "rejected";
4043 thenableWithOverride.reason = error;
4044 for (error = 0; error < listeners.length; error++)
4045 (0, listeners[error])(void 0);
4046 }
4047 );
4048 return thenableWithOverride;
4049 }
4050 function peekCacheFromPool() {
4051 var cacheResumedFromPreviousRender = resumedCache.current;
4052 return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
4053 }
4054 function pushTransition(offscreenWorkInProgress, prevCachePool) {
4055 null === prevCachePool ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
4056 }
4057 function getSuspendedCache() {
4058 var cacheFromPool = peekCacheFromPool();
4059 return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool };
4060 }
4061 function createThenableState() {
4062 return { didWarnAboutUncachedPromise: false, thenables: [] };
4063 }
4064 function isThenableResolved(thenable) {
4065 thenable = thenable.status;
4066 return "fulfilled" === thenable || "rejected" === thenable;
4067 }
4068 function noop$3() {
4069 }
4070 function trackUsedThenable(thenableState2, thenable, index) {
4071 null !== ReactSharedInternals.actQueue && (ReactSharedInternals.didUsePromise = true);
4072 var trackedThenables = thenableState2.thenables;
4073 index = trackedThenables[index];
4074 void 0 === index ? trackedThenables.push(thenable) : index !== thenable && (thenableState2.didWarnAboutUncachedPromise || (thenableState2.didWarnAboutUncachedPromise = true, console.error(
4075 "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework."
4076 )), thenable.then(noop$3, noop$3), thenable = index);
4077 switch (thenable.status) {
4078 case "fulfilled":
4079 return thenable.value;
4080 case "rejected":
4081 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4082 default:
4083 if ("string" === typeof thenable.status)
4084 thenable.then(noop$3, noop$3);
4085 else {
4086 thenableState2 = workInProgressRoot;
4087 if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
4088 throw Error(
4089 "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
4090 );
4091 thenableState2 = thenable;
4092 thenableState2.status = "pending";
4093 thenableState2.then(
4094 function(fulfilledValue) {
4095 if ("pending" === thenable.status) {
4096 var fulfilledThenable = thenable;
4097 fulfilledThenable.status = "fulfilled";
4098 fulfilledThenable.value = fulfilledValue;
4099 }
4100 },
4101 function(error) {
4102 if ("pending" === thenable.status) {
4103 var rejectedThenable = thenable;
4104 rejectedThenable.status = "rejected";
4105 rejectedThenable.reason = error;
4106 }
4107 }
4108 );
4109 }
4110 switch (thenable.status) {
4111 case "fulfilled":
4112 return thenable.value;
4113 case "rejected":
4114 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4115 }
4116 suspendedThenable = thenable;
4117 needsToResetSuspendedThenableDEV = true;
4118 throw SuspenseException;
4119 }
4120 }
4121 function getSuspendedThenable() {
4122 if (null === suspendedThenable)
4123 throw Error(
4124 "Expected a suspended thenable. This is a bug in React. Please file an issue."
4125 );
4126 var thenable = suspendedThenable;
4127 suspendedThenable = null;
4128 needsToResetSuspendedThenableDEV = false;
4129 return thenable;
4130 }
4131 function checkIfUseWrappedInAsyncCatch(rejectedReason) {
4132 if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
4133 throw Error(
4134 "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
4135 );
4136 }
4137 function initializeUpdateQueue(fiber) {
4138 fiber.updateQueue = {
4139 baseState: fiber.memoizedState,
4140 firstBaseUpdate: null,
4141 lastBaseUpdate: null,
4142 shared: { pending: null, lanes: 0, hiddenCallbacks: null },
4143 callbacks: null
4144 };
4145 }
4146 function cloneUpdateQueue(current2, workInProgress2) {
4147 current2 = current2.updateQueue;
4148 workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = {
4149 baseState: current2.baseState,
4150 firstBaseUpdate: current2.firstBaseUpdate,
4151 lastBaseUpdate: current2.lastBaseUpdate,
4152 shared: current2.shared,
4153 callbacks: null
4154 });
4155 }
4156 function createUpdate(lane) {
4157 return {
4158 lane,
4159 tag: UpdateState,
4160 payload: null,
4161 callback: null,
4162 next: null
4163 };
4164 }
4165 function enqueueUpdate(fiber, update, lane) {
4166 var updateQueue = fiber.updateQueue;
4167 if (null === updateQueue) return null;
4168 updateQueue = updateQueue.shared;
4169 if (currentlyProcessingQueue === updateQueue && !didWarnUpdateInsideUpdate) {
4170 var componentName2 = getComponentNameFromFiber(fiber);
4171 console.error(
4172 "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s",
4173 componentName2
4174 );
4175 didWarnUpdateInsideUpdate = true;
4176 }
4177 if ((executionContext & RenderContext) !== NoContext)
4178 return componentName2 = updateQueue.pending, null === componentName2 ? update.next = update : (update.next = componentName2.next, componentName2.next = update), updateQueue.pending = update, update = getRootForUpdatedFiber(fiber), markUpdateLaneFromFiberToRoot(fiber, null, lane), update;
4179 enqueueUpdate$1(fiber, updateQueue, update, lane);
4180 return getRootForUpdatedFiber(fiber);
4181 }
4182 function entangleTransitions(root2, fiber, lane) {
4183 fiber = fiber.updateQueue;
4184 if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
4185 var queueLanes = fiber.lanes;
4186 queueLanes &= root2.pendingLanes;
4187 lane |= queueLanes;
4188 fiber.lanes = lane;
4189 markRootEntangled(root2, lane);
4190 }
4191 }
4192 function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
4193 var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate;
4194 if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) {
4195 var newFirst = null, newLast = null;
4196 queue = queue.firstBaseUpdate;
4197 if (null !== queue) {
4198 do {
4199 var clone = {
4200 lane: queue.lane,
4201 tag: queue.tag,
4202 payload: queue.payload,
4203 callback: null,
4204 next: null
4205 };
4206 null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone;
4207 queue = queue.next;
4208 } while (null !== queue);
4209 null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
4210 } else newFirst = newLast = capturedUpdate;
4211 queue = {
4212 baseState: current2.baseState,
4213 firstBaseUpdate: newFirst,
4214 lastBaseUpdate: newLast,
4215 shared: current2.shared,
4216 callbacks: current2.callbacks
4217 };
4218 workInProgress2.updateQueue = queue;
4219 return;
4220 }
4221 workInProgress2 = queue.lastBaseUpdate;
4222 null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
4223 queue.lastBaseUpdate = capturedUpdate;
4224 }
4225 function suspendIfUpdateReadFromEntangledAsyncAction() {
4226 if (didReadFromEntangledAsyncAction) {
4227 var entangledActionThenable = currentEntangledActionThenable;
4228 if (null !== entangledActionThenable) throw entangledActionThenable;
4229 }
4230 }
4231 function processUpdateQueue(workInProgress2, props, instance$jscomp$0, renderLanes2) {
4232 didReadFromEntangledAsyncAction = false;
4233 var queue = workInProgress2.updateQueue;
4234 hasForceUpdate = false;
4235 currentlyProcessingQueue = queue.shared;
4236 var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
4237 if (null !== pendingQueue) {
4238 queue.shared.pending = null;
4239 var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
4240 lastPendingUpdate.next = null;
4241 null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
4242 lastBaseUpdate = lastPendingUpdate;
4243 var current2 = workInProgress2.alternate;
4244 null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate));
4245 }
4246 if (null !== firstBaseUpdate) {
4247 var newState = queue.baseState;
4248 lastBaseUpdate = 0;
4249 current2 = firstPendingUpdate = lastPendingUpdate = null;
4250 pendingQueue = firstBaseUpdate;
4251 do {
4252 var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
4253 if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
4254 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
4255 null !== current2 && (current2 = current2.next = {
4256 lane: 0,
4257 tag: pendingQueue.tag,
4258 payload: pendingQueue.payload,
4259 callback: null,
4260 next: null
4261 });
4262 a: {
4263 updateLane = workInProgress2;
4264 var partialState = pendingQueue;
4265 var nextProps = props, instance = instance$jscomp$0;
4266 switch (partialState.tag) {
4267 case ReplaceState:
4268 partialState = partialState.payload;
4269 if ("function" === typeof partialState) {
4270 isDisallowedContextReadInDEV = true;
4271 var nextState = partialState.call(
4272 instance,
4273 newState,
4274 nextProps
4275 );
4276 if (updateLane.mode & StrictLegacyMode) {
4277 setIsStrictModeForDevtools(true);
4278 try {
4279 partialState.call(instance, newState, nextProps);
4280 } finally {
4281 setIsStrictModeForDevtools(false);
4282 }
4283 }
4284 isDisallowedContextReadInDEV = false;
4285 newState = nextState;
4286 break a;
4287 }
4288 newState = partialState;
4289 break a;
4290 case CaptureUpdate:
4291 updateLane.flags = updateLane.flags & -65537 | 128;
4292 case UpdateState:
4293 nextState = partialState.payload;
4294 if ("function" === typeof nextState) {
4295 isDisallowedContextReadInDEV = true;
4296 partialState = nextState.call(
4297 instance,
4298 newState,
4299 nextProps
4300 );
4301 if (updateLane.mode & StrictLegacyMode) {
4302 setIsStrictModeForDevtools(true);
4303 try {
4304 nextState.call(instance, newState, nextProps);
4305 } finally {
4306 setIsStrictModeForDevtools(false);
4307 }
4308 }
4309 isDisallowedContextReadInDEV = false;
4310 } else partialState = nextState;
4311 if (null === partialState || void 0 === partialState) break a;
4312 newState = assign({}, newState, partialState);
4313 break a;
4314 case ForceUpdate:
4315 hasForceUpdate = true;
4316 }
4317 }
4318 updateLane = pendingQueue.callback;
4319 null !== updateLane && (workInProgress2.flags |= 64, isHiddenUpdate && (workInProgress2.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
4320 } else
4321 isHiddenUpdate = {
4322 lane: updateLane,
4323 tag: pendingQueue.tag,
4324 payload: pendingQueue.payload,
4325 callback: pendingQueue.callback,
4326 next: null
4327 }, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
4328 pendingQueue = pendingQueue.next;
4329 if (null === pendingQueue)
4330 if (pendingQueue = queue.shared.pending, null === pendingQueue)
4331 break;
4332 else
4333 isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
4334 } while (1);
4335 null === current2 && (lastPendingUpdate = newState);
4336 queue.baseState = lastPendingUpdate;
4337 queue.firstBaseUpdate = firstPendingUpdate;
4338 queue.lastBaseUpdate = current2;
4339 null === firstBaseUpdate && (queue.shared.lanes = 0);
4340 workInProgressRootSkippedLanes |= lastBaseUpdate;
4341 workInProgress2.lanes = lastBaseUpdate;
4342 workInProgress2.memoizedState = newState;
4343 }
4344 currentlyProcessingQueue = null;
4345 }
4346 function callCallback(callback, context) {
4347 if ("function" !== typeof callback)
4348 throw Error(
4349 "Invalid argument passed as callback. Expected a function. Instead received: " + callback
4350 );
4351 callback.call(context);
4352 }
4353 function commitHiddenCallbacks(updateQueue, context) {
4354 var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
4355 if (null !== hiddenCallbacks)
4356 for (updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; updateQueue < hiddenCallbacks.length; updateQueue++)
4357 callCallback(hiddenCallbacks[updateQueue], context);
4358 }
4359 function commitCallbacks(updateQueue, context) {
4360 var callbacks = updateQueue.callbacks;
4361 if (null !== callbacks)
4362 for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
4363 callCallback(callbacks[updateQueue], context);
4364 }
4365 function pushHiddenContext(fiber, context) {
4366 var prevEntangledRenderLanes = entangledRenderLanes;
4367 push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
4368 push(currentTreeHiddenStackCursor, context, fiber);
4369 entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;
4370 }
4371 function reuseHiddenContextOnStack(fiber) {
4372 push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
4373 push(
4374 currentTreeHiddenStackCursor,
4375 currentTreeHiddenStackCursor.current,
4376 fiber
4377 );
4378 }
4379 function popHiddenContext(fiber) {
4380 entangledRenderLanes = prevEntangledRenderLanesCursor.current;
4381 pop(currentTreeHiddenStackCursor, fiber);
4382 pop(prevEntangledRenderLanesCursor, fiber);
4383 }
4384 function mountHookTypesDev() {
4385 var hookName = currentHookNameInDev;
4386 null === hookTypesDev ? hookTypesDev = [hookName] : hookTypesDev.push(hookName);
4387 }
4388 function updateHookTypesDev() {
4389 var hookName = currentHookNameInDev;
4390 if (null !== hookTypesDev && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName)) {
4391 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
4392 if (!didWarnAboutMismatchedHooksForComponent.has(componentName2) && (didWarnAboutMismatchedHooksForComponent.add(componentName2), null !== hookTypesDev)) {
4393 for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) {
4394 var oldHookName = hookTypesDev[i], newHookName = i === hookTypesUpdateIndexDev ? hookName : oldHookName;
4395 for (oldHookName = i + 1 + ". " + oldHookName; 30 > oldHookName.length; )
4396 oldHookName += " ";
4397 oldHookName += newHookName + "\n";
4398 table += oldHookName;
4399 }
4400 console.error(
4401 "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
4402 componentName2,
4403 table
4404 );
4405 }
4406 }
4407 }
4408 function checkDepsAreArrayDev(deps) {
4409 void 0 === deps || null === deps || isArrayImpl(deps) || console.error(
4410 "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
4411 currentHookNameInDev,
4412 typeof deps
4413 );
4414 }
4415 function warnOnUseFormStateInDev() {
4416 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
4417 didWarnAboutUseFormState.has(componentName2) || (didWarnAboutUseFormState.add(componentName2), console.error(
4418 "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
4419 componentName2
4420 ));
4421 }
4422 function throwInvalidHookError() {
4423 throw Error(
4424 "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
4425 );
4426 }
4427 function areHookInputsEqual(nextDeps, prevDeps) {
4428 if (ignorePreviousDependencies) return false;
4429 if (null === prevDeps)
4430 return console.error(
4431 "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
4432 currentHookNameInDev
4433 ), false;
4434 nextDeps.length !== prevDeps.length && console.error(
4435 "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",
4436 currentHookNameInDev,
4437 "[" + prevDeps.join(", ") + "]",
4438 "[" + nextDeps.join(", ") + "]"
4439 );
4440 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
4441 if (!objectIs(nextDeps[i], prevDeps[i])) return false;
4442 return true;
4443 }
4444 function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) {
4445 renderLanes = nextRenderLanes;
4446 currentlyRenderingFiber = workInProgress2;
4447 hookTypesDev = null !== current2 ? current2._debugHookTypes : null;
4448 hookTypesUpdateIndexDev = -1;
4449 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
4450 if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component))
4451 nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error(
4452 "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
4453 null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"
4454 ));
4455 workInProgress2.memoizedState = null;
4456 workInProgress2.updateQueue = null;
4457 workInProgress2.lanes = 0;
4458 ReactSharedInternals.H = null !== current2 && null !== current2.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
4459 shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress2.mode & StrictLegacyMode) !== NoMode;
4460 var children = callComponentInDEV(Component, props, secondArg);
4461 shouldDoubleInvokeUserFnsInHooksDEV = false;
4462 didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(
4463 workInProgress2,
4464 Component,
4465 props,
4466 secondArg
4467 ));
4468 if (nextRenderLanes) {
4469 setIsStrictModeForDevtools(true);
4470 try {
4471 children = renderWithHooksAgain(
4472 workInProgress2,
4473 Component,
4474 props,
4475 secondArg
4476 );
4477 } finally {
4478 setIsStrictModeForDevtools(false);
4479 }
4480 }
4481 finishRenderingHooks(current2, workInProgress2);
4482 return children;
4483 }
4484 function finishRenderingHooks(current2, workInProgress2) {
4485 workInProgress2._debugHookTypes = hookTypesDev;
4486 null === workInProgress2.dependencies ? null !== thenableState$1 && (workInProgress2.dependencies = {
4487 lanes: 0,
4488 firstContext: null,
4489 _debugThenableState: thenableState$1
4490 }) : workInProgress2.dependencies._debugThenableState = thenableState$1;
4491 ReactSharedInternals.H = ContextOnlyDispatcher;
4492 var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
4493 renderLanes = 0;
4494 hookTypesDev = currentHookNameInDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
4495 hookTypesUpdateIndexDev = -1;
4496 null !== current2 && (current2.flags & 65011712) !== (workInProgress2.flags & 65011712) && console.error(
4497 "Internal React error: Expected static flag was missing. Please notify the React team."
4498 );
4499 didScheduleRenderPhaseUpdate = false;
4500 thenableIndexCounter$1 = 0;
4501 thenableState$1 = null;
4502 if (didRenderTooFewHooks)
4503 throw Error(
4504 "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
4505 );
4506 null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true));
4507 needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = false, current2 = true) : current2 = false;
4508 current2 && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress2) || didWarnAboutAsyncClientComponent.has(workInProgress2) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress2), console.error(
4509 "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary."
4510 )));
4511 }
4512 function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
4513 currentlyRenderingFiber = workInProgress2;
4514 var numberOfReRenders = 0;
4515 do {
4516 didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null);
4517 thenableIndexCounter$1 = 0;
4518 didScheduleRenderPhaseUpdateDuringThisPass = false;
4519 if (numberOfReRenders >= RE_RENDER_LIMIT)
4520 throw Error(
4521 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
4522 );
4523 numberOfReRenders += 1;
4524 ignorePreviousDependencies = false;
4525 workInProgressHook = currentHook = null;
4526 if (null != workInProgress2.updateQueue) {
4527 var children = workInProgress2.updateQueue;
4528 children.lastEffect = null;
4529 children.events = null;
4530 children.stores = null;
4531 null != children.memoCache && (children.memoCache.index = 0);
4532 }
4533 hookTypesUpdateIndexDev = -1;
4534 ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
4535 children = callComponentInDEV(Component, props, secondArg);
4536 } while (didScheduleRenderPhaseUpdateDuringThisPass);
4537 return children;
4538 }
4539 function TransitionAwareHostComponent() {
4540 var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
4541 maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
4542 dispatcher = dispatcher.useState()[0];
4543 (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
4544 return maybeThenable;
4545 }
4546 function checkDidRenderIdHook() {
4547 var didRenderIdHook = 0 !== localIdCounter;
4548 localIdCounter = 0;
4549 return didRenderIdHook;
4550 }
4551 function bailoutHooks(current2, workInProgress2, lanes) {
4552 workInProgress2.updateQueue = current2.updateQueue;
4553 workInProgress2.flags = (workInProgress2.mode & StrictEffectsMode) !== NoMode ? workInProgress2.flags & -402655237 : workInProgress2.flags & -2053;
4554 current2.lanes &= ~lanes;
4555 }
4556 function resetHooksOnUnwind(workInProgress2) {
4557 if (didScheduleRenderPhaseUpdate) {
4558 for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
4559 var queue = workInProgress2.queue;
4560 null !== queue && (queue.pending = null);
4561 workInProgress2 = workInProgress2.next;
4562 }
4563 didScheduleRenderPhaseUpdate = false;
4564 }
4565 renderLanes = 0;
4566 hookTypesDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
4567 hookTypesUpdateIndexDev = -1;
4568 currentHookNameInDev = null;
4569 didScheduleRenderPhaseUpdateDuringThisPass = false;
4570 thenableIndexCounter$1 = localIdCounter = 0;
4571 thenableState$1 = null;
4572 }
4573 function mountWorkInProgressHook() {
4574 var hook = {
4575 memoizedState: null,
4576 baseState: null,
4577 baseQueue: null,
4578 queue: null,
4579 next: null
4580 };
4581 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
4582 return workInProgressHook;
4583 }
4584 function updateWorkInProgressHook() {
4585 if (null === currentHook) {
4586 var nextCurrentHook = currentlyRenderingFiber.alternate;
4587 nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
4588 } else nextCurrentHook = currentHook.next;
4589 var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
4590 if (null !== nextWorkInProgressHook)
4591 workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
4592 else {
4593 if (null === nextCurrentHook) {
4594 if (null === currentlyRenderingFiber.alternate)
4595 throw Error(
4596 "Update hook called on initial render. This is likely a bug in React. Please file an issue."
4597 );
4598 throw Error("Rendered more hooks than during the previous render.");
4599 }
4600 currentHook = nextCurrentHook;
4601 nextCurrentHook = {
4602 memoizedState: currentHook.memoizedState,
4603 baseState: currentHook.baseState,
4604 baseQueue: currentHook.baseQueue,
4605 queue: currentHook.queue,
4606 next: null
4607 };
4608 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
4609 }
4610 return workInProgressHook;
4611 }
4612 function createFunctionComponentUpdateQueue() {
4613 return { lastEffect: null, events: null, stores: null, memoCache: null };
4614 }
4615 function useThenable(thenable) {
4616 var index = thenableIndexCounter$1;
4617 thenableIndexCounter$1 += 1;
4618 null === thenableState$1 && (thenableState$1 = createThenableState());
4619 thenable = trackUsedThenable(thenableState$1, thenable, index);
4620 index = currentlyRenderingFiber;
4621 null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null !== index && null !== index.memoizedState ? HooksDispatcherOnUpdateInDEV : HooksDispatcherOnMountInDEV);
4622 return thenable;
4623 }
4624 function use(usable) {
4625 if (null !== usable && "object" === typeof usable) {
4626 if ("function" === typeof usable.then) return useThenable(usable);
4627 if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
4628 }
4629 throw Error("An unsupported type was passed to use(): " + String(usable));
4630 }
4631 function useMemoCache(size) {
4632 var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
4633 null !== updateQueue && (memoCache = updateQueue.memoCache);
4634 if (null == memoCache) {
4635 var current2 = currentlyRenderingFiber.alternate;
4636 null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = {
4637 data: current2.data.map(function(array) {
4638 return array.slice();
4639 }),
4640 index: 0
4641 })));
4642 }
4643 null == memoCache && (memoCache = { data: [], index: 0 });
4644 null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
4645 updateQueue.memoCache = memoCache;
4646 updateQueue = memoCache.data[memoCache.index];
4647 if (void 0 === updateQueue || ignorePreviousDependencies)
4648 for (updateQueue = memoCache.data[memoCache.index] = Array(size), current2 = 0; current2 < size; current2++)
4649 updateQueue[current2] = REACT_MEMO_CACHE_SENTINEL;
4650 else
4651 updateQueue.length !== size && console.error(
4652 "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
4653 updateQueue.length,
4654 size
4655 );
4656 memoCache.index++;
4657 return updateQueue;
4658 }
4659 function basicStateReducer(state, action) {
4660 return "function" === typeof action ? action(state) : action;
4661 }
4662 function mountReducer(reducer, initialArg, init) {
4663 var hook = mountWorkInProgressHook();
4664 if (void 0 !== init) {
4665 var initialState = init(initialArg);
4666 if (shouldDoubleInvokeUserFnsInHooksDEV) {
4667 setIsStrictModeForDevtools(true);
4668 try {
4669 init(initialArg);
4670 } finally {
4671 setIsStrictModeForDevtools(false);
4672 }
4673 }
4674 } else initialState = initialArg;
4675 hook.memoizedState = hook.baseState = initialState;
4676 reducer = {
4677 pending: null,
4678 lanes: 0,
4679 dispatch: null,
4680 lastRenderedReducer: reducer,
4681 lastRenderedState: initialState
4682 };
4683 hook.queue = reducer;
4684 reducer = reducer.dispatch = dispatchReducerAction.bind(
4685 null,
4686 currentlyRenderingFiber,
4687 reducer
4688 );
4689 return [hook.memoizedState, reducer];
4690 }
4691 function updateReducer(reducer) {
4692 var hook = updateWorkInProgressHook();
4693 return updateReducerImpl(hook, currentHook, reducer);
4694 }
4695 function updateReducerImpl(hook, current2, reducer) {
4696 var queue = hook.queue;
4697 if (null === queue)
4698 throw Error(
4699 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
4700 );
4701 queue.lastRenderedReducer = reducer;
4702 var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
4703 if (null !== pendingQueue) {
4704 if (null !== baseQueue) {
4705 var baseFirst = baseQueue.next;
4706 baseQueue.next = pendingQueue.next;
4707 pendingQueue.next = baseFirst;
4708 }
4709 current2.baseQueue !== baseQueue && console.error(
4710 "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
4711 );
4712 current2.baseQueue = baseQueue = pendingQueue;
4713 queue.pending = null;
4714 }
4715 pendingQueue = hook.baseState;
4716 if (null === baseQueue) hook.memoizedState = pendingQueue;
4717 else {
4718 current2 = baseQueue.next;
4719 var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction2 = false;
4720 do {
4721 var updateLane = update.lane & -536870913;
4722 if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
4723 var revertLane = update.revertLane;
4724 if (0 === revertLane)
4725 null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
4726 lane: 0,
4727 revertLane: 0,
4728 action: update.action,
4729 hasEagerState: update.hasEagerState,
4730 eagerState: update.eagerState,
4731 next: null
4732 }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
4733 else if ((renderLanes & revertLane) === revertLane) {
4734 update = update.next;
4735 revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
4736 continue;
4737 } else
4738 updateLane = {
4739 lane: 0,
4740 revertLane: update.revertLane,
4741 action: update.action,
4742 hasEagerState: update.hasEagerState,
4743 eagerState: update.eagerState,
4744 next: null
4745 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
4746 updateLane = update.action;
4747 shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
4748 pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
4749 } else
4750 revertLane = {
4751 lane: updateLane,
4752 revertLane: update.revertLane,
4753 action: update.action,
4754 hasEagerState: update.hasEagerState,
4755 eagerState: update.eagerState,
4756 next: null
4757 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
4758 update = update.next;
4759 } while (null !== update && update !== current2);
4760 null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
4761 if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction2 && (reducer = currentEntangledActionThenable, null !== reducer)))
4762 throw reducer;
4763 hook.memoizedState = pendingQueue;
4764 hook.baseState = baseFirst;
4765 hook.baseQueue = newBaseQueueLast;
4766 queue.lastRenderedState = pendingQueue;
4767 }
4768 null === baseQueue && (queue.lanes = 0);
4769 return [hook.memoizedState, queue.dispatch];
4770 }
4771 function rerenderReducer(reducer) {
4772 var hook = updateWorkInProgressHook(), queue = hook.queue;
4773 if (null === queue)
4774 throw Error(
4775 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
4776 );
4777 queue.lastRenderedReducer = reducer;
4778 var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
4779 if (null !== lastRenderPhaseUpdate) {
4780 queue.pending = null;
4781 var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
4782 do
4783 newState = reducer(newState, update.action), update = update.next;
4784 while (update !== lastRenderPhaseUpdate);
4785 objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
4786 hook.memoizedState = newState;
4787 null === hook.baseQueue && (hook.baseState = newState);
4788 queue.lastRenderedState = newState;
4789 }
4790 return [newState, dispatch];
4791 }
4792 function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
4793 var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
4794 if (isHydrating) {
4795 if (void 0 === getServerSnapshot)
4796 throw Error(
4797 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
4798 );
4799 var nextSnapshot = getServerSnapshot();
4800 didWarnUncachedGetSnapshot || nextSnapshot === getServerSnapshot() || (console.error(
4801 "The result of getServerSnapshot should be cached to avoid an infinite loop"
4802 ), didWarnUncachedGetSnapshot = true);
4803 } else {
4804 nextSnapshot = getSnapshot();
4805 didWarnUncachedGetSnapshot || (getServerSnapshot = getSnapshot(), objectIs(nextSnapshot, getServerSnapshot) || (console.error(
4806 "The result of getSnapshot should be cached to avoid an infinite loop"
4807 ), didWarnUncachedGetSnapshot = true));
4808 if (null === workInProgressRoot)
4809 throw Error(
4810 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
4811 );
4812 0 !== (workInProgressRootRenderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
4813 }
4814 hook.memoizedState = nextSnapshot;
4815 getServerSnapshot = { value: nextSnapshot, getSnapshot };
4816 hook.queue = getServerSnapshot;
4817 mountEffect(
4818 subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
4819 [subscribe]
4820 );
4821 fiber.flags |= 2048;
4822 pushSimpleEffect(
4823 HasEffect | Passive,
4824 createEffectInstance(),
4825 updateStoreInstance.bind(
4826 null,
4827 fiber,
4828 getServerSnapshot,
4829 nextSnapshot,
4830 getSnapshot
4831 ),
4832 null
4833 );
4834 return nextSnapshot;
4835 }
4836 function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
4837 var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
4838 if (isHydrating$jscomp$0) {
4839 if (void 0 === getServerSnapshot)
4840 throw Error(
4841 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
4842 );
4843 getServerSnapshot = getServerSnapshot();
4844 } else if (getServerSnapshot = getSnapshot(), !didWarnUncachedGetSnapshot) {
4845 var cachedSnapshot = getSnapshot();
4846 objectIs(getServerSnapshot, cachedSnapshot) || (console.error(
4847 "The result of getSnapshot should be cached to avoid an infinite loop"
4848 ), didWarnUncachedGetSnapshot = true);
4849 }
4850 if (cachedSnapshot = !objectIs(
4851 (currentHook || hook).memoizedState,
4852 getServerSnapshot
4853 ))
4854 hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
4855 hook = hook.queue;
4856 var create = subscribeToStore.bind(null, fiber, hook, subscribe);
4857 updateEffectImpl(2048, Passive, create, [subscribe]);
4858 if (hook.getSnapshot !== getSnapshot || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
4859 fiber.flags |= 2048;
4860 pushSimpleEffect(
4861 HasEffect | Passive,
4862 createEffectInstance(),
4863 updateStoreInstance.bind(
4864 null,
4865 fiber,
4866 hook,
4867 getServerSnapshot,
4868 getSnapshot
4869 ),
4870 null
4871 );
4872 if (null === workInProgressRoot)
4873 throw Error(
4874 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
4875 );
4876 isHydrating$jscomp$0 || 0 !== (renderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
4877 }
4878 return getServerSnapshot;
4879 }
4880 function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
4881 fiber.flags |= 16384;
4882 fiber = { getSnapshot, value: renderedSnapshot };
4883 getSnapshot = currentlyRenderingFiber.updateQueue;
4884 null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
4885 }
4886 function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
4887 inst.value = nextSnapshot;
4888 inst.getSnapshot = getSnapshot;
4889 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
4890 }
4891 function subscribeToStore(fiber, inst, subscribe) {
4892 return subscribe(function() {
4893 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
4894 });
4895 }
4896 function checkIfSnapshotChanged(inst) {
4897 var latestGetSnapshot = inst.getSnapshot;
4898 inst = inst.value;
4899 try {
4900 var nextValue = latestGetSnapshot();
4901 return !objectIs(inst, nextValue);
4902 } catch (error) {
4903 return true;
4904 }
4905 }
4906 function forceStoreRerender(fiber) {
4907 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
4908 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
4909 }
4910 function mountStateImpl(initialState) {
4911 var hook = mountWorkInProgressHook();
4912 if ("function" === typeof initialState) {
4913 var initialStateInitializer = initialState;
4914 initialState = initialStateInitializer();
4915 if (shouldDoubleInvokeUserFnsInHooksDEV) {
4916 setIsStrictModeForDevtools(true);
4917 try {
4918 initialStateInitializer();
4919 } finally {
4920 setIsStrictModeForDevtools(false);
4921 }
4922 }
4923 }
4924 hook.memoizedState = hook.baseState = initialState;
4925 hook.queue = {
4926 pending: null,
4927 lanes: 0,
4928 dispatch: null,
4929 lastRenderedReducer: basicStateReducer,
4930 lastRenderedState: initialState
4931 };
4932 return hook;
4933 }
4934 function mountState(initialState) {
4935 initialState = mountStateImpl(initialState);
4936 var queue = initialState.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
4937 queue.dispatch = dispatch;
4938 return [initialState.memoizedState, dispatch];
4939 }
4940 function mountOptimistic(passthrough) {
4941 var hook = mountWorkInProgressHook();
4942 hook.memoizedState = hook.baseState = passthrough;
4943 var queue = {
4944 pending: null,
4945 lanes: 0,
4946 dispatch: null,
4947 lastRenderedReducer: null,
4948 lastRenderedState: null
4949 };
4950 hook.queue = queue;
4951 hook = dispatchOptimisticSetState.bind(
4952 null,
4953 currentlyRenderingFiber,
4954 true,
4955 queue
4956 );
4957 queue.dispatch = hook;
4958 return [passthrough, hook];
4959 }
4960 function updateOptimistic(passthrough, reducer) {
4961 var hook = updateWorkInProgressHook();
4962 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
4963 }
4964 function updateOptimisticImpl(hook, current2, passthrough, reducer) {
4965 hook.baseState = passthrough;
4966 return updateReducerImpl(
4967 hook,
4968 currentHook,
4969 "function" === typeof reducer ? reducer : basicStateReducer
4970 );
4971 }
4972 function rerenderOptimistic(passthrough, reducer) {
4973 var hook = updateWorkInProgressHook();
4974 if (null !== currentHook)
4975 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
4976 hook.baseState = passthrough;
4977 return [passthrough, hook.queue.dispatch];
4978 }
4979 function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
4980 if (isRenderPhaseUpdate(fiber))
4981 throw Error("Cannot update form state while rendering.");
4982 fiber = actionQueue.action;
4983 if (null !== fiber) {
4984 var actionNode = {
4985 payload,
4986 action: fiber,
4987 next: null,
4988 isTransition: true,
4989 status: "pending",
4990 value: null,
4991 reason: null,
4992 listeners: [],
4993 then: function(listener) {
4994 actionNode.listeners.push(listener);
4995 }
4996 };
4997 null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
4998 setState(actionNode);
4999 setPendingState = actionQueue.pending;
5000 null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
5001 }
5002 }
5003 function runActionStateAction(actionQueue, node) {
5004 var action = node.action, payload = node.payload, prevState = actionQueue.state;
5005 if (node.isTransition) {
5006 var prevTransition = ReactSharedInternals.T, currentTransition = {};
5007 ReactSharedInternals.T = currentTransition;
5008 ReactSharedInternals.T._updatedFibers = /* @__PURE__ */ new Set();
5009 try {
5010 var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
5011 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
5012 handleActionReturnValue(actionQueue, node, returnValue);
5013 } catch (error) {
5014 onActionError(actionQueue, node, error);
5015 } finally {
5016 ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (actionQueue = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < actionQueue && console.warn(
5017 "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
5018 ));
5019 }
5020 } else
5021 try {
5022 currentTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, currentTransition);
5023 } catch (error$4) {
5024 onActionError(actionQueue, node, error$4);
5025 }
5026 }
5027 function handleActionReturnValue(actionQueue, node, returnValue) {
5028 null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? (returnValue.then(
5029 function(nextState) {
5030 onActionSuccess(actionQueue, node, nextState);
5031 },
5032 function(error) {
5033 return onActionError(actionQueue, node, error);
5034 }
5035 ), node.isTransition || console.error(
5036 "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
5037 )) : onActionSuccess(actionQueue, node, returnValue);
5038 }
5039 function onActionSuccess(actionQueue, actionNode, nextState) {
5040 actionNode.status = "fulfilled";
5041 actionNode.value = nextState;
5042 notifyActionListeners(actionNode);
5043 actionQueue.state = nextState;
5044 actionNode = actionQueue.pending;
5045 null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
5046 }
5047 function onActionError(actionQueue, actionNode, error) {
5048 var last = actionQueue.pending;
5049 actionQueue.pending = null;
5050 if (null !== last) {
5051 last = last.next;
5052 do
5053 actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
5054 while (actionNode !== last);
5055 }
5056 actionQueue.action = null;
5057 }
5058 function notifyActionListeners(actionNode) {
5059 actionNode = actionNode.listeners;
5060 for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
5061 }
5062 function actionStateReducer(oldState, newState) {
5063 return newState;
5064 }
5065 function mountActionState(action, initialStateProp) {
5066 if (isHydrating) {
5067 var ssrFormState = workInProgressRoot.formState;
5068 if (null !== ssrFormState) {
5069 a: {
5070 var isMatching = currentlyRenderingFiber;
5071 if (isHydrating) {
5072 if (nextHydratableInstance) {
5073 b: {
5074 var markerInstance = nextHydratableInstance;
5075 for (var inRootOrSingleton = rootOrSingletonContext; 8 !== markerInstance.nodeType; ) {
5076 if (!inRootOrSingleton) {
5077 markerInstance = null;
5078 break b;
5079 }
5080 markerInstance = getNextHydratable(
5081 markerInstance.nextSibling
5082 );
5083 if (null === markerInstance) {
5084 markerInstance = null;
5085 break b;
5086 }
5087 }
5088 inRootOrSingleton = markerInstance.data;
5089 markerInstance = inRootOrSingleton === FORM_STATE_IS_MATCHING || inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING ? markerInstance : null;
5090 }
5091 if (markerInstance) {
5092 nextHydratableInstance = getNextHydratable(
5093 markerInstance.nextSibling
5094 );
5095 isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;
5096 break a;
5097 }
5098 }
5099 throwOnHydrationMismatch(isMatching);
5100 }
5101 isMatching = false;
5102 }
5103 isMatching && (initialStateProp = ssrFormState[0]);
5104 }
5105 }
5106 ssrFormState = mountWorkInProgressHook();
5107 ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
5108 isMatching = {
5109 pending: null,
5110 lanes: 0,
5111 dispatch: null,
5112 lastRenderedReducer: actionStateReducer,
5113 lastRenderedState: initialStateProp
5114 };
5115 ssrFormState.queue = isMatching;
5116 ssrFormState = dispatchSetState.bind(
5117 null,
5118 currentlyRenderingFiber,
5119 isMatching
5120 );
5121 isMatching.dispatch = ssrFormState;
5122 isMatching = mountStateImpl(false);
5123 inRootOrSingleton = dispatchOptimisticSetState.bind(
5124 null,
5125 currentlyRenderingFiber,
5126 false,
5127 isMatching.queue
5128 );
5129 isMatching = mountWorkInProgressHook();
5130 markerInstance = {
5131 state: initialStateProp,
5132 dispatch: null,
5133 action,
5134 pending: null
5135 };
5136 isMatching.queue = markerInstance;
5137 ssrFormState = dispatchActionState.bind(
5138 null,
5139 currentlyRenderingFiber,
5140 markerInstance,
5141 inRootOrSingleton,
5142 ssrFormState
5143 );
5144 markerInstance.dispatch = ssrFormState;
5145 isMatching.memoizedState = action;
5146 return [initialStateProp, ssrFormState, false];
5147 }
5148 function updateActionState(action) {
5149 var stateHook = updateWorkInProgressHook();
5150 return updateActionStateImpl(stateHook, currentHook, action);
5151 }
5152 function updateActionStateImpl(stateHook, currentStateHook, action) {
5153 currentStateHook = updateReducerImpl(
5154 stateHook,
5155 currentStateHook,
5156 actionStateReducer
5157 )[0];
5158 stateHook = updateReducer(basicStateReducer)[0];
5159 if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
5160 try {
5161 var state = useThenable(currentStateHook);
5162 } catch (x) {
5163 if (x === SuspenseException) throw SuspenseActionException;
5164 throw x;
5165 }
5166 else state = currentStateHook;
5167 currentStateHook = updateWorkInProgressHook();
5168 var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
5169 action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
5170 HasEffect | Passive,
5171 createEffectInstance(),
5172 actionStateActionEffect.bind(null, actionQueue, action),
5173 null
5174 ));
5175 return [state, dispatch, stateHook];
5176 }
5177 function actionStateActionEffect(actionQueue, action) {
5178 actionQueue.action = action;
5179 }
5180 function rerenderActionState(action) {
5181 var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
5182 if (null !== currentStateHook)
5183 return updateActionStateImpl(stateHook, currentStateHook, action);
5184 updateWorkInProgressHook();
5185 stateHook = stateHook.memoizedState;
5186 currentStateHook = updateWorkInProgressHook();
5187 var dispatch = currentStateHook.queue.dispatch;
5188 currentStateHook.memoizedState = action;
5189 return [stateHook, dispatch, false];
5190 }
5191 function pushSimpleEffect(tag, inst, create, createDeps) {
5192 tag = {
5193 tag,
5194 create,
5195 deps: createDeps,
5196 inst,
5197 next: null
5198 };
5199 inst = currentlyRenderingFiber.updateQueue;
5200 null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
5201 create = inst.lastEffect;
5202 null === create ? inst.lastEffect = tag.next = tag : (createDeps = create.next, create.next = tag, tag.next = createDeps, inst.lastEffect = tag);
5203 return tag;
5204 }
5205 function createEffectInstance() {
5206 return { destroy: void 0, resource: void 0 };
5207 }
5208 function mountRef(initialValue) {
5209 var hook = mountWorkInProgressHook();
5210 initialValue = { current: initialValue };
5211 return hook.memoizedState = initialValue;
5212 }
5213 function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) {
5214 var hook = mountWorkInProgressHook();
5215 createDeps = void 0 === createDeps ? null : createDeps;
5216 currentlyRenderingFiber.flags |= fiberFlags;
5217 hook.memoizedState = pushSimpleEffect(
5218 HasEffect | hookFlags,
5219 createEffectInstance(),
5220 create,
5221 createDeps
5222 );
5223 }
5224 function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
5225 var hook = updateWorkInProgressHook();
5226 deps = void 0 === deps ? null : deps;
5227 var inst = hook.memoizedState.inst;
5228 null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
5229 HasEffect | hookFlags,
5230 inst,
5231 create,
5232 deps
5233 ));
5234 }
5235 function mountEffect(create, createDeps) {
5236 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ? mountEffectImpl(276826112, Passive, create, createDeps) : mountEffectImpl(8390656, Passive, create, createDeps);
5237 }
5238 function mountLayoutEffect(create, deps) {
5239 var fiberFlags = 4194308;
5240 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
5241 return mountEffectImpl(fiberFlags, Layout, create, deps);
5242 }
5243 function imperativeHandleEffect(create, ref) {
5244 if ("function" === typeof ref) {
5245 create = create();
5246 var refCleanup = ref(create);
5247 return function() {
5248 "function" === typeof refCleanup ? refCleanup() : ref(null);
5249 };
5250 }
5251 if (null !== ref && void 0 !== ref)
5252 return ref.hasOwnProperty("current") || console.error(
5253 "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
5254 "an object with keys {" + Object.keys(ref).join(", ") + "}"
5255 ), create = create(), ref.current = create, function() {
5256 ref.current = null;
5257 };
5258 }
5259 function mountImperativeHandle(ref, create, deps) {
5260 "function" !== typeof create && console.error(
5261 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
5262 null !== create ? typeof create : "null"
5263 );
5264 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
5265 var fiberFlags = 4194308;
5266 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
5267 mountEffectImpl(
5268 fiberFlags,
5269 Layout,
5270 imperativeHandleEffect.bind(null, create, ref),
5271 deps
5272 );
5273 }
5274 function updateImperativeHandle(ref, create, deps) {
5275 "function" !== typeof create && console.error(
5276 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
5277 null !== create ? typeof create : "null"
5278 );
5279 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
5280 updateEffectImpl(
5281 4,
5282 Layout,
5283 imperativeHandleEffect.bind(null, create, ref),
5284 deps
5285 );
5286 }
5287 function mountCallback(callback, deps) {
5288 mountWorkInProgressHook().memoizedState = [
5289 callback,
5290 void 0 === deps ? null : deps
5291 ];
5292 return callback;
5293 }
5294 function updateCallback(callback, deps) {
5295 var hook = updateWorkInProgressHook();
5296 deps = void 0 === deps ? null : deps;
5297 var prevState = hook.memoizedState;
5298 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
5299 return prevState[0];
5300 hook.memoizedState = [callback, deps];
5301 return callback;
5302 }
5303 function mountMemo(nextCreate, deps) {
5304 var hook = mountWorkInProgressHook();
5305 deps = void 0 === deps ? null : deps;
5306 var nextValue = nextCreate();
5307 if (shouldDoubleInvokeUserFnsInHooksDEV) {
5308 setIsStrictModeForDevtools(true);
5309 try {
5310 nextCreate();
5311 } finally {
5312 setIsStrictModeForDevtools(false);
5313 }
5314 }
5315 hook.memoizedState = [nextValue, deps];
5316 return nextValue;
5317 }
5318 function updateMemo(nextCreate, deps) {
5319 var hook = updateWorkInProgressHook();
5320 deps = void 0 === deps ? null : deps;
5321 var prevState = hook.memoizedState;
5322 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
5323 return prevState[0];
5324 prevState = nextCreate();
5325 if (shouldDoubleInvokeUserFnsInHooksDEV) {
5326 setIsStrictModeForDevtools(true);
5327 try {
5328 nextCreate();
5329 } finally {
5330 setIsStrictModeForDevtools(false);
5331 }
5332 }
5333 hook.memoizedState = [prevState, deps];
5334 return prevState;
5335 }
5336 function mountDeferredValue(value, initialValue) {
5337 var hook = mountWorkInProgressHook();
5338 return mountDeferredValueImpl(hook, value, initialValue);
5339 }
5340 function updateDeferredValue(value, initialValue) {
5341 var hook = updateWorkInProgressHook();
5342 return updateDeferredValueImpl(
5343 hook,
5344 currentHook.memoizedState,
5345 value,
5346 initialValue
5347 );
5348 }
5349 function rerenderDeferredValue(value, initialValue) {
5350 var hook = updateWorkInProgressHook();
5351 return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
5352 hook,
5353 currentHook.memoizedState,
5354 value,
5355 initialValue
5356 );
5357 }
5358 function mountDeferredValueImpl(hook, value, initialValue) {
5359 if (void 0 === initialValue || 0 !== (renderLanes & 1073741824))
5360 return hook.memoizedState = value;
5361 hook.memoizedState = initialValue;
5362 hook = requestDeferredLane();
5363 currentlyRenderingFiber.lanes |= hook;
5364 workInProgressRootSkippedLanes |= hook;
5365 return initialValue;
5366 }
5367 function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
5368 if (objectIs(value, prevValue)) return value;
5369 if (null !== currentTreeHiddenStackCursor.current)
5370 return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
5371 if (0 === (renderLanes & 42))
5372 return didReceiveUpdate = true, hook.memoizedState = value;
5373 hook = requestDeferredLane();
5374 currentlyRenderingFiber.lanes |= hook;
5375 workInProgressRootSkippedLanes |= hook;
5376 return prevValue;
5377 }
5378 function startTransition(fiber, queue, pendingState, finishedState, callback) {
5379 var previousPriority = ReactDOMSharedInternals.p;
5380 ReactDOMSharedInternals.p = 0 !== previousPriority && previousPriority < ContinuousEventPriority ? previousPriority : ContinuousEventPriority;
5381 var prevTransition = ReactSharedInternals.T, currentTransition = {};
5382 ReactSharedInternals.T = currentTransition;
5383 dispatchOptimisticSetState(fiber, false, queue, pendingState);
5384 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
5385 try {
5386 var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
5387 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
5388 if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
5389 var thenableForFinishedState = chainThenableValue(
5390 returnValue,
5391 finishedState
5392 );
5393 dispatchSetStateInternal(
5394 fiber,
5395 queue,
5396 thenableForFinishedState,
5397 requestUpdateLane(fiber)
5398 );
5399 } else
5400 dispatchSetStateInternal(
5401 fiber,
5402 queue,
5403 finishedState,
5404 requestUpdateLane(fiber)
5405 );
5406 } catch (error) {
5407 dispatchSetStateInternal(
5408 fiber,
5409 queue,
5410 { then: function() {
5411 }, status: "rejected", reason: error },
5412 requestUpdateLane(fiber)
5413 );
5414 } finally {
5415 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (fiber = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < fiber && console.warn(
5416 "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
5417 ));
5418 }
5419 }
5420 function startHostTransition(formFiber, pendingState, action, formData) {
5421 if (5 !== formFiber.tag)
5422 throw Error(
5423 "Expected the form instance to be a HostComponent. This is a bug in React."
5424 );
5425 var queue = ensureFormComponentIsStateful(formFiber).queue;
5426 startTransition(
5427 formFiber,
5428 queue,
5429 pendingState,
5430 NotPendingTransition,
5431 null === action ? noop$2 : function() {
5432 requestFormReset$1(formFiber);
5433 return action(formData);
5434 }
5435 );
5436 }
5437 function ensureFormComponentIsStateful(formFiber) {
5438 var existingStateHook = formFiber.memoizedState;
5439 if (null !== existingStateHook) return existingStateHook;
5440 existingStateHook = {
5441 memoizedState: NotPendingTransition,
5442 baseState: NotPendingTransition,
5443 baseQueue: null,
5444 queue: {
5445 pending: null,
5446 lanes: 0,
5447 dispatch: null,
5448 lastRenderedReducer: basicStateReducer,
5449 lastRenderedState: NotPendingTransition
5450 },
5451 next: null
5452 };
5453 var initialResetState = {};
5454 existingStateHook.next = {
5455 memoizedState: initialResetState,
5456 baseState: initialResetState,
5457 baseQueue: null,
5458 queue: {
5459 pending: null,
5460 lanes: 0,
5461 dispatch: null,
5462 lastRenderedReducer: basicStateReducer,
5463 lastRenderedState: initialResetState
5464 },
5465 next: null
5466 };
5467 formFiber.memoizedState = existingStateHook;
5468 formFiber = formFiber.alternate;
5469 null !== formFiber && (formFiber.memoizedState = existingStateHook);
5470 return existingStateHook;
5471 }
5472 function requestFormReset$1(formFiber) {
5473 null === ReactSharedInternals.T && console.error(
5474 "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
5475 );
5476 var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue;
5477 dispatchSetStateInternal(
5478 formFiber,
5479 resetStateQueue,
5480 {},
5481 requestUpdateLane(formFiber)
5482 );
5483 }
5484 function mountTransition() {
5485 var stateHook = mountStateImpl(false);
5486 stateHook = startTransition.bind(
5487 null,
5488 currentlyRenderingFiber,
5489 stateHook.queue,
5490 true,
5491 false
5492 );
5493 mountWorkInProgressHook().memoizedState = stateHook;
5494 return [false, stateHook];
5495 }
5496 function updateTransition() {
5497 var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
5498 return [
5499 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
5500 start
5501 ];
5502 }
5503 function rerenderTransition() {
5504 var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
5505 return [
5506 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
5507 start
5508 ];
5509 }
5510 function useHostTransitionStatus() {
5511 return readContext(HostTransitionContext);
5512 }
5513 function mountId() {
5514 var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
5515 if (isHydrating) {
5516 var treeId = treeContextOverflow;
5517 var idWithLeadingBit = treeContextId;
5518 treeId = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + treeId;
5519 identifierPrefix = "\xAB" + identifierPrefix + "R" + treeId;
5520 treeId = localIdCounter++;
5521 0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
5522 identifierPrefix += "\xBB";
5523 } else
5524 treeId = globalClientIdCounter++, identifierPrefix = "\xAB" + identifierPrefix + "r" + treeId.toString(32) + "\xBB";
5525 return hook.memoizedState = identifierPrefix;
5526 }
5527 function mountRefresh() {
5528 return mountWorkInProgressHook().memoizedState = refreshCache.bind(
5529 null,
5530 currentlyRenderingFiber
5531 );
5532 }
5533 function refreshCache(fiber, seedKey) {
5534 for (var provider = fiber.return; null !== provider; ) {
5535 switch (provider.tag) {
5536 case 24:
5537 case 3:
5538 var lane = requestUpdateLane(provider);
5539 fiber = createUpdate(lane);
5540 var root2 = enqueueUpdate(provider, fiber, lane);
5541 null !== root2 && (scheduleUpdateOnFiber(root2, provider, lane), entangleTransitions(root2, provider, lane));
5542 provider = createCache();
5543 null !== seedKey && void 0 !== seedKey && null !== root2 && console.error(
5544 "The seed argument is not enabled outside experimental channels."
5545 );
5546 fiber.payload = { cache: provider };
5547 return;
5548 }
5549 provider = provider.return;
5550 }
5551 }
5552 function dispatchReducerAction(fiber, queue, action) {
5553 var args = arguments;
5554 "function" === typeof args[3] && console.error(
5555 "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
5556 );
5557 args = requestUpdateLane(fiber);
5558 var update = {
5559 lane: args,
5560 revertLane: 0,
5561 action,
5562 hasEagerState: false,
5563 eagerState: null,
5564 next: null
5565 };
5566 isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, update) : (update = enqueueConcurrentHookUpdate(fiber, queue, update, args), null !== update && (scheduleUpdateOnFiber(update, fiber, args), entangleTransitionUpdate(update, queue, args)));
5567 markStateUpdateScheduled(fiber, args);
5568 }
5569 function dispatchSetState(fiber, queue, action) {
5570 var args = arguments;
5571 "function" === typeof args[3] && console.error(
5572 "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
5573 );
5574 args = requestUpdateLane(fiber);
5575 dispatchSetStateInternal(fiber, queue, action, args);
5576 markStateUpdateScheduled(fiber, args);
5577 }
5578 function dispatchSetStateInternal(fiber, queue, action, lane) {
5579 var update = {
5580 lane,
5581 revertLane: 0,
5582 action,
5583 hasEagerState: false,
5584 eagerState: null,
5585 next: null
5586 };
5587 if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
5588 else {
5589 var alternate = fiber.alternate;
5590 if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) {
5591 var prevDispatcher = ReactSharedInternals.H;
5592 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
5593 try {
5594 var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
5595 update.hasEagerState = true;
5596 update.eagerState = eagerState;
5597 if (objectIs(eagerState, currentState))
5598 return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
5599 } catch (error) {
5600 } finally {
5601 ReactSharedInternals.H = prevDispatcher;
5602 }
5603 }
5604 action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
5605 if (null !== action)
5606 return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
5607 }
5608 return false;
5609 }
5610 function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
5611 null === ReactSharedInternals.T && 0 === currentEntangledLane && console.error(
5612 "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
5613 );
5614 action = {
5615 lane: 2,
5616 revertLane: requestTransitionLane(),
5617 action,
5618 hasEagerState: false,
5619 eagerState: null,
5620 next: null
5621 };
5622 if (isRenderPhaseUpdate(fiber)) {
5623 if (throwIfDuringRender)
5624 throw Error("Cannot update optimistic state while rendering.");
5625 console.error("Cannot call startTransition while rendering.");
5626 } else
5627 throwIfDuringRender = enqueueConcurrentHookUpdate(
5628 fiber,
5629 queue,
5630 action,
5631 2
5632 ), null !== throwIfDuringRender && scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
5633 markStateUpdateScheduled(fiber, 2);
5634 }
5635 function isRenderPhaseUpdate(fiber) {
5636 var alternate = fiber.alternate;
5637 return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
5638 }
5639 function enqueueRenderPhaseUpdate(queue, update) {
5640 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
5641 var pending = queue.pending;
5642 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
5643 queue.pending = update;
5644 }
5645 function entangleTransitionUpdate(root2, queue, lane) {
5646 if (0 !== (lane & 4194048)) {
5647 var queueLanes = queue.lanes;
5648 queueLanes &= root2.pendingLanes;
5649 lane |= queueLanes;
5650 queue.lanes = lane;
5651 markRootEntangled(root2, lane);
5652 }
5653 }
5654 function pushDebugInfo(debugInfo) {
5655 var previousDebugInfo = currentDebugInfo;
5656 null != debugInfo && (currentDebugInfo = null === previousDebugInfo ? debugInfo : previousDebugInfo.concat(debugInfo));
5657 return previousDebugInfo;
5658 }
5659 function validateFragmentProps(element, fiber, returnFiber) {
5660 for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {
5661 var key = keys[i];
5662 if ("children" !== key && "key" !== key) {
5663 null === fiber && (fiber = createFiberFromElement(element, returnFiber.mode, 0), fiber._debugInfo = currentDebugInfo, fiber.return = returnFiber);
5664 runWithFiberInDEV(
5665 fiber,
5666 function(erroredKey) {
5667 console.error(
5668 "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
5669 erroredKey
5670 );
5671 },
5672 key
5673 );
5674 break;
5675 }
5676 }
5677 }
5678 function unwrapThenable(thenable) {
5679 var index = thenableIndexCounter;
5680 thenableIndexCounter += 1;
5681 null === thenableState && (thenableState = createThenableState());
5682 return trackUsedThenable(thenableState, thenable, index);
5683 }
5684 function coerceRef(workInProgress2, element) {
5685 element = element.props.ref;
5686 workInProgress2.ref = void 0 !== element ? element : null;
5687 }
5688 function throwOnInvalidObjectType(returnFiber, newChild) {
5689 if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
5690 throw Error(
5691 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.'
5692 );
5693 returnFiber = Object.prototype.toString.call(newChild);
5694 throw Error(
5695 "Objects are not valid as a React child (found: " + ("[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber) + "). If you meant to render a collection of children, use an array instead."
5696 );
5697 }
5698 function warnOnFunctionType(returnFiber, invalidChild) {
5699 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
5700 ownerHasFunctionTypeWarning[parentName] || (ownerHasFunctionTypeWarning[parentName] = true, invalidChild = invalidChild.displayName || invalidChild.name || "Component", 3 === returnFiber.tag ? console.error(
5701 "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
5702 invalidChild,
5703 invalidChild,
5704 invalidChild
5705 ) : console.error(
5706 "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
5707 invalidChild,
5708 invalidChild,
5709 parentName,
5710 invalidChild,
5711 parentName
5712 ));
5713 }
5714 function warnOnSymbolType(returnFiber, invalidChild) {
5715 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
5716 ownerHasSymbolTypeWarning[parentName] || (ownerHasSymbolTypeWarning[parentName] = true, invalidChild = String(invalidChild), 3 === returnFiber.tag ? console.error(
5717 "Symbols are not valid as a React child.\n root.render(%s)",
5718 invalidChild
5719 ) : console.error(
5720 "Symbols are not valid as a React child.\n <%s>%s</%s>",
5721 parentName,
5722 invalidChild,
5723 parentName
5724 ));
5725 }
5726 function createChildReconciler(shouldTrackSideEffects) {
5727 function deleteChild(returnFiber, childToDelete) {
5728 if (shouldTrackSideEffects) {
5729 var deletions = returnFiber.deletions;
5730 null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
5731 }
5732 }
5733 function deleteRemainingChildren(returnFiber, currentFirstChild) {
5734 if (!shouldTrackSideEffects) return null;
5735 for (; null !== currentFirstChild; )
5736 deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
5737 return null;
5738 }
5739 function mapRemainingChildren(currentFirstChild) {
5740 for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
5741 null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
5742 return existingChildren;
5743 }
5744 function useFiber(fiber, pendingProps) {
5745 fiber = createWorkInProgress(fiber, pendingProps);
5746 fiber.index = 0;
5747 fiber.sibling = null;
5748 return fiber;
5749 }
5750 function placeChild(newFiber, lastPlacedIndex, newIndex) {
5751 newFiber.index = newIndex;
5752 if (!shouldTrackSideEffects)
5753 return newFiber.flags |= 1048576, lastPlacedIndex;
5754 newIndex = newFiber.alternate;
5755 if (null !== newIndex)
5756 return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
5757 newFiber.flags |= 67108866;
5758 return lastPlacedIndex;
5759 }
5760 function placeSingleChild(newFiber) {
5761 shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
5762 return newFiber;
5763 }
5764 function updateTextNode(returnFiber, current2, textContent, lanes) {
5765 if (null === current2 || 6 !== current2.tag)
5766 return current2 = createFiberFromText(
5767 textContent,
5768 returnFiber.mode,
5769 lanes
5770 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
5771 current2 = useFiber(current2, textContent);
5772 current2.return = returnFiber;
5773 current2._debugInfo = currentDebugInfo;
5774 return current2;
5775 }
5776 function updateElement(returnFiber, current2, element, lanes) {
5777 var elementType = element.type;
5778 if (elementType === REACT_FRAGMENT_TYPE)
5779 return current2 = updateFragment(
5780 returnFiber,
5781 current2,
5782 element.props.children,
5783 lanes,
5784 element.key
5785 ), validateFragmentProps(element, current2, returnFiber), current2;
5786 if (null !== current2 && (current2.elementType === elementType || isCompatibleFamilyForHotReloading(current2, element) || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && callLazyInitInDEV(elementType) === current2.type))
5787 return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2._debugOwner = element._owner, current2._debugInfo = currentDebugInfo, current2;
5788 current2 = createFiberFromElement(element, returnFiber.mode, lanes);
5789 coerceRef(current2, element);
5790 current2.return = returnFiber;
5791 current2._debugInfo = currentDebugInfo;
5792 return current2;
5793 }
5794 function updatePortal(returnFiber, current2, portal, lanes) {
5795 if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation)
5796 return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2._debugInfo = currentDebugInfo, current2;
5797 current2 = useFiber(current2, portal.children || []);
5798 current2.return = returnFiber;
5799 current2._debugInfo = currentDebugInfo;
5800 return current2;
5801 }
5802 function updateFragment(returnFiber, current2, fragment, lanes, key) {
5803 if (null === current2 || 7 !== current2.tag)
5804 return current2 = createFiberFromFragment(
5805 fragment,
5806 returnFiber.mode,
5807 lanes,
5808 key
5809 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
5810 current2 = useFiber(current2, fragment);
5811 current2.return = returnFiber;
5812 current2._debugInfo = currentDebugInfo;
5813 return current2;
5814 }
5815 function createChild(returnFiber, newChild, lanes) {
5816 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5817 return newChild = createFiberFromText(
5818 "" + newChild,
5819 returnFiber.mode,
5820 lanes
5821 ), newChild.return = returnFiber, newChild._debugOwner = returnFiber, newChild._debugTask = returnFiber._debugTask, newChild._debugInfo = currentDebugInfo, newChild;
5822 if ("object" === typeof newChild && null !== newChild) {
5823 switch (newChild.$$typeof) {
5824 case REACT_ELEMENT_TYPE:
5825 return lanes = createFiberFromElement(
5826 newChild,
5827 returnFiber.mode,
5828 lanes
5829 ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5830 case REACT_PORTAL_TYPE:
5831 return newChild = createFiberFromPortal(
5832 newChild,
5833 returnFiber.mode,
5834 lanes
5835 ), newChild.return = returnFiber, newChild._debugInfo = currentDebugInfo, newChild;
5836 case REACT_LAZY_TYPE:
5837 var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5838 newChild = callLazyInitInDEV(newChild);
5839 returnFiber = createChild(returnFiber, newChild, lanes);
5840 currentDebugInfo = _prevDebugInfo;
5841 return returnFiber;
5842 }
5843 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5844 return lanes = createFiberFromFragment(
5845 newChild,
5846 returnFiber.mode,
5847 lanes,
5848 null
5849 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5850 if ("function" === typeof newChild.then)
5851 return _prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = createChild(
5852 returnFiber,
5853 unwrapThenable(newChild),
5854 lanes
5855 ), currentDebugInfo = _prevDebugInfo, returnFiber;
5856 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5857 return createChild(
5858 returnFiber,
5859 readContextDuringReconciliation(returnFiber, newChild),
5860 lanes
5861 );
5862 throwOnInvalidObjectType(returnFiber, newChild);
5863 }
5864 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5865 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5866 return null;
5867 }
5868 function updateSlot(returnFiber, oldFiber, newChild, lanes) {
5869 var key = null !== oldFiber ? oldFiber.key : null;
5870 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5871 return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
5872 if ("object" === typeof newChild && null !== newChild) {
5873 switch (newChild.$$typeof) {
5874 case REACT_ELEMENT_TYPE:
5875 return newChild.key === key ? (key = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5876 returnFiber,
5877 oldFiber,
5878 newChild,
5879 lanes
5880 ), currentDebugInfo = key, returnFiber) : null;
5881 case REACT_PORTAL_TYPE:
5882 return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
5883 case REACT_LAZY_TYPE:
5884 return key = pushDebugInfo(newChild._debugInfo), newChild = callLazyInitInDEV(newChild), returnFiber = updateSlot(
5885 returnFiber,
5886 oldFiber,
5887 newChild,
5888 lanes
5889 ), currentDebugInfo = key, returnFiber;
5890 }
5891 if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
5892 if (null !== key) return null;
5893 key = pushDebugInfo(newChild._debugInfo);
5894 returnFiber = updateFragment(
5895 returnFiber,
5896 oldFiber,
5897 newChild,
5898 lanes,
5899 null
5900 );
5901 currentDebugInfo = key;
5902 return returnFiber;
5903 }
5904 if ("function" === typeof newChild.then)
5905 return key = pushDebugInfo(newChild._debugInfo), returnFiber = updateSlot(
5906 returnFiber,
5907 oldFiber,
5908 unwrapThenable(newChild),
5909 lanes
5910 ), currentDebugInfo = key, returnFiber;
5911 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5912 return updateSlot(
5913 returnFiber,
5914 oldFiber,
5915 readContextDuringReconciliation(returnFiber, newChild),
5916 lanes
5917 );
5918 throwOnInvalidObjectType(returnFiber, newChild);
5919 }
5920 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5921 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5922 return null;
5923 }
5924 function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
5925 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5926 return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
5927 if ("object" === typeof newChild && null !== newChild) {
5928 switch (newChild.$$typeof) {
5929 case REACT_ELEMENT_TYPE:
5930 return newIdx = existingChildren.get(
5931 null === newChild.key ? newIdx : newChild.key
5932 ) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5933 returnFiber,
5934 newIdx,
5935 newChild,
5936 lanes
5937 ), currentDebugInfo = existingChildren, returnFiber;
5938 case REACT_PORTAL_TYPE:
5939 return existingChildren = existingChildren.get(
5940 null === newChild.key ? newIdx : newChild.key
5941 ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
5942 case REACT_LAZY_TYPE:
5943 var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
5944 newChild = callLazyInitInDEV(newChild);
5945 returnFiber = updateFromMap(
5946 existingChildren,
5947 returnFiber,
5948 newIdx,
5949 newChild,
5950 lanes
5951 );
5952 currentDebugInfo = _prevDebugInfo7;
5953 return returnFiber;
5954 }
5955 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5956 return newIdx = existingChildren.get(newIdx) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateFragment(
5957 returnFiber,
5958 newIdx,
5959 newChild,
5960 lanes,
5961 null
5962 ), currentDebugInfo = existingChildren, returnFiber;
5963 if ("function" === typeof newChild.then)
5964 return _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo), returnFiber = updateFromMap(
5965 existingChildren,
5966 returnFiber,
5967 newIdx,
5968 unwrapThenable(newChild),
5969 lanes
5970 ), currentDebugInfo = _prevDebugInfo7, returnFiber;
5971 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5972 return updateFromMap(
5973 existingChildren,
5974 returnFiber,
5975 newIdx,
5976 readContextDuringReconciliation(returnFiber, newChild),
5977 lanes
5978 );
5979 throwOnInvalidObjectType(returnFiber, newChild);
5980 }
5981 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5982 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5983 return null;
5984 }
5985 function warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys) {
5986 if ("object" !== typeof child || null === child) return knownKeys;
5987 switch (child.$$typeof) {
5988 case REACT_ELEMENT_TYPE:
5989 case REACT_PORTAL_TYPE:
5990 warnForMissingKey(returnFiber, workInProgress2, child);
5991 var key = child.key;
5992 if ("string" !== typeof key) break;
5993 if (null === knownKeys) {
5994 knownKeys = /* @__PURE__ */ new Set();
5995 knownKeys.add(key);
5996 break;
5997 }
5998 if (!knownKeys.has(key)) {
5999 knownKeys.add(key);
6000 break;
6001 }
6002 runWithFiberInDEV(workInProgress2, function() {
6003 console.error(
6004 "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.",
6005 key
6006 );
6007 });
6008 break;
6009 case REACT_LAZY_TYPE:
6010 child = callLazyInitInDEV(child), warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys);
6011 }
6012 return knownKeys;
6013 }
6014 function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
6015 for (var knownKeys = null, resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
6016 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
6017 var newFiber = updateSlot(
6018 returnFiber,
6019 oldFiber,
6020 newChildren[newIdx],
6021 lanes
6022 );
6023 if (null === newFiber) {
6024 null === oldFiber && (oldFiber = nextOldFiber);
6025 break;
6026 }
6027 knownKeys = warnOnInvalidKey(
6028 returnFiber,
6029 newFiber,
6030 newChildren[newIdx],
6031 knownKeys
6032 );
6033 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
6034 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
6035 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
6036 previousNewFiber = newFiber;
6037 oldFiber = nextOldFiber;
6038 }
6039 if (newIdx === newChildren.length)
6040 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
6041 if (null === oldFiber) {
6042 for (; newIdx < newChildren.length; newIdx++)
6043 oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
6044 returnFiber,
6045 oldFiber,
6046 newChildren[newIdx],
6047 knownKeys
6048 ), currentFirstChild = placeChild(
6049 oldFiber,
6050 currentFirstChild,
6051 newIdx
6052 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
6053 isHydrating && pushTreeFork(returnFiber, newIdx);
6054 return resultingFirstChild;
6055 }
6056 for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
6057 nextOldFiber = updateFromMap(
6058 oldFiber,
6059 returnFiber,
6060 newIdx,
6061 newChildren[newIdx],
6062 lanes
6063 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
6064 returnFiber,
6065 nextOldFiber,
6066 newChildren[newIdx],
6067 knownKeys
6068 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
6069 null === nextOldFiber.key ? newIdx : nextOldFiber.key
6070 ), currentFirstChild = placeChild(
6071 nextOldFiber,
6072 currentFirstChild,
6073 newIdx
6074 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
6075 shouldTrackSideEffects && oldFiber.forEach(function(child) {
6076 return deleteChild(returnFiber, child);
6077 });
6078 isHydrating && pushTreeFork(returnFiber, newIdx);
6079 return resultingFirstChild;
6080 }
6081 function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
6082 if (null == newChildren)
6083 throw Error("An iterable object provided no iterator.");
6084 for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, knownKeys = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) {
6085 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
6086 var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
6087 if (null === newFiber) {
6088 null === oldFiber && (oldFiber = nextOldFiber);
6089 break;
6090 }
6091 knownKeys = warnOnInvalidKey(
6092 returnFiber,
6093 newFiber,
6094 step.value,
6095 knownKeys
6096 );
6097 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
6098 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
6099 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
6100 previousNewFiber = newFiber;
6101 oldFiber = nextOldFiber;
6102 }
6103 if (step.done)
6104 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
6105 if (null === oldFiber) {
6106 for (; !step.done; newIdx++, step = newChildren.next())
6107 oldFiber = createChild(returnFiber, step.value, lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
6108 returnFiber,
6109 oldFiber,
6110 step.value,
6111 knownKeys
6112 ), currentFirstChild = placeChild(
6113 oldFiber,
6114 currentFirstChild,
6115 newIdx
6116 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
6117 isHydrating && pushTreeFork(returnFiber, newIdx);
6118 return resultingFirstChild;
6119 }
6120 for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
6121 nextOldFiber = updateFromMap(
6122 oldFiber,
6123 returnFiber,
6124 newIdx,
6125 step.value,
6126 lanes
6127 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
6128 returnFiber,
6129 nextOldFiber,
6130 step.value,
6131 knownKeys
6132 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
6133 null === nextOldFiber.key ? newIdx : nextOldFiber.key
6134 ), currentFirstChild = placeChild(
6135 nextOldFiber,
6136 currentFirstChild,
6137 newIdx
6138 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
6139 shouldTrackSideEffects && oldFiber.forEach(function(child) {
6140 return deleteChild(returnFiber, child);
6141 });
6142 isHydrating && pushTreeFork(returnFiber, newIdx);
6143 return resultingFirstChild;
6144 }
6145 function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
6146 "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (validateFragmentProps(newChild, null, returnFiber), newChild = newChild.props.children);
6147 if ("object" === typeof newChild && null !== newChild) {
6148 switch (newChild.$$typeof) {
6149 case REACT_ELEMENT_TYPE:
6150 var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
6151 a: {
6152 for (var key = newChild.key; null !== currentFirstChild; ) {
6153 if (currentFirstChild.key === key) {
6154 key = newChild.type;
6155 if (key === REACT_FRAGMENT_TYPE) {
6156 if (7 === currentFirstChild.tag) {
6157 deleteRemainingChildren(
6158 returnFiber,
6159 currentFirstChild.sibling
6160 );
6161 lanes = useFiber(
6162 currentFirstChild,
6163 newChild.props.children
6164 );
6165 lanes.return = returnFiber;
6166 lanes._debugOwner = newChild._owner;
6167 lanes._debugInfo = currentDebugInfo;
6168 validateFragmentProps(newChild, lanes, returnFiber);
6169 returnFiber = lanes;
6170 break a;
6171 }
6172 } else if (currentFirstChild.elementType === key || isCompatibleFamilyForHotReloading(
6173 currentFirstChild,
6174 newChild
6175 ) || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && callLazyInitInDEV(key) === currentFirstChild.type) {
6176 deleteRemainingChildren(
6177 returnFiber,
6178 currentFirstChild.sibling
6179 );
6180 lanes = useFiber(currentFirstChild, newChild.props);
6181 coerceRef(lanes, newChild);
6182 lanes.return = returnFiber;
6183 lanes._debugOwner = newChild._owner;
6184 lanes._debugInfo = currentDebugInfo;
6185 returnFiber = lanes;
6186 break a;
6187 }
6188 deleteRemainingChildren(returnFiber, currentFirstChild);
6189 break;
6190 } else deleteChild(returnFiber, currentFirstChild);
6191 currentFirstChild = currentFirstChild.sibling;
6192 }
6193 newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
6194 newChild.props.children,
6195 returnFiber.mode,
6196 lanes,
6197 newChild.key
6198 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, validateFragmentProps(newChild, lanes, returnFiber), returnFiber = lanes) : (lanes = createFiberFromElement(
6199 newChild,
6200 returnFiber.mode,
6201 lanes
6202 ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes._debugInfo = currentDebugInfo, returnFiber = lanes);
6203 }
6204 returnFiber = placeSingleChild(returnFiber);
6205 currentDebugInfo = prevDebugInfo;
6206 return returnFiber;
6207 case REACT_PORTAL_TYPE:
6208 a: {
6209 prevDebugInfo = newChild;
6210 for (newChild = prevDebugInfo.key; null !== currentFirstChild; ) {
6211 if (currentFirstChild.key === newChild)
6212 if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === prevDebugInfo.containerInfo && currentFirstChild.stateNode.implementation === prevDebugInfo.implementation) {
6213 deleteRemainingChildren(
6214 returnFiber,
6215 currentFirstChild.sibling
6216 );
6217 lanes = useFiber(
6218 currentFirstChild,
6219 prevDebugInfo.children || []
6220 );
6221 lanes.return = returnFiber;
6222 returnFiber = lanes;
6223 break a;
6224 } else {
6225 deleteRemainingChildren(returnFiber, currentFirstChild);
6226 break;
6227 }
6228 else deleteChild(returnFiber, currentFirstChild);
6229 currentFirstChild = currentFirstChild.sibling;
6230 }
6231 lanes = createFiberFromPortal(
6232 prevDebugInfo,
6233 returnFiber.mode,
6234 lanes
6235 );
6236 lanes.return = returnFiber;
6237 returnFiber = lanes;
6238 }
6239 return placeSingleChild(returnFiber);
6240 case REACT_LAZY_TYPE:
6241 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), newChild = callLazyInitInDEV(newChild), returnFiber = reconcileChildFibersImpl(
6242 returnFiber,
6243 currentFirstChild,
6244 newChild,
6245 lanes
6246 ), currentDebugInfo = prevDebugInfo, returnFiber;
6247 }
6248 if (isArrayImpl(newChild))
6249 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildrenArray(
6250 returnFiber,
6251 currentFirstChild,
6252 newChild,
6253 lanes
6254 ), currentDebugInfo = prevDebugInfo, returnFiber;
6255 if (getIteratorFn(newChild)) {
6256 prevDebugInfo = pushDebugInfo(newChild._debugInfo);
6257 key = getIteratorFn(newChild);
6258 if ("function" !== typeof key)
6259 throw Error(
6260 "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
6261 );
6262 var newChildren = key.call(newChild);
6263 if (newChildren === newChild) {
6264 if (0 !== returnFiber.tag || "[object GeneratorFunction]" !== Object.prototype.toString.call(returnFiber.type) || "[object Generator]" !== Object.prototype.toString.call(newChildren))
6265 didWarnAboutGenerators || console.error(
6266 "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
6267 ), didWarnAboutGenerators = true;
6268 } else
6269 newChild.entries !== key || didWarnAboutMaps || (console.error(
6270 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6271 ), didWarnAboutMaps = true);
6272 returnFiber = reconcileChildrenIterator(
6273 returnFiber,
6274 currentFirstChild,
6275 newChildren,
6276 lanes
6277 );
6278 currentDebugInfo = prevDebugInfo;
6279 return returnFiber;
6280 }
6281 if ("function" === typeof newChild.then)
6282 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildFibersImpl(
6283 returnFiber,
6284 currentFirstChild,
6285 unwrapThenable(newChild),
6286 lanes
6287 ), currentDebugInfo = prevDebugInfo, returnFiber;
6288 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
6289 return reconcileChildFibersImpl(
6290 returnFiber,
6291 currentFirstChild,
6292 readContextDuringReconciliation(returnFiber, newChild),
6293 lanes
6294 );
6295 throwOnInvalidObjectType(returnFiber, newChild);
6296 }
6297 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
6298 return prevDebugInfo = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(
6299 returnFiber,
6300 currentFirstChild.sibling
6301 ), lanes = useFiber(currentFirstChild, prevDebugInfo), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(
6302 prevDebugInfo,
6303 returnFiber.mode,
6304 lanes
6305 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, returnFiber = lanes), placeSingleChild(returnFiber);
6306 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
6307 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
6308 return deleteRemainingChildren(returnFiber, currentFirstChild);
6309 }
6310 return function(returnFiber, currentFirstChild, newChild, lanes) {
6311 var prevDebugInfo = currentDebugInfo;
6312 currentDebugInfo = null;
6313 try {
6314 thenableIndexCounter = 0;
6315 var firstChildFiber = reconcileChildFibersImpl(
6316 returnFiber,
6317 currentFirstChild,
6318 newChild,
6319 lanes
6320 );
6321 thenableState = null;
6322 return firstChildFiber;
6323 } catch (x) {
6324 if (x === SuspenseException || x === SuspenseActionException) throw x;
6325 var fiber = createFiber(29, x, null, returnFiber.mode);
6326 fiber.lanes = lanes;
6327 fiber.return = returnFiber;
6328 var debugInfo = fiber._debugInfo = currentDebugInfo;
6329 fiber._debugOwner = returnFiber._debugOwner;
6330 fiber._debugTask = returnFiber._debugTask;
6331 if (null != debugInfo) {
6332 for (var i = debugInfo.length - 1; 0 <= i; i--)
6333 if ("string" === typeof debugInfo[i].stack) {
6334 fiber._debugOwner = debugInfo[i];
6335 fiber._debugTask = debugInfo[i].debugTask;
6336 break;
6337 }
6338 }
6339 return fiber;
6340 } finally {
6341 currentDebugInfo = prevDebugInfo;
6342 }
6343 };
6344 }
6345 function pushPrimaryTreeSuspenseHandler(handler) {
6346 var current2 = handler.alternate;
6347 push(
6348 suspenseStackCursor,
6349 suspenseStackCursor.current & SubtreeSuspenseContextMask,
6350 handler
6351 );
6352 push(suspenseHandlerStackCursor, handler, handler);
6353 null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler));
6354 }
6355 function pushOffscreenSuspenseHandler(fiber) {
6356 if (22 === fiber.tag) {
6357 if (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), null === shellBoundary) {
6358 var current2 = fiber.alternate;
6359 null !== current2 && null !== current2.memoizedState && (shellBoundary = fiber);
6360 }
6361 } else reuseSuspenseHandlerOnStack(fiber);
6362 }
6363 function reuseSuspenseHandlerOnStack(fiber) {
6364 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
6365 push(
6366 suspenseHandlerStackCursor,
6367 suspenseHandlerStackCursor.current,
6368 fiber
6369 );
6370 }
6371 function popSuspenseHandler(fiber) {
6372 pop(suspenseHandlerStackCursor, fiber);
6373 shellBoundary === fiber && (shellBoundary = null);
6374 pop(suspenseStackCursor, fiber);
6375 }
6376 function findFirstSuspended(row) {
6377 for (var node = row; null !== node; ) {
6378 if (13 === node.tag) {
6379 var state = node.memoizedState;
6380 if (null !== state && (state = state.dehydrated, null === state || state.data === SUSPENSE_PENDING_START_DATA || isSuspenseInstanceFallback(state)))
6381 return node;
6382 } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
6383 if (0 !== (node.flags & 128)) return node;
6384 } else if (null !== node.child) {
6385 node.child.return = node;
6386 node = node.child;
6387 continue;
6388 }
6389 if (node === row) break;
6390 for (; null === node.sibling; ) {
6391 if (null === node.return || node.return === row) return null;
6392 node = node.return;
6393 }
6394 node.sibling.return = node.return;
6395 node = node.sibling;
6396 }
6397 return null;
6398 }
6399 function warnOnInvalidCallback(callback) {
6400 if (null !== callback && "function" !== typeof callback) {
6401 var key = String(callback);
6402 didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error(
6403 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
6404 callback
6405 ));
6406 }
6407 }
6408 function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
6409 var prevState = workInProgress2.memoizedState, partialState = getDerivedStateFromProps(nextProps, prevState);
6410 if (workInProgress2.mode & StrictLegacyMode) {
6411 setIsStrictModeForDevtools(true);
6412 try {
6413 partialState = getDerivedStateFromProps(nextProps, prevState);
6414 } finally {
6415 setIsStrictModeForDevtools(false);
6416 }
6417 }
6418 void 0 === partialState && (ctor = getComponentNameFromType(ctor) || "Component", didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), console.error(
6419 "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
6420 ctor
6421 )));
6422 prevState = null === partialState || void 0 === partialState ? prevState : assign({}, prevState, partialState);
6423 workInProgress2.memoizedState = prevState;
6424 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = prevState);
6425 }
6426 function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
6427 var instance = workInProgress2.stateNode;
6428 if ("function" === typeof instance.shouldComponentUpdate) {
6429 oldProps = instance.shouldComponentUpdate(
6430 newProps,
6431 newState,
6432 nextContext
6433 );
6434 if (workInProgress2.mode & StrictLegacyMode) {
6435 setIsStrictModeForDevtools(true);
6436 try {
6437 oldProps = instance.shouldComponentUpdate(
6438 newProps,
6439 newState,
6440 nextContext
6441 );
6442 } finally {
6443 setIsStrictModeForDevtools(false);
6444 }
6445 }
6446 void 0 === oldProps && console.error(
6447 "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
6448 getComponentNameFromType(ctor) || "Component"
6449 );
6450 return oldProps;
6451 }
6452 return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
6453 }
6454 function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
6455 var oldState = instance.state;
6456 "function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext);
6457 "function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
6458 instance.state !== oldState && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress2) || (didWarnAboutStateAssignmentForComponent.add(workInProgress2), console.error(
6459 "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
6460 workInProgress2
6461 )), classComponentUpdater.enqueueReplaceState(
6462 instance,
6463 instance.state,
6464 null
6465 ));
6466 }
6467 function resolveClassComponentProps(Component, baseProps) {
6468 var newProps = baseProps;
6469 if ("ref" in baseProps) {
6470 newProps = {};
6471 for (var propName in baseProps)
6472 "ref" !== propName && (newProps[propName] = baseProps[propName]);
6473 }
6474 if (Component = Component.defaultProps) {
6475 newProps === baseProps && (newProps = assign({}, newProps));
6476 for (var _propName in Component)
6477 void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
6478 }
6479 return newProps;
6480 }
6481 function defaultOnUncaughtError(error) {
6482 reportGlobalError(error);
6483 console.warn(
6484 "%s\n\n%s\n",
6485 componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components.",
6486 "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
6487 );
6488 }
6489 function defaultOnCaughtError(error) {
6490 var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component." : "The above error occurred in one of your React components.", recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + ".");
6491 if ("object" === typeof error && null !== error && "string" === typeof error.environmentName) {
6492 var JSCompiler_inline_result = error.environmentName;
6493 error = [
6494 "%o\n\n%s\n\n%s\n",
6495 error,
6496 componentNameMessage,
6497 recreateMessage
6498 ].slice(0);
6499 "string" === typeof error[0] ? error.splice(
6500 0,
6501 1,
6502 badgeFormat + error[0],
6503 badgeStyle,
6504 pad + JSCompiler_inline_result + pad,
6505 resetStyle
6506 ) : error.splice(
6507 0,
6508 0,
6509 badgeFormat,
6510 badgeStyle,
6511 pad + JSCompiler_inline_result + pad,
6512 resetStyle
6513 );
6514 error.unshift(console);
6515 JSCompiler_inline_result = bind.apply(console.error, error);
6516 JSCompiler_inline_result();
6517 } else
6518 console.error(
6519 "%o\n\n%s\n\n%s\n",
6520 error,
6521 componentNameMessage,
6522 recreateMessage
6523 );
6524 }
6525 function defaultOnRecoverableError(error) {
6526 reportGlobalError(error);
6527 }
6528 function logUncaughtError(root2, errorInfo) {
6529 try {
6530 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
6531 errorBoundaryName = null;
6532 var error = errorInfo.value;
6533 if (null !== ReactSharedInternals.actQueue)
6534 ReactSharedInternals.thrownErrors.push(error);
6535 else {
6536 var onUncaughtError = root2.onUncaughtError;
6537 onUncaughtError(error, { componentStack: errorInfo.stack });
6538 }
6539 } catch (e$5) {
6540 setTimeout(function() {
6541 throw e$5;
6542 });
6543 }
6544 }
6545 function logCaughtError(root2, boundary, errorInfo) {
6546 try {
6547 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
6548 errorBoundaryName = getComponentNameFromFiber(boundary);
6549 var onCaughtError = root2.onCaughtError;
6550 onCaughtError(errorInfo.value, {
6551 componentStack: errorInfo.stack,
6552 errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
6553 });
6554 } catch (e$6) {
6555 setTimeout(function() {
6556 throw e$6;
6557 });
6558 }
6559 }
6560 function createRootErrorUpdate(root2, errorInfo, lane) {
6561 lane = createUpdate(lane);
6562 lane.tag = CaptureUpdate;
6563 lane.payload = { element: null };
6564 lane.callback = function() {
6565 runWithFiberInDEV(errorInfo.source, logUncaughtError, root2, errorInfo);
6566 };
6567 return lane;
6568 }
6569 function createClassErrorUpdate(lane) {
6570 lane = createUpdate(lane);
6571 lane.tag = CaptureUpdate;
6572 return lane;
6573 }
6574 function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
6575 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
6576 if ("function" === typeof getDerivedStateFromError) {
6577 var error = errorInfo.value;
6578 update.payload = function() {
6579 return getDerivedStateFromError(error);
6580 };
6581 update.callback = function() {
6582 markFailedErrorBoundaryForHotReloading(fiber);
6583 runWithFiberInDEV(
6584 errorInfo.source,
6585 logCaughtError,
6586 root2,
6587 fiber,
6588 errorInfo
6589 );
6590 };
6591 }
6592 var inst = fiber.stateNode;
6593 null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
6594 markFailedErrorBoundaryForHotReloading(fiber);
6595 runWithFiberInDEV(
6596 errorInfo.source,
6597 logCaughtError,
6598 root2,
6599 fiber,
6600 errorInfo
6601 );
6602 "function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
6603 callComponentDidCatchInDEV(this, errorInfo);
6604 "function" === typeof getDerivedStateFromError || 0 === (fiber.lanes & 2) && console.error(
6605 "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
6606 getComponentNameFromFiber(fiber) || "Unknown"
6607 );
6608 });
6609 }
6610 function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
6611 sourceFiber.flags |= 32768;
6612 isDevToolsPresent && restorePendingUpdaters(root2, rootRenderLanes);
6613 if (null !== value && "object" === typeof value && "function" === typeof value.then) {
6614 returnFiber = sourceFiber.alternate;
6615 null !== returnFiber && propagateParentContextChanges(
6616 returnFiber,
6617 sourceFiber,
6618 rootRenderLanes,
6619 true
6620 );
6621 isHydrating && (didSuspendOrErrorDEV = true);
6622 sourceFiber = suspenseHandlerStackCursor.current;
6623 if (null !== sourceFiber) {
6624 switch (sourceFiber.tag) {
6625 case 13:
6626 return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root2, value, rootRenderLanes)), false;
6627 case 22:
6628 return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
6629 transitions: null,
6630 markerInstances: null,
6631 retryQueue: /* @__PURE__ */ new Set([value])
6632 }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root2, value, rootRenderLanes)), false;
6633 }
6634 throw Error(
6635 "Unexpected Suspense handler tag (" + sourceFiber.tag + "). This is a bug in React."
6636 );
6637 }
6638 attachPingListener(root2, value, rootRenderLanes);
6639 renderDidSuspendDelayIfPossible();
6640 return false;
6641 }
6642 if (isHydrating)
6643 return didSuspendOrErrorDEV = true, returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && queueHydrationError(
6644 createCapturedValueAtFiber(
6645 Error(
6646 "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
6647 { cause: value }
6648 ),
6649 sourceFiber
6650 )
6651 )) : (value !== HydrationMismatchException && queueHydrationError(
6652 createCapturedValueAtFiber(
6653 Error(
6654 "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
6655 { cause: value }
6656 ),
6657 sourceFiber
6658 )
6659 ), root2 = root2.current.alternate, root2.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root2.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
6660 root2.stateNode,
6661 value,
6662 rootRenderLanes
6663 ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
6664 var error = createCapturedValueAtFiber(
6665 Error(
6666 "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
6667 { cause: value }
6668 ),
6669 sourceFiber
6670 );
6671 null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
6672 workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
6673 if (null === returnFiber) return true;
6674 value = createCapturedValueAtFiber(value, sourceFiber);
6675 sourceFiber = returnFiber;
6676 do {
6677 switch (sourceFiber.tag) {
6678 case 3:
6679 return sourceFiber.flags |= 65536, root2 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root2, root2 = createRootErrorUpdate(
6680 sourceFiber.stateNode,
6681 value,
6682 root2
6683 ), enqueueCapturedUpdate(sourceFiber, root2), false;
6684 case 1:
6685 if (returnFiber = sourceFiber.type, error = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error && "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error))))
6686 return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
6687 rootRenderLanes,
6688 root2,
6689 sourceFiber,
6690 value
6691 ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
6692 }
6693 sourceFiber = sourceFiber.return;
6694 } while (null !== sourceFiber);
6695 return false;
6696 }
6697 function reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2) {
6698 workInProgress2.child = null === current2 ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
6699 workInProgress2,
6700 current2.child,
6701 nextChildren,
6702 renderLanes2
6703 );
6704 }
6705 function updateForwardRef(current2, workInProgress2, Component, nextProps, renderLanes2) {
6706 Component = Component.render;
6707 var ref = workInProgress2.ref;
6708 if ("ref" in nextProps) {
6709 var propsWithoutRef = {};
6710 for (var key in nextProps)
6711 "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
6712 } else propsWithoutRef = nextProps;
6713 prepareToReadContext(workInProgress2);
6714 markComponentRenderStarted(workInProgress2);
6715 nextProps = renderWithHooks(
6716 current2,
6717 workInProgress2,
6718 Component,
6719 propsWithoutRef,
6720 ref,
6721 renderLanes2
6722 );
6723 key = checkDidRenderIdHook();
6724 markComponentRenderStopped();
6725 if (null !== current2 && !didReceiveUpdate)
6726 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
6727 isHydrating && key && pushMaterializedTreeId(workInProgress2);
6728 workInProgress2.flags |= 1;
6729 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
6730 return workInProgress2.child;
6731 }
6732 function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
6733 if (null === current2) {
6734 var type = Component.type;
6735 if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
6736 return Component = resolveFunctionForHotReloading(type), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type), updateSimpleMemoComponent(
6737 current2,
6738 workInProgress2,
6739 Component,
6740 nextProps,
6741 renderLanes2
6742 );
6743 current2 = createFiberFromTypeAndProps(
6744 Component.type,
6745 null,
6746 nextProps,
6747 workInProgress2,
6748 workInProgress2.mode,
6749 renderLanes2
6750 );
6751 current2.ref = workInProgress2.ref;
6752 current2.return = workInProgress2;
6753 return workInProgress2.child = current2;
6754 }
6755 type = current2.child;
6756 if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
6757 var prevProps = type.memoizedProps;
6758 Component = Component.compare;
6759 Component = null !== Component ? Component : shallowEqual;
6760 if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
6761 return bailoutOnAlreadyFinishedWork(
6762 current2,
6763 workInProgress2,
6764 renderLanes2
6765 );
6766 }
6767 workInProgress2.flags |= 1;
6768 current2 = createWorkInProgress(type, nextProps);
6769 current2.ref = workInProgress2.ref;
6770 current2.return = workInProgress2;
6771 return workInProgress2.child = current2;
6772 }
6773 function updateSimpleMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
6774 if (null !== current2) {
6775 var prevProps = current2.memoizedProps;
6776 if (shallowEqual(prevProps, nextProps) && current2.ref === workInProgress2.ref && workInProgress2.type === current2.type)
6777 if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current2, renderLanes2))
6778 0 !== (current2.flags & 131072) && (didReceiveUpdate = true);
6779 else
6780 return workInProgress2.lanes = current2.lanes, bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
6781 }
6782 return updateFunctionComponent(
6783 current2,
6784 workInProgress2,
6785 Component,
6786 nextProps,
6787 renderLanes2
6788 );
6789 }
6790 function updateOffscreenComponent(current2, workInProgress2, renderLanes2) {
6791 var nextProps = workInProgress2.pendingProps, nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null;
6792 if ("hidden" === nextProps.mode) {
6793 if (0 !== (workInProgress2.flags & 128)) {
6794 nextProps = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
6795 if (null !== current2) {
6796 nextChildren = workInProgress2.child = current2.child;
6797 for (prevState = 0; null !== nextChildren; )
6798 prevState = prevState | nextChildren.lanes | nextChildren.childLanes, nextChildren = nextChildren.sibling;
6799 workInProgress2.childLanes = prevState & ~nextProps;
6800 } else workInProgress2.childLanes = 0, workInProgress2.child = null;
6801 return deferHiddenOffscreenComponent(
6802 current2,
6803 workInProgress2,
6804 nextProps,
6805 renderLanes2
6806 );
6807 }
6808 if (0 !== (renderLanes2 & 536870912))
6809 workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current2 && pushTransition(
6810 workInProgress2,
6811 null !== prevState ? prevState.cachePool : null
6812 ), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(workInProgress2), pushOffscreenSuspenseHandler(workInProgress2);
6813 else
6814 return workInProgress2.lanes = workInProgress2.childLanes = 536870912, deferHiddenOffscreenComponent(
6815 current2,
6816 workInProgress2,
6817 null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
6818 renderLanes2
6819 );
6820 } else
6821 null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current2 && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(workInProgress2), reuseSuspenseHandlerOnStack(workInProgress2));
6822 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
6823 return workInProgress2.child;
6824 }
6825 function deferHiddenOffscreenComponent(current2, workInProgress2, nextBaseLanes, renderLanes2) {
6826 var JSCompiler_inline_result = peekCacheFromPool();
6827 JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
6828 parent: CacheContext._currentValue,
6829 pool: JSCompiler_inline_result
6830 };
6831 workInProgress2.memoizedState = {
6832 baseLanes: nextBaseLanes,
6833 cachePool: JSCompiler_inline_result
6834 };
6835 null !== current2 && pushTransition(workInProgress2, null);
6836 reuseHiddenContextOnStack(workInProgress2);
6837 pushOffscreenSuspenseHandler(workInProgress2);
6838 null !== current2 && propagateParentContextChanges(current2, workInProgress2, renderLanes2, true);
6839 return null;
6840 }
6841 function markRef(current2, workInProgress2) {
6842 var ref = workInProgress2.ref;
6843 if (null === ref)
6844 null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816);
6845 else {
6846 if ("function" !== typeof ref && "object" !== typeof ref)
6847 throw Error(
6848 "Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
6849 );
6850 if (null === current2 || current2.ref !== ref)
6851 workInProgress2.flags |= 4194816;
6852 }
6853 }
6854 function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
6855 if (Component.prototype && "function" === typeof Component.prototype.render) {
6856 var componentName2 = getComponentNameFromType(Component) || "Unknown";
6857 didWarnAboutBadClass[componentName2] || (console.error(
6858 "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
6859 componentName2,
6860 componentName2
6861 ), didWarnAboutBadClass[componentName2] = true);
6862 }
6863 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
6864 workInProgress2,
6865 null
6866 );
6867 null === current2 && (validateFunctionComponentInDev(workInProgress2, workInProgress2.type), Component.contextTypes && (componentName2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName2] || (didWarnAboutContextTypes[componentName2] = true, console.error(
6868 "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
6869 componentName2
6870 ))));
6871 prepareToReadContext(workInProgress2);
6872 markComponentRenderStarted(workInProgress2);
6873 Component = renderWithHooks(
6874 current2,
6875 workInProgress2,
6876 Component,
6877 nextProps,
6878 void 0,
6879 renderLanes2
6880 );
6881 nextProps = checkDidRenderIdHook();
6882 markComponentRenderStopped();
6883 if (null !== current2 && !didReceiveUpdate)
6884 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
6885 isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
6886 workInProgress2.flags |= 1;
6887 reconcileChildren(current2, workInProgress2, Component, renderLanes2);
6888 return workInProgress2.child;
6889 }
6890 function replayFunctionComponent(current2, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
6891 prepareToReadContext(workInProgress2);
6892 markComponentRenderStarted(workInProgress2);
6893 hookTypesUpdateIndexDev = -1;
6894 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
6895 workInProgress2.updateQueue = null;
6896 nextProps = renderWithHooksAgain(
6897 workInProgress2,
6898 Component,
6899 nextProps,
6900 secondArg
6901 );
6902 finishRenderingHooks(current2, workInProgress2);
6903 Component = checkDidRenderIdHook();
6904 markComponentRenderStopped();
6905 if (null !== current2 && !didReceiveUpdate)
6906 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
6907 isHydrating && Component && pushMaterializedTreeId(workInProgress2);
6908 workInProgress2.flags |= 1;
6909 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
6910 return workInProgress2.child;
6911 }
6912 function updateClassComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
6913 switch (shouldErrorImpl(workInProgress2)) {
6914 case false:
6915 var _instance = workInProgress2.stateNode, state = new workInProgress2.type(
6916 workInProgress2.memoizedProps,
6917 _instance.context
6918 ).state;
6919 _instance.updater.enqueueSetState(_instance, state, null);
6920 break;
6921 case true:
6922 workInProgress2.flags |= 128;
6923 workInProgress2.flags |= 65536;
6924 _instance = Error("Simulated error coming from DevTools");
6925 var lane = renderLanes2 & -renderLanes2;
6926 workInProgress2.lanes |= lane;
6927 state = workInProgressRoot;
6928 if (null === state)
6929 throw Error(
6930 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6931 );
6932 lane = createClassErrorUpdate(lane);
6933 initializeClassErrorUpdate(
6934 lane,
6935 state,
6936 workInProgress2,
6937 createCapturedValueAtFiber(_instance, workInProgress2)
6938 );
6939 enqueueCapturedUpdate(workInProgress2, lane);
6940 }
6941 prepareToReadContext(workInProgress2);
6942 if (null === workInProgress2.stateNode) {
6943 state = emptyContextObject;
6944 _instance = Component.contextType;
6945 "contextType" in Component && null !== _instance && (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(Component) && (didWarnAboutInvalidateContextType.add(Component), lane = void 0 === _instance ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" !== typeof _instance ? " However, it is set to a " + typeof _instance + "." : _instance.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}.", console.error(
6946 "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
6947 getComponentNameFromType(Component) || "Component",
6948 lane
6949 ));
6950 "object" === typeof _instance && null !== _instance && (state = readContext(_instance));
6951 _instance = new Component(nextProps, state);
6952 if (workInProgress2.mode & StrictLegacyMode) {
6953 setIsStrictModeForDevtools(true);
6954 try {
6955 _instance = new Component(nextProps, state);
6956 } finally {
6957 setIsStrictModeForDevtools(false);
6958 }
6959 }
6960 state = workInProgress2.memoizedState = null !== _instance.state && void 0 !== _instance.state ? _instance.state : null;
6961 _instance.updater = classComponentUpdater;
6962 workInProgress2.stateNode = _instance;
6963 _instance._reactInternals = workInProgress2;
6964 _instance._reactInternalInstance = fakeInternalInstance;
6965 "function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error(
6966 "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
6967 state,
6968 null === _instance.state ? "null" : "undefined",
6969 state
6970 )));
6971 if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
6972 var foundWillUpdateName = lane = state = null;
6973 "function" === typeof _instance.componentWillMount && true !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
6974 "function" === typeof _instance.componentWillReceiveProps && true !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
6975 "function" === typeof _instance.componentWillUpdate && true !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
6976 if (null !== state || null !== lane || null !== foundWillUpdateName) {
6977 _instance = getComponentNameFromType(Component) || "Component";
6978 var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
6979 didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error(
6980 "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
6981 _instance,
6982 newApiName,
6983 null !== state ? "\n " + state : "",
6984 null !== lane ? "\n " + lane : "",
6985 null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
6986 ));
6987 }
6988 }
6989 _instance = workInProgress2.stateNode;
6990 state = getComponentNameFromType(Component) || "Component";
6991 _instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error(
6992 "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
6993 state
6994 ) : console.error(
6995 "No `render` method found on the %s instance: you may have forgotten to define `render`.",
6996 state
6997 ));
6998 !_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error(
6999 "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
7000 state
7001 );
7002 _instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error(
7003 "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
7004 state
7005 );
7006 _instance.contextType && console.error(
7007 "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
7008 state
7009 );
7010 Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error(
7011 "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
7012 state
7013 ));
7014 Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error(
7015 "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",
7016 state
7017 ));
7018 "function" === typeof _instance.componentShouldUpdate && console.error(
7019 "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
7020 state
7021 );
7022 Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error(
7023 "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
7024 getComponentNameFromType(Component) || "A pure component"
7025 );
7026 "function" === typeof _instance.componentDidUnmount && console.error(
7027 "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
7028 state
7029 );
7030 "function" === typeof _instance.componentDidReceiveProps && console.error(
7031 "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
7032 state
7033 );
7034 "function" === typeof _instance.componentWillRecieveProps && console.error(
7035 "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
7036 state
7037 );
7038 "function" === typeof _instance.UNSAFE_componentWillRecieveProps && console.error(
7039 "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
7040 state
7041 );
7042 lane = _instance.props !== nextProps;
7043 void 0 !== _instance.props && lane && console.error(
7044 "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
7045 state
7046 );
7047 _instance.defaultProps && console.error(
7048 "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
7049 state,
7050 state
7051 );
7052 "function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error(
7053 "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
7054 getComponentNameFromType(Component)
7055 ));
7056 "function" === typeof _instance.getDerivedStateFromProps && console.error(
7057 "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7058 state
7059 );
7060 "function" === typeof _instance.getDerivedStateFromError && console.error(
7061 "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7062 state
7063 );
7064 "function" === typeof Component.getSnapshotBeforeUpdate && console.error(
7065 "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
7066 state
7067 );
7068 (lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
7069 "function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error(
7070 "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
7071 state
7072 );
7073 _instance = workInProgress2.stateNode;
7074 _instance.props = nextProps;
7075 _instance.state = workInProgress2.memoizedState;
7076 _instance.refs = {};
7077 initializeUpdateQueue(workInProgress2);
7078 state = Component.contextType;
7079 _instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
7080 _instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error(
7081 "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
7082 state
7083 )));
7084 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7085 workInProgress2,
7086 _instance
7087 );
7088 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
7089 workInProgress2,
7090 _instance
7091 );
7092 _instance.state = workInProgress2.memoizedState;
7093 state = Component.getDerivedStateFromProps;
7094 "function" === typeof state && (applyDerivedStateFromProps(
7095 workInProgress2,
7096 Component,
7097 state,
7098 nextProps
7099 ), _instance.state = workInProgress2.memoizedState);
7100 "function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || (state = _instance.state, "function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && (console.error(
7101 "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
7102 getComponentNameFromFiber(workInProgress2) || "Component"
7103 ), classComponentUpdater.enqueueReplaceState(
7104 _instance,
7105 _instance.state,
7106 null
7107 )), processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress2.memoizedState);
7108 "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308);
7109 (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728);
7110 _instance = true;
7111 } else if (null === current2) {
7112 _instance = workInProgress2.stateNode;
7113 var unresolvedOldProps = workInProgress2.memoizedProps;
7114 lane = resolveClassComponentProps(Component, unresolvedOldProps);
7115 _instance.props = lane;
7116 var oldContext = _instance.context;
7117 foundWillUpdateName = Component.contextType;
7118 state = emptyContextObject;
7119 "object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
7120 newApiName = Component.getDerivedStateFromProps;
7121 foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
7122 unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
7123 foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(
7124 workInProgress2,
7125 _instance,
7126 nextProps,
7127 state
7128 );
7129 hasForceUpdate = false;
7130 var oldState = workInProgress2.memoizedState;
7131 _instance.state = oldState;
7132 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
7133 suspendIfUpdateReadFromEntangledAsyncAction();
7134 oldContext = workInProgress2.memoizedState;
7135 unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(
7136 workInProgress2,
7137 Component,
7138 newApiName,
7139 nextProps
7140 ), oldContext = workInProgress2.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(
7141 workInProgress2,
7142 Component,
7143 lane,
7144 nextProps,
7145 oldState,
7146 oldContext,
7147 state
7148 )) ? (foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || ("function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount()), "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728)) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), _instance.props = nextProps, _instance.state = oldContext, _instance.context = state, _instance = lane) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), _instance = false);
7149 } else {
7150 _instance = workInProgress2.stateNode;
7151 cloneUpdateQueue(current2, workInProgress2);
7152 state = workInProgress2.memoizedProps;
7153 foundWillUpdateName = resolveClassComponentProps(Component, state);
7154 _instance.props = foundWillUpdateName;
7155 newApiName = workInProgress2.pendingProps;
7156 oldState = _instance.context;
7157 oldContext = Component.contextType;
7158 lane = emptyContextObject;
7159 "object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
7160 unresolvedOldProps = Component.getDerivedStateFromProps;
7161 (oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(
7162 workInProgress2,
7163 _instance,
7164 nextProps,
7165 lane
7166 );
7167 hasForceUpdate = false;
7168 oldState = workInProgress2.memoizedState;
7169 _instance.state = oldState;
7170 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
7171 suspendIfUpdateReadFromEntangledAsyncAction();
7172 var newState = workInProgress2.memoizedState;
7173 state !== newApiName || oldState !== newState || hasForceUpdate || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
7174 workInProgress2,
7175 Component,
7176 unresolvedOldProps,
7177 nextProps
7178 ), newState = workInProgress2.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(
7179 workInProgress2,
7180 Component,
7181 foundWillUpdateName,
7182 nextProps,
7183 oldState,
7184 newState,
7185 lane
7186 ) || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies)) ? (oldContext || "function" !== typeof _instance.UNSAFE_componentWillUpdate && "function" !== typeof _instance.componentWillUpdate || ("function" === typeof _instance.componentWillUpdate && _instance.componentWillUpdate(nextProps, newState, lane), "function" === typeof _instance.UNSAFE_componentWillUpdate && _instance.UNSAFE_componentWillUpdate(
7187 nextProps,
7188 newState,
7189 lane
7190 )), "function" === typeof _instance.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof _instance.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), _instance.props = nextProps, _instance.state = newState, _instance.context = lane, _instance = foundWillUpdateName) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), _instance = false);
7191 }
7192 lane = _instance;
7193 markRef(current2, workInProgress2);
7194 state = 0 !== (workInProgress2.flags & 128);
7195 if (lane || state) {
7196 lane = workInProgress2.stateNode;
7197 setCurrentFiber(workInProgress2);
7198 if (state && "function" !== typeof Component.getDerivedStateFromError)
7199 Component = null, profilerStartTime = -1;
7200 else {
7201 markComponentRenderStarted(workInProgress2);
7202 Component = callRenderInDEV(lane);
7203 if (workInProgress2.mode & StrictLegacyMode) {
7204 setIsStrictModeForDevtools(true);
7205 try {
7206 callRenderInDEV(lane);
7207 } finally {
7208 setIsStrictModeForDevtools(false);
7209 }
7210 }
7211 markComponentRenderStopped();
7212 }
7213 workInProgress2.flags |= 1;
7214 null !== current2 && state ? (workInProgress2.child = reconcileChildFibers(
7215 workInProgress2,
7216 current2.child,
7217 null,
7218 renderLanes2
7219 ), workInProgress2.child = reconcileChildFibers(
7220 workInProgress2,
7221 null,
7222 Component,
7223 renderLanes2
7224 )) : reconcileChildren(current2, workInProgress2, Component, renderLanes2);
7225 workInProgress2.memoizedState = lane.state;
7226 current2 = workInProgress2.child;
7227 } else
7228 current2 = bailoutOnAlreadyFinishedWork(
7229 current2,
7230 workInProgress2,
7231 renderLanes2
7232 );
7233 renderLanes2 = workInProgress2.stateNode;
7234 _instance && renderLanes2.props !== nextProps && (didWarnAboutReassigningProps || console.error(
7235 "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
7236 getComponentNameFromFiber(workInProgress2) || "a component"
7237 ), didWarnAboutReassigningProps = true);
7238 return current2;
7239 }
7240 function mountHostRootWithoutHydrating(current2, workInProgress2, nextChildren, renderLanes2) {
7241 resetHydrationState();
7242 workInProgress2.flags |= 256;
7243 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
7244 return workInProgress2.child;
7245 }
7246 function validateFunctionComponentInDev(workInProgress2, Component) {
7247 Component && Component.childContextTypes && console.error(
7248 "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
7249 Component.displayName || Component.name || "Component"
7250 );
7251 "function" === typeof Component.getDerivedStateFromProps && (workInProgress2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] || (console.error(
7252 "%s: Function components do not support getDerivedStateFromProps.",
7253 workInProgress2
7254 ), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] = true));
7255 "object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error(
7256 "%s: Function components do not support contextType.",
7257 Component
7258 ), didWarnAboutContextTypeOnFunctionComponent[Component] = true));
7259 }
7260 function mountSuspenseOffscreenState(renderLanes2) {
7261 return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
7262 }
7263 function getRemainingWorkInPrimaryTree(current2, primaryTreeDidDefer, renderLanes2) {
7264 current2 = null !== current2 ? current2.childLanes & ~renderLanes2 : 0;
7265 primaryTreeDidDefer && (current2 |= workInProgressDeferredLane);
7266 return current2;
7267 }
7268 function updateSuspenseComponent(current2, workInProgress2, renderLanes2) {
7269 var JSCompiler_object_inline_digest_2451;
7270 var JSCompiler_object_inline_stack_2452 = workInProgress2.pendingProps;
7271 shouldSuspendImpl(workInProgress2) && (workInProgress2.flags |= 128);
7272 var JSCompiler_object_inline_componentStack_2453 = false;
7273 var didSuspend = 0 !== (workInProgress2.flags & 128);
7274 (JSCompiler_object_inline_digest_2451 = didSuspend) || (JSCompiler_object_inline_digest_2451 = null !== current2 && null === current2.memoizedState ? false : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
7275 JSCompiler_object_inline_digest_2451 && (JSCompiler_object_inline_componentStack_2453 = true, workInProgress2.flags &= -129);
7276 JSCompiler_object_inline_digest_2451 = 0 !== (workInProgress2.flags & 32);
7277 workInProgress2.flags &= -33;
7278 if (null === current2) {
7279 if (isHydrating) {
7280 JSCompiler_object_inline_componentStack_2453 ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
7281 if (isHydrating) {
7282 var JSCompiler_object_inline_message_2450 = nextHydratableInstance;
7283 var JSCompiler_temp;
7284 if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2450)) {
7285 c: {
7286 var instance = JSCompiler_object_inline_message_2450;
7287 for (JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; ) {
7288 if (!JSCompiler_temp) {
7289 JSCompiler_temp = null;
7290 break c;
7291 }
7292 instance = getNextHydratable(instance.nextSibling);
7293 if (null === instance) {
7294 JSCompiler_temp = null;
7295 break c;
7296 }
7297 }
7298 JSCompiler_temp = instance;
7299 }
7300 null !== JSCompiler_temp ? (warnIfNotHydrating(), workInProgress2.memoizedState = {
7301 dehydrated: JSCompiler_temp,
7302 treeContext: null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null,
7303 retryLane: 536870912,
7304 hydrationErrors: null
7305 }, instance = createFiber(18, null, null, NoMode), instance.stateNode = JSCompiler_temp, instance.return = workInProgress2, workInProgress2.child = instance, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, JSCompiler_temp = true) : JSCompiler_temp = false;
7306 JSCompiler_temp = !JSCompiler_temp;
7307 }
7308 JSCompiler_temp && (warnNonHydratedInstance(
7309 workInProgress2,
7310 JSCompiler_object_inline_message_2450
7311 ), throwOnHydrationMismatch(workInProgress2));
7312 }
7313 JSCompiler_object_inline_message_2450 = workInProgress2.memoizedState;
7314 if (null !== JSCompiler_object_inline_message_2450 && (JSCompiler_object_inline_message_2450 = JSCompiler_object_inline_message_2450.dehydrated, null !== JSCompiler_object_inline_message_2450))
7315 return isSuspenseInstanceFallback(JSCompiler_object_inline_message_2450) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912, null;
7316 popSuspenseHandler(workInProgress2);
7317 }
7318 JSCompiler_object_inline_message_2450 = JSCompiler_object_inline_stack_2452.children;
7319 JSCompiler_object_inline_stack_2452 = JSCompiler_object_inline_stack_2452.fallback;
7320 if (JSCompiler_object_inline_componentStack_2453)
7321 return reuseSuspenseHandlerOnStack(workInProgress2), JSCompiler_object_inline_componentStack_2453 = workInProgress2.mode, JSCompiler_object_inline_message_2450 = mountWorkInProgressOffscreenFiber(
7322 {
7323 mode: "hidden",
7324 children: JSCompiler_object_inline_message_2450
7325 },
7326 JSCompiler_object_inline_componentStack_2453
7327 ), JSCompiler_object_inline_stack_2452 = createFiberFromFragment(
7328 JSCompiler_object_inline_stack_2452,
7329 JSCompiler_object_inline_componentStack_2453,
7330 renderLanes2,
7331 null
7332 ), JSCompiler_object_inline_message_2450.return = workInProgress2, JSCompiler_object_inline_stack_2452.return = workInProgress2, JSCompiler_object_inline_message_2450.sibling = JSCompiler_object_inline_stack_2452, workInProgress2.child = JSCompiler_object_inline_message_2450, JSCompiler_object_inline_componentStack_2453 = workInProgress2.child, JSCompiler_object_inline_componentStack_2453.memoizedState = mountSuspenseOffscreenState(renderLanes2), JSCompiler_object_inline_componentStack_2453.childLanes = getRemainingWorkInPrimaryTree(
7333 current2,
7334 JSCompiler_object_inline_digest_2451,
7335 renderLanes2
7336 ), workInProgress2.memoizedState = SUSPENDED_MARKER, JSCompiler_object_inline_stack_2452;
7337 pushPrimaryTreeSuspenseHandler(workInProgress2);
7338 return mountSuspensePrimaryChildren(
7339 workInProgress2,
7340 JSCompiler_object_inline_message_2450
7341 );
7342 }
7343 var prevState = current2.memoizedState;
7344 if (null !== prevState && (JSCompiler_object_inline_message_2450 = prevState.dehydrated, null !== JSCompiler_object_inline_message_2450)) {
7345 if (didSuspend)
7346 workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
7347 current2,
7348 workInProgress2,
7349 renderLanes2
7350 )) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), JSCompiler_object_inline_componentStack_2453 = JSCompiler_object_inline_stack_2452.fallback, JSCompiler_object_inline_message_2450 = workInProgress2.mode, JSCompiler_object_inline_stack_2452 = mountWorkInProgressOffscreenFiber(
7351 {
7352 mode: "visible",
7353 children: JSCompiler_object_inline_stack_2452.children
7354 },
7355 JSCompiler_object_inline_message_2450
7356 ), JSCompiler_object_inline_componentStack_2453 = createFiberFromFragment(
7357 JSCompiler_object_inline_componentStack_2453,
7358 JSCompiler_object_inline_message_2450,
7359 renderLanes2,
7360 null
7361 ), JSCompiler_object_inline_componentStack_2453.flags |= 2, JSCompiler_object_inline_stack_2452.return = workInProgress2, JSCompiler_object_inline_componentStack_2453.return = workInProgress2, JSCompiler_object_inline_stack_2452.sibling = JSCompiler_object_inline_componentStack_2453, workInProgress2.child = JSCompiler_object_inline_stack_2452, reconcileChildFibers(
7362 workInProgress2,
7363 current2.child,
7364 null,
7365 renderLanes2
7366 ), JSCompiler_object_inline_stack_2452 = workInProgress2.child, JSCompiler_object_inline_stack_2452.memoizedState = mountSuspenseOffscreenState(renderLanes2), JSCompiler_object_inline_stack_2452.childLanes = getRemainingWorkInPrimaryTree(
7367 current2,
7368 JSCompiler_object_inline_digest_2451,
7369 renderLanes2
7370 ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = JSCompiler_object_inline_componentStack_2453);
7371 else if (pushPrimaryTreeSuspenseHandler(workInProgress2), isHydrating && console.error(
7372 "We should not be hydrating here. This is a bug in React. Please file a bug."
7373 ), isSuspenseInstanceFallback(JSCompiler_object_inline_message_2450)) {
7374 JSCompiler_object_inline_digest_2451 = JSCompiler_object_inline_message_2450.nextSibling && JSCompiler_object_inline_message_2450.nextSibling.dataset;
7375 if (JSCompiler_object_inline_digest_2451) {
7376 JSCompiler_temp = JSCompiler_object_inline_digest_2451.dgst;
7377 var message = JSCompiler_object_inline_digest_2451.msg;
7378 instance = JSCompiler_object_inline_digest_2451.stck;
7379 var componentStack = JSCompiler_object_inline_digest_2451.cstck;
7380 }
7381 JSCompiler_object_inline_message_2450 = message;
7382 JSCompiler_object_inline_digest_2451 = JSCompiler_temp;
7383 JSCompiler_object_inline_stack_2452 = instance;
7384 JSCompiler_temp = JSCompiler_object_inline_componentStack_2453 = componentStack;
7385 JSCompiler_object_inline_componentStack_2453 = JSCompiler_object_inline_message_2450 ? Error(JSCompiler_object_inline_message_2450) : Error(
7386 "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
7387 );
7388 JSCompiler_object_inline_componentStack_2453.stack = JSCompiler_object_inline_stack_2452 || "";
7389 JSCompiler_object_inline_componentStack_2453.digest = JSCompiler_object_inline_digest_2451;
7390 JSCompiler_object_inline_digest_2451 = void 0 === JSCompiler_temp ? null : JSCompiler_temp;
7391 JSCompiler_object_inline_stack_2452 = {
7392 value: JSCompiler_object_inline_componentStack_2453,
7393 source: null,
7394 stack: JSCompiler_object_inline_digest_2451
7395 };
7396 "string" === typeof JSCompiler_object_inline_digest_2451 && CapturedStacks.set(
7397 JSCompiler_object_inline_componentStack_2453,
7398 JSCompiler_object_inline_stack_2452
7399 );
7400 queueHydrationError(JSCompiler_object_inline_stack_2452);
7401 workInProgress2 = retrySuspenseComponentWithoutHydrating(
7402 current2,
7403 workInProgress2,
7404 renderLanes2
7405 );
7406 } else if (didReceiveUpdate || propagateParentContextChanges(
7407 current2,
7408 workInProgress2,
7409 renderLanes2,
7410 false
7411 ), JSCompiler_object_inline_digest_2451 = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_object_inline_digest_2451) {
7412 JSCompiler_object_inline_digest_2451 = workInProgressRoot;
7413 if (null !== JSCompiler_object_inline_digest_2451 && (JSCompiler_object_inline_stack_2452 = renderLanes2 & -renderLanes2, JSCompiler_object_inline_stack_2452 = 0 !== (JSCompiler_object_inline_stack_2452 & 42) ? 1 : getBumpedLaneForHydrationByLane(
7414 JSCompiler_object_inline_stack_2452
7415 ), JSCompiler_object_inline_stack_2452 = 0 !== (JSCompiler_object_inline_stack_2452 & (JSCompiler_object_inline_digest_2451.suspendedLanes | renderLanes2)) ? 0 : JSCompiler_object_inline_stack_2452, 0 !== JSCompiler_object_inline_stack_2452 && JSCompiler_object_inline_stack_2452 !== prevState.retryLane))
7416 throw prevState.retryLane = JSCompiler_object_inline_stack_2452, enqueueConcurrentRenderForLane(
7417 current2,
7418 JSCompiler_object_inline_stack_2452
7419 ), scheduleUpdateOnFiber(
7420 JSCompiler_object_inline_digest_2451,
7421 current2,
7422 JSCompiler_object_inline_stack_2452
7423 ), SelectiveHydrationException;
7424 JSCompiler_object_inline_message_2450.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
7425 workInProgress2 = retrySuspenseComponentWithoutHydrating(
7426 current2,
7427 workInProgress2,
7428 renderLanes2
7429 );
7430 } else
7431 JSCompiler_object_inline_message_2450.data === SUSPENSE_PENDING_START_DATA ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
7432 JSCompiler_object_inline_message_2450.nextSibling
7433 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && (warnIfNotHydrating(), idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = current2.id, treeContextOverflow = current2.overflow, treeContextProvider = workInProgress2), workInProgress2 = mountSuspensePrimaryChildren(
7434 workInProgress2,
7435 JSCompiler_object_inline_stack_2452.children
7436 ), workInProgress2.flags |= 4096);
7437 return workInProgress2;
7438 }
7439 if (JSCompiler_object_inline_componentStack_2453)
7440 return reuseSuspenseHandlerOnStack(workInProgress2), JSCompiler_object_inline_componentStack_2453 = JSCompiler_object_inline_stack_2452.fallback, JSCompiler_object_inline_message_2450 = workInProgress2.mode, JSCompiler_temp = current2.child, instance = JSCompiler_temp.sibling, JSCompiler_object_inline_stack_2452 = createWorkInProgress(
7441 JSCompiler_temp,
7442 {
7443 mode: "hidden",
7444 children: JSCompiler_object_inline_stack_2452.children
7445 }
7446 ), JSCompiler_object_inline_stack_2452.subtreeFlags = JSCompiler_temp.subtreeFlags & 65011712, null !== instance ? JSCompiler_object_inline_componentStack_2453 = createWorkInProgress(
7447 instance,
7448 JSCompiler_object_inline_componentStack_2453
7449 ) : (JSCompiler_object_inline_componentStack_2453 = createFiberFromFragment(
7450 JSCompiler_object_inline_componentStack_2453,
7451 JSCompiler_object_inline_message_2450,
7452 renderLanes2,
7453 null
7454 ), JSCompiler_object_inline_componentStack_2453.flags |= 2), JSCompiler_object_inline_componentStack_2453.return = workInProgress2, JSCompiler_object_inline_stack_2452.return = workInProgress2, JSCompiler_object_inline_stack_2452.sibling = JSCompiler_object_inline_componentStack_2453, workInProgress2.child = JSCompiler_object_inline_stack_2452, JSCompiler_object_inline_stack_2452 = JSCompiler_object_inline_componentStack_2453, JSCompiler_object_inline_componentStack_2453 = workInProgress2.child, JSCompiler_object_inline_message_2450 = current2.child.memoizedState, null === JSCompiler_object_inline_message_2450 ? JSCompiler_object_inline_message_2450 = mountSuspenseOffscreenState(renderLanes2) : (JSCompiler_temp = JSCompiler_object_inline_message_2450.cachePool, null !== JSCompiler_temp ? (instance = CacheContext._currentValue, JSCompiler_temp = JSCompiler_temp.parent !== instance ? { parent: instance, pool: instance } : JSCompiler_temp) : JSCompiler_temp = getSuspendedCache(), JSCompiler_object_inline_message_2450 = {
7455 baseLanes: JSCompiler_object_inline_message_2450.baseLanes | renderLanes2,
7456 cachePool: JSCompiler_temp
7457 }), JSCompiler_object_inline_componentStack_2453.memoizedState = JSCompiler_object_inline_message_2450, JSCompiler_object_inline_componentStack_2453.childLanes = getRemainingWorkInPrimaryTree(
7458 current2,
7459 JSCompiler_object_inline_digest_2451,
7460 renderLanes2
7461 ), workInProgress2.memoizedState = SUSPENDED_MARKER, JSCompiler_object_inline_stack_2452;
7462 pushPrimaryTreeSuspenseHandler(workInProgress2);
7463 renderLanes2 = current2.child;
7464 current2 = renderLanes2.sibling;
7465 renderLanes2 = createWorkInProgress(renderLanes2, {
7466 mode: "visible",
7467 children: JSCompiler_object_inline_stack_2452.children
7468 });
7469 renderLanes2.return = workInProgress2;
7470 renderLanes2.sibling = null;
7471 null !== current2 && (JSCompiler_object_inline_digest_2451 = workInProgress2.deletions, null === JSCompiler_object_inline_digest_2451 ? (workInProgress2.deletions = [current2], workInProgress2.flags |= 16) : JSCompiler_object_inline_digest_2451.push(current2));
7472 workInProgress2.child = renderLanes2;
7473 workInProgress2.memoizedState = null;
7474 return renderLanes2;
7475 }
7476 function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
7477 primaryChildren = mountWorkInProgressOffscreenFiber(
7478 { mode: "visible", children: primaryChildren },
7479 workInProgress2.mode
7480 );
7481 primaryChildren.return = workInProgress2;
7482 return workInProgress2.child = primaryChildren;
7483 }
7484 function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
7485 offscreenProps = createFiber(22, offscreenProps, null, mode);
7486 offscreenProps.lanes = 0;
7487 offscreenProps.stateNode = {
7488 _visibility: OffscreenVisible,
7489 _pendingMarkers: null,
7490 _retryCache: null,
7491 _transitions: null
7492 };
7493 return offscreenProps;
7494 }
7495 function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
7496 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
7497 current2 = mountSuspensePrimaryChildren(
7498 workInProgress2,
7499 workInProgress2.pendingProps.children
7500 );
7501 current2.flags |= 2;
7502 workInProgress2.memoizedState = null;
7503 return current2;
7504 }
7505 function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
7506 fiber.lanes |= renderLanes2;
7507 var alternate = fiber.alternate;
7508 null !== alternate && (alternate.lanes |= renderLanes2);
7509 scheduleContextWorkOnParentPath(
7510 fiber.return,
7511 renderLanes2,
7512 propagationRoot
7513 );
7514 }
7515 function validateSuspenseListNestedChild(childSlot, index) {
7516 var isAnArray = isArrayImpl(childSlot);
7517 childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
7518 return isAnArray || childSlot ? (isAnArray = isAnArray ? "array" : "iterable", console.error(
7519 "A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",
7520 isAnArray,
7521 index,
7522 isAnArray
7523 ), false) : true;
7524 }
7525 function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode) {
7526 var renderState = workInProgress2.memoizedState;
7527 null === renderState ? workInProgress2.memoizedState = {
7528 isBackwards,
7529 rendering: null,
7530 renderingStartTime: 0,
7531 last: lastContentRow,
7532 tail,
7533 tailMode
7534 } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode);
7535 }
7536 function updateSuspenseListComponent(current2, workInProgress2, renderLanes2) {
7537 var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail;
7538 nextProps = nextProps.children;
7539 if (void 0 !== revealOrder && "forwards" !== revealOrder && "backwards" !== revealOrder && "together" !== revealOrder && !didWarnAboutRevealOrder[revealOrder])
7540 if (didWarnAboutRevealOrder[revealOrder] = true, "string" === typeof revealOrder)
7541 switch (revealOrder.toLowerCase()) {
7542 case "together":
7543 case "forwards":
7544 case "backwards":
7545 console.error(
7546 '"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
7547 revealOrder,
7548 revealOrder.toLowerCase()
7549 );
7550 break;
7551 case "forward":
7552 case "backward":
7553 console.error(
7554 '"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
7555 revealOrder,
7556 revealOrder.toLowerCase()
7557 );
7558 break;
7559 default:
7560 console.error(
7561 '"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',
7562 revealOrder
7563 );
7564 }
7565 else
7566 console.error(
7567 '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',
7568 revealOrder
7569 );
7570 void 0 === tailMode || didWarnAboutTailOptions[tailMode] || ("collapsed" !== tailMode && "hidden" !== tailMode ? (didWarnAboutTailOptions[tailMode] = true, console.error(
7571 '"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',
7572 tailMode
7573 )) : "forwards" !== revealOrder && "backwards" !== revealOrder && (didWarnAboutTailOptions[tailMode] = true, console.error(
7574 '<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
7575 tailMode
7576 )));
7577 a: if (("forwards" === revealOrder || "backwards" === revealOrder) && void 0 !== nextProps && null !== nextProps && false !== nextProps)
7578 if (isArrayImpl(nextProps))
7579 for (var i = 0; i < nextProps.length; i++) {
7580 if (!validateSuspenseListNestedChild(nextProps[i], i)) break a;
7581 }
7582 else if (i = getIteratorFn(nextProps), "function" === typeof i) {
7583 if (i = i.call(nextProps))
7584 for (var step = i.next(), _i = 0; !step.done; step = i.next()) {
7585 if (!validateSuspenseListNestedChild(step.value, _i)) break a;
7586 _i++;
7587 }
7588 } else
7589 console.error(
7590 'A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',
7591 revealOrder
7592 );
7593 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7594 nextProps = suspenseStackCursor.current;
7595 if (0 !== (nextProps & ForceSuspenseFallback))
7596 nextProps = nextProps & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress2.flags |= 128;
7597 else {
7598 if (null !== current2 && 0 !== (current2.flags & 128))
7599 a: for (current2 = workInProgress2.child; null !== current2; ) {
7600 if (13 === current2.tag)
7601 null !== current2.memoizedState && scheduleSuspenseWorkOnFiber(
7602 current2,
7603 renderLanes2,
7604 workInProgress2
7605 );
7606 else if (19 === current2.tag)
7607 scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
7608 else if (null !== current2.child) {
7609 current2.child.return = current2;
7610 current2 = current2.child;
7611 continue;
7612 }
7613 if (current2 === workInProgress2) break a;
7614 for (; null === current2.sibling; ) {
7615 if (null === current2.return || current2.return === workInProgress2)
7616 break a;
7617 current2 = current2.return;
7618 }
7619 current2.sibling.return = current2.return;
7620 current2 = current2.sibling;
7621 }
7622 nextProps &= SubtreeSuspenseContextMask;
7623 }
7624 push(suspenseStackCursor, nextProps, workInProgress2);
7625 switch (revealOrder) {
7626 case "forwards":
7627 renderLanes2 = workInProgress2.child;
7628 for (revealOrder = null; null !== renderLanes2; )
7629 current2 = renderLanes2.alternate, null !== current2 && null === findFirstSuspended(current2) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
7630 renderLanes2 = revealOrder;
7631 null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
7632 initSuspenseListRenderState(
7633 workInProgress2,
7634 false,
7635 revealOrder,
7636 renderLanes2,
7637 tailMode
7638 );
7639 break;
7640 case "backwards":
7641 renderLanes2 = null;
7642 revealOrder = workInProgress2.child;
7643 for (workInProgress2.child = null; null !== revealOrder; ) {
7644 current2 = revealOrder.alternate;
7645 if (null !== current2 && null === findFirstSuspended(current2)) {
7646 workInProgress2.child = revealOrder;
7647 break;
7648 }
7649 current2 = revealOrder.sibling;
7650 revealOrder.sibling = renderLanes2;
7651 renderLanes2 = revealOrder;
7652 revealOrder = current2;
7653 }
7654 initSuspenseListRenderState(
7655 workInProgress2,
7656 true,
7657 renderLanes2,
7658 null,
7659 tailMode
7660 );
7661 break;
7662 case "together":
7663 initSuspenseListRenderState(workInProgress2, false, null, null, void 0);
7664 break;
7665 default:
7666 workInProgress2.memoizedState = null;
7667 }
7668 return workInProgress2.child;
7669 }
7670 function bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2) {
7671 null !== current2 && (workInProgress2.dependencies = current2.dependencies);
7672 profilerStartTime = -1;
7673 workInProgressRootSkippedLanes |= workInProgress2.lanes;
7674 if (0 === (renderLanes2 & workInProgress2.childLanes))
7675 if (null !== current2) {
7676 if (propagateParentContextChanges(
7677 current2,
7678 workInProgress2,
7679 renderLanes2,
7680 false
7681 ), 0 === (renderLanes2 & workInProgress2.childLanes))
7682 return null;
7683 } else return null;
7684 if (null !== current2 && workInProgress2.child !== current2.child)
7685 throw Error("Resuming work not yet implemented.");
7686 if (null !== workInProgress2.child) {
7687 current2 = workInProgress2.child;
7688 renderLanes2 = createWorkInProgress(current2, current2.pendingProps);
7689 workInProgress2.child = renderLanes2;
7690 for (renderLanes2.return = workInProgress2; null !== current2.sibling; )
7691 current2 = current2.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current2, current2.pendingProps), renderLanes2.return = workInProgress2;
7692 renderLanes2.sibling = null;
7693 }
7694 return workInProgress2.child;
7695 }
7696 function checkScheduledUpdateOrContext(current2, renderLanes2) {
7697 if (0 !== (current2.lanes & renderLanes2)) return true;
7698 current2 = current2.dependencies;
7699 return null !== current2 && checkIfContextChanged(current2) ? true : false;
7700 }
7701 function attemptEarlyBailoutIfNoScheduledUpdate(current2, workInProgress2, renderLanes2) {
7702 switch (workInProgress2.tag) {
7703 case 3:
7704 pushHostContainer(
7705 workInProgress2,
7706 workInProgress2.stateNode.containerInfo
7707 );
7708 pushProvider(
7709 workInProgress2,
7710 CacheContext,
7711 current2.memoizedState.cache
7712 );
7713 resetHydrationState();
7714 break;
7715 case 27:
7716 case 5:
7717 pushHostContext(workInProgress2);
7718 break;
7719 case 4:
7720 pushHostContainer(
7721 workInProgress2,
7722 workInProgress2.stateNode.containerInfo
7723 );
7724 break;
7725 case 10:
7726 pushProvider(
7727 workInProgress2,
7728 workInProgress2.type,
7729 workInProgress2.memoizedProps.value
7730 );
7731 break;
7732 case 12:
7733 0 !== (renderLanes2 & workInProgress2.childLanes) && (workInProgress2.flags |= 4);
7734 workInProgress2.flags |= 2048;
7735 var stateNode = workInProgress2.stateNode;
7736 stateNode.effectDuration = -0;
7737 stateNode.passiveEffectDuration = -0;
7738 break;
7739 case 13:
7740 stateNode = workInProgress2.memoizedState;
7741 if (null !== stateNode) {
7742 if (null !== stateNode.dehydrated)
7743 return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
7744 if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
7745 return updateSuspenseComponent(
7746 current2,
7747 workInProgress2,
7748 renderLanes2
7749 );
7750 pushPrimaryTreeSuspenseHandler(workInProgress2);
7751 current2 = bailoutOnAlreadyFinishedWork(
7752 current2,
7753 workInProgress2,
7754 renderLanes2
7755 );
7756 return null !== current2 ? current2.sibling : null;
7757 }
7758 pushPrimaryTreeSuspenseHandler(workInProgress2);
7759 break;
7760 case 19:
7761 var didSuspendBefore = 0 !== (current2.flags & 128);
7762 stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes);
7763 stateNode || (propagateParentContextChanges(
7764 current2,
7765 workInProgress2,
7766 renderLanes2,
7767 false
7768 ), stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes));
7769 if (didSuspendBefore) {
7770 if (stateNode)
7771 return updateSuspenseListComponent(
7772 current2,
7773 workInProgress2,
7774 renderLanes2
7775 );
7776 workInProgress2.flags |= 128;
7777 }
7778 didSuspendBefore = workInProgress2.memoizedState;
7779 null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
7780 push(
7781 suspenseStackCursor,
7782 suspenseStackCursor.current,
7783 workInProgress2
7784 );
7785 if (stateNode) break;
7786 else return null;
7787 case 22:
7788 case 23:
7789 return workInProgress2.lanes = 0, updateOffscreenComponent(current2, workInProgress2, renderLanes2);
7790 case 24:
7791 pushProvider(
7792 workInProgress2,
7793 CacheContext,
7794 current2.memoizedState.cache
7795 );
7796 }
7797 return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7798 }
7799 function beginWork(current2, workInProgress2, renderLanes2) {
7800 if (workInProgress2._debugNeedsRemount && null !== current2) {
7801 renderLanes2 = createFiberFromTypeAndProps(
7802 workInProgress2.type,
7803 workInProgress2.key,
7804 workInProgress2.pendingProps,
7805 workInProgress2._debugOwner || null,
7806 workInProgress2.mode,
7807 workInProgress2.lanes
7808 );
7809 renderLanes2._debugStack = workInProgress2._debugStack;
7810 renderLanes2._debugTask = workInProgress2._debugTask;
7811 var returnFiber = workInProgress2.return;
7812 if (null === returnFiber) throw Error("Cannot swap the root fiber.");
7813 current2.alternate = null;
7814 workInProgress2.alternate = null;
7815 renderLanes2.index = workInProgress2.index;
7816 renderLanes2.sibling = workInProgress2.sibling;
7817 renderLanes2.return = workInProgress2.return;
7818 renderLanes2.ref = workInProgress2.ref;
7819 renderLanes2._debugInfo = workInProgress2._debugInfo;
7820 if (workInProgress2 === returnFiber.child)
7821 returnFiber.child = renderLanes2;
7822 else {
7823 var prevSibling = returnFiber.child;
7824 if (null === prevSibling)
7825 throw Error("Expected parent to have a child.");
7826 for (; prevSibling.sibling !== workInProgress2; )
7827 if (prevSibling = prevSibling.sibling, null === prevSibling)
7828 throw Error("Expected to find the previous sibling.");
7829 prevSibling.sibling = renderLanes2;
7830 }
7831 workInProgress2 = returnFiber.deletions;
7832 null === workInProgress2 ? (returnFiber.deletions = [current2], returnFiber.flags |= 16) : workInProgress2.push(current2);
7833 renderLanes2.flags |= 2;
7834 return renderLanes2;
7835 }
7836 if (null !== current2)
7837 if (current2.memoizedProps !== workInProgress2.pendingProps || workInProgress2.type !== current2.type)
7838 didReceiveUpdate = true;
7839 else {
7840 if (!checkScheduledUpdateOrContext(current2, renderLanes2) && 0 === (workInProgress2.flags & 128))
7841 return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
7842 current2,
7843 workInProgress2,
7844 renderLanes2
7845 );
7846 didReceiveUpdate = 0 !== (current2.flags & 131072) ? true : false;
7847 }
7848 else {
7849 didReceiveUpdate = false;
7850 if (returnFiber = isHydrating)
7851 warnIfNotHydrating(), returnFiber = 0 !== (workInProgress2.flags & 1048576);
7852 returnFiber && (returnFiber = workInProgress2.index, warnIfNotHydrating(), pushTreeId(workInProgress2, treeForkCount, returnFiber));
7853 }
7854 workInProgress2.lanes = 0;
7855 switch (workInProgress2.tag) {
7856 case 16:
7857 a: if (returnFiber = workInProgress2.pendingProps, current2 = callLazyInitInDEV(workInProgress2.elementType), workInProgress2.type = current2, "function" === typeof current2)
7858 shouldConstruct(current2) ? (returnFiber = resolveClassComponentProps(
7859 current2,
7860 returnFiber
7861 ), workInProgress2.tag = 1, workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateClassComponent(
7862 null,
7863 workInProgress2,
7864 current2,
7865 returnFiber,
7866 renderLanes2
7867 )) : (workInProgress2.tag = 0, validateFunctionComponentInDev(workInProgress2, current2), workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateFunctionComponent(
7868 null,
7869 workInProgress2,
7870 current2,
7871 returnFiber,
7872 renderLanes2
7873 ));
7874 else {
7875 if (void 0 !== current2 && null !== current2) {
7876 if (prevSibling = current2.$$typeof, prevSibling === REACT_FORWARD_REF_TYPE) {
7877 workInProgress2.tag = 11;
7878 workInProgress2.type = current2 = resolveForwardRefForHotReloading(current2);
7879 workInProgress2 = updateForwardRef(
7880 null,
7881 workInProgress2,
7882 current2,
7883 returnFiber,
7884 renderLanes2
7885 );
7886 break a;
7887 } else if (prevSibling === REACT_MEMO_TYPE) {
7888 workInProgress2.tag = 14;
7889 workInProgress2 = updateMemoComponent(
7890 null,
7891 workInProgress2,
7892 current2,
7893 returnFiber,
7894 renderLanes2
7895 );
7896 break a;
7897 }
7898 }
7899 workInProgress2 = "";
7900 null !== current2 && "object" === typeof current2 && current2.$$typeof === REACT_LAZY_TYPE && (workInProgress2 = " Did you wrap a component in React.lazy() more than once?");
7901 current2 = getComponentNameFromType(current2) || current2;
7902 throw Error(
7903 "Element type is invalid. Received a promise that resolves to: " + current2 + ". Lazy element type must resolve to a class or function." + workInProgress2
7904 );
7905 }
7906 return workInProgress2;
7907 case 0:
7908 return updateFunctionComponent(
7909 current2,
7910 workInProgress2,
7911 workInProgress2.type,
7912 workInProgress2.pendingProps,
7913 renderLanes2
7914 );
7915 case 1:
7916 return returnFiber = workInProgress2.type, prevSibling = resolveClassComponentProps(
7917 returnFiber,
7918 workInProgress2.pendingProps
7919 ), updateClassComponent(
7920 current2,
7921 workInProgress2,
7922 returnFiber,
7923 prevSibling,
7924 renderLanes2
7925 );
7926 case 3:
7927 a: {
7928 pushHostContainer(
7929 workInProgress2,
7930 workInProgress2.stateNode.containerInfo
7931 );
7932 if (null === current2)
7933 throw Error(
7934 "Should have a current fiber. This is a bug in React."
7935 );
7936 returnFiber = workInProgress2.pendingProps;
7937 var prevState = workInProgress2.memoizedState;
7938 prevSibling = prevState.element;
7939 cloneUpdateQueue(current2, workInProgress2);
7940 processUpdateQueue(workInProgress2, returnFiber, null, renderLanes2);
7941 var nextState = workInProgress2.memoizedState;
7942 returnFiber = nextState.cache;
7943 pushProvider(workInProgress2, CacheContext, returnFiber);
7944 returnFiber !== prevState.cache && propagateContextChanges(
7945 workInProgress2,
7946 [CacheContext],
7947 renderLanes2,
7948 true
7949 );
7950 suspendIfUpdateReadFromEntangledAsyncAction();
7951 returnFiber = nextState.element;
7952 if (prevState.isDehydrated)
7953 if (prevState = {
7954 element: returnFiber,
7955 isDehydrated: false,
7956 cache: nextState.cache
7957 }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) {
7958 workInProgress2 = mountHostRootWithoutHydrating(
7959 current2,
7960 workInProgress2,
7961 returnFiber,
7962 renderLanes2
7963 );
7964 break a;
7965 } else if (returnFiber !== prevSibling) {
7966 prevSibling = createCapturedValueAtFiber(
7967 Error(
7968 "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
7969 ),
7970 workInProgress2
7971 );
7972 queueHydrationError(prevSibling);
7973 workInProgress2 = mountHostRootWithoutHydrating(
7974 current2,
7975 workInProgress2,
7976 returnFiber,
7977 renderLanes2
7978 );
7979 break a;
7980 } else {
7981 current2 = workInProgress2.stateNode.containerInfo;
7982 switch (current2.nodeType) {
7983 case 9:
7984 current2 = current2.body;
7985 break;
7986 default:
7987 current2 = "HTML" === current2.nodeName ? current2.ownerDocument.body : current2;
7988 }
7989 nextHydratableInstance = getNextHydratable(current2.firstChild);
7990 hydrationParentFiber = workInProgress2;
7991 isHydrating = true;
7992 hydrationErrors = null;
7993 didSuspendOrErrorDEV = false;
7994 hydrationDiffRootDEV = null;
7995 rootOrSingletonContext = true;
7996 current2 = mountChildFibers(
7997 workInProgress2,
7998 null,
7999 returnFiber,
8000 renderLanes2
8001 );
8002 for (workInProgress2.child = current2; current2; )
8003 current2.flags = current2.flags & -3 | 4096, current2 = current2.sibling;
8004 }
8005 else {
8006 resetHydrationState();
8007 if (returnFiber === prevSibling) {
8008 workInProgress2 = bailoutOnAlreadyFinishedWork(
8009 current2,
8010 workInProgress2,
8011 renderLanes2
8012 );
8013 break a;
8014 }
8015 reconcileChildren(
8016 current2,
8017 workInProgress2,
8018 returnFiber,
8019 renderLanes2
8020 );
8021 }
8022 workInProgress2 = workInProgress2.child;
8023 }
8024 return workInProgress2;
8025 case 26:
8026 return markRef(current2, workInProgress2), null === current2 ? (current2 = getResource(
8027 workInProgress2.type,
8028 null,
8029 workInProgress2.pendingProps,
8030 null
8031 )) ? workInProgress2.memoizedState = current2 : isHydrating || (current2 = workInProgress2.type, renderLanes2 = workInProgress2.pendingProps, returnFiber = requiredContext(
8032 rootInstanceStackCursor.current
8033 ), returnFiber = getOwnerDocumentFromRootContainer(
8034 returnFiber
8035 ).createElement(current2), returnFiber[internalInstanceKey] = workInProgress2, returnFiber[internalPropsKey] = renderLanes2, setInitialProperties(returnFiber, current2, renderLanes2), markNodeAsHoistable(returnFiber), workInProgress2.stateNode = returnFiber) : workInProgress2.memoizedState = getResource(
8036 workInProgress2.type,
8037 current2.memoizedProps,
8038 workInProgress2.pendingProps,
8039 current2.memoizedState
8040 ), null;
8041 case 27:
8042 return pushHostContext(workInProgress2), null === current2 && isHydrating && (returnFiber = requiredContext(rootInstanceStackCursor.current), prevSibling = getHostContext(), returnFiber = workInProgress2.stateNode = resolveSingletonInstance(
8043 workInProgress2.type,
8044 workInProgress2.pendingProps,
8045 returnFiber,
8046 prevSibling,
8047 false
8048 ), didSuspendOrErrorDEV || (prevSibling = diffHydratedProperties(
8049 returnFiber,
8050 workInProgress2.type,
8051 workInProgress2.pendingProps,
8052 prevSibling
8053 ), null !== prevSibling && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevSibling)), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, prevSibling = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = prevSibling, nextHydratableInstance = getNextHydratable(
8054 returnFiber.firstChild
8055 )) : nextHydratableInstance = prevSibling), reconcileChildren(
8056 current2,
8057 workInProgress2,
8058 workInProgress2.pendingProps.children,
8059 renderLanes2
8060 ), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child;
8061 case 5:
8062 return null === current2 && isHydrating && (prevState = getHostContext(), returnFiber = validateDOMNesting(
8063 workInProgress2.type,
8064 prevState.ancestorInfo
8065 ), prevSibling = nextHydratableInstance, (nextState = !prevSibling) || (nextState = canHydrateInstance(
8066 prevSibling,
8067 workInProgress2.type,
8068 workInProgress2.pendingProps,
8069 rootOrSingletonContext
8070 ), null !== nextState ? (workInProgress2.stateNode = nextState, didSuspendOrErrorDEV || (prevState = diffHydratedProperties(
8071 nextState,
8072 workInProgress2.type,
8073 workInProgress2.pendingProps,
8074 prevState
8075 ), null !== prevState && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevState)), hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable(
8076 nextState.firstChild
8077 ), rootOrSingletonContext = false, prevState = true) : prevState = false, nextState = !prevState), nextState && (returnFiber && warnNonHydratedInstance(workInProgress2, prevSibling), throwOnHydrationMismatch(workInProgress2))), pushHostContext(workInProgress2), prevSibling = workInProgress2.type, prevState = workInProgress2.pendingProps, nextState = null !== current2 ? current2.memoizedProps : null, returnFiber = prevState.children, shouldSetTextContent(prevSibling, prevState) ? returnFiber = null : null !== nextState && shouldSetTextContent(prevSibling, nextState) && (workInProgress2.flags |= 32), null !== workInProgress2.memoizedState && (prevSibling = renderWithHooks(
8078 current2,
8079 workInProgress2,
8080 TransitionAwareHostComponent,
8081 null,
8082 null,
8083 renderLanes2
8084 ), HostTransitionContext._currentValue = prevSibling), markRef(current2, workInProgress2), reconcileChildren(
8085 current2,
8086 workInProgress2,
8087 returnFiber,
8088 renderLanes2
8089 ), workInProgress2.child;
8090 case 6:
8091 return null === current2 && isHydrating && (current2 = workInProgress2.pendingProps, renderLanes2 = getHostContext(), returnFiber = renderLanes2.ancestorInfo.current, current2 = null != returnFiber ? validateTextNesting(
8092 current2,
8093 returnFiber.tag,
8094 renderLanes2.ancestorInfo.implicitRootScope
8095 ) : true, renderLanes2 = nextHydratableInstance, (returnFiber = !renderLanes2) || (returnFiber = canHydrateTextInstance(
8096 renderLanes2,
8097 workInProgress2.pendingProps,
8098 rootOrSingletonContext
8099 ), null !== returnFiber ? (workInProgress2.stateNode = returnFiber, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, returnFiber = true) : returnFiber = false, returnFiber = !returnFiber), returnFiber && (current2 && warnNonHydratedInstance(workInProgress2, renderLanes2), throwOnHydrationMismatch(workInProgress2))), null;
8100 case 13:
8101 return updateSuspenseComponent(current2, workInProgress2, renderLanes2);
8102 case 4:
8103 return pushHostContainer(
8104 workInProgress2,
8105 workInProgress2.stateNode.containerInfo
8106 ), returnFiber = workInProgress2.pendingProps, null === current2 ? workInProgress2.child = reconcileChildFibers(
8107 workInProgress2,
8108 null,
8109 returnFiber,
8110 renderLanes2
8111 ) : reconcileChildren(
8112 current2,
8113 workInProgress2,
8114 returnFiber,
8115 renderLanes2
8116 ), workInProgress2.child;
8117 case 11:
8118 return updateForwardRef(
8119 current2,
8120 workInProgress2,
8121 workInProgress2.type,
8122 workInProgress2.pendingProps,
8123 renderLanes2
8124 );
8125 case 7:
8126 return reconcileChildren(
8127 current2,
8128 workInProgress2,
8129 workInProgress2.pendingProps,
8130 renderLanes2
8131 ), workInProgress2.child;
8132 case 8:
8133 return reconcileChildren(
8134 current2,
8135 workInProgress2,
8136 workInProgress2.pendingProps.children,
8137 renderLanes2
8138 ), workInProgress2.child;
8139 case 12:
8140 return workInProgress2.flags |= 4, workInProgress2.flags |= 2048, returnFiber = workInProgress2.stateNode, returnFiber.effectDuration = -0, returnFiber.passiveEffectDuration = -0, reconcileChildren(
8141 current2,
8142 workInProgress2,
8143 workInProgress2.pendingProps.children,
8144 renderLanes2
8145 ), workInProgress2.child;
8146 case 10:
8147 return returnFiber = workInProgress2.type, prevSibling = workInProgress2.pendingProps, prevState = prevSibling.value, "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || (hasWarnedAboutUsingNoValuePropOnContextProvider = true, console.error(
8148 "The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
8149 )), pushProvider(workInProgress2, returnFiber, prevState), reconcileChildren(
8150 current2,
8151 workInProgress2,
8152 prevSibling.children,
8153 renderLanes2
8154 ), workInProgress2.child;
8155 case 9:
8156 return prevSibling = workInProgress2.type._context, returnFiber = workInProgress2.pendingProps.children, "function" !== typeof returnFiber && console.error(
8157 "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
8158 ), prepareToReadContext(workInProgress2), prevSibling = readContext(prevSibling), markComponentRenderStarted(workInProgress2), returnFiber = callComponentInDEV(
8159 returnFiber,
8160 prevSibling,
8161 void 0
8162 ), markComponentRenderStopped(), workInProgress2.flags |= 1, reconcileChildren(
8163 current2,
8164 workInProgress2,
8165 returnFiber,
8166 renderLanes2
8167 ), workInProgress2.child;
8168 case 14:
8169 return updateMemoComponent(
8170 current2,
8171 workInProgress2,
8172 workInProgress2.type,
8173 workInProgress2.pendingProps,
8174 renderLanes2
8175 );
8176 case 15:
8177 return updateSimpleMemoComponent(
8178 current2,
8179 workInProgress2,
8180 workInProgress2.type,
8181 workInProgress2.pendingProps,
8182 renderLanes2
8183 );
8184 case 19:
8185 return updateSuspenseListComponent(
8186 current2,
8187 workInProgress2,
8188 renderLanes2
8189 );
8190 case 31:
8191 return returnFiber = workInProgress2.pendingProps, renderLanes2 = workInProgress2.mode, returnFiber = {
8192 mode: returnFiber.mode,
8193 children: returnFiber.children
8194 }, null === current2 ? (current2 = mountWorkInProgressOffscreenFiber(
8195 returnFiber,
8196 renderLanes2
8197 ), current2.ref = workInProgress2.ref, workInProgress2.child = current2, current2.return = workInProgress2, workInProgress2 = current2) : (current2 = createWorkInProgress(current2.child, returnFiber), current2.ref = workInProgress2.ref, workInProgress2.child = current2, current2.return = workInProgress2, workInProgress2 = current2), workInProgress2;
8198 case 22:
8199 return updateOffscreenComponent(current2, workInProgress2, renderLanes2);
8200 case 24:
8201 return prepareToReadContext(workInProgress2), returnFiber = readContext(CacheContext), null === current2 ? (prevSibling = peekCacheFromPool(), null === prevSibling && (prevSibling = workInProgressRoot, prevState = createCache(), prevSibling.pooledCache = prevState, retainCache(prevState), null !== prevState && (prevSibling.pooledCacheLanes |= renderLanes2), prevSibling = prevState), workInProgress2.memoizedState = {
8202 parent: returnFiber,
8203 cache: prevSibling
8204 }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, prevSibling)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), prevSibling = current2.memoizedState, prevState = workInProgress2.memoizedState, prevSibling.parent !== returnFiber ? (prevSibling = {
8205 parent: returnFiber,
8206 cache: returnFiber
8207 }, workInProgress2.memoizedState = prevSibling, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = prevSibling), pushProvider(workInProgress2, CacheContext, returnFiber)) : (returnFiber = prevState.cache, pushProvider(workInProgress2, CacheContext, returnFiber), returnFiber !== prevSibling.cache && propagateContextChanges(
8208 workInProgress2,
8209 [CacheContext],
8210 renderLanes2,
8211 true
8212 ))), reconcileChildren(
8213 current2,
8214 workInProgress2,
8215 workInProgress2.pendingProps.children,
8216 renderLanes2
8217 ), workInProgress2.child;
8218 case 29:
8219 throw workInProgress2.pendingProps;
8220 }
8221 throw Error(
8222 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
8223 );
8224 }
8225 function markUpdate(workInProgress2) {
8226 workInProgress2.flags |= 4;
8227 }
8228 function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
8229 if ("stylesheet" !== resource.type || (resource.state.loading & Inserted) !== NotLoaded)
8230 workInProgress2.flags &= -16777217;
8231 else if (workInProgress2.flags |= 16777216, !preloadResource(resource)) {
8232 resource = suspenseHandlerStackCursor.current;
8233 if (null !== resource && ((workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null !== shellBoundary : (workInProgressRootRenderLanes & 62914560) !== workInProgressRootRenderLanes && 0 === (workInProgressRootRenderLanes & 536870912) || resource !== shellBoundary))
8234 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
8235 workInProgress2.flags |= 8192;
8236 }
8237 }
8238 function scheduleRetryEffect(workInProgress2, retryQueue) {
8239 null !== retryQueue && (workInProgress2.flags |= 4);
8240 workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
8241 }
8242 function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
8243 if (!isHydrating)
8244 switch (renderState.tailMode) {
8245 case "hidden":
8246 hasRenderedATailFallback = renderState.tail;
8247 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
8248 null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
8249 null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
8250 break;
8251 case "collapsed":
8252 lastTailNode = renderState.tail;
8253 for (var _lastTailNode = null; null !== lastTailNode; )
8254 null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
8255 null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
8256 }
8257 }
8258 function bubbleProperties(completedWork) {
8259 var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
8260 if (didBailout)
8261 if ((completedWork.mode & ProfileMode) !== NoMode) {
8262 for (var _treeBaseDuration = completedWork.selfBaseDuration, _child2 = completedWork.child; null !== _child2; )
8263 newChildLanes |= _child2.lanes | _child2.childLanes, subtreeFlags |= _child2.subtreeFlags & 65011712, subtreeFlags |= _child2.flags & 65011712, _treeBaseDuration += _child2.treeBaseDuration, _child2 = _child2.sibling;
8264 completedWork.treeBaseDuration = _treeBaseDuration;
8265 } else
8266 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
8267 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712, subtreeFlags |= _treeBaseDuration.flags & 65011712, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
8268 else if ((completedWork.mode & ProfileMode) !== NoMode) {
8269 _treeBaseDuration = completedWork.actualDuration;
8270 _child2 = completedWork.selfBaseDuration;
8271 for (var child = completedWork.child; null !== child; )
8272 newChildLanes |= child.lanes | child.childLanes, subtreeFlags |= child.subtreeFlags, subtreeFlags |= child.flags, _treeBaseDuration += child.actualDuration, _child2 += child.treeBaseDuration, child = child.sibling;
8273 completedWork.actualDuration = _treeBaseDuration;
8274 completedWork.treeBaseDuration = _child2;
8275 } else
8276 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
8277 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags, subtreeFlags |= _treeBaseDuration.flags, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
8278 completedWork.subtreeFlags |= subtreeFlags;
8279 completedWork.childLanes = newChildLanes;
8280 return didBailout;
8281 }
8282 function completeWork(current2, workInProgress2, renderLanes2) {
8283 var newProps = workInProgress2.pendingProps;
8284 popTreeContext(workInProgress2);
8285 switch (workInProgress2.tag) {
8286 case 31:
8287 case 16:
8288 case 15:
8289 case 0:
8290 case 11:
8291 case 7:
8292 case 8:
8293 case 12:
8294 case 9:
8295 case 14:
8296 return bubbleProperties(workInProgress2), null;
8297 case 1:
8298 return bubbleProperties(workInProgress2), null;
8299 case 3:
8300 renderLanes2 = workInProgress2.stateNode;
8301 newProps = null;
8302 null !== current2 && (newProps = current2.memoizedState.cache);
8303 workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
8304 popProvider(CacheContext, workInProgress2);
8305 popHostContainer(workInProgress2);
8306 renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
8307 if (null === current2 || null === current2.child)
8308 popHydrationState(workInProgress2) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress2)) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
8309 bubbleProperties(workInProgress2);
8310 return null;
8311 case 26:
8312 return renderLanes2 = workInProgress2.memoizedState, null === current2 ? (markUpdate(workInProgress2), null !== renderLanes2 ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
8313 workInProgress2,
8314 renderLanes2
8315 )) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217)) : renderLanes2 ? renderLanes2 !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
8316 workInProgress2,
8317 renderLanes2
8318 )) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current2.memoizedProps !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217), null;
8319 case 27:
8320 popHostContext(workInProgress2);
8321 renderLanes2 = requiredContext(rootInstanceStackCursor.current);
8322 var _type = workInProgress2.type;
8323 if (null !== current2 && null != workInProgress2.stateNode)
8324 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
8325 else {
8326 if (!newProps) {
8327 if (null === workInProgress2.stateNode)
8328 throw Error(
8329 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
8330 );
8331 bubbleProperties(workInProgress2);
8332 return null;
8333 }
8334 current2 = getHostContext();
8335 popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
8336 _type,
8337 newProps,
8338 renderLanes2,
8339 current2,
8340 true
8341 ), workInProgress2.stateNode = current2, markUpdate(workInProgress2));
8342 }
8343 bubbleProperties(workInProgress2);
8344 return null;
8345 case 5:
8346 popHostContext(workInProgress2);
8347 renderLanes2 = workInProgress2.type;
8348 if (null !== current2 && null != workInProgress2.stateNode)
8349 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
8350 else {
8351 if (!newProps) {
8352 if (null === workInProgress2.stateNode)
8353 throw Error(
8354 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
8355 );
8356 bubbleProperties(workInProgress2);
8357 return null;
8358 }
8359 _type = getHostContext();
8360 if (popHydrationState(workInProgress2))
8361 prepareToHydrateHostInstance(workInProgress2, _type);
8362 else {
8363 current2 = requiredContext(rootInstanceStackCursor.current);
8364 validateDOMNesting(renderLanes2, _type.ancestorInfo);
8365 _type = _type.context;
8366 current2 = getOwnerDocumentFromRootContainer(current2);
8367 switch (_type) {
8368 case HostContextNamespaceSvg:
8369 current2 = current2.createElementNS(SVG_NAMESPACE, renderLanes2);
8370 break;
8371 case HostContextNamespaceMath:
8372 current2 = current2.createElementNS(
8373 MATH_NAMESPACE,
8374 renderLanes2
8375 );
8376 break;
8377 default:
8378 switch (renderLanes2) {
8379 case "svg":
8380 current2 = current2.createElementNS(
8381 SVG_NAMESPACE,
8382 renderLanes2
8383 );
8384 break;
8385 case "math":
8386 current2 = current2.createElementNS(
8387 MATH_NAMESPACE,
8388 renderLanes2
8389 );
8390 break;
8391 case "script":
8392 current2 = current2.createElement("div");
8393 current2.innerHTML = "<script><\/script>";
8394 current2 = current2.removeChild(current2.firstChild);
8395 break;
8396 case "select":
8397 current2 = "string" === typeof newProps.is ? current2.createElement("select", { is: newProps.is }) : current2.createElement("select");
8398 newProps.multiple ? current2.multiple = true : newProps.size && (current2.size = newProps.size);
8399 break;
8400 default:
8401 current2 = "string" === typeof newProps.is ? current2.createElement(renderLanes2, {
8402 is: newProps.is
8403 }) : current2.createElement(renderLanes2), -1 === renderLanes2.indexOf("-") && (renderLanes2 !== renderLanes2.toLowerCase() && console.error(
8404 "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
8405 renderLanes2
8406 ), "[object HTMLUnknownElement]" !== Object.prototype.toString.call(current2) || hasOwnProperty.call(
8407 warnedUnknownTags,
8408 renderLanes2
8409 ) || (warnedUnknownTags[renderLanes2] = true, console.error(
8410 "The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",
8411 renderLanes2
8412 )));
8413 }
8414 }
8415 current2[internalInstanceKey] = workInProgress2;
8416 current2[internalPropsKey] = newProps;
8417 a: for (_type = workInProgress2.child; null !== _type; ) {
8418 if (5 === _type.tag || 6 === _type.tag)
8419 current2.appendChild(_type.stateNode);
8420 else if (4 !== _type.tag && 27 !== _type.tag && null !== _type.child) {
8421 _type.child.return = _type;
8422 _type = _type.child;
8423 continue;
8424 }
8425 if (_type === workInProgress2) break a;
8426 for (; null === _type.sibling; ) {
8427 if (null === _type.return || _type.return === workInProgress2)
8428 break a;
8429 _type = _type.return;
8430 }
8431 _type.sibling.return = _type.return;
8432 _type = _type.sibling;
8433 }
8434 workInProgress2.stateNode = current2;
8435 a: switch (setInitialProperties(current2, renderLanes2, newProps), renderLanes2) {
8436 case "button":
8437 case "input":
8438 case "select":
8439 case "textarea":
8440 current2 = !!newProps.autoFocus;
8441 break a;
8442 case "img":
8443 current2 = true;
8444 break a;
8445 default:
8446 current2 = false;
8447 }
8448 current2 && markUpdate(workInProgress2);
8449 }
8450 }
8451 bubbleProperties(workInProgress2);
8452 workInProgress2.flags &= -16777217;
8453 return null;
8454 case 6:
8455 if (current2 && null != workInProgress2.stateNode)
8456 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
8457 else {
8458 if ("string" !== typeof newProps && null === workInProgress2.stateNode)
8459 throw Error(
8460 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
8461 );
8462 current2 = requiredContext(rootInstanceStackCursor.current);
8463 renderLanes2 = getHostContext();
8464 if (popHydrationState(workInProgress2)) {
8465 current2 = workInProgress2.stateNode;
8466 renderLanes2 = workInProgress2.memoizedProps;
8467 _type = !didSuspendOrErrorDEV;
8468 newProps = null;
8469 var returnFiber = hydrationParentFiber;
8470 if (null !== returnFiber)
8471 switch (returnFiber.tag) {
8472 case 3:
8473 _type && (_type = diffHydratedTextForDevWarnings(
8474 current2,
8475 renderLanes2,
8476 newProps
8477 ), null !== _type && (buildHydrationDiffNode(workInProgress2, 0).serverProps = _type));
8478 break;
8479 case 27:
8480 case 5:
8481 newProps = returnFiber.memoizedProps, _type && (_type = diffHydratedTextForDevWarnings(
8482 current2,
8483 renderLanes2,
8484 newProps
8485 ), null !== _type && (buildHydrationDiffNode(
8486 workInProgress2,
8487 0
8488 ).serverProps = _type));
8489 }
8490 current2[internalInstanceKey] = workInProgress2;
8491 current2 = current2.nodeValue === renderLanes2 || null !== newProps && true === newProps.suppressHydrationWarning || checkForUnmatchedText(current2.nodeValue, renderLanes2) ? true : false;
8492 current2 || throwOnHydrationMismatch(workInProgress2);
8493 } else
8494 _type = renderLanes2.ancestorInfo.current, null != _type && validateTextNesting(
8495 newProps,
8496 _type.tag,
8497 renderLanes2.ancestorInfo.implicitRootScope
8498 ), current2 = getOwnerDocumentFromRootContainer(current2).createTextNode(
8499 newProps
8500 ), current2[internalInstanceKey] = workInProgress2, workInProgress2.stateNode = current2;
8501 }
8502 bubbleProperties(workInProgress2);
8503 return null;
8504 case 13:
8505 newProps = workInProgress2.memoizedState;
8506 if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
8507 _type = popHydrationState(workInProgress2);
8508 if (null !== newProps && null !== newProps.dehydrated) {
8509 if (null === current2) {
8510 if (!_type)
8511 throw Error(
8512 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
8513 );
8514 _type = workInProgress2.memoizedState;
8515 _type = null !== _type ? _type.dehydrated : null;
8516 if (!_type)
8517 throw Error(
8518 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
8519 );
8520 _type[internalInstanceKey] = workInProgress2;
8521 bubbleProperties(workInProgress2);
8522 (workInProgress2.mode & ProfileMode) !== NoMode && null !== newProps && (_type = workInProgress2.child, null !== _type && (workInProgress2.treeBaseDuration -= _type.treeBaseDuration));
8523 } else
8524 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== newProps && (_type = workInProgress2.child, null !== _type && (workInProgress2.treeBaseDuration -= _type.treeBaseDuration));
8525 _type = false;
8526 } else
8527 _type = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = _type), _type = true;
8528 if (!_type) {
8529 if (workInProgress2.flags & 256)
8530 return popSuspenseHandler(workInProgress2), workInProgress2;
8531 popSuspenseHandler(workInProgress2);
8532 return null;
8533 }
8534 }
8535 popSuspenseHandler(workInProgress2);
8536 if (0 !== (workInProgress2.flags & 128))
8537 return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
8538 renderLanes2 = null !== newProps;
8539 current2 = null !== current2 && null !== current2.memoizedState;
8540 renderLanes2 && (newProps = workInProgress2.child, _type = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (_type = newProps.alternate.memoizedState.cachePool.pool), returnFiber = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (returnFiber = newProps.memoizedState.cachePool.pool), returnFiber !== _type && (newProps.flags |= 2048));
8541 renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
8542 scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
8543 bubbleProperties(workInProgress2);
8544 (workInProgress2.mode & ProfileMode) !== NoMode && renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
8545 return null;
8546 case 4:
8547 return popHostContainer(workInProgress2), null === current2 && listenToAllSupportedEvents(
8548 workInProgress2.stateNode.containerInfo
8549 ), bubbleProperties(workInProgress2), null;
8550 case 10:
8551 return popProvider(workInProgress2.type, workInProgress2), bubbleProperties(workInProgress2), null;
8552 case 19:
8553 pop(suspenseStackCursor, workInProgress2);
8554 _type = workInProgress2.memoizedState;
8555 if (null === _type) return bubbleProperties(workInProgress2), null;
8556 newProps = 0 !== (workInProgress2.flags & 128);
8557 returnFiber = _type.rendering;
8558 if (null === returnFiber)
8559 if (newProps) cutOffTailIfNeeded(_type, false);
8560 else {
8561 if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
8562 for (current2 = workInProgress2.child; null !== current2; ) {
8563 returnFiber = findFirstSuspended(current2);
8564 if (null !== returnFiber) {
8565 workInProgress2.flags |= 128;
8566 cutOffTailIfNeeded(_type, false);
8567 current2 = returnFiber.updateQueue;
8568 workInProgress2.updateQueue = current2;
8569 scheduleRetryEffect(workInProgress2, current2);
8570 workInProgress2.subtreeFlags = 0;
8571 current2 = renderLanes2;
8572 for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
8573 resetWorkInProgress(renderLanes2, current2), renderLanes2 = renderLanes2.sibling;
8574 push(
8575 suspenseStackCursor,
8576 suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback,
8577 workInProgress2
8578 );
8579 return workInProgress2.child;
8580 }
8581 current2 = current2.sibling;
8582 }
8583 null !== _type.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, newProps = true, cutOffTailIfNeeded(_type, false), workInProgress2.lanes = 4194304);
8584 }
8585 else {
8586 if (!newProps)
8587 if (current2 = findFirstSuspended(returnFiber), null !== current2) {
8588 if (workInProgress2.flags |= 128, newProps = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(_type, true), null === _type.tail && "hidden" === _type.tailMode && !returnFiber.alternate && !isHydrating)
8589 return bubbleProperties(workInProgress2), null;
8590 } else
8591 2 * now$1() - _type.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, newProps = true, cutOffTailIfNeeded(_type, false), workInProgress2.lanes = 4194304);
8592 _type.isBackwards ? (returnFiber.sibling = workInProgress2.child, workInProgress2.child = returnFiber) : (current2 = _type.last, null !== current2 ? current2.sibling = returnFiber : workInProgress2.child = returnFiber, _type.last = returnFiber);
8593 }
8594 if (null !== _type.tail)
8595 return current2 = _type.tail, _type.rendering = current2, _type.tail = current2.sibling, _type.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = newProps ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), current2;
8596 bubbleProperties(workInProgress2);
8597 return null;
8598 case 22:
8599 case 23:
8600 return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), newProps = null !== workInProgress2.memoizedState, null !== current2 ? null !== current2.memoizedState !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? 0 !== (renderLanes2 & 536870912) && 0 === (workInProgress2.flags & 128) && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, null !== renderLanes2 && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (renderLanes2 = current2.memoizedState.cachePool.pool), newProps = null, null !== workInProgress2.memoizedState && null !== workInProgress2.memoizedState.cachePool && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), null !== current2 && pop(resumedCache, workInProgress2), null;
8601 case 24:
8602 return renderLanes2 = null, null !== current2 && (renderLanes2 = current2.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext, workInProgress2), bubbleProperties(workInProgress2), null;
8603 case 25:
8604 return null;
8605 case 30:
8606 return null;
8607 }
8608 throw Error(
8609 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
8610 );
8611 }
8612 function unwindWork(current2, workInProgress2) {
8613 popTreeContext(workInProgress2);
8614 switch (workInProgress2.tag) {
8615 case 1:
8616 return current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
8617 case 3:
8618 return popProvider(CacheContext, workInProgress2), popHostContainer(workInProgress2), current2 = workInProgress2.flags, 0 !== (current2 & 65536) && 0 === (current2 & 128) ? (workInProgress2.flags = current2 & -65537 | 128, workInProgress2) : null;
8619 case 26:
8620 case 27:
8621 case 5:
8622 return popHostContext(workInProgress2), null;
8623 case 13:
8624 popSuspenseHandler(workInProgress2);
8625 current2 = workInProgress2.memoizedState;
8626 if (null !== current2 && null !== current2.dehydrated) {
8627 if (null === workInProgress2.alternate)
8628 throw Error(
8629 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
8630 );
8631 resetHydrationState();
8632 }
8633 current2 = workInProgress2.flags;
8634 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
8635 case 19:
8636 return pop(suspenseStackCursor, workInProgress2), null;
8637 case 4:
8638 return popHostContainer(workInProgress2), null;
8639 case 10:
8640 return popProvider(workInProgress2.type, workInProgress2), null;
8641 case 22:
8642 case 23:
8643 return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), null !== current2 && pop(resumedCache, workInProgress2), current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
8644 case 24:
8645 return popProvider(CacheContext, workInProgress2), null;
8646 case 25:
8647 return null;
8648 default:
8649 return null;
8650 }
8651 }
8652 function unwindInterruptedWork(current2, interruptedWork) {
8653 popTreeContext(interruptedWork);
8654 switch (interruptedWork.tag) {
8655 case 3:
8656 popProvider(CacheContext, interruptedWork);
8657 popHostContainer(interruptedWork);
8658 break;
8659 case 26:
8660 case 27:
8661 case 5:
8662 popHostContext(interruptedWork);
8663 break;
8664 case 4:
8665 popHostContainer(interruptedWork);
8666 break;
8667 case 13:
8668 popSuspenseHandler(interruptedWork);
8669 break;
8670 case 19:
8671 pop(suspenseStackCursor, interruptedWork);
8672 break;
8673 case 10:
8674 popProvider(interruptedWork.type, interruptedWork);
8675 break;
8676 case 22:
8677 case 23:
8678 popSuspenseHandler(interruptedWork);
8679 popHiddenContext(interruptedWork);
8680 null !== current2 && pop(resumedCache, interruptedWork);
8681 break;
8682 case 24:
8683 popProvider(CacheContext, interruptedWork);
8684 }
8685 }
8686 function shouldProfile(current2) {
8687 return (current2.mode & ProfileMode) !== NoMode;
8688 }
8689 function commitHookLayoutEffects(finishedWork, hookFlags) {
8690 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
8691 }
8692 function commitHookLayoutUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
8693 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
8694 hookFlags,
8695 finishedWork,
8696 nearestMountedAncestor
8697 ), recordEffectDuration()) : commitHookEffectListUnmount(
8698 hookFlags,
8699 finishedWork,
8700 nearestMountedAncestor
8701 );
8702 }
8703 function commitHookEffectListMount(flags, finishedWork) {
8704 try {
8705 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
8706 if (null !== lastEffect) {
8707 var firstEffect = lastEffect.next;
8708 updateQueue = firstEffect;
8709 do {
8710 if ((updateQueue.tag & flags) === flags && ((flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted && injectedProfilingHooks.markComponentPassiveEffectMountStarted(
8711 finishedWork
8712 ) : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted && injectedProfilingHooks.markComponentLayoutEffectMountStarted(
8713 finishedWork
8714 ), lastEffect = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = runWithFiberInDEV(
8715 finishedWork,
8716 callCreateInDEV,
8717 updateQueue
8718 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), (flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped && injectedProfilingHooks.markComponentPassiveEffectMountStopped() : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped && injectedProfilingHooks.markComponentLayoutEffectMountStopped(), void 0 !== lastEffect && "function" !== typeof lastEffect)) {
8719 var hookName = void 0;
8720 hookName = 0 !== (updateQueue.tag & Layout) ? "useLayoutEffect" : 0 !== (updateQueue.tag & Insertion) ? "useInsertionEffect" : "useEffect";
8721 var addendum = void 0;
8722 addendum = null === lastEffect ? " You returned null. If your effect does not require clean up, return undefined (or nothing)." : "function" === typeof lastEffect.then ? "\n\nIt looks like you wrote " + hookName + "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + hookName + "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching" : " You returned: " + lastEffect;
8723 runWithFiberInDEV(
8724 finishedWork,
8725 function(n, a) {
8726 console.error(
8727 "%s must not return anything besides a function, which is used for clean-up.%s",
8728 n,
8729 a
8730 );
8731 },
8732 hookName,
8733 addendum
8734 );
8735 }
8736 updateQueue = updateQueue.next;
8737 } while (updateQueue !== firstEffect);
8738 }
8739 } catch (error) {
8740 captureCommitPhaseError(finishedWork, finishedWork.return, error);
8741 }
8742 }
8743 function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
8744 try {
8745 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
8746 if (null !== lastEffect) {
8747 var firstEffect = lastEffect.next;
8748 updateQueue = firstEffect;
8749 do {
8750 if ((updateQueue.tag & flags) === flags) {
8751 var inst = updateQueue.inst, destroy = inst.destroy;
8752 void 0 !== destroy && (inst.destroy = void 0, (flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted && injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(
8753 finishedWork
8754 ) : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(
8755 finishedWork
8756 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = finishedWork, runWithFiberInDEV(
8757 lastEffect,
8758 callDestroyInDEV,
8759 lastEffect,
8760 nearestMountedAncestor,
8761 destroy
8762 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), (flags & Passive) !== NoFlags ? null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && injectedProfilingHooks.markComponentLayoutEffectUnmountStopped());
8763 }
8764 updateQueue = updateQueue.next;
8765 } while (updateQueue !== firstEffect);
8766 }
8767 } catch (error) {
8768 captureCommitPhaseError(finishedWork, finishedWork.return, error);
8769 }
8770 }
8771 function commitHookPassiveMountEffects(finishedWork, hookFlags) {
8772 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
8773 }
8774 function commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
8775 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
8776 hookFlags,
8777 finishedWork,
8778 nearestMountedAncestor
8779 ), recordEffectDuration()) : commitHookEffectListUnmount(
8780 hookFlags,
8781 finishedWork,
8782 nearestMountedAncestor
8783 );
8784 }
8785 function commitClassCallbacks(finishedWork) {
8786 var updateQueue = finishedWork.updateQueue;
8787 if (null !== updateQueue) {
8788 var instance = finishedWork.stateNode;
8789 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && console.error(
8790 "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
8791 getComponentNameFromFiber(finishedWork) || "instance"
8792 ), instance.state !== finishedWork.memoizedState && console.error(
8793 "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
8794 getComponentNameFromFiber(finishedWork) || "instance"
8795 ));
8796 try {
8797 runWithFiberInDEV(
8798 finishedWork,
8799 commitCallbacks,
8800 updateQueue,
8801 instance
8802 );
8803 } catch (error) {
8804 captureCommitPhaseError(finishedWork, finishedWork.return, error);
8805 }
8806 }
8807 }
8808 function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {
8809 return instance.getSnapshotBeforeUpdate(prevProps, prevState);
8810 }
8811 function commitClassSnapshot(finishedWork, current2) {
8812 var prevProps = current2.memoizedProps, prevState = current2.memoizedState;
8813 current2 = finishedWork.stateNode;
8814 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current2.props !== finishedWork.memoizedProps && console.error(
8815 "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
8816 getComponentNameFromFiber(finishedWork) || "instance"
8817 ), current2.state !== finishedWork.memoizedState && console.error(
8818 "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
8819 getComponentNameFromFiber(finishedWork) || "instance"
8820 ));
8821 try {
8822 var resolvedPrevProps = resolveClassComponentProps(
8823 finishedWork.type,
8824 prevProps,
8825 finishedWork.elementType === finishedWork.type
8826 );
8827 var snapshot = runWithFiberInDEV(
8828 finishedWork,
8829 callGetSnapshotBeforeUpdates,
8830 current2,
8831 resolvedPrevProps,
8832 prevState
8833 );
8834 prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
8835 void 0 !== snapshot || prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function() {
8836 console.error(
8837 "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
8838 getComponentNameFromFiber(finishedWork)
8839 );
8840 }));
8841 current2.__reactInternalSnapshotBeforeUpdate = snapshot;
8842 } catch (error) {
8843 captureCommitPhaseError(finishedWork, finishedWork.return, error);
8844 }
8845 }
8846 function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
8847 instance.props = resolveClassComponentProps(
8848 current2.type,
8849 current2.memoizedProps
8850 );
8851 instance.state = current2.memoizedState;
8852 shouldProfile(current2) ? (startEffectTimer(), runWithFiberInDEV(
8853 current2,
8854 callComponentWillUnmountInDEV,
8855 current2,
8856 nearestMountedAncestor,
8857 instance
8858 ), recordEffectDuration()) : runWithFiberInDEV(
8859 current2,
8860 callComponentWillUnmountInDEV,
8861 current2,
8862 nearestMountedAncestor,
8863 instance
8864 );
8865 }
8866 function commitAttachRef(finishedWork) {
8867 var ref = finishedWork.ref;
8868 if (null !== ref) {
8869 switch (finishedWork.tag) {
8870 case 26:
8871 case 27:
8872 case 5:
8873 var instanceToUse = finishedWork.stateNode;
8874 break;
8875 case 30:
8876 instanceToUse = finishedWork.stateNode;
8877 break;
8878 default:
8879 instanceToUse = finishedWork.stateNode;
8880 }
8881 if ("function" === typeof ref)
8882 if (shouldProfile(finishedWork))
8883 try {
8884 startEffectTimer(), finishedWork.refCleanup = ref(instanceToUse);
8885 } finally {
8886 recordEffectDuration();
8887 }
8888 else finishedWork.refCleanup = ref(instanceToUse);
8889 else
8890 "string" === typeof ref ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || console.error(
8891 "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
8892 getComponentNameFromFiber(finishedWork)
8893 ), ref.current = instanceToUse;
8894 }
8895 }
8896 function safelyAttachRef(current2, nearestMountedAncestor) {
8897 try {
8898 runWithFiberInDEV(current2, commitAttachRef, current2);
8899 } catch (error) {
8900 captureCommitPhaseError(current2, nearestMountedAncestor, error);
8901 }
8902 }
8903 function safelyDetachRef(current2, nearestMountedAncestor) {
8904 var ref = current2.ref, refCleanup = current2.refCleanup;
8905 if (null !== ref)
8906 if ("function" === typeof refCleanup)
8907 try {
8908 if (shouldProfile(current2))
8909 try {
8910 startEffectTimer(), runWithFiberInDEV(current2, refCleanup);
8911 } finally {
8912 recordEffectDuration(current2);
8913 }
8914 else runWithFiberInDEV(current2, refCleanup);
8915 } catch (error) {
8916 captureCommitPhaseError(current2, nearestMountedAncestor, error);
8917 } finally {
8918 current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
8919 }
8920 else if ("function" === typeof ref)
8921 try {
8922 if (shouldProfile(current2))
8923 try {
8924 startEffectTimer(), runWithFiberInDEV(current2, ref, null);
8925 } finally {
8926 recordEffectDuration(current2);
8927 }
8928 else runWithFiberInDEV(current2, ref, null);
8929 } catch (error$7) {
8930 captureCommitPhaseError(current2, nearestMountedAncestor, error$7);
8931 }
8932 else ref.current = null;
8933 }
8934 function commitProfiler(finishedWork, current2, commitStartTime2, effectDuration) {
8935 var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit;
8936 _finishedWork$memoize = _finishedWork$memoize.onRender;
8937 current2 = null === current2 ? "mount" : "update";
8938 currentUpdateIsNested && (current2 = "nested-update");
8939 "function" === typeof _finishedWork$memoize && _finishedWork$memoize(
8940 id,
8941 current2,
8942 finishedWork.actualDuration,
8943 finishedWork.treeBaseDuration,
8944 finishedWork.actualStartTime,
8945 commitStartTime2
8946 );
8947 "function" === typeof onCommit && onCommit(
8948 finishedWork.memoizedProps.id,
8949 current2,
8950 effectDuration,
8951 commitStartTime2
8952 );
8953 }
8954 function commitProfilerPostCommitImpl(finishedWork, current2, commitStartTime2, passiveEffectDuration) {
8955 var _finishedWork$memoize2 = finishedWork.memoizedProps;
8956 finishedWork = _finishedWork$memoize2.id;
8957 _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
8958 current2 = null === current2 ? "mount" : "update";
8959 currentUpdateIsNested && (current2 = "nested-update");
8960 "function" === typeof _finishedWork$memoize2 && _finishedWork$memoize2(
8961 finishedWork,
8962 current2,
8963 passiveEffectDuration,
8964 commitStartTime2
8965 );
8966 }
8967 function commitHostMount(finishedWork) {
8968 var type = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
8969 try {
8970 runWithFiberInDEV(
8971 finishedWork,
8972 commitMount,
8973 instance,
8974 type,
8975 props,
8976 finishedWork
8977 );
8978 } catch (error) {
8979 captureCommitPhaseError(finishedWork, finishedWork.return, error);
8980 }
8981 }
8982 function commitHostUpdate(finishedWork, newProps, oldProps) {
8983 try {
8984 runWithFiberInDEV(
8985 finishedWork,
8986 commitUpdate,
8987 finishedWork.stateNode,
8988 finishedWork.type,
8989 oldProps,
8990 newProps,
8991 finishedWork
8992 );
8993 } catch (error) {
8994 captureCommitPhaseError(finishedWork, finishedWork.return, error);
8995 }
8996 }
8997 function isHostParent(fiber) {
8998 return 5 === fiber.tag || 3 === fiber.tag || 26 === fiber.tag || 27 === fiber.tag && isSingletonScope(fiber.type) || 4 === fiber.tag;
8999 }
9000 function getHostSibling(fiber) {
9001 a: for (; ; ) {
9002 for (; null === fiber.sibling; ) {
9003 if (null === fiber.return || isHostParent(fiber.return)) return null;
9004 fiber = fiber.return;
9005 }
9006 fiber.sibling.return = fiber.return;
9007 for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
9008 if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
9009 if (fiber.flags & 2) continue a;
9010 if (null === fiber.child || 4 === fiber.tag) continue a;
9011 else fiber.child.return = fiber, fiber = fiber.child;
9012 }
9013 if (!(fiber.flags & 2)) return fiber.stateNode;
9014 }
9015 }
9016 function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
9017 var tag = node.tag;
9018 if (5 === tag || 6 === tag)
9019 node = node.stateNode, before ? (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent).insertBefore(node, before) : (before = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent, before.appendChild(node), parent = parent._reactRootContainer, null !== parent && void 0 !== parent || null !== before.onclick || (before.onclick = noop$1));
9020 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
9021 for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
9022 insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
9023 }
9024 function insertOrAppendPlacementNode(node, before, parent) {
9025 var tag = node.tag;
9026 if (5 === tag || 6 === tag)
9027 node = node.stateNode, before ? parent.insertBefore(node, before) : parent.appendChild(node);
9028 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
9029 for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
9030 insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
9031 }
9032 function commitPlacement(finishedWork) {
9033 for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
9034 if (isHostParent(parentFiber)) {
9035 hostParentFiber = parentFiber;
9036 break;
9037 }
9038 parentFiber = parentFiber.return;
9039 }
9040 if (null == hostParentFiber)
9041 throw Error(
9042 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
9043 );
9044 switch (hostParentFiber.tag) {
9045 case 27:
9046 hostParentFiber = hostParentFiber.stateNode;
9047 parentFiber = getHostSibling(finishedWork);
9048 insertOrAppendPlacementNode(
9049 finishedWork,
9050 parentFiber,
9051 hostParentFiber
9052 );
9053 break;
9054 case 5:
9055 parentFiber = hostParentFiber.stateNode;
9056 hostParentFiber.flags & 32 && (resetTextContent(parentFiber), hostParentFiber.flags &= -33);
9057 hostParentFiber = getHostSibling(finishedWork);
9058 insertOrAppendPlacementNode(
9059 finishedWork,
9060 hostParentFiber,
9061 parentFiber
9062 );
9063 break;
9064 case 3:
9065 case 4:
9066 hostParentFiber = hostParentFiber.stateNode.containerInfo;
9067 parentFiber = getHostSibling(finishedWork);
9068 insertOrAppendPlacementNodeIntoContainer(
9069 finishedWork,
9070 parentFiber,
9071 hostParentFiber
9072 );
9073 break;
9074 default:
9075 throw Error(
9076 "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
9077 );
9078 }
9079 }
9080 function commitHostSingletonAcquisition(finishedWork) {
9081 var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
9082 try {
9083 runWithFiberInDEV(
9084 finishedWork,
9085 acquireSingletonInstance,
9086 finishedWork.type,
9087 props,
9088 singleton,
9089 finishedWork
9090 );
9091 } catch (error) {
9092 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9093 }
9094 }
9095 function commitBeforeMutationEffects(root2, firstChild) {
9096 root2 = root2.containerInfo;
9097 eventsEnabled = _enabled;
9098 root2 = getActiveElementDeep(root2);
9099 if (hasSelectionCapabilities(root2)) {
9100 if ("selectionStart" in root2)
9101 var JSCompiler_temp = {
9102 start: root2.selectionStart,
9103 end: root2.selectionEnd
9104 };
9105 else
9106 a: {
9107 JSCompiler_temp = (JSCompiler_temp = root2.ownerDocument) && JSCompiler_temp.defaultView || window;
9108 var selection = JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
9109 if (selection && 0 !== selection.rangeCount) {
9110 JSCompiler_temp = selection.anchorNode;
9111 var anchorOffset = selection.anchorOffset, focusNode = selection.focusNode;
9112 selection = selection.focusOffset;
9113 try {
9114 JSCompiler_temp.nodeType, focusNode.nodeType;
9115 } catch (e$2) {
9116 JSCompiler_temp = null;
9117 break a;
9118 }
9119 var length = 0, start = -1, end = -1, indexWithinAnchor = 0, indexWithinFocus = 0, node = root2, parentNode = null;
9120 b: for (; ; ) {
9121 for (var next; ; ) {
9122 node !== JSCompiler_temp || 0 !== anchorOffset && 3 !== node.nodeType || (start = length + anchorOffset);
9123 node !== focusNode || 0 !== selection && 3 !== node.nodeType || (end = length + selection);
9124 3 === node.nodeType && (length += node.nodeValue.length);
9125 if (null === (next = node.firstChild)) break;
9126 parentNode = node;
9127 node = next;
9128 }
9129 for (; ; ) {
9130 if (node === root2) break b;
9131 parentNode === JSCompiler_temp && ++indexWithinAnchor === anchorOffset && (start = length);
9132 parentNode === focusNode && ++indexWithinFocus === selection && (end = length);
9133 if (null !== (next = node.nextSibling)) break;
9134 node = parentNode;
9135 parentNode = node.parentNode;
9136 }
9137 node = next;
9138 }
9139 JSCompiler_temp = -1 === start || -1 === end ? null : { start, end };
9140 } else JSCompiler_temp = null;
9141 }
9142 JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
9143 } else JSCompiler_temp = null;
9144 selectionInformation = {
9145 focusedElem: root2,
9146 selectionRange: JSCompiler_temp
9147 };
9148 _enabled = false;
9149 for (nextEffect = firstChild; null !== nextEffect; )
9150 if (firstChild = nextEffect, root2 = firstChild.child, 0 !== (firstChild.subtreeFlags & 1024) && null !== root2)
9151 root2.return = firstChild, nextEffect = root2;
9152 else
9153 for (; null !== nextEffect; ) {
9154 root2 = firstChild = nextEffect;
9155 JSCompiler_temp = root2.alternate;
9156 anchorOffset = root2.flags;
9157 switch (root2.tag) {
9158 case 0:
9159 break;
9160 case 11:
9161 case 15:
9162 break;
9163 case 1:
9164 0 !== (anchorOffset & 1024) && null !== JSCompiler_temp && commitClassSnapshot(root2, JSCompiler_temp);
9165 break;
9166 case 3:
9167 if (0 !== (anchorOffset & 1024)) {
9168 if (root2 = root2.stateNode.containerInfo, JSCompiler_temp = root2.nodeType, 9 === JSCompiler_temp)
9169 clearContainerSparingly(root2);
9170 else if (1 === JSCompiler_temp)
9171 switch (root2.nodeName) {
9172 case "HEAD":
9173 case "HTML":
9174 case "BODY":
9175 clearContainerSparingly(root2);
9176 break;
9177 default:
9178 root2.textContent = "";
9179 }
9180 }
9181 break;
9182 case 5:
9183 case 26:
9184 case 27:
9185 case 6:
9186 case 4:
9187 case 17:
9188 break;
9189 default:
9190 if (0 !== (anchorOffset & 1024))
9191 throw Error(
9192 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
9193 );
9194 }
9195 root2 = firstChild.sibling;
9196 if (null !== root2) {
9197 root2.return = firstChild.return;
9198 nextEffect = root2;
9199 break;
9200 }
9201 nextEffect = firstChild.return;
9202 }
9203 }
9204 function commitLayoutEffectOnFiber(finishedRoot, current2, finishedWork) {
9205 var flags = finishedWork.flags;
9206 switch (finishedWork.tag) {
9207 case 0:
9208 case 11:
9209 case 15:
9210 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9211 flags & 4 && commitHookLayoutEffects(finishedWork, Layout | HasEffect);
9212 break;
9213 case 1:
9214 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9215 if (flags & 4)
9216 if (finishedRoot = finishedWork.stateNode, null === current2)
9217 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
9218 "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
9219 getComponentNameFromFiber(finishedWork) || "instance"
9220 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
9221 "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
9222 getComponentNameFromFiber(finishedWork) || "instance"
9223 )), shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
9224 finishedWork,
9225 callComponentDidMountInDEV,
9226 finishedWork,
9227 finishedRoot
9228 ), recordEffectDuration()) : runWithFiberInDEV(
9229 finishedWork,
9230 callComponentDidMountInDEV,
9231 finishedWork,
9232 finishedRoot
9233 );
9234 else {
9235 var prevProps = resolveClassComponentProps(
9236 finishedWork.type,
9237 current2.memoizedProps
9238 );
9239 current2 = current2.memoizedState;
9240 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
9241 "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
9242 getComponentNameFromFiber(finishedWork) || "instance"
9243 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
9244 "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
9245 getComponentNameFromFiber(finishedWork) || "instance"
9246 ));
9247 shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
9248 finishedWork,
9249 callComponentDidUpdateInDEV,
9250 finishedWork,
9251 finishedRoot,
9252 prevProps,
9253 current2,
9254 finishedRoot.__reactInternalSnapshotBeforeUpdate
9255 ), recordEffectDuration()) : runWithFiberInDEV(
9256 finishedWork,
9257 callComponentDidUpdateInDEV,
9258 finishedWork,
9259 finishedRoot,
9260 prevProps,
9261 current2,
9262 finishedRoot.__reactInternalSnapshotBeforeUpdate
9263 );
9264 }
9265 flags & 64 && commitClassCallbacks(finishedWork);
9266 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
9267 break;
9268 case 3:
9269 current2 = pushNestedEffectDurations();
9270 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9271 if (flags & 64 && (flags = finishedWork.updateQueue, null !== flags)) {
9272 prevProps = null;
9273 if (null !== finishedWork.child)
9274 switch (finishedWork.child.tag) {
9275 case 27:
9276 case 5:
9277 prevProps = finishedWork.child.stateNode;
9278 break;
9279 case 1:
9280 prevProps = finishedWork.child.stateNode;
9281 }
9282 try {
9283 runWithFiberInDEV(
9284 finishedWork,
9285 commitCallbacks,
9286 flags,
9287 prevProps
9288 );
9289 } catch (error) {
9290 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9291 }
9292 }
9293 finishedRoot.effectDuration += popNestedEffectDurations(current2);
9294 break;
9295 case 27:
9296 null === current2 && flags & 4 && commitHostSingletonAcquisition(finishedWork);
9297 case 26:
9298 case 5:
9299 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9300 null === current2 && flags & 4 && commitHostMount(finishedWork);
9301 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
9302 break;
9303 case 12:
9304 if (flags & 4) {
9305 flags = pushNestedEffectDurations();
9306 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9307 finishedRoot = finishedWork.stateNode;
9308 finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
9309 try {
9310 runWithFiberInDEV(
9311 finishedWork,
9312 commitProfiler,
9313 finishedWork,
9314 current2,
9315 commitStartTime,
9316 finishedRoot.effectDuration
9317 );
9318 } catch (error) {
9319 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9320 }
9321 } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9322 break;
9323 case 13:
9324 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9325 flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
9326 flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (finishedWork = retryDehydratedSuspenseBoundary.bind(
9327 null,
9328 finishedWork
9329 ), registerSuspenseInstanceRetry(finishedRoot, finishedWork))));
9330 break;
9331 case 22:
9332 flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
9333 if (!flags) {
9334 current2 = null !== current2 && null !== current2.memoizedState || offscreenSubtreeWasHidden;
9335 prevProps = offscreenSubtreeIsHidden;
9336 var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
9337 offscreenSubtreeIsHidden = flags;
9338 (offscreenSubtreeWasHidden = current2) && !prevOffscreenSubtreeWasHidden ? recursivelyTraverseReappearLayoutEffects(
9339 finishedRoot,
9340 finishedWork,
9341 0 !== (finishedWork.subtreeFlags & 8772)
9342 ) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9343 offscreenSubtreeIsHidden = prevProps;
9344 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
9345 }
9346 break;
9347 case 30:
9348 break;
9349 default:
9350 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
9351 }
9352 }
9353 function detachFiberAfterEffects(fiber) {
9354 var alternate = fiber.alternate;
9355 null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
9356 fiber.child = null;
9357 fiber.deletions = null;
9358 fiber.sibling = null;
9359 5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
9360 fiber.stateNode = null;
9361 fiber._debugOwner = null;
9362 fiber.return = null;
9363 fiber.dependencies = null;
9364 fiber.memoizedProps = null;
9365 fiber.memoizedState = null;
9366 fiber.pendingProps = null;
9367 fiber.stateNode = null;
9368 fiber.updateQueue = null;
9369 }
9370 function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
9371 for (parent = parent.child; null !== parent; )
9372 commitDeletionEffectsOnFiber(
9373 finishedRoot,
9374 nearestMountedAncestor,
9375 parent
9376 ), parent = parent.sibling;
9377 }
9378 function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
9379 if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
9380 try {
9381 injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
9382 } catch (err) {
9383 hasLoggedError || (hasLoggedError = true, console.error(
9384 "React instrumentation encountered an error: %s",
9385 err
9386 ));
9387 }
9388 switch (deletedFiber.tag) {
9389 case 26:
9390 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
9391 recursivelyTraverseDeletionEffects(
9392 finishedRoot,
9393 nearestMountedAncestor,
9394 deletedFiber
9395 );
9396 deletedFiber.memoizedState ? deletedFiber.memoizedState.count-- : deletedFiber.stateNode && (deletedFiber = deletedFiber.stateNode, deletedFiber.parentNode.removeChild(deletedFiber));
9397 break;
9398 case 27:
9399 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
9400 var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
9401 isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
9402 recursivelyTraverseDeletionEffects(
9403 finishedRoot,
9404 nearestMountedAncestor,
9405 deletedFiber
9406 );
9407 runWithFiberInDEV(
9408 deletedFiber,
9409 releaseSingletonInstance,
9410 deletedFiber.stateNode
9411 );
9412 hostParent = prevHostParent;
9413 hostParentIsContainer = prevHostParentIsContainer;
9414 break;
9415 case 5:
9416 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
9417 case 6:
9418 prevHostParent = hostParent;
9419 prevHostParentIsContainer = hostParentIsContainer;
9420 hostParent = null;
9421 recursivelyTraverseDeletionEffects(
9422 finishedRoot,
9423 nearestMountedAncestor,
9424 deletedFiber
9425 );
9426 hostParent = prevHostParent;
9427 hostParentIsContainer = prevHostParentIsContainer;
9428 if (null !== hostParent)
9429 if (hostParentIsContainer)
9430 try {
9431 runWithFiberInDEV(
9432 deletedFiber,
9433 removeChildFromContainer,
9434 hostParent,
9435 deletedFiber.stateNode
9436 );
9437 } catch (error) {
9438 captureCommitPhaseError(
9439 deletedFiber,
9440 nearestMountedAncestor,
9441 error
9442 );
9443 }
9444 else
9445 try {
9446 runWithFiberInDEV(
9447 deletedFiber,
9448 removeChild,
9449 hostParent,
9450 deletedFiber.stateNode
9451 );
9452 } catch (error) {
9453 captureCommitPhaseError(
9454 deletedFiber,
9455 nearestMountedAncestor,
9456 error
9457 );
9458 }
9459 break;
9460 case 18:
9461 null !== hostParent && (hostParentIsContainer ? (finishedRoot = hostParent, clearSuspenseBoundary(
9462 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName ? finishedRoot.ownerDocument.body : finishedRoot,
9463 deletedFiber.stateNode
9464 ), retryIfBlockedOn(finishedRoot)) : clearSuspenseBoundary(hostParent, deletedFiber.stateNode));
9465 break;
9466 case 4:
9467 prevHostParent = hostParent;
9468 prevHostParentIsContainer = hostParentIsContainer;
9469 hostParent = deletedFiber.stateNode.containerInfo;
9470 hostParentIsContainer = true;
9471 recursivelyTraverseDeletionEffects(
9472 finishedRoot,
9473 nearestMountedAncestor,
9474 deletedFiber
9475 );
9476 hostParent = prevHostParent;
9477 hostParentIsContainer = prevHostParentIsContainer;
9478 break;
9479 case 0:
9480 case 11:
9481 case 14:
9482 case 15:
9483 offscreenSubtreeWasHidden || commitHookEffectListUnmount(
9484 Insertion,
9485 deletedFiber,
9486 nearestMountedAncestor
9487 );
9488 offscreenSubtreeWasHidden || commitHookLayoutUnmountEffects(
9489 deletedFiber,
9490 nearestMountedAncestor,
9491 Layout
9492 );
9493 recursivelyTraverseDeletionEffects(
9494 finishedRoot,
9495 nearestMountedAncestor,
9496 deletedFiber
9497 );
9498 break;
9499 case 1:
9500 offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
9501 deletedFiber,
9502 nearestMountedAncestor,
9503 prevHostParent
9504 ));
9505 recursivelyTraverseDeletionEffects(
9506 finishedRoot,
9507 nearestMountedAncestor,
9508 deletedFiber
9509 );
9510 break;
9511 case 21:
9512 recursivelyTraverseDeletionEffects(
9513 finishedRoot,
9514 nearestMountedAncestor,
9515 deletedFiber
9516 );
9517 break;
9518 case 22:
9519 offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
9520 recursivelyTraverseDeletionEffects(
9521 finishedRoot,
9522 nearestMountedAncestor,
9523 deletedFiber
9524 );
9525 offscreenSubtreeWasHidden = prevHostParent;
9526 break;
9527 default:
9528 recursivelyTraverseDeletionEffects(
9529 finishedRoot,
9530 nearestMountedAncestor,
9531 deletedFiber
9532 );
9533 }
9534 }
9535 function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
9536 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
9537 try {
9538 runWithFiberInDEV(
9539 finishedWork,
9540 commitHydratedSuspenseInstance,
9541 finishedRoot
9542 );
9543 } catch (error) {
9544 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9545 }
9546 }
9547 function getRetryCache(finishedWork) {
9548 switch (finishedWork.tag) {
9549 case 13:
9550 case 19:
9551 var retryCache = finishedWork.stateNode;
9552 null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
9553 return retryCache;
9554 case 22:
9555 return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
9556 default:
9557 throw Error(
9558 "Unexpected Suspense handler tag (" + finishedWork.tag + "). This is a bug in React."
9559 );
9560 }
9561 }
9562 function attachSuspenseRetryListeners(finishedWork, wakeables) {
9563 var retryCache = getRetryCache(finishedWork);
9564 wakeables.forEach(function(wakeable) {
9565 var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
9566 if (!retryCache.has(wakeable)) {
9567 retryCache.add(wakeable);
9568 if (isDevToolsPresent)
9569 if (null !== inProgressLanes && null !== inProgressRoot)
9570 restorePendingUpdaters(inProgressRoot, inProgressLanes);
9571 else
9572 throw Error(
9573 "Expected finished root and lanes to be set. This is a bug in React."
9574 );
9575 wakeable.then(retry, retry);
9576 }
9577 });
9578 }
9579 function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
9580 var deletions = parentFiber.deletions;
9581 if (null !== deletions)
9582 for (var i = 0; i < deletions.length; i++) {
9583 var root2 = root$jscomp$0, returnFiber = parentFiber, deletedFiber = deletions[i], parent = returnFiber;
9584 a: for (; null !== parent; ) {
9585 switch (parent.tag) {
9586 case 27:
9587 if (isSingletonScope(parent.type)) {
9588 hostParent = parent.stateNode;
9589 hostParentIsContainer = false;
9590 break a;
9591 }
9592 break;
9593 case 5:
9594 hostParent = parent.stateNode;
9595 hostParentIsContainer = false;
9596 break a;
9597 case 3:
9598 case 4:
9599 hostParent = parent.stateNode.containerInfo;
9600 hostParentIsContainer = true;
9601 break a;
9602 }
9603 parent = parent.return;
9604 }
9605 if (null === hostParent)
9606 throw Error(
9607 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
9608 );
9609 commitDeletionEffectsOnFiber(root2, returnFiber, deletedFiber);
9610 hostParent = null;
9611 hostParentIsContainer = false;
9612 root2 = deletedFiber;
9613 returnFiber = root2.alternate;
9614 null !== returnFiber && (returnFiber.return = null);
9615 root2.return = null;
9616 }
9617 if (parentFiber.subtreeFlags & 13878)
9618 for (parentFiber = parentFiber.child; null !== parentFiber; )
9619 commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
9620 }
9621 function commitMutationEffectsOnFiber(finishedWork, root2) {
9622 var current2 = finishedWork.alternate, flags = finishedWork.flags;
9623 switch (finishedWork.tag) {
9624 case 0:
9625 case 11:
9626 case 14:
9627 case 15:
9628 recursivelyTraverseMutationEffects(root2, finishedWork);
9629 commitReconciliationEffects(finishedWork);
9630 flags & 4 && (commitHookEffectListUnmount(
9631 Insertion | HasEffect,
9632 finishedWork,
9633 finishedWork.return
9634 ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), commitHookLayoutUnmountEffects(
9635 finishedWork,
9636 finishedWork.return,
9637 Layout | HasEffect
9638 ));
9639 break;
9640 case 1:
9641 recursivelyTraverseMutationEffects(root2, finishedWork);
9642 commitReconciliationEffects(finishedWork);
9643 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
9644 flags & 64 && offscreenSubtreeIsHidden && (finishedWork = finishedWork.updateQueue, null !== finishedWork && (flags = finishedWork.callbacks, null !== flags && (current2 = finishedWork.shared.hiddenCallbacks, finishedWork.shared.hiddenCallbacks = null === current2 ? flags : current2.concat(flags))));
9645 break;
9646 case 26:
9647 var hoistableRoot = currentHoistableRoot;
9648 recursivelyTraverseMutationEffects(root2, finishedWork);
9649 commitReconciliationEffects(finishedWork);
9650 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
9651 if (flags & 4)
9652 if (root2 = null !== current2 ? current2.memoizedState : null, flags = finishedWork.memoizedState, null === current2)
9653 if (null === flags)
9654 if (null === finishedWork.stateNode) {
9655 a: {
9656 flags = finishedWork.type;
9657 current2 = finishedWork.memoizedProps;
9658 root2 = hoistableRoot.ownerDocument || hoistableRoot;
9659 b: switch (flags) {
9660 case "title":
9661 hoistableRoot = root2.getElementsByTagName("title")[0];
9662 if (!hoistableRoot || hoistableRoot[internalHoistableMarker] || hoistableRoot[internalInstanceKey] || hoistableRoot.namespaceURI === SVG_NAMESPACE || hoistableRoot.hasAttribute("itemprop"))
9663 hoistableRoot = root2.createElement(flags), root2.head.insertBefore(
9664 hoistableRoot,
9665 root2.querySelector("head > title")
9666 );
9667 setInitialProperties(hoistableRoot, flags, current2);
9668 hoistableRoot[internalInstanceKey] = finishedWork;
9669 markNodeAsHoistable(hoistableRoot);
9670 flags = hoistableRoot;
9671 break a;
9672 case "link":
9673 var maybeNodes = getHydratableHoistableCache(
9674 "link",
9675 "href",
9676 root2
9677 ).get(flags + (current2.href || ""));
9678 if (maybeNodes) {
9679 for (var i = 0; i < maybeNodes.length; i++)
9680 if (hoistableRoot = maybeNodes[i], hoistableRoot.getAttribute("href") === (null == current2.href || "" === current2.href ? null : current2.href) && hoistableRoot.getAttribute("rel") === (null == current2.rel ? null : current2.rel) && hoistableRoot.getAttribute("title") === (null == current2.title ? null : current2.title) && hoistableRoot.getAttribute("crossorigin") === (null == current2.crossOrigin ? null : current2.crossOrigin)) {
9681 maybeNodes.splice(i, 1);
9682 break b;
9683 }
9684 }
9685 hoistableRoot = root2.createElement(flags);
9686 setInitialProperties(hoistableRoot, flags, current2);
9687 root2.head.appendChild(hoistableRoot);
9688 break;
9689 case "meta":
9690 if (maybeNodes = getHydratableHoistableCache(
9691 "meta",
9692 "content",
9693 root2
9694 ).get(flags + (current2.content || ""))) {
9695 for (i = 0; i < maybeNodes.length; i++)
9696 if (hoistableRoot = maybeNodes[i], checkAttributeStringCoercion(
9697 current2.content,
9698 "content"
9699 ), hoistableRoot.getAttribute("content") === (null == current2.content ? null : "" + current2.content) && hoistableRoot.getAttribute("name") === (null == current2.name ? null : current2.name) && hoistableRoot.getAttribute("property") === (null == current2.property ? null : current2.property) && hoistableRoot.getAttribute("http-equiv") === (null == current2.httpEquiv ? null : current2.httpEquiv) && hoistableRoot.getAttribute("charset") === (null == current2.charSet ? null : current2.charSet)) {
9700 maybeNodes.splice(i, 1);
9701 break b;
9702 }
9703 }
9704 hoistableRoot = root2.createElement(flags);
9705 setInitialProperties(hoistableRoot, flags, current2);
9706 root2.head.appendChild(hoistableRoot);
9707 break;
9708 default:
9709 throw Error(
9710 'getNodesForType encountered a type it did not expect: "' + flags + '". This is a bug in React.'
9711 );
9712 }
9713 hoistableRoot[internalInstanceKey] = finishedWork;
9714 markNodeAsHoistable(hoistableRoot);
9715 flags = hoistableRoot;
9716 }
9717 finishedWork.stateNode = flags;
9718 } else
9719 mountHoistable(
9720 hoistableRoot,
9721 finishedWork.type,
9722 finishedWork.stateNode
9723 );
9724 else
9725 finishedWork.stateNode = acquireResource(
9726 hoistableRoot,
9727 flags,
9728 finishedWork.memoizedProps
9729 );
9730 else
9731 root2 !== flags ? (null === root2 ? null !== current2.stateNode && (current2 = current2.stateNode, current2.parentNode.removeChild(current2)) : root2.count--, null === flags ? mountHoistable(
9732 hoistableRoot,
9733 finishedWork.type,
9734 finishedWork.stateNode
9735 ) : acquireResource(
9736 hoistableRoot,
9737 flags,
9738 finishedWork.memoizedProps
9739 )) : null === flags && null !== finishedWork.stateNode && commitHostUpdate(
9740 finishedWork,
9741 finishedWork.memoizedProps,
9742 current2.memoizedProps
9743 );
9744 break;
9745 case 27:
9746 recursivelyTraverseMutationEffects(root2, finishedWork);
9747 commitReconciliationEffects(finishedWork);
9748 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
9749 null !== current2 && flags & 4 && commitHostUpdate(
9750 finishedWork,
9751 finishedWork.memoizedProps,
9752 current2.memoizedProps
9753 );
9754 break;
9755 case 5:
9756 recursivelyTraverseMutationEffects(root2, finishedWork);
9757 commitReconciliationEffects(finishedWork);
9758 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
9759 if (finishedWork.flags & 32) {
9760 root2 = finishedWork.stateNode;
9761 try {
9762 runWithFiberInDEV(finishedWork, resetTextContent, root2);
9763 } catch (error) {
9764 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9765 }
9766 }
9767 flags & 4 && null != finishedWork.stateNode && (root2 = finishedWork.memoizedProps, commitHostUpdate(
9768 finishedWork,
9769 root2,
9770 null !== current2 ? current2.memoizedProps : root2
9771 ));
9772 flags & 1024 && (needsFormReset = true, "form" !== finishedWork.type && console.error(
9773 "Unexpected host component type. Expected a form. This is a bug in React."
9774 ));
9775 break;
9776 case 6:
9777 recursivelyTraverseMutationEffects(root2, finishedWork);
9778 commitReconciliationEffects(finishedWork);
9779 if (flags & 4) {
9780 if (null === finishedWork.stateNode)
9781 throw Error(
9782 "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
9783 );
9784 flags = finishedWork.memoizedProps;
9785 current2 = null !== current2 ? current2.memoizedProps : flags;
9786 root2 = finishedWork.stateNode;
9787 try {
9788 runWithFiberInDEV(
9789 finishedWork,
9790 commitTextUpdate,
9791 root2,
9792 current2,
9793 flags
9794 );
9795 } catch (error) {
9796 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9797 }
9798 }
9799 break;
9800 case 3:
9801 hoistableRoot = pushNestedEffectDurations();
9802 tagCaches = null;
9803 maybeNodes = currentHoistableRoot;
9804 currentHoistableRoot = getHoistableRoot(root2.containerInfo);
9805 recursivelyTraverseMutationEffects(root2, finishedWork);
9806 currentHoistableRoot = maybeNodes;
9807 commitReconciliationEffects(finishedWork);
9808 if (flags & 4 && null !== current2 && current2.memoizedState.isDehydrated)
9809 try {
9810 runWithFiberInDEV(
9811 finishedWork,
9812 commitHydratedContainer,
9813 root2.containerInfo
9814 );
9815 } catch (error) {
9816 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9817 }
9818 needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
9819 root2.effectDuration += popNestedEffectDurations(hoistableRoot);
9820 break;
9821 case 4:
9822 flags = currentHoistableRoot;
9823 currentHoistableRoot = getHoistableRoot(
9824 finishedWork.stateNode.containerInfo
9825 );
9826 recursivelyTraverseMutationEffects(root2, finishedWork);
9827 commitReconciliationEffects(finishedWork);
9828 currentHoistableRoot = flags;
9829 break;
9830 case 12:
9831 flags = pushNestedEffectDurations();
9832 recursivelyTraverseMutationEffects(root2, finishedWork);
9833 commitReconciliationEffects(finishedWork);
9834 finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags);
9835 break;
9836 case 13:
9837 recursivelyTraverseMutationEffects(root2, finishedWork);
9838 commitReconciliationEffects(finishedWork);
9839 finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current2 && null !== current2.memoizedState) && (globalMostRecentFallbackTime = now$1());
9840 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
9841 break;
9842 case 22:
9843 hoistableRoot = null !== finishedWork.memoizedState;
9844 var wasHidden = null !== current2 && null !== current2.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
9845 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;
9846 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
9847 recursivelyTraverseMutationEffects(root2, finishedWork);
9848 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
9849 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
9850 commitReconciliationEffects(finishedWork);
9851 if (flags & 8192)
9852 a: for (root2 = finishedWork.stateNode, root2._visibility = hoistableRoot ? root2._visibility & ~OffscreenVisible : root2._visibility | OffscreenVisible, hoistableRoot && (null === current2 || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), current2 = null, root2 = finishedWork; ; ) {
9853 if (5 === root2.tag || 26 === root2.tag) {
9854 if (null === current2) {
9855 wasHidden = current2 = root2;
9856 try {
9857 maybeNodes = wasHidden.stateNode, hoistableRoot ? runWithFiberInDEV(wasHidden, hideInstance, maybeNodes) : runWithFiberInDEV(
9858 wasHidden,
9859 unhideInstance,
9860 wasHidden.stateNode,
9861 wasHidden.memoizedProps
9862 );
9863 } catch (error) {
9864 captureCommitPhaseError(wasHidden, wasHidden.return, error);
9865 }
9866 }
9867 } else if (6 === root2.tag) {
9868 if (null === current2) {
9869 wasHidden = root2;
9870 try {
9871 i = wasHidden.stateNode, hoistableRoot ? runWithFiberInDEV(wasHidden, hideTextInstance, i) : runWithFiberInDEV(
9872 wasHidden,
9873 unhideTextInstance,
9874 i,
9875 wasHidden.memoizedProps
9876 );
9877 } catch (error) {
9878 captureCommitPhaseError(wasHidden, wasHidden.return, error);
9879 }
9880 }
9881 } else if ((22 !== root2.tag && 23 !== root2.tag || null === root2.memoizedState || root2 === finishedWork) && null !== root2.child) {
9882 root2.child.return = root2;
9883 root2 = root2.child;
9884 continue;
9885 }
9886 if (root2 === finishedWork) break a;
9887 for (; null === root2.sibling; ) {
9888 if (null === root2.return || root2.return === finishedWork)
9889 break a;
9890 current2 === root2 && (current2 = null);
9891 root2 = root2.return;
9892 }
9893 current2 === root2 && (current2 = null);
9894 root2.sibling.return = root2.return;
9895 root2 = root2.sibling;
9896 }
9897 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.retryQueue, null !== current2 && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
9898 break;
9899 case 19:
9900 recursivelyTraverseMutationEffects(root2, finishedWork);
9901 commitReconciliationEffects(finishedWork);
9902 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
9903 break;
9904 case 30:
9905 break;
9906 case 21:
9907 break;
9908 default:
9909 recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
9910 }
9911 }
9912 function commitReconciliationEffects(finishedWork) {
9913 var flags = finishedWork.flags;
9914 if (flags & 2) {
9915 try {
9916 runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
9917 } catch (error) {
9918 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9919 }
9920 finishedWork.flags &= -3;
9921 }
9922 flags & 4096 && (finishedWork.flags &= -4097);
9923 }
9924 function recursivelyResetForms(parentFiber) {
9925 if (parentFiber.subtreeFlags & 1024)
9926 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
9927 var fiber = parentFiber;
9928 recursivelyResetForms(fiber);
9929 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
9930 parentFiber = parentFiber.sibling;
9931 }
9932 }
9933 function recursivelyTraverseLayoutEffects(root2, parentFiber) {
9934 if (parentFiber.subtreeFlags & 8772)
9935 for (parentFiber = parentFiber.child; null !== parentFiber; )
9936 commitLayoutEffectOnFiber(root2, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
9937 }
9938 function disappearLayoutEffects(finishedWork) {
9939 switch (finishedWork.tag) {
9940 case 0:
9941 case 11:
9942 case 14:
9943 case 15:
9944 commitHookLayoutUnmountEffects(
9945 finishedWork,
9946 finishedWork.return,
9947 Layout
9948 );
9949 recursivelyTraverseDisappearLayoutEffects(finishedWork);
9950 break;
9951 case 1:
9952 safelyDetachRef(finishedWork, finishedWork.return);
9953 var instance = finishedWork.stateNode;
9954 "function" === typeof instance.componentWillUnmount && safelyCallComponentWillUnmount(
9955 finishedWork,
9956 finishedWork.return,
9957 instance
9958 );
9959 recursivelyTraverseDisappearLayoutEffects(finishedWork);
9960 break;
9961 case 27:
9962 runWithFiberInDEV(
9963 finishedWork,
9964 releaseSingletonInstance,
9965 finishedWork.stateNode
9966 );
9967 case 26:
9968 case 5:
9969 safelyDetachRef(finishedWork, finishedWork.return);
9970 recursivelyTraverseDisappearLayoutEffects(finishedWork);
9971 break;
9972 case 22:
9973 null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
9974 break;
9975 case 30:
9976 recursivelyTraverseDisappearLayoutEffects(finishedWork);
9977 break;
9978 default:
9979 recursivelyTraverseDisappearLayoutEffects(finishedWork);
9980 }
9981 }
9982 function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
9983 for (parentFiber = parentFiber.child; null !== parentFiber; )
9984 disappearLayoutEffects(parentFiber), parentFiber = parentFiber.sibling;
9985 }
9986 function reappearLayoutEffects(finishedRoot, current2, finishedWork, includeWorkInProgressEffects) {
9987 var flags = finishedWork.flags;
9988 switch (finishedWork.tag) {
9989 case 0:
9990 case 11:
9991 case 15:
9992 recursivelyTraverseReappearLayoutEffects(
9993 finishedRoot,
9994 finishedWork,
9995 includeWorkInProgressEffects
9996 );
9997 commitHookLayoutEffects(finishedWork, Layout);
9998 break;
9999 case 1:
10000 recursivelyTraverseReappearLayoutEffects(
10001 finishedRoot,
10002 finishedWork,
10003 includeWorkInProgressEffects
10004 );
10005 current2 = finishedWork.stateNode;
10006 "function" === typeof current2.componentDidMount && runWithFiberInDEV(
10007 finishedWork,
10008 callComponentDidMountInDEV,
10009 finishedWork,
10010 current2
10011 );
10012 current2 = finishedWork.updateQueue;
10013 if (null !== current2) {
10014 finishedRoot = finishedWork.stateNode;
10015 try {
10016 runWithFiberInDEV(
10017 finishedWork,
10018 commitHiddenCallbacks,
10019 current2,
10020 finishedRoot
10021 );
10022 } catch (error) {
10023 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10024 }
10025 }
10026 includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
10027 safelyAttachRef(finishedWork, finishedWork.return);
10028 break;
10029 case 27:
10030 commitHostSingletonAcquisition(finishedWork);
10031 case 26:
10032 case 5:
10033 recursivelyTraverseReappearLayoutEffects(
10034 finishedRoot,
10035 finishedWork,
10036 includeWorkInProgressEffects
10037 );
10038 includeWorkInProgressEffects && null === current2 && flags & 4 && commitHostMount(finishedWork);
10039 safelyAttachRef(finishedWork, finishedWork.return);
10040 break;
10041 case 12:
10042 if (includeWorkInProgressEffects && flags & 4) {
10043 flags = pushNestedEffectDurations();
10044 recursivelyTraverseReappearLayoutEffects(
10045 finishedRoot,
10046 finishedWork,
10047 includeWorkInProgressEffects
10048 );
10049 includeWorkInProgressEffects = finishedWork.stateNode;
10050 includeWorkInProgressEffects.effectDuration += bubbleNestedEffectDurations(flags);
10051 try {
10052 runWithFiberInDEV(
10053 finishedWork,
10054 commitProfiler,
10055 finishedWork,
10056 current2,
10057 commitStartTime,
10058 includeWorkInProgressEffects.effectDuration
10059 );
10060 } catch (error) {
10061 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10062 }
10063 } else
10064 recursivelyTraverseReappearLayoutEffects(
10065 finishedRoot,
10066 finishedWork,
10067 includeWorkInProgressEffects
10068 );
10069 break;
10070 case 13:
10071 recursivelyTraverseReappearLayoutEffects(
10072 finishedRoot,
10073 finishedWork,
10074 includeWorkInProgressEffects
10075 );
10076 includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
10077 break;
10078 case 22:
10079 null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
10080 finishedRoot,
10081 finishedWork,
10082 includeWorkInProgressEffects
10083 );
10084 safelyAttachRef(finishedWork, finishedWork.return);
10085 break;
10086 case 30:
10087 break;
10088 default:
10089 recursivelyTraverseReappearLayoutEffects(
10090 finishedRoot,
10091 finishedWork,
10092 includeWorkInProgressEffects
10093 );
10094 }
10095 }
10096 function recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {
10097 includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
10098 for (parentFiber = parentFiber.child; null !== parentFiber; )
10099 reappearLayoutEffects(
10100 finishedRoot,
10101 parentFiber.alternate,
10102 parentFiber,
10103 includeWorkInProgressEffects
10104 ), parentFiber = parentFiber.sibling;
10105 }
10106 function commitOffscreenPassiveMountEffects(current2, finishedWork) {
10107 var previousCache = null;
10108 null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (previousCache = current2.memoizedState.cachePool.pool);
10109 current2 = null;
10110 null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current2 = finishedWork.memoizedState.cachePool.pool);
10111 current2 !== previousCache && (null != current2 && retainCache(current2), null != previousCache && releaseCache(previousCache));
10112 }
10113 function commitCachePassiveMountEffect(current2, finishedWork) {
10114 current2 = null;
10115 null !== finishedWork.alternate && (current2 = finishedWork.alternate.memoizedState.cache);
10116 finishedWork = finishedWork.memoizedState.cache;
10117 finishedWork !== current2 && (retainCache(finishedWork), null != current2 && releaseCache(current2));
10118 }
10119 function recursivelyTraversePassiveMountEffects(root2, parentFiber, committedLanes, committedTransitions) {
10120 if (parentFiber.subtreeFlags & 10256)
10121 for (parentFiber = parentFiber.child; null !== parentFiber; )
10122 commitPassiveMountOnFiber(
10123 root2,
10124 parentFiber,
10125 committedLanes,
10126 committedTransitions
10127 ), parentFiber = parentFiber.sibling;
10128 }
10129 function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
10130 var flags = finishedWork.flags;
10131 switch (finishedWork.tag) {
10132 case 0:
10133 case 11:
10134 case 15:
10135 recursivelyTraversePassiveMountEffects(
10136 finishedRoot,
10137 finishedWork,
10138 committedLanes,
10139 committedTransitions
10140 );
10141 flags & 2048 && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
10142 break;
10143 case 1:
10144 recursivelyTraversePassiveMountEffects(
10145 finishedRoot,
10146 finishedWork,
10147 committedLanes,
10148 committedTransitions
10149 );
10150 break;
10151 case 3:
10152 var prevEffectDuration = pushNestedEffectDurations();
10153 recursivelyTraversePassiveMountEffects(
10154 finishedRoot,
10155 finishedWork,
10156 committedLanes,
10157 committedTransitions
10158 );
10159 flags & 2048 && (committedLanes = null, null !== finishedWork.alternate && (committedLanes = finishedWork.alternate.memoizedState.cache), finishedWork = finishedWork.memoizedState.cache, finishedWork !== committedLanes && (retainCache(finishedWork), null != committedLanes && releaseCache(committedLanes)));
10160 finishedRoot.passiveEffectDuration += popNestedEffectDurations(prevEffectDuration);
10161 break;
10162 case 12:
10163 if (flags & 2048) {
10164 flags = pushNestedEffectDurations();
10165 recursivelyTraversePassiveMountEffects(
10166 finishedRoot,
10167 finishedWork,
10168 committedLanes,
10169 committedTransitions
10170 );
10171 finishedRoot = finishedWork.stateNode;
10172 finishedRoot.passiveEffectDuration += bubbleNestedEffectDurations(flags);
10173 try {
10174 runWithFiberInDEV(
10175 finishedWork,
10176 commitProfilerPostCommitImpl,
10177 finishedWork,
10178 finishedWork.alternate,
10179 commitStartTime,
10180 finishedRoot.passiveEffectDuration
10181 );
10182 } catch (error) {
10183 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10184 }
10185 } else
10186 recursivelyTraversePassiveMountEffects(
10187 finishedRoot,
10188 finishedWork,
10189 committedLanes,
10190 committedTransitions
10191 );
10192 break;
10193 case 13:
10194 recursivelyTraversePassiveMountEffects(
10195 finishedRoot,
10196 finishedWork,
10197 committedLanes,
10198 committedTransitions
10199 );
10200 break;
10201 case 23:
10202 break;
10203 case 22:
10204 prevEffectDuration = finishedWork.stateNode;
10205 var _current = finishedWork.alternate;
10206 null !== finishedWork.memoizedState ? prevEffectDuration._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
10207 finishedRoot,
10208 finishedWork,
10209 committedLanes,
10210 committedTransitions
10211 ) : recursivelyTraverseAtomicPassiveEffects(
10212 finishedRoot,
10213 finishedWork
10214 ) : prevEffectDuration._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
10215 finishedRoot,
10216 finishedWork,
10217 committedLanes,
10218 committedTransitions
10219 ) : (prevEffectDuration._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
10220 finishedRoot,
10221 finishedWork,
10222 committedLanes,
10223 committedTransitions,
10224 0 !== (finishedWork.subtreeFlags & 10256)
10225 ));
10226 flags & 2048 && commitOffscreenPassiveMountEffects(_current, finishedWork);
10227 break;
10228 case 24:
10229 recursivelyTraversePassiveMountEffects(
10230 finishedRoot,
10231 finishedWork,
10232 committedLanes,
10233 committedTransitions
10234 );
10235 flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
10236 break;
10237 default:
10238 recursivelyTraversePassiveMountEffects(
10239 finishedRoot,
10240 finishedWork,
10241 committedLanes,
10242 committedTransitions
10243 );
10244 }
10245 }
10246 function recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects) {
10247 includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256);
10248 for (parentFiber = parentFiber.child; null !== parentFiber; )
10249 reconnectPassiveEffects(
10250 finishedRoot,
10251 parentFiber,
10252 committedLanes,
10253 committedTransitions,
10254 includeWorkInProgressEffects
10255 ), parentFiber = parentFiber.sibling;
10256 }
10257 function reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects) {
10258 var flags = finishedWork.flags;
10259 switch (finishedWork.tag) {
10260 case 0:
10261 case 11:
10262 case 15:
10263 recursivelyTraverseReconnectPassiveEffects(
10264 finishedRoot,
10265 finishedWork,
10266 committedLanes,
10267 committedTransitions,
10268 includeWorkInProgressEffects
10269 );
10270 commitHookPassiveMountEffects(finishedWork, Passive);
10271 break;
10272 case 23:
10273 break;
10274 case 22:
10275 var _instance2 = finishedWork.stateNode;
10276 null !== finishedWork.memoizedState ? _instance2._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraverseReconnectPassiveEffects(
10277 finishedRoot,
10278 finishedWork,
10279 committedLanes,
10280 committedTransitions,
10281 includeWorkInProgressEffects
10282 ) : recursivelyTraverseAtomicPassiveEffects(
10283 finishedRoot,
10284 finishedWork
10285 ) : (_instance2._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
10286 finishedRoot,
10287 finishedWork,
10288 committedLanes,
10289 committedTransitions,
10290 includeWorkInProgressEffects
10291 ));
10292 includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
10293 finishedWork.alternate,
10294 finishedWork
10295 );
10296 break;
10297 case 24:
10298 recursivelyTraverseReconnectPassiveEffects(
10299 finishedRoot,
10300 finishedWork,
10301 committedLanes,
10302 committedTransitions,
10303 includeWorkInProgressEffects
10304 );
10305 includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
10306 break;
10307 default:
10308 recursivelyTraverseReconnectPassiveEffects(
10309 finishedRoot,
10310 finishedWork,
10311 committedLanes,
10312 committedTransitions,
10313 includeWorkInProgressEffects
10314 );
10315 }
10316 }
10317 function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber) {
10318 if (parentFiber.subtreeFlags & 10256)
10319 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
10320 var finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags;
10321 switch (finishedWork.tag) {
10322 case 22:
10323 recursivelyTraverseAtomicPassiveEffects(
10324 finishedRoot,
10325 finishedWork
10326 );
10327 flags & 2048 && commitOffscreenPassiveMountEffects(
10328 finishedWork.alternate,
10329 finishedWork
10330 );
10331 break;
10332 case 24:
10333 recursivelyTraverseAtomicPassiveEffects(
10334 finishedRoot,
10335 finishedWork
10336 );
10337 flags & 2048 && commitCachePassiveMountEffect(
10338 finishedWork.alternate,
10339 finishedWork
10340 );
10341 break;
10342 default:
10343 recursivelyTraverseAtomicPassiveEffects(
10344 finishedRoot,
10345 finishedWork
10346 );
10347 }
10348 parentFiber = parentFiber.sibling;
10349 }
10350 }
10351 function recursivelyAccumulateSuspenseyCommit(parentFiber) {
10352 if (parentFiber.subtreeFlags & suspenseyCommitFlag)
10353 for (parentFiber = parentFiber.child; null !== parentFiber; )
10354 accumulateSuspenseyCommitOnFiber(parentFiber), parentFiber = parentFiber.sibling;
10355 }
10356 function accumulateSuspenseyCommitOnFiber(fiber) {
10357 switch (fiber.tag) {
10358 case 26:
10359 recursivelyAccumulateSuspenseyCommit(fiber);
10360 fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState && suspendResource(
10361 currentHoistableRoot,
10362 fiber.memoizedState,
10363 fiber.memoizedProps
10364 );
10365 break;
10366 case 5:
10367 recursivelyAccumulateSuspenseyCommit(fiber);
10368 break;
10369 case 3:
10370 case 4:
10371 var previousHoistableRoot = currentHoistableRoot;
10372 currentHoistableRoot = getHoistableRoot(
10373 fiber.stateNode.containerInfo
10374 );
10375 recursivelyAccumulateSuspenseyCommit(fiber);
10376 currentHoistableRoot = previousHoistableRoot;
10377 break;
10378 case 22:
10379 null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(fiber), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(fiber));
10380 break;
10381 default:
10382 recursivelyAccumulateSuspenseyCommit(fiber);
10383 }
10384 }
10385 function detachAlternateSiblings(parentFiber) {
10386 var previousFiber = parentFiber.alternate;
10387 if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
10388 previousFiber.child = null;
10389 do
10390 previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
10391 while (null !== parentFiber);
10392 }
10393 }
10394 function recursivelyTraversePassiveUnmountEffects(parentFiber) {
10395 var deletions = parentFiber.deletions;
10396 if (0 !== (parentFiber.flags & 16)) {
10397 if (null !== deletions)
10398 for (var i = 0; i < deletions.length; i++) {
10399 var childToDelete = deletions[i];
10400 nextEffect = childToDelete;
10401 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
10402 childToDelete,
10403 parentFiber
10404 );
10405 }
10406 detachAlternateSiblings(parentFiber);
10407 }
10408 if (parentFiber.subtreeFlags & 10256)
10409 for (parentFiber = parentFiber.child; null !== parentFiber; )
10410 commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
10411 }
10412 function commitPassiveUnmountOnFiber(finishedWork) {
10413 switch (finishedWork.tag) {
10414 case 0:
10415 case 11:
10416 case 15:
10417 recursivelyTraversePassiveUnmountEffects(finishedWork);
10418 finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(
10419 finishedWork,
10420 finishedWork.return,
10421 Passive | HasEffect
10422 );
10423 break;
10424 case 3:
10425 var prevEffectDuration = pushNestedEffectDurations();
10426 recursivelyTraversePassiveUnmountEffects(finishedWork);
10427 finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(prevEffectDuration);
10428 break;
10429 case 12:
10430 prevEffectDuration = pushNestedEffectDurations();
10431 recursivelyTraversePassiveUnmountEffects(finishedWork);
10432 finishedWork.stateNode.passiveEffectDuration += bubbleNestedEffectDurations(prevEffectDuration);
10433 break;
10434 case 22:
10435 prevEffectDuration = finishedWork.stateNode;
10436 null !== finishedWork.memoizedState && prevEffectDuration._visibility & OffscreenPassiveEffectsConnected && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (prevEffectDuration._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork);
10437 break;
10438 default:
10439 recursivelyTraversePassiveUnmountEffects(finishedWork);
10440 }
10441 }
10442 function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
10443 var deletions = parentFiber.deletions;
10444 if (0 !== (parentFiber.flags & 16)) {
10445 if (null !== deletions)
10446 for (var i = 0; i < deletions.length; i++) {
10447 var childToDelete = deletions[i];
10448 nextEffect = childToDelete;
10449 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
10450 childToDelete,
10451 parentFiber
10452 );
10453 }
10454 detachAlternateSiblings(parentFiber);
10455 }
10456 for (parentFiber = parentFiber.child; null !== parentFiber; )
10457 disconnectPassiveEffect(parentFiber), parentFiber = parentFiber.sibling;
10458 }
10459 function disconnectPassiveEffect(finishedWork) {
10460 switch (finishedWork.tag) {
10461 case 0:
10462 case 11:
10463 case 15:
10464 commitHookPassiveUnmountEffects(
10465 finishedWork,
10466 finishedWork.return,
10467 Passive
10468 );
10469 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
10470 break;
10471 case 22:
10472 var instance = finishedWork.stateNode;
10473 instance._visibility & OffscreenPassiveEffectsConnected && (instance._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork));
10474 break;
10475 default:
10476 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
10477 }
10478 }
10479 function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
10480 for (; null !== nextEffect; ) {
10481 var fiber = nextEffect, current2 = fiber;
10482 switch (current2.tag) {
10483 case 0:
10484 case 11:
10485 case 15:
10486 commitHookPassiveUnmountEffects(
10487 current2,
10488 nearestMountedAncestor,
10489 Passive
10490 );
10491 break;
10492 case 23:
10493 case 22:
10494 null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (current2 = current2.memoizedState.cachePool.pool, null != current2 && retainCache(current2));
10495 break;
10496 case 24:
10497 releaseCache(current2.memoizedState.cache);
10498 }
10499 current2 = fiber.child;
10500 if (null !== current2) current2.return = fiber, nextEffect = current2;
10501 else
10502 a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
10503 current2 = nextEffect;
10504 var sibling = current2.sibling, returnFiber = current2.return;
10505 detachFiberAfterEffects(current2);
10506 if (current2 === fiber) {
10507 nextEffect = null;
10508 break a;
10509 }
10510 if (null !== sibling) {
10511 sibling.return = returnFiber;
10512 nextEffect = sibling;
10513 break a;
10514 }
10515 nextEffect = returnFiber;
10516 }
10517 }
10518 }
10519 function onCommitRoot() {
10520 commitHooks.forEach(function(commitHook) {
10521 return commitHook();
10522 });
10523 }
10524 function isConcurrentActEnvironment() {
10525 var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0;
10526 isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || console.error(
10527 "The current testing environment is not configured to support act(...)"
10528 );
10529 return isReactActEnvironmentGlobal;
10530 }
10531 function requestUpdateLane(fiber) {
10532 if ((executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes)
10533 return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
10534 var transition = ReactSharedInternals.T;
10535 return null !== transition ? (transition._updatedFibers || (transition._updatedFibers = /* @__PURE__ */ new Set()), transition._updatedFibers.add(fiber), fiber = currentEntangledLane, 0 !== fiber ? fiber : requestTransitionLane()) : resolveUpdatePriority();
10536 }
10537 function requestDeferredLane() {
10538 0 === workInProgressDeferredLane && (workInProgressDeferredLane = 0 === (workInProgressRootRenderLanes & 536870912) || isHydrating ? claimNextTransitionLane() : 536870912);
10539 var suspenseHandler = suspenseHandlerStackCursor.current;
10540 null !== suspenseHandler && (suspenseHandler.flags |= 32);
10541 return workInProgressDeferredLane;
10542 }
10543 function scheduleUpdateOnFiber(root2, fiber, lane) {
10544 isRunningInsertionEffect && console.error("useInsertionEffect must not schedule updates.");
10545 isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
10546 if (root2 === workInProgressRoot && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
10547 prepareFreshStack(root2, 0), markRootSuspended(
10548 root2,
10549 workInProgressRootRenderLanes,
10550 workInProgressDeferredLane,
10551 false
10552 );
10553 markRootUpdated$1(root2, lane);
10554 if (0 !== (executionContext & RenderContext) && root2 === workInProgressRoot) {
10555 if (isRendering)
10556 switch (fiber.tag) {
10557 case 0:
10558 case 11:
10559 case 15:
10560 root2 = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
10561 didWarnAboutUpdateInRenderForAnotherComponent.has(root2) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root2), fiber = getComponentNameFromFiber(fiber) || "Unknown", console.error(
10562 "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",
10563 fiber,
10564 root2,
10565 root2
10566 ));
10567 break;
10568 case 1:
10569 didWarnAboutUpdateInRender || (console.error(
10570 "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
10571 ), didWarnAboutUpdateInRender = true);
10572 }
10573 } else
10574 isDevToolsPresent && addFiberToLanesMap(root2, fiber, lane), warnIfUpdatesNotWrappedWithActDEV(fiber), root2 === workInProgressRoot && ((executionContext & RenderContext) === NoContext && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === RootSuspendedWithDelay && markRootSuspended(
10575 root2,
10576 workInProgressRootRenderLanes,
10577 workInProgressDeferredLane,
10578 false
10579 )), ensureRootIsScheduled(root2);
10580 }
10581 function performWorkOnRoot(root2, lanes, forceSync) {
10582 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
10583 throw Error("Should not already be working.");
10584 var shouldTimeSlice = !forceSync && 0 === (lanes & 124) && 0 === (lanes & root2.expiredLanes) || checkIfRootIsPrerendering(root2, lanes), exitStatus = shouldTimeSlice ? renderRootConcurrent(root2, lanes) : renderRootSync(root2, lanes, true), renderWasConcurrent = shouldTimeSlice;
10585 do {
10586 if (exitStatus === RootInProgress) {
10587 workInProgressRootIsPrerendering && !shouldTimeSlice && markRootSuspended(root2, lanes, 0, false);
10588 break;
10589 } else {
10590 forceSync = root2.current.alternate;
10591 if (renderWasConcurrent && !isRenderConsistentWithExternalStores(forceSync)) {
10592 exitStatus = renderRootSync(root2, lanes, false);
10593 renderWasConcurrent = false;
10594 continue;
10595 }
10596 if (exitStatus === RootErrored) {
10597 renderWasConcurrent = lanes;
10598 if (root2.errorRecoveryDisabledLanes & renderWasConcurrent)
10599 var errorRetryLanes = 0;
10600 else
10601 errorRetryLanes = root2.pendingLanes & -536870913, errorRetryLanes = 0 !== errorRetryLanes ? errorRetryLanes : errorRetryLanes & 536870912 ? 536870912 : 0;
10602 if (0 !== errorRetryLanes) {
10603 lanes = errorRetryLanes;
10604 a: {
10605 exitStatus = root2;
10606 var errorRetryLanes$jscomp$0 = errorRetryLanes;
10607 errorRetryLanes = workInProgressRootConcurrentErrors;
10608 var wasRootDehydrated = exitStatus.current.memoizedState.isDehydrated;
10609 wasRootDehydrated && (prepareFreshStack(
10610 exitStatus,
10611 errorRetryLanes$jscomp$0
10612 ).flags |= 256);
10613 errorRetryLanes$jscomp$0 = renderRootSync(
10614 exitStatus,
10615 errorRetryLanes$jscomp$0,
10616 false
10617 );
10618 if (errorRetryLanes$jscomp$0 !== RootErrored) {
10619 if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
10620 exitStatus.errorRecoveryDisabledLanes |= renderWasConcurrent;
10621 workInProgressRootInterleavedUpdatedLanes |= renderWasConcurrent;
10622 exitStatus = RootSuspendedWithDelay;
10623 break a;
10624 }
10625 exitStatus = workInProgressRootRecoverableErrors;
10626 workInProgressRootRecoverableErrors = errorRetryLanes;
10627 null !== exitStatus && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = exitStatus : workInProgressRootRecoverableErrors.push.apply(
10628 workInProgressRootRecoverableErrors,
10629 exitStatus
10630 ));
10631 }
10632 exitStatus = errorRetryLanes$jscomp$0;
10633 }
10634 renderWasConcurrent = false;
10635 if (exitStatus !== RootErrored) continue;
10636 }
10637 }
10638 if (exitStatus === RootFatalErrored) {
10639 prepareFreshStack(root2, 0);
10640 markRootSuspended(root2, lanes, 0, true);
10641 break;
10642 }
10643 a: {
10644 shouldTimeSlice = root2;
10645 switch (exitStatus) {
10646 case RootInProgress:
10647 case RootFatalErrored:
10648 throw Error("Root did not complete. This is a bug in React.");
10649 case RootSuspendedWithDelay:
10650 if ((lanes & 4194048) !== lanes) break;
10651 case RootSuspendedAtTheShell:
10652 markRootSuspended(
10653 shouldTimeSlice,
10654 lanes,
10655 workInProgressDeferredLane,
10656 !workInProgressRootDidSkipSuspendedSiblings
10657 );
10658 break a;
10659 case RootErrored:
10660 workInProgressRootRecoverableErrors = null;
10661 break;
10662 case RootSuspended:
10663 case RootCompleted:
10664 break;
10665 default:
10666 throw Error("Unknown root exit status.");
10667 }
10668 if (null !== ReactSharedInternals.actQueue)
10669 commitRoot(
10670 shouldTimeSlice,
10671 forceSync,
10672 lanes,
10673 workInProgressRootRecoverableErrors,
10674 workInProgressTransitions,
10675 workInProgressRootDidIncludeRecursiveRenderUpdate,
10676 workInProgressDeferredLane,
10677 workInProgressRootInterleavedUpdatedLanes,
10678 workInProgressSuspendedRetryLanes
10679 );
10680 else {
10681 if ((lanes & 62914560) === lanes && (renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(), 10 < renderWasConcurrent)) {
10682 markRootSuspended(
10683 shouldTimeSlice,
10684 lanes,
10685 workInProgressDeferredLane,
10686 !workInProgressRootDidSkipSuspendedSiblings
10687 );
10688 if (0 !== getNextLanes(shouldTimeSlice, 0, true)) break a;
10689 shouldTimeSlice.timeoutHandle = scheduleTimeout(
10690 commitRootWhenReady.bind(
10691 null,
10692 shouldTimeSlice,
10693 forceSync,
10694 workInProgressRootRecoverableErrors,
10695 workInProgressTransitions,
10696 workInProgressRootDidIncludeRecursiveRenderUpdate,
10697 lanes,
10698 workInProgressDeferredLane,
10699 workInProgressRootInterleavedUpdatedLanes,
10700 workInProgressSuspendedRetryLanes,
10701 workInProgressRootDidSkipSuspendedSiblings,
10702 exitStatus,
10703 THROTTLED_COMMIT,
10704 renderStartTime,
10705 0
10706 ),
10707 renderWasConcurrent
10708 );
10709 break a;
10710 }
10711 commitRootWhenReady(
10712 shouldTimeSlice,
10713 forceSync,
10714 workInProgressRootRecoverableErrors,
10715 workInProgressTransitions,
10716 workInProgressRootDidIncludeRecursiveRenderUpdate,
10717 lanes,
10718 workInProgressDeferredLane,
10719 workInProgressRootInterleavedUpdatedLanes,
10720 workInProgressSuspendedRetryLanes,
10721 workInProgressRootDidSkipSuspendedSiblings,
10722 exitStatus,
10723 IMMEDIATE_COMMIT,
10724 renderStartTime,
10725 0
10726 );
10727 }
10728 }
10729 }
10730 break;
10731 } while (1);
10732 ensureRootIsScheduled(root2);
10733 }
10734 function commitRootWhenReady(root2, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
10735 root2.timeoutHandle = noTimeout;
10736 suspendedCommitReason = finishedWork.subtreeFlags;
10737 if (suspendedCommitReason & 8192 || 16785408 === (suspendedCommitReason & 16785408)) {
10738 if (suspendedState = { stylesheets: null, count: 0, unsuspend: noop }, accumulateSuspenseyCommitOnFiber(finishedWork), suspendedCommitReason = waitForCommitToBeReady(), null !== suspendedCommitReason) {
10739 root2.cancelPendingCommit = suspendedCommitReason(
10740 commitRoot.bind(
10741 null,
10742 root2,
10743 finishedWork,
10744 lanes,
10745 recoverableErrors,
10746 transitions,
10747 didIncludeRenderPhaseUpdate,
10748 spawnedLane,
10749 updatedLanes,
10750 suspendedRetryLanes,
10751 exitStatus,
10752 SUSPENDED_COMMIT,
10753 completedRenderStartTime,
10754 completedRenderEndTime
10755 )
10756 );
10757 markRootSuspended(
10758 root2,
10759 lanes,
10760 spawnedLane,
10761 !didSkipSuspendedSiblings
10762 );
10763 return;
10764 }
10765 }
10766 commitRoot(
10767 root2,
10768 finishedWork,
10769 lanes,
10770 recoverableErrors,
10771 transitions,
10772 didIncludeRenderPhaseUpdate,
10773 spawnedLane,
10774 updatedLanes,
10775 suspendedRetryLanes
10776 );
10777 }
10778 function isRenderConsistentWithExternalStores(finishedWork) {
10779 for (var node = finishedWork; ; ) {
10780 var tag = node.tag;
10781 if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
10782 for (var i = 0; i < tag.length; i++) {
10783 var check = tag[i], getSnapshot = check.getSnapshot;
10784 check = check.value;
10785 try {
10786 if (!objectIs(getSnapshot(), check)) return false;
10787 } catch (error) {
10788 return false;
10789 }
10790 }
10791 tag = node.child;
10792 if (node.subtreeFlags & 16384 && null !== tag)
10793 tag.return = node, node = tag;
10794 else {
10795 if (node === finishedWork) break;
10796 for (; null === node.sibling; ) {
10797 if (null === node.return || node.return === finishedWork) return true;
10798 node = node.return;
10799 }
10800 node.sibling.return = node.return;
10801 node = node.sibling;
10802 }
10803 }
10804 return true;
10805 }
10806 function markRootSuspended(root2, suspendedLanes, spawnedLane, didAttemptEntireTree) {
10807 suspendedLanes &= ~workInProgressRootPingedLanes;
10808 suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
10809 root2.suspendedLanes |= suspendedLanes;
10810 root2.pingedLanes &= ~suspendedLanes;
10811 didAttemptEntireTree && (root2.warmLanes |= suspendedLanes);
10812 didAttemptEntireTree = root2.expirationTimes;
10813 for (var lanes = suspendedLanes; 0 < lanes; ) {
10814 var index = 31 - clz32(lanes), lane = 1 << index;
10815 didAttemptEntireTree[index] = -1;
10816 lanes &= ~lane;
10817 }
10818 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, suspendedLanes);
10819 }
10820 function flushSyncWork$1() {
10821 return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
10822 }
10823 function resetWorkInProgressStack() {
10824 if (null !== workInProgress) {
10825 if (workInProgressSuspendedReason === NotSuspended)
10826 var interruptedWork = workInProgress.return;
10827 else
10828 interruptedWork = workInProgress, resetContextDependencies(), resetHooksOnUnwind(interruptedWork), thenableState = null, thenableIndexCounter = 0, interruptedWork = workInProgress;
10829 for (; null !== interruptedWork; )
10830 unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
10831 workInProgress = null;
10832 }
10833 }
10834 function prepareFreshStack(root2, lanes) {
10835 var timeoutHandle = root2.timeoutHandle;
10836 timeoutHandle !== noTimeout && (root2.timeoutHandle = noTimeout, cancelTimeout(timeoutHandle));
10837 timeoutHandle = root2.cancelPendingCommit;
10838 null !== timeoutHandle && (root2.cancelPendingCommit = null, timeoutHandle());
10839 resetWorkInProgressStack();
10840 workInProgressRoot = root2;
10841 workInProgress = timeoutHandle = createWorkInProgress(root2.current, null);
10842 workInProgressRootRenderLanes = lanes;
10843 workInProgressSuspendedReason = NotSuspended;
10844 workInProgressThrownValue = null;
10845 workInProgressRootDidSkipSuspendedSiblings = false;
10846 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root2, lanes);
10847 workInProgressRootDidAttachPingListener = false;
10848 workInProgressRootExitStatus = RootInProgress;
10849 workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
10850 workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
10851 workInProgressRootDidIncludeRecursiveRenderUpdate = false;
10852 0 !== (lanes & 8) && (lanes |= lanes & 32);
10853 var allEntangledLanes = root2.entangledLanes;
10854 if (0 !== allEntangledLanes)
10855 for (root2 = root2.entanglements, allEntangledLanes &= lanes; 0 < allEntangledLanes; ) {
10856 var index = 31 - clz32(allEntangledLanes), lane = 1 << index;
10857 lanes |= root2[index];
10858 allEntangledLanes &= ~lane;
10859 }
10860 entangledRenderLanes = lanes;
10861 finishQueueingConcurrentUpdates();
10862 lanes = getCurrentTime();
10863 1e3 < lanes - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = lanes);
10864 ReactStrictModeWarnings.discardPendingWarnings();
10865 return timeoutHandle;
10866 }
10867 function handleThrow(root2, thrownValue) {
10868 currentlyRenderingFiber = null;
10869 ReactSharedInternals.H = ContextOnlyDispatcher;
10870 ReactSharedInternals.getCurrentStack = null;
10871 isRendering = false;
10872 current = null;
10873 thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnImmediate) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnInstance) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? SuspendedOnHydration : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then ? SuspendedOnDeprecatedThrowPromise : SuspendedOnError;
10874 workInProgressThrownValue = thrownValue;
10875 var erroredWork = workInProgress;
10876 if (null === erroredWork)
10877 workInProgressRootExitStatus = RootFatalErrored, logUncaughtError(
10878 root2,
10879 createCapturedValueAtFiber(thrownValue, root2.current)
10880 );
10881 else
10882 switch (erroredWork.mode & ProfileMode && stopProfilerTimerIfRunningAndRecordDuration(erroredWork), markComponentRenderStopped(), workInProgressSuspendedReason) {
10883 case SuspendedOnError:
10884 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentErrored && injectedProfilingHooks.markComponentErrored(
10885 erroredWork,
10886 thrownValue,
10887 workInProgressRootRenderLanes
10888 );
10889 break;
10890 case SuspendedOnData:
10891 case SuspendedOnAction:
10892 case SuspendedOnImmediate:
10893 case SuspendedOnDeprecatedThrowPromise:
10894 case SuspendedAndReadyToContinue:
10895 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markComponentSuspended && injectedProfilingHooks.markComponentSuspended(
10896 erroredWork,
10897 thrownValue,
10898 workInProgressRootRenderLanes
10899 );
10900 }
10901 }
10902 function pushDispatcher() {
10903 var prevDispatcher = ReactSharedInternals.H;
10904 ReactSharedInternals.H = ContextOnlyDispatcher;
10905 return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
10906 }
10907 function pushAsyncDispatcher() {
10908 var prevAsyncDispatcher = ReactSharedInternals.A;
10909 ReactSharedInternals.A = DefaultAsyncDispatcher;
10910 return prevAsyncDispatcher;
10911 }
10912 function renderDidSuspendDelayIfPossible() {
10913 workInProgressRootExitStatus = RootSuspendedWithDelay;
10914 workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && null !== suspenseHandlerStackCursor.current || (workInProgressRootIsPrerendering = true);
10915 0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) || null === workInProgressRoot || markRootSuspended(
10916 workInProgressRoot,
10917 workInProgressRootRenderLanes,
10918 workInProgressDeferredLane,
10919 false
10920 );
10921 }
10922 function renderRootSync(root2, lanes, shouldYieldForPrerendering) {
10923 var prevExecutionContext = executionContext;
10924 executionContext |= RenderContext;
10925 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
10926 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
10927 if (isDevToolsPresent) {
10928 var memoizedUpdaters = root2.memoizedUpdaters;
10929 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
10930 movePendingFibersToMemoized(root2, lanes);
10931 }
10932 workInProgressTransitions = null;
10933 prepareFreshStack(root2, lanes);
10934 }
10935 markRenderStarted(lanes);
10936 lanes = false;
10937 memoizedUpdaters = workInProgressRootExitStatus;
10938 a: do
10939 try {
10940 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress) {
10941 var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
10942 switch (workInProgressSuspendedReason) {
10943 case SuspendedOnHydration:
10944 resetWorkInProgressStack();
10945 memoizedUpdaters = RootSuspendedAtTheShell;
10946 break a;
10947 case SuspendedOnImmediate:
10948 case SuspendedOnData:
10949 case SuspendedOnAction:
10950 case SuspendedOnDeprecatedThrowPromise:
10951 null === suspenseHandlerStackCursor.current && (lanes = true);
10952 var reason = workInProgressSuspendedReason;
10953 workInProgressSuspendedReason = NotSuspended;
10954 workInProgressThrownValue = null;
10955 throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
10956 if (shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
10957 memoizedUpdaters = RootInProgress;
10958 break a;
10959 }
10960 break;
10961 default:
10962 reason = workInProgressSuspendedReason, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
10963 }
10964 }
10965 workLoopSync();
10966 memoizedUpdaters = workInProgressRootExitStatus;
10967 break;
10968 } catch (thrownValue$8) {
10969 handleThrow(root2, thrownValue$8);
10970 }
10971 while (1);
10972 lanes && root2.shellSuspendCounter++;
10973 resetContextDependencies();
10974 executionContext = prevExecutionContext;
10975 ReactSharedInternals.H = prevDispatcher;
10976 ReactSharedInternals.A = prevAsyncDispatcher;
10977 markRenderStopped();
10978 null === workInProgress && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates());
10979 return memoizedUpdaters;
10980 }
10981 function workLoopSync() {
10982 for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
10983 }
10984 function renderRootConcurrent(root2, lanes) {
10985 var prevExecutionContext = executionContext;
10986 executionContext |= RenderContext;
10987 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
10988 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
10989 if (isDevToolsPresent) {
10990 var memoizedUpdaters = root2.memoizedUpdaters;
10991 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
10992 movePendingFibersToMemoized(root2, lanes);
10993 }
10994 workInProgressTransitions = null;
10995 workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;
10996 prepareFreshStack(root2, lanes);
10997 } else
10998 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
10999 root2,
11000 lanes
11001 );
11002 markRenderStarted(lanes);
11003 a: do
11004 try {
11005 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress)
11006 b: switch (lanes = workInProgress, memoizedUpdaters = workInProgressThrownValue, workInProgressSuspendedReason) {
11007 case SuspendedOnError:
11008 workInProgressSuspendedReason = NotSuspended;
11009 workInProgressThrownValue = null;
11010 throwAndUnwindWorkLoop(
11011 root2,
11012 lanes,
11013 memoizedUpdaters,
11014 SuspendedOnError
11015 );
11016 break;
11017 case SuspendedOnData:
11018 case SuspendedOnAction:
11019 if (isThenableResolved(memoizedUpdaters)) {
11020 workInProgressSuspendedReason = NotSuspended;
11021 workInProgressThrownValue = null;
11022 replaySuspendedUnitOfWork(lanes);
11023 break;
11024 }
11025 lanes = function() {
11026 workInProgressSuspendedReason !== SuspendedOnData && workInProgressSuspendedReason !== SuspendedOnAction || workInProgressRoot !== root2 || (workInProgressSuspendedReason = SuspendedAndReadyToContinue);
11027 ensureRootIsScheduled(root2);
11028 };
11029 memoizedUpdaters.then(lanes, lanes);
11030 break a;
11031 case SuspendedOnImmediate:
11032 workInProgressSuspendedReason = SuspendedAndReadyToContinue;
11033 break a;
11034 case SuspendedOnInstance:
11035 workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;
11036 break a;
11037 case SuspendedAndReadyToContinue:
11038 isThenableResolved(memoizedUpdaters) ? (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(
11039 root2,
11040 lanes,
11041 memoizedUpdaters,
11042 SuspendedAndReadyToContinue
11043 ));
11044 break;
11045 case SuspendedOnInstanceAndReadyToContinue:
11046 var resource = null;
11047 switch (workInProgress.tag) {
11048 case 26:
11049 resource = workInProgress.memoizedState;
11050 case 5:
11051 case 27:
11052 var hostFiber = workInProgress;
11053 if (resource ? preloadResource(resource) : 1) {
11054 workInProgressSuspendedReason = NotSuspended;
11055 workInProgressThrownValue = null;
11056 var sibling = hostFiber.sibling;
11057 if (null !== sibling) workInProgress = sibling;
11058 else {
11059 var returnFiber = hostFiber.return;
11060 null !== returnFiber ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
11061 }
11062 break b;
11063 }
11064 break;
11065 default:
11066 console.error(
11067 "Unexpected type of fiber triggered a suspensey commit. This is a bug in React."
11068 );
11069 }
11070 workInProgressSuspendedReason = NotSuspended;
11071 workInProgressThrownValue = null;
11072 throwAndUnwindWorkLoop(
11073 root2,
11074 lanes,
11075 memoizedUpdaters,
11076 SuspendedOnInstanceAndReadyToContinue
11077 );
11078 break;
11079 case SuspendedOnDeprecatedThrowPromise:
11080 workInProgressSuspendedReason = NotSuspended;
11081 workInProgressThrownValue = null;
11082 throwAndUnwindWorkLoop(
11083 root2,
11084 lanes,
11085 memoizedUpdaters,
11086 SuspendedOnDeprecatedThrowPromise
11087 );
11088 break;
11089 case SuspendedOnHydration:
11090 resetWorkInProgressStack();
11091 workInProgressRootExitStatus = RootSuspendedAtTheShell;
11092 break a;
11093 default:
11094 throw Error(
11095 "Unexpected SuspendedReason. This is a bug in React."
11096 );
11097 }
11098 null !== ReactSharedInternals.actQueue ? workLoopSync() : workLoopConcurrentByScheduler();
11099 break;
11100 } catch (thrownValue$9) {
11101 handleThrow(root2, thrownValue$9);
11102 }
11103 while (1);
11104 resetContextDependencies();
11105 ReactSharedInternals.H = prevDispatcher;
11106 ReactSharedInternals.A = prevAsyncDispatcher;
11107 executionContext = prevExecutionContext;
11108 if (null !== workInProgress)
11109 return null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markRenderYielded && injectedProfilingHooks.markRenderYielded(), RootInProgress;
11110 markRenderStopped();
11111 workInProgressRoot = null;
11112 workInProgressRootRenderLanes = 0;
11113 finishQueueingConcurrentUpdates();
11114 return workInProgressRootExitStatus;
11115 }
11116 function workLoopConcurrentByScheduler() {
11117 for (; null !== workInProgress && !shouldYield(); )
11118 performUnitOfWork(workInProgress);
11119 }
11120 function performUnitOfWork(unitOfWork) {
11121 var current2 = unitOfWork.alternate;
11122 (unitOfWork.mode & ProfileMode) !== NoMode ? (startProfilerTimer(unitOfWork), current2 = runWithFiberInDEV(
11123 unitOfWork,
11124 beginWork,
11125 current2,
11126 unitOfWork,
11127 entangledRenderLanes
11128 ), stopProfilerTimerIfRunningAndRecordDuration(unitOfWork)) : current2 = runWithFiberInDEV(
11129 unitOfWork,
11130 beginWork,
11131 current2,
11132 unitOfWork,
11133 entangledRenderLanes
11134 );
11135 unitOfWork.memoizedProps = unitOfWork.pendingProps;
11136 null === current2 ? completeUnitOfWork(unitOfWork) : workInProgress = current2;
11137 }
11138 function replaySuspendedUnitOfWork(unitOfWork) {
11139 var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);
11140 unitOfWork.memoizedProps = unitOfWork.pendingProps;
11141 null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
11142 }
11143 function replayBeginWork(unitOfWork) {
11144 var current2 = unitOfWork.alternate, isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;
11145 isProfilingMode && startProfilerTimer(unitOfWork);
11146 switch (unitOfWork.tag) {
11147 case 15:
11148 case 0:
11149 current2 = replayFunctionComponent(
11150 current2,
11151 unitOfWork,
11152 unitOfWork.pendingProps,
11153 unitOfWork.type,
11154 void 0,
11155 workInProgressRootRenderLanes
11156 );
11157 break;
11158 case 11:
11159 current2 = replayFunctionComponent(
11160 current2,
11161 unitOfWork,
11162 unitOfWork.pendingProps,
11163 unitOfWork.type.render,
11164 unitOfWork.ref,
11165 workInProgressRootRenderLanes
11166 );
11167 break;
11168 case 5:
11169 resetHooksOnUnwind(unitOfWork);
11170 default:
11171 unwindInterruptedWork(current2, unitOfWork), unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, entangledRenderLanes), current2 = beginWork(current2, unitOfWork, entangledRenderLanes);
11172 }
11173 isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
11174 return current2;
11175 }
11176 function throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, suspendedReason) {
11177 resetContextDependencies();
11178 resetHooksOnUnwind(unitOfWork);
11179 thenableState = null;
11180 thenableIndexCounter = 0;
11181 var returnFiber = unitOfWork.return;
11182 try {
11183 if (throwException(
11184 root2,
11185 returnFiber,
11186 unitOfWork,
11187 thrownValue,
11188 workInProgressRootRenderLanes
11189 )) {
11190 workInProgressRootExitStatus = RootFatalErrored;
11191 logUncaughtError(
11192 root2,
11193 createCapturedValueAtFiber(thrownValue, root2.current)
11194 );
11195 workInProgress = null;
11196 return;
11197 }
11198 } catch (error) {
11199 if (null !== returnFiber) throw workInProgress = returnFiber, error;
11200 workInProgressRootExitStatus = RootFatalErrored;
11201 logUncaughtError(
11202 root2,
11203 createCapturedValueAtFiber(thrownValue, root2.current)
11204 );
11205 workInProgress = null;
11206 return;
11207 }
11208 if (unitOfWork.flags & 32768) {
11209 if (isHydrating || suspendedReason === SuspendedOnError) root2 = true;
11210 else if (workInProgressRootIsPrerendering || 0 !== (workInProgressRootRenderLanes & 536870912))
11211 root2 = false;
11212 else if (workInProgressRootDidSkipSuspendedSiblings = root2 = true, suspendedReason === SuspendedOnData || suspendedReason === SuspendedOnAction || suspendedReason === SuspendedOnImmediate || suspendedReason === SuspendedOnDeprecatedThrowPromise)
11213 suspendedReason = suspenseHandlerStackCursor.current, null !== suspendedReason && 13 === suspendedReason.tag && (suspendedReason.flags |= 16384);
11214 unwindUnitOfWork(unitOfWork, root2);
11215 } else completeUnitOfWork(unitOfWork);
11216 }
11217 function completeUnitOfWork(unitOfWork) {
11218 var completedWork = unitOfWork;
11219 do {
11220 if (0 !== (completedWork.flags & 32768)) {
11221 unwindUnitOfWork(
11222 completedWork,
11223 workInProgressRootDidSkipSuspendedSiblings
11224 );
11225 return;
11226 }
11227 var current2 = completedWork.alternate;
11228 unitOfWork = completedWork.return;
11229 startProfilerTimer(completedWork);
11230 current2 = runWithFiberInDEV(
11231 completedWork,
11232 completeWork,
11233 current2,
11234 completedWork,
11235 entangledRenderLanes
11236 );
11237 (completedWork.mode & ProfileMode) !== NoMode && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
11238 if (null !== current2) {
11239 workInProgress = current2;
11240 return;
11241 }
11242 completedWork = completedWork.sibling;
11243 if (null !== completedWork) {
11244 workInProgress = completedWork;
11245 return;
11246 }
11247 workInProgress = completedWork = unitOfWork;
11248 } while (null !== completedWork);
11249 workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted);
11250 }
11251 function unwindUnitOfWork(unitOfWork, skipSiblings) {
11252 do {
11253 var next = unwindWork(unitOfWork.alternate, unitOfWork);
11254 if (null !== next) {
11255 next.flags &= 32767;
11256 workInProgress = next;
11257 return;
11258 }
11259 if ((unitOfWork.mode & ProfileMode) !== NoMode) {
11260 stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
11261 next = unitOfWork.actualDuration;
11262 for (var child = unitOfWork.child; null !== child; )
11263 next += child.actualDuration, child = child.sibling;
11264 unitOfWork.actualDuration = next;
11265 }
11266 next = unitOfWork.return;
11267 null !== next && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null);
11268 if (!skipSiblings && (unitOfWork = unitOfWork.sibling, null !== unitOfWork)) {
11269 workInProgress = unitOfWork;
11270 return;
11271 }
11272 workInProgress = unitOfWork = next;
11273 } while (null !== unitOfWork);
11274 workInProgressRootExitStatus = RootSuspendedAtTheShell;
11275 workInProgress = null;
11276 }
11277 function commitRoot(root2, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes) {
11278 root2.cancelPendingCommit = null;
11279 do
11280 flushPendingEffects();
11281 while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
11282 ReactStrictModeWarnings.flushLegacyContextWarning();
11283 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
11284 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
11285 throw Error("Should not already be working.");
11286 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes);
11287 if (null === finishedWork) markCommitStopped();
11288 else {
11289 0 === lanes && console.error(
11290 "finishedLanes should not be empty during a commit. This is a bug in React."
11291 );
11292 if (finishedWork === root2.current)
11293 throw Error(
11294 "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
11295 );
11296 didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
11297 didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
11298 markRootFinished(
11299 root2,
11300 lanes,
11301 didIncludeRenderPhaseUpdate,
11302 spawnedLane,
11303 updatedLanes,
11304 suspendedRetryLanes
11305 );
11306 root2 === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0);
11307 pendingFinishedWork = finishedWork;
11308 pendingEffectsRoot = root2;
11309 pendingEffectsLanes = lanes;
11310 pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
11311 pendingPassiveTransitions = transitions;
11312 pendingRecoverableErrors = recoverableErrors;
11313 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? (root2.callbackNode = null, root2.callbackPriority = 0, scheduleCallback$1(NormalPriority$1, function() {
11314 flushPassiveEffects(true);
11315 return null;
11316 })) : (root2.callbackNode = null, root2.callbackPriority = 0);
11317 commitStartTime = now();
11318 recoverableErrors = 0 !== (finishedWork.flags & 13878);
11319 if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
11320 recoverableErrors = ReactSharedInternals.T;
11321 ReactSharedInternals.T = null;
11322 transitions = ReactDOMSharedInternals.p;
11323 ReactDOMSharedInternals.p = DiscreteEventPriority;
11324 spawnedLane = executionContext;
11325 executionContext |= CommitContext;
11326 try {
11327 commitBeforeMutationEffects(root2, finishedWork, lanes);
11328 } finally {
11329 executionContext = spawnedLane, ReactDOMSharedInternals.p = transitions, ReactSharedInternals.T = recoverableErrors;
11330 }
11331 }
11332 pendingEffectsStatus = PENDING_MUTATION_PHASE;
11333 flushMutationEffects();
11334 flushLayoutEffects();
11335 flushSpawnedWork();
11336 }
11337 }
11338 function flushMutationEffects() {
11339 if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
11340 pendingEffectsStatus = NO_PENDING_EFFECTS;
11341 var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
11342 if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
11343 rootMutationHasEffect = ReactSharedInternals.T;
11344 ReactSharedInternals.T = null;
11345 var previousPriority = ReactDOMSharedInternals.p;
11346 ReactDOMSharedInternals.p = DiscreteEventPriority;
11347 var prevExecutionContext = executionContext;
11348 executionContext |= CommitContext;
11349 try {
11350 inProgressLanes = lanes;
11351 inProgressRoot = root2;
11352 commitMutationEffectsOnFiber(finishedWork, root2);
11353 inProgressRoot = inProgressLanes = null;
11354 lanes = selectionInformation;
11355 var curFocusedElem = getActiveElementDeep(root2.containerInfo), priorFocusedElem = lanes.focusedElem, priorSelectionRange = lanes.selectionRange;
11356 if (curFocusedElem !== priorFocusedElem && priorFocusedElem && priorFocusedElem.ownerDocument && containsNode(
11357 priorFocusedElem.ownerDocument.documentElement,
11358 priorFocusedElem
11359 )) {
11360 if (null !== priorSelectionRange && hasSelectionCapabilities(priorFocusedElem)) {
11361 var start = priorSelectionRange.start, end = priorSelectionRange.end;
11362 void 0 === end && (end = start);
11363 if ("selectionStart" in priorFocusedElem)
11364 priorFocusedElem.selectionStart = start, priorFocusedElem.selectionEnd = Math.min(
11365 end,
11366 priorFocusedElem.value.length
11367 );
11368 else {
11369 var doc = priorFocusedElem.ownerDocument || document, win = doc && doc.defaultView || window;
11370 if (win.getSelection) {
11371 var selection = win.getSelection(), length = priorFocusedElem.textContent.length, start$jscomp$0 = Math.min(
11372 priorSelectionRange.start,
11373 length
11374 ), end$jscomp$0 = void 0 === priorSelectionRange.end ? start$jscomp$0 : Math.min(priorSelectionRange.end, length);
11375 !selection.extend && start$jscomp$0 > end$jscomp$0 && (curFocusedElem = end$jscomp$0, end$jscomp$0 = start$jscomp$0, start$jscomp$0 = curFocusedElem);
11376 var startMarker = getNodeForCharacterOffset(
11377 priorFocusedElem,
11378 start$jscomp$0
11379 ), endMarker = getNodeForCharacterOffset(
11380 priorFocusedElem,
11381 end$jscomp$0
11382 );
11383 if (startMarker && endMarker && (1 !== selection.rangeCount || selection.anchorNode !== startMarker.node || selection.anchorOffset !== startMarker.offset || selection.focusNode !== endMarker.node || selection.focusOffset !== endMarker.offset)) {
11384 var range = doc.createRange();
11385 range.setStart(startMarker.node, startMarker.offset);
11386 selection.removeAllRanges();
11387 start$jscomp$0 > end$jscomp$0 ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), selection.addRange(range));
11388 }
11389 }
11390 }
11391 }
11392 doc = [];
11393 for (selection = priorFocusedElem; selection = selection.parentNode; )
11394 1 === selection.nodeType && doc.push({
11395 element: selection,
11396 left: selection.scrollLeft,
11397 top: selection.scrollTop
11398 });
11399 "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
11400 for (priorFocusedElem = 0; priorFocusedElem < doc.length; priorFocusedElem++) {
11401 var info = doc[priorFocusedElem];
11402 info.element.scrollLeft = info.left;
11403 info.element.scrollTop = info.top;
11404 }
11405 }
11406 _enabled = !!eventsEnabled;
11407 selectionInformation = eventsEnabled = null;
11408 } finally {
11409 executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootMutationHasEffect;
11410 }
11411 }
11412 root2.current = finishedWork;
11413 pendingEffectsStatus = PENDING_LAYOUT_PHASE;
11414 }
11415 }
11416 function flushLayoutEffects() {
11417 if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
11418 pendingEffectsStatus = NO_PENDING_EFFECTS;
11419 var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
11420 if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
11421 rootHasLayoutEffect = ReactSharedInternals.T;
11422 ReactSharedInternals.T = null;
11423 var previousPriority = ReactDOMSharedInternals.p;
11424 ReactDOMSharedInternals.p = DiscreteEventPriority;
11425 var prevExecutionContext = executionContext;
11426 executionContext |= CommitContext;
11427 try {
11428 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), inProgressLanes = lanes, inProgressRoot = root2, commitLayoutEffectOnFiber(
11429 root2,
11430 finishedWork.alternate,
11431 finishedWork
11432 ), inProgressRoot = inProgressLanes = null, null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && injectedProfilingHooks.markLayoutEffectsStopped();
11433 } finally {
11434 executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootHasLayoutEffect;
11435 }
11436 }
11437 pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;
11438 }
11439 }
11440 function flushSpawnedWork() {
11441 if (pendingEffectsStatus === PENDING_SPAWNED_WORK || pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE) {
11442 pendingEffectsStatus = NO_PENDING_EFFECTS;
11443 requestPaint();
11444 var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, recoverableErrors = pendingRecoverableErrors, rootDidHavePassiveEffects = 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256);
11445 rootDidHavePassiveEffects ? pendingEffectsStatus = PENDING_PASSIVE_PHASE : (pendingEffectsStatus = NO_PENDING_EFFECTS, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(root2, root2.pendingLanes), nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null);
11446 var remainingLanes = root2.pendingLanes;
11447 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
11448 rootDidHavePassiveEffects || commitDoubleInvokeEffectsInDEV(root2);
11449 rootDidHavePassiveEffects = lanesToEventPriority(lanes);
11450 finishedWork = finishedWork.stateNode;
11451 if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
11452 try {
11453 var didError = 128 === (finishedWork.current.flags & 128);
11454 switch (rootDidHavePassiveEffects) {
11455 case DiscreteEventPriority:
11456 var schedulerPriority = ImmediatePriority;
11457 break;
11458 case ContinuousEventPriority:
11459 schedulerPriority = UserBlockingPriority;
11460 break;
11461 case DefaultEventPriority:
11462 schedulerPriority = NormalPriority$1;
11463 break;
11464 case IdleEventPriority:
11465 schedulerPriority = IdlePriority;
11466 break;
11467 default:
11468 schedulerPriority = NormalPriority$1;
11469 }
11470 injectedHook.onCommitFiberRoot(
11471 rendererID,
11472 finishedWork,
11473 schedulerPriority,
11474 didError
11475 );
11476 } catch (err) {
11477 hasLoggedError || (hasLoggedError = true, console.error(
11478 "React instrumentation encountered an error: %s",
11479 err
11480 ));
11481 }
11482 isDevToolsPresent && root2.memoizedUpdaters.clear();
11483 onCommitRoot();
11484 if (null !== recoverableErrors) {
11485 didError = ReactSharedInternals.T;
11486 schedulerPriority = ReactDOMSharedInternals.p;
11487 ReactDOMSharedInternals.p = DiscreteEventPriority;
11488 ReactSharedInternals.T = null;
11489 try {
11490 var onRecoverableError = root2.onRecoverableError;
11491 for (finishedWork = 0; finishedWork < recoverableErrors.length; finishedWork++) {
11492 var recoverableError = recoverableErrors[finishedWork], errorInfo = makeErrorInfo(recoverableError.stack);
11493 runWithFiberInDEV(
11494 recoverableError.source,
11495 onRecoverableError,
11496 recoverableError.value,
11497 errorInfo
11498 );
11499 }
11500 } finally {
11501 ReactSharedInternals.T = didError, ReactDOMSharedInternals.p = schedulerPriority;
11502 }
11503 }
11504 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
11505 ensureRootIsScheduled(root2);
11506 remainingLanes = root2.pendingLanes;
11507 0 !== (lanes & 4194090) && 0 !== (remainingLanes & 42) ? (nestedUpdateScheduled = true, root2 === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = root2)) : nestedUpdateCount = 0;
11508 flushSyncWorkAcrossRoots_impl(0, false);
11509 markCommitStopped();
11510 }
11511 }
11512 function makeErrorInfo(componentStack) {
11513 componentStack = { componentStack };
11514 Object.defineProperty(componentStack, "digest", {
11515 get: function() {
11516 console.error(
11517 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.'
11518 );
11519 }
11520 });
11521 return componentStack;
11522 }
11523 function releaseRootPooledCache(root2, remainingLanes) {
11524 0 === (root2.pooledCacheLanes &= remainingLanes) && (remainingLanes = root2.pooledCache, null != remainingLanes && (root2.pooledCache = null, releaseCache(remainingLanes)));
11525 }
11526 function flushPendingEffects(wasDelayedCommit) {
11527 flushMutationEffects();
11528 flushLayoutEffects();
11529 flushSpawnedWork();
11530 return flushPassiveEffects(wasDelayedCommit);
11531 }
11532 function flushPassiveEffects() {
11533 if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return false;
11534 var root2 = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
11535 pendingEffectsRemainingLanes = 0;
11536 var renderPriority = lanesToEventPriority(pendingEffectsLanes), priority = 0 === DefaultEventPriority || DefaultEventPriority > renderPriority ? DefaultEventPriority : renderPriority;
11537 renderPriority = ReactSharedInternals.T;
11538 var previousPriority = ReactDOMSharedInternals.p;
11539 try {
11540 ReactDOMSharedInternals.p = priority;
11541 ReactSharedInternals.T = null;
11542 priority = pendingPassiveTransitions;
11543 pendingPassiveTransitions = null;
11544 var root$jscomp$0 = pendingEffectsRoot, lanes = pendingEffectsLanes;
11545 pendingEffectsStatus = NO_PENDING_EFFECTS;
11546 pendingFinishedWork = pendingEffectsRoot = null;
11547 pendingEffectsLanes = 0;
11548 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
11549 throw Error("Cannot flush passive effects while already rendering.");
11550 isFlushingPassiveEffects = true;
11551 didScheduleUpdateDuringPassiveEffects = false;
11552 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markPassiveEffectsStarted && injectedProfilingHooks.markPassiveEffectsStarted(lanes);
11553 var prevExecutionContext = executionContext;
11554 executionContext |= CommitContext;
11555 commitPassiveUnmountOnFiber(root$jscomp$0.current);
11556 commitPassiveMountOnFiber(
11557 root$jscomp$0,
11558 root$jscomp$0.current,
11559 lanes,
11560 priority
11561 );
11562 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped && injectedProfilingHooks.markPassiveEffectsStopped();
11563 commitDoubleInvokeEffectsInDEV(root$jscomp$0);
11564 executionContext = prevExecutionContext;
11565 flushSyncWorkAcrossRoots_impl(0, false);
11566 didScheduleUpdateDuringPassiveEffects ? root$jscomp$0 === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = root$jscomp$0) : nestedPassiveUpdateCount = 0;
11567 didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = false;
11568 if (injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot)
11569 try {
11570 injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
11571 } catch (err) {
11572 hasLoggedError || (hasLoggedError = true, console.error(
11573 "React instrumentation encountered an error: %s",
11574 err
11575 ));
11576 }
11577 var stateNode = root$jscomp$0.current.stateNode;
11578 stateNode.effectDuration = 0;
11579 stateNode.passiveEffectDuration = 0;
11580 return true;
11581 } finally {
11582 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root2, remainingLanes);
11583 }
11584 }
11585 function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
11586 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
11587 sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
11588 rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
11589 null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
11590 }
11591 function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
11592 isRunningInsertionEffect = false;
11593 if (3 === sourceFiber.tag)
11594 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
11595 else {
11596 for (; null !== nearestMountedAncestor; ) {
11597 if (3 === nearestMountedAncestor.tag) {
11598 captureCommitPhaseErrorOnRoot(
11599 nearestMountedAncestor,
11600 sourceFiber,
11601 error
11602 );
11603 return;
11604 }
11605 if (1 === nearestMountedAncestor.tag) {
11606 var instance = nearestMountedAncestor.stateNode;
11607 if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
11608 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
11609 error = createClassErrorUpdate(2);
11610 instance = enqueueUpdate(nearestMountedAncestor, error, 2);
11611 null !== instance && (initializeClassErrorUpdate(
11612 error,
11613 instance,
11614 nearestMountedAncestor,
11615 sourceFiber
11616 ), markRootUpdated$1(instance, 2), ensureRootIsScheduled(instance));
11617 return;
11618 }
11619 }
11620 nearestMountedAncestor = nearestMountedAncestor.return;
11621 }
11622 console.error(
11623 "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
11624 error
11625 );
11626 }
11627 }
11628 function attachPingListener(root2, wakeable, lanes) {
11629 var pingCache = root2.pingCache;
11630 if (null === pingCache) {
11631 pingCache = root2.pingCache = new PossiblyWeakMap();
11632 var threadIDs = /* @__PURE__ */ new Set();
11633 pingCache.set(wakeable, threadIDs);
11634 } else
11635 threadIDs = pingCache.get(wakeable), void 0 === threadIDs && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
11636 threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = true, threadIDs.add(lanes), pingCache = pingSuspendedRoot.bind(null, root2, wakeable, lanes), isDevToolsPresent && restorePendingUpdaters(root2, lanes), wakeable.then(pingCache, pingCache));
11637 }
11638 function pingSuspendedRoot(root2, wakeable, pingedLanes) {
11639 var pingCache = root2.pingCache;
11640 null !== pingCache && pingCache.delete(wakeable);
11641 root2.pingedLanes |= root2.suspendedLanes & pingedLanes;
11642 root2.warmLanes &= ~pingedLanes;
11643 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && console.error(
11644 "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act"
11645 );
11646 workInProgressRoot === root2 && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root2, 0) : workInProgressRootPingedLanes |= pingedLanes, workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && (workInProgressSuspendedRetryLanes = 0));
11647 ensureRootIsScheduled(root2);
11648 }
11649 function retryTimedOutBoundary(boundaryFiber, retryLane) {
11650 0 === retryLane && (retryLane = claimNextRetryLane());
11651 boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
11652 null !== boundaryFiber && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
11653 }
11654 function retryDehydratedSuspenseBoundary(boundaryFiber) {
11655 var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
11656 null !== suspenseState && (retryLane = suspenseState.retryLane);
11657 retryTimedOutBoundary(boundaryFiber, retryLane);
11658 }
11659 function resolveRetryWakeable(boundaryFiber, wakeable) {
11660 var retryLane = 0;
11661 switch (boundaryFiber.tag) {
11662 case 13:
11663 var retryCache = boundaryFiber.stateNode;
11664 var suspenseState = boundaryFiber.memoizedState;
11665 null !== suspenseState && (retryLane = suspenseState.retryLane);
11666 break;
11667 case 19:
11668 retryCache = boundaryFiber.stateNode;
11669 break;
11670 case 22:
11671 retryCache = boundaryFiber.stateNode._retryCache;
11672 break;
11673 default:
11674 throw Error(
11675 "Pinged unknown suspense boundary type. This is probably a bug in React."
11676 );
11677 }
11678 null !== retryCache && retryCache.delete(wakeable);
11679 retryTimedOutBoundary(boundaryFiber, retryLane);
11680 }
11681 function recursivelyTraverseAndDoubleInvokeEffectsInDEV(root$jscomp$0, parentFiber, isInStrictMode) {
11682 if (0 !== (parentFiber.subtreeFlags & 67117056))
11683 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11684 var root2 = root$jscomp$0, fiber = parentFiber, isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;
11685 isStrictModeFiber = isInStrictMode || isStrictModeFiber;
11686 22 !== fiber.tag ? fiber.flags & 67108864 ? isStrictModeFiber && runWithFiberInDEV(
11687 fiber,
11688 doubleInvokeEffectsOnFiber,
11689 root2,
11690 fiber,
11691 (fiber.mode & NoStrictPassiveEffectsMode) === NoMode
11692 ) : recursivelyTraverseAndDoubleInvokeEffectsInDEV(
11693 root2,
11694 fiber,
11695 isStrictModeFiber
11696 ) : null === fiber.memoizedState && (isStrictModeFiber && fiber.flags & 8192 ? runWithFiberInDEV(
11697 fiber,
11698 doubleInvokeEffectsOnFiber,
11699 root2,
11700 fiber
11701 ) : fiber.subtreeFlags & 67108864 && runWithFiberInDEV(
11702 fiber,
11703 recursivelyTraverseAndDoubleInvokeEffectsInDEV,
11704 root2,
11705 fiber,
11706 isStrictModeFiber
11707 ));
11708 parentFiber = parentFiber.sibling;
11709 }
11710 }
11711 function doubleInvokeEffectsOnFiber(root2, fiber) {
11712 var shouldDoubleInvokePassiveEffects = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : true;
11713 setIsStrictModeForDevtools(true);
11714 try {
11715 disappearLayoutEffects(fiber), shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root2, fiber.alternate, fiber, false), shouldDoubleInvokePassiveEffects && reconnectPassiveEffects(root2, fiber, 0, null, false, 0);
11716 } finally {
11717 setIsStrictModeForDevtools(false);
11718 }
11719 }
11720 function commitDoubleInvokeEffectsInDEV(root2) {
11721 var doubleInvokeEffects = true;
11722 root2.current.mode & (StrictLegacyMode | StrictEffectsMode) || (doubleInvokeEffects = false);
11723 recursivelyTraverseAndDoubleInvokeEffectsInDEV(
11724 root2,
11725 root2.current,
11726 doubleInvokeEffects
11727 );
11728 }
11729 function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
11730 if ((executionContext & RenderContext) === NoContext) {
11731 var tag = fiber.tag;
11732 if (3 === tag || 1 === tag || 0 === tag || 11 === tag || 14 === tag || 15 === tag) {
11733 tag = getComponentNameFromFiber(fiber) || "ReactComponent";
11734 if (null !== didWarnStateUpdateForNotYetMountedComponent) {
11735 if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;
11736 didWarnStateUpdateForNotYetMountedComponent.add(tag);
11737 } else didWarnStateUpdateForNotYetMountedComponent = /* @__PURE__ */ new Set([tag]);
11738 runWithFiberInDEV(fiber, function() {
11739 console.error(
11740 "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead."
11741 );
11742 });
11743 }
11744 }
11745 }
11746 function restorePendingUpdaters(root2, lanes) {
11747 isDevToolsPresent && root2.memoizedUpdaters.forEach(function(schedulingFiber) {
11748 addFiberToLanesMap(root2, schedulingFiber, lanes);
11749 });
11750 }
11751 function scheduleCallback$1(priorityLevel, callback) {
11752 var actQueue = ReactSharedInternals.actQueue;
11753 return null !== actQueue ? (actQueue.push(callback), fakeActCallbackNode$1) : scheduleCallback$3(priorityLevel, callback);
11754 }
11755 function warnIfUpdatesNotWrappedWithActDEV(fiber) {
11756 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function() {
11757 console.error(
11758 "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act",
11759 getComponentNameFromFiber(fiber)
11760 );
11761 });
11762 }
11763 function ensureRootIsScheduled(root2) {
11764 root2 !== lastScheduledRoot && null === root2.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root2 : lastScheduledRoot = lastScheduledRoot.next = root2);
11765 mightHavePendingSyncWork = true;
11766 null !== ReactSharedInternals.actQueue ? didScheduleMicrotask_act || (didScheduleMicrotask_act = true, scheduleImmediateRootScheduleTask()) : didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
11767 }
11768 function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
11769 if (!isFlushingWork && mightHavePendingSyncWork) {
11770 isFlushingWork = true;
11771 do {
11772 var didPerformSomeWork = false;
11773 for (var root2 = firstScheduledRoot; null !== root2; ) {
11774 if (!onlyLegacy)
11775 if (0 !== syncTransitionLanes) {
11776 var pendingLanes = root2.pendingLanes;
11777 if (0 === pendingLanes) var nextLanes = 0;
11778 else {
11779 var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
11780 nextLanes = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
11781 nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
11782 nextLanes = nextLanes & 201326741 ? nextLanes & 201326741 | 1 : nextLanes ? nextLanes | 2 : 0;
11783 }
11784 0 !== nextLanes && (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
11785 } else
11786 nextLanes = workInProgressRootRenderLanes, nextLanes = getNextLanes(
11787 root2,
11788 root2 === workInProgressRoot ? nextLanes : 0,
11789 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
11790 ), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root2, nextLanes) || (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
11791 root2 = root2.next;
11792 }
11793 } while (didPerformSomeWork);
11794 isFlushingWork = false;
11795 }
11796 }
11797 function processRootScheduleInImmediateTask() {
11798 processRootScheduleInMicrotask();
11799 }
11800 function processRootScheduleInMicrotask() {
11801 mightHavePendingSyncWork = didScheduleMicrotask_act = didScheduleMicrotask = false;
11802 var syncTransitionLanes = 0;
11803 0 !== currentEventTransitionLane && (shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane), currentEventTransitionLane = 0);
11804 for (var currentTime = now$1(), prev = null, root2 = firstScheduledRoot; null !== root2; ) {
11805 var next = root2.next, nextLanes = scheduleTaskForRootDuringMicrotask(root2, currentTime);
11806 if (0 === nextLanes)
11807 root2.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
11808 else if (prev = root2, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
11809 mightHavePendingSyncWork = true;
11810 root2 = next;
11811 }
11812 flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
11813 }
11814 function scheduleTaskForRootDuringMicrotask(root2, currentTime) {
11815 for (var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, expirationTimes = root2.expirationTimes, lanes = root2.pendingLanes & -62914561; 0 < lanes; ) {
11816 var index = 31 - clz32(lanes), lane = 1 << index, expirationTime = expirationTimes[index];
11817 if (-1 === expirationTime) {
11818 if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
11819 expirationTimes[index] = computeExpirationTime(lane, currentTime);
11820 } else expirationTime <= currentTime && (root2.expiredLanes |= lane);
11821 lanes &= ~lane;
11822 }
11823 currentTime = workInProgressRoot;
11824 suspendedLanes = workInProgressRootRenderLanes;
11825 suspendedLanes = getNextLanes(
11826 root2,
11827 root2 === currentTime ? suspendedLanes : 0,
11828 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
11829 );
11830 pingedLanes = root2.callbackNode;
11831 if (0 === suspendedLanes || root2 === currentTime && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
11832 return null !== pingedLanes && cancelCallback(pingedLanes), root2.callbackNode = null, root2.callbackPriority = 0;
11833 if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root2, suspendedLanes)) {
11834 currentTime = suspendedLanes & -suspendedLanes;
11835 if (currentTime !== root2.callbackPriority || null !== ReactSharedInternals.actQueue && pingedLanes !== fakeActCallbackNode)
11836 cancelCallback(pingedLanes);
11837 else return currentTime;
11838 switch (lanesToEventPriority(suspendedLanes)) {
11839 case DiscreteEventPriority:
11840 case ContinuousEventPriority:
11841 suspendedLanes = UserBlockingPriority;
11842 break;
11843 case DefaultEventPriority:
11844 suspendedLanes = NormalPriority$1;
11845 break;
11846 case IdleEventPriority:
11847 suspendedLanes = IdlePriority;
11848 break;
11849 default:
11850 suspendedLanes = NormalPriority$1;
11851 }
11852 pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root2);
11853 null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), suspendedLanes = fakeActCallbackNode) : suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
11854 root2.callbackPriority = currentTime;
11855 root2.callbackNode = suspendedLanes;
11856 return currentTime;
11857 }
11858 null !== pingedLanes && cancelCallback(pingedLanes);
11859 root2.callbackPriority = 2;
11860 root2.callbackNode = null;
11861 return 2;
11862 }
11863 function performWorkOnRootViaSchedulerTask(root2, didTimeout) {
11864 nestedUpdateScheduled = currentUpdateIsNested = false;
11865 if (pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE)
11866 return root2.callbackNode = null, root2.callbackPriority = 0, null;
11867 var originalCallbackNode = root2.callbackNode;
11868 if (flushPendingEffects(true) && root2.callbackNode !== originalCallbackNode)
11869 return null;
11870 var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
11871 workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
11872 root2,
11873 root2 === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
11874 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
11875 );
11876 if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
11877 performWorkOnRoot(
11878 root2,
11879 workInProgressRootRenderLanes$jscomp$0,
11880 didTimeout
11881 );
11882 scheduleTaskForRootDuringMicrotask(root2, now$1());
11883 return null != root2.callbackNode && root2.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root2) : null;
11884 }
11885 function performSyncWorkOnRoot(root2, lanes) {
11886 if (flushPendingEffects()) return null;
11887 currentUpdateIsNested = nestedUpdateScheduled;
11888 nestedUpdateScheduled = false;
11889 performWorkOnRoot(root2, lanes, true);
11890 }
11891 function cancelCallback(callbackNode) {
11892 callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode);
11893 }
11894 function scheduleImmediateRootScheduleTask() {
11895 null !== ReactSharedInternals.actQueue && ReactSharedInternals.actQueue.push(function() {
11896 processRootScheduleInMicrotask();
11897 return null;
11898 });
11899 scheduleMicrotask(function() {
11900 (executionContext & (RenderContext | CommitContext)) !== NoContext ? scheduleCallback$3(
11901 ImmediatePriority,
11902 processRootScheduleInImmediateTask
11903 ) : processRootScheduleInMicrotask();
11904 });
11905 }
11906 function requestTransitionLane() {
11907 0 === currentEventTransitionLane && (currentEventTransitionLane = claimNextTransitionLane());
11908 return currentEventTransitionLane;
11909 }
11910 function coerceFormActionProp(actionProp) {
11911 if (null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp)
11912 return null;
11913 if ("function" === typeof actionProp) return actionProp;
11914 checkAttributeStringCoercion(actionProp, "action");
11915 return sanitizeURL("" + actionProp);
11916 }
11917 function createFormDataWithSubmitter(form, submitter) {
11918 var temp = submitter.ownerDocument.createElement("input");
11919 temp.name = submitter.name;
11920 temp.value = submitter.value;
11921 form.id && temp.setAttribute("form", form.id);
11922 submitter.parentNode.insertBefore(temp, submitter);
11923 form = new FormData(form);
11924 temp.parentNode.removeChild(temp);
11925 return form;
11926 }
11927 function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
11928 if ("submit" === domEventName && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
11929 var action = coerceFormActionProp(
11930 (nativeEventTarget[internalPropsKey] || null).action
11931 ), submitter = nativeEvent.submitter;
11932 submitter && (domEventName = (domEventName = submitter[internalPropsKey] || null) ? coerceFormActionProp(domEventName.formAction) : submitter.getAttribute("formAction"), null !== domEventName && (action = domEventName, submitter = null));
11933 var event = new SyntheticEvent(
11934 "action",
11935 "action",
11936 null,
11937 nativeEvent,
11938 nativeEventTarget
11939 );
11940 dispatchQueue.push({
11941 event,
11942 listeners: [
11943 {
11944 instance: null,
11945 listener: function() {
11946 if (nativeEvent.defaultPrevented) {
11947 if (0 !== currentEventTransitionLane) {
11948 var formData = submitter ? createFormDataWithSubmitter(
11949 nativeEventTarget,
11950 submitter
11951 ) : new FormData(nativeEventTarget), pendingState = {
11952 pending: true,
11953 data: formData,
11954 method: nativeEventTarget.method,
11955 action
11956 };
11957 Object.freeze(pendingState);
11958 startHostTransition(
11959 maybeTargetInst,
11960 pendingState,
11961 null,
11962 formData
11963 );
11964 }
11965 } else
11966 "function" === typeof action && (event.preventDefault(), formData = submitter ? createFormDataWithSubmitter(
11967 nativeEventTarget,
11968 submitter
11969 ) : new FormData(nativeEventTarget), pendingState = {
11970 pending: true,
11971 data: formData,
11972 method: nativeEventTarget.method,
11973 action
11974 }, Object.freeze(pendingState), startHostTransition(
11975 maybeTargetInst,
11976 pendingState,
11977 action,
11978 formData
11979 ));
11980 },
11981 currentTarget: nativeEventTarget
11982 }
11983 ]
11984 });
11985 }
11986 }
11987 function executeDispatch(event, listener, currentTarget) {
11988 event.currentTarget = currentTarget;
11989 try {
11990 listener(event);
11991 } catch (error) {
11992 reportGlobalError(error);
11993 }
11994 event.currentTarget = null;
11995 }
11996 function processDispatchQueue(dispatchQueue, eventSystemFlags) {
11997 eventSystemFlags = 0 !== (eventSystemFlags & 4);
11998 for (var i = 0; i < dispatchQueue.length; i++) {
11999 var _dispatchQueue$i = dispatchQueue[i];
12000 a: {
12001 var previousInstance = void 0, event = _dispatchQueue$i.event;
12002 _dispatchQueue$i = _dispatchQueue$i.listeners;
12003 if (eventSystemFlags)
12004 for (var i$jscomp$0 = _dispatchQueue$i.length - 1; 0 <= i$jscomp$0; i$jscomp$0--) {
12005 var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget;
12006 _dispatchListeners$i = _dispatchListeners$i.listener;
12007 if (instance !== previousInstance && event.isPropagationStopped())
12008 break a;
12009 null !== instance ? runWithFiberInDEV(
12010 instance,
12011 executeDispatch,
12012 event,
12013 _dispatchListeners$i,
12014 currentTarget
12015 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
12016 previousInstance = instance;
12017 }
12018 else
12019 for (i$jscomp$0 = 0; i$jscomp$0 < _dispatchQueue$i.length; i$jscomp$0++) {
12020 _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
12021 instance = _dispatchListeners$i.instance;
12022 currentTarget = _dispatchListeners$i.currentTarget;
12023 _dispatchListeners$i = _dispatchListeners$i.listener;
12024 if (instance !== previousInstance && event.isPropagationStopped())
12025 break a;
12026 null !== instance ? runWithFiberInDEV(
12027 instance,
12028 executeDispatch,
12029 event,
12030 _dispatchListeners$i,
12031 currentTarget
12032 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
12033 previousInstance = instance;
12034 }
12035 }
12036 }
12037 }
12038 function listenToNonDelegatedEvent(domEventName, targetElement) {
12039 nonDelegatedEvents.has(domEventName) || console.error(
12040 'Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',
12041 domEventName
12042 );
12043 var listenerSet = targetElement[internalEventHandlersKey];
12044 void 0 === listenerSet && (listenerSet = targetElement[internalEventHandlersKey] = /* @__PURE__ */ new Set());
12045 var listenerSetKey = domEventName + "__bubble";
12046 listenerSet.has(listenerSetKey) || (addTrappedEventListener(targetElement, domEventName, 2, false), listenerSet.add(listenerSetKey));
12047 }
12048 function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
12049 nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener && console.error(
12050 'Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',
12051 domEventName
12052 );
12053 var eventSystemFlags = 0;
12054 isCapturePhaseListener && (eventSystemFlags |= 4);
12055 addTrappedEventListener(
12056 target,
12057 domEventName,
12058 eventSystemFlags,
12059 isCapturePhaseListener
12060 );
12061 }
12062 function listenToAllSupportedEvents(rootContainerElement) {
12063 if (!rootContainerElement[listeningMarker]) {
12064 rootContainerElement[listeningMarker] = true;
12065 allNativeEvents.forEach(function(domEventName) {
12066 "selectionchange" !== domEventName && (nonDelegatedEvents.has(domEventName) || listenToNativeEvent(domEventName, false, rootContainerElement), listenToNativeEvent(domEventName, true, rootContainerElement));
12067 });
12068 var ownerDocument = 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
12069 null === ownerDocument || ownerDocument[listeningMarker] || (ownerDocument[listeningMarker] = true, listenToNativeEvent("selectionchange", false, ownerDocument));
12070 }
12071 }
12072 function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener) {
12073 switch (getEventPriority(domEventName)) {
12074 case DiscreteEventPriority:
12075 var listenerWrapper = dispatchDiscreteEvent;
12076 break;
12077 case ContinuousEventPriority:
12078 listenerWrapper = dispatchContinuousEvent;
12079 break;
12080 default:
12081 listenerWrapper = dispatchEvent;
12082 }
12083 eventSystemFlags = listenerWrapper.bind(
12084 null,
12085 domEventName,
12086 eventSystemFlags,
12087 targetContainer
12088 );
12089 listenerWrapper = void 0;
12090 !passiveBrowserEventsSupported || "touchstart" !== domEventName && "touchmove" !== domEventName && "wheel" !== domEventName || (listenerWrapper = true);
12091 isCapturePhaseListener ? void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
12092 capture: true,
12093 passive: listenerWrapper
12094 }) : targetContainer.addEventListener(domEventName, eventSystemFlags, true) : void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
12095 passive: listenerWrapper
12096 }) : targetContainer.addEventListener(
12097 domEventName,
12098 eventSystemFlags,
12099 false
12100 );
12101 }
12102 function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst$jscomp$0, targetContainer) {
12103 var ancestorInst = targetInst$jscomp$0;
12104 if (0 === (eventSystemFlags & 1) && 0 === (eventSystemFlags & 2) && null !== targetInst$jscomp$0)
12105 a: for (; ; ) {
12106 if (null === targetInst$jscomp$0) return;
12107 var nodeTag = targetInst$jscomp$0.tag;
12108 if (3 === nodeTag || 4 === nodeTag) {
12109 var container = targetInst$jscomp$0.stateNode.containerInfo;
12110 if (container === targetContainer) break;
12111 if (4 === nodeTag)
12112 for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
12113 var grandTag = nodeTag.tag;
12114 if ((3 === grandTag || 4 === grandTag) && nodeTag.stateNode.containerInfo === targetContainer)
12115 return;
12116 nodeTag = nodeTag.return;
12117 }
12118 for (; null !== container; ) {
12119 nodeTag = getClosestInstanceFromNode(container);
12120 if (null === nodeTag) return;
12121 grandTag = nodeTag.tag;
12122 if (5 === grandTag || 6 === grandTag || 26 === grandTag || 27 === grandTag) {
12123 targetInst$jscomp$0 = ancestorInst = nodeTag;
12124 continue a;
12125 }
12126 container = container.parentNode;
12127 }
12128 }
12129 targetInst$jscomp$0 = targetInst$jscomp$0.return;
12130 }
12131 batchedUpdates$1(function() {
12132 var targetInst = ancestorInst, nativeEventTarget = getEventTarget(nativeEvent), dispatchQueue = [];
12133 a: {
12134 var reactName = topLevelEventsToReactNames.get(domEventName);
12135 if (void 0 !== reactName) {
12136 var SyntheticEventCtor = SyntheticEvent, reactEventType = domEventName;
12137 switch (domEventName) {
12138 case "keypress":
12139 if (0 === getEventCharCode(nativeEvent)) break a;
12140 case "keydown":
12141 case "keyup":
12142 SyntheticEventCtor = SyntheticKeyboardEvent;
12143 break;
12144 case "focusin":
12145 reactEventType = "focus";
12146 SyntheticEventCtor = SyntheticFocusEvent;
12147 break;
12148 case "focusout":
12149 reactEventType = "blur";
12150 SyntheticEventCtor = SyntheticFocusEvent;
12151 break;
12152 case "beforeblur":
12153 case "afterblur":
12154 SyntheticEventCtor = SyntheticFocusEvent;
12155 break;
12156 case "click":
12157 if (2 === nativeEvent.button) break a;
12158 case "auxclick":
12159 case "dblclick":
12160 case "mousedown":
12161 case "mousemove":
12162 case "mouseup":
12163 case "mouseout":
12164 case "mouseover":
12165 case "contextmenu":
12166 SyntheticEventCtor = SyntheticMouseEvent;
12167 break;
12168 case "drag":
12169 case "dragend":
12170 case "dragenter":
12171 case "dragexit":
12172 case "dragleave":
12173 case "dragover":
12174 case "dragstart":
12175 case "drop":
12176 SyntheticEventCtor = SyntheticDragEvent;
12177 break;
12178 case "touchcancel":
12179 case "touchend":
12180 case "touchmove":
12181 case "touchstart":
12182 SyntheticEventCtor = SyntheticTouchEvent;
12183 break;
12184 case ANIMATION_END:
12185 case ANIMATION_ITERATION:
12186 case ANIMATION_START:
12187 SyntheticEventCtor = SyntheticAnimationEvent;
12188 break;
12189 case TRANSITION_END:
12190 SyntheticEventCtor = SyntheticTransitionEvent;
12191 break;
12192 case "scroll":
12193 case "scrollend":
12194 SyntheticEventCtor = SyntheticUIEvent;
12195 break;
12196 case "wheel":
12197 SyntheticEventCtor = SyntheticWheelEvent;
12198 break;
12199 case "copy":
12200 case "cut":
12201 case "paste":
12202 SyntheticEventCtor = SyntheticClipboardEvent;
12203 break;
12204 case "gotpointercapture":
12205 case "lostpointercapture":
12206 case "pointercancel":
12207 case "pointerdown":
12208 case "pointermove":
12209 case "pointerout":
12210 case "pointerover":
12211 case "pointerup":
12212 SyntheticEventCtor = SyntheticPointerEvent;
12213 break;
12214 case "toggle":
12215 case "beforetoggle":
12216 SyntheticEventCtor = SyntheticToggleEvent;
12217 }
12218 var inCapturePhase = 0 !== (eventSystemFlags & 4), accumulateTargetOnly = !inCapturePhase && ("scroll" === domEventName || "scrollend" === domEventName), reactEventName = inCapturePhase ? null !== reactName ? reactName + "Capture" : null : reactName;
12219 inCapturePhase = [];
12220 for (var instance = targetInst, lastHostComponent; null !== instance; ) {
12221 var _instance2 = instance;
12222 lastHostComponent = _instance2.stateNode;
12223 _instance2 = _instance2.tag;
12224 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === lastHostComponent || null === reactEventName || (_instance2 = getListener(instance, reactEventName), null != _instance2 && inCapturePhase.push(
12225 createDispatchListener(
12226 instance,
12227 _instance2,
12228 lastHostComponent
12229 )
12230 ));
12231 if (accumulateTargetOnly) break;
12232 instance = instance.return;
12233 }
12234 0 < inCapturePhase.length && (reactName = new SyntheticEventCtor(
12235 reactName,
12236 reactEventType,
12237 null,
12238 nativeEvent,
12239 nativeEventTarget
12240 ), dispatchQueue.push({
12241 event: reactName,
12242 listeners: inCapturePhase
12243 }));
12244 }
12245 }
12246 if (0 === (eventSystemFlags & 7)) {
12247 a: {
12248 reactName = "mouseover" === domEventName || "pointerover" === domEventName;
12249 SyntheticEventCtor = "mouseout" === domEventName || "pointerout" === domEventName;
12250 if (reactName && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
12251 break a;
12252 if (SyntheticEventCtor || reactName) {
12253 reactName = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (reactName = nativeEventTarget.ownerDocument) ? reactName.defaultView || reactName.parentWindow : window;
12254 if (SyntheticEventCtor) {
12255 if (reactEventType = nativeEvent.relatedTarget || nativeEvent.toElement, SyntheticEventCtor = targetInst, reactEventType = reactEventType ? getClosestInstanceFromNode(reactEventType) : null, null !== reactEventType && (accumulateTargetOnly = getNearestMountedFiber(reactEventType), inCapturePhase = reactEventType.tag, reactEventType !== accumulateTargetOnly || 5 !== inCapturePhase && 27 !== inCapturePhase && 6 !== inCapturePhase))
12256 reactEventType = null;
12257 } else SyntheticEventCtor = null, reactEventType = targetInst;
12258 if (SyntheticEventCtor !== reactEventType) {
12259 inCapturePhase = SyntheticMouseEvent;
12260 _instance2 = "onMouseLeave";
12261 reactEventName = "onMouseEnter";
12262 instance = "mouse";
12263 if ("pointerout" === domEventName || "pointerover" === domEventName)
12264 inCapturePhase = SyntheticPointerEvent, _instance2 = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer";
12265 accumulateTargetOnly = null == SyntheticEventCtor ? reactName : getNodeFromInstance(SyntheticEventCtor);
12266 lastHostComponent = null == reactEventType ? reactName : getNodeFromInstance(reactEventType);
12267 reactName = new inCapturePhase(
12268 _instance2,
12269 instance + "leave",
12270 SyntheticEventCtor,
12271 nativeEvent,
12272 nativeEventTarget
12273 );
12274 reactName.target = accumulateTargetOnly;
12275 reactName.relatedTarget = lastHostComponent;
12276 _instance2 = null;
12277 getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
12278 reactEventName,
12279 instance + "enter",
12280 reactEventType,
12281 nativeEvent,
12282 nativeEventTarget
12283 ), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance2 = inCapturePhase);
12284 accumulateTargetOnly = _instance2;
12285 if (SyntheticEventCtor && reactEventType)
12286 b: {
12287 inCapturePhase = SyntheticEventCtor;
12288 reactEventName = reactEventType;
12289 instance = 0;
12290 for (lastHostComponent = inCapturePhase; lastHostComponent; lastHostComponent = getParent(lastHostComponent))
12291 instance++;
12292 lastHostComponent = 0;
12293 for (_instance2 = reactEventName; _instance2; _instance2 = getParent(_instance2))
12294 lastHostComponent++;
12295 for (; 0 < instance - lastHostComponent; )
12296 inCapturePhase = getParent(inCapturePhase), instance--;
12297 for (; 0 < lastHostComponent - instance; )
12298 reactEventName = getParent(reactEventName), lastHostComponent--;
12299 for (; instance--; ) {
12300 if (inCapturePhase === reactEventName || null !== reactEventName && inCapturePhase === reactEventName.alternate)
12301 break b;
12302 inCapturePhase = getParent(inCapturePhase);
12303 reactEventName = getParent(reactEventName);
12304 }
12305 inCapturePhase = null;
12306 }
12307 else inCapturePhase = null;
12308 null !== SyntheticEventCtor && accumulateEnterLeaveListenersForEvent(
12309 dispatchQueue,
12310 reactName,
12311 SyntheticEventCtor,
12312 inCapturePhase,
12313 false
12314 );
12315 null !== reactEventType && null !== accumulateTargetOnly && accumulateEnterLeaveListenersForEvent(
12316 dispatchQueue,
12317 accumulateTargetOnly,
12318 reactEventType,
12319 inCapturePhase,
12320 true
12321 );
12322 }
12323 }
12324 }
12325 a: {
12326 reactName = targetInst ? getNodeFromInstance(targetInst) : window;
12327 SyntheticEventCtor = reactName.nodeName && reactName.nodeName.toLowerCase();
12328 if ("select" === SyntheticEventCtor || "input" === SyntheticEventCtor && "file" === reactName.type)
12329 var getTargetInstFunc = getTargetInstForChangeEvent;
12330 else if (isTextInputElement(reactName))
12331 if (isInputEventSupported)
12332 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
12333 else {
12334 getTargetInstFunc = getTargetInstForInputEventPolyfill;
12335 var handleEventFunc = handleEventsForInputEventPolyfill;
12336 }
12337 else
12338 SyntheticEventCtor = reactName.nodeName, !SyntheticEventCtor || "input" !== SyntheticEventCtor.toLowerCase() || "checkbox" !== reactName.type && "radio" !== reactName.type ? targetInst && isCustomElement(targetInst.elementType) && (getTargetInstFunc = getTargetInstForChangeEvent) : getTargetInstFunc = getTargetInstForClickEvent;
12339 if (getTargetInstFunc && (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))) {
12340 createAndAccumulateChangeEvent(
12341 dispatchQueue,
12342 getTargetInstFunc,
12343 nativeEvent,
12344 nativeEventTarget
12345 );
12346 break a;
12347 }
12348 handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
12349 "focusout" === domEventName && targetInst && "number" === reactName.type && null != targetInst.memoizedProps.value && setDefaultValue(reactName, "number", reactName.value);
12350 }
12351 handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
12352 switch (domEventName) {
12353 case "focusin":
12354 if (isTextInputElement(handleEventFunc) || "true" === handleEventFunc.contentEditable)
12355 activeElement = handleEventFunc, activeElementInst = targetInst, lastSelection = null;
12356 break;
12357 case "focusout":
12358 lastSelection = activeElementInst = activeElement = null;
12359 break;
12360 case "mousedown":
12361 mouseDown = true;
12362 break;
12363 case "contextmenu":
12364 case "mouseup":
12365 case "dragend":
12366 mouseDown = false;
12367 constructSelectEvent(
12368 dispatchQueue,
12369 nativeEvent,
12370 nativeEventTarget
12371 );
12372 break;
12373 case "selectionchange":
12374 if (skipSelectionChangeEvent) break;
12375 case "keydown":
12376 case "keyup":
12377 constructSelectEvent(
12378 dispatchQueue,
12379 nativeEvent,
12380 nativeEventTarget
12381 );
12382 }
12383 var fallbackData;
12384 if (canUseCompositionEvent)
12385 b: {
12386 switch (domEventName) {
12387 case "compositionstart":
12388 var eventType = "onCompositionStart";
12389 break b;
12390 case "compositionend":
12391 eventType = "onCompositionEnd";
12392 break b;
12393 case "compositionupdate":
12394 eventType = "onCompositionUpdate";
12395 break b;
12396 }
12397 eventType = void 0;
12398 }
12399 else
12400 isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && nativeEvent.keyCode === START_KEYCODE && (eventType = "onCompositionStart");
12401 eventType && (useFallbackCompositionData && "ko" !== nativeEvent.locale && (isComposing || "onCompositionStart" !== eventType ? "onCompositionEnd" === eventType && isComposing && (fallbackData = getData()) : (root = nativeEventTarget, startText = "value" in root ? root.value : root.textContent, isComposing = true)), handleEventFunc = accumulateTwoPhaseListeners(
12402 targetInst,
12403 eventType
12404 ), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
12405 eventType,
12406 domEventName,
12407 null,
12408 nativeEvent,
12409 nativeEventTarget
12410 ), dispatchQueue.push({
12411 event: eventType,
12412 listeners: handleEventFunc
12413 }), fallbackData ? eventType.data = fallbackData : (fallbackData = getDataFromCustomEvent(nativeEvent), null !== fallbackData && (eventType.data = fallbackData))));
12414 if (fallbackData = canUseTextInputEvent ? getNativeBeforeInputChars(domEventName, nativeEvent) : getFallbackBeforeInputChars(domEventName, nativeEvent))
12415 eventType = accumulateTwoPhaseListeners(
12416 targetInst,
12417 "onBeforeInput"
12418 ), 0 < eventType.length && (handleEventFunc = new SyntheticInputEvent(
12419 "onBeforeInput",
12420 "beforeinput",
12421 null,
12422 nativeEvent,
12423 nativeEventTarget
12424 ), dispatchQueue.push({
12425 event: handleEventFunc,
12426 listeners: eventType
12427 }), handleEventFunc.data = fallbackData);
12428 extractEvents$1(
12429 dispatchQueue,
12430 domEventName,
12431 targetInst,
12432 nativeEvent,
12433 nativeEventTarget
12434 );
12435 }
12436 processDispatchQueue(dispatchQueue, eventSystemFlags);
12437 });
12438 }
12439 function createDispatchListener(instance, listener, currentTarget) {
12440 return {
12441 instance,
12442 listener,
12443 currentTarget
12444 };
12445 }
12446 function accumulateTwoPhaseListeners(targetFiber, reactName) {
12447 for (var captureName = reactName + "Capture", listeners = []; null !== targetFiber; ) {
12448 var _instance3 = targetFiber, stateNode = _instance3.stateNode;
12449 _instance3 = _instance3.tag;
12450 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (_instance3 = getListener(targetFiber, captureName), null != _instance3 && listeners.unshift(
12451 createDispatchListener(targetFiber, _instance3, stateNode)
12452 ), _instance3 = getListener(targetFiber, reactName), null != _instance3 && listeners.push(
12453 createDispatchListener(targetFiber, _instance3, stateNode)
12454 ));
12455 if (3 === targetFiber.tag) return listeners;
12456 targetFiber = targetFiber.return;
12457 }
12458 return [];
12459 }
12460 function getParent(inst) {
12461 if (null === inst) return null;
12462 do
12463 inst = inst.return;
12464 while (inst && 5 !== inst.tag && 27 !== inst.tag);
12465 return inst ? inst : null;
12466 }
12467 function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
12468 for (var registrationName = event._reactName, listeners = []; null !== target && target !== common; ) {
12469 var _instance4 = target, alternate = _instance4.alternate, stateNode = _instance4.stateNode;
12470 _instance4 = _instance4.tag;
12471 if (null !== alternate && alternate === common) break;
12472 5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners.unshift(
12473 createDispatchListener(target, stateNode, alternate)
12474 )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners.push(
12475 createDispatchListener(target, stateNode, alternate)
12476 )));
12477 target = target.return;
12478 }
12479 0 !== listeners.length && dispatchQueue.push({ event, listeners });
12480 }
12481 function validatePropertiesInDevelopment(type, props) {
12482 validateProperties$2(type, props);
12483 "input" !== type && "textarea" !== type && "select" !== type || null == props || null !== props.value || didWarnValueNull || (didWarnValueNull = true, "select" === type && props.multiple ? console.error(
12484 "`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",
12485 type
12486 ) : console.error(
12487 "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
12488 type
12489 ));
12490 var eventRegistry = {
12491 registrationNameDependencies,
12492 possibleRegistrationNames
12493 };
12494 isCustomElement(type) || "string" === typeof props.is || warnUnknownProperties(type, props, eventRegistry);
12495 props.contentEditable && !props.suppressContentEditableWarning && null != props.children && console.error(
12496 "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."
12497 );
12498 }
12499 function warnForPropDifference(propName, serverValue, clientValue, serverDifferences) {
12500 serverValue !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(serverValue) !== clientValue && (serverDifferences[propName] = serverValue));
12501 }
12502 function warnForExtraAttributes(domElement, attributeNames, serverDifferences) {
12503 attributeNames.forEach(function(attributeName) {
12504 serverDifferences[getPropNameFromAttributeName(attributeName)] = "style" === attributeName ? getStylesObjectFromElement(domElement) : domElement.getAttribute(attributeName);
12505 });
12506 }
12507 function warnForInvalidEventListener(registrationName, listener) {
12508 false === listener ? console.error(
12509 "Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",
12510 registrationName,
12511 registrationName,
12512 registrationName
12513 ) : console.error(
12514 "Expected `%s` listener to be a function, instead got a value of `%s` type.",
12515 registrationName,
12516 typeof listener
12517 );
12518 }
12519 function normalizeHTML(parent, html) {
12520 parent = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(
12521 parent.namespaceURI,
12522 parent.tagName
12523 ) : parent.ownerDocument.createElement(parent.tagName);
12524 parent.innerHTML = html;
12525 return parent.innerHTML;
12526 }
12527 function normalizeMarkupForTextOrAttribute(markup) {
12528 willCoercionThrow(markup) && (console.error(
12529 "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
12530 typeName(markup)
12531 ), testStringCoercion(markup));
12532 return ("string" === typeof markup ? markup : "" + markup).replace(NORMALIZE_NEWLINES_REGEX, "\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
12533 }
12534 function checkForUnmatchedText(serverText, clientText) {
12535 clientText = normalizeMarkupForTextOrAttribute(clientText);
12536 return normalizeMarkupForTextOrAttribute(serverText) === clientText ? true : false;
12537 }
12538 function noop$1() {
12539 }
12540 function setProp(domElement, tag, key, value, props, prevValue) {
12541 switch (key) {
12542 case "children":
12543 if ("string" === typeof value)
12544 validateTextNesting(value, tag, false), "body" === tag || "textarea" === tag && "" === value || setTextContent(domElement, value);
12545 else if ("number" === typeof value || "bigint" === typeof value)
12546 validateTextNesting("" + value, tag, false), "body" !== tag && setTextContent(domElement, "" + value);
12547 break;
12548 case "className":
12549 setValueForKnownAttribute(domElement, "class", value);
12550 break;
12551 case "tabIndex":
12552 setValueForKnownAttribute(domElement, "tabindex", value);
12553 break;
12554 case "dir":
12555 case "role":
12556 case "viewBox":
12557 case "width":
12558 case "height":
12559 setValueForKnownAttribute(domElement, key, value);
12560 break;
12561 case "style":
12562 setValueForStyles(domElement, value, prevValue);
12563 break;
12564 case "data":
12565 if ("object" !== tag) {
12566 setValueForKnownAttribute(domElement, "data", value);
12567 break;
12568 }
12569 case "src":
12570 case "href":
12571 if ("" === value && ("a" !== tag || "href" !== key)) {
12572 "src" === key ? console.error(
12573 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
12574 key,
12575 key
12576 ) : console.error(
12577 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
12578 key,
12579 key
12580 );
12581 domElement.removeAttribute(key);
12582 break;
12583 }
12584 if (null == value || "function" === typeof value || "symbol" === typeof value || "boolean" === typeof value) {
12585 domElement.removeAttribute(key);
12586 break;
12587 }
12588 checkAttributeStringCoercion(value, key);
12589 value = sanitizeURL("" + value);
12590 domElement.setAttribute(key, value);
12591 break;
12592 case "action":
12593 case "formAction":
12594 null != value && ("form" === tag ? "formAction" === key ? console.error(
12595 "You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."
12596 ) : "function" === typeof value && (null == props.encType && null == props.method || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
12597 "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
12598 )), null == props.target || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
12599 "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
12600 ))) : "input" === tag || "button" === tag ? "action" === key ? console.error(
12601 "You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."
12602 ) : "input" !== tag || "submit" === props.type || "image" === props.type || didWarnFormActionType ? "button" !== tag || null == props.type || "submit" === props.type || didWarnFormActionType ? "function" === typeof value && (null == props.name || didWarnFormActionName || (didWarnFormActionName = true, console.error(
12603 'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
12604 )), null == props.formEncType && null == props.formMethod || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
12605 "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
12606 )), null == props.formTarget || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
12607 "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
12608 ))) : (didWarnFormActionType = true, console.error(
12609 'A button can only specify a formAction along with type="submit" or no type.'
12610 )) : (didWarnFormActionType = true, console.error(
12611 'An input can only specify a formAction along with type="submit" or type="image".'
12612 )) : "action" === key ? console.error(
12613 "You can only pass the action prop to <form>."
12614 ) : console.error(
12615 "You can only pass the formAction prop to <input> or <button>."
12616 ));
12617 if ("function" === typeof value) {
12618 domElement.setAttribute(
12619 key,
12620 "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
12621 );
12622 break;
12623 } else
12624 "function" === typeof prevValue && ("formAction" === key ? ("input" !== tag && setProp(domElement, tag, "name", props.name, props, null), setProp(
12625 domElement,
12626 tag,
12627 "formEncType",
12628 props.formEncType,
12629 props,
12630 null
12631 ), setProp(
12632 domElement,
12633 tag,
12634 "formMethod",
12635 props.formMethod,
12636 props,
12637 null
12638 ), setProp(
12639 domElement,
12640 tag,
12641 "formTarget",
12642 props.formTarget,
12643 props,
12644 null
12645 )) : (setProp(
12646 domElement,
12647 tag,
12648 "encType",
12649 props.encType,
12650 props,
12651 null
12652 ), setProp(domElement, tag, "method", props.method, props, null), setProp(
12653 domElement,
12654 tag,
12655 "target",
12656 props.target,
12657 props,
12658 null
12659 )));
12660 if (null == value || "symbol" === typeof value || "boolean" === typeof value) {
12661 domElement.removeAttribute(key);
12662 break;
12663 }
12664 checkAttributeStringCoercion(value, key);
12665 value = sanitizeURL("" + value);
12666 domElement.setAttribute(key, value);
12667 break;
12668 case "onClick":
12669 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
12670 break;
12671 case "onScroll":
12672 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
12673 break;
12674 case "onScrollEnd":
12675 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
12676 break;
12677 case "dangerouslySetInnerHTML":
12678 if (null != value) {
12679 if ("object" !== typeof value || !("__html" in value))
12680 throw Error(
12681 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
12682 );
12683 key = value.__html;
12684 if (null != key) {
12685 if (null != props.children)
12686 throw Error(
12687 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
12688 );
12689 domElement.innerHTML = key;
12690 }
12691 }
12692 break;
12693 case "multiple":
12694 domElement.multiple = value && "function" !== typeof value && "symbol" !== typeof value;
12695 break;
12696 case "muted":
12697 domElement.muted = value && "function" !== typeof value && "symbol" !== typeof value;
12698 break;
12699 case "suppressContentEditableWarning":
12700 case "suppressHydrationWarning":
12701 case "defaultValue":
12702 case "defaultChecked":
12703 case "innerHTML":
12704 case "ref":
12705 break;
12706 case "autoFocus":
12707 break;
12708 case "xlinkHref":
12709 if (null == value || "function" === typeof value || "boolean" === typeof value || "symbol" === typeof value) {
12710 domElement.removeAttribute("xlink:href");
12711 break;
12712 }
12713 checkAttributeStringCoercion(value, key);
12714 key = sanitizeURL("" + value);
12715 domElement.setAttributeNS(xlinkNamespace, "xlink:href", key);
12716 break;
12717 case "contentEditable":
12718 case "spellCheck":
12719 case "draggable":
12720 case "value":
12721 case "autoReverse":
12722 case "externalResourcesRequired":
12723 case "focusable":
12724 case "preserveAlpha":
12725 null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, "" + value)) : domElement.removeAttribute(key);
12726 break;
12727 case "inert":
12728 "" !== value || didWarnForNewBooleanPropsWithEmptyValue[key] || (didWarnForNewBooleanPropsWithEmptyValue[key] = true, console.error(
12729 "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
12730 key
12731 ));
12732 case "allowFullScreen":
12733 case "async":
12734 case "autoPlay":
12735 case "controls":
12736 case "default":
12737 case "defer":
12738 case "disabled":
12739 case "disablePictureInPicture":
12740 case "disableRemotePlayback":
12741 case "formNoValidate":
12742 case "hidden":
12743 case "loop":
12744 case "noModule":
12745 case "noValidate":
12746 case "open":
12747 case "playsInline":
12748 case "readOnly":
12749 case "required":
12750 case "reversed":
12751 case "scoped":
12752 case "seamless":
12753 case "itemScope":
12754 value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key, "") : domElement.removeAttribute(key);
12755 break;
12756 case "capture":
12757 case "download":
12758 true === value ? domElement.setAttribute(key, "") : false !== value && null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
12759 break;
12760 case "cols":
12761 case "rows":
12762 case "size":
12763 case "span":
12764 null != value && "function" !== typeof value && "symbol" !== typeof value && !isNaN(value) && 1 <= value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
12765 break;
12766 case "rowSpan":
12767 case "start":
12768 null == value || "function" === typeof value || "symbol" === typeof value || isNaN(value) ? domElement.removeAttribute(key) : (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value));
12769 break;
12770 case "popover":
12771 listenToNonDelegatedEvent("beforetoggle", domElement);
12772 listenToNonDelegatedEvent("toggle", domElement);
12773 setValueForAttribute(domElement, "popover", value);
12774 break;
12775 case "xlinkActuate":
12776 setValueForNamespacedAttribute(
12777 domElement,
12778 xlinkNamespace,
12779 "xlink:actuate",
12780 value
12781 );
12782 break;
12783 case "xlinkArcrole":
12784 setValueForNamespacedAttribute(
12785 domElement,
12786 xlinkNamespace,
12787 "xlink:arcrole",
12788 value
12789 );
12790 break;
12791 case "xlinkRole":
12792 setValueForNamespacedAttribute(
12793 domElement,
12794 xlinkNamespace,
12795 "xlink:role",
12796 value
12797 );
12798 break;
12799 case "xlinkShow":
12800 setValueForNamespacedAttribute(
12801 domElement,
12802 xlinkNamespace,
12803 "xlink:show",
12804 value
12805 );
12806 break;
12807 case "xlinkTitle":
12808 setValueForNamespacedAttribute(
12809 domElement,
12810 xlinkNamespace,
12811 "xlink:title",
12812 value
12813 );
12814 break;
12815 case "xlinkType":
12816 setValueForNamespacedAttribute(
12817 domElement,
12818 xlinkNamespace,
12819 "xlink:type",
12820 value
12821 );
12822 break;
12823 case "xmlBase":
12824 setValueForNamespacedAttribute(
12825 domElement,
12826 xmlNamespace,
12827 "xml:base",
12828 value
12829 );
12830 break;
12831 case "xmlLang":
12832 setValueForNamespacedAttribute(
12833 domElement,
12834 xmlNamespace,
12835 "xml:lang",
12836 value
12837 );
12838 break;
12839 case "xmlSpace":
12840 setValueForNamespacedAttribute(
12841 domElement,
12842 xmlNamespace,
12843 "xml:space",
12844 value
12845 );
12846 break;
12847 case "is":
12848 null != prevValue && console.error(
12849 'Cannot update the "is" prop after it has been initialized.'
12850 );
12851 setValueForAttribute(domElement, "is", value);
12852 break;
12853 case "innerText":
12854 case "textContent":
12855 break;
12856 case "popoverTarget":
12857 didWarnPopoverTargetObject || null == value || "object" !== typeof value || (didWarnPopoverTargetObject = true, console.error(
12858 "The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",
12859 value
12860 ));
12861 default:
12862 !(2 < key.length) || "o" !== key[0] && "O" !== key[0] || "n" !== key[1] && "N" !== key[1] ? (key = getAttributeAlias(key), setValueForAttribute(domElement, key, value)) : registrationNameDependencies.hasOwnProperty(key) && null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
12863 }
12864 }
12865 function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
12866 switch (key) {
12867 case "style":
12868 setValueForStyles(domElement, value, prevValue);
12869 break;
12870 case "dangerouslySetInnerHTML":
12871 if (null != value) {
12872 if ("object" !== typeof value || !("__html" in value))
12873 throw Error(
12874 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
12875 );
12876 key = value.__html;
12877 if (null != key) {
12878 if (null != props.children)
12879 throw Error(
12880 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
12881 );
12882 domElement.innerHTML = key;
12883 }
12884 }
12885 break;
12886 case "children":
12887 "string" === typeof value ? setTextContent(domElement, value) : ("number" === typeof value || "bigint" === typeof value) && setTextContent(domElement, "" + value);
12888 break;
12889 case "onScroll":
12890 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
12891 break;
12892 case "onScrollEnd":
12893 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
12894 break;
12895 case "onClick":
12896 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
12897 break;
12898 case "suppressContentEditableWarning":
12899 case "suppressHydrationWarning":
12900 case "innerHTML":
12901 case "ref":
12902 break;
12903 case "innerText":
12904 case "textContent":
12905 break;
12906 default:
12907 if (registrationNameDependencies.hasOwnProperty(key))
12908 null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
12909 else
12910 a: {
12911 if ("o" === key[0] && "n" === key[1] && (props = key.endsWith("Capture"), tag = key.slice(2, props ? key.length - 7 : void 0), prevValue = domElement[internalPropsKey] || null, prevValue = null != prevValue ? prevValue[key] : null, "function" === typeof prevValue && domElement.removeEventListener(tag, prevValue, props), "function" === typeof value)) {
12912 "function" !== typeof prevValue && null !== prevValue && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key));
12913 domElement.addEventListener(tag, value, props);
12914 break a;
12915 }
12916 key in domElement ? domElement[key] = value : true === value ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
12917 }
12918 }
12919 }
12920 function setInitialProperties(domElement, tag, props) {
12921 validatePropertiesInDevelopment(tag, props);
12922 switch (tag) {
12923 case "div":
12924 case "span":
12925 case "svg":
12926 case "path":
12927 case "a":
12928 case "g":
12929 case "p":
12930 case "li":
12931 break;
12932 case "img":
12933 listenToNonDelegatedEvent("error", domElement);
12934 listenToNonDelegatedEvent("load", domElement);
12935 var hasSrc = false, hasSrcSet = false, propKey;
12936 for (propKey in props)
12937 if (props.hasOwnProperty(propKey)) {
12938 var propValue = props[propKey];
12939 if (null != propValue)
12940 switch (propKey) {
12941 case "src":
12942 hasSrc = true;
12943 break;
12944 case "srcSet":
12945 hasSrcSet = true;
12946 break;
12947 case "children":
12948 case "dangerouslySetInnerHTML":
12949 throw Error(
12950 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
12951 );
12952 default:
12953 setProp(domElement, tag, propKey, propValue, props, null);
12954 }
12955 }
12956 hasSrcSet && setProp(domElement, tag, "srcSet", props.srcSet, props, null);
12957 hasSrc && setProp(domElement, tag, "src", props.src, props, null);
12958 return;
12959 case "input":
12960 checkControlledValueProps("input", props);
12961 listenToNonDelegatedEvent("invalid", domElement);
12962 var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
12963 for (hasSrc in props)
12964 if (props.hasOwnProperty(hasSrc)) {
12965 var _propValue = props[hasSrc];
12966 if (null != _propValue)
12967 switch (hasSrc) {
12968 case "name":
12969 hasSrcSet = _propValue;
12970 break;
12971 case "type":
12972 propValue = _propValue;
12973 break;
12974 case "checked":
12975 checked = _propValue;
12976 break;
12977 case "defaultChecked":
12978 defaultChecked = _propValue;
12979 break;
12980 case "value":
12981 propKey = _propValue;
12982 break;
12983 case "defaultValue":
12984 defaultValue = _propValue;
12985 break;
12986 case "children":
12987 case "dangerouslySetInnerHTML":
12988 if (null != _propValue)
12989 throw Error(
12990 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
12991 );
12992 break;
12993 default:
12994 setProp(domElement, tag, hasSrc, _propValue, props, null);
12995 }
12996 }
12997 validateInputProps(domElement, props);
12998 initInput(
12999 domElement,
13000 propKey,
13001 defaultValue,
13002 checked,
13003 defaultChecked,
13004 propValue,
13005 hasSrcSet,
13006 false
13007 );
13008 track(domElement);
13009 return;
13010 case "select":
13011 checkControlledValueProps("select", props);
13012 listenToNonDelegatedEvent("invalid", domElement);
13013 hasSrc = propValue = propKey = null;
13014 for (hasSrcSet in props)
13015 if (props.hasOwnProperty(hasSrcSet) && (defaultValue = props[hasSrcSet], null != defaultValue))
13016 switch (hasSrcSet) {
13017 case "value":
13018 propKey = defaultValue;
13019 break;
13020 case "defaultValue":
13021 propValue = defaultValue;
13022 break;
13023 case "multiple":
13024 hasSrc = defaultValue;
13025 default:
13026 setProp(
13027 domElement,
13028 tag,
13029 hasSrcSet,
13030 defaultValue,
13031 props,
13032 null
13033 );
13034 }
13035 validateSelectProps(domElement, props);
13036 tag = propKey;
13037 props = propValue;
13038 domElement.multiple = !!hasSrc;
13039 null != tag ? updateOptions(domElement, !!hasSrc, tag, false) : null != props && updateOptions(domElement, !!hasSrc, props, true);
13040 return;
13041 case "textarea":
13042 checkControlledValueProps("textarea", props);
13043 listenToNonDelegatedEvent("invalid", domElement);
13044 propKey = hasSrcSet = hasSrc = null;
13045 for (propValue in props)
13046 if (props.hasOwnProperty(propValue) && (defaultValue = props[propValue], null != defaultValue))
13047 switch (propValue) {
13048 case "value":
13049 hasSrc = defaultValue;
13050 break;
13051 case "defaultValue":
13052 hasSrcSet = defaultValue;
13053 break;
13054 case "children":
13055 propKey = defaultValue;
13056 break;
13057 case "dangerouslySetInnerHTML":
13058 if (null != defaultValue)
13059 throw Error(
13060 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
13061 );
13062 break;
13063 default:
13064 setProp(
13065 domElement,
13066 tag,
13067 propValue,
13068 defaultValue,
13069 props,
13070 null
13071 );
13072 }
13073 validateTextareaProps(domElement, props);
13074 initTextarea(domElement, hasSrc, hasSrcSet, propKey);
13075 track(domElement);
13076 return;
13077 case "option":
13078 validateOptionProps(domElement, props);
13079 for (checked in props)
13080 if (props.hasOwnProperty(checked) && (hasSrc = props[checked], null != hasSrc))
13081 switch (checked) {
13082 case "selected":
13083 domElement.selected = hasSrc && "function" !== typeof hasSrc && "symbol" !== typeof hasSrc;
13084 break;
13085 default:
13086 setProp(domElement, tag, checked, hasSrc, props, null);
13087 }
13088 return;
13089 case "dialog":
13090 listenToNonDelegatedEvent("beforetoggle", domElement);
13091 listenToNonDelegatedEvent("toggle", domElement);
13092 listenToNonDelegatedEvent("cancel", domElement);
13093 listenToNonDelegatedEvent("close", domElement);
13094 break;
13095 case "iframe":
13096 case "object":
13097 listenToNonDelegatedEvent("load", domElement);
13098 break;
13099 case "video":
13100 case "audio":
13101 for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
13102 listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
13103 break;
13104 case "image":
13105 listenToNonDelegatedEvent("error", domElement);
13106 listenToNonDelegatedEvent("load", domElement);
13107 break;
13108 case "details":
13109 listenToNonDelegatedEvent("toggle", domElement);
13110 break;
13111 case "embed":
13112 case "source":
13113 case "link":
13114 listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
13115 case "area":
13116 case "base":
13117 case "br":
13118 case "col":
13119 case "hr":
13120 case "keygen":
13121 case "meta":
13122 case "param":
13123 case "track":
13124 case "wbr":
13125 case "menuitem":
13126 for (defaultChecked in props)
13127 if (props.hasOwnProperty(defaultChecked) && (hasSrc = props[defaultChecked], null != hasSrc))
13128 switch (defaultChecked) {
13129 case "children":
13130 case "dangerouslySetInnerHTML":
13131 throw Error(
13132 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
13133 );
13134 default:
13135 setProp(domElement, tag, defaultChecked, hasSrc, props, null);
13136 }
13137 return;
13138 default:
13139 if (isCustomElement(tag)) {
13140 for (_propValue in props)
13141 props.hasOwnProperty(_propValue) && (hasSrc = props[_propValue], void 0 !== hasSrc && setPropOnCustomElement(
13142 domElement,
13143 tag,
13144 _propValue,
13145 hasSrc,
13146 props,
13147 void 0
13148 ));
13149 return;
13150 }
13151 }
13152 for (defaultValue in props)
13153 props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], null != hasSrc && setProp(domElement, tag, defaultValue, hasSrc, props, null));
13154 }
13155 function updateProperties(domElement, tag, lastProps, nextProps) {
13156 validatePropertiesInDevelopment(tag, nextProps);
13157 switch (tag) {
13158 case "div":
13159 case "span":
13160 case "svg":
13161 case "path":
13162 case "a":
13163 case "g":
13164 case "p":
13165 case "li":
13166 break;
13167 case "input":
13168 var name = null, type = null, value = null, defaultValue = null, lastDefaultValue = null, checked = null, defaultChecked = null;
13169 for (propKey in lastProps) {
13170 var lastProp = lastProps[propKey];
13171 if (lastProps.hasOwnProperty(propKey) && null != lastProp)
13172 switch (propKey) {
13173 case "checked":
13174 break;
13175 case "value":
13176 break;
13177 case "defaultValue":
13178 lastDefaultValue = lastProp;
13179 default:
13180 nextProps.hasOwnProperty(propKey) || setProp(
13181 domElement,
13182 tag,
13183 propKey,
13184 null,
13185 nextProps,
13186 lastProp
13187 );
13188 }
13189 }
13190 for (var _propKey8 in nextProps) {
13191 var propKey = nextProps[_propKey8];
13192 lastProp = lastProps[_propKey8];
13193 if (nextProps.hasOwnProperty(_propKey8) && (null != propKey || null != lastProp))
13194 switch (_propKey8) {
13195 case "type":
13196 type = propKey;
13197 break;
13198 case "name":
13199 name = propKey;
13200 break;
13201 case "checked":
13202 checked = propKey;
13203 break;
13204 case "defaultChecked":
13205 defaultChecked = propKey;
13206 break;
13207 case "value":
13208 value = propKey;
13209 break;
13210 case "defaultValue":
13211 defaultValue = propKey;
13212 break;
13213 case "children":
13214 case "dangerouslySetInnerHTML":
13215 if (null != propKey)
13216 throw Error(
13217 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
13218 );
13219 break;
13220 default:
13221 propKey !== lastProp && setProp(
13222 domElement,
13223 tag,
13224 _propKey8,
13225 propKey,
13226 nextProps,
13227 lastProp
13228 );
13229 }
13230 }
13231 tag = "checkbox" === lastProps.type || "radio" === lastProps.type ? null != lastProps.checked : null != lastProps.value;
13232 nextProps = "checkbox" === nextProps.type || "radio" === nextProps.type ? null != nextProps.checked : null != nextProps.value;
13233 tag || !nextProps || didWarnUncontrolledToControlled || (console.error(
13234 "A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
13235 ), didWarnUncontrolledToControlled = true);
13236 !tag || nextProps || didWarnControlledToUncontrolled || (console.error(
13237 "A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
13238 ), didWarnControlledToUncontrolled = true);
13239 updateInput(
13240 domElement,
13241 value,
13242 defaultValue,
13243 lastDefaultValue,
13244 checked,
13245 defaultChecked,
13246 type,
13247 name
13248 );
13249 return;
13250 case "select":
13251 propKey = value = defaultValue = _propKey8 = null;
13252 for (type in lastProps)
13253 if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && null != lastDefaultValue)
13254 switch (type) {
13255 case "value":
13256 break;
13257 case "multiple":
13258 propKey = lastDefaultValue;
13259 default:
13260 nextProps.hasOwnProperty(type) || setProp(
13261 domElement,
13262 tag,
13263 type,
13264 null,
13265 nextProps,
13266 lastDefaultValue
13267 );
13268 }
13269 for (name in nextProps)
13270 if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (null != type || null != lastDefaultValue))
13271 switch (name) {
13272 case "value":
13273 _propKey8 = type;
13274 break;
13275 case "defaultValue":
13276 defaultValue = type;
13277 break;
13278 case "multiple":
13279 value = type;
13280 default:
13281 type !== lastDefaultValue && setProp(
13282 domElement,
13283 tag,
13284 name,
13285 type,
13286 nextProps,
13287 lastDefaultValue
13288 );
13289 }
13290 nextProps = defaultValue;
13291 tag = value;
13292 lastProps = propKey;
13293 null != _propKey8 ? updateOptions(domElement, !!tag, _propKey8, false) : !!lastProps !== !!tag && (null != nextProps ? updateOptions(domElement, !!tag, nextProps, true) : updateOptions(domElement, !!tag, tag ? [] : "", false));
13294 return;
13295 case "textarea":
13296 propKey = _propKey8 = null;
13297 for (defaultValue in lastProps)
13298 if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && null != name && !nextProps.hasOwnProperty(defaultValue))
13299 switch (defaultValue) {
13300 case "value":
13301 break;
13302 case "children":
13303 break;
13304 default:
13305 setProp(domElement, tag, defaultValue, null, nextProps, name);
13306 }
13307 for (value in nextProps)
13308 if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (null != name || null != type))
13309 switch (value) {
13310 case "value":
13311 _propKey8 = name;
13312 break;
13313 case "defaultValue":
13314 propKey = name;
13315 break;
13316 case "children":
13317 break;
13318 case "dangerouslySetInnerHTML":
13319 if (null != name)
13320 throw Error(
13321 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
13322 );
13323 break;
13324 default:
13325 name !== type && setProp(domElement, tag, value, name, nextProps, type);
13326 }
13327 updateTextarea(domElement, _propKey8, propKey);
13328 return;
13329 case "option":
13330 for (var _propKey13 in lastProps)
13331 if (_propKey8 = lastProps[_propKey13], lastProps.hasOwnProperty(_propKey13) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey13))
13332 switch (_propKey13) {
13333 case "selected":
13334 domElement.selected = false;
13335 break;
13336 default:
13337 setProp(
13338 domElement,
13339 tag,
13340 _propKey13,
13341 null,
13342 nextProps,
13343 _propKey8
13344 );
13345 }
13346 for (lastDefaultValue in nextProps)
13347 if (_propKey8 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
13348 switch (lastDefaultValue) {
13349 case "selected":
13350 domElement.selected = _propKey8 && "function" !== typeof _propKey8 && "symbol" !== typeof _propKey8;
13351 break;
13352 default:
13353 setProp(
13354 domElement,
13355 tag,
13356 lastDefaultValue,
13357 _propKey8,
13358 nextProps,
13359 propKey
13360 );
13361 }
13362 return;
13363 case "img":
13364 case "link":
13365 case "area":
13366 case "base":
13367 case "br":
13368 case "col":
13369 case "embed":
13370 case "hr":
13371 case "keygen":
13372 case "meta":
13373 case "param":
13374 case "source":
13375 case "track":
13376 case "wbr":
13377 case "menuitem":
13378 for (var _propKey15 in lastProps)
13379 _propKey8 = lastProps[_propKey15], lastProps.hasOwnProperty(_propKey15) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey15) && setProp(
13380 domElement,
13381 tag,
13382 _propKey15,
13383 null,
13384 nextProps,
13385 _propKey8
13386 );
13387 for (checked in nextProps)
13388 if (_propKey8 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
13389 switch (checked) {
13390 case "children":
13391 case "dangerouslySetInnerHTML":
13392 if (null != _propKey8)
13393 throw Error(
13394 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
13395 );
13396 break;
13397 default:
13398 setProp(
13399 domElement,
13400 tag,
13401 checked,
13402 _propKey8,
13403 nextProps,
13404 propKey
13405 );
13406 }
13407 return;
13408 default:
13409 if (isCustomElement(tag)) {
13410 for (var _propKey17 in lastProps)
13411 _propKey8 = lastProps[_propKey17], lastProps.hasOwnProperty(_propKey17) && void 0 !== _propKey8 && !nextProps.hasOwnProperty(_propKey17) && setPropOnCustomElement(
13412 domElement,
13413 tag,
13414 _propKey17,
13415 void 0,
13416 nextProps,
13417 _propKey8
13418 );
13419 for (defaultChecked in nextProps)
13420 _propKey8 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || _propKey8 === propKey || void 0 === _propKey8 && void 0 === propKey || setPropOnCustomElement(
13421 domElement,
13422 tag,
13423 defaultChecked,
13424 _propKey8,
13425 nextProps,
13426 propKey
13427 );
13428 return;
13429 }
13430 }
13431 for (var _propKey19 in lastProps)
13432 _propKey8 = lastProps[_propKey19], lastProps.hasOwnProperty(_propKey19) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey19) && setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);
13433 for (lastProp in nextProps)
13434 _propKey8 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || _propKey8 === propKey || null == _propKey8 && null == propKey || setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);
13435 }
13436 function getPropNameFromAttributeName(attrName) {
13437 switch (attrName) {
13438 case "class":
13439 return "className";
13440 case "for":
13441 return "htmlFor";
13442 default:
13443 return attrName;
13444 }
13445 }
13446 function getStylesObjectFromElement(domElement) {
13447 var serverValueInObjectForm = {};
13448 domElement = domElement.style;
13449 for (var i = 0; i < domElement.length; i++) {
13450 var styleName = domElement[i];
13451 serverValueInObjectForm[styleName] = domElement.getPropertyValue(styleName);
13452 }
13453 return serverValueInObjectForm;
13454 }
13455 function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {
13456 if (null != value$jscomp$0 && "object" !== typeof value$jscomp$0)
13457 console.error(
13458 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
13459 );
13460 else {
13461 var clientValue;
13462 var delimiter = clientValue = "", styleName;
13463 for (styleName in value$jscomp$0)
13464 if (value$jscomp$0.hasOwnProperty(styleName)) {
13465 var value = value$jscomp$0[styleName];
13466 null != value && "boolean" !== typeof value && "" !== value && (0 === styleName.indexOf("--") ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName + ":" + ("" + value).trim()) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + ("" + value).trim()) : clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + value + "px", delimiter = ";");
13467 }
13468 clientValue = clientValue || null;
13469 value$jscomp$0 = domElement.getAttribute("style");
13470 value$jscomp$0 !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue && (serverDifferences.style = getStylesObjectFromElement(domElement)));
13471 }
13472 }
13473 function hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
13474 extraAttributes.delete(attributeName);
13475 domElement = domElement.getAttribute(attributeName);
13476 if (null === domElement)
13477 switch (typeof value) {
13478 case "undefined":
13479 case "function":
13480 case "symbol":
13481 case "boolean":
13482 return;
13483 }
13484 else if (null != value)
13485 switch (typeof value) {
13486 case "function":
13487 case "symbol":
13488 case "boolean":
13489 break;
13490 default:
13491 if (checkAttributeStringCoercion(value, propKey), domElement === "" + value)
13492 return;
13493 }
13494 warnForPropDifference(propKey, domElement, value, serverDifferences);
13495 }
13496 function hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
13497 extraAttributes.delete(attributeName);
13498 domElement = domElement.getAttribute(attributeName);
13499 if (null === domElement) {
13500 switch (typeof value) {
13501 case "function":
13502 case "symbol":
13503 return;
13504 }
13505 if (!value) return;
13506 } else
13507 switch (typeof value) {
13508 case "function":
13509 case "symbol":
13510 break;
13511 default:
13512 if (value) return;
13513 }
13514 warnForPropDifference(propKey, domElement, value, serverDifferences);
13515 }
13516 function hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
13517 extraAttributes.delete(attributeName);
13518 domElement = domElement.getAttribute(attributeName);
13519 if (null === domElement)
13520 switch (typeof value) {
13521 case "undefined":
13522 case "function":
13523 case "symbol":
13524 return;
13525 }
13526 else if (null != value)
13527 switch (typeof value) {
13528 case "function":
13529 case "symbol":
13530 break;
13531 default:
13532 if (checkAttributeStringCoercion(value, attributeName), domElement === "" + value)
13533 return;
13534 }
13535 warnForPropDifference(propKey, domElement, value, serverDifferences);
13536 }
13537 function hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
13538 extraAttributes.delete(attributeName);
13539 domElement = domElement.getAttribute(attributeName);
13540 if (null === domElement)
13541 switch (typeof value) {
13542 case "undefined":
13543 case "function":
13544 case "symbol":
13545 case "boolean":
13546 return;
13547 default:
13548 if (isNaN(value)) return;
13549 }
13550 else if (null != value)
13551 switch (typeof value) {
13552 case "function":
13553 case "symbol":
13554 case "boolean":
13555 break;
13556 default:
13557 if (!isNaN(value) && (checkAttributeStringCoercion(value, propKey), domElement === "" + value))
13558 return;
13559 }
13560 warnForPropDifference(propKey, domElement, value, serverDifferences);
13561 }
13562 function hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
13563 extraAttributes.delete(attributeName);
13564 domElement = domElement.getAttribute(attributeName);
13565 if (null === domElement)
13566 switch (typeof value) {
13567 case "undefined":
13568 case "function":
13569 case "symbol":
13570 case "boolean":
13571 return;
13572 }
13573 else if (null != value)
13574 switch (typeof value) {
13575 case "function":
13576 case "symbol":
13577 case "boolean":
13578 break;
13579 default:
13580 if (checkAttributeStringCoercion(value, propKey), attributeName = sanitizeURL("" + value), domElement === attributeName)
13581 return;
13582 }
13583 warnForPropDifference(propKey, domElement, value, serverDifferences);
13584 }
13585 function diffHydratedProperties(domElement, tag, props, hostContext) {
13586 for (var serverDifferences = {}, extraAttributes = /* @__PURE__ */ new Set(), attributes = domElement.attributes, i = 0; i < attributes.length; i++)
13587 switch (attributes[i].name.toLowerCase()) {
13588 case "value":
13589 break;
13590 case "checked":
13591 break;
13592 case "selected":
13593 break;
13594 default:
13595 extraAttributes.add(attributes[i].name);
13596 }
13597 if (isCustomElement(tag))
13598 for (var propKey in props) {
13599 if (props.hasOwnProperty(propKey)) {
13600 var value = props[propKey];
13601 if (null != value) {
13602 if (registrationNameDependencies.hasOwnProperty(propKey))
13603 "function" !== typeof value && warnForInvalidEventListener(propKey, value);
13604 else if (true !== props.suppressHydrationWarning)
13605 switch (propKey) {
13606 case "children":
13607 "string" !== typeof value && "number" !== typeof value || warnForPropDifference(
13608 "children",
13609 domElement.textContent,
13610 value,
13611 serverDifferences
13612 );
13613 continue;
13614 case "suppressContentEditableWarning":
13615 case "suppressHydrationWarning":
13616 case "defaultValue":
13617 case "defaultChecked":
13618 case "innerHTML":
13619 case "ref":
13620 continue;
13621 case "dangerouslySetInnerHTML":
13622 attributes = domElement.innerHTML;
13623 value = value ? value.__html : void 0;
13624 null != value && (value = normalizeHTML(domElement, value), warnForPropDifference(
13625 propKey,
13626 attributes,
13627 value,
13628 serverDifferences
13629 ));
13630 continue;
13631 case "style":
13632 extraAttributes.delete(propKey);
13633 diffHydratedStyles(domElement, value, serverDifferences);
13634 continue;
13635 case "offsetParent":
13636 case "offsetTop":
13637 case "offsetLeft":
13638 case "offsetWidth":
13639 case "offsetHeight":
13640 case "isContentEditable":
13641 case "outerText":
13642 case "outerHTML":
13643 extraAttributes.delete(propKey.toLowerCase());
13644 console.error(
13645 "Assignment to read-only property will result in a no-op: `%s`",
13646 propKey
13647 );
13648 continue;
13649 case "className":
13650 extraAttributes.delete("class");
13651 attributes = getValueForAttributeOnCustomComponent(
13652 domElement,
13653 "class",
13654 value
13655 );
13656 warnForPropDifference(
13657 "className",
13658 attributes,
13659 value,
13660 serverDifferences
13661 );
13662 continue;
13663 default:
13664 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(propKey.toLowerCase()) : extraAttributes.delete(propKey), attributes = getValueForAttributeOnCustomComponent(
13665 domElement,
13666 propKey,
13667 value
13668 ), warnForPropDifference(
13669 propKey,
13670 attributes,
13671 value,
13672 serverDifferences
13673 );
13674 }
13675 }
13676 }
13677 }
13678 else
13679 for (value in props)
13680 if (props.hasOwnProperty(value) && (propKey = props[value], null != propKey)) {
13681 if (registrationNameDependencies.hasOwnProperty(value))
13682 "function" !== typeof propKey && warnForInvalidEventListener(value, propKey);
13683 else if (true !== props.suppressHydrationWarning)
13684 switch (value) {
13685 case "children":
13686 "string" !== typeof propKey && "number" !== typeof propKey || warnForPropDifference(
13687 "children",
13688 domElement.textContent,
13689 propKey,
13690 serverDifferences
13691 );
13692 continue;
13693 case "suppressContentEditableWarning":
13694 case "suppressHydrationWarning":
13695 case "value":
13696 case "checked":
13697 case "selected":
13698 case "defaultValue":
13699 case "defaultChecked":
13700 case "innerHTML":
13701 case "ref":
13702 continue;
13703 case "dangerouslySetInnerHTML":
13704 attributes = domElement.innerHTML;
13705 propKey = propKey ? propKey.__html : void 0;
13706 null != propKey && (propKey = normalizeHTML(domElement, propKey), attributes !== propKey && (serverDifferences[value] = { __html: attributes }));
13707 continue;
13708 case "className":
13709 hydrateAttribute(
13710 domElement,
13711 value,
13712 "class",
13713 propKey,
13714 extraAttributes,
13715 serverDifferences
13716 );
13717 continue;
13718 case "tabIndex":
13719 hydrateAttribute(
13720 domElement,
13721 value,
13722 "tabindex",
13723 propKey,
13724 extraAttributes,
13725 serverDifferences
13726 );
13727 continue;
13728 case "style":
13729 extraAttributes.delete(value);
13730 diffHydratedStyles(domElement, propKey, serverDifferences);
13731 continue;
13732 case "multiple":
13733 extraAttributes.delete(value);
13734 warnForPropDifference(
13735 value,
13736 domElement.multiple,
13737 propKey,
13738 serverDifferences
13739 );
13740 continue;
13741 case "muted":
13742 extraAttributes.delete(value);
13743 warnForPropDifference(
13744 value,
13745 domElement.muted,
13746 propKey,
13747 serverDifferences
13748 );
13749 continue;
13750 case "autoFocus":
13751 extraAttributes.delete("autofocus");
13752 warnForPropDifference(
13753 value,
13754 domElement.autofocus,
13755 propKey,
13756 serverDifferences
13757 );
13758 continue;
13759 case "data":
13760 if ("object" !== tag) {
13761 extraAttributes.delete(value);
13762 attributes = domElement.getAttribute("data");
13763 warnForPropDifference(
13764 value,
13765 attributes,
13766 propKey,
13767 serverDifferences
13768 );
13769 continue;
13770 }
13771 case "src":
13772 case "href":
13773 if (!("" !== propKey || "a" === tag && "href" === value || "object" === tag && "data" === value)) {
13774 "src" === value ? console.error(
13775 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
13776 value,
13777 value
13778 ) : console.error(
13779 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
13780 value,
13781 value
13782 );
13783 continue;
13784 }
13785 hydrateSanitizedAttribute(
13786 domElement,
13787 value,
13788 value,
13789 propKey,
13790 extraAttributes,
13791 serverDifferences
13792 );
13793 continue;
13794 case "action":
13795 case "formAction":
13796 attributes = domElement.getAttribute(value);
13797 if ("function" === typeof propKey) {
13798 extraAttributes.delete(value.toLowerCase());
13799 "formAction" === value ? (extraAttributes.delete("name"), extraAttributes.delete("formenctype"), extraAttributes.delete("formmethod"), extraAttributes.delete("formtarget")) : (extraAttributes.delete("enctype"), extraAttributes.delete("method"), extraAttributes.delete("target"));
13800 continue;
13801 } else if (attributes === EXPECTED_FORM_ACTION_URL) {
13802 extraAttributes.delete(value.toLowerCase());
13803 warnForPropDifference(
13804 value,
13805 "function",
13806 propKey,
13807 serverDifferences
13808 );
13809 continue;
13810 }
13811 hydrateSanitizedAttribute(
13812 domElement,
13813 value,
13814 value.toLowerCase(),
13815 propKey,
13816 extraAttributes,
13817 serverDifferences
13818 );
13819 continue;
13820 case "xlinkHref":
13821 hydrateSanitizedAttribute(
13822 domElement,
13823 value,
13824 "xlink:href",
13825 propKey,
13826 extraAttributes,
13827 serverDifferences
13828 );
13829 continue;
13830 case "contentEditable":
13831 hydrateBooleanishAttribute(
13832 domElement,
13833 value,
13834 "contenteditable",
13835 propKey,
13836 extraAttributes,
13837 serverDifferences
13838 );
13839 continue;
13840 case "spellCheck":
13841 hydrateBooleanishAttribute(
13842 domElement,
13843 value,
13844 "spellcheck",
13845 propKey,
13846 extraAttributes,
13847 serverDifferences
13848 );
13849 continue;
13850 case "draggable":
13851 case "autoReverse":
13852 case "externalResourcesRequired":
13853 case "focusable":
13854 case "preserveAlpha":
13855 hydrateBooleanishAttribute(
13856 domElement,
13857 value,
13858 value,
13859 propKey,
13860 extraAttributes,
13861 serverDifferences
13862 );
13863 continue;
13864 case "allowFullScreen":
13865 case "async":
13866 case "autoPlay":
13867 case "controls":
13868 case "default":
13869 case "defer":
13870 case "disabled":
13871 case "disablePictureInPicture":
13872 case "disableRemotePlayback":
13873 case "formNoValidate":
13874 case "hidden":
13875 case "loop":
13876 case "noModule":
13877 case "noValidate":
13878 case "open":
13879 case "playsInline":
13880 case "readOnly":
13881 case "required":
13882 case "reversed":
13883 case "scoped":
13884 case "seamless":
13885 case "itemScope":
13886 hydrateBooleanAttribute(
13887 domElement,
13888 value,
13889 value.toLowerCase(),
13890 propKey,
13891 extraAttributes,
13892 serverDifferences
13893 );
13894 continue;
13895 case "capture":
13896 case "download":
13897 a: {
13898 i = domElement;
13899 var attributeName = attributes = value, serverDifferences$jscomp$0 = serverDifferences;
13900 extraAttributes.delete(attributeName);
13901 i = i.getAttribute(attributeName);
13902 if (null === i)
13903 switch (typeof propKey) {
13904 case "undefined":
13905 case "function":
13906 case "symbol":
13907 break a;
13908 default:
13909 if (false === propKey) break a;
13910 }
13911 else if (null != propKey)
13912 switch (typeof propKey) {
13913 case "function":
13914 case "symbol":
13915 break;
13916 case "boolean":
13917 if (true === propKey && "" === i) break a;
13918 break;
13919 default:
13920 if (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey)
13921 break a;
13922 }
13923 warnForPropDifference(
13924 attributes,
13925 i,
13926 propKey,
13927 serverDifferences$jscomp$0
13928 );
13929 }
13930 continue;
13931 case "cols":
13932 case "rows":
13933 case "size":
13934 case "span":
13935 a: {
13936 i = domElement;
13937 attributeName = attributes = value;
13938 serverDifferences$jscomp$0 = serverDifferences;
13939 extraAttributes.delete(attributeName);
13940 i = i.getAttribute(attributeName);
13941 if (null === i)
13942 switch (typeof propKey) {
13943 case "undefined":
13944 case "function":
13945 case "symbol":
13946 case "boolean":
13947 break a;
13948 default:
13949 if (isNaN(propKey) || 1 > propKey) break a;
13950 }
13951 else if (null != propKey)
13952 switch (typeof propKey) {
13953 case "function":
13954 case "symbol":
13955 case "boolean":
13956 break;
13957 default:
13958 if (!(isNaN(propKey) || 1 > propKey) && (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey))
13959 break a;
13960 }
13961 warnForPropDifference(
13962 attributes,
13963 i,
13964 propKey,
13965 serverDifferences$jscomp$0
13966 );
13967 }
13968 continue;
13969 case "rowSpan":
13970 hydrateNumericAttribute(
13971 domElement,
13972 value,
13973 "rowspan",
13974 propKey,
13975 extraAttributes,
13976 serverDifferences
13977 );
13978 continue;
13979 case "start":
13980 hydrateNumericAttribute(
13981 domElement,
13982 value,
13983 value,
13984 propKey,
13985 extraAttributes,
13986 serverDifferences
13987 );
13988 continue;
13989 case "xHeight":
13990 hydrateAttribute(
13991 domElement,
13992 value,
13993 "x-height",
13994 propKey,
13995 extraAttributes,
13996 serverDifferences
13997 );
13998 continue;
13999 case "xlinkActuate":
14000 hydrateAttribute(
14001 domElement,
14002 value,
14003 "xlink:actuate",
14004 propKey,
14005 extraAttributes,
14006 serverDifferences
14007 );
14008 continue;
14009 case "xlinkArcrole":
14010 hydrateAttribute(
14011 domElement,
14012 value,
14013 "xlink:arcrole",
14014 propKey,
14015 extraAttributes,
14016 serverDifferences
14017 );
14018 continue;
14019 case "xlinkRole":
14020 hydrateAttribute(
14021 domElement,
14022 value,
14023 "xlink:role",
14024 propKey,
14025 extraAttributes,
14026 serverDifferences
14027 );
14028 continue;
14029 case "xlinkShow":
14030 hydrateAttribute(
14031 domElement,
14032 value,
14033 "xlink:show",
14034 propKey,
14035 extraAttributes,
14036 serverDifferences
14037 );
14038 continue;
14039 case "xlinkTitle":
14040 hydrateAttribute(
14041 domElement,
14042 value,
14043 "xlink:title",
14044 propKey,
14045 extraAttributes,
14046 serverDifferences
14047 );
14048 continue;
14049 case "xlinkType":
14050 hydrateAttribute(
14051 domElement,
14052 value,
14053 "xlink:type",
14054 propKey,
14055 extraAttributes,
14056 serverDifferences
14057 );
14058 continue;
14059 case "xmlBase":
14060 hydrateAttribute(
14061 domElement,
14062 value,
14063 "xml:base",
14064 propKey,
14065 extraAttributes,
14066 serverDifferences
14067 );
14068 continue;
14069 case "xmlLang":
14070 hydrateAttribute(
14071 domElement,
14072 value,
14073 "xml:lang",
14074 propKey,
14075 extraAttributes,
14076 serverDifferences
14077 );
14078 continue;
14079 case "xmlSpace":
14080 hydrateAttribute(
14081 domElement,
14082 value,
14083 "xml:space",
14084 propKey,
14085 extraAttributes,
14086 serverDifferences
14087 );
14088 continue;
14089 case "inert":
14090 "" !== propKey || didWarnForNewBooleanPropsWithEmptyValue[value] || (didWarnForNewBooleanPropsWithEmptyValue[value] = true, console.error(
14091 "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
14092 value
14093 ));
14094 hydrateBooleanAttribute(
14095 domElement,
14096 value,
14097 value,
14098 propKey,
14099 extraAttributes,
14100 serverDifferences
14101 );
14102 continue;
14103 default:
14104 if (!(2 < value.length) || "o" !== value[0] && "O" !== value[0] || "n" !== value[1] && "N" !== value[1]) {
14105 i = getAttributeAlias(value);
14106 attributes = false;
14107 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(i.toLowerCase()) : (attributeName = value.toLowerCase(), attributeName = possibleStandardNames.hasOwnProperty(
14108 attributeName
14109 ) ? possibleStandardNames[attributeName] || null : null, null !== attributeName && attributeName !== value && (attributes = true, extraAttributes.delete(attributeName)), extraAttributes.delete(i));
14110 a: if (attributeName = domElement, serverDifferences$jscomp$0 = i, i = propKey, isAttributeNameSafe(serverDifferences$jscomp$0))
14111 if (attributeName.hasAttribute(serverDifferences$jscomp$0))
14112 attributeName = attributeName.getAttribute(
14113 serverDifferences$jscomp$0
14114 ), checkAttributeStringCoercion(
14115 i,
14116 serverDifferences$jscomp$0
14117 ), i = attributeName === "" + i ? i : attributeName;
14118 else {
14119 switch (typeof i) {
14120 case "function":
14121 case "symbol":
14122 break a;
14123 case "boolean":
14124 if (attributeName = serverDifferences$jscomp$0.toLowerCase().slice(0, 5), "data-" !== attributeName && "aria-" !== attributeName)
14125 break a;
14126 }
14127 i = void 0 === i ? void 0 : null;
14128 }
14129 else i = void 0;
14130 attributes || warnForPropDifference(
14131 value,
14132 i,
14133 propKey,
14134 serverDifferences
14135 );
14136 }
14137 }
14138 }
14139 0 < extraAttributes.size && true !== props.suppressHydrationWarning && warnForExtraAttributes(domElement, extraAttributes, serverDifferences);
14140 return 0 === Object.keys(serverDifferences).length ? null : serverDifferences;
14141 }
14142 function propNamesListJoin(list, combinator) {
14143 switch (list.length) {
14144 case 0:
14145 return "";
14146 case 1:
14147 return list[0];
14148 case 2:
14149 return list[0] + " " + combinator + " " + list[1];
14150 default:
14151 return list.slice(0, -1).join(", ") + ", " + combinator + " " + list[list.length - 1];
14152 }
14153 }
14154 function getOwnerDocumentFromRootContainer(rootContainerElement) {
14155 return 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
14156 }
14157 function getOwnHostContext(namespaceURI) {
14158 switch (namespaceURI) {
14159 case SVG_NAMESPACE:
14160 return HostContextNamespaceSvg;
14161 case MATH_NAMESPACE:
14162 return HostContextNamespaceMath;
14163 default:
14164 return HostContextNamespaceNone;
14165 }
14166 }
14167 function getChildHostContextProd(parentNamespace, type) {
14168 if (parentNamespace === HostContextNamespaceNone)
14169 switch (type) {
14170 case "svg":
14171 return HostContextNamespaceSvg;
14172 case "math":
14173 return HostContextNamespaceMath;
14174 default:
14175 return HostContextNamespaceNone;
14176 }
14177 return parentNamespace === HostContextNamespaceSvg && "foreignObject" === type ? HostContextNamespaceNone : parentNamespace;
14178 }
14179 function shouldSetTextContent(type, props) {
14180 return "textarea" === type || "noscript" === type || "string" === typeof props.children || "number" === typeof props.children || "bigint" === typeof props.children || "object" === typeof props.dangerouslySetInnerHTML && null !== props.dangerouslySetInnerHTML && null != props.dangerouslySetInnerHTML.__html;
14181 }
14182 function shouldAttemptEagerTransition() {
14183 var event = window.event;
14184 if (event && "popstate" === event.type) {
14185 if (event === currentPopstateTransitionEvent) return false;
14186 currentPopstateTransitionEvent = event;
14187 return true;
14188 }
14189 currentPopstateTransitionEvent = null;
14190 return false;
14191 }
14192 function handleErrorInNextTick(error) {
14193 setTimeout(function() {
14194 throw error;
14195 });
14196 }
14197 function commitMount(domElement, type, newProps) {
14198 switch (type) {
14199 case "button":
14200 case "input":
14201 case "select":
14202 case "textarea":
14203 newProps.autoFocus && domElement.focus();
14204 break;
14205 case "img":
14206 newProps.src ? domElement.src = newProps.src : newProps.srcSet && (domElement.srcset = newProps.srcSet);
14207 }
14208 }
14209 function commitUpdate(domElement, type, oldProps, newProps) {
14210 updateProperties(domElement, type, oldProps, newProps);
14211 domElement[internalPropsKey] = newProps;
14212 }
14213 function resetTextContent(domElement) {
14214 setTextContent(domElement, "");
14215 }
14216 function commitTextUpdate(textInstance, oldText, newText) {
14217 textInstance.nodeValue = newText;
14218 }
14219 function isSingletonScope(type) {
14220 return "head" === type;
14221 }
14222 function removeChild(parentInstance, child) {
14223 parentInstance.removeChild(child);
14224 }
14225 function removeChildFromContainer(container, child) {
14226 (9 === container.nodeType ? container.body : "HTML" === container.nodeName ? container.ownerDocument.body : container).removeChild(child);
14227 }
14228 function clearSuspenseBoundary(parentInstance, suspenseInstance) {
14229 var node = suspenseInstance, possiblePreambleContribution = 0, depth = 0;
14230 do {
14231 var nextNode = node.nextSibling;
14232 parentInstance.removeChild(node);
14233 if (nextNode && 8 === nextNode.nodeType)
14234 if (node = nextNode.data, node === SUSPENSE_END_DATA) {
14235 if (0 < possiblePreambleContribution && 8 > possiblePreambleContribution) {
14236 node = possiblePreambleContribution;
14237 var ownerDocument = parentInstance.ownerDocument;
14238 node & PREAMBLE_CONTRIBUTION_HTML && releaseSingletonInstance(ownerDocument.documentElement);
14239 node & PREAMBLE_CONTRIBUTION_BODY && releaseSingletonInstance(ownerDocument.body);
14240 if (node & PREAMBLE_CONTRIBUTION_HEAD)
14241 for (node = ownerDocument.head, releaseSingletonInstance(node), ownerDocument = node.firstChild; ownerDocument; ) {
14242 var nextNode$jscomp$0 = ownerDocument.nextSibling, nodeName = ownerDocument.nodeName;
14243 ownerDocument[internalHoistableMarker] || "SCRIPT" === nodeName || "STYLE" === nodeName || "LINK" === nodeName && "stylesheet" === ownerDocument.rel.toLowerCase() || node.removeChild(ownerDocument);
14244 ownerDocument = nextNode$jscomp$0;
14245 }
14246 }
14247 if (0 === depth) {
14248 parentInstance.removeChild(nextNode);
14249 retryIfBlockedOn(suspenseInstance);
14250 return;
14251 }
14252 depth--;
14253 } else
14254 node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || node === SUSPENSE_FALLBACK_START_DATA ? depth++ : possiblePreambleContribution = node.charCodeAt(0) - 48;
14255 else possiblePreambleContribution = 0;
14256 node = nextNode;
14257 } while (node);
14258 retryIfBlockedOn(suspenseInstance);
14259 }
14260 function hideInstance(instance) {
14261 instance = instance.style;
14262 "function" === typeof instance.setProperty ? instance.setProperty("display", "none", "important") : instance.display = "none";
14263 }
14264 function hideTextInstance(textInstance) {
14265 textInstance.nodeValue = "";
14266 }
14267 function unhideInstance(instance, props) {
14268 props = props[STYLE];
14269 props = void 0 !== props && null !== props && props.hasOwnProperty("display") ? props.display : null;
14270 instance.style.display = null == props || "boolean" === typeof props ? "" : ("" + props).trim();
14271 }
14272 function unhideTextInstance(textInstance, text) {
14273 textInstance.nodeValue = text;
14274 }
14275 function clearContainerSparingly(container) {
14276 var nextNode = container.firstChild;
14277 nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
14278 for (; nextNode; ) {
14279 var node = nextNode;
14280 nextNode = nextNode.nextSibling;
14281 switch (node.nodeName) {
14282 case "HTML":
14283 case "HEAD":
14284 case "BODY":
14285 clearContainerSparingly(node);
14286 detachDeletedInstance(node);
14287 continue;
14288 case "SCRIPT":
14289 case "STYLE":
14290 continue;
14291 case "LINK":
14292 if ("stylesheet" === node.rel.toLowerCase()) continue;
14293 }
14294 container.removeChild(node);
14295 }
14296 }
14297 function canHydrateInstance(instance, type, props, inRootOrSingleton) {
14298 for (; 1 === instance.nodeType; ) {
14299 var anyProps = props;
14300 if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
14301 if (!inRootOrSingleton && ("INPUT" !== instance.nodeName || "hidden" !== instance.type))
14302 break;
14303 } else if (!inRootOrSingleton)
14304 if ("input" === type && "hidden" === instance.type) {
14305 checkAttributeStringCoercion(anyProps.name, "name");
14306 var name = null == anyProps.name ? null : "" + anyProps.name;
14307 if ("hidden" === anyProps.type && instance.getAttribute("name") === name)
14308 return instance;
14309 } else return instance;
14310 else if (!instance[internalHoistableMarker])
14311 switch (type) {
14312 case "meta":
14313 if (!instance.hasAttribute("itemprop")) break;
14314 return instance;
14315 case "link":
14316 name = instance.getAttribute("rel");
14317 if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
14318 break;
14319 else if (name !== anyProps.rel || instance.getAttribute("href") !== (null == anyProps.href || "" === anyProps.href ? null : anyProps.href) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) || instance.getAttribute("title") !== (null == anyProps.title ? null : anyProps.title))
14320 break;
14321 return instance;
14322 case "style":
14323 if (instance.hasAttribute("data-precedence")) break;
14324 return instance;
14325 case "script":
14326 name = instance.getAttribute("src");
14327 if ((name !== (null == anyProps.src ? null : anyProps.src) || instance.getAttribute("type") !== (null == anyProps.type ? null : anyProps.type) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) && name && instance.hasAttribute("async") && !instance.hasAttribute("itemprop"))
14328 break;
14329 return instance;
14330 default:
14331 return instance;
14332 }
14333 instance = getNextHydratable(instance.nextSibling);
14334 if (null === instance) break;
14335 }
14336 return null;
14337 }
14338 function canHydrateTextInstance(instance, text, inRootOrSingleton) {
14339 if ("" === text) return null;
14340 for (; 3 !== instance.nodeType; ) {
14341 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
14342 return null;
14343 instance = getNextHydratable(instance.nextSibling);
14344 if (null === instance) return null;
14345 }
14346 return instance;
14347 }
14348 function isSuspenseInstanceFallback(instance) {
14349 return instance.data === SUSPENSE_FALLBACK_START_DATA || instance.data === SUSPENSE_PENDING_START_DATA && instance.ownerDocument.readyState === DOCUMENT_READY_STATE_COMPLETE;
14350 }
14351 function registerSuspenseInstanceRetry(instance, callback) {
14352 var ownerDocument = instance.ownerDocument;
14353 if (instance.data !== SUSPENSE_PENDING_START_DATA || ownerDocument.readyState === DOCUMENT_READY_STATE_COMPLETE)
14354 callback();
14355 else {
14356 var listener = function() {
14357 callback();
14358 ownerDocument.removeEventListener("DOMContentLoaded", listener);
14359 };
14360 ownerDocument.addEventListener("DOMContentLoaded", listener);
14361 instance._reactRetry = listener;
14362 }
14363 }
14364 function getNextHydratable(node) {
14365 for (; null != node; node = node.nextSibling) {
14366 var nodeType = node.nodeType;
14367 if (1 === nodeType || 3 === nodeType) break;
14368 if (8 === nodeType) {
14369 nodeType = node.data;
14370 if (nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING)
14371 break;
14372 if (nodeType === SUSPENSE_END_DATA) return null;
14373 }
14374 }
14375 return node;
14376 }
14377 function describeHydratableInstanceForDevWarnings(instance) {
14378 if (1 === instance.nodeType) {
14379 for (var JSCompiler_temp_const = instance.nodeName.toLowerCase(), serverDifferences = {}, attributes = instance.attributes, i = 0; i < attributes.length; i++) {
14380 var attr = attributes[i];
14381 serverDifferences[getPropNameFromAttributeName(attr.name)] = "style" === attr.name.toLowerCase() ? getStylesObjectFromElement(instance) : attr.value;
14382 }
14383 return { type: JSCompiler_temp_const, props: serverDifferences };
14384 }
14385 return 8 === instance.nodeType ? { type: "Suspense", props: {} } : instance.nodeValue;
14386 }
14387 function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {
14388 return null === parentProps || true !== parentProps[SUPPRESS_HYDRATION_WARNING] ? (textInstance.nodeValue === text ? textInstance = null : (text = normalizeMarkupForTextOrAttribute(text), textInstance = normalizeMarkupForTextOrAttribute(textInstance.nodeValue) === text ? null : textInstance.nodeValue), textInstance) : null;
14389 }
14390 function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
14391 suspenseInstance = suspenseInstance.nextSibling;
14392 for (var depth = 0; suspenseInstance; ) {
14393 if (8 === suspenseInstance.nodeType) {
14394 var data = suspenseInstance.data;
14395 if (data === SUSPENSE_END_DATA) {
14396 if (0 === depth)
14397 return getNextHydratable(suspenseInstance.nextSibling);
14398 depth--;
14399 } else
14400 data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && data !== SUSPENSE_PENDING_START_DATA || depth++;
14401 }
14402 suspenseInstance = suspenseInstance.nextSibling;
14403 }
14404 return null;
14405 }
14406 function getParentSuspenseInstance(targetInstance) {
14407 targetInstance = targetInstance.previousSibling;
14408 for (var depth = 0; targetInstance; ) {
14409 if (8 === targetInstance.nodeType) {
14410 var data = targetInstance.data;
14411 if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
14412 if (0 === depth) return targetInstance;
14413 depth--;
14414 } else data === SUSPENSE_END_DATA && depth++;
14415 }
14416 targetInstance = targetInstance.previousSibling;
14417 }
14418 return null;
14419 }
14420 function commitHydratedContainer(container) {
14421 retryIfBlockedOn(container);
14422 }
14423 function commitHydratedSuspenseInstance(suspenseInstance) {
14424 retryIfBlockedOn(suspenseInstance);
14425 }
14426 function resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {
14427 validateDOMNestingDev && validateDOMNesting(type, hostContext.ancestorInfo);
14428 props = getOwnerDocumentFromRootContainer(rootContainerInstance);
14429 switch (type) {
14430 case "html":
14431 type = props.documentElement;
14432 if (!type)
14433 throw Error(
14434 "React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page."
14435 );
14436 return type;
14437 case "head":
14438 type = props.head;
14439 if (!type)
14440 throw Error(
14441 "React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page."
14442 );
14443 return type;
14444 case "body":
14445 type = props.body;
14446 if (!type)
14447 throw Error(
14448 "React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page."
14449 );
14450 return type;
14451 default:
14452 throw Error(
14453 "resolveSingletonInstance was called with an element type that is not supported. This is a bug in React."
14454 );
14455 }
14456 }
14457 function acquireSingletonInstance(type, props, instance, internalInstanceHandle) {
14458 if (!instance[internalContainerInstanceKey] && getInstanceFromNode(instance)) {
14459 var tagName = instance.tagName.toLowerCase();
14460 console.error(
14461 "You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",
14462 tagName,
14463 tagName,
14464 tagName
14465 );
14466 }
14467 switch (type) {
14468 case "html":
14469 case "head":
14470 case "body":
14471 break;
14472 default:
14473 console.error(
14474 "acquireSingletonInstance was called with an element type that is not supported. This is a bug in React."
14475 );
14476 }
14477 for (tagName = instance.attributes; tagName.length; )
14478 instance.removeAttributeNode(tagName[0]);
14479 setInitialProperties(instance, type, props);
14480 instance[internalInstanceKey] = internalInstanceHandle;
14481 instance[internalPropsKey] = props;
14482 }
14483 function releaseSingletonInstance(instance) {
14484 for (var attributes = instance.attributes; attributes.length; )
14485 instance.removeAttributeNode(attributes[0]);
14486 detachDeletedInstance(instance);
14487 }
14488 function getHoistableRoot(container) {
14489 return "function" === typeof container.getRootNode ? container.getRootNode() : 9 === container.nodeType ? container : container.ownerDocument;
14490 }
14491 function preconnectAs(rel, href, crossOrigin) {
14492 var ownerDocument = globalDocument;
14493 if (ownerDocument && "string" === typeof href && href) {
14494 var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
14495 limitedEscapedHref = 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
14496 "string" === typeof crossOrigin && (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
14497 preconnectsSet.has(limitedEscapedHref) || (preconnectsSet.add(limitedEscapedHref), rel = { rel, crossOrigin, href }, null === ownerDocument.querySelector(limitedEscapedHref) && (href = ownerDocument.createElement("link"), setInitialProperties(href, "link", rel), markNodeAsHoistable(href), ownerDocument.head.appendChild(href)));
14498 }
14499 }
14500 function getResource(type, currentProps, pendingProps, currentResource) {
14501 var resourceRoot = (resourceRoot = rootInstanceStackCursor.current) ? getHoistableRoot(resourceRoot) : null;
14502 if (!resourceRoot)
14503 throw Error(
14504 '"resourceRoot" was expected to exist. This is a bug in React.'
14505 );
14506 switch (type) {
14507 case "meta":
14508 case "title":
14509 return null;
14510 case "style":
14511 return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (pendingProps = getStyleKey(pendingProps.href), currentProps = getResourcesFromRoot(resourceRoot).hoistableStyles, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
14512 type: "style",
14513 instance: null,
14514 count: 0,
14515 state: null
14516 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
14517 case "link":
14518 if ("stylesheet" === pendingProps.rel && "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence) {
14519 type = getStyleKey(pendingProps.href);
14520 var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles, _resource = _styles.get(type);
14521 if (!_resource && (resourceRoot = resourceRoot.ownerDocument || resourceRoot, _resource = {
14522 type: "stylesheet",
14523 instance: null,
14524 count: 0,
14525 state: { loading: NotLoaded, preload: null }
14526 }, _styles.set(type, _resource), (_styles = resourceRoot.querySelector(
14527 getStylesheetSelectorFromKey(type)
14528 )) && !_styles._p && (_resource.instance = _styles, _resource.state.loading = Loaded | Inserted), !preloadPropsMap.has(type))) {
14529 var preloadProps = {
14530 rel: "preload",
14531 as: "style",
14532 href: pendingProps.href,
14533 crossOrigin: pendingProps.crossOrigin,
14534 integrity: pendingProps.integrity,
14535 media: pendingProps.media,
14536 hrefLang: pendingProps.hrefLang,
14537 referrerPolicy: pendingProps.referrerPolicy
14538 };
14539 preloadPropsMap.set(type, preloadProps);
14540 _styles || preloadStylesheet(
14541 resourceRoot,
14542 type,
14543 preloadProps,
14544 _resource.state
14545 );
14546 }
14547 if (currentProps && null === currentResource)
14548 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
14549 "Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
14550 );
14551 return _resource;
14552 }
14553 if (currentProps && null !== currentResource)
14554 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
14555 "Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
14556 );
14557 return null;
14558 case "script":
14559 return currentProps = pendingProps.async, pendingProps = pendingProps.src, "string" === typeof pendingProps && currentProps && "function" !== typeof currentProps && "symbol" !== typeof currentProps ? (pendingProps = getScriptKey(pendingProps), currentProps = getResourcesFromRoot(resourceRoot).hoistableScripts, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
14560 type: "script",
14561 instance: null,
14562 count: 0,
14563 state: null
14564 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
14565 default:
14566 throw Error(
14567 'getResource encountered a type it did not expect: "' + type + '". this is a bug in React.'
14568 );
14569 }
14570 }
14571 function describeLinkForResourceErrorDEV(props) {
14572 var describedProps = 0, description = "<link";
14573 "string" === typeof props.rel ? (describedProps++, description += ' rel="' + props.rel + '"') : hasOwnProperty.call(props, "rel") && (describedProps++, description += ' rel="' + (null === props.rel ? "null" : "invalid type " + typeof props.rel) + '"');
14574 "string" === typeof props.href ? (describedProps++, description += ' href="' + props.href + '"') : hasOwnProperty.call(props, "href") && (describedProps++, description += ' href="' + (null === props.href ? "null" : "invalid type " + typeof props.href) + '"');
14575 "string" === typeof props.precedence ? (describedProps++, description += ' precedence="' + props.precedence + '"') : hasOwnProperty.call(props, "precedence") && (describedProps++, description += " precedence={" + (null === props.precedence ? "null" : "invalid type " + typeof props.precedence) + "}");
14576 Object.getOwnPropertyNames(props).length > describedProps && (description += " ...");
14577 return description + " />";
14578 }
14579 function getStyleKey(href) {
14580 return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
14581 }
14582 function getStylesheetSelectorFromKey(key) {
14583 return 'link[rel="stylesheet"][' + key + "]";
14584 }
14585 function stylesheetPropsFromRawProps(rawProps) {
14586 return assign({}, rawProps, {
14587 "data-precedence": rawProps.precedence,
14588 precedence: null
14589 });
14590 }
14591 function preloadStylesheet(ownerDocument, key, preloadProps, state) {
14592 ownerDocument.querySelector(
14593 'link[rel="preload"][as="style"][' + key + "]"
14594 ) ? state.loading = Loaded : (key = ownerDocument.createElement("link"), state.preload = key, key.addEventListener("load", function() {
14595 return state.loading |= Loaded;
14596 }), key.addEventListener("error", function() {
14597 return state.loading |= Errored;
14598 }), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key));
14599 }
14600 function getScriptKey(src) {
14601 return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
14602 }
14603 function getScriptSelectorFromKey(key) {
14604 return "script[async]" + key;
14605 }
14606 function acquireResource(hoistableRoot, resource, props) {
14607 resource.count++;
14608 if (null === resource.instance)
14609 switch (resource.type) {
14610 case "style":
14611 var instance = hoistableRoot.querySelector(
14612 'style[data-href~="' + escapeSelectorAttributeValueInsideDoubleQuotes(props.href) + '"]'
14613 );
14614 if (instance)
14615 return resource.instance = instance, markNodeAsHoistable(instance), instance;
14616 var styleProps = assign({}, props, {
14617 "data-href": props.href,
14618 "data-precedence": props.precedence,
14619 href: null,
14620 precedence: null
14621 });
14622 instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("style");
14623 markNodeAsHoistable(instance);
14624 setInitialProperties(instance, "style", styleProps);
14625 insertStylesheet(instance, props.precedence, hoistableRoot);
14626 return resource.instance = instance;
14627 case "stylesheet":
14628 styleProps = getStyleKey(props.href);
14629 var _instance = hoistableRoot.querySelector(
14630 getStylesheetSelectorFromKey(styleProps)
14631 );
14632 if (_instance)
14633 return resource.state.loading |= Inserted, resource.instance = _instance, markNodeAsHoistable(_instance), _instance;
14634 instance = stylesheetPropsFromRawProps(props);
14635 (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps);
14636 _instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link");
14637 markNodeAsHoistable(_instance);
14638 var linkInstance = _instance;
14639 linkInstance._p = new Promise(function(resolve, reject) {
14640 linkInstance.onload = resolve;
14641 linkInstance.onerror = reject;
14642 });
14643 setInitialProperties(_instance, "link", instance);
14644 resource.state.loading |= Inserted;
14645 insertStylesheet(_instance, props.precedence, hoistableRoot);
14646 return resource.instance = _instance;
14647 case "script":
14648 _instance = getScriptKey(props.src);
14649 if (styleProps = hoistableRoot.querySelector(
14650 getScriptSelectorFromKey(_instance)
14651 ))
14652 return resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps;
14653 instance = props;
14654 if (styleProps = preloadPropsMap.get(_instance))
14655 instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps);
14656 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
14657 styleProps = hoistableRoot.createElement("script");
14658 markNodeAsHoistable(styleProps);
14659 setInitialProperties(styleProps, "link", instance);
14660 hoistableRoot.head.appendChild(styleProps);
14661 return resource.instance = styleProps;
14662 case "void":
14663 return null;
14664 default:
14665 throw Error(
14666 'acquireResource encountered a resource type it did not expect: "' + resource.type + '". this is a bug in React.'
14667 );
14668 }
14669 else
14670 "stylesheet" === resource.type && (resource.state.loading & Inserted) === NotLoaded && (instance = resource.instance, resource.state.loading |= Inserted, insertStylesheet(instance, props.precedence, hoistableRoot));
14671 return resource.instance;
14672 }
14673 function insertStylesheet(instance, precedence, root2) {
14674 for (var nodes = root2.querySelectorAll(
14675 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
14676 ), last = nodes.length ? nodes[nodes.length - 1] : null, prior = last, i = 0; i < nodes.length; i++) {
14677 var node = nodes[i];
14678 if (node.dataset.precedence === precedence) prior = node;
14679 else if (prior !== last) break;
14680 }
14681 prior ? prior.parentNode.insertBefore(instance, prior.nextSibling) : (precedence = 9 === root2.nodeType ? root2.head : root2, precedence.insertBefore(instance, precedence.firstChild));
14682 }
14683 function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
14684 null == stylesheetProps.crossOrigin && (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
14685 null == stylesheetProps.referrerPolicy && (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
14686 null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
14687 }
14688 function adoptPreloadPropsForScript(scriptProps, preloadProps) {
14689 null == scriptProps.crossOrigin && (scriptProps.crossOrigin = preloadProps.crossOrigin);
14690 null == scriptProps.referrerPolicy && (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
14691 null == scriptProps.integrity && (scriptProps.integrity = preloadProps.integrity);
14692 }
14693 function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
14694 if (null === tagCaches) {
14695 var cache = /* @__PURE__ */ new Map();
14696 var caches = tagCaches = /* @__PURE__ */ new Map();
14697 caches.set(ownerDocument, cache);
14698 } else
14699 caches = tagCaches, cache = caches.get(ownerDocument), cache || (cache = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache));
14700 if (cache.has(type)) return cache;
14701 cache.set(type, null);
14702 ownerDocument = ownerDocument.getElementsByTagName(type);
14703 for (caches = 0; caches < ownerDocument.length; caches++) {
14704 var node = ownerDocument[caches];
14705 if (!(node[internalHoistableMarker] || node[internalInstanceKey] || "link" === type && "stylesheet" === node.getAttribute("rel")) && node.namespaceURI !== SVG_NAMESPACE) {
14706 var nodeKey = node.getAttribute(keyAttribute) || "";
14707 nodeKey = type + nodeKey;
14708 var existing = cache.get(nodeKey);
14709 existing ? existing.push(node) : cache.set(nodeKey, [node]);
14710 }
14711 }
14712 return cache;
14713 }
14714 function mountHoistable(hoistableRoot, type, instance) {
14715 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
14716 hoistableRoot.head.insertBefore(
14717 instance,
14718 "title" === type ? hoistableRoot.querySelector("head > title") : null
14719 );
14720 }
14721 function isHostHoistableType(type, props, hostContext) {
14722 var outsideHostContainerContext = !hostContext.ancestorInfo.containerTagInScope;
14723 if (hostContext.context === HostContextNamespaceSvg || null != props.itemProp)
14724 return !outsideHostContainerContext || null == props.itemProp || "meta" !== type && "title" !== type && "style" !== type && "link" !== type && "script" !== type || console.error(
14725 "Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",
14726 type,
14727 type
14728 ), false;
14729 switch (type) {
14730 case "meta":
14731 case "title":
14732 return true;
14733 case "style":
14734 if ("string" !== typeof props.precedence || "string" !== typeof props.href || "" === props.href) {
14735 outsideHostContainerContext && console.error(
14736 'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.'
14737 );
14738 break;
14739 }
14740 return true;
14741 case "link":
14742 if ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href || props.onLoad || props.onError) {
14743 if ("stylesheet" === props.rel && "string" === typeof props.precedence) {
14744 type = props.href;
14745 var onError = props.onError, disabled = props.disabled;
14746 hostContext = [];
14747 props.onLoad && hostContext.push("`onLoad`");
14748 onError && hostContext.push("`onError`");
14749 null != disabled && hostContext.push("`disabled`");
14750 onError = propNamesListJoin(hostContext, "and");
14751 onError += 1 === hostContext.length ? " prop" : " props";
14752 disabled = 1 === hostContext.length ? "an " + onError : "the " + onError;
14753 hostContext.length && console.error(
14754 'React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',
14755 type,
14756 disabled,
14757 onError
14758 );
14759 }
14760 outsideHostContainerContext && ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href ? console.error(
14761 "Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"
14762 ) : (props.onError || props.onLoad) && console.error(
14763 "Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
14764 ));
14765 break;
14766 }
14767 switch (props.rel) {
14768 case "stylesheet":
14769 return type = props.precedence, props = props.disabled, "string" !== typeof type && outsideHostContainerContext && console.error(
14770 'Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'
14771 ), "string" === typeof type && null == props;
14772 default:
14773 return true;
14774 }
14775 case "script":
14776 type = props.async && "function" !== typeof props.async && "symbol" !== typeof props.async;
14777 if (!type || props.onLoad || props.onError || !props.src || "string" !== typeof props.src) {
14778 outsideHostContainerContext && (type ? props.onLoad || props.onError ? console.error(
14779 "Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
14780 ) : console.error(
14781 "Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."
14782 ) : console.error(
14783 'Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'
14784 ));
14785 break;
14786 }
14787 return true;
14788 case "noscript":
14789 case "template":
14790 outsideHostContainerContext && console.error(
14791 "Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",
14792 type
14793 );
14794 }
14795 return false;
14796 }
14797 function preloadResource(resource) {
14798 return "stylesheet" === resource.type && (resource.state.loading & Settled) === NotLoaded ? false : true;
14799 }
14800 function noop() {
14801 }
14802 function suspendResource(hoistableRoot, resource, props) {
14803 if (null === suspendedState)
14804 throw Error(
14805 "Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug."
14806 );
14807 var state = suspendedState;
14808 if ("stylesheet" === resource.type && ("string" !== typeof props.media || false !== matchMedia(props.media).matches) && (resource.state.loading & Inserted) === NotLoaded) {
14809 if (null === resource.instance) {
14810 var key = getStyleKey(props.href), instance = hoistableRoot.querySelector(
14811 getStylesheetSelectorFromKey(key)
14812 );
14813 if (instance) {
14814 hoistableRoot = instance._p;
14815 null !== hoistableRoot && "object" === typeof hoistableRoot && "function" === typeof hoistableRoot.then && (state.count++, state = onUnsuspend.bind(state), hoistableRoot.then(state, state));
14816 resource.state.loading |= Inserted;
14817 resource.instance = instance;
14818 markNodeAsHoistable(instance);
14819 return;
14820 }
14821 instance = hoistableRoot.ownerDocument || hoistableRoot;
14822 props = stylesheetPropsFromRawProps(props);
14823 (key = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(props, key);
14824 instance = instance.createElement("link");
14825 markNodeAsHoistable(instance);
14826 var linkInstance = instance;
14827 linkInstance._p = new Promise(function(resolve, reject) {
14828 linkInstance.onload = resolve;
14829 linkInstance.onerror = reject;
14830 });
14831 setInitialProperties(instance, "link", props);
14832 resource.instance = instance;
14833 }
14834 null === state.stylesheets && (state.stylesheets = /* @__PURE__ */ new Map());
14835 state.stylesheets.set(resource, hoistableRoot);
14836 (hoistableRoot = resource.state.preload) && (resource.state.loading & Settled) === NotLoaded && (state.count++, resource = onUnsuspend.bind(state), hoistableRoot.addEventListener("load", resource), hoistableRoot.addEventListener("error", resource));
14837 }
14838 }
14839 function waitForCommitToBeReady() {
14840 if (null === suspendedState)
14841 throw Error(
14842 "Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug."
14843 );
14844 var state = suspendedState;
14845 state.stylesheets && 0 === state.count && insertSuspendedStylesheets(state, state.stylesheets);
14846 return 0 < state.count ? function(commit) {
14847 var stylesheetTimer = setTimeout(function() {
14848 state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
14849 if (state.unsuspend) {
14850 var unsuspend = state.unsuspend;
14851 state.unsuspend = null;
14852 unsuspend();
14853 }
14854 }, 6e4);
14855 state.unsuspend = commit;
14856 return function() {
14857 state.unsuspend = null;
14858 clearTimeout(stylesheetTimer);
14859 };
14860 } : null;
14861 }
14862 function onUnsuspend() {
14863 this.count--;
14864 if (0 === this.count) {
14865 if (this.stylesheets)
14866 insertSuspendedStylesheets(this, this.stylesheets);
14867 else if (this.unsuspend) {
14868 var unsuspend = this.unsuspend;
14869 this.unsuspend = null;
14870 unsuspend();
14871 }
14872 }
14873 }
14874 function insertSuspendedStylesheets(state, resources) {
14875 state.stylesheets = null;
14876 null !== state.unsuspend && (state.count++, precedencesByRoot = /* @__PURE__ */ new Map(), resources.forEach(insertStylesheetIntoRoot, state), precedencesByRoot = null, onUnsuspend.call(state));
14877 }
14878 function insertStylesheetIntoRoot(root2, resource) {
14879 if (!(resource.state.loading & Inserted)) {
14880 var precedences = precedencesByRoot.get(root2);
14881 if (precedences) var last = precedences.get(LAST_PRECEDENCE);
14882 else {
14883 precedences = /* @__PURE__ */ new Map();
14884 precedencesByRoot.set(root2, precedences);
14885 for (var nodes = root2.querySelectorAll(
14886 "link[data-precedence],style[data-precedence]"
14887 ), i = 0; i < nodes.length; i++) {
14888 var node = nodes[i];
14889 if ("LINK" === node.nodeName || "not all" !== node.getAttribute("media"))
14890 precedences.set(node.dataset.precedence, node), last = node;
14891 }
14892 last && precedences.set(LAST_PRECEDENCE, last);
14893 }
14894 nodes = resource.instance;
14895 node = nodes.getAttribute("data-precedence");
14896 i = precedences.get(node) || last;
14897 i === last && precedences.set(LAST_PRECEDENCE, nodes);
14898 precedences.set(node, nodes);
14899 this.count++;
14900 last = onUnsuspend.bind(this);
14901 nodes.addEventListener("load", last);
14902 nodes.addEventListener("error", last);
14903 i ? i.parentNode.insertBefore(nodes, i.nextSibling) : (root2 = 9 === root2.nodeType ? root2.head : root2, root2.insertBefore(nodes, root2.firstChild));
14904 resource.state.loading |= Inserted;
14905 }
14906 }
14907 function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, formState) {
14908 this.tag = 1;
14909 this.containerInfo = containerInfo;
14910 this.pingCache = this.current = this.pendingChildren = null;
14911 this.timeoutHandle = noTimeout;
14912 this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null;
14913 this.callbackPriority = 0;
14914 this.expirationTimes = createLaneMap(-1);
14915 this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
14916 this.entanglements = createLaneMap(0);
14917 this.hiddenUpdates = createLaneMap(null);
14918 this.identifierPrefix = identifierPrefix;
14919 this.onUncaughtError = onUncaughtError;
14920 this.onCaughtError = onCaughtError;
14921 this.onRecoverableError = onRecoverableError;
14922 this.pooledCache = null;
14923 this.pooledCacheLanes = 0;
14924 this.formState = formState;
14925 this.incompleteTransitions = /* @__PURE__ */ new Map();
14926 this.passiveEffectDuration = this.effectDuration = -0;
14927 this.memoizedUpdaters = /* @__PURE__ */ new Set();
14928 containerInfo = this.pendingUpdatersLaneMap = [];
14929 for (tag = 0; 31 > tag; tag++) containerInfo.push(/* @__PURE__ */ new Set());
14930 this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()";
14931 }
14932 function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transitionCallbacks, formState) {
14933 containerInfo = new FiberRootNode(
14934 containerInfo,
14935 tag,
14936 hydrate,
14937 identifierPrefix,
14938 onUncaughtError,
14939 onCaughtError,
14940 onRecoverableError,
14941 formState
14942 );
14943 tag = ConcurrentMode;
14944 true === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);
14945 isDevToolsPresent && (tag |= ProfileMode);
14946 isStrictMode = createFiber(3, null, null, tag);
14947 containerInfo.current = isStrictMode;
14948 isStrictMode.stateNode = containerInfo;
14949 tag = createCache();
14950 retainCache(tag);
14951 containerInfo.pooledCache = tag;
14952 retainCache(tag);
14953 isStrictMode.memoizedState = {
14954 element: initialChildren,
14955 isDehydrated: hydrate,
14956 cache: tag
14957 };
14958 initializeUpdateQueue(isStrictMode);
14959 return containerInfo;
14960 }
14961 function getContextForSubtree(parentComponent) {
14962 if (!parentComponent) return emptyContextObject;
14963 parentComponent = emptyContextObject;
14964 return parentComponent;
14965 }
14966 function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
14967 if (injectedHook && "function" === typeof injectedHook.onScheduleFiberRoot)
14968 try {
14969 injectedHook.onScheduleFiberRoot(rendererID, container, element);
14970 } catch (err) {
14971 hasLoggedError || (hasLoggedError = true, console.error(
14972 "React instrumentation encountered an error: %s",
14973 err
14974 ));
14975 }
14976 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markRenderScheduled && injectedProfilingHooks.markRenderScheduled(lane);
14977 parentComponent = getContextForSubtree(parentComponent);
14978 null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
14979 isRendering && null !== current && !didWarnAboutNestedUpdates && (didWarnAboutNestedUpdates = true, console.error(
14980 "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",
14981 getComponentNameFromFiber(current) || "Unknown"
14982 ));
14983 container = createUpdate(lane);
14984 container.payload = { element };
14985 callback = void 0 === callback ? null : callback;
14986 null !== callback && ("function" !== typeof callback && console.error(
14987 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
14988 callback
14989 ), container.callback = callback);
14990 element = enqueueUpdate(rootFiber, container, lane);
14991 null !== element && (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
14992 }
14993 function markRetryLaneImpl(fiber, retryLane) {
14994 fiber = fiber.memoizedState;
14995 if (null !== fiber && null !== fiber.dehydrated) {
14996 var a = fiber.retryLane;
14997 fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
14998 }
14999 }
15000 function markRetryLaneIfNotHydrated(fiber, retryLane) {
15001 markRetryLaneImpl(fiber, retryLane);
15002 (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
15003 }
15004 function attemptContinuousHydration(fiber) {
15005 if (13 === fiber.tag) {
15006 var root2 = enqueueConcurrentRenderForLane(fiber, 67108864);
15007 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 67108864);
15008 markRetryLaneIfNotHydrated(fiber, 67108864);
15009 }
15010 }
15011 function getCurrentFiberForDevTools() {
15012 return current;
15013 }
15014 function getLaneLabelMap() {
15015 for (var map = /* @__PURE__ */ new Map(), lane = 1, index = 0; 31 > index; index++) {
15016 var label = getLabelForLane(lane);
15017 map.set(lane, label);
15018 lane *= 2;
15019 }
15020 return map;
15021 }
15022 function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
15023 var prevTransition = ReactSharedInternals.T;
15024 ReactSharedInternals.T = null;
15025 var previousPriority = ReactDOMSharedInternals.p;
15026 try {
15027 ReactDOMSharedInternals.p = DiscreteEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
15028 } finally {
15029 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
15030 }
15031 }
15032 function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
15033 var prevTransition = ReactSharedInternals.T;
15034 ReactSharedInternals.T = null;
15035 var previousPriority = ReactDOMSharedInternals.p;
15036 try {
15037 ReactDOMSharedInternals.p = ContinuousEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
15038 } finally {
15039 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
15040 }
15041 }
15042 function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
15043 if (_enabled) {
15044 var blockedOn = findInstanceBlockingEvent(nativeEvent);
15045 if (null === blockedOn)
15046 dispatchEventForPluginEventSystem(
15047 domEventName,
15048 eventSystemFlags,
15049 nativeEvent,
15050 return_targetInst,
15051 targetContainer
15052 ), clearIfContinuousEvent(domEventName, nativeEvent);
15053 else if (queueIfContinuousEvent(
15054 blockedOn,
15055 domEventName,
15056 eventSystemFlags,
15057 targetContainer,
15058 nativeEvent
15059 ))
15060 nativeEvent.stopPropagation();
15061 else if (clearIfContinuousEvent(domEventName, nativeEvent), eventSystemFlags & 4 && -1 < discreteReplayableEvents.indexOf(domEventName)) {
15062 for (; null !== blockedOn; ) {
15063 var fiber = getInstanceFromNode(blockedOn);
15064 if (null !== fiber)
15065 switch (fiber.tag) {
15066 case 3:
15067 fiber = fiber.stateNode;
15068 if (fiber.current.memoizedState.isDehydrated) {
15069 var lanes = getHighestPriorityLanes(fiber.pendingLanes);
15070 if (0 !== lanes) {
15071 var root2 = fiber;
15072 root2.pendingLanes |= 2;
15073 for (root2.entangledLanes |= 2; lanes; ) {
15074 var lane = 1 << 31 - clz32(lanes);
15075 root2.entanglements[1] |= lane;
15076 lanes &= ~lane;
15077 }
15078 ensureRootIsScheduled(fiber);
15079 (executionContext & (RenderContext | CommitContext)) === NoContext && (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS, flushSyncWorkAcrossRoots_impl(0, false));
15080 }
15081 }
15082 break;
15083 case 13:
15084 root2 = enqueueConcurrentRenderForLane(fiber, 2), null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2), flushSyncWork$1(), markRetryLaneIfNotHydrated(fiber, 2);
15085 }
15086 fiber = findInstanceBlockingEvent(nativeEvent);
15087 null === fiber && dispatchEventForPluginEventSystem(
15088 domEventName,
15089 eventSystemFlags,
15090 nativeEvent,
15091 return_targetInst,
15092 targetContainer
15093 );
15094 if (fiber === blockedOn) break;
15095 blockedOn = fiber;
15096 }
15097 null !== blockedOn && nativeEvent.stopPropagation();
15098 } else
15099 dispatchEventForPluginEventSystem(
15100 domEventName,
15101 eventSystemFlags,
15102 nativeEvent,
15103 null,
15104 targetContainer
15105 );
15106 }
15107 }
15108 function findInstanceBlockingEvent(nativeEvent) {
15109 nativeEvent = getEventTarget(nativeEvent);
15110 return findInstanceBlockingTarget(nativeEvent);
15111 }
15112 function findInstanceBlockingTarget(targetNode) {
15113 return_targetInst = null;
15114 targetNode = getClosestInstanceFromNode(targetNode);
15115 if (null !== targetNode) {
15116 var nearestMounted = getNearestMountedFiber(targetNode);
15117 if (null === nearestMounted) targetNode = null;
15118 else {
15119 var tag = nearestMounted.tag;
15120 if (13 === tag) {
15121 targetNode = getSuspenseInstanceFromFiber(nearestMounted);
15122 if (null !== targetNode) return targetNode;
15123 targetNode = null;
15124 } else if (3 === tag) {
15125 if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
15126 return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
15127 targetNode = null;
15128 } else nearestMounted !== targetNode && (targetNode = null);
15129 }
15130 }
15131 return_targetInst = targetNode;
15132 return null;
15133 }
15134 function getEventPriority(domEventName) {
15135 switch (domEventName) {
15136 case "beforetoggle":
15137 case "cancel":
15138 case "click":
15139 case "close":
15140 case "contextmenu":
15141 case "copy":
15142 case "cut":
15143 case "auxclick":
15144 case "dblclick":
15145 case "dragend":
15146 case "dragstart":
15147 case "drop":
15148 case "focusin":
15149 case "focusout":
15150 case "input":
15151 case "invalid":
15152 case "keydown":
15153 case "keypress":
15154 case "keyup":
15155 case "mousedown":
15156 case "mouseup":
15157 case "paste":
15158 case "pause":
15159 case "play":
15160 case "pointercancel":
15161 case "pointerdown":
15162 case "pointerup":
15163 case "ratechange":
15164 case "reset":
15165 case "resize":
15166 case "seeked":
15167 case "submit":
15168 case "toggle":
15169 case "touchcancel":
15170 case "touchend":
15171 case "touchstart":
15172 case "volumechange":
15173 case "change":
15174 case "selectionchange":
15175 case "textInput":
15176 case "compositionstart":
15177 case "compositionend":
15178 case "compositionupdate":
15179 case "beforeblur":
15180 case "afterblur":
15181 case "beforeinput":
15182 case "blur":
15183 case "fullscreenchange":
15184 case "focus":
15185 case "hashchange":
15186 case "popstate":
15187 case "select":
15188 case "selectstart":
15189 return DiscreteEventPriority;
15190 case "drag":
15191 case "dragenter":
15192 case "dragexit":
15193 case "dragleave":
15194 case "dragover":
15195 case "mousemove":
15196 case "mouseout":
15197 case "mouseover":
15198 case "pointermove":
15199 case "pointerout":
15200 case "pointerover":
15201 case "scroll":
15202 case "touchmove":
15203 case "wheel":
15204 case "mouseenter":
15205 case "mouseleave":
15206 case "pointerenter":
15207 case "pointerleave":
15208 return ContinuousEventPriority;
15209 case "message":
15210 switch (getCurrentPriorityLevel()) {
15211 case ImmediatePriority:
15212 return DiscreteEventPriority;
15213 case UserBlockingPriority:
15214 return ContinuousEventPriority;
15215 case NormalPriority$1:
15216 case LowPriority:
15217 return DefaultEventPriority;
15218 case IdlePriority:
15219 return IdleEventPriority;
15220 default:
15221 return DefaultEventPriority;
15222 }
15223 default:
15224 return DefaultEventPriority;
15225 }
15226 }
15227 function clearIfContinuousEvent(domEventName, nativeEvent) {
15228 switch (domEventName) {
15229 case "focusin":
15230 case "focusout":
15231 queuedFocus = null;
15232 break;
15233 case "dragenter":
15234 case "dragleave":
15235 queuedDrag = null;
15236 break;
15237 case "mouseover":
15238 case "mouseout":
15239 queuedMouse = null;
15240 break;
15241 case "pointerover":
15242 case "pointerout":
15243 queuedPointers.delete(nativeEvent.pointerId);
15244 break;
15245 case "gotpointercapture":
15246 case "lostpointercapture":
15247 queuedPointerCaptures.delete(nativeEvent.pointerId);
15248 }
15249 }
15250 function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
15251 if (null === existingQueuedEvent || existingQueuedEvent.nativeEvent !== nativeEvent)
15252 return existingQueuedEvent = {
15253 blockedOn,
15254 domEventName,
15255 eventSystemFlags,
15256 nativeEvent,
15257 targetContainers: [targetContainer]
15258 }, null !== blockedOn && (blockedOn = getInstanceFromNode(blockedOn), null !== blockedOn && attemptContinuousHydration(blockedOn)), existingQueuedEvent;
15259 existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
15260 blockedOn = existingQueuedEvent.targetContainers;
15261 null !== targetContainer && -1 === blockedOn.indexOf(targetContainer) && blockedOn.push(targetContainer);
15262 return existingQueuedEvent;
15263 }
15264 function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
15265 switch (domEventName) {
15266 case "focusin":
15267 return queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
15268 queuedFocus,
15269 blockedOn,
15270 domEventName,
15271 eventSystemFlags,
15272 targetContainer,
15273 nativeEvent
15274 ), true;
15275 case "dragenter":
15276 return queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
15277 queuedDrag,
15278 blockedOn,
15279 domEventName,
15280 eventSystemFlags,
15281 targetContainer,
15282 nativeEvent
15283 ), true;
15284 case "mouseover":
15285 return queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
15286 queuedMouse,
15287 blockedOn,
15288 domEventName,
15289 eventSystemFlags,
15290 targetContainer,
15291 nativeEvent
15292 ), true;
15293 case "pointerover":
15294 var pointerId = nativeEvent.pointerId;
15295 queuedPointers.set(
15296 pointerId,
15297 accumulateOrCreateContinuousQueuedReplayableEvent(
15298 queuedPointers.get(pointerId) || null,
15299 blockedOn,
15300 domEventName,
15301 eventSystemFlags,
15302 targetContainer,
15303 nativeEvent
15304 )
15305 );
15306 return true;
15307 case "gotpointercapture":
15308 return pointerId = nativeEvent.pointerId, queuedPointerCaptures.set(
15309 pointerId,
15310 accumulateOrCreateContinuousQueuedReplayableEvent(
15311 queuedPointerCaptures.get(pointerId) || null,
15312 blockedOn,
15313 domEventName,
15314 eventSystemFlags,
15315 targetContainer,
15316 nativeEvent
15317 )
15318 ), true;
15319 }
15320 return false;
15321 }
15322 function attemptExplicitHydrationTarget(queuedTarget) {
15323 var targetInst = getClosestInstanceFromNode(queuedTarget.target);
15324 if (null !== targetInst) {
15325 var nearestMounted = getNearestMountedFiber(targetInst);
15326 if (null !== nearestMounted) {
15327 if (targetInst = nearestMounted.tag, 13 === targetInst) {
15328 if (targetInst = getSuspenseInstanceFromFiber(nearestMounted), null !== targetInst) {
15329 queuedTarget.blockedOn = targetInst;
15330 runWithPriority(queuedTarget.priority, function() {
15331 if (13 === nearestMounted.tag) {
15332 var lane = requestUpdateLane(nearestMounted);
15333 lane = getBumpedLaneForHydrationByLane(lane);
15334 var root2 = enqueueConcurrentRenderForLane(
15335 nearestMounted,
15336 lane
15337 );
15338 null !== root2 && scheduleUpdateOnFiber(root2, nearestMounted, lane);
15339 markRetryLaneIfNotHydrated(nearestMounted, lane);
15340 }
15341 });
15342 return;
15343 }
15344 } else if (3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated) {
15345 queuedTarget.blockedOn = 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
15346 return;
15347 }
15348 }
15349 }
15350 queuedTarget.blockedOn = null;
15351 }
15352 function attemptReplayContinuousQueuedEvent(queuedEvent) {
15353 if (null !== queuedEvent.blockedOn) return false;
15354 for (var targetContainers = queuedEvent.targetContainers; 0 < targetContainers.length; ) {
15355 var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
15356 if (null === nextBlockedOn) {
15357 nextBlockedOn = queuedEvent.nativeEvent;
15358 var nativeEventClone = new nextBlockedOn.constructor(
15359 nextBlockedOn.type,
15360 nextBlockedOn
15361 ), event = nativeEventClone;
15362 null !== currentReplayingEvent && console.error(
15363 "Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."
15364 );
15365 currentReplayingEvent = event;
15366 nextBlockedOn.target.dispatchEvent(nativeEventClone);
15367 null === currentReplayingEvent && console.error(
15368 "Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."
15369 );
15370 currentReplayingEvent = null;
15371 } else
15372 return targetContainers = getInstanceFromNode(nextBlockedOn), null !== targetContainers && attemptContinuousHydration(targetContainers), queuedEvent.blockedOn = nextBlockedOn, false;
15373 targetContainers.shift();
15374 }
15375 return true;
15376 }
15377 function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
15378 attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
15379 }
15380 function replayUnblockedEvents() {
15381 hasScheduledReplayAttempt = false;
15382 null !== queuedFocus && attemptReplayContinuousQueuedEvent(queuedFocus) && (queuedFocus = null);
15383 null !== queuedDrag && attemptReplayContinuousQueuedEvent(queuedDrag) && (queuedDrag = null);
15384 null !== queuedMouse && attemptReplayContinuousQueuedEvent(queuedMouse) && (queuedMouse = null);
15385 queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
15386 queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
15387 }
15388 function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
15389 queuedEvent.blockedOn === unblocked && (queuedEvent.blockedOn = null, hasScheduledReplayAttempt || (hasScheduledReplayAttempt = true, Scheduler.unstable_scheduleCallback(
15390 Scheduler.unstable_NormalPriority,
15391 replayUnblockedEvents
15392 )));
15393 }
15394 function scheduleReplayQueueIfNeeded(formReplayingQueue) {
15395 lastScheduledReplayQueue !== formReplayingQueue && (lastScheduledReplayQueue = formReplayingQueue, Scheduler.unstable_scheduleCallback(
15396 Scheduler.unstable_NormalPriority,
15397 function() {
15398 lastScheduledReplayQueue === formReplayingQueue && (lastScheduledReplayQueue = null);
15399 for (var i = 0; i < formReplayingQueue.length; i += 3) {
15400 var form = formReplayingQueue[i], submitterOrAction = formReplayingQueue[i + 1], formData = formReplayingQueue[i + 2];
15401 if ("function" !== typeof submitterOrAction)
15402 if (null === findInstanceBlockingTarget(submitterOrAction || form))
15403 continue;
15404 else break;
15405 var formInst = getInstanceFromNode(form);
15406 null !== formInst && (formReplayingQueue.splice(i, 3), i -= 3, form = {
15407 pending: true,
15408 data: formData,
15409 method: form.method,
15410 action: submitterOrAction
15411 }, Object.freeze(form), startHostTransition(
15412 formInst,
15413 form,
15414 submitterOrAction,
15415 formData
15416 ));
15417 }
15418 }
15419 ));
15420 }
15421 function retryIfBlockedOn(unblocked) {
15422 function unblock(queuedEvent) {
15423 return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
15424 }
15425 null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
15426 null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
15427 null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
15428 queuedPointers.forEach(unblock);
15429 queuedPointerCaptures.forEach(unblock);
15430 for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
15431 var queuedTarget = queuedExplicitHydrationTargets[i];
15432 queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
15433 }
15434 for (; 0 < queuedExplicitHydrationTargets.length && (i = queuedExplicitHydrationTargets[0], null === i.blockedOn); )
15435 attemptExplicitHydrationTarget(i), null === i.blockedOn && queuedExplicitHydrationTargets.shift();
15436 i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
15437 if (null != i)
15438 for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
15439 var form = i[queuedTarget], submitterOrAction = i[queuedTarget + 1], formProps = form[internalPropsKey] || null;
15440 if ("function" === typeof submitterOrAction)
15441 formProps || scheduleReplayQueueIfNeeded(i);
15442 else if (formProps) {
15443 var action = null;
15444 if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
15445 if (form = submitterOrAction, formProps = submitterOrAction[internalPropsKey] || null)
15446 action = formProps.formAction;
15447 else {
15448 if (null !== findInstanceBlockingTarget(form)) continue;
15449 }
15450 else action = formProps.action;
15451 "function" === typeof action ? i[queuedTarget + 1] = action : (i.splice(queuedTarget, 3), queuedTarget -= 3);
15452 scheduleReplayQueueIfNeeded(i);
15453 }
15454 }
15455 }
15456 function ReactDOMRoot(internalRoot) {
15457 this._internalRoot = internalRoot;
15458 }
15459 function ReactDOMHydrationRoot(internalRoot) {
15460 this._internalRoot = internalRoot;
15461 }
15462 function warnIfReactDOMContainerInDEV(container) {
15463 container[internalContainerInstanceKey] && (container._reactRootContainer ? console.error(
15464 "You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."
15465 ) : console.error(
15466 "You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."
15467 ));
15468 }
15469 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
15470 var Scheduler = require_scheduler(), React2 = require_react(), ReactDOM2 = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
15471 Symbol.for("react.scope");
15472 var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
15473 Symbol.for("react.legacy_hidden");
15474 Symbol.for("react.tracing_marker");
15475 var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
15476 Symbol.for("react.view_transition");
15477 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
15478 pending: false,
15479 data: null,
15480 method: null,
15481 action: null
15482 }), valueStack = [];
15483 var fiberStack = [];
15484 var index$jscomp$0 = -1, contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, requestPaint = Scheduler.unstable_requestPaint, now$1 = Scheduler.unstable_now, getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel, ImmediatePriority = Scheduler.unstable_ImmediatePriority, UserBlockingPriority = Scheduler.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler.unstable_NormalPriority, LowPriority = Scheduler.unstable_LowPriority, IdlePriority = Scheduler.unstable_IdlePriority, log$1 = Scheduler.log, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null, injectedProfilingHooks = null, hasLoggedError = false, isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2, nextTransitionLane = 256, nextRetryLane = 4194304, DiscreteEventPriority = 2, ContinuousEventPriority = 8, DefaultEventPriority = 32, IdleEventPriority = 268435456, randomKey = Math.random().toString(36).slice(2), internalInstanceKey = "__reactFiber$" + randomKey, internalPropsKey = "__reactProps$" + randomKey, internalContainerInstanceKey = "__reactContainer$" + randomKey, internalEventHandlersKey = "__reactEvents$" + randomKey, internalEventHandlerListenersKey = "__reactListeners$" + randomKey, internalEventHandlesSetKey = "__reactHandles$" + randomKey, internalRootNodeResourcesKey = "__reactResources$" + randomKey, internalHoistableMarker = "__reactMarker$" + randomKey, allNativeEvents = /* @__PURE__ */ new Set(), registrationNameDependencies = {}, possibleRegistrationNames = {}, hasReadOnlyValue = {
15485 button: true,
15486 checkbox: true,
15487 image: true,
15488 hidden: true,
15489 radio: true,
15490 reset: true,
15491 submit: true
15492 }, VALID_ATTRIBUTE_NAME_REGEX = RegExp(
15493 "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
15494 ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
15495 disabledLog.__reactDisabledLog = true;
15496 var prefix, suffix, reentry = false;
15497 var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
15498 var current = null, isRendering = false, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = false, didWarnCheckedDefaultChecked = false, didWarnSelectedSetOnOption = false, didWarnInvalidChild = false, didWarnInvalidInnerHTML = false;
15499 var didWarnValueDefaultValue = false;
15500 var valuePropNames = ["value", "defaultValue"], didWarnValDefaultVal = false, needsEscaping = /["'&<>\n\t]|^\s|\s$/, specialTags = "address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(
15501 " "
15502 ), inScopeTags = "applet caption html table td th marquee object template foreignObject desc title".split(
15503 " "
15504 ), buttonScopeTags = inScopeTags.concat(["button"]), impliedEndTags = "dd dt li option optgroup p rp rt".split(" "), emptyAncestorInfoDev = {
15505 current: null,
15506 formTag: null,
15507 aTagInScope: null,
15508 buttonTagInScope: null,
15509 nobrTagInScope: null,
15510 pTagInButtonScope: null,
15511 listItemTagAutoclosing: null,
15512 dlItemTagAutoclosing: null,
15513 containerTagInScope: null,
15514 implicitRootScope: false
15515 }, didWarn = {}, shorthandToLonghand = {
15516 animation: "animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(
15517 " "
15518 ),
15519 background: "backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(
15520 " "
15521 ),
15522 backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
15523 border: "borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(
15524 " "
15525 ),
15526 borderBlockEnd: [
15527 "borderBlockEndColor",
15528 "borderBlockEndStyle",
15529 "borderBlockEndWidth"
15530 ],
15531 borderBlockStart: [
15532 "borderBlockStartColor",
15533 "borderBlockStartStyle",
15534 "borderBlockStartWidth"
15535 ],
15536 borderBottom: [
15537 "borderBottomColor",
15538 "borderBottomStyle",
15539 "borderBottomWidth"
15540 ],
15541 borderColor: [
15542 "borderBottomColor",
15543 "borderLeftColor",
15544 "borderRightColor",
15545 "borderTopColor"
15546 ],
15547 borderImage: [
15548 "borderImageOutset",
15549 "borderImageRepeat",
15550 "borderImageSlice",
15551 "borderImageSource",
15552 "borderImageWidth"
15553 ],
15554 borderInlineEnd: [
15555 "borderInlineEndColor",
15556 "borderInlineEndStyle",
15557 "borderInlineEndWidth"
15558 ],
15559 borderInlineStart: [
15560 "borderInlineStartColor",
15561 "borderInlineStartStyle",
15562 "borderInlineStartWidth"
15563 ],
15564 borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
15565 borderRadius: [
15566 "borderBottomLeftRadius",
15567 "borderBottomRightRadius",
15568 "borderTopLeftRadius",
15569 "borderTopRightRadius"
15570 ],
15571 borderRight: [
15572 "borderRightColor",
15573 "borderRightStyle",
15574 "borderRightWidth"
15575 ],
15576 borderStyle: [
15577 "borderBottomStyle",
15578 "borderLeftStyle",
15579 "borderRightStyle",
15580 "borderTopStyle"
15581 ],
15582 borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
15583 borderWidth: [
15584 "borderBottomWidth",
15585 "borderLeftWidth",
15586 "borderRightWidth",
15587 "borderTopWidth"
15588 ],
15589 columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
15590 columns: ["columnCount", "columnWidth"],
15591 flex: ["flexBasis", "flexGrow", "flexShrink"],
15592 flexFlow: ["flexDirection", "flexWrap"],
15593 font: "fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(
15594 " "
15595 ),
15596 fontVariant: "fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(
15597 " "
15598 ),
15599 gap: ["columnGap", "rowGap"],
15600 grid: "gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(
15601 " "
15602 ),
15603 gridArea: [
15604 "gridColumnEnd",
15605 "gridColumnStart",
15606 "gridRowEnd",
15607 "gridRowStart"
15608 ],
15609 gridColumn: ["gridColumnEnd", "gridColumnStart"],
15610 gridColumnGap: ["columnGap"],
15611 gridGap: ["columnGap", "rowGap"],
15612 gridRow: ["gridRowEnd", "gridRowStart"],
15613 gridRowGap: ["rowGap"],
15614 gridTemplate: [
15615 "gridTemplateAreas",
15616 "gridTemplateColumns",
15617 "gridTemplateRows"
15618 ],
15619 listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
15620 margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
15621 marker: ["markerEnd", "markerMid", "markerStart"],
15622 mask: "maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(
15623 " "
15624 ),
15625 maskPosition: ["maskPositionX", "maskPositionY"],
15626 outline: ["outlineColor", "outlineStyle", "outlineWidth"],
15627 overflow: ["overflowX", "overflowY"],
15628 padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
15629 placeContent: ["alignContent", "justifyContent"],
15630 placeItems: ["alignItems", "justifyItems"],
15631 placeSelf: ["alignSelf", "justifySelf"],
15632 textDecoration: [
15633 "textDecorationColor",
15634 "textDecorationLine",
15635 "textDecorationStyle"
15636 ],
15637 textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
15638 transition: [
15639 "transitionDelay",
15640 "transitionDuration",
15641 "transitionProperty",
15642 "transitionTimingFunction"
15643 ],
15644 wordWrap: ["overflowWrap"]
15645 }, uppercasePattern = /([A-Z])/g, msPattern$1 = /^ms-/, badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {}, warnedStyleValues = {}, warnedForNaNValue = false, warnedForInfinityValue = false, unitlessNumbers = new Set(
15646 "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
15647 " "
15648 )
15649 ), MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML", SVG_NAMESPACE = "http://www.w3.org/2000/svg", aliases = /* @__PURE__ */ new Map([
15650 ["acceptCharset", "accept-charset"],
15651 ["htmlFor", "for"],
15652 ["httpEquiv", "http-equiv"],
15653 ["crossOrigin", "crossorigin"],
15654 ["accentHeight", "accent-height"],
15655 ["alignmentBaseline", "alignment-baseline"],
15656 ["arabicForm", "arabic-form"],
15657 ["baselineShift", "baseline-shift"],
15658 ["capHeight", "cap-height"],
15659 ["clipPath", "clip-path"],
15660 ["clipRule", "clip-rule"],
15661 ["colorInterpolation", "color-interpolation"],
15662 ["colorInterpolationFilters", "color-interpolation-filters"],
15663 ["colorProfile", "color-profile"],
15664 ["colorRendering", "color-rendering"],
15665 ["dominantBaseline", "dominant-baseline"],
15666 ["enableBackground", "enable-background"],
15667 ["fillOpacity", "fill-opacity"],
15668 ["fillRule", "fill-rule"],
15669 ["floodColor", "flood-color"],
15670 ["floodOpacity", "flood-opacity"],
15671 ["fontFamily", "font-family"],
15672 ["fontSize", "font-size"],
15673 ["fontSizeAdjust", "font-size-adjust"],
15674 ["fontStretch", "font-stretch"],
15675 ["fontStyle", "font-style"],
15676 ["fontVariant", "font-variant"],
15677 ["fontWeight", "font-weight"],
15678 ["glyphName", "glyph-name"],
15679 ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
15680 ["glyphOrientationVertical", "glyph-orientation-vertical"],
15681 ["horizAdvX", "horiz-adv-x"],
15682 ["horizOriginX", "horiz-origin-x"],
15683 ["imageRendering", "image-rendering"],
15684 ["letterSpacing", "letter-spacing"],
15685 ["lightingColor", "lighting-color"],
15686 ["markerEnd", "marker-end"],
15687 ["markerMid", "marker-mid"],
15688 ["markerStart", "marker-start"],
15689 ["overlinePosition", "overline-position"],
15690 ["overlineThickness", "overline-thickness"],
15691 ["paintOrder", "paint-order"],
15692 ["panose-1", "panose-1"],
15693 ["pointerEvents", "pointer-events"],
15694 ["renderingIntent", "rendering-intent"],
15695 ["shapeRendering", "shape-rendering"],
15696 ["stopColor", "stop-color"],
15697 ["stopOpacity", "stop-opacity"],
15698 ["strikethroughPosition", "strikethrough-position"],
15699 ["strikethroughThickness", "strikethrough-thickness"],
15700 ["strokeDasharray", "stroke-dasharray"],
15701 ["strokeDashoffset", "stroke-dashoffset"],
15702 ["strokeLinecap", "stroke-linecap"],
15703 ["strokeLinejoin", "stroke-linejoin"],
15704 ["strokeMiterlimit", "stroke-miterlimit"],
15705 ["strokeOpacity", "stroke-opacity"],
15706 ["strokeWidth", "stroke-width"],
15707 ["textAnchor", "text-anchor"],
15708 ["textDecoration", "text-decoration"],
15709 ["textRendering", "text-rendering"],
15710 ["transformOrigin", "transform-origin"],
15711 ["underlinePosition", "underline-position"],
15712 ["underlineThickness", "underline-thickness"],
15713 ["unicodeBidi", "unicode-bidi"],
15714 ["unicodeRange", "unicode-range"],
15715 ["unitsPerEm", "units-per-em"],
15716 ["vAlphabetic", "v-alphabetic"],
15717 ["vHanging", "v-hanging"],
15718 ["vIdeographic", "v-ideographic"],
15719 ["vMathematical", "v-mathematical"],
15720 ["vectorEffect", "vector-effect"],
15721 ["vertAdvY", "vert-adv-y"],
15722 ["vertOriginX", "vert-origin-x"],
15723 ["vertOriginY", "vert-origin-y"],
15724 ["wordSpacing", "word-spacing"],
15725 ["writingMode", "writing-mode"],
15726 ["xmlnsXlink", "xmlns:xlink"],
15727 ["xHeight", "x-height"]
15728 ]), possibleStandardNames = {
15729 accept: "accept",
15730 acceptcharset: "acceptCharset",
15731 "accept-charset": "acceptCharset",
15732 accesskey: "accessKey",
15733 action: "action",
15734 allowfullscreen: "allowFullScreen",
15735 alt: "alt",
15736 as: "as",
15737 async: "async",
15738 autocapitalize: "autoCapitalize",
15739 autocomplete: "autoComplete",
15740 autocorrect: "autoCorrect",
15741 autofocus: "autoFocus",
15742 autoplay: "autoPlay",
15743 autosave: "autoSave",
15744 capture: "capture",
15745 cellpadding: "cellPadding",
15746 cellspacing: "cellSpacing",
15747 challenge: "challenge",
15748 charset: "charSet",
15749 checked: "checked",
15750 children: "children",
15751 cite: "cite",
15752 class: "className",
15753 classid: "classID",
15754 classname: "className",
15755 cols: "cols",
15756 colspan: "colSpan",
15757 content: "content",
15758 contenteditable: "contentEditable",
15759 contextmenu: "contextMenu",
15760 controls: "controls",
15761 controlslist: "controlsList",
15762 coords: "coords",
15763 crossorigin: "crossOrigin",
15764 dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
15765 data: "data",
15766 datetime: "dateTime",
15767 default: "default",
15768 defaultchecked: "defaultChecked",
15769 defaultvalue: "defaultValue",
15770 defer: "defer",
15771 dir: "dir",
15772 disabled: "disabled",
15773 disablepictureinpicture: "disablePictureInPicture",
15774 disableremoteplayback: "disableRemotePlayback",
15775 download: "download",
15776 draggable: "draggable",
15777 enctype: "encType",
15778 enterkeyhint: "enterKeyHint",
15779 fetchpriority: "fetchPriority",
15780 for: "htmlFor",
15781 form: "form",
15782 formmethod: "formMethod",
15783 formaction: "formAction",
15784 formenctype: "formEncType",
15785 formnovalidate: "formNoValidate",
15786 formtarget: "formTarget",
15787 frameborder: "frameBorder",
15788 headers: "headers",
15789 height: "height",
15790 hidden: "hidden",
15791 high: "high",
15792 href: "href",
15793 hreflang: "hrefLang",
15794 htmlfor: "htmlFor",
15795 httpequiv: "httpEquiv",
15796 "http-equiv": "httpEquiv",
15797 icon: "icon",
15798 id: "id",
15799 imagesizes: "imageSizes",
15800 imagesrcset: "imageSrcSet",
15801 inert: "inert",
15802 innerhtml: "innerHTML",
15803 inputmode: "inputMode",
15804 integrity: "integrity",
15805 is: "is",
15806 itemid: "itemID",
15807 itemprop: "itemProp",
15808 itemref: "itemRef",
15809 itemscope: "itemScope",
15810 itemtype: "itemType",
15811 keyparams: "keyParams",
15812 keytype: "keyType",
15813 kind: "kind",
15814 label: "label",
15815 lang: "lang",
15816 list: "list",
15817 loop: "loop",
15818 low: "low",
15819 manifest: "manifest",
15820 marginwidth: "marginWidth",
15821 marginheight: "marginHeight",
15822 max: "max",
15823 maxlength: "maxLength",
15824 media: "media",
15825 mediagroup: "mediaGroup",
15826 method: "method",
15827 min: "min",
15828 minlength: "minLength",
15829 multiple: "multiple",
15830 muted: "muted",
15831 name: "name",
15832 nomodule: "noModule",
15833 nonce: "nonce",
15834 novalidate: "noValidate",
15835 open: "open",
15836 optimum: "optimum",
15837 pattern: "pattern",
15838 placeholder: "placeholder",
15839 playsinline: "playsInline",
15840 poster: "poster",
15841 preload: "preload",
15842 profile: "profile",
15843 radiogroup: "radioGroup",
15844 readonly: "readOnly",
15845 referrerpolicy: "referrerPolicy",
15846 rel: "rel",
15847 required: "required",
15848 reversed: "reversed",
15849 role: "role",
15850 rows: "rows",
15851 rowspan: "rowSpan",
15852 sandbox: "sandbox",
15853 scope: "scope",
15854 scoped: "scoped",
15855 scrolling: "scrolling",
15856 seamless: "seamless",
15857 selected: "selected",
15858 shape: "shape",
15859 size: "size",
15860 sizes: "sizes",
15861 span: "span",
15862 spellcheck: "spellCheck",
15863 src: "src",
15864 srcdoc: "srcDoc",
15865 srclang: "srcLang",
15866 srcset: "srcSet",
15867 start: "start",
15868 step: "step",
15869 style: "style",
15870 summary: "summary",
15871 tabindex: "tabIndex",
15872 target: "target",
15873 title: "title",
15874 type: "type",
15875 usemap: "useMap",
15876 value: "value",
15877 width: "width",
15878 wmode: "wmode",
15879 wrap: "wrap",
15880 about: "about",
15881 accentheight: "accentHeight",
15882 "accent-height": "accentHeight",
15883 accumulate: "accumulate",
15884 additive: "additive",
15885 alignmentbaseline: "alignmentBaseline",
15886 "alignment-baseline": "alignmentBaseline",
15887 allowreorder: "allowReorder",
15888 alphabetic: "alphabetic",
15889 amplitude: "amplitude",
15890 arabicform: "arabicForm",
15891 "arabic-form": "arabicForm",
15892 ascent: "ascent",
15893 attributename: "attributeName",
15894 attributetype: "attributeType",
15895 autoreverse: "autoReverse",
15896 azimuth: "azimuth",
15897 basefrequency: "baseFrequency",
15898 baselineshift: "baselineShift",
15899 "baseline-shift": "baselineShift",
15900 baseprofile: "baseProfile",
15901 bbox: "bbox",
15902 begin: "begin",
15903 bias: "bias",
15904 by: "by",
15905 calcmode: "calcMode",
15906 capheight: "capHeight",
15907 "cap-height": "capHeight",
15908 clip: "clip",
15909 clippath: "clipPath",
15910 "clip-path": "clipPath",
15911 clippathunits: "clipPathUnits",
15912 cliprule: "clipRule",
15913 "clip-rule": "clipRule",
15914 color: "color",
15915 colorinterpolation: "colorInterpolation",
15916 "color-interpolation": "colorInterpolation",
15917 colorinterpolationfilters: "colorInterpolationFilters",
15918 "color-interpolation-filters": "colorInterpolationFilters",
15919 colorprofile: "colorProfile",
15920 "color-profile": "colorProfile",
15921 colorrendering: "colorRendering",
15922 "color-rendering": "colorRendering",
15923 contentscripttype: "contentScriptType",
15924 contentstyletype: "contentStyleType",
15925 cursor: "cursor",
15926 cx: "cx",
15927 cy: "cy",
15928 d: "d",
15929 datatype: "datatype",
15930 decelerate: "decelerate",
15931 descent: "descent",
15932 diffuseconstant: "diffuseConstant",
15933 direction: "direction",
15934 display: "display",
15935 divisor: "divisor",
15936 dominantbaseline: "dominantBaseline",
15937 "dominant-baseline": "dominantBaseline",
15938 dur: "dur",
15939 dx: "dx",
15940 dy: "dy",
15941 edgemode: "edgeMode",
15942 elevation: "elevation",
15943 enablebackground: "enableBackground",
15944 "enable-background": "enableBackground",
15945 end: "end",
15946 exponent: "exponent",
15947 externalresourcesrequired: "externalResourcesRequired",
15948 fill: "fill",
15949 fillopacity: "fillOpacity",
15950 "fill-opacity": "fillOpacity",
15951 fillrule: "fillRule",
15952 "fill-rule": "fillRule",
15953 filter: "filter",
15954 filterres: "filterRes",
15955 filterunits: "filterUnits",
15956 floodopacity: "floodOpacity",
15957 "flood-opacity": "floodOpacity",
15958 floodcolor: "floodColor",
15959 "flood-color": "floodColor",
15960 focusable: "focusable",
15961 fontfamily: "fontFamily",
15962 "font-family": "fontFamily",
15963 fontsize: "fontSize",
15964 "font-size": "fontSize",
15965 fontsizeadjust: "fontSizeAdjust",
15966 "font-size-adjust": "fontSizeAdjust",
15967 fontstretch: "fontStretch",
15968 "font-stretch": "fontStretch",
15969 fontstyle: "fontStyle",
15970 "font-style": "fontStyle",
15971 fontvariant: "fontVariant",
15972 "font-variant": "fontVariant",
15973 fontweight: "fontWeight",
15974 "font-weight": "fontWeight",
15975 format: "format",
15976 from: "from",
15977 fx: "fx",
15978 fy: "fy",
15979 g1: "g1",
15980 g2: "g2",
15981 glyphname: "glyphName",
15982 "glyph-name": "glyphName",
15983 glyphorientationhorizontal: "glyphOrientationHorizontal",
15984 "glyph-orientation-horizontal": "glyphOrientationHorizontal",
15985 glyphorientationvertical: "glyphOrientationVertical",
15986 "glyph-orientation-vertical": "glyphOrientationVertical",
15987 glyphref: "glyphRef",
15988 gradienttransform: "gradientTransform",
15989 gradientunits: "gradientUnits",
15990 hanging: "hanging",
15991 horizadvx: "horizAdvX",
15992 "horiz-adv-x": "horizAdvX",
15993 horizoriginx: "horizOriginX",
15994 "horiz-origin-x": "horizOriginX",
15995 ideographic: "ideographic",
15996 imagerendering: "imageRendering",
15997 "image-rendering": "imageRendering",
15998 in2: "in2",
15999 in: "in",
16000 inlist: "inlist",
16001 intercept: "intercept",
16002 k1: "k1",
16003 k2: "k2",
16004 k3: "k3",
16005 k4: "k4",
16006 k: "k",
16007 kernelmatrix: "kernelMatrix",
16008 kernelunitlength: "kernelUnitLength",
16009 kerning: "kerning",
16010 keypoints: "keyPoints",
16011 keysplines: "keySplines",
16012 keytimes: "keyTimes",
16013 lengthadjust: "lengthAdjust",
16014 letterspacing: "letterSpacing",
16015 "letter-spacing": "letterSpacing",
16016 lightingcolor: "lightingColor",
16017 "lighting-color": "lightingColor",
16018 limitingconeangle: "limitingConeAngle",
16019 local: "local",
16020 markerend: "markerEnd",
16021 "marker-end": "markerEnd",
16022 markerheight: "markerHeight",
16023 markermid: "markerMid",
16024 "marker-mid": "markerMid",
16025 markerstart: "markerStart",
16026 "marker-start": "markerStart",
16027 markerunits: "markerUnits",
16028 markerwidth: "markerWidth",
16029 mask: "mask",
16030 maskcontentunits: "maskContentUnits",
16031 maskunits: "maskUnits",
16032 mathematical: "mathematical",
16033 mode: "mode",
16034 numoctaves: "numOctaves",
16035 offset: "offset",
16036 opacity: "opacity",
16037 operator: "operator",
16038 order: "order",
16039 orient: "orient",
16040 orientation: "orientation",
16041 origin: "origin",
16042 overflow: "overflow",
16043 overlineposition: "overlinePosition",
16044 "overline-position": "overlinePosition",
16045 overlinethickness: "overlineThickness",
16046 "overline-thickness": "overlineThickness",
16047 paintorder: "paintOrder",
16048 "paint-order": "paintOrder",
16049 panose1: "panose1",
16050 "panose-1": "panose1",
16051 pathlength: "pathLength",
16052 patterncontentunits: "patternContentUnits",
16053 patterntransform: "patternTransform",
16054 patternunits: "patternUnits",
16055 pointerevents: "pointerEvents",
16056 "pointer-events": "pointerEvents",
16057 points: "points",
16058 pointsatx: "pointsAtX",
16059 pointsaty: "pointsAtY",
16060 pointsatz: "pointsAtZ",
16061 popover: "popover",
16062 popovertarget: "popoverTarget",
16063 popovertargetaction: "popoverTargetAction",
16064 prefix: "prefix",
16065 preservealpha: "preserveAlpha",
16066 preserveaspectratio: "preserveAspectRatio",
16067 primitiveunits: "primitiveUnits",
16068 property: "property",
16069 r: "r",
16070 radius: "radius",
16071 refx: "refX",
16072 refy: "refY",
16073 renderingintent: "renderingIntent",
16074 "rendering-intent": "renderingIntent",
16075 repeatcount: "repeatCount",
16076 repeatdur: "repeatDur",
16077 requiredextensions: "requiredExtensions",
16078 requiredfeatures: "requiredFeatures",
16079 resource: "resource",
16080 restart: "restart",
16081 result: "result",
16082 results: "results",
16083 rotate: "rotate",
16084 rx: "rx",
16085 ry: "ry",
16086 scale: "scale",
16087 security: "security",
16088 seed: "seed",
16089 shaperendering: "shapeRendering",
16090 "shape-rendering": "shapeRendering",
16091 slope: "slope",
16092 spacing: "spacing",
16093 specularconstant: "specularConstant",
16094 specularexponent: "specularExponent",
16095 speed: "speed",
16096 spreadmethod: "spreadMethod",
16097 startoffset: "startOffset",
16098 stddeviation: "stdDeviation",
16099 stemh: "stemh",
16100 stemv: "stemv",
16101 stitchtiles: "stitchTiles",
16102 stopcolor: "stopColor",
16103 "stop-color": "stopColor",
16104 stopopacity: "stopOpacity",
16105 "stop-opacity": "stopOpacity",
16106 strikethroughposition: "strikethroughPosition",
16107 "strikethrough-position": "strikethroughPosition",
16108 strikethroughthickness: "strikethroughThickness",
16109 "strikethrough-thickness": "strikethroughThickness",
16110 string: "string",
16111 stroke: "stroke",
16112 strokedasharray: "strokeDasharray",
16113 "stroke-dasharray": "strokeDasharray",
16114 strokedashoffset: "strokeDashoffset",
16115 "stroke-dashoffset": "strokeDashoffset",
16116 strokelinecap: "strokeLinecap",
16117 "stroke-linecap": "strokeLinecap",
16118 strokelinejoin: "strokeLinejoin",
16119 "stroke-linejoin": "strokeLinejoin",
16120 strokemiterlimit: "strokeMiterlimit",
16121 "stroke-miterlimit": "strokeMiterlimit",
16122 strokewidth: "strokeWidth",
16123 "stroke-width": "strokeWidth",
16124 strokeopacity: "strokeOpacity",
16125 "stroke-opacity": "strokeOpacity",
16126 suppresscontenteditablewarning: "suppressContentEditableWarning",
16127 suppresshydrationwarning: "suppressHydrationWarning",
16128 surfacescale: "surfaceScale",
16129 systemlanguage: "systemLanguage",
16130 tablevalues: "tableValues",
16131 targetx: "targetX",
16132 targety: "targetY",
16133 textanchor: "textAnchor",
16134 "text-anchor": "textAnchor",
16135 textdecoration: "textDecoration",
16136 "text-decoration": "textDecoration",
16137 textlength: "textLength",
16138 textrendering: "textRendering",
16139 "text-rendering": "textRendering",
16140 to: "to",
16141 transform: "transform",
16142 transformorigin: "transformOrigin",
16143 "transform-origin": "transformOrigin",
16144 typeof: "typeof",
16145 u1: "u1",
16146 u2: "u2",
16147 underlineposition: "underlinePosition",
16148 "underline-position": "underlinePosition",
16149 underlinethickness: "underlineThickness",
16150 "underline-thickness": "underlineThickness",
16151 unicode: "unicode",
16152 unicodebidi: "unicodeBidi",
16153 "unicode-bidi": "unicodeBidi",
16154 unicoderange: "unicodeRange",
16155 "unicode-range": "unicodeRange",
16156 unitsperem: "unitsPerEm",
16157 "units-per-em": "unitsPerEm",
16158 unselectable: "unselectable",
16159 valphabetic: "vAlphabetic",
16160 "v-alphabetic": "vAlphabetic",
16161 values: "values",
16162 vectoreffect: "vectorEffect",
16163 "vector-effect": "vectorEffect",
16164 version: "version",
16165 vertadvy: "vertAdvY",
16166 "vert-adv-y": "vertAdvY",
16167 vertoriginx: "vertOriginX",
16168 "vert-origin-x": "vertOriginX",
16169 vertoriginy: "vertOriginY",
16170 "vert-origin-y": "vertOriginY",
16171 vhanging: "vHanging",
16172 "v-hanging": "vHanging",
16173 videographic: "vIdeographic",
16174 "v-ideographic": "vIdeographic",
16175 viewbox: "viewBox",
16176 viewtarget: "viewTarget",
16177 visibility: "visibility",
16178 vmathematical: "vMathematical",
16179 "v-mathematical": "vMathematical",
16180 vocab: "vocab",
16181 widths: "widths",
16182 wordspacing: "wordSpacing",
16183 "word-spacing": "wordSpacing",
16184 writingmode: "writingMode",
16185 "writing-mode": "writingMode",
16186 x1: "x1",
16187 x2: "x2",
16188 x: "x",
16189 xchannelselector: "xChannelSelector",
16190 xheight: "xHeight",
16191 "x-height": "xHeight",
16192 xlinkactuate: "xlinkActuate",
16193 "xlink:actuate": "xlinkActuate",
16194 xlinkarcrole: "xlinkArcrole",
16195 "xlink:arcrole": "xlinkArcrole",
16196 xlinkhref: "xlinkHref",
16197 "xlink:href": "xlinkHref",
16198 xlinkrole: "xlinkRole",
16199 "xlink:role": "xlinkRole",
16200 xlinkshow: "xlinkShow",
16201 "xlink:show": "xlinkShow",
16202 xlinktitle: "xlinkTitle",
16203 "xlink:title": "xlinkTitle",
16204 xlinktype: "xlinkType",
16205 "xlink:type": "xlinkType",
16206 xmlbase: "xmlBase",
16207 "xml:base": "xmlBase",
16208 xmllang: "xmlLang",
16209 "xml:lang": "xmlLang",
16210 xmlns: "xmlns",
16211 "xml:space": "xmlSpace",
16212 xmlnsxlink: "xmlnsXlink",
16213 "xmlns:xlink": "xmlnsXlink",
16214 xmlspace: "xmlSpace",
16215 y1: "y1",
16216 y2: "y2",
16217 y: "y",
16218 ychannelselector: "yChannelSelector",
16219 z: "z",
16220 zoomandpan: "zoomAndPan"
16221 }, ariaProperties = {
16222 "aria-current": 0,
16223 "aria-description": 0,
16224 "aria-details": 0,
16225 "aria-disabled": 0,
16226 "aria-hidden": 0,
16227 "aria-invalid": 0,
16228 "aria-keyshortcuts": 0,
16229 "aria-label": 0,
16230 "aria-roledescription": 0,
16231 "aria-autocomplete": 0,
16232 "aria-checked": 0,
16233 "aria-expanded": 0,
16234 "aria-haspopup": 0,
16235 "aria-level": 0,
16236 "aria-modal": 0,
16237 "aria-multiline": 0,
16238 "aria-multiselectable": 0,
16239 "aria-orientation": 0,
16240 "aria-placeholder": 0,
16241 "aria-pressed": 0,
16242 "aria-readonly": 0,
16243 "aria-required": 0,
16244 "aria-selected": 0,
16245 "aria-sort": 0,
16246 "aria-valuemax": 0,
16247 "aria-valuemin": 0,
16248 "aria-valuenow": 0,
16249 "aria-valuetext": 0,
16250 "aria-atomic": 0,
16251 "aria-busy": 0,
16252 "aria-live": 0,
16253 "aria-relevant": 0,
16254 "aria-dropeffect": 0,
16255 "aria-grabbed": 0,
16256 "aria-activedescendant": 0,
16257 "aria-colcount": 0,
16258 "aria-colindex": 0,
16259 "aria-colspan": 0,
16260 "aria-controls": 0,
16261 "aria-describedby": 0,
16262 "aria-errormessage": 0,
16263 "aria-flowto": 0,
16264 "aria-labelledby": 0,
16265 "aria-owns": 0,
16266 "aria-posinset": 0,
16267 "aria-rowcount": 0,
16268 "aria-rowindex": 0,
16269 "aria-rowspan": 0,
16270 "aria-setsize": 0
16271 }, warnedProperties$1 = {}, rARIA$1 = RegExp(
16272 "^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
16273 ), rARIACamel$1 = RegExp(
16274 "^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
16275 ), didWarnValueNull = false, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp(
16276 "^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
16277 ), rARIACamel = RegExp(
16278 "^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
16279 ), isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i, currentReplayingEvent = null, restoreTarget = null, restoreQueue = null, isInsideEventHandler = false, canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), passiveBrowserEventsSupported = false;
16280 if (canUseDOM)
16281 try {
16282 var options$jscomp$0 = {};
16283 Object.defineProperty(options$jscomp$0, "passive", {
16284 get: function() {
16285 passiveBrowserEventsSupported = true;
16286 }
16287 });
16288 window.addEventListener("test", options$jscomp$0, options$jscomp$0);
16289 window.removeEventListener("test", options$jscomp$0, options$jscomp$0);
16290 } catch (e) {
16291 passiveBrowserEventsSupported = false;
16292 }
16293 var root = null, startText = null, fallbackText = null, EventInterface = {
16294 eventPhase: 0,
16295 bubbles: 0,
16296 cancelable: 0,
16297 timeStamp: function(event) {
16298 return event.timeStamp || Date.now();
16299 },
16300 defaultPrevented: 0,
16301 isTrusted: 0
16302 }, SyntheticEvent = createSyntheticEvent(EventInterface), UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }), SyntheticUIEvent = createSyntheticEvent(UIEventInterface), lastMovementX, lastMovementY, lastMouseEvent, MouseEventInterface = assign({}, UIEventInterface, {
16303 screenX: 0,
16304 screenY: 0,
16305 clientX: 0,
16306 clientY: 0,
16307 pageX: 0,
16308 pageY: 0,
16309 ctrlKey: 0,
16310 shiftKey: 0,
16311 altKey: 0,
16312 metaKey: 0,
16313 getModifierState: getEventModifierState,
16314 button: 0,
16315 buttons: 0,
16316 relatedTarget: function(event) {
16317 return void 0 === event.relatedTarget ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget;
16318 },
16319 movementX: function(event) {
16320 if ("movementX" in event) return event.movementX;
16321 event !== lastMouseEvent && (lastMouseEvent && "mousemove" === event.type ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event);
16322 return lastMovementX;
16323 },
16324 movementY: function(event) {
16325 return "movementY" in event ? event.movementY : lastMovementY;
16326 }
16327 }), SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface), DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }), SyntheticDragEvent = createSyntheticEvent(DragEventInterface), FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }), SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface), AnimationEventInterface = assign({}, EventInterface, {
16328 animationName: 0,
16329 elapsedTime: 0,
16330 pseudoElement: 0
16331 }), SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface), ClipboardEventInterface = assign({}, EventInterface, {
16332 clipboardData: function(event) {
16333 return "clipboardData" in event ? event.clipboardData : window.clipboardData;
16334 }
16335 }), SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface), CompositionEventInterface = assign({}, EventInterface, { data: 0 }), SyntheticCompositionEvent = createSyntheticEvent(
16336 CompositionEventInterface
16337 ), SyntheticInputEvent = SyntheticCompositionEvent, normalizeKey = {
16338 Esc: "Escape",
16339 Spacebar: " ",
16340 Left: "ArrowLeft",
16341 Up: "ArrowUp",
16342 Right: "ArrowRight",
16343 Down: "ArrowDown",
16344 Del: "Delete",
16345 Win: "OS",
16346 Menu: "ContextMenu",
16347 Apps: "ContextMenu",
16348 Scroll: "ScrollLock",
16349 MozPrintableKey: "Unidentified"
16350 }, translateToKey = {
16351 8: "Backspace",
16352 9: "Tab",
16353 12: "Clear",
16354 13: "Enter",
16355 16: "Shift",
16356 17: "Control",
16357 18: "Alt",
16358 19: "Pause",
16359 20: "CapsLock",
16360 27: "Escape",
16361 32: " ",
16362 33: "PageUp",
16363 34: "PageDown",
16364 35: "End",
16365 36: "Home",
16366 37: "ArrowLeft",
16367 38: "ArrowUp",
16368 39: "ArrowRight",
16369 40: "ArrowDown",
16370 45: "Insert",
16371 46: "Delete",
16372 112: "F1",
16373 113: "F2",
16374 114: "F3",
16375 115: "F4",
16376 116: "F5",
16377 117: "F6",
16378 118: "F7",
16379 119: "F8",
16380 120: "F9",
16381 121: "F10",
16382 122: "F11",
16383 123: "F12",
16384 144: "NumLock",
16385 145: "ScrollLock",
16386 224: "Meta"
16387 }, modifierKeyToProp = {
16388 Alt: "altKey",
16389 Control: "ctrlKey",
16390 Meta: "metaKey",
16391 Shift: "shiftKey"
16392 }, KeyboardEventInterface = assign({}, UIEventInterface, {
16393 key: function(nativeEvent) {
16394 if (nativeEvent.key) {
16395 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
16396 if ("Unidentified" !== key) return key;
16397 }
16398 return "keypress" === nativeEvent.type ? (nativeEvent = getEventCharCode(nativeEvent), 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent)) : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
16399 },
16400 code: 0,
16401 location: 0,
16402 ctrlKey: 0,
16403 shiftKey: 0,
16404 altKey: 0,
16405 metaKey: 0,
16406 repeat: 0,
16407 locale: 0,
16408 getModifierState: getEventModifierState,
16409 charCode: function(event) {
16410 return "keypress" === event.type ? getEventCharCode(event) : 0;
16411 },
16412 keyCode: function(event) {
16413 return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
16414 },
16415 which: function(event) {
16416 return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
16417 }
16418 }), SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface), PointerEventInterface = assign({}, MouseEventInterface, {
16419 pointerId: 0,
16420 width: 0,
16421 height: 0,
16422 pressure: 0,
16423 tangentialPressure: 0,
16424 tiltX: 0,
16425 tiltY: 0,
16426 twist: 0,
16427 pointerType: 0,
16428 isPrimary: 0
16429 }), SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface), TouchEventInterface = assign({}, UIEventInterface, {
16430 touches: 0,
16431 targetTouches: 0,
16432 changedTouches: 0,
16433 altKey: 0,
16434 metaKey: 0,
16435 ctrlKey: 0,
16436 shiftKey: 0,
16437 getModifierState: getEventModifierState
16438 }), SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface), TransitionEventInterface = assign({}, EventInterface, {
16439 propertyName: 0,
16440 elapsedTime: 0,
16441 pseudoElement: 0
16442 }), SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface), WheelEventInterface = assign({}, MouseEventInterface, {
16443 deltaX: function(event) {
16444 return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
16445 },
16446 deltaY: function(event) {
16447 return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
16448 },
16449 deltaZ: 0,
16450 deltaMode: 0
16451 }), SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface), ToggleEventInterface = assign({}, EventInterface, {
16452 newState: 0,
16453 oldState: 0
16454 }), SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface), END_KEYCODES = [9, 13, 27, 32], START_KEYCODE = 229, canUseCompositionEvent = canUseDOM && "CompositionEvent" in window, documentMode = null;
16455 canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
16456 var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode, useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && 8 < documentMode && 11 >= documentMode), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), hasSpaceKeypress = false, isComposing = false, supportedInputTypes = {
16457 color: true,
16458 date: true,
16459 datetime: true,
16460 "datetime-local": true,
16461 email: true,
16462 month: true,
16463 number: true,
16464 password: true,
16465 range: true,
16466 search: true,
16467 tel: true,
16468 text: true,
16469 time: true,
16470 url: true,
16471 week: true
16472 }, activeElement$1 = null, activeElementInst$1 = null, isInputEventSupported = false;
16473 canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || 9 < document.documentMode));
16474 var objectIs = "function" === typeof Object.is ? Object.is : is, skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = false, vendorPrefixes = {
16475 animationend: makePrefixMap("Animation", "AnimationEnd"),
16476 animationiteration: makePrefixMap("Animation", "AnimationIteration"),
16477 animationstart: makePrefixMap("Animation", "AnimationStart"),
16478 transitionrun: makePrefixMap("Transition", "TransitionRun"),
16479 transitionstart: makePrefixMap("Transition", "TransitionStart"),
16480 transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
16481 transitionend: makePrefixMap("Transition", "TransitionEnd")
16482 }, prefixedEventNames = {}, style = {};
16483 canUseDOM && (style = document.createElement("div").style, "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition);
16484 var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
16485 " "
16486 );
16487 simpleEventPluginEvents.push("scrollEnd");
16488 var CapturedStacks = /* @__PURE__ */ new WeakMap(), OffscreenVisible = 1, OffscreenPassiveEffectsConnected = 2, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0, emptyContextObject = {};
16489 Object.freeze(emptyContextObject);
16490 var resolveFamily = null, failedBoundaries = null, NoMode = 0, ConcurrentMode = 1, ProfileMode = 2, StrictLegacyMode = 8, StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64;
16491 var hasBadMapPolyfill = false;
16492 try {
16493 var nonExtensibleObject = Object.preventExtensions({});
16494 /* @__PURE__ */ new Map([[nonExtensibleObject, null]]);
16495 /* @__PURE__ */ new Set([nonExtensibleObject]);
16496 } catch (e$3) {
16497 hasBadMapPolyfill = true;
16498 }
16499 var forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "", hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = false, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, hydrationErrors = null, rootOrSingletonContext = false, HydrationMismatchException = Error(
16500 "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
16501 ), lastResetTime = 0;
16502 if ("object" === typeof performance && "function" === typeof performance.now) {
16503 var localPerformance = performance;
16504 var getCurrentTime = function() {
16505 return localPerformance.now();
16506 };
16507 } else {
16508 var localDate = Date;
16509 getCurrentTime = function() {
16510 return localDate.now();
16511 };
16512 }
16513 var valueCursor = createCursor(null);
16514 var rendererCursorDEV = createCursor(null);
16515 var rendererSigil = {};
16516 var currentlyRenderingFiber$1 = null, lastContextDependency = null, isDisallowedContextReadInDEV = false, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
16517 var listeners = [], signal = this.signal = {
16518 aborted: false,
16519 addEventListener: function(type, listener) {
16520 listeners.push(listener);
16521 }
16522 };
16523 this.abort = function() {
16524 signal.aborted = true;
16525 listeners.forEach(function(listener) {
16526 return listener();
16527 });
16528 };
16529 }, scheduleCallback$2 = Scheduler.unstable_scheduleCallback, NormalPriority = Scheduler.unstable_NormalPriority, CacheContext = {
16530 $$typeof: REACT_CONTEXT_TYPE,
16531 Consumer: null,
16532 Provider: null,
16533 _currentValue: null,
16534 _currentValue2: null,
16535 _threadCount: 0,
16536 _currentRenderer: null,
16537 _currentRenderer2: null
16538 }, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, profilerStartTime = -1.1, profilerEffectDuration = -0, currentUpdateIsNested = false, nestedUpdateScheduled = false, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
16539 ReactSharedInternals.S = function(transition, returnValue) {
16540 "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && entangleAsyncAction(transition, returnValue);
16541 null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue);
16542 };
16543 var resumedCache = createCursor(null), ReactStrictModeWarnings = {
16544 recordUnsafeLifecycleWarnings: function() {
16545 },
16546 flushPendingUnsafeLifecycleWarnings: function() {
16547 },
16548 recordLegacyContextWarning: function() {
16549 },
16550 flushLegacyContextWarning: function() {
16551 },
16552 discardPendingWarnings: function() {
16553 }
16554 }, pendingComponentWillMountWarnings = [], pendingUNSAFE_ComponentWillMountWarnings = [], pendingComponentWillReceivePropsWarnings = [], pendingUNSAFE_ComponentWillReceivePropsWarnings = [], pendingComponentWillUpdateWarnings = [], pendingUNSAFE_ComponentWillUpdateWarnings = [], didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
16555 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
16556 didWarnAboutUnsafeLifecycles.has(fiber.type) || ("function" === typeof instance.componentWillMount && true !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" === typeof instance.componentWillReceiveProps && true !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" === typeof instance.componentWillUpdate && true !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
16557 };
16558 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
16559 var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
16560 0 < pendingComponentWillMountWarnings.length && (pendingComponentWillMountWarnings.forEach(function(fiber) {
16561 componentWillMountUniqueNames.add(
16562 getComponentNameFromFiber(fiber) || "Component"
16563 );
16564 didWarnAboutUnsafeLifecycles.add(fiber.type);
16565 }), pendingComponentWillMountWarnings = []);
16566 var UNSAFE_componentWillMountUniqueNames = /* @__PURE__ */ new Set();
16567 0 < pendingUNSAFE_ComponentWillMountWarnings.length && (pendingUNSAFE_ComponentWillMountWarnings.forEach(function(fiber) {
16568 UNSAFE_componentWillMountUniqueNames.add(
16569 getComponentNameFromFiber(fiber) || "Component"
16570 );
16571 didWarnAboutUnsafeLifecycles.add(fiber.type);
16572 }), pendingUNSAFE_ComponentWillMountWarnings = []);
16573 var componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
16574 0 < pendingComponentWillReceivePropsWarnings.length && (pendingComponentWillReceivePropsWarnings.forEach(function(fiber) {
16575 componentWillReceivePropsUniqueNames.add(
16576 getComponentNameFromFiber(fiber) || "Component"
16577 );
16578 didWarnAboutUnsafeLifecycles.add(fiber.type);
16579 }), pendingComponentWillReceivePropsWarnings = []);
16580 var UNSAFE_componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
16581 0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length && (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(
16582 function(fiber) {
16583 UNSAFE_componentWillReceivePropsUniqueNames.add(
16584 getComponentNameFromFiber(fiber) || "Component"
16585 );
16586 didWarnAboutUnsafeLifecycles.add(fiber.type);
16587 }
16588 ), pendingUNSAFE_ComponentWillReceivePropsWarnings = []);
16589 var componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
16590 0 < pendingComponentWillUpdateWarnings.length && (pendingComponentWillUpdateWarnings.forEach(function(fiber) {
16591 componentWillUpdateUniqueNames.add(
16592 getComponentNameFromFiber(fiber) || "Component"
16593 );
16594 didWarnAboutUnsafeLifecycles.add(fiber.type);
16595 }), pendingComponentWillUpdateWarnings = []);
16596 var UNSAFE_componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
16597 0 < pendingUNSAFE_ComponentWillUpdateWarnings.length && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
16598 UNSAFE_componentWillUpdateUniqueNames.add(
16599 getComponentNameFromFiber(fiber) || "Component"
16600 );
16601 didWarnAboutUnsafeLifecycles.add(fiber.type);
16602 }), pendingUNSAFE_ComponentWillUpdateWarnings = []);
16603 if (0 < UNSAFE_componentWillMountUniqueNames.size) {
16604 var sortedNames = setToSortedString(
16605 UNSAFE_componentWillMountUniqueNames
16606 );
16607 console.error(
16608 "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",
16609 sortedNames
16610 );
16611 }
16612 0 < UNSAFE_componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
16613 UNSAFE_componentWillReceivePropsUniqueNames
16614 ), console.error(
16615 "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s",
16616 sortedNames
16617 ));
16618 0 < UNSAFE_componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(
16619 UNSAFE_componentWillUpdateUniqueNames
16620 ), console.error(
16621 "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",
16622 sortedNames
16623 ));
16624 0 < componentWillMountUniqueNames.size && (sortedNames = setToSortedString(componentWillMountUniqueNames), console.warn(
16625 "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
16626 sortedNames
16627 ));
16628 0 < componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
16629 componentWillReceivePropsUniqueNames
16630 ), console.warn(
16631 "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
16632 sortedNames
16633 ));
16634 0 < componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(componentWillUpdateUniqueNames), console.warn(
16635 "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
16636 sortedNames
16637 ));
16638 };
16639 var pendingLegacyContextWarning = /* @__PURE__ */ new Map(), didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
16640 ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
16641 var strictRoot = null;
16642 for (var node = fiber; null !== node; )
16643 node.mode & StrictLegacyMode && (strictRoot = node), node = node.return;
16644 null === strictRoot ? console.error(
16645 "Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."
16646 ) : !didWarnAboutLegacyContext.has(fiber.type) && (node = pendingLegacyContextWarning.get(strictRoot), null != fiber.type.contextTypes || null != fiber.type.childContextTypes || null !== instance && "function" === typeof instance.getChildContext) && (void 0 === node && (node = [], pendingLegacyContextWarning.set(strictRoot, node)), node.push(fiber));
16647 };
16648 ReactStrictModeWarnings.flushLegacyContextWarning = function() {
16649 pendingLegacyContextWarning.forEach(function(fiberArray) {
16650 if (0 !== fiberArray.length) {
16651 var firstFiber = fiberArray[0], uniqueNames = /* @__PURE__ */ new Set();
16652 fiberArray.forEach(function(fiber) {
16653 uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
16654 didWarnAboutLegacyContext.add(fiber.type);
16655 });
16656 var sortedNames = setToSortedString(uniqueNames);
16657 runWithFiberInDEV(firstFiber, function() {
16658 console.error(
16659 "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
16660 sortedNames
16661 );
16662 });
16663 }
16664 });
16665 };
16666 ReactStrictModeWarnings.discardPendingWarnings = function() {
16667 pendingComponentWillMountWarnings = [];
16668 pendingUNSAFE_ComponentWillMountWarnings = [];
16669 pendingComponentWillReceivePropsWarnings = [];
16670 pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
16671 pendingComponentWillUpdateWarnings = [];
16672 pendingUNSAFE_ComponentWillUpdateWarnings = [];
16673 pendingLegacyContextWarning = /* @__PURE__ */ new Map();
16674 };
16675 var SuspenseException = Error(
16676 "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
16677 ), SuspenseyCommitException = Error(
16678 "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
16679 ), SuspenseActionException = Error(
16680 "Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."
16681 ), noopSuspenseyCommitThenable = {
16682 then: function() {
16683 console.error(
16684 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.'
16685 );
16686 }
16687 }, suspendedThenable = null, needsToResetSuspendedThenableDEV = false, NoFlags = 0, HasEffect = 1, Insertion = 2, Layout = 4, Passive = 8, UpdateState = 0, ReplaceState = 1, ForceUpdate = 2, CaptureUpdate = 3, hasForceUpdate = false;
16688 var didWarnUpdateInsideUpdate = false;
16689 var currentlyProcessingQueue = null;
16690 var didReadFromEntangledAsyncAction = false, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot;
16691 var didWarnAboutMismatchedHooksForComponent = /* @__PURE__ */ new Set();
16692 var didWarnAboutUseWrappedInTryCatch = /* @__PURE__ */ new Set();
16693 var didWarnAboutAsyncClientComponent = /* @__PURE__ */ new Set();
16694 var didWarnAboutUseFormState = /* @__PURE__ */ new Set();
16695 var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter$1 = 0, thenableState$1 = null, globalClientIdCounter = 0, RE_RENDER_LIMIT = 25, currentHookNameInDev = null, hookTypesDev = null, hookTypesUpdateIndexDev = -1, ignorePreviousDependencies = false, ContextOnlyDispatcher = {
16696 readContext,
16697 use,
16698 useCallback: throwInvalidHookError,
16699 useContext: throwInvalidHookError,
16700 useEffect: throwInvalidHookError,
16701 useImperativeHandle: throwInvalidHookError,
16702 useLayoutEffect: throwInvalidHookError,
16703 useInsertionEffect: throwInvalidHookError,
16704 useMemo: throwInvalidHookError,
16705 useReducer: throwInvalidHookError,
16706 useRef: throwInvalidHookError,
16707 useState: throwInvalidHookError,
16708 useDebugValue: throwInvalidHookError,
16709 useDeferredValue: throwInvalidHookError,
16710 useTransition: throwInvalidHookError,
16711 useSyncExternalStore: throwInvalidHookError,
16712 useId: throwInvalidHookError,
16713 useHostTransitionStatus: throwInvalidHookError,
16714 useFormState: throwInvalidHookError,
16715 useActionState: throwInvalidHookError,
16716 useOptimistic: throwInvalidHookError,
16717 useMemoCache: throwInvalidHookError,
16718 useCacheRefresh: throwInvalidHookError
16719 }, HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, HooksDispatcherOnRerenderInDEV = null, InvalidNestedHooksDispatcherOnMountInDEV = null, InvalidNestedHooksDispatcherOnUpdateInDEV = null, InvalidNestedHooksDispatcherOnRerenderInDEV = null;
16720 HooksDispatcherOnMountInDEV = {
16721 readContext: function(context) {
16722 return readContext(context);
16723 },
16724 use,
16725 useCallback: function(callback, deps) {
16726 currentHookNameInDev = "useCallback";
16727 mountHookTypesDev();
16728 checkDepsAreArrayDev(deps);
16729 return mountCallback(callback, deps);
16730 },
16731 useContext: function(context) {
16732 currentHookNameInDev = "useContext";
16733 mountHookTypesDev();
16734 return readContext(context);
16735 },
16736 useEffect: function(create, createDeps) {
16737 currentHookNameInDev = "useEffect";
16738 mountHookTypesDev();
16739 checkDepsAreArrayDev(createDeps);
16740 return mountEffect(create, createDeps);
16741 },
16742 useImperativeHandle: function(ref, create, deps) {
16743 currentHookNameInDev = "useImperativeHandle";
16744 mountHookTypesDev();
16745 checkDepsAreArrayDev(deps);
16746 return mountImperativeHandle(ref, create, deps);
16747 },
16748 useInsertionEffect: function(create, deps) {
16749 currentHookNameInDev = "useInsertionEffect";
16750 mountHookTypesDev();
16751 checkDepsAreArrayDev(deps);
16752 mountEffectImpl(4, Insertion, create, deps);
16753 },
16754 useLayoutEffect: function(create, deps) {
16755 currentHookNameInDev = "useLayoutEffect";
16756 mountHookTypesDev();
16757 checkDepsAreArrayDev(deps);
16758 return mountLayoutEffect(create, deps);
16759 },
16760 useMemo: function(create, deps) {
16761 currentHookNameInDev = "useMemo";
16762 mountHookTypesDev();
16763 checkDepsAreArrayDev(deps);
16764 var prevDispatcher = ReactSharedInternals.H;
16765 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
16766 try {
16767 return mountMemo(create, deps);
16768 } finally {
16769 ReactSharedInternals.H = prevDispatcher;
16770 }
16771 },
16772 useReducer: function(reducer, initialArg, init) {
16773 currentHookNameInDev = "useReducer";
16774 mountHookTypesDev();
16775 var prevDispatcher = ReactSharedInternals.H;
16776 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
16777 try {
16778 return mountReducer(reducer, initialArg, init);
16779 } finally {
16780 ReactSharedInternals.H = prevDispatcher;
16781 }
16782 },
16783 useRef: function(initialValue) {
16784 currentHookNameInDev = "useRef";
16785 mountHookTypesDev();
16786 return mountRef(initialValue);
16787 },
16788 useState: function(initialState) {
16789 currentHookNameInDev = "useState";
16790 mountHookTypesDev();
16791 var prevDispatcher = ReactSharedInternals.H;
16792 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
16793 try {
16794 return mountState(initialState);
16795 } finally {
16796 ReactSharedInternals.H = prevDispatcher;
16797 }
16798 },
16799 useDebugValue: function() {
16800 currentHookNameInDev = "useDebugValue";
16801 mountHookTypesDev();
16802 },
16803 useDeferredValue: function(value, initialValue) {
16804 currentHookNameInDev = "useDeferredValue";
16805 mountHookTypesDev();
16806 return mountDeferredValue(value, initialValue);
16807 },
16808 useTransition: function() {
16809 currentHookNameInDev = "useTransition";
16810 mountHookTypesDev();
16811 return mountTransition();
16812 },
16813 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
16814 currentHookNameInDev = "useSyncExternalStore";
16815 mountHookTypesDev();
16816 return mountSyncExternalStore(
16817 subscribe,
16818 getSnapshot,
16819 getServerSnapshot
16820 );
16821 },
16822 useId: function() {
16823 currentHookNameInDev = "useId";
16824 mountHookTypesDev();
16825 return mountId();
16826 },
16827 useFormState: function(action, initialState) {
16828 currentHookNameInDev = "useFormState";
16829 mountHookTypesDev();
16830 warnOnUseFormStateInDev();
16831 return mountActionState(action, initialState);
16832 },
16833 useActionState: function(action, initialState) {
16834 currentHookNameInDev = "useActionState";
16835 mountHookTypesDev();
16836 return mountActionState(action, initialState);
16837 },
16838 useOptimistic: function(passthrough) {
16839 currentHookNameInDev = "useOptimistic";
16840 mountHookTypesDev();
16841 return mountOptimistic(passthrough);
16842 },
16843 useHostTransitionStatus,
16844 useMemoCache,
16845 useCacheRefresh: function() {
16846 currentHookNameInDev = "useCacheRefresh";
16847 mountHookTypesDev();
16848 return mountRefresh();
16849 }
16850 };
16851 HooksDispatcherOnMountWithHookTypesInDEV = {
16852 readContext: function(context) {
16853 return readContext(context);
16854 },
16855 use,
16856 useCallback: function(callback, deps) {
16857 currentHookNameInDev = "useCallback";
16858 updateHookTypesDev();
16859 return mountCallback(callback, deps);
16860 },
16861 useContext: function(context) {
16862 currentHookNameInDev = "useContext";
16863 updateHookTypesDev();
16864 return readContext(context);
16865 },
16866 useEffect: function(create, createDeps) {
16867 currentHookNameInDev = "useEffect";
16868 updateHookTypesDev();
16869 return mountEffect(create, createDeps);
16870 },
16871 useImperativeHandle: function(ref, create, deps) {
16872 currentHookNameInDev = "useImperativeHandle";
16873 updateHookTypesDev();
16874 return mountImperativeHandle(ref, create, deps);
16875 },
16876 useInsertionEffect: function(create, deps) {
16877 currentHookNameInDev = "useInsertionEffect";
16878 updateHookTypesDev();
16879 mountEffectImpl(4, Insertion, create, deps);
16880 },
16881 useLayoutEffect: function(create, deps) {
16882 currentHookNameInDev = "useLayoutEffect";
16883 updateHookTypesDev();
16884 return mountLayoutEffect(create, deps);
16885 },
16886 useMemo: function(create, deps) {
16887 currentHookNameInDev = "useMemo";
16888 updateHookTypesDev();
16889 var prevDispatcher = ReactSharedInternals.H;
16890 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
16891 try {
16892 return mountMemo(create, deps);
16893 } finally {
16894 ReactSharedInternals.H = prevDispatcher;
16895 }
16896 },
16897 useReducer: function(reducer, initialArg, init) {
16898 currentHookNameInDev = "useReducer";
16899 updateHookTypesDev();
16900 var prevDispatcher = ReactSharedInternals.H;
16901 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
16902 try {
16903 return mountReducer(reducer, initialArg, init);
16904 } finally {
16905 ReactSharedInternals.H = prevDispatcher;
16906 }
16907 },
16908 useRef: function(initialValue) {
16909 currentHookNameInDev = "useRef";
16910 updateHookTypesDev();
16911 return mountRef(initialValue);
16912 },
16913 useState: function(initialState) {
16914 currentHookNameInDev = "useState";
16915 updateHookTypesDev();
16916 var prevDispatcher = ReactSharedInternals.H;
16917 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
16918 try {
16919 return mountState(initialState);
16920 } finally {
16921 ReactSharedInternals.H = prevDispatcher;
16922 }
16923 },
16924 useDebugValue: function() {
16925 currentHookNameInDev = "useDebugValue";
16926 updateHookTypesDev();
16927 },
16928 useDeferredValue: function(value, initialValue) {
16929 currentHookNameInDev = "useDeferredValue";
16930 updateHookTypesDev();
16931 return mountDeferredValue(value, initialValue);
16932 },
16933 useTransition: function() {
16934 currentHookNameInDev = "useTransition";
16935 updateHookTypesDev();
16936 return mountTransition();
16937 },
16938 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
16939 currentHookNameInDev = "useSyncExternalStore";
16940 updateHookTypesDev();
16941 return mountSyncExternalStore(
16942 subscribe,
16943 getSnapshot,
16944 getServerSnapshot
16945 );
16946 },
16947 useId: function() {
16948 currentHookNameInDev = "useId";
16949 updateHookTypesDev();
16950 return mountId();
16951 },
16952 useActionState: function(action, initialState) {
16953 currentHookNameInDev = "useActionState";
16954 updateHookTypesDev();
16955 return mountActionState(action, initialState);
16956 },
16957 useFormState: function(action, initialState) {
16958 currentHookNameInDev = "useFormState";
16959 updateHookTypesDev();
16960 warnOnUseFormStateInDev();
16961 return mountActionState(action, initialState);
16962 },
16963 useOptimistic: function(passthrough) {
16964 currentHookNameInDev = "useOptimistic";
16965 updateHookTypesDev();
16966 return mountOptimistic(passthrough);
16967 },
16968 useHostTransitionStatus,
16969 useMemoCache,
16970 useCacheRefresh: function() {
16971 currentHookNameInDev = "useCacheRefresh";
16972 updateHookTypesDev();
16973 return mountRefresh();
16974 }
16975 };
16976 HooksDispatcherOnUpdateInDEV = {
16977 readContext: function(context) {
16978 return readContext(context);
16979 },
16980 use,
16981 useCallback: function(callback, deps) {
16982 currentHookNameInDev = "useCallback";
16983 updateHookTypesDev();
16984 return updateCallback(callback, deps);
16985 },
16986 useContext: function(context) {
16987 currentHookNameInDev = "useContext";
16988 updateHookTypesDev();
16989 return readContext(context);
16990 },
16991 useEffect: function(create, createDeps) {
16992 currentHookNameInDev = "useEffect";
16993 updateHookTypesDev();
16994 updateEffectImpl(2048, Passive, create, createDeps);
16995 },
16996 useImperativeHandle: function(ref, create, deps) {
16997 currentHookNameInDev = "useImperativeHandle";
16998 updateHookTypesDev();
16999 return updateImperativeHandle(ref, create, deps);
17000 },
17001 useInsertionEffect: function(create, deps) {
17002 currentHookNameInDev = "useInsertionEffect";
17003 updateHookTypesDev();
17004 return updateEffectImpl(4, Insertion, create, deps);
17005 },
17006 useLayoutEffect: function(create, deps) {
17007 currentHookNameInDev = "useLayoutEffect";
17008 updateHookTypesDev();
17009 return updateEffectImpl(4, Layout, create, deps);
17010 },
17011 useMemo: function(create, deps) {
17012 currentHookNameInDev = "useMemo";
17013 updateHookTypesDev();
17014 var prevDispatcher = ReactSharedInternals.H;
17015 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17016 try {
17017 return updateMemo(create, deps);
17018 } finally {
17019 ReactSharedInternals.H = prevDispatcher;
17020 }
17021 },
17022 useReducer: function(reducer, initialArg, init) {
17023 currentHookNameInDev = "useReducer";
17024 updateHookTypesDev();
17025 var prevDispatcher = ReactSharedInternals.H;
17026 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17027 try {
17028 return updateReducer(reducer, initialArg, init);
17029 } finally {
17030 ReactSharedInternals.H = prevDispatcher;
17031 }
17032 },
17033 useRef: function() {
17034 currentHookNameInDev = "useRef";
17035 updateHookTypesDev();
17036 return updateWorkInProgressHook().memoizedState;
17037 },
17038 useState: function() {
17039 currentHookNameInDev = "useState";
17040 updateHookTypesDev();
17041 var prevDispatcher = ReactSharedInternals.H;
17042 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17043 try {
17044 return updateReducer(basicStateReducer);
17045 } finally {
17046 ReactSharedInternals.H = prevDispatcher;
17047 }
17048 },
17049 useDebugValue: function() {
17050 currentHookNameInDev = "useDebugValue";
17051 updateHookTypesDev();
17052 },
17053 useDeferredValue: function(value, initialValue) {
17054 currentHookNameInDev = "useDeferredValue";
17055 updateHookTypesDev();
17056 return updateDeferredValue(value, initialValue);
17057 },
17058 useTransition: function() {
17059 currentHookNameInDev = "useTransition";
17060 updateHookTypesDev();
17061 return updateTransition();
17062 },
17063 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
17064 currentHookNameInDev = "useSyncExternalStore";
17065 updateHookTypesDev();
17066 return updateSyncExternalStore(
17067 subscribe,
17068 getSnapshot,
17069 getServerSnapshot
17070 );
17071 },
17072 useId: function() {
17073 currentHookNameInDev = "useId";
17074 updateHookTypesDev();
17075 return updateWorkInProgressHook().memoizedState;
17076 },
17077 useFormState: function(action) {
17078 currentHookNameInDev = "useFormState";
17079 updateHookTypesDev();
17080 warnOnUseFormStateInDev();
17081 return updateActionState(action);
17082 },
17083 useActionState: function(action) {
17084 currentHookNameInDev = "useActionState";
17085 updateHookTypesDev();
17086 return updateActionState(action);
17087 },
17088 useOptimistic: function(passthrough, reducer) {
17089 currentHookNameInDev = "useOptimistic";
17090 updateHookTypesDev();
17091 return updateOptimistic(passthrough, reducer);
17092 },
17093 useHostTransitionStatus,
17094 useMemoCache,
17095 useCacheRefresh: function() {
17096 currentHookNameInDev = "useCacheRefresh";
17097 updateHookTypesDev();
17098 return updateWorkInProgressHook().memoizedState;
17099 }
17100 };
17101 HooksDispatcherOnRerenderInDEV = {
17102 readContext: function(context) {
17103 return readContext(context);
17104 },
17105 use,
17106 useCallback: function(callback, deps) {
17107 currentHookNameInDev = "useCallback";
17108 updateHookTypesDev();
17109 return updateCallback(callback, deps);
17110 },
17111 useContext: function(context) {
17112 currentHookNameInDev = "useContext";
17113 updateHookTypesDev();
17114 return readContext(context);
17115 },
17116 useEffect: function(create, createDeps) {
17117 currentHookNameInDev = "useEffect";
17118 updateHookTypesDev();
17119 updateEffectImpl(2048, Passive, create, createDeps);
17120 },
17121 useImperativeHandle: function(ref, create, deps) {
17122 currentHookNameInDev = "useImperativeHandle";
17123 updateHookTypesDev();
17124 return updateImperativeHandle(ref, create, deps);
17125 },
17126 useInsertionEffect: function(create, deps) {
17127 currentHookNameInDev = "useInsertionEffect";
17128 updateHookTypesDev();
17129 return updateEffectImpl(4, Insertion, create, deps);
17130 },
17131 useLayoutEffect: function(create, deps) {
17132 currentHookNameInDev = "useLayoutEffect";
17133 updateHookTypesDev();
17134 return updateEffectImpl(4, Layout, create, deps);
17135 },
17136 useMemo: function(create, deps) {
17137 currentHookNameInDev = "useMemo";
17138 updateHookTypesDev();
17139 var prevDispatcher = ReactSharedInternals.H;
17140 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
17141 try {
17142 return updateMemo(create, deps);
17143 } finally {
17144 ReactSharedInternals.H = prevDispatcher;
17145 }
17146 },
17147 useReducer: function(reducer, initialArg, init) {
17148 currentHookNameInDev = "useReducer";
17149 updateHookTypesDev();
17150 var prevDispatcher = ReactSharedInternals.H;
17151 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
17152 try {
17153 return rerenderReducer(reducer, initialArg, init);
17154 } finally {
17155 ReactSharedInternals.H = prevDispatcher;
17156 }
17157 },
17158 useRef: function() {
17159 currentHookNameInDev = "useRef";
17160 updateHookTypesDev();
17161 return updateWorkInProgressHook().memoizedState;
17162 },
17163 useState: function() {
17164 currentHookNameInDev = "useState";
17165 updateHookTypesDev();
17166 var prevDispatcher = ReactSharedInternals.H;
17167 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
17168 try {
17169 return rerenderReducer(basicStateReducer);
17170 } finally {
17171 ReactSharedInternals.H = prevDispatcher;
17172 }
17173 },
17174 useDebugValue: function() {
17175 currentHookNameInDev = "useDebugValue";
17176 updateHookTypesDev();
17177 },
17178 useDeferredValue: function(value, initialValue) {
17179 currentHookNameInDev = "useDeferredValue";
17180 updateHookTypesDev();
17181 return rerenderDeferredValue(value, initialValue);
17182 },
17183 useTransition: function() {
17184 currentHookNameInDev = "useTransition";
17185 updateHookTypesDev();
17186 return rerenderTransition();
17187 },
17188 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
17189 currentHookNameInDev = "useSyncExternalStore";
17190 updateHookTypesDev();
17191 return updateSyncExternalStore(
17192 subscribe,
17193 getSnapshot,
17194 getServerSnapshot
17195 );
17196 },
17197 useId: function() {
17198 currentHookNameInDev = "useId";
17199 updateHookTypesDev();
17200 return updateWorkInProgressHook().memoizedState;
17201 },
17202 useFormState: function(action) {
17203 currentHookNameInDev = "useFormState";
17204 updateHookTypesDev();
17205 warnOnUseFormStateInDev();
17206 return rerenderActionState(action);
17207 },
17208 useActionState: function(action) {
17209 currentHookNameInDev = "useActionState";
17210 updateHookTypesDev();
17211 return rerenderActionState(action);
17212 },
17213 useOptimistic: function(passthrough, reducer) {
17214 currentHookNameInDev = "useOptimistic";
17215 updateHookTypesDev();
17216 return rerenderOptimistic(passthrough, reducer);
17217 },
17218 useHostTransitionStatus,
17219 useMemoCache,
17220 useCacheRefresh: function() {
17221 currentHookNameInDev = "useCacheRefresh";
17222 updateHookTypesDev();
17223 return updateWorkInProgressHook().memoizedState;
17224 }
17225 };
17226 InvalidNestedHooksDispatcherOnMountInDEV = {
17227 readContext: function(context) {
17228 warnInvalidContextAccess();
17229 return readContext(context);
17230 },
17231 use: function(usable) {
17232 warnInvalidHookAccess();
17233 return use(usable);
17234 },
17235 useCallback: function(callback, deps) {
17236 currentHookNameInDev = "useCallback";
17237 warnInvalidHookAccess();
17238 mountHookTypesDev();
17239 return mountCallback(callback, deps);
17240 },
17241 useContext: function(context) {
17242 currentHookNameInDev = "useContext";
17243 warnInvalidHookAccess();
17244 mountHookTypesDev();
17245 return readContext(context);
17246 },
17247 useEffect: function(create, createDeps) {
17248 currentHookNameInDev = "useEffect";
17249 warnInvalidHookAccess();
17250 mountHookTypesDev();
17251 return mountEffect(create, createDeps);
17252 },
17253 useImperativeHandle: function(ref, create, deps) {
17254 currentHookNameInDev = "useImperativeHandle";
17255 warnInvalidHookAccess();
17256 mountHookTypesDev();
17257 return mountImperativeHandle(ref, create, deps);
17258 },
17259 useInsertionEffect: function(create, deps) {
17260 currentHookNameInDev = "useInsertionEffect";
17261 warnInvalidHookAccess();
17262 mountHookTypesDev();
17263 mountEffectImpl(4, Insertion, create, deps);
17264 },
17265 useLayoutEffect: function(create, deps) {
17266 currentHookNameInDev = "useLayoutEffect";
17267 warnInvalidHookAccess();
17268 mountHookTypesDev();
17269 return mountLayoutEffect(create, deps);
17270 },
17271 useMemo: function(create, deps) {
17272 currentHookNameInDev = "useMemo";
17273 warnInvalidHookAccess();
17274 mountHookTypesDev();
17275 var prevDispatcher = ReactSharedInternals.H;
17276 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
17277 try {
17278 return mountMemo(create, deps);
17279 } finally {
17280 ReactSharedInternals.H = prevDispatcher;
17281 }
17282 },
17283 useReducer: function(reducer, initialArg, init) {
17284 currentHookNameInDev = "useReducer";
17285 warnInvalidHookAccess();
17286 mountHookTypesDev();
17287 var prevDispatcher = ReactSharedInternals.H;
17288 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
17289 try {
17290 return mountReducer(reducer, initialArg, init);
17291 } finally {
17292 ReactSharedInternals.H = prevDispatcher;
17293 }
17294 },
17295 useRef: function(initialValue) {
17296 currentHookNameInDev = "useRef";
17297 warnInvalidHookAccess();
17298 mountHookTypesDev();
17299 return mountRef(initialValue);
17300 },
17301 useState: function(initialState) {
17302 currentHookNameInDev = "useState";
17303 warnInvalidHookAccess();
17304 mountHookTypesDev();
17305 var prevDispatcher = ReactSharedInternals.H;
17306 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
17307 try {
17308 return mountState(initialState);
17309 } finally {
17310 ReactSharedInternals.H = prevDispatcher;
17311 }
17312 },
17313 useDebugValue: function() {
17314 currentHookNameInDev = "useDebugValue";
17315 warnInvalidHookAccess();
17316 mountHookTypesDev();
17317 },
17318 useDeferredValue: function(value, initialValue) {
17319 currentHookNameInDev = "useDeferredValue";
17320 warnInvalidHookAccess();
17321 mountHookTypesDev();
17322 return mountDeferredValue(value, initialValue);
17323 },
17324 useTransition: function() {
17325 currentHookNameInDev = "useTransition";
17326 warnInvalidHookAccess();
17327 mountHookTypesDev();
17328 return mountTransition();
17329 },
17330 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
17331 currentHookNameInDev = "useSyncExternalStore";
17332 warnInvalidHookAccess();
17333 mountHookTypesDev();
17334 return mountSyncExternalStore(
17335 subscribe,
17336 getSnapshot,
17337 getServerSnapshot
17338 );
17339 },
17340 useId: function() {
17341 currentHookNameInDev = "useId";
17342 warnInvalidHookAccess();
17343 mountHookTypesDev();
17344 return mountId();
17345 },
17346 useFormState: function(action, initialState) {
17347 currentHookNameInDev = "useFormState";
17348 warnInvalidHookAccess();
17349 mountHookTypesDev();
17350 return mountActionState(action, initialState);
17351 },
17352 useActionState: function(action, initialState) {
17353 currentHookNameInDev = "useActionState";
17354 warnInvalidHookAccess();
17355 mountHookTypesDev();
17356 return mountActionState(action, initialState);
17357 },
17358 useOptimistic: function(passthrough) {
17359 currentHookNameInDev = "useOptimistic";
17360 warnInvalidHookAccess();
17361 mountHookTypesDev();
17362 return mountOptimistic(passthrough);
17363 },
17364 useMemoCache: function(size) {
17365 warnInvalidHookAccess();
17366 return useMemoCache(size);
17367 },
17368 useHostTransitionStatus,
17369 useCacheRefresh: function() {
17370 currentHookNameInDev = "useCacheRefresh";
17371 mountHookTypesDev();
17372 return mountRefresh();
17373 }
17374 };
17375 InvalidNestedHooksDispatcherOnUpdateInDEV = {
17376 readContext: function(context) {
17377 warnInvalidContextAccess();
17378 return readContext(context);
17379 },
17380 use: function(usable) {
17381 warnInvalidHookAccess();
17382 return use(usable);
17383 },
17384 useCallback: function(callback, deps) {
17385 currentHookNameInDev = "useCallback";
17386 warnInvalidHookAccess();
17387 updateHookTypesDev();
17388 return updateCallback(callback, deps);
17389 },
17390 useContext: function(context) {
17391 currentHookNameInDev = "useContext";
17392 warnInvalidHookAccess();
17393 updateHookTypesDev();
17394 return readContext(context);
17395 },
17396 useEffect: function(create, createDeps) {
17397 currentHookNameInDev = "useEffect";
17398 warnInvalidHookAccess();
17399 updateHookTypesDev();
17400 updateEffectImpl(2048, Passive, create, createDeps);
17401 },
17402 useImperativeHandle: function(ref, create, deps) {
17403 currentHookNameInDev = "useImperativeHandle";
17404 warnInvalidHookAccess();
17405 updateHookTypesDev();
17406 return updateImperativeHandle(ref, create, deps);
17407 },
17408 useInsertionEffect: function(create, deps) {
17409 currentHookNameInDev = "useInsertionEffect";
17410 warnInvalidHookAccess();
17411 updateHookTypesDev();
17412 return updateEffectImpl(4, Insertion, create, deps);
17413 },
17414 useLayoutEffect: function(create, deps) {
17415 currentHookNameInDev = "useLayoutEffect";
17416 warnInvalidHookAccess();
17417 updateHookTypesDev();
17418 return updateEffectImpl(4, Layout, create, deps);
17419 },
17420 useMemo: function(create, deps) {
17421 currentHookNameInDev = "useMemo";
17422 warnInvalidHookAccess();
17423 updateHookTypesDev();
17424 var prevDispatcher = ReactSharedInternals.H;
17425 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17426 try {
17427 return updateMemo(create, deps);
17428 } finally {
17429 ReactSharedInternals.H = prevDispatcher;
17430 }
17431 },
17432 useReducer: function(reducer, initialArg, init) {
17433 currentHookNameInDev = "useReducer";
17434 warnInvalidHookAccess();
17435 updateHookTypesDev();
17436 var prevDispatcher = ReactSharedInternals.H;
17437 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17438 try {
17439 return updateReducer(reducer, initialArg, init);
17440 } finally {
17441 ReactSharedInternals.H = prevDispatcher;
17442 }
17443 },
17444 useRef: function() {
17445 currentHookNameInDev = "useRef";
17446 warnInvalidHookAccess();
17447 updateHookTypesDev();
17448 return updateWorkInProgressHook().memoizedState;
17449 },
17450 useState: function() {
17451 currentHookNameInDev = "useState";
17452 warnInvalidHookAccess();
17453 updateHookTypesDev();
17454 var prevDispatcher = ReactSharedInternals.H;
17455 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17456 try {
17457 return updateReducer(basicStateReducer);
17458 } finally {
17459 ReactSharedInternals.H = prevDispatcher;
17460 }
17461 },
17462 useDebugValue: function() {
17463 currentHookNameInDev = "useDebugValue";
17464 warnInvalidHookAccess();
17465 updateHookTypesDev();
17466 },
17467 useDeferredValue: function(value, initialValue) {
17468 currentHookNameInDev = "useDeferredValue";
17469 warnInvalidHookAccess();
17470 updateHookTypesDev();
17471 return updateDeferredValue(value, initialValue);
17472 },
17473 useTransition: function() {
17474 currentHookNameInDev = "useTransition";
17475 warnInvalidHookAccess();
17476 updateHookTypesDev();
17477 return updateTransition();
17478 },
17479 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
17480 currentHookNameInDev = "useSyncExternalStore";
17481 warnInvalidHookAccess();
17482 updateHookTypesDev();
17483 return updateSyncExternalStore(
17484 subscribe,
17485 getSnapshot,
17486 getServerSnapshot
17487 );
17488 },
17489 useId: function() {
17490 currentHookNameInDev = "useId";
17491 warnInvalidHookAccess();
17492 updateHookTypesDev();
17493 return updateWorkInProgressHook().memoizedState;
17494 },
17495 useFormState: function(action) {
17496 currentHookNameInDev = "useFormState";
17497 warnInvalidHookAccess();
17498 updateHookTypesDev();
17499 return updateActionState(action);
17500 },
17501 useActionState: function(action) {
17502 currentHookNameInDev = "useActionState";
17503 warnInvalidHookAccess();
17504 updateHookTypesDev();
17505 return updateActionState(action);
17506 },
17507 useOptimistic: function(passthrough, reducer) {
17508 currentHookNameInDev = "useOptimistic";
17509 warnInvalidHookAccess();
17510 updateHookTypesDev();
17511 return updateOptimistic(passthrough, reducer);
17512 },
17513 useMemoCache: function(size) {
17514 warnInvalidHookAccess();
17515 return useMemoCache(size);
17516 },
17517 useHostTransitionStatus,
17518 useCacheRefresh: function() {
17519 currentHookNameInDev = "useCacheRefresh";
17520 updateHookTypesDev();
17521 return updateWorkInProgressHook().memoizedState;
17522 }
17523 };
17524 InvalidNestedHooksDispatcherOnRerenderInDEV = {
17525 readContext: function(context) {
17526 warnInvalidContextAccess();
17527 return readContext(context);
17528 },
17529 use: function(usable) {
17530 warnInvalidHookAccess();
17531 return use(usable);
17532 },
17533 useCallback: function(callback, deps) {
17534 currentHookNameInDev = "useCallback";
17535 warnInvalidHookAccess();
17536 updateHookTypesDev();
17537 return updateCallback(callback, deps);
17538 },
17539 useContext: function(context) {
17540 currentHookNameInDev = "useContext";
17541 warnInvalidHookAccess();
17542 updateHookTypesDev();
17543 return readContext(context);
17544 },
17545 useEffect: function(create, createDeps) {
17546 currentHookNameInDev = "useEffect";
17547 warnInvalidHookAccess();
17548 updateHookTypesDev();
17549 updateEffectImpl(2048, Passive, create, createDeps);
17550 },
17551 useImperativeHandle: function(ref, create, deps) {
17552 currentHookNameInDev = "useImperativeHandle";
17553 warnInvalidHookAccess();
17554 updateHookTypesDev();
17555 return updateImperativeHandle(ref, create, deps);
17556 },
17557 useInsertionEffect: function(create, deps) {
17558 currentHookNameInDev = "useInsertionEffect";
17559 warnInvalidHookAccess();
17560 updateHookTypesDev();
17561 return updateEffectImpl(4, Insertion, create, deps);
17562 },
17563 useLayoutEffect: function(create, deps) {
17564 currentHookNameInDev = "useLayoutEffect";
17565 warnInvalidHookAccess();
17566 updateHookTypesDev();
17567 return updateEffectImpl(4, Layout, create, deps);
17568 },
17569 useMemo: function(create, deps) {
17570 currentHookNameInDev = "useMemo";
17571 warnInvalidHookAccess();
17572 updateHookTypesDev();
17573 var prevDispatcher = ReactSharedInternals.H;
17574 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17575 try {
17576 return updateMemo(create, deps);
17577 } finally {
17578 ReactSharedInternals.H = prevDispatcher;
17579 }
17580 },
17581 useReducer: function(reducer, initialArg, init) {
17582 currentHookNameInDev = "useReducer";
17583 warnInvalidHookAccess();
17584 updateHookTypesDev();
17585 var prevDispatcher = ReactSharedInternals.H;
17586 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17587 try {
17588 return rerenderReducer(reducer, initialArg, init);
17589 } finally {
17590 ReactSharedInternals.H = prevDispatcher;
17591 }
17592 },
17593 useRef: function() {
17594 currentHookNameInDev = "useRef";
17595 warnInvalidHookAccess();
17596 updateHookTypesDev();
17597 return updateWorkInProgressHook().memoizedState;
17598 },
17599 useState: function() {
17600 currentHookNameInDev = "useState";
17601 warnInvalidHookAccess();
17602 updateHookTypesDev();
17603 var prevDispatcher = ReactSharedInternals.H;
17604 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
17605 try {
17606 return rerenderReducer(basicStateReducer);
17607 } finally {
17608 ReactSharedInternals.H = prevDispatcher;
17609 }
17610 },
17611 useDebugValue: function() {
17612 currentHookNameInDev = "useDebugValue";
17613 warnInvalidHookAccess();
17614 updateHookTypesDev();
17615 },
17616 useDeferredValue: function(value, initialValue) {
17617 currentHookNameInDev = "useDeferredValue";
17618 warnInvalidHookAccess();
17619 updateHookTypesDev();
17620 return rerenderDeferredValue(value, initialValue);
17621 },
17622 useTransition: function() {
17623 currentHookNameInDev = "useTransition";
17624 warnInvalidHookAccess();
17625 updateHookTypesDev();
17626 return rerenderTransition();
17627 },
17628 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
17629 currentHookNameInDev = "useSyncExternalStore";
17630 warnInvalidHookAccess();
17631 updateHookTypesDev();
17632 return updateSyncExternalStore(
17633 subscribe,
17634 getSnapshot,
17635 getServerSnapshot
17636 );
17637 },
17638 useId: function() {
17639 currentHookNameInDev = "useId";
17640 warnInvalidHookAccess();
17641 updateHookTypesDev();
17642 return updateWorkInProgressHook().memoizedState;
17643 },
17644 useFormState: function(action) {
17645 currentHookNameInDev = "useFormState";
17646 warnInvalidHookAccess();
17647 updateHookTypesDev();
17648 return rerenderActionState(action);
17649 },
17650 useActionState: function(action) {
17651 currentHookNameInDev = "useActionState";
17652 warnInvalidHookAccess();
17653 updateHookTypesDev();
17654 return rerenderActionState(action);
17655 },
17656 useOptimistic: function(passthrough, reducer) {
17657 currentHookNameInDev = "useOptimistic";
17658 warnInvalidHookAccess();
17659 updateHookTypesDev();
17660 return rerenderOptimistic(passthrough, reducer);
17661 },
17662 useMemoCache: function(size) {
17663 warnInvalidHookAccess();
17664 return useMemoCache(size);
17665 },
17666 useHostTransitionStatus,
17667 useCacheRefresh: function() {
17668 currentHookNameInDev = "useCacheRefresh";
17669 updateHookTypesDev();
17670 return updateWorkInProgressHook().memoizedState;
17671 }
17672 };
17673 var callComponent = {
17674 react_stack_bottom_frame: function(Component, props, secondArg) {
17675 var wasRendering = isRendering;
17676 isRendering = true;
17677 try {
17678 return Component(props, secondArg);
17679 } finally {
17680 isRendering = wasRendering;
17681 }
17682 }
17683 }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
17684 react_stack_bottom_frame: function(instance) {
17685 var wasRendering = isRendering;
17686 isRendering = true;
17687 try {
17688 return instance.render();
17689 } finally {
17690 isRendering = wasRendering;
17691 }
17692 }
17693 }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callComponentDidMount = {
17694 react_stack_bottom_frame: function(finishedWork, instance) {
17695 try {
17696 instance.componentDidMount();
17697 } catch (error) {
17698 captureCommitPhaseError(finishedWork, finishedWork.return, error);
17699 }
17700 }
17701 }, callComponentDidMountInDEV = callComponentDidMount.react_stack_bottom_frame.bind(
17702 callComponentDidMount
17703 ), callComponentDidUpdate = {
17704 react_stack_bottom_frame: function(finishedWork, instance, prevProps, prevState, snapshot) {
17705 try {
17706 instance.componentDidUpdate(prevProps, prevState, snapshot);
17707 } catch (error) {
17708 captureCommitPhaseError(finishedWork, finishedWork.return, error);
17709 }
17710 }
17711 }, callComponentDidUpdateInDEV = callComponentDidUpdate.react_stack_bottom_frame.bind(
17712 callComponentDidUpdate
17713 ), callComponentDidCatch = {
17714 react_stack_bottom_frame: function(instance, errorInfo) {
17715 var stack = errorInfo.stack;
17716 instance.componentDidCatch(errorInfo.value, {
17717 componentStack: null !== stack ? stack : ""
17718 });
17719 }
17720 }, callComponentDidCatchInDEV = callComponentDidCatch.react_stack_bottom_frame.bind(
17721 callComponentDidCatch
17722 ), callComponentWillUnmount = {
17723 react_stack_bottom_frame: function(current2, nearestMountedAncestor, instance) {
17724 try {
17725 instance.componentWillUnmount();
17726 } catch (error) {
17727 captureCommitPhaseError(current2, nearestMountedAncestor, error);
17728 }
17729 }
17730 }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(
17731 callComponentWillUnmount
17732 ), callCreate = {
17733 react_stack_bottom_frame: function(effect) {
17734 null != effect.resourceKind && console.error(
17735 "Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",
17736 effect.resourceKind
17737 );
17738 var create = effect.create;
17739 effect = effect.inst;
17740 create = create();
17741 return effect.destroy = create;
17742 }
17743 }, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
17744 react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
17745 try {
17746 destroy();
17747 } catch (error) {
17748 captureCommitPhaseError(current2, nearestMountedAncestor, error);
17749 }
17750 }
17751 }, callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy), callLazyInit = {
17752 react_stack_bottom_frame: function(lazy2) {
17753 var init = lazy2._init;
17754 return init(lazy2._payload);
17755 }
17756 }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), thenableState = null, thenableIndexCounter = 0, currentDebugInfo = null, didWarnAboutMaps;
17757 var didWarnAboutGenerators = didWarnAboutMaps = false;
17758 var ownerHasKeyUseWarning = {};
17759 var ownerHasFunctionTypeWarning = {};
17760 var ownerHasSymbolTypeWarning = {};
17761 warnForMissingKey = function(returnFiber, workInProgress2, child) {
17762 if (null !== child && "object" === typeof child && child._store && (!child._store.validated && null == child.key || 2 === child._store.validated)) {
17763 if ("object" !== typeof child._store)
17764 throw Error(
17765 "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
17766 );
17767 child._store.validated = 1;
17768 var componentName2 = getComponentNameFromFiber(returnFiber), componentKey = componentName2 || "null";
17769 if (!ownerHasKeyUseWarning[componentKey]) {
17770 ownerHasKeyUseWarning[componentKey] = true;
17771 child = child._owner;
17772 returnFiber = returnFiber._debugOwner;
17773 var currentComponentErrorInfo = "";
17774 returnFiber && "number" === typeof returnFiber.tag && (componentKey = getComponentNameFromFiber(returnFiber)) && (currentComponentErrorInfo = "\n\nCheck the render method of `" + componentKey + "`.");
17775 currentComponentErrorInfo || componentName2 && (currentComponentErrorInfo = "\n\nCheck the top-level render call using <" + componentName2 + ">.");
17776 var childOwnerAppendix = "";
17777 null != child && returnFiber !== child && (componentName2 = null, "number" === typeof child.tag ? componentName2 = getComponentNameFromFiber(child) : "string" === typeof child.name && (componentName2 = child.name), componentName2 && (childOwnerAppendix = " It was passed a child from " + componentName2 + "."));
17778 runWithFiberInDEV(workInProgress2, function() {
17779 console.error(
17780 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
17781 currentComponentErrorInfo,
17782 childOwnerAppendix
17783 );
17784 });
17785 }
17786 }
17787 };
17788 var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null, SubtreeSuspenseContextMask = 1, ForceSuspenseFallback = 2, suspenseStackCursor = createCursor(0), fakeInternalInstance = {};
17789 var didWarnAboutStateAssignmentForComponent = /* @__PURE__ */ new Set();
17790 var didWarnAboutUninitializedState = /* @__PURE__ */ new Set();
17791 var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = /* @__PURE__ */ new Set();
17792 var didWarnAboutLegacyLifecyclesAndDerivedState = /* @__PURE__ */ new Set();
17793 var didWarnAboutDirectlyAssigningPropsToState = /* @__PURE__ */ new Set();
17794 var didWarnAboutUndefinedDerivedState = /* @__PURE__ */ new Set();
17795 var didWarnAboutContextTypes$1 = /* @__PURE__ */ new Set();
17796 var didWarnAboutChildContextTypes = /* @__PURE__ */ new Set();
17797 var didWarnAboutInvalidateContextType = /* @__PURE__ */ new Set();
17798 var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
17799 Object.freeze(fakeInternalInstance);
17800 var classComponentUpdater = {
17801 enqueueSetState: function(inst, payload, callback) {
17802 inst = inst._reactInternals;
17803 var lane = requestUpdateLane(inst), update = createUpdate(lane);
17804 update.payload = payload;
17805 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
17806 payload = enqueueUpdate(inst, update, lane);
17807 null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
17808 markStateUpdateScheduled(inst, lane);
17809 },
17810 enqueueReplaceState: function(inst, payload, callback) {
17811 inst = inst._reactInternals;
17812 var lane = requestUpdateLane(inst), update = createUpdate(lane);
17813 update.tag = ReplaceState;
17814 update.payload = payload;
17815 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
17816 payload = enqueueUpdate(inst, update, lane);
17817 null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
17818 markStateUpdateScheduled(inst, lane);
17819 },
17820 enqueueForceUpdate: function(inst, callback) {
17821 inst = inst._reactInternals;
17822 var lane = requestUpdateLane(inst), update = createUpdate(lane);
17823 update.tag = ForceUpdate;
17824 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
17825 callback = enqueueUpdate(inst, update, lane);
17826 null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
17827 null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markForceUpdateScheduled && injectedProfilingHooks.markForceUpdateScheduled(inst, lane);
17828 }
17829 }, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
17830 if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
17831 var event = new window.ErrorEvent("error", {
17832 bubbles: true,
17833 cancelable: true,
17834 message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
17835 error
17836 });
17837 if (!window.dispatchEvent(event)) return;
17838 } else if ("object" === typeof process && "function" === typeof process.emit) {
17839 process.emit("uncaughtException", error);
17840 return;
17841 }
17842 console.error(error);
17843 }, componentName = null, errorBoundaryName = null, SelectiveHydrationException = Error(
17844 "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
17845 ), didReceiveUpdate = false;
17846 var didWarnAboutBadClass = {};
17847 var didWarnAboutContextTypeOnFunctionComponent = {};
17848 var didWarnAboutContextTypes = {};
17849 var didWarnAboutGetDerivedStateOnFunctionComponent = {};
17850 var didWarnAboutReassigningProps = false;
17851 var didWarnAboutRevealOrder = {};
17852 var didWarnAboutTailOptions = {};
17853 var SUSPENDED_MARKER = {
17854 dehydrated: null,
17855 treeContext: null,
17856 retryLane: 0,
17857 hydrationErrors: null
17858 }, hasWarnedAboutUsingNoValuePropOnContextProvider = false, didWarnAboutUndefinedSnapshotBeforeUpdate = null;
17859 didWarnAboutUndefinedSnapshotBeforeUpdate = /* @__PURE__ */ new Set();
17860 var offscreenSubtreeIsHidden = false, offscreenSubtreeWasHidden = false, needsFormReset = false, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, inProgressLanes = null, inProgressRoot = null, hostParent = null, hostParentIsContainer = false, currentHoistableRoot = null, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
17861 getCacheForType: function(resourceType) {
17862 var cache = readContext(CacheContext), cacheForType = cache.data.get(resourceType);
17863 void 0 === cacheForType && (cacheForType = resourceType(), cache.data.set(resourceType, cacheForType));
17864 return cacheForType;
17865 },
17866 getOwner: function() {
17867 return current;
17868 }
17869 };
17870 if ("function" === typeof Symbol && Symbol.for) {
17871 var symbolFor = Symbol.for;
17872 symbolFor("selector.component");
17873 symbolFor("selector.has_pseudo_class");
17874 symbolFor("selector.role");
17875 symbolFor("selector.test_id");
17876 symbolFor("selector.text");
17877 }
17878 var commitHooks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, RenderContext = 2, CommitContext = 4, RootInProgress = 0, RootFatalErrored = 1, RootErrored = 2, RootSuspended = 3, RootSuspendedWithDelay = 4, RootSuspendedAtTheShell = 6, RootCompleted = 5, executionContext = NoContext, workInProgressRoot = null, workInProgress = null, workInProgressRootRenderLanes = 0, NotSuspended = 0, SuspendedOnError = 1, SuspendedOnData = 2, SuspendedOnImmediate = 3, SuspendedOnInstance = 4, SuspendedOnInstanceAndReadyToContinue = 5, SuspendedOnDeprecatedThrowPromise = 6, SuspendedAndReadyToContinue = 7, SuspendedOnHydration = 8, SuspendedOnAction = 9, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = false, workInProgressRootIsPrerendering = false, workInProgressRootDidAttachPingListener = false, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = false, globalMostRecentFallbackTime = 0, FALLBACK_THROTTLE_MS = 300, workInProgressRootRenderTargetTime = Infinity, RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, legacyErrorBoundariesThatAlreadyFailed = null, IMMEDIATE_COMMIT = 0, SUSPENDED_COMMIT = 1, THROTTLED_COMMIT = 2, NO_PENDING_EFFECTS = 0, PENDING_MUTATION_PHASE = 1, PENDING_LAYOUT_PHASE = 2, PENDING_AFTER_MUTATION_PHASE = 3, PENDING_SPAWNED_WORK = 4, PENDING_PASSIVE_PHASE = 5, pendingEffectsStatus = 0, pendingEffectsRoot = null, pendingFinishedWork = null, pendingEffectsLanes = 0, pendingEffectsRemainingLanes = 0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, NESTED_UPDATE_LIMIT = 50, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = false, didScheduleUpdateDuringPassiveEffects = false, NESTED_PASSIVE_UPDATE_LIMIT = 50, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = false, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = false;
17879 var didWarnAboutUpdateInRenderForAnotherComponent = /* @__PURE__ */ new Set();
17880 var fakeActCallbackNode$1 = {}, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, didScheduleMicrotask_act = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, fakeActCallbackNode = {};
17881 (function() {
17882 for (var i = 0; i < simpleEventPluginEvents.length; i++) {
17883 var eventName = simpleEventPluginEvents[i], domEventName = eventName.toLowerCase();
17884 eventName = eventName[0].toUpperCase() + eventName.slice(1);
17885 registerSimpleEvent(domEventName, "on" + eventName);
17886 }
17887 registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
17888 registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
17889 registerSimpleEvent(ANIMATION_START, "onAnimationStart");
17890 registerSimpleEvent("dblclick", "onDoubleClick");
17891 registerSimpleEvent("focusin", "onFocus");
17892 registerSimpleEvent("focusout", "onBlur");
17893 registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
17894 registerSimpleEvent(TRANSITION_START, "onTransitionStart");
17895 registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
17896 registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
17897 })();
17898 registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
17899 registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
17900 registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
17901 registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
17902 registerTwoPhaseEvent(
17903 "onChange",
17904 "change click focusin focusout input keydown keyup selectionchange".split(
17905 " "
17906 )
17907 );
17908 registerTwoPhaseEvent(
17909 "onSelect",
17910 "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
17911 " "
17912 )
17913 );
17914 registerTwoPhaseEvent("onBeforeInput", [
17915 "compositionend",
17916 "keypress",
17917 "textInput",
17918 "paste"
17919 ]);
17920 registerTwoPhaseEvent(
17921 "onCompositionEnd",
17922 "compositionend focusout keydown keypress keyup mousedown".split(" ")
17923 );
17924 registerTwoPhaseEvent(
17925 "onCompositionStart",
17926 "compositionstart focusout keydown keypress keyup mousedown".split(" ")
17927 );
17928 registerTwoPhaseEvent(
17929 "onCompositionUpdate",
17930 "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
17931 );
17932 var mediaEventTypes = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
17933 " "
17934 ), nonDelegatedEvents = new Set(
17935 "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes)
17936 ), listeningMarker = "_reactListening" + Math.random().toString(36).slice(2), didWarnControlledToUncontrolled = false, didWarnUncontrolledToControlled = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, didWarnPopoverTargetObject = false;
17937 var didWarnForNewBooleanPropsWithEmptyValue = {};
17938 var NORMALIZE_NEWLINES_REGEX = /\r\n?/g, NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g, xlinkNamespace = "http://www.w3.org/1999/xlink", xmlNamespace = "http://www.w3.org/XML/1998/namespace", EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", SUSPENSE_FALLBACK_START_DATA = "$!", PREAMBLE_CONTRIBUTION_HTML = 1, PREAMBLE_CONTRIBUTION_BODY = 2, PREAMBLE_CONTRIBUTION_HEAD = 4, FORM_STATE_IS_MATCHING = "F!", FORM_STATE_IS_NOT_MATCHING = "F", DOCUMENT_READY_STATE_COMPLETE = "complete", STYLE = "style", HostContextNamespaceNone = 0, HostContextNamespaceSvg = 1, HostContextNamespaceMath = 2, eventsEnabled = null, selectionInformation = null, warnedUnknownTags = { dialog: true, webview: true }, currentPopstateTransitionEvent = null, scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0, cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0, noTimeout = -1, localPromise = "function" === typeof Promise ? Promise : void 0, scheduleMicrotask = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof localPromise ? function(callback) {
17939 return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
17940 } : scheduleTimeout, previousHydratableOnEnteringScopedSingleton = null, NotLoaded = 0, Loaded = 1, Errored = 2, Settled = 3, Inserted = 4, preloadPropsMap = /* @__PURE__ */ new Map(), preconnectsSet = /* @__PURE__ */ new Set(), previousDispatcher = ReactDOMSharedInternals.d;
17941 ReactDOMSharedInternals.d = {
17942 f: function() {
17943 var previousWasRendering = previousDispatcher.f(), wasRendering = flushSyncWork$1();
17944 return previousWasRendering || wasRendering;
17945 },
17946 r: function(form) {
17947 var formInst = getInstanceFromNode(form);
17948 null !== formInst && 5 === formInst.tag && "form" === formInst.type ? requestFormReset$1(formInst) : previousDispatcher.r(form);
17949 },
17950 D: function(href) {
17951 previousDispatcher.D(href);
17952 preconnectAs("dns-prefetch", href, null);
17953 },
17954 C: function(href, crossOrigin) {
17955 previousDispatcher.C(href, crossOrigin);
17956 preconnectAs("preconnect", href, crossOrigin);
17957 },
17958 L: function(href, as, options) {
17959 previousDispatcher.L(href, as, options);
17960 var ownerDocument = globalDocument;
17961 if (ownerDocument && href && as) {
17962 var preloadSelector = 'link[rel="preload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"]';
17963 "image" === as ? options && options.imageSrcSet ? (preloadSelector += '[imagesrcset="' + escapeSelectorAttributeValueInsideDoubleQuotes(
17964 options.imageSrcSet
17965 ) + '"]', "string" === typeof options.imageSizes && (preloadSelector += '[imagesizes="' + escapeSelectorAttributeValueInsideDoubleQuotes(
17966 options.imageSizes
17967 ) + '"]')) : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]' : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]';
17968 var key = preloadSelector;
17969 switch (as) {
17970 case "style":
17971 key = getStyleKey(href);
17972 break;
17973 case "script":
17974 key = getScriptKey(href);
17975 }
17976 preloadPropsMap.has(key) || (href = assign(
17977 {
17978 rel: "preload",
17979 href: "image" === as && options && options.imageSrcSet ? void 0 : href,
17980 as
17981 },
17982 options
17983 ), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(
17984 getStylesheetSelectorFromKey(key)
17985 ) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key)) || (as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as)));
17986 }
17987 },
17988 m: function(href, options) {
17989 previousDispatcher.m(href, options);
17990 var ownerDocument = globalDocument;
17991 if (ownerDocument && href) {
17992 var as = options && "string" === typeof options.as ? options.as : "script", preloadSelector = 'link[rel="modulepreload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"][href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]', key = preloadSelector;
17993 switch (as) {
17994 case "audioworklet":
17995 case "paintworklet":
17996 case "serviceworker":
17997 case "sharedworker":
17998 case "worker":
17999 case "script":
18000 key = getScriptKey(href);
18001 }
18002 if (!preloadPropsMap.has(key) && (href = assign({ rel: "modulepreload", href }, options), preloadPropsMap.set(key, href), null === ownerDocument.querySelector(preloadSelector))) {
18003 switch (as) {
18004 case "audioworklet":
18005 case "paintworklet":
18006 case "serviceworker":
18007 case "sharedworker":
18008 case "worker":
18009 case "script":
18010 if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
18011 return;
18012 }
18013 as = ownerDocument.createElement("link");
18014 setInitialProperties(as, "link", href);
18015 markNodeAsHoistable(as);
18016 ownerDocument.head.appendChild(as);
18017 }
18018 }
18019 },
18020 X: function(src, options) {
18021 previousDispatcher.X(src, options);
18022 var ownerDocument = globalDocument;
18023 if (ownerDocument && src) {
18024 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
18025 resource || (resource = ownerDocument.querySelector(
18026 getScriptSelectorFromKey(key)
18027 ), resource || (src = assign({ src, async: true }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
18028 type: "script",
18029 instance: resource,
18030 count: 1,
18031 state: null
18032 }, scripts.set(key, resource));
18033 }
18034 },
18035 S: function(href, precedence, options) {
18036 previousDispatcher.S(href, precedence, options);
18037 var ownerDocument = globalDocument;
18038 if (ownerDocument && href) {
18039 var styles = getResourcesFromRoot(ownerDocument).hoistableStyles, key = getStyleKey(href);
18040 precedence = precedence || "default";
18041 var resource = styles.get(key);
18042 if (!resource) {
18043 var state = { loading: NotLoaded, preload: null };
18044 if (resource = ownerDocument.querySelector(
18045 getStylesheetSelectorFromKey(key)
18046 ))
18047 state.loading = Loaded | Inserted;
18048 else {
18049 href = assign(
18050 {
18051 rel: "stylesheet",
18052 href,
18053 "data-precedence": precedence
18054 },
18055 options
18056 );
18057 (options = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(href, options);
18058 var link = resource = ownerDocument.createElement("link");
18059 markNodeAsHoistable(link);
18060 setInitialProperties(link, "link", href);
18061 link._p = new Promise(function(resolve, reject) {
18062 link.onload = resolve;
18063 link.onerror = reject;
18064 });
18065 link.addEventListener("load", function() {
18066 state.loading |= Loaded;
18067 });
18068 link.addEventListener("error", function() {
18069 state.loading |= Errored;
18070 });
18071 state.loading |= Inserted;
18072 insertStylesheet(resource, precedence, ownerDocument);
18073 }
18074 resource = {
18075 type: "stylesheet",
18076 instance: resource,
18077 count: 1,
18078 state
18079 };
18080 styles.set(key, resource);
18081 }
18082 }
18083 },
18084 M: function(src, options) {
18085 previousDispatcher.M(src, options);
18086 var ownerDocument = globalDocument;
18087 if (ownerDocument && src) {
18088 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
18089 resource || (resource = ownerDocument.querySelector(
18090 getScriptSelectorFromKey(key)
18091 ), resource || (src = assign({ src, async: true, type: "module" }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
18092 type: "script",
18093 instance: resource,
18094 count: 1,
18095 state: null
18096 }, scripts.set(key, resource));
18097 }
18098 }
18099 };
18100 var globalDocument = "undefined" === typeof document ? null : document, tagCaches = null, suspendedState = null, LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, HostTransitionContext = {
18101 $$typeof: REACT_CONTEXT_TYPE,
18102 Provider: null,
18103 Consumer: null,
18104 _currentValue: NotPendingTransition,
18105 _currentValue2: NotPendingTransition,
18106 _threadCount: 0
18107 }, badgeFormat = "%c%s%c ", badgeStyle = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", resetStyle = "", pad = " ", bind = Function.prototype.bind;
18108 var didWarnAboutNestedUpdates = false;
18109 var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, setErrorHandler = null, setSuspenseHandler = null;
18110 overrideHookState = function(fiber, id, path, value) {
18111 id = findHook(fiber, id);
18112 null !== id && (path = copyWithSetImpl(id.memoizedState, path, 0, value), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
18113 };
18114 overrideHookStateDeletePath = function(fiber, id, path) {
18115 id = findHook(fiber, id);
18116 null !== id && (path = copyWithDeleteImpl(id.memoizedState, path, 0), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
18117 };
18118 overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
18119 id = findHook(fiber, id);
18120 null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
18121 };
18122 overrideProps = function(fiber, path, value) {
18123 fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);
18124 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
18125 path = enqueueConcurrentRenderForLane(fiber, 2);
18126 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
18127 };
18128 overridePropsDeletePath = function(fiber, path) {
18129 fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);
18130 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
18131 path = enqueueConcurrentRenderForLane(fiber, 2);
18132 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
18133 };
18134 overridePropsRenamePath = function(fiber, oldPath, newPath) {
18135 fiber.pendingProps = copyWithRename(
18136 fiber.memoizedProps,
18137 oldPath,
18138 newPath
18139 );
18140 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
18141 oldPath = enqueueConcurrentRenderForLane(fiber, 2);
18142 null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);
18143 };
18144 scheduleUpdate = function(fiber) {
18145 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
18146 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
18147 };
18148 setErrorHandler = function(newShouldErrorImpl) {
18149 shouldErrorImpl = newShouldErrorImpl;
18150 };
18151 setSuspenseHandler = function(newShouldSuspendImpl) {
18152 shouldSuspendImpl = newShouldSuspendImpl;
18153 };
18154 var _enabled = true, return_targetInst = null, hasScheduledReplayAttempt = false, queuedFocus = null, queuedDrag = null, queuedMouse = null, queuedPointers = /* @__PURE__ */ new Map(), queuedPointerCaptures = /* @__PURE__ */ new Map(), queuedExplicitHydrationTargets = [], discreteReplayableEvents = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
18155 " "
18156 ), lastScheduledReplayQueue = null;
18157 ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
18158 var root2 = this._internalRoot;
18159 if (null === root2) throw Error("Cannot update an unmounted root.");
18160 var args = arguments;
18161 "function" === typeof args[1] ? console.error(
18162 "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
18163 ) : isValidContainer(args[1]) ? console.error(
18164 "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."
18165 ) : "undefined" !== typeof args[1] && console.error(
18166 "You passed a second argument to root.render(...) but it only accepts one argument."
18167 );
18168 args = children;
18169 var current2 = root2.current, lane = requestUpdateLane(current2);
18170 updateContainerImpl(current2, lane, args, root2, null, null);
18171 };
18172 ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
18173 var args = arguments;
18174 "function" === typeof args[0] && console.error(
18175 "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
18176 );
18177 args = this._internalRoot;
18178 if (null !== args) {
18179 this._internalRoot = null;
18180 var container = args.containerInfo;
18181 (executionContext & (RenderContext | CommitContext)) !== NoContext && console.error(
18182 "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
18183 );
18184 updateContainerImpl(args.current, 2, null, args, null, null);
18185 flushSyncWork$1();
18186 container[internalContainerInstanceKey] = null;
18187 }
18188 };
18189 ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function(target) {
18190 if (target) {
18191 var updatePriority = resolveUpdatePriority();
18192 target = { blockedOn: null, target, priority: updatePriority };
18193 for (var i = 0; i < queuedExplicitHydrationTargets.length && 0 !== updatePriority && updatePriority < queuedExplicitHydrationTargets[i].priority; i++) ;
18194 queuedExplicitHydrationTargets.splice(i, 0, target);
18195 0 === i && attemptExplicitHydrationTarget(target);
18196 }
18197 };
18198 (function() {
18199 var isomorphicReactPackageVersion = React2.version;
18200 if ("19.1.1" !== isomorphicReactPackageVersion)
18201 throw Error(
18202 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.1.1\nLearn more: https://react.dev/warnings/version-mismatch")
18203 );
18204 })();
18205 "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
18206 "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"
18207 );
18208 ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
18209 var fiber = componentOrElement._reactInternals;
18210 if (void 0 === fiber) {
18211 if ("function" === typeof componentOrElement.render)
18212 throw Error("Unable to find node on an unmounted component.");
18213 componentOrElement = Object.keys(componentOrElement).join(",");
18214 throw Error(
18215 "Argument appears to not be a ReactComponent. Keys: " + componentOrElement
18216 );
18217 }
18218 componentOrElement = findCurrentFiberUsingSlowPath(fiber);
18219 componentOrElement = null !== componentOrElement ? findCurrentHostFiberImpl(componentOrElement) : null;
18220 componentOrElement = null === componentOrElement ? null : componentOrElement.stateNode;
18221 return componentOrElement;
18222 };
18223 if (!function() {
18224 var internals = {
18225 bundleType: 1,
18226 version: "19.1.1",
18227 rendererPackageName: "react-dom",
18228 currentDispatcherRef: ReactSharedInternals,
18229 reconcilerVersion: "19.1.1"
18230 };
18231 internals.overrideHookState = overrideHookState;
18232 internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
18233 internals.overrideHookStateRenamePath = overrideHookStateRenamePath;
18234 internals.overrideProps = overrideProps;
18235 internals.overridePropsDeletePath = overridePropsDeletePath;
18236 internals.overridePropsRenamePath = overridePropsRenamePath;
18237 internals.scheduleUpdate = scheduleUpdate;
18238 internals.setErrorHandler = setErrorHandler;
18239 internals.setSuspenseHandler = setSuspenseHandler;
18240 internals.scheduleRefresh = scheduleRefresh;
18241 internals.scheduleRoot = scheduleRoot;
18242 internals.setRefreshHandler = setRefreshHandler;
18243 internals.getCurrentFiber = getCurrentFiberForDevTools;
18244 internals.getLaneLabelMap = getLaneLabelMap;
18245 internals.injectProfilingHooks = injectProfilingHooks;
18246 return injectInternals(internals);
18247 }() && canUseDOM && window.top === window.self && (-1 < navigator.userAgent.indexOf("Chrome") && -1 === navigator.userAgent.indexOf("Edge") || -1 < navigator.userAgent.indexOf("Firefox"))) {
18248 var protocol = window.location.protocol;
18249 /^(https?|file):$/.test(protocol) && console.info(
18250 "%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools" + ("file:" === protocol ? "\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq" : ""),
18251 "font-weight:bold"
18252 );
18253 }
18254 exports.createRoot = function(container, options) {
18255 if (!isValidContainer(container))
18256 throw Error("Target container is not a DOM element.");
18257 warnIfReactDOMContainerInDEV(container);
18258 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, transitionCallbacks = null;
18259 null !== options && void 0 !== options && (options.hydrate ? console.warn(
18260 "hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."
18261 ) : "object" === typeof options && null !== options && options.$$typeof === REACT_ELEMENT_TYPE && console.error(
18262 "You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"
18263 ), true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError), void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks));
18264 options = createFiberRoot(
18265 container,
18266 1,
18267 false,
18268 null,
18269 null,
18270 isStrictMode,
18271 identifierPrefix,
18272 onUncaughtError,
18273 onCaughtError,
18274 onRecoverableError,
18275 transitionCallbacks,
18276 null
18277 );
18278 container[internalContainerInstanceKey] = options.current;
18279 listenToAllSupportedEvents(container);
18280 return new ReactDOMRoot(options);
18281 };
18282 exports.hydrateRoot = function(container, initialChildren, options) {
18283 if (!isValidContainer(container))
18284 throw Error("Target container is not a DOM element.");
18285 warnIfReactDOMContainerInDEV(container);
18286 void 0 === initialChildren && console.error(
18287 "Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
18288 );
18289 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, transitionCallbacks = null, formState = null;
18290 null !== options && void 0 !== options && (true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError), void 0 !== options.unstable_transitionCallbacks && (transitionCallbacks = options.unstable_transitionCallbacks), void 0 !== options.formState && (formState = options.formState));
18291 initialChildren = createFiberRoot(
18292 container,
18293 1,
18294 true,
18295 initialChildren,
18296 null != options ? options : null,
18297 isStrictMode,
18298 identifierPrefix,
18299 onUncaughtError,
18300 onCaughtError,
18301 onRecoverableError,
18302 transitionCallbacks,
18303 formState
18304 );
18305 initialChildren.context = getContextForSubtree(null);
18306 options = initialChildren.current;
18307 isStrictMode = requestUpdateLane(options);
18308 isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
18309 identifierPrefix = createUpdate(isStrictMode);
18310 identifierPrefix.callback = null;
18311 enqueueUpdate(options, identifierPrefix, isStrictMode);
18312 options = isStrictMode;
18313 initialChildren.current.lanes = options;
18314 markRootUpdated$1(initialChildren, options);
18315 ensureRootIsScheduled(initialChildren);
18316 container[internalContainerInstanceKey] = initialChildren.current;
18317 listenToAllSupportedEvents(container);
18318 return new ReactDOMHydrationRoot(initialChildren);
18319 };
18320 exports.version = "19.1.1";
18321 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
18322 })();
18323 }
18324 });
18325
18326 // node_modules/react-dom/client.js
18327 var require_client = __commonJS({
18328 "node_modules/react-dom/client.js"(exports, module) {
18329 "use strict";
18330 if (false) {
18331 checkDCE();
18332 module.exports = null;
18333 } else {
18334 module.exports = require_react_dom_client_development();
18335 }
18336 }
18337 });
18338
18339 // src/Games.tsx
18340 var import_client = __toESM(require_client());
18341 var import_react = __toESM(require_react());
18342 var import_jsx_runtime = __toESM(require_jsx_runtime());
18343 var LazyTicTacToe = (0, import_react.lazy)(() => import("./main-XZMLBHCF.js").then((m) => ({ default: m.TicTacToe })));
18344 var LazyConnectFour = (0, import_react.lazy)(() => import("./main-HVML6WQS.js").then((m) => ({ default: m.ConnectFour })));
18345 var LazyMemoryGame = (0, import_react.lazy)(() => import("./main-MX6K4HMI.js").then((m) => ({ default: m.MemoryGame })));
18346 var LazyLightsOut = (0, import_react.lazy)(() => import("./main-EQTPDHY4.js").then((m) => ({ default: m.LightsOut })));
18347 var LazyWordle = (0, import_react.lazy)(() => import("./main-4N34LOQP.js").then((m) => ({ default: m.Wordle })));
18348 var LazyMinesweeper = (0, import_react.lazy)(() => import("./main-QNFKFAB2.js").then((m) => ({ default: m.Minesweeper })));
18349 var wrapperStyle = {
18350 display: "flex",
18351 justifyContent: "center",
18352 alignItems: "center",
18353 minHeight: "100vh",
18354 fontFamily: "system-ui, sans-serif"
18355 };
18356 var menuStyle = {
18357 listStyle: "none",
18358 padding: 0,
18359 margin: "2rem auto",
18360 width: 280,
18361 display: "flex",
18362 flexDirection: "column",
18363 gap: "1rem",
18364 cursor: "pointer"
18365 };
18366 var menuItemStyle = {
18367 padding: "0.75rem 1rem",
18368 borderRadius: 8,
18369 background: "#f3f4f6",
18370 textAlign: "center",
18371 transition: "background 120ms"
18372 };
18373 var gameMap = {
18374 tictactoe: {
18375 LazyComponent: LazyTicTacToe,
18376 title: "TicTacToe"
18377 },
18378 connectfour: {
18379 LazyComponent: LazyConnectFour,
18380 title: "Connect Four"
18381 },
18382 memorygame: {
18383 LazyComponent: LazyMemoryGame,
18384 title: "Memory Game"
18385 },
18386 lightsout: {
18387 LazyComponent: LazyLightsOut,
18388 title: "Lights out"
18389 },
18390 wordle: {
18391 LazyComponent: LazyWordle,
18392 title: "Wordle"
18393 },
18394 minesweeper: {
18395 LazyComponent: LazyMinesweeper,
18396 title: "Minesweeper"
18397 }
18398 };
18399 var BASE = "/games";
18400 var Games = () => {
18401 const getKey = (p) => {
18402 const m = p.match(/^\/games\/?([^/]+)?/i);
18403 const k = (m?.[1] || "").toLowerCase();
18404 return k && k in gameMap ? k : null;
18405 };
18406 const [game, setGame] = (0, import_react.useState)(() => getKey(location.pathname));
18407 (0, import_react.useEffect)(() => {
18408 const onPop = () => setGame(getKey(location.pathname));
18409 addEventListener("popstate", onPop);
18410 return () => removeEventListener("popstate", onPop);
18411 }, []);
18412 (0, import_react.useEffect)(() => {
18413 history.pushState(null, "", game ? `${BASE}/${game}` : BASE);
18414 }, [game]);
18415 const selected = game ? gameMap[game] : null;
18416 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { children: [
18417 /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { style: { textAlign: "center" }, children: "MAI React Playground" }),
18418 selected?.LazyComponent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "loading..." }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: {
18419 display: "flex",
18420 flexDirection: "column",
18421 justifyContent: "center",
18422 alignItems: "center",
18423 gap: 10
18424 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(selected.LazyComponent, {}) }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: menuStyle, children: Object.entries(gameMap).map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { style: menuItemStyle, onClick: () => setGame(key), children: value.title }, key)) }),
18425 game && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { style: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "cetner", margin: "1.5rem auto 0" }, onClick: () => setGame(null), children: "Back to menu" })
18426 ] }) });
18427 };
18428 import_client.default.createRoot(document.getElementById("root")).render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Games, {}));
18429 export {
18430 Games
18431 };
18432 /*! Bundled license information:
18433
18434 scheduler/cjs/scheduler.development.js:
18435 (**
18436 * @license React
18437 * scheduler.development.js
18438 *
18439 * Copyright (c) Meta Platforms, Inc. and affiliates.
18440 *
18441 * This source code is licensed under the MIT license found in the
18442 * LICENSE file in the root directory of this source tree.
18443 *)
18444
18445 react-dom/cjs/react-dom.development.js:
18446 (**
18447 * @license React
18448 * react-dom.development.js
18449 *
18450 * Copyright (c) Meta Platforms, Inc. and affiliates.
18451 *
18452 * This source code is licensed under the MIT license found in the
18453 * LICENSE file in the root directory of this source tree.
18454 *)
18455
18456 react-dom/cjs/react-dom-client.development.js:
18457 (**
18458 * @license React
18459 * react-dom-client.development.js
18460 *
18461 * Copyright (c) Meta Platforms, Inc. and affiliates.
18462 *
18463 * This source code is licensed under the MIT license found in the
18464 * LICENSE file in the root directory of this source tree.
18465 *)
18466 */
18467 //# sourceMappingURL=Games.js.map